@pokewallet/sdk 0.0.0-stage → 0.1.3

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