@lgriffin/esi.ts 9.6.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +787 -388
- package/LICENSE +26 -26
- package/README.md +974 -1030
- package/dist/EsiClient.d.ts +4 -0
- package/dist/EsiClient.d.ts.map +1 -1
- package/dist/EsiClientBuilder.d.ts.map +1 -1
- package/dist/auth/EsiTokenManager.d.ts +200 -0
- package/dist/auth/EsiTokenManager.d.ts.map +1 -0
- package/dist/auth/EveSsoClient.d.ts +88 -0
- package/dist/auth/EveSsoClient.d.ts.map +1 -0
- package/dist/auth/errors.d.ts +42 -0
- package/dist/auth/errors.d.ts.map +1 -0
- package/dist/auth/index.d.ts +14 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/jwt.d.ts +43 -0
- package/dist/auth/jwt.d.ts.map +1 -0
- package/dist/auth/pkce.d.ts +21 -0
- package/dist/auth/pkce.d.ts.map +1 -0
- package/dist/auth/storage/FileTokenStorage.d.ts +44 -0
- package/dist/auth/storage/FileTokenStorage.d.ts.map +1 -0
- package/dist/auth/storage/MemoryTokenStorage.d.ts +18 -0
- package/dist/auth/storage/MemoryTokenStorage.d.ts.map +1 -0
- package/dist/auth/types.d.ts +42 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/chunk-3ZI5A37L.mjs +1065 -0
- package/dist/chunk-3ZI5A37L.mjs.map +1 -0
- package/dist/chunk-7A72QFDF.mjs +416 -0
- package/dist/chunk-7A72QFDF.mjs.map +1 -0
- package/dist/chunk-BBSHKVPI.js +71 -0
- package/dist/chunk-BBSHKVPI.js.map +1 -0
- package/dist/chunk-HPSACXX3.js +416 -0
- package/dist/chunk-HPSACXX3.js.map +1 -0
- package/dist/chunk-JIW4BXLP.mjs +17 -0
- package/dist/chunk-JIW4BXLP.mjs.map +1 -0
- package/dist/chunk-MSJHIJXA.js +1065 -0
- package/dist/chunk-MSJHIJXA.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/chunk-R7D7M2LQ.mjs +71 -0
- package/dist/chunk-R7D7M2LQ.mjs.map +1 -0
- package/dist/chunk-SAQBXXTM.js +2614 -0
- package/dist/chunk-SAQBXXTM.js.map +1 -0
- package/dist/chunk-VZS32UQ3.mjs +2614 -0
- package/dist/chunk-VZS32UQ3.mjs.map +1 -0
- package/dist/clients/AllianceClient.d.ts +2 -0
- package/dist/clients/AllianceClient.d.ts.map +1 -1
- package/dist/clients/AssetsClient.d.ts +2 -0
- package/dist/clients/AssetsClient.d.ts.map +1 -1
- package/dist/clients/BaseEsiClient.d.ts +1 -0
- package/dist/clients/BaseEsiClient.d.ts.map +1 -1
- package/dist/clients/CalendarClient.d.ts +2 -0
- package/dist/clients/CalendarClient.d.ts.map +1 -1
- package/dist/clients/CharacterClient.d.ts +8 -0
- package/dist/clients/CharacterClient.d.ts.map +1 -1
- package/dist/clients/ClonesClient.d.ts +1 -0
- package/dist/clients/ClonesClient.d.ts.map +1 -1
- package/dist/clients/ContactsClient.d.ts +6 -0
- package/dist/clients/ContactsClient.d.ts.map +1 -1
- package/dist/clients/ContractsClient.d.ts +14 -8
- package/dist/clients/ContractsClient.d.ts.map +1 -1
- package/dist/clients/CorporationProjectsClient.d.ts +22 -12
- package/dist/clients/CorporationProjectsClient.d.ts.map +1 -1
- package/dist/clients/CorporationsClient.d.ts +17 -0
- package/dist/clients/CorporationsClient.d.ts.map +1 -1
- package/dist/clients/FactionClient.d.ts +4 -4
- package/dist/clients/FactionClient.d.ts.map +1 -1
- package/dist/clients/FittingsClient.d.ts +1 -0
- package/dist/clients/FittingsClient.d.ts.map +1 -1
- package/dist/clients/FleetClient.d.ts +2 -0
- package/dist/clients/FleetClient.d.ts.map +1 -1
- package/dist/clients/FreelanceJobsClient.d.ts +3 -3
- package/dist/clients/FreelanceJobsClient.d.ts.map +1 -1
- package/dist/clients/IndustryClient.d.ts +11 -3
- package/dist/clients/IndustryClient.d.ts.map +1 -1
- package/dist/clients/KillmailsClient.d.ts +2 -0
- package/dist/clients/KillmailsClient.d.ts.map +1 -1
- package/dist/clients/LoyaltyClient.d.ts +2 -0
- package/dist/clients/LoyaltyClient.d.ts.map +1 -1
- package/dist/clients/MailClient.d.ts +8 -3
- package/dist/clients/MailClient.d.ts.map +1 -1
- package/dist/clients/MarketClient.d.ts +6 -0
- package/dist/clients/MarketClient.d.ts.map +1 -1
- package/dist/clients/MetaClient.d.ts +3 -2
- package/dist/clients/MetaClient.d.ts.map +1 -1
- package/dist/clients/PiClient.d.ts +2 -0
- package/dist/clients/PiClient.d.ts.map +1 -1
- package/dist/clients/SkillsClient.d.ts +1 -0
- package/dist/clients/SkillsClient.d.ts.map +1 -1
- package/dist/clients/WalletClient.d.ts +7 -3
- package/dist/clients/WalletClient.d.ts.map +1 -1
- package/dist/clients/WarsClient.d.ts +2 -0
- package/dist/clients/WarsClient.d.ts.map +1 -1
- package/dist/core/ApiClient.d.ts +8 -0
- package/dist/core/ApiClient.d.ts.map +1 -1
- package/dist/core/ApiClientBuilder.d.ts +3 -1
- package/dist/core/ApiClientBuilder.d.ts.map +1 -1
- package/dist/core/ApiRequestHandler.d.ts.map +1 -1
- package/dist/core/BatchRequestHandler.d.ts.map +1 -1
- package/dist/core/RequestDeduplicator.d.ts +2 -0
- package/dist/core/RequestDeduplicator.d.ts.map +1 -1
- package/dist/core/RetryStrategy.d.ts +2 -0
- package/dist/core/RetryStrategy.d.ts.map +1 -1
- package/dist/core/cache/ETagCacheManager.d.ts +4 -0
- package/dist/core/cache/ETagCacheManager.d.ts.map +1 -1
- package/dist/core/circuitBreaker/CircuitBreaker.d.ts +3 -0
- package/dist/core/circuitBreaker/CircuitBreaker.d.ts.map +1 -1
- package/dist/core/configureApiClient.d.ts.map +1 -1
- package/dist/core/constants.d.ts +2 -2
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/endpoints/EndpointDefinition.d.ts +2 -2
- package/dist/core/endpoints/EndpointDefinition.d.ts.map +1 -1
- package/dist/core/endpoints/calendarEndpoints.d.ts +7 -7
- package/dist/core/endpoints/characterEndpoints.d.ts +2 -2
- package/dist/core/endpoints/cloneEndpoints.d.ts +2 -2
- package/dist/core/endpoints/contractEndpoints.d.ts +15 -22
- package/dist/core/endpoints/contractEndpoints.d.ts.map +1 -1
- package/dist/core/endpoints/corporationEndpoints.d.ts +19 -22
- package/dist/core/endpoints/corporationEndpoints.d.ts.map +1 -1
- package/dist/core/endpoints/corporationProjectEndpoints.d.ts +75 -23
- package/dist/core/endpoints/corporationProjectEndpoints.d.ts.map +1 -1
- package/dist/core/endpoints/createClient.d.ts +2 -2
- package/dist/core/endpoints/createClient.d.ts.map +1 -1
- package/dist/core/endpoints/dogmaEndpoints.d.ts +2 -2
- package/dist/core/endpoints/factionEndpoints.d.ts +36 -36
- package/dist/core/endpoints/factionEndpoints.d.ts.map +1 -1
- package/dist/core/endpoints/fleetEndpoints.d.ts +1 -1
- package/dist/core/endpoints/freelanceJobsEndpoints.d.ts +131 -122
- package/dist/core/endpoints/freelanceJobsEndpoints.d.ts.map +1 -1
- package/dist/core/endpoints/industryEndpoints.d.ts +6 -6
- package/dist/core/endpoints/industryEndpoints.d.ts.map +1 -1
- package/dist/core/endpoints/mailEndpoints.d.ts +3 -5
- package/dist/core/endpoints/mailEndpoints.d.ts.map +1 -1
- package/dist/core/endpoints/mercenaryEndpoints.d.ts +1 -1
- package/dist/core/endpoints/metaEndpoints.d.ts +5 -1
- package/dist/core/endpoints/metaEndpoints.d.ts.map +1 -1
- package/dist/core/endpoints/piEndpoints.d.ts +2 -2
- package/dist/core/endpoints/statusEndpoints.d.ts +1 -1
- package/dist/core/endpoints/universeEndpoints.d.ts +22 -22
- package/dist/core/endpoints/walletEndpoints.d.ts +2 -3
- package/dist/core/endpoints/walletEndpoints.d.ts.map +1 -1
- package/dist/core/logger/DefaultLogger.d.ts +31 -0
- package/dist/core/logger/DefaultLogger.d.ts.map +1 -0
- package/dist/core/logger/ILogger.d.ts +14 -4
- package/dist/core/logger/ILogger.d.ts.map +1 -1
- package/dist/core/logger/NoopLogger.d.ts +7 -0
- package/dist/core/logger/NoopLogger.d.ts.map +1 -0
- package/dist/core/logger/clientLog.d.ts +11 -0
- package/dist/core/logger/clientLog.d.ts.map +1 -0
- package/dist/core/logger/logger.d.ts +11 -3
- package/dist/core/logger/logger.d.ts.map +1 -1
- package/dist/core/logger/loggerUtil.d.ts +8 -6
- package/dist/core/logger/loggerUtil.d.ts.map +1 -1
- package/dist/core/logger/resolveLogger.d.ts +10 -0
- package/dist/core/logger/resolveLogger.d.ts.map +1 -0
- package/dist/core/pagination/AsyncPaginationIterator.d.ts +1 -0
- package/dist/core/pagination/AsyncPaginationIterator.d.ts.map +1 -1
- package/dist/core/pagination/CursorPaginationHandler.d.ts.map +1 -1
- package/dist/core/pagination/PaginationHandler.d.ts.map +1 -1
- package/dist/core/rateLimiter/RateLimiter.d.ts +6 -0
- package/dist/core/rateLimiter/RateLimiter.d.ts.map +1 -1
- package/dist/core/requestPipeline/cachePolicy.d.ts +14 -0
- package/dist/core/requestPipeline/cachePolicy.d.ts.map +1 -1
- package/dist/core/requestPipeline/fetchExecution.d.ts +1 -1
- package/dist/core/requestPipeline/fetchExecution.d.ts.map +1 -1
- package/dist/core/requestPipeline/headers.d.ts.map +1 -1
- package/dist/core/requestPipeline/index.d.ts +2 -2
- package/dist/core/requestPipeline/index.d.ts.map +1 -1
- package/dist/core/requestPipeline/paginationOrchestration.d.ts.map +1 -1
- package/dist/core/requestPipeline/statusHandling.d.ts +8 -2
- package/dist/core/requestPipeline/statusHandling.d.ts.map +1 -1
- package/dist/core/util/concurrency.d.ts +29 -0
- package/dist/core/util/concurrency.d.ts.map +1 -0
- package/dist/errors.d.ts +1 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +53 -195
- package/dist/errors.js.map +1 -1
- package/dist/errors.mjs +37 -129
- package/dist/errors.mjs.map +1 -1
- package/dist/index.d.ts +10 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2597 -3480
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2250 -3024
- package/dist/index.mjs.map +1 -1
- package/dist/schemas/calendar.d.ts +9 -7
- package/dist/schemas/calendar.d.ts.map +1 -1
- package/dist/schemas/character.d.ts +2 -2
- package/dist/schemas/clones.d.ts +2 -2
- package/dist/schemas/common.d.ts +11 -1
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/contracts.d.ts +69 -6
- package/dist/schemas/contracts.d.ts.map +1 -1
- package/dist/schemas/corporation-projects.d.ts +96 -9
- package/dist/schemas/corporation-projects.d.ts.map +1 -1
- package/dist/schemas/corporation.d.ts +34 -22
- package/dist/schemas/corporation.d.ts.map +1 -1
- package/dist/schemas/dogma.d.ts +2 -2
- package/dist/schemas/faction-warfare.d.ts +125 -12
- package/dist/schemas/faction-warfare.d.ts.map +1 -1
- package/dist/schemas/fleet.d.ts +1 -1
- package/dist/schemas/freelance-jobs.d.ts +52 -22
- package/dist/schemas/freelance-jobs.d.ts.map +1 -1
- package/dist/schemas/index.js +420 -2474
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/index.mjs +225 -2060
- package/dist/schemas/index.mjs.map +1 -1
- package/dist/schemas/industry.d.ts +33 -0
- package/dist/schemas/industry.d.ts.map +1 -1
- package/dist/schemas/mail.d.ts +24 -5
- package/dist/schemas/mail.d.ts.map +1 -1
- package/dist/schemas/mercenary.d.ts +1 -1
- package/dist/schemas/meta.d.ts +12 -1
- package/dist/schemas/meta.d.ts.map +1 -1
- package/dist/schemas/pi.d.ts +2 -2
- package/dist/schemas/status.d.ts +1 -1
- package/dist/schemas/universe.d.ts +22 -22
- package/dist/schemas/universe.d.ts.map +1 -1
- package/dist/schemas/wallet.d.ts +16 -0
- package/dist/schemas/wallet.d.ts.map +1 -1
- package/dist/sde/SdeDataProvider.d.ts.map +1 -1
- package/dist/sde/index.js +95 -1162
- package/dist/sde/index.js.map +1 -1
- package/dist/sde/index.mjs +73 -1091
- package/dist/sde/index.mjs.map +1 -1
- package/dist/sde/ingestion/SdeExtractor.d.ts.map +1 -1
- package/dist/sde/ingestion/metadata.d.ts +13 -0
- package/dist/sde/ingestion/metadata.d.ts.map +1 -0
- package/dist/sde/memory.js +21 -1095
- package/dist/sde/memory.js.map +1 -1
- package/dist/sde/memory.mjs +13 -1051
- package/dist/sde/memory.mjs.map +1 -1
- package/dist/sde/optionalPeers.d.ts +25 -0
- package/dist/sde/optionalPeers.d.ts.map +1 -0
- package/dist/testing/TestDataFactory.d.ts +28 -1
- package/dist/testing/TestDataFactory.d.ts.map +1 -1
- package/dist/testing/index.js +116 -125
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/index.mjs +110 -82
- package/dist/testing/index.mjs.map +1 -1
- package/dist/types/contracts.d.ts +4 -1
- package/dist/types/contracts.d.ts.map +1 -1
- package/dist/types/corporation-projects.d.ts +5 -1
- package/dist/types/corporation-projects.d.ts.map +1 -1
- package/dist/types/faction-warfare.d.ts +9 -1
- package/dist/types/faction-warfare.d.ts.map +1 -1
- package/dist/types/freelance-jobs.d.ts +2 -1
- package/dist/types/freelance-jobs.d.ts.map +1 -1
- package/dist/types/generated/esi-spec.generated.d.ts +12 -12
- package/dist/types/generated/esi-spec.generated.d.ts.map +1 -1
- package/dist/types/generated/spec-alignment.check.d.ts +2 -2
- package/dist/types/industry.d.ts +2 -1
- package/dist/types/industry.d.ts.map +1 -1
- package/dist/types/mail.d.ts +2 -1
- package/dist/types/mail.d.ts.map +1 -1
- package/dist/types/meta.d.ts +2 -1
- package/dist/types/meta.d.ts.map +1 -1
- package/dist/types/wallet.d.ts +2 -1
- package/dist/types/wallet.d.ts.map +1 -1
- package/package.json +326 -289
package/dist/testing/index.js
CHANGED
|
@@ -1,112 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/testing/index.ts
|
|
31
|
-
var testing_exports = {};
|
|
32
|
-
__export(testing_exports, {
|
|
33
|
-
TestDataFactory: () => TestDataFactory
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(testing_exports);
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
36
2
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var pinoLogger = (0, import_pino.default)({ level: process.env.ESI_LOG_LEVEL || "warn" });
|
|
40
|
-
|
|
41
|
-
// src/core/util/error.ts
|
|
42
|
-
var SENSITIVE_PARAMS = [
|
|
43
|
-
"token",
|
|
44
|
-
"access_token",
|
|
45
|
-
"api_key",
|
|
46
|
-
"refresh_token",
|
|
47
|
-
"client_secret",
|
|
48
|
-
"code",
|
|
49
|
-
"key",
|
|
50
|
-
"secret",
|
|
51
|
-
"auth",
|
|
52
|
-
"password",
|
|
53
|
-
"bearer"
|
|
54
|
-
];
|
|
55
|
-
function sanitizeUrl(url) {
|
|
56
|
-
if (!url) return url;
|
|
57
|
-
try {
|
|
58
|
-
const parsed = new URL(url);
|
|
59
|
-
for (const param of SENSITIVE_PARAMS) {
|
|
60
|
-
if (parsed.searchParams.has(param)) {
|
|
61
|
-
parsed.searchParams.set(param, "[REDACTED]");
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return parsed.toString();
|
|
65
|
-
} catch {
|
|
66
|
-
const qIndex = url.indexOf("?");
|
|
67
|
-
return qIndex >= 0 ? url.substring(0, qIndex) + "?[params-redacted]" : url;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
var EsiError = class extends Error {
|
|
71
|
-
constructor(statusCode, message, url, requestId) {
|
|
72
|
-
super(message);
|
|
73
|
-
this.statusCode = statusCode;
|
|
74
|
-
this.requestId = requestId;
|
|
75
|
-
this.name = "EsiError";
|
|
76
|
-
this.url = sanitizeUrl(url);
|
|
77
|
-
}
|
|
78
|
-
statusCode;
|
|
79
|
-
requestId;
|
|
80
|
-
url;
|
|
81
|
-
isRateLimited() {
|
|
82
|
-
return this.statusCode === 420 || this.statusCode === 429;
|
|
83
|
-
}
|
|
84
|
-
isNotFound() {
|
|
85
|
-
return this.statusCode === 404;
|
|
86
|
-
}
|
|
87
|
-
isUnauthorized() {
|
|
88
|
-
return this.statusCode === 401;
|
|
89
|
-
}
|
|
90
|
-
isForbidden() {
|
|
91
|
-
return this.statusCode === 403;
|
|
92
|
-
}
|
|
93
|
-
isServerError() {
|
|
94
|
-
return this.statusCode >= 500;
|
|
95
|
-
}
|
|
96
|
-
isTimeout() {
|
|
97
|
-
return this.statusCode === 0;
|
|
98
|
-
}
|
|
99
|
-
get retryable() {
|
|
100
|
-
return this.statusCode === 0 || this.statusCode === 420 || this.statusCode === 429 || this.statusCode === 502 || this.statusCode === 503 || this.statusCode === 504;
|
|
101
|
-
}
|
|
102
|
-
};
|
|
3
|
+
var _chunkHPSACXX3js = require('../chunk-HPSACXX3.js');
|
|
4
|
+
require('../chunk-PZ5AY32C.js');
|
|
103
5
|
|
|
104
6
|
// src/testing/TestDataFactory.ts
|
|
105
7
|
var TestDataFactory = class {
|
|
106
8
|
// Alliance test data
|
|
9
|
+
/** `GET /alliances/{alliance_id}`: the alliance ID is in the path, not the body. */
|
|
107
10
|
static createAllianceInfo(overrides = {}) {
|
|
108
11
|
return {
|
|
109
|
-
alliance_id: 99005338,
|
|
110
12
|
name: "Goonswarm Federation",
|
|
111
13
|
ticker: "CONDI",
|
|
112
14
|
creator_id: 1689391488,
|
|
@@ -136,7 +38,6 @@ var TestDataFactory = class {
|
|
|
136
38
|
// Character test data
|
|
137
39
|
static createCharacterInfo(overrides = {}) {
|
|
138
40
|
return {
|
|
139
|
-
character_id: 1689391488,
|
|
140
41
|
name: "Test Character",
|
|
141
42
|
corporation_id: 1344654522,
|
|
142
43
|
alliance_id: 99005338,
|
|
@@ -207,6 +108,11 @@ var TestDataFactory = class {
|
|
|
207
108
|
date: "2023-01-01T00:00:00Z",
|
|
208
109
|
issuer_id: 1689391489,
|
|
209
110
|
reason: "Outstanding service",
|
|
111
|
+
status: "public",
|
|
112
|
+
graphics: [
|
|
113
|
+
{ part: 1, layer: 0, graphic: "caldari.1_1", color: -1 },
|
|
114
|
+
{ part: 2, layer: 1, graphic: "caldari.2_3" }
|
|
115
|
+
],
|
|
210
116
|
...overrides
|
|
211
117
|
};
|
|
212
118
|
}
|
|
@@ -285,6 +191,11 @@ var TestDataFactory = class {
|
|
|
285
191
|
system_id: 30000142,
|
|
286
192
|
name: "Jita",
|
|
287
193
|
constellation_id: 20000020,
|
|
194
|
+
position: {
|
|
195
|
+
x: -129064861735e6,
|
|
196
|
+
y: 6075530691e7,
|
|
197
|
+
z: 11746922706e7
|
|
198
|
+
},
|
|
288
199
|
security_status: 0.9459991455078125,
|
|
289
200
|
star_id: 40000001,
|
|
290
201
|
stargates: [50000001, 50000002],
|
|
@@ -304,6 +215,7 @@ var TestDataFactory = class {
|
|
|
304
215
|
type_id: 52678,
|
|
305
216
|
race_id: 1,
|
|
306
217
|
system_id: 30000142,
|
|
218
|
+
position: { x: 3813196800, y: 101675e4, z: -230557e4 },
|
|
307
219
|
reprocessing_efficiency: 0.5,
|
|
308
220
|
reprocessing_stations_take: 0.05,
|
|
309
221
|
max_dockable_ship_volume: 5e7,
|
|
@@ -319,9 +231,9 @@ var TestDataFactory = class {
|
|
|
319
231
|
...overrides
|
|
320
232
|
};
|
|
321
233
|
}
|
|
234
|
+
/** `GET /universe/structures/{structure_id}`: the ID is in the path, not the body. */
|
|
322
235
|
static createStructure(overrides = {}) {
|
|
323
236
|
return {
|
|
324
|
-
structure_id: 1021975535893,
|
|
325
237
|
name: "Test Citadel",
|
|
326
238
|
owner_id: 1689391488,
|
|
327
239
|
solar_system_id: 30000142,
|
|
@@ -330,13 +242,13 @@ var TestDataFactory = class {
|
|
|
330
242
|
...overrides
|
|
331
243
|
};
|
|
332
244
|
}
|
|
245
|
+
/** `GET /universe/types/{type_id}`: the category is on the group, not the type. */
|
|
333
246
|
static createItemType(overrides = {}) {
|
|
334
247
|
return {
|
|
335
248
|
type_id: 34,
|
|
336
249
|
name: "Tritanium",
|
|
337
250
|
description: "The most common ore type in the known universe.",
|
|
338
251
|
group_id: 18,
|
|
339
|
-
category_id: 4,
|
|
340
252
|
market_group_id: 1857,
|
|
341
253
|
mass: 1,
|
|
342
254
|
volume: 0.01,
|
|
@@ -357,9 +269,9 @@ var TestDataFactory = class {
|
|
|
357
269
|
...overrides
|
|
358
270
|
};
|
|
359
271
|
}
|
|
272
|
+
/** `GET /universe/stars/{star_id}`: the star ID is in the path, not the body. */
|
|
360
273
|
static createStar(overrides = {}) {
|
|
361
274
|
return {
|
|
362
|
-
star_id: 40000001,
|
|
363
275
|
name: "Jita - Star",
|
|
364
276
|
type_id: 3802,
|
|
365
277
|
solar_system_id: 30000142,
|
|
@@ -381,14 +293,18 @@ var TestDataFactory = class {
|
|
|
381
293
|
...overrides
|
|
382
294
|
};
|
|
383
295
|
}
|
|
296
|
+
/**
|
|
297
|
+
* `GET /characters/{character_id}/search`: one list per requested category,
|
|
298
|
+
* keyed by the singular category name.
|
|
299
|
+
*/
|
|
384
300
|
static createSearchResults(overrides = {}) {
|
|
385
301
|
return {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
302
|
+
solar_system: [],
|
|
303
|
+
station: [],
|
|
304
|
+
structure: [],
|
|
305
|
+
character: [],
|
|
306
|
+
corporation: [],
|
|
307
|
+
alliance: [],
|
|
392
308
|
...overrides
|
|
393
309
|
};
|
|
394
310
|
}
|
|
@@ -420,12 +336,14 @@ var TestDataFactory = class {
|
|
|
420
336
|
location_id: 60003760,
|
|
421
337
|
location_flag: "CorpSAG1",
|
|
422
338
|
location_type: "station",
|
|
339
|
+
is_singleton: false,
|
|
423
340
|
...overrides
|
|
424
341
|
};
|
|
425
342
|
}
|
|
426
343
|
static createCorporationStructure(overrides = {}) {
|
|
427
344
|
return {
|
|
428
345
|
structure_id: 1021975535893,
|
|
346
|
+
corporation_id: 1344654522,
|
|
429
347
|
type_id: 35832,
|
|
430
348
|
system_id: 30000142,
|
|
431
349
|
profile_id: 101853,
|
|
@@ -457,10 +375,9 @@ var TestDataFactory = class {
|
|
|
457
375
|
};
|
|
458
376
|
}
|
|
459
377
|
// Fleet test data
|
|
378
|
+
/** `GET /fleets/{fleet_id}`: the fleet ID is in the path, not the body. */
|
|
460
379
|
static createFleetInfo(overrides = {}) {
|
|
461
380
|
return {
|
|
462
|
-
fleet_id: 1234567890,
|
|
463
|
-
fleet_boss_id: 1689391488,
|
|
464
381
|
is_free_move: false,
|
|
465
382
|
is_registered: true,
|
|
466
383
|
is_voice_enabled: true,
|
|
@@ -468,21 +385,31 @@ var TestDataFactory = class {
|
|
|
468
385
|
...overrides
|
|
469
386
|
};
|
|
470
387
|
}
|
|
388
|
+
/**
|
|
389
|
+
* A fleet member as `GET /fleets/{fleet_id}/members` sends it. The default
|
|
390
|
+
* is the fleet commander, whom ESI places in no wing or squad (-1).
|
|
391
|
+
*/
|
|
471
392
|
static createFleetMember(overrides = {}) {
|
|
472
393
|
return {
|
|
473
394
|
character_id: 1689391488,
|
|
395
|
+
join_time: "2024-01-15T18:00:00Z",
|
|
474
396
|
role: "fleet_commander",
|
|
397
|
+
role_name: "Fleet Commander (Boss)",
|
|
475
398
|
ship_type_id: 17918,
|
|
476
399
|
solar_system_id: 30000142,
|
|
400
|
+
squad_id: -1,
|
|
477
401
|
station_id: 60003760,
|
|
402
|
+
takes_fleet_warp: true,
|
|
403
|
+
wing_id: -1,
|
|
478
404
|
...overrides
|
|
479
405
|
};
|
|
480
406
|
}
|
|
407
|
+
/** A wing as `GET /fleets/{fleet_id}/wings` sends it: keyed by `id`. */
|
|
481
408
|
static createFleetWing(overrides = {}) {
|
|
482
409
|
return {
|
|
483
|
-
|
|
410
|
+
id: 2073711261968,
|
|
484
411
|
name: "Wing 1",
|
|
485
|
-
squads: [{
|
|
412
|
+
squads: [{ id: 3129411261968, name: "Squad 1" }],
|
|
486
413
|
...overrides
|
|
487
414
|
};
|
|
488
415
|
}
|
|
@@ -492,12 +419,40 @@ var TestDataFactory = class {
|
|
|
492
419
|
job_id: 1000001,
|
|
493
420
|
installer_id: 1689391488,
|
|
494
421
|
facility_id: 60003760,
|
|
422
|
+
station_id: 60003760,
|
|
423
|
+
activity_id: 1,
|
|
424
|
+
blueprint_id: 1000000001,
|
|
425
|
+
blueprint_type_id: 17918,
|
|
426
|
+
blueprint_location_id: 60003760,
|
|
427
|
+
output_location_id: 60003760,
|
|
428
|
+
product_type_id: 17918,
|
|
429
|
+
runs: 1,
|
|
430
|
+
status: "active",
|
|
431
|
+
duration: 86400,
|
|
432
|
+
start_date: "2024-01-15T12:00:00Z",
|
|
433
|
+
end_date: "2024-01-16T12:00:00Z",
|
|
434
|
+
...overrides
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* A corporation industry job as `GET /corporations/{corporation_id}/industry/jobs`
|
|
439
|
+
* sends it: placed by `location_id`, where a character job has `station_id`.
|
|
440
|
+
*/
|
|
441
|
+
static createCorporationIndustryJob(overrides = {}) {
|
|
442
|
+
return {
|
|
443
|
+
job_id: 2000001,
|
|
444
|
+
installer_id: 1689391488,
|
|
445
|
+
facility_id: 1021975535893,
|
|
446
|
+
location_id: 1021975535893,
|
|
495
447
|
activity_id: 1,
|
|
496
448
|
blueprint_id: 1000000001,
|
|
497
449
|
blueprint_type_id: 17918,
|
|
450
|
+
blueprint_location_id: 1021975535893,
|
|
451
|
+
output_location_id: 1021975535893,
|
|
498
452
|
product_type_id: 17918,
|
|
499
453
|
runs: 1,
|
|
500
454
|
status: "active",
|
|
455
|
+
duration: 86400,
|
|
501
456
|
start_date: "2024-01-15T12:00:00Z",
|
|
502
457
|
end_date: "2024-01-16T12:00:00Z",
|
|
503
458
|
...overrides
|
|
@@ -524,6 +479,7 @@ var TestDataFactory = class {
|
|
|
524
479
|
location_id: 60003760,
|
|
525
480
|
location_flag: "Hangar",
|
|
526
481
|
location_type: "station",
|
|
482
|
+
is_singleton: false,
|
|
527
483
|
...overrides
|
|
528
484
|
};
|
|
529
485
|
}
|
|
@@ -557,9 +513,9 @@ var TestDataFactory = class {
|
|
|
557
513
|
};
|
|
558
514
|
}
|
|
559
515
|
// Corporation test data
|
|
516
|
+
/** `GET /corporations/{corporation_id}`: the ID is in the path, not the body. */
|
|
560
517
|
static createCorporationInfo(overrides = {}) {
|
|
561
518
|
return {
|
|
562
|
-
corporation_id: 1344654522,
|
|
563
519
|
name: "GoonWaffe",
|
|
564
520
|
ticker: "GEWNS",
|
|
565
521
|
ceo_id: 1689391488,
|
|
@@ -614,6 +570,25 @@ var TestDataFactory = class {
|
|
|
614
570
|
...overrides
|
|
615
571
|
};
|
|
616
572
|
}
|
|
573
|
+
/**
|
|
574
|
+
* A corporation wallet transaction as
|
|
575
|
+
* `GET /corporations/{corporation_id}/wallets/{division}/transactions` sends
|
|
576
|
+
* it: no is_personal.
|
|
577
|
+
*/
|
|
578
|
+
static createCorporationWalletTransaction(overrides = {}) {
|
|
579
|
+
return {
|
|
580
|
+
transaction_id: 123456790,
|
|
581
|
+
date: "2023-12-01T12:00:00Z",
|
|
582
|
+
type_id: 34,
|
|
583
|
+
location_id: 60003760,
|
|
584
|
+
unit_price: 5.5,
|
|
585
|
+
quantity: 1e3,
|
|
586
|
+
client_id: 1689391488,
|
|
587
|
+
is_buy: true,
|
|
588
|
+
journal_ref_id: 987654322,
|
|
589
|
+
...overrides
|
|
590
|
+
};
|
|
591
|
+
}
|
|
617
592
|
// Contract test data
|
|
618
593
|
static createContract(overrides = {}) {
|
|
619
594
|
return {
|
|
@@ -621,6 +596,7 @@ var TestDataFactory = class {
|
|
|
621
596
|
issuer_id: 1689391488,
|
|
622
597
|
issuer_corporation_id: 1344654522,
|
|
623
598
|
assignee_id: 987654321,
|
|
599
|
+
acceptor_id: 0,
|
|
624
600
|
start_location_id: 60003760,
|
|
625
601
|
end_location_id: 60008494,
|
|
626
602
|
type: "courier",
|
|
@@ -638,6 +614,22 @@ var TestDataFactory = class {
|
|
|
638
614
|
...overrides
|
|
639
615
|
};
|
|
640
616
|
}
|
|
617
|
+
static createPublicContract(overrides = {}) {
|
|
618
|
+
return {
|
|
619
|
+
contract_id: 123456790,
|
|
620
|
+
issuer_id: 1689391488,
|
|
621
|
+
issuer_corporation_id: 1344654522,
|
|
622
|
+
start_location_id: 60003760,
|
|
623
|
+
type: "item_exchange",
|
|
624
|
+
title: "Test Item Exchange Contract",
|
|
625
|
+
for_corporation: false,
|
|
626
|
+
date_issued: "2023-12-01T12:00:00Z",
|
|
627
|
+
date_expired: "2023-12-15T12:00:00Z",
|
|
628
|
+
price: 5e7,
|
|
629
|
+
volume: 10,
|
|
630
|
+
...overrides
|
|
631
|
+
};
|
|
632
|
+
}
|
|
641
633
|
// Sovereignty test data (Equinox)
|
|
642
634
|
static createSovereigntySystem(overrides = {}) {
|
|
643
635
|
return {
|
|
@@ -741,7 +733,7 @@ var TestDataFactory = class {
|
|
|
741
733
|
500: "Internal server error",
|
|
742
734
|
503: "Service unavailable"
|
|
743
735
|
};
|
|
744
|
-
return new EsiError(
|
|
736
|
+
return new (0, _chunkHPSACXX3js.EsiError)(
|
|
745
737
|
statusCode,
|
|
746
738
|
// eslint-disable-next-line security/detect-object-injection
|
|
747
739
|
message || defaultMessages[statusCode] || "Unknown error"
|
|
@@ -863,7 +855,7 @@ var TestDataFactory = class {
|
|
|
863
855
|
name: `Test Corporation ${i}`,
|
|
864
856
|
ticker: `TC${i.toString().padStart(3, "0")}`,
|
|
865
857
|
// eslint-disable-next-line security/detect-object-injection
|
|
866
|
-
alliance_id: data.alliances[allianceIndex]
|
|
858
|
+
alliance_id: _optionalChain([data, 'access', _ => _.alliances, 'access', _2 => _2[allianceIndex], 'optionalAccess', _3 => _3.alliance_id]),
|
|
867
859
|
ceo_id: 3e6 + i
|
|
868
860
|
})
|
|
869
861
|
);
|
|
@@ -877,8 +869,8 @@ var TestDataFactory = class {
|
|
|
877
869
|
this.createCharacterInfo({
|
|
878
870
|
character_id: 3e6 + i,
|
|
879
871
|
name: `Test Character ${i}`,
|
|
880
|
-
corporation_id: corp
|
|
881
|
-
alliance_id: corp
|
|
872
|
+
corporation_id: _optionalChain([corp, 'optionalAccess', _4 => _4.corporation_id]) || 2000001,
|
|
873
|
+
alliance_id: _optionalChain([corp, 'optionalAccess', _5 => _5.alliance_id])
|
|
882
874
|
})
|
|
883
875
|
);
|
|
884
876
|
}
|
|
@@ -928,8 +920,7 @@ var TestDataFactory = class {
|
|
|
928
920
|
};
|
|
929
921
|
}
|
|
930
922
|
};
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
});
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
exports.TestDataFactory = TestDataFactory;
|
|
935
926
|
//# sourceMappingURL=index.js.map
|