chore: use relative imports with .ts #2694
							
								
								
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -21,7 +21,7 @@
 | 
				
			|||||||
        "mongoose": "^8.11.0",
 | 
					        "mongoose": "^8.11.0",
 | 
				
			||||||
        "morgan": "^1.10.0",
 | 
					        "morgan": "^1.10.0",
 | 
				
			||||||
        "ncp": "^2.0.0",
 | 
					        "ncp": "^2.0.0",
 | 
				
			||||||
        "typescript": "^5.5",
 | 
					        "typescript": "^5.7",
 | 
				
			||||||
        "undici": "^7.10.0",
 | 
					        "undici": "^7.10.0",
 | 
				
			||||||
        "warframe-public-export-plus": "^0.5.82",
 | 
					        "warframe-public-export-plus": "^0.5.82",
 | 
				
			||||||
        "warframe-riven-info": "^0.1.2",
 | 
					        "warframe-riven-info": "^0.1.2",
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@
 | 
				
			|||||||
  "description": "WF Emulator",
 | 
					  "description": "WF Emulator",
 | 
				
			||||||
  "main": "index.ts",
 | 
					  "main": "index.ts",
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
    "start": "node --enable-source-maps --import ./build/src/pathman.js build/src/index.js",
 | 
					    "start": "node --enable-source-maps build/src/index.js",
 | 
				
			||||||
    "build": "tsgo --sourceMap && ncp static/webui build/static/webui",
 | 
					    "build": "tsgo --sourceMap && ncp static/webui build/static/webui",
 | 
				
			||||||
    "build:tsc": "tsc --incremental --sourceMap && ncp static/webui build/static/webui",
 | 
					    "build:tsc": "tsc --incremental --sourceMap && ncp static/webui build/static/webui",
 | 
				
			||||||
    "build:dev": "tsgo --sourceMap",
 | 
					    "build:dev": "tsgo --sourceMap",
 | 
				
			||||||
@ -38,7 +38,7 @@
 | 
				
			|||||||
    "mongoose": "^8.11.0",
 | 
					    "mongoose": "^8.11.0",
 | 
				
			||||||
    "morgan": "^1.10.0",
 | 
					    "morgan": "^1.10.0",
 | 
				
			||||||
    "ncp": "^2.0.0",
 | 
					    "ncp": "^2.0.0",
 | 
				
			||||||
    "typescript": "^5.5",
 | 
					    "typescript": "^5.7",
 | 
				
			||||||
    "undici": "^7.10.0",
 | 
					    "undici": "^7.10.0",
 | 
				
			||||||
    "warframe-public-export-plus": "^0.5.82",
 | 
					    "warframe-public-export-plus": "^0.5.82",
 | 
				
			||||||
    "warframe-riven-info": "^0.1.2",
 | 
					    "warframe-riven-info": "^0.1.2",
 | 
				
			||||||
 | 
				
			|||||||
@ -28,15 +28,44 @@ for (const file of files) {
 | 
				
			|||||||
        continue;
 | 
					        continue;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    const dir = path.dirname(file);
 | 
					    const dir = path.dirname(file);
 | 
				
			||||||
    const fixedContent = content.replaceAll(/} from "([^"]+)";/g, (sub, importPath) => {
 | 
					    const fixedContent = content.replaceAll(/from "([^"]+)";/g, (sub, importPath) => {
 | 
				
			||||||
        if (!importPath.startsWith("@/")) {
 | 
					        if (importPath.startsWith("@/") || importPath.startsWith(".")) {
 | 
				
			||||||
            const fullImportPath = path.resolve(dir, importPath);
 | 
					            const base = importPath.startsWith("@/")
 | 
				
			||||||
            if (fs.existsSync(fullImportPath + ".ts")) {
 | 
					                ? path.join(root, importPath.slice(2))
 | 
				
			||||||
                const relative = path.relative(root, fullImportPath).replace(/\\/g, "/");
 | 
					                : path.resolve(dir, importPath);
 | 
				
			||||||
                const fixedPath = "@/" + relative;
 | 
					            let target = base;
 | 
				
			||||||
                console.log(`${importPath} -> ${fixedPath}`);
 | 
					
 | 
				
			||||||
                return sub.split(importPath).join(fixedPath);
 | 
					            if (fs.existsSync(target)) {
 | 
				
			||||||
 | 
					                const stat = fs.statSync(target);
 | 
				
			||||||
 | 
					                if (stat.isDirectory()) {
 | 
				
			||||||
 | 
					                    if (fs.existsSync(path.join(target, "index.ts"))) {
 | 
				
			||||||
 | 
					                        target = path.join(target, "index.ts");
 | 
				
			||||||
 | 
					                    } else {
 | 
				
			||||||
 | 
					                        return sub;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                } else {
 | 
				
			||||||
 | 
					                    const ext = path.extname(target);
 | 
				
			||||||
 | 
					                    if (!ext) {
 | 
				
			||||||
 | 
					                        target += ".ts";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            } else if (fs.existsSync(target + ".ts")) {
 | 
				
			||||||
 | 
					                target += ".ts";
 | 
				
			||||||
 | 
					            } else if (fs.existsSync(path.join(target, "index.ts"))) {
 | 
				
			||||||
 | 
					                target = path.join(target, "index.ts");
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                return sub;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            let relative = path.relative(dir, target).replace(/\\/g, "/");
 | 
				
			||||||
 | 
					            if (!path.extname(relative)) {
 | 
				
			||||||
 | 
					                relative += ".ts";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (!relative.startsWith(".")) {
 | 
				
			||||||
 | 
					                relative = "./" + relative;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            console.log(`${importPath} -> ${relative}`);
 | 
				
			||||||
 | 
					            return sub.split(importPath).join(relative);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return sub;
 | 
					        return sub;
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										20
									
								
								src/app.ts
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								src/app.ts
									
									
									
									
									
								
							@ -1,17 +1,17 @@
 | 
				
			|||||||
import express from "express";
 | 
					import express from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import bodyParser from "body-parser";
 | 
					import bodyParser from "body-parser";
 | 
				
			||||||
import { unknownEndpointHandler } from "@/src/middleware/middleware";
 | 
					import { unknownEndpointHandler } from "./middleware/middleware.ts";
 | 
				
			||||||
import { requestLogger } from "@/src/middleware/morgenMiddleware";
 | 
					import { requestLogger } from "./middleware/morgenMiddleware.ts";
 | 
				
			||||||
import { errorHandler } from "@/src/middleware/errorHandler";
 | 
					import { errorHandler } from "./middleware/errorHandler.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { apiRouter } from "@/src/routes/api";
 | 
					import { apiRouter } from "./routes/api.ts";
 | 
				
			||||||
import { cacheRouter } from "@/src/routes/cache";
 | 
					import { cacheRouter } from "./routes/cache.ts";
 | 
				
			||||||
import { customRouter } from "@/src/routes/custom";
 | 
					import { customRouter } from "./routes/custom.ts";
 | 
				
			||||||
import { dynamicController } from "@/src/routes/dynamic";
 | 
					import { dynamicController } from "./routes/dynamic.ts";
 | 
				
			||||||
import { payRouter } from "@/src/routes/pay";
 | 
					import { payRouter } from "./routes/pay.ts";
 | 
				
			||||||
import { statsRouter } from "@/src/routes/stats";
 | 
					import { statsRouter } from "./routes/stats.ts";
 | 
				
			||||||
import { webuiRouter } from "@/src/routes/webui";
 | 
					import { webuiRouter } from "./routes/webui.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const app = express();
 | 
					const app = express();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const abandonLibraryDailyTaskController: RequestHandler = async (req, res) => {
 | 
					export const abandonLibraryDailyTaskController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -5,10 +5,10 @@ import {
 | 
				
			|||||||
    hasGuildPermission,
 | 
					    hasGuildPermission,
 | 
				
			||||||
    removeDojoDeco,
 | 
					    removeDojoDeco,
 | 
				
			||||||
    removeDojoRoom
 | 
					    removeDojoRoom
 | 
				
			||||||
} from "@/src/services/guildService";
 | 
					} from "../../services/guildService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const abortDojoComponentController: RequestHandler = async (req, res) => {
 | 
					export const abortDojoComponentController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,12 @@
 | 
				
			|||||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
 | 
					import {
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					    getDojoClient,
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					    getGuildForRequestEx,
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					    hasAccessToDojo,
 | 
				
			||||||
 | 
					    hasGuildPermission
 | 
				
			||||||
 | 
					} from "../../services/guildService.ts";
 | 
				
			||||||
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const abortDojoComponentDestructionController: RequestHandler = async (req, res) => {
 | 
					export const abortDojoComponentDestructionController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,13 +1,13 @@
 | 
				
			|||||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
					import { toOid } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    createVeiledRivenFingerprint,
 | 
					    createVeiledRivenFingerprint,
 | 
				
			||||||
    createUnveiledRivenFingerprint,
 | 
					    createUnveiledRivenFingerprint,
 | 
				
			||||||
    rivenRawToRealWeighted
 | 
					    rivenRawToRealWeighted
 | 
				
			||||||
} from "@/src/helpers/rivenHelper";
 | 
					} from "../../helpers/rivenHelper.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { addMods, getInventory } from "@/src/services/inventoryService";
 | 
					import { addMods, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getRandomElement } from "@/src/services/rngService";
 | 
					import { getRandomElement } from "../../services/rngService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { ExportUpgrades } from "warframe-public-export-plus";
 | 
					import { ExportUpgrades } from "warframe-public-export-plus";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,9 @@
 | 
				
			|||||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
					import { toOid } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { Friendship } from "@/src/models/friendModel";
 | 
					import { Friendship } from "../../models/friendModel.ts";
 | 
				
			||||||
import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "@/src/services/friendService";
 | 
					import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "../../services/friendService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IFriendInfo } from "@/src/types/friendTypes";
 | 
					import type { IFriendInfo } from "../../types/friendTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const addFriendController: RequestHandler = async (req, res) => {
 | 
					export const addFriendController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
					import { Inventory } from "../../models/inventoryModels/inventoryModel.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const addFriendImageController: RequestHandler = async (req, res) => {
 | 
					export const addFriendImageController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const accountId = await getAccountIdForRequest(req);
 | 
					    const accountId = await getAccountIdForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
					import { toOid } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { Account, Ignore } from "@/src/models/loginModel";
 | 
					import { Account, Ignore } from "../../models/loginModel.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IFriendInfo } from "@/src/types/friendTypes";
 | 
					import type { IFriendInfo } from "../../types/friendTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const addIgnoredUserController: RequestHandler = async (req, res) => {
 | 
					export const addIgnoredUserController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,11 +1,11 @@
 | 
				
			|||||||
import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
 | 
					import { toMongoDate, toOid } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { Friendship } from "@/src/models/friendModel";
 | 
					import { Friendship } from "../../models/friendModel.ts";
 | 
				
			||||||
import { Account } from "@/src/models/loginModel";
 | 
					import { Account } from "../../models/loginModel.ts";
 | 
				
			||||||
import { addInventoryDataToFriendInfo, areFriendsOfFriends } from "@/src/services/friendService";
 | 
					import { addInventoryDataToFriendInfo, areFriendsOfFriends } from "../../services/friendService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IFriendInfo } from "@/src/types/friendTypes";
 | 
					import type { IFriendInfo } from "../../types/friendTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const addPendingFriendController: RequestHandler = async (req, res) => {
 | 
					export const addPendingFriendController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,10 +1,10 @@
 | 
				
			|||||||
import { getJSONfromString, regexEscape } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString, regexEscape } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel";
 | 
					import { Alliance, AllianceMember, Guild, GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import { createMessage } from "@/src/services/inboxService";
 | 
					import { createMessage } from "../../services/inboxService.ts";
 | 
				
			||||||
import { getEffectiveAvatarImageType, getInventory } from "@/src/services/inventoryService";
 | 
					import { getEffectiveAvatarImageType, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService";
 | 
					import { getAccountForRequest, getSuffixedName } from "../../services/loginService.ts";
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { ExportFlavour } from "warframe-public-export-plus";
 | 
					import { ExportFlavour } from "warframe-public-export-plus";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,15 +1,15 @@
 | 
				
			|||||||
import { toMongoDate } from "@/src/helpers/inventoryHelpers";
 | 
					import { toMongoDate } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { Guild, GuildMember } from "@/src/models/guildModel";
 | 
					import { Guild, GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import { Account } from "@/src/models/loginModel";
 | 
					import { Account } from "../../models/loginModel.ts";
 | 
				
			||||||
import { addInventoryDataToFriendInfo, areFriends } from "@/src/services/friendService";
 | 
					import { addInventoryDataToFriendInfo, areFriends } from "../../services/friendService.ts";
 | 
				
			||||||
import { hasGuildPermission } from "@/src/services/guildService";
 | 
					import { hasGuildPermission } from "../../services/guildService.ts";
 | 
				
			||||||
import { createMessage } from "@/src/services/inboxService";
 | 
					import { createMessage } from "../../services/inboxService.ts";
 | 
				
			||||||
import { getEffectiveAvatarImageType, getInventory } from "@/src/services/inventoryService";
 | 
					import { getEffectiveAvatarImageType, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "@/src/services/loginService";
 | 
					import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IOid } from "@/src/types/commonTypes";
 | 
					import type { IOid } from "../../types/commonTypes.ts";
 | 
				
			||||||
import type { IGuildMemberClient } from "@/src/types/guildTypes";
 | 
					import type { IGuildMemberClient } from "../../types/guildTypes.ts";
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { ExportFlavour } from "warframe-public-export-plus";
 | 
					import { ExportFlavour } from "warframe-public-export-plus";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const adoptPetController: RequestHandler = async (req, res) => {
 | 
					export const adoptPetController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getPersonalRooms } from "@/src/services/personalRoomsService";
 | 
					import { getPersonalRooms } from "../../services/personalRoomsService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const apartmentController: RequestHandler = async (req, res) => {
 | 
					export const apartmentController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getInventory, addMods } from "@/src/services/inventoryService";
 | 
					import { getInventory, addMods } from "../../services/inventoryService.ts";
 | 
				
			||||||
import type { IOid } from "@/src/types/commonTypes";
 | 
					import type { IOid } from "../../types/commonTypes.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
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,8 +1,8 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
 | 
					import { addMiscItems, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { colorToShard, combineColors, shardToColor } from "@/src/helpers/shardHelper";
 | 
					import { colorToShard, combineColors, shardToColor } from "../../helpers/shardHelper.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const archonFusionController: RequestHandler = async (req, res) => {
 | 
					export const archonFusionController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const accountId = await getAccountIdForRequest(req);
 | 
					    const accountId = await getAccountIdForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,9 @@
 | 
				
			|||||||
import { fromOid, toOid } from "@/src/helpers/inventoryHelpers";
 | 
					import { fromOid, toOid } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { createVeiledRivenFingerprint, rivenRawToRealWeighted } from "@/src/helpers/rivenHelper";
 | 
					import { createVeiledRivenFingerprint, rivenRawToRealWeighted } from "../../helpers/rivenHelper.ts";
 | 
				
			||||||
import { addMiscItems, addMods, getInventory } from "@/src/services/inventoryService";
 | 
					import { addMiscItems, addMods, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getRandomElement, getRandomWeightedReward, getRandomWeightedRewardUc } from "@/src/services/rngService";
 | 
					import { getRandomElement, getRandomWeightedReward, getRandomWeightedRewardUc } from "../../services/rngService.ts";
 | 
				
			||||||
import type { IUpgradeFromClient } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { IUpgradeFromClient } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import type { TRarity } from "warframe-public-export-plus";
 | 
					import type { TRarity } from "warframe-public-export-plus";
 | 
				
			||||||
import { ExportBoosterPacks, ExportUpgrades } from "warframe-public-export-plus";
 | 
					import { ExportBoosterPacks, ExportUpgrades } from "warframe-public-export-plus";
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import type { IInventoryClient, IUpgradeClient } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { IInventoryClient, IUpgradeClient } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { addMods, getInventory } from "@/src/services/inventoryService";
 | 
					import { addMods, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const artifactsController: RequestHandler = async (req, res) => {
 | 
					export const artifactsController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const accountId = await getAccountIdForRequest(req);
 | 
					    const accountId = await getAccountIdForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import { GuildAd } from "@/src/models/guildModel";
 | 
					import { GuildAd } from "../../models/guildModel.ts";
 | 
				
			||||||
import { getGuildForRequestEx, hasGuildPermission } from "@/src/services/guildService";
 | 
					import { getGuildForRequestEx, hasGuildPermission } from "../../services/guildService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const cancelGuildAdvertisementController: RequestHandler = async (req, res) => {
 | 
					export const cancelGuildAdvertisementController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,11 +1,16 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
 | 
					import {
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					    getDojoClient,
 | 
				
			||||||
import type { IDojoComponentDatabase } from "@/src/types/guildTypes";
 | 
					    getGuildForRequestEx,
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					    hasAccessToDojo,
 | 
				
			||||||
 | 
					    hasGuildPermission
 | 
				
			||||||
 | 
					} from "../../services/guildService.ts";
 | 
				
			||||||
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
 | 
					import type { IDojoComponentDatabase } from "../../types/guildTypes.ts";
 | 
				
			||||||
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import { Types } from "mongoose";
 | 
					import { Types } from "mongoose";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const changeDojoRootController: RequestHandler = async (req, res) => {
 | 
					export const changeDojoRootController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const accountId = await getAccountIdForRequest(req);
 | 
					    const accountId = await getAccountIdForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
import { GuildMember } from "@/src/models/guildModel";
 | 
					import { GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import { getGuildForRequest, hasGuildPermissionEx } from "@/src/services/guildService";
 | 
					import { getGuildForRequest, hasGuildPermissionEx } from "../../services/guildService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const changeGuildRankController: RequestHandler = async (req, res) => {
 | 
					export const changeGuildRankController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const checkDailyMissionBonusController: RequestHandler = async (req, res) => {
 | 
					export const checkDailyMissionBonusController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -2,11 +2,11 @@
 | 
				
			|||||||
//it will claim a recipe for the user
 | 
					//it will claim a recipe for the user
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import { getRecipe } from "@/src/services/itemDataService";
 | 
					import { getRecipe } from "../../services/itemDataService.ts";
 | 
				
			||||||
import type { IOid, IOidWithLegacySupport } from "@/src/types/commonTypes";
 | 
					import type { IOid, IOidWithLegacySupport } from "../../types/commonTypes.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    getInventory,
 | 
					    getInventory,
 | 
				
			||||||
    updateCurrency,
 | 
					    updateCurrency,
 | 
				
			||||||
@ -17,15 +17,15 @@ import {
 | 
				
			|||||||
    addKubrowPetPrint,
 | 
					    addKubrowPetPrint,
 | 
				
			||||||
    addPowerSuit,
 | 
					    addPowerSuit,
 | 
				
			||||||
    addEquipment
 | 
					    addEquipment
 | 
				
			||||||
} from "@/src/services/inventoryService";
 | 
					} from "../../services/inventoryService.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import type { IPendingRecipeDatabase } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { IPendingRecipeDatabase } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { toOid2 } from "@/src/helpers/inventoryHelpers";
 | 
					import { toOid2 } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
					import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts";
 | 
				
			||||||
import type { IRecipe } from "warframe-public-export-plus";
 | 
					import type { IRecipe } from "warframe-public-export-plus";
 | 
				
			||||||
import type { IEquipmentClient } from "@/src/types/equipmentTypes";
 | 
					import type { IEquipmentClient } from "../../types/equipmentTypes.ts";
 | 
				
			||||||
import { EquipmentFeatures, Status } from "@/src/types/equipmentTypes";
 | 
					import { EquipmentFeatures, Status } from "../../types/equipmentTypes.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface IClaimCompletedRecipeRequest {
 | 
					interface IClaimCompletedRecipeRequest {
 | 
				
			||||||
    RecipeIds: IOid[];
 | 
					    RecipeIds: IOid[];
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { combineInventoryChanges, getInventory } from "@/src/services/inventoryService";
 | 
					import { combineInventoryChanges, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
					import { handleStoreItemAcquisition } from "../../services/purchaseService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { ExportChallenges } from "warframe-public-export-plus";
 | 
					import { ExportChallenges } from "warframe-public-export-plus";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
import { addFusionPoints, getInventory } from "@/src/services/inventoryService";
 | 
					import { addFusionPoints, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const claimLibraryDailyTaskRewardController: RequestHandler = async (req, res) => {
 | 
					export const claimLibraryDailyTaskRewardController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const clearDialogueHistoryController: RequestHandler = async (req, res) => {
 | 
					export const clearDialogueHistoryController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import { checkCalendarAutoAdvance, getCalendarProgress, getInventory } from "@/src/services/inventoryService";
 | 
					import { checkCalendarAutoAdvance, getCalendarProgress, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
					import { handleStoreItemAcquisition } from "../../services/purchaseService.ts";
 | 
				
			||||||
import { getWorldState } from "@/src/services/worldStateService";
 | 
					import { getWorldState } from "../../services/worldStateService.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import type { 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
 | 
				
			||||||
 | 
				
			|||||||
@ -1,10 +1,10 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
					import { addMiscItems, getInventory, updateCurrency } from "../../services/inventoryService.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import type { IVeiledRivenFingerprint } from "@/src/helpers/rivenHelper";
 | 
					import type { IVeiledRivenFingerprint } from "../../helpers/rivenHelper.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
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,6 +1,6 @@
 | 
				
			|||||||
import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel";
 | 
					import { Alliance, AllianceMember, Guild, GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import { getAllianceClient } from "@/src/services/guildService";
 | 
					import { getAllianceClient } from "../../services/guildService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const confirmAllianceInvitationController: RequestHandler = async (req, res) => {
 | 
					export const confirmAllianceInvitationController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,17 +1,17 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { Guild, GuildMember } from "@/src/models/guildModel";
 | 
					import { Guild, GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import { Account } from "@/src/models/loginModel";
 | 
					import { Account } from "../../models/loginModel.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    deleteGuild,
 | 
					    deleteGuild,
 | 
				
			||||||
    getGuildClient,
 | 
					    getGuildClient,
 | 
				
			||||||
    giveClanKey,
 | 
					    giveClanKey,
 | 
				
			||||||
    hasGuildPermission,
 | 
					    hasGuildPermission,
 | 
				
			||||||
    removeDojoKeyItems
 | 
					    removeDojoKeyItems
 | 
				
			||||||
} from "@/src/services/guildService";
 | 
					} from "../../services/guildService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "@/src/services/loginService";
 | 
					import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "../../services/loginService.ts";
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { Types } from "mongoose";
 | 
					import { Types } from "mongoose";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,9 @@
 | 
				
			|||||||
import { toMongoDate } from "@/src/helpers/inventoryHelpers";
 | 
					import { toMongoDate } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { Guild } from "@/src/models/guildModel";
 | 
					import { Guild } from "../../models/guildModel.ts";
 | 
				
			||||||
import { checkClanAscensionHasRequiredContributors } from "@/src/services/guildService";
 | 
					import { checkClanAscensionHasRequiredContributors } from "../../services/guildService.ts";
 | 
				
			||||||
import { addFusionPoints, getInventory } from "@/src/services/inventoryService";
 | 
					import { addFusionPoints, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { Types } from "mongoose";
 | 
					import { Types } from "mongoose";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
import type { TGuildDatabaseDocument } from "@/src/models/guildModel";
 | 
					import type { TGuildDatabaseDocument } from "../../models/guildModel.ts";
 | 
				
			||||||
import { GuildMember } from "@/src/models/guildModel";
 | 
					import { GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
					import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    addGuildMemberMiscItemContribution,
 | 
					    addGuildMemberMiscItemContribution,
 | 
				
			||||||
    getDojoClient,
 | 
					    getDojoClient,
 | 
				
			||||||
@ -9,12 +9,12 @@ import {
 | 
				
			|||||||
    processDojoBuildMaterialsGathered,
 | 
					    processDojoBuildMaterialsGathered,
 | 
				
			||||||
    scaleRequiredCount,
 | 
					    scaleRequiredCount,
 | 
				
			||||||
    setDojoRoomLogFunded
 | 
					    setDojoRoomLogFunded
 | 
				
			||||||
} from "@/src/services/guildService";
 | 
					} from "../../services/guildService.ts";
 | 
				
			||||||
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
					import { addMiscItems, getInventory, updateCurrency } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IDojoContributable, IGuildMemberDatabase } from "@/src/types/guildTypes";
 | 
					import type { IDojoContributable, IGuildMemberDatabase } from "../../types/guildTypes.ts";
 | 
				
			||||||
import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import type { IDojoBuild } from "warframe-public-export-plus";
 | 
					import type { IDojoBuild } from "warframe-public-export-plus";
 | 
				
			||||||
import { ExportDojoRecipes } from "warframe-public-export-plus";
 | 
					import { ExportDojoRecipes } from "warframe-public-export-plus";
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
import type { TGuildDatabaseDocument, TGuildMemberDatabaseDocument } from "@/src/models/guildModel";
 | 
					import type { TGuildDatabaseDocument, TGuildMemberDatabaseDocument } from "../../models/guildModel.ts";
 | 
				
			||||||
import { Alliance, Guild, GuildMember } from "@/src/models/guildModel";
 | 
					import { Alliance, Guild, GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    addGuildMemberMiscItemContribution,
 | 
					    addGuildMemberMiscItemContribution,
 | 
				
			||||||
    addGuildMemberShipDecoContribution,
 | 
					    addGuildMemberShipDecoContribution,
 | 
				
			||||||
@ -7,17 +7,17 @@ import {
 | 
				
			|||||||
    addVaultMiscItems,
 | 
					    addVaultMiscItems,
 | 
				
			||||||
    addVaultShipDecos,
 | 
					    addVaultShipDecos,
 | 
				
			||||||
    getGuildForRequestEx
 | 
					    getGuildForRequestEx
 | 
				
			||||||
} from "@/src/services/guildService";
 | 
					} from "../../services/guildService.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    addFusionTreasures,
 | 
					    addFusionTreasures,
 | 
				
			||||||
    addMiscItems,
 | 
					    addMiscItems,
 | 
				
			||||||
    addShipDecorations,
 | 
					    addShipDecorations,
 | 
				
			||||||
    getInventory,
 | 
					    getInventory,
 | 
				
			||||||
    updateCurrency
 | 
					    updateCurrency
 | 
				
			||||||
} from "@/src/services/inventoryService";
 | 
					} from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { ITypeCount } from "@/src/types/commonTypes";
 | 
					import type { ITypeCount } from "../../types/commonTypes.ts";
 | 
				
			||||||
import type { IFusionTreasure, IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { IFusionTreasure, IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const contributeToVaultController: RequestHandler = async (req, res) => {
 | 
					export const contributeToVaultController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,9 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel";
 | 
					import { Alliance, AllianceMember, Guild, GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import { getAllianceClient } from "@/src/services/guildService";
 | 
					import { getAllianceClient } from "../../services/guildService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const createAllianceController: RequestHandler = async (req, res) => {
 | 
					export const createAllianceController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,10 +1,10 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { Guild, GuildMember } from "@/src/models/guildModel";
 | 
					import { Guild, GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import { createUniqueClanName, getGuildClient, giveClanKey } from "@/src/services/guildService";
 | 
					import { createUniqueClanName, getGuildClient, giveClanKey } from "../../services/guildService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
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,6 +1,6 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const creditsController: RequestHandler = async (req, res) => {
 | 
					export const creditsController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const inventory = (
 | 
					    const inventory = (
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
					import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { ICrewMemberClient } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { ICrewMemberClient } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { Types } from "mongoose";
 | 
					import { Types } from "mongoose";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,10 +1,10 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { addMiscItems, freeUpSlot, getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
					import { addMiscItems, freeUpSlot, getInventory, updateCurrency } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IOid } from "@/src/types/commonTypes";
 | 
					import type { IOid } from "../../types/commonTypes.ts";
 | 
				
			||||||
import type { ICrewShipComponentFingerprint } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { ICrewShipComponentFingerprint } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { ExportCustoms, ExportDojoRecipes } from "warframe-public-export-plus";
 | 
					import { ExportCustoms, ExportDojoRecipes } from "warframe-public-export-plus";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -3,19 +3,19 @@ import {
 | 
				
			|||||||
    addCrewShipRawSalvage,
 | 
					    addCrewShipRawSalvage,
 | 
				
			||||||
    getInventory,
 | 
					    getInventory,
 | 
				
			||||||
    addEquipment
 | 
					    addEquipment
 | 
				
			||||||
} from "@/src/services/inventoryService";
 | 
					} from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import type {
 | 
					import type {
 | 
				
			||||||
    ICrewShipComponentFingerprint,
 | 
					    ICrewShipComponentFingerprint,
 | 
				
			||||||
    IInnateDamageFingerprint
 | 
					    IInnateDamageFingerprint
 | 
				
			||||||
} from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					} from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
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 "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import { getRandomInt } from "@/src/services/rngService";
 | 
					import { getRandomInt } from "../../services/rngService.ts";
 | 
				
			||||||
import type { IFingerprintStat } from "@/src/helpers/rivenHelper";
 | 
					import type { IFingerprintStat } from "../../helpers/rivenHelper.ts";
 | 
				
			||||||
import type { IEquipmentDatabase } from "@/src/types/equipmentTypes";
 | 
					import type { IEquipmentDatabase } from "../../types/equipmentTypes.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const crewShipIdentifySalvageController: RequestHandler = async (req, res) => {
 | 
					export const crewShipIdentifySalvageController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const accountId = await getAccountIdForRequest(req);
 | 
					    const accountId = await getAccountIdForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,10 +1,10 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { Guild } from "@/src/models/guildModel";
 | 
					import { Guild } from "../../models/guildModel.ts";
 | 
				
			||||||
import { hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
 | 
					import { hasAccessToDojo, hasGuildPermission } from "../../services/guildService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountForRequest, getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest, getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const customObstacleCourseLeaderboardController: RequestHandler = async (req, res) => {
 | 
					export const customObstacleCourseLeaderboardController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
import { getGuildForRequest, hasGuildPermission } from "@/src/services/guildService";
 | 
					import { getGuildForRequest, hasGuildPermission } from "../../services/guildService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IGuildRank } from "@/src/types/guildTypes";
 | 
					import type { IGuildRank } from "../../types/guildTypes.ts";
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const customizeGuildRanksController: RequestHandler = async (req, res) => {
 | 
					export const customizeGuildRanksController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
import { AllianceMember, GuildMember } from "@/src/models/guildModel";
 | 
					import { AllianceMember, GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const declineAllianceInviteController: RequestHandler = async (req, res) => {
 | 
					export const declineAllianceInviteController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
import { GuildMember } from "@/src/models/guildModel";
 | 
					import { GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const declineGuildInviteController: RequestHandler = async (req, res) => {
 | 
					export const declineGuildInviteController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { deleteSession } from "@/src/managers/sessionManager";
 | 
					import { deleteSession } from "../../managers/sessionManager.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const deleteSessionController: RequestHandler = (_req, res) => {
 | 
					const deleteSessionController: RequestHandler = (_req, res) => {
 | 
				
			||||||
    deleteSession(_req.query.sessionId as string);
 | 
					    deleteSession(_req.query.sessionId as string);
 | 
				
			||||||
 | 
				
			|||||||
@ -5,11 +5,11 @@ import {
 | 
				
			|||||||
    hasGuildPermission,
 | 
					    hasGuildPermission,
 | 
				
			||||||
    refundDojoDeco,
 | 
					    refundDojoDeco,
 | 
				
			||||||
    removeDojoDeco
 | 
					    removeDojoDeco
 | 
				
			||||||
} from "@/src/services/guildService";
 | 
					} from "../../services/guildService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const destroyDojoDecoController: RequestHandler = async (req, res) => {
 | 
					export const destroyDojoDecoController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel";
 | 
					import { Alliance, AllianceMember, Guild, GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import { parallelForeach } from "@/src/utils/async-utils";
 | 
					import { parallelForeach } from "../../utils/async-utils.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const divvyAllianceVaultController: RequestHandler = async (req, res) => {
 | 
					export const divvyAllianceVaultController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,14 @@
 | 
				
			|||||||
import type { TGuildDatabaseDocument } from "@/src/models/guildModel";
 | 
					import type { TGuildDatabaseDocument } from "../../models/guildModel.ts";
 | 
				
			||||||
import { GuildMember } from "@/src/models/guildModel";
 | 
					import { GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, scaleRequiredCount } from "@/src/services/guildService";
 | 
					import {
 | 
				
			||||||
import { getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
					    getDojoClient,
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					    getGuildForRequestEx,
 | 
				
			||||||
import type { IDojoContributable } from "@/src/types/guildTypes";
 | 
					    hasAccessToDojo,
 | 
				
			||||||
 | 
					    scaleRequiredCount
 | 
				
			||||||
 | 
					} from "../../services/guildService.ts";
 | 
				
			||||||
 | 
					import { getInventory, updateCurrency } from "../../services/inventoryService.ts";
 | 
				
			||||||
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
 | 
					import type { IDojoContributable } from "../../types/guildTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import type { IDojoBuild } from "warframe-public-export-plus";
 | 
					import type { IDojoBuild } from "warframe-public-export-plus";
 | 
				
			||||||
import { ExportDojoRecipes } from "warframe-public-export-plus";
 | 
					import { ExportDojoRecipes } from "warframe-public-export-plus";
 | 
				
			||||||
 | 
				
			|||||||
@ -1,11 +1,11 @@
 | 
				
			|||||||
import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
 | 
					import { toMongoDate, toOid } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
 | 
					import { addMiscItems, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { fromStoreItem } from "@/src/services/itemDataService";
 | 
					import { fromStoreItem } from "../../services/itemDataService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getRandomInt, getRandomWeightedRewardUc } from "@/src/services/rngService";
 | 
					import { getRandomInt, getRandomWeightedRewardUc } from "../../services/rngService.ts";
 | 
				
			||||||
import type { IMongoDate, IOid } from "@/src/types/commonTypes";
 | 
					import type { IMongoDate, IOid } from "../../types/commonTypes.ts";
 | 
				
			||||||
import type { IDroneClient } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { IDroneClient } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import type { 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";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,14 +1,18 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { combineInventoryChanges, getInventory } from "@/src/services/inventoryService";
 | 
					import { combineInventoryChanges, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import type { IEndlessXpReward, IInventoryClient, TEndlessXpCategory } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type {
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					    IEndlessXpReward,
 | 
				
			||||||
 | 
					    IInventoryClient,
 | 
				
			||||||
 | 
					    TEndlessXpCategory
 | 
				
			||||||
 | 
					} from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import type { ICountedStoreItem } from "warframe-public-export-plus";
 | 
					import type { ICountedStoreItem } from "warframe-public-export-plus";
 | 
				
			||||||
import { ExportRewards } from "warframe-public-export-plus";
 | 
					import { ExportRewards } from "warframe-public-export-plus";
 | 
				
			||||||
import { getRandomElement } from "@/src/services/rngService";
 | 
					import { getRandomElement } from "../../services/rngService.ts";
 | 
				
			||||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
					import { handleStoreItemAcquisition } from "../../services/purchaseService.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const endlessXpController: RequestHandler = async (req, res) => {
 | 
					export const endlessXpController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const accountId = await getAccountIdForRequest(req);
 | 
					    const accountId = await getAccountIdForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
import { toMongoDate } from "@/src/helpers/inventoryHelpers";
 | 
					import { toMongoDate } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { getInventory, updateEntratiVault } from "@/src/services/inventoryService";
 | 
					import { getInventory, updateEntratiVault } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const entratiLabConquestModeController: RequestHandler = async (req, res) => {
 | 
					export const entratiLabConquestModeController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,10 +1,10 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
 | 
					import { addMiscItems, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import type { WeaponTypeInternal } from "@/src/services/itemDataService";
 | 
					import type { WeaponTypeInternal } from "../../services/itemDataService.ts";
 | 
				
			||||||
import { getRecipe } from "@/src/services/itemDataService";
 | 
					import { getRecipe } from "../../services/itemDataService.ts";
 | 
				
			||||||
import { EquipmentFeatures } from "@/src/types/equipmentTypes";
 | 
					import { EquipmentFeatures } from "../../types/equipmentTypes.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const evolveWeaponController: RequestHandler = async (req, res) => {
 | 
					export const evolveWeaponController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const accountId = await getAccountIdForRequest(req);
 | 
					    const accountId = await getAccountIdForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getSession } from "@/src/managers/sessionManager";
 | 
					import { getSession } from "../../managers/sessionManager.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import type { IFindSessionRequest } from "@/src/types/session";
 | 
					import type { IFindSessionRequest } from "../../types/session.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
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,7 +1,7 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { addMiscItems, addStanding, getInventory } from "@/src/services/inventoryService";
 | 
					import { addMiscItems, addStanding, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { ExportResources } from "warframe-public-export-plus";
 | 
					import { ExportResources } from "warframe-public-export-plus";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,11 +1,11 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getInventory, addMiscItems, addEquipment, occupySlot } from "@/src/services/inventoryService";
 | 
					import { getInventory, addMiscItems, addEquipment, occupySlot } from "../../services/inventoryService.ts";
 | 
				
			||||||
import type { IMiscItem, TFocusPolarity, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { IMiscItem, TFocusPolarity, TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import { ExportFocusUpgrades } from "warframe-public-export-plus";
 | 
					import { ExportFocusUpgrades } from "warframe-public-export-plus";
 | 
				
			||||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
					import { Inventory } from "../../models/inventoryModels/inventoryModel.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const focusController: RequestHandler = async (req, res) => {
 | 
					export const focusController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const accountId = await getAccountIdForRequest(req);
 | 
					    const accountId = await getAccountIdForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,9 @@
 | 
				
			|||||||
import type { 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 "../../services/loginService.ts";
 | 
				
			||||||
import { addFusionTreasures, addMiscItems, getInventory } from "@/src/services/inventoryService";
 | 
					import { addFusionTreasures, addMiscItems, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { parseFusionTreasure } from "@/src/helpers/inventoryHelpers";
 | 
					import { parseFusionTreasure } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface IFusionTreasureRequest {
 | 
					interface IFusionTreasureRequest {
 | 
				
			||||||
    oldTreasureName: string;
 | 
					    oldTreasureName: string;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,13 +1,13 @@
 | 
				
			|||||||
import { toMongoDate } from "@/src/helpers/inventoryHelpers";
 | 
					import { toMongoDate } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { addMiscItem, getInventory } from "@/src/services/inventoryService";
 | 
					import { addMiscItem, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { toStoreItem } from "@/src/services/itemDataService";
 | 
					import { toStoreItem } from "../../services/itemDataService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { createGarden, getPersonalRooms } from "@/src/services/personalRoomsService";
 | 
					import { createGarden, getPersonalRooms } from "../../services/personalRoomsService.ts";
 | 
				
			||||||
import type { IMongoDate } from "@/src/types/commonTypes";
 | 
					import type { IMongoDate } from "../../types/commonTypes.ts";
 | 
				
			||||||
import type { IMissionReward } from "@/src/types/missionTypes";
 | 
					import type { IMissionReward } from "../../types/missionTypes.ts";
 | 
				
			||||||
import type { IGardeningClient, IPersonalRoomsClient } from "@/src/types/personalRoomsTypes";
 | 
					import type { IGardeningClient, IPersonalRoomsClient } from "../../types/personalRoomsTypes.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import type { 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";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { updateGeneric } from "@/src/services/inventoryService";
 | 
					import { updateGeneric } from "../../services/inventoryService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import type { IGenericUpdate } from "@/src/types/genericUpdate";
 | 
					import type { IGenericUpdate } from "../../types/genericUpdate.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 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.
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
import { Alliance, Guild } from "@/src/models/guildModel";
 | 
					import { Alliance, Guild } from "../../models/guildModel.ts";
 | 
				
			||||||
import { getAllianceClient } from "@/src/services/guildService";
 | 
					import { getAllianceClient } from "../../services/guildService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getAllianceController: RequestHandler = async (req, res) => {
 | 
					export const getAllianceController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
import { DailyDeal } from "@/src/models/worldStateModel";
 | 
					import { DailyDeal } from "../../models/worldStateModel.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getDailyDealStockLevelsController: RequestHandler = async (req, res) => {
 | 
					export const getDailyDealStockLevelsController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
					import { toOid } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { Friendship } from "@/src/models/friendModel";
 | 
					import { Friendship } from "../../models/friendModel.ts";
 | 
				
			||||||
import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "@/src/services/friendService";
 | 
					import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "../../services/friendService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IFriendInfo } from "@/src/types/friendTypes";
 | 
					import type { IFriendInfo } from "../../types/friendTypes.ts";
 | 
				
			||||||
import type { 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
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
import { GuildMember } from "@/src/models/guildModel";
 | 
					import { GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IGuildMemberClient } from "@/src/types/guildTypes";
 | 
					import type { IGuildMemberClient } from "../../types/guildTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getGuildContributionsController: RequestHandler = async (req, res) => {
 | 
					export const getGuildContributionsController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,9 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { Guild } from "@/src/models/guildModel";
 | 
					import { Guild } from "../../models/guildModel.ts";
 | 
				
			||||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { createUniqueClanName, getGuildClient } from "@/src/services/guildService";
 | 
					import { createUniqueClanName, getGuildClient } from "../../services/guildService.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getGuildController: RequestHandler = async (req, res) => {
 | 
					export const getGuildController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const account = await getAccountForRequest(req);
 | 
					    const account = await getAccountForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import type { 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 "../../models/guildModel.ts";
 | 
				
			||||||
import { getDojoClient } from "@/src/services/guildService";
 | 
					import { getDojoClient } from "../../services/guildService.ts";
 | 
				
			||||||
import { Account } from "@/src/models/loginModel";
 | 
					import { Account } from "../../models/loginModel.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getGuildDojoController: RequestHandler = async (req, res) => {
 | 
					export const getGuildDojoController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const guildId = req.query.guildId as string;
 | 
					    const guildId = req.query.guildId as string;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { Guild } from "@/src/models/guildModel";
 | 
					import { Guild } from "../../models/guildModel.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getGuildEventScoreController: RequestHandler = async (req, res) => {
 | 
					export const getGuildEventScoreController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const account = await getAccountForRequest(req);
 | 
					    const account = await getAccountForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import { toMongoDate } from "@/src/helpers/inventoryHelpers";
 | 
					import { toMongoDate } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { Guild } from "@/src/models/guildModel";
 | 
					import { Guild } from "../../models/guildModel.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IMongoDate } from "@/src/types/commonTypes";
 | 
					import type { IMongoDate } from "../../types/commonTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getGuildLogController: RequestHandler = async (req, res) => {
 | 
					export const getGuildLogController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
					import { toOid } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { Account, Ignore } from "@/src/models/loginModel";
 | 
					import { Account, Ignore } from "../../models/loginModel.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IFriendInfo } from "@/src/types/friendTypes";
 | 
					import type { IFriendInfo } from "../../types/friendTypes.ts";
 | 
				
			||||||
import { parallelForeach } from "@/src/utils/async-utils";
 | 
					import { parallelForeach } from "../../utils/async-utils.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getIgnoredUsersController: RequestHandler = async (req, res) => {
 | 
					export const getIgnoredUsersController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
					import { Inventory } from "../../models/inventoryModels/inventoryModel.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { generateRewardSeed } from "@/src/services/rngService";
 | 
					import { generateRewardSeed } from "../../services/rngService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getNewRewardSeedController: RequestHandler = async (req, res) => {
 | 
					export const getNewRewardSeedController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,9 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { EPOCH, getSeasonChallengePools, getWorldState, pushWeeklyActs } from "@/src/services/worldStateService";
 | 
					import { EPOCH, getSeasonChallengePools, getWorldState, pushWeeklyActs } from "../../services/worldStateService.ts";
 | 
				
			||||||
import { unixTimesInMs } from "@/src/constants/timeConstants";
 | 
					import { unixTimesInMs } from "../../constants/timeConstants.ts";
 | 
				
			||||||
import type { ISeasonChallenge } from "@/src/types/worldStateTypes";
 | 
					import type { ISeasonChallenge } from "../../types/worldStateTypes.ts";
 | 
				
			||||||
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,11 +1,11 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { config } from "@/src/services/configService";
 | 
					import { config } from "../../services/configService.ts";
 | 
				
			||||||
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 "../../services/loginService.ts";
 | 
				
			||||||
import { createGarden, getPersonalRooms } from "@/src/services/personalRoomsService";
 | 
					import { createGarden, getPersonalRooms } from "../../services/personalRoomsService.ts";
 | 
				
			||||||
import type { IGetShipResponse, IPersonalRoomsClient } from "@/src/types/personalRoomsTypes";
 | 
					import type { IGetShipResponse, IPersonalRoomsClient } from "../../types/personalRoomsTypes.ts";
 | 
				
			||||||
import { getLoadout } from "@/src/services/loadoutService";
 | 
					import { getLoadout } from "../../services/loadoutService.ts";
 | 
				
			||||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
					import { toOid } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getShipController: RequestHandler = async (req, res) => {
 | 
					export const getShipController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const accountId = await getAccountIdForRequest(req);
 | 
					    const accountId = await getAccountIdForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { applyStandingToVendorManifest, getVendorManifestByTypeName } from "@/src/services/serversideVendorsService";
 | 
					import { applyStandingToVendorManifest, getVendorManifestByTypeName } from "../../services/serversideVendorsService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { config } from "@/src/services/configService";
 | 
					import { config } from "../../services/configService.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getVendorInfoController: RequestHandler = async (req, res) => {
 | 
					export const getVendorInfoController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    let manifest = getVendorManifestByTypeName(req.query.vendor as string);
 | 
					    let manifest = getVendorManifestByTypeName(req.query.vendor as string);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { crackRelic } from "@/src/helpers/relicHelper";
 | 
					import { crackRelic } from "../../helpers/relicHelper.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IVoidTearParticipantInfo } from "@/src/types/requestTypes";
 | 
					import type { IVoidTearParticipantInfo } from "../../types/requestTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getVoidProjectionRewardsController: RequestHandler = async (req, res) => {
 | 
					export const getVoidProjectionRewardsController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,18 +1,18 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { Account } from "@/src/models/loginModel";
 | 
					import { Account } from "../../models/loginModel.ts";
 | 
				
			||||||
import { areFriends } from "@/src/services/friendService";
 | 
					import { areFriends } from "../../services/friendService.ts";
 | 
				
			||||||
import { createMessage } from "@/src/services/inboxService";
 | 
					import { createMessage } from "../../services/inboxService.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    combineInventoryChanges,
 | 
					    combineInventoryChanges,
 | 
				
			||||||
    getEffectiveAvatarImageType,
 | 
					    getEffectiveAvatarImageType,
 | 
				
			||||||
    getInventory,
 | 
					    getInventory,
 | 
				
			||||||
    updateCurrency
 | 
					    updateCurrency
 | 
				
			||||||
} from "@/src/services/inventoryService";
 | 
					} from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService";
 | 
					import { getAccountForRequest, getSuffixedName } from "../../services/loginService.ts";
 | 
				
			||||||
import { handleDailyDealPurchase, handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
					import { handleDailyDealPurchase, handleStoreItemAcquisition } from "../../services/purchaseService.ts";
 | 
				
			||||||
import type { IOid } from "@/src/types/commonTypes";
 | 
					import type { IOid } from "../../types/commonTypes.ts";
 | 
				
			||||||
import type { IPurchaseParams, IPurchaseResponse } from "@/src/types/purchaseTypes";
 | 
					import type { IPurchaseParams, IPurchaseResponse } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import { PurchaseSource } from "@/src/types/purchaseTypes";
 | 
					import { PurchaseSource } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { ExportBundles, ExportFlavour } from "warframe-public-export-plus";
 | 
					import { ExportBundles, ExportFlavour } from "warframe-public-export-plus";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,14 +1,14 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
					import { sendWsBroadcastTo } from "../../services/wsService.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
 | 
					import { addMiscItems, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import type { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
					import type { ArtifactPolarity } from "../../types/inventoryTypes/commonInventoryTypes.ts";
 | 
				
			||||||
import { ExportRecipes } from "warframe-public-export-plus";
 | 
					import { ExportRecipes } from "warframe-public-export-plus";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import type { IEquipmentClient } from "@/src/types/equipmentTypes";
 | 
					import type { IEquipmentClient } from "../../types/equipmentTypes.ts";
 | 
				
			||||||
import { EquipmentFeatures } from "@/src/types/equipmentTypes";
 | 
					import { EquipmentFeatures } from "../../types/equipmentTypes.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface IGildWeaponRequest {
 | 
					interface IGildWeaponRequest {
 | 
				
			||||||
    ItemName: string;
 | 
					    ItemName: string;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,9 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { parseString } from "@/src/helpers/general";
 | 
					import { parseString } from "../../helpers/general.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { giveKeyChainItem } from "@/src/services/questService";
 | 
					import { giveKeyChainItem } from "../../services/questService.ts";
 | 
				
			||||||
import type { IKeyChainRequest } from "@/src/types/requestTypes";
 | 
					import type { IKeyChainRequest } from "../../types/requestTypes.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
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,7 +1,7 @@
 | 
				
			|||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { giveKeyChainMessage } from "@/src/services/questService";
 | 
					import { giveKeyChainMessage } from "../../services/questService.ts";
 | 
				
			||||||
import type { IKeyChainRequest } from "@/src/types/requestTypes";
 | 
					import type { IKeyChainRequest } from "../../types/requestTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const giveKeyChainTriggeredMessageController: RequestHandler = async (req, res) => {
 | 
					export const giveKeyChainTriggeredMessageController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { addItem, getInventory } from "@/src/services/inventoryService";
 | 
					import { addItem, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IOid } from "@/src/types/commonTypes";
 | 
					import type { IOid } from "../../types/commonTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const giveQuestKeyRewardController: RequestHandler = async (req, res) => {
 | 
					export const giveQuestKeyRewardController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { addLoreFragmentScans, addShipDecorations, getInventory } from "@/src/services/inventoryService";
 | 
					import { addLoreFragmentScans, addShipDecorations, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { ITypeCount } from "@/src/types/commonTypes";
 | 
					import type { ITypeCount } from "../../types/commonTypes.ts";
 | 
				
			||||||
import type { ILoreFragmentScan } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { ILoreFragmentScan } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const giveShipDecoAndLoreFragmentController: RequestHandler = async (req, res) => {
 | 
					export const giveShipDecoAndLoreFragmentController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { addStartingGear, getInventory } from "@/src/services/inventoryService";
 | 
					import { addStartingGear, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { TPartialStartingGear } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { TPartialStartingGear } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const giveStartingGearController: RequestHandler = async (req, res) => {
 | 
					export const giveStartingGearController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -11,9 +11,9 @@ import {
 | 
				
			|||||||
    removePigmentsFromGuildMembers,
 | 
					    removePigmentsFromGuildMembers,
 | 
				
			||||||
    scaleRequiredCount,
 | 
					    scaleRequiredCount,
 | 
				
			||||||
    setGuildTechLogState
 | 
					    setGuildTechLogState
 | 
				
			||||||
} from "@/src/services/guildService";
 | 
					} from "../../services/guildService.ts";
 | 
				
			||||||
import { ExportDojoRecipes, ExportRailjackWeapons } from "warframe-public-export-plus";
 | 
					import { ExportDojoRecipes, ExportRailjackWeapons } from "warframe-public-export-plus";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    addCrewShipWeaponSkin,
 | 
					    addCrewShipWeaponSkin,
 | 
				
			||||||
    addEquipment,
 | 
					    addEquipment,
 | 
				
			||||||
@ -24,17 +24,17 @@ import {
 | 
				
			|||||||
    getInventory,
 | 
					    getInventory,
 | 
				
			||||||
    occupySlot,
 | 
					    occupySlot,
 | 
				
			||||||
    updateCurrency
 | 
					    updateCurrency
 | 
				
			||||||
} from "@/src/services/inventoryService";
 | 
					} from "../../services/inventoryService.ts";
 | 
				
			||||||
import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import { config } from "@/src/services/configService";
 | 
					import { config } from "../../services/configService.ts";
 | 
				
			||||||
import type { ITechProjectClient } from "@/src/types/guildTypes";
 | 
					import type { ITechProjectClient } from "../../types/guildTypes.ts";
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import { GuildMember } from "@/src/models/guildModel";
 | 
					import { GuildMember } from "../../models/guildModel.ts";
 | 
				
			||||||
import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
 | 
					import { toMongoDate, toOid } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
					import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
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,10 +1,10 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { createNewSession } from "@/src/managers/sessionManager";
 | 
					import { createNewSession } from "../../managers/sessionManager.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import type { ISession } from "@/src/types/session";
 | 
					import type { ISession } from "../../types/session.ts";
 | 
				
			||||||
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 "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const hostSessionController: RequestHandler = async (req, res) => {
 | 
					const hostSessionController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const account = await getAccountForRequest(req);
 | 
					    const account = await getAccountForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { addBooster, getInventory } from "@/src/services/inventoryService";
 | 
					import { addBooster, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getRandomInt } from "@/src/services/rngService";
 | 
					import { getRandomInt } from "../../services/rngService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { ExportBoosters } from "warframe-public-export-plus";
 | 
					import { ExportBoosters } from "warframe-public-export-plus";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { Inbox } from "@/src/models/inboxModel";
 | 
					import { Inbox } from "../../models/inboxModel.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    createMessage,
 | 
					    createMessage,
 | 
				
			||||||
    createNewEventMessages,
 | 
					    createNewEventMessages,
 | 
				
			||||||
@ -7,20 +7,20 @@ import {
 | 
				
			|||||||
    deleteMessageRead,
 | 
					    deleteMessageRead,
 | 
				
			||||||
    getAllMessagesSorted,
 | 
					    getAllMessagesSorted,
 | 
				
			||||||
    getMessage
 | 
					    getMessage
 | 
				
			||||||
} from "@/src/services/inboxService";
 | 
					} from "../../services/inboxService.ts";
 | 
				
			||||||
import { getAccountForRequest, getAccountFromSuffixedName, getSuffixedName } from "@/src/services/loginService";
 | 
					import { getAccountForRequest, getAccountFromSuffixedName, getSuffixedName } from "../../services/loginService.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    addItems,
 | 
					    addItems,
 | 
				
			||||||
    combineInventoryChanges,
 | 
					    combineInventoryChanges,
 | 
				
			||||||
    getEffectiveAvatarImageType,
 | 
					    getEffectiveAvatarImageType,
 | 
				
			||||||
    getInventory,
 | 
					    getInventory,
 | 
				
			||||||
    updateCurrency
 | 
					    updateCurrency
 | 
				
			||||||
} from "@/src/services/inventoryService";
 | 
					} from "../../services/inventoryService.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import { ExportFlavour } from "warframe-public-export-plus";
 | 
					import { ExportFlavour } from "warframe-public-export-plus";
 | 
				
			||||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
					import { handleStoreItemAcquisition } from "../../services/purchaseService.ts";
 | 
				
			||||||
import { fromStoreItem, isStoreItem } from "@/src/services/itemDataService";
 | 
					import { fromStoreItem, isStoreItem } from "../../services/itemDataService.ts";
 | 
				
			||||||
import type { IOid } from "@/src/types/commonTypes";
 | 
					import type { IOid } from "../../types/commonTypes.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
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,25 +1,25 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { getInventory, addMiscItems, updateCurrency, addRecipes, freeUpSlot } from "@/src/services/inventoryService";
 | 
					import { getInventory, addMiscItems, updateCurrency, addRecipes, freeUpSlot } from "../../services/inventoryService.ts";
 | 
				
			||||||
import type { IOid } from "@/src/types/commonTypes";
 | 
					import type { IOid } from "../../types/commonTypes.ts";
 | 
				
			||||||
import type {
 | 
					import type {
 | 
				
			||||||
    IConsumedSuit,
 | 
					    IConsumedSuit,
 | 
				
			||||||
    IHelminthFoodRecord,
 | 
					    IHelminthFoodRecord,
 | 
				
			||||||
    IInventoryClient,
 | 
					    IInventoryClient,
 | 
				
			||||||
    IMiscItem
 | 
					    IMiscItem
 | 
				
			||||||
} from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					} from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { ExportMisc } from "warframe-public-export-plus";
 | 
					import { ExportMisc } from "warframe-public-export-plus";
 | 
				
			||||||
import { getRecipe } from "@/src/services/itemDataService";
 | 
					import { getRecipe } from "../../services/itemDataService.ts";
 | 
				
			||||||
import { toMongoDate, version_compare } from "@/src/helpers/inventoryHelpers";
 | 
					import { toMongoDate, version_compare } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import { colorToShard } from "@/src/helpers/shardHelper";
 | 
					import { colorToShard } from "../../helpers/shardHelper.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    addInfestedFoundryXP,
 | 
					    addInfestedFoundryXP,
 | 
				
			||||||
    applyCheatsToInfestedFoundry,
 | 
					    applyCheatsToInfestedFoundry,
 | 
				
			||||||
    handleSubsumeCompletion
 | 
					    handleSubsumeCompletion
 | 
				
			||||||
} from "@/src/services/infestedFoundryService";
 | 
					} from "../../services/infestedFoundryService.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const infestedFoundryController: RequestHandler = async (req, res) => {
 | 
					export const infestedFoundryController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const account = await getAccountForRequest(req);
 | 
					    const account = await getAccountForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,17 +1,17 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
					import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts";
 | 
				
			||||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
					import { Inventory } from "../../models/inventoryModels/inventoryModel.ts";
 | 
				
			||||||
import { config } from "@/src/services/configService";
 | 
					import { config } from "../../services/configService.ts";
 | 
				
			||||||
import allDialogue from "@/static/fixed_responses/allDialogue.json";
 | 
					import allDialogue from "../../../static/fixed_responses/allDialogue.json";
 | 
				
			||||||
import type { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
 | 
					import type { ILoadoutDatabase } from "../../types/saveLoadoutTypes.ts";
 | 
				
			||||||
import type { IInventoryClient, IShipInventory } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { IInventoryClient, IShipInventory } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import { equipmentKeys } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import type { IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
					import type { IPolarity } from "../../types/inventoryTypes/commonInventoryTypes.ts";
 | 
				
			||||||
import { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
					import { ArtifactPolarity } from "../../types/inventoryTypes/commonInventoryTypes.ts";
 | 
				
			||||||
import type { ICountedItem } from "warframe-public-export-plus";
 | 
					import type { ICountedItem } from "warframe-public-export-plus";
 | 
				
			||||||
import { eFaction, ExportCustoms, ExportFlavour, ExportResources, ExportVirtuals } from "warframe-public-export-plus";
 | 
					import { eFaction, ExportCustoms, ExportFlavour, ExportResources, ExportVirtuals } from "warframe-public-export-plus";
 | 
				
			||||||
import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "@/src/services/infestedFoundryService";
 | 
					import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "../../services/infestedFoundryService.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    addEmailItem,
 | 
					    addEmailItem,
 | 
				
			||||||
    addItem,
 | 
					    addItem,
 | 
				
			||||||
@ -21,22 +21,22 @@ import {
 | 
				
			|||||||
    cleanupInventory,
 | 
					    cleanupInventory,
 | 
				
			||||||
    createLibraryDailyTask,
 | 
					    createLibraryDailyTask,
 | 
				
			||||||
    getCalendarProgress
 | 
					    getCalendarProgress
 | 
				
			||||||
} from "@/src/services/inventoryService";
 | 
					} from "../../services/inventoryService.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import { addString, catBreadHash } from "@/src/helpers/stringHelpers";
 | 
					import { addString, catBreadHash } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { Types } from "mongoose";
 | 
					import { Types } from "mongoose";
 | 
				
			||||||
import { getNemesisManifest } from "@/src/helpers/nemesisHelpers";
 | 
					import { getNemesisManifest } from "../../helpers/nemesisHelpers.ts";
 | 
				
			||||||
import { getPersonalRooms } from "@/src/services/personalRoomsService";
 | 
					import { getPersonalRooms } from "../../services/personalRoomsService.ts";
 | 
				
			||||||
import type { IPersonalRoomsClient } from "@/src/types/personalRoomsTypes";
 | 
					import type { IPersonalRoomsClient } from "../../types/personalRoomsTypes.ts";
 | 
				
			||||||
import { Ship } from "@/src/models/shipModel";
 | 
					import { Ship } from "../../models/shipModel.ts";
 | 
				
			||||||
import { toLegacyOid, toOid, version_compare } from "@/src/helpers/inventoryHelpers";
 | 
					import { toLegacyOid, toOid, version_compare } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { Inbox } from "@/src/models/inboxModel";
 | 
					import { Inbox } from "../../models/inboxModel.ts";
 | 
				
			||||||
import { unixTimesInMs } from "@/src/constants/timeConstants";
 | 
					import { unixTimesInMs } from "../../constants/timeConstants.ts";
 | 
				
			||||||
import { DailyDeal } from "@/src/models/worldStateModel";
 | 
					import { DailyDeal } from "../../models/worldStateModel.ts";
 | 
				
			||||||
import { EquipmentFeatures } from "@/src/types/equipmentTypes";
 | 
					import { EquipmentFeatures } from "../../types/equipmentTypes.ts";
 | 
				
			||||||
import { generateRewardSeed } from "@/src/services/rngService";
 | 
					import { generateRewardSeed } from "../../services/rngService.ts";
 | 
				
			||||||
import { getInvasionByOid, getWorldState } from "@/src/services/worldStateService";
 | 
					import { getInvasionByOid, getWorldState } from "../../services/worldStateService.ts";
 | 
				
			||||||
import { createMessage } from "@/src/services/inboxService";
 | 
					import { createMessage } from "../../services/inboxService.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const inventoryController: RequestHandler = async (request, response) => {
 | 
					export const inventoryController: RequestHandler = async (request, response) => {
 | 
				
			||||||
    const account = await getAccountForRequest(request);
 | 
					    const account = await getAccountForRequest(request);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getInventory, updateCurrency, updateSlots } from "@/src/services/inventoryService";
 | 
					import { getInventory, updateCurrency, updateSlots } from "../../services/inventoryService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { exhaustive } from "@/src/utils/ts-utils";
 | 
					import { exhaustive } from "../../utils/ts-utils.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
    loadout slots are additionally purchased slots only
 | 
					    loadout slots are additionally purchased slots only
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getSessionByID } from "@/src/managers/sessionManager";
 | 
					import { getSessionByID } from "../../managers/sessionManager.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const joinSessionController: RequestHandler = (req, res) => {
 | 
					export const joinSessionController: RequestHandler = (req, res) => {
 | 
				
			||||||
    const reqBody = JSON.parse(String(req.body)) as IJoinSessionRequest;
 | 
					    const reqBody = JSON.parse(String(req.body)) as IJoinSessionRequest;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,14 +1,14 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { config } from "@/src/services/configService";
 | 
					import { config } from "../../services/configService.ts";
 | 
				
			||||||
import { buildConfig } from "@/src/services/buildConfigService";
 | 
					import { buildConfig } from "../../services/buildConfigService.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { Account } from "@/src/models/loginModel";
 | 
					import { Account } from "../../models/loginModel.ts";
 | 
				
			||||||
import { createAccount, createNonce, getUsernameFromEmail, isCorrectPassword } from "@/src/services/loginService";
 | 
					import { createAccount, createNonce, getUsernameFromEmail, isCorrectPassword } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IDatabaseAccountJson, ILoginRequest, ILoginResponse } from "@/src/types/loginTypes";
 | 
					import type { IDatabaseAccountJson, ILoginRequest, ILoginResponse } from "../../types/loginTypes.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import { version_compare } from "@/src/helpers/inventoryHelpers";
 | 
					import { version_compare } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
					import { sendWsBroadcastTo } from "../../services/wsService.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const loginController: RequestHandler = async (request, response) => {
 | 
					export const loginController: RequestHandler = async (request, response) => {
 | 
				
			||||||
    const loginRequest = JSON.parse(String(request.body)) as ILoginRequest; // parse octet stream of json data to json object
 | 
					    const loginRequest = JSON.parse(String(request.body)) as ILoginRequest; // parse octet stream of json data to json object
 | 
				
			||||||
 | 
				
			|||||||
@ -1,15 +1,15 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { ILoginRewardsReponse } from "@/src/services/loginRewardService";
 | 
					import type { ILoginRewardsReponse } from "../../services/loginRewardService.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    claimLoginReward,
 | 
					    claimLoginReward,
 | 
				
			||||||
    getRandomLoginRewards,
 | 
					    getRandomLoginRewards,
 | 
				
			||||||
    isLoginRewardAChoice,
 | 
					    isLoginRewardAChoice,
 | 
				
			||||||
    setAccountGotLoginRewardToday
 | 
					    setAccountGotLoginRewardToday
 | 
				
			||||||
} from "@/src/services/loginRewardService";
 | 
					} from "../../services/loginRewardService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { config } from "@/src/services/configService";
 | 
					import { config } from "../../services/configService.ts";
 | 
				
			||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
					import { sendWsBroadcastTo } from "../../services/wsService.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const loginRewardsController: RequestHandler = async (req, res) => {
 | 
					export const loginRewardsController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const account = await getAccountForRequest(req);
 | 
					    const account = await getAccountForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,14 +1,14 @@
 | 
				
			|||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    claimLoginReward,
 | 
					    claimLoginReward,
 | 
				
			||||||
    getRandomLoginRewards,
 | 
					    getRandomLoginRewards,
 | 
				
			||||||
    setAccountGotLoginRewardToday
 | 
					    setAccountGotLoginRewardToday
 | 
				
			||||||
} from "@/src/services/loginRewardService";
 | 
					} from "../../services/loginRewardService.ts";
 | 
				
			||||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
					import { handleStoreItemAcquisition } from "../../services/purchaseService.ts";
 | 
				
			||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
					import { sendWsBroadcastTo } from "../../services/wsService.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const loginRewardsSelectionController: RequestHandler = async (req, res) => {
 | 
					export const loginRewardsSelectionController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { Account } from "@/src/models/loginModel";
 | 
					import { Account } from "../../models/loginModel.ts";
 | 
				
			||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
					import { sendWsBroadcastTo } from "../../services/wsService.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const logoutController: RequestHandler = async (req, res) => {
 | 
					export const logoutController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    if (!req.query.accountId) {
 | 
					    if (!req.query.accountId) {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const maturePetController: RequestHandler = async (req, res) => {
 | 
					export const maturePetController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,18 +1,18 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { IMissionInventoryUpdateRequest } from "@/src/types/requestTypes";
 | 
					import type { IMissionInventoryUpdateRequest } from "../../types/requestTypes.ts";
 | 
				
			||||||
import { addMissionInventoryUpdates, addMissionRewards } from "@/src/services/missionInventoryUpdateService";
 | 
					import { addMissionInventoryUpdates, addMissionRewards } from "../../services/missionInventoryUpdateService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getInventoryResponse } from "@/src/controllers/api/inventoryController";
 | 
					import { getInventoryResponse } from "./inventoryController.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import type {
 | 
					import type {
 | 
				
			||||||
    IMissionInventoryUpdateResponse,
 | 
					    IMissionInventoryUpdateResponse,
 | 
				
			||||||
    IMissionInventoryUpdateResponseBackToDryDock,
 | 
					    IMissionInventoryUpdateResponseBackToDryDock,
 | 
				
			||||||
    IMissionInventoryUpdateResponseRailjackInterstitial
 | 
					    IMissionInventoryUpdateResponseRailjackInterstitial
 | 
				
			||||||
} from "@/src/types/missionTypes";
 | 
					} from "../../types/missionTypes.ts";
 | 
				
			||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
					import { sendWsBroadcastTo } from "../../services/wsService.ts";
 | 
				
			||||||
import { generateRewardSeed } from "@/src/services/rngService";
 | 
					import { generateRewardSeed } from "../../services/rngService.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
**** INPUT ****
 | 
					**** INPUT ****
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
					import { sendWsBroadcastTo } from "../../services/wsService.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    getInventory,
 | 
					    getInventory,
 | 
				
			||||||
    updateCurrency,
 | 
					    updateCurrency,
 | 
				
			||||||
@ -12,15 +12,15 @@ import {
 | 
				
			|||||||
    productCategoryToInventoryBin,
 | 
					    productCategoryToInventoryBin,
 | 
				
			||||||
    combineInventoryChanges,
 | 
					    combineInventoryChanges,
 | 
				
			||||||
    addSpecialItem
 | 
					    addSpecialItem
 | 
				
			||||||
} from "@/src/services/inventoryService";
 | 
					} from "../../services/inventoryService.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import { getDefaultUpgrades } from "@/src/services/itemDataService";
 | 
					import { getDefaultUpgrades } from "../../services/itemDataService.ts";
 | 
				
			||||||
import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper";
 | 
					import { modularWeaponTypes } from "../../helpers/modularWeaponHelper.ts";
 | 
				
			||||||
import { getRandomInt } from "@/src/services/rngService";
 | 
					import { getRandomInt } from "../../services/rngService.ts";
 | 
				
			||||||
import type { IDefaultUpgrade } from "warframe-public-export-plus";
 | 
					import type { IDefaultUpgrade } from "warframe-public-export-plus";
 | 
				
			||||||
import { ExportSentinels, ExportWeapons } from "warframe-public-export-plus";
 | 
					import { ExportSentinels, ExportWeapons } from "warframe-public-export-plus";
 | 
				
			||||||
import type { IEquipmentDatabase } from "@/src/types/equipmentTypes";
 | 
					import type { IEquipmentDatabase } from "../../types/equipmentTypes.ts";
 | 
				
			||||||
import { Status } from "@/src/types/equipmentTypes";
 | 
					import { Status } from "../../types/equipmentTypes.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface IModularCraftRequest {
 | 
					interface IModularCraftRequest {
 | 
				
			||||||
    WeaponType: string;
 | 
					    WeaponType: string;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,10 +1,10 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { ExportWeapons } from "warframe-public-export-plus";
 | 
					import { ExportWeapons } from "warframe-public-export-plus";
 | 
				
			||||||
import type { IMongoDate } from "@/src/types/commonTypes";
 | 
					import type { IMongoDate } from "../../types/commonTypes.ts";
 | 
				
			||||||
import { toMongoDate } from "@/src/helpers/inventoryHelpers";
 | 
					import { toMongoDate } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import { SRng } from "@/src/services/rngService";
 | 
					import { SRng } from "../../services/rngService.ts";
 | 
				
			||||||
import type { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
					import type { ArtifactPolarity } from "../../types/inventoryTypes/commonInventoryTypes.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    addEquipment,
 | 
					    addEquipment,
 | 
				
			||||||
    applyDefaultUpgrades,
 | 
					    applyDefaultUpgrades,
 | 
				
			||||||
@ -12,13 +12,13 @@ import {
 | 
				
			|||||||
    occupySlot,
 | 
					    occupySlot,
 | 
				
			||||||
    productCategoryToInventoryBin,
 | 
					    productCategoryToInventoryBin,
 | 
				
			||||||
    updateCurrency
 | 
					    updateCurrency
 | 
				
			||||||
} from "@/src/services/inventoryService";
 | 
					} from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getDefaultUpgrades } from "@/src/services/itemDataService";
 | 
					import { getDefaultUpgrades } from "../../services/itemDataService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
					import { sendWsBroadcastTo } from "../../services/wsService.ts";
 | 
				
			||||||
import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper";
 | 
					import { modularWeaponTypes } from "../../helpers/modularWeaponHelper.ts";
 | 
				
			||||||
import type { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
					import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
				
			||||||
import { EquipmentFeatures } from "@/src/types/equipmentTypes";
 | 
					import { EquipmentFeatures } from "../../types/equipmentTypes.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const modularWeaponSaleController: RequestHandler = async (req, res) => {
 | 
					export const modularWeaponSaleController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const partTypeToParts: Record<string, string[]> = {};
 | 
					    const partTypeToParts: Record<string, string[]> = {};
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,9 @@
 | 
				
			|||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
					import { getInventory, updateCurrency } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import type { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
					import { sendWsBroadcastTo } from "../../services/wsService.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface INameWeaponRequest {
 | 
					interface INameWeaponRequest {
 | 
				
			||||||
    ItemName: string;
 | 
					    ItemName: string;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
import { fromDbOid, version_compare } from "@/src/helpers/inventoryHelpers";
 | 
					import { fromDbOid, version_compare } from "../../helpers/inventoryHelpers.ts";
 | 
				
			||||||
import type { IKnifeResponse } from "@/src/helpers/nemesisHelpers";
 | 
					import type { IKnifeResponse } from "../../helpers/nemesisHelpers.ts";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    antivirusMods,
 | 
					    antivirusMods,
 | 
				
			||||||
    decodeNemesisGuess,
 | 
					    decodeNemesisGuess,
 | 
				
			||||||
@ -14,15 +14,15 @@ import {
 | 
				
			|||||||
    GUESS_NONE,
 | 
					    GUESS_NONE,
 | 
				
			||||||
    GUESS_WILDCARD,
 | 
					    GUESS_WILDCARD,
 | 
				
			||||||
    parseUpgrade
 | 
					    parseUpgrade
 | 
				
			||||||
} from "@/src/helpers/nemesisHelpers";
 | 
					} from "../../helpers/nemesisHelpers.ts";
 | 
				
			||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
					import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
				
			||||||
import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
					import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts";
 | 
				
			||||||
import { Loadout } from "@/src/models/inventoryModels/loadoutModel";
 | 
					import { Loadout } from "../../models/inventoryModels/loadoutModel.ts";
 | 
				
			||||||
import { addMods, freeUpSlot, getInventory } from "@/src/services/inventoryService";
 | 
					import { addMods, freeUpSlot, getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
					import { getAccountForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { SRng } from "@/src/services/rngService";
 | 
					import { SRng } from "../../services/rngService.ts";
 | 
				
			||||||
import type { IMongoDate, IOid } from "@/src/types/commonTypes";
 | 
					import type { IMongoDate, IOid } from "../../types/commonTypes.ts";
 | 
				
			||||||
import type { IEquipmentClient } from "@/src/types/equipmentTypes";
 | 
					import type { IEquipmentClient } from "../../types/equipmentTypes.ts";
 | 
				
			||||||
import type {
 | 
					import type {
 | 
				
			||||||
    IInnateDamageFingerprint,
 | 
					    IInnateDamageFingerprint,
 | 
				
			||||||
    IInventoryClient,
 | 
					    IInventoryClient,
 | 
				
			||||||
@ -31,9 +31,9 @@ import type {
 | 
				
			|||||||
    IWeaponSkinClient,
 | 
					    IWeaponSkinClient,
 | 
				
			||||||
    TEquipmentKey,
 | 
					    TEquipmentKey,
 | 
				
			||||||
    TNemesisFaction
 | 
					    TNemesisFaction
 | 
				
			||||||
} from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					} from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { InventorySlot, LoadoutIndex } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import { InventorySlot, LoadoutIndex } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import { logger } from "@/src/utils/logger";
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { Types } from "mongoose";
 | 
					import { Types } from "mongoose";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -6,14 +6,14 @@ import {
 | 
				
			|||||||
    hasGuildPermission,
 | 
					    hasGuildPermission,
 | 
				
			||||||
    processDojoBuildMaterialsGathered,
 | 
					    processDojoBuildMaterialsGathered,
 | 
				
			||||||
    scaleRequiredCount
 | 
					    scaleRequiredCount
 | 
				
			||||||
} from "@/src/services/guildService";
 | 
					} from "../../services/guildService.ts";
 | 
				
			||||||
import { getInventory } from "@/src/services/inventoryService";
 | 
					import { getInventory } from "../../services/inventoryService.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
					import { GuildPermission } from "../../types/guildTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
import { Types } from "mongoose";
 | 
					import { Types } from "mongoose";
 | 
				
			||||||
import { ExportDojoRecipes, ExportResources } from "warframe-public-export-plus";
 | 
					import { ExportDojoRecipes, ExportResources } from "warframe-public-export-plus";
 | 
				
			||||||
import { config } from "@/src/services/configService";
 | 
					import { config } from "../../services/configService.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const placeDecoInComponentController: RequestHandler = async (req, res) => {
 | 
					export const placeDecoInComponentController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const accountId = await getAccountIdForRequest(req);
 | 
					    const accountId = await getAccountIdForRequest(req);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
					import { Inventory } from "../../models/inventoryModels/inventoryModel.ts";
 | 
				
			||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
					import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const playedParkourTutorialController: RequestHandler = async (req, res) => {
 | 
					export const playedParkourTutorialController: RequestHandler = async (req, res) => {
 | 
				
			||||||
 | 
				
			|||||||
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