guildwars2-ts 1.1.6 → 1.2.1

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.mjs CHANGED
@@ -125,8 +125,7 @@ var ApiBase = class {
125
125
  const headers = new AxiosHeaders();
126
126
  headers["Accept-Language"] = this._language;
127
127
  if (tokenRequired) {
128
- if (!this._apiToken)
129
- throw new ApiTokenError();
128
+ if (!this._apiToken) throw new ApiTokenError();
130
129
  headers.Authorization = `Bearer ${this._apiToken}`;
131
130
  }
132
131
  const options = {
@@ -221,8 +220,7 @@ var ApiBase = class {
221
220
  let match;
222
221
  while (match = regex.exec(fullUrl)) {
223
222
  const [key, param] = match;
224
- if (!param)
225
- continue;
223
+ if (!param) continue;
226
224
  const value = encodeURI(String(urlParams[param]));
227
225
  fullUrl = fullUrl.replace(key, value);
228
226
  regex.lastIndex = 0;
@@ -433,6 +431,19 @@ var AccountHomeCatsDTO = z.array(
433
431
  /** Ids of cat unlocked in home instance. */
434
432
  z.number()
435
433
  );
434
+ var AccountHomesteadDecorationsDTO = z.array(
435
+ z.object({
436
+ /** Deocration id. */
437
+ id: z.number(),
438
+ /** Decoration count. */
439
+ count: z.number()
440
+ })
441
+ );
442
+ var stringArrayType = z.array(z.string());
443
+ var numberArrayType = z.array(z.number());
444
+
445
+ // src/models/account/account.homestead.glyphs.dto.ts
446
+ var AccountHomesteadGlyphsDTO = stringArrayType;
436
447
  var AccountInventoryDTO = z.array(
437
448
  z.union([
438
449
  z.null(),
@@ -1832,6 +1843,42 @@ var HomeCatsDTO = z.array(
1832
1843
  hint: z.string().optional()
1833
1844
  })
1834
1845
  );
1846
+ var HomesteadDecorationsDTO = z.array(
1847
+ z.object({
1848
+ /** The decoration id. */
1849
+ id: z.number(),
1850
+ /* The name of the decoration. */
1851
+ name: z.string(),
1852
+ /** The homestead decoration description. */
1853
+ description: z.string(),
1854
+ /** The maximum amount of storable instances of this decoration. */
1855
+ max_count: z.number(),
1856
+ /** A URL pointing to an icon for the decoration. */
1857
+ icon: z.string(),
1858
+ /** An array of decoration category ids which this decoration belongs to.
1859
+ * Can be compared to the v2/homestead/decorations/categories endpoint */
1860
+ categories: z.array(z.number())
1861
+ })
1862
+ );
1863
+ var HomesteadDecorationsCategoriesDTO = z.array(
1864
+ z.object({
1865
+ /** The category's ID. */
1866
+ id: z.number(),
1867
+ /** The category name. */
1868
+ name: z.string()
1869
+ })
1870
+ );
1871
+ var HomesteadGlyphsDTO = z.array(
1872
+ z.object({
1873
+ /** The homestead glyph id. */
1874
+ id: z.string(),
1875
+ /** The id of the glyph item.
1876
+ * Can be compared to the /v2/items endpoint. */
1877
+ item_id: z.number(),
1878
+ /** The slot it is attached to. */
1879
+ slot: z.enum(["harvesting", "mining", "logging"])
1880
+ })
1881
+ );
1835
1882
  var BuildDTO = z.object({
1836
1883
  /** The id of the current game build. */
1837
1884
  id: z.number()
@@ -4071,6 +4118,14 @@ var endpoints = {
4071
4118
  path: "v2/account/home/nodes",
4072
4119
  tokenRequired: true
4073
4120
  },
4121
+ homesteadDecorations: {
4122
+ path: "v2/account/homestead/decorations",
4123
+ tokenRequired: true
4124
+ },
4125
+ homesteadGlyphs: {
4126
+ path: "v2/account/homestead/glyphs",
4127
+ tokenRequired: true
4128
+ },
4074
4129
  inventory: {
4075
4130
  path: "v2/account/inventory",
4076
4131
  tokenRequired: true
@@ -4486,6 +4541,32 @@ var endpoints = {
4486
4541
  tokenRequired: false
4487
4542
  }
4488
4543
  },
4544
+ homestead: {
4545
+ decorationsById: {
4546
+ path: "v2/homestead/decorations?ids=$(ids)",
4547
+ tokenRequired: false
4548
+ },
4549
+ decorationsAll: {
4550
+ path: "v2/homestead/decorations",
4551
+ tokenRequired: false
4552
+ },
4553
+ decorationsCategoriesById: {
4554
+ path: "v2/homestead/decorations/categories?ids=$(ids)",
4555
+ tokenRequired: false
4556
+ },
4557
+ decorationsCategoriesAll: {
4558
+ path: "v2/homestead/decorations/categories",
4559
+ tokenRequired: false
4560
+ },
4561
+ glyphsById: {
4562
+ path: "v2/homestead/glyphs?ids=$(ids)",
4563
+ tokenRequired: false
4564
+ },
4565
+ glyphsAll: {
4566
+ path: "v2/homestead/glyphs",
4567
+ tokenRequired: false
4568
+ }
4569
+ },
4489
4570
  items: {
4490
4571
  all: {
4491
4572
  path: "v2/items",
@@ -5022,6 +5103,26 @@ var AccountApi = class extends ApiBase {
5022
5103
  async getHomeCats() {
5023
5104
  return await this.buildRequest(endpoints.account.homeCats, {}, AccountHomeCatsDTO);
5024
5105
  }
5106
+ /**
5107
+ * Returns information about unlocked homestead decorations.
5108
+ */
5109
+ async getHomesteadDecorations() {
5110
+ return await this.buildRequest(
5111
+ endpoints.account.homesteadDecorations,
5112
+ {},
5113
+ AccountHomesteadDecorationsDTO
5114
+ );
5115
+ }
5116
+ /**
5117
+ * Returns information about glyphs stored in homestead collection boxes.
5118
+ */
5119
+ async getHomesteadGlyphs() {
5120
+ return await this.buildRequest(
5121
+ endpoints.account.homesteadGlyphs,
5122
+ {},
5123
+ AccountHomesteadGlyphsDTO
5124
+ );
5125
+ }
5025
5126
  /**
5026
5127
  * Returns the shared inventory slots in an account.
5027
5128
  * If null, the slot is empty
@@ -5256,8 +5357,6 @@ var AccountApi = class extends ApiBase {
5256
5357
  );
5257
5358
  }
5258
5359
  };
5259
- var stringArrayType = z.array(z.string());
5260
- var numberArrayType = z.array(z.number());
5261
5360
 
5262
5361
  // src/apis/achievements/achievements.ts
5263
5362
  var AchievementsApi = class extends ApiBase {
@@ -5727,6 +5826,44 @@ var HomeApi = class extends ApiBase {
5727
5826
  }
5728
5827
  };
5729
5828
 
5829
+ // src/apis/homestead/homestead.ts
5830
+ var HomesteadApi = class extends ApiBase {
5831
+ async getDecorations(ids) {
5832
+ if (ids) {
5833
+ return await this.buildRequest(
5834
+ endpoints.homestead.decorationsById,
5835
+ { ids },
5836
+ HomesteadDecorationsDTO
5837
+ );
5838
+ }
5839
+ return await this.buildRequest(endpoints.homestead.decorationsAll, {}, numberArrayType);
5840
+ }
5841
+ async getCategories(ids) {
5842
+ if (ids) {
5843
+ return await this.buildRequest(
5844
+ endpoints.homestead.decorationsCategoriesById,
5845
+ { ids },
5846
+ HomesteadDecorationsCategoriesDTO
5847
+ );
5848
+ }
5849
+ return await this.buildRequest(
5850
+ endpoints.homestead.decorationsCategoriesAll,
5851
+ {},
5852
+ numberArrayType
5853
+ );
5854
+ }
5855
+ async getGlyphs(ids) {
5856
+ if (ids) {
5857
+ return await this.buildRequest(
5858
+ endpoints.homestead.glyphsById,
5859
+ { ids },
5860
+ HomesteadGlyphsDTO
5861
+ );
5862
+ }
5863
+ return await this.buildRequest(endpoints.homestead.glyphsAll, {}, stringArrayType);
5864
+ }
5865
+ };
5866
+
5730
5867
  // src/apis/misc/backstory.ts
5731
5868
  var BackstoryApi = class extends ApiBase {
5732
5869
  async getAnswers(ids) {
@@ -5763,8 +5900,7 @@ var BuildApi = class extends ApiBase {
5763
5900
  // src/apis/misc/colors.ts
5764
5901
  var ColorsApi = class extends ApiBase {
5765
5902
  async get(ids) {
5766
- if (ids)
5767
- return await this.buildRequest(endpoints.colors.byId, { ids }, ColorsDTO);
5903
+ if (ids) return await this.buildRequest(endpoints.colors.byId, { ids }, ColorsDTO);
5768
5904
  return await this.buildRequest(endpoints.colors.all, {}, numberArrayType);
5769
5905
  }
5770
5906
  };
@@ -5843,8 +5979,7 @@ var DailyCraftingApi = class extends ApiBase {
5843
5979
  // src/apis/misc/dungeons.ts
5844
5980
  var DungeonsApi = class extends ApiBase {
5845
5981
  async get(ids) {
5846
- if (ids)
5847
- return await this.buildRequest(endpoints.dungeons.byId, { ids }, DungeonsDTO);
5982
+ if (ids) return await this.buildRequest(endpoints.dungeons.byId, { ids }, DungeonsDTO);
5848
5983
  return await this.buildRequest(endpoints.dungeons.all, {}, stringArrayType);
5849
5984
  }
5850
5985
  };
@@ -5867,8 +6002,7 @@ var EmotesApi = class extends ApiBase {
5867
6002
  // src/apis/misc/files.ts
5868
6003
  var FilesApi = class extends ApiBase {
5869
6004
  async get(ids) {
5870
- if (ids)
5871
- return await this.buildRequest(endpoints.files.byId, { ids }, FilesDTO);
6005
+ if (ids) return await this.buildRequest(endpoints.files.byId, { ids }, FilesDTO);
5872
6006
  return await this.buildRequest(endpoints.files.all, {}, stringArrayType);
5873
6007
  }
5874
6008
  };
@@ -5876,8 +6010,7 @@ var FilesApi = class extends ApiBase {
5876
6010
  // src/apis/misc/finishers.ts
5877
6011
  var FinishersApi = class extends ApiBase {
5878
6012
  async get(ids) {
5879
- if (ids)
5880
- return await this.buildRequest(endpoints.finishers.byId, { ids }, FinishersDTO);
6013
+ if (ids) return await this.buildRequest(endpoints.finishers.byId, { ids }, FinishersDTO);
5881
6014
  return await this.buildRequest(endpoints.finishers.all, {}, numberArrayType);
5882
6015
  }
5883
6016
  };
@@ -5885,8 +6018,7 @@ var FinishersApi = class extends ApiBase {
5885
6018
  // src/apis/misc/gliders.ts
5886
6019
  var GlidersApi = class extends ApiBase {
5887
6020
  async get(ids) {
5888
- if (ids)
5889
- return await this.buildRequest(endpoints.gliders.byId, { ids }, GlidersDTO);
6021
+ if (ids) return await this.buildRequest(endpoints.gliders.byId, { ids }, GlidersDTO);
5890
6022
  return await this.buildRequest(endpoints.gliders.all, {}, numberArrayType);
5891
6023
  }
5892
6024
  };
@@ -5894,8 +6026,7 @@ var GlidersApi = class extends ApiBase {
5894
6026
  // src/apis/misc/items.ts
5895
6027
  var ItemsApi = class extends ApiBase {
5896
6028
  async get(ids) {
5897
- if (ids)
5898
- return await this.buildRequest(endpoints.items.byId, { ids }, ItemsDTO);
6029
+ if (ids) return await this.buildRequest(endpoints.items.byId, { ids }, ItemsDTO);
5899
6030
  return await this.buildRequest(endpoints.items.all, {}, numberArrayType);
5900
6031
  }
5901
6032
  };
@@ -5903,8 +6034,7 @@ var ItemsApi = class extends ApiBase {
5903
6034
  // src/apis/misc/itemstats.ts
5904
6035
  var ItemStatsApi = class extends ApiBase {
5905
6036
  async get(ids) {
5906
- if (ids)
5907
- return await this.buildRequest(endpoints.itemstats.byId, { ids }, ItemStatsDTO);
6037
+ if (ids) return await this.buildRequest(endpoints.itemstats.byId, { ids }, ItemStatsDTO);
5908
6038
  return await this.buildRequest(endpoints.itemstats.all, {}, numberArrayType);
5909
6039
  }
5910
6040
  };
@@ -5912,8 +6042,7 @@ var ItemStatsApi = class extends ApiBase {
5912
6042
  // src/apis/misc/jadebots.ts
5913
6043
  var JadebotsApi = class extends ApiBase {
5914
6044
  async get(ids) {
5915
- if (ids)
5916
- return await this.buildRequest(endpoints.jadebots.byId, { ids }, JadebotsDTO);
6045
+ if (ids) return await this.buildRequest(endpoints.jadebots.byId, { ids }, JadebotsDTO);
5917
6046
  return await this.buildRequest(endpoints.jadebots.all, {}, numberArrayType);
5918
6047
  }
5919
6048
  };
@@ -5934,8 +6063,7 @@ var LegendaryArmoryApi = class extends ApiBase {
5934
6063
  // src/apis/misc/legends.ts
5935
6064
  var LegendsApi = class extends ApiBase {
5936
6065
  async get(ids) {
5937
- if (ids)
5938
- return await this.buildRequest(endpoints.legends.byId, { ids }, LegendsDTO);
6066
+ if (ids) return await this.buildRequest(endpoints.legends.byId, { ids }, LegendsDTO);
5939
6067
  return await this.buildRequest(endpoints.legends.all, {}, stringArrayType);
5940
6068
  }
5941
6069
  };
@@ -5967,8 +6095,7 @@ var MapChestsApi = class extends ApiBase {
5967
6095
  // src/apis/misc/maps.ts
5968
6096
  var MapsApi = class extends ApiBase {
5969
6097
  async get(ids) {
5970
- if (ids)
5971
- return await this.buildRequest(endpoints.maps.byId, { ids }, MapsDTO);
6098
+ if (ids) return await this.buildRequest(endpoints.maps.byId, { ids }, MapsDTO);
5972
6099
  return await this.buildRequest(endpoints.maps.all, {}, numberArrayType);
5973
6100
  }
5974
6101
  };
@@ -5976,8 +6103,7 @@ var MapsApi = class extends ApiBase {
5976
6103
  // src/apis/misc/masteries.ts
5977
6104
  var MasteriesApi = class extends ApiBase {
5978
6105
  async get(ids) {
5979
- if (ids)
5980
- return await this.buildRequest(endpoints.masteries.byId, { ids }, MasteriesDTO);
6106
+ if (ids) return await this.buildRequest(endpoints.masteries.byId, { ids }, MasteriesDTO);
5981
6107
  return await this.buildRequest(endpoints.masteries.all, {}, numberArrayType);
5982
6108
  }
5983
6109
  };
@@ -5985,8 +6111,7 @@ var MasteriesApi = class extends ApiBase {
5985
6111
  // src/apis/misc/materials.ts
5986
6112
  var MaterialsApi = class extends ApiBase {
5987
6113
  async get(ids) {
5988
- if (ids)
5989
- return await this.buildRequest(endpoints.materials.byId, { ids }, MaterialsDTO);
6114
+ if (ids) return await this.buildRequest(endpoints.materials.byId, { ids }, MaterialsDTO);
5990
6115
  return await this.buildRequest(endpoints.materials.all, {}, numberArrayType);
5991
6116
  }
5992
6117
  };
@@ -5994,8 +6119,7 @@ var MaterialsApi = class extends ApiBase {
5994
6119
  // src/apis/misc/minis.ts
5995
6120
  var MinisApi = class extends ApiBase {
5996
6121
  async get(ids) {
5997
- if (ids)
5998
- return await this.buildRequest(endpoints.minis.byId, { ids }, MinisDTO);
6122
+ if (ids) return await this.buildRequest(endpoints.minis.byId, { ids }, MinisDTO);
5999
6123
  return await this.buildRequest(endpoints.minis.all, {}, numberArrayType);
6000
6124
  }
6001
6125
  };
@@ -6017,8 +6141,7 @@ var MountsApi = class extends ApiBase {
6017
6141
  // src/apis/misc/novelties.ts
6018
6142
  var NoveltiesApi = class extends ApiBase {
6019
6143
  async get(ids) {
6020
- if (ids)
6021
- return await this.buildRequest(endpoints.novelties.byId, { ids }, NoveltiesDTO);
6144
+ if (ids) return await this.buildRequest(endpoints.novelties.byId, { ids }, NoveltiesDTO);
6022
6145
  return await this.buildRequest(endpoints.novelties.all, {}, numberArrayType);
6023
6146
  }
6024
6147
  };
@@ -6026,8 +6149,7 @@ var NoveltiesApi = class extends ApiBase {
6026
6149
  // src/apis/misc/outfits.ts
6027
6150
  var OutfitsApi = class extends ApiBase {
6028
6151
  async get(ids) {
6029
- if (ids)
6030
- return await this.buildRequest(endpoints.outfits.byId, { ids }, OutfitsDTO);
6152
+ if (ids) return await this.buildRequest(endpoints.outfits.byId, { ids }, OutfitsDTO);
6031
6153
  return await this.buildRequest(endpoints.outfits.all, {}, numberArrayType);
6032
6154
  }
6033
6155
  };
@@ -6035,8 +6157,7 @@ var OutfitsApi = class extends ApiBase {
6035
6157
  // src/apis/misc/pets.ts
6036
6158
  var PetsApi = class extends ApiBase {
6037
6159
  async get(ids) {
6038
- if (ids)
6039
- return await this.buildRequest(endpoints.pets.byId, { ids }, PetsDTO);
6160
+ if (ids) return await this.buildRequest(endpoints.pets.byId, { ids }, PetsDTO);
6040
6161
  return await this.buildRequest(endpoints.pets.all, {}, numberArrayType);
6041
6162
  }
6042
6163
  };
@@ -6053,8 +6174,7 @@ var ProfessionsApi = class extends ApiBase {
6053
6174
  // src/apis/misc/quaggans.ts
6054
6175
  var QuaggansApi = class extends ApiBase {
6055
6176
  async get(ids) {
6056
- if (ids)
6057
- return await this.buildRequest(endpoints.quaggans.byId, { ids }, QuaggansDTO);
6177
+ if (ids) return await this.buildRequest(endpoints.quaggans.byId, { ids }, QuaggansDTO);
6058
6178
  return await this.buildRequest(endpoints.quaggans.all, {}, stringArrayType);
6059
6179
  }
6060
6180
  };
@@ -6062,8 +6182,7 @@ var QuaggansApi = class extends ApiBase {
6062
6182
  // src/apis/misc/quests.ts
6063
6183
  var QuestsApi = class extends ApiBase {
6064
6184
  async get(ids) {
6065
- if (ids)
6066
- return await this.buildRequest(endpoints.quests.byId, { ids }, QuestsDTO);
6185
+ if (ids) return await this.buildRequest(endpoints.quests.byId, { ids }, QuestsDTO);
6067
6186
  return await this.buildRequest(endpoints.quests.all, {}, numberArrayType);
6068
6187
  }
6069
6188
  };
@@ -6071,8 +6190,7 @@ var QuestsApi = class extends ApiBase {
6071
6190
  // src/apis/misc/races.ts
6072
6191
  var RacesApi = class extends ApiBase {
6073
6192
  async get(ids) {
6074
- if (ids)
6075
- return await this.buildRequest(endpoints.races.byId, { ids }, RacesDTO);
6193
+ if (ids) return await this.buildRequest(endpoints.races.byId, { ids }, RacesDTO);
6076
6194
  return await this.buildRequest(endpoints.races.all, {}, stringArrayType);
6077
6195
  }
6078
6196
  };
@@ -6080,8 +6198,7 @@ var RacesApi = class extends ApiBase {
6080
6198
  // src/apis/misc/raids.ts
6081
6199
  var RaidsApi = class extends ApiBase {
6082
6200
  async get(ids) {
6083
- if (ids)
6084
- return await this.buildRequest(endpoints.raids.byId, { ids }, RaidsDTO);
6201
+ if (ids) return await this.buildRequest(endpoints.raids.byId, { ids }, RaidsDTO);
6085
6202
  return await this.buildRequest(endpoints.raids.all, {}, stringArrayType);
6086
6203
  }
6087
6204
  };
@@ -6089,8 +6206,7 @@ var RaidsApi = class extends ApiBase {
6089
6206
  // src/apis/misc/recipes.ts
6090
6207
  var RecipesApi = class extends ApiBase {
6091
6208
  async get(ids) {
6092
- if (ids)
6093
- return await this.buildRequest(endpoints.recipes.byId, { ids }, RecipesDTO);
6209
+ if (ids) return await this.buildRequest(endpoints.recipes.byId, { ids }, RecipesDTO);
6094
6210
  return await this.buildRequest(endpoints.recipes.all, {}, numberArrayType);
6095
6211
  }
6096
6212
  /**
@@ -6111,8 +6227,7 @@ var RecipesApi = class extends ApiBase {
6111
6227
  // src/apis/misc/skiffs.ts
6112
6228
  var SkiffsApi = class extends ApiBase {
6113
6229
  async get(ids) {
6114
- if (ids)
6115
- return await this.buildRequest(endpoints.skiffs.byId, { ids }, SkiffsDTO);
6230
+ if (ids) return await this.buildRequest(endpoints.skiffs.byId, { ids }, SkiffsDTO);
6116
6231
  return await this.buildRequest(endpoints.skiffs.all, {}, numberArrayType);
6117
6232
  }
6118
6233
  };
@@ -6132,8 +6247,7 @@ var SkillsApi = class extends ApiBase {
6132
6247
  // src/apis/misc/skins.ts
6133
6248
  var SkinsApi = class extends ApiBase {
6134
6249
  async get(ids) {
6135
- if (ids)
6136
- return await this.buildRequest(endpoints.skins.byId, { ids }, SkinsDTO);
6250
+ if (ids) return await this.buildRequest(endpoints.skins.byId, { ids }, SkinsDTO);
6137
6251
  return await this.buildRequest(endpoints.skins.all, {}, numberArrayType);
6138
6252
  }
6139
6253
  };
@@ -6154,8 +6268,7 @@ var storiesCore = z.array(z.number());
6154
6268
  var seasonsCore = z.array(z.string());
6155
6269
  var StoriesApi = class extends ApiBase {
6156
6270
  async getStories(ids) {
6157
- if (ids)
6158
- return await this.buildRequest(endpoints.stories.byId, { ids }, StoriesDTO);
6271
+ if (ids) return await this.buildRequest(endpoints.stories.byId, { ids }, StoriesDTO);
6159
6272
  return await this.buildRequest(endpoints.stories.all, {}, storiesCore);
6160
6273
  }
6161
6274
  async getSeasons(ids) {
@@ -6212,8 +6325,7 @@ var SubtokenApi = class extends ApiBase {
6212
6325
  // src/apis/misc/titles.ts
6213
6326
  var TitlesApi = class extends ApiBase {
6214
6327
  async get(ids) {
6215
- if (ids)
6216
- return await this.buildRequest(endpoints.titles.byId, { ids }, TitlesDTO);
6328
+ if (ids) return await this.buildRequest(endpoints.titles.byId, { ids }, TitlesDTO);
6217
6329
  return await this.buildRequest(endpoints.titles.all, {}, numberArrayType);
6218
6330
  }
6219
6331
  };
@@ -6231,8 +6343,7 @@ var TokenInfoApi = class extends ApiBase {
6231
6343
  // src/apis/misc/traits.ts
6232
6344
  var TraitsApi = class extends ApiBase {
6233
6345
  async get(ids) {
6234
- if (ids)
6235
- return await this.buildRequest(endpoints.traits.byId, { ids }, TraitsDTO);
6346
+ if (ids) return await this.buildRequest(endpoints.traits.byId, { ids }, TraitsDTO);
6236
6347
  return await this.buildRequest(endpoints.traits.all, {}, numberArrayType);
6237
6348
  }
6238
6349
  };
@@ -6250,8 +6361,7 @@ var WorldBossesApi = class extends ApiBase {
6250
6361
  // src/apis/misc/worlds.ts
6251
6362
  var WorldsApi = class extends ApiBase {
6252
6363
  async get(ids) {
6253
- if (ids)
6254
- return await this.buildRequest(endpoints.worlds.byId, { ids }, WorldsDTO);
6364
+ if (ids) return await this.buildRequest(endpoints.worlds.byId, { ids }, WorldsDTO);
6255
6365
  return await this.buildRequest(endpoints.worlds.all, {}, numberArrayType);
6256
6366
  }
6257
6367
  };
@@ -6264,23 +6374,19 @@ var PvPApi = class extends ApiBase {
6264
6374
  return await this.buildRequest(endpoints.pvp.amuletsAll, {}, numberArrayType);
6265
6375
  }
6266
6376
  async getGames(ids) {
6267
- if (ids)
6268
- return await this.buildRequest(endpoints.pvp.gamesById, { ids }, PvPGamesDTO);
6377
+ if (ids) return await this.buildRequest(endpoints.pvp.gamesById, { ids }, PvPGamesDTO);
6269
6378
  return await this.buildRequest(endpoints.pvp.gamesAll, {}, stringArrayType);
6270
6379
  }
6271
6380
  async getHeroes(ids) {
6272
- if (ids)
6273
- return await this.buildRequest(endpoints.pvp.heroesById, { ids }, PvPHeroesDTO);
6381
+ if (ids) return await this.buildRequest(endpoints.pvp.heroesById, { ids }, PvPHeroesDTO);
6274
6382
  return await this.buildRequest(endpoints.pvp.heroesAll, {}, stringArrayType);
6275
6383
  }
6276
6384
  async getRanks(ids) {
6277
- if (ids)
6278
- return await this.buildRequest(endpoints.pvp.ranksById, { ids }, PvPRanksDTO);
6385
+ if (ids) return await this.buildRequest(endpoints.pvp.ranksById, { ids }, PvPRanksDTO);
6279
6386
  return await this.buildRequest(endpoints.pvp.ranksAll, {}, numberArrayType);
6280
6387
  }
6281
6388
  async getSeasons(ids) {
6282
- if (ids)
6283
- return await this.buildRequest(endpoints.pvp.seasonsById, { ids }, PvPSeasonDTO);
6389
+ if (ids) return await this.buildRequest(endpoints.pvp.seasonsById, { ids }, PvPSeasonDTO);
6284
6390
  return await this.buildRequest(endpoints.pvp.seasonsAll, {}, stringArrayType);
6285
6391
  }
6286
6392
  async getLeaderboards(id, region, type) {
@@ -6406,8 +6512,7 @@ var WorldVsWorldApi = class extends ApiBase {
6406
6512
  return await this.buildRequest(endpoints.wvw.objectives, {}, stringArrayType);
6407
6513
  }
6408
6514
  async getRanks(ids) {
6409
- if (ids)
6410
- return await this.buildRequest(endpoints.wvw.ranksById, { ids }, WvWRanksDTO);
6515
+ if (ids) return await this.buildRequest(endpoints.wvw.ranksById, { ids }, WvWRanksDTO);
6411
6516
  return await this.buildRequest(endpoints.wvw.ranks, {}, numberArrayType);
6412
6517
  }
6413
6518
  async getUpgrades(ids) {
@@ -6455,6 +6560,8 @@ var GW2Api = class extends ApiBase {
6455
6560
  guild = new GuildApi(this.getParams());
6456
6561
  /** /v2/home Api */
6457
6562
  home = new HomeApi(this.getParams());
6563
+ /** /v2/homestead Api */
6564
+ homestead = new HomesteadApi(this.getParams());
6458
6565
  /** /v2/items Api */
6459
6566
  items = new ItemsApi(this.getParams());
6460
6567
  /** /v2/itemstats Api */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guildwars2-ts",
3
- "version": "1.1.6",
3
+ "version": "1.2.1",
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,10 +22,10 @@
22
22
  "gw2"
23
23
  ],
24
24
  "dependencies": {
25
- "axios": "1.6.8",
25
+ "axios": "1.7.5",
26
26
  "promise-queue": "2.2.5",
27
- "tslog": "4.9.2",
28
- "zod": "3.22.4"
27
+ "tslog": "4.9.3",
28
+ "zod": "3.23.8"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@biomejs/biome": "^1.6.3",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "scripts": {
42
42
  "lint:dry": "biome check .",
43
- "lint": "biome check . --apply",
43
+ "lint": "biome check . --write",
44
44
  "build": "tsup --env.NODE_ENV production",
45
45
  "test": "jest",
46
46
  "test:coverage": "jest --coverage"