From d7a93463c03b4fa5d9a8aafe3d0b0934bb0ab37e Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sun, 24 Aug 2025 21:41:20 -0700 Subject: [PATCH] chore: enforce consistent-type-imports (#2693) Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2693 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- .eslintrc | 1 + .../api/abandonLibraryDailyTaskController.ts | 2 +- .../api/abortDojoComponentController.ts | 2 +- ...abortDojoComponentDestructionController.ts | 2 +- .../api/activateRandomModController.ts | 2 +- src/controllers/api/addFriendController.ts | 4 +- .../api/addFriendImageController.ts | 2 +- .../api/addIgnoredUserController.ts | 4 +- .../api/addPendingFriendController.ts | 4 +- .../api/addToAllianceController.ts | 2 +- src/controllers/api/addToGuildController.ts | 7 +-- src/controllers/api/adoptPetController.ts | 2 +- src/controllers/api/apartmentController.ts | 2 +- src/controllers/api/arcaneCommonController.ts | 4 +- src/controllers/api/archonFusionController.ts | 4 +- .../api/artifactTransmutationController.ts | 7 +-- src/controllers/api/artifactsController.ts | 4 +- .../api/cancelGuildAdvertisementController.ts | 2 +- .../api/changeDojoRootController.ts | 5 +- .../api/changeGuildRankController.ts | 2 +- .../api/checkDailyMissionBonusController.ts | 2 +- .../api/claimCompletedRecipeController.ts | 16 +++--- .../claimJunctionChallengeRewardController.ts | 2 +- .../claimLibraryDailyTaskRewardController.ts | 2 +- .../api/clearDialogueHistoryController.ts | 2 +- .../api/clearNewEpisodeRewardController.ts | 2 +- .../api/completeCalendarEventController.ts | 4 +- .../completeRandomModChallengeController.ts | 8 +-- .../confirmAllianceInvitationController.ts | 2 +- .../api/confirmGuildInvitationController.ts | 4 +- .../api/contributeGuildClassController.ts | 2 +- .../contributeToDojoComponentController.ts | 16 +++--- .../api/contributeToVaultController.ts | 15 ++---- .../api/createAllianceController.ts | 2 +- src/controllers/api/createGuildController.ts | 4 +- src/controllers/api/creditsController.ts | 2 +- src/controllers/api/crewMembersController.ts | 6 +-- .../api/crewShipFusionController.ts | 9 ++-- .../api/crewShipIdentifySalvageController.ts | 13 +++-- ...stomObstacleCourseLeaderboardController.ts | 2 +- .../api/customizeGuildRanksController.ts | 5 +- .../api/declineAllianceInviteController.ts | 2 +- .../api/declineGuildInviteController.ts | 2 +- .../api/deleteSessionController.ts | 2 +- .../api/destroyDojoDecoController.ts | 2 +- .../api/divvyAllianceVaultController.ts | 2 +- .../api/dojoComponentRushController.ts | 10 ++-- src/controllers/api/dojoController.ts | 2 +- src/controllers/api/dronesController.ts | 8 +-- src/controllers/api/endlessXpController.ts | 9 ++-- .../api/entratiLabConquestModeController.ts | 2 +- src/controllers/api/evolveWeaponController.ts | 5 +- src/controllers/api/findSessionsController.ts | 4 +- src/controllers/api/fishmongerController.ts | 4 +- src/controllers/api/focusController.ts | 5 +- .../api/fusionTreasuresController.ts | 4 +- src/controllers/api/gardeningController.ts | 10 ++-- .../api/genericUpdateController.ts | 4 +- src/controllers/api/getAllianceController.ts | 2 +- .../api/getDailyDealStockLevelsController.ts | 2 +- src/controllers/api/getFriendsController.ts | 4 +- .../api/getGuildContributionsController.ts | 4 +- src/controllers/api/getGuildController.ts | 2 +- src/controllers/api/getGuildDojoController.ts | 2 +- .../api/getGuildEventScoreController.ts | 2 +- src/controllers/api/getGuildLogController.ts | 4 +- .../api/getIgnoredUsersController.ts | 4 +- .../api/getNewRewardSeedController.ts | 2 +- .../api/getPastWeeklyChallengesController.ts | 4 +- src/controllers/api/getShipController.ts | 4 +- .../api/getVendorInfoController.ts | 2 +- .../api/getVoidProjectionRewardsController.ts | 4 +- src/controllers/api/giftingController.ts | 7 +-- src/controllers/api/gildWeaponController.ts | 11 +++-- .../giveKeyChainTriggeredItemsController.ts | 4 +- .../giveKeyChainTriggeredMessageController.ts | 4 +- .../api/giveQuestKeyRewardController.ts | 4 +- .../giveShipDecoAndLoreFragmentController.ts | 6 +-- .../api/giveStartingGearController.ts | 4 +- src/controllers/api/guildTechController.ts | 12 +++-- src/controllers/api/hostSessionController.ts | 4 +- src/controllers/api/hubBlessingController.ts | 2 +- src/controllers/api/hubController.ts | 2 +- src/controllers/api/hubInstancesController.ts | 2 +- src/controllers/api/inboxController.ts | 4 +- .../api/infestedFoundryController.ts | 10 ++-- src/controllers/api/inventoryController.ts | 25 +++++----- .../api/inventorySlotsController.ts | 2 +- src/controllers/api/joinSessionController.ts | 2 +- src/controllers/api/loginController.ts | 4 +- src/controllers/api/loginRewardsController.ts | 4 +- .../api/loginRewardsSelectionController.ts | 4 +- src/controllers/api/logoutController.ts | 2 +- .../api/marketRecommendationsController.ts | 2 +- .../marketSearchRecommendationsController.ts | 2 +- src/controllers/api/maturePetController.ts | 2 +- .../api/missionInventoryUpdateController.ts | 6 +-- .../api/modularWeaponCraftingController.ts | 10 ++-- .../api/modularWeaponSaleController.ts | 8 +-- src/controllers/api/nameWeaponController.ts | 4 +- src/controllers/api/nemesisController.ts | 15 +++--- .../api/placeDecoInComponentController.ts | 2 +- .../api/playedParkourTutorialController.ts | 2 +- src/controllers/api/playerSkillsController.ts | 6 +-- .../api/postGuildAdvertisementController.ts | 4 +- .../api/projectionManagerController.ts | 5 +- src/controllers/api/purchaseController.ts | 4 +- src/controllers/api/questControlController.ts | 2 +- ...queueDojoComponentDestructionController.ts | 2 +- .../api/redeemPromoCodeController.ts | 2 +- src/controllers/api/releasePetController.ts | 2 +- src/controllers/api/removeFriendController.ts | 6 +-- .../api/removeFromAllianceController.ts | 2 +- .../api/removeFromGuildController.ts | 2 +- .../api/removeIgnoredUserController.ts | 2 +- src/controllers/api/renamePetController.ts | 4 +- .../api/rerollRandomModController.ts | 7 +-- .../api/resetQuestProgressController.ts | 2 +- .../api/retrievePetFromStasisController.ts | 2 +- src/controllers/api/saveDialogueController.ts | 6 +-- src/controllers/api/saveLoadoutController.ts | 4 +- src/controllers/api/saveSettingsController.ts | 4 +- .../api/saveVaultAutoContributeController.ts | 2 +- src/controllers/api/sellController.ts | 6 +-- .../api/sendMsgToInBoxController.ts | 2 +- .../api/setActiveQuestController.ts | 2 +- .../api/setActiveShipController.ts | 2 +- .../setAllianceGuildPermissionsController.ts | 2 +- .../api/setBootLocationController.ts | 4 +- .../api/setDojoComponentColorsController.ts | 2 +- .../api/setDojoComponentMessageController.ts | 2 +- .../api/setDojoComponentSettingsController.ts | 2 +- .../api/setEquippedInstrumentController.ts | 2 +- .../api/setFriendNoteController.ts | 2 +- src/controllers/api/setGuildMotdController.ts | 5 +- .../api/setHubNpcCustomizationsController.ts | 4 +- .../api/setPlacedDecoInfoController.ts | 4 +- .../api/setShipCustomizationsController.ts | 4 +- .../api/setShipFavouriteLoadoutController.ts | 6 +-- .../api/setShipVignetteController.ts | 4 +- .../api/setSuitInfectionController.ts | 4 +- .../api/setSupportedSyndicateController.ts | 2 +- .../api/setWeaponSkillTreeController.ts | 5 +- .../api/shipDecorationsController.ts | 4 +- .../api/startCollectibleEntryController.ts | 4 +- .../api/startDojoRecipeController.ts | 5 +- .../api/startLibraryDailyTaskController.ts | 2 +- .../startLibraryPersonalTargetController.ts | 2 +- src/controllers/api/startRecipeController.ts | 7 +-- .../api/stepSequencersController.ts | 4 +- src/controllers/api/surveysController.ts | 2 +- .../api/syndicateSacrificeController.ts | 7 +-- .../api/syndicateStandingBonusController.ts | 9 ++-- src/controllers/api/tauntHistoryController.ts | 4 +- src/controllers/api/tradingController.ts | 2 +- .../api/trainingResultController.ts | 6 +-- src/controllers/api/umbraController.ts | 4 +- .../api/unlockShipFeatureController.ts | 4 +- .../api/updateAlignmentController.ts | 4 +- .../api/updateChallengeProgressController.ts | 6 +-- src/controllers/api/updateQuestController.ts | 7 +-- .../api/updateSessionController.ts | 2 +- .../api/updateSongChallengeController.ts | 4 +- src/controllers/api/updateThemeController.ts | 2 +- src/controllers/api/upgradesController.ts | 13 ++--- src/controllers/api/valenceSwapController.ts | 6 +-- src/controllers/api/wishlistController.ts | 2 +- .../custom/abilityOverrideController.ts | 4 +- .../custom/addCurrencyController.ts | 2 +- src/controllers/custom/addItemsController.ts | 2 +- .../addMissingHelminthBlueprintsController.ts | 2 +- .../custom/addMissingMaxRankModsController.ts | 2 +- src/controllers/custom/addXpController.ts | 8 +-- .../custom/changeModularPartsController.ts | 4 +- .../custom/completeAllMissionsController.ts | 4 +- src/controllers/custom/configController.ts | 2 +- .../custom/createAccountController.ts | 2 +- .../custom/createMessageController.ts | 5 +- .../custom/deleteAccountController.ts | 2 +- .../editSuitInvigorationUpgradeController.ts | 2 +- .../custom/getAccountInfoController.ts | 2 +- .../custom/getItemListsController.ts | 6 +-- src/controllers/custom/getNameController.ts | 2 +- src/controllers/custom/importController.ts | 6 +-- .../custom/ircDroppedController.ts | 2 +- .../custom/manageQuestsController.ts | 2 +- .../popArchonCrystalUpgradeController.ts | 2 +- .../pushArchonCrystalUpgradeController.ts | 2 +- .../custom/renameAccountController.ts | 2 +- .../custom/setAccountCheatController.ts | 4 +- .../custom/setBoosterController.ts | 2 +- .../custom/setEvolutionProgressController.ts | 2 +- src/controllers/custom/tunablesController.ts | 2 +- .../custom/unlockAllIntrinsicsController.ts | 2 +- .../custom/updateFingerprintController.ts | 4 +- .../webuiFileChangeDetectedController.ts | 2 +- .../dynamic/aggregateSessionsController.ts | 2 +- .../dynamic/getGuildAdsController.ts | 4 +- .../getProfileViewingDataController.ts | 27 +++++----- .../dynamic/worldStateController.ts | 2 +- .../pay/getSkuCatalogController.ts | 2 +- src/controllers/pay/steamPacksController.ts | 2 +- .../stats/leaderboardController.ts | 2 +- src/controllers/stats/uploadController.ts | 4 +- src/controllers/stats/viewController.ts | 4 +- src/helpers/customHelpers/customHelpers.ts | 4 +- src/helpers/inventoryHelpers.ts | 6 +-- src/helpers/modularWeaponHelper.ts | 2 +- src/helpers/nemesisHelpers.ts | 6 +-- src/helpers/purchaseHelpers.ts | 2 +- src/helpers/relicHelper.ts | 12 +++-- src/helpers/rivenHelper.ts | 2 +- src/helpers/syndicateStandingHelper.ts | 2 +- src/managers/sessionManager.ts | 2 +- src/middleware/errorHandler.ts | 2 +- src/middleware/middleware.ts | 2 +- src/models/commonModel.ts | 2 +- src/models/friendModel.ts | 2 +- src/models/guildModel.ts | 11 +++-- src/models/inboxModel.ts | 5 +- src/models/inventoryModels/inventoryModel.ts | 15 +++--- src/models/inventoryModels/loadoutModel.ts | 9 ++-- src/models/leaderboardModel.ts | 5 +- src/models/loginModel.ts | 5 +- src/models/personalRoomsModel.ts | 5 +- src/models/shipModel.ts | 7 +-- src/models/statsModel.ts | 14 +++++- src/models/worldStateModel.ts | 2 +- src/services/friendService.ts | 4 +- src/services/guildService.ts | 25 +++++----- src/services/importService.ts | 16 +++--- src/services/inboxService.ts | 8 +-- src/services/infestedFoundryService.ts | 6 +-- src/services/inventoryService.ts | 49 +++++++++---------- src/services/itemDataService.ts | 20 ++++---- src/services/leaderboardService.ts | 5 +- src/services/loadoutService.ts | 3 +- src/services/loginRewardService.ts | 6 +-- src/services/loginService.ts | 6 +-- src/services/missionInventoryUpdateService.ts | 31 ++++++------ src/services/personalRoomsService.ts | 2 +- src/services/purchaseService.ts | 12 ++--- src/services/questService.ts | 12 ++--- src/services/rngService.ts | 2 +- src/services/saveLoadoutService.ts | 9 ++-- src/services/serversideVendorsService.ts | 7 +-- src/services/shipCustomizationsService.ts | 2 +- src/services/shipService.ts | 5 +- src/services/statsService.ts | 5 +- src/services/webService.ts | 2 +- src/services/worldStateService.ts | 5 +- src/services/wsService.ts | 8 +-- src/types/equipmentTypes.ts | 6 +-- src/types/friendTypes.ts | 4 +- src/types/genericUpdate.ts | 2 +- src/types/guildTypes.ts | 10 ++-- .../inventoryTypes/commonInventoryTypes.ts | 4 +- src/types/inventoryTypes/inventoryTypes.ts | 16 +++--- src/types/leaderboardTypes.ts | 2 +- src/types/loginTypes.ts | 2 +- src/types/missionTypes.ts | 2 +- src/types/personalRoomsTypes.ts | 8 +-- src/types/purchaseTypes.ts | 6 +-- src/types/requestTypes.ts | 12 ++--- src/types/saveLoadoutTypes.ts | 8 +-- src/types/session.ts | 2 +- src/types/shipTypes.ts | 4 +- src/types/statTypes.ts | 2 +- src/types/vendorTypes.ts | 2 +- src/types/worldStateTypes.ts | 4 +- src/utils/logger.ts | 3 +- 271 files changed, 697 insertions(+), 633 deletions(-) diff --git a/.eslintrc b/.eslintrc index aa1660377..d21f4aa7f 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 ac5156094..d7dbdcddf 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 3fcf770ce..03fe0459d 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 75f08f376..75e2efb4f 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 06d4c4886..f4679f5b4 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 bbb629d92..2637731f0 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 5f224ad82..f8ba7d61b 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 8e8d44413..48bacaebe 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 0ba548f48..30279c2bf 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 36970a222..abf409aed 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 53f0b445a..bb16aa5a7 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 3cd340da1..1c275029c 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 638dd6caa..b857180a0 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 2448140b8..ea6bb2794 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 04c92384c..5b84bb6b7 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 deb05cde6..bcacfb804 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 7bbb68a7c..c25db5d32 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 aa5872019..1a7ccf121 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 1c7cb792c..cd8f050e2 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 28a8113eb..5a0a6bc0d 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 8e457142d..5d67d4b56 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 377680b30..fa93611eb 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 849126cbb..b83fbde4d 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 3d582e468..60bd036a9 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 f24f360a8..4dfc9e932 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 1dd3010a9..dcd8e46c7 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 11aba85c9..e9dbc4e4a 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 0400c2b09..730c6111b 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 8d998e775..4dd206ec0 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 08123a378..02fe51401 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 865eb8689..6bf4014d8 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 6d0016eb3..eaed2d18f 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 e6a334438..d793549a0 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 e3a81a24e..205e67a66 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 6fc5f8e56..ac5d1f94e 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 ecd37fa1b..8bbac3a80 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 a4f2ea2a7..fd5d9087f 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 160c19b72..093d975f1 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 83a9d7cb2..29ac26091 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 de5c42171..731766b0d 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 5ddca7b63..4106ef211 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 2d9f9dd66..c2e3ae36e 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 c2bcd073d..a66900066 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 d4053779f..1662be48b 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 cb95e9300..5e27bd862 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 8847a19f1..4ecdaa027 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 899ed0af3..03770928c 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 9c54b449a..913a21762 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 15d7758f0..393178f8f 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 1be4bd2b9..0a98ed9a7 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 c16595ee9..226cb348d 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 8318f17b8..508878449 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 70d714bb8..152df91d7 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 16fcc69bc..43946fdf6 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 b52572016..e5764aedc 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 27ea78206..0aee216ac 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 4cdb32fd5..b21c8fb24 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 e5f0b5938..2146fb323 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 a4ea7bcd5..b6be06487 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 b67522c54..bd8cfeff0 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 684e9bcc6..2135873ff 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 c17729f70..123a39f64 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 f99b8d1ce..cef53aa80 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 7c5b9412a..b50762351 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 df9950216..a045d2e57 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 037d07be1..035a8c28f 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 b3a6cf22c..e893b42f2 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 9aed91f62..75e4bfeca 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 cee6fe500..3f4b551a0 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 ff04aec2e..5f976ef55 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 15ec92878..a0ffd654a 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 3a09f4ba0..966144315 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 3e714a8df..a54cdcab6 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 b06c449c4..a5b18af45 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 df8e8a807..4cbd602ba 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 3bc41c211..2afc5ec67 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 d74d56bf2..bf64693f9 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 ae9983748..0b8b5c30f 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 6556de934..1ac5afc19 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 f3e372173..177a9b4be 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 52c7a6a20..3ab497408 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 55b59c4f9..410d6680b 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 8475a88bb..41e17a84b 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 b75196564..89a5564c5 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 5f36c998b..a62c79ede 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 a962d7a8d..ddc94b75b 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 1556c2710..729df2e71 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 8a8fce0af..7b937a2ee 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 7dff9fc9b..8bb516ada 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 05329be4b..68fffd931 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 547724c20..a994b860b 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 174c5659b..d0f10f73e 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 bf7328a42..148219217 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 8acfa89e6..fd1058363 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 bc99897bc..1360a7aba 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 1bfb83f66..5c769307c 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 e6a48e708..b2ca85c9f 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 a3b69f0ec..4ba319e5a 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 2ce6c11c9..4f5a1b2e1 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 c3c899bae..e0f45cdc4 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 c63c4776e..2352c56cf 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 fc1ef445c..5c26a3e40 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 a37689f28..242ec24ce 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 d160686f7..02d123e74 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 69b283237..5135c19d8 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 b549bd8fe..c2c2cf76e 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 69175739f..b021366d4 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 0a6e07814..e9e346ea6 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 037b5c27e..15248f179 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 f0e615bc8..edce905ae 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 09e8cc6ff..3faa1ed64 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 24b39c2e9..ccf94f0a7 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 f6dc8accc..3390c7361 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 db5a2ea3d..bad9cca3b 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 73613ce68..20fad8cbe 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 f3fe0c891..6e7155f3a 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 20e7218aa..7c3bea48d 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 9d75a54a5..ecb893fe9 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 eb332f9ce..d02cb2cde 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 5b4043411..48eee78e2 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 c5383e1c5..b8573521a 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 8aba0cfed..42e98dee8 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 5c5f51c5e..9133404e4 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 b19cf2dc3..698cb2d85 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 7cad8c152..5598e88a6 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 7a0204f6e..374bd2d4b 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 9592915a0..3ae4b7a8a 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 ce3caaf89..f4a8f3654 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 dfccd1d7e..5bc20f028 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 ac0692423..a68a43ded 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 92931a54d..2cb08ad3b 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 1286ba25f..f9d8c88ec 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 bb80a815f..f99cbe7c7 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 c12543da4..c13103efb 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 1e09ab286..a0096440c 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 6e199933e..a84efe12c 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 25073023c..a842cb43b 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 286e416be..a0d1d63c4 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 07b646dfe..02d49608a 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 a1d991daf..595afc291 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 84bd0a4b1..511bd968e 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 40ce4af35..4107556cd 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 a750c3ceb..59c587eb2 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 69c959a52..1259140e9 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 ffc440c10..1e373fa69 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 0773f2527..42a7ad675 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 e8b8425b8..3c8bb2ce5 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 7bfa5ff61..ac03f9b6f 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 42f138e58..c91c7bd67 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 3d86c1aca..361e258f0 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 2a593e47b..18e92fe2a 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 cdd640d07..d28719d5a 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 1691aa68d..1e5411c6a 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 a2e489ead..24c494020 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 af6e94f9a..27868e2e1 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 39df6c267..6bf37edaa 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 88529662e..89c8e9fa7 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 4a3ecd1e4..76640b60f 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 2942ad6fb..4ba48f3c1 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 e0547c7ff..58734251a 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 c251094f2..bcf8937bc 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 1bffbdb90..1644f8156 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 e0a10fc8c..c9cb2f2b1 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 ce31d27d2..e3716a189 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 54aab912f..0104e6441 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 0c3976b06..b02c9f8ca 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 cfef23292..3be802b9d 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 e67afb1e6..ce100fadc 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 be14b8a36..347d8c4e2 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 30edd917d..812476fb2 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 4de501fe0..c62ffdf50 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 99cd09ec6..c89fa34c9 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 575fe978a..876b58376 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 ee1fd8f3c..c3c43eaf9 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 0d53135f1..d363e81ee 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 fa1b4a2c0..de1adc5c1 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 bac125085..e74782c2a 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 af67fd2db..5922f7e68 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 abe33315c..f3c0869f8 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 bc624911f..0bebc9792 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 668aebf47..e4038c55c 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 23dd643fa..3d46baffe 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 bc4a94f3e..72a83fbcb 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 b73089f11..70b615506 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 1621defc0..c0af17ca9 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 365fb29cd..886269357 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 d6ef86e0d..b72406827 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 0db365fbb..0dbf4d60c 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 11c28a22a..e850b027e 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 9647d2adf..75d0a71d0 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 b0a1ddbfd..daa8c6233 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 45c7c68b0..80784e0b3 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 535b90ee8..87419fcc4 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 cd48bdcc2..309ef40b7 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 df82d4128..0aab7e387 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 5078b679d..a9144c496 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 a12c8d40c..a205bdf36 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 1dbe8217f..e4684fb7f 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 7ec94f454..ccf404be6 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 556eb91e8..f6b538d5d 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 baf79d581..8495c316a 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 f08857864..ea4c5b890 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 f5550f2b3..cf321b1f4 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 c1c1d2e5f..8089677ea 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 3ff5a848a..3835e9444 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 0f9204069..8732b681b 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 d888b2177..74faaf15c 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 3e00531d0..2849ae55f 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 50eeef97b..6b50e9fe7 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 0685f4570..8a460b41e 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 5a34d3425..8c34e6830 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 7b2be3040..f89e9c700 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 ac478dda0..ec9c939e3 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 ed3978234..b6a112246 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 92b30f6f2..92c72d6cb 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 96fe391c9..e611982bd 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 dd0ad85e1..9c570fd21 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 f253101a6..33d7721bd 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 eb0051442..17c052030 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 27a5f0a75..47b8a7096 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 ca526ac4c..d13c2ef0d 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 5e32be1d7..1bb761dbf 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 a7375e0fc..ceeb20f15 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 a42a7229e..c7331d830 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 f812a8e65..5735014c5 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 ee8df2fe9..d6dd5ad9c 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 af015cc01..53a062283 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 e7a712fee..3fae89c74 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 125dfda10..fd8e24bb0 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 cd7ee1472..d12762027 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 31d4c5832..493f8735a 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 ce8bddbb6..f503fdd09 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 bfef29abe..66177e254 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 588edf325..9069e9d65 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 96d80c1ac..ccb0175cd 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 ff22f0c95..175075970 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 265a8150f..49f86149a 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 548ba1bb0..27e3e368d 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 e929fce38..c41ac4e72 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 6464f4e72..f4158eaea 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 2ce192890..55c9c23fc 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 5c850eb97..ec8680fb4 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 c34cae6b2..f1f050602 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 876d75842..c5791a0d4 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 da9e7f436..c55aed6b1 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 50232776b..ad641dc97 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 1fdcf7d5c..12ede5e65 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 7552fb97f..6c8ad60e7 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 d7dbc40cf..abf5d25fe 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 e81626634..af1e49bf1 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 8a0c89613..d08c9c9bb 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 e55293cd0..930ee84a2 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 e937019cd..3ee5c42c4 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 0318c0ae0..666293ce2 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 e51d41bc1..006de5f5d 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 791099c3d..e392e697d 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 3e40d1045..0f72ecf2c 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 b348576b4..33a0bfa8d 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 69dbc3d9d..4d7fbea29 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 0f5cea60b..2d1b33a1e 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 3da1fa70e..c8e796ec0 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 7b0e44258..1e8ea8c01 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 a6764a35e..c75880108 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 b1af8253d..26554e619 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 ed21533f6..68c51a399 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 650071729..056cc1505 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 4b070f65d..5649f4f76 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 08f2bcf95..52bf45e08 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 2b64b5a3d..2a74488ce 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 404633450..f1d7d7d23 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 75366808d..526440790 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";