guildwars2-ts 1.1.5 → 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/LICENSE +16 -16
- package/dist/index.d.mts +468 -2979
- package/dist/index.d.ts +468 -2979
- package/dist/index.js +179 -72
- package/dist/index.mjs +179 -72
- package/package.json +5 -5
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(),
|
|
@@ -851,7 +862,7 @@ var CharacterCoreDTO = zod.z.object({
|
|
|
851
862
|
/** Character level. */
|
|
852
863
|
level: zod.z.number(),
|
|
853
864
|
/** Character guild. */
|
|
854
|
-
guild: zod.z.string().
|
|
865
|
+
guild: zod.z.union([zod.z.string(), zod.z.null()]),
|
|
855
866
|
/** Character age. */
|
|
856
867
|
age: zod.z.number(),
|
|
857
868
|
/** Character creation date. */
|
|
@@ -859,7 +870,7 @@ var CharacterCoreDTO = zod.z.object({
|
|
|
859
870
|
/** Character deaths. */
|
|
860
871
|
deaths: zod.z.number(),
|
|
861
872
|
/** Character title id. */
|
|
862
|
-
title: zod.z.number()
|
|
873
|
+
title: zod.z.number().optional()
|
|
863
874
|
});
|
|
864
875
|
var CharacterCraftingDTO = zod.z.object({
|
|
865
876
|
/**
|
|
@@ -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()
|
|
@@ -4078,6 +4125,14 @@ var endpoints = {
|
|
|
4078
4125
|
path: "v2/account/home/nodes",
|
|
4079
4126
|
tokenRequired: true
|
|
4080
4127
|
},
|
|
4128
|
+
homesteadDecorations: {
|
|
4129
|
+
path: "v2/account/homestead/decorations",
|
|
4130
|
+
tokenRequired: true
|
|
4131
|
+
},
|
|
4132
|
+
homesteadGlyphs: {
|
|
4133
|
+
path: "v2/account/homestead/glyphs",
|
|
4134
|
+
tokenRequired: true
|
|
4135
|
+
},
|
|
4081
4136
|
inventory: {
|
|
4082
4137
|
path: "v2/account/inventory",
|
|
4083
4138
|
tokenRequired: true
|
|
@@ -4493,6 +4548,32 @@ var endpoints = {
|
|
|
4493
4548
|
tokenRequired: false
|
|
4494
4549
|
}
|
|
4495
4550
|
},
|
|
4551
|
+
homestead: {
|
|
4552
|
+
decorationsById: {
|
|
4553
|
+
path: "v2/homestead/decorations?ids=$(ids)",
|
|
4554
|
+
tokenRequired: false
|
|
4555
|
+
},
|
|
4556
|
+
decorationsAll: {
|
|
4557
|
+
path: "v2/homestead/decorations",
|
|
4558
|
+
tokenRequired: false
|
|
4559
|
+
},
|
|
4560
|
+
decorationsCategoriesById: {
|
|
4561
|
+
path: "v2/homestead/decorations/categories?ids=$(ids)",
|
|
4562
|
+
tokenRequired: false
|
|
4563
|
+
},
|
|
4564
|
+
decorationsCategoriesAll: {
|
|
4565
|
+
path: "v2/homestead/decorations/categories",
|
|
4566
|
+
tokenRequired: false
|
|
4567
|
+
},
|
|
4568
|
+
glyphsById: {
|
|
4569
|
+
path: "v2/homestead/glyphs?ids=$(ids)",
|
|
4570
|
+
tokenRequired: false
|
|
4571
|
+
},
|
|
4572
|
+
glyphsAll: {
|
|
4573
|
+
path: "v2/homestead/glyphs",
|
|
4574
|
+
tokenRequired: false
|
|
4575
|
+
}
|
|
4576
|
+
},
|
|
4496
4577
|
items: {
|
|
4497
4578
|
all: {
|
|
4498
4579
|
path: "v2/items",
|
|
@@ -5029,6 +5110,26 @@ var AccountApi = class extends ApiBase {
|
|
|
5029
5110
|
async getHomeCats() {
|
|
5030
5111
|
return await this.buildRequest(endpoints.account.homeCats, {}, AccountHomeCatsDTO);
|
|
5031
5112
|
}
|
|
5113
|
+
/**
|
|
5114
|
+
* Returns information about unlocked homestead decorations.
|
|
5115
|
+
*/
|
|
5116
|
+
async getHomesteadDecorations() {
|
|
5117
|
+
return await this.buildRequest(
|
|
5118
|
+
endpoints.account.homesteadDecorations,
|
|
5119
|
+
{},
|
|
5120
|
+
AccountHomesteadDecorationsDTO
|
|
5121
|
+
);
|
|
5122
|
+
}
|
|
5123
|
+
/**
|
|
5124
|
+
* Returns information about glyphs stored in homestead collection boxes.
|
|
5125
|
+
*/
|
|
5126
|
+
async getHomesteadGlyphs() {
|
|
5127
|
+
return await this.buildRequest(
|
|
5128
|
+
endpoints.account.homesteadGlyphs,
|
|
5129
|
+
{},
|
|
5130
|
+
AccountHomesteadGlyphsDTO
|
|
5131
|
+
);
|
|
5132
|
+
}
|
|
5032
5133
|
/**
|
|
5033
5134
|
* Returns the shared inventory slots in an account.
|
|
5034
5135
|
* If null, the slot is empty
|
|
@@ -5263,8 +5364,6 @@ var AccountApi = class extends ApiBase {
|
|
|
5263
5364
|
);
|
|
5264
5365
|
}
|
|
5265
5366
|
};
|
|
5266
|
-
var stringArrayType = zod.z.array(zod.z.string());
|
|
5267
|
-
var numberArrayType = zod.z.array(zod.z.number());
|
|
5268
5367
|
|
|
5269
5368
|
// src/apis/achievements/achievements.ts
|
|
5270
5369
|
var AchievementsApi = class extends ApiBase {
|
|
@@ -5734,6 +5833,44 @@ var HomeApi = class extends ApiBase {
|
|
|
5734
5833
|
}
|
|
5735
5834
|
};
|
|
5736
5835
|
|
|
5836
|
+
// src/apis/homestead/homestead.ts
|
|
5837
|
+
var HomesteadApi = class extends ApiBase {
|
|
5838
|
+
async getDecorations(ids) {
|
|
5839
|
+
if (ids) {
|
|
5840
|
+
return await this.buildRequest(
|
|
5841
|
+
endpoints.homestead.decorationsById,
|
|
5842
|
+
{ ids },
|
|
5843
|
+
HomesteadDecorationsDTO
|
|
5844
|
+
);
|
|
5845
|
+
}
|
|
5846
|
+
return await this.buildRequest(endpoints.homestead.decorationsAll, {}, numberArrayType);
|
|
5847
|
+
}
|
|
5848
|
+
async getCategories(ids) {
|
|
5849
|
+
if (ids) {
|
|
5850
|
+
return await this.buildRequest(
|
|
5851
|
+
endpoints.homestead.decorationsCategoriesById,
|
|
5852
|
+
{ ids },
|
|
5853
|
+
HomesteadDecorationsCategoriesDTO
|
|
5854
|
+
);
|
|
5855
|
+
}
|
|
5856
|
+
return await this.buildRequest(
|
|
5857
|
+
endpoints.homestead.decorationsCategoriesAll,
|
|
5858
|
+
{},
|
|
5859
|
+
numberArrayType
|
|
5860
|
+
);
|
|
5861
|
+
}
|
|
5862
|
+
async getGlyphs(ids) {
|
|
5863
|
+
if (ids) {
|
|
5864
|
+
return await this.buildRequest(
|
|
5865
|
+
endpoints.homestead.glyphsById,
|
|
5866
|
+
{ ids },
|
|
5867
|
+
HomesteadGlyphsDTO
|
|
5868
|
+
);
|
|
5869
|
+
}
|
|
5870
|
+
return await this.buildRequest(endpoints.homestead.glyphsAll, {}, stringArrayType);
|
|
5871
|
+
}
|
|
5872
|
+
};
|
|
5873
|
+
|
|
5737
5874
|
// src/apis/misc/backstory.ts
|
|
5738
5875
|
var BackstoryApi = class extends ApiBase {
|
|
5739
5876
|
async getAnswers(ids) {
|
|
@@ -5770,8 +5907,7 @@ var BuildApi = class extends ApiBase {
|
|
|
5770
5907
|
// src/apis/misc/colors.ts
|
|
5771
5908
|
var ColorsApi = class extends ApiBase {
|
|
5772
5909
|
async get(ids) {
|
|
5773
|
-
if (ids)
|
|
5774
|
-
return await this.buildRequest(endpoints.colors.byId, { ids }, ColorsDTO);
|
|
5910
|
+
if (ids) return await this.buildRequest(endpoints.colors.byId, { ids }, ColorsDTO);
|
|
5775
5911
|
return await this.buildRequest(endpoints.colors.all, {}, numberArrayType);
|
|
5776
5912
|
}
|
|
5777
5913
|
};
|
|
@@ -5850,8 +5986,7 @@ var DailyCraftingApi = class extends ApiBase {
|
|
|
5850
5986
|
// src/apis/misc/dungeons.ts
|
|
5851
5987
|
var DungeonsApi = class extends ApiBase {
|
|
5852
5988
|
async get(ids) {
|
|
5853
|
-
if (ids)
|
|
5854
|
-
return await this.buildRequest(endpoints.dungeons.byId, { ids }, DungeonsDTO);
|
|
5989
|
+
if (ids) return await this.buildRequest(endpoints.dungeons.byId, { ids }, DungeonsDTO);
|
|
5855
5990
|
return await this.buildRequest(endpoints.dungeons.all, {}, stringArrayType);
|
|
5856
5991
|
}
|
|
5857
5992
|
};
|
|
@@ -5874,8 +6009,7 @@ var EmotesApi = class extends ApiBase {
|
|
|
5874
6009
|
// src/apis/misc/files.ts
|
|
5875
6010
|
var FilesApi = class extends ApiBase {
|
|
5876
6011
|
async get(ids) {
|
|
5877
|
-
if (ids)
|
|
5878
|
-
return await this.buildRequest(endpoints.files.byId, { ids }, FilesDTO);
|
|
6012
|
+
if (ids) return await this.buildRequest(endpoints.files.byId, { ids }, FilesDTO);
|
|
5879
6013
|
return await this.buildRequest(endpoints.files.all, {}, stringArrayType);
|
|
5880
6014
|
}
|
|
5881
6015
|
};
|
|
@@ -5883,8 +6017,7 @@ var FilesApi = class extends ApiBase {
|
|
|
5883
6017
|
// src/apis/misc/finishers.ts
|
|
5884
6018
|
var FinishersApi = class extends ApiBase {
|
|
5885
6019
|
async get(ids) {
|
|
5886
|
-
if (ids)
|
|
5887
|
-
return await this.buildRequest(endpoints.finishers.byId, { ids }, FinishersDTO);
|
|
6020
|
+
if (ids) return await this.buildRequest(endpoints.finishers.byId, { ids }, FinishersDTO);
|
|
5888
6021
|
return await this.buildRequest(endpoints.finishers.all, {}, numberArrayType);
|
|
5889
6022
|
}
|
|
5890
6023
|
};
|
|
@@ -5892,8 +6025,7 @@ var FinishersApi = class extends ApiBase {
|
|
|
5892
6025
|
// src/apis/misc/gliders.ts
|
|
5893
6026
|
var GlidersApi = class extends ApiBase {
|
|
5894
6027
|
async get(ids) {
|
|
5895
|
-
if (ids)
|
|
5896
|
-
return await this.buildRequest(endpoints.gliders.byId, { ids }, GlidersDTO);
|
|
6028
|
+
if (ids) return await this.buildRequest(endpoints.gliders.byId, { ids }, GlidersDTO);
|
|
5897
6029
|
return await this.buildRequest(endpoints.gliders.all, {}, numberArrayType);
|
|
5898
6030
|
}
|
|
5899
6031
|
};
|
|
@@ -5901,8 +6033,7 @@ var GlidersApi = class extends ApiBase {
|
|
|
5901
6033
|
// src/apis/misc/items.ts
|
|
5902
6034
|
var ItemsApi = class extends ApiBase {
|
|
5903
6035
|
async get(ids) {
|
|
5904
|
-
if (ids)
|
|
5905
|
-
return await this.buildRequest(endpoints.items.byId, { ids }, ItemsDTO);
|
|
6036
|
+
if (ids) return await this.buildRequest(endpoints.items.byId, { ids }, ItemsDTO);
|
|
5906
6037
|
return await this.buildRequest(endpoints.items.all, {}, numberArrayType);
|
|
5907
6038
|
}
|
|
5908
6039
|
};
|
|
@@ -5910,8 +6041,7 @@ var ItemsApi = class extends ApiBase {
|
|
|
5910
6041
|
// src/apis/misc/itemstats.ts
|
|
5911
6042
|
var ItemStatsApi = class extends ApiBase {
|
|
5912
6043
|
async get(ids) {
|
|
5913
|
-
if (ids)
|
|
5914
|
-
return await this.buildRequest(endpoints.itemstats.byId, { ids }, ItemStatsDTO);
|
|
6044
|
+
if (ids) return await this.buildRequest(endpoints.itemstats.byId, { ids }, ItemStatsDTO);
|
|
5915
6045
|
return await this.buildRequest(endpoints.itemstats.all, {}, numberArrayType);
|
|
5916
6046
|
}
|
|
5917
6047
|
};
|
|
@@ -5919,8 +6049,7 @@ var ItemStatsApi = class extends ApiBase {
|
|
|
5919
6049
|
// src/apis/misc/jadebots.ts
|
|
5920
6050
|
var JadebotsApi = class extends ApiBase {
|
|
5921
6051
|
async get(ids) {
|
|
5922
|
-
if (ids)
|
|
5923
|
-
return await this.buildRequest(endpoints.jadebots.byId, { ids }, JadebotsDTO);
|
|
6052
|
+
if (ids) return await this.buildRequest(endpoints.jadebots.byId, { ids }, JadebotsDTO);
|
|
5924
6053
|
return await this.buildRequest(endpoints.jadebots.all, {}, numberArrayType);
|
|
5925
6054
|
}
|
|
5926
6055
|
};
|
|
@@ -5941,8 +6070,7 @@ var LegendaryArmoryApi = class extends ApiBase {
|
|
|
5941
6070
|
// src/apis/misc/legends.ts
|
|
5942
6071
|
var LegendsApi = class extends ApiBase {
|
|
5943
6072
|
async get(ids) {
|
|
5944
|
-
if (ids)
|
|
5945
|
-
return await this.buildRequest(endpoints.legends.byId, { ids }, LegendsDTO);
|
|
6073
|
+
if (ids) return await this.buildRequest(endpoints.legends.byId, { ids }, LegendsDTO);
|
|
5946
6074
|
return await this.buildRequest(endpoints.legends.all, {}, stringArrayType);
|
|
5947
6075
|
}
|
|
5948
6076
|
};
|
|
@@ -5974,8 +6102,7 @@ var MapChestsApi = class extends ApiBase {
|
|
|
5974
6102
|
// src/apis/misc/maps.ts
|
|
5975
6103
|
var MapsApi = class extends ApiBase {
|
|
5976
6104
|
async get(ids) {
|
|
5977
|
-
if (ids)
|
|
5978
|
-
return await this.buildRequest(endpoints.maps.byId, { ids }, MapsDTO);
|
|
6105
|
+
if (ids) return await this.buildRequest(endpoints.maps.byId, { ids }, MapsDTO);
|
|
5979
6106
|
return await this.buildRequest(endpoints.maps.all, {}, numberArrayType);
|
|
5980
6107
|
}
|
|
5981
6108
|
};
|
|
@@ -5983,8 +6110,7 @@ var MapsApi = class extends ApiBase {
|
|
|
5983
6110
|
// src/apis/misc/masteries.ts
|
|
5984
6111
|
var MasteriesApi = class extends ApiBase {
|
|
5985
6112
|
async get(ids) {
|
|
5986
|
-
if (ids)
|
|
5987
|
-
return await this.buildRequest(endpoints.masteries.byId, { ids }, MasteriesDTO);
|
|
6113
|
+
if (ids) return await this.buildRequest(endpoints.masteries.byId, { ids }, MasteriesDTO);
|
|
5988
6114
|
return await this.buildRequest(endpoints.masteries.all, {}, numberArrayType);
|
|
5989
6115
|
}
|
|
5990
6116
|
};
|
|
@@ -5992,8 +6118,7 @@ var MasteriesApi = class extends ApiBase {
|
|
|
5992
6118
|
// src/apis/misc/materials.ts
|
|
5993
6119
|
var MaterialsApi = class extends ApiBase {
|
|
5994
6120
|
async get(ids) {
|
|
5995
|
-
if (ids)
|
|
5996
|
-
return await this.buildRequest(endpoints.materials.byId, { ids }, MaterialsDTO);
|
|
6121
|
+
if (ids) return await this.buildRequest(endpoints.materials.byId, { ids }, MaterialsDTO);
|
|
5997
6122
|
return await this.buildRequest(endpoints.materials.all, {}, numberArrayType);
|
|
5998
6123
|
}
|
|
5999
6124
|
};
|
|
@@ -6001,8 +6126,7 @@ var MaterialsApi = class extends ApiBase {
|
|
|
6001
6126
|
// src/apis/misc/minis.ts
|
|
6002
6127
|
var MinisApi = class extends ApiBase {
|
|
6003
6128
|
async get(ids) {
|
|
6004
|
-
if (ids)
|
|
6005
|
-
return await this.buildRequest(endpoints.minis.byId, { ids }, MinisDTO);
|
|
6129
|
+
if (ids) return await this.buildRequest(endpoints.minis.byId, { ids }, MinisDTO);
|
|
6006
6130
|
return await this.buildRequest(endpoints.minis.all, {}, numberArrayType);
|
|
6007
6131
|
}
|
|
6008
6132
|
};
|
|
@@ -6024,8 +6148,7 @@ var MountsApi = class extends ApiBase {
|
|
|
6024
6148
|
// src/apis/misc/novelties.ts
|
|
6025
6149
|
var NoveltiesApi = class extends ApiBase {
|
|
6026
6150
|
async get(ids) {
|
|
6027
|
-
if (ids)
|
|
6028
|
-
return await this.buildRequest(endpoints.novelties.byId, { ids }, NoveltiesDTO);
|
|
6151
|
+
if (ids) return await this.buildRequest(endpoints.novelties.byId, { ids }, NoveltiesDTO);
|
|
6029
6152
|
return await this.buildRequest(endpoints.novelties.all, {}, numberArrayType);
|
|
6030
6153
|
}
|
|
6031
6154
|
};
|
|
@@ -6033,8 +6156,7 @@ var NoveltiesApi = class extends ApiBase {
|
|
|
6033
6156
|
// src/apis/misc/outfits.ts
|
|
6034
6157
|
var OutfitsApi = class extends ApiBase {
|
|
6035
6158
|
async get(ids) {
|
|
6036
|
-
if (ids)
|
|
6037
|
-
return await this.buildRequest(endpoints.outfits.byId, { ids }, OutfitsDTO);
|
|
6159
|
+
if (ids) return await this.buildRequest(endpoints.outfits.byId, { ids }, OutfitsDTO);
|
|
6038
6160
|
return await this.buildRequest(endpoints.outfits.all, {}, numberArrayType);
|
|
6039
6161
|
}
|
|
6040
6162
|
};
|
|
@@ -6042,8 +6164,7 @@ var OutfitsApi = class extends ApiBase {
|
|
|
6042
6164
|
// src/apis/misc/pets.ts
|
|
6043
6165
|
var PetsApi = class extends ApiBase {
|
|
6044
6166
|
async get(ids) {
|
|
6045
|
-
if (ids)
|
|
6046
|
-
return await this.buildRequest(endpoints.pets.byId, { ids }, PetsDTO);
|
|
6167
|
+
if (ids) return await this.buildRequest(endpoints.pets.byId, { ids }, PetsDTO);
|
|
6047
6168
|
return await this.buildRequest(endpoints.pets.all, {}, numberArrayType);
|
|
6048
6169
|
}
|
|
6049
6170
|
};
|
|
@@ -6060,8 +6181,7 @@ var ProfessionsApi = class extends ApiBase {
|
|
|
6060
6181
|
// src/apis/misc/quaggans.ts
|
|
6061
6182
|
var QuaggansApi = class extends ApiBase {
|
|
6062
6183
|
async get(ids) {
|
|
6063
|
-
if (ids)
|
|
6064
|
-
return await this.buildRequest(endpoints.quaggans.byId, { ids }, QuaggansDTO);
|
|
6184
|
+
if (ids) return await this.buildRequest(endpoints.quaggans.byId, { ids }, QuaggansDTO);
|
|
6065
6185
|
return await this.buildRequest(endpoints.quaggans.all, {}, stringArrayType);
|
|
6066
6186
|
}
|
|
6067
6187
|
};
|
|
@@ -6069,8 +6189,7 @@ var QuaggansApi = class extends ApiBase {
|
|
|
6069
6189
|
// src/apis/misc/quests.ts
|
|
6070
6190
|
var QuestsApi = class extends ApiBase {
|
|
6071
6191
|
async get(ids) {
|
|
6072
|
-
if (ids)
|
|
6073
|
-
return await this.buildRequest(endpoints.quests.byId, { ids }, QuestsDTO);
|
|
6192
|
+
if (ids) return await this.buildRequest(endpoints.quests.byId, { ids }, QuestsDTO);
|
|
6074
6193
|
return await this.buildRequest(endpoints.quests.all, {}, numberArrayType);
|
|
6075
6194
|
}
|
|
6076
6195
|
};
|
|
@@ -6078,8 +6197,7 @@ var QuestsApi = class extends ApiBase {
|
|
|
6078
6197
|
// src/apis/misc/races.ts
|
|
6079
6198
|
var RacesApi = class extends ApiBase {
|
|
6080
6199
|
async get(ids) {
|
|
6081
|
-
if (ids)
|
|
6082
|
-
return await this.buildRequest(endpoints.races.byId, { ids }, RacesDTO);
|
|
6200
|
+
if (ids) return await this.buildRequest(endpoints.races.byId, { ids }, RacesDTO);
|
|
6083
6201
|
return await this.buildRequest(endpoints.races.all, {}, stringArrayType);
|
|
6084
6202
|
}
|
|
6085
6203
|
};
|
|
@@ -6087,8 +6205,7 @@ var RacesApi = class extends ApiBase {
|
|
|
6087
6205
|
// src/apis/misc/raids.ts
|
|
6088
6206
|
var RaidsApi = class extends ApiBase {
|
|
6089
6207
|
async get(ids) {
|
|
6090
|
-
if (ids)
|
|
6091
|
-
return await this.buildRequest(endpoints.raids.byId, { ids }, RaidsDTO);
|
|
6208
|
+
if (ids) return await this.buildRequest(endpoints.raids.byId, { ids }, RaidsDTO);
|
|
6092
6209
|
return await this.buildRequest(endpoints.raids.all, {}, stringArrayType);
|
|
6093
6210
|
}
|
|
6094
6211
|
};
|
|
@@ -6096,8 +6213,7 @@ var RaidsApi = class extends ApiBase {
|
|
|
6096
6213
|
// src/apis/misc/recipes.ts
|
|
6097
6214
|
var RecipesApi = class extends ApiBase {
|
|
6098
6215
|
async get(ids) {
|
|
6099
|
-
if (ids)
|
|
6100
|
-
return await this.buildRequest(endpoints.recipes.byId, { ids }, RecipesDTO);
|
|
6216
|
+
if (ids) return await this.buildRequest(endpoints.recipes.byId, { ids }, RecipesDTO);
|
|
6101
6217
|
return await this.buildRequest(endpoints.recipes.all, {}, numberArrayType);
|
|
6102
6218
|
}
|
|
6103
6219
|
/**
|
|
@@ -6118,8 +6234,7 @@ var RecipesApi = class extends ApiBase {
|
|
|
6118
6234
|
// src/apis/misc/skiffs.ts
|
|
6119
6235
|
var SkiffsApi = class extends ApiBase {
|
|
6120
6236
|
async get(ids) {
|
|
6121
|
-
if (ids)
|
|
6122
|
-
return await this.buildRequest(endpoints.skiffs.byId, { ids }, SkiffsDTO);
|
|
6237
|
+
if (ids) return await this.buildRequest(endpoints.skiffs.byId, { ids }, SkiffsDTO);
|
|
6123
6238
|
return await this.buildRequest(endpoints.skiffs.all, {}, numberArrayType);
|
|
6124
6239
|
}
|
|
6125
6240
|
};
|
|
@@ -6139,8 +6254,7 @@ var SkillsApi = class extends ApiBase {
|
|
|
6139
6254
|
// src/apis/misc/skins.ts
|
|
6140
6255
|
var SkinsApi = class extends ApiBase {
|
|
6141
6256
|
async get(ids) {
|
|
6142
|
-
if (ids)
|
|
6143
|
-
return await this.buildRequest(endpoints.skins.byId, { ids }, SkinsDTO);
|
|
6257
|
+
if (ids) return await this.buildRequest(endpoints.skins.byId, { ids }, SkinsDTO);
|
|
6144
6258
|
return await this.buildRequest(endpoints.skins.all, {}, numberArrayType);
|
|
6145
6259
|
}
|
|
6146
6260
|
};
|
|
@@ -6161,8 +6275,7 @@ var storiesCore = zod.z.array(zod.z.number());
|
|
|
6161
6275
|
var seasonsCore = zod.z.array(zod.z.string());
|
|
6162
6276
|
var StoriesApi = class extends ApiBase {
|
|
6163
6277
|
async getStories(ids) {
|
|
6164
|
-
if (ids)
|
|
6165
|
-
return await this.buildRequest(endpoints.stories.byId, { ids }, StoriesDTO);
|
|
6278
|
+
if (ids) return await this.buildRequest(endpoints.stories.byId, { ids }, StoriesDTO);
|
|
6166
6279
|
return await this.buildRequest(endpoints.stories.all, {}, storiesCore);
|
|
6167
6280
|
}
|
|
6168
6281
|
async getSeasons(ids) {
|
|
@@ -6219,8 +6332,7 @@ var SubtokenApi = class extends ApiBase {
|
|
|
6219
6332
|
// src/apis/misc/titles.ts
|
|
6220
6333
|
var TitlesApi = class extends ApiBase {
|
|
6221
6334
|
async get(ids) {
|
|
6222
|
-
if (ids)
|
|
6223
|
-
return await this.buildRequest(endpoints.titles.byId, { ids }, TitlesDTO);
|
|
6335
|
+
if (ids) return await this.buildRequest(endpoints.titles.byId, { ids }, TitlesDTO);
|
|
6224
6336
|
return await this.buildRequest(endpoints.titles.all, {}, numberArrayType);
|
|
6225
6337
|
}
|
|
6226
6338
|
};
|
|
@@ -6238,8 +6350,7 @@ var TokenInfoApi = class extends ApiBase {
|
|
|
6238
6350
|
// src/apis/misc/traits.ts
|
|
6239
6351
|
var TraitsApi = class extends ApiBase {
|
|
6240
6352
|
async get(ids) {
|
|
6241
|
-
if (ids)
|
|
6242
|
-
return await this.buildRequest(endpoints.traits.byId, { ids }, TraitsDTO);
|
|
6353
|
+
if (ids) return await this.buildRequest(endpoints.traits.byId, { ids }, TraitsDTO);
|
|
6243
6354
|
return await this.buildRequest(endpoints.traits.all, {}, numberArrayType);
|
|
6244
6355
|
}
|
|
6245
6356
|
};
|
|
@@ -6257,8 +6368,7 @@ var WorldBossesApi = class extends ApiBase {
|
|
|
6257
6368
|
// src/apis/misc/worlds.ts
|
|
6258
6369
|
var WorldsApi = class extends ApiBase {
|
|
6259
6370
|
async get(ids) {
|
|
6260
|
-
if (ids)
|
|
6261
|
-
return await this.buildRequest(endpoints.worlds.byId, { ids }, WorldsDTO);
|
|
6371
|
+
if (ids) return await this.buildRequest(endpoints.worlds.byId, { ids }, WorldsDTO);
|
|
6262
6372
|
return await this.buildRequest(endpoints.worlds.all, {}, numberArrayType);
|
|
6263
6373
|
}
|
|
6264
6374
|
};
|
|
@@ -6271,23 +6381,19 @@ var PvPApi = class extends ApiBase {
|
|
|
6271
6381
|
return await this.buildRequest(endpoints.pvp.amuletsAll, {}, numberArrayType);
|
|
6272
6382
|
}
|
|
6273
6383
|
async getGames(ids) {
|
|
6274
|
-
if (ids)
|
|
6275
|
-
return await this.buildRequest(endpoints.pvp.gamesById, { ids }, PvPGamesDTO);
|
|
6384
|
+
if (ids) return await this.buildRequest(endpoints.pvp.gamesById, { ids }, PvPGamesDTO);
|
|
6276
6385
|
return await this.buildRequest(endpoints.pvp.gamesAll, {}, stringArrayType);
|
|
6277
6386
|
}
|
|
6278
6387
|
async getHeroes(ids) {
|
|
6279
|
-
if (ids)
|
|
6280
|
-
return await this.buildRequest(endpoints.pvp.heroesById, { ids }, PvPHeroesDTO);
|
|
6388
|
+
if (ids) return await this.buildRequest(endpoints.pvp.heroesById, { ids }, PvPHeroesDTO);
|
|
6281
6389
|
return await this.buildRequest(endpoints.pvp.heroesAll, {}, stringArrayType);
|
|
6282
6390
|
}
|
|
6283
6391
|
async getRanks(ids) {
|
|
6284
|
-
if (ids)
|
|
6285
|
-
return await this.buildRequest(endpoints.pvp.ranksById, { ids }, PvPRanksDTO);
|
|
6392
|
+
if (ids) return await this.buildRequest(endpoints.pvp.ranksById, { ids }, PvPRanksDTO);
|
|
6286
6393
|
return await this.buildRequest(endpoints.pvp.ranksAll, {}, numberArrayType);
|
|
6287
6394
|
}
|
|
6288
6395
|
async getSeasons(ids) {
|
|
6289
|
-
if (ids)
|
|
6290
|
-
return await this.buildRequest(endpoints.pvp.seasonsById, { ids }, PvPSeasonDTO);
|
|
6396
|
+
if (ids) return await this.buildRequest(endpoints.pvp.seasonsById, { ids }, PvPSeasonDTO);
|
|
6291
6397
|
return await this.buildRequest(endpoints.pvp.seasonsAll, {}, stringArrayType);
|
|
6292
6398
|
}
|
|
6293
6399
|
async getLeaderboards(id, region, type) {
|
|
@@ -6413,8 +6519,7 @@ var WorldVsWorldApi = class extends ApiBase {
|
|
|
6413
6519
|
return await this.buildRequest(endpoints.wvw.objectives, {}, stringArrayType);
|
|
6414
6520
|
}
|
|
6415
6521
|
async getRanks(ids) {
|
|
6416
|
-
if (ids)
|
|
6417
|
-
return await this.buildRequest(endpoints.wvw.ranksById, { ids }, WvWRanksDTO);
|
|
6522
|
+
if (ids) return await this.buildRequest(endpoints.wvw.ranksById, { ids }, WvWRanksDTO);
|
|
6418
6523
|
return await this.buildRequest(endpoints.wvw.ranks, {}, numberArrayType);
|
|
6419
6524
|
}
|
|
6420
6525
|
async getUpgrades(ids) {
|
|
@@ -6462,6 +6567,8 @@ var GW2Api = class extends ApiBase {
|
|
|
6462
6567
|
guild = new GuildApi(this.getParams());
|
|
6463
6568
|
/** /v2/home Api */
|
|
6464
6569
|
home = new HomeApi(this.getParams());
|
|
6570
|
+
/** /v2/homestead Api */
|
|
6571
|
+
homestead = new HomesteadApi(this.getParams());
|
|
6465
6572
|
/** /v2/items Api */
|
|
6466
6573
|
items = new ItemsApi(this.getParams());
|
|
6467
6574
|
/** /v2/itemstats Api */
|