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