@pokewallet/sdk 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +28 -2
- package/dist/index.cjs +949 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2822 -0
- package/dist/index.d.ts +2822 -0
- package/dist/index.js +905 -0
- package/dist/index.js.map +1 -0
- package/package.json +70 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2822 @@
|
|
|
1
|
+
type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
|
|
2
|
+
interface ClientOptions {
|
|
3
|
+
/**
|
|
4
|
+
* API key (`pk_…`). Falls back to the `POKEWALLET_API_KEY` environment variable. Optional at
|
|
5
|
+
* construction: only `health()` and `listGames()` work without one, every other call throws
|
|
6
|
+
* `ValidationError` before touching the network.
|
|
7
|
+
*/
|
|
8
|
+
apiKey?: string;
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
/** Sent on every request. Some network layers reject the default user agents of HTTP libraries. */
|
|
11
|
+
userAgent?: string;
|
|
12
|
+
/** Custom `fetch`, mainly for tests. Defaults to the global one. */
|
|
13
|
+
fetch?: FetchLike;
|
|
14
|
+
/** Retries after a 429 (with `Retry-After`) or a 503. Default 2. */
|
|
15
|
+
maxRetries?: number;
|
|
16
|
+
/** Longest `Retry-After` the SDK will sit through, in seconds. Default 30. */
|
|
17
|
+
retryAfterCapSeconds?: number;
|
|
18
|
+
/** Per-request timeout in milliseconds. Default 30000. */
|
|
19
|
+
timeoutMs?: number;
|
|
20
|
+
/** Replaces the delay between retries, mainly for tests. */
|
|
21
|
+
sleep?: (ms: number) => Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
/** Quota counters from the `X-RateLimit-*` headers of the last answer. */
|
|
24
|
+
interface RateLimitInfo {
|
|
25
|
+
limitHour: number | null;
|
|
26
|
+
remainingHour: number | null;
|
|
27
|
+
limitDay: number | null;
|
|
28
|
+
remainingDay: number | null;
|
|
29
|
+
}
|
|
30
|
+
type Query = Record<string, string | number | boolean | undefined | null>;
|
|
31
|
+
declare class HttpClient {
|
|
32
|
+
#private;
|
|
33
|
+
/** Quota counters of the most recent answer that carried them. */
|
|
34
|
+
lastRateLimit: RateLimitInfo | null;
|
|
35
|
+
private readonly baseUrl;
|
|
36
|
+
private readonly userAgent;
|
|
37
|
+
private readonly fetchImpl;
|
|
38
|
+
private readonly maxRetries;
|
|
39
|
+
private readonly capSeconds;
|
|
40
|
+
private readonly timeoutMs;
|
|
41
|
+
private readonly sleep;
|
|
42
|
+
constructor(options?: ClientOptions);
|
|
43
|
+
url(path: string, query?: Query): string;
|
|
44
|
+
/**
|
|
45
|
+
* GET `path` and return the parsed JSON body; throws a typed error otherwise. `isPublic`
|
|
46
|
+
* marks the two endpoints the server answers without a key; everything else needs one.
|
|
47
|
+
* `accept` lets a caller treat a non-2xx body as data (see `health()`).
|
|
48
|
+
*/
|
|
49
|
+
get<T>(path: string, query?: Query, options?: {
|
|
50
|
+
isPublic?: boolean;
|
|
51
|
+
accept?: (body: unknown) => boolean;
|
|
52
|
+
}): Promise<T>;
|
|
53
|
+
private shouldRetry;
|
|
54
|
+
private send;
|
|
55
|
+
/** Masked form: the only representation of this object that logging or serializing can reach. */
|
|
56
|
+
toJSON(): {
|
|
57
|
+
baseUrl: string;
|
|
58
|
+
userAgent: string;
|
|
59
|
+
apiKey: string | null;
|
|
60
|
+
};
|
|
61
|
+
private trackQuota;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface ImageUrlOptions {
|
|
65
|
+
baseUrl?: string;
|
|
66
|
+
/** Pokémon only: `low` (default) or `high`. */
|
|
67
|
+
size?: 'low' | 'high';
|
|
68
|
+
/** Pokémon only: localized render (`it`, `fr`, `de`, `es`, `pt`). */
|
|
69
|
+
lang?: string;
|
|
70
|
+
/** Pokémon only: set code, to disambiguate a plain card number. */
|
|
71
|
+
set?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Builds the image URL of a card from its id. Pure string work: nothing is fetched.
|
|
75
|
+
*
|
|
76
|
+
* The image routes are protected like every other route: the request MUST carry the
|
|
77
|
+
* `X-API-Key` header, so the URL cannot be used directly in an `<img>` tag. Fetch it
|
|
78
|
+
* yourself with the header, or proxy it server-side.
|
|
79
|
+
*/
|
|
80
|
+
declare function imageUrl(id: string, options?: ImageUrlOptions): string;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Public, normalized types. Every object keeps the unmodified server value in `raw`.
|
|
84
|
+
* Prices are `number | null`; the API sometimes sends numeric strings.
|
|
85
|
+
*/
|
|
86
|
+
declare const GAME_CODES: readonly ["mtg", "ygo", "cfv", "dbs", "fab", "dgm", "swu", "lor", "rft", "cpk"];
|
|
87
|
+
type GameCode = (typeof GAME_CODES)[number];
|
|
88
|
+
interface TcgPrice {
|
|
89
|
+
/** Finish (`Normal`, `Holofoil`, `Foil`...). Null for rows that have no finish. */
|
|
90
|
+
variant: string | null;
|
|
91
|
+
low: number | null;
|
|
92
|
+
mid: number | null;
|
|
93
|
+
high: number | null;
|
|
94
|
+
market: number | null;
|
|
95
|
+
directLow: number | null;
|
|
96
|
+
updatedAt: string | null;
|
|
97
|
+
raw: unknown;
|
|
98
|
+
}
|
|
99
|
+
interface CardmarketPrice {
|
|
100
|
+
variant: string | null;
|
|
101
|
+
avg: number | null;
|
|
102
|
+
low: number | null;
|
|
103
|
+
trend: number | null;
|
|
104
|
+
avg1: number | null;
|
|
105
|
+
avg7: number | null;
|
|
106
|
+
avg30: number | null;
|
|
107
|
+
updatedAt: string | null;
|
|
108
|
+
raw: unknown;
|
|
109
|
+
}
|
|
110
|
+
interface Card {
|
|
111
|
+
/** `pk_…` (Pokémon), `op_…`, `<code>_…`, or a 64-character hex CardMarket id. Reuse as is. */
|
|
112
|
+
id: string;
|
|
113
|
+
name: string;
|
|
114
|
+
cleanName: string | null;
|
|
115
|
+
number: string | null;
|
|
116
|
+
rarity: string | null;
|
|
117
|
+
cardType: string | null;
|
|
118
|
+
productType: string | null;
|
|
119
|
+
text: string | null;
|
|
120
|
+
variants: string[];
|
|
121
|
+
/**
|
|
122
|
+
* Set identifiers. `setId` is the numeric id (possibly negative); `setCode` the short code.
|
|
123
|
+
* Source: `card_info.set_id` / `card_info.set_code`, except for cards listed by a set, where both come
|
|
124
|
+
* from the response's `set` object (the Pokémon listing puts the numeric id in `card_info.set_code`).
|
|
125
|
+
* One Piece search and detail answers carry neither, so both are null there.
|
|
126
|
+
*/
|
|
127
|
+
setId: string | null;
|
|
128
|
+
setCode: string | null;
|
|
129
|
+
setName: string | null;
|
|
130
|
+
tcgplayer: {
|
|
131
|
+
url: string | null;
|
|
132
|
+
prices: TcgPrice[];
|
|
133
|
+
} | null;
|
|
134
|
+
cardmarket: {
|
|
135
|
+
productName: string | null;
|
|
136
|
+
url: string | null;
|
|
137
|
+
prices: CardmarketPrice[];
|
|
138
|
+
} | null;
|
|
139
|
+
/** Game-specific fields: `hp`, `attacks`, `p`, `t`, `ext_color`... as sent by the API. */
|
|
140
|
+
info: Record<string, unknown>;
|
|
141
|
+
raw: unknown;
|
|
142
|
+
}
|
|
143
|
+
interface SetSummary {
|
|
144
|
+
/** Numeric set id as a string (`set_id`; `group_id` for One Piece). */
|
|
145
|
+
id: string;
|
|
146
|
+
code: string | null;
|
|
147
|
+
name: string;
|
|
148
|
+
/** Free text. Pokémon uses `eng`/`jap`/`chn`, One Piece `en`/`jp`. */
|
|
149
|
+
language: string | null;
|
|
150
|
+
releaseDate: string | null;
|
|
151
|
+
cardCount: number | null;
|
|
152
|
+
sealedCount: number | null;
|
|
153
|
+
raw: unknown;
|
|
154
|
+
}
|
|
155
|
+
interface Page<T> {
|
|
156
|
+
items: T[];
|
|
157
|
+
page: number;
|
|
158
|
+
limit: number;
|
|
159
|
+
total: number;
|
|
160
|
+
/** Computed from `total` and `limit`, so it is always a finite number. */
|
|
161
|
+
totalPages: number;
|
|
162
|
+
}
|
|
163
|
+
interface SearchPage extends Page<Card> {
|
|
164
|
+
/** Games only: the search stopped at its cap, refine the query instead of paging. */
|
|
165
|
+
truncated: boolean;
|
|
166
|
+
}
|
|
167
|
+
interface SetPage extends Page<Card> {
|
|
168
|
+
set: SetSummary;
|
|
169
|
+
}
|
|
170
|
+
interface PriceRow {
|
|
171
|
+
id: string;
|
|
172
|
+
number: string | null;
|
|
173
|
+
name: string;
|
|
174
|
+
variant: string | null;
|
|
175
|
+
productType: string | null;
|
|
176
|
+
tcgplayer: TcgPrice | null;
|
|
177
|
+
cardmarket: CardmarketPrice | null;
|
|
178
|
+
}
|
|
179
|
+
interface SetPrices {
|
|
180
|
+
source: string;
|
|
181
|
+
setId: string | null;
|
|
182
|
+
setCode: string | null;
|
|
183
|
+
rows: PriceRow[];
|
|
184
|
+
total: number;
|
|
185
|
+
raw: unknown;
|
|
186
|
+
}
|
|
187
|
+
interface SetRef {
|
|
188
|
+
id: string | null;
|
|
189
|
+
code: string | null;
|
|
190
|
+
name: string | null;
|
|
191
|
+
}
|
|
192
|
+
interface PriceStats {
|
|
193
|
+
avg: number | null;
|
|
194
|
+
min: number | null;
|
|
195
|
+
max: number | null;
|
|
196
|
+
mostExpensive: {
|
|
197
|
+
id: string | null;
|
|
198
|
+
name: string | null;
|
|
199
|
+
price: number | null;
|
|
200
|
+
} | null;
|
|
201
|
+
trendDirection: string | null;
|
|
202
|
+
}
|
|
203
|
+
interface SetStatistics {
|
|
204
|
+
set: SetRef & {
|
|
205
|
+
totalCards: number | null;
|
|
206
|
+
};
|
|
207
|
+
tcgplayer: PriceStats | null;
|
|
208
|
+
cardmarket: PriceStats | null;
|
|
209
|
+
rarityBreakdown: Record<string, number>;
|
|
210
|
+
raw: unknown;
|
|
211
|
+
}
|
|
212
|
+
interface CompletionValue {
|
|
213
|
+
set: SetRef & {
|
|
214
|
+
totalCards: number | null;
|
|
215
|
+
};
|
|
216
|
+
tcgplayer: {
|
|
217
|
+
currency: string | null;
|
|
218
|
+
low: number | null;
|
|
219
|
+
market: number | null;
|
|
220
|
+
high: number | null;
|
|
221
|
+
} | null;
|
|
222
|
+
cardmarket: {
|
|
223
|
+
currency: string | null;
|
|
224
|
+
low: number | null;
|
|
225
|
+
avg: number | null;
|
|
226
|
+
trend: number | null;
|
|
227
|
+
} | null;
|
|
228
|
+
byRarity: Record<string, {
|
|
229
|
+
count: number;
|
|
230
|
+
totalCost: number | null;
|
|
231
|
+
}>;
|
|
232
|
+
note: string | null;
|
|
233
|
+
raw: unknown;
|
|
234
|
+
}
|
|
235
|
+
interface TrendingSet {
|
|
236
|
+
set: SetRef;
|
|
237
|
+
cardCount: number | null;
|
|
238
|
+
/** As sent: `+446.7%`. */
|
|
239
|
+
change: string | null;
|
|
240
|
+
changePct: number | null;
|
|
241
|
+
avgPriceCurrent: number | null;
|
|
242
|
+
avgPricePrevious: number | null;
|
|
243
|
+
topMovers: Array<{
|
|
244
|
+
name: string | null;
|
|
245
|
+
change: string | null;
|
|
246
|
+
}>;
|
|
247
|
+
raw: unknown;
|
|
248
|
+
}
|
|
249
|
+
interface TopCard {
|
|
250
|
+
id: string;
|
|
251
|
+
name: string;
|
|
252
|
+
number: string | null;
|
|
253
|
+
rarity: string | null;
|
|
254
|
+
setName: string | null;
|
|
255
|
+
setId: string | null;
|
|
256
|
+
setCode: string | null;
|
|
257
|
+
price: number | null;
|
|
258
|
+
previousPrice7d: number | null;
|
|
259
|
+
change7d: string | null;
|
|
260
|
+
raw: unknown;
|
|
261
|
+
}
|
|
262
|
+
interface HistoryPoint {
|
|
263
|
+
/** Snapshot price keyed by days back: 7, 14, 30, 60, 120. */
|
|
264
|
+
price: Record<number, number | null>;
|
|
265
|
+
change: Record<number, string | null>;
|
|
266
|
+
current: Record<string, number | null>;
|
|
267
|
+
lastUpdated: string | null;
|
|
268
|
+
}
|
|
269
|
+
interface PriceHistory {
|
|
270
|
+
id: string;
|
|
271
|
+
name: string | null;
|
|
272
|
+
tcgplayer: Record<string, HistoryPoint> | null;
|
|
273
|
+
cardmarket: Record<string, HistoryPoint> | null;
|
|
274
|
+
raw: unknown;
|
|
275
|
+
}
|
|
276
|
+
type SearchOptions = {
|
|
277
|
+
page?: number;
|
|
278
|
+
limit?: number;
|
|
279
|
+
};
|
|
280
|
+
type SetOptions = {
|
|
281
|
+
page?: number;
|
|
282
|
+
limit?: number;
|
|
283
|
+
language?: string;
|
|
284
|
+
};
|
|
285
|
+
type PricesOptions = {
|
|
286
|
+
source?: 'tcg' | 'cm';
|
|
287
|
+
};
|
|
288
|
+
type StatisticsOptions = {
|
|
289
|
+
variant?: string;
|
|
290
|
+
};
|
|
291
|
+
type TrendingOptions = {
|
|
292
|
+
period?: '7d' | '30d';
|
|
293
|
+
limit?: number;
|
|
294
|
+
};
|
|
295
|
+
type TopCardsOptions = {
|
|
296
|
+
metric?: 'price' | 'growth';
|
|
297
|
+
source?: 'tcg' | 'cm';
|
|
298
|
+
limit?: number;
|
|
299
|
+
};
|
|
300
|
+
interface Game {
|
|
301
|
+
/** Route prefix and `game` code: `mtg`, `ygo`, ... */
|
|
302
|
+
code: GameCode;
|
|
303
|
+
name: string;
|
|
304
|
+
/** Free routes, keyed by role: `sets`, `set`, `card`, `search`, `image`. */
|
|
305
|
+
endpoints: Record<string, string>;
|
|
306
|
+
/** Plan-gated routes: `prices`, `statistics`, `completion_value`, `trending`, `top_cards`. */
|
|
307
|
+
proEndpoints: Record<string, string>;
|
|
308
|
+
raw: unknown;
|
|
309
|
+
}
|
|
310
|
+
interface HealthCheck {
|
|
311
|
+
/** `healthy`, `degraded` or `unhealthy`. */
|
|
312
|
+
status: string;
|
|
313
|
+
/** Set by the server when the check failed or is limited. */
|
|
314
|
+
message: string | null;
|
|
315
|
+
responseTime: number | null;
|
|
316
|
+
}
|
|
317
|
+
interface Health {
|
|
318
|
+
/** Overall status: `healthy` or `unhealthy`. Only the database and storage are critical. */
|
|
319
|
+
status: string;
|
|
320
|
+
timestamp: string | null;
|
|
321
|
+
version: string | null;
|
|
322
|
+
/** Per-service checks: `database`, `cache`, `storage`. */
|
|
323
|
+
checks: Record<string, HealthCheck>;
|
|
324
|
+
responseTime: number | null;
|
|
325
|
+
region: string | null;
|
|
326
|
+
message: string | null;
|
|
327
|
+
raw: unknown;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* The one interface shared by Pokémon, One Piece and the ten games. Where the API
|
|
332
|
+
* needs a different route, parameter or response shape, the world hides it.
|
|
333
|
+
*
|
|
334
|
+
* Plan-gated methods (`prices`, `statistics`, `completionValue`, `trending`, `topCards`)
|
|
335
|
+
* throw `PlanRequiredError` when the account's plan or trial does not cover them.
|
|
336
|
+
* An ambiguous set code throws `AmbiguousSetError`; retry with one of its `matches[].setId`.
|
|
337
|
+
*/
|
|
338
|
+
interface World {
|
|
339
|
+
/** One page of search results. `q` is 2-100 characters for the ten games. */
|
|
340
|
+
search(q: string, options?: SearchOptions): Promise<SearchPage>;
|
|
341
|
+
/** Every result of a search, page after page. */
|
|
342
|
+
searchAll(q: string, options?: {
|
|
343
|
+
limit?: number;
|
|
344
|
+
maxItems?: number;
|
|
345
|
+
}): AsyncGenerator<Card, void, undefined>;
|
|
346
|
+
/** Card by id (`pk_…`, `op_…`, `<code>_…`, or a 64-hex CardMarket id). */
|
|
347
|
+
card(id: string): Promise<Card>;
|
|
348
|
+
/** All sets of the world. The API does not paginate this list. */
|
|
349
|
+
sets(options?: {
|
|
350
|
+
language?: string;
|
|
351
|
+
}): Promise<SetSummary[]>;
|
|
352
|
+
/** One page of a set's cards. `code` is a set code or a numeric set id. */
|
|
353
|
+
set(code: string, options?: SetOptions): Promise<SetPage>;
|
|
354
|
+
/** Every card of a set, page after page. */
|
|
355
|
+
setCards(code: string, options?: {
|
|
356
|
+
limit?: number;
|
|
357
|
+
language?: string;
|
|
358
|
+
maxItems?: number;
|
|
359
|
+
}): AsyncGenerator<Card, void, undefined>;
|
|
360
|
+
/** Prices of every card in a set: hundreds to thousands of rows. */
|
|
361
|
+
prices(code: string, options?: PricesOptions): Promise<SetPrices>;
|
|
362
|
+
statistics(code: string, options?: StatisticsOptions): Promise<SetStatistics>;
|
|
363
|
+
completionValue(code: string): Promise<CompletionValue>;
|
|
364
|
+
trending(options?: TrendingOptions): Promise<TrendingSet[]>;
|
|
365
|
+
topCards(options?: TopCardsOptions): Promise<TopCard[]>;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
interface CardWorldConfig {
|
|
369
|
+
/** Route prefix: `''` for Pokémon, `/mtg` for a game. */
|
|
370
|
+
prefix: string;
|
|
371
|
+
/** Pokémon accepts `period=30d` on trending; the other worlds only `7d`. */
|
|
372
|
+
periods: readonly ('7d' | '30d')[];
|
|
373
|
+
/** Minimum search length: the games reject queries shorter than 2 characters. */
|
|
374
|
+
minQuery: number;
|
|
375
|
+
}
|
|
376
|
+
/** Pokémon and the ten games share one response shape, so one class serves them all. */
|
|
377
|
+
declare class CardWorld implements World {
|
|
378
|
+
protected readonly http: HttpClient;
|
|
379
|
+
protected readonly config: CardWorldConfig;
|
|
380
|
+
constructor(http: HttpClient, config: CardWorldConfig);
|
|
381
|
+
protected path(rest: string): string;
|
|
382
|
+
search(q: string, options?: SearchOptions): Promise<SearchPage>;
|
|
383
|
+
searchAll(q: string, options?: {
|
|
384
|
+
limit?: number;
|
|
385
|
+
maxItems?: number;
|
|
386
|
+
}): AsyncGenerator<Card, void, undefined>;
|
|
387
|
+
card(id: string): Promise<Card>;
|
|
388
|
+
sets(options?: {
|
|
389
|
+
language?: string;
|
|
390
|
+
}): Promise<SetSummary[]>;
|
|
391
|
+
set(code: string, options?: SetOptions): Promise<SetPage>;
|
|
392
|
+
setCards(code: string, options?: {
|
|
393
|
+
limit?: number;
|
|
394
|
+
language?: string;
|
|
395
|
+
maxItems?: number;
|
|
396
|
+
}): AsyncGenerator<Card, void, undefined>;
|
|
397
|
+
prices(code: string, options?: PricesOptions): Promise<SetPrices>;
|
|
398
|
+
statistics(code: string, options?: StatisticsOptions): Promise<SetStatistics>;
|
|
399
|
+
completionValue(code: string): Promise<CompletionValue>;
|
|
400
|
+
trending(options?: TrendingOptions): Promise<TrendingSet[]>;
|
|
401
|
+
topCards(options?: TopCardsOptions): Promise<TopCard[]>;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/** Pokémon: the shared card world plus the endpoints only Pokémon has. */
|
|
405
|
+
declare class PokemonWorld extends CardWorld {
|
|
406
|
+
constructor(http: HttpClient);
|
|
407
|
+
/**
|
|
408
|
+
* Card by id, or by plain card number together with `setCode` (`card('086/078', { setCode: 'SV8a' })`).
|
|
409
|
+
* Ids from `search` and `set` are the safest input.
|
|
410
|
+
*/
|
|
411
|
+
card(id: string, options?: {
|
|
412
|
+
setCode?: string;
|
|
413
|
+
}): Promise<Card>;
|
|
414
|
+
/** Price snapshots at 7/14/30/60/120 days, per finish (not a time series). Pro or trial. */
|
|
415
|
+
priceHistory(id: string): Promise<PriceHistory>;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Entry point. One interface for every world:
|
|
420
|
+
*
|
|
421
|
+
* ```ts
|
|
422
|
+
* const pw = new PokeWallet({ apiKey: process.env.POKEWALLET_API_KEY })
|
|
423
|
+
* await pw.pokemon.search('charizard')
|
|
424
|
+
* await pw.onepiece.set('OP01')
|
|
425
|
+
* await pw.games.mtg.search('black lotus')
|
|
426
|
+
* ```
|
|
427
|
+
*/
|
|
428
|
+
declare class PokeWallet {
|
|
429
|
+
#private;
|
|
430
|
+
readonly pokemon: PokemonWorld;
|
|
431
|
+
readonly onepiece: World;
|
|
432
|
+
readonly games: Readonly<Record<GameCode, World>>;
|
|
433
|
+
constructor(options?: ClientOptions);
|
|
434
|
+
/** Quota counters from the most recent answer, or null before the first call. */
|
|
435
|
+
get lastRateLimit(): RateLimitInfo | null;
|
|
436
|
+
/** The world for a game code known only at runtime. */
|
|
437
|
+
game(code: GameCode): World;
|
|
438
|
+
/**
|
|
439
|
+
* Service status. Works without a key; the header is sent only when a key is set.
|
|
440
|
+
*
|
|
441
|
+
* The API answers 503 with a full report when a critical service is down. That report is
|
|
442
|
+
* information, not a failure: it is returned like a 200, with `status: 'unhealthy'` and the
|
|
443
|
+
* failing `checks`, and is never retried. A 503 without a report (for example an error page
|
|
444
|
+
* from the edge) still throws `UnavailableError`.
|
|
445
|
+
*/
|
|
446
|
+
health(): Promise<Health>;
|
|
447
|
+
/** The ten games with their route maps. Works without a key. */
|
|
448
|
+
listGames(): Promise<Game[]>;
|
|
449
|
+
toJSON(): {
|
|
450
|
+
client: unknown;
|
|
451
|
+
};
|
|
452
|
+
/** See {@link imageUrl}: the URL still needs the API key header. */
|
|
453
|
+
imageUrl(id: string, options?: Omit<ImageUrlOptions, 'baseUrl'>): string;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Walks every page of any list endpoint as one async sequence. The two pagination
|
|
458
|
+
* shapes of the API are already hidden behind `fetchPage`.
|
|
459
|
+
*/
|
|
460
|
+
declare function paginate<T>(fetchPage: (page: number) => Promise<Page<T>>, options?: {
|
|
461
|
+
startPage?: number;
|
|
462
|
+
maxItems?: number;
|
|
463
|
+
}): AsyncGenerator<T, void, undefined>;
|
|
464
|
+
|
|
465
|
+
/** Hourly or daily quota window as reported in a 429 body. */
|
|
466
|
+
interface LimitWindow {
|
|
467
|
+
limit: number;
|
|
468
|
+
used: number;
|
|
469
|
+
remaining: number;
|
|
470
|
+
}
|
|
471
|
+
interface RateLimitWindows {
|
|
472
|
+
hourly?: LimitWindow;
|
|
473
|
+
daily?: LimitWindow;
|
|
474
|
+
}
|
|
475
|
+
/** One candidate of an ambiguous set. `setId` is the value to pass back to pick it. */
|
|
476
|
+
interface SetMatch {
|
|
477
|
+
setId: string;
|
|
478
|
+
setCode: string | null;
|
|
479
|
+
name: string | null;
|
|
480
|
+
language: string | null;
|
|
481
|
+
releaseDate: string | null;
|
|
482
|
+
}
|
|
483
|
+
interface ErrorInit {
|
|
484
|
+
status: number;
|
|
485
|
+
body?: unknown;
|
|
486
|
+
message?: string;
|
|
487
|
+
}
|
|
488
|
+
/** Base class of every error raised by the SDK for an API answer. */
|
|
489
|
+
declare class PokeWalletError extends Error {
|
|
490
|
+
readonly status: number;
|
|
491
|
+
/** Parsed JSON body of the answer, when there was one. */
|
|
492
|
+
readonly body: unknown;
|
|
493
|
+
/** The `error` field of the body, when present. */
|
|
494
|
+
readonly code: string | undefined;
|
|
495
|
+
constructor(init: ErrorInit);
|
|
496
|
+
}
|
|
497
|
+
/** Raised before any request when an argument is out of range. */
|
|
498
|
+
declare class ValidationError extends RangeError {
|
|
499
|
+
constructor(message: string);
|
|
500
|
+
}
|
|
501
|
+
/** The request never produced an HTTP answer (DNS, connection, timeout). */
|
|
502
|
+
declare class NetworkError extends Error {
|
|
503
|
+
constructor(message: string, options?: {
|
|
504
|
+
cause?: unknown;
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
/** 400: missing or invalid parameter, or an id that cannot be decoded. */
|
|
508
|
+
declare class BadRequestError extends PokeWalletError {
|
|
509
|
+
}
|
|
510
|
+
/** 401: key missing, malformed or unknown. */
|
|
511
|
+
declare class AuthError extends PokeWalletError {
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* 403 on a plan-gated endpoint. `redeemUrl` is set when the free trial was never
|
|
515
|
+
* activated; `upgradeUrl` when the trial expired or the plan is too low.
|
|
516
|
+
*/
|
|
517
|
+
declare class PlanRequiredError extends PokeWalletError {
|
|
518
|
+
readonly redeemUrl: string | undefined;
|
|
519
|
+
readonly upgradeUrl: string | undefined;
|
|
520
|
+
constructor(init: ErrorInit);
|
|
521
|
+
}
|
|
522
|
+
/** 403 `Feature not enabled`: this account does not have access to this feature. */
|
|
523
|
+
declare class FeatureNotEnabledError extends PokeWalletError {
|
|
524
|
+
readonly contactUrl: string | undefined;
|
|
525
|
+
constructor(init: ErrorInit);
|
|
526
|
+
}
|
|
527
|
+
/** 404: unknown card, set or route. Carries the server's suggestions when it sent any. */
|
|
528
|
+
declare class NotFoundError extends PokeWalletError {
|
|
529
|
+
readonly didYouMean: string | undefined;
|
|
530
|
+
readonly suggestions: unknown[];
|
|
531
|
+
constructor(init: ErrorInit);
|
|
532
|
+
}
|
|
533
|
+
/** 404 on a game route: the game is switched off for this account. */
|
|
534
|
+
declare class GameUnavailableError extends NotFoundError {
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* The set code matches several sets. Unifies the three ways the API says so
|
|
538
|
+
* (200 with `disambiguation`, 300, 409). Retry with one `matches[i].setId`.
|
|
539
|
+
*/
|
|
540
|
+
declare class AmbiguousSetError extends PokeWalletError {
|
|
541
|
+
readonly matches: SetMatch[];
|
|
542
|
+
constructor(init: ErrorInit & {
|
|
543
|
+
matches: SetMatch[];
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* 429. The API sends no `Retry-After`, so the SDK retries only when the header is
|
|
548
|
+
* present and within the cap. `limits` mirrors the body: when a window shows
|
|
549
|
+
* `remaining === 0`, waiting seconds cannot help.
|
|
550
|
+
*/
|
|
551
|
+
declare class RateLimitError extends PokeWalletError {
|
|
552
|
+
readonly limits: RateLimitWindows;
|
|
553
|
+
/** Seconds, from the `Retry-After` header, when present. */
|
|
554
|
+
readonly retryAfter: number | undefined;
|
|
555
|
+
constructor(init: ErrorInit & {
|
|
556
|
+
retryAfter?: number;
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
/** 503: database busy or feature not yet enabled. `retryAfter` is 5 or 3600 seconds. */
|
|
560
|
+
declare class UnavailableError extends PokeWalletError {
|
|
561
|
+
readonly retryAfter: number | undefined;
|
|
562
|
+
constructor(init: ErrorInit & {
|
|
563
|
+
retryAfter?: number;
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
/** Any other 5xx. Never retried. */
|
|
567
|
+
declare class ServerError extends PokeWalletError {
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
declare const VERSION = "0.1.1";
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* This file was auto-generated by openapi-typescript.
|
|
574
|
+
* Do not make direct changes to the file.
|
|
575
|
+
*/
|
|
576
|
+
|
|
577
|
+
interface paths {
|
|
578
|
+
"/health": {
|
|
579
|
+
parameters: {
|
|
580
|
+
query?: never;
|
|
581
|
+
header?: never;
|
|
582
|
+
path?: never;
|
|
583
|
+
cookie?: never;
|
|
584
|
+
};
|
|
585
|
+
/**
|
|
586
|
+
* Service status
|
|
587
|
+
* @description Needs no key. Answers 503 with the same report body (`status: unhealthy`) when the database
|
|
588
|
+
* or storage is down; the cache is optional and only degrades the message. A 503 without
|
|
589
|
+
* a `status` field is a different failure (edge error, `Retry-After` present).
|
|
590
|
+
*/
|
|
591
|
+
get: operations["getHealth"];
|
|
592
|
+
put?: never;
|
|
593
|
+
post?: never;
|
|
594
|
+
delete?: never;
|
|
595
|
+
options?: never;
|
|
596
|
+
head?: never;
|
|
597
|
+
patch?: never;
|
|
598
|
+
trace?: never;
|
|
599
|
+
};
|
|
600
|
+
"/games": {
|
|
601
|
+
parameters: {
|
|
602
|
+
query?: never;
|
|
603
|
+
header?: never;
|
|
604
|
+
path?: never;
|
|
605
|
+
cookie?: never;
|
|
606
|
+
};
|
|
607
|
+
/** The ten games and their routes */
|
|
608
|
+
get: operations["listGames"];
|
|
609
|
+
put?: never;
|
|
610
|
+
post?: never;
|
|
611
|
+
delete?: never;
|
|
612
|
+
options?: never;
|
|
613
|
+
head?: never;
|
|
614
|
+
patch?: never;
|
|
615
|
+
trace?: never;
|
|
616
|
+
};
|
|
617
|
+
"/search": {
|
|
618
|
+
parameters: {
|
|
619
|
+
query?: never;
|
|
620
|
+
header?: never;
|
|
621
|
+
path?: never;
|
|
622
|
+
cookie?: never;
|
|
623
|
+
};
|
|
624
|
+
/**
|
|
625
|
+
* Search Pokémon cards by name, number, set or rarity
|
|
626
|
+
* @description Note: server-side range checks on `limit` and `page` differ from One Piece and the ten games.
|
|
627
|
+
* Send `limit` between 1 and 100 and `page` of at least 1 (the SDKs enforce this before
|
|
628
|
+
* sending); `total_pages` can be `null` for out-of-range input.
|
|
629
|
+
*/
|
|
630
|
+
get: operations["pokemonSearch"];
|
|
631
|
+
put?: never;
|
|
632
|
+
post?: never;
|
|
633
|
+
delete?: never;
|
|
634
|
+
options?: never;
|
|
635
|
+
head?: never;
|
|
636
|
+
patch?: never;
|
|
637
|
+
trace?: never;
|
|
638
|
+
};
|
|
639
|
+
"/sets": {
|
|
640
|
+
parameters: {
|
|
641
|
+
query?: never;
|
|
642
|
+
header?: never;
|
|
643
|
+
path?: never;
|
|
644
|
+
cookie?: never;
|
|
645
|
+
};
|
|
646
|
+
/** All Pokémon sets (not paginated, long list) */
|
|
647
|
+
get: operations["pokemonListSets"];
|
|
648
|
+
put?: never;
|
|
649
|
+
post?: never;
|
|
650
|
+
delete?: never;
|
|
651
|
+
options?: never;
|
|
652
|
+
head?: never;
|
|
653
|
+
patch?: never;
|
|
654
|
+
trace?: never;
|
|
655
|
+
};
|
|
656
|
+
"/sets/trending": {
|
|
657
|
+
parameters: {
|
|
658
|
+
query?: never;
|
|
659
|
+
header?: never;
|
|
660
|
+
path?: never;
|
|
661
|
+
cookie?: never;
|
|
662
|
+
};
|
|
663
|
+
/** Sets with the strongest CardMarket price change (Pro or trial) */
|
|
664
|
+
get: operations["pokemonTrendingSets"];
|
|
665
|
+
put?: never;
|
|
666
|
+
post?: never;
|
|
667
|
+
delete?: never;
|
|
668
|
+
options?: never;
|
|
669
|
+
head?: never;
|
|
670
|
+
patch?: never;
|
|
671
|
+
trace?: never;
|
|
672
|
+
};
|
|
673
|
+
"/sets/{setCode}": {
|
|
674
|
+
parameters: {
|
|
675
|
+
query?: never;
|
|
676
|
+
header?: never;
|
|
677
|
+
path?: never;
|
|
678
|
+
cookie?: never;
|
|
679
|
+
};
|
|
680
|
+
/**
|
|
681
|
+
* Cards of a set (paginated)
|
|
682
|
+
* @description `setCode` is a `set_code` (`PLF`) or a numeric `set_id`, possibly negative (CardMarket-only sets).
|
|
683
|
+
*
|
|
684
|
+
* Ambiguous set code: if the `set_code` exists in several languages the answer is
|
|
685
|
+
* **200** with `disambiguation: true` and `matches`; on `/prices/{setCode}` it is **300**, on
|
|
686
|
+
* statistics and completion-value it is **409**. Disambiguate with `?language=` or the numeric `set_id`.
|
|
687
|
+
*
|
|
688
|
+
* Note: in this listing `card_info.set_code` holds the `set_id` ("1382"), while
|
|
689
|
+
* `/cards/{id}` and `/search` hold the real code ("PLF"). `prices` is always `[]` here.
|
|
690
|
+
*
|
|
691
|
+
* Note: send `limit` and `page` within range (see `/search`).
|
|
692
|
+
*/
|
|
693
|
+
get: operations["pokemonGetSet"];
|
|
694
|
+
put?: never;
|
|
695
|
+
post?: never;
|
|
696
|
+
delete?: never;
|
|
697
|
+
options?: never;
|
|
698
|
+
head?: never;
|
|
699
|
+
patch?: never;
|
|
700
|
+
trace?: never;
|
|
701
|
+
};
|
|
702
|
+
"/sets/{setCode}/statistics": {
|
|
703
|
+
parameters: {
|
|
704
|
+
query?: never;
|
|
705
|
+
header?: never;
|
|
706
|
+
path?: never;
|
|
707
|
+
cookie?: never;
|
|
708
|
+
};
|
|
709
|
+
/**
|
|
710
|
+
* Price and rarity statistics of a set (Pro or trial)
|
|
711
|
+
* @description Note: `set_info.set_code` is the numeric `set_id` ("1382"); in `completion-value` it is the code ("PLF").
|
|
712
|
+
* Ambiguous set: **409**.
|
|
713
|
+
*/
|
|
714
|
+
get: operations["pokemonSetStatistics"];
|
|
715
|
+
put?: never;
|
|
716
|
+
post?: never;
|
|
717
|
+
delete?: never;
|
|
718
|
+
options?: never;
|
|
719
|
+
head?: never;
|
|
720
|
+
patch?: never;
|
|
721
|
+
trace?: never;
|
|
722
|
+
};
|
|
723
|
+
"/sets/{setCode}/completion-value": {
|
|
724
|
+
parameters: {
|
|
725
|
+
query?: never;
|
|
726
|
+
header?: never;
|
|
727
|
+
path?: never;
|
|
728
|
+
cookie?: never;
|
|
729
|
+
};
|
|
730
|
+
/** Cost to complete a set (Pro or trial) */
|
|
731
|
+
get: operations["pokemonSetCompletionValue"];
|
|
732
|
+
put?: never;
|
|
733
|
+
post?: never;
|
|
734
|
+
delete?: never;
|
|
735
|
+
options?: never;
|
|
736
|
+
head?: never;
|
|
737
|
+
patch?: never;
|
|
738
|
+
trace?: never;
|
|
739
|
+
};
|
|
740
|
+
"/prices/{setCode}": {
|
|
741
|
+
parameters: {
|
|
742
|
+
query?: never;
|
|
743
|
+
header?: never;
|
|
744
|
+
path?: never;
|
|
745
|
+
cookie?: never;
|
|
746
|
+
};
|
|
747
|
+
/**
|
|
748
|
+
* Prices of every card in a set (Pro or trial; hundreds of rows)
|
|
749
|
+
* @description Ambiguous set: **300** with the `Disambiguation` body (no `error` field).
|
|
750
|
+
*/
|
|
751
|
+
get: operations["pokemonSetPrices"];
|
|
752
|
+
put?: never;
|
|
753
|
+
post?: never;
|
|
754
|
+
delete?: never;
|
|
755
|
+
options?: never;
|
|
756
|
+
head?: never;
|
|
757
|
+
patch?: never;
|
|
758
|
+
trace?: never;
|
|
759
|
+
};
|
|
760
|
+
"/cards/{id}": {
|
|
761
|
+
parameters: {
|
|
762
|
+
query?: never;
|
|
763
|
+
header?: never;
|
|
764
|
+
path?: never;
|
|
765
|
+
cookie?: never;
|
|
766
|
+
};
|
|
767
|
+
/**
|
|
768
|
+
* Pokémon card detail
|
|
769
|
+
* @description `id` is `pk_<hex>`, a 64-character hex CardMarket `encrypted_id`, or a plain card number
|
|
770
|
+
* (`086`, `086/078`) to be combined with `set_code`. An id from another game (`op_`, `mtg_`...)
|
|
771
|
+
* gives 400 with a hint to the right route.
|
|
772
|
+
*/
|
|
773
|
+
get: operations["pokemonGetCard"];
|
|
774
|
+
put?: never;
|
|
775
|
+
post?: never;
|
|
776
|
+
delete?: never;
|
|
777
|
+
options?: never;
|
|
778
|
+
head?: never;
|
|
779
|
+
patch?: never;
|
|
780
|
+
trace?: never;
|
|
781
|
+
};
|
|
782
|
+
"/cards/{id}/price-history": {
|
|
783
|
+
parameters: {
|
|
784
|
+
query?: never;
|
|
785
|
+
header?: never;
|
|
786
|
+
path?: never;
|
|
787
|
+
cookie?: never;
|
|
788
|
+
};
|
|
789
|
+
/** Price history as fixed snapshots (7/14/30/60/120 days; Pokémon only; Pro or trial) */
|
|
790
|
+
get: operations["pokemonPriceHistory"];
|
|
791
|
+
put?: never;
|
|
792
|
+
post?: never;
|
|
793
|
+
delete?: never;
|
|
794
|
+
options?: never;
|
|
795
|
+
head?: never;
|
|
796
|
+
patch?: never;
|
|
797
|
+
trace?: never;
|
|
798
|
+
};
|
|
799
|
+
"/analytics/top-cards": {
|
|
800
|
+
parameters: {
|
|
801
|
+
query?: never;
|
|
802
|
+
header?: never;
|
|
803
|
+
path?: never;
|
|
804
|
+
cookie?: never;
|
|
805
|
+
};
|
|
806
|
+
/** Ranking by price or growth (Pro or trial) */
|
|
807
|
+
get: operations["pokemonTopCards"];
|
|
808
|
+
put?: never;
|
|
809
|
+
post?: never;
|
|
810
|
+
delete?: never;
|
|
811
|
+
options?: never;
|
|
812
|
+
head?: never;
|
|
813
|
+
patch?: never;
|
|
814
|
+
trace?: never;
|
|
815
|
+
};
|
|
816
|
+
"/op/search": {
|
|
817
|
+
parameters: {
|
|
818
|
+
query?: never;
|
|
819
|
+
header?: never;
|
|
820
|
+
path?: never;
|
|
821
|
+
cookie?: never;
|
|
822
|
+
};
|
|
823
|
+
/**
|
|
824
|
+
* Search One Piece cards
|
|
825
|
+
* @description Flat pagination `{data,total,page,limit}` (differs from Pokémon, which nests it in `pagination`).
|
|
826
|
+
* `page`/`limit` are validated with `Math.max(1, …)`.
|
|
827
|
+
*/
|
|
828
|
+
get: operations["opSearch"];
|
|
829
|
+
put?: never;
|
|
830
|
+
post?: never;
|
|
831
|
+
delete?: never;
|
|
832
|
+
options?: never;
|
|
833
|
+
head?: never;
|
|
834
|
+
patch?: never;
|
|
835
|
+
trace?: never;
|
|
836
|
+
};
|
|
837
|
+
"/op/sets": {
|
|
838
|
+
parameters: {
|
|
839
|
+
query?: never;
|
|
840
|
+
header?: never;
|
|
841
|
+
path?: never;
|
|
842
|
+
cookie?: never;
|
|
843
|
+
};
|
|
844
|
+
/**
|
|
845
|
+
* All One Piece sets
|
|
846
|
+
* @description The set identifier is called `group_id` here (`set_id` elsewhere).
|
|
847
|
+
*/
|
|
848
|
+
get: operations["opListSets"];
|
|
849
|
+
put?: never;
|
|
850
|
+
post?: never;
|
|
851
|
+
delete?: never;
|
|
852
|
+
options?: never;
|
|
853
|
+
head?: never;
|
|
854
|
+
patch?: never;
|
|
855
|
+
trace?: never;
|
|
856
|
+
};
|
|
857
|
+
"/op/sets/trending": {
|
|
858
|
+
parameters: {
|
|
859
|
+
query?: never;
|
|
860
|
+
header?: never;
|
|
861
|
+
path?: never;
|
|
862
|
+
cookie?: never;
|
|
863
|
+
};
|
|
864
|
+
/** Sets with the strongest CardMarket price change (Pro or trial) */
|
|
865
|
+
get: operations["opTrendingSets"];
|
|
866
|
+
put?: never;
|
|
867
|
+
post?: never;
|
|
868
|
+
delete?: never;
|
|
869
|
+
options?: never;
|
|
870
|
+
head?: never;
|
|
871
|
+
patch?: never;
|
|
872
|
+
trace?: never;
|
|
873
|
+
};
|
|
874
|
+
"/op/sets/{set}": {
|
|
875
|
+
parameters: {
|
|
876
|
+
query?: never;
|
|
877
|
+
header?: never;
|
|
878
|
+
path?: never;
|
|
879
|
+
cookie?: never;
|
|
880
|
+
};
|
|
881
|
+
/**
|
|
882
|
+
* Cards of a One Piece set (paginated, flat shape)
|
|
883
|
+
* @description `set` is a `set_code` (`OP01`, `EB01` also without the hyphen) or a numeric `group_id` (possibly negative).
|
|
884
|
+
* No disambiguation: if several sets share a code the first one wins.
|
|
885
|
+
*/
|
|
886
|
+
get: operations["opGetSet"];
|
|
887
|
+
put?: never;
|
|
888
|
+
post?: never;
|
|
889
|
+
delete?: never;
|
|
890
|
+
options?: never;
|
|
891
|
+
head?: never;
|
|
892
|
+
patch?: never;
|
|
893
|
+
trace?: never;
|
|
894
|
+
};
|
|
895
|
+
"/op/sets/{set}/statistics": {
|
|
896
|
+
parameters: {
|
|
897
|
+
query?: never;
|
|
898
|
+
header?: never;
|
|
899
|
+
path?: never;
|
|
900
|
+
cookie?: never;
|
|
901
|
+
};
|
|
902
|
+
/** Statistics of a set (Pro or trial) */
|
|
903
|
+
get: operations["opSetStatistics"];
|
|
904
|
+
put?: never;
|
|
905
|
+
post?: never;
|
|
906
|
+
delete?: never;
|
|
907
|
+
options?: never;
|
|
908
|
+
head?: never;
|
|
909
|
+
patch?: never;
|
|
910
|
+
trace?: never;
|
|
911
|
+
};
|
|
912
|
+
"/op/sets/{set}/completion-value": {
|
|
913
|
+
parameters: {
|
|
914
|
+
query?: never;
|
|
915
|
+
header?: never;
|
|
916
|
+
path?: never;
|
|
917
|
+
cookie?: never;
|
|
918
|
+
};
|
|
919
|
+
/** Cost to complete a set (Pro or trial) */
|
|
920
|
+
get: operations["opSetCompletionValue"];
|
|
921
|
+
put?: never;
|
|
922
|
+
post?: never;
|
|
923
|
+
delete?: never;
|
|
924
|
+
options?: never;
|
|
925
|
+
head?: never;
|
|
926
|
+
patch?: never;
|
|
927
|
+
trace?: never;
|
|
928
|
+
};
|
|
929
|
+
"/op/cards/{id}": {
|
|
930
|
+
parameters: {
|
|
931
|
+
query?: never;
|
|
932
|
+
header?: never;
|
|
933
|
+
path?: never;
|
|
934
|
+
cookie?: never;
|
|
935
|
+
};
|
|
936
|
+
/**
|
|
937
|
+
* One Piece card detail
|
|
938
|
+
* @description `id` is `op_<hex>`. Flat card, with `success` and without `card_info` (differs from Pokémon).
|
|
939
|
+
*/
|
|
940
|
+
get: operations["opGetCard"];
|
|
941
|
+
put?: never;
|
|
942
|
+
post?: never;
|
|
943
|
+
delete?: never;
|
|
944
|
+
options?: never;
|
|
945
|
+
head?: never;
|
|
946
|
+
patch?: never;
|
|
947
|
+
trace?: never;
|
|
948
|
+
};
|
|
949
|
+
"/op/prices": {
|
|
950
|
+
parameters: {
|
|
951
|
+
query?: never;
|
|
952
|
+
header?: never;
|
|
953
|
+
path?: never;
|
|
954
|
+
cookie?: never;
|
|
955
|
+
};
|
|
956
|
+
/**
|
|
957
|
+
* Prices of every card in a set (Pro or trial)
|
|
958
|
+
* @description The set goes in the query (`set_code` or `group_id`), not in the path as on other routes.
|
|
959
|
+
* At least one of the two is required, otherwise 400.
|
|
960
|
+
*/
|
|
961
|
+
get: operations["opSetPrices"];
|
|
962
|
+
put?: never;
|
|
963
|
+
post?: never;
|
|
964
|
+
delete?: never;
|
|
965
|
+
options?: never;
|
|
966
|
+
head?: never;
|
|
967
|
+
patch?: never;
|
|
968
|
+
trace?: never;
|
|
969
|
+
};
|
|
970
|
+
"/op/analytics/top-cards": {
|
|
971
|
+
parameters: {
|
|
972
|
+
query?: never;
|
|
973
|
+
header?: never;
|
|
974
|
+
path?: never;
|
|
975
|
+
cookie?: never;
|
|
976
|
+
};
|
|
977
|
+
/**
|
|
978
|
+
* Ranking by price or growth (Pro or trial)
|
|
979
|
+
* @description `metric=growth` requires `source=cm` (with `tcg` it gives 400 `Not available yet`).
|
|
980
|
+
*/
|
|
981
|
+
get: operations["opTopCards"];
|
|
982
|
+
put?: never;
|
|
983
|
+
post?: never;
|
|
984
|
+
delete?: never;
|
|
985
|
+
options?: never;
|
|
986
|
+
head?: never;
|
|
987
|
+
patch?: never;
|
|
988
|
+
trace?: never;
|
|
989
|
+
};
|
|
990
|
+
"/{game}/search": {
|
|
991
|
+
parameters: {
|
|
992
|
+
query?: never;
|
|
993
|
+
header?: never;
|
|
994
|
+
path?: never;
|
|
995
|
+
cookie?: never;
|
|
996
|
+
};
|
|
997
|
+
/**
|
|
998
|
+
* Search the cards of a game
|
|
999
|
+
* @description `q` must be 2-100 characters. `limit`/`page` are validated (invalid values fall back to defaults).
|
|
1000
|
+
* `metadata.truncated` means the search stopped at its cap: a more specific query is needed.
|
|
1001
|
+
*/
|
|
1002
|
+
get: operations["gameSearch"];
|
|
1003
|
+
put?: never;
|
|
1004
|
+
post?: never;
|
|
1005
|
+
delete?: never;
|
|
1006
|
+
options?: never;
|
|
1007
|
+
head?: never;
|
|
1008
|
+
patch?: never;
|
|
1009
|
+
trace?: never;
|
|
1010
|
+
};
|
|
1011
|
+
"/{game}/sets": {
|
|
1012
|
+
parameters: {
|
|
1013
|
+
query?: never;
|
|
1014
|
+
header?: never;
|
|
1015
|
+
path?: never;
|
|
1016
|
+
cookie?: never;
|
|
1017
|
+
};
|
|
1018
|
+
/**
|
|
1019
|
+
* All sets of a game
|
|
1020
|
+
* @description `set_code` can be `null`. `card_count`/`sealed_count` are missing if the SQL counts function is not installed.
|
|
1021
|
+
*/
|
|
1022
|
+
get: operations["gameListSets"];
|
|
1023
|
+
put?: never;
|
|
1024
|
+
post?: never;
|
|
1025
|
+
delete?: never;
|
|
1026
|
+
options?: never;
|
|
1027
|
+
head?: never;
|
|
1028
|
+
patch?: never;
|
|
1029
|
+
trace?: never;
|
|
1030
|
+
};
|
|
1031
|
+
"/{game}/sets/trending": {
|
|
1032
|
+
parameters: {
|
|
1033
|
+
query?: never;
|
|
1034
|
+
header?: never;
|
|
1035
|
+
path?: never;
|
|
1036
|
+
cookie?: never;
|
|
1037
|
+
};
|
|
1038
|
+
/** Trending sets (Ultra or trial) */
|
|
1039
|
+
get: operations["gameTrendingSets"];
|
|
1040
|
+
put?: never;
|
|
1041
|
+
post?: never;
|
|
1042
|
+
delete?: never;
|
|
1043
|
+
options?: never;
|
|
1044
|
+
head?: never;
|
|
1045
|
+
patch?: never;
|
|
1046
|
+
trace?: never;
|
|
1047
|
+
};
|
|
1048
|
+
"/{game}/sets/{set}": {
|
|
1049
|
+
parameters: {
|
|
1050
|
+
query?: never;
|
|
1051
|
+
header?: never;
|
|
1052
|
+
path?: never;
|
|
1053
|
+
cookie?: never;
|
|
1054
|
+
};
|
|
1055
|
+
/**
|
|
1056
|
+
* Cards of a set (paginated)
|
|
1057
|
+
* @description `set` is a `set_code` or a `set_id`. Ambiguous set: **200** with `disambiguation: true`
|
|
1058
|
+
* (the Pro routes answer 409). The listing exposes no prices (`prices: []`).
|
|
1059
|
+
*/
|
|
1060
|
+
get: operations["gameGetSet"];
|
|
1061
|
+
put?: never;
|
|
1062
|
+
post?: never;
|
|
1063
|
+
delete?: never;
|
|
1064
|
+
options?: never;
|
|
1065
|
+
head?: never;
|
|
1066
|
+
patch?: never;
|
|
1067
|
+
trace?: never;
|
|
1068
|
+
};
|
|
1069
|
+
"/{game}/sets/{set}/statistics": {
|
|
1070
|
+
parameters: {
|
|
1071
|
+
query?: never;
|
|
1072
|
+
header?: never;
|
|
1073
|
+
path?: never;
|
|
1074
|
+
cookie?: never;
|
|
1075
|
+
};
|
|
1076
|
+
/** Statistics of a set (Ultra or trial) */
|
|
1077
|
+
get: operations["gameSetStatistics"];
|
|
1078
|
+
put?: never;
|
|
1079
|
+
post?: never;
|
|
1080
|
+
delete?: never;
|
|
1081
|
+
options?: never;
|
|
1082
|
+
head?: never;
|
|
1083
|
+
patch?: never;
|
|
1084
|
+
trace?: never;
|
|
1085
|
+
};
|
|
1086
|
+
"/{game}/sets/{set}/completion-value": {
|
|
1087
|
+
parameters: {
|
|
1088
|
+
query?: never;
|
|
1089
|
+
header?: never;
|
|
1090
|
+
path?: never;
|
|
1091
|
+
cookie?: never;
|
|
1092
|
+
};
|
|
1093
|
+
/** Cost to complete a set (Ultra or trial) */
|
|
1094
|
+
get: operations["gameSetCompletionValue"];
|
|
1095
|
+
put?: never;
|
|
1096
|
+
post?: never;
|
|
1097
|
+
delete?: never;
|
|
1098
|
+
options?: never;
|
|
1099
|
+
head?: never;
|
|
1100
|
+
patch?: never;
|
|
1101
|
+
trace?: never;
|
|
1102
|
+
};
|
|
1103
|
+
"/{game}/prices/{set}": {
|
|
1104
|
+
parameters: {
|
|
1105
|
+
query?: never;
|
|
1106
|
+
header?: never;
|
|
1107
|
+
path?: never;
|
|
1108
|
+
cookie?: never;
|
|
1109
|
+
};
|
|
1110
|
+
/** Prices of every card in a set (Ultra or trial; up to thousands of rows) */
|
|
1111
|
+
get: operations["gameSetPrices"];
|
|
1112
|
+
put?: never;
|
|
1113
|
+
post?: never;
|
|
1114
|
+
delete?: never;
|
|
1115
|
+
options?: never;
|
|
1116
|
+
head?: never;
|
|
1117
|
+
patch?: never;
|
|
1118
|
+
trace?: never;
|
|
1119
|
+
};
|
|
1120
|
+
"/{game}/cards/{id}": {
|
|
1121
|
+
parameters: {
|
|
1122
|
+
query?: never;
|
|
1123
|
+
header?: never;
|
|
1124
|
+
path?: never;
|
|
1125
|
+
cookie?: never;
|
|
1126
|
+
};
|
|
1127
|
+
/**
|
|
1128
|
+
* Card detail
|
|
1129
|
+
* @description `id` is `<code>_<hex>` or a 64-character hex CardMarket `encrypted_id` (CardMarket-only cards).
|
|
1130
|
+
*/
|
|
1131
|
+
get: operations["gameGetCard"];
|
|
1132
|
+
put?: never;
|
|
1133
|
+
post?: never;
|
|
1134
|
+
delete?: never;
|
|
1135
|
+
options?: never;
|
|
1136
|
+
head?: never;
|
|
1137
|
+
patch?: never;
|
|
1138
|
+
trace?: never;
|
|
1139
|
+
};
|
|
1140
|
+
"/{game}/analytics/top-cards": {
|
|
1141
|
+
parameters: {
|
|
1142
|
+
query?: never;
|
|
1143
|
+
header?: never;
|
|
1144
|
+
path?: never;
|
|
1145
|
+
cookie?: never;
|
|
1146
|
+
};
|
|
1147
|
+
/**
|
|
1148
|
+
* Ranking by price or growth (Ultra or trial)
|
|
1149
|
+
* @description `metric=growth` requires `source=cm` (with `tcg` it gives 400 `Not available yet`).
|
|
1150
|
+
*/
|
|
1151
|
+
get: operations["gameTopCards"];
|
|
1152
|
+
put?: never;
|
|
1153
|
+
post?: never;
|
|
1154
|
+
delete?: never;
|
|
1155
|
+
options?: never;
|
|
1156
|
+
head?: never;
|
|
1157
|
+
patch?: never;
|
|
1158
|
+
trace?: never;
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
interface components {
|
|
1162
|
+
schemas: {
|
|
1163
|
+
/** @enum {string} */
|
|
1164
|
+
GameCode: "mtg" | "ygo" | "cfv" | "dbs" | "fab" | "dgm" | "swu" | "lor" | "rft" | "cpk";
|
|
1165
|
+
Nullable_Number: number | null;
|
|
1166
|
+
/** @description Union of all error shapes; only `error` is always present. */
|
|
1167
|
+
ApiError: {
|
|
1168
|
+
error: string;
|
|
1169
|
+
message?: string;
|
|
1170
|
+
/** Format: uri */
|
|
1171
|
+
docs?: string;
|
|
1172
|
+
example?: string;
|
|
1173
|
+
did_you_mean?: string;
|
|
1174
|
+
/** Format: uri */
|
|
1175
|
+
redeem_url?: string;
|
|
1176
|
+
/** Format: uri */
|
|
1177
|
+
upgrade_url?: string;
|
|
1178
|
+
/** Format: uri */
|
|
1179
|
+
contact_url?: string;
|
|
1180
|
+
suggestions?: {
|
|
1181
|
+
[key: string]: unknown;
|
|
1182
|
+
}[];
|
|
1183
|
+
/** @description Candidates of an ambiguous set; the fields vary (the Pokémon set-image route sends only `set_id` and `language`). */
|
|
1184
|
+
matches?: components["schemas"]["SetMatch"][];
|
|
1185
|
+
} & {
|
|
1186
|
+
[key: string]: unknown;
|
|
1187
|
+
};
|
|
1188
|
+
RateLimitError: components["schemas"]["ApiError"] & {
|
|
1189
|
+
limits?: {
|
|
1190
|
+
hourly?: components["schemas"]["LimitWindow"];
|
|
1191
|
+
daily?: components["schemas"]["LimitWindow"];
|
|
1192
|
+
};
|
|
1193
|
+
};
|
|
1194
|
+
LimitWindow: {
|
|
1195
|
+
limit: number;
|
|
1196
|
+
used: number;
|
|
1197
|
+
remaining: number;
|
|
1198
|
+
};
|
|
1199
|
+
HealthCheck: {
|
|
1200
|
+
/** @enum {string} */
|
|
1201
|
+
status: "healthy" | "degraded" | "unhealthy" | "unknown";
|
|
1202
|
+
responseTime?: number | null;
|
|
1203
|
+
/** @description Present when the check failed or is limited. */
|
|
1204
|
+
message?: string;
|
|
1205
|
+
};
|
|
1206
|
+
Health: {
|
|
1207
|
+
/** @enum {string} */
|
|
1208
|
+
status: "healthy" | "unhealthy";
|
|
1209
|
+
/** Format: date-time */
|
|
1210
|
+
timestamp?: string;
|
|
1211
|
+
version?: string;
|
|
1212
|
+
/** @description Keys are `database`, `cache` and `storage`. */
|
|
1213
|
+
checks?: {
|
|
1214
|
+
[key: string]: components["schemas"]["HealthCheck"];
|
|
1215
|
+
};
|
|
1216
|
+
responseTime?: number;
|
|
1217
|
+
region?: string;
|
|
1218
|
+
/** @description Present when degraded or unhealthy. */
|
|
1219
|
+
message?: string;
|
|
1220
|
+
};
|
|
1221
|
+
GamesResponse: {
|
|
1222
|
+
success: boolean;
|
|
1223
|
+
data: {
|
|
1224
|
+
code: components["schemas"]["GameCode"];
|
|
1225
|
+
name: string;
|
|
1226
|
+
endpoints: {
|
|
1227
|
+
[key: string]: string;
|
|
1228
|
+
};
|
|
1229
|
+
pro_endpoints: {
|
|
1230
|
+
[key: string]: string;
|
|
1231
|
+
};
|
|
1232
|
+
}[];
|
|
1233
|
+
};
|
|
1234
|
+
TcgplayerPrice: {
|
|
1235
|
+
low_price?: components["schemas"]["Nullable_Number"];
|
|
1236
|
+
mid_price?: components["schemas"]["Nullable_Number"];
|
|
1237
|
+
high_price?: components["schemas"]["Nullable_Number"];
|
|
1238
|
+
market_price?: components["schemas"]["Nullable_Number"];
|
|
1239
|
+
direct_low_price?: components["schemas"]["Nullable_Number"];
|
|
1240
|
+
/** @description ISO 8601; with or without offset (`+00:00`) depending on the family. */
|
|
1241
|
+
updated_at?: string | null;
|
|
1242
|
+
};
|
|
1243
|
+
/** @description TCGPlayer finish (Pokémon and games). */
|
|
1244
|
+
TcgplayerVariantPrice: components["schemas"]["TcgplayerPrice"] & {
|
|
1245
|
+
/** @description Normal, Holofoil, Reverse Holofoil, Foil... */
|
|
1246
|
+
sub_type_name?: string;
|
|
1247
|
+
};
|
|
1248
|
+
/** @description Prices in EUR. */
|
|
1249
|
+
CardmarketPrice: {
|
|
1250
|
+
avg?: components["schemas"]["Nullable_Number"];
|
|
1251
|
+
low?: components["schemas"]["Nullable_Number"];
|
|
1252
|
+
trend?: components["schemas"]["Nullable_Number"];
|
|
1253
|
+
avg1?: components["schemas"]["Nullable_Number"];
|
|
1254
|
+
avg7?: components["schemas"]["Nullable_Number"];
|
|
1255
|
+
avg30?: components["schemas"]["Nullable_Number"];
|
|
1256
|
+
updated_at?: string | null;
|
|
1257
|
+
};
|
|
1258
|
+
CardmarketVariantPrice: components["schemas"]["CardmarketPrice"] & {
|
|
1259
|
+
/** @description normal, holo, foil... */
|
|
1260
|
+
variant_type?: string;
|
|
1261
|
+
};
|
|
1262
|
+
/**
|
|
1263
|
+
* @description Common fields. The ten games add their own fields in snake_case (`mtg`: `p`,`t`,`sub_type`;
|
|
1264
|
+
* `ygo`: `attack`,`defense`...). Note: `set_id` is missing in a Pokémon set listing, where
|
|
1265
|
+
* `set_code` holds the numeric id; `card_text` and `card_type` are often `null`.
|
|
1266
|
+
*/
|
|
1267
|
+
CardInfo: {
|
|
1268
|
+
name: string;
|
|
1269
|
+
clean_name?: string | null;
|
|
1270
|
+
set_name?: string | null;
|
|
1271
|
+
set_code?: string | null;
|
|
1272
|
+
set_id?: string | null;
|
|
1273
|
+
card_number?: string | null;
|
|
1274
|
+
rarity?: string | null;
|
|
1275
|
+
card_type?: string | null;
|
|
1276
|
+
/** @description `card` or sealed product. */
|
|
1277
|
+
product_type?: string | null;
|
|
1278
|
+
variants?: string[];
|
|
1279
|
+
card_text?: string | null;
|
|
1280
|
+
hp?: string | null;
|
|
1281
|
+
stage?: string | null;
|
|
1282
|
+
attacks?: string[];
|
|
1283
|
+
weakness?: string | null;
|
|
1284
|
+
resistance?: string | null;
|
|
1285
|
+
retreat_cost?: string | null;
|
|
1286
|
+
} & {
|
|
1287
|
+
[key: string]: unknown;
|
|
1288
|
+
};
|
|
1289
|
+
/** @description `id` is `pk_<hex>`, `<code>_<hex>` or a 64-character hex CardMarket `encrypted_id` (CardMarket-only cards). */
|
|
1290
|
+
Card: {
|
|
1291
|
+
id: string;
|
|
1292
|
+
card_info: components["schemas"]["CardInfo"];
|
|
1293
|
+
images?: {
|
|
1294
|
+
languages?: string[];
|
|
1295
|
+
};
|
|
1296
|
+
tcgplayer?: {
|
|
1297
|
+
prices?: components["schemas"]["TcgplayerVariantPrice"][];
|
|
1298
|
+
url?: string;
|
|
1299
|
+
} | null;
|
|
1300
|
+
cardmarket?: {
|
|
1301
|
+
product_name?: string | null;
|
|
1302
|
+
prices?: components["schemas"]["CardmarketVariantPrice"][];
|
|
1303
|
+
product_url?: string;
|
|
1304
|
+
} | null;
|
|
1305
|
+
};
|
|
1306
|
+
Pagination: {
|
|
1307
|
+
page: number;
|
|
1308
|
+
limit: number;
|
|
1309
|
+
total: number;
|
|
1310
|
+
/** @description Pokémon with `limit=0`: `Infinity` becomes `null` in JSON. */
|
|
1311
|
+
total_pages: number | null;
|
|
1312
|
+
};
|
|
1313
|
+
SearchResponse: {
|
|
1314
|
+
query: string;
|
|
1315
|
+
results: components["schemas"]["Card"][];
|
|
1316
|
+
pagination: components["schemas"]["Pagination"];
|
|
1317
|
+
metadata?: {
|
|
1318
|
+
total_count?: number;
|
|
1319
|
+
tcg?: number;
|
|
1320
|
+
cardmarket?: number;
|
|
1321
|
+
tcg_only?: number;
|
|
1322
|
+
cardmarket_only?: number;
|
|
1323
|
+
both_sources?: number;
|
|
1324
|
+
/** @description Games only. */
|
|
1325
|
+
truncated?: boolean;
|
|
1326
|
+
};
|
|
1327
|
+
};
|
|
1328
|
+
SetListEntry: {
|
|
1329
|
+
name: string;
|
|
1330
|
+
set_code?: string | null;
|
|
1331
|
+
/** @description Numeric, as a string, possibly negative (CardMarket-only). */
|
|
1332
|
+
set_id: string;
|
|
1333
|
+
card_count?: number;
|
|
1334
|
+
sealed_count?: number;
|
|
1335
|
+
/** @description Pokémon only. */
|
|
1336
|
+
number_count?: number;
|
|
1337
|
+
language?: string | null;
|
|
1338
|
+
/** @description Pokémon: `3rd August, 2007`; games: ISO 8601. */
|
|
1339
|
+
release_date?: string | null;
|
|
1340
|
+
};
|
|
1341
|
+
SetListResponse: {
|
|
1342
|
+
success: boolean;
|
|
1343
|
+
data: components["schemas"]["SetListEntry"][];
|
|
1344
|
+
total: number;
|
|
1345
|
+
};
|
|
1346
|
+
SetDetail: {
|
|
1347
|
+
name: string;
|
|
1348
|
+
set_code?: string | null;
|
|
1349
|
+
set_id: string;
|
|
1350
|
+
total_cards?: number;
|
|
1351
|
+
language?: string | null;
|
|
1352
|
+
release_date?: string | null;
|
|
1353
|
+
};
|
|
1354
|
+
SetCardsResponse: {
|
|
1355
|
+
success: boolean;
|
|
1356
|
+
set: components["schemas"]["SetDetail"];
|
|
1357
|
+
cards: components["schemas"]["Card"][];
|
|
1358
|
+
pagination: components["schemas"]["Pagination"];
|
|
1359
|
+
};
|
|
1360
|
+
SetMatch: {
|
|
1361
|
+
set_id?: string;
|
|
1362
|
+
set_code?: string | null;
|
|
1363
|
+
name?: string;
|
|
1364
|
+
language?: string | null;
|
|
1365
|
+
release_date?: string | null;
|
|
1366
|
+
};
|
|
1367
|
+
Disambiguation: {
|
|
1368
|
+
/** @constant */
|
|
1369
|
+
disambiguation: true;
|
|
1370
|
+
/** @enum {string} */
|
|
1371
|
+
ambiguity?: "set";
|
|
1372
|
+
message?: string;
|
|
1373
|
+
matches: components["schemas"]["SetMatch"][];
|
|
1374
|
+
total?: number;
|
|
1375
|
+
};
|
|
1376
|
+
PriceRow: {
|
|
1377
|
+
id: string;
|
|
1378
|
+
card_number?: string | null;
|
|
1379
|
+
name: string;
|
|
1380
|
+
variant?: string | null;
|
|
1381
|
+
product_type?: string;
|
|
1382
|
+
tcgplayer?: components["schemas"]["TcgplayerPrice"] | null;
|
|
1383
|
+
cardmarket?: components["schemas"]["CardmarketPrice"] | null;
|
|
1384
|
+
};
|
|
1385
|
+
/** @description The set id is called `group_id` here (`set_id` in the games). */
|
|
1386
|
+
PokemonPricesResponse: {
|
|
1387
|
+
success?: boolean;
|
|
1388
|
+
/** @enum {string} */
|
|
1389
|
+
source?: "both" | "tcg" | "cm";
|
|
1390
|
+
set_code?: string | null;
|
|
1391
|
+
group_id?: string;
|
|
1392
|
+
data?: components["schemas"]["PriceRow"][];
|
|
1393
|
+
total?: number;
|
|
1394
|
+
};
|
|
1395
|
+
GamePricesResponse: {
|
|
1396
|
+
success?: boolean;
|
|
1397
|
+
/** @enum {string} */
|
|
1398
|
+
source?: "both" | "tcg" | "cm";
|
|
1399
|
+
set_code?: string | null;
|
|
1400
|
+
set_id?: string;
|
|
1401
|
+
data?: components["schemas"]["PriceRow"][];
|
|
1402
|
+
total?: number;
|
|
1403
|
+
};
|
|
1404
|
+
StatisticsResponse: {
|
|
1405
|
+
/** @description Pokémon: `set_code` is the numeric `set_id`; `set_id` is missing. */
|
|
1406
|
+
set_info: {
|
|
1407
|
+
name?: string;
|
|
1408
|
+
set_code?: string | null;
|
|
1409
|
+
set_id?: string;
|
|
1410
|
+
total_cards?: number;
|
|
1411
|
+
};
|
|
1412
|
+
price_statistics: {
|
|
1413
|
+
tcgplayer?: components["schemas"]["PriceStats"];
|
|
1414
|
+
cardmarket?: components["schemas"]["PriceStats"];
|
|
1415
|
+
};
|
|
1416
|
+
rarity_breakdown: {
|
|
1417
|
+
[key: string]: number;
|
|
1418
|
+
};
|
|
1419
|
+
};
|
|
1420
|
+
PriceStats: ({
|
|
1421
|
+
/** @description A string (`"25.92"`), unlike the other prices. */
|
|
1422
|
+
avg_market_price?: string;
|
|
1423
|
+
avg_price?: string;
|
|
1424
|
+
min_price?: number;
|
|
1425
|
+
max_price?: number;
|
|
1426
|
+
most_expensive?: {
|
|
1427
|
+
/** @description Missing in Pokémon. */
|
|
1428
|
+
id?: string;
|
|
1429
|
+
name?: string;
|
|
1430
|
+
price?: number;
|
|
1431
|
+
};
|
|
1432
|
+
/** @enum {string} */
|
|
1433
|
+
trend_direction?: "up" | "down" | "stable";
|
|
1434
|
+
} & {
|
|
1435
|
+
[key: string]: unknown;
|
|
1436
|
+
}) | null;
|
|
1437
|
+
CompletionValueResponse: {
|
|
1438
|
+
set_info: {
|
|
1439
|
+
[key: string]: unknown;
|
|
1440
|
+
};
|
|
1441
|
+
completion_cost: {
|
|
1442
|
+
tcgplayer?: {
|
|
1443
|
+
currency?: string;
|
|
1444
|
+
low_estimate?: number;
|
|
1445
|
+
market_estimate?: number;
|
|
1446
|
+
high_estimate?: number;
|
|
1447
|
+
};
|
|
1448
|
+
cardmarket?: {
|
|
1449
|
+
currency?: string;
|
|
1450
|
+
low_estimate?: number;
|
|
1451
|
+
avg_estimate?: number;
|
|
1452
|
+
trend_estimate?: number;
|
|
1453
|
+
};
|
|
1454
|
+
note?: string;
|
|
1455
|
+
};
|
|
1456
|
+
breakdown_by_rarity: {
|
|
1457
|
+
[key: string]: {
|
|
1458
|
+
count?: number;
|
|
1459
|
+
total_cost?: number;
|
|
1460
|
+
};
|
|
1461
|
+
};
|
|
1462
|
+
};
|
|
1463
|
+
TrendingResponse: {
|
|
1464
|
+
period: string;
|
|
1465
|
+
trending_sets: {
|
|
1466
|
+
set_name?: string | null;
|
|
1467
|
+
set_code?: string | null;
|
|
1468
|
+
/** @description Missing in Pokémon. */
|
|
1469
|
+
set_id?: string;
|
|
1470
|
+
card_count?: number;
|
|
1471
|
+
cardmarket?: {
|
|
1472
|
+
/** @description `+446.7%` */
|
|
1473
|
+
price_change?: string;
|
|
1474
|
+
avg_price_current?: number;
|
|
1475
|
+
avg_price_previous?: number;
|
|
1476
|
+
top_movers?: {
|
|
1477
|
+
name?: string | null;
|
|
1478
|
+
change?: string;
|
|
1479
|
+
}[];
|
|
1480
|
+
};
|
|
1481
|
+
/** @description `{status:'work_in_progress'}` or `null` (CardMarket-only sets). */
|
|
1482
|
+
tcgplayer?: {
|
|
1483
|
+
[key: string]: unknown;
|
|
1484
|
+
} | null;
|
|
1485
|
+
}[];
|
|
1486
|
+
};
|
|
1487
|
+
TopCardsResponse: {
|
|
1488
|
+
/** @enum {string} */
|
|
1489
|
+
metric: "price" | "growth";
|
|
1490
|
+
/** @enum {string} */
|
|
1491
|
+
source: "tcg" | "cm";
|
|
1492
|
+
top_cards: {
|
|
1493
|
+
id: string;
|
|
1494
|
+
card_info: components["schemas"]["CardInfo"];
|
|
1495
|
+
current_price: number;
|
|
1496
|
+
previous_price_7d?: number;
|
|
1497
|
+
change_7d?: string;
|
|
1498
|
+
}[];
|
|
1499
|
+
};
|
|
1500
|
+
PriceHistory: {
|
|
1501
|
+
id: string;
|
|
1502
|
+
card_name?: string | null;
|
|
1503
|
+
tcgplayer?: components["schemas"]["HistorySide"];
|
|
1504
|
+
cardmarket?: components["schemas"]["HistorySide"];
|
|
1505
|
+
};
|
|
1506
|
+
/** @description Per finish, as fixed snapshots (not a time series). The keys of `variants` are the finish names. */
|
|
1507
|
+
HistorySide: {
|
|
1508
|
+
variants?: {
|
|
1509
|
+
[key: string]: {
|
|
1510
|
+
current?: {
|
|
1511
|
+
[key: string]: number | null;
|
|
1512
|
+
};
|
|
1513
|
+
price_7d?: number | null;
|
|
1514
|
+
price_14d?: number | null;
|
|
1515
|
+
price_30d?: number | null;
|
|
1516
|
+
price_60d?: number | null;
|
|
1517
|
+
price_120d?: number | null;
|
|
1518
|
+
change_7d?: string | null;
|
|
1519
|
+
change_14d?: string | null;
|
|
1520
|
+
change_30d?: string | null;
|
|
1521
|
+
change_60d?: string | null;
|
|
1522
|
+
change_120d?: string | null;
|
|
1523
|
+
last_updated?: string | null;
|
|
1524
|
+
} & {
|
|
1525
|
+
[key: string]: unknown;
|
|
1526
|
+
};
|
|
1527
|
+
};
|
|
1528
|
+
} | null;
|
|
1529
|
+
/** @description Flat card: no `card_info`, `ext_*` fields; `prices` is a single object (Pokémon: an array per finish). */
|
|
1530
|
+
OpCard: {
|
|
1531
|
+
/** @description `op_<hex>` */
|
|
1532
|
+
id: string;
|
|
1533
|
+
card_number?: string | null;
|
|
1534
|
+
name: string;
|
|
1535
|
+
clean_name?: string | null;
|
|
1536
|
+
sub_type_name?: string | null;
|
|
1537
|
+
rarity?: string | null;
|
|
1538
|
+
card_type?: string | null;
|
|
1539
|
+
ext_color?: string | null;
|
|
1540
|
+
ext_cost?: string | null;
|
|
1541
|
+
ext_power?: string | null;
|
|
1542
|
+
/** @description Separated by `;`. */
|
|
1543
|
+
ext_subtypes?: string | null;
|
|
1544
|
+
ext_attribute?: string | null;
|
|
1545
|
+
ext_life?: string | null;
|
|
1546
|
+
ext_counterplus?: string | null;
|
|
1547
|
+
ext_description?: string | null;
|
|
1548
|
+
tcgplayer?: {
|
|
1549
|
+
url?: string;
|
|
1550
|
+
prices?: components["schemas"]["TcgplayerPrice"] | null;
|
|
1551
|
+
} | null;
|
|
1552
|
+
cardmarket?: {
|
|
1553
|
+
product_name?: string | null;
|
|
1554
|
+
product_url?: string;
|
|
1555
|
+
prices?: components["schemas"]["CardmarketPrice"] | null;
|
|
1556
|
+
} | null;
|
|
1557
|
+
};
|
|
1558
|
+
OpCardDetail: {
|
|
1559
|
+
success?: boolean;
|
|
1560
|
+
} & components["schemas"]["OpCard"];
|
|
1561
|
+
/** @description Flat pagination: `total`, `page`, `limit` next to `data`. */
|
|
1562
|
+
OpCardList: {
|
|
1563
|
+
success: boolean;
|
|
1564
|
+
data: components["schemas"]["OpCard"][];
|
|
1565
|
+
total: number;
|
|
1566
|
+
page: number;
|
|
1567
|
+
limit: number;
|
|
1568
|
+
};
|
|
1569
|
+
OpSetEntry: {
|
|
1570
|
+
name?: string;
|
|
1571
|
+
set_code?: string;
|
|
1572
|
+
/** @description Numeric, as a string or a number, possibly negative. */
|
|
1573
|
+
group_id?: string;
|
|
1574
|
+
language?: string | null;
|
|
1575
|
+
release_date?: string | null;
|
|
1576
|
+
};
|
|
1577
|
+
OpSetListResponse: {
|
|
1578
|
+
success?: boolean;
|
|
1579
|
+
data?: components["schemas"]["OpSetEntry"][];
|
|
1580
|
+
total?: number;
|
|
1581
|
+
};
|
|
1582
|
+
OpSetCardsResponse: components["schemas"]["OpCardList"] & {
|
|
1583
|
+
set?: components["schemas"]["OpSetEntry"];
|
|
1584
|
+
};
|
|
1585
|
+
OpPricesResponse: {
|
|
1586
|
+
success?: boolean;
|
|
1587
|
+
group_id?: string | number;
|
|
1588
|
+
data?: components["schemas"]["PriceRow"][];
|
|
1589
|
+
total?: number;
|
|
1590
|
+
};
|
|
1591
|
+
};
|
|
1592
|
+
responses: {
|
|
1593
|
+
/**
|
|
1594
|
+
* @description Missing or invalid parameter. The body shape differs by family: Pokémon and One Piece send `{error}`,
|
|
1595
|
+
* the games send `{error,message,docs}`.
|
|
1596
|
+
*/
|
|
1597
|
+
BadRequest: {
|
|
1598
|
+
headers: {
|
|
1599
|
+
[name: string]: unknown;
|
|
1600
|
+
};
|
|
1601
|
+
content: {
|
|
1602
|
+
"application/json": components["schemas"]["ApiError"];
|
|
1603
|
+
};
|
|
1604
|
+
};
|
|
1605
|
+
/** @description Missing or invalid key (also a key sent in the query string). */
|
|
1606
|
+
Unauthorized: {
|
|
1607
|
+
headers: {
|
|
1608
|
+
"X-RateLimit-Limit-Hour": components["headers"]["RateLimitLimitHour"];
|
|
1609
|
+
[name: string]: unknown;
|
|
1610
|
+
};
|
|
1611
|
+
content: {
|
|
1612
|
+
"application/json": components["schemas"]["ApiError"];
|
|
1613
|
+
};
|
|
1614
|
+
};
|
|
1615
|
+
/**
|
|
1616
|
+
* @description Insufficient plan: `Trial not activated` (with `redeem_url`), `Pro plan required` /
|
|
1617
|
+
* `Ultra plan required` (trial expired, with `upgrade_url`) or `Feature not enabled`
|
|
1618
|
+
* (this account does not have access to this feature, with `contact_url`).
|
|
1619
|
+
*/
|
|
1620
|
+
Forbidden: {
|
|
1621
|
+
headers: {
|
|
1622
|
+
[name: string]: unknown;
|
|
1623
|
+
};
|
|
1624
|
+
content: {
|
|
1625
|
+
"application/json": components["schemas"]["ApiError"];
|
|
1626
|
+
};
|
|
1627
|
+
};
|
|
1628
|
+
/**
|
|
1629
|
+
* @description Missing resource or route. Minimal shape `{error}` (Pokémon/OP) or full with `message`,
|
|
1630
|
+
* `docs`, `did_you_mean`, `suggestions`. A route of a game that is switched off gives 404.
|
|
1631
|
+
*/
|
|
1632
|
+
NotFound: {
|
|
1633
|
+
headers: {
|
|
1634
|
+
[name: string]: unknown;
|
|
1635
|
+
};
|
|
1636
|
+
content: {
|
|
1637
|
+
"application/json": components["schemas"]["ApiError"];
|
|
1638
|
+
};
|
|
1639
|
+
};
|
|
1640
|
+
/** @description Ambiguous set (or card number). Pick with the `set_id` of one of the `matches`. */
|
|
1641
|
+
AmbiguousSet: {
|
|
1642
|
+
headers: {
|
|
1643
|
+
[name: string]: unknown;
|
|
1644
|
+
};
|
|
1645
|
+
content: {
|
|
1646
|
+
"application/json": components["schemas"]["ApiError"];
|
|
1647
|
+
};
|
|
1648
|
+
};
|
|
1649
|
+
/**
|
|
1650
|
+
* @description Hourly or daily limit exhausted. The answer carries no `Retry-After` and no
|
|
1651
|
+
* `X-RateLimit-Reset`; the waiting time is not declared.
|
|
1652
|
+
*/
|
|
1653
|
+
TooManyRequests: {
|
|
1654
|
+
headers: {
|
|
1655
|
+
[name: string]: unknown;
|
|
1656
|
+
};
|
|
1657
|
+
content: {
|
|
1658
|
+
"application/json": components["schemas"]["RateLimitError"];
|
|
1659
|
+
};
|
|
1660
|
+
};
|
|
1661
|
+
/** @description Database busy or feature not yet enabled. Has `Retry-After` (5 or 3600). */
|
|
1662
|
+
Unavailable: {
|
|
1663
|
+
headers: {
|
|
1664
|
+
"Retry-After": components["headers"]["RetryAfter"];
|
|
1665
|
+
[name: string]: unknown;
|
|
1666
|
+
};
|
|
1667
|
+
content: {
|
|
1668
|
+
"application/json": components["schemas"]["ApiError"];
|
|
1669
|
+
};
|
|
1670
|
+
};
|
|
1671
|
+
/**
|
|
1672
|
+
* @description Internal error. The body is `{error}`; the text is generic for the ten games and may be
|
|
1673
|
+
* more specific for Pokémon and One Piece.
|
|
1674
|
+
*/
|
|
1675
|
+
ServerError: {
|
|
1676
|
+
headers: {
|
|
1677
|
+
[name: string]: unknown;
|
|
1678
|
+
};
|
|
1679
|
+
content: {
|
|
1680
|
+
"application/json": components["schemas"]["ApiError"];
|
|
1681
|
+
};
|
|
1682
|
+
};
|
|
1683
|
+
};
|
|
1684
|
+
parameters: {
|
|
1685
|
+
Game: components["schemas"]["GameCode"];
|
|
1686
|
+
/** @description `set_code` (`PLF`) or numeric `set_id`, possibly negative. */
|
|
1687
|
+
SetCode: string;
|
|
1688
|
+
Page: number;
|
|
1689
|
+
/** @description Set language (`eng`, `jap`, `chn`, `en`, `jp`...): the vocabulary is not uniform between Pokémon and One Piece. */
|
|
1690
|
+
Language: string;
|
|
1691
|
+
Metric: "price" | "growth";
|
|
1692
|
+
Source: "tcg" | "cm";
|
|
1693
|
+
};
|
|
1694
|
+
requestBodies: never;
|
|
1695
|
+
headers: {
|
|
1696
|
+
/** @description Requests allowed per hour */
|
|
1697
|
+
RateLimitLimitHour: number;
|
|
1698
|
+
/** @description Requests left in the hour */
|
|
1699
|
+
RateLimitRemainingHour: number;
|
|
1700
|
+
/** @description Requests allowed per day */
|
|
1701
|
+
RateLimitLimitDay: number;
|
|
1702
|
+
/** @description Requests left today */
|
|
1703
|
+
RateLimitRemainingDay: number;
|
|
1704
|
+
/** @description Seconds to wait. Present only on 503 (values 5 or 3600), never on 429. */
|
|
1705
|
+
RetryAfter: number;
|
|
1706
|
+
};
|
|
1707
|
+
pathItems: never;
|
|
1708
|
+
}
|
|
1709
|
+
interface operations {
|
|
1710
|
+
getHealth: {
|
|
1711
|
+
parameters: {
|
|
1712
|
+
query?: never;
|
|
1713
|
+
header?: never;
|
|
1714
|
+
path?: never;
|
|
1715
|
+
cookie?: never;
|
|
1716
|
+
};
|
|
1717
|
+
requestBody?: never;
|
|
1718
|
+
responses: {
|
|
1719
|
+
/** @description Healthy */
|
|
1720
|
+
200: {
|
|
1721
|
+
headers: {
|
|
1722
|
+
[name: string]: unknown;
|
|
1723
|
+
};
|
|
1724
|
+
content: {
|
|
1725
|
+
"application/json": components["schemas"]["Health"];
|
|
1726
|
+
};
|
|
1727
|
+
};
|
|
1728
|
+
/** @description A critical service is down; the body is still a health report */
|
|
1729
|
+
503: {
|
|
1730
|
+
headers: {
|
|
1731
|
+
[name: string]: unknown;
|
|
1732
|
+
};
|
|
1733
|
+
content: {
|
|
1734
|
+
"application/json": components["schemas"]["Health"];
|
|
1735
|
+
};
|
|
1736
|
+
};
|
|
1737
|
+
};
|
|
1738
|
+
};
|
|
1739
|
+
listGames: {
|
|
1740
|
+
parameters: {
|
|
1741
|
+
query?: never;
|
|
1742
|
+
header?: never;
|
|
1743
|
+
path?: never;
|
|
1744
|
+
cookie?: never;
|
|
1745
|
+
};
|
|
1746
|
+
requestBody?: never;
|
|
1747
|
+
responses: {
|
|
1748
|
+
/** @description OK */
|
|
1749
|
+
200: {
|
|
1750
|
+
headers: {
|
|
1751
|
+
[name: string]: unknown;
|
|
1752
|
+
};
|
|
1753
|
+
content: {
|
|
1754
|
+
"application/json": components["schemas"]["GamesResponse"];
|
|
1755
|
+
};
|
|
1756
|
+
};
|
|
1757
|
+
};
|
|
1758
|
+
};
|
|
1759
|
+
pokemonSearch: {
|
|
1760
|
+
parameters: {
|
|
1761
|
+
query: {
|
|
1762
|
+
q: string;
|
|
1763
|
+
page?: components["parameters"]["Page"];
|
|
1764
|
+
limit?: number;
|
|
1765
|
+
};
|
|
1766
|
+
header?: never;
|
|
1767
|
+
path?: never;
|
|
1768
|
+
cookie?: never;
|
|
1769
|
+
};
|
|
1770
|
+
requestBody?: never;
|
|
1771
|
+
responses: {
|
|
1772
|
+
/** @description OK */
|
|
1773
|
+
200: {
|
|
1774
|
+
headers: {
|
|
1775
|
+
/** @description Requests allowed per hour */
|
|
1776
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
1777
|
+
/** @description Requests left in the hour */
|
|
1778
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
1779
|
+
/** @description Requests allowed per day */
|
|
1780
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
1781
|
+
/** @description Requests left today */
|
|
1782
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
1783
|
+
[name: string]: unknown;
|
|
1784
|
+
};
|
|
1785
|
+
content: {
|
|
1786
|
+
"application/json": components["schemas"]["SearchResponse"];
|
|
1787
|
+
};
|
|
1788
|
+
};
|
|
1789
|
+
400: components["responses"]["BadRequest"];
|
|
1790
|
+
401: components["responses"]["Unauthorized"];
|
|
1791
|
+
429: components["responses"]["TooManyRequests"];
|
|
1792
|
+
500: components["responses"]["ServerError"];
|
|
1793
|
+
503: components["responses"]["Unavailable"];
|
|
1794
|
+
};
|
|
1795
|
+
};
|
|
1796
|
+
pokemonListSets: {
|
|
1797
|
+
parameters: {
|
|
1798
|
+
query?: {
|
|
1799
|
+
/** @description Set language (`eng`, `jap`, `chn`, `en`, `jp`...): the vocabulary is not uniform between Pokémon and One Piece. */
|
|
1800
|
+
language?: components["parameters"]["Language"];
|
|
1801
|
+
};
|
|
1802
|
+
header?: never;
|
|
1803
|
+
path?: never;
|
|
1804
|
+
cookie?: never;
|
|
1805
|
+
};
|
|
1806
|
+
requestBody?: never;
|
|
1807
|
+
responses: {
|
|
1808
|
+
/** @description OK */
|
|
1809
|
+
200: {
|
|
1810
|
+
headers: {
|
|
1811
|
+
/** @description Requests allowed per hour */
|
|
1812
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
1813
|
+
/** @description Requests left in the hour */
|
|
1814
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
1815
|
+
/** @description Requests allowed per day */
|
|
1816
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
1817
|
+
/** @description Requests left today */
|
|
1818
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
1819
|
+
[name: string]: unknown;
|
|
1820
|
+
};
|
|
1821
|
+
content: {
|
|
1822
|
+
"application/json": components["schemas"]["SetListResponse"];
|
|
1823
|
+
};
|
|
1824
|
+
};
|
|
1825
|
+
401: components["responses"]["Unauthorized"];
|
|
1826
|
+
429: components["responses"]["TooManyRequests"];
|
|
1827
|
+
500: components["responses"]["ServerError"];
|
|
1828
|
+
503: components["responses"]["Unavailable"];
|
|
1829
|
+
};
|
|
1830
|
+
};
|
|
1831
|
+
pokemonTrendingSets: {
|
|
1832
|
+
parameters: {
|
|
1833
|
+
query?: {
|
|
1834
|
+
period?: "7d" | "30d";
|
|
1835
|
+
limit?: number;
|
|
1836
|
+
};
|
|
1837
|
+
header?: never;
|
|
1838
|
+
path?: never;
|
|
1839
|
+
cookie?: never;
|
|
1840
|
+
};
|
|
1841
|
+
requestBody?: never;
|
|
1842
|
+
responses: {
|
|
1843
|
+
/** @description OK */
|
|
1844
|
+
200: {
|
|
1845
|
+
headers: {
|
|
1846
|
+
/** @description Requests allowed per hour */
|
|
1847
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
1848
|
+
/** @description Requests left in the hour */
|
|
1849
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
1850
|
+
/** @description Requests allowed per day */
|
|
1851
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
1852
|
+
/** @description Requests left today */
|
|
1853
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
1854
|
+
[name: string]: unknown;
|
|
1855
|
+
};
|
|
1856
|
+
content: {
|
|
1857
|
+
"application/json": components["schemas"]["TrendingResponse"];
|
|
1858
|
+
};
|
|
1859
|
+
};
|
|
1860
|
+
400: components["responses"]["BadRequest"];
|
|
1861
|
+
401: components["responses"]["Unauthorized"];
|
|
1862
|
+
403: components["responses"]["Forbidden"];
|
|
1863
|
+
429: components["responses"]["TooManyRequests"];
|
|
1864
|
+
503: components["responses"]["Unavailable"];
|
|
1865
|
+
};
|
|
1866
|
+
};
|
|
1867
|
+
pokemonGetSet: {
|
|
1868
|
+
parameters: {
|
|
1869
|
+
query?: {
|
|
1870
|
+
page?: components["parameters"]["Page"];
|
|
1871
|
+
limit?: number;
|
|
1872
|
+
/** @description Set language (`eng`, `jap`, `chn`, `en`, `jp`...): the vocabulary is not uniform between Pokémon and One Piece. */
|
|
1873
|
+
language?: components["parameters"]["Language"];
|
|
1874
|
+
};
|
|
1875
|
+
header?: never;
|
|
1876
|
+
path: {
|
|
1877
|
+
/** @description `set_code` (`PLF`) or numeric `set_id`, possibly negative. */
|
|
1878
|
+
setCode: components["parameters"]["SetCode"];
|
|
1879
|
+
};
|
|
1880
|
+
cookie?: never;
|
|
1881
|
+
};
|
|
1882
|
+
requestBody?: never;
|
|
1883
|
+
responses: {
|
|
1884
|
+
/** @description Cards of the set, or the list of candidate sets */
|
|
1885
|
+
200: {
|
|
1886
|
+
headers: {
|
|
1887
|
+
/** @description Requests allowed per hour */
|
|
1888
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
1889
|
+
/** @description Requests left in the hour */
|
|
1890
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
1891
|
+
/** @description Requests allowed per day */
|
|
1892
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
1893
|
+
/** @description Requests left today */
|
|
1894
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
1895
|
+
[name: string]: unknown;
|
|
1896
|
+
};
|
|
1897
|
+
content: {
|
|
1898
|
+
"application/json": components["schemas"]["SetCardsResponse"] | components["schemas"]["Disambiguation"];
|
|
1899
|
+
};
|
|
1900
|
+
};
|
|
1901
|
+
401: components["responses"]["Unauthorized"];
|
|
1902
|
+
404: components["responses"]["NotFound"];
|
|
1903
|
+
429: components["responses"]["TooManyRequests"];
|
|
1904
|
+
500: components["responses"]["ServerError"];
|
|
1905
|
+
503: components["responses"]["Unavailable"];
|
|
1906
|
+
};
|
|
1907
|
+
};
|
|
1908
|
+
pokemonSetStatistics: {
|
|
1909
|
+
parameters: {
|
|
1910
|
+
query?: {
|
|
1911
|
+
variant?: "normal" | "holo";
|
|
1912
|
+
};
|
|
1913
|
+
header?: never;
|
|
1914
|
+
path: {
|
|
1915
|
+
/** @description `set_code` (`PLF`) or numeric `set_id`, possibly negative. */
|
|
1916
|
+
setCode: components["parameters"]["SetCode"];
|
|
1917
|
+
};
|
|
1918
|
+
cookie?: never;
|
|
1919
|
+
};
|
|
1920
|
+
requestBody?: never;
|
|
1921
|
+
responses: {
|
|
1922
|
+
/** @description OK */
|
|
1923
|
+
200: {
|
|
1924
|
+
headers: {
|
|
1925
|
+
/** @description Requests allowed per hour */
|
|
1926
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
1927
|
+
/** @description Requests left in the hour */
|
|
1928
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
1929
|
+
/** @description Requests allowed per day */
|
|
1930
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
1931
|
+
/** @description Requests left today */
|
|
1932
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
1933
|
+
[name: string]: unknown;
|
|
1934
|
+
};
|
|
1935
|
+
content: {
|
|
1936
|
+
"application/json": components["schemas"]["StatisticsResponse"];
|
|
1937
|
+
};
|
|
1938
|
+
};
|
|
1939
|
+
401: components["responses"]["Unauthorized"];
|
|
1940
|
+
403: components["responses"]["Forbidden"];
|
|
1941
|
+
404: components["responses"]["NotFound"];
|
|
1942
|
+
409: components["responses"]["AmbiguousSet"];
|
|
1943
|
+
429: components["responses"]["TooManyRequests"];
|
|
1944
|
+
503: components["responses"]["Unavailable"];
|
|
1945
|
+
};
|
|
1946
|
+
};
|
|
1947
|
+
pokemonSetCompletionValue: {
|
|
1948
|
+
parameters: {
|
|
1949
|
+
query?: never;
|
|
1950
|
+
header?: never;
|
|
1951
|
+
path: {
|
|
1952
|
+
/** @description `set_code` (`PLF`) or numeric `set_id`, possibly negative. */
|
|
1953
|
+
setCode: components["parameters"]["SetCode"];
|
|
1954
|
+
};
|
|
1955
|
+
cookie?: never;
|
|
1956
|
+
};
|
|
1957
|
+
requestBody?: never;
|
|
1958
|
+
responses: {
|
|
1959
|
+
/** @description OK */
|
|
1960
|
+
200: {
|
|
1961
|
+
headers: {
|
|
1962
|
+
/** @description Requests allowed per hour */
|
|
1963
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
1964
|
+
/** @description Requests left in the hour */
|
|
1965
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
1966
|
+
/** @description Requests allowed per day */
|
|
1967
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
1968
|
+
/** @description Requests left today */
|
|
1969
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
1970
|
+
[name: string]: unknown;
|
|
1971
|
+
};
|
|
1972
|
+
content: {
|
|
1973
|
+
"application/json": components["schemas"]["CompletionValueResponse"];
|
|
1974
|
+
};
|
|
1975
|
+
};
|
|
1976
|
+
401: components["responses"]["Unauthorized"];
|
|
1977
|
+
403: components["responses"]["Forbidden"];
|
|
1978
|
+
404: components["responses"]["NotFound"];
|
|
1979
|
+
409: components["responses"]["AmbiguousSet"];
|
|
1980
|
+
429: components["responses"]["TooManyRequests"];
|
|
1981
|
+
503: components["responses"]["Unavailable"];
|
|
1982
|
+
};
|
|
1983
|
+
};
|
|
1984
|
+
pokemonSetPrices: {
|
|
1985
|
+
parameters: {
|
|
1986
|
+
query?: {
|
|
1987
|
+
source?: "tcg" | "cm";
|
|
1988
|
+
};
|
|
1989
|
+
header?: never;
|
|
1990
|
+
path: {
|
|
1991
|
+
/** @description `set_code` (`PLF`) or numeric `set_id`, possibly negative. */
|
|
1992
|
+
setCode: components["parameters"]["SetCode"];
|
|
1993
|
+
};
|
|
1994
|
+
cookie?: never;
|
|
1995
|
+
};
|
|
1996
|
+
requestBody?: never;
|
|
1997
|
+
responses: {
|
|
1998
|
+
/** @description OK */
|
|
1999
|
+
200: {
|
|
2000
|
+
headers: {
|
|
2001
|
+
/** @description Requests allowed per hour */
|
|
2002
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2003
|
+
/** @description Requests left in the hour */
|
|
2004
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2005
|
+
/** @description Requests allowed per day */
|
|
2006
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2007
|
+
/** @description Requests left today */
|
|
2008
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2009
|
+
[name: string]: unknown;
|
|
2010
|
+
};
|
|
2011
|
+
content: {
|
|
2012
|
+
"application/json": components["schemas"]["PokemonPricesResponse"];
|
|
2013
|
+
};
|
|
2014
|
+
};
|
|
2015
|
+
/** @description Ambiguous set */
|
|
2016
|
+
300: {
|
|
2017
|
+
headers: {
|
|
2018
|
+
[name: string]: unknown;
|
|
2019
|
+
};
|
|
2020
|
+
content: {
|
|
2021
|
+
"application/json": components["schemas"]["Disambiguation"];
|
|
2022
|
+
};
|
|
2023
|
+
};
|
|
2024
|
+
400: components["responses"]["BadRequest"];
|
|
2025
|
+
401: components["responses"]["Unauthorized"];
|
|
2026
|
+
403: components["responses"]["Forbidden"];
|
|
2027
|
+
404: components["responses"]["NotFound"];
|
|
2028
|
+
429: components["responses"]["TooManyRequests"];
|
|
2029
|
+
503: components["responses"]["Unavailable"];
|
|
2030
|
+
};
|
|
2031
|
+
};
|
|
2032
|
+
pokemonGetCard: {
|
|
2033
|
+
parameters: {
|
|
2034
|
+
query?: {
|
|
2035
|
+
/** @description Disambiguates a plain card number. */
|
|
2036
|
+
set_code?: string;
|
|
2037
|
+
};
|
|
2038
|
+
header?: never;
|
|
2039
|
+
path: {
|
|
2040
|
+
id: string;
|
|
2041
|
+
};
|
|
2042
|
+
cookie?: never;
|
|
2043
|
+
};
|
|
2044
|
+
requestBody?: never;
|
|
2045
|
+
responses: {
|
|
2046
|
+
/** @description OK */
|
|
2047
|
+
200: {
|
|
2048
|
+
headers: {
|
|
2049
|
+
/** @description Requests allowed per hour */
|
|
2050
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2051
|
+
/** @description Requests left in the hour */
|
|
2052
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2053
|
+
/** @description Requests allowed per day */
|
|
2054
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2055
|
+
/** @description Requests left today */
|
|
2056
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2057
|
+
[name: string]: unknown;
|
|
2058
|
+
};
|
|
2059
|
+
content: {
|
|
2060
|
+
"application/json": components["schemas"]["Card"];
|
|
2061
|
+
};
|
|
2062
|
+
};
|
|
2063
|
+
400: components["responses"]["BadRequest"];
|
|
2064
|
+
401: components["responses"]["Unauthorized"];
|
|
2065
|
+
404: components["responses"]["NotFound"];
|
|
2066
|
+
429: components["responses"]["TooManyRequests"];
|
|
2067
|
+
503: components["responses"]["Unavailable"];
|
|
2068
|
+
};
|
|
2069
|
+
};
|
|
2070
|
+
pokemonPriceHistory: {
|
|
2071
|
+
parameters: {
|
|
2072
|
+
query?: never;
|
|
2073
|
+
header?: never;
|
|
2074
|
+
path: {
|
|
2075
|
+
id: string;
|
|
2076
|
+
};
|
|
2077
|
+
cookie?: never;
|
|
2078
|
+
};
|
|
2079
|
+
requestBody?: never;
|
|
2080
|
+
responses: {
|
|
2081
|
+
/** @description OK */
|
|
2082
|
+
200: {
|
|
2083
|
+
headers: {
|
|
2084
|
+
/** @description Requests allowed per hour */
|
|
2085
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2086
|
+
/** @description Requests left in the hour */
|
|
2087
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2088
|
+
/** @description Requests allowed per day */
|
|
2089
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2090
|
+
/** @description Requests left today */
|
|
2091
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2092
|
+
[name: string]: unknown;
|
|
2093
|
+
};
|
|
2094
|
+
content: {
|
|
2095
|
+
"application/json": components["schemas"]["PriceHistory"];
|
|
2096
|
+
};
|
|
2097
|
+
};
|
|
2098
|
+
400: components["responses"]["BadRequest"];
|
|
2099
|
+
401: components["responses"]["Unauthorized"];
|
|
2100
|
+
403: components["responses"]["Forbidden"];
|
|
2101
|
+
404: components["responses"]["NotFound"];
|
|
2102
|
+
429: components["responses"]["TooManyRequests"];
|
|
2103
|
+
503: components["responses"]["Unavailable"];
|
|
2104
|
+
};
|
|
2105
|
+
};
|
|
2106
|
+
pokemonTopCards: {
|
|
2107
|
+
parameters: {
|
|
2108
|
+
query?: {
|
|
2109
|
+
metric?: components["parameters"]["Metric"];
|
|
2110
|
+
source?: components["parameters"]["Source"];
|
|
2111
|
+
limit?: number;
|
|
2112
|
+
};
|
|
2113
|
+
header?: never;
|
|
2114
|
+
path?: never;
|
|
2115
|
+
cookie?: never;
|
|
2116
|
+
};
|
|
2117
|
+
requestBody?: never;
|
|
2118
|
+
responses: {
|
|
2119
|
+
/** @description OK */
|
|
2120
|
+
200: {
|
|
2121
|
+
headers: {
|
|
2122
|
+
/** @description Requests allowed per hour */
|
|
2123
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2124
|
+
/** @description Requests left in the hour */
|
|
2125
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2126
|
+
/** @description Requests allowed per day */
|
|
2127
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2128
|
+
/** @description Requests left today */
|
|
2129
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2130
|
+
[name: string]: unknown;
|
|
2131
|
+
};
|
|
2132
|
+
content: {
|
|
2133
|
+
"application/json": components["schemas"]["TopCardsResponse"];
|
|
2134
|
+
};
|
|
2135
|
+
};
|
|
2136
|
+
400: components["responses"]["BadRequest"];
|
|
2137
|
+
401: components["responses"]["Unauthorized"];
|
|
2138
|
+
403: components["responses"]["Forbidden"];
|
|
2139
|
+
429: components["responses"]["TooManyRequests"];
|
|
2140
|
+
503: components["responses"]["Unavailable"];
|
|
2141
|
+
};
|
|
2142
|
+
};
|
|
2143
|
+
opSearch: {
|
|
2144
|
+
parameters: {
|
|
2145
|
+
query: {
|
|
2146
|
+
q: string;
|
|
2147
|
+
page?: components["parameters"]["Page"];
|
|
2148
|
+
limit?: number;
|
|
2149
|
+
};
|
|
2150
|
+
header?: never;
|
|
2151
|
+
path?: never;
|
|
2152
|
+
cookie?: never;
|
|
2153
|
+
};
|
|
2154
|
+
requestBody?: never;
|
|
2155
|
+
responses: {
|
|
2156
|
+
/** @description OK */
|
|
2157
|
+
200: {
|
|
2158
|
+
headers: {
|
|
2159
|
+
/** @description Requests allowed per hour */
|
|
2160
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2161
|
+
/** @description Requests left in the hour */
|
|
2162
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2163
|
+
/** @description Requests allowed per day */
|
|
2164
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2165
|
+
/** @description Requests left today */
|
|
2166
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2167
|
+
[name: string]: unknown;
|
|
2168
|
+
};
|
|
2169
|
+
content: {
|
|
2170
|
+
"application/json": components["schemas"]["OpCardList"];
|
|
2171
|
+
};
|
|
2172
|
+
};
|
|
2173
|
+
400: components["responses"]["BadRequest"];
|
|
2174
|
+
401: components["responses"]["Unauthorized"];
|
|
2175
|
+
429: components["responses"]["TooManyRequests"];
|
|
2176
|
+
500: components["responses"]["ServerError"];
|
|
2177
|
+
503: components["responses"]["Unavailable"];
|
|
2178
|
+
};
|
|
2179
|
+
};
|
|
2180
|
+
opListSets: {
|
|
2181
|
+
parameters: {
|
|
2182
|
+
query?: {
|
|
2183
|
+
/** @description Set language (`eng`, `jap`, `chn`, `en`, `jp`...): the vocabulary is not uniform between Pokémon and One Piece. */
|
|
2184
|
+
language?: components["parameters"]["Language"];
|
|
2185
|
+
};
|
|
2186
|
+
header?: never;
|
|
2187
|
+
path?: never;
|
|
2188
|
+
cookie?: never;
|
|
2189
|
+
};
|
|
2190
|
+
requestBody?: never;
|
|
2191
|
+
responses: {
|
|
2192
|
+
/** @description OK */
|
|
2193
|
+
200: {
|
|
2194
|
+
headers: {
|
|
2195
|
+
/** @description Requests allowed per hour */
|
|
2196
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2197
|
+
/** @description Requests left in the hour */
|
|
2198
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2199
|
+
/** @description Requests allowed per day */
|
|
2200
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2201
|
+
/** @description Requests left today */
|
|
2202
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2203
|
+
[name: string]: unknown;
|
|
2204
|
+
};
|
|
2205
|
+
content: {
|
|
2206
|
+
"application/json": components["schemas"]["OpSetListResponse"];
|
|
2207
|
+
};
|
|
2208
|
+
};
|
|
2209
|
+
401: components["responses"]["Unauthorized"];
|
|
2210
|
+
429: components["responses"]["TooManyRequests"];
|
|
2211
|
+
500: components["responses"]["ServerError"];
|
|
2212
|
+
503: components["responses"]["Unavailable"];
|
|
2213
|
+
};
|
|
2214
|
+
};
|
|
2215
|
+
opTrendingSets: {
|
|
2216
|
+
parameters: {
|
|
2217
|
+
query?: {
|
|
2218
|
+
/** @description Only 7d (30d gives 400). */
|
|
2219
|
+
period?: "7d";
|
|
2220
|
+
limit?: number;
|
|
2221
|
+
};
|
|
2222
|
+
header?: never;
|
|
2223
|
+
path?: never;
|
|
2224
|
+
cookie?: never;
|
|
2225
|
+
};
|
|
2226
|
+
requestBody?: never;
|
|
2227
|
+
responses: {
|
|
2228
|
+
/** @description OK */
|
|
2229
|
+
200: {
|
|
2230
|
+
headers: {
|
|
2231
|
+
/** @description Requests allowed per hour */
|
|
2232
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2233
|
+
/** @description Requests left in the hour */
|
|
2234
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2235
|
+
/** @description Requests allowed per day */
|
|
2236
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2237
|
+
/** @description Requests left today */
|
|
2238
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2239
|
+
[name: string]: unknown;
|
|
2240
|
+
};
|
|
2241
|
+
content: {
|
|
2242
|
+
"application/json": components["schemas"]["TrendingResponse"];
|
|
2243
|
+
};
|
|
2244
|
+
};
|
|
2245
|
+
400: components["responses"]["BadRequest"];
|
|
2246
|
+
401: components["responses"]["Unauthorized"];
|
|
2247
|
+
403: components["responses"]["Forbidden"];
|
|
2248
|
+
429: components["responses"]["TooManyRequests"];
|
|
2249
|
+
503: components["responses"]["Unavailable"];
|
|
2250
|
+
};
|
|
2251
|
+
};
|
|
2252
|
+
opGetSet: {
|
|
2253
|
+
parameters: {
|
|
2254
|
+
query?: {
|
|
2255
|
+
page?: components["parameters"]["Page"];
|
|
2256
|
+
limit?: number;
|
|
2257
|
+
};
|
|
2258
|
+
header?: never;
|
|
2259
|
+
path: {
|
|
2260
|
+
set: string;
|
|
2261
|
+
};
|
|
2262
|
+
cookie?: never;
|
|
2263
|
+
};
|
|
2264
|
+
requestBody?: never;
|
|
2265
|
+
responses: {
|
|
2266
|
+
/** @description OK */
|
|
2267
|
+
200: {
|
|
2268
|
+
headers: {
|
|
2269
|
+
/** @description Requests allowed per hour */
|
|
2270
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2271
|
+
/** @description Requests left in the hour */
|
|
2272
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2273
|
+
/** @description Requests allowed per day */
|
|
2274
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2275
|
+
/** @description Requests left today */
|
|
2276
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2277
|
+
[name: string]: unknown;
|
|
2278
|
+
};
|
|
2279
|
+
content: {
|
|
2280
|
+
"application/json": components["schemas"]["OpSetCardsResponse"];
|
|
2281
|
+
};
|
|
2282
|
+
};
|
|
2283
|
+
401: components["responses"]["Unauthorized"];
|
|
2284
|
+
404: components["responses"]["NotFound"];
|
|
2285
|
+
429: components["responses"]["TooManyRequests"];
|
|
2286
|
+
500: components["responses"]["ServerError"];
|
|
2287
|
+
503: components["responses"]["Unavailable"];
|
|
2288
|
+
};
|
|
2289
|
+
};
|
|
2290
|
+
opSetStatistics: {
|
|
2291
|
+
parameters: {
|
|
2292
|
+
query?: {
|
|
2293
|
+
variant?: "normal" | "foil";
|
|
2294
|
+
};
|
|
2295
|
+
header?: never;
|
|
2296
|
+
path: {
|
|
2297
|
+
set: string;
|
|
2298
|
+
};
|
|
2299
|
+
cookie?: never;
|
|
2300
|
+
};
|
|
2301
|
+
requestBody?: never;
|
|
2302
|
+
responses: {
|
|
2303
|
+
/** @description OK */
|
|
2304
|
+
200: {
|
|
2305
|
+
headers: {
|
|
2306
|
+
/** @description Requests allowed per hour */
|
|
2307
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2308
|
+
/** @description Requests left in the hour */
|
|
2309
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2310
|
+
/** @description Requests allowed per day */
|
|
2311
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2312
|
+
/** @description Requests left today */
|
|
2313
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2314
|
+
[name: string]: unknown;
|
|
2315
|
+
};
|
|
2316
|
+
content: {
|
|
2317
|
+
"application/json": components["schemas"]["StatisticsResponse"];
|
|
2318
|
+
};
|
|
2319
|
+
};
|
|
2320
|
+
400: components["responses"]["BadRequest"];
|
|
2321
|
+
401: components["responses"]["Unauthorized"];
|
|
2322
|
+
403: components["responses"]["Forbidden"];
|
|
2323
|
+
404: components["responses"]["NotFound"];
|
|
2324
|
+
429: components["responses"]["TooManyRequests"];
|
|
2325
|
+
503: components["responses"]["Unavailable"];
|
|
2326
|
+
};
|
|
2327
|
+
};
|
|
2328
|
+
opSetCompletionValue: {
|
|
2329
|
+
parameters: {
|
|
2330
|
+
query?: never;
|
|
2331
|
+
header?: never;
|
|
2332
|
+
path: {
|
|
2333
|
+
set: string;
|
|
2334
|
+
};
|
|
2335
|
+
cookie?: never;
|
|
2336
|
+
};
|
|
2337
|
+
requestBody?: never;
|
|
2338
|
+
responses: {
|
|
2339
|
+
/** @description OK */
|
|
2340
|
+
200: {
|
|
2341
|
+
headers: {
|
|
2342
|
+
/** @description Requests allowed per hour */
|
|
2343
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2344
|
+
/** @description Requests left in the hour */
|
|
2345
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2346
|
+
/** @description Requests allowed per day */
|
|
2347
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2348
|
+
/** @description Requests left today */
|
|
2349
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2350
|
+
[name: string]: unknown;
|
|
2351
|
+
};
|
|
2352
|
+
content: {
|
|
2353
|
+
"application/json": components["schemas"]["CompletionValueResponse"];
|
|
2354
|
+
};
|
|
2355
|
+
};
|
|
2356
|
+
401: components["responses"]["Unauthorized"];
|
|
2357
|
+
403: components["responses"]["Forbidden"];
|
|
2358
|
+
404: components["responses"]["NotFound"];
|
|
2359
|
+
429: components["responses"]["TooManyRequests"];
|
|
2360
|
+
503: components["responses"]["Unavailable"];
|
|
2361
|
+
};
|
|
2362
|
+
};
|
|
2363
|
+
opGetCard: {
|
|
2364
|
+
parameters: {
|
|
2365
|
+
query?: never;
|
|
2366
|
+
header?: never;
|
|
2367
|
+
path: {
|
|
2368
|
+
id: string;
|
|
2369
|
+
};
|
|
2370
|
+
cookie?: never;
|
|
2371
|
+
};
|
|
2372
|
+
requestBody?: never;
|
|
2373
|
+
responses: {
|
|
2374
|
+
/** @description OK */
|
|
2375
|
+
200: {
|
|
2376
|
+
headers: {
|
|
2377
|
+
/** @description Requests allowed per hour */
|
|
2378
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2379
|
+
/** @description Requests left in the hour */
|
|
2380
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2381
|
+
/** @description Requests allowed per day */
|
|
2382
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2383
|
+
/** @description Requests left today */
|
|
2384
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2385
|
+
[name: string]: unknown;
|
|
2386
|
+
};
|
|
2387
|
+
content: {
|
|
2388
|
+
"application/json": components["schemas"]["OpCardDetail"];
|
|
2389
|
+
};
|
|
2390
|
+
};
|
|
2391
|
+
400: components["responses"]["BadRequest"];
|
|
2392
|
+
401: components["responses"]["Unauthorized"];
|
|
2393
|
+
404: components["responses"]["NotFound"];
|
|
2394
|
+
429: components["responses"]["TooManyRequests"];
|
|
2395
|
+
500: components["responses"]["ServerError"];
|
|
2396
|
+
503: components["responses"]["Unavailable"];
|
|
2397
|
+
};
|
|
2398
|
+
};
|
|
2399
|
+
opSetPrices: {
|
|
2400
|
+
parameters: {
|
|
2401
|
+
query?: {
|
|
2402
|
+
set_code?: string;
|
|
2403
|
+
group_id?: string;
|
|
2404
|
+
};
|
|
2405
|
+
header?: never;
|
|
2406
|
+
path?: never;
|
|
2407
|
+
cookie?: never;
|
|
2408
|
+
};
|
|
2409
|
+
requestBody?: never;
|
|
2410
|
+
responses: {
|
|
2411
|
+
/** @description OK */
|
|
2412
|
+
200: {
|
|
2413
|
+
headers: {
|
|
2414
|
+
/** @description Requests allowed per hour */
|
|
2415
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2416
|
+
/** @description Requests left in the hour */
|
|
2417
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2418
|
+
/** @description Requests allowed per day */
|
|
2419
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2420
|
+
/** @description Requests left today */
|
|
2421
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2422
|
+
[name: string]: unknown;
|
|
2423
|
+
};
|
|
2424
|
+
content: {
|
|
2425
|
+
"application/json": components["schemas"]["OpPricesResponse"];
|
|
2426
|
+
};
|
|
2427
|
+
};
|
|
2428
|
+
400: components["responses"]["BadRequest"];
|
|
2429
|
+
401: components["responses"]["Unauthorized"];
|
|
2430
|
+
403: components["responses"]["Forbidden"];
|
|
2431
|
+
404: components["responses"]["NotFound"];
|
|
2432
|
+
429: components["responses"]["TooManyRequests"];
|
|
2433
|
+
503: components["responses"]["Unavailable"];
|
|
2434
|
+
};
|
|
2435
|
+
};
|
|
2436
|
+
opTopCards: {
|
|
2437
|
+
parameters: {
|
|
2438
|
+
query?: {
|
|
2439
|
+
metric?: components["parameters"]["Metric"];
|
|
2440
|
+
source?: components["parameters"]["Source"];
|
|
2441
|
+
limit?: number;
|
|
2442
|
+
};
|
|
2443
|
+
header?: never;
|
|
2444
|
+
path?: never;
|
|
2445
|
+
cookie?: never;
|
|
2446
|
+
};
|
|
2447
|
+
requestBody?: never;
|
|
2448
|
+
responses: {
|
|
2449
|
+
/** @description OK */
|
|
2450
|
+
200: {
|
|
2451
|
+
headers: {
|
|
2452
|
+
/** @description Requests allowed per hour */
|
|
2453
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2454
|
+
/** @description Requests left in the hour */
|
|
2455
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2456
|
+
/** @description Requests allowed per day */
|
|
2457
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2458
|
+
/** @description Requests left today */
|
|
2459
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2460
|
+
[name: string]: unknown;
|
|
2461
|
+
};
|
|
2462
|
+
content: {
|
|
2463
|
+
"application/json": components["schemas"]["TopCardsResponse"];
|
|
2464
|
+
};
|
|
2465
|
+
};
|
|
2466
|
+
400: components["responses"]["BadRequest"];
|
|
2467
|
+
401: components["responses"]["Unauthorized"];
|
|
2468
|
+
403: components["responses"]["Forbidden"];
|
|
2469
|
+
429: components["responses"]["TooManyRequests"];
|
|
2470
|
+
503: components["responses"]["Unavailable"];
|
|
2471
|
+
};
|
|
2472
|
+
};
|
|
2473
|
+
gameSearch: {
|
|
2474
|
+
parameters: {
|
|
2475
|
+
query: {
|
|
2476
|
+
q: string;
|
|
2477
|
+
page?: components["parameters"]["Page"];
|
|
2478
|
+
limit?: number;
|
|
2479
|
+
};
|
|
2480
|
+
header?: never;
|
|
2481
|
+
path: {
|
|
2482
|
+
game: components["parameters"]["Game"];
|
|
2483
|
+
};
|
|
2484
|
+
cookie?: never;
|
|
2485
|
+
};
|
|
2486
|
+
requestBody?: never;
|
|
2487
|
+
responses: {
|
|
2488
|
+
/** @description OK */
|
|
2489
|
+
200: {
|
|
2490
|
+
headers: {
|
|
2491
|
+
/** @description Requests allowed per hour */
|
|
2492
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2493
|
+
/** @description Requests left in the hour */
|
|
2494
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2495
|
+
/** @description Requests allowed per day */
|
|
2496
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2497
|
+
/** @description Requests left today */
|
|
2498
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2499
|
+
[name: string]: unknown;
|
|
2500
|
+
};
|
|
2501
|
+
content: {
|
|
2502
|
+
"application/json": components["schemas"]["SearchResponse"];
|
|
2503
|
+
};
|
|
2504
|
+
};
|
|
2505
|
+
400: components["responses"]["BadRequest"];
|
|
2506
|
+
401: components["responses"]["Unauthorized"];
|
|
2507
|
+
404: components["responses"]["NotFound"];
|
|
2508
|
+
429: components["responses"]["TooManyRequests"];
|
|
2509
|
+
500: components["responses"]["ServerError"];
|
|
2510
|
+
503: components["responses"]["Unavailable"];
|
|
2511
|
+
};
|
|
2512
|
+
};
|
|
2513
|
+
gameListSets: {
|
|
2514
|
+
parameters: {
|
|
2515
|
+
query?: never;
|
|
2516
|
+
header?: never;
|
|
2517
|
+
path: {
|
|
2518
|
+
game: components["parameters"]["Game"];
|
|
2519
|
+
};
|
|
2520
|
+
cookie?: never;
|
|
2521
|
+
};
|
|
2522
|
+
requestBody?: never;
|
|
2523
|
+
responses: {
|
|
2524
|
+
/** @description OK */
|
|
2525
|
+
200: {
|
|
2526
|
+
headers: {
|
|
2527
|
+
/** @description Requests allowed per hour */
|
|
2528
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2529
|
+
/** @description Requests left in the hour */
|
|
2530
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2531
|
+
/** @description Requests allowed per day */
|
|
2532
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2533
|
+
/** @description Requests left today */
|
|
2534
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2535
|
+
[name: string]: unknown;
|
|
2536
|
+
};
|
|
2537
|
+
content: {
|
|
2538
|
+
"application/json": components["schemas"]["SetListResponse"];
|
|
2539
|
+
};
|
|
2540
|
+
};
|
|
2541
|
+
401: components["responses"]["Unauthorized"];
|
|
2542
|
+
404: components["responses"]["NotFound"];
|
|
2543
|
+
429: components["responses"]["TooManyRequests"];
|
|
2544
|
+
500: components["responses"]["ServerError"];
|
|
2545
|
+
503: components["responses"]["Unavailable"];
|
|
2546
|
+
};
|
|
2547
|
+
};
|
|
2548
|
+
gameTrendingSets: {
|
|
2549
|
+
parameters: {
|
|
2550
|
+
query?: {
|
|
2551
|
+
/** @description Only 7d (30d gives 400). */
|
|
2552
|
+
period?: "7d";
|
|
2553
|
+
limit?: number;
|
|
2554
|
+
};
|
|
2555
|
+
header?: never;
|
|
2556
|
+
path: {
|
|
2557
|
+
game: components["parameters"]["Game"];
|
|
2558
|
+
};
|
|
2559
|
+
cookie?: never;
|
|
2560
|
+
};
|
|
2561
|
+
requestBody?: never;
|
|
2562
|
+
responses: {
|
|
2563
|
+
/** @description OK */
|
|
2564
|
+
200: {
|
|
2565
|
+
headers: {
|
|
2566
|
+
/** @description Requests allowed per hour */
|
|
2567
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2568
|
+
/** @description Requests left in the hour */
|
|
2569
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2570
|
+
/** @description Requests allowed per day */
|
|
2571
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2572
|
+
/** @description Requests left today */
|
|
2573
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2574
|
+
[name: string]: unknown;
|
|
2575
|
+
};
|
|
2576
|
+
content: {
|
|
2577
|
+
"application/json": components["schemas"]["TrendingResponse"];
|
|
2578
|
+
};
|
|
2579
|
+
};
|
|
2580
|
+
400: components["responses"]["BadRequest"];
|
|
2581
|
+
401: components["responses"]["Unauthorized"];
|
|
2582
|
+
403: components["responses"]["Forbidden"];
|
|
2583
|
+
429: components["responses"]["TooManyRequests"];
|
|
2584
|
+
503: components["responses"]["Unavailable"];
|
|
2585
|
+
};
|
|
2586
|
+
};
|
|
2587
|
+
gameGetSet: {
|
|
2588
|
+
parameters: {
|
|
2589
|
+
query?: {
|
|
2590
|
+
page?: components["parameters"]["Page"];
|
|
2591
|
+
limit?: number;
|
|
2592
|
+
};
|
|
2593
|
+
header?: never;
|
|
2594
|
+
path: {
|
|
2595
|
+
game: components["parameters"]["Game"];
|
|
2596
|
+
set: string;
|
|
2597
|
+
};
|
|
2598
|
+
cookie?: never;
|
|
2599
|
+
};
|
|
2600
|
+
requestBody?: never;
|
|
2601
|
+
responses: {
|
|
2602
|
+
/** @description Cards of the set, or the list of candidate sets */
|
|
2603
|
+
200: {
|
|
2604
|
+
headers: {
|
|
2605
|
+
/** @description Requests allowed per hour */
|
|
2606
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2607
|
+
/** @description Requests left in the hour */
|
|
2608
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2609
|
+
/** @description Requests allowed per day */
|
|
2610
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2611
|
+
/** @description Requests left today */
|
|
2612
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2613
|
+
[name: string]: unknown;
|
|
2614
|
+
};
|
|
2615
|
+
content: {
|
|
2616
|
+
"application/json": components["schemas"]["SetCardsResponse"] | components["schemas"]["Disambiguation"];
|
|
2617
|
+
};
|
|
2618
|
+
};
|
|
2619
|
+
401: components["responses"]["Unauthorized"];
|
|
2620
|
+
404: components["responses"]["NotFound"];
|
|
2621
|
+
429: components["responses"]["TooManyRequests"];
|
|
2622
|
+
500: components["responses"]["ServerError"];
|
|
2623
|
+
503: components["responses"]["Unavailable"];
|
|
2624
|
+
};
|
|
2625
|
+
};
|
|
2626
|
+
gameSetStatistics: {
|
|
2627
|
+
parameters: {
|
|
2628
|
+
query?: {
|
|
2629
|
+
variant?: "normal" | "foil";
|
|
2630
|
+
};
|
|
2631
|
+
header?: never;
|
|
2632
|
+
path: {
|
|
2633
|
+
game: components["parameters"]["Game"];
|
|
2634
|
+
set: string;
|
|
2635
|
+
};
|
|
2636
|
+
cookie?: never;
|
|
2637
|
+
};
|
|
2638
|
+
requestBody?: never;
|
|
2639
|
+
responses: {
|
|
2640
|
+
/** @description OK */
|
|
2641
|
+
200: {
|
|
2642
|
+
headers: {
|
|
2643
|
+
/** @description Requests allowed per hour */
|
|
2644
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2645
|
+
/** @description Requests left in the hour */
|
|
2646
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2647
|
+
/** @description Requests allowed per day */
|
|
2648
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2649
|
+
/** @description Requests left today */
|
|
2650
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2651
|
+
[name: string]: unknown;
|
|
2652
|
+
};
|
|
2653
|
+
content: {
|
|
2654
|
+
"application/json": components["schemas"]["StatisticsResponse"];
|
|
2655
|
+
};
|
|
2656
|
+
};
|
|
2657
|
+
400: components["responses"]["BadRequest"];
|
|
2658
|
+
401: components["responses"]["Unauthorized"];
|
|
2659
|
+
403: components["responses"]["Forbidden"];
|
|
2660
|
+
404: components["responses"]["NotFound"];
|
|
2661
|
+
409: components["responses"]["AmbiguousSet"];
|
|
2662
|
+
429: components["responses"]["TooManyRequests"];
|
|
2663
|
+
503: components["responses"]["Unavailable"];
|
|
2664
|
+
};
|
|
2665
|
+
};
|
|
2666
|
+
gameSetCompletionValue: {
|
|
2667
|
+
parameters: {
|
|
2668
|
+
query?: never;
|
|
2669
|
+
header?: never;
|
|
2670
|
+
path: {
|
|
2671
|
+
game: components["parameters"]["Game"];
|
|
2672
|
+
set: string;
|
|
2673
|
+
};
|
|
2674
|
+
cookie?: never;
|
|
2675
|
+
};
|
|
2676
|
+
requestBody?: never;
|
|
2677
|
+
responses: {
|
|
2678
|
+
/** @description OK */
|
|
2679
|
+
200: {
|
|
2680
|
+
headers: {
|
|
2681
|
+
/** @description Requests allowed per hour */
|
|
2682
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2683
|
+
/** @description Requests left in the hour */
|
|
2684
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2685
|
+
/** @description Requests allowed per day */
|
|
2686
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2687
|
+
/** @description Requests left today */
|
|
2688
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2689
|
+
[name: string]: unknown;
|
|
2690
|
+
};
|
|
2691
|
+
content: {
|
|
2692
|
+
"application/json": components["schemas"]["CompletionValueResponse"];
|
|
2693
|
+
};
|
|
2694
|
+
};
|
|
2695
|
+
401: components["responses"]["Unauthorized"];
|
|
2696
|
+
403: components["responses"]["Forbidden"];
|
|
2697
|
+
404: components["responses"]["NotFound"];
|
|
2698
|
+
409: components["responses"]["AmbiguousSet"];
|
|
2699
|
+
429: components["responses"]["TooManyRequests"];
|
|
2700
|
+
503: components["responses"]["Unavailable"];
|
|
2701
|
+
};
|
|
2702
|
+
};
|
|
2703
|
+
gameSetPrices: {
|
|
2704
|
+
parameters: {
|
|
2705
|
+
query?: {
|
|
2706
|
+
source?: "tcg" | "cm";
|
|
2707
|
+
};
|
|
2708
|
+
header?: never;
|
|
2709
|
+
path: {
|
|
2710
|
+
game: components["parameters"]["Game"];
|
|
2711
|
+
set: string;
|
|
2712
|
+
};
|
|
2713
|
+
cookie?: never;
|
|
2714
|
+
};
|
|
2715
|
+
requestBody?: never;
|
|
2716
|
+
responses: {
|
|
2717
|
+
/** @description OK */
|
|
2718
|
+
200: {
|
|
2719
|
+
headers: {
|
|
2720
|
+
/** @description Requests allowed per hour */
|
|
2721
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2722
|
+
/** @description Requests left in the hour */
|
|
2723
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2724
|
+
/** @description Requests allowed per day */
|
|
2725
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2726
|
+
/** @description Requests left today */
|
|
2727
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2728
|
+
[name: string]: unknown;
|
|
2729
|
+
};
|
|
2730
|
+
content: {
|
|
2731
|
+
"application/json": components["schemas"]["GamePricesResponse"];
|
|
2732
|
+
};
|
|
2733
|
+
};
|
|
2734
|
+
400: components["responses"]["BadRequest"];
|
|
2735
|
+
401: components["responses"]["Unauthorized"];
|
|
2736
|
+
403: components["responses"]["Forbidden"];
|
|
2737
|
+
404: components["responses"]["NotFound"];
|
|
2738
|
+
409: components["responses"]["AmbiguousSet"];
|
|
2739
|
+
429: components["responses"]["TooManyRequests"];
|
|
2740
|
+
503: components["responses"]["Unavailable"];
|
|
2741
|
+
};
|
|
2742
|
+
};
|
|
2743
|
+
gameGetCard: {
|
|
2744
|
+
parameters: {
|
|
2745
|
+
query?: never;
|
|
2746
|
+
header?: never;
|
|
2747
|
+
path: {
|
|
2748
|
+
game: components["parameters"]["Game"];
|
|
2749
|
+
id: string;
|
|
2750
|
+
};
|
|
2751
|
+
cookie?: never;
|
|
2752
|
+
};
|
|
2753
|
+
requestBody?: never;
|
|
2754
|
+
responses: {
|
|
2755
|
+
/** @description OK */
|
|
2756
|
+
200: {
|
|
2757
|
+
headers: {
|
|
2758
|
+
/** @description Requests allowed per hour */
|
|
2759
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2760
|
+
/** @description Requests left in the hour */
|
|
2761
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2762
|
+
/** @description Requests allowed per day */
|
|
2763
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2764
|
+
/** @description Requests left today */
|
|
2765
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2766
|
+
[name: string]: unknown;
|
|
2767
|
+
};
|
|
2768
|
+
content: {
|
|
2769
|
+
"application/json": components["schemas"]["Card"];
|
|
2770
|
+
};
|
|
2771
|
+
};
|
|
2772
|
+
400: components["responses"]["BadRequest"];
|
|
2773
|
+
401: components["responses"]["Unauthorized"];
|
|
2774
|
+
404: components["responses"]["NotFound"];
|
|
2775
|
+
429: components["responses"]["TooManyRequests"];
|
|
2776
|
+
500: components["responses"]["ServerError"];
|
|
2777
|
+
503: components["responses"]["Unavailable"];
|
|
2778
|
+
};
|
|
2779
|
+
};
|
|
2780
|
+
gameTopCards: {
|
|
2781
|
+
parameters: {
|
|
2782
|
+
query?: {
|
|
2783
|
+
metric?: components["parameters"]["Metric"];
|
|
2784
|
+
source?: components["parameters"]["Source"];
|
|
2785
|
+
limit?: number;
|
|
2786
|
+
};
|
|
2787
|
+
header?: never;
|
|
2788
|
+
path: {
|
|
2789
|
+
game: components["parameters"]["Game"];
|
|
2790
|
+
};
|
|
2791
|
+
cookie?: never;
|
|
2792
|
+
};
|
|
2793
|
+
requestBody?: never;
|
|
2794
|
+
responses: {
|
|
2795
|
+
/** @description OK */
|
|
2796
|
+
200: {
|
|
2797
|
+
headers: {
|
|
2798
|
+
/** @description Requests allowed per hour */
|
|
2799
|
+
"X-RateLimit-Limit-Hour"?: number;
|
|
2800
|
+
/** @description Requests left in the hour */
|
|
2801
|
+
"X-RateLimit-Remaining-Hour"?: number;
|
|
2802
|
+
/** @description Requests allowed per day */
|
|
2803
|
+
"X-RateLimit-Limit-Day"?: number;
|
|
2804
|
+
/** @description Requests left today */
|
|
2805
|
+
"X-RateLimit-Remaining-Day"?: number;
|
|
2806
|
+
[name: string]: unknown;
|
|
2807
|
+
};
|
|
2808
|
+
content: {
|
|
2809
|
+
"application/json": components["schemas"]["TopCardsResponse"];
|
|
2810
|
+
};
|
|
2811
|
+
};
|
|
2812
|
+
400: components["responses"]["BadRequest"];
|
|
2813
|
+
401: components["responses"]["Unauthorized"];
|
|
2814
|
+
403: components["responses"]["Forbidden"];
|
|
2815
|
+
429: components["responses"]["TooManyRequests"];
|
|
2816
|
+
503: components["responses"]["Unavailable"];
|
|
2817
|
+
};
|
|
2818
|
+
};
|
|
2819
|
+
}
|
|
2820
|
+
|
|
2821
|
+
export { AmbiguousSetError, AuthError, BadRequestError, FeatureNotEnabledError, GAME_CODES, GameUnavailableError, NetworkError, NotFoundError, PlanRequiredError, PokeWallet, PokeWalletError, PokemonWorld, RateLimitError, ServerError, UnavailableError, VERSION, ValidationError, imageUrl, paginate };
|
|
2822
|
+
export type { Card, CardmarketPrice, ClientOptions, CompletionValue, ErrorInit, FetchLike, Game, GameCode, Health, HealthCheck, HistoryPoint, ImageUrlOptions, LimitWindow, Page, PriceHistory, PriceRow, PriceStats, PricesOptions, RateLimitInfo, RateLimitWindows, SearchOptions, SearchPage, SetMatch, SetOptions, SetPage, SetPrices, SetRef, SetStatistics, SetSummary, StatisticsOptions, TcgPrice, TopCard, TopCardsOptions, TrendingOptions, TrendingSet, World, components, operations, paths };
|