forked from OpenWF/SpaceNinjaServer
chore: enforce consistent-type-imports (#2693)
Reviewed-on: OpenWF/SpaceNinjaServer#2693 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
f6b73e58da
commit
d7a93463c0
@ -13,6 +13,7 @@
|
|||||||
"node": true
|
"node": true
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"@typescript-eslint/consistent-type-imports": "error",
|
||||||
"@typescript-eslint/explicit-function-return-type": "error",
|
"@typescript-eslint/explicit-function-return-type": "error",
|
||||||
"@typescript-eslint/restrict-template-expressions": "error",
|
"@typescript-eslint/restrict-template-expressions": "error",
|
||||||
"@typescript-eslint/restrict-plus-operands": "error",
|
"@typescript-eslint/restrict-plus-operands": "error",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const abandonLibraryDailyTaskController: RequestHandler = async (req, res) => {
|
export const abandonLibraryDailyTaskController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import {
|
|||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { GuildPermission } from "@/src/types/guildTypes";
|
import { GuildPermission } from "@/src/types/guildTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const abortDojoComponentController: RequestHandler = async (req, res) => {
|
export const abortDojoComponentController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermissio
|
|||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { GuildPermission } from "@/src/types/guildTypes";
|
import { GuildPermission } from "@/src/types/guildTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const abortDojoComponentDestructionController: RequestHandler = async (req, res) => {
|
export const abortDojoComponentDestructionController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
|||||||
import { addMods, getInventory } from "@/src/services/inventoryService";
|
import { addMods, getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getRandomElement } from "@/src/services/rngService";
|
import { getRandomElement } from "@/src/services/rngService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { ExportUpgrades } from "warframe-public-export-plus";
|
import { ExportUpgrades } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const activateRandomModController: RequestHandler = async (req, res) => {
|
export const activateRandomModController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -3,8 +3,8 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
|||||||
import { Friendship } from "@/src/models/friendModel";
|
import { Friendship } from "@/src/models/friendModel";
|
||||||
import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "@/src/services/friendService";
|
import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "@/src/services/friendService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { IFriendInfo } from "@/src/types/friendTypes";
|
import type { IFriendInfo } from "@/src/types/friendTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const addFriendController: RequestHandler = async (req, res) => {
|
export const addFriendController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
||||||
|
|||||||
@ -2,8 +2,8 @@ import { toOid } from "@/src/helpers/inventoryHelpers";
|
|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { Account, Ignore } from "@/src/models/loginModel";
|
import { Account, Ignore } from "@/src/models/loginModel";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { IFriendInfo } from "@/src/types/friendTypes";
|
import type { IFriendInfo } from "@/src/types/friendTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const addIgnoredUserController: RequestHandler = async (req, res) => {
|
export const addIgnoredUserController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -5,8 +5,8 @@ import { Account } from "@/src/models/loginModel";
|
|||||||
import { addInventoryDataToFriendInfo, areFriendsOfFriends } from "@/src/services/friendService";
|
import { addInventoryDataToFriendInfo, areFriendsOfFriends } from "@/src/services/friendService";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { IFriendInfo } from "@/src/types/friendTypes";
|
import type { IFriendInfo } from "@/src/types/friendTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const addPendingFriendController: RequestHandler = async (req, res) => {
|
export const addPendingFriendController: RequestHandler = async (req, res) => {
|
||||||
const payload = getJSONfromString<IAddPendingFriendRequest>(String(req.body));
|
const payload = getJSONfromString<IAddPendingFriendRequest>(String(req.body));
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { getEffectiveAvatarImageType, getInventory } from "@/src/services/invent
|
|||||||
import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService";
|
import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService";
|
||||||
import { GuildPermission } from "@/src/types/guildTypes";
|
import { GuildPermission } from "@/src/types/guildTypes";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { ExportFlavour } from "warframe-public-export-plus";
|
import { ExportFlavour } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const addToAllianceController: RequestHandler = async (req, res) => {
|
export const addToAllianceController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -6,10 +6,11 @@ import { hasGuildPermission } from "@/src/services/guildService";
|
|||||||
import { createMessage } from "@/src/services/inboxService";
|
import { createMessage } from "@/src/services/inboxService";
|
||||||
import { getEffectiveAvatarImageType, getInventory } from "@/src/services/inventoryService";
|
import { getEffectiveAvatarImageType, getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "@/src/services/loginService";
|
import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "@/src/services/loginService";
|
||||||
import { IOid } from "@/src/types/commonTypes";
|
import type { IOid } from "@/src/types/commonTypes";
|
||||||
import { GuildPermission, IGuildMemberClient } from "@/src/types/guildTypes";
|
import type { IGuildMemberClient } from "@/src/types/guildTypes";
|
||||||
|
import { GuildPermission } from "@/src/types/guildTypes";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { ExportFlavour } from "warframe-public-export-plus";
|
import { ExportFlavour } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const addToGuildController: RequestHandler = async (req, res) => {
|
export const addToGuildController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const adoptPetController: RequestHandler = async (req, res) => {
|
export const adoptPetController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getPersonalRooms } from "@/src/services/personalRoomsService";
|
import { getPersonalRooms } from "@/src/services/personalRoomsService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const apartmentController: RequestHandler = async (req, res) => {
|
export const apartmentController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getInventory, addMods } from "@/src/services/inventoryService";
|
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) => {
|
export const arcaneCommonController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
|
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";
|
import { colorToShard, combineColors, shardToColor } from "@/src/helpers/shardHelper";
|
||||||
|
|
||||||
export const archonFusionController: RequestHandler = async (req, res) => {
|
export const archonFusionController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -3,9 +3,10 @@ import { createVeiledRivenFingerprint, rivenRawToRealWeighted } from "@/src/help
|
|||||||
import { addMiscItems, addMods, getInventory } from "@/src/services/inventoryService";
|
import { addMiscItems, addMods, getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getRandomElement, getRandomWeightedReward, getRandomWeightedRewardUc } from "@/src/services/rngService";
|
import { getRandomElement, getRandomWeightedReward, getRandomWeightedRewardUc } from "@/src/services/rngService";
|
||||||
import { IUpgradeFromClient } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { IUpgradeFromClient } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { ExportBoosterPacks, ExportUpgrades, TRarity } from "warframe-public-export-plus";
|
import type { TRarity } from "warframe-public-export-plus";
|
||||||
|
import { ExportBoosterPacks, ExportUpgrades } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const artifactTransmutationController: RequestHandler = async (req, res) => {
|
export const artifactTransmutationController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { IInventoryClient, IUpgradeClient } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { IInventoryClient, IUpgradeClient } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { addMods, getInventory } from "@/src/services/inventoryService";
|
import { addMods, getInventory } from "@/src/services/inventoryService";
|
||||||
|
|
||||||
export const artifactsController: RequestHandler = async (req, res) => {
|
export const artifactsController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { getGuildForRequestEx, hasGuildPermission } from "@/src/services/guildSe
|
|||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { GuildPermission } from "@/src/types/guildTypes";
|
import { GuildPermission } from "@/src/types/guildTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const cancelGuildAdvertisementController: RequestHandler = async (req, res) => {
|
export const cancelGuildAdvertisementController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
|
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
|
||||||
import { logger } from "@/src/utils/logger";
|
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 { Types } from "mongoose";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { GuildMember } from "@/src/models/guildModel";
|
|||||||
import { getGuildForRequest, hasGuildPermissionEx } from "@/src/services/guildService";
|
import { getGuildForRequest, hasGuildPermissionEx } from "@/src/services/guildService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { GuildPermission } from "@/src/types/guildTypes";
|
import { GuildPermission } from "@/src/types/guildTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const changeGuildRankController: RequestHandler = async (req, res) => {
|
export const changeGuildRankController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { getAccountForRequest } from "@/src/services/loginService";
|
import { getAccountForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const checkDailyMissionBonusController: RequestHandler = async (req, res) => {
|
export const checkDailyMissionBonusController: RequestHandler = async (req, res) => {
|
||||||
const account = await getAccountForRequest(req);
|
const account = await getAccountForRequest(req);
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
//this is a controller for the claimCompletedRecipe route
|
//this is a controller for the claimCompletedRecipe route
|
||||||
//it will claim a recipe for the user
|
//it will claim a recipe for the user
|
||||||
|
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { getRecipe } from "@/src/services/itemDataService";
|
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 { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { getAccountForRequest } from "@/src/services/loginService";
|
import { getAccountForRequest } from "@/src/services/loginService";
|
||||||
import {
|
import {
|
||||||
@ -18,12 +18,14 @@ import {
|
|||||||
addPowerSuit,
|
addPowerSuit,
|
||||||
addEquipment
|
addEquipment
|
||||||
} from "@/src/services/inventoryService";
|
} from "@/src/services/inventoryService";
|
||||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
import { InventorySlot, IPendingRecipeDatabase } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { IPendingRecipeDatabase } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
|
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { toOid2 } from "@/src/helpers/inventoryHelpers";
|
import { toOid2 } from "@/src/helpers/inventoryHelpers";
|
||||||
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
|
import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
|
||||||
import { IRecipe } from "warframe-public-export-plus";
|
import type { IRecipe } from "warframe-public-export-plus";
|
||||||
import { EquipmentFeatures, IEquipmentClient, Status } from "@/src/types/equipmentTypes";
|
import type { IEquipmentClient } from "@/src/types/equipmentTypes";
|
||||||
|
import { EquipmentFeatures, Status } from "@/src/types/equipmentTypes";
|
||||||
|
|
||||||
interface IClaimCompletedRecipeRequest {
|
interface IClaimCompletedRecipeRequest {
|
||||||
RecipeIds: IOid[];
|
RecipeIds: IOid[];
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
|||||||
import { combineInventoryChanges, getInventory } from "@/src/services/inventoryService";
|
import { combineInventoryChanges, getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
|
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { ExportChallenges } from "warframe-public-export-plus";
|
import { ExportChallenges } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const claimJunctionChallengeRewardController: RequestHandler = async (req, res) => {
|
export const claimJunctionChallengeRewardController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { addFusionPoints, getInventory } from "@/src/services/inventoryService";
|
import { addFusionPoints, getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const claimLibraryDailyTaskRewardController: RequestHandler = async (req, res) => {
|
export const claimLibraryDailyTaskRewardController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const clearDialogueHistoryController: RequestHandler = async (req, res) => {
|
export const clearDialogueHistoryController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
// example req.body: {"NewEpisodeReward":true,"crossPlaySetting":"ENABLED"}
|
// example req.body: {"NewEpisodeReward":true,"crossPlaySetting":"ENABLED"}
|
||||||
export const clearNewEpisodeRewardController: RequestHandler = (_req, res) => {
|
export const clearNewEpisodeRewardController: RequestHandler = (_req, res) => {
|
||||||
|
|||||||
@ -2,8 +2,8 @@ import { checkCalendarAutoAdvance, getCalendarProgress, getInventory } from "@/s
|
|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
|
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
|
||||||
import { getWorldState } from "@/src/services/worldStateService";
|
import { getWorldState } from "@/src/services/worldStateService";
|
||||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
// GET request; query parameters: CompletedEventIdx=0&Iteration=4&Version=19&Season=CST_SUMMER
|
// GET request; query parameters: CompletedEventIdx=0&Iteration=4&Version=19&Season=CST_SUMMER
|
||||||
export const completeCalendarEventController: RequestHandler = async (req, res) => {
|
export const completeCalendarEventController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
|
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
|
||||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
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) => {
|
export const completeRandomModChallengeController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel";
|
import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel";
|
||||||
import { getAllianceClient } from "@/src/services/guildService";
|
import { getAllianceClient } from "@/src/services/guildService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const confirmAllianceInvitationController: RequestHandler = async (req, res) => {
|
export const confirmAllianceInvitationController: RequestHandler = async (req, res) => {
|
||||||
// Check requester is a warlord in their guild
|
// Check requester is a warlord in their guild
|
||||||
|
|||||||
@ -11,8 +11,8 @@ import {
|
|||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "@/src/services/loginService";
|
import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "@/src/services/loginService";
|
||||||
import { GuildPermission } from "@/src/types/guildTypes";
|
import { GuildPermission } from "@/src/types/guildTypes";
|
||||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
|
|
||||||
// GET request: A player accepting an invite they got in their inbox.
|
// GET request: A player accepting an invite they got in their inbox.
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { Guild } from "@/src/models/guildModel";
|
|||||||
import { checkClanAscensionHasRequiredContributors } from "@/src/services/guildService";
|
import { checkClanAscensionHasRequiredContributors } from "@/src/services/guildService";
|
||||||
import { addFusionPoints, getInventory } from "@/src/services/inventoryService";
|
import { addFusionPoints, getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
|
|
||||||
export const contributeGuildClassController: RequestHandler = async (req, res) => {
|
export const contributeGuildClassController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { GuildMember, TGuildDatabaseDocument } from "@/src/models/guildModel";
|
import type { TGuildDatabaseDocument } from "@/src/models/guildModel";
|
||||||
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
|
import { GuildMember } from "@/src/models/guildModel";
|
||||||
|
import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
|
||||||
import {
|
import {
|
||||||
addGuildMemberMiscItemContribution,
|
addGuildMemberMiscItemContribution,
|
||||||
getDojoClient,
|
getDojoClient,
|
||||||
@ -11,11 +12,12 @@ import {
|
|||||||
} from "@/src/services/guildService";
|
} from "@/src/services/guildService";
|
||||||
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
|
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { IDojoContributable, IGuildMemberDatabase } from "@/src/types/guildTypes";
|
import type { IDojoContributable, IGuildMemberDatabase } from "@/src/types/guildTypes";
|
||||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { ExportDojoRecipes, IDojoBuild } from "warframe-public-export-plus";
|
import type { IDojoBuild } from "warframe-public-export-plus";
|
||||||
|
import { ExportDojoRecipes } from "warframe-public-export-plus";
|
||||||
|
|
||||||
interface IContributeToDojoComponentRequest {
|
interface IContributeToDojoComponentRequest {
|
||||||
ComponentId: string;
|
ComponentId: string;
|
||||||
|
|||||||
@ -1,10 +1,5 @@
|
|||||||
import {
|
import type { TGuildDatabaseDocument, TGuildMemberDatabaseDocument } from "@/src/models/guildModel";
|
||||||
Alliance,
|
import { Alliance, Guild, GuildMember } from "@/src/models/guildModel";
|
||||||
Guild,
|
|
||||||
GuildMember,
|
|
||||||
TGuildDatabaseDocument,
|
|
||||||
TGuildMemberDatabaseDocument
|
|
||||||
} from "@/src/models/guildModel";
|
|
||||||
import {
|
import {
|
||||||
addGuildMemberMiscItemContribution,
|
addGuildMemberMiscItemContribution,
|
||||||
addGuildMemberShipDecoContribution,
|
addGuildMemberShipDecoContribution,
|
||||||
@ -21,9 +16,9 @@ import {
|
|||||||
updateCurrency
|
updateCurrency
|
||||||
} from "@/src/services/inventoryService";
|
} from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { ITypeCount } from "@/src/types/commonTypes";
|
import type { ITypeCount } from "@/src/types/commonTypes";
|
||||||
import { IFusionTreasure, IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { IFusionTreasure, IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const contributeToVaultController: RequestHandler = async (req, res) => {
|
export const contributeToVaultController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { getAllianceClient } from "@/src/services/guildService";
|
|||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { GuildPermission } from "@/src/types/guildTypes";
|
import { GuildPermission } from "@/src/types/guildTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const createAllianceController: RequestHandler = async (req, res) => {
|
export const createAllianceController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountForRequest } from "@/src/services/loginService";
|
import { getAccountForRequest } from "@/src/services/loginService";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { Guild, GuildMember } from "@/src/models/guildModel";
|
import { Guild, GuildMember } from "@/src/models/guildModel";
|
||||||
import { createUniqueClanName, getGuildClient, giveClanKey } from "@/src/services/guildService";
|
import { createUniqueClanName, getGuildClient, giveClanKey } from "@/src/services/guildService";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
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) => {
|
export const createGuildController: RequestHandler = async (req, res) => {
|
||||||
const account = await getAccountForRequest(req);
|
const account = await getAccountForRequest(req);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
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 { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { ICrewMemberClient } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { ICrewMemberClient } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
|
|
||||||
export const crewMembersController: RequestHandler = async (req, res) => {
|
export const crewMembersController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { addMiscItems, freeUpSlot, getInventory, updateCurrency } from "@/src/services/inventoryService";
|
import { addMiscItems, freeUpSlot, getInventory, updateCurrency } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { IOid } from "@/src/types/commonTypes";
|
import type { IOid } from "@/src/types/commonTypes";
|
||||||
import { ICrewShipComponentFingerprint, InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { ICrewShipComponentFingerprint } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
|
import type { RequestHandler } from "express";
|
||||||
import { ExportCustoms, ExportDojoRecipes } from "warframe-public-export-plus";
|
import { ExportCustoms, ExportDojoRecipes } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const crewShipFusionController: RequestHandler = async (req, res) => {
|
export const crewShipFusionController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -5,14 +5,17 @@ import {
|
|||||||
addEquipment
|
addEquipment
|
||||||
} from "@/src/services/inventoryService";
|
} from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { ICrewShipComponentFingerprint, IInnateDamageFingerprint } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type {
|
||||||
|
ICrewShipComponentFingerprint,
|
||||||
|
IInnateDamageFingerprint
|
||||||
|
} from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { ExportCustoms, ExportRailjackWeapons, ExportUpgrades } from "warframe-public-export-plus";
|
import { ExportCustoms, ExportRailjackWeapons, ExportUpgrades } from "warframe-public-export-plus";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
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 { getRandomInt } from "@/src/services/rngService";
|
||||||
import { IFingerprintStat } from "@/src/helpers/rivenHelper";
|
import type { IFingerprintStat } from "@/src/helpers/rivenHelper";
|
||||||
import { IEquipmentDatabase } from "@/src/types/equipmentTypes";
|
import type { IEquipmentDatabase } from "@/src/types/equipmentTypes";
|
||||||
|
|
||||||
export const crewShipIdentifySalvageController: RequestHandler = async (req, res) => {
|
export const crewShipIdentifySalvageController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { getInventory } from "@/src/services/inventoryService";
|
|||||||
import { getAccountForRequest, getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountForRequest, getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { GuildPermission } from "@/src/types/guildTypes";
|
import { GuildPermission } from "@/src/types/guildTypes";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const customObstacleCourseLeaderboardController: RequestHandler = async (req, res) => {
|
export const customObstacleCourseLeaderboardController: RequestHandler = async (req, res) => {
|
||||||
const data = getJSONfromString<ICustomObstacleCourseLeaderboardRequest>(String(req.body));
|
const data = getJSONfromString<ICustomObstacleCourseLeaderboardRequest>(String(req.body));
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
import { getGuildForRequest, hasGuildPermission } from "@/src/services/guildService";
|
import { getGuildForRequest, hasGuildPermission } from "@/src/services/guildService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { GuildPermission, IGuildRank } from "@/src/types/guildTypes";
|
import type { IGuildRank } from "@/src/types/guildTypes";
|
||||||
import { RequestHandler } from "express";
|
import { GuildPermission } from "@/src/types/guildTypes";
|
||||||
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const customizeGuildRanksController: RequestHandler = async (req, res) => {
|
export const customizeGuildRanksController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { AllianceMember, GuildMember } from "@/src/models/guildModel";
|
import { AllianceMember, GuildMember } from "@/src/models/guildModel";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const declineAllianceInviteController: RequestHandler = async (req, res) => {
|
export const declineAllianceInviteController: RequestHandler = async (req, res) => {
|
||||||
// Check requester is a warlord in their guild
|
// Check requester is a warlord in their guild
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { GuildMember } from "@/src/models/guildModel";
|
import { GuildMember } from "@/src/models/guildModel";
|
||||||
import { getAccountForRequest } from "@/src/services/loginService";
|
import { getAccountForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const declineGuildInviteController: RequestHandler = async (req, res) => {
|
export const declineGuildInviteController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountForRequest(req);
|
const accountId = await getAccountForRequest(req);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { deleteSession } from "@/src/managers/sessionManager";
|
import { deleteSession } from "@/src/managers/sessionManager";
|
||||||
|
|
||||||
const deleteSessionController: RequestHandler = (_req, res) => {
|
const deleteSessionController: RequestHandler = (_req, res) => {
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { getInventory } from "@/src/services/inventoryService";
|
|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { GuildPermission } from "@/src/types/guildTypes";
|
import { GuildPermission } from "@/src/types/guildTypes";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const destroyDojoDecoController: RequestHandler = async (req, res) => {
|
export const destroyDojoDecoController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { getAccountForRequest } from "@/src/services/loginService";
|
|||||||
import { GuildPermission } from "@/src/types/guildTypes";
|
import { GuildPermission } from "@/src/types/guildTypes";
|
||||||
import { parallelForeach } from "@/src/utils/async-utils";
|
import { parallelForeach } from "@/src/utils/async-utils";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const divvyAllianceVaultController: RequestHandler = async (req, res) => {
|
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.
|
// 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.
|
||||||
|
|||||||
@ -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 { getDojoClient, getGuildForRequestEx, hasAccessToDojo, scaleRequiredCount } from "@/src/services/guildService";
|
||||||
import { getInventory, updateCurrency } from "@/src/services/inventoryService";
|
import { getInventory, updateCurrency } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { IDojoContributable } from "@/src/types/guildTypes";
|
import type { IDojoContributable } from "@/src/types/guildTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { ExportDojoRecipes, IDojoBuild } from "warframe-public-export-plus";
|
import type { IDojoBuild } from "warframe-public-export-plus";
|
||||||
|
import { ExportDojoRecipes } from "warframe-public-export-plus";
|
||||||
|
|
||||||
interface IDojoComponentRushRequest {
|
interface IDojoComponentRushRequest {
|
||||||
DecoType?: string;
|
DecoType?: string;
|
||||||
|
|||||||
@ -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.
|
// Arbiter Dojo endpoints, not really used by us as we don't provide a ContentURL.
|
||||||
|
|
||||||
|
|||||||
@ -3,10 +3,10 @@ import { addMiscItems, getInventory } from "@/src/services/inventoryService";
|
|||||||
import { fromStoreItem } from "@/src/services/itemDataService";
|
import { fromStoreItem } from "@/src/services/itemDataService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getRandomInt, getRandomWeightedRewardUc } from "@/src/services/rngService";
|
import { getRandomInt, getRandomWeightedRewardUc } from "@/src/services/rngService";
|
||||||
import { IMongoDate, IOid } from "@/src/types/commonTypes";
|
import type { IMongoDate, IOid } from "@/src/types/commonTypes";
|
||||||
import { IDroneClient } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { IDroneClient } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { ExportDrones, ExportResources, ExportSystems } from "warframe-public-export-plus";
|
import { ExportDrones, ExportResources, ExportSystems } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const dronesController: RequestHandler = async (req, res) => {
|
export const dronesController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { combineInventoryChanges, getInventory } from "@/src/services/inventoryService";
|
import { combineInventoryChanges, getInventory } from "@/src/services/inventoryService";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
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 { 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 { getRandomElement } from "@/src/services/rngService";
|
||||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
|
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) => {
|
export const endlessXpController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { toMongoDate } from "@/src/helpers/inventoryHelpers";
|
|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { getInventory, updateEntratiVault } from "@/src/services/inventoryService";
|
import { getInventory, updateEntratiVault } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const entratiLabConquestModeController: RequestHandler = async (req, res) => {
|
export const entratiLabConquestModeController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
|
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
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";
|
import { EquipmentFeatures } from "@/src/types/equipmentTypes";
|
||||||
|
|
||||||
export const evolveWeaponController: RequestHandler = async (req, res) => {
|
export const evolveWeaponController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getSession } from "@/src/managers/sessionManager";
|
import { getSession } from "@/src/managers/sessionManager";
|
||||||
import { logger } from "@/src/utils/logger";
|
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) => {
|
export const findSessionsController: RequestHandler = (_req, res) => {
|
||||||
const req = JSON.parse(String(_req.body)) as IFindSessionRequest;
|
const req = JSON.parse(String(_req.body)) as IFindSessionRequest;
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { addMiscItems, addStanding, getInventory } from "@/src/services/inventoryService";
|
import { addMiscItems, addStanding, getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { ExportResources } from "warframe-public-export-plus";
|
import { ExportResources } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const fishmongerController: RequestHandler = async (req, res) => {
|
export const fishmongerController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getInventory, addMiscItems, addEquipment, occupySlot } from "@/src/services/inventoryService";
|
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 { logger } from "@/src/utils/logger";
|
||||||
import { ExportFocusUpgrades } from "warframe-public-export-plus";
|
import { ExportFocusUpgrades } from "warframe-public-export-plus";
|
||||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { ExportResources } from "warframe-public-export-plus";
|
import { ExportResources } from "warframe-public-export-plus";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { addFusionTreasures, addMiscItems, getInventory } from "@/src/services/inventoryService";
|
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";
|
import { parseFusionTreasure } from "@/src/helpers/inventoryHelpers";
|
||||||
|
|
||||||
interface IFusionTreasureRequest {
|
interface IFusionTreasureRequest {
|
||||||
|
|||||||
@ -4,11 +4,11 @@ import { addMiscItem, getInventory } from "@/src/services/inventoryService";
|
|||||||
import { toStoreItem } from "@/src/services/itemDataService";
|
import { toStoreItem } from "@/src/services/itemDataService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { createGarden, getPersonalRooms } from "@/src/services/personalRoomsService";
|
import { createGarden, getPersonalRooms } from "@/src/services/personalRoomsService";
|
||||||
import { IMongoDate } from "@/src/types/commonTypes";
|
import type { IMongoDate } from "@/src/types/commonTypes";
|
||||||
import { IMissionReward } from "@/src/types/missionTypes";
|
import type { IMissionReward } from "@/src/types/missionTypes";
|
||||||
import { IGardeningClient, IPersonalRoomsClient } from "@/src/types/personalRoomsTypes";
|
import type { IGardeningClient, IPersonalRoomsClient } from "@/src/types/personalRoomsTypes";
|
||||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { dict_en, ExportResources } from "warframe-public-export-plus";
|
import { dict_en, ExportResources } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const gardeningController: RequestHandler = async (req, res) => {
|
export const gardeningController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { updateGeneric } from "@/src/services/inventoryService";
|
import { updateGeneric } from "@/src/services/inventoryService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
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.
|
// 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.
|
// SpaceNinjaServer supports both endpoints right now.
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { Alliance, Guild } from "@/src/models/guildModel";
|
|||||||
import { getAllianceClient } from "@/src/services/guildService";
|
import { getAllianceClient } from "@/src/services/guildService";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const getAllianceController: RequestHandler = async (req, res) => {
|
export const getAllianceController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { DailyDeal } from "@/src/models/worldStateModel";
|
import { DailyDeal } from "@/src/models/worldStateModel";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const getDailyDealStockLevelsController: RequestHandler = async (req, res) => {
|
export const getDailyDealStockLevelsController: RequestHandler = async (req, res) => {
|
||||||
const dailyDeal = (await DailyDeal.findOne({ StoreItem: req.query.productName }, "AmountSold"))!;
|
const dailyDeal = (await DailyDeal.findOne({ StoreItem: req.query.productName }, "AmountSold"))!;
|
||||||
|
|||||||
@ -2,8 +2,8 @@ import { toOid } from "@/src/helpers/inventoryHelpers";
|
|||||||
import { Friendship } from "@/src/models/friendModel";
|
import { Friendship } from "@/src/models/friendModel";
|
||||||
import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "@/src/services/friendService";
|
import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "@/src/services/friendService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { IFriendInfo } from "@/src/types/friendTypes";
|
import type { IFriendInfo } from "@/src/types/friendTypes";
|
||||||
import { Request, RequestHandler, Response } from "express";
|
import type { Request, RequestHandler, Response } from "express";
|
||||||
|
|
||||||
// POST with {} instead of GET as of 38.5.0
|
// POST with {} instead of GET as of 38.5.0
|
||||||
export const getFriendsController: RequestHandler = async (req: Request, res: Response) => {
|
export const getFriendsController: RequestHandler = async (req: Request, res: Response) => {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { GuildMember } from "@/src/models/guildModel";
|
import { GuildMember } from "@/src/models/guildModel";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { IGuildMemberClient } from "@/src/types/guildTypes";
|
import type { IGuildMemberClient } from "@/src/types/guildTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const getGuildContributionsController: RequestHandler = async (req, res) => {
|
export const getGuildContributionsController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { Guild } from "@/src/models/guildModel";
|
import { Guild } from "@/src/models/guildModel";
|
||||||
import { getAccountForRequest } from "@/src/services/loginService";
|
import { getAccountForRequest } from "@/src/services/loginService";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
import { Guild } from "@/src/models/guildModel";
|
import { Guild } from "@/src/models/guildModel";
|
||||||
import { getDojoClient } from "@/src/services/guildService";
|
import { getDojoClient } from "@/src/services/guildService";
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountForRequest } from "@/src/services/loginService";
|
import { getAccountForRequest } from "@/src/services/loginService";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { Guild } from "@/src/models/guildModel";
|
import { Guild } from "@/src/models/guildModel";
|
||||||
|
|||||||
@ -2,8 +2,8 @@ import { toMongoDate } from "@/src/helpers/inventoryHelpers";
|
|||||||
import { Guild } from "@/src/models/guildModel";
|
import { Guild } from "@/src/models/guildModel";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { IMongoDate } from "@/src/types/commonTypes";
|
import type { IMongoDate } from "@/src/types/commonTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const getGuildLogController: RequestHandler = async (req, res) => {
|
export const getGuildLogController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { toOid } from "@/src/helpers/inventoryHelpers";
|
import { toOid } from "@/src/helpers/inventoryHelpers";
|
||||||
import { Account, Ignore } from "@/src/models/loginModel";
|
import { Account, Ignore } from "@/src/models/loginModel";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
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 { parallelForeach } from "@/src/utils/async-utils";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const getIgnoredUsersController: RequestHandler = async (req, res) => {
|
export const getIgnoredUsersController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { generateRewardSeed } from "@/src/services/rngService";
|
import { generateRewardSeed } from "@/src/services/rngService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const getNewRewardSeedController: RequestHandler = async (req, res) => {
|
export const getNewRewardSeedController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { EPOCH, getSeasonChallengePools, getWorldState, pushWeeklyActs } from "@/src/services/worldStateService";
|
import { EPOCH, getSeasonChallengePools, getWorldState, pushWeeklyActs } from "@/src/services/worldStateService";
|
||||||
import { unixTimesInMs } from "@/src/constants/timeConstants";
|
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";
|
import { ExportChallenges } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const getPastWeeklyChallengesController: RequestHandler = async (req, res) => {
|
export const getPastWeeklyChallengesController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { config } from "@/src/services/configService";
|
import { config } from "@/src/services/configService";
|
||||||
import allShipFeatures from "@/static/fixed_responses/allShipFeatures.json";
|
import allShipFeatures from "@/static/fixed_responses/allShipFeatures.json";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { createGarden, getPersonalRooms } from "@/src/services/personalRoomsService";
|
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 { getLoadout } from "@/src/services/loadoutService";
|
||||||
import { toOid } from "@/src/helpers/inventoryHelpers";
|
import { toOid } from "@/src/helpers/inventoryHelpers";
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { applyStandingToVendorManifest, getVendorManifestByTypeName } from "@/src/services/serversideVendorsService";
|
import { applyStandingToVendorManifest, getVendorManifestByTypeName } from "@/src/services/serversideVendorsService";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
|
|||||||
@ -2,8 +2,8 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
|||||||
import { crackRelic } from "@/src/helpers/relicHelper";
|
import { crackRelic } from "@/src/helpers/relicHelper";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { IVoidTearParticipantInfo } from "@/src/types/requestTypes";
|
import type { IVoidTearParticipantInfo } from "@/src/types/requestTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const getVoidProjectionRewardsController: RequestHandler = async (req, res) => {
|
export const getVoidProjectionRewardsController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -10,9 +10,10 @@ import {
|
|||||||
} from "@/src/services/inventoryService";
|
} from "@/src/services/inventoryService";
|
||||||
import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService";
|
import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService";
|
||||||
import { handleDailyDealPurchase, handleStoreItemAcquisition } from "@/src/services/purchaseService";
|
import { handleDailyDealPurchase, handleStoreItemAcquisition } from "@/src/services/purchaseService";
|
||||||
import { IOid } from "@/src/types/commonTypes";
|
import type { IOid } from "@/src/types/commonTypes";
|
||||||
import { IPurchaseParams, IPurchaseResponse, PurchaseSource } from "@/src/types/purchaseTypes";
|
import type { IPurchaseParams, IPurchaseResponse } from "@/src/types/purchaseTypes";
|
||||||
import { RequestHandler } from "express";
|
import { PurchaseSource } from "@/src/types/purchaseTypes";
|
||||||
|
import type { RequestHandler } from "express";
|
||||||
import { ExportBundles, ExportFlavour } from "warframe-public-export-plus";
|
import { ExportBundles, ExportFlavour } from "warframe-public-export-plus";
|
||||||
|
|
||||||
const checkPurchaseParams = (params: IPurchaseParams): boolean => {
|
const checkPurchaseParams = (params: IPurchaseParams): boolean => {
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
|
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
|
||||||
import { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import type { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import { ExportRecipes } from "warframe-public-export-plus";
|
import { ExportRecipes } from "warframe-public-export-plus";
|
||||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
import { EquipmentFeatures, IEquipmentClient } from "@/src/types/equipmentTypes";
|
import type { IEquipmentClient } from "@/src/types/equipmentTypes";
|
||||||
|
import { EquipmentFeatures } from "@/src/types/equipmentTypes";
|
||||||
|
|
||||||
interface IGildWeaponRequest {
|
interface IGildWeaponRequest {
|
||||||
ItemName: string;
|
ItemName: string;
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { parseString } from "@/src/helpers/general";
|
import { parseString } from "@/src/helpers/general";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { giveKeyChainItem } from "@/src/services/questService";
|
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) => {
|
export const giveKeyChainTriggeredItemsController: RequestHandler = async (req, res) => {
|
||||||
const accountId = parseString(req.query.accountId);
|
const accountId = parseString(req.query.accountId);
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { giveKeyChainMessage } from "@/src/services/questService";
|
import { giveKeyChainMessage } from "@/src/services/questService";
|
||||||
import { IKeyChainRequest } from "@/src/types/requestTypes";
|
import type { IKeyChainRequest } from "@/src/types/requestTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const giveKeyChainTriggeredMessageController: RequestHandler = async (req, res) => {
|
export const giveKeyChainTriggeredMessageController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { addItem, getInventory } from "@/src/services/inventoryService";
|
import { addItem, getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { IOid } from "@/src/types/commonTypes";
|
import type { IOid } from "@/src/types/commonTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const giveQuestKeyRewardController: RequestHandler = async (req, res) => {
|
export const giveQuestKeyRewardController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { addLoreFragmentScans, addShipDecorations, getInventory } from "@/src/services/inventoryService";
|
import { addLoreFragmentScans, addShipDecorations, getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { ITypeCount } from "@/src/types/commonTypes";
|
import type { ITypeCount } from "@/src/types/commonTypes";
|
||||||
import { ILoreFragmentScan } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { ILoreFragmentScan } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const giveShipDecoAndLoreFragmentController: RequestHandler = async (req, res) => {
|
export const giveShipDecoAndLoreFragmentController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { addStartingGear, getInventory } from "@/src/services/inventoryService";
|
import { addStartingGear, getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { TPartialStartingGear } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { TPartialStartingGear } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const giveStartingGearController: RequestHandler = async (req, res) => {
|
export const giveStartingGearController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import {
|
import {
|
||||||
addGuildMemberMiscItemContribution,
|
addGuildMemberMiscItemContribution,
|
||||||
getGuildForRequestEx,
|
getGuildForRequestEx,
|
||||||
@ -25,14 +25,16 @@ import {
|
|||||||
occupySlot,
|
occupySlot,
|
||||||
updateCurrency
|
updateCurrency
|
||||||
} from "@/src/services/inventoryService";
|
} from "@/src/services/inventoryService";
|
||||||
import { IMiscItem, InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
|
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
import { config } from "@/src/services/configService";
|
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 { GuildMember } from "@/src/models/guildModel";
|
||||||
import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
|
import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
|
||||||
import { logger } from "@/src/utils/logger";
|
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) => {
|
export const guildTechController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountForRequest } from "@/src/services/loginService";
|
import { getAccountForRequest } from "@/src/services/loginService";
|
||||||
import { createNewSession } from "@/src/managers/sessionManager";
|
import { createNewSession } from "@/src/managers/sessionManager";
|
||||||
import { logger } from "@/src/utils/logger";
|
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 { JSONParse } from "json-with-bigint";
|
||||||
import { toOid2, version_compare } from "@/src/helpers/inventoryHelpers";
|
import { toOid2, version_compare } from "@/src/helpers/inventoryHelpers";
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
|||||||
import { addBooster, getInventory } from "@/src/services/inventoryService";
|
import { addBooster, getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getRandomInt } from "@/src/services/rngService";
|
import { getRandomInt } from "@/src/services/rngService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { ExportBoosters } from "warframe-public-export-plus";
|
import { ExportBoosters } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const hubBlessingController: RequestHandler = async (req, res) => {
|
export const hubBlessingController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
const hubController: RequestHandler = (_req, res) => {
|
const hubController: RequestHandler = (_req, res) => {
|
||||||
res.json("hub 127.0.0.1:6952");
|
res.json("hub 127.0.0.1:6952");
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
const hubInstancesController: RequestHandler = (_req, res) => {
|
const hubInstancesController: RequestHandler = (_req, res) => {
|
||||||
res.json("list 50 1 0 0 scenarios 0 0 0 0 0 0");
|
res.json("list 50 1 0 0 scenarios 0 0 0 0 0 0");
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { Inbox } from "@/src/models/inboxModel";
|
import { Inbox } from "@/src/models/inboxModel";
|
||||||
import {
|
import {
|
||||||
createMessage,
|
createMessage,
|
||||||
@ -20,7 +20,7 @@ import { logger } from "@/src/utils/logger";
|
|||||||
import { ExportFlavour } from "warframe-public-export-plus";
|
import { ExportFlavour } from "warframe-public-export-plus";
|
||||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
|
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
|
||||||
import { fromStoreItem, isStoreItem } from "@/src/services/itemDataService";
|
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) => {
|
export const inboxController: RequestHandler = async (req, res) => {
|
||||||
const { deleteId, lastMessage: latestClientMessageId, messageId } = req.query;
|
const { deleteId, lastMessage: latestClientMessageId, messageId } = req.query;
|
||||||
|
|||||||
@ -1,15 +1,15 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountForRequest } from "@/src/services/loginService";
|
import { getAccountForRequest } from "@/src/services/loginService";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { getInventory, addMiscItems, updateCurrency, addRecipes, freeUpSlot } from "@/src/services/inventoryService";
|
import { getInventory, addMiscItems, updateCurrency, addRecipes, freeUpSlot } from "@/src/services/inventoryService";
|
||||||
import { IOid } from "@/src/types/commonTypes";
|
import type { IOid } from "@/src/types/commonTypes";
|
||||||
import {
|
import type {
|
||||||
IConsumedSuit,
|
IConsumedSuit,
|
||||||
IHelminthFoodRecord,
|
IHelminthFoodRecord,
|
||||||
IInventoryClient,
|
IInventoryClient,
|
||||||
IMiscItem,
|
IMiscItem
|
||||||
InventorySlot
|
|
||||||
} from "@/src/types/inventoryTypes/inventoryTypes";
|
} from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
|
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { ExportMisc } from "warframe-public-export-plus";
|
import { ExportMisc } from "warframe-public-export-plus";
|
||||||
import { getRecipe } from "@/src/services/itemDataService";
|
import { getRecipe } from "@/src/services/itemDataService";
|
||||||
import { toMongoDate, version_compare } from "@/src/helpers/inventoryHelpers";
|
import { toMongoDate, version_compare } from "@/src/helpers/inventoryHelpers";
|
||||||
|
|||||||
@ -1,19 +1,16 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountForRequest } from "@/src/services/loginService";
|
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 { config } from "@/src/services/configService";
|
||||||
import allDialogue from "@/static/fixed_responses/allDialogue.json";
|
import allDialogue from "@/static/fixed_responses/allDialogue.json";
|
||||||
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
|
import type { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
|
||||||
import { IInventoryClient, IShipInventory, equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes";
|
import type { IInventoryClient, IShipInventory } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { IPolarity, ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import { equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import {
|
import type { IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
eFaction,
|
import { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
ExportCustoms,
|
import type { ICountedItem } from "warframe-public-export-plus";
|
||||||
ExportFlavour,
|
import { eFaction, ExportCustoms, ExportFlavour, ExportResources, ExportVirtuals } from "warframe-public-export-plus";
|
||||||
ExportResources,
|
|
||||||
ExportVirtuals,
|
|
||||||
ICountedItem
|
|
||||||
} from "warframe-public-export-plus";
|
|
||||||
import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "@/src/services/infestedFoundryService";
|
import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "@/src/services/infestedFoundryService";
|
||||||
import {
|
import {
|
||||||
addEmailItem,
|
addEmailItem,
|
||||||
@ -30,7 +27,7 @@ import { addString, catBreadHash } from "@/src/helpers/stringHelpers";
|
|||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
import { getNemesisManifest } from "@/src/helpers/nemesisHelpers";
|
import { getNemesisManifest } from "@/src/helpers/nemesisHelpers";
|
||||||
import { getPersonalRooms } from "@/src/services/personalRoomsService";
|
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 { Ship } from "@/src/models/shipModel";
|
||||||
import { toLegacyOid, toOid, version_compare } from "@/src/helpers/inventoryHelpers";
|
import { toLegacyOid, toOid, version_compare } from "@/src/helpers/inventoryHelpers";
|
||||||
import { Inbox } from "@/src/models/inboxModel";
|
import { Inbox } from "@/src/models/inboxModel";
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getInventory, updateCurrency, updateSlots } from "@/src/services/inventoryService";
|
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 { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { exhaustive } from "@/src/utils/ts-utils";
|
import { exhaustive } from "@/src/utils/ts-utils";
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getSessionByID } from "@/src/managers/sessionManager";
|
import { getSessionByID } from "@/src/managers/sessionManager";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
import { config } from "@/src/services/configService";
|
import { config } from "@/src/services/configService";
|
||||||
import { buildConfig } from "@/src/services/buildConfigService";
|
import { buildConfig } from "@/src/services/buildConfigService";
|
||||||
|
|
||||||
import { Account } from "@/src/models/loginModel";
|
import { Account } from "@/src/models/loginModel";
|
||||||
import { createAccount, createNonce, getUsernameFromEmail, isCorrectPassword } from "@/src/services/loginService";
|
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 { logger } from "@/src/utils/logger";
|
||||||
import { version_compare } from "@/src/helpers/inventoryHelpers";
|
import { version_compare } from "@/src/helpers/inventoryHelpers";
|
||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountForRequest } from "@/src/services/loginService";
|
import { getAccountForRequest } from "@/src/services/loginService";
|
||||||
|
import type { ILoginRewardsReponse } from "@/src/services/loginRewardService";
|
||||||
import {
|
import {
|
||||||
claimLoginReward,
|
claimLoginReward,
|
||||||
getRandomLoginRewards,
|
getRandomLoginRewards,
|
||||||
ILoginRewardsReponse,
|
|
||||||
isLoginRewardAChoice,
|
isLoginRewardAChoice,
|
||||||
setAccountGotLoginRewardToday
|
setAccountGotLoginRewardToday
|
||||||
} from "@/src/services/loginRewardService";
|
} from "@/src/services/loginRewardService";
|
||||||
|
|||||||
@ -7,9 +7,9 @@ import {
|
|||||||
import { getAccountForRequest } from "@/src/services/loginService";
|
import { getAccountForRequest } from "@/src/services/loginService";
|
||||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
|
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
|
||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
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 { logger } from "@/src/utils/logger";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const loginRewardsSelectionController: RequestHandler = async (req, res) => {
|
export const loginRewardsSelectionController: RequestHandler = async (req, res) => {
|
||||||
const account = await getAccountForRequest(req);
|
const account = await getAccountForRequest(req);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { Account } from "@/src/models/loginModel";
|
import { Account } from "@/src/models/loginModel";
|
||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
const marketRecommendationsController: RequestHandler = (_req, res) => {
|
const marketRecommendationsController: RequestHandler = (_req, res) => {
|
||||||
const data = Buffer.from([
|
const data = Buffer.from([
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
const marketSearchRecommendationsController: RequestHandler = (_req, res) => {
|
const marketSearchRecommendationsController: RequestHandler = (_req, res) => {
|
||||||
res.sendStatus(200);
|
res.sendStatus(200);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
export const maturePetController: RequestHandler = async (req, res) => {
|
export const maturePetController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { getAccountForRequest } from "@/src/services/loginService";
|
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 { addMissionInventoryUpdates, addMissionRewards } from "@/src/services/missionInventoryUpdateService";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getInventoryResponse } from "@/src/controllers/api/inventoryController";
|
import { getInventoryResponse } from "@/src/controllers/api/inventoryController";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import {
|
import type {
|
||||||
IMissionInventoryUpdateResponse,
|
IMissionInventoryUpdateResponse,
|
||||||
IMissionInventoryUpdateResponseBackToDryDock,
|
IMissionInventoryUpdateResponseBackToDryDock,
|
||||||
IMissionInventoryUpdateResponseRailjackInterstitial
|
IMissionInventoryUpdateResponseRailjackInterstitial
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
@ -13,12 +13,14 @@ import {
|
|||||||
combineInventoryChanges,
|
combineInventoryChanges,
|
||||||
addSpecialItem
|
addSpecialItem
|
||||||
} from "@/src/services/inventoryService";
|
} from "@/src/services/inventoryService";
|
||||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
import { getDefaultUpgrades } from "@/src/services/itemDataService";
|
import { getDefaultUpgrades } from "@/src/services/itemDataService";
|
||||||
import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper";
|
import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper";
|
||||||
import { getRandomInt } from "@/src/services/rngService";
|
import { getRandomInt } from "@/src/services/rngService";
|
||||||
import { ExportSentinels, ExportWeapons, IDefaultUpgrade } from "warframe-public-export-plus";
|
import type { IDefaultUpgrade } from "warframe-public-export-plus";
|
||||||
import { IEquipmentDatabase, Status } from "@/src/types/equipmentTypes";
|
import { ExportSentinels, ExportWeapons } from "warframe-public-export-plus";
|
||||||
|
import type { IEquipmentDatabase } from "@/src/types/equipmentTypes";
|
||||||
|
import { Status } from "@/src/types/equipmentTypes";
|
||||||
|
|
||||||
interface IModularCraftRequest {
|
interface IModularCraftRequest {
|
||||||
WeaponType: string;
|
WeaponType: string;
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { ExportWeapons } from "warframe-public-export-plus";
|
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 { toMongoDate } from "@/src/helpers/inventoryHelpers";
|
||||||
import { SRng } from "@/src/services/rngService";
|
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 { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import {
|
import {
|
||||||
addEquipment,
|
addEquipment,
|
||||||
@ -17,7 +17,7 @@ import { getDefaultUpgrades } from "@/src/services/itemDataService";
|
|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
||||||
import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper";
|
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";
|
import { EquipmentFeatures } from "@/src/types/equipmentTypes";
|
||||||
|
|
||||||
export const modularWeaponSaleController: RequestHandler = async (req, res) => {
|
export const modularWeaponSaleController: RequestHandler = async (req, res) => {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getInventory, updateCurrency } from "@/src/services/inventoryService";
|
import { getInventory, updateCurrency } from "@/src/services/inventoryService";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
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";
|
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
||||||
|
|
||||||
interface INameWeaponRequest {
|
interface INameWeaponRequest {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user