guildwars2-ts 1.1.6 → 1.2.2

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.js CHANGED
@@ -132,8 +132,7 @@ var ApiBase = class {
132
132
  const headers = new axios.AxiosHeaders();
133
133
  headers["Accept-Language"] = this._language;
134
134
  if (tokenRequired) {
135
- if (!this._apiToken)
136
- throw new ApiTokenError();
135
+ if (!this._apiToken) throw new ApiTokenError();
137
136
  headers.Authorization = `Bearer ${this._apiToken}`;
138
137
  }
139
138
  const options = {
@@ -228,8 +227,7 @@ var ApiBase = class {
228
227
  let match;
229
228
  while (match = regex.exec(fullUrl)) {
230
229
  const [key, param] = match;
231
- if (!param)
232
- continue;
230
+ if (!param) continue;
233
231
  const value = encodeURI(String(urlParams[param]));
234
232
  fullUrl = fullUrl.replace(key, value);
235
233
  regex.lastIndex = 0;
@@ -440,6 +438,19 @@ var AccountHomeCatsDTO = zod.z.array(
440
438
  /** Ids of cat unlocked in home instance. */
441
439
  zod.z.number()
442
440
  );
441
+ var AccountHomesteadDecorationsDTO = zod.z.array(
442
+ zod.z.object({
443
+ /** Deocration id. */
444
+ id: zod.z.number(),
445
+ /** Decoration count. */
446
+ count: zod.z.number()
447
+ })
448
+ );
449
+ var stringArrayType = zod.z.array(zod.z.string());
450
+ var numberArrayType = zod.z.array(zod.z.number());
451
+
452
+ // src/models/account/account.homestead.glyphs.dto.ts
453
+ var AccountHomesteadGlyphsDTO = stringArrayType;
443
454
  var AccountInventoryDTO = zod.z.array(
444
455
  zod.z.union([
445
456
  zod.z.null(),
@@ -1839,6 +1850,42 @@ var HomeCatsDTO = zod.z.array(
1839
1850
  hint: zod.z.string().optional()
1840
1851
  })
1841
1852
  );
1853
+ var HomesteadDecorationsDTO = zod.z.array(
1854
+ zod.z.object({
1855
+ /** The decoration id. */
1856
+ id: zod.z.number(),
1857
+ /* The name of the decoration. */
1858
+ name: zod.z.string(),
1859
+ /** The homestead decoration description. */
1860
+ description: zod.z.string(),
1861
+ /** The maximum amount of storable instances of this decoration. */
1862
+ max_count: zod.z.number(),
1863
+ /** A URL pointing to an icon for the decoration. */
1864
+ icon: zod.z.string(),
1865
+ /** An array of decoration category ids which this decoration belongs to.
1866
+ * Can be compared to the v2/homestead/decorations/categories endpoint */
1867
+ categories: zod.z.array(zod.z.number())
1868
+ })
1869
+ );
1870
+ var HomesteadDecorationsCategoriesDTO = zod.z.array(
1871
+ zod.z.object({
1872
+ /** The category's ID. */
1873
+ id: zod.z.number(),
1874
+ /** The category name. */
1875
+ name: zod.z.string()
1876
+ })
1877
+ );
1878
+ var HomesteadGlyphsDTO = zod.z.array(
1879
+ zod.z.object({
1880
+ /** The homestead glyph id. */
1881
+ id: zod.z.string(),
1882
+ /** The id of the glyph item.
1883
+ * Can be compared to the /v2/items endpoint. */
1884
+ item_id: zod.z.number(),
1885
+ /** The slot it is attached to. */
1886
+ slot: zod.z.enum(["harvesting", "mining", "logging"])
1887
+ })
1888
+ );
1842
1889
  var BuildDTO = zod.z.object({
1843
1890
  /** The id of the current game build. */
1844
1891
  id: zod.z.number()
@@ -2216,6 +2263,7 @@ var TrinketDetails = zod.z.object({
2216
2263
  /** Selectable stat ids. Can be resolved by /v2/itemstats */
2217
2264
  stat_choices: zod.z.array(zod.z.number()).optional()
2218
2265
  });
2266
+ var TrophyAndCraftingDetails = zod.z.undefined();
2219
2267
  var UpgradeComponentFlags = zod.z.enum([
2220
2268
  "Axe",
2221
2269
  "Dagger",
@@ -2351,6 +2399,7 @@ var ItemsDTO = zod.z.array(
2351
2399
  MiniatureDetails,
2352
2400
  SalvageKitDetails,
2353
2401
  TrinketDetails,
2402
+ TrophyAndCraftingDetails,
2354
2403
  UpgradeComponentDetails,
2355
2404
  WeaponDetails
2356
2405
  ])
@@ -4078,6 +4127,14 @@ var endpoints = {
4078
4127
  path: "v2/account/home/nodes",
4079
4128
  tokenRequired: true
4080
4129
  },
4130
+ homesteadDecorations: {
4131
+ path: "v2/account/homestead/decorations",
4132
+ tokenRequired: true
4133
+ },
4134
+ homesteadGlyphs: {
4135
+ path: "v2/account/homestead/glyphs",
4136
+ tokenRequired: true
4137
+ },
4081
4138
  inventory: {
4082
4139
  path: "v2/account/inventory",
4083
4140
  tokenRequired: true
@@ -4493,6 +4550,32 @@ var endpoints = {
4493
4550
  tokenRequired: false
4494
4551
  }
4495
4552
  },
4553
+ homestead: {
4554
+ decorationsById: {
4555
+ path: "v2/homestead/decorations?ids=$(ids)",
4556
+ tokenRequired: false
4557
+ },
4558
+ decorationsAll: {
4559
+ path: "v2/homestead/decorations",
4560
+ tokenRequired: false
4561
+ },
4562
+ decorationsCategoriesById: {
4563
+ path: "v2/homestead/decorations/categories?ids=$(ids)",
4564
+ tokenRequired: false
4565
+ },
4566
+ decorationsCategoriesAll: {
4567
+ path: "v2/homestead/decorations/categories",
4568
+ tokenRequired: false
4569
+ },
4570
+ glyphsById: {
4571
+ path: "v2/homestead/glyphs?ids=$(ids)",
4572
+ tokenRequired: false
4573
+ },
4574
+ glyphsAll: {
4575
+ path: "v2/homestead/glyphs",
4576
+ tokenRequired: false
4577
+ }
4578
+ },
4496
4579
  items: {
4497
4580
  all: {
4498
4581
  path: "v2/items",
@@ -5029,6 +5112,26 @@ var AccountApi = class extends ApiBase {
5029
5112
  async getHomeCats() {
5030
5113
  return await this.buildRequest(endpoints.account.homeCats, {}, AccountHomeCatsDTO);
5031
5114
  }
5115
+ /**
5116
+ * Returns information about unlocked homestead decorations.
5117
+ */
5118
+ async getHomesteadDecorations() {
5119
+ return await this.buildRequest(
5120
+ endpoints.account.homesteadDecorations,
5121
+ {},
5122
+ AccountHomesteadDecorationsDTO
5123
+ );
5124
+ }
5125
+ /**
5126
+ * Returns information about glyphs stored in homestead collection boxes.
5127
+ */
5128
+ async getHomesteadGlyphs() {
5129
+ return await this.buildRequest(
5130
+ endpoints.account.homesteadGlyphs,
5131
+ {},
5132
+ AccountHomesteadGlyphsDTO
5133
+ );
5134
+ }
5032
5135
  /**
5033
5136
  * Returns the shared inventory slots in an account.
5034
5137
  * If null, the slot is empty
@@ -5263,8 +5366,6 @@ var AccountApi = class extends ApiBase {
5263
5366
  );
5264
5367
  }
5265
5368
  };
5266
- var stringArrayType = zod.z.array(zod.z.string());
5267
- var numberArrayType = zod.z.array(zod.z.number());
5268
5369
 
5269
5370
  // src/apis/achievements/achievements.ts
5270
5371
  var AchievementsApi = class extends ApiBase {
@@ -5317,8 +5418,8 @@ var CharactersApi = class extends ApiBase {
5317
5418
  async getBuildTabs(id, tabs = "all") {
5318
5419
  if (Array.isArray(tabs)) {
5319
5420
  for (const tab of tabs) {
5320
- if (tab < 1 || tab > 8) {
5321
- logger.warn("Build tab ids must be between 1 and 8. Returning all tabs");
5421
+ if (tab < 1 || tab > 9) {
5422
+ logger.warn("Build tab ids must be between 1 and 9. Returning all tabs");
5322
5423
  tabs = "all";
5323
5424
  }
5324
5425
  }
@@ -5373,8 +5474,8 @@ var CharactersApi = class extends ApiBase {
5373
5474
  async getEquipmentTabs(id, tabs = "all") {
5374
5475
  if (Array.isArray(tabs)) {
5375
5476
  for (const tab of tabs) {
5376
- if (tab < 1 || tab > 8) {
5377
- logger.warn("Equipment tab ids must be between 1 and 8. Returning all tabs.");
5477
+ if (tab < 1 || tab > 9) {
5478
+ logger.warn("Equipment tab ids must be between 1 and 9. Returning all tabs.");
5378
5479
  tabs = "all";
5379
5480
  }
5380
5481
  }
@@ -5734,6 +5835,44 @@ var HomeApi = class extends ApiBase {
5734
5835
  }
5735
5836
  };
5736
5837
 
5838
+ // src/apis/homestead/homestead.ts
5839
+ var HomesteadApi = class extends ApiBase {
5840
+ async getDecorations(ids) {
5841
+ if (ids) {
5842
+ return await this.buildRequest(
5843
+ endpoints.homestead.decorationsById,
5844
+ { ids },
5845
+ HomesteadDecorationsDTO
5846
+ );
5847
+ }
5848
+ return await this.buildRequest(endpoints.homestead.decorationsAll, {}, numberArrayType);
5849
+ }
5850
+ async getCategories(ids) {
5851
+ if (ids) {
5852
+ return await this.buildRequest(
5853
+ endpoints.homestead.decorationsCategoriesById,
5854
+ { ids },
5855
+ HomesteadDecorationsCategoriesDTO
5856
+ );
5857
+ }
5858
+ return await this.buildRequest(
5859
+ endpoints.homestead.decorationsCategoriesAll,
5860
+ {},
5861
+ numberArrayType
5862
+ );
5863
+ }
5864
+ async getGlyphs(ids) {
5865
+ if (ids) {
5866
+ return await this.buildRequest(
5867
+ endpoints.homestead.glyphsById,
5868
+ { ids },
5869
+ HomesteadGlyphsDTO
5870
+ );
5871
+ }
5872
+ return await this.buildRequest(endpoints.homestead.glyphsAll, {}, stringArrayType);
5873
+ }
5874
+ };
5875
+
5737
5876
  // src/apis/misc/backstory.ts
5738
5877
  var BackstoryApi = class extends ApiBase {
5739
5878
  async getAnswers(ids) {
@@ -5770,8 +5909,7 @@ var BuildApi = class extends ApiBase {
5770
5909
  // src/apis/misc/colors.ts
5771
5910
  var ColorsApi = class extends ApiBase {
5772
5911
  async get(ids) {
5773
- if (ids)
5774
- return await this.buildRequest(endpoints.colors.byId, { ids }, ColorsDTO);
5912
+ if (ids) return await this.buildRequest(endpoints.colors.byId, { ids }, ColorsDTO);
5775
5913
  return await this.buildRequest(endpoints.colors.all, {}, numberArrayType);
5776
5914
  }
5777
5915
  };
@@ -5850,8 +5988,7 @@ var DailyCraftingApi = class extends ApiBase {
5850
5988
  // src/apis/misc/dungeons.ts
5851
5989
  var DungeonsApi = class extends ApiBase {
5852
5990
  async get(ids) {
5853
- if (ids)
5854
- return await this.buildRequest(endpoints.dungeons.byId, { ids }, DungeonsDTO);
5991
+ if (ids) return await this.buildRequest(endpoints.dungeons.byId, { ids }, DungeonsDTO);
5855
5992
  return await this.buildRequest(endpoints.dungeons.all, {}, stringArrayType);
5856
5993
  }
5857
5994
  };
@@ -5874,8 +6011,7 @@ var EmotesApi = class extends ApiBase {
5874
6011
  // src/apis/misc/files.ts
5875
6012
  var FilesApi = class extends ApiBase {
5876
6013
  async get(ids) {
5877
- if (ids)
5878
- return await this.buildRequest(endpoints.files.byId, { ids }, FilesDTO);
6014
+ if (ids) return await this.buildRequest(endpoints.files.byId, { ids }, FilesDTO);
5879
6015
  return await this.buildRequest(endpoints.files.all, {}, stringArrayType);
5880
6016
  }
5881
6017
  };
@@ -5883,8 +6019,7 @@ var FilesApi = class extends ApiBase {
5883
6019
  // src/apis/misc/finishers.ts
5884
6020
  var FinishersApi = class extends ApiBase {
5885
6021
  async get(ids) {
5886
- if (ids)
5887
- return await this.buildRequest(endpoints.finishers.byId, { ids }, FinishersDTO);
6022
+ if (ids) return await this.buildRequest(endpoints.finishers.byId, { ids }, FinishersDTO);
5888
6023
  return await this.buildRequest(endpoints.finishers.all, {}, numberArrayType);
5889
6024
  }
5890
6025
  };
@@ -5892,8 +6027,7 @@ var FinishersApi = class extends ApiBase {
5892
6027
  // src/apis/misc/gliders.ts
5893
6028
  var GlidersApi = class extends ApiBase {
5894
6029
  async get(ids) {
5895
- if (ids)
5896
- return await this.buildRequest(endpoints.gliders.byId, { ids }, GlidersDTO);
6030
+ if (ids) return await this.buildRequest(endpoints.gliders.byId, { ids }, GlidersDTO);
5897
6031
  return await this.buildRequest(endpoints.gliders.all, {}, numberArrayType);
5898
6032
  }
5899
6033
  };
@@ -5901,8 +6035,7 @@ var GlidersApi = class extends ApiBase {
5901
6035
  // src/apis/misc/items.ts
5902
6036
  var ItemsApi = class extends ApiBase {
5903
6037
  async get(ids) {
5904
- if (ids)
5905
- return await this.buildRequest(endpoints.items.byId, { ids }, ItemsDTO);
6038
+ if (ids) return await this.buildRequest(endpoints.items.byId, { ids }, ItemsDTO);
5906
6039
  return await this.buildRequest(endpoints.items.all, {}, numberArrayType);
5907
6040
  }
5908
6041
  };
@@ -5910,8 +6043,7 @@ var ItemsApi = class extends ApiBase {
5910
6043
  // src/apis/misc/itemstats.ts
5911
6044
  var ItemStatsApi = class extends ApiBase {
5912
6045
  async get(ids) {
5913
- if (ids)
5914
- return await this.buildRequest(endpoints.itemstats.byId, { ids }, ItemStatsDTO);
6046
+ if (ids) return await this.buildRequest(endpoints.itemstats.byId, { ids }, ItemStatsDTO);
5915
6047
  return await this.buildRequest(endpoints.itemstats.all, {}, numberArrayType);
5916
6048
  }
5917
6049
  };
@@ -5919,8 +6051,7 @@ var ItemStatsApi = class extends ApiBase {
5919
6051
  // src/apis/misc/jadebots.ts
5920
6052
  var JadebotsApi = class extends ApiBase {
5921
6053
  async get(ids) {
5922
- if (ids)
5923
- return await this.buildRequest(endpoints.jadebots.byId, { ids }, JadebotsDTO);
6054
+ if (ids) return await this.buildRequest(endpoints.jadebots.byId, { ids }, JadebotsDTO);
5924
6055
  return await this.buildRequest(endpoints.jadebots.all, {}, numberArrayType);
5925
6056
  }
5926
6057
  };
@@ -5941,8 +6072,7 @@ var LegendaryArmoryApi = class extends ApiBase {
5941
6072
  // src/apis/misc/legends.ts
5942
6073
  var LegendsApi = class extends ApiBase {
5943
6074
  async get(ids) {
5944
- if (ids)
5945
- return await this.buildRequest(endpoints.legends.byId, { ids }, LegendsDTO);
6075
+ if (ids) return await this.buildRequest(endpoints.legends.byId, { ids }, LegendsDTO);
5946
6076
  return await this.buildRequest(endpoints.legends.all, {}, stringArrayType);
5947
6077
  }
5948
6078
  };
@@ -5974,8 +6104,7 @@ var MapChestsApi = class extends ApiBase {
5974
6104
  // src/apis/misc/maps.ts
5975
6105
  var MapsApi = class extends ApiBase {
5976
6106
  async get(ids) {
5977
- if (ids)
5978
- return await this.buildRequest(endpoints.maps.byId, { ids }, MapsDTO);
6107
+ if (ids) return await this.buildRequest(endpoints.maps.byId, { ids }, MapsDTO);
5979
6108
  return await this.buildRequest(endpoints.maps.all, {}, numberArrayType);
5980
6109
  }
5981
6110
  };
@@ -5983,8 +6112,7 @@ var MapsApi = class extends ApiBase {
5983
6112
  // src/apis/misc/masteries.ts
5984
6113
  var MasteriesApi = class extends ApiBase {
5985
6114
  async get(ids) {
5986
- if (ids)
5987
- return await this.buildRequest(endpoints.masteries.byId, { ids }, MasteriesDTO);
6115
+ if (ids) return await this.buildRequest(endpoints.masteries.byId, { ids }, MasteriesDTO);
5988
6116
  return await this.buildRequest(endpoints.masteries.all, {}, numberArrayType);
5989
6117
  }
5990
6118
  };
@@ -5992,8 +6120,7 @@ var MasteriesApi = class extends ApiBase {
5992
6120
  // src/apis/misc/materials.ts
5993
6121
  var MaterialsApi = class extends ApiBase {
5994
6122
  async get(ids) {
5995
- if (ids)
5996
- return await this.buildRequest(endpoints.materials.byId, { ids }, MaterialsDTO);
6123
+ if (ids) return await this.buildRequest(endpoints.materials.byId, { ids }, MaterialsDTO);
5997
6124
  return await this.buildRequest(endpoints.materials.all, {}, numberArrayType);
5998
6125
  }
5999
6126
  };
@@ -6001,8 +6128,7 @@ var MaterialsApi = class extends ApiBase {
6001
6128
  // src/apis/misc/minis.ts
6002
6129
  var MinisApi = class extends ApiBase {
6003
6130
  async get(ids) {
6004
- if (ids)
6005
- return await this.buildRequest(endpoints.minis.byId, { ids }, MinisDTO);
6131
+ if (ids) return await this.buildRequest(endpoints.minis.byId, { ids }, MinisDTO);
6006
6132
  return await this.buildRequest(endpoints.minis.all, {}, numberArrayType);
6007
6133
  }
6008
6134
  };
@@ -6024,8 +6150,7 @@ var MountsApi = class extends ApiBase {
6024
6150
  // src/apis/misc/novelties.ts
6025
6151
  var NoveltiesApi = class extends ApiBase {
6026
6152
  async get(ids) {
6027
- if (ids)
6028
- return await this.buildRequest(endpoints.novelties.byId, { ids }, NoveltiesDTO);
6153
+ if (ids) return await this.buildRequest(endpoints.novelties.byId, { ids }, NoveltiesDTO);
6029
6154
  return await this.buildRequest(endpoints.novelties.all, {}, numberArrayType);
6030
6155
  }
6031
6156
  };
@@ -6033,8 +6158,7 @@ var NoveltiesApi = class extends ApiBase {
6033
6158
  // src/apis/misc/outfits.ts
6034
6159
  var OutfitsApi = class extends ApiBase {
6035
6160
  async get(ids) {
6036
- if (ids)
6037
- return await this.buildRequest(endpoints.outfits.byId, { ids }, OutfitsDTO);
6161
+ if (ids) return await this.buildRequest(endpoints.outfits.byId, { ids }, OutfitsDTO);
6038
6162
  return await this.buildRequest(endpoints.outfits.all, {}, numberArrayType);
6039
6163
  }
6040
6164
  };
@@ -6042,8 +6166,7 @@ var OutfitsApi = class extends ApiBase {
6042
6166
  // src/apis/misc/pets.ts
6043
6167
  var PetsApi = class extends ApiBase {
6044
6168
  async get(ids) {
6045
- if (ids)
6046
- return await this.buildRequest(endpoints.pets.byId, { ids }, PetsDTO);
6169
+ if (ids) return await this.buildRequest(endpoints.pets.byId, { ids }, PetsDTO);
6047
6170
  return await this.buildRequest(endpoints.pets.all, {}, numberArrayType);
6048
6171
  }
6049
6172
  };
@@ -6060,8 +6183,7 @@ var ProfessionsApi = class extends ApiBase {
6060
6183
  // src/apis/misc/quaggans.ts
6061
6184
  var QuaggansApi = class extends ApiBase {
6062
6185
  async get(ids) {
6063
- if (ids)
6064
- return await this.buildRequest(endpoints.quaggans.byId, { ids }, QuaggansDTO);
6186
+ if (ids) return await this.buildRequest(endpoints.quaggans.byId, { ids }, QuaggansDTO);
6065
6187
  return await this.buildRequest(endpoints.quaggans.all, {}, stringArrayType);
6066
6188
  }
6067
6189
  };
@@ -6069,8 +6191,7 @@ var QuaggansApi = class extends ApiBase {
6069
6191
  // src/apis/misc/quests.ts
6070
6192
  var QuestsApi = class extends ApiBase {
6071
6193
  async get(ids) {
6072
- if (ids)
6073
- return await this.buildRequest(endpoints.quests.byId, { ids }, QuestsDTO);
6194
+ if (ids) return await this.buildRequest(endpoints.quests.byId, { ids }, QuestsDTO);
6074
6195
  return await this.buildRequest(endpoints.quests.all, {}, numberArrayType);
6075
6196
  }
6076
6197
  };
@@ -6078,8 +6199,7 @@ var QuestsApi = class extends ApiBase {
6078
6199
  // src/apis/misc/races.ts
6079
6200
  var RacesApi = class extends ApiBase {
6080
6201
  async get(ids) {
6081
- if (ids)
6082
- return await this.buildRequest(endpoints.races.byId, { ids }, RacesDTO);
6202
+ if (ids) return await this.buildRequest(endpoints.races.byId, { ids }, RacesDTO);
6083
6203
  return await this.buildRequest(endpoints.races.all, {}, stringArrayType);
6084
6204
  }
6085
6205
  };
@@ -6087,8 +6207,7 @@ var RacesApi = class extends ApiBase {
6087
6207
  // src/apis/misc/raids.ts
6088
6208
  var RaidsApi = class extends ApiBase {
6089
6209
  async get(ids) {
6090
- if (ids)
6091
- return await this.buildRequest(endpoints.raids.byId, { ids }, RaidsDTO);
6210
+ if (ids) return await this.buildRequest(endpoints.raids.byId, { ids }, RaidsDTO);
6092
6211
  return await this.buildRequest(endpoints.raids.all, {}, stringArrayType);
6093
6212
  }
6094
6213
  };
@@ -6096,8 +6215,7 @@ var RaidsApi = class extends ApiBase {
6096
6215
  // src/apis/misc/recipes.ts
6097
6216
  var RecipesApi = class extends ApiBase {
6098
6217
  async get(ids) {
6099
- if (ids)
6100
- return await this.buildRequest(endpoints.recipes.byId, { ids }, RecipesDTO);
6218
+ if (ids) return await this.buildRequest(endpoints.recipes.byId, { ids }, RecipesDTO);
6101
6219
  return await this.buildRequest(endpoints.recipes.all, {}, numberArrayType);
6102
6220
  }
6103
6221
  /**
@@ -6118,8 +6236,7 @@ var RecipesApi = class extends ApiBase {
6118
6236
  // src/apis/misc/skiffs.ts
6119
6237
  var SkiffsApi = class extends ApiBase {
6120
6238
  async get(ids) {
6121
- if (ids)
6122
- return await this.buildRequest(endpoints.skiffs.byId, { ids }, SkiffsDTO);
6239
+ if (ids) return await this.buildRequest(endpoints.skiffs.byId, { ids }, SkiffsDTO);
6123
6240
  return await this.buildRequest(endpoints.skiffs.all, {}, numberArrayType);
6124
6241
  }
6125
6242
  };
@@ -6139,8 +6256,7 @@ var SkillsApi = class extends ApiBase {
6139
6256
  // src/apis/misc/skins.ts
6140
6257
  var SkinsApi = class extends ApiBase {
6141
6258
  async get(ids) {
6142
- if (ids)
6143
- return await this.buildRequest(endpoints.skins.byId, { ids }, SkinsDTO);
6259
+ if (ids) return await this.buildRequest(endpoints.skins.byId, { ids }, SkinsDTO);
6144
6260
  return await this.buildRequest(endpoints.skins.all, {}, numberArrayType);
6145
6261
  }
6146
6262
  };
@@ -6161,8 +6277,7 @@ var storiesCore = zod.z.array(zod.z.number());
6161
6277
  var seasonsCore = zod.z.array(zod.z.string());
6162
6278
  var StoriesApi = class extends ApiBase {
6163
6279
  async getStories(ids) {
6164
- if (ids)
6165
- return await this.buildRequest(endpoints.stories.byId, { ids }, StoriesDTO);
6280
+ if (ids) return await this.buildRequest(endpoints.stories.byId, { ids }, StoriesDTO);
6166
6281
  return await this.buildRequest(endpoints.stories.all, {}, storiesCore);
6167
6282
  }
6168
6283
  async getSeasons(ids) {
@@ -6219,8 +6334,7 @@ var SubtokenApi = class extends ApiBase {
6219
6334
  // src/apis/misc/titles.ts
6220
6335
  var TitlesApi = class extends ApiBase {
6221
6336
  async get(ids) {
6222
- if (ids)
6223
- return await this.buildRequest(endpoints.titles.byId, { ids }, TitlesDTO);
6337
+ if (ids) return await this.buildRequest(endpoints.titles.byId, { ids }, TitlesDTO);
6224
6338
  return await this.buildRequest(endpoints.titles.all, {}, numberArrayType);
6225
6339
  }
6226
6340
  };
@@ -6238,8 +6352,7 @@ var TokenInfoApi = class extends ApiBase {
6238
6352
  // src/apis/misc/traits.ts
6239
6353
  var TraitsApi = class extends ApiBase {
6240
6354
  async get(ids) {
6241
- if (ids)
6242
- return await this.buildRequest(endpoints.traits.byId, { ids }, TraitsDTO);
6355
+ if (ids) return await this.buildRequest(endpoints.traits.byId, { ids }, TraitsDTO);
6243
6356
  return await this.buildRequest(endpoints.traits.all, {}, numberArrayType);
6244
6357
  }
6245
6358
  };
@@ -6257,8 +6370,7 @@ var WorldBossesApi = class extends ApiBase {
6257
6370
  // src/apis/misc/worlds.ts
6258
6371
  var WorldsApi = class extends ApiBase {
6259
6372
  async get(ids) {
6260
- if (ids)
6261
- return await this.buildRequest(endpoints.worlds.byId, { ids }, WorldsDTO);
6373
+ if (ids) return await this.buildRequest(endpoints.worlds.byId, { ids }, WorldsDTO);
6262
6374
  return await this.buildRequest(endpoints.worlds.all, {}, numberArrayType);
6263
6375
  }
6264
6376
  };
@@ -6271,23 +6383,19 @@ var PvPApi = class extends ApiBase {
6271
6383
  return await this.buildRequest(endpoints.pvp.amuletsAll, {}, numberArrayType);
6272
6384
  }
6273
6385
  async getGames(ids) {
6274
- if (ids)
6275
- return await this.buildRequest(endpoints.pvp.gamesById, { ids }, PvPGamesDTO);
6386
+ if (ids) return await this.buildRequest(endpoints.pvp.gamesById, { ids }, PvPGamesDTO);
6276
6387
  return await this.buildRequest(endpoints.pvp.gamesAll, {}, stringArrayType);
6277
6388
  }
6278
6389
  async getHeroes(ids) {
6279
- if (ids)
6280
- return await this.buildRequest(endpoints.pvp.heroesById, { ids }, PvPHeroesDTO);
6390
+ if (ids) return await this.buildRequest(endpoints.pvp.heroesById, { ids }, PvPHeroesDTO);
6281
6391
  return await this.buildRequest(endpoints.pvp.heroesAll, {}, stringArrayType);
6282
6392
  }
6283
6393
  async getRanks(ids) {
6284
- if (ids)
6285
- return await this.buildRequest(endpoints.pvp.ranksById, { ids }, PvPRanksDTO);
6394
+ if (ids) return await this.buildRequest(endpoints.pvp.ranksById, { ids }, PvPRanksDTO);
6286
6395
  return await this.buildRequest(endpoints.pvp.ranksAll, {}, numberArrayType);
6287
6396
  }
6288
6397
  async getSeasons(ids) {
6289
- if (ids)
6290
- return await this.buildRequest(endpoints.pvp.seasonsById, { ids }, PvPSeasonDTO);
6398
+ if (ids) return await this.buildRequest(endpoints.pvp.seasonsById, { ids }, PvPSeasonDTO);
6291
6399
  return await this.buildRequest(endpoints.pvp.seasonsAll, {}, stringArrayType);
6292
6400
  }
6293
6401
  async getLeaderboards(id, region, type) {
@@ -6413,8 +6521,7 @@ var WorldVsWorldApi = class extends ApiBase {
6413
6521
  return await this.buildRequest(endpoints.wvw.objectives, {}, stringArrayType);
6414
6522
  }
6415
6523
  async getRanks(ids) {
6416
- if (ids)
6417
- return await this.buildRequest(endpoints.wvw.ranksById, { ids }, WvWRanksDTO);
6524
+ if (ids) return await this.buildRequest(endpoints.wvw.ranksById, { ids }, WvWRanksDTO);
6418
6525
  return await this.buildRequest(endpoints.wvw.ranks, {}, numberArrayType);
6419
6526
  }
6420
6527
  async getUpgrades(ids) {
@@ -6462,6 +6569,8 @@ var GW2Api = class extends ApiBase {
6462
6569
  guild = new GuildApi(this.getParams());
6463
6570
  /** /v2/home Api */
6464
6571
  home = new HomeApi(this.getParams());
6572
+ /** /v2/homestead Api */
6573
+ homestead = new HomesteadApi(this.getParams());
6465
6574
  /** /v2/items Api */
6466
6575
  items = new ItemsApi(this.getParams());
6467
6576
  /** /v2/itemstats Api */