guildwars2-ts 1.1.4 → 1.1.5

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/LICENSE CHANGED
@@ -1,16 +1,16 @@
1
- ISC License
2
-
3
- Copyright (c) 2023 Ivan Sosnov
4
- Copyright (c) 2021 Julio Sansossio (parts of request base code)
5
-
6
- Permission to use, copy, modify, and/or distribute this software for any
7
- purpose with or without fee is hereby granted, provided that the above
8
- copyright notice and this permission notice appear in all copies.
9
-
10
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
- PERFORMANCE OF THIS SOFTWARE.
1
+ ISC License
2
+
3
+ Copyright (c) 2023 Ivan Sosnov
4
+ Copyright (c) 2021 Julio Sansossio (parts of request base code)
5
+
6
+ Permission to use, copy, modify, and/or distribute this software for any
7
+ purpose with or without fee is hereby granted, provided that the above
8
+ copyright notice and this permission notice appear in all copies.
9
+
10
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
+ PERFORMANCE OF THIS SOFTWARE.
package/dist/index.d.mts CHANGED
@@ -1857,7 +1857,7 @@ declare const ColorsDTO: z.ZodArray<z.ZodObject<{
1857
1857
  /** Color categories. */
1858
1858
  categories: z.ZodUnion<[z.ZodTuple<[z.ZodEnum<["Gray", "Brown", "Red", "Orange", "Yellow", "Green", "Blue", "Purple"]>, z.ZodEnum<["Vibrant", "Leather", "Metal"]>, z.ZodEnum<["Starter", "Common", "Uncommon", "Rare", "Exclusive"]>], null>, z.ZodArray<z.ZodUndefined, "many">]>;
1859
1859
  }, "strip", z.ZodTypeAny, {
1860
- categories: (undefined[] | ["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"]) & (undefined[] | ["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"] | undefined);
1860
+ categories: (["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"] | undefined[]) & (["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"] | undefined[] | undefined);
1861
1861
  id: number;
1862
1862
  name: string;
1863
1863
  base_rgb: number[];
@@ -1895,7 +1895,7 @@ declare const ColorsDTO: z.ZodArray<z.ZodObject<{
1895
1895
  } | undefined;
1896
1896
  item?: number | undefined;
1897
1897
  }, {
1898
- categories: (undefined[] | ["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"]) & (undefined[] | ["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"] | undefined);
1898
+ categories: (["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"] | undefined[]) & (["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"] | undefined[] | undefined);
1899
1899
  id: number;
1900
1900
  name: string;
1901
1901
  base_rgb: number[];
@@ -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
@@ -1857,7 +1857,7 @@ declare const ColorsDTO: z.ZodArray<z.ZodObject<{
1857
1857
  /** Color categories. */
1858
1858
  categories: z.ZodUnion<[z.ZodTuple<[z.ZodEnum<["Gray", "Brown", "Red", "Orange", "Yellow", "Green", "Blue", "Purple"]>, z.ZodEnum<["Vibrant", "Leather", "Metal"]>, z.ZodEnum<["Starter", "Common", "Uncommon", "Rare", "Exclusive"]>], null>, z.ZodArray<z.ZodUndefined, "many">]>;
1859
1859
  }, "strip", z.ZodTypeAny, {
1860
- categories: (undefined[] | ["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"]) & (undefined[] | ["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"] | undefined);
1860
+ categories: (["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"] | undefined[]) & (["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"] | undefined[] | undefined);
1861
1861
  id: number;
1862
1862
  name: string;
1863
1863
  base_rgb: number[];
@@ -1895,7 +1895,7 @@ declare const ColorsDTO: z.ZodArray<z.ZodObject<{
1895
1895
  } | undefined;
1896
1896
  item?: number | undefined;
1897
1897
  }, {
1898
- categories: (undefined[] | ["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"]) & (undefined[] | ["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"] | undefined);
1898
+ categories: (["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"] | undefined[]) & (["Gray" | "Brown" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple", "Vibrant" | "Leather" | "Metal", "Starter" | "Common" | "Uncommon" | "Rare" | "Exclusive"] | undefined[] | undefined);
1899
1899
  id: number;
1900
1900
  name: string;
1901
1901
  base_rgb: number[];
@@ -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);
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guildwars2-ts",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
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 .",