@blizzard-api/wow 0.0.3 → 0.0.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/README.md +57 -0
- package/dist/index.cjs +178 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +268 -2
- package/dist/index.d.ts +268 -2
- package/dist/index.js +178 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# @blizzard-api/wow
|
|
2
|
+
|
|
3
|
+
This package aims to make it easier for you to integrate with the Blizzard Battle.net API, specifically for World of Warcraft.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm i @blizzard-api/core @blizzard-api/wow
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
You can get paths, namespaces, parameters and more for a specific endpoint by calling it from the `wow` export.
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { wow } from "@blizzard-api/wow"
|
|
17
|
+
|
|
18
|
+
const achievement = wow.achievement(123);
|
|
19
|
+
^ { path: string, namespace: string }
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
If you need the response types, they are also exported with "Response" appended, so to get the response type from the above code, you can import it like this:
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import type { AchievementResponse } from '@blizzard-api/wow';
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
If you simply want to use the existing object, you can use the helper from `@blizzard-api/core` like so:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { wow } from "@blizzard-api/wow"
|
|
32
|
+
|
|
33
|
+
const achievement = wow.achievement(123);
|
|
34
|
+
^ { path: string, namespace: string }
|
|
35
|
+
type AchievementResponse = ExtractResourceType<typeof achievement>;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Client
|
|
39
|
+
|
|
40
|
+
While this package is made to function on it's own, it performs even better when combined with `@blizzard-api/client` where you can easily request data combining the two libraries.
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import { BlizzardApiClient } from '@blizzard-api/client';
|
|
44
|
+
import { wow } from '@blizzard-api/wow';
|
|
45
|
+
|
|
46
|
+
const client = new BlizzardApiClient({
|
|
47
|
+
key: 'environment.blizzardClientId',
|
|
48
|
+
secret: 'environment.blizzardClientSecret',
|
|
49
|
+
origin: 'eu',
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
//Response will automatically be typed with the appropriate values
|
|
53
|
+
const response = await client.sendRequest(wow.commodities());
|
|
54
|
+
|
|
55
|
+
console.log(response.data);
|
|
56
|
+
^ typeof AuctionHouseCommoditiesResponse
|
|
57
|
+
```
|
package/dist/index.cjs
CHANGED
|
@@ -28,10 +28,10 @@ module.exports = __toCommonJS(src_exports);
|
|
|
28
28
|
var base = "/data/wow";
|
|
29
29
|
var mediaBase = `${base}/media`;
|
|
30
30
|
|
|
31
|
-
// src/achievements/
|
|
31
|
+
// src/achievements/achievements.ts
|
|
32
32
|
var achievementBase = `${base}/achievement`;
|
|
33
33
|
var achievementCategoryBase = `${base}/achievement-category`;
|
|
34
|
-
var
|
|
34
|
+
var achievementApi = {
|
|
35
35
|
achievementCategory: (achievementCategoryId) => {
|
|
36
36
|
return {
|
|
37
37
|
path: `${achievementCategoryBase}/${achievementCategoryId}`,
|
|
@@ -56,14 +56,188 @@ var achievements = {
|
|
|
56
56
|
namespace: "static"
|
|
57
57
|
};
|
|
58
58
|
},
|
|
59
|
-
|
|
59
|
+
achievementMedia: (achievementId) => {
|
|
60
60
|
return { path: `${mediaBase}/achievement/${achievementId}`, namespace: "static" };
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
+
// src/auction-house/auction-house.ts
|
|
65
|
+
var auctionHouseApi = {
|
|
66
|
+
auctions: (connectedRealmId) => {
|
|
67
|
+
return {
|
|
68
|
+
path: `${base}/connected-realm/${connectedRealmId}/auctions`,
|
|
69
|
+
namespace: "dynamic"
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
commodities: () => {
|
|
73
|
+
return {
|
|
74
|
+
path: `${base}/auctions/commodities`,
|
|
75
|
+
namespace: "dynamic"
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// src/azerite-essence/azerite-essence.ts
|
|
81
|
+
var azeriteEssenceApi = {
|
|
82
|
+
azeriteEssence: (azeriteEssenceId) => {
|
|
83
|
+
return {
|
|
84
|
+
path: `${base}/azerite-essence/${azeriteEssenceId}`,
|
|
85
|
+
namespace: "static"
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
azeriteEssenceIndex: () => {
|
|
89
|
+
return {
|
|
90
|
+
path: `${base}/azerite-essence/index`,
|
|
91
|
+
namespace: "static"
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
azeriteEssenceMedia: (azeriteEssenceId) => {
|
|
95
|
+
return { path: `${mediaBase}/azerite-essence/${azeriteEssenceId}`, namespace: "static" };
|
|
96
|
+
}
|
|
97
|
+
// TODO Improve search endpoints
|
|
98
|
+
/**
|
|
99
|
+
* azeriteEssenceSearch: (): Resource<void> => {
|
|
100
|
+
* return {
|
|
101
|
+
* path: `${base}/search/connected-realm`,
|
|
102
|
+
* namespace: 'dynamic',
|
|
103
|
+
* };
|
|
104
|
+
* },
|
|
105
|
+
*/
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// src/connected-realm/connected-realm.ts
|
|
109
|
+
var connectedRealmApi = {
|
|
110
|
+
connectedRealmIndex: () => {
|
|
111
|
+
return {
|
|
112
|
+
path: `${base}/connected-realm/index`,
|
|
113
|
+
namespace: "dynamic"
|
|
114
|
+
};
|
|
115
|
+
},
|
|
116
|
+
connectedRealm: (connectedRealmId) => {
|
|
117
|
+
return {
|
|
118
|
+
path: `${base}/connected-realm/${connectedRealmId}`,
|
|
119
|
+
namespace: "dynamic"
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
// TODO Improve search endpoints
|
|
123
|
+
/**
|
|
124
|
+
* connectedRealmSearch: (): Resource<void> => {
|
|
125
|
+
* return {
|
|
126
|
+
* path: `${base}/search/connected-realm`,
|
|
127
|
+
* namespace: 'dynamic',
|
|
128
|
+
* };
|
|
129
|
+
* },
|
|
130
|
+
*/
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// src/covenant/covenant.ts
|
|
134
|
+
var covenantApi = {
|
|
135
|
+
conduit: (conduitId) => {
|
|
136
|
+
return {
|
|
137
|
+
path: `${base}/covenant/conduit/${conduitId}`,
|
|
138
|
+
namespace: "static"
|
|
139
|
+
};
|
|
140
|
+
},
|
|
141
|
+
conduitIndex: () => {
|
|
142
|
+
return {
|
|
143
|
+
path: `${base}/covenant/conduit/index`,
|
|
144
|
+
namespace: "static"
|
|
145
|
+
};
|
|
146
|
+
},
|
|
147
|
+
covenant: (covenantId) => {
|
|
148
|
+
return {
|
|
149
|
+
path: `${base}/covenant/${covenantId}`,
|
|
150
|
+
namespace: "static"
|
|
151
|
+
};
|
|
152
|
+
},
|
|
153
|
+
covenantIndex: () => {
|
|
154
|
+
return {
|
|
155
|
+
path: `${base}/covenant/index`,
|
|
156
|
+
namespace: "static"
|
|
157
|
+
};
|
|
158
|
+
},
|
|
159
|
+
covenantMedia: (covenantId) => {
|
|
160
|
+
return {
|
|
161
|
+
path: `${mediaBase}/covenant/${covenantId}`,
|
|
162
|
+
namespace: "static"
|
|
163
|
+
};
|
|
164
|
+
},
|
|
165
|
+
soulbind: (soulbindId) => {
|
|
166
|
+
return {
|
|
167
|
+
path: `${base}/covenant/soulbind/${soulbindId}`,
|
|
168
|
+
namespace: "static"
|
|
169
|
+
};
|
|
170
|
+
},
|
|
171
|
+
soulbindIndex: () => {
|
|
172
|
+
return {
|
|
173
|
+
path: `${base}/covenant/soulbind/index`,
|
|
174
|
+
namespace: "static"
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// src/creature/creature.ts
|
|
180
|
+
var creatureApi = {
|
|
181
|
+
creature: (creatureId) => {
|
|
182
|
+
return {
|
|
183
|
+
path: `${base}/creature/${creatureId}`,
|
|
184
|
+
namespace: "static"
|
|
185
|
+
};
|
|
186
|
+
},
|
|
187
|
+
creatureDisplayMedia: (creatureDisplayId) => {
|
|
188
|
+
return {
|
|
189
|
+
path: `${mediaBase}/creature-display/${creatureDisplayId}`,
|
|
190
|
+
namespace: "static"
|
|
191
|
+
};
|
|
192
|
+
},
|
|
193
|
+
creatureFamily: (creatureFamilyId) => {
|
|
194
|
+
return {
|
|
195
|
+
path: `${base}/creature-family/${creatureFamilyId}`,
|
|
196
|
+
namespace: "static"
|
|
197
|
+
};
|
|
198
|
+
},
|
|
199
|
+
creatureFamilyIndex: () => {
|
|
200
|
+
return {
|
|
201
|
+
path: `${base}/creature-family/index`,
|
|
202
|
+
namespace: "static"
|
|
203
|
+
};
|
|
204
|
+
},
|
|
205
|
+
creatureFamilyMedia: (creatureFamilyId) => {
|
|
206
|
+
return {
|
|
207
|
+
path: `${mediaBase}/creature-family/${creatureFamilyId}`,
|
|
208
|
+
namespace: "static"
|
|
209
|
+
};
|
|
210
|
+
},
|
|
211
|
+
creatureType: (creatureTypeId) => {
|
|
212
|
+
return {
|
|
213
|
+
path: `${base}/creature-type/${creatureTypeId}`,
|
|
214
|
+
namespace: "static"
|
|
215
|
+
};
|
|
216
|
+
},
|
|
217
|
+
creatureTypeIndex: () => {
|
|
218
|
+
return {
|
|
219
|
+
path: `${base}/creature-type/index`,
|
|
220
|
+
namespace: "static"
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
//TODO Improve search
|
|
224
|
+
/*
|
|
225
|
+
creatureSearch: () => {
|
|
226
|
+
return {
|
|
227
|
+
path: `${base}/creature/search`,
|
|
228
|
+
namespace: 'static',
|
|
229
|
+
};
|
|
230
|
+
},*/
|
|
231
|
+
};
|
|
232
|
+
|
|
64
233
|
// src/index.ts
|
|
65
234
|
var wow = {
|
|
66
|
-
...
|
|
235
|
+
...achievementApi,
|
|
236
|
+
...auctionHouseApi,
|
|
237
|
+
...azeriteEssenceApi,
|
|
238
|
+
...connectedRealmApi,
|
|
239
|
+
...covenantApi,
|
|
240
|
+
...creatureApi
|
|
67
241
|
};
|
|
68
242
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
243
|
0 && (module.exports = {
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/base.ts","../src/achievements/index.ts"],"sourcesContent":["import { achievements } from './achievements';\r\n\r\nexport const wow = {\r\n ...achievements,\r\n};\r\n","export const base = '/data/wow' as const;\r\n\r\nexport const mediaBase = `${base}/media` as const;\r\n","import type { Resource } from '@blizzard-api/core';\r\nimport { base, mediaBase } from '../base';\r\nimport type { AchievementCategoryResponse } from './response';\r\n\r\nconst achievementBase = `${base}/achievement`;\r\nconst achievementCategoryBase = `${base}/achievement-category`;\r\n\r\nexport const achievements = {\r\n achievementCategory: (achievementCategoryId: number): Resource<AchievementCategoryResponse> => {\r\n return {\r\n path: `${achievementCategoryBase}/${achievementCategoryId}`,\r\n namespace: 'static',\r\n };\r\n },\r\n achievementCategoryIndex: (): Resource<void> => {\r\n return {\r\n path: `${achievementCategoryBase}/index`,\r\n namespace: 'static',\r\n };\r\n },\r\n achievement: (achievementId: number): Resource<void> => {\r\n return {\r\n path: `${achievementBase}/${achievementId}`,\r\n namespace: 'static',\r\n };\r\n },\r\n achievementIndex: (): Resource<void> => {\r\n return {\r\n path: `${achievementBase}/index`,\r\n namespace: 'static',\r\n };\r\n },\r\n media: (achievementId: number): Resource<void> => {\r\n return { path: `${mediaBase}/achievement/${achievementId}`, namespace: 'static' };\r\n },\r\n};\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,OAAO;AAEb,IAAM,YAAY,GAAG,IAAI;;;ACEhC,IAAM,kBAAkB,GAAG,IAAI;AAC/B,IAAM,0BAA0B,GAAG,IAAI;AAEhC,IAAM,eAAe;AAAA,EAC1B,qBAAqB,CAAC,0BAAyE;AAC7F,WAAO;AAAA,MACL,MAAM,GAAG,uBAAuB,IAAI,qBAAqB;AAAA,MACzD,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,0BAA0B,MAAsB;AAC9C,WAAO;AAAA,MACL,MAAM,GAAG,uBAAuB;AAAA,MAChC,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,aAAa,CAAC,kBAA0C;AACtD,WAAO;AAAA,MACL,MAAM,GAAG,eAAe,IAAI,aAAa;AAAA,MACzC,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,kBAAkB,MAAsB;AACtC,WAAO;AAAA,MACL,MAAM,GAAG,eAAe;AAAA,MACxB,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,OAAO,CAAC,kBAA0C;AAChD,WAAO,EAAE,MAAM,GAAG,SAAS,gBAAgB,aAAa,IAAI,WAAW,SAAS;AAAA,EAClF;AACF;;;AFjCO,IAAM,MAAM;AAAA,EACjB,GAAG;AACL;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/base.ts","../src/achievements/achievements.ts","../src/auction-house/auction-house.ts","../src/azerite-essence/azerite-essence.ts","../src/connected-realm/connected-realm.ts","../src/covenant/covenant.ts","../src/creature/creature.ts"],"sourcesContent":["import { achievementApi } from './achievements/achievements';\r\nimport { auctionHouseApi } from './auction-house/auction-house';\r\nimport { azeriteEssenceApi } from './azerite-essence/azerite-essence';\r\nimport { connectedRealmApi } from './connected-realm/connected-realm';\r\nimport { covenantApi } from './covenant/covenant';\r\nimport { creatureApi } from './creature/creature';\r\n\r\nexport const wow = {\r\n ...achievementApi,\r\n ...auctionHouseApi,\r\n ...azeriteEssenceApi,\r\n ...connectedRealmApi,\r\n ...covenantApi,\r\n ...creatureApi,\r\n};\r\n\r\n//Achievements\r\nexport * from './achievements/types.js';\r\n//Auction House\r\nexport * from './auction-house/types.js';\r\n//Connected Realm\r\nexport * from './connected-realm/types.js';\r\n","export const base = '/data/wow' as const;\r\n\r\nexport const mediaBase = `${base}/media` as const;\r\n\r\nexport interface ResponseBase {\r\n _links: {\r\n self: {\r\n href: string;\r\n };\r\n };\r\n}\r\n\r\nexport interface KeyBase {\r\n key: {\r\n href: string;\r\n };\r\n}\r\n","import type { Resource } from '@blizzard-api/core';\r\nimport { base, mediaBase } from '../base';\r\nimport type {\r\n AchievementCategoryIndexResponse,\r\n AchievementCategoryResponse,\r\n AchievementIndexResponse,\r\n AchievementMediaResponse,\r\n AchievementResponse,\r\n} from './types';\r\n\r\nconst achievementBase = `${base}/achievement`;\r\nconst achievementCategoryBase = `${base}/achievement-category`;\r\n\r\nexport const achievementApi = {\r\n achievementCategory: (achievementCategoryId: number): Resource<AchievementCategoryResponse> => {\r\n return {\r\n path: `${achievementCategoryBase}/${achievementCategoryId}`,\r\n namespace: 'static',\r\n };\r\n },\r\n achievementCategoryIndex: (): Resource<AchievementCategoryIndexResponse> => {\r\n return {\r\n path: `${achievementCategoryBase}/index`,\r\n namespace: 'static',\r\n };\r\n },\r\n achievement: (achievementId: number): Resource<AchievementResponse> => {\r\n return {\r\n path: `${achievementBase}/${achievementId}`,\r\n namespace: 'static',\r\n };\r\n },\r\n achievementIndex: (): Resource<AchievementIndexResponse> => {\r\n return {\r\n path: `${achievementBase}/index`,\r\n namespace: 'static',\r\n };\r\n },\r\n achievementMedia: (achievementId: number): Resource<AchievementMediaResponse> => {\r\n return { path: `${mediaBase}/achievement/${achievementId}`, namespace: 'static' };\r\n },\r\n};\r\n","import type { Resource } from '@blizzard-api/core';\nimport { base } from '../base';\nimport type { AuctionHouseCommoditiesResponse, AuctionHouseResponse } from './types';\n\nexport const auctionHouseApi = {\n auctions: (connectedRealmId: number): Resource<AuctionHouseResponse> => {\n return {\n path: `${base}/connected-realm/${connectedRealmId}/auctions`,\n namespace: 'dynamic',\n };\n },\n commodities: (): Resource<AuctionHouseCommoditiesResponse> => {\n return {\n path: `${base}/auctions/commodities`,\n namespace: 'dynamic',\n };\n },\n};\n","import type { Resource } from '@blizzard-api/core';\nimport { base, mediaBase } from '../base';\n\nexport const azeriteEssenceApi = {\n azeriteEssence: (azeriteEssenceId: number): Resource<void> => {\n return {\n path: `${base}/azerite-essence/${azeriteEssenceId}`,\n namespace: 'static',\n };\n },\n azeriteEssenceIndex: (): Resource<void> => {\n return {\n path: `${base}/azerite-essence/index`,\n namespace: 'static',\n };\n },\n azeriteEssenceMedia: (azeriteEssenceId: number): Resource<void> => {\n return { path: `${mediaBase}/azerite-essence/${azeriteEssenceId}`, namespace: 'static' };\n },\n // TODO Improve search endpoints\n /**\n * azeriteEssenceSearch: (): Resource<void> => {\n * return {\n * path: `${base}/search/connected-realm`,\n * namespace: 'dynamic',\n * };\n * },\n */\n};\n","import type { Resource } from '@blizzard-api/core';\nimport { base } from '../base';\nimport type { ConnectedRealmIndexResponse, ConnectedRealmResponse } from './types';\n\nexport const connectedRealmApi = {\n connectedRealmIndex: (): Resource<ConnectedRealmIndexResponse> => {\n return {\n path: `${base}/connected-realm/index`,\n namespace: 'dynamic',\n };\n },\n connectedRealm: (connectedRealmId: number): Resource<ConnectedRealmResponse> => {\n return {\n path: `${base}/connected-realm/${connectedRealmId}`,\n namespace: 'dynamic',\n };\n },\n // TODO Improve search endpoints\n /**\n * connectedRealmSearch: (): Resource<void> => {\n * return {\n * path: `${base}/search/connected-realm`,\n * namespace: 'dynamic',\n * };\n * },\n */\n};\n","import type { Resource } from '@blizzard-api/core';\nimport { base, mediaBase } from '../base';\n\nexport const covenantApi = {\n conduit: (conduitId: number): Resource<void> => {\n return {\n path: `${base}/covenant/conduit/${conduitId}`,\n namespace: 'static',\n };\n },\n conduitIndex: (): Resource<void> => {\n return {\n path: `${base}/covenant/conduit/index`,\n namespace: 'static',\n };\n },\n covenant: (covenantId: number): Resource<void> => {\n return {\n path: `${base}/covenant/${covenantId}`,\n namespace: 'static',\n };\n },\n covenantIndex: (): Resource<void> => {\n return {\n path: `${base}/covenant/index`,\n namespace: 'static',\n };\n },\n covenantMedia: (covenantId: number): Resource<void> => {\n return {\n path: `${mediaBase}/covenant/${covenantId}`,\n namespace: 'static',\n };\n },\n soulbind: (soulbindId: number): Resource<void> => {\n return {\n path: `${base}/covenant/soulbind/${soulbindId}`,\n namespace: 'static',\n };\n },\n soulbindIndex: (): Resource<void> => {\n return {\n path: `${base}/covenant/soulbind/index`,\n namespace: 'static',\n };\n },\n};\n","import type { Resource } from '@blizzard-api/core';\nimport { base, mediaBase } from '../base';\n\nexport const creatureApi = {\n creature: (creatureId: number): Resource<void> => {\n return {\n path: `${base}/creature/${creatureId}`,\n namespace: 'static',\n };\n },\n creatureDisplayMedia: (creatureDisplayId: number): Resource<void> => {\n return {\n path: `${mediaBase}/creature-display/${creatureDisplayId}`,\n namespace: 'static',\n };\n },\n creatureFamily: (creatureFamilyId: number): Resource<void> => {\n return {\n path: `${base}/creature-family/${creatureFamilyId}`,\n namespace: 'static',\n };\n },\n creatureFamilyIndex: (): Resource<void> => {\n return {\n path: `${base}/creature-family/index`,\n namespace: 'static',\n };\n },\n creatureFamilyMedia: (creatureFamilyId: number): Resource<void> => {\n return {\n path: `${mediaBase}/creature-family/${creatureFamilyId}`,\n namespace: 'static',\n };\n },\n creatureType: (creatureTypeId: number): Resource<void> => {\n return {\n path: `${base}/creature-type/${creatureTypeId}`,\n namespace: 'static',\n };\n },\n creatureTypeIndex: (): Resource<void> => {\n return {\n path: `${base}/creature-type/index`,\n namespace: 'static',\n };\n },\n //TODO Improve search\n /*\n creatureSearch: () => {\n return {\n path: `${base}/creature/search`,\n namespace: 'static',\n };\n },*/\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,OAAO;AAEb,IAAM,YAAY,GAAG,IAAI;;;ACQ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'@blizzard-api/core';
|
|
2
2
|
|
|
3
|
+
interface ResponseBase {
|
|
4
|
+
_links: {
|
|
5
|
+
self: {
|
|
6
|
+
href: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
interface KeyBase {
|
|
11
|
+
key: {
|
|
12
|
+
href: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface AchievementItem extends KeyBase {
|
|
17
|
+
name: string;
|
|
18
|
+
id: number;
|
|
19
|
+
}
|
|
20
|
+
interface AchievementCategoryResponse extends ResponseBase {
|
|
21
|
+
id: number;
|
|
22
|
+
name: string;
|
|
23
|
+
achievements: Array<AchievementItem>;
|
|
24
|
+
parent_category: AchievementItem;
|
|
25
|
+
isGuildCategory: boolean;
|
|
26
|
+
aggregates_by_faction: {
|
|
27
|
+
alliance: {
|
|
28
|
+
quantity: number;
|
|
29
|
+
points: number;
|
|
30
|
+
};
|
|
31
|
+
horde: {
|
|
32
|
+
quantity: number;
|
|
33
|
+
points: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
display_order: number;
|
|
37
|
+
}
|
|
38
|
+
interface AchievementCategoryIndexResponse extends ResponseBase {
|
|
39
|
+
categories: Array<AchievementItem>;
|
|
40
|
+
root_categories: Array<AchievementItem>;
|
|
41
|
+
guild_categories: Array<AchievementItem>;
|
|
42
|
+
}
|
|
43
|
+
interface AchievementResponse extends ResponseBase {
|
|
44
|
+
id: number;
|
|
45
|
+
name: string;
|
|
46
|
+
category: AchievementItem;
|
|
47
|
+
description: string;
|
|
48
|
+
points: number;
|
|
49
|
+
is_account_wide: boolean;
|
|
50
|
+
criteria: {
|
|
51
|
+
id: number;
|
|
52
|
+
description: string;
|
|
53
|
+
amount: number;
|
|
54
|
+
};
|
|
55
|
+
media: KeyBase;
|
|
56
|
+
display_order: number;
|
|
57
|
+
}
|
|
58
|
+
interface AchievementIndexResponse extends ResponseBase {
|
|
59
|
+
achievements: Array<AchievementItem>;
|
|
60
|
+
}
|
|
61
|
+
interface AchievementMediaItem {
|
|
62
|
+
key: string;
|
|
63
|
+
value: string;
|
|
64
|
+
file_data_id: number;
|
|
65
|
+
}
|
|
66
|
+
interface AchievementMediaResponse extends ResponseBase {
|
|
67
|
+
id: number;
|
|
68
|
+
assets: Array<AchievementMediaItem>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
type AuctionHouseTimeLeft = 'SHORT' | 'MEDIUM' | 'LONG' | 'VERY_LONG';
|
|
72
|
+
interface AuctionHousePosting {
|
|
73
|
+
id: number;
|
|
74
|
+
item: {
|
|
75
|
+
id: number;
|
|
76
|
+
context: number;
|
|
77
|
+
bonus_lists: Array<number>;
|
|
78
|
+
modifiers: Array<{
|
|
79
|
+
type: number;
|
|
80
|
+
value: number;
|
|
81
|
+
}>;
|
|
82
|
+
};
|
|
83
|
+
bid: number;
|
|
84
|
+
buyout: number;
|
|
85
|
+
quantity: number;
|
|
86
|
+
time_left: AuctionHouseTimeLeft;
|
|
87
|
+
}
|
|
88
|
+
interface AuctionHouseResponse extends ResponseBase {
|
|
89
|
+
connected_realm: {
|
|
90
|
+
href: string;
|
|
91
|
+
};
|
|
92
|
+
commodities: {
|
|
93
|
+
href: string;
|
|
94
|
+
};
|
|
95
|
+
auctions: Array<AuctionHousePosting>;
|
|
96
|
+
}
|
|
97
|
+
interface AuctionHouseCommodity {
|
|
98
|
+
id: number;
|
|
99
|
+
item: {
|
|
100
|
+
id: number;
|
|
101
|
+
};
|
|
102
|
+
quantity: number;
|
|
103
|
+
unit_price: number;
|
|
104
|
+
time_left: AuctionHouseTimeLeft;
|
|
105
|
+
}
|
|
106
|
+
interface AuctionHouseCommoditiesResponse extends ResponseBase {
|
|
107
|
+
auctions: Array<AuctionHouseCommodity>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface ConnectedRealmIndexResponse extends ResponseBase {
|
|
111
|
+
connected_realms: Array<{
|
|
112
|
+
href: string;
|
|
113
|
+
}>;
|
|
114
|
+
}
|
|
115
|
+
type RealmStatus = 'Up' | 'Down';
|
|
116
|
+
type RealmPopulation = 'Low' | 'Medium' | 'High' | 'Full';
|
|
117
|
+
type RealmType = 'Normal';
|
|
118
|
+
interface RealmRegion extends KeyBase {
|
|
119
|
+
name: string;
|
|
120
|
+
id: number;
|
|
121
|
+
}
|
|
122
|
+
interface Realm {
|
|
123
|
+
id: number;
|
|
124
|
+
region: RealmRegion;
|
|
125
|
+
connected_realm: {
|
|
126
|
+
href: string;
|
|
127
|
+
};
|
|
128
|
+
name: string;
|
|
129
|
+
category: string;
|
|
130
|
+
locale: string;
|
|
131
|
+
timezone: string;
|
|
132
|
+
type: {
|
|
133
|
+
type: Uppercase<RealmType>;
|
|
134
|
+
name: RealmType;
|
|
135
|
+
};
|
|
136
|
+
is_tournament: boolean;
|
|
137
|
+
slug: string;
|
|
138
|
+
}
|
|
139
|
+
interface ConnectedRealmResponse extends ResponseBase {
|
|
140
|
+
id: number;
|
|
141
|
+
has_queue: boolean;
|
|
142
|
+
status: {
|
|
143
|
+
type: Uppercase<RealmStatus>;
|
|
144
|
+
name: RealmStatus;
|
|
145
|
+
};
|
|
146
|
+
population: {
|
|
147
|
+
type: Uppercase<RealmPopulation>;
|
|
148
|
+
name: RealmPopulation;
|
|
149
|
+
};
|
|
150
|
+
realms: Array<Realm>;
|
|
151
|
+
mythic_leaderboards: {
|
|
152
|
+
href: string;
|
|
153
|
+
};
|
|
154
|
+
auctions: {
|
|
155
|
+
href: string;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
3
159
|
declare const wow: {
|
|
160
|
+
creature: (creatureId: number) => {
|
|
161
|
+
path: string;
|
|
162
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
163
|
+
parameters?: Record<string, string | number> | undefined;
|
|
164
|
+
};
|
|
165
|
+
creatureDisplayMedia: (creatureDisplayId: number) => {
|
|
166
|
+
path: string;
|
|
167
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
168
|
+
parameters?: Record<string, string | number> | undefined;
|
|
169
|
+
};
|
|
170
|
+
creatureFamily: (creatureFamilyId: number) => {
|
|
171
|
+
path: string;
|
|
172
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
173
|
+
parameters?: Record<string, string | number> | undefined;
|
|
174
|
+
};
|
|
175
|
+
creatureFamilyIndex: () => {
|
|
176
|
+
path: string;
|
|
177
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
178
|
+
parameters?: Record<string, string | number> | undefined;
|
|
179
|
+
};
|
|
180
|
+
creatureFamilyMedia: (creatureFamilyId: number) => {
|
|
181
|
+
path: string;
|
|
182
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
183
|
+
parameters?: Record<string, string | number> | undefined;
|
|
184
|
+
};
|
|
185
|
+
creatureType: (creatureTypeId: number) => {
|
|
186
|
+
path: string;
|
|
187
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
188
|
+
parameters?: Record<string, string | number> | undefined;
|
|
189
|
+
};
|
|
190
|
+
creatureTypeIndex: () => {
|
|
191
|
+
path: string;
|
|
192
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
193
|
+
parameters?: Record<string, string | number> | undefined;
|
|
194
|
+
};
|
|
195
|
+
conduit: (conduitId: number) => {
|
|
196
|
+
path: string;
|
|
197
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
198
|
+
parameters?: Record<string, string | number> | undefined;
|
|
199
|
+
};
|
|
200
|
+
conduitIndex: () => {
|
|
201
|
+
path: string;
|
|
202
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
203
|
+
parameters?: Record<string, string | number> | undefined;
|
|
204
|
+
};
|
|
205
|
+
covenant: (covenantId: number) => {
|
|
206
|
+
path: string;
|
|
207
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
208
|
+
parameters?: Record<string, string | number> | undefined;
|
|
209
|
+
};
|
|
210
|
+
covenantIndex: () => {
|
|
211
|
+
path: string;
|
|
212
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
213
|
+
parameters?: Record<string, string | number> | undefined;
|
|
214
|
+
};
|
|
215
|
+
covenantMedia: (covenantId: number) => {
|
|
216
|
+
path: string;
|
|
217
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
218
|
+
parameters?: Record<string, string | number> | undefined;
|
|
219
|
+
};
|
|
220
|
+
soulbind: (soulbindId: number) => {
|
|
221
|
+
path: string;
|
|
222
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
223
|
+
parameters?: Record<string, string | number> | undefined;
|
|
224
|
+
};
|
|
225
|
+
soulbindIndex: () => {
|
|
226
|
+
path: string;
|
|
227
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
228
|
+
parameters?: Record<string, string | number> | undefined;
|
|
229
|
+
};
|
|
230
|
+
connectedRealmIndex: () => {
|
|
231
|
+
path: string;
|
|
232
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
233
|
+
parameters?: Record<string, string | number> | undefined;
|
|
234
|
+
};
|
|
235
|
+
connectedRealm: (connectedRealmId: number) => {
|
|
236
|
+
path: string;
|
|
237
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
238
|
+
parameters?: Record<string, string | number> | undefined;
|
|
239
|
+
};
|
|
240
|
+
azeriteEssence: (azeriteEssenceId: number) => {
|
|
241
|
+
path: string;
|
|
242
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
243
|
+
parameters?: Record<string, string | number> | undefined;
|
|
244
|
+
};
|
|
245
|
+
azeriteEssenceIndex: () => {
|
|
246
|
+
path: string;
|
|
247
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
248
|
+
parameters?: Record<string, string | number> | undefined;
|
|
249
|
+
};
|
|
250
|
+
azeriteEssenceMedia: (azeriteEssenceId: number) => {
|
|
251
|
+
path: string;
|
|
252
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
253
|
+
parameters?: Record<string, string | number> | undefined;
|
|
254
|
+
};
|
|
255
|
+
auctions: (connectedRealmId: number) => {
|
|
256
|
+
path: string;
|
|
257
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
258
|
+
parameters?: Record<string, string | number> | undefined;
|
|
259
|
+
};
|
|
260
|
+
commodities: () => {
|
|
261
|
+
path: string;
|
|
262
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
263
|
+
parameters?: Record<string, string | number> | undefined;
|
|
264
|
+
};
|
|
4
265
|
achievementCategory: (achievementCategoryId: number) => {
|
|
5
266
|
path: string;
|
|
6
267
|
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
268
|
+
parameters?: Record<string, string | number> | undefined;
|
|
7
269
|
};
|
|
8
270
|
achievementCategoryIndex: () => {
|
|
9
271
|
path: string;
|
|
10
272
|
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
273
|
+
parameters?: Record<string, string | number> | undefined;
|
|
11
274
|
};
|
|
12
275
|
achievement: (achievementId: number) => {
|
|
13
276
|
path: string;
|
|
14
277
|
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
278
|
+
parameters?: Record<string, string | number> | undefined;
|
|
15
279
|
};
|
|
16
280
|
achievementIndex: () => {
|
|
17
281
|
path: string;
|
|
18
282
|
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
283
|
+
parameters?: Record<string, string | number> | undefined;
|
|
19
284
|
};
|
|
20
|
-
|
|
285
|
+
achievementMedia: (achievementId: number) => {
|
|
21
286
|
path: string;
|
|
22
287
|
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
288
|
+
parameters?: Record<string, string | number> | undefined;
|
|
23
289
|
};
|
|
24
290
|
};
|
|
25
291
|
|
|
26
|
-
export { wow };
|
|
292
|
+
export { type AchievementCategoryIndexResponse, type AchievementCategoryResponse, type AchievementIndexResponse, type AchievementMediaResponse, type AchievementResponse, type AuctionHouseCommoditiesResponse, type AuctionHouseResponse, type ConnectedRealmIndexResponse, type ConnectedRealmResponse, wow };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,292 @@
|
|
|
1
1
|
import * as _blizzard_api_core from '@blizzard-api/core';
|
|
2
2
|
|
|
3
|
+
interface ResponseBase {
|
|
4
|
+
_links: {
|
|
5
|
+
self: {
|
|
6
|
+
href: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
interface KeyBase {
|
|
11
|
+
key: {
|
|
12
|
+
href: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface AchievementItem extends KeyBase {
|
|
17
|
+
name: string;
|
|
18
|
+
id: number;
|
|
19
|
+
}
|
|
20
|
+
interface AchievementCategoryResponse extends ResponseBase {
|
|
21
|
+
id: number;
|
|
22
|
+
name: string;
|
|
23
|
+
achievements: Array<AchievementItem>;
|
|
24
|
+
parent_category: AchievementItem;
|
|
25
|
+
isGuildCategory: boolean;
|
|
26
|
+
aggregates_by_faction: {
|
|
27
|
+
alliance: {
|
|
28
|
+
quantity: number;
|
|
29
|
+
points: number;
|
|
30
|
+
};
|
|
31
|
+
horde: {
|
|
32
|
+
quantity: number;
|
|
33
|
+
points: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
display_order: number;
|
|
37
|
+
}
|
|
38
|
+
interface AchievementCategoryIndexResponse extends ResponseBase {
|
|
39
|
+
categories: Array<AchievementItem>;
|
|
40
|
+
root_categories: Array<AchievementItem>;
|
|
41
|
+
guild_categories: Array<AchievementItem>;
|
|
42
|
+
}
|
|
43
|
+
interface AchievementResponse extends ResponseBase {
|
|
44
|
+
id: number;
|
|
45
|
+
name: string;
|
|
46
|
+
category: AchievementItem;
|
|
47
|
+
description: string;
|
|
48
|
+
points: number;
|
|
49
|
+
is_account_wide: boolean;
|
|
50
|
+
criteria: {
|
|
51
|
+
id: number;
|
|
52
|
+
description: string;
|
|
53
|
+
amount: number;
|
|
54
|
+
};
|
|
55
|
+
media: KeyBase;
|
|
56
|
+
display_order: number;
|
|
57
|
+
}
|
|
58
|
+
interface AchievementIndexResponse extends ResponseBase {
|
|
59
|
+
achievements: Array<AchievementItem>;
|
|
60
|
+
}
|
|
61
|
+
interface AchievementMediaItem {
|
|
62
|
+
key: string;
|
|
63
|
+
value: string;
|
|
64
|
+
file_data_id: number;
|
|
65
|
+
}
|
|
66
|
+
interface AchievementMediaResponse extends ResponseBase {
|
|
67
|
+
id: number;
|
|
68
|
+
assets: Array<AchievementMediaItem>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
type AuctionHouseTimeLeft = 'SHORT' | 'MEDIUM' | 'LONG' | 'VERY_LONG';
|
|
72
|
+
interface AuctionHousePosting {
|
|
73
|
+
id: number;
|
|
74
|
+
item: {
|
|
75
|
+
id: number;
|
|
76
|
+
context: number;
|
|
77
|
+
bonus_lists: Array<number>;
|
|
78
|
+
modifiers: Array<{
|
|
79
|
+
type: number;
|
|
80
|
+
value: number;
|
|
81
|
+
}>;
|
|
82
|
+
};
|
|
83
|
+
bid: number;
|
|
84
|
+
buyout: number;
|
|
85
|
+
quantity: number;
|
|
86
|
+
time_left: AuctionHouseTimeLeft;
|
|
87
|
+
}
|
|
88
|
+
interface AuctionHouseResponse extends ResponseBase {
|
|
89
|
+
connected_realm: {
|
|
90
|
+
href: string;
|
|
91
|
+
};
|
|
92
|
+
commodities: {
|
|
93
|
+
href: string;
|
|
94
|
+
};
|
|
95
|
+
auctions: Array<AuctionHousePosting>;
|
|
96
|
+
}
|
|
97
|
+
interface AuctionHouseCommodity {
|
|
98
|
+
id: number;
|
|
99
|
+
item: {
|
|
100
|
+
id: number;
|
|
101
|
+
};
|
|
102
|
+
quantity: number;
|
|
103
|
+
unit_price: number;
|
|
104
|
+
time_left: AuctionHouseTimeLeft;
|
|
105
|
+
}
|
|
106
|
+
interface AuctionHouseCommoditiesResponse extends ResponseBase {
|
|
107
|
+
auctions: Array<AuctionHouseCommodity>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface ConnectedRealmIndexResponse extends ResponseBase {
|
|
111
|
+
connected_realms: Array<{
|
|
112
|
+
href: string;
|
|
113
|
+
}>;
|
|
114
|
+
}
|
|
115
|
+
type RealmStatus = 'Up' | 'Down';
|
|
116
|
+
type RealmPopulation = 'Low' | 'Medium' | 'High' | 'Full';
|
|
117
|
+
type RealmType = 'Normal';
|
|
118
|
+
interface RealmRegion extends KeyBase {
|
|
119
|
+
name: string;
|
|
120
|
+
id: number;
|
|
121
|
+
}
|
|
122
|
+
interface Realm {
|
|
123
|
+
id: number;
|
|
124
|
+
region: RealmRegion;
|
|
125
|
+
connected_realm: {
|
|
126
|
+
href: string;
|
|
127
|
+
};
|
|
128
|
+
name: string;
|
|
129
|
+
category: string;
|
|
130
|
+
locale: string;
|
|
131
|
+
timezone: string;
|
|
132
|
+
type: {
|
|
133
|
+
type: Uppercase<RealmType>;
|
|
134
|
+
name: RealmType;
|
|
135
|
+
};
|
|
136
|
+
is_tournament: boolean;
|
|
137
|
+
slug: string;
|
|
138
|
+
}
|
|
139
|
+
interface ConnectedRealmResponse extends ResponseBase {
|
|
140
|
+
id: number;
|
|
141
|
+
has_queue: boolean;
|
|
142
|
+
status: {
|
|
143
|
+
type: Uppercase<RealmStatus>;
|
|
144
|
+
name: RealmStatus;
|
|
145
|
+
};
|
|
146
|
+
population: {
|
|
147
|
+
type: Uppercase<RealmPopulation>;
|
|
148
|
+
name: RealmPopulation;
|
|
149
|
+
};
|
|
150
|
+
realms: Array<Realm>;
|
|
151
|
+
mythic_leaderboards: {
|
|
152
|
+
href: string;
|
|
153
|
+
};
|
|
154
|
+
auctions: {
|
|
155
|
+
href: string;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
3
159
|
declare const wow: {
|
|
160
|
+
creature: (creatureId: number) => {
|
|
161
|
+
path: string;
|
|
162
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
163
|
+
parameters?: Record<string, string | number> | undefined;
|
|
164
|
+
};
|
|
165
|
+
creatureDisplayMedia: (creatureDisplayId: number) => {
|
|
166
|
+
path: string;
|
|
167
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
168
|
+
parameters?: Record<string, string | number> | undefined;
|
|
169
|
+
};
|
|
170
|
+
creatureFamily: (creatureFamilyId: number) => {
|
|
171
|
+
path: string;
|
|
172
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
173
|
+
parameters?: Record<string, string | number> | undefined;
|
|
174
|
+
};
|
|
175
|
+
creatureFamilyIndex: () => {
|
|
176
|
+
path: string;
|
|
177
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
178
|
+
parameters?: Record<string, string | number> | undefined;
|
|
179
|
+
};
|
|
180
|
+
creatureFamilyMedia: (creatureFamilyId: number) => {
|
|
181
|
+
path: string;
|
|
182
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
183
|
+
parameters?: Record<string, string | number> | undefined;
|
|
184
|
+
};
|
|
185
|
+
creatureType: (creatureTypeId: number) => {
|
|
186
|
+
path: string;
|
|
187
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
188
|
+
parameters?: Record<string, string | number> | undefined;
|
|
189
|
+
};
|
|
190
|
+
creatureTypeIndex: () => {
|
|
191
|
+
path: string;
|
|
192
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
193
|
+
parameters?: Record<string, string | number> | undefined;
|
|
194
|
+
};
|
|
195
|
+
conduit: (conduitId: number) => {
|
|
196
|
+
path: string;
|
|
197
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
198
|
+
parameters?: Record<string, string | number> | undefined;
|
|
199
|
+
};
|
|
200
|
+
conduitIndex: () => {
|
|
201
|
+
path: string;
|
|
202
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
203
|
+
parameters?: Record<string, string | number> | undefined;
|
|
204
|
+
};
|
|
205
|
+
covenant: (covenantId: number) => {
|
|
206
|
+
path: string;
|
|
207
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
208
|
+
parameters?: Record<string, string | number> | undefined;
|
|
209
|
+
};
|
|
210
|
+
covenantIndex: () => {
|
|
211
|
+
path: string;
|
|
212
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
213
|
+
parameters?: Record<string, string | number> | undefined;
|
|
214
|
+
};
|
|
215
|
+
covenantMedia: (covenantId: number) => {
|
|
216
|
+
path: string;
|
|
217
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
218
|
+
parameters?: Record<string, string | number> | undefined;
|
|
219
|
+
};
|
|
220
|
+
soulbind: (soulbindId: number) => {
|
|
221
|
+
path: string;
|
|
222
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
223
|
+
parameters?: Record<string, string | number> | undefined;
|
|
224
|
+
};
|
|
225
|
+
soulbindIndex: () => {
|
|
226
|
+
path: string;
|
|
227
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
228
|
+
parameters?: Record<string, string | number> | undefined;
|
|
229
|
+
};
|
|
230
|
+
connectedRealmIndex: () => {
|
|
231
|
+
path: string;
|
|
232
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
233
|
+
parameters?: Record<string, string | number> | undefined;
|
|
234
|
+
};
|
|
235
|
+
connectedRealm: (connectedRealmId: number) => {
|
|
236
|
+
path: string;
|
|
237
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
238
|
+
parameters?: Record<string, string | number> | undefined;
|
|
239
|
+
};
|
|
240
|
+
azeriteEssence: (azeriteEssenceId: number) => {
|
|
241
|
+
path: string;
|
|
242
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
243
|
+
parameters?: Record<string, string | number> | undefined;
|
|
244
|
+
};
|
|
245
|
+
azeriteEssenceIndex: () => {
|
|
246
|
+
path: string;
|
|
247
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
248
|
+
parameters?: Record<string, string | number> | undefined;
|
|
249
|
+
};
|
|
250
|
+
azeriteEssenceMedia: (azeriteEssenceId: number) => {
|
|
251
|
+
path: string;
|
|
252
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
253
|
+
parameters?: Record<string, string | number> | undefined;
|
|
254
|
+
};
|
|
255
|
+
auctions: (connectedRealmId: number) => {
|
|
256
|
+
path: string;
|
|
257
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
258
|
+
parameters?: Record<string, string | number> | undefined;
|
|
259
|
+
};
|
|
260
|
+
commodities: () => {
|
|
261
|
+
path: string;
|
|
262
|
+
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
263
|
+
parameters?: Record<string, string | number> | undefined;
|
|
264
|
+
};
|
|
4
265
|
achievementCategory: (achievementCategoryId: number) => {
|
|
5
266
|
path: string;
|
|
6
267
|
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
268
|
+
parameters?: Record<string, string | number> | undefined;
|
|
7
269
|
};
|
|
8
270
|
achievementCategoryIndex: () => {
|
|
9
271
|
path: string;
|
|
10
272
|
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
273
|
+
parameters?: Record<string, string | number> | undefined;
|
|
11
274
|
};
|
|
12
275
|
achievement: (achievementId: number) => {
|
|
13
276
|
path: string;
|
|
14
277
|
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
278
|
+
parameters?: Record<string, string | number> | undefined;
|
|
15
279
|
};
|
|
16
280
|
achievementIndex: () => {
|
|
17
281
|
path: string;
|
|
18
282
|
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
283
|
+
parameters?: Record<string, string | number> | undefined;
|
|
19
284
|
};
|
|
20
|
-
|
|
285
|
+
achievementMedia: (achievementId: number) => {
|
|
21
286
|
path: string;
|
|
22
287
|
namespace?: _blizzard_api_core.BlizzardNamespaces | undefined;
|
|
288
|
+
parameters?: Record<string, string | number> | undefined;
|
|
23
289
|
};
|
|
24
290
|
};
|
|
25
291
|
|
|
26
|
-
export { wow };
|
|
292
|
+
export { type AchievementCategoryIndexResponse, type AchievementCategoryResponse, type AchievementIndexResponse, type AchievementMediaResponse, type AchievementResponse, type AuctionHouseCommoditiesResponse, type AuctionHouseResponse, type ConnectedRealmIndexResponse, type ConnectedRealmResponse, wow };
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
var base = "/data/wow";
|
|
3
3
|
var mediaBase = `${base}/media`;
|
|
4
4
|
|
|
5
|
-
// src/achievements/
|
|
5
|
+
// src/achievements/achievements.ts
|
|
6
6
|
var achievementBase = `${base}/achievement`;
|
|
7
7
|
var achievementCategoryBase = `${base}/achievement-category`;
|
|
8
|
-
var
|
|
8
|
+
var achievementApi = {
|
|
9
9
|
achievementCategory: (achievementCategoryId) => {
|
|
10
10
|
return {
|
|
11
11
|
path: `${achievementCategoryBase}/${achievementCategoryId}`,
|
|
@@ -30,14 +30,188 @@ var achievements = {
|
|
|
30
30
|
namespace: "static"
|
|
31
31
|
};
|
|
32
32
|
},
|
|
33
|
-
|
|
33
|
+
achievementMedia: (achievementId) => {
|
|
34
34
|
return { path: `${mediaBase}/achievement/${achievementId}`, namespace: "static" };
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
+
// src/auction-house/auction-house.ts
|
|
39
|
+
var auctionHouseApi = {
|
|
40
|
+
auctions: (connectedRealmId) => {
|
|
41
|
+
return {
|
|
42
|
+
path: `${base}/connected-realm/${connectedRealmId}/auctions`,
|
|
43
|
+
namespace: "dynamic"
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
commodities: () => {
|
|
47
|
+
return {
|
|
48
|
+
path: `${base}/auctions/commodities`,
|
|
49
|
+
namespace: "dynamic"
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// src/azerite-essence/azerite-essence.ts
|
|
55
|
+
var azeriteEssenceApi = {
|
|
56
|
+
azeriteEssence: (azeriteEssenceId) => {
|
|
57
|
+
return {
|
|
58
|
+
path: `${base}/azerite-essence/${azeriteEssenceId}`,
|
|
59
|
+
namespace: "static"
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
azeriteEssenceIndex: () => {
|
|
63
|
+
return {
|
|
64
|
+
path: `${base}/azerite-essence/index`,
|
|
65
|
+
namespace: "static"
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
azeriteEssenceMedia: (azeriteEssenceId) => {
|
|
69
|
+
return { path: `${mediaBase}/azerite-essence/${azeriteEssenceId}`, namespace: "static" };
|
|
70
|
+
}
|
|
71
|
+
// TODO Improve search endpoints
|
|
72
|
+
/**
|
|
73
|
+
* azeriteEssenceSearch: (): Resource<void> => {
|
|
74
|
+
* return {
|
|
75
|
+
* path: `${base}/search/connected-realm`,
|
|
76
|
+
* namespace: 'dynamic',
|
|
77
|
+
* };
|
|
78
|
+
* },
|
|
79
|
+
*/
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// src/connected-realm/connected-realm.ts
|
|
83
|
+
var connectedRealmApi = {
|
|
84
|
+
connectedRealmIndex: () => {
|
|
85
|
+
return {
|
|
86
|
+
path: `${base}/connected-realm/index`,
|
|
87
|
+
namespace: "dynamic"
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
connectedRealm: (connectedRealmId) => {
|
|
91
|
+
return {
|
|
92
|
+
path: `${base}/connected-realm/${connectedRealmId}`,
|
|
93
|
+
namespace: "dynamic"
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
// TODO Improve search endpoints
|
|
97
|
+
/**
|
|
98
|
+
* connectedRealmSearch: (): Resource<void> => {
|
|
99
|
+
* return {
|
|
100
|
+
* path: `${base}/search/connected-realm`,
|
|
101
|
+
* namespace: 'dynamic',
|
|
102
|
+
* };
|
|
103
|
+
* },
|
|
104
|
+
*/
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
// src/covenant/covenant.ts
|
|
108
|
+
var covenantApi = {
|
|
109
|
+
conduit: (conduitId) => {
|
|
110
|
+
return {
|
|
111
|
+
path: `${base}/covenant/conduit/${conduitId}`,
|
|
112
|
+
namespace: "static"
|
|
113
|
+
};
|
|
114
|
+
},
|
|
115
|
+
conduitIndex: () => {
|
|
116
|
+
return {
|
|
117
|
+
path: `${base}/covenant/conduit/index`,
|
|
118
|
+
namespace: "static"
|
|
119
|
+
};
|
|
120
|
+
},
|
|
121
|
+
covenant: (covenantId) => {
|
|
122
|
+
return {
|
|
123
|
+
path: `${base}/covenant/${covenantId}`,
|
|
124
|
+
namespace: "static"
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
covenantIndex: () => {
|
|
128
|
+
return {
|
|
129
|
+
path: `${base}/covenant/index`,
|
|
130
|
+
namespace: "static"
|
|
131
|
+
};
|
|
132
|
+
},
|
|
133
|
+
covenantMedia: (covenantId) => {
|
|
134
|
+
return {
|
|
135
|
+
path: `${mediaBase}/covenant/${covenantId}`,
|
|
136
|
+
namespace: "static"
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
soulbind: (soulbindId) => {
|
|
140
|
+
return {
|
|
141
|
+
path: `${base}/covenant/soulbind/${soulbindId}`,
|
|
142
|
+
namespace: "static"
|
|
143
|
+
};
|
|
144
|
+
},
|
|
145
|
+
soulbindIndex: () => {
|
|
146
|
+
return {
|
|
147
|
+
path: `${base}/covenant/soulbind/index`,
|
|
148
|
+
namespace: "static"
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
// src/creature/creature.ts
|
|
154
|
+
var creatureApi = {
|
|
155
|
+
creature: (creatureId) => {
|
|
156
|
+
return {
|
|
157
|
+
path: `${base}/creature/${creatureId}`,
|
|
158
|
+
namespace: "static"
|
|
159
|
+
};
|
|
160
|
+
},
|
|
161
|
+
creatureDisplayMedia: (creatureDisplayId) => {
|
|
162
|
+
return {
|
|
163
|
+
path: `${mediaBase}/creature-display/${creatureDisplayId}`,
|
|
164
|
+
namespace: "static"
|
|
165
|
+
};
|
|
166
|
+
},
|
|
167
|
+
creatureFamily: (creatureFamilyId) => {
|
|
168
|
+
return {
|
|
169
|
+
path: `${base}/creature-family/${creatureFamilyId}`,
|
|
170
|
+
namespace: "static"
|
|
171
|
+
};
|
|
172
|
+
},
|
|
173
|
+
creatureFamilyIndex: () => {
|
|
174
|
+
return {
|
|
175
|
+
path: `${base}/creature-family/index`,
|
|
176
|
+
namespace: "static"
|
|
177
|
+
};
|
|
178
|
+
},
|
|
179
|
+
creatureFamilyMedia: (creatureFamilyId) => {
|
|
180
|
+
return {
|
|
181
|
+
path: `${mediaBase}/creature-family/${creatureFamilyId}`,
|
|
182
|
+
namespace: "static"
|
|
183
|
+
};
|
|
184
|
+
},
|
|
185
|
+
creatureType: (creatureTypeId) => {
|
|
186
|
+
return {
|
|
187
|
+
path: `${base}/creature-type/${creatureTypeId}`,
|
|
188
|
+
namespace: "static"
|
|
189
|
+
};
|
|
190
|
+
},
|
|
191
|
+
creatureTypeIndex: () => {
|
|
192
|
+
return {
|
|
193
|
+
path: `${base}/creature-type/index`,
|
|
194
|
+
namespace: "static"
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
//TODO Improve search
|
|
198
|
+
/*
|
|
199
|
+
creatureSearch: () => {
|
|
200
|
+
return {
|
|
201
|
+
path: `${base}/creature/search`,
|
|
202
|
+
namespace: 'static',
|
|
203
|
+
};
|
|
204
|
+
},*/
|
|
205
|
+
};
|
|
206
|
+
|
|
38
207
|
// src/index.ts
|
|
39
208
|
var wow = {
|
|
40
|
-
...
|
|
209
|
+
...achievementApi,
|
|
210
|
+
...auctionHouseApi,
|
|
211
|
+
...azeriteEssenceApi,
|
|
212
|
+
...connectedRealmApi,
|
|
213
|
+
...covenantApi,
|
|
214
|
+
...creatureApi
|
|
41
215
|
};
|
|
42
216
|
export {
|
|
43
217
|
wow
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/base.ts","../src/achievements/index.ts","../src/index.ts"],"sourcesContent":["export const base = '/data/wow' as const;\r\n\r\nexport const mediaBase = `${base}/media` as const;\r\n","import type { Resource } from '@blizzard-api/core';\r\nimport { base, mediaBase } from '../base';\r\nimport type { AchievementCategoryResponse } from './response';\r\n\r\nconst achievementBase = `${base}/achievement`;\r\nconst achievementCategoryBase = `${base}/achievement-category`;\r\n\r\nexport const achievements = {\r\n achievementCategory: (achievementCategoryId: number): Resource<AchievementCategoryResponse> => {\r\n return {\r\n path: `${achievementCategoryBase}/${achievementCategoryId}`,\r\n namespace: 'static',\r\n };\r\n },\r\n achievementCategoryIndex: (): Resource<void> => {\r\n return {\r\n path: `${achievementCategoryBase}/index`,\r\n namespace: 'static',\r\n };\r\n },\r\n achievement: (achievementId: number): Resource<void> => {\r\n return {\r\n path: `${achievementBase}/${achievementId}`,\r\n namespace: 'static',\r\n };\r\n },\r\n achievementIndex: (): Resource<void> => {\r\n return {\r\n path: `${achievementBase}/index`,\r\n namespace: 'static',\r\n };\r\n },\r\n media: (achievementId: number): Resource<void> => {\r\n return { path: `${mediaBase}/achievement/${achievementId}`, namespace: 'static' };\r\n },\r\n};\r\n","import { achievements } from './achievements';\r\n\r\nexport const wow = {\r\n ...achievements,\r\n};\r\n"],"mappings":";AAAO,IAAM,OAAO;AAEb,IAAM,YAAY,GAAG,IAAI;;;ACEhC,IAAM,kBAAkB,GAAG,IAAI;AAC/B,IAAM,0BAA0B,GAAG,IAAI;AAEhC,IAAM,eAAe;AAAA,EAC1B,qBAAqB,CAAC,0BAAyE;AAC7F,WAAO;AAAA,MACL,MAAM,GAAG,uBAAuB,IAAI,qBAAqB;AAAA,MACzD,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,0BAA0B,MAAsB;AAC9C,WAAO;AAAA,MACL,MAAM,GAAG,uBAAuB;AAAA,MAChC,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,aAAa,CAAC,kBAA0C;AACtD,WAAO;AAAA,MACL,MAAM,GAAG,eAAe,IAAI,aAAa;AAAA,MACzC,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,kBAAkB,MAAsB;AACtC,WAAO;AAAA,MACL,MAAM,GAAG,eAAe;AAAA,MACxB,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,OAAO,CAAC,kBAA0C;AAChD,WAAO,EAAE,MAAM,GAAG,SAAS,gBAAgB,aAAa,IAAI,WAAW,SAAS;AAAA,EAClF;AACF;;;ACjCO,IAAM,MAAM;AAAA,EACjB,GAAG;AACL;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/base.ts","../src/achievements/achievements.ts","../src/auction-house/auction-house.ts","../src/azerite-essence/azerite-essence.ts","../src/connected-realm/connected-realm.ts","../src/covenant/covenant.ts","../src/creature/creature.ts","../src/index.ts"],"sourcesContent":["export const base = '/data/wow' as const;\r\n\r\nexport const mediaBase = `${base}/media` as const;\r\n\r\nexport interface ResponseBase {\r\n _links: {\r\n self: {\r\n href: string;\r\n };\r\n };\r\n}\r\n\r\nexport interface KeyBase {\r\n key: {\r\n href: string;\r\n };\r\n}\r\n","import type { Resource } from '@blizzard-api/core';\r\nimport { base, mediaBase } from '../base';\r\nimport type {\r\n AchievementCategoryIndexResponse,\r\n AchievementCategoryResponse,\r\n AchievementIndexResponse,\r\n AchievementMediaResponse,\r\n AchievementResponse,\r\n} from './types';\r\n\r\nconst achievementBase = `${base}/achievement`;\r\nconst achievementCategoryBase = `${base}/achievement-category`;\r\n\r\nexport const achievementApi = {\r\n achievementCategory: (achievementCategoryId: number): Resource<AchievementCategoryResponse> => {\r\n return {\r\n path: `${achievementCategoryBase}/${achievementCategoryId}`,\r\n namespace: 'static',\r\n };\r\n },\r\n achievementCategoryIndex: (): Resource<AchievementCategoryIndexResponse> => {\r\n return {\r\n path: `${achievementCategoryBase}/index`,\r\n namespace: 'static',\r\n };\r\n },\r\n achievement: (achievementId: number): Resource<AchievementResponse> => {\r\n return {\r\n path: `${achievementBase}/${achievementId}`,\r\n namespace: 'static',\r\n };\r\n },\r\n achievementIndex: (): Resource<AchievementIndexResponse> => {\r\n return {\r\n path: `${achievementBase}/index`,\r\n namespace: 'static',\r\n };\r\n },\r\n achievementMedia: (achievementId: number): Resource<AchievementMediaResponse> => {\r\n return { path: `${mediaBase}/achievement/${achievementId}`, namespace: 'static' };\r\n },\r\n};\r\n","import type { Resource } from '@blizzard-api/core';\nimport { base } from '../base';\nimport type { AuctionHouseCommoditiesResponse, AuctionHouseResponse } from './types';\n\nexport const auctionHouseApi = {\n auctions: (connectedRealmId: number): Resource<AuctionHouseResponse> => {\n return {\n path: `${base}/connected-realm/${connectedRealmId}/auctions`,\n namespace: 'dynamic',\n };\n },\n commodities: (): Resource<AuctionHouseCommoditiesResponse> => {\n return {\n path: `${base}/auctions/commodities`,\n namespace: 'dynamic',\n };\n },\n};\n","import type { Resource } from '@blizzard-api/core';\nimport { base, mediaBase } from '../base';\n\nexport const azeriteEssenceApi = {\n azeriteEssence: (azeriteEssenceId: number): Resource<void> => {\n return {\n path: `${base}/azerite-essence/${azeriteEssenceId}`,\n namespace: 'static',\n };\n },\n azeriteEssenceIndex: (): Resource<void> => {\n return {\n path: `${base}/azerite-essence/index`,\n namespace: 'static',\n };\n },\n azeriteEssenceMedia: (azeriteEssenceId: number): Resource<void> => {\n return { path: `${mediaBase}/azerite-essence/${azeriteEssenceId}`, namespace: 'static' };\n },\n // TODO Improve search endpoints\n /**\n * azeriteEssenceSearch: (): Resource<void> => {\n * return {\n * path: `${base}/search/connected-realm`,\n * namespace: 'dynamic',\n * };\n * },\n */\n};\n","import type { Resource } from '@blizzard-api/core';\nimport { base } from '../base';\nimport type { ConnectedRealmIndexResponse, ConnectedRealmResponse } from './types';\n\nexport const connectedRealmApi = {\n connectedRealmIndex: (): Resource<ConnectedRealmIndexResponse> => {\n return {\n path: `${base}/connected-realm/index`,\n namespace: 'dynamic',\n };\n },\n connectedRealm: (connectedRealmId: number): Resource<ConnectedRealmResponse> => {\n return {\n path: `${base}/connected-realm/${connectedRealmId}`,\n namespace: 'dynamic',\n };\n },\n // TODO Improve search endpoints\n /**\n * connectedRealmSearch: (): Resource<void> => {\n * return {\n * path: `${base}/search/connected-realm`,\n * namespace: 'dynamic',\n * };\n * },\n */\n};\n","import type { Resource } from '@blizzard-api/core';\nimport { base, mediaBase } from '../base';\n\nexport const covenantApi = {\n conduit: (conduitId: number): Resource<void> => {\n return {\n path: `${base}/covenant/conduit/${conduitId}`,\n namespace: 'static',\n };\n },\n conduitIndex: (): Resource<void> => {\n return {\n path: `${base}/covenant/conduit/index`,\n namespace: 'static',\n };\n },\n covenant: (covenantId: number): Resource<void> => {\n return {\n path: `${base}/covenant/${covenantId}`,\n namespace: 'static',\n };\n },\n covenantIndex: (): Resource<void> => {\n return {\n path: `${base}/covenant/index`,\n namespace: 'static',\n };\n },\n covenantMedia: (covenantId: number): Resource<void> => {\n return {\n path: `${mediaBase}/covenant/${covenantId}`,\n namespace: 'static',\n };\n },\n soulbind: (soulbindId: number): Resource<void> => {\n return {\n path: `${base}/covenant/soulbind/${soulbindId}`,\n namespace: 'static',\n };\n },\n soulbindIndex: (): Resource<void> => {\n return {\n path: `${base}/covenant/soulbind/index`,\n namespace: 'static',\n };\n },\n};\n","import type { Resource } from '@blizzard-api/core';\nimport { base, mediaBase } from '../base';\n\nexport const creatureApi = {\n creature: (creatureId: number): Resource<void> => {\n return {\n path: `${base}/creature/${creatureId}`,\n namespace: 'static',\n };\n },\n creatureDisplayMedia: (creatureDisplayId: number): Resource<void> => {\n return {\n path: `${mediaBase}/creature-display/${creatureDisplayId}`,\n namespace: 'static',\n };\n },\n creatureFamily: (creatureFamilyId: number): Resource<void> => {\n return {\n path: `${base}/creature-family/${creatureFamilyId}`,\n namespace: 'static',\n };\n },\n creatureFamilyIndex: (): Resource<void> => {\n return {\n path: `${base}/creature-family/index`,\n namespace: 'static',\n };\n },\n creatureFamilyMedia: (creatureFamilyId: number): Resource<void> => {\n return {\n path: `${mediaBase}/creature-family/${creatureFamilyId}`,\n namespace: 'static',\n };\n },\n creatureType: (creatureTypeId: number): Resource<void> => {\n return {\n path: `${base}/creature-type/${creatureTypeId}`,\n namespace: 'static',\n };\n },\n creatureTypeIndex: (): Resource<void> => {\n return {\n path: `${base}/creature-type/index`,\n namespace: 'static',\n };\n },\n //TODO Improve search\n /*\n creatureSearch: () => {\n return {\n path: `${base}/creature/search`,\n namespace: 'static',\n };\n },*/\n};\n","import { achievementApi } from './achievements/achievements';\r\nimport { auctionHouseApi } from './auction-house/auction-house';\r\nimport { azeriteEssenceApi } from './azerite-essence/azerite-essence';\r\nimport { connectedRealmApi } from './connected-realm/connected-realm';\r\nimport { covenantApi } from './covenant/covenant';\r\nimport { creatureApi } from './creature/creature';\r\n\r\nexport const wow = {\r\n ...achievementApi,\r\n ...auctionHouseApi,\r\n ...azeriteEssenceApi,\r\n ...connectedRealmApi,\r\n ...covenantApi,\r\n ...creatureApi,\r\n};\r\n\r\n//Achievements\r\nexport * from './achievements/types.js';\r\n//Auction House\r\nexport * from './auction-house/types.js';\r\n//Connected Realm\r\nexport * from './connected-realm/types.js';\r\n"],"mappings":";AAAO,IAAM,OAAO;AAEb,IAAM,YAAY,GAAG,IAAI;;;ACQhC,IAAM,kBAAkB,GAAG,IAAI;AAC/B,IAAM,0BAA0B,GAAG,IAAI;AAEhC,IAAM,iBAAiB;AAAA,EAC5B,qBAAqB,CAAC,0BAAyE;AAC7F,WAAO;AAAA,MACL,MAAM,GAAG,uBAAuB,I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,GAAG,IAAI,aAAa,UAAU;AAAA,MACpC,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,sBAAsB,CAAC,sBAA8C;AACnE,WAAO;AAAA,MACL,MAAM,GAAG,SAAS,qBAAqB,iBAAiB;AAAA,MACxD,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,gBAAgB,CAAC,qBAA6C;AAC5D,WAAO;AAAA,MACL,MAAM,GAAG,IAAI,oBAAoB,gBAAgB;AAAA,MACjD,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,qBAAqB,MAAsB;AACzC,WAAO;AAAA,MACL,MAAM,GAAG,IAAI;AAAA,MACb,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,qBAAqB,CAAC,qBAA6C;AACjE,WAAO;AAAA,MACL,MAAM,GAAG,SAAS,oBAAoB,gBAAgB;AAAA,MACtD,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,cAAc,CAAC,mBAA2C;AACxD,WAAO;AAAA,MACL,MAAM,GAAG,IAAI,kBAAkB,cAAc;AAAA,MAC7C,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,mBAAmB,MAAsB;AACvC,WAAO;AAAA,MACL,MAAM,GAAG,IAAI;AAAA,MACb,WAAW;AAAA,IACb;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASF;;;AC/CO,IAAM,MAAM;AAAA,EACjB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blizzard-api/wow",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Putro",
|
|
6
6
|
"description": "A series of helpers to interact with the World of Warcraft Blizzard API",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@blizzard-api/core": "0.0.
|
|
48
|
+
"@blizzard-api/core": "0.0.7"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@blizzard-api/core": "0.0.
|
|
51
|
+
"@blizzard-api/core": "0.0.7"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "tsup",
|