feat: more inventory schemas (#131)
This commit is contained in:
		
							parent
							
								
									8156036203
								
							
						
					
					
						commit
						91ced2c75b
					
				
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -11,3 +11,6 @@ yarn.lock
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# logs
 | 
					# logs
 | 
				
			||||||
/logs
 | 
					/logs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# MongoDB VSCode extension playground scripts
 | 
				
			||||||
 | 
					/database_scripts
 | 
				
			||||||
@ -6,7 +6,7 @@
 | 
				
			|||||||
  "worldSeed": "qihVmIIyYXz0E4+01UjY+ROEiAB7x3k40ZaCUtVLEF17u9TXVita+jHZRuMLB6OT8GOfX8C+kqkyrT26AJEHFV0IDUkoZ1bntDSBL6wN36tq+ttsN/8NIcy1eGIyLzHn1Cosbtp8ykPhIaFKWlWP6v0QUBObIT11xLXF8fd+7cAEUcPygnS6WK048KEjMldK5bXIkkg9NV7ZXWLhNfTVG0mN0VluNUKDlc/JCiYRkxvparpn7xKwFpxqZJIeYhOz/zaktlEcVFxxB6ewd/X+XNq7+SkPUw5btQKQeYax1AxBZHzCk0XF1ihRQKPdMeVzXIRq43Yf/8emu8siIC4dFA==",
 | 
					  "worldSeed": "qihVmIIyYXz0E4+01UjY+ROEiAB7x3k40ZaCUtVLEF17u9TXVita+jHZRuMLB6OT8GOfX8C+kqkyrT26AJEHFV0IDUkoZ1bntDSBL6wN36tq+ttsN/8NIcy1eGIyLzHn1Cosbtp8ykPhIaFKWlWP6v0QUBObIT11xLXF8fd+7cAEUcPygnS6WK048KEjMldK5bXIkkg9NV7ZXWLhNfTVG0mN0VluNUKDlc/JCiYRkxvparpn7xKwFpxqZJIeYhOz/zaktlEcVFxxB6ewd/X+XNq7+SkPUw5btQKQeYax1AxBZHzCk0XF1ihRQKPdMeVzXIRq43Yf/8emu8siIC4dFA==",
 | 
				
			||||||
  "skipStoryModeChoice": true,
 | 
					  "skipStoryModeChoice": true,
 | 
				
			||||||
  "skipTutorial": true,
 | 
					  "skipTutorial": true,
 | 
				
			||||||
  "testMission": true,
 | 
					  "unlockAllMissions": true,
 | 
				
			||||||
  "testQuestKey": true,
 | 
					  "unlockAllQuests": false,
 | 
				
			||||||
  "infiniteResources": true
 | 
					  "infiniteResources": true
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										68
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										68
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -235,9 +235,9 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/@mongodb-js/saslprep": {
 | 
					    "node_modules/@mongodb-js/saslprep": {
 | 
				
			||||||
      "version": "1.1.1",
 | 
					      "version": "1.1.4",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.1.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.4.tgz",
 | 
				
			||||||
      "integrity": "sha512-t7c5K033joZZMspnHg/gWPE4kandgc2OxE74aYOtGKfgB9VPuVJPix0H6fhmm2erj5PBJ21mqcx34lpIGtUCsQ==",
 | 
					      "integrity": "sha512-8zJ8N1x51xo9hwPh6AWnKdLGEC5N3lDa6kms1YHmFBoRhTpJR6HG8wWk0td1MVCu9cD4YBrvjZEtd5Obw0Fbnw==",
 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "sparse-bitfield": "^3.0.3"
 | 
					        "sparse-bitfield": "^3.0.3"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@ -394,7 +394,8 @@
 | 
				
			|||||||
    "node_modules/@types/node": {
 | 
					    "node_modules/@types/node": {
 | 
				
			||||||
      "version": "18.16.3",
 | 
					      "version": "18.16.3",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.3.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.3.tgz",
 | 
				
			||||||
      "integrity": "sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q=="
 | 
					      "integrity": "sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q==",
 | 
				
			||||||
 | 
					      "dev": true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/@types/qs": {
 | 
					    "node_modules/@types/qs": {
 | 
				
			||||||
      "version": "6.9.7",
 | 
					      "version": "6.9.7",
 | 
				
			||||||
@ -457,11 +458,10 @@
 | 
				
			|||||||
      "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA=="
 | 
					      "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA=="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/@types/whatwg-url": {
 | 
					    "node_modules/@types/whatwg-url": {
 | 
				
			||||||
      "version": "8.2.2",
 | 
					      "version": "11.0.4",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.4.tgz",
 | 
				
			||||||
      "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==",
 | 
					      "integrity": "sha512-lXCmTWSHJvf0TRSO58nm978b8HJ/EdsSsEKLd3ODHFjo+3VGAyyTp4v50nWvwtzBxSMQrVOK7tcuN0zGPLICMw==",
 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "@types/node": "*",
 | 
					 | 
				
			||||||
        "@types/webidl-conversions": "*"
 | 
					        "@types/webidl-conversions": "*"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -1178,9 +1178,9 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/bson": {
 | 
					    "node_modules/bson": {
 | 
				
			||||||
      "version": "6.2.0",
 | 
					      "version": "6.3.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/bson/-/bson-6.3.0.tgz",
 | 
				
			||||||
      "integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q==",
 | 
					      "integrity": "sha512-balJfqwwTBddxfnidJZagCBPP/f48zj9Sdp3OJswREOgsJzHiQSaOIAtApSgDQFYgHqAvFkp53AFSqjMDZoTFw==",
 | 
				
			||||||
      "engines": {
 | 
					      "engines": {
 | 
				
			||||||
        "node": ">=16.20.1"
 | 
					        "node": ">=16.20.1"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@ -2639,13 +2639,13 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/mongodb": {
 | 
					    "node_modules/mongodb": {
 | 
				
			||||||
      "version": "6.2.0",
 | 
					      "version": "6.3.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.2.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.3.0.tgz",
 | 
				
			||||||
      "integrity": "sha512-d7OSuGjGWDZ5usZPqfvb36laQ9CPhnWkAGHT61x5P95p/8nMVeH8asloMwW6GcYFeB0Vj4CB/1wOTDG2RA9BFA==",
 | 
					      "integrity": "sha512-tt0KuGjGtLUhLoU263+xvQmPHEGTw5LbcNC73EoFRYgSHwZt5tsoJC110hDyO1kjQzpgNrpdcSza9PknWN4LrA==",
 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "@mongodb-js/saslprep": "^1.1.0",
 | 
					        "@mongodb-js/saslprep": "^1.1.0",
 | 
				
			||||||
        "bson": "^6.2.0",
 | 
					        "bson": "^6.2.0",
 | 
				
			||||||
        "mongodb-connection-string-url": "^2.6.0"
 | 
					        "mongodb-connection-string-url": "^3.0.0"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "engines": {
 | 
					      "engines": {
 | 
				
			||||||
        "node": ">=16.20.1"
 | 
					        "node": ">=16.20.1"
 | 
				
			||||||
@ -2684,22 +2684,22 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/mongodb-connection-string-url": {
 | 
					    "node_modules/mongodb-connection-string-url": {
 | 
				
			||||||
      "version": "2.6.0",
 | 
					      "version": "3.0.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.0.tgz",
 | 
				
			||||||
      "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==",
 | 
					      "integrity": "sha512-t1Vf+m1I5hC2M5RJx/7AtxgABy1cZmIPQRMXw+gEIPn/cZNF3Oiy+l0UIypUwVB5trcWHq3crg2g3uAR9aAwsQ==",
 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "@types/whatwg-url": "^8.2.1",
 | 
					        "@types/whatwg-url": "^11.0.2",
 | 
				
			||||||
        "whatwg-url": "^11.0.0"
 | 
					        "whatwg-url": "^13.0.0"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/mongoose": {
 | 
					    "node_modules/mongoose": {
 | 
				
			||||||
      "version": "8.0.2",
 | 
					      "version": "8.1.1",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.0.2.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.1.1.tgz",
 | 
				
			||||||
      "integrity": "sha512-Vsi9GzTXjdBVzheT1HZOZ2jHNzzR9Xwb5OyLz/FvDEAhlwrRnXnuqJf0QHINUOQSm7aoyvnPks0q85HJkd6yDw==",
 | 
					      "integrity": "sha512-DbLb0NsiEXmaqLOpEz+AtAsgwhRw6f25gwa1dF5R7jj6lS1D8X6uTdhBSC8GDVtOwe5Tfw2EL7nTn6hiJT3Bgg==",
 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "bson": "^6.2.0",
 | 
					        "bson": "^6.2.0",
 | 
				
			||||||
        "kareem": "2.5.1",
 | 
					        "kareem": "2.5.1",
 | 
				
			||||||
        "mongodb": "6.2.0",
 | 
					        "mongodb": "6.3.0",
 | 
				
			||||||
        "mpath": "0.9.0",
 | 
					        "mpath": "0.9.0",
 | 
				
			||||||
        "mquery": "5.0.0",
 | 
					        "mquery": "5.0.0",
 | 
				
			||||||
        "ms": "2.1.3",
 | 
					        "ms": "2.1.3",
 | 
				
			||||||
@ -3701,14 +3701,14 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/tr46": {
 | 
					    "node_modules/tr46": {
 | 
				
			||||||
      "version": "3.0.0",
 | 
					      "version": "4.1.1",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz",
 | 
				
			||||||
      "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
 | 
					      "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==",
 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "punycode": "^2.1.1"
 | 
					        "punycode": "^2.3.0"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "engines": {
 | 
					      "engines": {
 | 
				
			||||||
        "node": ">=12"
 | 
					        "node": ">=14"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/tree-kill": {
 | 
					    "node_modules/tree-kill": {
 | 
				
			||||||
@ -3986,15 +3986,15 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/whatwg-url": {
 | 
					    "node_modules/whatwg-url": {
 | 
				
			||||||
      "version": "11.0.0",
 | 
					      "version": "13.0.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz",
 | 
				
			||||||
      "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
 | 
					      "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==",
 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "tr46": "^3.0.0",
 | 
					        "tr46": "^4.1.1",
 | 
				
			||||||
        "webidl-conversions": "^7.0.0"
 | 
					        "webidl-conversions": "^7.0.0"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "engines": {
 | 
					      "engines": {
 | 
				
			||||||
        "node": ">=12"
 | 
					        "node": ">=16"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/which": {
 | 
					    "node_modules/which": {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,8 +3,8 @@ import { toInventoryResponse } from "@/src/helpers/inventoryHelpers";
 | 
				
			|||||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
					import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
				
			||||||
import { Request, RequestHandler, Response } from "express";
 | 
					import { Request, RequestHandler, Response } from "express";
 | 
				
			||||||
import config from "@/config.json";
 | 
					import config from "@/config.json";
 | 
				
			||||||
import testMissions from "@/static/fixed_responses/testMissions.json";
 | 
					import allMissions from "@/static/fixed_responses/allMissions.json";
 | 
				
			||||||
import testQuestKeys from "@/static/fixed_responses/testQuestKeys.json";
 | 
					import allQuestKeys from "@/static/fixed_responses/allQuestKeys.json";
 | 
				
			||||||
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
 | 
					import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const inventoryController: RequestHandler = async (request: Request, response: Response) => {
 | 
					const inventoryController: RequestHandler = async (request: Request, response: Response) => {
 | 
				
			||||||
@ -29,8 +29,8 @@ const inventoryController: RequestHandler = async (request: Request, response: R
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    const inventoryResponse = toInventoryResponse(inventoryJSON);
 | 
					    const inventoryResponse = toInventoryResponse(inventoryJSON);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (config.testMission) inventoryResponse.Missions = testMissions;
 | 
					    if (config.unlockAllMissions) inventoryResponse.Missions = allMissions;
 | 
				
			||||||
    if (config.testQuestKey) inventoryResponse.QuestKeys = testQuestKeys;
 | 
					    if (config.unlockAllQuests) inventoryResponse.QuestKeys = allQuestKeys;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    response.json(inventoryResponse);
 | 
					    response.json(inventoryResponse);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -12,3 +12,7 @@ export const toInventoryResponse = (inventoryDatabase: IInventoryDatabase): IInv
 | 
				
			|||||||
export const toOid = (objectId: Types.ObjectId) => {
 | 
					export const toOid = (objectId: Types.ObjectId) => {
 | 
				
			||||||
    return { $oid: objectId.toString() } satisfies IOid;
 | 
					    return { $oid: objectId.toString() } satisfies IOid;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export const toMongoDate = (date: Date) => {
 | 
				
			||||||
 | 
					    return { $date: { $numberLong: date.getTime().toString() } };
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
import { HydratedDocument, Model, Schema, Types, model } from "mongoose";
 | 
					import { Model, Schema, Types, model } from "mongoose";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
    IFlavourItem,
 | 
					    IFlavourItem,
 | 
				
			||||||
    IRawUpgrade,
 | 
					    IRawUpgrade,
 | 
				
			||||||
@ -12,7 +12,34 @@ import {
 | 
				
			|||||||
    IMailbox,
 | 
					    IMailbox,
 | 
				
			||||||
    IDuviriInfo,
 | 
					    IDuviriInfo,
 | 
				
			||||||
    IPendingRecipe as IPendingRecipeDatabase,
 | 
					    IPendingRecipe as IPendingRecipeDatabase,
 | 
				
			||||||
    IPendingRecipeResponse
 | 
					    IPendingRecipeResponse,
 | 
				
			||||||
 | 
					    ITypeCount,
 | 
				
			||||||
 | 
					    IFocusXP,
 | 
				
			||||||
 | 
					    IFocusUpgrades,
 | 
				
			||||||
 | 
					    IGenericItem2,
 | 
				
			||||||
 | 
					    ITypeXPItem,
 | 
				
			||||||
 | 
					    IChallengeProgress,
 | 
				
			||||||
 | 
					    IStepSequencer,
 | 
				
			||||||
 | 
					    IAffiliation,
 | 
				
			||||||
 | 
					    IShip,
 | 
				
			||||||
 | 
					    INotePacks,
 | 
				
			||||||
 | 
					    IShipExterior,
 | 
				
			||||||
 | 
					    ICompletedJobChain,
 | 
				
			||||||
 | 
					    ISeasonChallengeHistory,
 | 
				
			||||||
 | 
					    IPlayerSkills,
 | 
				
			||||||
 | 
					    ISettings,
 | 
				
			||||||
 | 
					    IInfestedFoundry,
 | 
				
			||||||
 | 
					    IConsumedSuit,
 | 
				
			||||||
 | 
					    IQuestProgress,
 | 
				
			||||||
 | 
					    IQuestKeyDatabase,
 | 
				
			||||||
 | 
					    IQuestKeyResponse,
 | 
				
			||||||
 | 
					    IFusionTreasure,
 | 
				
			||||||
 | 
					    ISpectreLoadout,
 | 
				
			||||||
 | 
					    IWeaponSkin,
 | 
				
			||||||
 | 
					    ITauntHistory,
 | 
				
			||||||
 | 
					    IPeriodicMissionCompletionDatabase,
 | 
				
			||||||
 | 
					    IPeriodicMissionCompletionResponse,
 | 
				
			||||||
 | 
					    ILoreFragmentScan
 | 
				
			||||||
} from "../../types/inventoryTypes/inventoryTypes";
 | 
					} from "../../types/inventoryTypes/inventoryTypes";
 | 
				
			||||||
import { IMongoDate, IOid } from "../../types/commonTypes";
 | 
					import { IMongoDate, IOid } from "../../types/commonTypes";
 | 
				
			||||||
import { ISuitDatabase } from "@/src/types/inventoryTypes/SuitTypes";
 | 
					import { ISuitDatabase } from "@/src/types/inventoryTypes/SuitTypes";
 | 
				
			||||||
@ -25,7 +52,29 @@ import {
 | 
				
			|||||||
    IOperatorConfigDatabase,
 | 
					    IOperatorConfigDatabase,
 | 
				
			||||||
    IPolarity
 | 
					    IPolarity
 | 
				
			||||||
} from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
					} from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
				
			||||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
					import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const typeCountSchema = new Schema<ITypeCount>({ ItemType: String, ItemCount: Number }, { _id: false });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const focusXPSchema = new Schema<IFocusXP>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        AP_POWER: Number,
 | 
				
			||||||
 | 
					        AP_TACTIC: Number,
 | 
				
			||||||
 | 
					        AP_DEFENSE: Number,
 | 
				
			||||||
 | 
					        AP_ATTACK: Number,
 | 
				
			||||||
 | 
					        AP_WARD: Number
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const focusUpgradesSchema = new Schema<IFocusUpgrades>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ItemType: String,
 | 
				
			||||||
 | 
					        Level: Number,
 | 
				
			||||||
 | 
					        IsUniversal: Boolean
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const pendingRecipeSchema = new Schema<IPendingRecipeDatabase>(
 | 
					const pendingRecipeSchema = new Schema<IPendingRecipeDatabase>(
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@ -168,10 +217,13 @@ WeaponSchema.set("toJSON", {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const BoosterSchema = new Schema<IBooster>({
 | 
					const boosterSchema = new Schema<IBooster>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
        ExpiryDate: Number,
 | 
					        ExpiryDate: Number,
 | 
				
			||||||
        ItemType: String
 | 
					        ItemType: String
 | 
				
			||||||
});
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const RawUpgrades = new Schema<IRawUpgrade>(
 | 
					const RawUpgrades = new Schema<IRawUpgrade>(
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@ -194,16 +246,19 @@ RawUpgrades.set("toJSON", {
 | 
				
			|||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//TODO: find out what this is
 | 
					//TODO: find out what this is
 | 
				
			||||||
const Upgrade = new Schema({
 | 
					const upgrqadesSchema = new Schema(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
        UpgradeFingerprint: String,
 | 
					        UpgradeFingerprint: String,
 | 
				
			||||||
        ItemType: String
 | 
					        ItemType: String
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					upgrqadesSchema.virtual("ItemId").get(function () {
 | 
				
			||||||
 | 
					    return toOid(this._id);
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Upgrade.virtual("ItemId").get(function () {
 | 
					upgrqadesSchema.set("toJSON", {
 | 
				
			||||||
    return { $oid: this._id.toString() } satisfies IOid;
 | 
					 | 
				
			||||||
});
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Upgrade.set("toJSON", {
 | 
					 | 
				
			||||||
    virtuals: true,
 | 
					    virtuals: true,
 | 
				
			||||||
    transform(_document, returnedObject) {
 | 
					    transform(_document, returnedObject) {
 | 
				
			||||||
        delete returnedObject._id;
 | 
					        delete returnedObject._id;
 | 
				
			||||||
@ -320,10 +375,274 @@ DuviriInfoSchema.set("toJSON", {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
					const GenericItemSchema2 = new Schema<IGenericItem2>({
 | 
				
			||||||
 | 
					    ItemType: String,
 | 
				
			||||||
 | 
					    ItemName: String,
 | 
				
			||||||
 | 
					    XP: Number,
 | 
				
			||||||
 | 
					    UpgradeVer: Number, //this is probably __v
 | 
				
			||||||
 | 
					    Features: Number,
 | 
				
			||||||
 | 
					    Polarized: Number,
 | 
				
			||||||
 | 
					    CustomizationSlotPurchases: Number,
 | 
				
			||||||
 | 
					    ModSlotPurchases: Number,
 | 
				
			||||||
 | 
					    FocusLens: String,
 | 
				
			||||||
 | 
					    Expiry: Date, //TODO: needs conversion
 | 
				
			||||||
 | 
					    Polarity: [polaritySchema],
 | 
				
			||||||
 | 
					    Configs: [ItemConfigSchema],
 | 
				
			||||||
 | 
					    ModularParts: [String],
 | 
				
			||||||
 | 
					    SkillTree: String,
 | 
				
			||||||
 | 
					    UpgradeType: String,
 | 
				
			||||||
 | 
					    UpgradeFingerprint: String,
 | 
				
			||||||
 | 
					    OffensiveUpgrade: String,
 | 
				
			||||||
 | 
					    DefensiveUpgrade: String,
 | 
				
			||||||
 | 
					    UpgradesExpiry: Date, //TODO: needs conversion
 | 
				
			||||||
 | 
					    ArchonCrystalUpgrades: []
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const TypeXPItemSchema = new Schema<ITypeXPItem>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ItemType: String,
 | 
				
			||||||
 | 
					        XP: Number
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const challengeProgressSchema = new Schema<IChallengeProgress>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Progress: Number,
 | 
				
			||||||
 | 
					        Name: String,
 | 
				
			||||||
 | 
					        Completed: [String]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const notePacksSchema = new Schema<INotePacks>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        MELODY: String,
 | 
				
			||||||
 | 
					        BASS: String,
 | 
				
			||||||
 | 
					        PERCUSSION: String
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const StepSequencersSchema = new Schema<IStepSequencer>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        NotePacks: notePacksSchema,
 | 
				
			||||||
 | 
					        FingerPrint: String,
 | 
				
			||||||
 | 
					        Name: String
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					StepSequencersSchema.virtual("ItemId").get(function () {
 | 
				
			||||||
 | 
					    return { $oid: this._id.toString() } satisfies IOid;
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					StepSequencersSchema.set("toJSON", {
 | 
				
			||||||
 | 
					    virtuals: true,
 | 
				
			||||||
 | 
					    transform(_document, returnedObject) {
 | 
				
			||||||
 | 
					        delete returnedObject._id;
 | 
				
			||||||
 | 
					        delete returnedObject.__v;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const affiliationsSchema = new Schema<IAffiliation>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Initiated: Boolean,
 | 
				
			||||||
 | 
					        Standing: Number,
 | 
				
			||||||
 | 
					        Title: String,
 | 
				
			||||||
 | 
					        FreeFavorsEarned: [Number],
 | 
				
			||||||
 | 
					        FreeFavorsUsed: [Number],
 | 
				
			||||||
 | 
					        Tag: String
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const shipExteriorSchema = new Schema<IShipExterior>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        SkinFlavourItem: String,
 | 
				
			||||||
 | 
					        Colors: colorSchema, //TODO: perhaps too many colors here
 | 
				
			||||||
 | 
					        ShipAttachments: { HOOD_ORNAMENT: String }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const shipSchema = new Schema<IShip>({
 | 
				
			||||||
 | 
					    ItemType: String,
 | 
				
			||||||
 | 
					    ShipExterior: shipExteriorSchema,
 | 
				
			||||||
 | 
					    AirSupportPower: String
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					shipSchema.virtual("ItemId").get(function () {
 | 
				
			||||||
 | 
					    return { $oid: this._id.toString() };
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					shipSchema.set("toJSON", {
 | 
				
			||||||
 | 
					    virtuals: true,
 | 
				
			||||||
 | 
					    transform(_document, returnedObject) {
 | 
				
			||||||
 | 
					        delete returnedObject._id;
 | 
				
			||||||
 | 
					        delete returnedObject.__v;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const completedJobChainsSchema = new Schema<ICompletedJobChain>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        LocationTag: String,
 | 
				
			||||||
 | 
					        Jobs: [String]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const seasonChallengeHistorySchema = new Schema<ISeasonChallengeHistory>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        challenge: String,
 | 
				
			||||||
 | 
					        id: String
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//TODO: check whether this is complete
 | 
				
			||||||
 | 
					const playerSkillsSchema = new Schema<IPlayerSkills>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        LPP_SPACE: Number,
 | 
				
			||||||
 | 
					        LPP_DRIFTER: Number,
 | 
				
			||||||
 | 
					        LPS_NONE: Number,
 | 
				
			||||||
 | 
					        LPS_PILOTING: Number,
 | 
				
			||||||
 | 
					        LPS_GUNNERY: Number,
 | 
				
			||||||
 | 
					        LPS_TACTICAL: Number,
 | 
				
			||||||
 | 
					        LPS_ENGINEERING: Number,
 | 
				
			||||||
 | 
					        LPS_COMMAND: Number,
 | 
				
			||||||
 | 
					        LPS_DRIFT_COMBAT: Number,
 | 
				
			||||||
 | 
					        LPS_DRIFT_RIDING: Number,
 | 
				
			||||||
 | 
					        LPS_DRIFT_OPPORTUNITY: Number,
 | 
				
			||||||
 | 
					        LPS_DRIFT_ENDURANCE: Number
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const settingsSchema = new Schema<ISettings>({
 | 
				
			||||||
 | 
					    FriendInvRestriction: String,
 | 
				
			||||||
 | 
					    GiftMode: String,
 | 
				
			||||||
 | 
					    GuildInvRestriction: String,
 | 
				
			||||||
 | 
					    ShowFriendInvNotifications: Boolean,
 | 
				
			||||||
 | 
					    TradingRulesConfirmed: Boolean
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const consumedSchuitsSchema = new Schema<IConsumedSuit>({
 | 
				
			||||||
 | 
					    s: String,
 | 
				
			||||||
 | 
					    c: colorSchema
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const infestedFoundrySchema = new Schema<IInfestedFoundry>({
 | 
				
			||||||
 | 
					    Name: String,
 | 
				
			||||||
 | 
					    Resources: [typeCountSchema],
 | 
				
			||||||
 | 
					    Slots: Number,
 | 
				
			||||||
 | 
					    XP: Number,
 | 
				
			||||||
 | 
					    ConsumedSuits: [consumedSchuitsSchema],
 | 
				
			||||||
 | 
					    InvigorationIndex: Number,
 | 
				
			||||||
 | 
					    InvigorationSuitOfferings: [String],
 | 
				
			||||||
 | 
					    InvigorationsApplied: Number
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const questProgressSchema = new Schema<IQuestProgress>({
 | 
				
			||||||
 | 
					    c: Number,
 | 
				
			||||||
 | 
					    i: Boolean,
 | 
				
			||||||
 | 
					    m: Boolean,
 | 
				
			||||||
 | 
					    b: []
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const questKeysSchema = new Schema<IQuestKeyDatabase>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Progress: [questProgressSchema],
 | 
				
			||||||
 | 
					        unlock: Boolean,
 | 
				
			||||||
 | 
					        Completed: Boolean,
 | 
				
			||||||
 | 
					        //CustomData: Schema.Types.Mixed,
 | 
				
			||||||
 | 
					        CompletionDate: Date,
 | 
				
			||||||
 | 
					        ItemType: String
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        _id: false
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					questKeysSchema.set("toJSON", {
 | 
				
			||||||
 | 
					    transform(_doc, ret, _options) {
 | 
				
			||||||
 | 
					        const questKeysDatabase = ret as IQuestKeyDatabase;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (questKeysDatabase.CompletionDate) {
 | 
				
			||||||
 | 
					            (questKeysDatabase as IQuestKeyResponse).CompletionDate = toMongoDate(questKeysDatabase.CompletionDate);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const fusionTreasuresSchema = new Schema<IFusionTreasure>().add(typeCountSchema).add({ Sockets: Number });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const spectreLoadoutsSchema = new Schema<ISpectreLoadout>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        LongGuns: String,
 | 
				
			||||||
 | 
					        Melee: String,
 | 
				
			||||||
 | 
					        Pistols: String,
 | 
				
			||||||
 | 
					        PistolsFeatures: Number,
 | 
				
			||||||
 | 
					        PistolsModularParts: [String],
 | 
				
			||||||
 | 
					        Suits: String,
 | 
				
			||||||
 | 
					        ItemType: String
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const weaponSkinsSchema = new Schema<IWeaponSkin>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ItemType: String
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					weaponSkinsSchema.virtual("ItemId").get(function () {
 | 
				
			||||||
 | 
					    return { $oid: this._id.toString() };
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					weaponSkinsSchema.set("toJSON", { virtuals: true });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const tauntHistorySchema = new Schema<ITauntHistory>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        node: String,
 | 
				
			||||||
 | 
					        state: String
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const periodicMissionCompletionsSchema = new Schema<IPeriodicMissionCompletionDatabase>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        date: Date,
 | 
				
			||||||
 | 
					        tag: String,
 | 
				
			||||||
 | 
					        count: Number
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					periodicMissionCompletionsSchema.set("toJSON", {
 | 
				
			||||||
 | 
					    transform(_doc, ret, _options) {
 | 
				
			||||||
 | 
					        const periodicMissionCompletionDatabase = ret as IPeriodicMissionCompletionDatabase;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        (periodicMissionCompletionDatabase as unknown as IPeriodicMissionCompletionResponse).date = toMongoDate(
 | 
				
			||||||
 | 
					            periodicMissionCompletionDatabase.date
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const loreFragmentScansSchema = new Schema<ILoreFragmentScan>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Progress: Number,
 | 
				
			||||||
 | 
					        Region: String,
 | 
				
			||||||
 | 
					        ItemType: String
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    { _id: false }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
        accountOwnerId: Schema.Types.ObjectId,
 | 
					        accountOwnerId: Schema.Types.ObjectId,
 | 
				
			||||||
        SubscribedToEmails: Number,
 | 
					        SubscribedToEmails: Number,
 | 
				
			||||||
    Created: Schema.Types.Mixed,
 | 
					        Created: Date,
 | 
				
			||||||
        RewardSeed: Number,
 | 
					        RewardSeed: Number,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Credit
 | 
					        //Credit
 | 
				
			||||||
@ -335,7 +654,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
        //Endo
 | 
					        //Endo
 | 
				
			||||||
        FusionPoints: Number,
 | 
					        FusionPoints: Number,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //SlotAny
 | 
					        //Slots
 | 
				
			||||||
        SuitBin: slotsBinSchema,
 | 
					        SuitBin: slotsBinSchema,
 | 
				
			||||||
        WeaponBin: slotsBinSchema,
 | 
					        WeaponBin: slotsBinSchema,
 | 
				
			||||||
        SentinelBin: slotsBinSchema,
 | 
					        SentinelBin: slotsBinSchema,
 | 
				
			||||||
@ -357,7 +676,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
        PendingTrades: [Schema.Types.Mixed],
 | 
					        PendingTrades: [Schema.Types.Mixed],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Curent Syndicates rank\exp
 | 
					        //Curent Syndicates rank\exp
 | 
				
			||||||
    Affiliations: [Schema.Types.Mixed],
 | 
					        Affiliations: [affiliationsSchema],
 | 
				
			||||||
        //Syndicates Missions complate(Navigation->Syndicate)
 | 
					        //Syndicates Missions complate(Navigation->Syndicate)
 | 
				
			||||||
        CompletedSyndicates: [String],
 | 
					        CompletedSyndicates: [String],
 | 
				
			||||||
        //Daily Syndicates Exp
 | 
					        //Daily Syndicates Exp
 | 
				
			||||||
@ -376,23 +695,23 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        //Daily Focus limit
 | 
					        //Daily Focus limit
 | 
				
			||||||
        DailyFocus: Number,
 | 
					        DailyFocus: Number,
 | 
				
			||||||
    //you not used Focus
 | 
					        //Focus XP per School
 | 
				
			||||||
    FocusXP: Schema.Types.Mixed,
 | 
					        FocusXP: focusXPSchema,
 | 
				
			||||||
        //Curent active like Active school focuses is = "Zenurik"
 | 
					        //Curent active like Active school focuses is = "Zenurik"
 | 
				
			||||||
        FocusAbility: String,
 | 
					        FocusAbility: String,
 | 
				
			||||||
        //The treeways of the Focus school.(Active and passive Ability)
 | 
					        //The treeways of the Focus school.(Active and passive Ability)
 | 
				
			||||||
    FocusUpgrades: [Schema.Types.Mixed],
 | 
					        FocusUpgrades: [focusUpgradesSchema],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Achievement
 | 
					        //Achievement
 | 
				
			||||||
    ChallengeProgress: [Schema.Types.Mixed],
 | 
					        ChallengeProgress: [challengeProgressSchema],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Account Item like Ferrite,Form,Kuva etc
 | 
					        //Account Item like Ferrite,Form,Kuva etc
 | 
				
			||||||
    MiscItems: [Schema.Types.Mixed],
 | 
					        MiscItems: [typeCountSchema],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Non Upgrade Mods Example:I have 999 item WeaponElectricityDamageMod (only "ItemCount"+"ItemType")
 | 
					        //Non Upgrade Mods Example:I have 999 item WeaponElectricityDamageMod (only "ItemCount"+"ItemType")
 | 
				
			||||||
        RawUpgrades: [RawUpgrades],
 | 
					        RawUpgrades: [RawUpgrades],
 | 
				
			||||||
        //Upgrade Mods\Riven\Arcane Example:"UpgradeFingerprint"+"ItemType"+""
 | 
					        //Upgrade Mods\Riven\Arcane Example:"UpgradeFingerprint"+"ItemType"+""
 | 
				
			||||||
    Upgrades: [Upgrade],
 | 
					        Upgrades: [upgrqadesSchema],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Warframe
 | 
					        //Warframe
 | 
				
			||||||
        Suits: [suitSchema],
 | 
					        Suits: [suitSchema],
 | 
				
			||||||
@ -403,9 +722,9 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
        //Melee      Weapon
 | 
					        //Melee      Weapon
 | 
				
			||||||
        Melee: [WeaponSchema],
 | 
					        Melee: [WeaponSchema],
 | 
				
			||||||
        //Ability Weapon like Ultimate Mech\Excalibur\Ivara etc
 | 
					        //Ability Weapon like Ultimate Mech\Excalibur\Ivara etc
 | 
				
			||||||
    SpecialItems: [Schema.Types.Mixed],
 | 
					        SpecialItems: [GenericItemSchema2],
 | 
				
			||||||
        //The Mandachord(Octavia) is a step sequencer
 | 
					        //The Mandachord(Octavia) is a step sequencer
 | 
				
			||||||
    StepSequencers: [Schema.Types.Mixed],
 | 
					        StepSequencers: [StepSequencersSchema],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Sentinel(like Helios or modular)
 | 
					        //Sentinel(like Helios or modular)
 | 
				
			||||||
        Sentinels: [Schema.Types.Mixed],
 | 
					        Sentinels: [Schema.Types.Mixed],
 | 
				
			||||||
@ -421,7 +740,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
        KubrowPetPrints: [Schema.Types.Mixed],
 | 
					        KubrowPetPrints: [Schema.Types.Mixed],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Item for EquippedGear example:Scaner,LoadoutTechSummon etc
 | 
					        //Item for EquippedGear example:Scaner,LoadoutTechSummon etc
 | 
				
			||||||
    Consumables: [Schema.Types.Mixed],
 | 
					        Consumables: [typeCountSchema],
 | 
				
			||||||
        //Weel Emotes+Gear
 | 
					        //Weel Emotes+Gear
 | 
				
			||||||
        EquippedEmotes: [String],
 | 
					        EquippedEmotes: [String],
 | 
				
			||||||
        EquippedGear: [String],
 | 
					        EquippedGear: [String],
 | 
				
			||||||
@ -453,10 +772,10 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
        //ErsatzHorsePowerSuit
 | 
					        //ErsatzHorsePowerSuit
 | 
				
			||||||
        Horses: [GenericItemSchema],
 | 
					        Horses: [GenericItemSchema],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //Liset colors skin etc
 | 
					        //LandingCraft like Liset
 | 
				
			||||||
    Ships: [Schema.Types.Mixed],
 | 
					        Ships: [shipSchema],
 | 
				
			||||||
        // /Lotus/Types/Items/ShipDecos/
 | 
					        // /Lotus/Types/Items/ShipDecos/
 | 
				
			||||||
    ShipDecorations: [Schema.Types.Mixed],
 | 
					        ShipDecorations: [typeCountSchema],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //RailJack Setting(Mods,Skin,Weapon,etc)
 | 
					        //RailJack Setting(Mods,Skin,Weapon,etc)
 | 
				
			||||||
        CrewShipHarnesses: [Schema.Types.Mixed],
 | 
					        CrewShipHarnesses: [Schema.Types.Mixed],
 | 
				
			||||||
@ -465,7 +784,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        //Default RailJack
 | 
					        //Default RailJack
 | 
				
			||||||
        CrewShips: [Schema.Types.Mixed],
 | 
					        CrewShips: [Schema.Types.Mixed],
 | 
				
			||||||
    CrewShipAmmo: [Schema.Types.Mixed],
 | 
					        CrewShipAmmo: [typeCountSchema],
 | 
				
			||||||
        CrewShipWeapons: [Schema.Types.Mixed],
 | 
					        CrewShipWeapons: [Schema.Types.Mixed],
 | 
				
			||||||
        CrewShipWeaponSkins: [Schema.Types.Mixed],
 | 
					        CrewShipWeaponSkins: [Schema.Types.Mixed],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -476,7 +795,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        //Complete Mission\Quests
 | 
					        //Complete Mission\Quests
 | 
				
			||||||
        Missions: [Schema.Types.Mixed],
 | 
					        Missions: [Schema.Types.Mixed],
 | 
				
			||||||
    QuestKeys: [Schema.Types.Mixed],
 | 
					        QuestKeys: [questKeysSchema],
 | 
				
			||||||
        //item like DojoKey or Boss missions key
 | 
					        //item like DojoKey or Boss missions key
 | 
				
			||||||
        LevelKeys: [Schema.Types.Mixed],
 | 
					        LevelKeys: [Schema.Types.Mixed],
 | 
				
			||||||
        //Active quests
 | 
					        //Active quests
 | 
				
			||||||
@ -491,8 +810,8 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
        //Mastery Rank*(Need item XPInfo to rank up)
 | 
					        //Mastery Rank*(Need item XPInfo to rank up)
 | 
				
			||||||
        PlayerLevel: Number,
 | 
					        PlayerLevel: Number,
 | 
				
			||||||
        //Item Mastery Rank exp
 | 
					        //Item Mastery Rank exp
 | 
				
			||||||
    XPInfo: [Schema.Types.Mixed],
 | 
					        XPInfo: [TypeXPItemSchema],
 | 
				
			||||||
    //24h timer rank up
 | 
					        //Mastery Rank next availability
 | 
				
			||||||
        TrainingDate: Date,
 | 
					        TrainingDate: Date,
 | 
				
			||||||
        //Retries rank up(3 time)
 | 
					        //Retries rank up(3 time)
 | 
				
			||||||
        TrainingRetriesLeft: Number,
 | 
					        TrainingRetriesLeft: Number,
 | 
				
			||||||
@ -500,18 +819,18 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
        //you saw last played Region when you opened the star map
 | 
					        //you saw last played Region when you opened the star map
 | 
				
			||||||
        LastRegionPlayed: String,
 | 
					        LastRegionPlayed: String,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //Blueprint
 | 
					        //Blueprints for Foundry
 | 
				
			||||||
    Recipes: [Schema.Types.Mixed],
 | 
					        Recipes: [typeCountSchema],
 | 
				
			||||||
        //Crafting Blueprint(Item Name + CompletionDate)
 | 
					        //Crafting Blueprint(Item Name + CompletionDate)
 | 
				
			||||||
        PendingRecipes: [pendingRecipeSchema],
 | 
					        PendingRecipes: [pendingRecipeSchema],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //warframe\Weapon skins
 | 
					        //Skins for Suits, Weapons etc.
 | 
				
			||||||
    WeaponSkins: [Schema.Types.Mixed],
 | 
					        WeaponSkins: [weaponSkinsSchema],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Ayatan Item
 | 
					        //Ayatan Item
 | 
				
			||||||
    FusionTreasures: [Schema.Types.Mixed],
 | 
					        FusionTreasures: [fusionTreasuresSchema],
 | 
				
			||||||
        //"node": "TreasureTutorial", "state": "TS_COMPLETED"
 | 
					        //"node": "TreasureTutorial", "state": "TS_COMPLETED"
 | 
				
			||||||
    TauntHistory: [Schema.Types.Mixed],
 | 
					        TauntHistory: [tauntHistorySchema],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //noShow2FA,VisitPrimeVault etc
 | 
					        //noShow2FA,VisitPrimeVault etc
 | 
				
			||||||
        WebFlags: Schema.Types.Mixed,
 | 
					        WebFlags: Schema.Types.Mixed,
 | 
				
			||||||
@ -522,14 +841,14 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
        StoryModeChoice: String,
 | 
					        StoryModeChoice: String,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Alert->Kuva Siphon
 | 
					        //Alert->Kuva Siphon
 | 
				
			||||||
    PeriodicMissionCompletions: [Schema.Types.Mixed],
 | 
					        PeriodicMissionCompletions: [periodicMissionCompletionsSchema],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Codex->LoreFragment
 | 
					        //Codex->LoreFragment
 | 
				
			||||||
    LoreFragmentScans: [Schema.Types.Mixed],
 | 
					        LoreFragmentScans: [loreFragmentScansSchema],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Resource,Credit,Affinity etc or Bless any boosters
 | 
					        //Resource,Credit,Affinity etc or Bless any boosters
 | 
				
			||||||
    Boosters: [BoosterSchema],
 | 
					        Boosters: [boosterSchema],
 | 
				
			||||||
    BlessingCooldown: Schema.Types.Mixed,
 | 
					        BlessingCooldown: Date, // Date convert to IMongoDate
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //the color your clan requests like Items/Research/DojoColors/DojoColorPlainsB
 | 
					        //the color your clan requests like Items/Research/DojoColors/DojoColorPlainsB
 | 
				
			||||||
        ActiveDojoColorResearch: String,
 | 
					        ActiveDojoColorResearch: String,
 | 
				
			||||||
@ -541,13 +860,12 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        //Have only Suit+Pistols+LongGuns+Melee+ItemType(BronzeSpectre,GoldSpectre,PlatinumSpectreArmy,SilverSpectreArmy)
 | 
					        //Have only Suit+Pistols+LongGuns+Melee+ItemType(BronzeSpectre,GoldSpectre,PlatinumSpectreArmy,SilverSpectreArmy)
 | 
				
			||||||
        //"/Lotus/Types/Game/SpectreArmies/BronzeSpectreArmy": "Vapor Specter Regiment",
 | 
					        //"/Lotus/Types/Game/SpectreArmies/BronzeSpectreArmy": "Vapor Specter Regiment",
 | 
				
			||||||
    SpectreLoadouts: [Schema.Types.Mixed],
 | 
					        SpectreLoadouts: [spectreLoadoutsSchema],
 | 
				
			||||||
        //If you want change Spectre Gear id
 | 
					        //If you want change Spectre Gear id
 | 
				
			||||||
        PendingSpectreLoadouts: [Schema.Types.Mixed],
 | 
					        PendingSpectreLoadouts: [Schema.Types.Mixed],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //New quest Email spam
 | 
					        //New Quest Email
 | 
				
			||||||
    //example:"ItemType": "/Lotus/Types/Keys/RailJackBuildQuest/RailjackBuildQuestEmailItem",
 | 
					        EmailItems: [TypeXPItemSchema],
 | 
				
			||||||
    EmailItems: [Schema.Types.Mixed],
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Profile->Wishlist
 | 
					        //Profile->Wishlist
 | 
				
			||||||
        Wishlist: [String],
 | 
					        Wishlist: [String],
 | 
				
			||||||
@ -588,9 +906,9 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        //https://warframe.fandom.com/wiki/Heist
 | 
					        //https://warframe.fandom.com/wiki/Heist
 | 
				
			||||||
        //ProfitTaker(1-4) Example:"LocationTag": "EudicoHeists", "Jobs":Mission name
 | 
					        //ProfitTaker(1-4) Example:"LocationTag": "EudicoHeists", "Jobs":Mission name
 | 
				
			||||||
    CompletedJobChains: [Schema.Types.Mixed],
 | 
					        CompletedJobChains: [completedJobChainsSchema],
 | 
				
			||||||
        //Night Wave Challenge
 | 
					        //Night Wave Challenge
 | 
				
			||||||
    SeasonChallengeHistory: [Schema.Types.Mixed],
 | 
					        SeasonChallengeHistory: [seasonChallengeHistorySchema],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Cephalon Simaris Entries Example:"TargetType"+"Scans"(1-10)+"Completed": true|false
 | 
					        //Cephalon Simaris Entries Example:"TargetType"+"Scans"(1-10)+"Completed": true|false
 | 
				
			||||||
        LibraryPersonalProgress: [Schema.Types.Mixed],
 | 
					        LibraryPersonalProgress: [Schema.Types.Mixed],
 | 
				
			||||||
@ -610,7 +928,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
        LastNemesisAllySpawnTime: Schema.Types.Mixed,
 | 
					        LastNemesisAllySpawnTime: Schema.Types.Mixed,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //TradingRulesConfirmed,ShowFriendInvNotifications(Option->Social)
 | 
					        //TradingRulesConfirmed,ShowFriendInvNotifications(Option->Social)
 | 
				
			||||||
    Settings: Schema.Types.Mixed,
 | 
					        Settings: settingsSchema,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Railjack craft
 | 
					        //Railjack craft
 | 
				
			||||||
        //https://warframe.fandom.com/wiki/Rising_Tide
 | 
					        //https://warframe.fandom.com/wiki/Rising_Tide
 | 
				
			||||||
@ -618,14 +936,15 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        //Modulars lvl and exp(Railjack|Duviri)
 | 
					        //Modulars lvl and exp(Railjack|Duviri)
 | 
				
			||||||
        //https://warframe.fandom.com/wiki/Intrinsics
 | 
					        //https://warframe.fandom.com/wiki/Intrinsics
 | 
				
			||||||
    PlayerSkills: Schema.Types.Mixed,
 | 
					        PlayerSkills: playerSkillsSchema,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //TradeBannedUntil data
 | 
					        //TradeBannedUntil data
 | 
				
			||||||
        TradeBannedUntil: Schema.Types.Mixed,
 | 
					        TradeBannedUntil: Schema.Types.Mixed,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //https://warframe.fandom.com/wiki/Helminth
 | 
					        //https://warframe.fandom.com/wiki/Helminth
 | 
				
			||||||
    InfestedFoundry: Schema.Types.Mixed,
 | 
					        InfestedFoundry: infestedFoundrySchema,
 | 
				
			||||||
    NextRefill: Schema.Types.Mixed,
 | 
					
 | 
				
			||||||
 | 
					        NextRefill: Schema.Types.Mixed, // Date, convert to IMongoDate
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Purchase this new permanent skin from the Lotus customization options in Personal Quarters located in your Orbiter.
 | 
					        //Purchase this new permanent skin from the Lotus customization options in Personal Quarters located in your Orbiter.
 | 
				
			||||||
        //https://warframe.fandom.com/wiki/Lotus#The_New_War
 | 
					        //https://warframe.fandom.com/wiki/Lotus#The_New_War
 | 
				
			||||||
@ -668,23 +987,27 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>({
 | 
				
			|||||||
        Harvestable: Boolean,
 | 
					        Harvestable: Boolean,
 | 
				
			||||||
        //Grustag three
 | 
					        //Grustag three
 | 
				
			||||||
        DeathSquadable: Boolean
 | 
					        DeathSquadable: Boolean
 | 
				
			||||||
});
 | 
					    },
 | 
				
			||||||
 | 
					    { timestamps: { createdAt: "Created", updatedAt: "LastInventorySync" } }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
inventorySchema.set("toJSON", {
 | 
					inventorySchema.set("toJSON", {
 | 
				
			||||||
    transform(_document, returnedObject) {
 | 
					    transform(_document, returnedObject) {
 | 
				
			||||||
        delete returnedObject._id;
 | 
					        delete returnedObject._id;
 | 
				
			||||||
        delete returnedObject.__v;
 | 
					        delete returnedObject.__v;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const trainingDate = (returnedObject as IInventoryDatabaseDocument).TrainingDate;
 | 
					        const inventoryDatabase = returnedObject as IInventoryDatabase;
 | 
				
			||||||
 | 
					        const inventoryResponse = returnedObject as IInventoryResponse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        (returnedObject as IInventoryResponse).TrainingDate = {
 | 
					        inventoryResponse.TrainingDate = toMongoDate(inventoryDatabase.TrainingDate);
 | 
				
			||||||
            $date: {
 | 
					        inventoryResponse.Created = toMongoDate(inventoryDatabase.Created);
 | 
				
			||||||
                $numberLong: trainingDate.getTime().toString()
 | 
					        if (inventoryResponse.BlessingCooldown) {
 | 
				
			||||||
 | 
					            inventoryResponse.BlessingCooldown = toMongoDate(inventoryDatabase.BlessingCooldown);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        } satisfies IMongoDate;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// type overwrites for subdocuments/subdocument arrays
 | 
				
			||||||
type InventoryDocumentProps = {
 | 
					type InventoryDocumentProps = {
 | 
				
			||||||
    Suits: Types.DocumentArray<ISuitDatabase>;
 | 
					    Suits: Types.DocumentArray<ISuitDatabase>;
 | 
				
			||||||
    LongGuns: Types.DocumentArray<IWeaponDatabase>;
 | 
					    LongGuns: Types.DocumentArray<IWeaponDatabase>;
 | 
				
			||||||
@ -707,6 +1030,4 @@ type InventoryDocumentProps = {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
type InventoryModelType = Model<IInventoryDatabase, {}, InventoryDocumentProps>;
 | 
					type InventoryModelType = Model<IInventoryDatabase, {}, InventoryDocumentProps>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const Inventory = model<IInventoryDatabase, InventoryModelType>("Inventory", inventorySchema);
 | 
					export const Inventory = model<IInventoryDatabase, InventoryModelType>("Inventory", inventorySchema);
 | 
				
			||||||
 | 
					 | 
				
			||||||
export { Inventory };
 | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -15,16 +15,66 @@ import { IOperatorLoadOutSigcol, IWeaponDatabase } from "@/src/types/inventoryTy
 | 
				
			|||||||
//Document extends will be deleted soon. TODO: delete and migrate uses to ...
 | 
					//Document extends will be deleted soon. TODO: delete and migrate uses to ...
 | 
				
			||||||
export interface IInventoryDatabaseDocument extends IInventoryDatabase, Document {}
 | 
					export interface IInventoryDatabaseDocument extends IInventoryDatabase, Document {}
 | 
				
			||||||
export interface IInventoryDatabase
 | 
					export interface IInventoryDatabase
 | 
				
			||||||
    extends Omit<IInventoryResponse, "TrainingDate" | "LoadOutPresets" | "Mailbox" | "PendingRecipes"> {
 | 
					    extends Omit<
 | 
				
			||||||
 | 
					        IInventoryResponse,
 | 
				
			||||||
 | 
					        "TrainingDate" | "LoadOutPresets" | "Mailbox" | "PendingRecipes" | "Created" | "QuestKeys" | "BlessingCooldown"
 | 
				
			||||||
 | 
					    > {
 | 
				
			||||||
    accountOwnerId: Types.ObjectId;
 | 
					    accountOwnerId: Types.ObjectId;
 | 
				
			||||||
 | 
					    Created: Date;
 | 
				
			||||||
    TrainingDate: Date; // TrainingDate changed from IMongoDate to Date
 | 
					    TrainingDate: Date; // TrainingDate changed from IMongoDate to Date
 | 
				
			||||||
    LoadOutPresets: Types.ObjectId; // LoadOutPresets changed from ILoadOutPresets to Types.ObjectId for population
 | 
					    LoadOutPresets: Types.ObjectId; // LoadOutPresets changed from ILoadOutPresets to Types.ObjectId for population
 | 
				
			||||||
    Mailbox: Types.ObjectId; // Mailbox changed from IMailbox to Types.ObjectId
 | 
					    Mailbox: Types.ObjectId; // Mailbox changed from IMailbox to Types.ObjectId
 | 
				
			||||||
    PendingRecipes: IPendingRecipe[];
 | 
					    PendingRecipes: IPendingRecipe[];
 | 
				
			||||||
 | 
					    QuestKeys: IQuestKeyDatabase[];
 | 
				
			||||||
 | 
					    BlessingCooldown: Date;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IInventoryResponseDocument extends IInventoryResponse, Document {}
 | 
					export interface IInventoryResponseDocument extends IInventoryResponse, Document {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export interface IQuestKeyDatabase {
 | 
				
			||||||
 | 
					    Progress?: IQuestProgress[];
 | 
				
			||||||
 | 
					    unlock?: boolean;
 | 
				
			||||||
 | 
					    Completed?: boolean;
 | 
				
			||||||
 | 
					    CustomData?: string; //TODO: check whether this actually exists
 | 
				
			||||||
 | 
					    ItemType: string;
 | 
				
			||||||
 | 
					    CompletionDate?: Date;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export interface IFocusUpgrades {
 | 
				
			||||||
 | 
					    ItemType: string;
 | 
				
			||||||
 | 
					    Level: number;
 | 
				
			||||||
 | 
					    IsUniversal: boolean;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export interface ITypeCount {
 | 
				
			||||||
 | 
					    ItemType: string;
 | 
				
			||||||
 | 
					    ItemCount: number;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export interface IGenericItem2 {
 | 
				
			||||||
 | 
					    ItemType: string;
 | 
				
			||||||
 | 
					    ItemName: string;
 | 
				
			||||||
 | 
					    ItemId: IOid;
 | 
				
			||||||
 | 
					    XP: number;
 | 
				
			||||||
 | 
					    UpgradeVer: number;
 | 
				
			||||||
 | 
					    Features: number;
 | 
				
			||||||
 | 
					    Polarized: number;
 | 
				
			||||||
 | 
					    CustomizationSlotPurchases: number;
 | 
				
			||||||
 | 
					    ModSlotPurchases: number;
 | 
				
			||||||
 | 
					    FocusLens: string;
 | 
				
			||||||
 | 
					    Expiry: IMongoDate;
 | 
				
			||||||
 | 
					    Polarity: IPolarity[];
 | 
				
			||||||
 | 
					    Configs: IItemConfig[];
 | 
				
			||||||
 | 
					    ModularParts: string[];
 | 
				
			||||||
 | 
					    SkillTree: string;
 | 
				
			||||||
 | 
					    UpgradeType: string;
 | 
				
			||||||
 | 
					    UpgradeFingerprint: string;
 | 
				
			||||||
 | 
					    OffensiveUpgrade: string;
 | 
				
			||||||
 | 
					    DefensiveUpgrade: string;
 | 
				
			||||||
 | 
					    UpgradesExpiry: IMongoDate;
 | 
				
			||||||
 | 
					    ArchonCrystalUpgrades: [];
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IGenericItem {
 | 
					export interface IGenericItem {
 | 
				
			||||||
    ItemType: string;
 | 
					    ItemType: string;
 | 
				
			||||||
    XP?: number;
 | 
					    XP?: number;
 | 
				
			||||||
@ -91,7 +141,7 @@ export interface IInventoryResponse {
 | 
				
			|||||||
    Pistols: IWeaponDatabase[];
 | 
					    Pistols: IWeaponDatabase[];
 | 
				
			||||||
    Melee: IWeaponDatabase[];
 | 
					    Melee: IWeaponDatabase[];
 | 
				
			||||||
    Ships: IShip[];
 | 
					    Ships: IShip[];
 | 
				
			||||||
    QuestKeys: IQuestKey[];
 | 
					    QuestKeys: IQuestKeyResponse[];
 | 
				
			||||||
    FlavourItems: IFlavourItem[];
 | 
					    FlavourItems: IFlavourItem[];
 | 
				
			||||||
    Scoops: IGenericItem[];
 | 
					    Scoops: IGenericItem[];
 | 
				
			||||||
    TrainingRetriesLeft: number;
 | 
					    TrainingRetriesLeft: number;
 | 
				
			||||||
@ -100,8 +150,8 @@ export interface IInventoryResponse {
 | 
				
			|||||||
    Missions: IMission[];
 | 
					    Missions: IMission[];
 | 
				
			||||||
    RandomUpgradesIdentified: number;
 | 
					    RandomUpgradesIdentified: number;
 | 
				
			||||||
    LastRegionPlayed: string;
 | 
					    LastRegionPlayed: string;
 | 
				
			||||||
    XPInfo: IEmailItem[];
 | 
					    XPInfo: ITypeXPItem[];
 | 
				
			||||||
    Recipes: IConsumable[];
 | 
					    Recipes: ITypeCount[];
 | 
				
			||||||
    WeaponSkins: IWeaponSkin[];
 | 
					    WeaponSkins: IWeaponSkin[];
 | 
				
			||||||
    PendingRecipes: IPendingRecipeResponse[];
 | 
					    PendingRecipes: IPendingRecipeResponse[];
 | 
				
			||||||
    TrainingDate: IMongoDate;
 | 
					    TrainingDate: IMongoDate;
 | 
				
			||||||
@ -116,7 +166,7 @@ export interface IInventoryResponse {
 | 
				
			|||||||
    LevelKeys: IConsumable[];
 | 
					    LevelKeys: IConsumable[];
 | 
				
			||||||
    TauntHistory: ITauntHistory[];
 | 
					    TauntHistory: ITauntHistory[];
 | 
				
			||||||
    StoryModeChoice: string;
 | 
					    StoryModeChoice: string;
 | 
				
			||||||
    PeriodicMissionCompletions: IPeriodicMissionCompletion[];
 | 
					    PeriodicMissionCompletions: IPeriodicMissionCompletionDatabase[];
 | 
				
			||||||
    KubrowPetEggs: IKubrowPetEgg[];
 | 
					    KubrowPetEggs: IKubrowPetEgg[];
 | 
				
			||||||
    LoreFragmentScans: ILoreFragmentScan[];
 | 
					    LoreFragmentScans: ILoreFragmentScan[];
 | 
				
			||||||
    EquippedEmotes: string[];
 | 
					    EquippedEmotes: string[];
 | 
				
			||||||
@ -135,7 +185,7 @@ export interface IInventoryResponse {
 | 
				
			|||||||
    SpectreLoadouts: ISpectreLoadout[];
 | 
					    SpectreLoadouts: ISpectreLoadout[];
 | 
				
			||||||
    SentinelWeapons: IWeaponDatabase[];
 | 
					    SentinelWeapons: IWeaponDatabase[];
 | 
				
			||||||
    Sentinels: IWeaponDatabase[];
 | 
					    Sentinels: IWeaponDatabase[];
 | 
				
			||||||
    EmailItems: IEmailItem[];
 | 
					    EmailItems: ITypeXPItem[];
 | 
				
			||||||
    CompletedSyndicates: string[];
 | 
					    CompletedSyndicates: string[];
 | 
				
			||||||
    FocusXP: IFocusXP;
 | 
					    FocusXP: IFocusXP;
 | 
				
			||||||
    Wishlist: string[];
 | 
					    Wishlist: string[];
 | 
				
			||||||
@ -160,7 +210,7 @@ export interface IInventoryResponse {
 | 
				
			|||||||
    AlignmentReplay: IAlignment;
 | 
					    AlignmentReplay: IAlignment;
 | 
				
			||||||
    PersonalGoalProgress: IPersonalGoalProgress[];
 | 
					    PersonalGoalProgress: IPersonalGoalProgress[];
 | 
				
			||||||
    DailyAffiliationSolaris: number;
 | 
					    DailyAffiliationSolaris: number;
 | 
				
			||||||
    SpecialItems: ISpecialItem[];
 | 
					    SpecialItems: IGenericItem2[];
 | 
				
			||||||
    ThemeStyle: string;
 | 
					    ThemeStyle: string;
 | 
				
			||||||
    ThemeBackground: string;
 | 
					    ThemeBackground: string;
 | 
				
			||||||
    ThemeSounds: string;
 | 
					    ThemeSounds: string;
 | 
				
			||||||
@ -395,17 +445,27 @@ export interface ISlot {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface ICustomization {
 | 
					export interface ICustomization {
 | 
				
			||||||
    CrewshipInterior: ITerior;
 | 
					    CrewshipInterior: IShipExterior;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface ITerior {
 | 
					export interface IShipExterior {
 | 
				
			||||||
    SkinFlavourItem: string;
 | 
					    SkinFlavourItem: string;
 | 
				
			||||||
    Colors: IColor;
 | 
					    Colors: IShipExteriorColors;
 | 
				
			||||||
    ShipAttachments?: IShipAttachments;
 | 
					    ShipAttachments?: IShipAttachments;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//TODO: check whether it makes sense to use this specifity of color.
 | 
				
			||||||
 | 
					export interface IShipExteriorColors {
 | 
				
			||||||
 | 
					    t0: number;
 | 
				
			||||||
 | 
					    t1: number;
 | 
				
			||||||
 | 
					    t2: number;
 | 
				
			||||||
 | 
					    t3: number;
 | 
				
			||||||
 | 
					    m0: number;
 | 
				
			||||||
 | 
					    en: number;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IShipAttachments {
 | 
					export interface IShipAttachments {
 | 
				
			||||||
    HOOD_ORNAMENT: string;
 | 
					    HOOD_ORNAMENT: string; //TODO: Others are probably possible
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IFlavourItem {
 | 
					export interface IFlavourItem {
 | 
				
			||||||
@ -452,7 +512,7 @@ export interface IDrone {
 | 
				
			|||||||
    RepairStart?: IMongoDate;
 | 
					    RepairStart?: IMongoDate;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IEmailItem {
 | 
					export interface ITypeXPItem {
 | 
				
			||||||
    ItemType: string;
 | 
					    ItemType: string;
 | 
				
			||||||
    XP: number;
 | 
					    XP: number;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -511,7 +571,7 @@ export interface ISigcol {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export interface IInfestedFoundry {
 | 
					export interface IInfestedFoundry {
 | 
				
			||||||
    Name: string;
 | 
					    Name: string;
 | 
				
			||||||
    Resources: IResource[];
 | 
					    Resources: ITypeCount[];
 | 
				
			||||||
    Slots: number;
 | 
					    Slots: number;
 | 
				
			||||||
    XP: number;
 | 
					    XP: number;
 | 
				
			||||||
    ConsumedSuits: IConsumedSuit[];
 | 
					    ConsumedSuits: IConsumedSuit[];
 | 
				
			||||||
@ -525,11 +585,6 @@ export interface IConsumedSuit {
 | 
				
			|||||||
    c?: IColor;
 | 
					    c?: IColor;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IResource {
 | 
					 | 
				
			||||||
    ItemType: string;
 | 
					 | 
				
			||||||
    Count: number;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export interface IInvasionChainProgress {
 | 
					export interface IInvasionChainProgress {
 | 
				
			||||||
    id: IOid;
 | 
					    id: IOid;
 | 
				
			||||||
    count: number;
 | 
					    count: number;
 | 
				
			||||||
@ -881,12 +936,16 @@ export enum GivingSlotOrderInfo {
 | 
				
			|||||||
    LotusUpgradesModsPistolDualStatElectEventPistolMod = "/Lotus/Upgrades/Mods/Pistol/DualStat/ElectEventPistolMod"
 | 
					    LotusUpgradesModsPistolDualStatElectEventPistolMod = "/Lotus/Upgrades/Mods/Pistol/DualStat/ElectEventPistolMod"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IPeriodicMissionCompletion {
 | 
					export interface IPeriodicMissionCompletionDatabase {
 | 
				
			||||||
    date: IMongoDate;
 | 
					    date: Date;
 | 
				
			||||||
    tag: string;
 | 
					    tag: string;
 | 
				
			||||||
    count?: number;
 | 
					    count?: number;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export interface IPeriodicMissionCompletionResponse extends Omit<IPeriodicMissionCompletionDatabase, "date"> {
 | 
				
			||||||
 | 
					    date: IMongoDate;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IPersonalGoalProgress {
 | 
					export interface IPersonalGoalProgress {
 | 
				
			||||||
    Count: number;
 | 
					    Count: number;
 | 
				
			||||||
    Tag: string;
 | 
					    Tag: string;
 | 
				
			||||||
@ -923,16 +982,11 @@ export interface IPlayerSkills {
 | 
				
			|||||||
    LPS_DRIFT_ENDURANCE: number;
 | 
					    LPS_DRIFT_ENDURANCE: number;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IQuestKey {
 | 
					export interface IQuestKeyResponse extends Omit<IQuestKeyDatabase, "CompletionDate"> {
 | 
				
			||||||
    Progress?: IProgress[];
 | 
					 | 
				
			||||||
    unlock?: boolean;
 | 
					 | 
				
			||||||
    Completed?: boolean;
 | 
					 | 
				
			||||||
    CustomData?: string;
 | 
					 | 
				
			||||||
    ItemType: string;
 | 
					 | 
				
			||||||
    CompletionDate?: IMongoDate;
 | 
					    CompletionDate?: IMongoDate;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IProgress {
 | 
					export interface IQuestProgress {
 | 
				
			||||||
    c: number;
 | 
					    c: number;
 | 
				
			||||||
    i: boolean;
 | 
					    i: boolean;
 | 
				
			||||||
    m: boolean;
 | 
					    m: boolean;
 | 
				
			||||||
@ -964,7 +1018,7 @@ export interface ISettings {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export interface IShip {
 | 
					export interface IShip {
 | 
				
			||||||
    ItemType: string;
 | 
					    ItemType: string;
 | 
				
			||||||
    ShipExterior: ITerior;
 | 
					    ShipExterior: IShipExterior;
 | 
				
			||||||
    AirSupportPower: string;
 | 
					    AirSupportPower: string;
 | 
				
			||||||
    ItemId: IOid;
 | 
					    ItemId: IOid;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -989,28 +1043,6 @@ export interface ISpaceGunConfig {
 | 
				
			|||||||
    Upgrades?: string[];
 | 
					    Upgrades?: string[];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface ISpecialItem {
 | 
					 | 
				
			||||||
    ItemType: string;
 | 
					 | 
				
			||||||
    Configs: ISpecialItemConfig[];
 | 
					 | 
				
			||||||
    XP?: number;
 | 
					 | 
				
			||||||
    UpgradeVer?: number;
 | 
					 | 
				
			||||||
    Features: number;
 | 
					 | 
				
			||||||
    ItemId: IOid;
 | 
					 | 
				
			||||||
    Polarized?: number;
 | 
					 | 
				
			||||||
    Polarity?: IPolarity[];
 | 
					 | 
				
			||||||
    ModSlotPurchases?: number;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export interface ISpecialItemConfig {
 | 
					 | 
				
			||||||
    Upgrades?: string[];
 | 
					 | 
				
			||||||
    pricol?: IColor;
 | 
					 | 
				
			||||||
    Skins?: string[];
 | 
					 | 
				
			||||||
    attcol?: IColor;
 | 
					 | 
				
			||||||
    eyecol?: IPurpleCol;
 | 
					 | 
				
			||||||
    sigcol?: IPurpleCol;
 | 
					 | 
				
			||||||
    Name?: string;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export interface IPurpleCol {
 | 
					export interface IPurpleCol {
 | 
				
			||||||
    en: number;
 | 
					    en: number;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,5 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "SubscribedToEmails": 0,
 | 
					  "SubscribedToEmails": 0,
 | 
				
			||||||
  "Created": { "$date": { "$numberLong": "1685829131" } },
 | 
					 | 
				
			||||||
  "SubscribedToEmailsPersonalized": 0,
 | 
					  "SubscribedToEmailsPersonalized": 0,
 | 
				
			||||||
  "RewardSeed": -5604904486637265640,
 | 
					  "RewardSeed": -5604904486637265640,
 | 
				
			||||||
  "CrewMemberBin": { "Slots": 3 },
 | 
					  "CrewMemberBin": { "Slots": 3 },
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user