diff --git a/.eslintrc b/.eslintrc index aa166037..d21f4aa7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -13,6 +13,7 @@ "node": true }, "rules": { + "@typescript-eslint/consistent-type-imports": "error", "@typescript-eslint/explicit-function-return-type": "error", "@typescript-eslint/restrict-template-expressions": "error", "@typescript-eslint/restrict-plus-operands": "error", diff --git a/src/controllers/api/abandonLibraryDailyTaskController.ts b/src/controllers/api/abandonLibraryDailyTaskController.ts index ac515609..d7dbdcdd 100644 --- a/src/controllers/api/abandonLibraryDailyTaskController.ts +++ b/src/controllers/api/abandonLibraryDailyTaskController.ts @@ -1,6 +1,6 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const abandonLibraryDailyTaskController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/abortDojoComponentController.ts b/src/controllers/api/abortDojoComponentController.ts index 3fcf770c..03fe0459 100644 --- a/src/controllers/api/abortDojoComponentController.ts +++ b/src/controllers/api/abortDojoComponentController.ts @@ -9,7 +9,7 @@ import { import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const abortDojoComponentController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/abortDojoComponentDestructionController.ts b/src/controllers/api/abortDojoComponentDestructionController.ts index 75f08f37..75e2efb4 100644 --- a/src/controllers/api/abortDojoComponentDestructionController.ts +++ b/src/controllers/api/abortDojoComponentDestructionController.ts @@ -2,7 +2,7 @@ import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermissio import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const abortDojoComponentDestructionController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/activateRandomModController.ts b/src/controllers/api/activateRandomModController.ts index 06d4c488..f4679f5b 100644 --- a/src/controllers/api/activateRandomModController.ts +++ b/src/controllers/api/activateRandomModController.ts @@ -8,7 +8,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { addMods, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getRandomElement } from "@/src/services/rngService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { ExportUpgrades } from "warframe-public-export-plus"; export const activateRandomModController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/addFriendController.ts b/src/controllers/api/addFriendController.ts index bbb629d9..2637731f 100644 --- a/src/controllers/api/addFriendController.ts +++ b/src/controllers/api/addFriendController.ts @@ -3,8 +3,8 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { Friendship } from "@/src/models/friendModel"; import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "@/src/services/friendService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IFriendInfo } from "@/src/types/friendTypes"; -import { RequestHandler } from "express"; +import type { IFriendInfo } from "@/src/types/friendTypes"; +import type { RequestHandler } from "express"; export const addFriendController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/addFriendImageController.ts b/src/controllers/api/addFriendImageController.ts index 5f224ad8..f8ba7d61 100644 --- a/src/controllers/api/addFriendImageController.ts +++ b/src/controllers/api/addFriendImageController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; diff --git a/src/controllers/api/addIgnoredUserController.ts b/src/controllers/api/addIgnoredUserController.ts index 8e8d4441..48bacaeb 100644 --- a/src/controllers/api/addIgnoredUserController.ts +++ b/src/controllers/api/addIgnoredUserController.ts @@ -2,8 +2,8 @@ import { toOid } from "@/src/helpers/inventoryHelpers"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { Account, Ignore } from "@/src/models/loginModel"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IFriendInfo } from "@/src/types/friendTypes"; -import { RequestHandler } from "express"; +import type { IFriendInfo } from "@/src/types/friendTypes"; +import type { RequestHandler } from "express"; export const addIgnoredUserController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/addPendingFriendController.ts b/src/controllers/api/addPendingFriendController.ts index 0ba548f4..30279c2b 100644 --- a/src/controllers/api/addPendingFriendController.ts +++ b/src/controllers/api/addPendingFriendController.ts @@ -5,8 +5,8 @@ import { Account } from "@/src/models/loginModel"; import { addInventoryDataToFriendInfo, areFriendsOfFriends } from "@/src/services/friendService"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IFriendInfo } from "@/src/types/friendTypes"; -import { RequestHandler } from "express"; +import type { IFriendInfo } from "@/src/types/friendTypes"; +import type { RequestHandler } from "express"; export const addPendingFriendController: RequestHandler = async (req, res) => { const payload = getJSONfromString(String(req.body)); diff --git a/src/controllers/api/addToAllianceController.ts b/src/controllers/api/addToAllianceController.ts index 36970a22..abf409ae 100644 --- a/src/controllers/api/addToAllianceController.ts +++ b/src/controllers/api/addToAllianceController.ts @@ -5,7 +5,7 @@ import { getEffectiveAvatarImageType, getInventory } from "@/src/services/invent import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; import { logger } from "@/src/utils/logger"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { ExportFlavour } from "warframe-public-export-plus"; export const addToAllianceController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/addToGuildController.ts b/src/controllers/api/addToGuildController.ts index 53f0b445..bb16aa5a 100644 --- a/src/controllers/api/addToGuildController.ts +++ b/src/controllers/api/addToGuildController.ts @@ -6,10 +6,11 @@ import { hasGuildPermission } from "@/src/services/guildService"; import { createMessage } from "@/src/services/inboxService"; import { getEffectiveAvatarImageType, getInventory } from "@/src/services/inventoryService"; import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "@/src/services/loginService"; -import { IOid } from "@/src/types/commonTypes"; -import { GuildPermission, IGuildMemberClient } from "@/src/types/guildTypes"; +import type { IOid } from "@/src/types/commonTypes"; +import type { IGuildMemberClient } from "@/src/types/guildTypes"; +import { GuildPermission } from "@/src/types/guildTypes"; import { logger } from "@/src/utils/logger"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { ExportFlavour } from "warframe-public-export-plus"; export const addToGuildController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/adoptPetController.ts b/src/controllers/api/adoptPetController.ts index 3cd340da..1c275029 100644 --- a/src/controllers/api/adoptPetController.ts +++ b/src/controllers/api/adoptPetController.ts @@ -1,7 +1,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const adoptPetController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/apartmentController.ts b/src/controllers/api/apartmentController.ts index 638dd6ca..b857180a 100644 --- a/src/controllers/api/apartmentController.ts +++ b/src/controllers/api/apartmentController.ts @@ -1,6 +1,6 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { getPersonalRooms } from "@/src/services/personalRoomsService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const apartmentController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/arcaneCommonController.ts b/src/controllers/api/arcaneCommonController.ts index 2448140b..ea6bb279 100644 --- a/src/controllers/api/arcaneCommonController.ts +++ b/src/controllers/api/arcaneCommonController.ts @@ -1,8 +1,8 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory, addMods } from "@/src/services/inventoryService"; -import { IOid } from "@/src/types/commonTypes"; +import type { IOid } from "@/src/types/commonTypes"; export const arcaneCommonController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/archonFusionController.ts b/src/controllers/api/archonFusionController.ts index 04c92384..5b84bb6b 100644 --- a/src/controllers/api/archonFusionController.ts +++ b/src/controllers/api/archonFusionController.ts @@ -1,7 +1,7 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { addMiscItems, getInventory } from "@/src/services/inventoryService"; -import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; import { colorToShard, combineColors, shardToColor } from "@/src/helpers/shardHelper"; export const archonFusionController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/artifactTransmutationController.ts b/src/controllers/api/artifactTransmutationController.ts index deb05cde..bcacfb80 100644 --- a/src/controllers/api/artifactTransmutationController.ts +++ b/src/controllers/api/artifactTransmutationController.ts @@ -3,9 +3,10 @@ import { createVeiledRivenFingerprint, rivenRawToRealWeighted } from "@/src/help import { addMiscItems, addMods, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getRandomElement, getRandomWeightedReward, getRandomWeightedRewardUc } from "@/src/services/rngService"; -import { IUpgradeFromClient } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; -import { ExportBoosterPacks, ExportUpgrades, TRarity } from "warframe-public-export-plus"; +import type { IUpgradeFromClient } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; +import type { TRarity } from "warframe-public-export-plus"; +import { ExportBoosterPacks, ExportUpgrades } from "warframe-public-export-plus"; export const artifactTransmutationController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/artifactsController.ts b/src/controllers/api/artifactsController.ts index 7bbb68a7..c25db5d3 100644 --- a/src/controllers/api/artifactsController.ts +++ b/src/controllers/api/artifactsController.ts @@ -1,7 +1,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; -import { IInventoryClient, IUpgradeClient } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; +import type { IInventoryClient, IUpgradeClient } from "@/src/types/inventoryTypes/inventoryTypes"; import { addMods, getInventory } from "@/src/services/inventoryService"; export const artifactsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/cancelGuildAdvertisementController.ts b/src/controllers/api/cancelGuildAdvertisementController.ts index aa587201..1a7ccf12 100644 --- a/src/controllers/api/cancelGuildAdvertisementController.ts +++ b/src/controllers/api/cancelGuildAdvertisementController.ts @@ -3,7 +3,7 @@ import { getGuildForRequestEx, hasGuildPermission } from "@/src/services/guildSe import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const cancelGuildAdvertisementController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/changeDojoRootController.ts b/src/controllers/api/changeDojoRootController.ts index 1c7cb792..cd8f050e 100644 --- a/src/controllers/api/changeDojoRootController.ts +++ b/src/controllers/api/changeDojoRootController.ts @@ -1,7 +1,8 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService"; import { logger } from "@/src/utils/logger"; -import { GuildPermission, IDojoComponentDatabase } from "@/src/types/guildTypes"; +import type { IDojoComponentDatabase } from "@/src/types/guildTypes"; +import { GuildPermission } from "@/src/types/guildTypes"; import { Types } from "mongoose"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory } from "@/src/services/inventoryService"; diff --git a/src/controllers/api/changeGuildRankController.ts b/src/controllers/api/changeGuildRankController.ts index 28a8113e..5a0a6bc0 100644 --- a/src/controllers/api/changeGuildRankController.ts +++ b/src/controllers/api/changeGuildRankController.ts @@ -2,7 +2,7 @@ import { GuildMember } from "@/src/models/guildModel"; import { getGuildForRequest, hasGuildPermissionEx } from "@/src/services/guildService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const changeGuildRankController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/checkDailyMissionBonusController.ts b/src/controllers/api/checkDailyMissionBonusController.ts index 8e457142..5d67d4b5 100644 --- a/src/controllers/api/checkDailyMissionBonusController.ts +++ b/src/controllers/api/checkDailyMissionBonusController.ts @@ -1,5 +1,5 @@ import { getAccountForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const checkDailyMissionBonusController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/api/claimCompletedRecipeController.ts b/src/controllers/api/claimCompletedRecipeController.ts index 377680b3..fa93611e 100644 --- a/src/controllers/api/claimCompletedRecipeController.ts +++ b/src/controllers/api/claimCompletedRecipeController.ts @@ -1,10 +1,10 @@ //this is a controller for the claimCompletedRecipe route //it will claim a recipe for the user -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { logger } from "@/src/utils/logger"; import { getRecipe } from "@/src/services/itemDataService"; -import { IOid, IOidWithLegacySupport } from "@/src/types/commonTypes"; +import type { IOid, IOidWithLegacySupport } from "@/src/types/commonTypes"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getAccountForRequest } from "@/src/services/loginService"; import { @@ -18,12 +18,14 @@ import { addPowerSuit, addEquipment } from "@/src/services/inventoryService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { InventorySlot, IPendingRecipeDatabase } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IPendingRecipeDatabase } from "@/src/types/inventoryTypes/inventoryTypes"; +import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; import { toOid2 } from "@/src/helpers/inventoryHelpers"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { IRecipe } from "warframe-public-export-plus"; -import { EquipmentFeatures, IEquipmentClient, Status } from "@/src/types/equipmentTypes"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { IRecipe } from "warframe-public-export-plus"; +import type { IEquipmentClient } from "@/src/types/equipmentTypes"; +import { EquipmentFeatures, Status } from "@/src/types/equipmentTypes"; interface IClaimCompletedRecipeRequest { RecipeIds: IOid[]; diff --git a/src/controllers/api/claimJunctionChallengeRewardController.ts b/src/controllers/api/claimJunctionChallengeRewardController.ts index 849126cb..b83fbde4 100644 --- a/src/controllers/api/claimJunctionChallengeRewardController.ts +++ b/src/controllers/api/claimJunctionChallengeRewardController.ts @@ -2,7 +2,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { combineInventoryChanges, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { ExportChallenges } from "warframe-public-export-plus"; export const claimJunctionChallengeRewardController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/claimLibraryDailyTaskRewardController.ts b/src/controllers/api/claimLibraryDailyTaskRewardController.ts index 3d582e46..60bd036a 100644 --- a/src/controllers/api/claimLibraryDailyTaskRewardController.ts +++ b/src/controllers/api/claimLibraryDailyTaskRewardController.ts @@ -1,6 +1,6 @@ import { addFusionPoints, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const claimLibraryDailyTaskRewardController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/clearDialogueHistoryController.ts b/src/controllers/api/clearDialogueHistoryController.ts index f24f360a..4dfc9e93 100644 --- a/src/controllers/api/clearDialogueHistoryController.ts +++ b/src/controllers/api/clearDialogueHistoryController.ts @@ -1,6 +1,6 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const clearDialogueHistoryController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/clearNewEpisodeRewardController.ts b/src/controllers/api/clearNewEpisodeRewardController.ts index 1dd3010a..dcd8e46c 100644 --- a/src/controllers/api/clearNewEpisodeRewardController.ts +++ b/src/controllers/api/clearNewEpisodeRewardController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; // example req.body: {"NewEpisodeReward":true,"crossPlaySetting":"ENABLED"} export const clearNewEpisodeRewardController: RequestHandler = (_req, res) => { diff --git a/src/controllers/api/completeCalendarEventController.ts b/src/controllers/api/completeCalendarEventController.ts index 11aba85c..e9dbc4e4 100644 --- a/src/controllers/api/completeCalendarEventController.ts +++ b/src/controllers/api/completeCalendarEventController.ts @@ -2,8 +2,8 @@ import { checkCalendarAutoAdvance, getCalendarProgress, getInventory } from "@/s import { getAccountIdForRequest } from "@/src/services/loginService"; import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; import { getWorldState } from "@/src/services/worldStateService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { RequestHandler } from "express"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { RequestHandler } from "express"; // GET request; query parameters: CompletedEventIdx=0&Iteration=4&Version=19&Season=CST_SUMMER export const completeCalendarEventController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/completeRandomModChallengeController.ts b/src/controllers/api/completeRandomModChallengeController.ts index 0400c2b0..730c6111 100644 --- a/src/controllers/api/completeRandomModChallengeController.ts +++ b/src/controllers/api/completeRandomModChallengeController.ts @@ -1,10 +1,10 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { IVeiledRivenFingerprint } from "@/src/helpers/rivenHelper"; +import type { IVeiledRivenFingerprint } from "@/src/helpers/rivenHelper"; export const completeRandomModChallengeController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/confirmAllianceInvitationController.ts b/src/controllers/api/confirmAllianceInvitationController.ts index 8d998e77..4dd206ec 100644 --- a/src/controllers/api/confirmAllianceInvitationController.ts +++ b/src/controllers/api/confirmAllianceInvitationController.ts @@ -1,7 +1,7 @@ import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel"; import { getAllianceClient } from "@/src/services/guildService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const confirmAllianceInvitationController: RequestHandler = async (req, res) => { // Check requester is a warlord in their guild diff --git a/src/controllers/api/confirmGuildInvitationController.ts b/src/controllers/api/confirmGuildInvitationController.ts index 08123a37..02fe5140 100644 --- a/src/controllers/api/confirmGuildInvitationController.ts +++ b/src/controllers/api/confirmGuildInvitationController.ts @@ -11,8 +11,8 @@ import { import { getInventory } from "@/src/services/inventoryService"; import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { RequestHandler } from "express"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { RequestHandler } from "express"; import { Types } from "mongoose"; // GET request: A player accepting an invite they got in their inbox. diff --git a/src/controllers/api/contributeGuildClassController.ts b/src/controllers/api/contributeGuildClassController.ts index 865eb868..6bf4014d 100644 --- a/src/controllers/api/contributeGuildClassController.ts +++ b/src/controllers/api/contributeGuildClassController.ts @@ -4,7 +4,7 @@ import { Guild } from "@/src/models/guildModel"; import { checkClanAscensionHasRequiredContributors } from "@/src/services/guildService"; import { addFusionPoints, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { Types } from "mongoose"; export const contributeGuildClassController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/contributeToDojoComponentController.ts b/src/controllers/api/contributeToDojoComponentController.ts index 6d0016eb..eaed2d18 100644 --- a/src/controllers/api/contributeToDojoComponentController.ts +++ b/src/controllers/api/contributeToDojoComponentController.ts @@ -1,5 +1,6 @@ -import { GuildMember, TGuildDatabaseDocument } from "@/src/models/guildModel"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TGuildDatabaseDocument } from "@/src/models/guildModel"; +import { GuildMember } from "@/src/models/guildModel"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; import { addGuildMemberMiscItemContribution, getDojoClient, @@ -11,11 +12,12 @@ import { } from "@/src/services/guildService"; import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IDojoContributable, IGuildMemberDatabase } from "@/src/types/guildTypes"; -import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { RequestHandler } from "express"; -import { ExportDojoRecipes, IDojoBuild } from "warframe-public-export-plus"; +import type { IDojoContributable, IGuildMemberDatabase } from "@/src/types/guildTypes"; +import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { RequestHandler } from "express"; +import type { IDojoBuild } from "warframe-public-export-plus"; +import { ExportDojoRecipes } from "warframe-public-export-plus"; interface IContributeToDojoComponentRequest { ComponentId: string; diff --git a/src/controllers/api/contributeToVaultController.ts b/src/controllers/api/contributeToVaultController.ts index e6a33443..d793549a 100644 --- a/src/controllers/api/contributeToVaultController.ts +++ b/src/controllers/api/contributeToVaultController.ts @@ -1,10 +1,5 @@ -import { - Alliance, - Guild, - GuildMember, - TGuildDatabaseDocument, - TGuildMemberDatabaseDocument -} from "@/src/models/guildModel"; +import type { TGuildDatabaseDocument, TGuildMemberDatabaseDocument } from "@/src/models/guildModel"; +import { Alliance, Guild, GuildMember } from "@/src/models/guildModel"; import { addGuildMemberMiscItemContribution, addGuildMemberShipDecoContribution, @@ -21,9 +16,9 @@ import { updateCurrency } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { ITypeCount } from "@/src/types/commonTypes"; -import { IFusionTreasure, IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; +import type { ITypeCount } from "@/src/types/commonTypes"; +import type { IFusionTreasure, IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; export const contributeToVaultController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/createAllianceController.ts b/src/controllers/api/createAllianceController.ts index e3a81a24..205e67a6 100644 --- a/src/controllers/api/createAllianceController.ts +++ b/src/controllers/api/createAllianceController.ts @@ -4,7 +4,7 @@ import { getAllianceClient } from "@/src/services/guildService"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const createAllianceController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/createGuildController.ts b/src/controllers/api/createGuildController.ts index 6fc5f8e5..ac5d1f94 100644 --- a/src/controllers/api/createGuildController.ts +++ b/src/controllers/api/createGuildController.ts @@ -1,10 +1,10 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountForRequest } from "@/src/services/loginService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { Guild, GuildMember } from "@/src/models/guildModel"; import { createUniqueClanName, getGuildClient, giveClanKey } from "@/src/services/guildService"; import { getInventory } from "@/src/services/inventoryService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; export const createGuildController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/api/creditsController.ts b/src/controllers/api/creditsController.ts index ecd37fa1..8bbac3a8 100644 --- a/src/controllers/api/creditsController.ts +++ b/src/controllers/api/creditsController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory } from "@/src/services/inventoryService"; diff --git a/src/controllers/api/crewMembersController.ts b/src/controllers/api/crewMembersController.ts index a4f2ea2a..fd5d9087 100644 --- a/src/controllers/api/crewMembersController.ts +++ b/src/controllers/api/crewMembersController.ts @@ -1,9 +1,9 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { ICrewMemberClient } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; +import type { ICrewMemberClient } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; import { Types } from "mongoose"; export const crewMembersController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/crewShipFusionController.ts b/src/controllers/api/crewShipFusionController.ts index 160c19b7..093d975f 100644 --- a/src/controllers/api/crewShipFusionController.ts +++ b/src/controllers/api/crewShipFusionController.ts @@ -1,10 +1,11 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { addMiscItems, freeUpSlot, getInventory, updateCurrency } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IOid } from "@/src/types/commonTypes"; -import { ICrewShipComponentFingerprint, InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { RequestHandler } from "express"; +import type { IOid } from "@/src/types/commonTypes"; +import type { ICrewShipComponentFingerprint } from "@/src/types/inventoryTypes/inventoryTypes"; +import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { RequestHandler } from "express"; import { ExportCustoms, ExportDojoRecipes } from "warframe-public-export-plus"; export const crewShipFusionController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/crewShipIdentifySalvageController.ts b/src/controllers/api/crewShipIdentifySalvageController.ts index 83a9d7cb..29ac2609 100644 --- a/src/controllers/api/crewShipIdentifySalvageController.ts +++ b/src/controllers/api/crewShipIdentifySalvageController.ts @@ -5,14 +5,17 @@ import { addEquipment } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; -import { ICrewShipComponentFingerprint, IInnateDamageFingerprint } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; +import type { + ICrewShipComponentFingerprint, + IInnateDamageFingerprint +} from "@/src/types/inventoryTypes/inventoryTypes"; import { ExportCustoms, ExportRailjackWeapons, ExportUpgrades } from "warframe-public-export-plus"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; import { getRandomInt } from "@/src/services/rngService"; -import { IFingerprintStat } from "@/src/helpers/rivenHelper"; -import { IEquipmentDatabase } from "@/src/types/equipmentTypes"; +import type { IFingerprintStat } from "@/src/helpers/rivenHelper"; +import type { IEquipmentDatabase } from "@/src/types/equipmentTypes"; export const crewShipIdentifySalvageController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/customObstacleCourseLeaderboardController.ts b/src/controllers/api/customObstacleCourseLeaderboardController.ts index de5c4217..731766b0 100644 --- a/src/controllers/api/customObstacleCourseLeaderboardController.ts +++ b/src/controllers/api/customObstacleCourseLeaderboardController.ts @@ -5,7 +5,7 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountForRequest, getAccountIdForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; import { logger } from "@/src/utils/logger"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const customObstacleCourseLeaderboardController: RequestHandler = async (req, res) => { const data = getJSONfromString(String(req.body)); diff --git a/src/controllers/api/customizeGuildRanksController.ts b/src/controllers/api/customizeGuildRanksController.ts index 5ddca7b6..4106ef21 100644 --- a/src/controllers/api/customizeGuildRanksController.ts +++ b/src/controllers/api/customizeGuildRanksController.ts @@ -1,7 +1,8 @@ import { getGuildForRequest, hasGuildPermission } from "@/src/services/guildService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { GuildPermission, IGuildRank } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { IGuildRank } from "@/src/types/guildTypes"; +import { GuildPermission } from "@/src/types/guildTypes"; +import type { RequestHandler } from "express"; export const customizeGuildRanksController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/declineAllianceInviteController.ts b/src/controllers/api/declineAllianceInviteController.ts index 2d9f9dd6..c2e3ae36 100644 --- a/src/controllers/api/declineAllianceInviteController.ts +++ b/src/controllers/api/declineAllianceInviteController.ts @@ -1,6 +1,6 @@ import { AllianceMember, GuildMember } from "@/src/models/guildModel"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const declineAllianceInviteController: RequestHandler = async (req, res) => { // Check requester is a warlord in their guild diff --git a/src/controllers/api/declineGuildInviteController.ts b/src/controllers/api/declineGuildInviteController.ts index c2bcd073..a6690006 100644 --- a/src/controllers/api/declineGuildInviteController.ts +++ b/src/controllers/api/declineGuildInviteController.ts @@ -1,6 +1,6 @@ import { GuildMember } from "@/src/models/guildModel"; import { getAccountForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const declineGuildInviteController: RequestHandler = async (req, res) => { const accountId = await getAccountForRequest(req); diff --git a/src/controllers/api/deleteSessionController.ts b/src/controllers/api/deleteSessionController.ts index d4053779..1662be48 100644 --- a/src/controllers/api/deleteSessionController.ts +++ b/src/controllers/api/deleteSessionController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { deleteSession } from "@/src/managers/sessionManager"; const deleteSessionController: RequestHandler = (_req, res) => { diff --git a/src/controllers/api/destroyDojoDecoController.ts b/src/controllers/api/destroyDojoDecoController.ts index cb95e930..5e27bd86 100644 --- a/src/controllers/api/destroyDojoDecoController.ts +++ b/src/controllers/api/destroyDojoDecoController.ts @@ -10,7 +10,7 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; import { logger } from "@/src/utils/logger"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const destroyDojoDecoController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/divvyAllianceVaultController.ts b/src/controllers/api/divvyAllianceVaultController.ts index 8847a19f..4ecdaa02 100644 --- a/src/controllers/api/divvyAllianceVaultController.ts +++ b/src/controllers/api/divvyAllianceVaultController.ts @@ -3,7 +3,7 @@ import { getAccountForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; import { parallelForeach } from "@/src/utils/async-utils"; import { logger } from "@/src/utils/logger"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const divvyAllianceVaultController: RequestHandler = async (req, res) => { // Afaict, there's no way to put anything other than credits in the alliance vault (anymore?), so just no-op if this is not a request to divvy credits. diff --git a/src/controllers/api/dojoComponentRushController.ts b/src/controllers/api/dojoComponentRushController.ts index 899ed0af..03770928 100644 --- a/src/controllers/api/dojoComponentRushController.ts +++ b/src/controllers/api/dojoComponentRushController.ts @@ -1,10 +1,12 @@ -import { GuildMember, TGuildDatabaseDocument } from "@/src/models/guildModel"; +import type { TGuildDatabaseDocument } from "@/src/models/guildModel"; +import { GuildMember } from "@/src/models/guildModel"; import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, scaleRequiredCount } from "@/src/services/guildService"; import { getInventory, updateCurrency } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IDojoContributable } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; -import { ExportDojoRecipes, IDojoBuild } from "warframe-public-export-plus"; +import type { IDojoContributable } from "@/src/types/guildTypes"; +import type { RequestHandler } from "express"; +import type { IDojoBuild } from "warframe-public-export-plus"; +import { ExportDojoRecipes } from "warframe-public-export-plus"; interface IDojoComponentRushRequest { DecoType?: string; diff --git a/src/controllers/api/dojoController.ts b/src/controllers/api/dojoController.ts index 9c54b449..913a2176 100644 --- a/src/controllers/api/dojoController.ts +++ b/src/controllers/api/dojoController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; // Arbiter Dojo endpoints, not really used by us as we don't provide a ContentURL. diff --git a/src/controllers/api/dronesController.ts b/src/controllers/api/dronesController.ts index 15d7758f..393178f8 100644 --- a/src/controllers/api/dronesController.ts +++ b/src/controllers/api/dronesController.ts @@ -3,10 +3,10 @@ import { addMiscItems, getInventory } from "@/src/services/inventoryService"; import { fromStoreItem } from "@/src/services/itemDataService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getRandomInt, getRandomWeightedRewardUc } from "@/src/services/rngService"; -import { IMongoDate, IOid } from "@/src/types/commonTypes"; -import { IDroneClient } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { RequestHandler } from "express"; +import type { IMongoDate, IOid } from "@/src/types/commonTypes"; +import type { IDroneClient } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { RequestHandler } from "express"; import { ExportDrones, ExportResources, ExportSystems } from "warframe-public-export-plus"; export const dronesController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/endlessXpController.ts b/src/controllers/api/endlessXpController.ts index 1be4bd2b..0a98ed9a 100644 --- a/src/controllers/api/endlessXpController.ts +++ b/src/controllers/api/endlessXpController.ts @@ -1,13 +1,14 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { combineInventoryChanges, getInventory } from "@/src/services/inventoryService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { IEndlessXpReward, IInventoryClient, TEndlessXpCategory } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IEndlessXpReward, IInventoryClient, TEndlessXpCategory } from "@/src/types/inventoryTypes/inventoryTypes"; import { logger } from "@/src/utils/logger"; -import { ExportRewards, ICountedStoreItem } from "warframe-public-export-plus"; +import type { ICountedStoreItem } from "warframe-public-export-plus"; +import { ExportRewards } from "warframe-public-export-plus"; import { getRandomElement } from "@/src/services/rngService"; import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; export const endlessXpController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/entratiLabConquestModeController.ts b/src/controllers/api/entratiLabConquestModeController.ts index c16595ee..226cb348 100644 --- a/src/controllers/api/entratiLabConquestModeController.ts +++ b/src/controllers/api/entratiLabConquestModeController.ts @@ -2,7 +2,7 @@ import { toMongoDate } from "@/src/helpers/inventoryHelpers"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory, updateEntratiVault } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const entratiLabConquestModeController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/evolveWeaponController.ts b/src/controllers/api/evolveWeaponController.ts index 8318f17b..50887844 100644 --- a/src/controllers/api/evolveWeaponController.ts +++ b/src/controllers/api/evolveWeaponController.ts @@ -1,8 +1,9 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { addMiscItems, getInventory } from "@/src/services/inventoryService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getRecipe, WeaponTypeInternal } from "@/src/services/itemDataService"; +import type { WeaponTypeInternal } from "@/src/services/itemDataService"; +import { getRecipe } from "@/src/services/itemDataService"; import { EquipmentFeatures } from "@/src/types/equipmentTypes"; export const evolveWeaponController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/findSessionsController.ts b/src/controllers/api/findSessionsController.ts index 70d714bb..152df91d 100644 --- a/src/controllers/api/findSessionsController.ts +++ b/src/controllers/api/findSessionsController.ts @@ -1,7 +1,7 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getSession } from "@/src/managers/sessionManager"; import { logger } from "@/src/utils/logger"; -import { IFindSessionRequest } from "@/src/types/session"; +import type { IFindSessionRequest } from "@/src/types/session"; export const findSessionsController: RequestHandler = (_req, res) => { const req = JSON.parse(String(_req.body)) as IFindSessionRequest; diff --git a/src/controllers/api/fishmongerController.ts b/src/controllers/api/fishmongerController.ts index 16fcc69b..43946fdf 100644 --- a/src/controllers/api/fishmongerController.ts +++ b/src/controllers/api/fishmongerController.ts @@ -1,8 +1,8 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { addMiscItems, addStanding, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; +import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; import { ExportResources } from "warframe-public-export-plus"; export const fishmongerController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/focusController.ts b/src/controllers/api/focusController.ts index b5257201..e5764aed 100644 --- a/src/controllers/api/focusController.ts +++ b/src/controllers/api/focusController.ts @@ -1,7 +1,8 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory, addMiscItems, addEquipment, occupySlot } from "@/src/services/inventoryService"; -import { IMiscItem, TFocusPolarity, TEquipmentKey, InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IMiscItem, TFocusPolarity, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; import { logger } from "@/src/utils/logger"; import { ExportFocusUpgrades } from "warframe-public-export-plus"; import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; diff --git a/src/controllers/api/fusionTreasuresController.ts b/src/controllers/api/fusionTreasuresController.ts index 27ea7820..0aee216a 100644 --- a/src/controllers/api/fusionTreasuresController.ts +++ b/src/controllers/api/fusionTreasuresController.ts @@ -1,8 +1,8 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { ExportResources } from "warframe-public-export-plus"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { addFusionTreasures, addMiscItems, getInventory } from "@/src/services/inventoryService"; -import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; import { parseFusionTreasure } from "@/src/helpers/inventoryHelpers"; interface IFusionTreasureRequest { diff --git a/src/controllers/api/gardeningController.ts b/src/controllers/api/gardeningController.ts index 4cdb32fd..b21c8fb2 100644 --- a/src/controllers/api/gardeningController.ts +++ b/src/controllers/api/gardeningController.ts @@ -4,11 +4,11 @@ import { addMiscItem, getInventory } from "@/src/services/inventoryService"; import { toStoreItem } from "@/src/services/itemDataService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { createGarden, getPersonalRooms } from "@/src/services/personalRoomsService"; -import { IMongoDate } from "@/src/types/commonTypes"; -import { IMissionReward } from "@/src/types/missionTypes"; -import { IGardeningClient, IPersonalRoomsClient } from "@/src/types/personalRoomsTypes"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { RequestHandler } from "express"; +import type { IMongoDate } from "@/src/types/commonTypes"; +import type { IMissionReward } from "@/src/types/missionTypes"; +import type { IGardeningClient, IPersonalRoomsClient } from "@/src/types/personalRoomsTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { RequestHandler } from "express"; import { dict_en, ExportResources } from "warframe-public-export-plus"; export const gardeningController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/genericUpdateController.ts b/src/controllers/api/genericUpdateController.ts index e5f0b593..2146fb32 100644 --- a/src/controllers/api/genericUpdateController.ts +++ b/src/controllers/api/genericUpdateController.ts @@ -1,8 +1,8 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { updateGeneric } from "@/src/services/inventoryService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { IGenericUpdate } from "@/src/types/genericUpdate"; +import type { IGenericUpdate } from "@/src/types/genericUpdate"; // This endpoint used to be /api/genericUpdate.php, but sometime around the Jade Shadows update, it was changed to /api/updateNodeIntros.php. // SpaceNinjaServer supports both endpoints right now. diff --git a/src/controllers/api/getAllianceController.ts b/src/controllers/api/getAllianceController.ts index a4ea7bcd..b6be0648 100644 --- a/src/controllers/api/getAllianceController.ts +++ b/src/controllers/api/getAllianceController.ts @@ -2,7 +2,7 @@ import { Alliance, Guild } from "@/src/models/guildModel"; import { getAllianceClient } from "@/src/services/guildService"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const getAllianceController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/getDailyDealStockLevelsController.ts b/src/controllers/api/getDailyDealStockLevelsController.ts index b67522c5..bd8cfeff 100644 --- a/src/controllers/api/getDailyDealStockLevelsController.ts +++ b/src/controllers/api/getDailyDealStockLevelsController.ts @@ -1,5 +1,5 @@ import { DailyDeal } from "@/src/models/worldStateModel"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const getDailyDealStockLevelsController: RequestHandler = async (req, res) => { const dailyDeal = (await DailyDeal.findOne({ StoreItem: req.query.productName }, "AmountSold"))!; diff --git a/src/controllers/api/getFriendsController.ts b/src/controllers/api/getFriendsController.ts index 684e9bcc..2135873f 100644 --- a/src/controllers/api/getFriendsController.ts +++ b/src/controllers/api/getFriendsController.ts @@ -2,8 +2,8 @@ import { toOid } from "@/src/helpers/inventoryHelpers"; import { Friendship } from "@/src/models/friendModel"; import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "@/src/services/friendService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IFriendInfo } from "@/src/types/friendTypes"; -import { Request, RequestHandler, Response } from "express"; +import type { IFriendInfo } from "@/src/types/friendTypes"; +import type { Request, RequestHandler, Response } from "express"; // POST with {} instead of GET as of 38.5.0 export const getFriendsController: RequestHandler = async (req: Request, res: Response) => { diff --git a/src/controllers/api/getGuildContributionsController.ts b/src/controllers/api/getGuildContributionsController.ts index c17729f7..123a39f6 100644 --- a/src/controllers/api/getGuildContributionsController.ts +++ b/src/controllers/api/getGuildContributionsController.ts @@ -1,8 +1,8 @@ import { GuildMember } from "@/src/models/guildModel"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IGuildMemberClient } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { IGuildMemberClient } from "@/src/types/guildTypes"; +import type { RequestHandler } from "express"; export const getGuildContributionsController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/getGuildController.ts b/src/controllers/api/getGuildController.ts index f99b8d1c..cef53aa8 100644 --- a/src/controllers/api/getGuildController.ts +++ b/src/controllers/api/getGuildController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { Guild } from "@/src/models/guildModel"; import { getAccountForRequest } from "@/src/services/loginService"; import { logger } from "@/src/utils/logger"; diff --git a/src/controllers/api/getGuildDojoController.ts b/src/controllers/api/getGuildDojoController.ts index 7c5b9412..b5076235 100644 --- a/src/controllers/api/getGuildDojoController.ts +++ b/src/controllers/api/getGuildDojoController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { Types } from "mongoose"; import { Guild } from "@/src/models/guildModel"; import { getDojoClient } from "@/src/services/guildService"; diff --git a/src/controllers/api/getGuildEventScoreController.ts b/src/controllers/api/getGuildEventScoreController.ts index df995021..a045d2e5 100644 --- a/src/controllers/api/getGuildEventScoreController.ts +++ b/src/controllers/api/getGuildEventScoreController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountForRequest } from "@/src/services/loginService"; import { getInventory } from "@/src/services/inventoryService"; import { Guild } from "@/src/models/guildModel"; diff --git a/src/controllers/api/getGuildLogController.ts b/src/controllers/api/getGuildLogController.ts index 037d07be..035a8c28 100644 --- a/src/controllers/api/getGuildLogController.ts +++ b/src/controllers/api/getGuildLogController.ts @@ -2,8 +2,8 @@ import { toMongoDate } from "@/src/helpers/inventoryHelpers"; import { Guild } from "@/src/models/guildModel"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IMongoDate } from "@/src/types/commonTypes"; -import { RequestHandler } from "express"; +import type { IMongoDate } from "@/src/types/commonTypes"; +import type { RequestHandler } from "express"; export const getGuildLogController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/getIgnoredUsersController.ts b/src/controllers/api/getIgnoredUsersController.ts index b3a6cf22..e893b42f 100644 --- a/src/controllers/api/getIgnoredUsersController.ts +++ b/src/controllers/api/getIgnoredUsersController.ts @@ -1,9 +1,9 @@ import { toOid } from "@/src/helpers/inventoryHelpers"; import { Account, Ignore } from "@/src/models/loginModel"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IFriendInfo } from "@/src/types/friendTypes"; +import type { IFriendInfo } from "@/src/types/friendTypes"; import { parallelForeach } from "@/src/utils/async-utils"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const getIgnoredUsersController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/getNewRewardSeedController.ts b/src/controllers/api/getNewRewardSeedController.ts index 9aed91f6..75e4bfec 100644 --- a/src/controllers/api/getNewRewardSeedController.ts +++ b/src/controllers/api/getNewRewardSeedController.ts @@ -1,7 +1,7 @@ import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { generateRewardSeed } from "@/src/services/rngService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const getNewRewardSeedController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/getPastWeeklyChallengesController.ts b/src/controllers/api/getPastWeeklyChallengesController.ts index cee6fe50..3f4b551a 100644 --- a/src/controllers/api/getPastWeeklyChallengesController.ts +++ b/src/controllers/api/getPastWeeklyChallengesController.ts @@ -1,9 +1,9 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory } from "@/src/services/inventoryService"; import { EPOCH, getSeasonChallengePools, getWorldState, pushWeeklyActs } from "@/src/services/worldStateService"; import { unixTimesInMs } from "@/src/constants/timeConstants"; -import { ISeasonChallenge } from "@/src/types/worldStateTypes"; +import type { ISeasonChallenge } from "@/src/types/worldStateTypes"; import { ExportChallenges } from "warframe-public-export-plus"; export const getPastWeeklyChallengesController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/getShipController.ts b/src/controllers/api/getShipController.ts index ff04aec2..5f976ef5 100644 --- a/src/controllers/api/getShipController.ts +++ b/src/controllers/api/getShipController.ts @@ -1,9 +1,9 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { config } from "@/src/services/configService"; import allShipFeatures from "@/static/fixed_responses/allShipFeatures.json"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { createGarden, getPersonalRooms } from "@/src/services/personalRoomsService"; -import { IGetShipResponse, IPersonalRoomsClient } from "@/src/types/personalRoomsTypes"; +import type { IGetShipResponse, IPersonalRoomsClient } from "@/src/types/personalRoomsTypes"; import { getLoadout } from "@/src/services/loadoutService"; import { toOid } from "@/src/helpers/inventoryHelpers"; diff --git a/src/controllers/api/getVendorInfoController.ts b/src/controllers/api/getVendorInfoController.ts index 15ec9287..a0ffd654 100644 --- a/src/controllers/api/getVendorInfoController.ts +++ b/src/controllers/api/getVendorInfoController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { applyStandingToVendorManifest, getVendorManifestByTypeName } from "@/src/services/serversideVendorsService"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; diff --git a/src/controllers/api/getVoidProjectionRewardsController.ts b/src/controllers/api/getVoidProjectionRewardsController.ts index 3a09f4ba..96614431 100644 --- a/src/controllers/api/getVoidProjectionRewardsController.ts +++ b/src/controllers/api/getVoidProjectionRewardsController.ts @@ -2,8 +2,8 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { crackRelic } from "@/src/helpers/relicHelper"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IVoidTearParticipantInfo } from "@/src/types/requestTypes"; -import { RequestHandler } from "express"; +import type { IVoidTearParticipantInfo } from "@/src/types/requestTypes"; +import type { RequestHandler } from "express"; export const getVoidProjectionRewardsController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/giftingController.ts b/src/controllers/api/giftingController.ts index 3e714a8d..a54cdcab 100644 --- a/src/controllers/api/giftingController.ts +++ b/src/controllers/api/giftingController.ts @@ -10,9 +10,10 @@ import { } from "@/src/services/inventoryService"; import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService"; import { handleDailyDealPurchase, handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import { IOid } from "@/src/types/commonTypes"; -import { IPurchaseParams, IPurchaseResponse, PurchaseSource } from "@/src/types/purchaseTypes"; -import { RequestHandler } from "express"; +import type { IOid } from "@/src/types/commonTypes"; +import type { IPurchaseParams, IPurchaseResponse } from "@/src/types/purchaseTypes"; +import { PurchaseSource } from "@/src/types/purchaseTypes"; +import type { RequestHandler } from "express"; import { ExportBundles, ExportFlavour } from "warframe-public-export-plus"; const checkPurchaseParams = (params: IPurchaseParams): boolean => { diff --git a/src/controllers/api/gildWeaponController.ts b/src/controllers/api/gildWeaponController.ts index b06c449c..a5b18af4 100644 --- a/src/controllers/api/gildWeaponController.ts +++ b/src/controllers/api/gildWeaponController.ts @@ -1,13 +1,14 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { sendWsBroadcastTo } from "@/src/services/wsService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { addMiscItems, getInventory } from "@/src/services/inventoryService"; -import { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; -import { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; import { ExportRecipes } from "warframe-public-export-plus"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { EquipmentFeatures, IEquipmentClient } from "@/src/types/equipmentTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IEquipmentClient } from "@/src/types/equipmentTypes"; +import { EquipmentFeatures } from "@/src/types/equipmentTypes"; interface IGildWeaponRequest { ItemName: string; diff --git a/src/controllers/api/giveKeyChainTriggeredItemsController.ts b/src/controllers/api/giveKeyChainTriggeredItemsController.ts index df8e8a80..4cbd602b 100644 --- a/src/controllers/api/giveKeyChainTriggeredItemsController.ts +++ b/src/controllers/api/giveKeyChainTriggeredItemsController.ts @@ -1,9 +1,9 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { parseString } from "@/src/helpers/general"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory } from "@/src/services/inventoryService"; import { giveKeyChainItem } from "@/src/services/questService"; -import { IKeyChainRequest } from "@/src/types/requestTypes"; +import type { IKeyChainRequest } from "@/src/types/requestTypes"; export const giveKeyChainTriggeredItemsController: RequestHandler = async (req, res) => { const accountId = parseString(req.query.accountId); diff --git a/src/controllers/api/giveKeyChainTriggeredMessageController.ts b/src/controllers/api/giveKeyChainTriggeredMessageController.ts index 3bc41c21..2afc5ec6 100644 --- a/src/controllers/api/giveKeyChainTriggeredMessageController.ts +++ b/src/controllers/api/giveKeyChainTriggeredMessageController.ts @@ -1,8 +1,8 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { giveKeyChainMessage } from "@/src/services/questService"; -import { IKeyChainRequest } from "@/src/types/requestTypes"; -import { RequestHandler } from "express"; +import type { IKeyChainRequest } from "@/src/types/requestTypes"; +import type { RequestHandler } from "express"; export const giveKeyChainTriggeredMessageController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/giveQuestKeyRewardController.ts b/src/controllers/api/giveQuestKeyRewardController.ts index d74d56bf..bf64693f 100644 --- a/src/controllers/api/giveQuestKeyRewardController.ts +++ b/src/controllers/api/giveQuestKeyRewardController.ts @@ -1,8 +1,8 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { addItem, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IOid } from "@/src/types/commonTypes"; -import { RequestHandler } from "express"; +import type { IOid } from "@/src/types/commonTypes"; +import type { RequestHandler } from "express"; export const giveQuestKeyRewardController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/giveShipDecoAndLoreFragmentController.ts b/src/controllers/api/giveShipDecoAndLoreFragmentController.ts index ae998374..0b8b5c30 100644 --- a/src/controllers/api/giveShipDecoAndLoreFragmentController.ts +++ b/src/controllers/api/giveShipDecoAndLoreFragmentController.ts @@ -1,9 +1,9 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { addLoreFragmentScans, addShipDecorations, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { ITypeCount } from "@/src/types/commonTypes"; -import { ILoreFragmentScan } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; +import type { ITypeCount } from "@/src/types/commonTypes"; +import type { ILoreFragmentScan } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; export const giveShipDecoAndLoreFragmentController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/giveStartingGearController.ts b/src/controllers/api/giveStartingGearController.ts index 6556de93..1ac5afc1 100644 --- a/src/controllers/api/giveStartingGearController.ts +++ b/src/controllers/api/giveStartingGearController.ts @@ -1,8 +1,8 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { addStartingGear, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { TPartialStartingGear } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; +import type { TPartialStartingGear } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; export const giveStartingGearController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/guildTechController.ts b/src/controllers/api/guildTechController.ts index f3e37217..177a9b4b 100644 --- a/src/controllers/api/guildTechController.ts +++ b/src/controllers/api/guildTechController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { addGuildMemberMiscItemContribution, getGuildForRequestEx, @@ -25,14 +25,16 @@ import { occupySlot, updateCurrency } from "@/src/services/inventoryService"; -import { IMiscItem, InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; +import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; import { config } from "@/src/services/configService"; -import { GuildPermission, ITechProjectClient } from "@/src/types/guildTypes"; +import type { ITechProjectClient } from "@/src/types/guildTypes"; +import { GuildPermission } from "@/src/types/guildTypes"; import { GuildMember } from "@/src/models/guildModel"; import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers"; import { logger } from "@/src/utils/logger"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; export const guildTechController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/hostSessionController.ts b/src/controllers/api/hostSessionController.ts index 52c7a6a2..3ab49740 100644 --- a/src/controllers/api/hostSessionController.ts +++ b/src/controllers/api/hostSessionController.ts @@ -1,8 +1,8 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountForRequest } from "@/src/services/loginService"; import { createNewSession } from "@/src/managers/sessionManager"; import { logger } from "@/src/utils/logger"; -import { ISession } from "@/src/types/session"; +import type { ISession } from "@/src/types/session"; import { JSONParse } from "json-with-bigint"; import { toOid2, version_compare } from "@/src/helpers/inventoryHelpers"; diff --git a/src/controllers/api/hubBlessingController.ts b/src/controllers/api/hubBlessingController.ts index 55b59c4f..410d6680 100644 --- a/src/controllers/api/hubBlessingController.ts +++ b/src/controllers/api/hubBlessingController.ts @@ -2,7 +2,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { addBooster, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getRandomInt } from "@/src/services/rngService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { ExportBoosters } from "warframe-public-export-plus"; export const hubBlessingController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/hubController.ts b/src/controllers/api/hubController.ts index 8475a88b..41e17a84 100644 --- a/src/controllers/api/hubController.ts +++ b/src/controllers/api/hubController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; const hubController: RequestHandler = (_req, res) => { res.json("hub 127.0.0.1:6952"); diff --git a/src/controllers/api/hubInstancesController.ts b/src/controllers/api/hubInstancesController.ts index b7519656..89a5564c 100644 --- a/src/controllers/api/hubInstancesController.ts +++ b/src/controllers/api/hubInstancesController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; const hubInstancesController: RequestHandler = (_req, res) => { res.json("list 50 1 0 0 scenarios 0 0 0 0 0 0"); diff --git a/src/controllers/api/inboxController.ts b/src/controllers/api/inboxController.ts index 5f36c998..a62c79ed 100644 --- a/src/controllers/api/inboxController.ts +++ b/src/controllers/api/inboxController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { Inbox } from "@/src/models/inboxModel"; import { createMessage, @@ -20,7 +20,7 @@ import { logger } from "@/src/utils/logger"; import { ExportFlavour } from "warframe-public-export-plus"; import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; import { fromStoreItem, isStoreItem } from "@/src/services/itemDataService"; -import { IOid } from "@/src/types/commonTypes"; +import type { IOid } from "@/src/types/commonTypes"; export const inboxController: RequestHandler = async (req, res) => { const { deleteId, lastMessage: latestClientMessageId, messageId } = req.query; diff --git a/src/controllers/api/infestedFoundryController.ts b/src/controllers/api/infestedFoundryController.ts index a962d7a8..ddc94b75 100644 --- a/src/controllers/api/infestedFoundryController.ts +++ b/src/controllers/api/infestedFoundryController.ts @@ -1,15 +1,15 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountForRequest } from "@/src/services/loginService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory, addMiscItems, updateCurrency, addRecipes, freeUpSlot } from "@/src/services/inventoryService"; -import { IOid } from "@/src/types/commonTypes"; -import { +import type { IOid } from "@/src/types/commonTypes"; +import type { IConsumedSuit, IHelminthFoodRecord, IInventoryClient, - IMiscItem, - InventorySlot + IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; +import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; import { ExportMisc } from "warframe-public-export-plus"; import { getRecipe } from "@/src/services/itemDataService"; import { toMongoDate, version_compare } from "@/src/helpers/inventoryHelpers"; diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index 1556c271..729df2e7 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -1,19 +1,16 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountForRequest } from "@/src/services/loginService"; -import { Inventory, TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; import { config } from "@/src/services/configService"; import allDialogue from "@/static/fixed_responses/allDialogue.json"; -import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes"; -import { IInventoryClient, IShipInventory, equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IPolarity, ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; -import { - eFaction, - ExportCustoms, - ExportFlavour, - ExportResources, - ExportVirtuals, - ICountedItem -} from "warframe-public-export-plus"; +import type { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes"; +import type { IInventoryClient, IShipInventory } from "@/src/types/inventoryTypes/inventoryTypes"; +import { equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { ICountedItem } from "warframe-public-export-plus"; +import { eFaction, ExportCustoms, ExportFlavour, ExportResources, ExportVirtuals } from "warframe-public-export-plus"; import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "@/src/services/infestedFoundryService"; import { addEmailItem, @@ -30,7 +27,7 @@ import { addString, catBreadHash } from "@/src/helpers/stringHelpers"; import { Types } from "mongoose"; import { getNemesisManifest } from "@/src/helpers/nemesisHelpers"; import { getPersonalRooms } from "@/src/services/personalRoomsService"; -import { IPersonalRoomsClient } from "@/src/types/personalRoomsTypes"; +import type { IPersonalRoomsClient } from "@/src/types/personalRoomsTypes"; import { Ship } from "@/src/models/shipModel"; import { toLegacyOid, toOid, version_compare } from "@/src/helpers/inventoryHelpers"; import { Inbox } from "@/src/models/inboxModel"; diff --git a/src/controllers/api/inventorySlotsController.ts b/src/controllers/api/inventorySlotsController.ts index 8a8fce0a..7b937a2e 100644 --- a/src/controllers/api/inventorySlotsController.ts +++ b/src/controllers/api/inventorySlotsController.ts @@ -1,6 +1,6 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory, updateCurrency, updateSlots } from "@/src/services/inventoryService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; import { exhaustive } from "@/src/utils/ts-utils"; diff --git a/src/controllers/api/joinSessionController.ts b/src/controllers/api/joinSessionController.ts index 7dff9fc9..8bb516ad 100644 --- a/src/controllers/api/joinSessionController.ts +++ b/src/controllers/api/joinSessionController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getSessionByID } from "@/src/managers/sessionManager"; import { logger } from "@/src/utils/logger"; diff --git a/src/controllers/api/loginController.ts b/src/controllers/api/loginController.ts index 05329be4..68fffd93 100644 --- a/src/controllers/api/loginController.ts +++ b/src/controllers/api/loginController.ts @@ -1,11 +1,11 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { config } from "@/src/services/configService"; import { buildConfig } from "@/src/services/buildConfigService"; import { Account } from "@/src/models/loginModel"; import { createAccount, createNonce, getUsernameFromEmail, isCorrectPassword } from "@/src/services/loginService"; -import { IDatabaseAccountJson, ILoginRequest, ILoginResponse } from "@/src/types/loginTypes"; +import type { IDatabaseAccountJson, ILoginRequest, ILoginResponse } from "@/src/types/loginTypes"; import { logger } from "@/src/utils/logger"; import { version_compare } from "@/src/helpers/inventoryHelpers"; import { sendWsBroadcastTo } from "@/src/services/wsService"; diff --git a/src/controllers/api/loginRewardsController.ts b/src/controllers/api/loginRewardsController.ts index 547724c2..a994b860 100644 --- a/src/controllers/api/loginRewardsController.ts +++ b/src/controllers/api/loginRewardsController.ts @@ -1,9 +1,9 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountForRequest } from "@/src/services/loginService"; +import type { ILoginRewardsReponse } from "@/src/services/loginRewardService"; import { claimLoginReward, getRandomLoginRewards, - ILoginRewardsReponse, isLoginRewardAChoice, setAccountGotLoginRewardToday } from "@/src/services/loginRewardService"; diff --git a/src/controllers/api/loginRewardsSelectionController.ts b/src/controllers/api/loginRewardsSelectionController.ts index 174c5659..d0f10f73 100644 --- a/src/controllers/api/loginRewardsSelectionController.ts +++ b/src/controllers/api/loginRewardsSelectionController.ts @@ -7,9 +7,9 @@ import { import { getAccountForRequest } from "@/src/services/loginService"; import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; import { sendWsBroadcastTo } from "@/src/services/wsService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; import { logger } from "@/src/utils/logger"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const loginRewardsSelectionController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/api/logoutController.ts b/src/controllers/api/logoutController.ts index bf7328a4..14821921 100644 --- a/src/controllers/api/logoutController.ts +++ b/src/controllers/api/logoutController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { Account } from "@/src/models/loginModel"; import { sendWsBroadcastTo } from "@/src/services/wsService"; diff --git a/src/controllers/api/marketRecommendationsController.ts b/src/controllers/api/marketRecommendationsController.ts index 8acfa89e..fd105836 100644 --- a/src/controllers/api/marketRecommendationsController.ts +++ b/src/controllers/api/marketRecommendationsController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; const marketRecommendationsController: RequestHandler = (_req, res) => { const data = Buffer.from([ diff --git a/src/controllers/api/marketSearchRecommendationsController.ts b/src/controllers/api/marketSearchRecommendationsController.ts index bc99897b..1360a7ab 100644 --- a/src/controllers/api/marketSearchRecommendationsController.ts +++ b/src/controllers/api/marketSearchRecommendationsController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; const marketSearchRecommendationsController: RequestHandler = (_req, res) => { res.sendStatus(200); diff --git a/src/controllers/api/maturePetController.ts b/src/controllers/api/maturePetController.ts index 1bfb83f6..5c769307 100644 --- a/src/controllers/api/maturePetController.ts +++ b/src/controllers/api/maturePetController.ts @@ -1,7 +1,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const maturePetController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/missionInventoryUpdateController.ts b/src/controllers/api/missionInventoryUpdateController.ts index e6a48e70..b2ca85c9 100644 --- a/src/controllers/api/missionInventoryUpdateController.ts +++ b/src/controllers/api/missionInventoryUpdateController.ts @@ -1,12 +1,12 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getAccountForRequest } from "@/src/services/loginService"; -import { IMissionInventoryUpdateRequest } from "@/src/types/requestTypes"; +import type { IMissionInventoryUpdateRequest } from "@/src/types/requestTypes"; import { addMissionInventoryUpdates, addMissionRewards } from "@/src/services/missionInventoryUpdateService"; import { getInventory } from "@/src/services/inventoryService"; import { getInventoryResponse } from "@/src/controllers/api/inventoryController"; import { logger } from "@/src/utils/logger"; -import { +import type { IMissionInventoryUpdateResponse, IMissionInventoryUpdateResponseBackToDryDock, IMissionInventoryUpdateResponseRailjackInterstitial diff --git a/src/controllers/api/modularWeaponCraftingController.ts b/src/controllers/api/modularWeaponCraftingController.ts index a3b69f0e..4ba319e5 100644 --- a/src/controllers/api/modularWeaponCraftingController.ts +++ b/src/controllers/api/modularWeaponCraftingController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { sendWsBroadcastTo } from "@/src/services/wsService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; @@ -13,12 +13,14 @@ import { combineInventoryChanges, addSpecialItem } from "@/src/services/inventoryService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; import { getDefaultUpgrades } from "@/src/services/itemDataService"; import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper"; import { getRandomInt } from "@/src/services/rngService"; -import { ExportSentinels, ExportWeapons, IDefaultUpgrade } from "warframe-public-export-plus"; -import { IEquipmentDatabase, Status } from "@/src/types/equipmentTypes"; +import type { IDefaultUpgrade } from "warframe-public-export-plus"; +import { ExportSentinels, ExportWeapons } from "warframe-public-export-plus"; +import type { IEquipmentDatabase } from "@/src/types/equipmentTypes"; +import { Status } from "@/src/types/equipmentTypes"; interface IModularCraftRequest { WeaponType: string; diff --git a/src/controllers/api/modularWeaponSaleController.ts b/src/controllers/api/modularWeaponSaleController.ts index 2ce6c11c..4f5a1b2e 100644 --- a/src/controllers/api/modularWeaponSaleController.ts +++ b/src/controllers/api/modularWeaponSaleController.ts @@ -1,9 +1,9 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { ExportWeapons } from "warframe-public-export-plus"; -import { IMongoDate } from "@/src/types/commonTypes"; +import type { IMongoDate } from "@/src/types/commonTypes"; import { toMongoDate } from "@/src/helpers/inventoryHelpers"; import { SRng } from "@/src/services/rngService"; -import { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { addEquipment, @@ -17,7 +17,7 @@ import { getDefaultUpgrades } from "@/src/services/itemDataService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { sendWsBroadcastTo } from "@/src/services/wsService"; import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; import { EquipmentFeatures } from "@/src/types/equipmentTypes"; export const modularWeaponSaleController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/nameWeaponController.ts b/src/controllers/api/nameWeaponController.ts index c3c899ba..e0f45cdc 100644 --- a/src/controllers/api/nameWeaponController.ts +++ b/src/controllers/api/nameWeaponController.ts @@ -1,8 +1,8 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory, updateCurrency } from "@/src/services/inventoryService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; import { sendWsBroadcastTo } from "@/src/services/wsService"; interface INameWeaponRequest { diff --git a/src/controllers/api/nemesisController.ts b/src/controllers/api/nemesisController.ts index c63c4776..2352c56c 100644 --- a/src/controllers/api/nemesisController.ts +++ b/src/controllers/api/nemesisController.ts @@ -1,4 +1,5 @@ import { fromDbOid, version_compare } from "@/src/helpers/inventoryHelpers"; +import type { IKnifeResponse } from "@/src/helpers/nemesisHelpers"; import { antivirusMods, decodeNemesisGuess, @@ -12,30 +13,28 @@ import { GUESS_NEUTRAL, GUESS_NONE, GUESS_WILDCARD, - IKnifeResponse, parseUpgrade } from "@/src/helpers/nemesisHelpers"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; import { Loadout } from "@/src/models/inventoryModels/loadoutModel"; import { addMods, freeUpSlot, getInventory } from "@/src/services/inventoryService"; import { getAccountForRequest } from "@/src/services/loginService"; import { SRng } from "@/src/services/rngService"; -import { IMongoDate, IOid } from "@/src/types/commonTypes"; -import { IEquipmentClient } from "@/src/types/equipmentTypes"; -import { +import type { IMongoDate, IOid } from "@/src/types/commonTypes"; +import type { IEquipmentClient } from "@/src/types/equipmentTypes"; +import type { IInnateDamageFingerprint, IInventoryClient, INemesisClient, - InventorySlot, IUpgradeClient, IWeaponSkinClient, - LoadoutIndex, TEquipmentKey, TNemesisFaction } from "@/src/types/inventoryTypes/inventoryTypes"; +import { InventorySlot, LoadoutIndex } from "@/src/types/inventoryTypes/inventoryTypes"; import { logger } from "@/src/utils/logger"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { Types } from "mongoose"; export const nemesisController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/placeDecoInComponentController.ts b/src/controllers/api/placeDecoInComponentController.ts index fc1ef445..5c26a3e4 100644 --- a/src/controllers/api/placeDecoInComponentController.ts +++ b/src/controllers/api/placeDecoInComponentController.ts @@ -10,7 +10,7 @@ import { import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { Types } from "mongoose"; import { ExportDojoRecipes, ExportResources } from "warframe-public-export-plus"; import { config } from "@/src/services/configService"; diff --git a/src/controllers/api/playedParkourTutorialController.ts b/src/controllers/api/playedParkourTutorialController.ts index a37689f2..242ec24c 100644 --- a/src/controllers/api/playedParkourTutorialController.ts +++ b/src/controllers/api/playedParkourTutorialController.ts @@ -1,6 +1,6 @@ import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const playedParkourTutorialController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/playerSkillsController.ts b/src/controllers/api/playerSkillsController.ts index d160686f..02d123e7 100644 --- a/src/controllers/api/playerSkillsController.ts +++ b/src/controllers/api/playerSkillsController.ts @@ -1,9 +1,9 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { addConsumables, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IPlayerSkills } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { RequestHandler } from "express"; +import type { IPlayerSkills } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { RequestHandler } from "express"; export const playerSkillsController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/postGuildAdvertisementController.ts b/src/controllers/api/postGuildAdvertisementController.ts index 69b28323..5135c19d 100644 --- a/src/controllers/api/postGuildAdvertisementController.ts +++ b/src/controllers/api/postGuildAdvertisementController.ts @@ -11,8 +11,8 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getVendorManifestByTypeName } from "@/src/services/serversideVendorsService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { IPurchaseParams } from "@/src/types/purchaseTypes"; -import { RequestHandler } from "express"; +import type { IPurchaseParams } from "@/src/types/purchaseTypes"; +import type { RequestHandler } from "express"; export const postGuildAdvertisementController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/projectionManagerController.ts b/src/controllers/api/projectionManagerController.ts index b549bd8f..c2c2cf76 100644 --- a/src/controllers/api/projectionManagerController.ts +++ b/src/controllers/api/projectionManagerController.ts @@ -1,7 +1,8 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { addMiscItems, getInventory } from "@/src/services/inventoryService"; -import { ExportRelics, IRelic } from "warframe-public-export-plus"; +import type { IRelic } from "warframe-public-export-plus"; +import { ExportRelics } from "warframe-public-export-plus"; export const projectionManagerController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/purchaseController.ts b/src/controllers/api/purchaseController.ts index 69175739..b021366d 100644 --- a/src/controllers/api/purchaseController.ts +++ b/src/controllers/api/purchaseController.ts @@ -1,6 +1,6 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IPurchaseRequest } from "@/src/types/purchaseTypes"; +import type { IPurchaseRequest } from "@/src/types/purchaseTypes"; import { handlePurchase } from "@/src/services/purchaseService"; import { getInventory } from "@/src/services/inventoryService"; import { sendWsBroadcastTo } from "@/src/services/wsService"; diff --git a/src/controllers/api/questControlController.ts b/src/controllers/api/questControlController.ts index 0a6e0781..e9e346ea 100644 --- a/src/controllers/api/questControlController.ts +++ b/src/controllers/api/questControlController.ts @@ -1,6 +1,6 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; // Basic shim handling action=sync to login on U21 export const questControlController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/queueDojoComponentDestructionController.ts b/src/controllers/api/queueDojoComponentDestructionController.ts index 037b5c27..15248f17 100644 --- a/src/controllers/api/queueDojoComponentDestructionController.ts +++ b/src/controllers/api/queueDojoComponentDestructionController.ts @@ -3,7 +3,7 @@ import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermissio import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const queueDojoComponentDestructionController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/redeemPromoCodeController.ts b/src/controllers/api/redeemPromoCodeController.ts index f0e615bc..edce905a 100644 --- a/src/controllers/api/redeemPromoCodeController.ts +++ b/src/controllers/api/redeemPromoCodeController.ts @@ -1,5 +1,5 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import glyphCodes from "@/static/fixed_responses/glyphsCodes.json"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { addItem, getInventory } from "@/src/services/inventoryService"; diff --git a/src/controllers/api/releasePetController.ts b/src/controllers/api/releasePetController.ts index 09e8cc6f..3faa1ed6 100644 --- a/src/controllers/api/releasePetController.ts +++ b/src/controllers/api/releasePetController.ts @@ -2,7 +2,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory, updateCurrency } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { sendWsBroadcastTo } from "@/src/services/wsService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const releasePetController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/removeFriendController.ts b/src/controllers/api/removeFriendController.ts index 24b39c2e..ccf94f0a 100644 --- a/src/controllers/api/removeFriendController.ts +++ b/src/controllers/api/removeFriendController.ts @@ -4,10 +4,10 @@ import { Friendship } from "@/src/models/friendModel"; import { Account } from "@/src/models/loginModel"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IOid } from "@/src/types/commonTypes"; +import type { IOid } from "@/src/types/commonTypes"; import { parallelForeach } from "@/src/utils/async-utils"; -import { RequestHandler } from "express"; -import { Types } from "mongoose"; +import type { RequestHandler } from "express"; +import type { Types } from "mongoose"; export const removeFriendGetController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/removeFromAllianceController.ts b/src/controllers/api/removeFromAllianceController.ts index f6dc8acc..3390c736 100644 --- a/src/controllers/api/removeFromAllianceController.ts +++ b/src/controllers/api/removeFromAllianceController.ts @@ -2,7 +2,7 @@ import { AllianceMember, Guild, GuildMember } from "@/src/models/guildModel"; import { deleteAlliance } from "@/src/services/guildService"; import { getAccountForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const removeFromAllianceController: RequestHandler = async (req, res) => { // Check requester is a warlord in their guild diff --git a/src/controllers/api/removeFromGuildController.ts b/src/controllers/api/removeFromGuildController.ts index db5a2ea3..bad9cca3 100644 --- a/src/controllers/api/removeFromGuildController.ts +++ b/src/controllers/api/removeFromGuildController.ts @@ -6,7 +6,7 @@ import { createMessage } from "@/src/services/inboxService"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const removeFromGuildController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/api/removeIgnoredUserController.ts b/src/controllers/api/removeIgnoredUserController.ts index 73613ce6..20fad8cb 100644 --- a/src/controllers/api/removeIgnoredUserController.ts +++ b/src/controllers/api/removeIgnoredUserController.ts @@ -1,7 +1,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { Account, Ignore } from "@/src/models/loginModel"; import { getAccountForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const removeIgnoredUserController: RequestHandler = async (req, res) => { const accountId = await getAccountForRequest(req); diff --git a/src/controllers/api/renamePetController.ts b/src/controllers/api/renamePetController.ts index f3fe0c89..6e7155f3 100644 --- a/src/controllers/api/renamePetController.ts +++ b/src/controllers/api/renamePetController.ts @@ -2,8 +2,8 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory, updateCurrency } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { sendWsBroadcastTo } from "@/src/services/wsService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { RequestHandler } from "express"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { RequestHandler } from "express"; export const renamePetController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/rerollRandomModController.ts b/src/controllers/api/rerollRandomModController.ts index 20e7218a..7c3bea48 100644 --- a/src/controllers/api/rerollRandomModController.ts +++ b/src/controllers/api/rerollRandomModController.ts @@ -1,10 +1,11 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { addMiscItems, getInventory } from "@/src/services/inventoryService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { createUnveiledRivenFingerprint, randomiseRivenStats, RivenFingerprint } from "@/src/helpers/rivenHelper"; +import type { RivenFingerprint } from "@/src/helpers/rivenHelper"; +import { createUnveiledRivenFingerprint, randomiseRivenStats } from "@/src/helpers/rivenHelper"; import { ExportUpgrades } from "warframe-public-export-plus"; -import { IOid } from "@/src/types/commonTypes"; +import type { IOid } from "@/src/types/commonTypes"; export const rerollRandomModController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/resetQuestProgressController.ts b/src/controllers/api/resetQuestProgressController.ts index 9d75a54a..ecb893fe 100644 --- a/src/controllers/api/resetQuestProgressController.ts +++ b/src/controllers/api/resetQuestProgressController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const resetQuestProgressController: RequestHandler = (_req, res) => { res.send("1").end(); diff --git a/src/controllers/api/retrievePetFromStasisController.ts b/src/controllers/api/retrievePetFromStasisController.ts index eb332f9c..d02cb2cd 100644 --- a/src/controllers/api/retrievePetFromStasisController.ts +++ b/src/controllers/api/retrievePetFromStasisController.ts @@ -2,7 +2,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { Status } from "@/src/types/equipmentTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const retrievePetFromStasisController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/saveDialogueController.ts b/src/controllers/api/saveDialogueController.ts index 5b404341..48eee78e 100644 --- a/src/controllers/api/saveDialogueController.ts +++ b/src/controllers/api/saveDialogueController.ts @@ -1,8 +1,8 @@ import { addEmailItem, getDialogue, getInventory, updateCurrency } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { ICompletedDialogue } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { RequestHandler } from "express"; +import type { ICompletedDialogue } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { RequestHandler } from "express"; export const saveDialogueController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/saveLoadoutController.ts b/src/controllers/api/saveLoadoutController.ts index c5383e1c..b8573521 100644 --- a/src/controllers/api/saveLoadoutController.ts +++ b/src/controllers/api/saveLoadoutController.ts @@ -1,5 +1,5 @@ -import { RequestHandler } from "express"; -import { ISaveLoadoutRequest } from "@/src/types/saveLoadoutTypes"; +import type { RequestHandler } from "express"; +import type { ISaveLoadoutRequest } from "@/src/types/saveLoadoutTypes"; import { handleInventoryItemConfigChange } from "@/src/services/saveLoadoutService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; diff --git a/src/controllers/api/saveSettingsController.ts b/src/controllers/api/saveSettingsController.ts index 8aba0cfe..42e98dee 100644 --- a/src/controllers/api/saveSettingsController.ts +++ b/src/controllers/api/saveSettingsController.ts @@ -1,8 +1,8 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory } from "@/src/services/inventoryService"; -import { RequestHandler } from "express"; -import { ISettings } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; +import type { ISettings } from "@/src/types/inventoryTypes/inventoryTypes"; interface ISaveSettingsRequest { Settings: ISettings; diff --git a/src/controllers/api/saveVaultAutoContributeController.ts b/src/controllers/api/saveVaultAutoContributeController.ts index 5c5f51c5..9133404e 100644 --- a/src/controllers/api/saveVaultAutoContributeController.ts +++ b/src/controllers/api/saveVaultAutoContributeController.ts @@ -4,7 +4,7 @@ import { hasGuildPermission } from "@/src/services/guildService"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const saveVaultAutoContributeController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/sellController.ts b/src/controllers/api/sellController.ts index b19cf2dc..698cb2d8 100644 --- a/src/controllers/api/sellController.ts +++ b/src/controllers/api/sellController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory, @@ -15,8 +15,8 @@ import { } from "@/src/services/inventoryService"; import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; import { ExportDojoRecipes } from "warframe-public-export-plus"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; import { sendWsBroadcastEx } from "@/src/services/wsService"; import { parseFusionTreasure } from "@/src/helpers/inventoryHelpers"; diff --git a/src/controllers/api/sendMsgToInBoxController.ts b/src/controllers/api/sendMsgToInBoxController.ts index 7cad8c15..5598e88a 100644 --- a/src/controllers/api/sendMsgToInBoxController.ts +++ b/src/controllers/api/sendMsgToInBoxController.ts @@ -1,7 +1,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { createMessage } from "@/src/services/inboxService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const sendMsgToInBoxController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/setActiveQuestController.ts b/src/controllers/api/setActiveQuestController.ts index 7a0204f6..374bd2d4 100644 --- a/src/controllers/api/setActiveQuestController.ts +++ b/src/controllers/api/setActiveQuestController.ts @@ -1,6 +1,6 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const setActiveQuestController: RequestHandler< Record, diff --git a/src/controllers/api/setActiveShipController.ts b/src/controllers/api/setActiveShipController.ts index 9592915a..3ae4b7a8 100644 --- a/src/controllers/api/setActiveShipController.ts +++ b/src/controllers/api/setActiveShipController.ts @@ -1,7 +1,7 @@ import { getPersonalRooms } from "@/src/services/personalRoomsService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { parseString } from "@/src/helpers/general"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { Types } from "mongoose"; export const setActiveShipController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/setAllianceGuildPermissionsController.ts b/src/controllers/api/setAllianceGuildPermissionsController.ts index ce3caaf8..f4a8f365 100644 --- a/src/controllers/api/setAllianceGuildPermissionsController.ts +++ b/src/controllers/api/setAllianceGuildPermissionsController.ts @@ -1,7 +1,7 @@ import { AllianceMember, GuildMember } from "@/src/models/guildModel"; import { getAccountForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const setAllianceGuildPermissionsController: RequestHandler = async (req, res) => { // Check requester is a warlord in their guild diff --git a/src/controllers/api/setBootLocationController.ts b/src/controllers/api/setBootLocationController.ts index dfccd1d7..5bc20f02 100644 --- a/src/controllers/api/setBootLocationController.ts +++ b/src/controllers/api/setBootLocationController.ts @@ -1,7 +1,7 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getPersonalRooms } from "@/src/services/personalRoomsService"; -import { TBootLocation } from "@/src/types/personalRoomsTypes"; +import type { TBootLocation } from "@/src/types/personalRoomsTypes"; import { getInventory } from "@/src/services/inventoryService"; export const setBootLocationController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/setDojoComponentColorsController.ts b/src/controllers/api/setDojoComponentColorsController.ts index ac069242..a68a43de 100644 --- a/src/controllers/api/setDojoComponentColorsController.ts +++ b/src/controllers/api/setDojoComponentColorsController.ts @@ -3,7 +3,7 @@ import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermissio import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const setDojoComponentColorsController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/setDojoComponentMessageController.ts b/src/controllers/api/setDojoComponentMessageController.ts index 92931a54..2cb08ad3 100644 --- a/src/controllers/api/setDojoComponentMessageController.ts +++ b/src/controllers/api/setDojoComponentMessageController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getDojoClient, getGuildForRequest } from "@/src/services/guildService"; export const setDojoComponentMessageController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/setDojoComponentSettingsController.ts b/src/controllers/api/setDojoComponentSettingsController.ts index 1286ba25..f9d8c88e 100644 --- a/src/controllers/api/setDojoComponentSettingsController.ts +++ b/src/controllers/api/setDojoComponentSettingsController.ts @@ -3,7 +3,7 @@ import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermissio import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const setDojoComponentSettingsController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/setEquippedInstrumentController.ts b/src/controllers/api/setEquippedInstrumentController.ts index bb80a815..f99cbe7c 100644 --- a/src/controllers/api/setEquippedInstrumentController.ts +++ b/src/controllers/api/setEquippedInstrumentController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; diff --git a/src/controllers/api/setFriendNoteController.ts b/src/controllers/api/setFriendNoteController.ts index c12543da..c13103ef 100644 --- a/src/controllers/api/setFriendNoteController.ts +++ b/src/controllers/api/setFriendNoteController.ts @@ -1,7 +1,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { Friendship } from "@/src/models/friendModel"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const setFriendNoteController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/setGuildMotdController.ts b/src/controllers/api/setGuildMotdController.ts index 1e09ab28..a0096440 100644 --- a/src/controllers/api/setGuildMotdController.ts +++ b/src/controllers/api/setGuildMotdController.ts @@ -3,8 +3,9 @@ import { Alliance, Guild, GuildMember } from "@/src/models/guildModel"; import { hasGuildPermissionEx } from "@/src/services/guildService"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService"; -import { GuildPermission, ILongMOTD } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { ILongMOTD } from "@/src/types/guildTypes"; +import { GuildPermission } from "@/src/types/guildTypes"; +import type { RequestHandler } from "express"; export const setGuildMotdController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/api/setHubNpcCustomizationsController.ts b/src/controllers/api/setHubNpcCustomizationsController.ts index 6e199933..a84efe12 100644 --- a/src/controllers/api/setHubNpcCustomizationsController.ts +++ b/src/controllers/api/setHubNpcCustomizationsController.ts @@ -1,8 +1,8 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IHubNpcCustomization } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; +import type { IHubNpcCustomization } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; export const setHubNpcCustomizationsController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/setPlacedDecoInfoController.ts b/src/controllers/api/setPlacedDecoInfoController.ts index 25073023..a842cb43 100644 --- a/src/controllers/api/setPlacedDecoInfoController.ts +++ b/src/controllers/api/setPlacedDecoInfoController.ts @@ -1,6 +1,6 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; -import { ISetPlacedDecoInfoRequest } from "@/src/types/personalRoomsTypes"; -import { RequestHandler } from "express"; +import type { ISetPlacedDecoInfoRequest } from "@/src/types/personalRoomsTypes"; +import type { RequestHandler } from "express"; import { handleSetPlacedDecoInfo } from "@/src/services/shipCustomizationsService"; export const setPlacedDecoInfoController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/setShipCustomizationsController.ts b/src/controllers/api/setShipCustomizationsController.ts index 286e416b..a0d1d63c 100644 --- a/src/controllers/api/setShipCustomizationsController.ts +++ b/src/controllers/api/setShipCustomizationsController.ts @@ -1,8 +1,8 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { setShipCustomizations } from "@/src/services/shipCustomizationsService"; -import { ISetShipCustomizationsRequest } from "@/src/types/personalRoomsTypes"; +import type { ISetShipCustomizationsRequest } from "@/src/types/personalRoomsTypes"; import { logger } from "@/src/utils/logger"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const setShipCustomizationsController: RequestHandler = async (req, res) => { try { diff --git a/src/controllers/api/setShipFavouriteLoadoutController.ts b/src/controllers/api/setShipFavouriteLoadoutController.ts index 07b646df..02d49608 100644 --- a/src/controllers/api/setShipFavouriteLoadoutController.ts +++ b/src/controllers/api/setShipFavouriteLoadoutController.ts @@ -1,9 +1,9 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getPersonalRooms } from "@/src/services/personalRoomsService"; -import { IOid } from "@/src/types/commonTypes"; +import type { IOid } from "@/src/types/commonTypes"; import { Types } from "mongoose"; -import { IFavouriteLoadoutDatabase, TBootLocation } from "@/src/types/personalRoomsTypes"; +import type { IFavouriteLoadoutDatabase, TBootLocation } from "@/src/types/personalRoomsTypes"; export const setShipFavouriteLoadoutController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/setShipVignetteController.ts b/src/controllers/api/setShipVignetteController.ts index a1d991da..595afc29 100644 --- a/src/controllers/api/setShipVignetteController.ts +++ b/src/controllers/api/setShipVignetteController.ts @@ -1,9 +1,9 @@ import { addMiscItems, combineInventoryChanges, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getPersonalRooms } from "@/src/services/personalRoomsService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; import { logger } from "@/src/utils/logger"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const setShipVignetteController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/setSuitInfectionController.ts b/src/controllers/api/setSuitInfectionController.ts index 84bd0a4b..511bd968 100644 --- a/src/controllers/api/setSuitInfectionController.ts +++ b/src/controllers/api/setSuitInfectionController.ts @@ -2,8 +2,8 @@ import { fromMongoDate, fromOid } from "@/src/helpers/inventoryHelpers"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IEquipmentClient } from "@/src/types/equipmentTypes"; -import { RequestHandler } from "express"; +import type { IEquipmentClient } from "@/src/types/equipmentTypes"; +import type { RequestHandler } from "express"; export const setSuitInfectionController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/setSupportedSyndicateController.ts b/src/controllers/api/setSupportedSyndicateController.ts index 40ce4af3..4107556c 100644 --- a/src/controllers/api/setSupportedSyndicateController.ts +++ b/src/controllers/api/setSupportedSyndicateController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; diff --git a/src/controllers/api/setWeaponSkillTreeController.ts b/src/controllers/api/setWeaponSkillTreeController.ts index a750c3ce..59c587eb 100644 --- a/src/controllers/api/setWeaponSkillTreeController.ts +++ b/src/controllers/api/setWeaponSkillTreeController.ts @@ -1,8 +1,9 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; -import { equipmentKeys, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import { equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; export const setWeaponSkillTreeController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/shipDecorationsController.ts b/src/controllers/api/shipDecorationsController.ts index 69c959a5..1259140e 100644 --- a/src/controllers/api/shipDecorationsController.ts +++ b/src/controllers/api/shipDecorationsController.ts @@ -1,6 +1,6 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IShipDecorationsRequest, IResetShipDecorationsRequest } from "@/src/types/personalRoomsTypes"; -import { RequestHandler } from "express"; +import type { IShipDecorationsRequest, IResetShipDecorationsRequest } from "@/src/types/personalRoomsTypes"; +import type { RequestHandler } from "express"; import { handleResetShipDecorations, handleSetShipDecorations } from "@/src/services/shipCustomizationsService"; export const shipDecorationsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/startCollectibleEntryController.ts b/src/controllers/api/startCollectibleEntryController.ts index ffc440c1..1e373fa6 100644 --- a/src/controllers/api/startCollectibleEntryController.ts +++ b/src/controllers/api/startCollectibleEntryController.ts @@ -1,8 +1,8 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IIncentiveState } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; +import type { IIncentiveState } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; export const startCollectibleEntryController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/startDojoRecipeController.ts b/src/controllers/api/startDojoRecipeController.ts index 0773f252..42a7ad67 100644 --- a/src/controllers/api/startDojoRecipeController.ts +++ b/src/controllers/api/startDojoRecipeController.ts @@ -1,5 +1,6 @@ -import { RequestHandler } from "express"; -import { GuildPermission, IDojoComponentClient } from "@/src/types/guildTypes"; +import type { RequestHandler } from "express"; +import type { IDojoComponentClient } from "@/src/types/guildTypes"; +import { GuildPermission } from "@/src/types/guildTypes"; import { getDojoClient, getGuildForRequestEx, diff --git a/src/controllers/api/startLibraryDailyTaskController.ts b/src/controllers/api/startLibraryDailyTaskController.ts index e8b8425b..3c8bb2ce 100644 --- a/src/controllers/api/startLibraryDailyTaskController.ts +++ b/src/controllers/api/startLibraryDailyTaskController.ts @@ -1,6 +1,6 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const startLibraryDailyTaskController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/startLibraryPersonalTargetController.ts b/src/controllers/api/startLibraryPersonalTargetController.ts index 7bfa5ff6..ac03f9b6 100644 --- a/src/controllers/api/startLibraryPersonalTargetController.ts +++ b/src/controllers/api/startLibraryPersonalTargetController.ts @@ -1,6 +1,6 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const startLibraryPersonalTargetController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/startRecipeController.ts b/src/controllers/api/startRecipeController.ts index 42f138e5..c91c7bd6 100644 --- a/src/controllers/api/startRecipeController.ts +++ b/src/controllers/api/startRecipeController.ts @@ -1,16 +1,17 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { logger } from "@/src/utils/logger"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getRecipe } from "@/src/services/itemDataService"; import { addItem, addKubrowPet, freeUpSlot, getInventory, updateCurrency } from "@/src/services/inventoryService"; import { unixTimesInMs } from "@/src/constants/timeConstants"; import { Types } from "mongoose"; -import { InventorySlot, ISpectreLoadout } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { ISpectreLoadout } from "@/src/types/inventoryTypes/inventoryTypes"; +import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; import { fromOid, toOid } from "@/src/helpers/inventoryHelpers"; import { ExportWeapons } from "warframe-public-export-plus"; import { getRandomElement } from "@/src/services/rngService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; interface IStartRecipeRequest { RecipeName: string; diff --git a/src/controllers/api/stepSequencersController.ts b/src/controllers/api/stepSequencersController.ts index 3d86c1ac..361e258f 100644 --- a/src/controllers/api/stepSequencersController.ts +++ b/src/controllers/api/stepSequencersController.ts @@ -1,7 +1,7 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory } from "@/src/services/inventoryService"; -import { IStepSequencer } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IStepSequencer } from "@/src/types/inventoryTypes/inventoryTypes"; export const stepSequencersController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/surveysController.ts b/src/controllers/api/surveysController.ts index 2a593e47..18e92fe2 100644 --- a/src/controllers/api/surveysController.ts +++ b/src/controllers/api/surveysController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; const surveysController: RequestHandler = (_req, res) => { const data = Buffer.from([ diff --git a/src/controllers/api/syndicateSacrificeController.ts b/src/controllers/api/syndicateSacrificeController.ts index cdd640d0..d28719d5 100644 --- a/src/controllers/api/syndicateSacrificeController.ts +++ b/src/controllers/api/syndicateSacrificeController.ts @@ -1,10 +1,11 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { ExportSyndicates, ISyndicateSacrifice } from "warframe-public-export-plus"; +import type { ISyndicateSacrifice } from "warframe-public-export-plus"; +import { ExportSyndicates } from "warframe-public-export-plus"; import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; import { addMiscItem, combineInventoryChanges, getInventory, updateCurrency } from "@/src/services/inventoryService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; import { toStoreItem } from "@/src/services/itemDataService"; import { logger } from "@/src/utils/logger"; diff --git a/src/controllers/api/syndicateStandingBonusController.ts b/src/controllers/api/syndicateStandingBonusController.ts index 1691aa68..1e5411c6 100644 --- a/src/controllers/api/syndicateStandingBonusController.ts +++ b/src/controllers/api/syndicateStandingBonusController.ts @@ -1,11 +1,12 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { addMiscItems, addStanding, freeUpSlot, getInventory } from "@/src/services/inventoryService"; -import { IMiscItem, InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IOid } from "@/src/types/commonTypes"; +import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; +import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IOid } from "@/src/types/commonTypes"; import { ExportSyndicates, ExportWeapons } from "warframe-public-export-plus"; import { logger } from "@/src/utils/logger"; -import { IAffiliationMods, IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IAffiliationMods, IInventoryChanges } from "@/src/types/purchaseTypes"; import { EquipmentFeatures } from "@/src/types/equipmentTypes"; export const syndicateStandingBonusController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/tauntHistoryController.ts b/src/controllers/api/tauntHistoryController.ts index a2e489ea..24c49402 100644 --- a/src/controllers/api/tauntHistoryController.ts +++ b/src/controllers/api/tauntHistoryController.ts @@ -1,7 +1,7 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory } from "@/src/services/inventoryService"; -import { ITaunt } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { ITaunt } from "@/src/types/inventoryTypes/inventoryTypes"; import { logger } from "@/src/utils/logger"; export const tauntHistoryController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/tradingController.ts b/src/controllers/api/tradingController.ts index af6e94f9..27868e2e 100644 --- a/src/controllers/api/tradingController.ts +++ b/src/controllers/api/tradingController.ts @@ -2,7 +2,7 @@ import { getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { GuildPermission } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const tradingController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/trainingResultController.ts b/src/controllers/api/trainingResultController.ts index 39df6c26..6bf37eda 100644 --- a/src/controllers/api/trainingResultController.ts +++ b/src/controllers/api/trainingResultController.ts @@ -1,10 +1,10 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory } from "@/src/services/inventoryService"; -import { IMongoDate } from "@/src/types/commonTypes"; -import { RequestHandler } from "express"; +import type { IMongoDate } from "@/src/types/commonTypes"; +import type { RequestHandler } from "express"; import { unixTimesInMs } from "@/src/constants/timeConstants"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; import { createMessage } from "@/src/services/inboxService"; interface ITrainingResultsRequest { diff --git a/src/controllers/api/umbraController.ts b/src/controllers/api/umbraController.ts index 88529662..89c8e9fa 100644 --- a/src/controllers/api/umbraController.ts +++ b/src/controllers/api/umbraController.ts @@ -2,8 +2,8 @@ import { fromMongoDate, fromOid } from "@/src/helpers/inventoryHelpers"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { addMiscItem, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IEquipmentClient } from "@/src/types/equipmentTypes"; -import { RequestHandler } from "express"; +import type { IEquipmentClient } from "@/src/types/equipmentTypes"; +import type { RequestHandler } from "express"; export const umbraController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/unlockShipFeatureController.ts b/src/controllers/api/unlockShipFeatureController.ts index 4a3ecd1e..76640b60 100644 --- a/src/controllers/api/unlockShipFeatureController.ts +++ b/src/controllers/api/unlockShipFeatureController.ts @@ -1,6 +1,6 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { updateShipFeature } from "@/src/services/personalRoomsService"; -import { IUnlockShipFeatureRequest } from "@/src/types/requestTypes"; +import type { IUnlockShipFeatureRequest } from "@/src/types/requestTypes"; import { parseString } from "@/src/helpers/general"; export const unlockShipFeatureController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/updateAlignmentController.ts b/src/controllers/api/updateAlignmentController.ts index 2942ad6f..4ba48f3c 100644 --- a/src/controllers/api/updateAlignmentController.ts +++ b/src/controllers/api/updateAlignmentController.ts @@ -1,8 +1,8 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IAlignment } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; +import type { IAlignment } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; export const updateAlignmentController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/updateChallengeProgressController.ts b/src/controllers/api/updateChallengeProgressController.ts index e0547c7f..58734251 100644 --- a/src/controllers/api/updateChallengeProgressController.ts +++ b/src/controllers/api/updateChallengeProgressController.ts @@ -1,9 +1,9 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getAccountForRequest } from "@/src/services/loginService"; import { addCalendarProgress, addChallenges, getInventory } from "@/src/services/inventoryService"; -import { IChallengeProgress, ISeasonChallenge } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IAffiliationMods } from "@/src/types/purchaseTypes"; +import type { IChallengeProgress, ISeasonChallenge } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IAffiliationMods } from "@/src/types/purchaseTypes"; import { getEntriesUnsafe } from "@/src/utils/ts-utils"; import { logger } from "@/src/utils/logger"; diff --git a/src/controllers/api/updateQuestController.ts b/src/controllers/api/updateQuestController.ts index c251094f..bcf8937b 100644 --- a/src/controllers/api/updateQuestController.ts +++ b/src/controllers/api/updateQuestController.ts @@ -1,9 +1,10 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { parseString } from "@/src/helpers/general"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { updateQuestKey, IUpdateQuestRequest } from "@/src/services/questService"; +import type { IUpdateQuestRequest } from "@/src/services/questService"; +import { updateQuestKey } from "@/src/services/questService"; import { getInventory } from "@/src/services/inventoryService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; export const updateQuestController: RequestHandler = async (req, res) => { const accountId = parseString(req.query.accountId); diff --git a/src/controllers/api/updateSessionController.ts b/src/controllers/api/updateSessionController.ts index 1bffbdb9..1644f815 100644 --- a/src/controllers/api/updateSessionController.ts +++ b/src/controllers/api/updateSessionController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { updateSession } from "@/src/managers/sessionManager"; const updateSessionGetController: RequestHandler = (_req, res) => { diff --git a/src/controllers/api/updateSongChallengeController.ts b/src/controllers/api/updateSongChallengeController.ts index e0a10fc8..c9cb2f2b 100644 --- a/src/controllers/api/updateSongChallengeController.ts +++ b/src/controllers/api/updateSongChallengeController.ts @@ -1,8 +1,8 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { addShipDecorations, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { RequestHandler } from "express"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { RequestHandler } from "express"; export const updateSongChallengeController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/updateThemeController.ts b/src/controllers/api/updateThemeController.ts index ce31d27d..e3716a18 100644 --- a/src/controllers/api/updateThemeController.ts +++ b/src/controllers/api/updateThemeController.ts @@ -1,6 +1,6 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getInventory } from "@/src/services/inventoryService"; export const updateThemeController: RequestHandler = async (request, response) => { diff --git a/src/controllers/api/upgradesController.ts b/src/controllers/api/upgradesController.ts index 54aab912..0104e644 100644 --- a/src/controllers/api/upgradesController.ts +++ b/src/controllers/api/upgradesController.ts @@ -1,14 +1,15 @@ -import { RequestHandler } from "express"; -import { IUpgradesRequest } from "@/src/types/requestTypes"; -import { ArtifactPolarity, IAbilityOverride } from "@/src/types/inventoryTypes/commonInventoryTypes"; -import { IInventoryClient, IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; +import type { IUpgradesRequest } from "@/src/types/requestTypes"; +import type { ArtifactPolarity, IAbilityOverride } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { IInventoryClient, IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { addMiscItems, addRecipes, getInventory, updateCurrency } from "@/src/services/inventoryService"; import { getRecipeByResult } from "@/src/services/itemDataService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; import { addInfestedFoundryXP, applyCheatsToInfestedFoundry } from "@/src/services/infestedFoundryService"; import { sendWsBroadcastTo } from "@/src/services/wsService"; -import { EquipmentFeatures, IEquipmentDatabase } from "@/src/types/equipmentTypes"; +import type { IEquipmentDatabase } from "@/src/types/equipmentTypes"; +import { EquipmentFeatures } from "@/src/types/equipmentTypes"; export const upgradesController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/valenceSwapController.ts b/src/controllers/api/valenceSwapController.ts index 0c3976b0..b02c9f8c 100644 --- a/src/controllers/api/valenceSwapController.ts +++ b/src/controllers/api/valenceSwapController.ts @@ -1,8 +1,8 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IOid } from "@/src/types/commonTypes"; -import { IInnateDamageFingerprint, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; +import type { IOid } from "@/src/types/commonTypes"; +import type { IInnateDamageFingerprint, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; export const valenceSwapController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/wishlistController.ts b/src/controllers/api/wishlistController.ts index cfef2329..3be802b9 100644 --- a/src/controllers/api/wishlistController.ts +++ b/src/controllers/api/wishlistController.ts @@ -1,7 +1,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const wishlistController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/custom/abilityOverrideController.ts b/src/controllers/custom/abilityOverrideController.ts index e67afb1e..ce100fad 100644 --- a/src/controllers/custom/abilityOverrideController.ts +++ b/src/controllers/custom/abilityOverrideController.ts @@ -1,7 +1,7 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; +import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; export const abilityOverrideController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/custom/addCurrencyController.ts b/src/controllers/custom/addCurrencyController.ts index be14b8a3..347d8c4e 100644 --- a/src/controllers/custom/addCurrencyController.ts +++ b/src/controllers/custom/addCurrencyController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { addFusionPoints, getInventory } from "@/src/services/inventoryService"; diff --git a/src/controllers/custom/addItemsController.ts b/src/controllers/custom/addItemsController.ts index 30edd917..812476fb 100644 --- a/src/controllers/custom/addItemsController.ts +++ b/src/controllers/custom/addItemsController.ts @@ -1,6 +1,6 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory, addItem } from "@/src/services/inventoryService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const addItemsController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/custom/addMissingHelminthBlueprintsController.ts b/src/controllers/custom/addMissingHelminthBlueprintsController.ts index 4de501fe..c62ffdf5 100644 --- a/src/controllers/custom/addMissingHelminthBlueprintsController.ts +++ b/src/controllers/custom/addMissingHelminthBlueprintsController.ts @@ -1,6 +1,6 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory, addRecipes } from "@/src/services/inventoryService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { ExportRecipes } from "warframe-public-export-plus"; export const addMissingHelminthBlueprintsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/addMissingMaxRankModsController.ts b/src/controllers/custom/addMissingMaxRankModsController.ts index 99cd09ec..c89fa34c 100644 --- a/src/controllers/custom/addMissingMaxRankModsController.ts +++ b/src/controllers/custom/addMissingMaxRankModsController.ts @@ -1,6 +1,6 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { ExportArcanes, ExportUpgrades } from "warframe-public-export-plus"; export const addMissingMaxRankModsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/addXpController.ts b/src/controllers/custom/addXpController.ts index 575fe978..876b5837 100644 --- a/src/controllers/custom/addXpController.ts +++ b/src/controllers/custom/addXpController.ts @@ -1,9 +1,9 @@ import { applyClientEquipmentUpdates, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IOid } from "@/src/types/commonTypes"; -import { IEquipmentClient } from "@/src/types/equipmentTypes"; -import { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; +import type { IOid } from "@/src/types/commonTypes"; +import type { IEquipmentClient } from "@/src/types/equipmentTypes"; +import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; import { ExportMisc } from "warframe-public-export-plus"; export const addXpController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/changeModularPartsController.ts b/src/controllers/custom/changeModularPartsController.ts index ee1fd8f3..c3c43eaf 100644 --- a/src/controllers/custom/changeModularPartsController.ts +++ b/src/controllers/custom/changeModularPartsController.ts @@ -1,7 +1,7 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; +import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; export const changeModularPartsController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/custom/completeAllMissionsController.ts b/src/controllers/custom/completeAllMissionsController.ts index 0d53135f..d363e81e 100644 --- a/src/controllers/custom/completeAllMissionsController.ts +++ b/src/controllers/custom/completeAllMissionsController.ts @@ -3,8 +3,8 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { addFixedLevelRewards } from "@/src/services/missionInventoryUpdateService"; import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import { IMissionReward } from "@/src/types/missionTypes"; -import { RequestHandler } from "express"; +import type { IMissionReward } from "@/src/types/missionTypes"; +import type { RequestHandler } from "express"; import { ExportRegions } from "warframe-public-export-plus"; export const completeAllMissionsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/configController.ts b/src/controllers/custom/configController.ts index fa1b4a2c..de1adc5c 100644 --- a/src/controllers/custom/configController.ts +++ b/src/controllers/custom/configController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { config, syncConfigWithDatabase } from "@/src/services/configService"; import { getAccountForRequest, isAdministrator } from "@/src/services/loginService"; import { saveConfig } from "@/src/services/configWriterService"; diff --git a/src/controllers/custom/createAccountController.ts b/src/controllers/custom/createAccountController.ts index bac12508..e74782c2 100644 --- a/src/controllers/custom/createAccountController.ts +++ b/src/controllers/custom/createAccountController.ts @@ -1,6 +1,6 @@ import { toCreateAccount, toDatabaseAccount } from "@/src/helpers/customHelpers/customHelpers"; import { createAccount, isNameTaken } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; const createAccountController: RequestHandler = async (req, res) => { const createAccountData = toCreateAccount(req.body); diff --git a/src/controllers/custom/createMessageController.ts b/src/controllers/custom/createMessageController.ts index af67fd2d..5922f7e6 100644 --- a/src/controllers/custom/createMessageController.ts +++ b/src/controllers/custom/createMessageController.ts @@ -1,5 +1,6 @@ -import { createMessage, IMessageCreationTemplate } from "@/src/services/inboxService"; -import { RequestHandler } from "express"; +import type { IMessageCreationTemplate } from "@/src/services/inboxService"; +import { createMessage } from "@/src/services/inboxService"; +import type { RequestHandler } from "express"; export const createMessageController: RequestHandler = async (req, res) => { const message = req.body as (IMessageCreationTemplate & { ownerId: string })[] | undefined; diff --git a/src/controllers/custom/deleteAccountController.ts b/src/controllers/custom/deleteAccountController.ts index abe33315..f3c0869f 100644 --- a/src/controllers/custom/deleteAccountController.ts +++ b/src/controllers/custom/deleteAccountController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { Account, Ignore } from "@/src/models/loginModel"; import { Inbox } from "@/src/models/inboxModel"; diff --git a/src/controllers/custom/editSuitInvigorationUpgradeController.ts b/src/controllers/custom/editSuitInvigorationUpgradeController.ts index bc624911..0bebc979 100644 --- a/src/controllers/custom/editSuitInvigorationUpgradeController.ts +++ b/src/controllers/custom/editSuitInvigorationUpgradeController.ts @@ -1,6 +1,6 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory } from "@/src/services/inventoryService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; const DEFAULT_UPGRADE_EXPIRY_MS = 7 * 24 * 60 * 60 * 1000; // 7 days diff --git a/src/controllers/custom/getAccountInfoController.ts b/src/controllers/custom/getAccountInfoController.ts index 668aebf4..e4038c55 100644 --- a/src/controllers/custom/getAccountInfoController.ts +++ b/src/controllers/custom/getAccountInfoController.ts @@ -1,7 +1,7 @@ import { AllianceMember, Guild, GuildMember } from "@/src/models/guildModel"; import { getInventory } from "@/src/services/inventoryService"; import { getAccountForRequest, isAdministrator } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const getAccountInfoController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/custom/getItemListsController.ts b/src/controllers/custom/getItemListsController.ts index 23dd643f..3d46baff 100644 --- a/src/controllers/custom/getItemListsController.ts +++ b/src/controllers/custom/getItemListsController.ts @@ -1,5 +1,6 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getDict, getItemName, getString } from "@/src/services/itemDataService"; +import type { TRelicQuality } from "warframe-public-export-plus"; import { ExportAbilities, ExportArcanes, @@ -18,8 +19,7 @@ import { ExportSyndicates, ExportUpgrades, ExportWarframes, - ExportWeapons, - TRelicQuality + ExportWeapons } from "warframe-public-export-plus"; import allIncarnons from "@/static/fixed_responses/allIncarnonList.json"; import varzia from "@/static/fixed_responses/worldState/varzia.json"; diff --git a/src/controllers/custom/getNameController.ts b/src/controllers/custom/getNameController.ts index bc4a94f3..72a83fbc 100644 --- a/src/controllers/custom/getNameController.ts +++ b/src/controllers/custom/getNameController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountForRequest } from "@/src/services/loginService"; export const getNameController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/importController.ts b/src/controllers/custom/importController.ts index b73089f1..70b61550 100644 --- a/src/controllers/custom/importController.ts +++ b/src/controllers/custom/importController.ts @@ -3,9 +3,9 @@ import { getInventory } from "@/src/services/inventoryService"; import { getLoadout } from "@/src/services/loadoutService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getPersonalRooms } from "@/src/services/personalRoomsService"; -import { IInventoryClient } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IGetShipResponse } from "@/src/types/personalRoomsTypes"; -import { RequestHandler } from "express"; +import type { IInventoryClient } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IGetShipResponse } from "@/src/types/personalRoomsTypes"; +import type { RequestHandler } from "express"; export const importController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/custom/ircDroppedController.ts b/src/controllers/custom/ircDroppedController.ts index 1621defc..c0af17ca 100644 --- a/src/controllers/custom/ircDroppedController.ts +++ b/src/controllers/custom/ircDroppedController.ts @@ -1,5 +1,5 @@ import { Account } from "@/src/models/loginModel"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const ircDroppedController: RequestHandler = async (req, res) => { if (!req.query.accountId) { diff --git a/src/controllers/custom/manageQuestsController.ts b/src/controllers/custom/manageQuestsController.ts index 365fb29c..88626935 100644 --- a/src/controllers/custom/manageQuestsController.ts +++ b/src/controllers/custom/manageQuestsController.ts @@ -7,7 +7,7 @@ import { giveKeyChainStageTriggered } from "@/src/services/questService"; import { logger } from "@/src/utils/logger"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { ExportKeys } from "warframe-public-export-plus"; export const manageQuestsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/popArchonCrystalUpgradeController.ts b/src/controllers/custom/popArchonCrystalUpgradeController.ts index d6ef86e0..b7240682 100644 --- a/src/controllers/custom/popArchonCrystalUpgradeController.ts +++ b/src/controllers/custom/popArchonCrystalUpgradeController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory } from "@/src/services/inventoryService"; diff --git a/src/controllers/custom/pushArchonCrystalUpgradeController.ts b/src/controllers/custom/pushArchonCrystalUpgradeController.ts index 0db365fb..0dbf4d60 100644 --- a/src/controllers/custom/pushArchonCrystalUpgradeController.ts +++ b/src/controllers/custom/pushArchonCrystalUpgradeController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory } from "@/src/services/inventoryService"; diff --git a/src/controllers/custom/renameAccountController.ts b/src/controllers/custom/renameAccountController.ts index 11c28a22..e850b027 100644 --- a/src/controllers/custom/renameAccountController.ts +++ b/src/controllers/custom/renameAccountController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountForRequest, isAdministrator, isNameTaken } from "@/src/services/loginService"; import { config } from "@/src/services/configService"; import { saveConfig } from "@/src/services/configWriterService"; diff --git a/src/controllers/custom/setAccountCheatController.ts b/src/controllers/custom/setAccountCheatController.ts index 9647d2ad..75d0a71d 100644 --- a/src/controllers/custom/setAccountCheatController.ts +++ b/src/controllers/custom/setAccountCheatController.ts @@ -1,7 +1,7 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { IAccountCheats } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; +import type { IAccountCheats } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; export const setAccountCheatController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/custom/setBoosterController.ts b/src/controllers/custom/setBoosterController.ts index b0a1ddbf..daa8c623 100644 --- a/src/controllers/custom/setBoosterController.ts +++ b/src/controllers/custom/setBoosterController.ts @@ -1,6 +1,6 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory } from "@/src/services/inventoryService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { ExportBoosters } from "warframe-public-export-plus"; const I32_MAX = 0x7fffffff; diff --git a/src/controllers/custom/setEvolutionProgressController.ts b/src/controllers/custom/setEvolutionProgressController.ts index 45c7c68b..80784e0b 100644 --- a/src/controllers/custom/setEvolutionProgressController.ts +++ b/src/controllers/custom/setEvolutionProgressController.ts @@ -1,6 +1,6 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const setEvolutionProgressController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/custom/tunablesController.ts b/src/controllers/custom/tunablesController.ts index 535b90ee..87419fcc 100644 --- a/src/controllers/custom/tunablesController.ts +++ b/src/controllers/custom/tunablesController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; // This endpoint is specific to the OpenWF Bootstrapper: https://openwf.io/bootstrapper-manual diff --git a/src/controllers/custom/unlockAllIntrinsicsController.ts b/src/controllers/custom/unlockAllIntrinsicsController.ts index cd48bdcc..309ef40b 100644 --- a/src/controllers/custom/unlockAllIntrinsicsController.ts +++ b/src/controllers/custom/unlockAllIntrinsicsController.ts @@ -1,6 +1,6 @@ import { getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const unlockAllIntrinsicsController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/custom/updateFingerprintController.ts b/src/controllers/custom/updateFingerprintController.ts index df82d412..0aab7e38 100644 --- a/src/controllers/custom/updateFingerprintController.ts +++ b/src/controllers/custom/updateFingerprintController.ts @@ -1,7 +1,7 @@ import { getInventory } from "@/src/services/inventoryService"; -import { WeaponTypeInternal } from "@/src/services/itemDataService"; +import type { WeaponTypeInternal } from "@/src/services/itemDataService"; import { getAccountIdForRequest } from "@/src/services/loginService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const updateFingerprintController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/custom/webuiFileChangeDetectedController.ts b/src/controllers/custom/webuiFileChangeDetectedController.ts index 5078b679..a9144c49 100644 --- a/src/controllers/custom/webuiFileChangeDetectedController.ts +++ b/src/controllers/custom/webuiFileChangeDetectedController.ts @@ -1,6 +1,6 @@ import { args } from "@/src/helpers/commandLineArguments"; import { sendWsBroadcast } from "@/src/services/wsService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const webuiFileChangeDetectedController: RequestHandler = (req, res) => { if (args.dev && args.secret && req.query.secret == args.secret) { diff --git a/src/controllers/dynamic/aggregateSessionsController.ts b/src/controllers/dynamic/aggregateSessionsController.ts index a12c8d40..a205bdf3 100644 --- a/src/controllers/dynamic/aggregateSessionsController.ts +++ b/src/controllers/dynamic/aggregateSessionsController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import aggregateSessions from "@/static/fixed_responses/aggregateSessions.json"; const aggregateSessionsController: RequestHandler = (_req, res) => { diff --git a/src/controllers/dynamic/getGuildAdsController.ts b/src/controllers/dynamic/getGuildAdsController.ts index 1dbe8217..e4684fb7 100644 --- a/src/controllers/dynamic/getGuildAdsController.ts +++ b/src/controllers/dynamic/getGuildAdsController.ts @@ -1,7 +1,7 @@ import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers"; import { GuildAd } from "@/src/models/guildModel"; -import { IGuildAdInfoClient } from "@/src/types/guildTypes"; -import { RequestHandler } from "express"; +import type { IGuildAdInfoClient } from "@/src/types/guildTypes"; +import type { RequestHandler } from "express"; export const getGuildAdsController: RequestHandler = async (req, res) => { const ads = await GuildAd.find(req.query.tier ? { Tier: req.query.tier } : {}); diff --git a/src/controllers/dynamic/getProfileViewingDataController.ts b/src/controllers/dynamic/getProfileViewingDataController.ts index 7ec94f45..ccf404be 100644 --- a/src/controllers/dynamic/getProfileViewingDataController.ts +++ b/src/controllers/dynamic/getProfileViewingDataController.ts @@ -1,29 +1,32 @@ import { fromDbOid, toMongoDate, toOid } from "@/src/helpers/inventoryHelpers"; -import { Guild, GuildMember, TGuildDatabaseDocument } from "@/src/models/guildModel"; -import { Inventory, TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TGuildDatabaseDocument } from "@/src/models/guildModel"; +import { Guild, GuildMember } from "@/src/models/guildModel"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; import { Loadout } from "@/src/models/inventoryModels/loadoutModel"; import { Account } from "@/src/models/loginModel"; -import { Stats, TStatsDatabaseDocument } from "@/src/models/statsModel"; +import type { TStatsDatabaseDocument } from "@/src/models/statsModel"; +import { Stats } from "@/src/models/statsModel"; import { allDailyAffiliationKeys } from "@/src/services/inventoryService"; -import { IMongoDate, IOid } from "@/src/types/commonTypes"; -import { +import type { IMongoDate, IOid } from "@/src/types/commonTypes"; +import type { IAffiliation, IAlignment, IChallengeProgress, IDailyAffiliations, IMission, IPlayerSkills, - ITypeXPItem, - LoadoutIndex + ITypeXPItem } from "@/src/types/inventoryTypes/inventoryTypes"; -import { RequestHandler } from "express"; +import { LoadoutIndex } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { RequestHandler } from "express"; import { catBreadHash, getJSONfromString } from "@/src/helpers/stringHelpers"; import { ExportCustoms, ExportDojoRecipes } from "warframe-public-export-plus"; -import { IStatsClient } from "@/src/types/statTypes"; +import type { IStatsClient } from "@/src/types/statTypes"; import { toStoreItem } from "@/src/services/itemDataService"; -import { FlattenMaps } from "mongoose"; -import { IEquipmentClient } from "@/src/types/equipmentTypes"; -import { ILoadoutConfigClient } from "@/src/types/saveLoadoutTypes"; +import type { FlattenMaps } from "mongoose"; +import type { IEquipmentClient } from "@/src/types/equipmentTypes"; +import type { ILoadoutConfigClient } from "@/src/types/saveLoadoutTypes"; const getProfileViewingDataByPlayerIdImpl = async (playerId: string): Promise => { const account = await Account.findById(playerId, "DisplayName"); diff --git a/src/controllers/dynamic/worldStateController.ts b/src/controllers/dynamic/worldStateController.ts index 556eb91e..f6b538d5 100644 --- a/src/controllers/dynamic/worldStateController.ts +++ b/src/controllers/dynamic/worldStateController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getWorldState, populateDailyDeal, populateFissures } from "@/src/services/worldStateService"; import { version_compare } from "@/src/helpers/inventoryHelpers"; diff --git a/src/controllers/pay/getSkuCatalogController.ts b/src/controllers/pay/getSkuCatalogController.ts index baf79d58..8495c316 100644 --- a/src/controllers/pay/getSkuCatalogController.ts +++ b/src/controllers/pay/getSkuCatalogController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const getSkuCatalogController: RequestHandler = (_req, res) => { res.sendFile("static/fixed_responses/getSkuCatalog.json", { root: "./" }); diff --git a/src/controllers/pay/steamPacksController.ts b/src/controllers/pay/steamPacksController.ts index f0885786..ea4c5b89 100644 --- a/src/controllers/pay/steamPacksController.ts +++ b/src/controllers/pay/steamPacksController.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; const steamPacksController: RequestHandler = (_req, res) => { res.sendStatus(200); diff --git a/src/controllers/stats/leaderboardController.ts b/src/controllers/stats/leaderboardController.ts index f5550f2b..cf321b1f 100644 --- a/src/controllers/stats/leaderboardController.ts +++ b/src/controllers/stats/leaderboardController.ts @@ -1,5 +1,5 @@ import { getLeaderboard } from "@/src/services/leaderboardService"; -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; export const leaderboardController: RequestHandler = async (req, res) => { const payload = JSON.parse(String(req.body)) as ILeaderboardRequest; diff --git a/src/controllers/stats/uploadController.ts b/src/controllers/stats/uploadController.ts index c1c1d2e5..8089677e 100644 --- a/src/controllers/stats/uploadController.ts +++ b/src/controllers/stats/uploadController.ts @@ -1,8 +1,8 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { updateStats } from "@/src/services/statsService"; -import { IStatsUpdate } from "@/src/types/statTypes"; -import { RequestHandler } from "express"; +import type { IStatsUpdate } from "@/src/types/statTypes"; +import type { RequestHandler } from "express"; const uploadController: RequestHandler = async (req, res) => { // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/src/controllers/stats/viewController.ts b/src/controllers/stats/viewController.ts index 3ff5a848..3835e944 100644 --- a/src/controllers/stats/viewController.ts +++ b/src/controllers/stats/viewController.ts @@ -1,11 +1,11 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { config } from "@/src/services/configService"; import allScans from "@/static/fixed_responses/allScans.json"; import { ExportEnemies } from "warframe-public-export-plus"; import { getInventory } from "@/src/services/inventoryService"; import { getStats } from "@/src/services/statsService"; -import { IStatsClient } from "@/src/types/statTypes"; +import type { IStatsClient } from "@/src/types/statTypes"; const viewController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/helpers/customHelpers/customHelpers.ts b/src/helpers/customHelpers/customHelpers.ts index 0f920406..8732b681 100644 --- a/src/helpers/customHelpers/customHelpers.ts +++ b/src/helpers/customHelpers/customHelpers.ts @@ -1,5 +1,5 @@ -import { IAccountCreation } from "@/src/types/customTypes"; -import { IDatabaseAccountRequiredFields } from "@/src/types/loginTypes"; +import type { IAccountCreation } from "@/src/types/customTypes"; +import type { IDatabaseAccountRequiredFields } from "@/src/types/loginTypes"; import crypto from "crypto"; import { isString, parseEmail, parseString } from "@/src/helpers/general"; diff --git a/src/helpers/inventoryHelpers.ts b/src/helpers/inventoryHelpers.ts index d888b217..74faaf15 100644 --- a/src/helpers/inventoryHelpers.ts +++ b/src/helpers/inventoryHelpers.ts @@ -1,7 +1,7 @@ -import { IMongoDate, IOid, IOidWithLegacySupport } from "@/src/types/commonTypes"; +import type { IMongoDate, IOid, IOidWithLegacySupport } from "@/src/types/commonTypes"; import { Types } from "mongoose"; -import { TRarity } from "warframe-public-export-plus"; -import { IFusionTreasure } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { TRarity } from "warframe-public-export-plus"; +import type { IFusionTreasure } from "@/src/types/inventoryTypes/inventoryTypes"; export const version_compare = (a: string, b: string): number => { const a_digits = a diff --git a/src/helpers/modularWeaponHelper.ts b/src/helpers/modularWeaponHelper.ts index 3e00531d..2849ae55 100644 --- a/src/helpers/modularWeaponHelper.ts +++ b/src/helpers/modularWeaponHelper.ts @@ -1,4 +1,4 @@ -import { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; export const modularWeaponTypes: Record = { "/Lotus/Weapons/SolarisUnited/Primary/LotusModularPrimary": "LongGuns", diff --git a/src/helpers/nemesisHelpers.ts b/src/helpers/nemesisHelpers.ts index 50eeef97..6b50e9fe 100644 --- a/src/helpers/nemesisHelpers.ts +++ b/src/helpers/nemesisHelpers.ts @@ -1,8 +1,8 @@ import { ExportRegions, ExportWarframes } from "warframe-public-export-plus"; -import { IInfNode, TNemesisFaction } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IInfNode, TNemesisFaction } from "@/src/types/inventoryTypes/inventoryTypes"; import { generateRewardSeed, getRewardAtPercentage, SRng } from "@/src/services/rngService"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { IOid } from "@/src/types/commonTypes"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { IOid } from "@/src/types/commonTypes"; import { isArchwingMission } from "@/src/services/worldStateService"; type TInnateDamageTag = diff --git a/src/helpers/purchaseHelpers.ts b/src/helpers/purchaseHelpers.ts index 0685f457..8a460b41 100644 --- a/src/helpers/purchaseHelpers.ts +++ b/src/helpers/purchaseHelpers.ts @@ -1,4 +1,4 @@ -import { SlotPurchase, SlotPurchaseName } from "@/src/types/purchaseTypes"; +import type { SlotPurchase, SlotPurchaseName } from "@/src/types/purchaseTypes"; export const slotPurchaseNameToSlotName: SlotPurchase = { SuitSlotItem: { name: "SuitBin", purchaseQuantity: 1 }, diff --git a/src/helpers/relicHelper.ts b/src/helpers/relicHelper.ts index 5a34d342..8c34e683 100644 --- a/src/helpers/relicHelper.ts +++ b/src/helpers/relicHelper.ts @@ -1,11 +1,13 @@ -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { IVoidTearParticipantInfo } from "@/src/types/requestTypes"; -import { ExportRelics, ExportRewards, TRarity } from "warframe-public-export-plus"; -import { getRandomWeightedReward, IRngResult } from "@/src/services/rngService"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { IVoidTearParticipantInfo } from "@/src/types/requestTypes"; +import type { TRarity } from "warframe-public-export-plus"; +import { ExportRelics, ExportRewards } from "warframe-public-export-plus"; +import type { IRngResult } from "@/src/services/rngService"; +import { getRandomWeightedReward } from "@/src/services/rngService"; import { logger } from "@/src/utils/logger"; import { addMiscItems, combineInventoryChanges } from "@/src/services/inventoryService"; import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; import { config } from "@/src/services/configService"; export const crackRelic = async ( diff --git a/src/helpers/rivenHelper.ts b/src/helpers/rivenHelper.ts index 7b2be304..f89e9c70 100644 --- a/src/helpers/rivenHelper.ts +++ b/src/helpers/rivenHelper.ts @@ -1,4 +1,4 @@ -import { IUpgrade } from "warframe-public-export-plus"; +import type { IUpgrade } from "warframe-public-export-plus"; import { getRandomElement, getRandomInt, getRandomReward } from "@/src/services/rngService"; export type RivenFingerprint = IVeiledRivenFingerprint | IUnveiledRivenFingerprint; diff --git a/src/helpers/syndicateStandingHelper.ts b/src/helpers/syndicateStandingHelper.ts index ac478dda..ec9c939e 100644 --- a/src/helpers/syndicateStandingHelper.ts +++ b/src/helpers/syndicateStandingHelper.ts @@ -1,4 +1,4 @@ -import { ISyndicate } from "warframe-public-export-plus"; +import type { ISyndicate } from "warframe-public-export-plus"; export const getMaxStanding = (syndicate: ISyndicate, title: number): number => { if (!syndicate.titles) { diff --git a/src/managers/sessionManager.ts b/src/managers/sessionManager.ts index ed397823..b6a11224 100644 --- a/src/managers/sessionManager.ts +++ b/src/managers/sessionManager.ts @@ -1,4 +1,4 @@ -import { ISession, IFindSessionRequest } from "@/src/types/session"; +import type { ISession, IFindSessionRequest } from "@/src/types/session"; import { logger } from "@/src/utils/logger"; import { JSONParse } from "json-with-bigint"; import { Types } from "mongoose"; diff --git a/src/middleware/errorHandler.ts b/src/middleware/errorHandler.ts index 92b30f6f..92c72d6c 100644 --- a/src/middleware/errorHandler.ts +++ b/src/middleware/errorHandler.ts @@ -1,4 +1,4 @@ -import { NextFunction, Request, Response } from "express"; +import type { NextFunction, Request, Response } from "express"; import { logError } from "@/src/utils/logger"; export const errorHandler = (err: Error, req: Request, res: Response, _next: NextFunction): void => { diff --git a/src/middleware/middleware.ts b/src/middleware/middleware.ts index 96fe391c..e611982b 100644 --- a/src/middleware/middleware.ts +++ b/src/middleware/middleware.ts @@ -1,5 +1,5 @@ import { logger } from "@/src/utils/logger"; -import { /*NextFunction,*/ Request, Response } from "express"; +import type { /*NextFunction,*/ Request, Response } from "express"; const unknownEndpointHandler = (request: Request, response: Response): void => { logger.error(`unknown endpoint ${request.method} ${request.path}`); diff --git a/src/models/commonModel.ts b/src/models/commonModel.ts index dd0ad85e..9c570fd2 100644 --- a/src/models/commonModel.ts +++ b/src/models/commonModel.ts @@ -1,5 +1,5 @@ import { Schema } from "mongoose"; -import { IColor, IShipCustomization } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { IColor, IShipCustomization } from "@/src/types/inventoryTypes/commonInventoryTypes"; export const colorSchema = new Schema( { diff --git a/src/models/friendModel.ts b/src/models/friendModel.ts index f253101a..33d7721b 100644 --- a/src/models/friendModel.ts +++ b/src/models/friendModel.ts @@ -1,4 +1,4 @@ -import { IFriendship } from "@/src/types/friendTypes"; +import type { IFriendship } from "@/src/types/friendTypes"; import { model, Schema } from "mongoose"; const friendshipSchema = new Schema({ diff --git a/src/models/guildModel.ts b/src/models/guildModel.ts index eb005144..17c05203 100644 --- a/src/models/guildModel.ts +++ b/src/models/guildModel.ts @@ -1,4 +1,4 @@ -import { +import type { IGuildDatabase, IDojoComponentDatabase, ITechProjectDatabase, @@ -13,13 +13,14 @@ import { IDojoLeaderboardEntry, IGuildAdDatabase, IAllianceDatabase, - IAllianceMemberDatabase, - GuildPermission + IAllianceMemberDatabase } from "@/src/types/guildTypes"; -import { Document, Model, model, Schema, Types } from "mongoose"; +import { GuildPermission } from "@/src/types/guildTypes"; +import type { Document, Model } from "mongoose"; +import { model, Schema, Types } from "mongoose"; import { fusionTreasuresSchema, typeCountSchema } from "@/src/models/inventoryModels/inventoryModel"; import { pictureFrameInfoSchema } from "@/src/models/personalRoomsModel"; -import { IGoalProgressClient, IGoalProgressDatabase } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IGoalProgressClient, IGoalProgressDatabase } from "@/src/types/inventoryTypes/inventoryTypes"; import { toOid } from "@/src/helpers/inventoryHelpers"; const dojoDecoSchema = new Schema({ diff --git a/src/models/inboxModel.ts b/src/models/inboxModel.ts index 27a5f0a7..47b8a709 100644 --- a/src/models/inboxModel.ts +++ b/src/models/inboxModel.ts @@ -1,7 +1,8 @@ -import { model, Schema, Types } from "mongoose"; +import type { Types } from "mongoose"; +import { model, Schema } from "mongoose"; import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers"; import { typeCountSchema } from "@/src/models/inventoryModels/inventoryModel"; -import { IMongoDate, IOid, ITypeCount } from "@/src/types/commonTypes"; +import type { IMongoDate, IOid, ITypeCount } from "@/src/types/commonTypes"; export interface IMessageClient extends Omit< diff --git a/src/models/inventoryModels/inventoryModel.ts b/src/models/inventoryModels/inventoryModel.ts index ca526ac4..d13c2ef0 100644 --- a/src/models/inventoryModels/inventoryModel.ts +++ b/src/models/inventoryModels/inventoryModel.ts @@ -1,5 +1,6 @@ -import { Document, Model, Schema, Types, model } from "mongoose"; -import { +import type { Document, Model } from "mongoose"; +import { Schema, Types, model } from "mongoose"; +import type { IRawUpgrade, IMiscItem, IInventoryDatabase, @@ -45,7 +46,6 @@ import { IDialogueClient, IUpgradeDatabase, TEquipmentKey, - equipmentKeys, IKubrowPetEggDatabase, IKubrowPetEggClient, ICustomMarkers, @@ -90,8 +90,9 @@ import { IKubrowPetPrintClient, IKubrowPetPrintDatabase } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IOid, ITypeCount } from "@/src/types/commonTypes"; -import { +import { equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IOid, ITypeCount } from "@/src/types/commonTypes"; +import type { IAbilityOverride, ICrewShipCustomization, IFlavourItem, @@ -102,9 +103,9 @@ import { } from "@/src/types/inventoryTypes/commonInventoryTypes"; import { fromDbOid, toMongoDate, toOid } from "@/src/helpers/inventoryHelpers"; import { EquipmentSelectionSchema } from "@/src/models/inventoryModels/loadoutModel"; -import { ICountedStoreItem } from "warframe-public-export-plus"; +import type { ICountedStoreItem } from "warframe-public-export-plus"; import { colorSchema, shipCustomizationSchema } from "@/src/models/commonModel"; -import { +import type { IArchonCrystalUpgrade, ICrewShipMemberClient, ICrewShipMemberDatabase, diff --git a/src/models/inventoryModels/loadoutModel.ts b/src/models/inventoryModels/loadoutModel.ts index 5e32be1d..1bb761db 100644 --- a/src/models/inventoryModels/loadoutModel.ts +++ b/src/models/inventoryModels/loadoutModel.ts @@ -1,8 +1,9 @@ import { fromDbOid, toOid } from "@/src/helpers/inventoryHelpers"; -import { IOid } from "@/src/types/commonTypes"; -import { IEquipmentSelectionClient, IEquipmentSelectionDatabase } from "@/src/types/equipmentTypes"; -import { ILoadoutConfigDatabase, ILoadoutDatabase } from "@/src/types/saveLoadoutTypes"; -import { Document, Model, Schema, Types, model } from "mongoose"; +import type { IOid } from "@/src/types/commonTypes"; +import type { IEquipmentSelectionClient, IEquipmentSelectionDatabase } from "@/src/types/equipmentTypes"; +import type { ILoadoutConfigDatabase, ILoadoutDatabase } from "@/src/types/saveLoadoutTypes"; +import type { Document, Model, Types } from "mongoose"; +import { Schema, model } from "mongoose"; //create a mongoose schema based on interface M export const EquipmentSelectionSchema = new Schema( diff --git a/src/models/leaderboardModel.ts b/src/models/leaderboardModel.ts index a7375e0f..ceeb20f1 100644 --- a/src/models/leaderboardModel.ts +++ b/src/models/leaderboardModel.ts @@ -1,5 +1,6 @@ -import { Document, model, Schema, Types } from "mongoose"; -import { ILeaderboardEntryDatabase } from "@/src/types/leaderboardTypes"; +import type { Document, Types } from "mongoose"; +import { model, Schema } from "mongoose"; +import type { ILeaderboardEntryDatabase } from "@/src/types/leaderboardTypes"; const leaderboardEntrySchema = new Schema( { diff --git a/src/models/loginModel.ts b/src/models/loginModel.ts index a42a7229..c7331d83 100644 --- a/src/models/loginModel.ts +++ b/src/models/loginModel.ts @@ -1,5 +1,6 @@ -import { IDatabaseAccountJson, IIgnore } from "@/src/types/loginTypes"; -import { model, Schema, SchemaOptions } from "mongoose"; +import type { IDatabaseAccountJson, IIgnore } from "@/src/types/loginTypes"; +import type { SchemaOptions } from "mongoose"; +import { model, Schema } from "mongoose"; const opts = { toJSON: { virtuals: true }, diff --git a/src/models/personalRoomsModel.ts b/src/models/personalRoomsModel.ts index f812a8e6..5735014c 100644 --- a/src/models/personalRoomsModel.ts +++ b/src/models/personalRoomsModel.ts @@ -1,5 +1,5 @@ import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers"; -import { +import type { IApartmentDatabase, ICustomizationInfoDatabase, IFavouriteLoadoutDatabase, @@ -16,7 +16,8 @@ import { ITailorShopDatabase, PersonalRoomsModelType } from "@/src/types/personalRoomsTypes"; -import { Schema, Types, model } from "mongoose"; +import type { Types } from "mongoose"; +import { Schema, model } from "mongoose"; import { colorSchema, shipCustomizationSchema } from "@/src/models/commonModel"; import { loadoutConfigSchema } from "@/src/models/inventoryModels/loadoutModel"; diff --git a/src/models/shipModel.ts b/src/models/shipModel.ts index ee8df2fe..d6dd5ad9 100644 --- a/src/models/shipModel.ts +++ b/src/models/shipModel.ts @@ -1,8 +1,9 @@ -import { Document, Schema, Types, model } from "mongoose"; -import { IShipDatabase } from "@/src/types/shipTypes"; +import type { Document, Types } from "mongoose"; +import { Schema, model } from "mongoose"; +import type { IShipDatabase } from "@/src/types/shipTypes"; import { toOid } from "@/src/helpers/inventoryHelpers"; import { colorSchema } from "@/src/models/commonModel"; -import { IShipInventory } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IShipInventory } from "@/src/types/inventoryTypes/inventoryTypes"; const shipSchema = new Schema( { diff --git a/src/models/statsModel.ts b/src/models/statsModel.ts index af015cc0..53a06228 100644 --- a/src/models/statsModel.ts +++ b/src/models/statsModel.ts @@ -1,5 +1,15 @@ -import { Document, Schema, Types, model } from "mongoose"; -import { IEnemy, IMission, IScan, ITutorial, IAbility, IWeapon, IStatsDatabase, IRace } from "@/src/types/statTypes"; +import type { Document, Types } from "mongoose"; +import { Schema, model } from "mongoose"; +import type { + IEnemy, + IMission, + IScan, + ITutorial, + IAbility, + IWeapon, + IStatsDatabase, + IRace +} from "@/src/types/statTypes"; const abilitySchema = new Schema( { diff --git a/src/models/worldStateModel.ts b/src/models/worldStateModel.ts index e7a712fe..3fae89c7 100644 --- a/src/models/worldStateModel.ts +++ b/src/models/worldStateModel.ts @@ -1,4 +1,4 @@ -import { IDailyDealDatabase, IFissureDatabase } from "@/src/types/worldStateTypes"; +import type { IDailyDealDatabase, IFissureDatabase } from "@/src/types/worldStateTypes"; import { model, Schema } from "mongoose"; const fissureSchema = new Schema({ diff --git a/src/services/friendService.ts b/src/services/friendService.ts index 125dfda1..fd8e24bb 100644 --- a/src/services/friendService.ts +++ b/src/services/friendService.ts @@ -1,8 +1,8 @@ -import { IFriendInfo } from "@/src/types/friendTypes"; +import type { IFriendInfo } from "@/src/types/friendTypes"; import { getInventory } from "@/src/services/inventoryService"; import { config } from "@/src/services/configService"; import { Account } from "@/src/models/loginModel"; -import { Types } from "mongoose"; +import type { Types } from "mongoose"; import { Friendship } from "@/src/models/friendModel"; import { fromOid, toMongoDate } from "@/src/helpers/inventoryHelpers"; diff --git a/src/services/guildService.ts b/src/services/guildService.ts index cd7ee147..d1276202 100644 --- a/src/services/guildService.ts +++ b/src/services/guildService.ts @@ -1,10 +1,11 @@ -import { Request } from "express"; -import { getAccountIdForRequest, TAccountDocument } from "@/src/services/loginService"; +import type { Request } from "express"; +import type { TAccountDocument } from "@/src/services/loginService"; +import { getAccountIdForRequest } from "@/src/services/loginService"; import { addLevelKeys, addRecipes, combineInventoryChanges, getInventory } from "@/src/services/inventoryService"; -import { Alliance, AllianceMember, Guild, GuildAd, GuildMember, TGuildDatabaseDocument } from "@/src/models/guildModel"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { - GuildPermission, +import type { TGuildDatabaseDocument } from "@/src/models/guildModel"; +import { Alliance, AllianceMember, Guild, GuildAd, GuildMember } from "@/src/models/guildModel"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { IAllianceClient, IAllianceDatabase, IAllianceMemberClient, @@ -20,20 +21,22 @@ import { IGuildVault, ITechProjectDatabase } from "@/src/types/guildTypes"; +import { GuildPermission } from "@/src/types/guildTypes"; import { toMongoDate, toOid, toOid2 } from "@/src/helpers/inventoryHelpers"; -import { Types } from "mongoose"; -import { ExportDojoRecipes, ExportResources, IDojoBuild, IDojoResearch } from "warframe-public-export-plus"; +import type { Types } from "mongoose"; +import type { IDojoBuild, IDojoResearch } from "warframe-public-export-plus"; +import { ExportDojoRecipes, ExportResources } from "warframe-public-export-plus"; import { logger } from "@/src/utils/logger"; import { config } from "@/src/services/configService"; import { getRandomInt } from "@/src/services/rngService"; import { Inbox } from "@/src/models/inboxModel"; -import { IFusionTreasure } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IFusionTreasure } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; import { parallelForeach } from "@/src/utils/async-utils"; import allDecoRecipes from "@/static/fixed_responses/allDecoRecipes.json"; import { createMessage } from "@/src/services/inboxService"; import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "@/src/services/friendService"; -import { ITypeCount } from "@/src/types/commonTypes"; +import type { ITypeCount } from "@/src/types/commonTypes"; export const getGuildForRequest = async (req: Request): Promise => { const accountId = await getAccountIdForRequest(req); diff --git a/src/services/importService.ts b/src/services/importService.ts index 31d4c583..493f8735 100644 --- a/src/services/importService.ts +++ b/src/services/importService.ts @@ -1,12 +1,11 @@ import { Types } from "mongoose"; -import { +import type { IItemConfig, IOperatorConfigClient, IOperatorConfigDatabase } from "@/src/types/inventoryTypes/commonInventoryTypes"; -import { IMongoDate } from "@/src/types/commonTypes"; -import { - equipmentKeys, +import type { IMongoDate } from "@/src/types/commonTypes"; +import type { IDialogueClient, IDialogueDatabase, IDialogueHistoryClient, @@ -26,15 +25,16 @@ import { IWeaponSkinClient, IWeaponSkinDatabase } from "@/src/types/inventoryTypes/inventoryTypes"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { +import { equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { ILoadoutConfigClient, ILoadoutConfigDatabase, ILoadoutDatabase, ILoadOutPresets } from "@/src/types/saveLoadoutTypes"; import { slotNames } from "@/src/types/purchaseTypes"; -import { +import type { ICrewShipMemberClient, ICrewShipMemberDatabase, ICrewShipMembersClient, @@ -50,7 +50,7 @@ import { IKubrowPetDetailsClient, IKubrowPetDetailsDatabase } from "@/src/types/equipmentTypes"; -import { +import type { IApartmentClient, IApartmentDatabase, ICustomizationInfoClient, diff --git a/src/services/inboxService.ts b/src/services/inboxService.ts index ce8bddbb..f503fdd0 100644 --- a/src/services/inboxService.ts +++ b/src/services/inboxService.ts @@ -1,7 +1,9 @@ -import { IMessageDatabase, Inbox } from "@/src/models/inboxModel"; +import type { IMessageDatabase } from "@/src/models/inboxModel"; +import { Inbox } from "@/src/models/inboxModel"; import { getAccountForRequest } from "@/src/services/loginService"; -import { HydratedDocument, Types } from "mongoose"; -import { Request } from "express"; +import type { HydratedDocument } from "mongoose"; +import { Types } from "mongoose"; +import type { Request } from "express"; import { unixTimesInMs } from "@/src/constants/timeConstants"; import { config } from "@/src/services/configService"; diff --git a/src/services/infestedFoundryService.ts b/src/services/infestedFoundryService.ts index bfef29ab..66177e25 100644 --- a/src/services/infestedFoundryService.ts +++ b/src/services/infestedFoundryService.ts @@ -1,12 +1,12 @@ import { ExportRecipes } from "warframe-public-export-plus"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { IAccountCheats, IInfestedFoundryClient, IInfestedFoundryDatabase } from "@/src/types/inventoryTypes/inventoryTypes"; import { addRecipes } from "@/src/services/inventoryService"; -import { ITypeCount } from "@/src/types/commonTypes"; +import type { ITypeCount } from "@/src/types/commonTypes"; export const addInfestedFoundryXP = (infestedFoundry: IInfestedFoundryDatabase, delta: number): ITypeCount[] => { const recipeChanges: ITypeCount[] = []; diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index 588edf32..9069e9d6 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -1,14 +1,15 @@ -import { Inventory, TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; import { config } from "@/src/services/configService"; import { Types } from "mongoose"; -import { SlotNames, IInventoryChanges, IBinChanges, slotNames, IAffiliationMods } from "@/src/types/purchaseTypes"; -import { +import type { SlotNames, IInventoryChanges, IBinChanges, IAffiliationMods } from "@/src/types/purchaseTypes"; +import { slotNames } from "@/src/types/purchaseTypes"; +import type { IChallengeProgress, IMiscItem, IMission, IRawUpgrade, ISeasonChallenge, - InventorySlot, IWeaponSkinClient, TEquipmentKey, IFusionTreasure, @@ -25,14 +26,15 @@ import { INemesisWeaponTargetFingerprint, INemesisPetTargetFingerprint, IDialogueDatabase, - IKubrowPetPrintClient, - equipmentKeys + IKubrowPetPrintClient } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IGenericUpdate, IUpdateNodeIntrosResponse } from "@/src/types/genericUpdate"; -import { IKeyChainRequest, IMissionInventoryUpdateRequest } from "@/src/types/requestTypes"; +import { InventorySlot, equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IGenericUpdate, IUpdateNodeIntrosResponse } from "@/src/types/genericUpdate"; +import type { IKeyChainRequest, IMissionInventoryUpdateRequest } from "@/src/types/requestTypes"; import { logger } from "@/src/utils/logger"; import { convertInboxMessage, fromStoreItem, getKeyChainItems } from "@/src/services/itemDataService"; -import { IFlavourItem, IItemConfig } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { IFlavourItem, IItemConfig } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { IDefaultUpgrade, IPowersuit, ISentinel, TStandingLimitBin } from "warframe-public-export-plus"; import { ExportArcanes, ExportBoosters, @@ -54,13 +56,10 @@ import { ExportSyndicates, ExportUpgrades, ExportWarframes, - ExportWeapons, - IDefaultUpgrade, - IPowersuit, - ISentinel, - TStandingLimitBin + ExportWeapons } from "warframe-public-export-plus"; import { createShip } from "@/src/services/shipService"; +import type { TTraitsPool } from "@/src/helpers/inventoryHelpers"; import { catbrowDetails, fromDbOid, @@ -69,8 +68,7 @@ import { kubrowDetails, kubrowFurPatternsWeights, kubrowWeights, - toOid, - TTraitsPool + toOid } from "@/src/helpers/inventoryHelpers"; import { addQuestKey, completeQuest } from "@/src/services/questService"; import { handleBundleAcqusition } from "@/src/services/purchaseService"; @@ -82,23 +80,24 @@ import { getRandomWeightedReward, SRng } from "@/src/services/rngService"; -import { createMessage, IMessageCreationTemplate } from "@/src/services/inboxService"; +import type { IMessageCreationTemplate } from "@/src/services/inboxService"; +import { createMessage } from "@/src/services/inboxService"; import { getMaxStanding, getMinStanding } from "@/src/helpers/syndicateStandingHelper"; import { getNightwaveSyndicateTag, getWorldState } from "@/src/services/worldStateService"; -import { ICalendarSeason } from "@/src/types/worldStateTypes"; -import { generateNemesisProfile, INemesisProfile } from "@/src/helpers/nemesisHelpers"; -import { TAccountDocument } from "@/src/services/loginService"; +import type { ICalendarSeason } from "@/src/types/worldStateTypes"; +import type { INemesisProfile } from "@/src/helpers/nemesisHelpers"; +import { generateNemesisProfile } from "@/src/helpers/nemesisHelpers"; +import type { TAccountDocument } from "@/src/services/loginService"; import { unixTimesInMs } from "@/src/constants/timeConstants"; import { addString } from "@/src/helpers/stringHelpers"; -import { - EquipmentFeatures, +import type { IEquipmentClient, IEquipmentDatabase, IKubrowPetDetailsDatabase, - ITraits, - Status + ITraits } from "@/src/types/equipmentTypes"; -import { ITypeCount } from "@/src/types/commonTypes"; +import { EquipmentFeatures, Status } from "@/src/types/equipmentTypes"; +import type { ITypeCount } from "@/src/types/commonTypes"; export const createInventory = async ( accountOwnerId: Types.ObjectId, diff --git a/src/services/itemDataService.ts b/src/services/itemDataService.ts index 96d80c1a..ccb0175c 100644 --- a/src/services/itemDataService.ts +++ b/src/services/itemDataService.ts @@ -1,4 +1,12 @@ -import { IKeyChainRequest } from "@/src/types/requestTypes"; +import type { IKeyChainRequest } from "@/src/types/requestTypes"; +import type { + IDefaultUpgrade, + IInboxMessage, + IKey, + IMissionReward, + IRecipe, + TReward +} from "warframe-public-export-plus"; import { dict_de, dict_en, @@ -26,15 +34,9 @@ import { ExportResources, ExportSentinels, ExportWarframes, - ExportWeapons, - IDefaultUpgrade, - IInboxMessage, - IKey, - IMissionReward, - IRecipe, - TReward + ExportWeapons } from "warframe-public-export-plus"; -import { IMessage } from "@/src/models/inboxModel"; +import type { IMessage } from "@/src/models/inboxModel"; import { logger } from "@/src/utils/logger"; export type WeaponTypeInternal = diff --git a/src/services/leaderboardService.ts b/src/services/leaderboardService.ts index ff22f0c9..17507597 100644 --- a/src/services/leaderboardService.ts +++ b/src/services/leaderboardService.ts @@ -1,6 +1,7 @@ import { Guild } from "@/src/models/guildModel"; -import { Leaderboard, TLeaderboardEntryDocument } from "@/src/models/leaderboardModel"; -import { ILeaderboardEntryClient } from "@/src/types/leaderboardTypes"; +import type { TLeaderboardEntryDocument } from "@/src/models/leaderboardModel"; +import { Leaderboard } from "@/src/models/leaderboardModel"; +import type { ILeaderboardEntryClient } from "@/src/types/leaderboardTypes"; import { handleGuildGoalProgress } from "@/src/services/guildService"; import { getWorldState } from "@/src/services/worldStateService"; import { Types } from "mongoose"; diff --git a/src/services/loadoutService.ts b/src/services/loadoutService.ts index 265a8150..49f86149 100644 --- a/src/services/loadoutService.ts +++ b/src/services/loadoutService.ts @@ -1,4 +1,5 @@ -import { Loadout, TLoadoutDatabaseDocument } from "@/src/models/inventoryModels/loadoutModel"; +import type { TLoadoutDatabaseDocument } from "@/src/models/inventoryModels/loadoutModel"; +import { Loadout } from "@/src/models/inventoryModels/loadoutModel"; export const getLoadout = async (accountId: string): Promise => { const loadout = await Loadout.findOne({ loadoutOwnerId: accountId }); diff --git a/src/services/loginRewardService.ts b/src/services/loginRewardService.ts index 548ba1bb..27e3e368 100644 --- a/src/services/loginRewardService.ts +++ b/src/services/loginRewardService.ts @@ -1,8 +1,8 @@ import randomRewards from "@/static/fixed_responses/loginRewards/randomRewards.json"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { TAccountDocument } from "@/src/services/loginService"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { TAccountDocument } from "@/src/services/loginService"; import { mixSeeds, SRng } from "@/src/services/rngService"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; import { addBooster, updateCurrency } from "@/src/services/inventoryService"; import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; import { diff --git a/src/services/loginService.ts b/src/services/loginService.ts index e929fce3..c41ac4e7 100644 --- a/src/services/loginService.ts +++ b/src/services/loginService.ts @@ -1,11 +1,11 @@ import { Account } from "@/src/models/loginModel"; import { createInventory } from "@/src/services/inventoryService"; -import { IDatabaseAccountJson, IDatabaseAccountRequiredFields } from "@/src/types/loginTypes"; +import type { IDatabaseAccountJson, IDatabaseAccountRequiredFields } from "@/src/types/loginTypes"; import { createShip } from "@/src/services/shipService"; -import { Document, Types } from "mongoose"; +import type { Document, Types } from "mongoose"; import { Loadout } from "@/src/models/inventoryModels/loadoutModel"; import { PersonalRooms } from "@/src/models/personalRoomsModel"; -import { Request } from "express"; +import type { Request } from "express"; import { config } from "@/src/services/configService"; import { createStats } from "@/src/services/statsService"; import crc32 from "crc-32"; diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index 6464f4e7..f4158eae 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -1,17 +1,17 @@ +import type { IMissionReward as IMissionRewardExternal, IRegion, IReward } from "warframe-public-export-plus"; import { ExportEnemies, ExportFusionBundles, ExportRegions, ExportRelics, - ExportRewards, - IMissionReward as IMissionRewardExternal, - IRegion, - IReward + ExportRewards } from "warframe-public-export-plus"; -import { IMissionInventoryUpdateRequest, IRewardInfo } from "@/src/types/requestTypes"; +import type { IMissionInventoryUpdateRequest, IRewardInfo } from "@/src/types/requestTypes"; import { logger } from "@/src/utils/logger"; -import { IRngResult, SRng, generateRewardSeed, getRandomElement, getRandomReward } from "@/src/services/rngService"; -import { equipmentKeys, IMission, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IRngResult } from "@/src/services/rngService"; +import { SRng, generateRewardSeed, getRandomElement, getRandomReward } from "@/src/services/rngService"; +import type { IMission, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import { equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; import { addBooster, addCalendarProgress, @@ -44,14 +44,15 @@ import { } from "@/src/services/inventoryService"; import { updateQuestKey } from "@/src/services/questService"; import { Types } from "mongoose"; -import { IAffiliationMods, IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IAffiliationMods, IInventoryChanges } from "@/src/types/purchaseTypes"; import { fromStoreItem, getLevelKeyRewards, isStoreItem, toStoreItem } from "@/src/services/itemDataService"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; import { getEntriesUnsafe } from "@/src/utils/ts-utils"; import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import { IMissionCredits, IMissionReward } from "@/src/types/missionTypes"; +import type { IMissionCredits, IMissionReward } from "@/src/types/missionTypes"; import { crackRelic } from "@/src/helpers/relicHelper"; -import { createMessage, IMessageCreationTemplate } from "@/src/services/inboxService"; +import type { IMessageCreationTemplate } from "@/src/services/inboxService"; +import { createMessage } from "@/src/services/inboxService"; import kuriaMessage50 from "@/static/fixed_responses/kuriaMessages/fiftyPercent.json"; import kuriaMessage75 from "@/static/fixed_responses/kuriaMessages/seventyFivePercent.json"; import kuriaMessage100 from "@/static/fixed_responses/kuriaMessages/oneHundredPercent.json"; @@ -76,11 +77,11 @@ import { } from "@/src/services/worldStateService"; import { config } from "@/src/services/configService"; import libraryDailyTasks from "@/static/fixed_responses/libraryDailyTasks.json"; -import { IGoal, ISyndicateMissionInfo } from "@/src/types/worldStateTypes"; +import type { IGoal, ISyndicateMissionInfo } from "@/src/types/worldStateTypes"; import { fromOid } from "@/src/helpers/inventoryHelpers"; -import { TAccountDocument } from "@/src/services/loginService"; -import { ITypeCount } from "@/src/types/commonTypes"; -import { IEquipmentClient } from "@/src/types/equipmentTypes"; +import type { TAccountDocument } from "@/src/services/loginService"; +import type { ITypeCount } from "@/src/types/commonTypes"; +import type { IEquipmentClient } from "@/src/types/equipmentTypes"; import { Guild } from "@/src/models/guildModel"; import { handleGuildGoalProgress } from "@/src/services/guildService"; import { importLoadOutConfig } from "@/src/services/importService"; diff --git a/src/services/personalRoomsService.ts b/src/services/personalRoomsService.ts index 2ce19289..55c9c23f 100644 --- a/src/services/personalRoomsService.ts +++ b/src/services/personalRoomsService.ts @@ -1,6 +1,6 @@ import { PersonalRooms } from "@/src/models/personalRoomsModel"; import { addItem, getInventory } from "@/src/services/inventoryService"; -import { IGardeningDatabase, TPersonalRoomsDatabaseDocument } from "@/src/types/personalRoomsTypes"; +import type { IGardeningDatabase, TPersonalRoomsDatabaseDocument } from "@/src/types/personalRoomsTypes"; import { getRandomElement } from "@/src/services/rngService"; export const getPersonalRooms = async ( diff --git a/src/services/purchaseService.ts b/src/services/purchaseService.ts index 5c850eb9..ec8680fb 100644 --- a/src/services/purchaseService.ts +++ b/src/services/purchaseService.ts @@ -10,16 +10,17 @@ import { } from "@/src/services/inventoryService"; import { getRandomReward, getRandomWeightedRewardUc } from "@/src/services/rngService"; import { applyStandingToVendorManifest, getVendorManifestByOid } from "@/src/services/serversideVendorsService"; -import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; -import { +import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IPurchaseRequest, IPurchaseResponse, IInventoryChanges, - PurchaseSource, IPurchaseParams } from "@/src/types/purchaseTypes"; +import { PurchaseSource } from "@/src/types/purchaseTypes"; import { logger } from "@/src/utils/logger"; import { getWorldState } from "@/src/services/worldStateService"; +import type { TRarity } from "warframe-public-export-plus"; import { ExportBoosterPacks, ExportBoosters, @@ -28,10 +29,9 @@ import { ExportMisc, ExportResources, ExportSyndicates, - ExportVendors, - TRarity + ExportVendors } from "warframe-public-export-plus"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; import { fromStoreItem, toStoreItem } from "@/src/services/itemDataService"; import { DailyDeal } from "@/src/models/worldStateModel"; import { fromMongoDate, toMongoDate } from "@/src/helpers/inventoryHelpers"; diff --git a/src/services/questService.ts b/src/services/questService.ts index c34cae6b..f1f05060 100644 --- a/src/services/questService.ts +++ b/src/services/questService.ts @@ -1,17 +1,17 @@ -import { IKeyChainRequest } from "@/src/types/requestTypes"; +import type { IKeyChainRequest } from "@/src/types/requestTypes"; import { isEmptyObject } from "@/src/helpers/general"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; import { createMessage } from "@/src/services/inboxService"; import { addItem, addItems, addKeyChainItems, setupKahlSyndicate } from "@/src/services/inventoryService"; import { fromStoreItem, getKeyChainMessage, getLevelKeyRewards } from "@/src/services/itemDataService"; -import { IQuestKeyClient, IQuestKeyDatabase, IQuestStage } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IQuestKeyClient, IQuestKeyDatabase, IQuestStage } from "@/src/types/inventoryTypes/inventoryTypes"; import { logger } from "@/src/utils/logger"; -import { Types } from "mongoose"; +import type { Types } from "mongoose"; import { ExportKeys } from "warframe-public-export-plus"; import { addFixedLevelRewards } from "@/src/services/missionInventoryUpdateService"; -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; import questCompletionItems from "@/static/fixed_responses/questCompletionRewards.json"; -import { ITypeCount } from "@/src/types/commonTypes"; +import type { ITypeCount } from "@/src/types/commonTypes"; export interface IUpdateQuestRequest { QuestKeys: Omit[]; diff --git a/src/services/rngService.ts b/src/services/rngService.ts index 876d7584..c5791a0d 100644 --- a/src/services/rngService.ts +++ b/src/services/rngService.ts @@ -1,4 +1,4 @@ -import { TRarity } from "warframe-public-export-plus"; +import type { TRarity } from "warframe-public-export-plus"; export interface IRngResult { type: string; diff --git a/src/services/saveLoadoutService.ts b/src/services/saveLoadoutService.ts index da9e7f43..c55aed6b 100644 --- a/src/services/saveLoadoutService.ts +++ b/src/services/saveLoadoutService.ts @@ -1,4 +1,4 @@ -import { +import type { IItemEntry, ILoadoutClient, ILoadoutEntry, @@ -7,12 +7,13 @@ import { } from "@/src/types/saveLoadoutTypes"; import { Loadout } from "@/src/models/inventoryModels/loadoutModel"; import { getInventory } from "@/src/services/inventoryService"; -import { IOid } from "@/src/types/commonTypes"; +import type { IOid } from "@/src/types/commonTypes"; import { Types } from "mongoose"; import { isEmptyObject } from "@/src/helpers/general"; import { logger } from "@/src/utils/logger"; -import { equipmentKeys, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IItemConfig } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import { equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IItemConfig } from "@/src/types/inventoryTypes/commonInventoryTypes"; import { importCrewShipMembers, importCrewShipWeapon, importLoadOutConfig } from "@/src/services/importService"; //TODO: setup default items on account creation or like originally in giveStartingItems.php diff --git a/src/services/serversideVendorsService.ts b/src/services/serversideVendorsService.ts index 50232776..ad641dc9 100644 --- a/src/services/serversideVendorsService.ts +++ b/src/services/serversideVendorsService.ts @@ -1,11 +1,12 @@ import { unixTimesInMs } from "@/src/constants/timeConstants"; import { args } from "@/src/helpers/commandLineArguments"; import { catBreadHash } from "@/src/helpers/stringHelpers"; -import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; import { mixSeeds, SRng } from "@/src/services/rngService"; -import { IItemManifest, IVendorInfo, IVendorManifest } from "@/src/types/vendorTypes"; +import type { IItemManifest, IVendorInfo, IVendorManifest } from "@/src/types/vendorTypes"; import { logger } from "@/src/utils/logger"; -import { ExportVendors, IRange, IVendor, IVendorOffer } from "warframe-public-export-plus"; +import type { IRange, IVendor, IVendorOffer } from "warframe-public-export-plus"; +import { ExportVendors } from "warframe-public-export-plus"; import { config } from "@/src/services/configService"; interface IGeneratableVendorInfo extends Omit { diff --git a/src/services/shipCustomizationsService.ts b/src/services/shipCustomizationsService.ts index 1fdcf7d5..12ede5e6 100644 --- a/src/services/shipCustomizationsService.ts +++ b/src/services/shipCustomizationsService.ts @@ -1,6 +1,6 @@ import { getPersonalRooms } from "@/src/services/personalRoomsService"; import { getShip } from "@/src/services/shipService"; -import { +import type { IResetShipDecorationsRequest, IResetShipDecorationsResponse, ISetPlacedDecoInfoRequest, diff --git a/src/services/shipService.ts b/src/services/shipService.ts index 7552fb97..6c8ad60e 100644 --- a/src/services/shipService.ts +++ b/src/services/shipService.ts @@ -1,5 +1,6 @@ -import { Ship, TShipDatabaseDocument } from "@/src/models/shipModel"; -import { Types } from "mongoose"; +import type { TShipDatabaseDocument } from "@/src/models/shipModel"; +import { Ship } from "@/src/models/shipModel"; +import type { Types } from "mongoose"; export const createShip = async ( accountOwnerId: Types.ObjectId, diff --git a/src/services/statsService.ts b/src/services/statsService.ts index d7dbc40c..abf5d25f 100644 --- a/src/services/statsService.ts +++ b/src/services/statsService.ts @@ -1,5 +1,6 @@ -import { Stats, TStatsDatabaseDocument } from "@/src/models/statsModel"; -import { +import type { TStatsDatabaseDocument } from "@/src/models/statsModel"; +import { Stats } from "@/src/models/statsModel"; +import type { IStatsAdd, IStatsMax, IStatsSet, diff --git a/src/services/webService.ts b/src/services/webService.ts index e8162663..af1e49bf 100644 --- a/src/services/webService.ts +++ b/src/services/webService.ts @@ -4,7 +4,7 @@ import fs from "node:fs"; import { config } from "@/src/services/configService"; import { logger } from "@/src/utils/logger"; import { app } from "@/src/app"; -import { AddressInfo } from "node:net"; +import type { AddressInfo } from "node:net"; import { Agent, WebSocket as UnidiciWebSocket } from "undici"; import { startWsServer, startWssServer, stopWsServers } from "@/src/services/wsService"; diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts index 8a0c8961..d08c9c9b 100644 --- a/src/services/worldStateService.ts +++ b/src/services/worldStateService.ts @@ -13,8 +13,9 @@ import { buildConfig } from "@/src/services/buildConfigService"; import { unixTimesInMs } from "@/src/constants/timeConstants"; import { config } from "@/src/services/configService"; import { getRandomElement, getRandomInt, sequentiallyUniqueRandomElement, SRng } from "@/src/services/rngService"; -import { eMissionType, ExportRegions, ExportSyndicates, IMissionReward, IRegion } from "warframe-public-export-plus"; -import { +import type { IMissionReward, IRegion } from "warframe-public-export-plus"; +import { eMissionType, ExportRegions, ExportSyndicates } from "warframe-public-export-plus"; +import type { ICalendarDay, ICalendarEvent, ICalendarSeason, diff --git a/src/services/wsService.ts b/src/services/wsService.ts index e55293cd..930ee84a 100644 --- a/src/services/wsService.ts +++ b/src/services/wsService.ts @@ -1,10 +1,10 @@ -import http from "http"; -import https from "https"; +import type http from "http"; +import type https from "https"; import ws from "ws"; import { Account } from "@/src/models/loginModel"; import { createAccount, createNonce, getUsernameFromEmail, isCorrectPassword } from "@/src/services/loginService"; -import { IDatabaseAccountJson } from "@/src/types/loginTypes"; -import { HydratedDocument } from "mongoose"; +import type { IDatabaseAccountJson } from "@/src/types/loginTypes"; +import type { HydratedDocument } from "mongoose"; import { logError } from "@/src/utils/logger"; let wsServer: ws.Server | undefined; diff --git a/src/types/equipmentTypes.ts b/src/types/equipmentTypes.ts index e937019c..3ee5c42c 100644 --- a/src/types/equipmentTypes.ts +++ b/src/types/equipmentTypes.ts @@ -1,6 +1,6 @@ -import { Types } from "mongoose"; -import { IMongoDate, IOid, IOidWithLegacySupport } from "@/src/types/commonTypes"; -import { +import type { Types } from "mongoose"; +import type { IMongoDate, IOid, IOidWithLegacySupport } from "@/src/types/commonTypes"; +import type { ICrewShipCustomization, IFlavourItem, IItemConfig, diff --git a/src/types/friendTypes.ts b/src/types/friendTypes.ts index 0318c0ae..666293ce 100644 --- a/src/types/friendTypes.ts +++ b/src/types/friendTypes.ts @@ -1,5 +1,5 @@ -import { Types } from "mongoose"; -import { IMongoDate, IOidWithLegacySupport } from "@/src/types/commonTypes"; +import type { Types } from "mongoose"; +import type { IMongoDate, IOidWithLegacySupport } from "@/src/types/commonTypes"; export interface IFriendInfo { _id: IOidWithLegacySupport; diff --git a/src/types/genericUpdate.ts b/src/types/genericUpdate.ts index e51d41bc..006de5f5 100644 --- a/src/types/genericUpdate.ts +++ b/src/types/genericUpdate.ts @@ -1,4 +1,4 @@ -import { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "@/src/types/purchaseTypes"; export interface IGenericUpdate { NodeIntrosCompleted: string | string[]; diff --git a/src/types/guildTypes.ts b/src/types/guildTypes.ts index 791099c3..e392e697 100644 --- a/src/types/guildTypes.ts +++ b/src/types/guildTypes.ts @@ -1,13 +1,13 @@ -import { Types } from "mongoose"; -import { IOid, IMongoDate, IOidWithLegacySupport, ITypeCount } from "@/src/types/commonTypes"; -import { +import type { Types } from "mongoose"; +import type { IOid, IMongoDate, IOidWithLegacySupport, ITypeCount } from "@/src/types/commonTypes"; +import type { IFusionTreasure, IMiscItem, IGoalProgressDatabase, IGoalProgressClient } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IPictureFrameInfo } from "@/src/types/personalRoomsTypes"; -import { IFriendInfo } from "@/src/types/friendTypes"; +import type { IPictureFrameInfo } from "@/src/types/personalRoomsTypes"; +import type { IFriendInfo } from "@/src/types/friendTypes"; export interface IGuildClient { _id: IOidWithLegacySupport; diff --git a/src/types/inventoryTypes/commonInventoryTypes.ts b/src/types/inventoryTypes/commonInventoryTypes.ts index 3e40d104..0f72ecf2 100644 --- a/src/types/inventoryTypes/commonInventoryTypes.ts +++ b/src/types/inventoryTypes/commonInventoryTypes.ts @@ -1,5 +1,5 @@ -import { IOid } from "@/src/types/commonTypes"; -import { Types } from "mongoose"; +import type { IOid } from "@/src/types/commonTypes"; +import type { Types } from "mongoose"; export interface IPolarity { Slot: number; diff --git a/src/types/inventoryTypes/inventoryTypes.ts b/src/types/inventoryTypes/inventoryTypes.ts index b348576b..33a0bfa8 100644 --- a/src/types/inventoryTypes/inventoryTypes.ts +++ b/src/types/inventoryTypes/inventoryTypes.ts @@ -1,6 +1,6 @@ -import { Types } from "mongoose"; -import { IOid, IMongoDate, IOidWithLegacySupport, ITypeCount } from "@/src/types/commonTypes"; -import { +import type { Types } from "mongoose"; +import type { IOid, IMongoDate, IOidWithLegacySupport, ITypeCount } from "@/src/types/commonTypes"; +import type { IColor, IItemConfig, IOperatorConfigClient, @@ -9,11 +9,11 @@ import { ILotusCustomization, IShipCustomization } from "@/src/types/inventoryTypes/commonInventoryTypes"; -import { IFingerprintStat, RivenFingerprint } from "@/src/helpers/rivenHelper"; -import { IOrbiterClient } from "@/src/types/personalRoomsTypes"; -import { ICountedStoreItem } from "warframe-public-export-plus"; -import { IEquipmentClient, IEquipmentDatabase, ITraits } from "@/src/types/equipmentTypes"; -import { ILoadOutPresets } from "@/src/types/saveLoadoutTypes"; +import type { IFingerprintStat, RivenFingerprint } from "@/src/helpers/rivenHelper"; +import type { IOrbiterClient } from "@/src/types/personalRoomsTypes"; +import type { ICountedStoreItem } from "warframe-public-export-plus"; +import type { IEquipmentClient, IEquipmentDatabase, ITraits } from "@/src/types/equipmentTypes"; +import type { ILoadOutPresets } from "@/src/types/saveLoadoutTypes"; export type InventoryDatabaseEquipment = { [_ in TEquipmentKey]: IEquipmentDatabase[]; diff --git a/src/types/leaderboardTypes.ts b/src/types/leaderboardTypes.ts index 69dbc3d9..4d7fbea2 100644 --- a/src/types/leaderboardTypes.ts +++ b/src/types/leaderboardTypes.ts @@ -1,4 +1,4 @@ -import { Types } from "mongoose"; +import type { Types } from "mongoose"; export interface ILeaderboardEntryDatabase { leaderboard: string; diff --git a/src/types/loginTypes.ts b/src/types/loginTypes.ts index 0f5cea60..2d1b33a1 100644 --- a/src/types/loginTypes.ts +++ b/src/types/loginTypes.ts @@ -1,4 +1,4 @@ -import { Types } from "mongoose"; +import type { Types } from "mongoose"; export interface IAccountAndLoginResponseCommons { DisplayName: string; diff --git a/src/types/missionTypes.ts b/src/types/missionTypes.ts index 3da1fa70..c8e796ec 100644 --- a/src/types/missionTypes.ts +++ b/src/types/missionTypes.ts @@ -1,4 +1,4 @@ -import { IAffiliationMods, IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IAffiliationMods, IInventoryChanges } from "@/src/types/purchaseTypes"; export const inventoryFields = ["RawUpgrades", "MiscItems", "Consumables", "Recipes"] as const; export type IInventoryFieldType = (typeof inventoryFields)[number]; diff --git a/src/types/personalRoomsTypes.ts b/src/types/personalRoomsTypes.ts index 7b0e4425..1e8ea8c0 100644 --- a/src/types/personalRoomsTypes.ts +++ b/src/types/personalRoomsTypes.ts @@ -1,7 +1,7 @@ -import { IColor, IShipAttachments, IShipCustomization } from "@/src/types/inventoryTypes/commonInventoryTypes"; -import { Document, Model, Types } from "mongoose"; -import { ILoadoutClient, ILoadoutConfigClient, ILoadoutConfigDatabase } from "@/src/types/saveLoadoutTypes"; -import { IMongoDate, IOid } from "@/src/types/commonTypes"; +import type { IColor, IShipAttachments, IShipCustomization } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { Document, Model, Types } from "mongoose"; +import type { ILoadoutClient, ILoadoutConfigClient, ILoadoutConfigDatabase } from "@/src/types/saveLoadoutTypes"; +import type { IMongoDate, IOid } from "@/src/types/commonTypes"; export interface IGetShipResponse { ShipOwnerId: string; diff --git a/src/types/purchaseTypes.ts b/src/types/purchaseTypes.ts index a6764a35..c7588010 100644 --- a/src/types/purchaseTypes.ts +++ b/src/types/purchaseTypes.ts @@ -1,6 +1,6 @@ -import { ITypeCount } from "@/src/types/commonTypes"; -import { IEquipmentClient } from "@/src/types/equipmentTypes"; -import { +import type { ITypeCount } from "@/src/types/commonTypes"; +import type { IEquipmentClient } from "@/src/types/equipmentTypes"; +import type { IDroneClient, IInfestedFoundryClient, IMiscItem, diff --git a/src/types/requestTypes.ts b/src/types/requestTypes.ts index b1af8253..26554e61 100644 --- a/src/types/requestTypes.ts +++ b/src/types/requestTypes.ts @@ -1,6 +1,6 @@ -import { IOid, ITypeCount } from "@/src/types/commonTypes"; -import { ArtifactPolarity, IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; -import { +import type { IOid, ITypeCount } from "@/src/types/commonTypes"; +import type { ArtifactPolarity, IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { IBooster, IChallengeProgress, IEvolutionProgress, @@ -23,9 +23,9 @@ import { IKubrowPetEggClient, INemesisClient } from "@/src/types/inventoryTypes/inventoryTypes"; -import { IGroup } from "@/src/types/loginTypes"; -import { ILoadOutPresets } from "@/src/types/saveLoadoutTypes"; -import { IEquipmentClient } from "@/src/types/equipmentTypes"; +import type { IGroup } from "@/src/types/loginTypes"; +import type { ILoadOutPresets } from "@/src/types/saveLoadoutTypes"; +import type { IEquipmentClient } from "@/src/types/equipmentTypes"; export interface IAffiliationChange { Tag: string; diff --git a/src/types/saveLoadoutTypes.ts b/src/types/saveLoadoutTypes.ts index ed21533f..68c51a39 100644 --- a/src/types/saveLoadoutTypes.ts +++ b/src/types/saveLoadoutTypes.ts @@ -1,13 +1,13 @@ -import { IOid } from "@/src/types/commonTypes"; -import { +import type { IOid } from "@/src/types/commonTypes"; +import type { ICrewShipCustomization, IFlavourItem, IItemConfig, ILotusCustomization, IOperatorConfigClient } from "@/src/types/inventoryTypes/commonInventoryTypes"; -import { Types } from "mongoose"; -import { +import type { Types } from "mongoose"; +import type { ICrewShipMembersClient, ICrewShipWeaponClient, IEquipmentSelectionClient, diff --git a/src/types/session.ts b/src/types/session.ts index 65007172..056cc150 100644 --- a/src/types/session.ts +++ b/src/types/session.ts @@ -1,4 +1,4 @@ -import { Types } from "mongoose"; +import type { Types } from "mongoose"; export interface ISession { sessionId: Types.ObjectId; diff --git a/src/types/shipTypes.ts b/src/types/shipTypes.ts index 4b070f65..5649f4f7 100644 --- a/src/types/shipTypes.ts +++ b/src/types/shipTypes.ts @@ -1,5 +1,5 @@ -import { Types } from "mongoose"; -import { IColor, IShipAttachments } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { Types } from "mongoose"; +import type { IColor, IShipAttachments } from "@/src/types/inventoryTypes/commonInventoryTypes"; export interface IShipDatabase { ItemType: string; diff --git a/src/types/statTypes.ts b/src/types/statTypes.ts index 08f2bcf9..52bf45e0 100644 --- a/src/types/statTypes.ts +++ b/src/types/statTypes.ts @@ -1,4 +1,4 @@ -import { Types } from "mongoose"; +import type { Types } from "mongoose"; export interface IStatsClient { CiphersSolved?: number; diff --git a/src/types/vendorTypes.ts b/src/types/vendorTypes.ts index 2b64b5a3..2a74488c 100644 --- a/src/types/vendorTypes.ts +++ b/src/types/vendorTypes.ts @@ -1,4 +1,4 @@ -import { IMongoDate, IOid } from "@/src/types/commonTypes"; +import type { IMongoDate, IOid } from "@/src/types/commonTypes"; export interface IItemPrice { ItemType: string; diff --git a/src/types/worldStateTypes.ts b/src/types/worldStateTypes.ts index 40463345..f1d7d7d2 100644 --- a/src/types/worldStateTypes.ts +++ b/src/types/worldStateTypes.ts @@ -1,5 +1,5 @@ -import { IMissionReward } from "warframe-public-export-plus"; -import { IMongoDate, IOid } from "@/src/types/commonTypes"; +import type { IMissionReward } from "warframe-public-export-plus"; +import type { IMongoDate, IOid } from "@/src/types/commonTypes"; export interface IWorldState { Version: number; // for goals diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 75366808..52644079 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -1,4 +1,5 @@ -import { createLogger, format, transports, Logger, LeveledLogMethod, addColors } from "winston"; +import type { Logger, LeveledLogMethod } from "winston"; +import { createLogger, format, transports, addColors } from "winston"; import "winston-daily-rotate-file"; import { config } from "@/src/services/configService"; import * as util from "util";