@lootlog/sdk 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity.d.ts +8 -2
- package/dist/activity.d.ts.map +1 -1
- package/dist/activity.js +2 -2
- package/dist/activity.js.map +1 -1
- package/dist/battlelog.d.ts +280 -5
- package/dist/battlelog.d.ts.map +1 -1
- package/dist/battlelog.js +11 -6
- package/dist/battlelog.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/main.d.ts +1457 -918
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +400 -284
- package/dist/main.js.map +1 -1
- package/dist/{mutators-Da_vMUva.d.ts → mutators-BaZDDfwh.d.ts} +2 -2
- package/dist/{mutators-Da_vMUva.d.ts.map → mutators-BaZDDfwh.d.ts.map} +1 -1
- package/dist/{mutators-CaBTxpi-.js → mutators-Dj5qBH3y.js} +2 -2
- package/dist/{mutators-CaBTxpi-.js.map → mutators-Dj5qBH3y.js.map} +1 -1
- package/dist/realtime.d.ts +430 -21
- package/dist/realtime.d.ts.map +1 -1
- package/dist/realtime.js +799 -587
- package/dist/realtime.js.map +1 -1
- package/dist/search.d.ts +247 -5
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +115 -2
- package/dist/search.js.map +1 -1
- package/dist/{transport-CIfewyM7.js → transport-Cn1V6y-o.js} +46 -8
- package/dist/transport-Cn1V6y-o.js.map +1 -0
- package/dist/{transport-BHbtsYo_.d.ts → transport-CoTymLxF.d.ts} +3 -1
- package/dist/transport-CoTymLxF.d.ts.map +1 -0
- package/openapi/activity.json +15 -1
- package/openapi/battlelog.json +807 -40
- package/openapi/main.json +5752 -4060
- package/openapi/search.json +721 -53
- package/package.json +5 -6
- package/dist/transport-BHbtsYo_.d.ts.map +0 -1
- package/dist/transport-CIfewyM7.js.map +0 -1
package/dist/search.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as searchFetch } from "./mutators-
|
|
1
|
+
import { i as searchFetch } from "./mutators-BaZDDfwh.js";
|
|
2
2
|
//#region src/generated/search.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Player search hit
|
|
@@ -21,6 +21,15 @@ export interface SearchUnavailableEncoded {
|
|
|
21
21
|
_tag: _SearchUnavailableEncodedTag;
|
|
22
22
|
message: string;
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Meaning of `id`: a Margonem template id, a runtime spawn id observed without a template, or an overloaded legacy id.
|
|
26
|
+
*/
|
|
27
|
+
export type NpcHitDtoOutputIdentityNamespace = typeof NpcHitDtoOutputIdentityNamespace[keyof typeof NpcHitDtoOutputIdentityNamespace];
|
|
28
|
+
export declare const NpcHitDtoOutputIdentityNamespace: {
|
|
29
|
+
readonly legacy: 'legacy';
|
|
30
|
+
readonly runtime: 'runtime';
|
|
31
|
+
readonly template: 'template';
|
|
32
|
+
};
|
|
24
33
|
export type NpcHitDtoOutputType = typeof NpcHitDtoOutputType[keyof typeof NpcHitDtoOutputType];
|
|
25
34
|
export declare const NpcHitDtoOutputType: {
|
|
26
35
|
readonly COMMON: 'COMMON';
|
|
@@ -31,13 +40,24 @@ export declare const NpcHitDtoOutputType: {
|
|
|
31
40
|
readonly EVENT_HERO: 'EVENT_HERO';
|
|
32
41
|
readonly COLOSSUS: 'COLOSSUS';
|
|
33
42
|
readonly TITAN: 'TITAN';
|
|
43
|
+
readonly HERO_TRACKER: 'HERO_TRACKER';
|
|
34
44
|
readonly NPC: 'NPC';
|
|
35
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* Margonem edition of the NPC: `pl` for margonem.pl, `en` for margonem.com. Equal ids in different editions are unrelated.
|
|
48
|
+
*/
|
|
49
|
+
export type NpcHitDtoOutputGameVersion = typeof NpcHitDtoOutputGameVersion[keyof typeof NpcHitDtoOutputGameVersion];
|
|
50
|
+
export declare const NpcHitDtoOutputGameVersion: {
|
|
51
|
+
readonly en: 'en';
|
|
52
|
+
readonly pl: 'pl';
|
|
53
|
+
};
|
|
36
54
|
/**
|
|
37
55
|
* NPC search hit
|
|
38
56
|
*/
|
|
39
57
|
export interface NpcHitDtoOutput {
|
|
40
58
|
id: number;
|
|
59
|
+
/** Meaning of `id`: a Margonem template id, a runtime spawn id observed without a template, or an overloaded legacy id. */
|
|
60
|
+
identityNamespace: NpcHitDtoOutputIdentityNamespace;
|
|
41
61
|
prof: string;
|
|
42
62
|
icon: string;
|
|
43
63
|
name: string;
|
|
@@ -45,7 +65,10 @@ export interface NpcHitDtoOutput {
|
|
|
45
65
|
wt: number;
|
|
46
66
|
type: NpcHitDtoOutputType;
|
|
47
67
|
margonemType: number;
|
|
48
|
-
|
|
68
|
+
/** Worlds of the edition where this NPC was observed. */
|
|
69
|
+
worlds: string[];
|
|
70
|
+
/** Margonem edition of the NPC: `pl` for margonem.pl, `en` for margonem.com. Equal ids in different editions are unrelated. */
|
|
71
|
+
gameVersion: NpcHitDtoOutputGameVersion;
|
|
49
72
|
}
|
|
50
73
|
/**
|
|
51
74
|
* Item search hit
|
|
@@ -110,6 +133,15 @@ export type SearchAllResponseDtoOutputPlayersItem = {
|
|
|
110
133
|
accountId: number;
|
|
111
134
|
world: string;
|
|
112
135
|
};
|
|
136
|
+
/**
|
|
137
|
+
* Meaning of `id`: a Margonem template id, a runtime spawn id observed without a template, or an overloaded legacy id.
|
|
138
|
+
*/
|
|
139
|
+
export type SearchAllResponseDtoOutputNpcsItemIdentityNamespace = typeof SearchAllResponseDtoOutputNpcsItemIdentityNamespace[keyof typeof SearchAllResponseDtoOutputNpcsItemIdentityNamespace];
|
|
140
|
+
export declare const SearchAllResponseDtoOutputNpcsItemIdentityNamespace: {
|
|
141
|
+
readonly legacy: 'legacy';
|
|
142
|
+
readonly runtime: 'runtime';
|
|
143
|
+
readonly template: 'template';
|
|
144
|
+
};
|
|
113
145
|
export type SearchAllResponseDtoOutputNpcsItemType = typeof SearchAllResponseDtoOutputNpcsItemType[keyof typeof SearchAllResponseDtoOutputNpcsItemType];
|
|
114
146
|
export declare const SearchAllResponseDtoOutputNpcsItemType: {
|
|
115
147
|
readonly COMMON: 'COMMON';
|
|
@@ -120,13 +152,24 @@ export declare const SearchAllResponseDtoOutputNpcsItemType: {
|
|
|
120
152
|
readonly EVENT_HERO: 'EVENT_HERO';
|
|
121
153
|
readonly COLOSSUS: 'COLOSSUS';
|
|
122
154
|
readonly TITAN: 'TITAN';
|
|
155
|
+
readonly HERO_TRACKER: 'HERO_TRACKER';
|
|
123
156
|
readonly NPC: 'NPC';
|
|
124
157
|
};
|
|
158
|
+
/**
|
|
159
|
+
* Margonem edition of the NPC: `pl` for margonem.pl, `en` for margonem.com. Equal ids in different editions are unrelated.
|
|
160
|
+
*/
|
|
161
|
+
export type SearchAllResponseDtoOutputNpcsItemGameVersion = typeof SearchAllResponseDtoOutputNpcsItemGameVersion[keyof typeof SearchAllResponseDtoOutputNpcsItemGameVersion];
|
|
162
|
+
export declare const SearchAllResponseDtoOutputNpcsItemGameVersion: {
|
|
163
|
+
readonly en: 'en';
|
|
164
|
+
readonly pl: 'pl';
|
|
165
|
+
};
|
|
125
166
|
/**
|
|
126
167
|
* NPC search hit
|
|
127
168
|
*/
|
|
128
169
|
export type SearchAllResponseDtoOutputNpcsItem = {
|
|
129
170
|
id: number;
|
|
171
|
+
/** Meaning of `id`: a Margonem template id, a runtime spawn id observed without a template, or an overloaded legacy id. */
|
|
172
|
+
identityNamespace: SearchAllResponseDtoOutputNpcsItemIdentityNamespace;
|
|
130
173
|
prof: string;
|
|
131
174
|
icon: string;
|
|
132
175
|
name: string;
|
|
@@ -134,7 +177,10 @@ export type SearchAllResponseDtoOutputNpcsItem = {
|
|
|
134
177
|
wt: number;
|
|
135
178
|
type: SearchAllResponseDtoOutputNpcsItemType;
|
|
136
179
|
margonemType: number;
|
|
137
|
-
|
|
180
|
+
/** Worlds of the edition where this NPC was observed. */
|
|
181
|
+
worlds: string[];
|
|
182
|
+
/** Margonem edition of the NPC: `pl` for margonem.pl, `en` for margonem.com. Equal ids in different editions are unrelated. */
|
|
183
|
+
gameVersion: SearchAllResponseDtoOutputNpcsItemGameVersion;
|
|
138
184
|
};
|
|
139
185
|
/**
|
|
140
186
|
* Aggregated search results
|
|
@@ -144,6 +190,101 @@ export interface SearchAllResponseDtoOutput {
|
|
|
144
190
|
players: SearchAllResponseDtoOutputPlayersItem[];
|
|
145
191
|
npcs: SearchAllResponseDtoOutputNpcsItem[];
|
|
146
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* An NPC an item drops from
|
|
195
|
+
*/
|
|
196
|
+
export interface CatalogDropSourceDtoOutput {
|
|
197
|
+
/** The NPC's catalog key, as `CatalogNpcDto_Output.key`. */
|
|
198
|
+
key: string;
|
|
199
|
+
id: number;
|
|
200
|
+
name: string;
|
|
201
|
+
/** @nullable */
|
|
202
|
+
lvl: number | null;
|
|
203
|
+
/** @nullable */
|
|
204
|
+
icon: string | null;
|
|
205
|
+
/** @nullable */
|
|
206
|
+
type: string | null;
|
|
207
|
+
/** Whether the NPC no longer drops the item: Lootlog has recorded its loot far too often since the item's last drop for the gap to be chance. */
|
|
208
|
+
retired: boolean;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* A Margonem item in the public catalog
|
|
212
|
+
*/
|
|
213
|
+
export interface CatalogItemDtoOutput {
|
|
214
|
+
id: number;
|
|
215
|
+
name: string;
|
|
216
|
+
icon: string;
|
|
217
|
+
stat: string;
|
|
218
|
+
lvl: number;
|
|
219
|
+
/** @nullable */
|
|
220
|
+
rarity: string | null;
|
|
221
|
+
/** @nullable */
|
|
222
|
+
type: string | null;
|
|
223
|
+
droppedBy: CatalogDropSourceDtoOutput[];
|
|
224
|
+
/** Whether the item takes the level of the character who loots it, so `lvl` and `stat` describe one of its levels. */
|
|
225
|
+
elasticLevel: boolean;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Public catalog items
|
|
229
|
+
*/
|
|
230
|
+
export interface CatalogItemsResponseDtoOutput {
|
|
231
|
+
hits: CatalogItemDtoOutput[];
|
|
232
|
+
estimatedTotalHits: number;
|
|
233
|
+
}
|
|
234
|
+
export type CatalogNpcDtoOutputType = typeof CatalogNpcDtoOutputType[keyof typeof CatalogNpcDtoOutputType];
|
|
235
|
+
export declare const CatalogNpcDtoOutputType: {
|
|
236
|
+
readonly COMMON: 'COMMON';
|
|
237
|
+
readonly ELITE: 'ELITE';
|
|
238
|
+
readonly ELITE2: 'ELITE2';
|
|
239
|
+
readonly ELITE3: 'ELITE3';
|
|
240
|
+
readonly HERO: 'HERO';
|
|
241
|
+
readonly EVENT_HERO: 'EVENT_HERO';
|
|
242
|
+
readonly COLOSSUS: 'COLOSSUS';
|
|
243
|
+
readonly TITAN: 'TITAN';
|
|
244
|
+
readonly HERO_TRACKER: 'HERO_TRACKER';
|
|
245
|
+
readonly NPC: 'NPC';
|
|
246
|
+
};
|
|
247
|
+
export type CatalogNpcDtoOutputGameVersion = typeof CatalogNpcDtoOutputGameVersion[keyof typeof CatalogNpcDtoOutputGameVersion];
|
|
248
|
+
export declare const CatalogNpcDtoOutputGameVersion: {
|
|
249
|
+
readonly en: 'en';
|
|
250
|
+
readonly pl: 'pl';
|
|
251
|
+
};
|
|
252
|
+
export type CatalogNpcDtoOutputLocationsItem = {
|
|
253
|
+
/** The map's name. */
|
|
254
|
+
map: string;
|
|
255
|
+
/** The share of the NPC's latest recorded fights on the map, from 0 to 1, rounded to a hundredth. */
|
|
256
|
+
share: number;
|
|
257
|
+
};
|
|
258
|
+
export type CatalogNpcDtoOutputFormerLevelsItem = {
|
|
259
|
+
/** The level it had. */
|
|
260
|
+
lvl: number;
|
|
261
|
+
/** The UTC day, as `YYYY-MM-DD`, its next level was first recorded. */
|
|
262
|
+
until: string;
|
|
263
|
+
};
|
|
264
|
+
/**
|
|
265
|
+
* A Margonem NPC in the public catalog
|
|
266
|
+
*/
|
|
267
|
+
export interface CatalogNpcDtoOutput {
|
|
268
|
+
/** Stable catalog key of the NPC, used to link its page. */
|
|
269
|
+
key: string;
|
|
270
|
+
id: number;
|
|
271
|
+
name: string;
|
|
272
|
+
icon: string;
|
|
273
|
+
lvl: number;
|
|
274
|
+
type: CatalogNpcDtoOutputType;
|
|
275
|
+
gameVersion: CatalogNpcDtoOutputGameVersion;
|
|
276
|
+
/** Maps the NPC is fought on, most fought first, from its latest 1000 recorded fights; maps under 1% of them are left out. Lootlog recomputes them daily, so an NPC first seen today may have none yet. */
|
|
277
|
+
locations: CatalogNpcDtoOutputLocationsItem[];
|
|
278
|
+
/** Levels the NPC had before the game changed it, oldest first. Lootlog recomputes them daily from recorded fights and leaves out NPCs whose level follows the player's. */
|
|
279
|
+
formerLevels: CatalogNpcDtoOutputFormerLevelsItem[];
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Public catalog NPCs
|
|
283
|
+
*/
|
|
284
|
+
export interface CatalogNpcsResponseDtoOutput {
|
|
285
|
+
hits: CatalogNpcDtoOutput[];
|
|
286
|
+
estimatedTotalHits: number;
|
|
287
|
+
}
|
|
147
288
|
export type PlayersControllerGetPlayersParams = {
|
|
148
289
|
limit?: number;
|
|
149
290
|
search?: string | string[];
|
|
@@ -166,7 +307,6 @@ export type NpcsControllerGetNpcsParams = {
|
|
|
166
307
|
ids?: number[];
|
|
167
308
|
limit?: number;
|
|
168
309
|
search?: string | string[];
|
|
169
|
-
world?: string;
|
|
170
310
|
};
|
|
171
311
|
export type NpcsControllerGetNpcs401 = {
|
|
172
312
|
message: string;
|
|
@@ -181,7 +321,6 @@ export type ItemsControllerGetItemsParams = {
|
|
|
181
321
|
limit?: number;
|
|
182
322
|
offset?: number;
|
|
183
323
|
search?: string;
|
|
184
|
-
world?: string;
|
|
185
324
|
filter?: string | string[];
|
|
186
325
|
facets?: string[];
|
|
187
326
|
sort?: string[];
|
|
@@ -198,6 +337,9 @@ export type ItemsControllerGetItems429 = {
|
|
|
198
337
|
export type AllControllerSearchAllParams = {
|
|
199
338
|
limit?: number;
|
|
200
339
|
search?: string;
|
|
340
|
+
/**
|
|
341
|
+
* Filters players by world. NPC and item results cover every world of their edition.
|
|
342
|
+
*/
|
|
201
343
|
world?: string;
|
|
202
344
|
};
|
|
203
345
|
export type AllControllerSearchAll401 = {
|
|
@@ -209,6 +351,96 @@ export type AllControllerSearchAll403 = {
|
|
|
209
351
|
export type AllControllerSearchAll429 = {
|
|
210
352
|
message: string;
|
|
211
353
|
};
|
|
354
|
+
export type CatalogControllerGetItemsParams = {
|
|
355
|
+
search?: string;
|
|
356
|
+
/**
|
|
357
|
+
* Only entries of this game edition.
|
|
358
|
+
*/
|
|
359
|
+
gameVersion?: CatalogControllerGetItemsGameVersion;
|
|
360
|
+
/**
|
|
361
|
+
* @items.minimum -9007199254740991
|
|
362
|
+
* @items.maximum 9007199254740991
|
|
363
|
+
*/
|
|
364
|
+
ids?: number[];
|
|
365
|
+
rarities?: string[];
|
|
366
|
+
types?: string[];
|
|
367
|
+
professions?: string[];
|
|
368
|
+
minLevel?: number;
|
|
369
|
+
maxLevel?: number;
|
|
370
|
+
statKeys?: string[];
|
|
371
|
+
excludedStatKeys?: string[];
|
|
372
|
+
legendaryBonuses?: string[];
|
|
373
|
+
dropSourceTypes?: string[];
|
|
374
|
+
/**
|
|
375
|
+
* Items of the event with this slug: its name and year, such as `wakacje-2026`.
|
|
376
|
+
*/
|
|
377
|
+
event?: string;
|
|
378
|
+
/**
|
|
379
|
+
* Items that drop from the NPC with this catalog key.
|
|
380
|
+
*/
|
|
381
|
+
droppedBy?: string;
|
|
382
|
+
/**
|
|
383
|
+
* `id:desc` lists the items Margonem added most recently first. `attackSpeed:desc` lists first the items that add the most attack speed to a character with at least 100 agility: their own attack speed plus 0.002 for each point of agility or all attributes. `upgradedAttackSpeed:desc` ranks the same attack speed with each item upgraded to +5 and given the +5 bonus that adds the most of it: attack speed on weapons, agility or all attributes on other pieces.
|
|
384
|
+
*/
|
|
385
|
+
sort?: CatalogControllerGetItemsSort;
|
|
386
|
+
limit?: number;
|
|
387
|
+
offset?: number;
|
|
388
|
+
};
|
|
389
|
+
export type CatalogControllerGetItemsGameVersion = typeof CatalogControllerGetItemsGameVersion[keyof typeof CatalogControllerGetItemsGameVersion];
|
|
390
|
+
export declare const CatalogControllerGetItemsGameVersion: {
|
|
391
|
+
readonly en: 'en';
|
|
392
|
+
readonly pl: 'pl';
|
|
393
|
+
};
|
|
394
|
+
export type CatalogControllerGetItemsSort = typeof CatalogControllerGetItemsSort[keyof typeof CatalogControllerGetItemsSort];
|
|
395
|
+
export declare const CatalogControllerGetItemsSort: {
|
|
396
|
+
readonly relevance: 'relevance';
|
|
397
|
+
readonly 'id:desc': 'id:desc';
|
|
398
|
+
readonly 'lvl:asc': 'lvl:asc';
|
|
399
|
+
readonly 'lvl:desc': 'lvl:desc';
|
|
400
|
+
readonly 'name:asc': 'name:asc';
|
|
401
|
+
readonly 'name:desc': 'name:desc';
|
|
402
|
+
readonly 'attackSpeed:desc': 'attackSpeed:desc';
|
|
403
|
+
readonly 'upgradedAttackSpeed:desc': 'upgradedAttackSpeed:desc';
|
|
404
|
+
};
|
|
405
|
+
export type CatalogControllerGetItems401 = {
|
|
406
|
+
message: string;
|
|
407
|
+
};
|
|
408
|
+
export type CatalogControllerGetItems403 = {
|
|
409
|
+
message: string;
|
|
410
|
+
};
|
|
411
|
+
export type CatalogControllerGetItems429 = {
|
|
412
|
+
message: string;
|
|
413
|
+
};
|
|
414
|
+
export type CatalogControllerGetNpcsParams = {
|
|
415
|
+
search?: string;
|
|
416
|
+
/**
|
|
417
|
+
* Only entries of this game edition.
|
|
418
|
+
*/
|
|
419
|
+
gameVersion?: CatalogControllerGetNpcsGameVersion;
|
|
420
|
+
/**
|
|
421
|
+
* @items.minimum -9007199254740991
|
|
422
|
+
* @items.maximum 9007199254740991
|
|
423
|
+
*/
|
|
424
|
+
ids?: number[];
|
|
425
|
+
keys?: string[];
|
|
426
|
+
types?: string[];
|
|
427
|
+
limit?: number;
|
|
428
|
+
offset?: number;
|
|
429
|
+
};
|
|
430
|
+
export type CatalogControllerGetNpcsGameVersion = typeof CatalogControllerGetNpcsGameVersion[keyof typeof CatalogControllerGetNpcsGameVersion];
|
|
431
|
+
export declare const CatalogControllerGetNpcsGameVersion: {
|
|
432
|
+
readonly en: 'en';
|
|
433
|
+
readonly pl: 'pl';
|
|
434
|
+
};
|
|
435
|
+
export type CatalogControllerGetNpcs401 = {
|
|
436
|
+
message: string;
|
|
437
|
+
};
|
|
438
|
+
export type CatalogControllerGetNpcs403 = {
|
|
439
|
+
message: string;
|
|
440
|
+
};
|
|
441
|
+
export type CatalogControllerGetNpcs429 = {
|
|
442
|
+
message: string;
|
|
443
|
+
};
|
|
212
444
|
export declare const getPlayersControllerGetPlayersUrl: (params?: PlayersControllerGetPlayersParams) => string;
|
|
213
445
|
/**
|
|
214
446
|
* @summary Search players by name
|
|
@@ -229,5 +461,15 @@ export declare const getAllControllerSearchAllUrl: (params?: AllControllerSearch
|
|
|
229
461
|
* @summary Search across all categories
|
|
230
462
|
*/
|
|
231
463
|
export declare const allControllerSearchAll: (params?: AllControllerSearchAllParams, options?: Parameters<typeof searchFetch>[1]) => Promise<SearchAllResponseDtoOutput>;
|
|
464
|
+
export declare const getCatalogControllerGetItemsUrl: (params?: CatalogControllerGetItemsParams) => string;
|
|
465
|
+
/**
|
|
466
|
+
* @summary List items in the public catalog
|
|
467
|
+
*/
|
|
468
|
+
export declare const catalogControllerGetItems: (params?: CatalogControllerGetItemsParams, options?: Parameters<typeof searchFetch>[1]) => Promise<CatalogItemsResponseDtoOutput>;
|
|
469
|
+
export declare const getCatalogControllerGetNpcsUrl: (params?: CatalogControllerGetNpcsParams) => string;
|
|
470
|
+
/**
|
|
471
|
+
* @summary List NPCs in the public catalog
|
|
472
|
+
*/
|
|
473
|
+
export declare const catalogControllerGetNpcs: (params?: CatalogControllerGetNpcsParams, options?: Parameters<typeof searchFetch>[1]) => Promise<CatalogNpcsResponseDtoOutput>;
|
|
232
474
|
//#endregion
|
|
233
475
|
//# sourceMappingURL=search.d.ts.map
|
package/dist/search.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","names":[],"sources":["../src/generated/search.ts"],"mappings":";;;;;iBAWiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;YAGU,sCAAsC,0CAA0C;qBAG/E;WACX;;iBAGe;EACf,MAAM;EACN;;YAGU,6BAA6B,iCAAiC;qBAG7D;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;iBAMe;EACf;
|
|
1
|
+
{"version":3,"file":"search.d.ts","names":[],"sources":["../src/generated/search.ts"],"mappings":";;;;;iBAWiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;YAGU,sCAAsC,0CAA0C;qBAG/E;WACX;;iBAGe;EACf,MAAM;EACN;;;;;YAMU,0CAA0C,8CAA8C;qBAGvF;WACX;WACA;WACA;;YAGU,6BAA6B,iCAAiC;qBAG7D;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;YAMU,oCAAoC,wCAAwC;qBAG3E;WACX;WACA;;;;;iBAMe;EACf;;EAEA,mBAAmB;EACnB;EACA;EACA;EACA;EACA;EACA,MAAM;EACN;;EAEA;;EAEA,aAAa;;;;;YAMH;EACV;EACA;EACA;EACA;EACA;;EAEA;;EAEA;EACA;;YAGU;GAAkD;KAAgB;;;YAElE;GAA2C;IACrD;IACA;;;;;;iBAMe;EACf,MAAM;EACN;EACA,mBAAmB;EACnB,YAAY;;;;;YAMF;EACV;EACA;EACA;EACA;EACA;;EAEA;;EAEA;EACA;;;;;YAMU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;YAMU,6DAA6D,iEAAiE;qBAG7H;WACX;WACA;WACA;;YAGU,gDAAgD,oDAAoD;qBAGnG;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;YAMU,uDAAuD,2DAA2D;qBAGjH;WACX;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;EACV;;YAGU;EACV;;qBAGW,oCAAiC,SAAa;;;;qBA0B9C,8BAA2B,SAAmB,mCAAiC,UAAY,kBAAkB,oBAAkB,QAAQ;qBAavI,8BAA2B,SAAa;;;;qBA0BxC,wBAAqB,SAAmB,6BAA2B,UAAY,kBAAkB,oBAAkB,QAAQ;qBAa3H,gCAA6B,SAAa;;;;qBA0B1C,0BAAuB,SAAmB,+BAA6B,UAAY,kBAAkB,oBAAkB,QAAQ;qBAa/H,+BAA4B,SAAa;;;;qBAkBzC,yBAAsB,SAAmB,8BAA4B,UAAY,kBAAkB,oBAAkB,QAAQ;qBAa7H,kCAA+B,SAAa;;;;qBA0B5C,4BAAyB,SAAmB,iCAA+B,UAAY,kBAAkB,oBAAkB,QAAQ;qBAanI,iCAA8B,SAAa;;;;qBA0B3C,2BAAwB,SAAmB,gCAA8B,UAAY,kBAAkB,oBAAkB,QAAQ"}
|
package/dist/search.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as searchFetch } from "./mutators-
|
|
1
|
+
import { i as searchFetch } from "./mutators-Dj5qBH3y.js";
|
|
2
2
|
//#region src/generated/search.ts
|
|
3
3
|
/**
|
|
4
4
|
* Generated by orval 🍺
|
|
@@ -8,6 +8,11 @@ import { i as searchFetch } from "./mutators-CaBTxpi-.js";
|
|
|
8
8
|
* OpenAPI spec version: 1.0
|
|
9
9
|
*/
|
|
10
10
|
const _SearchUnavailableEncodedTag = { SearchUnavailable: "SearchUnavailable" };
|
|
11
|
+
const NpcHitDtoOutputIdentityNamespace = {
|
|
12
|
+
legacy: "legacy",
|
|
13
|
+
runtime: "runtime",
|
|
14
|
+
template: "template"
|
|
15
|
+
};
|
|
11
16
|
const NpcHitDtoOutputType = {
|
|
12
17
|
COMMON: "COMMON",
|
|
13
18
|
ELITE: "ELITE",
|
|
@@ -17,8 +22,18 @@ const NpcHitDtoOutputType = {
|
|
|
17
22
|
EVENT_HERO: "EVENT_HERO",
|
|
18
23
|
COLOSSUS: "COLOSSUS",
|
|
19
24
|
TITAN: "TITAN",
|
|
25
|
+
HERO_TRACKER: "HERO_TRACKER",
|
|
20
26
|
NPC: "NPC"
|
|
21
27
|
};
|
|
28
|
+
const NpcHitDtoOutputGameVersion = {
|
|
29
|
+
en: "en",
|
|
30
|
+
pl: "pl"
|
|
31
|
+
};
|
|
32
|
+
const SearchAllResponseDtoOutputNpcsItemIdentityNamespace = {
|
|
33
|
+
legacy: "legacy",
|
|
34
|
+
runtime: "runtime",
|
|
35
|
+
template: "template"
|
|
36
|
+
};
|
|
22
37
|
const SearchAllResponseDtoOutputNpcsItemType = {
|
|
23
38
|
COMMON: "COMMON",
|
|
24
39
|
ELITE: "ELITE",
|
|
@@ -28,8 +43,47 @@ const SearchAllResponseDtoOutputNpcsItemType = {
|
|
|
28
43
|
EVENT_HERO: "EVENT_HERO",
|
|
29
44
|
COLOSSUS: "COLOSSUS",
|
|
30
45
|
TITAN: "TITAN",
|
|
46
|
+
HERO_TRACKER: "HERO_TRACKER",
|
|
47
|
+
NPC: "NPC"
|
|
48
|
+
};
|
|
49
|
+
const SearchAllResponseDtoOutputNpcsItemGameVersion = {
|
|
50
|
+
en: "en",
|
|
51
|
+
pl: "pl"
|
|
52
|
+
};
|
|
53
|
+
const CatalogNpcDtoOutputType = {
|
|
54
|
+
COMMON: "COMMON",
|
|
55
|
+
ELITE: "ELITE",
|
|
56
|
+
ELITE2: "ELITE2",
|
|
57
|
+
ELITE3: "ELITE3",
|
|
58
|
+
HERO: "HERO",
|
|
59
|
+
EVENT_HERO: "EVENT_HERO",
|
|
60
|
+
COLOSSUS: "COLOSSUS",
|
|
61
|
+
TITAN: "TITAN",
|
|
62
|
+
HERO_TRACKER: "HERO_TRACKER",
|
|
31
63
|
NPC: "NPC"
|
|
32
64
|
};
|
|
65
|
+
const CatalogNpcDtoOutputGameVersion = {
|
|
66
|
+
en: "en",
|
|
67
|
+
pl: "pl"
|
|
68
|
+
};
|
|
69
|
+
const CatalogControllerGetItemsGameVersion = {
|
|
70
|
+
en: "en",
|
|
71
|
+
pl: "pl"
|
|
72
|
+
};
|
|
73
|
+
const CatalogControllerGetItemsSort = {
|
|
74
|
+
relevance: "relevance",
|
|
75
|
+
"id:desc": "id:desc",
|
|
76
|
+
"lvl:asc": "lvl:asc",
|
|
77
|
+
"lvl:desc": "lvl:desc",
|
|
78
|
+
"name:asc": "name:asc",
|
|
79
|
+
"name:desc": "name:desc",
|
|
80
|
+
"attackSpeed:desc": "attackSpeed:desc",
|
|
81
|
+
"upgradedAttackSpeed:desc": "upgradedAttackSpeed:desc"
|
|
82
|
+
};
|
|
83
|
+
const CatalogControllerGetNpcsGameVersion = {
|
|
84
|
+
en: "en",
|
|
85
|
+
pl: "pl"
|
|
86
|
+
};
|
|
33
87
|
const getPlayersControllerGetPlayersUrl = (params) => {
|
|
34
88
|
const normalizedParams = new URLSearchParams();
|
|
35
89
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -120,7 +174,66 @@ const allControllerSearchAll = async (params, options) => {
|
|
|
120
174
|
method: "GET"
|
|
121
175
|
});
|
|
122
176
|
};
|
|
177
|
+
const getCatalogControllerGetItemsUrl = (params) => {
|
|
178
|
+
const normalizedParams = new URLSearchParams();
|
|
179
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
180
|
+
if (Array.isArray(value) && [
|
|
181
|
+
"ids",
|
|
182
|
+
"rarities",
|
|
183
|
+
"types",
|
|
184
|
+
"professions",
|
|
185
|
+
"statKeys",
|
|
186
|
+
"excludedStatKeys",
|
|
187
|
+
"legendaryBonuses",
|
|
188
|
+
"dropSourceTypes"
|
|
189
|
+
].includes(key)) {
|
|
190
|
+
value.forEach((v) => {
|
|
191
|
+
normalizedParams.append(key, v === null ? "null" : String(v));
|
|
192
|
+
});
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
196
|
+
});
|
|
197
|
+
const stringifiedParams = normalizedParams.toString();
|
|
198
|
+
return stringifiedParams.length > 0 ? `/public/catalog/items?${stringifiedParams}` : `/public/catalog/items`;
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* @summary List items in the public catalog
|
|
202
|
+
*/
|
|
203
|
+
const catalogControllerGetItems = async (params, options) => {
|
|
204
|
+
return searchFetch(getCatalogControllerGetItemsUrl(params), {
|
|
205
|
+
...options,
|
|
206
|
+
method: "GET"
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
const getCatalogControllerGetNpcsUrl = (params) => {
|
|
210
|
+
const normalizedParams = new URLSearchParams();
|
|
211
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
212
|
+
if (Array.isArray(value) && [
|
|
213
|
+
"ids",
|
|
214
|
+
"keys",
|
|
215
|
+
"types"
|
|
216
|
+
].includes(key)) {
|
|
217
|
+
value.forEach((v) => {
|
|
218
|
+
normalizedParams.append(key, v === null ? "null" : String(v));
|
|
219
|
+
});
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
223
|
+
});
|
|
224
|
+
const stringifiedParams = normalizedParams.toString();
|
|
225
|
+
return stringifiedParams.length > 0 ? `/public/catalog/npcs?${stringifiedParams}` : `/public/catalog/npcs`;
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* @summary List NPCs in the public catalog
|
|
229
|
+
*/
|
|
230
|
+
const catalogControllerGetNpcs = async (params, options) => {
|
|
231
|
+
return searchFetch(getCatalogControllerGetNpcsUrl(params), {
|
|
232
|
+
...options,
|
|
233
|
+
method: "GET"
|
|
234
|
+
});
|
|
235
|
+
};
|
|
123
236
|
//#endregion
|
|
124
|
-
export { NpcHitDtoOutputType, SearchAllResponseDtoOutputNpcsItemType, _SearchUnavailableEncodedTag, allControllerSearchAll, getAllControllerSearchAllUrl, getItemsControllerGetItemsUrl, getNpcsControllerGetNpcsUrl, getPlayersControllerGetPlayersUrl, itemsControllerGetItems, npcsControllerGetNpcs, playersControllerGetPlayers };
|
|
237
|
+
export { CatalogControllerGetItemsGameVersion, CatalogControllerGetItemsSort, CatalogControllerGetNpcsGameVersion, CatalogNpcDtoOutputGameVersion, CatalogNpcDtoOutputType, NpcHitDtoOutputGameVersion, NpcHitDtoOutputIdentityNamespace, NpcHitDtoOutputType, SearchAllResponseDtoOutputNpcsItemGameVersion, SearchAllResponseDtoOutputNpcsItemIdentityNamespace, SearchAllResponseDtoOutputNpcsItemType, _SearchUnavailableEncodedTag, allControllerSearchAll, catalogControllerGetItems, catalogControllerGetNpcs, getAllControllerSearchAllUrl, getCatalogControllerGetItemsUrl, getCatalogControllerGetNpcsUrl, getItemsControllerGetItemsUrl, getNpcsControllerGetNpcsUrl, getPlayersControllerGetPlayersUrl, itemsControllerGetItems, npcsControllerGetNpcs, playersControllerGetPlayers };
|
|
125
238
|
|
|
126
239
|
//# sourceMappingURL=search.js.map
|
package/dist/search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","names":[],"sources":["../src/generated/search.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Search API\n * Meilisearch-powered search microservice\n * OpenAPI spec version: 1.0\n */\nimport { searchFetch } from '../mutators';\n/**\n * Player search hit\n */\nexport interface PlayerHitDtoOutput {\n id: string;\n name: string;\n lvl: number;\n prof: string;\n icon: string;\n characterId: number;\n accountId: number;\n world: string;\n}\n\nexport type _SearchUnavailableEncodedTag = typeof _SearchUnavailableEncodedTag[keyof typeof _SearchUnavailableEncodedTag];\n\n\nexport const _SearchUnavailableEncodedTag = {\n SearchUnavailable: 'SearchUnavailable',\n} as const;\n\nexport interface SearchUnavailableEncoded {\n _tag: _SearchUnavailableEncodedTag;\n message: string;\n}\n\nexport type NpcHitDtoOutputType = typeof NpcHitDtoOutputType[keyof typeof NpcHitDtoOutputType];\n\n\nexport const NpcHitDtoOutputType = {\n COMMON: 'COMMON',\n ELITE: 'ELITE',\n ELITE2: 'ELITE2',\n ELITE3: 'ELITE3',\n HERO: 'HERO',\n EVENT_HERO: 'EVENT_HERO',\n COLOSSUS: 'COLOSSUS',\n TITAN: 'TITAN',\n NPC: 'NPC',\n} as const;\n\n/**\n * NPC search hit\n */\nexport interface NpcHitDtoOutput {\n id: number;\n prof: string;\n icon: string;\n name: string;\n lvl: number;\n wt: number;\n type: NpcHitDtoOutputType;\n margonemType: number;\n world: string;\n}\n\n/**\n * Item search hit\n */\nexport type SearchItemsResponseDtoOutputHitsItem = {\n id: number;\n name: string;\n icon: string;\n stat: string;\n lvl: number;\n /** @nullable */\n rarity: string | null;\n /** @nullable */\n type: string | null;\n worlds: string[];\n};\n\nexport type SearchItemsResponseDtoOutputFacetDistribution = {[key: string]: {[key: string]: number}};\n\nexport type SearchItemsResponseDtoOutputFacetStats = {[key: string]: {\n min: number;\n max: number;\n}};\n\n/**\n * Item search results\n */\nexport interface SearchItemsResponseDtoOutput {\n hits: SearchItemsResponseDtoOutputHitsItem[];\n estimatedTotalHits: number;\n facetDistribution: SearchItemsResponseDtoOutputFacetDistribution;\n facetStats: SearchItemsResponseDtoOutputFacetStats;\n}\n\n/**\n * Item search hit\n */\nexport type SearchAllResponseDtoOutputItemsItem = {\n id: number;\n name: string;\n icon: string;\n stat: string;\n lvl: number;\n /** @nullable */\n rarity: string | null;\n /** @nullable */\n type: string | null;\n worlds: string[];\n};\n\n/**\n * Player search hit\n */\nexport type SearchAllResponseDtoOutputPlayersItem = {\n id: string;\n name: string;\n lvl: number;\n prof: string;\n icon: string;\n characterId: number;\n accountId: number;\n world: string;\n};\n\nexport type SearchAllResponseDtoOutputNpcsItemType = typeof SearchAllResponseDtoOutputNpcsItemType[keyof typeof SearchAllResponseDtoOutputNpcsItemType];\n\n\nexport const SearchAllResponseDtoOutputNpcsItemType = {\n COMMON: 'COMMON',\n ELITE: 'ELITE',\n ELITE2: 'ELITE2',\n ELITE3: 'ELITE3',\n HERO: 'HERO',\n EVENT_HERO: 'EVENT_HERO',\n COLOSSUS: 'COLOSSUS',\n TITAN: 'TITAN',\n NPC: 'NPC',\n} as const;\n\n/**\n * NPC search hit\n */\nexport type SearchAllResponseDtoOutputNpcsItem = {\n id: number;\n prof: string;\n icon: string;\n name: string;\n lvl: number;\n wt: number;\n type: SearchAllResponseDtoOutputNpcsItemType;\n margonemType: number;\n world: string;\n};\n\n/**\n * Aggregated search results\n */\nexport interface SearchAllResponseDtoOutput {\n items: SearchAllResponseDtoOutputItemsItem[];\n players: SearchAllResponseDtoOutputPlayersItem[];\n npcs: SearchAllResponseDtoOutputNpcsItem[];\n}\n\nexport type PlayersControllerGetPlayersParams = {\nlimit?: number;\nsearch?: string | string[];\nworld?: string;\n};\n\nexport type PlayersControllerGetPlayers401 = {\n message: string;\n};\n\nexport type PlayersControllerGetPlayers403 = {\n message: string;\n};\n\nexport type PlayersControllerGetPlayers429 = {\n message: string;\n};\n\nexport type NpcsControllerGetNpcsParams = {\n/**\n * @items.minimum -9007199254740991\n * @items.maximum 9007199254740991\n */\nids?: number[];\nlimit?: number;\nsearch?: string | string[];\nworld?: string;\n};\n\nexport type NpcsControllerGetNpcs401 = {\n message: string;\n};\n\nexport type NpcsControllerGetNpcs403 = {\n message: string;\n};\n\nexport type NpcsControllerGetNpcs429 = {\n message: string;\n};\n\nexport type ItemsControllerGetItemsParams = {\nlimit?: number;\noffset?: number;\nsearch?: string;\nworld?: string;\nfilter?: string | string[];\nfacets?: string[];\nsort?: string[];\n};\n\nexport type ItemsControllerGetItems401 = {\n message: string;\n};\n\nexport type ItemsControllerGetItems403 = {\n message: string;\n};\n\nexport type ItemsControllerGetItems429 = {\n message: string;\n};\n\nexport type AllControllerSearchAllParams = {\nlimit?: number;\nsearch?: string;\nworld?: string;\n};\n\nexport type AllControllerSearchAll401 = {\n message: string;\n};\n\nexport type AllControllerSearchAll403 = {\n message: string;\n};\n\nexport type AllControllerSearchAll429 = {\n message: string;\n};\n\nexport const getPlayersControllerGetPlayersUrl = (params?: PlayersControllerGetPlayersParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"search\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/players?${stringifiedParams}` : `/players`\n}\n\n/**\n * @summary Search players by name\n */\nexport const playersControllerGetPlayers = async (params?: PlayersControllerGetPlayersParams, options?: Parameters<typeof searchFetch>[1]): Promise<PlayerHitDtoOutput[]> => {\n\n return searchFetch<PlayerHitDtoOutput[]>(getPlayersControllerGetPlayersUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\nexport const getNpcsControllerGetNpcsUrl = (params?: NpcsControllerGetNpcsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"ids\",\"search\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/npcs?${stringifiedParams}` : `/npcs`\n}\n\n/**\n * @summary Search NPCs by name\n */\nexport const npcsControllerGetNpcs = async (params?: NpcsControllerGetNpcsParams, options?: Parameters<typeof searchFetch>[1]): Promise<NpcHitDtoOutput[]> => {\n\n return searchFetch<NpcHitDtoOutput[]>(getNpcsControllerGetNpcsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\nexport const getItemsControllerGetItemsUrl = (params?: ItemsControllerGetItemsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"filter\",\"facets\",\"sort\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/items?${stringifiedParams}` : `/items`\n}\n\n/**\n * @summary Search items with filters, sorting, and facets\n */\nexport const itemsControllerGetItems = async (params?: ItemsControllerGetItemsParams, options?: Parameters<typeof searchFetch>[1]): Promise<SearchItemsResponseDtoOutput> => {\n\n return searchFetch<SearchItemsResponseDtoOutput>(getItemsControllerGetItemsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\nexport const getAllControllerSearchAllUrl = (params?: AllControllerSearchAllParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/all?${stringifiedParams}` : `/all`\n}\n\n/**\n * @summary Search across all categories\n */\nexport const allControllerSearchAll = async (params?: AllControllerSearchAllParams, options?: Parameters<typeof searchFetch>[1]): Promise<SearchAllResponseDtoOutput> => {\n\n return searchFetch<SearchAllResponseDtoOutput>(getAllControllerSearchAllUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n"],"mappings":";;;;;;;;;AAyBA,MAAa,+BAA+B,EAC1C,mBAAmB,oBACrB;AAUA,MAAa,sBAAsB;CACjC,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,YAAY;CACZ,UAAU;CACV,OAAO;CACP,KAAK;AACP;AAmFA,MAAa,yCAAyC;CACpD,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,MAAM;C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"search.js","names":[],"sources":["../src/generated/search.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Search API\n * Meilisearch-powered search microservice\n * OpenAPI spec version: 1.0\n */\nimport { searchFetch } from '../mutators';\n/**\n * Player search hit\n */\nexport interface PlayerHitDtoOutput {\n id: string;\n name: string;\n lvl: number;\n prof: string;\n icon: string;\n characterId: number;\n accountId: number;\n world: string;\n}\n\nexport type _SearchUnavailableEncodedTag = typeof _SearchUnavailableEncodedTag[keyof typeof _SearchUnavailableEncodedTag];\n\n\nexport const _SearchUnavailableEncodedTag = {\n SearchUnavailable: 'SearchUnavailable',\n} as const;\n\nexport interface SearchUnavailableEncoded {\n _tag: _SearchUnavailableEncodedTag;\n message: string;\n}\n\n/**\n * Meaning of `id`: a Margonem template id, a runtime spawn id observed without a template, or an overloaded legacy id.\n */\nexport type NpcHitDtoOutputIdentityNamespace = typeof NpcHitDtoOutputIdentityNamespace[keyof typeof NpcHitDtoOutputIdentityNamespace];\n\n\nexport const NpcHitDtoOutputIdentityNamespace = {\n legacy: 'legacy',\n runtime: 'runtime',\n template: 'template',\n} as const;\n\nexport type NpcHitDtoOutputType = typeof NpcHitDtoOutputType[keyof typeof NpcHitDtoOutputType];\n\n\nexport const NpcHitDtoOutputType = {\n COMMON: 'COMMON',\n ELITE: 'ELITE',\n ELITE2: 'ELITE2',\n ELITE3: 'ELITE3',\n HERO: 'HERO',\n EVENT_HERO: 'EVENT_HERO',\n COLOSSUS: 'COLOSSUS',\n TITAN: 'TITAN',\n HERO_TRACKER: 'HERO_TRACKER',\n NPC: 'NPC',\n} as const;\n\n/**\n * Margonem edition of the NPC: `pl` for margonem.pl, `en` for margonem.com. Equal ids in different editions are unrelated.\n */\nexport type NpcHitDtoOutputGameVersion = typeof NpcHitDtoOutputGameVersion[keyof typeof NpcHitDtoOutputGameVersion];\n\n\nexport const NpcHitDtoOutputGameVersion = {\n en: 'en',\n pl: 'pl',\n} as const;\n\n/**\n * NPC search hit\n */\nexport interface NpcHitDtoOutput {\n id: number;\n /** Meaning of `id`: a Margonem template id, a runtime spawn id observed without a template, or an overloaded legacy id. */\n identityNamespace: NpcHitDtoOutputIdentityNamespace;\n prof: string;\n icon: string;\n name: string;\n lvl: number;\n wt: number;\n type: NpcHitDtoOutputType;\n margonemType: number;\n /** Worlds of the edition where this NPC was observed. */\n worlds: string[];\n /** Margonem edition of the NPC: `pl` for margonem.pl, `en` for margonem.com. Equal ids in different editions are unrelated. */\n gameVersion: NpcHitDtoOutputGameVersion;\n}\n\n/**\n * Item search hit\n */\nexport type SearchItemsResponseDtoOutputHitsItem = {\n id: number;\n name: string;\n icon: string;\n stat: string;\n lvl: number;\n /** @nullable */\n rarity: string | null;\n /** @nullable */\n type: string | null;\n worlds: string[];\n};\n\nexport type SearchItemsResponseDtoOutputFacetDistribution = {[key: string]: {[key: string]: number}};\n\nexport type SearchItemsResponseDtoOutputFacetStats = {[key: string]: {\n min: number;\n max: number;\n}};\n\n/**\n * Item search results\n */\nexport interface SearchItemsResponseDtoOutput {\n hits: SearchItemsResponseDtoOutputHitsItem[];\n estimatedTotalHits: number;\n facetDistribution: SearchItemsResponseDtoOutputFacetDistribution;\n facetStats: SearchItemsResponseDtoOutputFacetStats;\n}\n\n/**\n * Item search hit\n */\nexport type SearchAllResponseDtoOutputItemsItem = {\n id: number;\n name: string;\n icon: string;\n stat: string;\n lvl: number;\n /** @nullable */\n rarity: string | null;\n /** @nullable */\n type: string | null;\n worlds: string[];\n};\n\n/**\n * Player search hit\n */\nexport type SearchAllResponseDtoOutputPlayersItem = {\n id: string;\n name: string;\n lvl: number;\n prof: string;\n icon: string;\n characterId: number;\n accountId: number;\n world: string;\n};\n\n/**\n * Meaning of `id`: a Margonem template id, a runtime spawn id observed without a template, or an overloaded legacy id.\n */\nexport type SearchAllResponseDtoOutputNpcsItemIdentityNamespace = typeof SearchAllResponseDtoOutputNpcsItemIdentityNamespace[keyof typeof SearchAllResponseDtoOutputNpcsItemIdentityNamespace];\n\n\nexport const SearchAllResponseDtoOutputNpcsItemIdentityNamespace = {\n legacy: 'legacy',\n runtime: 'runtime',\n template: 'template',\n} as const;\n\nexport type SearchAllResponseDtoOutputNpcsItemType = typeof SearchAllResponseDtoOutputNpcsItemType[keyof typeof SearchAllResponseDtoOutputNpcsItemType];\n\n\nexport const SearchAllResponseDtoOutputNpcsItemType = {\n COMMON: 'COMMON',\n ELITE: 'ELITE',\n ELITE2: 'ELITE2',\n ELITE3: 'ELITE3',\n HERO: 'HERO',\n EVENT_HERO: 'EVENT_HERO',\n COLOSSUS: 'COLOSSUS',\n TITAN: 'TITAN',\n HERO_TRACKER: 'HERO_TRACKER',\n NPC: 'NPC',\n} as const;\n\n/**\n * Margonem edition of the NPC: `pl` for margonem.pl, `en` for margonem.com. Equal ids in different editions are unrelated.\n */\nexport type SearchAllResponseDtoOutputNpcsItemGameVersion = typeof SearchAllResponseDtoOutputNpcsItemGameVersion[keyof typeof SearchAllResponseDtoOutputNpcsItemGameVersion];\n\n\nexport const SearchAllResponseDtoOutputNpcsItemGameVersion = {\n en: 'en',\n pl: 'pl',\n} as const;\n\n/**\n * NPC search hit\n */\nexport type SearchAllResponseDtoOutputNpcsItem = {\n id: number;\n /** Meaning of `id`: a Margonem template id, a runtime spawn id observed without a template, or an overloaded legacy id. */\n identityNamespace: SearchAllResponseDtoOutputNpcsItemIdentityNamespace;\n prof: string;\n icon: string;\n name: string;\n lvl: number;\n wt: number;\n type: SearchAllResponseDtoOutputNpcsItemType;\n margonemType: number;\n /** Worlds of the edition where this NPC was observed. */\n worlds: string[];\n /** Margonem edition of the NPC: `pl` for margonem.pl, `en` for margonem.com. Equal ids in different editions are unrelated. */\n gameVersion: SearchAllResponseDtoOutputNpcsItemGameVersion;\n};\n\n/**\n * Aggregated search results\n */\nexport interface SearchAllResponseDtoOutput {\n items: SearchAllResponseDtoOutputItemsItem[];\n players: SearchAllResponseDtoOutputPlayersItem[];\n npcs: SearchAllResponseDtoOutputNpcsItem[];\n}\n\n/**\n * An NPC an item drops from\n */\nexport interface CatalogDropSourceDtoOutput {\n /** The NPC's catalog key, as `CatalogNpcDto_Output.key`. */\n key: string;\n id: number;\n name: string;\n /** @nullable */\n lvl: number | null;\n /** @nullable */\n icon: string | null;\n /** @nullable */\n type: string | null;\n /** Whether the NPC no longer drops the item: Lootlog has recorded its loot far too often since the item's last drop for the gap to be chance. */\n retired: boolean;\n}\n\n/**\n * A Margonem item in the public catalog\n */\nexport interface CatalogItemDtoOutput {\n id: number;\n name: string;\n icon: string;\n stat: string;\n lvl: number;\n /** @nullable */\n rarity: string | null;\n /** @nullable */\n type: string | null;\n droppedBy: CatalogDropSourceDtoOutput[];\n /** Whether the item takes the level of the character who loots it, so `lvl` and `stat` describe one of its levels. */\n elasticLevel: boolean;\n}\n\n/**\n * Public catalog items\n */\nexport interface CatalogItemsResponseDtoOutput {\n hits: CatalogItemDtoOutput[];\n estimatedTotalHits: number;\n}\n\nexport type CatalogNpcDtoOutputType = typeof CatalogNpcDtoOutputType[keyof typeof CatalogNpcDtoOutputType];\n\n\nexport const CatalogNpcDtoOutputType = {\n COMMON: 'COMMON',\n ELITE: 'ELITE',\n ELITE2: 'ELITE2',\n ELITE3: 'ELITE3',\n HERO: 'HERO',\n EVENT_HERO: 'EVENT_HERO',\n COLOSSUS: 'COLOSSUS',\n TITAN: 'TITAN',\n HERO_TRACKER: 'HERO_TRACKER',\n NPC: 'NPC',\n} as const;\n\nexport type CatalogNpcDtoOutputGameVersion = typeof CatalogNpcDtoOutputGameVersion[keyof typeof CatalogNpcDtoOutputGameVersion];\n\n\nexport const CatalogNpcDtoOutputGameVersion = {\n en: 'en',\n pl: 'pl',\n} as const;\n\nexport type CatalogNpcDtoOutputLocationsItem = {\n /** The map's name. */\n map: string;\n /** The share of the NPC's latest recorded fights on the map, from 0 to 1, rounded to a hundredth. */\n share: number;\n};\n\nexport type CatalogNpcDtoOutputFormerLevelsItem = {\n /** The level it had. */\n lvl: number;\n /** The UTC day, as `YYYY-MM-DD`, its next level was first recorded. */\n until: string;\n};\n\n/**\n * A Margonem NPC in the public catalog\n */\nexport interface CatalogNpcDtoOutput {\n /** Stable catalog key of the NPC, used to link its page. */\n key: string;\n id: number;\n name: string;\n icon: string;\n lvl: number;\n type: CatalogNpcDtoOutputType;\n gameVersion: CatalogNpcDtoOutputGameVersion;\n /** Maps the NPC is fought on, most fought first, from its latest 1000 recorded fights; maps under 1% of them are left out. Lootlog recomputes them daily, so an NPC first seen today may have none yet. */\n locations: CatalogNpcDtoOutputLocationsItem[];\n /** Levels the NPC had before the game changed it, oldest first. Lootlog recomputes them daily from recorded fights and leaves out NPCs whose level follows the player's. */\n formerLevels: CatalogNpcDtoOutputFormerLevelsItem[];\n}\n\n/**\n * Public catalog NPCs\n */\nexport interface CatalogNpcsResponseDtoOutput {\n hits: CatalogNpcDtoOutput[];\n estimatedTotalHits: number;\n}\n\nexport type PlayersControllerGetPlayersParams = {\nlimit?: number;\nsearch?: string | string[];\nworld?: string;\n};\n\nexport type PlayersControllerGetPlayers401 = {\n message: string;\n};\n\nexport type PlayersControllerGetPlayers403 = {\n message: string;\n};\n\nexport type PlayersControllerGetPlayers429 = {\n message: string;\n};\n\nexport type NpcsControllerGetNpcsParams = {\n/**\n * @items.minimum -9007199254740991\n * @items.maximum 9007199254740991\n */\nids?: number[];\nlimit?: number;\nsearch?: string | string[];\n};\n\nexport type NpcsControllerGetNpcs401 = {\n message: string;\n};\n\nexport type NpcsControllerGetNpcs403 = {\n message: string;\n};\n\nexport type NpcsControllerGetNpcs429 = {\n message: string;\n};\n\nexport type ItemsControllerGetItemsParams = {\nlimit?: number;\noffset?: number;\nsearch?: string;\nfilter?: string | string[];\nfacets?: string[];\nsort?: string[];\n};\n\nexport type ItemsControllerGetItems401 = {\n message: string;\n};\n\nexport type ItemsControllerGetItems403 = {\n message: string;\n};\n\nexport type ItemsControllerGetItems429 = {\n message: string;\n};\n\nexport type AllControllerSearchAllParams = {\nlimit?: number;\nsearch?: string;\n/**\n * Filters players by world. NPC and item results cover every world of their edition.\n */\nworld?: string;\n};\n\nexport type AllControllerSearchAll401 = {\n message: string;\n};\n\nexport type AllControllerSearchAll403 = {\n message: string;\n};\n\nexport type AllControllerSearchAll429 = {\n message: string;\n};\n\nexport type CatalogControllerGetItemsParams = {\nsearch?: string;\n/**\n * Only entries of this game edition.\n */\ngameVersion?: CatalogControllerGetItemsGameVersion;\n/**\n * @items.minimum -9007199254740991\n * @items.maximum 9007199254740991\n */\nids?: number[];\nrarities?: string[];\ntypes?: string[];\nprofessions?: string[];\nminLevel?: number;\nmaxLevel?: number;\nstatKeys?: string[];\nexcludedStatKeys?: string[];\nlegendaryBonuses?: string[];\ndropSourceTypes?: string[];\n/**\n * Items of the event with this slug: its name and year, such as `wakacje-2026`.\n */\nevent?: string;\n/**\n * Items that drop from the NPC with this catalog key.\n */\ndroppedBy?: string;\n/**\n * `id:desc` lists the items Margonem added most recently first. `attackSpeed:desc` lists first the items that add the most attack speed to a character with at least 100 agility: their own attack speed plus 0.002 for each point of agility or all attributes. `upgradedAttackSpeed:desc` ranks the same attack speed with each item upgraded to +5 and given the +5 bonus that adds the most of it: attack speed on weapons, agility or all attributes on other pieces.\n */\nsort?: CatalogControllerGetItemsSort;\nlimit?: number;\noffset?: number;\n};\n\nexport type CatalogControllerGetItemsGameVersion = typeof CatalogControllerGetItemsGameVersion[keyof typeof CatalogControllerGetItemsGameVersion];\n\n\nexport const CatalogControllerGetItemsGameVersion = {\n en: 'en',\n pl: 'pl',\n} as const;\n\nexport type CatalogControllerGetItemsSort = typeof CatalogControllerGetItemsSort[keyof typeof CatalogControllerGetItemsSort];\n\n\nexport const CatalogControllerGetItemsSort = {\n relevance: 'relevance',\n 'id:desc': 'id:desc',\n 'lvl:asc': 'lvl:asc',\n 'lvl:desc': 'lvl:desc',\n 'name:asc': 'name:asc',\n 'name:desc': 'name:desc',\n 'attackSpeed:desc': 'attackSpeed:desc',\n 'upgradedAttackSpeed:desc': 'upgradedAttackSpeed:desc',\n} as const;\n\nexport type CatalogControllerGetItems401 = {\n message: string;\n};\n\nexport type CatalogControllerGetItems403 = {\n message: string;\n};\n\nexport type CatalogControllerGetItems429 = {\n message: string;\n};\n\nexport type CatalogControllerGetNpcsParams = {\nsearch?: string;\n/**\n * Only entries of this game edition.\n */\ngameVersion?: CatalogControllerGetNpcsGameVersion;\n/**\n * @items.minimum -9007199254740991\n * @items.maximum 9007199254740991\n */\nids?: number[];\nkeys?: string[];\ntypes?: string[];\nlimit?: number;\noffset?: number;\n};\n\nexport type CatalogControllerGetNpcsGameVersion = typeof CatalogControllerGetNpcsGameVersion[keyof typeof CatalogControllerGetNpcsGameVersion];\n\n\nexport const CatalogControllerGetNpcsGameVersion = {\n en: 'en',\n pl: 'pl',\n} as const;\n\nexport type CatalogControllerGetNpcs401 = {\n message: string;\n};\n\nexport type CatalogControllerGetNpcs403 = {\n message: string;\n};\n\nexport type CatalogControllerGetNpcs429 = {\n message: string;\n};\n\nexport const getPlayersControllerGetPlayersUrl = (params?: PlayersControllerGetPlayersParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"search\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/players?${stringifiedParams}` : `/players`\n}\n\n/**\n * @summary Search players by name\n */\nexport const playersControllerGetPlayers = async (params?: PlayersControllerGetPlayersParams, options?: Parameters<typeof searchFetch>[1]): Promise<PlayerHitDtoOutput[]> => {\n\n return searchFetch<PlayerHitDtoOutput[]>(getPlayersControllerGetPlayersUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\nexport const getNpcsControllerGetNpcsUrl = (params?: NpcsControllerGetNpcsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"ids\",\"search\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/npcs?${stringifiedParams}` : `/npcs`\n}\n\n/**\n * @summary Search NPCs by name\n */\nexport const npcsControllerGetNpcs = async (params?: NpcsControllerGetNpcsParams, options?: Parameters<typeof searchFetch>[1]): Promise<NpcHitDtoOutput[]> => {\n\n return searchFetch<NpcHitDtoOutput[]>(getNpcsControllerGetNpcsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\nexport const getItemsControllerGetItemsUrl = (params?: ItemsControllerGetItemsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"filter\",\"facets\",\"sort\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/items?${stringifiedParams}` : `/items`\n}\n\n/**\n * @summary Search items with filters, sorting, and facets\n */\nexport const itemsControllerGetItems = async (params?: ItemsControllerGetItemsParams, options?: Parameters<typeof searchFetch>[1]): Promise<SearchItemsResponseDtoOutput> => {\n\n return searchFetch<SearchItemsResponseDtoOutput>(getItemsControllerGetItemsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\nexport const getAllControllerSearchAllUrl = (params?: AllControllerSearchAllParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/all?${stringifiedParams}` : `/all`\n}\n\n/**\n * @summary Search across all categories\n */\nexport const allControllerSearchAll = async (params?: AllControllerSearchAllParams, options?: Parameters<typeof searchFetch>[1]): Promise<SearchAllResponseDtoOutput> => {\n\n return searchFetch<SearchAllResponseDtoOutput>(getAllControllerSearchAllUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\nexport const getCatalogControllerGetItemsUrl = (params?: CatalogControllerGetItemsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"ids\",\"rarities\",\"types\",\"professions\",\"statKeys\",\"excludedStatKeys\",\"legendaryBonuses\",\"dropSourceTypes\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/public/catalog/items?${stringifiedParams}` : `/public/catalog/items`\n}\n\n/**\n * @summary List items in the public catalog\n */\nexport const catalogControllerGetItems = async (params?: CatalogControllerGetItemsParams, options?: Parameters<typeof searchFetch>[1]): Promise<CatalogItemsResponseDtoOutput> => {\n\n return searchFetch<CatalogItemsResponseDtoOutput>(getCatalogControllerGetItemsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\nexport const getCatalogControllerGetNpcsUrl = (params?: CatalogControllerGetNpcsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"ids\",\"keys\",\"types\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/public/catalog/npcs?${stringifiedParams}` : `/public/catalog/npcs`\n}\n\n/**\n * @summary List NPCs in the public catalog\n */\nexport const catalogControllerGetNpcs = async (params?: CatalogControllerGetNpcsParams, options?: Parameters<typeof searchFetch>[1]): Promise<CatalogNpcsResponseDtoOutput> => {\n\n return searchFetch<CatalogNpcsResponseDtoOutput>(getCatalogControllerGetNpcsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n"],"mappings":";;;;;;;;;AAyBA,MAAa,+BAA+B,EAC1C,mBAAmB,oBACrB;AAaA,MAAa,mCAAmC;CAC9C,QAAQ;CACR,SAAS;CACT,UAAU;AACZ;AAKA,MAAa,sBAAsB;CACjC,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,YAAY;CACZ,UAAU;CACV,OAAO;CACP,cAAc;CACd,KAAK;AACP;AAQA,MAAa,6BAA6B;CACxC,IAAI;CACJ,IAAI;AACN;AA2FA,MAAa,sDAAsD;CACjE,QAAQ;CACR,SAAS;CACT,UAAU;AACZ;AAKA,MAAa,yCAAyC;CACpD,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,YAAY;CACZ,UAAU;CACV,OAAO;CACP,cAAc;CACd,KAAK;AACP;AAQA,MAAa,gDAAgD;CAC3D,IAAI;CACJ,IAAI;AACN;AA8EA,MAAa,0BAA0B;CACrC,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,YAAY;CACZ,UAAU;CACV,OAAO;CACP,cAAc;CACd,KAAK;AACP;AAKA,MAAa,iCAAiC;CAC5C,IAAI;CACJ,IAAI;AACN;AAmKA,MAAa,uCAAuC;CAClD,IAAI;CACJ,IAAI;AACN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