guildwars2-ts 1.1.4 → 1.1.6

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/dist/index.d.mts CHANGED
@@ -10662,16 +10662,16 @@ declare class CharactersApi extends ApiBase {
10662
10662
  * @param id - Character name
10663
10663
  */
10664
10664
  getCore(id: string): Promise<{
10665
+ guild: string | null;
10665
10666
  age: number;
10666
10667
  name: string;
10667
10668
  created: string;
10668
10669
  profession: "Elementalist" | "Engineer" | "Guardian" | "Mesmer" | "Necromancer" | "Ranger" | "Revenant" | "Thief" | "Warrior";
10669
10670
  level: number;
10670
- title: number;
10671
10671
  race: "Asura" | "Charr" | "Human" | "Norn" | "Sylvari";
10672
10672
  gender: "Male" | "Female";
10673
10673
  deaths: number;
10674
- guild?: string | undefined;
10674
+ title?: number | undefined;
10675
10675
  }>;
10676
10676
  /**
10677
10677
  * Returns information about the crafting disciplines available to a character attached to a specific account.
@@ -12559,6 +12559,9 @@ declare class WorldVsWorldApi extends ApiBase {
12559
12559
  getUpgrades(ids: number[] | 'all'): Promise<z.infer<typeof WvWUpgradesDTO>>;
12560
12560
  }
12561
12561
 
12562
+ /**
12563
+ * Entrypoint for the API
12564
+ */
12562
12565
  declare class GW2Api extends ApiBase {
12563
12566
  /** /v2/account Api */
12564
12567
  readonly account: AccountApi;
package/dist/index.d.ts CHANGED
@@ -10662,16 +10662,16 @@ declare class CharactersApi extends ApiBase {
10662
10662
  * @param id - Character name
10663
10663
  */
10664
10664
  getCore(id: string): Promise<{
10665
+ guild: string | null;
10665
10666
  age: number;
10666
10667
  name: string;
10667
10668
  created: string;
10668
10669
  profession: "Elementalist" | "Engineer" | "Guardian" | "Mesmer" | "Necromancer" | "Ranger" | "Revenant" | "Thief" | "Warrior";
10669
10670
  level: number;
10670
- title: number;
10671
10671
  race: "Asura" | "Charr" | "Human" | "Norn" | "Sylvari";
10672
10672
  gender: "Male" | "Female";
10673
10673
  deaths: number;
10674
- guild?: string | undefined;
10674
+ title?: number | undefined;
10675
10675
  }>;
10676
10676
  /**
10677
10677
  * Returns information about the crafting disciplines available to a character attached to a specific account.
@@ -12559,6 +12559,9 @@ declare class WorldVsWorldApi extends ApiBase {
12559
12559
  getUpgrades(ids: number[] | 'all'): Promise<z.infer<typeof WvWUpgradesDTO>>;
12560
12560
  }
12561
12561
 
12562
+ /**
12563
+ * Entrypoint for the API
12564
+ */
12562
12565
  declare class GW2Api extends ApiBase {
12563
12566
  /** /v2/account Api */
12564
12567
  readonly account: AccountApi;
package/dist/index.js CHANGED
@@ -86,7 +86,7 @@ var setLogLevel = (minLevel) => {
86
86
  var setPathLogging = (displayFilePath) => {
87
87
  logger.settings.hideLogPositionForProduction = !displayFilePath;
88
88
  };
89
- var queue = new Queue__default.default(Infinity, Infinity);
89
+ var queue = new Queue__default.default(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);
90
90
  async function sendRequest(options) {
91
91
  return await new Promise((resolve, reject) => {
92
92
  axios__default.default.get(options.url, { ...options }).then(resolve).catch(reject);
@@ -152,7 +152,7 @@ var ApiBase = class {
152
152
  );
153
153
  logger.warn(parse.error.errors);
154
154
  }
155
- logger.info(`[200] Successful request to ${endpoint.path}`);
155
+ logger.info(`[200] Successful request to ${options.url}`);
156
156
  return data;
157
157
  } catch (error) {
158
158
  return await this.retryRequest(endpoint, options, responseType, apiParams, attempts ?? 0, error);
@@ -851,7 +851,7 @@ var CharacterCoreDTO = zod.z.object({
851
851
  /** Character level. */
852
852
  level: zod.z.number(),
853
853
  /** Character guild. */
854
- guild: zod.z.string().optional(),
854
+ guild: zod.z.union([zod.z.string(), zod.z.null()]),
855
855
  /** Character age. */
856
856
  age: zod.z.number(),
857
857
  /** Character creation date. */
@@ -859,7 +859,7 @@ var CharacterCoreDTO = zod.z.object({
859
859
  /** Character deaths. */
860
860
  deaths: zod.z.number(),
861
861
  /** Character title id. */
862
- title: zod.z.number()
862
+ title: zod.z.number().optional()
863
863
  });
864
864
  var CharacterCraftingDTO = zod.z.object({
865
865
  /**
package/dist/index.mjs CHANGED
@@ -79,7 +79,7 @@ var setLogLevel = (minLevel) => {
79
79
  var setPathLogging = (displayFilePath) => {
80
80
  logger.settings.hideLogPositionForProduction = !displayFilePath;
81
81
  };
82
- var queue = new Queue(Infinity, Infinity);
82
+ var queue = new Queue(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);
83
83
  async function sendRequest(options) {
84
84
  return await new Promise((resolve, reject) => {
85
85
  axios.get(options.url, { ...options }).then(resolve).catch(reject);
@@ -145,7 +145,7 @@ var ApiBase = class {
145
145
  );
146
146
  logger.warn(parse.error.errors);
147
147
  }
148
- logger.info(`[200] Successful request to ${endpoint.path}`);
148
+ logger.info(`[200] Successful request to ${options.url}`);
149
149
  return data;
150
150
  } catch (error) {
151
151
  return await this.retryRequest(endpoint, options, responseType, apiParams, attempts ?? 0, error);
@@ -844,7 +844,7 @@ var CharacterCoreDTO = z.object({
844
844
  /** Character level. */
845
845
  level: z.number(),
846
846
  /** Character guild. */
847
- guild: z.string().optional(),
847
+ guild: z.union([z.string(), z.null()]),
848
848
  /** Character age. */
849
849
  age: z.number(),
850
850
  /** Character creation date. */
@@ -852,7 +852,7 @@ var CharacterCoreDTO = z.object({
852
852
  /** Character deaths. */
853
853
  deaths: z.number(),
854
854
  /** Character title id. */
855
- title: z.number()
855
+ title: z.number().optional()
856
856
  });
857
857
  var CharacterCraftingDTO = z.object({
858
858
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guildwars2-ts",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "GuildWars 2 API Wrapper in Typescript",
5
5
  "homepage": "https://gitlab.com/dinckelman/guildwars2-ts",
6
6
  "main": "dist/index.js",
@@ -22,21 +22,21 @@
22
22
  "gw2"
23
23
  ],
24
24
  "dependencies": {
25
- "axios": "1.6.7",
25
+ "axios": "1.6.8",
26
26
  "promise-queue": "2.2.5",
27
27
  "tslog": "4.9.2",
28
28
  "zod": "3.22.4"
29
29
  },
30
30
  "devDependencies": {
31
- "@biomejs/biome": "^1.5.3",
31
+ "@biomejs/biome": "^1.6.3",
32
32
  "@jest/globals": "^29.7.0",
33
- "@types/node": "^20.11.24",
33
+ "@types/node": "^20.12.2",
34
34
  "@types/promise-queue": "^2.2.3",
35
35
  "jest": "^29.7.0",
36
36
  "ts-jest": "^29.1.2",
37
37
  "ts-node": "^10.9.2",
38
38
  "tsup": "^8.0.2",
39
- "typescript": "^5.3.3"
39
+ "typescript": "^5.4.3"
40
40
  },
41
41
  "scripts": {
42
42
  "lint:dry": "biome check .",