eve-esi-types 3.2.2 → 3.2.4

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 CHANGED
@@ -2,6 +2,29 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [3.2.4] - 2025-04-22
6
+
7
+ ### 🚜 Refactor
8
+
9
+ - Ensure type check passes with `skipLibCheck: false`
10
+
11
+ ### ⚙️ Miscellaneous Tasks
12
+
13
+ - Update CHANGELOG.md
14
+ - Bump version to v3.2.4
15
+
16
+ ## [3.2.3] - 2025-04-22
17
+
18
+ ### 🐛 Bug Fixes
19
+
20
+ - Remove duplicate union type reference
21
+
22
+ ### ⚙️ Miscellaneous Tasks
23
+
24
+ - Update CHANGELOG.md
25
+ - Lint
26
+ - Bump version to v3.2.3
27
+
5
28
  ## [3.2.2] - 2025-04-21
6
29
 
7
30
  ### 🚜 Refactor
package/jsconfig.json CHANGED
@@ -2,12 +2,13 @@
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "compilerOptions": {
4
4
  // This flag is required
5
- "skipLibCheck": true,
5
+ // "skipLibCheck": true,
6
6
  // This flag is required
7
7
  "checkJs": true,
8
8
  // This flag is required
9
9
  "strict": true,
10
10
  "noEmit": true,
11
+ "listFiles": true,
11
12
  // "skipDefaultLibCheck": true,
12
13
  // "target": "esnext",
13
14
  // "module": "esnext",
@@ -12,4 +12,7 @@ declare global {
12
12
  * @param {boolean} enable
13
13
  */
14
14
  export declare function defineColors(enable: boolean): void;
15
+ /**
16
+ * @param {string} banner
17
+ */
15
18
  export declare function getLogger(banner: string, logSelector?: string): (...args: any[]) => void;
@@ -72,6 +72,9 @@ const jsonBeautify = (jsonString) => {
72
72
  return m;
73
73
  });
74
74
  };
75
+ /**
76
+ * @param {string} banner
77
+ */
75
78
  export function getLogger(banner, logSelector = ".log-frame") {
76
79
  /** @type {Element=} */
77
80
  const logElement = isNode ? void 0 : document.querySelector(logSelector) || void 0;
package/lib/rq-util.d.mts CHANGED
@@ -176,6 +176,9 @@ export declare const curl: <T extends unknown>(endp: T) => string;
176
176
  * @type {() => Promise<string>}
177
177
  */
178
178
  export declare function getSDEVersion(): Promise<string>;
179
+ /**
180
+ * @param {string} banner
181
+ */
179
182
  export declare const getUniversalLogger: (banner: string, logSelector?: string) => (...args: any[]) => void;
180
183
  export declare function getLogger(): {
181
184
  clog: (...args: any[]) => void;
package/lib/rq-util.mjs CHANGED
@@ -251,6 +251,7 @@ export const fetchP = async (endpointUrl, rqopt, usp, pc, increment = () => { })
251
251
  return Promise.all(rqs).then(jsons => {
252
252
  // DEVNOTE: let check the page 2, type is array?
253
253
  if (isArray(jsons[0])) {
254
+ /** @type {unknown[]} */
254
255
  let combined = [];
255
256
  for (let i = 0, end = jsons.length; i < end;) {
256
257
  combined = combined.concat(jsons[i++]);
@@ -312,6 +313,9 @@ export async function getSDEVersion() {
312
313
  return "sde-202Xxxxx-TRANQUILITY";
313
314
  }
314
315
  }
316
+ /**
317
+ * @param {string} banner
318
+ */
315
319
  export const getUniversalLogger = (banner, logSelector = ".log-frame") => {
316
320
  return consoleUtil.getLogger(banner, logSelector);
317
321
  };
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "eve-esi-types",
3
- "version": "3.2.2",
3
+ "version": "3.2.4",
4
4
  "description": "Extracted the main type of ESI. use for ESI request response types (version 2 only)",
5
5
  "main": "v2/index.d.ts",
6
6
  "scripts": {
7
+ "start": "tsc -p jsconfig.json",
7
8
  "test": "node request-v3.mjs -debug",
8
9
  "test:mini": "node minimal-rq.mjs -debug"
9
10
  },
@@ -45,6 +46,7 @@
45
46
  },
46
47
  "homepage": "https://github.com/jeffy-g/eve-esi-types#readme",
47
48
  "devDependencies": {
49
+ "@types/node": "^22.14.1",
48
50
  "colors.ts": "^1.0.20",
49
51
  "typescript": "latest"
50
52
  }
@@ -9,7 +9,7 @@
9
9
  * THIS DTS IS AUTO GENERATED, DO NOT EDIT
10
10
  *
11
11
  * @file eve-esi-types/v2/esi-tagged-types.d.ts
12
- * @summary This file is auto-generated and defines version 3.2.2 of the EVE Online ESI response types.
12
+ * @summary This file is auto-generated and defines version 3.2.4 of the EVE Online ESI response types.
13
13
  */
14
14
  import type { TESIResponseOKMap } from "./index.d.ts";
15
15
  export type * from "./index.d.ts";
@@ -9,7 +9,7 @@
9
9
  * THIS DTS IS AUTO GENERATED, DO NOT EDIT
10
10
  *
11
11
  * @file eve-esi-types/v2/experimental-esi-types.d.ts
12
- * @summary This file is auto-generated and defines version 3.2.2 of the EVE Online ESI response types.
12
+ * @summary This file is auto-generated and defines version 3.2.4 of the EVE Online ESI response types.
13
13
  */
14
14
  import type { _ESIResponseType, PickPathParameters, UnionToTuple, Split } from "./index.d.ts";
15
15
 
@@ -35,7 +35,7 @@ export type InferESIResponseResultFromUnion<
35
35
  EP extends unknown
36
36
  // EP extends ESIEndpointUnions
37
37
  > = EP extends `${infer M}:${infer EPRest}`
38
- /* ctt
38
+ //* ctt
39
39
  ? M extends TESIEntryMethod
40
40
  ? EPRest extends ESIEndpointOf<M>
41
41
  ? _ESIResponseType<M, EPRest> extends { result: infer U }
@@ -118,7 +118,9 @@ export type ResolveNextEndpoint<
118
118
  export type ResolveNextEndpointFromUnion<
119
119
  EPU extends ESIEndpointUnions,
120
120
  SplitM_EP = Split<EPU>,
121
+ // @ts-expect-error
121
122
  M extends TESIEntryMethod = SplitM_EP[0],
123
+ // @ts-expect-error
122
124
  EP extends Exclude<ESIEndpointOf<M>, symbol> = SplitM_EP[1],
123
125
  BaseResut extends InferESIResponseResult<M, EP> = InferESIResponseResult<M, EP>,
124
126
  Endpoints extends ESIEndpointOf<M> = ESIEndpointOf<M>,
@@ -184,13 +186,14 @@ type ValidateEndpointParamsInArray<
184
186
  BaseResut extends unknown, // SomeType[]
185
187
  NextEP extends string,
186
188
  Debug = 0,
187
- PathParams = UnionToTuple<PickPathParameters<NextEP>>,
189
+ PathParams extends any[] = UnionToTuple<PickPathParameters<NextEP>>,
188
190
  > = BaseResut extends (infer O)[]
189
- ? NonNullable<O[PathParams[1]]> extends number
191
+ ? PathParams[1] extends keyof O ? NonNullable<O[PathParams[1]]> extends number
190
192
  ? Debug extends 1 // development
191
193
  ? [O, PathParams] : 1
192
194
  : 0
193
- : 0;
195
+ : 0
196
+ : 0;
194
197
 
195
198
  /**
196
199
  * `ResolveNextEndpointLoos` is a utility type that infers the next endpoint based on the current endpoint and method.
@@ -215,15 +218,15 @@ type ValidateEndpointParamsInArray<
215
218
  */
216
219
  export type ResolveNextEndpointLoos<
217
220
  M extends TESIEntryMethod,
218
- //* ctt
221
+ /* ctt
219
222
  // DEVNOTE: As it turns out, the behavior of this utility type is broken unless you use the "skipLibCheck=true".
220
223
  EP extends ESIEndpointOf<M> = ESIEndpointOf<M>,
221
224
  Endpoints extends ESIEndpointOf<M> = ESIEndpointOf<M>,
222
- /*/
225
+ /*/
223
226
  // This fix is required for skipLibCheck=false
224
227
  EP extends Exclude<ESIEndpointOf<M>, symbol> = Exclude<ESIEndpointOf<M>, symbol>,
225
- Endpoints extends Exclude<ESIEndpointOf<M>, symbol> = Exclude<ESIEndpointOf<M>, symbol>,
226
- //*/
228
+ Endpoints extends ESIEndpointOf<M> = ESIEndpointOf<M>,
229
+ //*/
227
230
  > = {
228
231
  [NextEP in Endpoints]: NextEP extends `${EP}{${string}}${string}` ? NextEP : never
229
232
  }[Endpoints];
@@ -233,7 +236,7 @@ export type ResolveNextEndpointLoos<
233
236
  */
234
237
  export type ESIEndpointUnions = {
235
238
  [M in TESIEntryMethod]: `${M}:${
236
- //* ctt
239
+ /* ctt
237
240
  ESIEndpointOf<M>
238
241
  /*/
239
242
  Exclude<ESIEndpointOf<M>, symbol>
@@ -249,7 +252,7 @@ export type ESIEndpointUnions = {
249
252
  * Filters ESI endpoints based on the response type.
250
253
  *
251
254
  * This utility type iterates over all ESI endpoint unions (`ESIEndpointUnions`) and checks
252
- * if the inferred response type (`InferESIResponseResultEX<EPU>`) matches the specified type `T`.
255
+ * if the inferred response type (`InferESIResponseResultFromUnion<EPU>`) matches the specified type `T`.
253
256
  * If it matches, the endpoint is included; otherwise, it is excluded.
254
257
  *
255
258
  * @template T - The response type to filter endpoints by.
@@ -280,8 +283,30 @@ export type FilterEndpointUnionsByResponse<T> = {
280
283
  * ```
281
284
  */
282
285
  export type ExtractValidNextEndpoints<
283
- T = number[], EPUs = FilterEndpointUnionsByResponse<T>
286
+ T = number[], EPUs extends ESIEndpointUnions = FilterEndpointUnionsByResponse<T>,
287
+ Debug = 0
284
288
  > = {
285
- [EPU in EPUs]: ResolveNextEndpointFromUnion<EPU>;
286
- // [EPU in EPUs]: ResolveNextEndpointFromUnion<EPU> extends never ? never : EPU;
289
+ // [EPU in EPUs]: ResolveNextEndpointFromUnion<EPU>;
290
+ [EPU in EPUs]: Debug extends 1
291
+ ? ResolveNextEndpointFromUnion<EPU> extends never
292
+ ? never
293
+ : [EPU, ResolveNextEndpointFromUnion<EPU>] // array
294
+ // : { [X in EPU]: ResolveNextEndpointFromUnion<EPU> } // map
295
+ : ResolveNextEndpointFromUnion<EPU>;
287
296
  }[EPUs];
297
+
298
+ export type ExtractValidNextEndpointsOrMap<
299
+ T = number[],
300
+ EPUs = FilterEndpointUnionsByResponse<T>,
301
+ Debug = 0
302
+ > = EPUs extends infer EPU
303
+ ? EPU extends EPUs
304
+ ? EPU extends ESIEndpointUnions
305
+ ? ResolveNextEndpointFromUnion<EPU> extends never
306
+ ? never
307
+ : Debug extends 1 ? { readonly [K in EPU]: UnionToTuple<ResolveNextEndpointFromUnion<EPU>> }
308
+ // : Debug extends 1 ? { readonly [K in EPU]: ResolveNextEndpointFromUnion<EPU> }
309
+ : ResolveNextEndpointFromUnion<EPU>
310
+ : never
311
+ : never
312
+ : never;
@@ -738,65 +738,6 @@ interface GetCorporationsCorporationIdMembertracking_200Ok {
738
738
  * ESI endpoint: get:/corporations/{corporation_id}/roles/
739
739
  */
740
740
 
741
- /**
742
- * grantable_role string
743
- */
744
- type __CorporationRole =
745
- | "Account_Take_1"
746
- | "Account_Take_2"
747
- | "Account_Take_3"
748
- | "Account_Take_4"
749
- | "Account_Take_5"
750
- | "Account_Take_6"
751
- | "Account_Take_7"
752
- | "Accountant"
753
- | "Auditor"
754
- | "Brand_Manager"
755
- | "Communications_Officer"
756
- | "Config_Equipment"
757
- | "Config_Starbase_Equipment"
758
- | "Container_Take_1"
759
- | "Container_Take_2"
760
- | "Container_Take_3"
761
- | "Container_Take_4"
762
- | "Container_Take_5"
763
- | "Container_Take_6"
764
- | "Container_Take_7"
765
- | "Contract_Manager"
766
- | "Deliveries_Container_Take"
767
- | "Deliveries_Query"
768
- | "Deliveries_Take"
769
- | "Diplomat"
770
- | "Director"
771
- | "Factory_Manager"
772
- | "Fitting_Manager"
773
- | "Hangar_Query_1"
774
- | "Hangar_Query_2"
775
- | "Hangar_Query_3"
776
- | "Hangar_Query_4"
777
- | "Hangar_Query_5"
778
- | "Hangar_Query_6"
779
- | "Hangar_Query_7"
780
- | "Hangar_Take_1"
781
- | "Hangar_Take_2"
782
- | "Hangar_Take_3"
783
- | "Hangar_Take_4"
784
- | "Hangar_Take_5"
785
- | "Hangar_Take_6"
786
- | "Hangar_Take_7"
787
- | "Junior_Accountant"
788
- | "Personnel_Manager"
789
- | "Project_Manager"
790
- | "Rent_Factory_Facility"
791
- | "Rent_Office"
792
- | "Rent_Research_Facility"
793
- | "Security_Officer"
794
- | "Skill_Plan_Manager"
795
- | "Starbase_Defense_Operator"
796
- | "Starbase_Fuel_Technician"
797
- | "Station_Manager"
798
- | "Trader";
799
-
800
741
  /**
801
742
  * grantable_role string
802
743
  */
@@ -925,62 +866,9 @@ interface GetCorporationsCorporationIdRoles_200Ok {
925
866
 
926
867
  /**
927
868
  * Corporation role string
869
+ * grantable_role string
928
870
  */
929
- type __CorporationRole =
930
- | "Account_Take_1"
931
- | "Account_Take_2"
932
- | "Account_Take_3"
933
- | "Account_Take_4"
934
- | "Account_Take_5"
935
- | "Account_Take_6"
936
- | "Account_Take_7"
937
- | "Accountant"
938
- | "Auditor"
939
- | "Brand_Manager"
940
- | "Communications_Officer"
941
- | "Config_Equipment"
942
- | "Config_Starbase_Equipment"
943
- | "Container_Take_1"
944
- | "Container_Take_2"
945
- | "Container_Take_3"
946
- | "Container_Take_4"
947
- | "Container_Take_5"
948
- | "Container_Take_6"
949
- | "Container_Take_7"
950
- | "Contract_Manager"
951
- | "Deliveries_Container_Take"
952
- | "Deliveries_Query"
953
- | "Deliveries_Take"
954
- | "Diplomat"
955
- | "Director"
956
- | "Factory_Manager"
957
- | "Fitting_Manager"
958
- | "Hangar_Query_1"
959
- | "Hangar_Query_2"
960
- | "Hangar_Query_3"
961
- | "Hangar_Query_4"
962
- | "Hangar_Query_5"
963
- | "Hangar_Query_6"
964
- | "Hangar_Query_7"
965
- | "Hangar_Take_1"
966
- | "Hangar_Take_2"
967
- | "Hangar_Take_3"
968
- | "Hangar_Take_4"
969
- | "Hangar_Take_5"
970
- | "Hangar_Take_6"
971
- | "Hangar_Take_7"
972
- | "Junior_Accountant"
973
- | "Personnel_Manager"
974
- | "Project_Manager"
975
- | "Rent_Factory_Facility"
976
- | "Rent_Office"
977
- | "Rent_Research_Facility"
978
- | "Security_Officer"
979
- | "Skill_Plan_Manager"
980
- | "Starbase_Defense_Operator"
981
- | "Starbase_Fuel_Technician"
982
- | "Station_Manager"
983
- | "Trader";
871
+ type __CorporationRole = __CharacterRole;
984
872
 
985
873
  /**
986
874
  * new_role string
package/v2/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  * THIS DTS IS AUTO GENERATED, DO NOT EDIT
10
10
  *
11
11
  * @file eve-esi-types/v2/index.d.ts
12
- * @summary This file is auto-generated and defines version 3.2.2 of the EVE Online ESI response types.
12
+ * @summary This file is auto-generated and defines version 3.2.4 of the EVE Online ESI response types.
13
13
  */
14
14
  import type { TESIResponseOKMap } from "./response-map.d.ts";
15
15
  import type { PickPathParameters, InferKeysLen } from "./util.d.ts";
@@ -9,7 +9,7 @@
9
9
  * THIS DTS IS AUTO GENERATED, DO NOT EDIT
10
10
  *
11
11
  * @file eve-esi-types/v2/response-map.d.ts
12
- * @summary This file is auto-generated and defines version 3.2.2 of the EVE Online ESI response types.
12
+ * @summary This file is auto-generated and defines version 3.2.4 of the EVE Online ESI response types.
13
13
  */
14
14
  import "./types-index.d.ts";
15
15
 
@@ -9,7 +9,7 @@
9
9
  * THIS DTS IS AUTO GENERATED, DO NOT EDIT
10
10
  *
11
11
  * @file eve-esi-types/v2/types-index.d.ts
12
- * @summary This file is auto-generated and defines version 3.2.2 of the EVE Online ESI response types.
12
+ * @summary This file is auto-generated and defines version 3.2.4 of the EVE Online ESI response types.
13
13
  */
14
14
  import "./globals/alliance.d.ts";
15
15
  import "./globals/assets.d.ts";
@@ -41,4 +41,3 @@ import "./globals/universe.d.ts";
41
41
  import "./globals/wallet.d.ts";
42
42
  import "./globals/wars.d.ts";
43
43
  import "./globals/extra-types.d.ts";
44
-
@@ -9,7 +9,7 @@
9
9
  * THIS DTS IS AUTO GENERATED, DO NOT EDIT
10
10
  *
11
11
  * @file eve-esi-types/v2/types-util.d.ts
12
- * @summary This file is auto-generated and defines version 3.2.2 of the EVE Online ESI response types.
12
+ * @summary This file is auto-generated and defines version 3.2.4 of the EVE Online ESI response types.
13
13
  */
14
14
  import type { TESIResponseOKMap } from "./response-map.d.ts";
15
15
 
@@ -169,4 +169,3 @@ export type __IdentifyParameters<
169
169
  Keys = Exclude<keyof Entry, "result" | "tag" | "cachedSeconds">
170
170
  // @ts-expect-error
171
171
  > = RequireThese<Opt, Keys> & Pick<Entry, Keys>;
172
-