clashofclans.js 2.4.0 → 2.5.0-dev.597dedf
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/CHANGELOG.md +12 -5
- package/dist/client/Client.d.ts +2 -2
- package/dist/rest/RESTManager.d.ts +40 -26
- package/dist/rest/RESTManager.js +34 -14
- package/dist/rest/RequestHandler.d.ts +2 -142
- package/dist/rest/RequestHandler.js +2 -2
- package/dist/struct/Clan.d.ts +1 -2
- package/dist/struct/ClanMember.d.ts +1 -2
- package/dist/struct/ClanWarLeagueGroup.d.ts +1 -2
- package/dist/struct/ClanWarLog.d.ts +0 -2
- package/dist/struct/ClanWarLog.js +0 -2
- package/dist/struct/Player.d.ts +1 -2
- package/dist/struct/PlayerClan.d.ts +1 -2
- package/dist/types/api.d.ts +351 -0
- package/dist/types/api.js +2 -0
- package/dist/types/index.d.ts +2 -351
- package/dist/types/index.js +12 -0
- package/dist/types/lib.d.ts +139 -0
- package/dist/types/lib.js +2 -0
- package/dist/util/Util.d.ts +2 -1
- package/dist/util/Util.js +15 -4
- package/package.json +4 -2
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
export interface APIPaging {
|
|
2
|
+
cursors?: APICursors;
|
|
3
|
+
}
|
|
4
|
+
export interface APICursors {
|
|
5
|
+
after?: string;
|
|
6
|
+
before?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface APIIcon {
|
|
9
|
+
small: string;
|
|
10
|
+
/** Tiny Icon is not available for Labels. */
|
|
11
|
+
tiny?: string;
|
|
12
|
+
/** Medium Icon is not available for Unranked Icon. */
|
|
13
|
+
medium?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface APIBadge {
|
|
16
|
+
small: string;
|
|
17
|
+
large: string;
|
|
18
|
+
medium: string;
|
|
19
|
+
}
|
|
20
|
+
export interface APISeason {
|
|
21
|
+
id: string;
|
|
22
|
+
rank: number;
|
|
23
|
+
trophies: number;
|
|
24
|
+
}
|
|
25
|
+
/** /clans?name={name}&limit={limit} */
|
|
26
|
+
export interface APIClanList {
|
|
27
|
+
items: Omit<APIClan, 'memberList'>[];
|
|
28
|
+
paging: APIPaging;
|
|
29
|
+
}
|
|
30
|
+
export interface APIChatLanguage {
|
|
31
|
+
name: string;
|
|
32
|
+
id: number;
|
|
33
|
+
languageCode: string;
|
|
34
|
+
}
|
|
35
|
+
/** /clans/{clanTag} */
|
|
36
|
+
export interface APIClan {
|
|
37
|
+
tag: string;
|
|
38
|
+
name: string;
|
|
39
|
+
type: 'open' | 'inviteOnly' | 'closed';
|
|
40
|
+
description: string;
|
|
41
|
+
location?: APILocation;
|
|
42
|
+
chatLanguage?: APIChatLanguage;
|
|
43
|
+
badgeUrls: APIBadge;
|
|
44
|
+
clanLevel: number;
|
|
45
|
+
clanPoints: number;
|
|
46
|
+
clanVersusPoints: number;
|
|
47
|
+
requiredTrophies: number;
|
|
48
|
+
requiredTownhallLevel?: number;
|
|
49
|
+
warFrequency: 'always' | 'moreThanOncePerWeek' | 'oncePerWeek' | 'lessThanOncePerWeek' | 'never' | 'unknown';
|
|
50
|
+
warWinStreak: number;
|
|
51
|
+
warWins: number;
|
|
52
|
+
warTies?: number;
|
|
53
|
+
warLosses?: number;
|
|
54
|
+
isWarLogPublic: boolean;
|
|
55
|
+
warLeague?: APIWarLeague;
|
|
56
|
+
members: number;
|
|
57
|
+
labels: APILabel[];
|
|
58
|
+
memberList: APIClanMember[];
|
|
59
|
+
}
|
|
60
|
+
export interface APIClanMember {
|
|
61
|
+
name: string;
|
|
62
|
+
tag: string;
|
|
63
|
+
role: 'member' | 'admin' | 'coLeader' | 'leader';
|
|
64
|
+
expLevel: number;
|
|
65
|
+
league: APILeague;
|
|
66
|
+
trophies: number;
|
|
67
|
+
versusTrophies?: number;
|
|
68
|
+
clanRank: number;
|
|
69
|
+
previousClanRank: number;
|
|
70
|
+
donations: number;
|
|
71
|
+
donationsReceived: number;
|
|
72
|
+
}
|
|
73
|
+
/** /clans/{clanTag}/members */
|
|
74
|
+
export interface APIClanMemberList {
|
|
75
|
+
items: APIClanMember[];
|
|
76
|
+
paging: APIPaging;
|
|
77
|
+
}
|
|
78
|
+
/** /clans/{clanTag}/currentwar and /clanwarleagues/wars/{warTag} */
|
|
79
|
+
export interface APIClanWar {
|
|
80
|
+
state: 'notInWar' | 'preparation' | 'inWar' | 'warEnded';
|
|
81
|
+
teamSize: number;
|
|
82
|
+
startTime: string;
|
|
83
|
+
preparationStartTime: string;
|
|
84
|
+
endTime: string;
|
|
85
|
+
clan: APIWarClan;
|
|
86
|
+
opponent: APIWarClan;
|
|
87
|
+
/** This property is not available for CWL */
|
|
88
|
+
attacksPerMember?: number;
|
|
89
|
+
}
|
|
90
|
+
export interface APIWarClan {
|
|
91
|
+
tag: string;
|
|
92
|
+
name: string;
|
|
93
|
+
badgeUrls: APIBadge;
|
|
94
|
+
clanLevel: number;
|
|
95
|
+
attacks: number;
|
|
96
|
+
stars: number;
|
|
97
|
+
destructionPercentage: number;
|
|
98
|
+
members: APIClanWarMember[];
|
|
99
|
+
}
|
|
100
|
+
export interface APIClanWarMember {
|
|
101
|
+
tag: string;
|
|
102
|
+
name: string;
|
|
103
|
+
mapPosition: number;
|
|
104
|
+
townhallLevel: number;
|
|
105
|
+
opponentAttacks: number;
|
|
106
|
+
bestOpponentAttack?: APIClanWarAttack;
|
|
107
|
+
attacks?: APIClanWarAttack[];
|
|
108
|
+
}
|
|
109
|
+
export interface APIClanWarAttack {
|
|
110
|
+
order: number;
|
|
111
|
+
attackerTag: string;
|
|
112
|
+
defenderTag: string;
|
|
113
|
+
stars: number;
|
|
114
|
+
duration: number;
|
|
115
|
+
destructionPercentage: number;
|
|
116
|
+
}
|
|
117
|
+
export interface APIWarLogClan {
|
|
118
|
+
tag?: string;
|
|
119
|
+
name?: string;
|
|
120
|
+
badgeUrls: APIBadge;
|
|
121
|
+
clanLevel: number;
|
|
122
|
+
attacks?: number;
|
|
123
|
+
stars: number;
|
|
124
|
+
destructionPercentage: number;
|
|
125
|
+
expEarned?: number;
|
|
126
|
+
}
|
|
127
|
+
export interface APIClanWarLogEntry {
|
|
128
|
+
result: 'win' | 'lose' | 'tie' | null;
|
|
129
|
+
endTime: string;
|
|
130
|
+
teamSize: number;
|
|
131
|
+
attacksPerMember?: number;
|
|
132
|
+
clan: APIWarLogClan;
|
|
133
|
+
opponent: APIWarLogClan;
|
|
134
|
+
}
|
|
135
|
+
/** /clans/{clanTag}/warlog */
|
|
136
|
+
export interface APIClanWarLog {
|
|
137
|
+
items: APIClanWarLogEntry[];
|
|
138
|
+
paging: APIPaging;
|
|
139
|
+
}
|
|
140
|
+
/** /clans/{clanTag}/currentwar/leaguegroup */
|
|
141
|
+
export interface APIClanWarLeagueGroup {
|
|
142
|
+
state: 'preparation' | 'inWar' | 'warEnded';
|
|
143
|
+
season: string;
|
|
144
|
+
clans: APIClanWarLeagueClan[];
|
|
145
|
+
rounds: APIClanWarLeagueRound[];
|
|
146
|
+
}
|
|
147
|
+
export interface APIClanWarLeagueClan {
|
|
148
|
+
name: string;
|
|
149
|
+
tag: string;
|
|
150
|
+
clanLevel: number;
|
|
151
|
+
badgeUrls: APIBadge;
|
|
152
|
+
members: APIClanWarLeagueClanMember[];
|
|
153
|
+
}
|
|
154
|
+
export interface APIClanWarLeagueClanMember {
|
|
155
|
+
name: string;
|
|
156
|
+
tag: string;
|
|
157
|
+
townHallLevel: number;
|
|
158
|
+
}
|
|
159
|
+
export interface APIClanWarLeagueRound {
|
|
160
|
+
warTags: string[];
|
|
161
|
+
}
|
|
162
|
+
/** /players/{playerTag} */
|
|
163
|
+
export interface APIPlayer {
|
|
164
|
+
name: string;
|
|
165
|
+
tag: string;
|
|
166
|
+
townHallLevel: number;
|
|
167
|
+
townHallWeaponLevel?: number;
|
|
168
|
+
expLevel: number;
|
|
169
|
+
trophies: number;
|
|
170
|
+
bestTrophies: number;
|
|
171
|
+
warStars: number;
|
|
172
|
+
attackWins: number;
|
|
173
|
+
defenseWins: number;
|
|
174
|
+
builderHallLevel?: number;
|
|
175
|
+
versusTrophies?: number;
|
|
176
|
+
bestVersusTrophies?: number;
|
|
177
|
+
versusBattleWins?: number;
|
|
178
|
+
donations: number;
|
|
179
|
+
donationsReceived: number;
|
|
180
|
+
role?: string;
|
|
181
|
+
warPreference?: 'in' | 'out';
|
|
182
|
+
clan?: APIPlayerClan;
|
|
183
|
+
league?: APILeague;
|
|
184
|
+
legendStatistics?: APILegendStatistics;
|
|
185
|
+
achievements: APIPlayerAchievement[];
|
|
186
|
+
troops: APIPlayerItem[];
|
|
187
|
+
heroes: APIPlayerItem[];
|
|
188
|
+
spells: APIPlayerItem[];
|
|
189
|
+
labels: APILabel[];
|
|
190
|
+
}
|
|
191
|
+
export interface APILegendStatistics {
|
|
192
|
+
previousSeason?: APISeason;
|
|
193
|
+
previousVersusSeason?: APISeason;
|
|
194
|
+
bestVersusSeason?: APISeason;
|
|
195
|
+
currentSeason?: APISeason;
|
|
196
|
+
bestSeason?: APISeason;
|
|
197
|
+
legendTrophies: number;
|
|
198
|
+
}
|
|
199
|
+
export interface APIPlayerClan {
|
|
200
|
+
tag: string;
|
|
201
|
+
name: string;
|
|
202
|
+
clanLevel: number;
|
|
203
|
+
badgeUrls: APIBadge;
|
|
204
|
+
}
|
|
205
|
+
export interface APIPlayerAchievement {
|
|
206
|
+
name: string;
|
|
207
|
+
stars: number;
|
|
208
|
+
value: number;
|
|
209
|
+
target: number;
|
|
210
|
+
info: string;
|
|
211
|
+
completionInfo: string | null;
|
|
212
|
+
village: 'home' | 'builderBase';
|
|
213
|
+
}
|
|
214
|
+
export interface APIPlayerItem {
|
|
215
|
+
name: string;
|
|
216
|
+
level: number;
|
|
217
|
+
maxLevel: number;
|
|
218
|
+
superTroopIsActive?: boolean;
|
|
219
|
+
village: 'home' | 'builderBase';
|
|
220
|
+
}
|
|
221
|
+
/** /players/{playerTag}/verifytoken */
|
|
222
|
+
export interface APIVerifyToken {
|
|
223
|
+
tag: string;
|
|
224
|
+
token: string;
|
|
225
|
+
status: 'ok' | 'invalid';
|
|
226
|
+
}
|
|
227
|
+
/** /locations */
|
|
228
|
+
export interface APILocationList {
|
|
229
|
+
items: APILocation[];
|
|
230
|
+
paging: APIPaging;
|
|
231
|
+
}
|
|
232
|
+
/** /locations/{locationId} */
|
|
233
|
+
export interface APILocation {
|
|
234
|
+
localizedName?: string;
|
|
235
|
+
id: number;
|
|
236
|
+
name: string;
|
|
237
|
+
isCountry: boolean;
|
|
238
|
+
countryCode?: string;
|
|
239
|
+
}
|
|
240
|
+
/** /locations/{locationId}/rankings/clans */
|
|
241
|
+
export interface APIClanRankingList {
|
|
242
|
+
items: APIClanRanking[];
|
|
243
|
+
paging: APIPaging;
|
|
244
|
+
}
|
|
245
|
+
export interface APIClanRanking {
|
|
246
|
+
clanLevel: number;
|
|
247
|
+
clanPoints: number;
|
|
248
|
+
location: APILocation;
|
|
249
|
+
members: number;
|
|
250
|
+
tag: string;
|
|
251
|
+
name: string;
|
|
252
|
+
rank: number;
|
|
253
|
+
previousRank: number;
|
|
254
|
+
badgeUrls: APIBadge;
|
|
255
|
+
}
|
|
256
|
+
/** /locations/{locationId}/rankings/players */
|
|
257
|
+
export interface APIPlayerRankingList {
|
|
258
|
+
items: APIPlayerRanking[];
|
|
259
|
+
paging: APIPaging;
|
|
260
|
+
}
|
|
261
|
+
export interface APIPlayerRanking {
|
|
262
|
+
tag: string;
|
|
263
|
+
name: string;
|
|
264
|
+
expLevel: number;
|
|
265
|
+
trophies: number;
|
|
266
|
+
attackWins: number;
|
|
267
|
+
defenseWins: number;
|
|
268
|
+
rank: number;
|
|
269
|
+
previousRank: number;
|
|
270
|
+
clan?: Omit<APIPlayerClan, 'clanLevel'>;
|
|
271
|
+
league: APILeague;
|
|
272
|
+
}
|
|
273
|
+
/** /locations/{locationId}/rankings/clans-versus */
|
|
274
|
+
export interface APIClanVersusRankingList {
|
|
275
|
+
items: APIClanVersusRanking[];
|
|
276
|
+
paging: APIPaging;
|
|
277
|
+
}
|
|
278
|
+
export interface APIClanVersusRanking {
|
|
279
|
+
clanLevel: number;
|
|
280
|
+
location: APILocation;
|
|
281
|
+
members: number;
|
|
282
|
+
tag: string;
|
|
283
|
+
name: string;
|
|
284
|
+
rank: number;
|
|
285
|
+
previousRank: number;
|
|
286
|
+
badgeUrls: APIBadge;
|
|
287
|
+
clanVersusPoints: number;
|
|
288
|
+
}
|
|
289
|
+
/** /locations/{locationId}/rankings/players-versus */
|
|
290
|
+
export interface APIPlayerVersusRankingList {
|
|
291
|
+
items: APIPlayerVersusRanking[];
|
|
292
|
+
paging: APIPaging;
|
|
293
|
+
}
|
|
294
|
+
export interface APIPlayerVersusRanking {
|
|
295
|
+
tag: string;
|
|
296
|
+
name: string;
|
|
297
|
+
expLevel: number;
|
|
298
|
+
versusTrophies: number;
|
|
299
|
+
versusBattleWins: number;
|
|
300
|
+
rank: number;
|
|
301
|
+
previousRank: number;
|
|
302
|
+
clan?: APIPlayerClan;
|
|
303
|
+
}
|
|
304
|
+
/** /leagues */
|
|
305
|
+
export interface APILeagueList {
|
|
306
|
+
items: APILeague[];
|
|
307
|
+
paging: APIPaging;
|
|
308
|
+
}
|
|
309
|
+
/** /leagues/{leagueId} */
|
|
310
|
+
export interface APILeague {
|
|
311
|
+
id: number;
|
|
312
|
+
name: string;
|
|
313
|
+
iconUrls: APIIcon;
|
|
314
|
+
}
|
|
315
|
+
/** /leagues/{leagueId}/seasons/{seasonId} */
|
|
316
|
+
export interface APIPlayerSeasonRankingList {
|
|
317
|
+
items: Omit<APIPlayerRanking, 'league'>[];
|
|
318
|
+
paging: APIPaging;
|
|
319
|
+
}
|
|
320
|
+
/** /leagues/{leagueId}/seasons */
|
|
321
|
+
export interface APILeagueSeasonList {
|
|
322
|
+
items: {
|
|
323
|
+
id: string;
|
|
324
|
+
}[];
|
|
325
|
+
paging: APIPaging;
|
|
326
|
+
}
|
|
327
|
+
/** /warleagues */
|
|
328
|
+
export interface APIWarLeagueList {
|
|
329
|
+
items: APIWarLeague[];
|
|
330
|
+
paging: APIPaging;
|
|
331
|
+
}
|
|
332
|
+
/** /warleagues/{leagueId} */
|
|
333
|
+
export interface APIWarLeague {
|
|
334
|
+
id: number;
|
|
335
|
+
name: string;
|
|
336
|
+
}
|
|
337
|
+
export interface APILabel {
|
|
338
|
+
id: number;
|
|
339
|
+
name: string;
|
|
340
|
+
iconUrls: APIIcon;
|
|
341
|
+
}
|
|
342
|
+
/** /labels/clans and /labels/players */
|
|
343
|
+
export interface APILabelList {
|
|
344
|
+
items: APILabel[];
|
|
345
|
+
paging: APIPaging;
|
|
346
|
+
}
|
|
347
|
+
/** /goldpass/seasons/current */
|
|
348
|
+
export interface APIGoldPassSeason {
|
|
349
|
+
startTime: string;
|
|
350
|
+
endTime: string;
|
|
351
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,351 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
export interface APICursors {
|
|
5
|
-
after?: string;
|
|
6
|
-
before?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface APIIcon {
|
|
9
|
-
small: string;
|
|
10
|
-
/** Tiny Icon is not available for Labels. */
|
|
11
|
-
tiny?: string;
|
|
12
|
-
/** Medium Icon is not available for Unranked Icon. */
|
|
13
|
-
medium?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface APIBadge {
|
|
16
|
-
small: string;
|
|
17
|
-
large: string;
|
|
18
|
-
medium: string;
|
|
19
|
-
}
|
|
20
|
-
export interface APISeason {
|
|
21
|
-
id: string;
|
|
22
|
-
rank: number;
|
|
23
|
-
trophies: number;
|
|
24
|
-
}
|
|
25
|
-
/** /clans?name={name}&limit={limit} */
|
|
26
|
-
export interface APIClanList {
|
|
27
|
-
items: Omit<APIClan, 'memberList'>[];
|
|
28
|
-
paging: APIPaging;
|
|
29
|
-
}
|
|
30
|
-
export interface APIChatLanguage {
|
|
31
|
-
name: string;
|
|
32
|
-
id: number;
|
|
33
|
-
languageCode: string;
|
|
34
|
-
}
|
|
35
|
-
/** /clans/{clanTag} */
|
|
36
|
-
export interface APIClan {
|
|
37
|
-
tag: string;
|
|
38
|
-
name: string;
|
|
39
|
-
type: 'open' | 'inviteOnly' | 'closed';
|
|
40
|
-
description: string;
|
|
41
|
-
location?: APILocation;
|
|
42
|
-
chatLanguage?: APIChatLanguage;
|
|
43
|
-
badgeUrls: APIBadge;
|
|
44
|
-
clanLevel: number;
|
|
45
|
-
clanPoints: number;
|
|
46
|
-
clanVersusPoints: number;
|
|
47
|
-
requiredTrophies: number;
|
|
48
|
-
requiredTownhallLevel?: number;
|
|
49
|
-
warFrequency: 'always' | 'moreThanOncePerWeek' | 'oncePerWeek' | 'lessThanOncePerWeek' | 'never' | 'unknown';
|
|
50
|
-
warWinStreak: number;
|
|
51
|
-
warWins: number;
|
|
52
|
-
warTies?: number;
|
|
53
|
-
warLosses?: number;
|
|
54
|
-
isWarLogPublic: boolean;
|
|
55
|
-
warLeague?: APIWarLeague;
|
|
56
|
-
members: number;
|
|
57
|
-
labels: APILabel[];
|
|
58
|
-
memberList: APIClanMember[];
|
|
59
|
-
}
|
|
60
|
-
export interface APIClanMember {
|
|
61
|
-
name: string;
|
|
62
|
-
tag: string;
|
|
63
|
-
role: 'member' | 'admin' | 'coLeader' | 'leader';
|
|
64
|
-
expLevel: number;
|
|
65
|
-
league: APILeague;
|
|
66
|
-
trophies: number;
|
|
67
|
-
versusTrophies?: number;
|
|
68
|
-
clanRank: number;
|
|
69
|
-
previousClanRank: number;
|
|
70
|
-
donations: number;
|
|
71
|
-
donationsReceived: number;
|
|
72
|
-
}
|
|
73
|
-
/** /clans/{clanTag}/members */
|
|
74
|
-
export interface APIClanMemberList {
|
|
75
|
-
items: APIClanMember[];
|
|
76
|
-
paging: APIPaging;
|
|
77
|
-
}
|
|
78
|
-
/** /clans/{clanTag}/currentwar and /clanwarleagues/wars/{warTag} */
|
|
79
|
-
export interface APIClanWar {
|
|
80
|
-
state: 'notInWar' | 'preparation' | 'inWar' | 'warEnded';
|
|
81
|
-
teamSize: number;
|
|
82
|
-
startTime: string;
|
|
83
|
-
preparationStartTime: string;
|
|
84
|
-
endTime: string;
|
|
85
|
-
clan: APIWarClan;
|
|
86
|
-
opponent: APIWarClan;
|
|
87
|
-
/** This property is not available for CWL */
|
|
88
|
-
attacksPerMember?: number;
|
|
89
|
-
}
|
|
90
|
-
export interface APIWarClan {
|
|
91
|
-
tag: string;
|
|
92
|
-
name: string;
|
|
93
|
-
badgeUrls: APIBadge;
|
|
94
|
-
clanLevel: number;
|
|
95
|
-
attacks: number;
|
|
96
|
-
stars: number;
|
|
97
|
-
destructionPercentage: number;
|
|
98
|
-
members: APIClanWarMember[];
|
|
99
|
-
}
|
|
100
|
-
export interface APIClanWarMember {
|
|
101
|
-
tag: string;
|
|
102
|
-
name: string;
|
|
103
|
-
mapPosition: number;
|
|
104
|
-
townhallLevel: number;
|
|
105
|
-
opponentAttacks: number;
|
|
106
|
-
bestOpponentAttack?: APIClanWarAttack;
|
|
107
|
-
attacks?: APIClanWarAttack[];
|
|
108
|
-
}
|
|
109
|
-
export interface APIClanWarAttack {
|
|
110
|
-
order: number;
|
|
111
|
-
attackerTag: string;
|
|
112
|
-
defenderTag: string;
|
|
113
|
-
stars: number;
|
|
114
|
-
duration: number;
|
|
115
|
-
destructionPercentage: number;
|
|
116
|
-
}
|
|
117
|
-
export interface APIWarLogClan {
|
|
118
|
-
tag?: string;
|
|
119
|
-
name?: string;
|
|
120
|
-
badgeUrls: APIBadge;
|
|
121
|
-
clanLevel: number;
|
|
122
|
-
attacks?: number;
|
|
123
|
-
stars: number;
|
|
124
|
-
destructionPercentage: number;
|
|
125
|
-
expEarned?: number;
|
|
126
|
-
}
|
|
127
|
-
export interface APIClanWarLogEntry {
|
|
128
|
-
result: 'win' | 'lose' | 'tie' | null;
|
|
129
|
-
endTime: string;
|
|
130
|
-
teamSize: number;
|
|
131
|
-
attacksPerMember?: number;
|
|
132
|
-
clan: APIWarLogClan;
|
|
133
|
-
opponent: APIWarLogClan;
|
|
134
|
-
}
|
|
135
|
-
/** /clans/{clanTag}/warlog */
|
|
136
|
-
export interface APIClanWarLog {
|
|
137
|
-
items: APIClanWarLogEntry[];
|
|
138
|
-
paging: APIPaging;
|
|
139
|
-
}
|
|
140
|
-
/** /clans/{clanTag}/currentwar/leaguegroup */
|
|
141
|
-
export interface APIClanWarLeagueGroup {
|
|
142
|
-
state: 'preparation' | 'inWar' | 'warEnded';
|
|
143
|
-
season: string;
|
|
144
|
-
clans: APIClanWarLeagueClan[];
|
|
145
|
-
rounds: APIClanWarLeagueRound[];
|
|
146
|
-
}
|
|
147
|
-
export interface APIClanWarLeagueClan {
|
|
148
|
-
name: string;
|
|
149
|
-
tag: string;
|
|
150
|
-
clanLevel: number;
|
|
151
|
-
badgeUrls: APIBadge;
|
|
152
|
-
members: APIClanWarLeagueClanMember[];
|
|
153
|
-
}
|
|
154
|
-
export interface APIClanWarLeagueClanMember {
|
|
155
|
-
name: string;
|
|
156
|
-
tag: string;
|
|
157
|
-
townHallLevel: number;
|
|
158
|
-
}
|
|
159
|
-
export interface APIClanWarLeagueRound {
|
|
160
|
-
warTags: string[];
|
|
161
|
-
}
|
|
162
|
-
/** /players/{playerTag} */
|
|
163
|
-
export interface APIPlayer {
|
|
164
|
-
name: string;
|
|
165
|
-
tag: string;
|
|
166
|
-
townHallLevel: number;
|
|
167
|
-
townHallWeaponLevel?: number;
|
|
168
|
-
expLevel: number;
|
|
169
|
-
trophies: number;
|
|
170
|
-
bestTrophies: number;
|
|
171
|
-
warStars: number;
|
|
172
|
-
attackWins: number;
|
|
173
|
-
defenseWins: number;
|
|
174
|
-
builderHallLevel?: number;
|
|
175
|
-
versusTrophies?: number;
|
|
176
|
-
bestVersusTrophies?: number;
|
|
177
|
-
versusBattleWins?: number;
|
|
178
|
-
donations: number;
|
|
179
|
-
donationsReceived: number;
|
|
180
|
-
role?: string;
|
|
181
|
-
warPreference?: 'in' | 'out';
|
|
182
|
-
clan?: APIPlayerClan;
|
|
183
|
-
league?: APILeague;
|
|
184
|
-
legendStatistics?: APILegendStatistics;
|
|
185
|
-
achievements: APIPlayerAchievement[];
|
|
186
|
-
troops: APIPlayerItem[];
|
|
187
|
-
heroes: APIPlayerItem[];
|
|
188
|
-
spells: APIPlayerItem[];
|
|
189
|
-
labels: APILabel[];
|
|
190
|
-
}
|
|
191
|
-
export interface APILegendStatistics {
|
|
192
|
-
previousSeason?: APISeason;
|
|
193
|
-
previousVersusSeason?: APISeason;
|
|
194
|
-
bestVersusSeason?: APISeason;
|
|
195
|
-
currentSeason?: APISeason;
|
|
196
|
-
bestSeason?: APISeason;
|
|
197
|
-
legendTrophies: number;
|
|
198
|
-
}
|
|
199
|
-
export interface APIPlayerClan {
|
|
200
|
-
tag: string;
|
|
201
|
-
name: string;
|
|
202
|
-
clanLevel: number;
|
|
203
|
-
badgeUrls: APIBadge;
|
|
204
|
-
}
|
|
205
|
-
export interface APIPlayerAchievement {
|
|
206
|
-
name: string;
|
|
207
|
-
stars: number;
|
|
208
|
-
value: number;
|
|
209
|
-
target: number;
|
|
210
|
-
info: string;
|
|
211
|
-
completionInfo: string | null;
|
|
212
|
-
village: 'home' | 'builderBase';
|
|
213
|
-
}
|
|
214
|
-
export interface APIPlayerItem {
|
|
215
|
-
name: string;
|
|
216
|
-
level: number;
|
|
217
|
-
maxLevel: number;
|
|
218
|
-
superTroopIsActive?: boolean;
|
|
219
|
-
village: 'home' | 'builderBase';
|
|
220
|
-
}
|
|
221
|
-
/** /players/{playerTag}/verifytoken */
|
|
222
|
-
export interface APIVerifyToken {
|
|
223
|
-
tag: string;
|
|
224
|
-
token: string;
|
|
225
|
-
status: 'ok' | 'invalid';
|
|
226
|
-
}
|
|
227
|
-
/** /locations */
|
|
228
|
-
export interface APILocationList {
|
|
229
|
-
items: APILocation[];
|
|
230
|
-
paging: APIPaging;
|
|
231
|
-
}
|
|
232
|
-
/** /locations/{locationId} */
|
|
233
|
-
export interface APILocation {
|
|
234
|
-
localizedName?: string;
|
|
235
|
-
id: number;
|
|
236
|
-
name: string;
|
|
237
|
-
isCountry: boolean;
|
|
238
|
-
countryCode?: string;
|
|
239
|
-
}
|
|
240
|
-
/** /locations/{locationId}/rankings/clans */
|
|
241
|
-
export interface APIClanRankingList {
|
|
242
|
-
items: APIClanRanking[];
|
|
243
|
-
paging: APIPaging;
|
|
244
|
-
}
|
|
245
|
-
export interface APIClanRanking {
|
|
246
|
-
clanLevel: number;
|
|
247
|
-
clanPoints: number;
|
|
248
|
-
location: APILocation;
|
|
249
|
-
members: number;
|
|
250
|
-
tag: string;
|
|
251
|
-
name: string;
|
|
252
|
-
rank: number;
|
|
253
|
-
previousRank: number;
|
|
254
|
-
badgeUrls: APIBadge;
|
|
255
|
-
}
|
|
256
|
-
/** /locations/{locationId}/rankings/players */
|
|
257
|
-
export interface APIPlayerRankingList {
|
|
258
|
-
items: APIPlayerRanking[];
|
|
259
|
-
paging: APIPaging;
|
|
260
|
-
}
|
|
261
|
-
export interface APIPlayerRanking {
|
|
262
|
-
tag: string;
|
|
263
|
-
name: string;
|
|
264
|
-
expLevel: number;
|
|
265
|
-
trophies: number;
|
|
266
|
-
attackWins: number;
|
|
267
|
-
defenseWins: number;
|
|
268
|
-
rank: number;
|
|
269
|
-
previousRank: number;
|
|
270
|
-
clan?: Omit<APIPlayerClan, 'clanLevel'>;
|
|
271
|
-
league: APILeague;
|
|
272
|
-
}
|
|
273
|
-
/** /locations/{locationId}/rankings/clans-versus */
|
|
274
|
-
export interface APIClanVersusRankingList {
|
|
275
|
-
items: APIClanVersusRanking[];
|
|
276
|
-
paging: APIPaging;
|
|
277
|
-
}
|
|
278
|
-
export interface APIClanVersusRanking {
|
|
279
|
-
clanLevel: number;
|
|
280
|
-
location: APILocation;
|
|
281
|
-
members: number;
|
|
282
|
-
tag: string;
|
|
283
|
-
name: string;
|
|
284
|
-
rank: number;
|
|
285
|
-
previousRank: number;
|
|
286
|
-
badgeUrls: APIBadge;
|
|
287
|
-
clanVersusPoints: number;
|
|
288
|
-
}
|
|
289
|
-
/** /locations/{locationId}/rankings/players-versus */
|
|
290
|
-
export interface APIPlayerVersusRankingList {
|
|
291
|
-
items: APIPlayerVersusRanking[];
|
|
292
|
-
paging: APIPaging;
|
|
293
|
-
}
|
|
294
|
-
export interface APIPlayerVersusRanking {
|
|
295
|
-
tag: string;
|
|
296
|
-
name: string;
|
|
297
|
-
expLevel: number;
|
|
298
|
-
versusTrophies: number;
|
|
299
|
-
versusBattleWins: number;
|
|
300
|
-
rank: number;
|
|
301
|
-
previousRank: number;
|
|
302
|
-
clan?: APIPlayerClan;
|
|
303
|
-
}
|
|
304
|
-
/** /leagues */
|
|
305
|
-
export interface APILeagueList {
|
|
306
|
-
items: APILeague[];
|
|
307
|
-
paging: APIPaging;
|
|
308
|
-
}
|
|
309
|
-
/** /leagues/{leagueId} */
|
|
310
|
-
export interface APILeague {
|
|
311
|
-
id: number;
|
|
312
|
-
name: string;
|
|
313
|
-
iconUrls: APIIcon;
|
|
314
|
-
}
|
|
315
|
-
/** /leagues/{leagueId}/seasons/{seasonId} */
|
|
316
|
-
export interface APIPlayerSeasonRankingList {
|
|
317
|
-
items: Omit<APIPlayerRanking, 'league'>[];
|
|
318
|
-
paging: APIPaging;
|
|
319
|
-
}
|
|
320
|
-
/** /leagues/{leagueId}/seasons */
|
|
321
|
-
export interface APILeagueSeasonList {
|
|
322
|
-
items: {
|
|
323
|
-
id: string;
|
|
324
|
-
}[];
|
|
325
|
-
paging: APIPaging;
|
|
326
|
-
}
|
|
327
|
-
/** /warleagues */
|
|
328
|
-
export interface APIWarLeagueList {
|
|
329
|
-
items: APIWarLeague[];
|
|
330
|
-
paging: APIPaging;
|
|
331
|
-
}
|
|
332
|
-
/** /warleagues/{leagueId} */
|
|
333
|
-
export interface APIWarLeague {
|
|
334
|
-
id: number;
|
|
335
|
-
name: string;
|
|
336
|
-
}
|
|
337
|
-
export interface APILabel {
|
|
338
|
-
id: number;
|
|
339
|
-
name: string;
|
|
340
|
-
iconUrls: APIIcon;
|
|
341
|
-
}
|
|
342
|
-
/** /labels/clans and /labels/players */
|
|
343
|
-
export interface APILabelList {
|
|
344
|
-
items: APILabel[];
|
|
345
|
-
paging: APIPaging;
|
|
346
|
-
}
|
|
347
|
-
/** /goldpass/seasons/current */
|
|
348
|
-
export interface APIGoldPassSeason {
|
|
349
|
-
startTime: string;
|
|
350
|
-
endTime: string;
|
|
351
|
-
}
|
|
1
|
+
export * from './api';
|
|
2
|
+
export * from './lib';
|
package/dist/types/index.js
CHANGED
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./api"), exports);
|
|
14
|
+
__exportStar(require("./lib"), exports);
|