tcgpriser 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3376 @@
1
+ interface HttpClientOptions {
2
+ baseUrl: string;
3
+ fetch: typeof fetch;
4
+ headers?: Record<string, string>;
5
+ /** Default bearer token for premium endpoints, used when a call doesn't pass its own `authToken`. */
6
+ authToken?: string;
7
+ }
8
+ /** Per-call auth override for a premium endpoint, on top of the client's default `authToken`.
9
+ * Every premium method takes one of these, either standalone or merged into its params object via
10
+ * `splitAuthToken`. */
11
+ interface PremiumOptions {
12
+ /** Overrides the client's default `authToken` for this call. Pass `undefined` explicitly to
13
+ * force an anonymous request even when the client has a default token. */
14
+ authToken?: string;
15
+ }
16
+ /** Thin wrapper around `fetch`: joins the base URL, adds default headers, turns non-2xx responses
17
+ * into a `TcgPriserError`. Every resource method goes through this instead of calling `fetch`
18
+ * directly. */
19
+ declare class HttpClient {
20
+ private readonly baseUrl;
21
+ private readonly fetchImpl;
22
+ private readonly defaultHeaders;
23
+ private readonly defaultAuthToken;
24
+ constructor(options: HttpClientOptions);
25
+ get<T>(path: string, requestOptions?: PremiumOptions): Promise<T>;
26
+ post<T>(path: string, body: unknown, requestOptions?: PremiumOptions): Promise<T>;
27
+ patch<T>(path: string, body: unknown, requestOptions?: PremiumOptions): Promise<T>;
28
+ private request;
29
+ }
30
+
31
+ interface components {
32
+ schemas: {
33
+ ApiError: {
34
+ error: {
35
+ /** @enum {string} */
36
+ code: "validationFailed" | "unauthorized" | "forbidden" | "notFound" | "conflict" | "readOnlyField" | "rateLimited" | "premiumRequired" | "internalError";
37
+ message: string;
38
+ details: unknown;
39
+ };
40
+ };
41
+ BargainListResponse: {
42
+ data: {
43
+ url: string;
44
+ /** @example 149.5 */
45
+ price: number | null;
46
+ /**
47
+ * @description ISO-4217 currency code
48
+ * @example SEK
49
+ */
50
+ currency: string | null;
51
+ shop: {
52
+ /** @example cardlevels */
53
+ technicalName: string;
54
+ /** @example Cardlevels */
55
+ name: string;
56
+ };
57
+ inStock: boolean;
58
+ /**
59
+ * Format: date-time
60
+ * @example 2026-07-15T12:03:29.322Z
61
+ */
62
+ matchedAt: string;
63
+ product: {
64
+ /**
65
+ * @description Resource identifier
66
+ * @example 6a577711abc1ce71383d3e10
67
+ */
68
+ id: string;
69
+ /** @enum {string} */
70
+ kind: "sealed" | "card";
71
+ name: string;
72
+ technicalName: string;
73
+ imageUrl: string | null;
74
+ };
75
+ bargain: {
76
+ discountPercent: number;
77
+ /** @enum {string} */
78
+ referenceSource: "retail" | "tradera" | "cardmarket";
79
+ };
80
+ }[];
81
+ pagination: {
82
+ /** @description Total matching records, ignoring pagination */
83
+ total: number;
84
+ limit: number;
85
+ skip: number;
86
+ hasMore: boolean;
87
+ };
88
+ };
89
+ BargainSearchResponse: {
90
+ data: {
91
+ url: string;
92
+ /** @example 149.5 */
93
+ price: number | null;
94
+ /**
95
+ * @description ISO-4217 currency code
96
+ * @example SEK
97
+ */
98
+ currency: string | null;
99
+ shop: {
100
+ /** @example cardlevels */
101
+ technicalName: string;
102
+ /** @example Cardlevels */
103
+ name: string;
104
+ };
105
+ inStock: boolean;
106
+ /**
107
+ * Format: date-time
108
+ * @example 2026-07-15T12:03:29.322Z
109
+ */
110
+ matchedAt: string;
111
+ product: {
112
+ /**
113
+ * @description Resource identifier
114
+ * @example 6a577711abc1ce71383d3e10
115
+ */
116
+ id: string;
117
+ /** @enum {string} */
118
+ kind: "sealed" | "card";
119
+ name: string;
120
+ technicalName: string;
121
+ imageUrl: string | null;
122
+ };
123
+ bargain: {
124
+ discountPercent: number;
125
+ /** @enum {string} */
126
+ referenceSource: "retail" | "tradera" | "cardmarket";
127
+ };
128
+ }[];
129
+ pagination: {
130
+ /** @description Total matching records, ignoring pagination */
131
+ total: number;
132
+ limit: number;
133
+ skip: number;
134
+ hasMore: boolean;
135
+ };
136
+ };
137
+ CardWithPricing: {
138
+ /**
139
+ * @description Resource identifier
140
+ * @example 6a577711abc1ce71383d3e10
141
+ */
142
+ id: string;
143
+ name: string;
144
+ shortName: string | null;
145
+ technicalName: string;
146
+ brand: {
147
+ /**
148
+ * @description Resource identifier
149
+ * @example 6a577711abc1ce71383d3e10
150
+ */
151
+ id: string;
152
+ /** @example Pokémon */
153
+ name: string;
154
+ /** @example pokemon */
155
+ technicalName: string;
156
+ /**
157
+ * Format: date-time
158
+ * @example 2026-07-15T12:03:29.322Z
159
+ */
160
+ createdAt: string;
161
+ /**
162
+ * Format: date-time
163
+ * @example 2026-07-15T12:03:29.322Z
164
+ */
165
+ updatedAt: string;
166
+ };
167
+ manufacturer: string;
168
+ modelNumber: string | null;
169
+ category: {
170
+ /**
171
+ * @description Resource identifier
172
+ * @example 6a577711abc1ce71383d3e10
173
+ */
174
+ id: string;
175
+ /** @example Booster Box */
176
+ name: string;
177
+ /** @example booster-box */
178
+ technicalName: string;
179
+ } | null;
180
+ expansion: {
181
+ /**
182
+ * @description Resource identifier
183
+ * @example 6a577711abc1ce71383d3e10
184
+ */
185
+ id: string;
186
+ /** @example Mega Evolution 30th Celebration */
187
+ name: string;
188
+ /** @example 30th Celebration */
189
+ shortName: string;
190
+ /** @example jpn-mega-evolution-30th-celebration */
191
+ technicalName: string;
192
+ /**
193
+ * @description Printing language of the item
194
+ * @example JPN
195
+ * @enum {string}
196
+ */
197
+ language: "ENG" | "JPN" | "CHI";
198
+ /** @example m6a */
199
+ code: string | null;
200
+ /** @example m6a */
201
+ cardCode: string | null;
202
+ /** @example Mega Evolution */
203
+ seriesName: string | null;
204
+ /**
205
+ * Format: date-time
206
+ * @example 2026-07-15T12:03:29.322Z
207
+ */
208
+ releaseDate: string | null;
209
+ /**
210
+ * @description Absolute asset URL, or null when absent
211
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
212
+ */
213
+ logoUrl: string | null;
214
+ /**
215
+ * @description Absolute asset URL, or null when absent
216
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
217
+ */
218
+ symbolUrl: string | null;
219
+ /**
220
+ * @description Absolute asset URL, or null when absent
221
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
222
+ */
223
+ imageUrl: string | null;
224
+ } | null;
225
+ /**
226
+ * @description Printing language of the item
227
+ * @example JPN
228
+ * @enum {string|null}
229
+ */
230
+ language: "ENG" | "JPN" | "CHI" | null;
231
+ alternativeNames: {
232
+ name: string;
233
+ shortName: string | null;
234
+ }[];
235
+ supportsMultipackPricing: boolean;
236
+ /**
237
+ * @description Absolute asset URL, or null when absent
238
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
239
+ */
240
+ imageUrl: string | null;
241
+ /**
242
+ * @description Cheapest current shop price, in SEK
243
+ * @example 149.5
244
+ */
245
+ retailPrice: number | null;
246
+ /**
247
+ * @description Estimated market value, in SEK
248
+ * @example 149.5
249
+ */
250
+ estimatedValue: number | null;
251
+ /** @description Active shops currently tracking this item */
252
+ shopCount: number;
253
+ /** @description Observations the estimate rests on */
254
+ pricingDataPoints: number;
255
+ /**
256
+ * Format: date-time
257
+ * @example 2026-07-15T12:03:29.322Z
258
+ */
259
+ pricingUpdatedAt: string | null;
260
+ /**
261
+ * Format: date-time
262
+ * @example 2026-07-15T12:03:29.322Z
263
+ */
264
+ createdAt: string;
265
+ /**
266
+ * Format: date-time
267
+ * @example 2026-07-15T12:03:29.322Z
268
+ */
269
+ updatedAt: string;
270
+ /** @enum {string} */
271
+ kind: "card";
272
+ /** @example 4/102 */
273
+ cardNumber: string;
274
+ /** @example Rare Holo */
275
+ rarity: string | null;
276
+ artist: string | null;
277
+ cardmarketId: string | null;
278
+ tcgplayerId: string | null;
279
+ variants: {
280
+ normal: boolean;
281
+ holo: boolean;
282
+ reverse: boolean;
283
+ firstEdition: boolean;
284
+ wPromo: boolean;
285
+ } | null;
286
+ prisjaktId: string | null;
287
+ lowestShopOffer: {
288
+ shop: {
289
+ /** @example cardlevels */
290
+ technicalName: string;
291
+ /** @example Cardlevels */
292
+ name: string;
293
+ };
294
+ url: string;
295
+ /** @example 149.5 */
296
+ price: number;
297
+ /**
298
+ * @description ISO-4217 currency code
299
+ * @example SEK
300
+ */
301
+ currency: string;
302
+ inStock: boolean;
303
+ inPreorder: boolean;
304
+ inMonitor: boolean;
305
+ isFullyBooked: boolean;
306
+ /**
307
+ * Format: date-time
308
+ * @example 2026-07-15T12:03:29.322Z
309
+ */
310
+ matchedAt: string;
311
+ /**
312
+ * Format: date-time
313
+ * @example 2026-07-15T12:03:29.322Z
314
+ */
315
+ updatedAt: string;
316
+ bargain: {
317
+ discountPercent: number;
318
+ /** @enum {string} */
319
+ referenceSource: "retail" | "tradera" | "cardmarket";
320
+ } | null;
321
+ } | null;
322
+ referencePriceSnapshotsByProvider: {
323
+ [key: string]: {
324
+ /** @enum {string} */
325
+ provider: "cardmarket" | "tcgplayer" | "ebay" | "tradera";
326
+ /** @example 149.5 */
327
+ price: number;
328
+ /**
329
+ * @description ISO-4217 currency code
330
+ * @example SEK
331
+ */
332
+ currency: string;
333
+ /**
334
+ * @description price converted to SEK at the rate stored on the row
335
+ * @example 149.5
336
+ */
337
+ priceSek: number;
338
+ /**
339
+ * Format: date-time
340
+ * @example 2026-07-15T12:03:29.322Z
341
+ */
342
+ snapshotDate: string;
343
+ };
344
+ };
345
+ };
346
+ Expansion: {
347
+ /**
348
+ * @description Resource identifier
349
+ * @example 6a577711abc1ce71383d3e10
350
+ */
351
+ id: string;
352
+ /** @example Mega Evolution 30th Celebration */
353
+ name: string;
354
+ /** @example 30th Celebration */
355
+ shortName: string;
356
+ /** @example jpn-mega-evolution-30th-celebration */
357
+ technicalName: string;
358
+ /**
359
+ * @description Printing language of the item
360
+ * @example JPN
361
+ * @enum {string}
362
+ */
363
+ language: "ENG" | "JPN" | "CHI";
364
+ /** @example m6a */
365
+ code: string | null;
366
+ /** @example m6a */
367
+ cardCode: string | null;
368
+ /** @example Mega Evolution */
369
+ seriesName: string | null;
370
+ /**
371
+ * Format: date-time
372
+ * @example 2026-07-15T12:03:29.322Z
373
+ */
374
+ releaseDate: string | null;
375
+ /**
376
+ * @description Absolute asset URL, or null when absent
377
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
378
+ */
379
+ logoUrl: string | null;
380
+ /**
381
+ * @description Absolute asset URL, or null when absent
382
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
383
+ */
384
+ symbolUrl: string | null;
385
+ /**
386
+ * @description Absolute asset URL, or null when absent
387
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
388
+ */
389
+ imageUrl: string | null;
390
+ year: number | null;
391
+ brand: {
392
+ /**
393
+ * @description Resource identifier
394
+ * @example 6a577711abc1ce71383d3e10
395
+ */
396
+ id: string;
397
+ /** @example Pokémon */
398
+ name: string;
399
+ /** @example pokemon */
400
+ technicalName: string;
401
+ /**
402
+ * Format: date-time
403
+ * @example 2026-07-15T12:03:29.322Z
404
+ */
405
+ createdAt: string;
406
+ /**
407
+ * Format: date-time
408
+ * @example 2026-07-15T12:03:29.322Z
409
+ */
410
+ updatedAt: string;
411
+ };
412
+ alternativeNames: {
413
+ name: string;
414
+ shortName: string | null;
415
+ }[];
416
+ /** @description Sealed products in this expansion */
417
+ sealedCount: number;
418
+ /** @description Cards in this expansion */
419
+ cardCount: number;
420
+ /** @description Sealed products plus cards */
421
+ productCount: number;
422
+ /**
423
+ * Format: date-time
424
+ * @example 2026-07-15T12:03:29.322Z
425
+ */
426
+ createdAt: string;
427
+ /**
428
+ * Format: date-time
429
+ * @example 2026-07-15T12:03:29.322Z
430
+ */
431
+ updatedAt: string;
432
+ };
433
+ ExpansionContents: {
434
+ expansion: {
435
+ /**
436
+ * @description Resource identifier
437
+ * @example 6a577711abc1ce71383d3e10
438
+ */
439
+ id: string;
440
+ /** @example Mega Evolution 30th Celebration */
441
+ name: string;
442
+ /** @example 30th Celebration */
443
+ shortName: string;
444
+ /** @example jpn-mega-evolution-30th-celebration */
445
+ technicalName: string;
446
+ /**
447
+ * @description Printing language of the item
448
+ * @example JPN
449
+ * @enum {string}
450
+ */
451
+ language: "ENG" | "JPN" | "CHI";
452
+ /** @example m6a */
453
+ code: string | null;
454
+ /** @example m6a */
455
+ cardCode: string | null;
456
+ /** @example Mega Evolution */
457
+ seriesName: string | null;
458
+ /**
459
+ * Format: date-time
460
+ * @example 2026-07-15T12:03:29.322Z
461
+ */
462
+ releaseDate: string | null;
463
+ /**
464
+ * @description Absolute asset URL, or null when absent
465
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
466
+ */
467
+ logoUrl: string | null;
468
+ /**
469
+ * @description Absolute asset URL, or null when absent
470
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
471
+ */
472
+ symbolUrl: string | null;
473
+ /**
474
+ * @description Absolute asset URL, or null when absent
475
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
476
+ */
477
+ imageUrl: string | null;
478
+ };
479
+ cards: {
480
+ count: number;
481
+ items: {
482
+ /**
483
+ * @description Resource identifier
484
+ * @example 6a577711abc1ce71383d3e10
485
+ */
486
+ id: string;
487
+ name: string;
488
+ shortName: string | null;
489
+ technicalName: string;
490
+ brand: {
491
+ /**
492
+ * @description Resource identifier
493
+ * @example 6a577711abc1ce71383d3e10
494
+ */
495
+ id: string;
496
+ /** @example Pokémon */
497
+ name: string;
498
+ /** @example pokemon */
499
+ technicalName: string;
500
+ /**
501
+ * Format: date-time
502
+ * @example 2026-07-15T12:03:29.322Z
503
+ */
504
+ createdAt: string;
505
+ /**
506
+ * Format: date-time
507
+ * @example 2026-07-15T12:03:29.322Z
508
+ */
509
+ updatedAt: string;
510
+ };
511
+ manufacturer: string;
512
+ modelNumber: string | null;
513
+ category: {
514
+ /**
515
+ * @description Resource identifier
516
+ * @example 6a577711abc1ce71383d3e10
517
+ */
518
+ id: string;
519
+ /** @example Booster Box */
520
+ name: string;
521
+ /** @example booster-box */
522
+ technicalName: string;
523
+ } | null;
524
+ expansion: {
525
+ /**
526
+ * @description Resource identifier
527
+ * @example 6a577711abc1ce71383d3e10
528
+ */
529
+ id: string;
530
+ /** @example Mega Evolution 30th Celebration */
531
+ name: string;
532
+ /** @example 30th Celebration */
533
+ shortName: string;
534
+ /** @example jpn-mega-evolution-30th-celebration */
535
+ technicalName: string;
536
+ /**
537
+ * @description Printing language of the item
538
+ * @example JPN
539
+ * @enum {string}
540
+ */
541
+ language: "ENG" | "JPN" | "CHI";
542
+ /** @example m6a */
543
+ code: string | null;
544
+ /** @example m6a */
545
+ cardCode: string | null;
546
+ /** @example Mega Evolution */
547
+ seriesName: string | null;
548
+ /**
549
+ * Format: date-time
550
+ * @example 2026-07-15T12:03:29.322Z
551
+ */
552
+ releaseDate: string | null;
553
+ /**
554
+ * @description Absolute asset URL, or null when absent
555
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
556
+ */
557
+ logoUrl: string | null;
558
+ /**
559
+ * @description Absolute asset URL, or null when absent
560
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
561
+ */
562
+ symbolUrl: string | null;
563
+ /**
564
+ * @description Absolute asset URL, or null when absent
565
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
566
+ */
567
+ imageUrl: string | null;
568
+ } | null;
569
+ /**
570
+ * @description Printing language of the item
571
+ * @example JPN
572
+ * @enum {string|null}
573
+ */
574
+ language: "ENG" | "JPN" | "CHI" | null;
575
+ alternativeNames: {
576
+ name: string;
577
+ shortName: string | null;
578
+ }[];
579
+ supportsMultipackPricing: boolean;
580
+ /**
581
+ * @description Absolute asset URL, or null when absent
582
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
583
+ */
584
+ imageUrl: string | null;
585
+ /**
586
+ * @description Cheapest current shop price, in SEK
587
+ * @example 149.5
588
+ */
589
+ retailPrice: number | null;
590
+ /**
591
+ * @description Estimated market value, in SEK
592
+ * @example 149.5
593
+ */
594
+ estimatedValue: number | null;
595
+ /** @description Active shops currently tracking this item */
596
+ shopCount: number;
597
+ /** @description Observations the estimate rests on */
598
+ pricingDataPoints: number;
599
+ /**
600
+ * Format: date-time
601
+ * @example 2026-07-15T12:03:29.322Z
602
+ */
603
+ pricingUpdatedAt: string | null;
604
+ /**
605
+ * Format: date-time
606
+ * @example 2026-07-15T12:03:29.322Z
607
+ */
608
+ createdAt: string;
609
+ /**
610
+ * Format: date-time
611
+ * @example 2026-07-15T12:03:29.322Z
612
+ */
613
+ updatedAt: string;
614
+ /** @enum {string} */
615
+ kind: "card";
616
+ /** @example 4/102 */
617
+ cardNumber: string;
618
+ /** @example Rare Holo */
619
+ rarity: string | null;
620
+ artist: string | null;
621
+ cardmarketId: string | null;
622
+ tcgplayerId: string | null;
623
+ variants: {
624
+ normal: boolean;
625
+ holo: boolean;
626
+ reverse: boolean;
627
+ firstEdition: boolean;
628
+ wPromo: boolean;
629
+ } | null;
630
+ prisjaktId: string | null;
631
+ lowestShopOffer: {
632
+ shop: {
633
+ /** @example cardlevels */
634
+ technicalName: string;
635
+ /** @example Cardlevels */
636
+ name: string;
637
+ };
638
+ url: string;
639
+ /** @example 149.5 */
640
+ price: number;
641
+ /**
642
+ * @description ISO-4217 currency code
643
+ * @example SEK
644
+ */
645
+ currency: string;
646
+ inStock: boolean;
647
+ inPreorder: boolean;
648
+ inMonitor: boolean;
649
+ isFullyBooked: boolean;
650
+ /**
651
+ * Format: date-time
652
+ * @example 2026-07-15T12:03:29.322Z
653
+ */
654
+ matchedAt: string;
655
+ /**
656
+ * Format: date-time
657
+ * @example 2026-07-15T12:03:29.322Z
658
+ */
659
+ updatedAt: string;
660
+ bargain: {
661
+ discountPercent: number;
662
+ /** @enum {string} */
663
+ referenceSource: "retail" | "tradera" | "cardmarket";
664
+ } | null;
665
+ } | null;
666
+ referencePriceSnapshotsByProvider: {
667
+ [key: string]: {
668
+ /** @enum {string} */
669
+ provider: "cardmarket" | "tcgplayer" | "ebay" | "tradera";
670
+ /** @example 149.5 */
671
+ price: number;
672
+ /**
673
+ * @description ISO-4217 currency code
674
+ * @example SEK
675
+ */
676
+ currency: string;
677
+ /**
678
+ * @description price converted to SEK at the rate stored on the row
679
+ * @example 149.5
680
+ */
681
+ priceSek: number;
682
+ /**
683
+ * Format: date-time
684
+ * @example 2026-07-15T12:03:29.322Z
685
+ */
686
+ snapshotDate: string;
687
+ };
688
+ };
689
+ }[];
690
+ };
691
+ sealed: {
692
+ count: number;
693
+ items: {
694
+ /**
695
+ * @description Resource identifier
696
+ * @example 6a577711abc1ce71383d3e10
697
+ */
698
+ id: string;
699
+ name: string;
700
+ shortName: string | null;
701
+ technicalName: string;
702
+ brand: {
703
+ /**
704
+ * @description Resource identifier
705
+ * @example 6a577711abc1ce71383d3e10
706
+ */
707
+ id: string;
708
+ /** @example Pokémon */
709
+ name: string;
710
+ /** @example pokemon */
711
+ technicalName: string;
712
+ /**
713
+ * Format: date-time
714
+ * @example 2026-07-15T12:03:29.322Z
715
+ */
716
+ createdAt: string;
717
+ /**
718
+ * Format: date-time
719
+ * @example 2026-07-15T12:03:29.322Z
720
+ */
721
+ updatedAt: string;
722
+ };
723
+ manufacturer: string;
724
+ modelNumber: string | null;
725
+ category: {
726
+ /**
727
+ * @description Resource identifier
728
+ * @example 6a577711abc1ce71383d3e10
729
+ */
730
+ id: string;
731
+ /** @example Booster Box */
732
+ name: string;
733
+ /** @example booster-box */
734
+ technicalName: string;
735
+ } | null;
736
+ expansion: {
737
+ /**
738
+ * @description Resource identifier
739
+ * @example 6a577711abc1ce71383d3e10
740
+ */
741
+ id: string;
742
+ /** @example Mega Evolution 30th Celebration */
743
+ name: string;
744
+ /** @example 30th Celebration */
745
+ shortName: string;
746
+ /** @example jpn-mega-evolution-30th-celebration */
747
+ technicalName: string;
748
+ /**
749
+ * @description Printing language of the item
750
+ * @example JPN
751
+ * @enum {string}
752
+ */
753
+ language: "ENG" | "JPN" | "CHI";
754
+ /** @example m6a */
755
+ code: string | null;
756
+ /** @example m6a */
757
+ cardCode: string | null;
758
+ /** @example Mega Evolution */
759
+ seriesName: string | null;
760
+ /**
761
+ * Format: date-time
762
+ * @example 2026-07-15T12:03:29.322Z
763
+ */
764
+ releaseDate: string | null;
765
+ /**
766
+ * @description Absolute asset URL, or null when absent
767
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
768
+ */
769
+ logoUrl: string | null;
770
+ /**
771
+ * @description Absolute asset URL, or null when absent
772
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
773
+ */
774
+ symbolUrl: string | null;
775
+ /**
776
+ * @description Absolute asset URL, or null when absent
777
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
778
+ */
779
+ imageUrl: string | null;
780
+ } | null;
781
+ /**
782
+ * @description Printing language of the item
783
+ * @example JPN
784
+ * @enum {string|null}
785
+ */
786
+ language: "ENG" | "JPN" | "CHI" | null;
787
+ alternativeNames: {
788
+ name: string;
789
+ shortName: string | null;
790
+ }[];
791
+ supportsMultipackPricing: boolean;
792
+ /**
793
+ * @description Absolute asset URL, or null when absent
794
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
795
+ */
796
+ imageUrl: string | null;
797
+ /**
798
+ * @description Cheapest current shop price, in SEK
799
+ * @example 149.5
800
+ */
801
+ retailPrice: number | null;
802
+ /**
803
+ * @description Estimated market value, in SEK
804
+ * @example 149.5
805
+ */
806
+ estimatedValue: number | null;
807
+ /** @description Active shops currently tracking this item */
808
+ shopCount: number;
809
+ /** @description Observations the estimate rests on */
810
+ pricingDataPoints: number;
811
+ /**
812
+ * Format: date-time
813
+ * @example 2026-07-15T12:03:29.322Z
814
+ */
815
+ pricingUpdatedAt: string | null;
816
+ /**
817
+ * Format: date-time
818
+ * @example 2026-07-15T12:03:29.322Z
819
+ */
820
+ createdAt: string;
821
+ /**
822
+ * Format: date-time
823
+ * @example 2026-07-15T12:03:29.322Z
824
+ */
825
+ updatedAt: string;
826
+ /** @enum {string} */
827
+ kind: "sealed";
828
+ upc: string | null;
829
+ asin: string | null;
830
+ epid: string | null;
831
+ priceChartingId: string | null;
832
+ prisjaktId: string | null;
833
+ lowestShopOffer: {
834
+ shop: {
835
+ /** @example cardlevels */
836
+ technicalName: string;
837
+ /** @example Cardlevels */
838
+ name: string;
839
+ };
840
+ url: string;
841
+ /** @example 149.5 */
842
+ price: number;
843
+ /**
844
+ * @description ISO-4217 currency code
845
+ * @example SEK
846
+ */
847
+ currency: string;
848
+ inStock: boolean;
849
+ inPreorder: boolean;
850
+ inMonitor: boolean;
851
+ isFullyBooked: boolean;
852
+ /**
853
+ * Format: date-time
854
+ * @example 2026-07-15T12:03:29.322Z
855
+ */
856
+ matchedAt: string;
857
+ /**
858
+ * Format: date-time
859
+ * @example 2026-07-15T12:03:29.322Z
860
+ */
861
+ updatedAt: string;
862
+ bargain: {
863
+ discountPercent: number;
864
+ /** @enum {string} */
865
+ referenceSource: "retail" | "tradera" | "cardmarket";
866
+ } | null;
867
+ } | null;
868
+ referencePriceSnapshotsByProvider: {
869
+ [key: string]: {
870
+ /** @enum {string} */
871
+ provider: "cardmarket" | "tcgplayer" | "ebay" | "tradera";
872
+ /** @example 149.5 */
873
+ price: number;
874
+ /**
875
+ * @description ISO-4217 currency code
876
+ * @example SEK
877
+ */
878
+ currency: string;
879
+ /**
880
+ * @description price converted to SEK at the rate stored on the row
881
+ * @example 149.5
882
+ */
883
+ priceSek: number;
884
+ /**
885
+ * Format: date-time
886
+ * @example 2026-07-15T12:03:29.322Z
887
+ */
888
+ snapshotDate: string;
889
+ };
890
+ };
891
+ }[];
892
+ };
893
+ };
894
+ ExpansionLivePricing: {
895
+ expansion: {
896
+ technicalName: string;
897
+ };
898
+ items: {
899
+ /**
900
+ * @description Resource identifier
901
+ * @example 6a577711abc1ce71383d3e10
902
+ */
903
+ id: string;
904
+ name: string;
905
+ technicalName: string;
906
+ pricing: {
907
+ /** @example 149.5 */
908
+ retailPrice: number | null;
909
+ /** @example 149.5 */
910
+ estimatedValue: number | null;
911
+ shopCount: number;
912
+ pricingDataPoints: number;
913
+ /**
914
+ * Format: date-time
915
+ * @example 2026-07-15T12:03:29.322Z
916
+ */
917
+ calculatedAt: string;
918
+ };
919
+ }[];
920
+ };
921
+ ItemDailyStats: {
922
+ item: {
923
+ /**
924
+ * @description Resource identifier
925
+ * @example 6a577711abc1ce71383d3e10
926
+ */
927
+ id: string;
928
+ name: string;
929
+ };
930
+ dailyStats: {
931
+ /**
932
+ * Format: date-time
933
+ * @example 2026-07-15T12:03:29.322Z
934
+ */
935
+ statDate: string;
936
+ /** @example 149.5 */
937
+ averagePrice: number;
938
+ }[];
939
+ };
940
+ ItemEstimatedValue: {
941
+ item: {
942
+ /**
943
+ * @description Resource identifier
944
+ * @example 6a577711abc1ce71383d3e10
945
+ */
946
+ id: string;
947
+ name: string;
948
+ };
949
+ estimate: {
950
+ /** @example 149.5 */
951
+ estimatedValue: number | null;
952
+ /**
953
+ * Format: date-time
954
+ * @example 2026-07-15T12:03:29.322Z
955
+ */
956
+ estimateUpdatedAt: string | null;
957
+ dataPointCount: number;
958
+ };
959
+ };
960
+ ItemFullStats: {
961
+ item: {
962
+ /**
963
+ * @description Resource identifier
964
+ * @example 6a577711abc1ce71383d3e10
965
+ */
966
+ id: string;
967
+ name: string;
968
+ shortName: string | null;
969
+ technicalName: string;
970
+ brand: {
971
+ /**
972
+ * @description Resource identifier
973
+ * @example 6a577711abc1ce71383d3e10
974
+ */
975
+ id: string;
976
+ /** @example Pokémon */
977
+ name: string;
978
+ /** @example pokemon */
979
+ technicalName: string;
980
+ /**
981
+ * Format: date-time
982
+ * @example 2026-07-15T12:03:29.322Z
983
+ */
984
+ createdAt: string;
985
+ /**
986
+ * Format: date-time
987
+ * @example 2026-07-15T12:03:29.322Z
988
+ */
989
+ updatedAt: string;
990
+ };
991
+ manufacturer: string;
992
+ modelNumber: string | null;
993
+ category: {
994
+ /**
995
+ * @description Resource identifier
996
+ * @example 6a577711abc1ce71383d3e10
997
+ */
998
+ id: string;
999
+ /** @example Booster Box */
1000
+ name: string;
1001
+ /** @example booster-box */
1002
+ technicalName: string;
1003
+ } | null;
1004
+ expansion: {
1005
+ /**
1006
+ * @description Resource identifier
1007
+ * @example 6a577711abc1ce71383d3e10
1008
+ */
1009
+ id: string;
1010
+ /** @example Mega Evolution 30th Celebration */
1011
+ name: string;
1012
+ /** @example 30th Celebration */
1013
+ shortName: string;
1014
+ /** @example jpn-mega-evolution-30th-celebration */
1015
+ technicalName: string;
1016
+ /**
1017
+ * @description Printing language of the item
1018
+ * @example JPN
1019
+ * @enum {string}
1020
+ */
1021
+ language: "ENG" | "JPN" | "CHI";
1022
+ /** @example m6a */
1023
+ code: string | null;
1024
+ /** @example m6a */
1025
+ cardCode: string | null;
1026
+ /** @example Mega Evolution */
1027
+ seriesName: string | null;
1028
+ /**
1029
+ * Format: date-time
1030
+ * @example 2026-07-15T12:03:29.322Z
1031
+ */
1032
+ releaseDate: string | null;
1033
+ /**
1034
+ * @description Absolute asset URL, or null when absent
1035
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1036
+ */
1037
+ logoUrl: string | null;
1038
+ /**
1039
+ * @description Absolute asset URL, or null when absent
1040
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1041
+ */
1042
+ symbolUrl: string | null;
1043
+ /**
1044
+ * @description Absolute asset URL, or null when absent
1045
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1046
+ */
1047
+ imageUrl: string | null;
1048
+ } | null;
1049
+ /**
1050
+ * @description Printing language of the item
1051
+ * @example JPN
1052
+ * @enum {string|null}
1053
+ */
1054
+ language: "ENG" | "JPN" | "CHI" | null;
1055
+ alternativeNames: {
1056
+ name: string;
1057
+ shortName: string | null;
1058
+ }[];
1059
+ supportsMultipackPricing: boolean;
1060
+ /**
1061
+ * @description Absolute asset URL, or null when absent
1062
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1063
+ */
1064
+ imageUrl: string | null;
1065
+ /**
1066
+ * @description Cheapest current shop price, in SEK
1067
+ * @example 149.5
1068
+ */
1069
+ retailPrice: number | null;
1070
+ /**
1071
+ * @description Estimated market value, in SEK
1072
+ * @example 149.5
1073
+ */
1074
+ estimatedValue: number | null;
1075
+ /** @description Active shops currently tracking this item */
1076
+ shopCount: number;
1077
+ /** @description Observations the estimate rests on */
1078
+ pricingDataPoints: number;
1079
+ /**
1080
+ * Format: date-time
1081
+ * @example 2026-07-15T12:03:29.322Z
1082
+ */
1083
+ pricingUpdatedAt: string | null;
1084
+ /**
1085
+ * Format: date-time
1086
+ * @example 2026-07-15T12:03:29.322Z
1087
+ */
1088
+ createdAt: string;
1089
+ /**
1090
+ * Format: date-time
1091
+ * @example 2026-07-15T12:03:29.322Z
1092
+ */
1093
+ updatedAt: string;
1094
+ /** @enum {string} */
1095
+ kind: "card";
1096
+ /** @example 4/102 */
1097
+ cardNumber: string;
1098
+ /** @example Rare Holo */
1099
+ rarity: string | null;
1100
+ artist: string | null;
1101
+ cardmarketId: string | null;
1102
+ tcgplayerId: string | null;
1103
+ variants: {
1104
+ normal: boolean;
1105
+ holo: boolean;
1106
+ reverse: boolean;
1107
+ firstEdition: boolean;
1108
+ wPromo: boolean;
1109
+ } | null;
1110
+ prisjaktId: string | null;
1111
+ } | {
1112
+ /**
1113
+ * @description Resource identifier
1114
+ * @example 6a577711abc1ce71383d3e10
1115
+ */
1116
+ id: string;
1117
+ name: string;
1118
+ shortName: string | null;
1119
+ technicalName: string;
1120
+ brand: {
1121
+ /**
1122
+ * @description Resource identifier
1123
+ * @example 6a577711abc1ce71383d3e10
1124
+ */
1125
+ id: string;
1126
+ /** @example Pokémon */
1127
+ name: string;
1128
+ /** @example pokemon */
1129
+ technicalName: string;
1130
+ /**
1131
+ * Format: date-time
1132
+ * @example 2026-07-15T12:03:29.322Z
1133
+ */
1134
+ createdAt: string;
1135
+ /**
1136
+ * Format: date-time
1137
+ * @example 2026-07-15T12:03:29.322Z
1138
+ */
1139
+ updatedAt: string;
1140
+ };
1141
+ manufacturer: string;
1142
+ modelNumber: string | null;
1143
+ category: {
1144
+ /**
1145
+ * @description Resource identifier
1146
+ * @example 6a577711abc1ce71383d3e10
1147
+ */
1148
+ id: string;
1149
+ /** @example Booster Box */
1150
+ name: string;
1151
+ /** @example booster-box */
1152
+ technicalName: string;
1153
+ } | null;
1154
+ expansion: {
1155
+ /**
1156
+ * @description Resource identifier
1157
+ * @example 6a577711abc1ce71383d3e10
1158
+ */
1159
+ id: string;
1160
+ /** @example Mega Evolution 30th Celebration */
1161
+ name: string;
1162
+ /** @example 30th Celebration */
1163
+ shortName: string;
1164
+ /** @example jpn-mega-evolution-30th-celebration */
1165
+ technicalName: string;
1166
+ /**
1167
+ * @description Printing language of the item
1168
+ * @example JPN
1169
+ * @enum {string}
1170
+ */
1171
+ language: "ENG" | "JPN" | "CHI";
1172
+ /** @example m6a */
1173
+ code: string | null;
1174
+ /** @example m6a */
1175
+ cardCode: string | null;
1176
+ /** @example Mega Evolution */
1177
+ seriesName: string | null;
1178
+ /**
1179
+ * Format: date-time
1180
+ * @example 2026-07-15T12:03:29.322Z
1181
+ */
1182
+ releaseDate: string | null;
1183
+ /**
1184
+ * @description Absolute asset URL, or null when absent
1185
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1186
+ */
1187
+ logoUrl: string | null;
1188
+ /**
1189
+ * @description Absolute asset URL, or null when absent
1190
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1191
+ */
1192
+ symbolUrl: string | null;
1193
+ /**
1194
+ * @description Absolute asset URL, or null when absent
1195
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1196
+ */
1197
+ imageUrl: string | null;
1198
+ } | null;
1199
+ /**
1200
+ * @description Printing language of the item
1201
+ * @example JPN
1202
+ * @enum {string|null}
1203
+ */
1204
+ language: "ENG" | "JPN" | "CHI" | null;
1205
+ alternativeNames: {
1206
+ name: string;
1207
+ shortName: string | null;
1208
+ }[];
1209
+ supportsMultipackPricing: boolean;
1210
+ /**
1211
+ * @description Absolute asset URL, or null when absent
1212
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1213
+ */
1214
+ imageUrl: string | null;
1215
+ /**
1216
+ * @description Cheapest current shop price, in SEK
1217
+ * @example 149.5
1218
+ */
1219
+ retailPrice: number | null;
1220
+ /**
1221
+ * @description Estimated market value, in SEK
1222
+ * @example 149.5
1223
+ */
1224
+ estimatedValue: number | null;
1225
+ /** @description Active shops currently tracking this item */
1226
+ shopCount: number;
1227
+ /** @description Observations the estimate rests on */
1228
+ pricingDataPoints: number;
1229
+ /**
1230
+ * Format: date-time
1231
+ * @example 2026-07-15T12:03:29.322Z
1232
+ */
1233
+ pricingUpdatedAt: string | null;
1234
+ /**
1235
+ * Format: date-time
1236
+ * @example 2026-07-15T12:03:29.322Z
1237
+ */
1238
+ createdAt: string;
1239
+ /**
1240
+ * Format: date-time
1241
+ * @example 2026-07-15T12:03:29.322Z
1242
+ */
1243
+ updatedAt: string;
1244
+ /** @enum {string} */
1245
+ kind: "sealed";
1246
+ upc: string | null;
1247
+ asin: string | null;
1248
+ epid: string | null;
1249
+ priceChartingId: string | null;
1250
+ prisjaktId: string | null;
1251
+ };
1252
+ stats: {
1253
+ dailyStats: {
1254
+ /**
1255
+ * Format: date-time
1256
+ * @example 2026-07-15T12:03:29.322Z
1257
+ */
1258
+ statDate: string;
1259
+ /** @example 149.5 */
1260
+ averagePrice: number;
1261
+ }[];
1262
+ variantStats: {
1263
+ /** @description Distinct cardType/condition/company/grade combinations */
1264
+ variantCount: number;
1265
+ looseCount: number;
1266
+ gradedCount: number;
1267
+ };
1268
+ };
1269
+ estimate: {
1270
+ /** @example 149.5 */
1271
+ estimatedValue: number | null;
1272
+ /**
1273
+ * Format: date-time
1274
+ * @example 2026-07-15T12:03:29.322Z
1275
+ */
1276
+ estimateUpdatedAt: string | null;
1277
+ dataPointCount: number;
1278
+ };
1279
+ shopMatches: {
1280
+ data: {
1281
+ /**
1282
+ * @description Resource identifier
1283
+ * @example 6a577711abc1ce71383d3e10
1284
+ */
1285
+ id: string;
1286
+ shop: {
1287
+ /** @example cardlevels */
1288
+ technicalName: string;
1289
+ /** @example Cardlevels */
1290
+ name: string;
1291
+ delivery: {
1292
+ /** @example 149.5 */
1293
+ cost: number | null;
1294
+ currency: string | null;
1295
+ daysMin: number | null;
1296
+ daysMax: number | null;
1297
+ /** @example 149.5 */
1298
+ freeShippingThreshold: number | null;
1299
+ supportsLocalPickup: boolean | null;
1300
+ note: string | null;
1301
+ };
1302
+ };
1303
+ url: string;
1304
+ /**
1305
+ * @description Resource identifier
1306
+ * @example 6a577711abc1ce71383d3e10
1307
+ */
1308
+ shopUrlId: string | null;
1309
+ /** @example 149.5 */
1310
+ price: number | null;
1311
+ /**
1312
+ * @description ISO-4217 currency code
1313
+ * @example SEK
1314
+ */
1315
+ currency: string | null;
1316
+ inStock: boolean;
1317
+ inPreorder: boolean;
1318
+ inMonitor: boolean;
1319
+ isFullyBooked: boolean;
1320
+ scrapedName: string | null;
1321
+ scrapedType: string | null;
1322
+ matchScore: number | null;
1323
+ hasCategoryMismatch: boolean;
1324
+ /** @enum {string|null} */
1325
+ cardType: "loose" | "graded" | null;
1326
+ /** @enum {string|null} */
1327
+ itemCondition: "NM" | "LP" | "MP" | "HP" | "DMG" | null;
1328
+ /** @enum {string|null} */
1329
+ gradingCompany: "PSA" | "BGS" | "CGC" | "SGC" | "ACE" | "RAUKCARD" | "TAG" | "GMA" | null;
1330
+ grade: number | null;
1331
+ /**
1332
+ * Format: date-time
1333
+ * @example 2026-07-15T12:03:29.322Z
1334
+ */
1335
+ matchedAt: string;
1336
+ /**
1337
+ * Format: date-time
1338
+ * @example 2026-07-15T12:03:29.322Z
1339
+ */
1340
+ updatedAt: string;
1341
+ bargain: {
1342
+ discountPercent: number;
1343
+ /** @enum {string} */
1344
+ referenceSource: "retail" | "tradera" | "cardmarket";
1345
+ } | null;
1346
+ }[];
1347
+ pagination: {
1348
+ /** @description Total matching records, ignoring pagination */
1349
+ total: number;
1350
+ limit: number;
1351
+ skip: number;
1352
+ hasMore: boolean;
1353
+ };
1354
+ };
1355
+ };
1356
+ ItemPriceComparison: {
1357
+ item: {
1358
+ /**
1359
+ * @description Resource identifier
1360
+ * @example 6a577711abc1ce71383d3e10
1361
+ */
1362
+ id: string;
1363
+ name: string;
1364
+ };
1365
+ items: {
1366
+ shop: string;
1367
+ /** @example 149.5 */
1368
+ price: number;
1369
+ /**
1370
+ * @description ISO-4217 currency code
1371
+ * @example SEK
1372
+ */
1373
+ currency: string;
1374
+ inStock: boolean;
1375
+ url: string;
1376
+ /**
1377
+ * Format: date-time
1378
+ * @example 2026-07-15T12:03:29.322Z
1379
+ */
1380
+ snapshotDate: string;
1381
+ }[];
1382
+ stats: {
1383
+ /** @example 149.5 */
1384
+ lowestPrice: number;
1385
+ /** @example 149.5 */
1386
+ highestPrice: number;
1387
+ /** @example 149.5 */
1388
+ averagePrice: number;
1389
+ inStockCount: number;
1390
+ } | null;
1391
+ };
1392
+ ItemReferencePrices: {
1393
+ item: {
1394
+ /**
1395
+ * @description Resource identifier
1396
+ * @example 6a577711abc1ce71383d3e10
1397
+ */
1398
+ id: string;
1399
+ name: string;
1400
+ };
1401
+ /**
1402
+ * Format: date-time
1403
+ * @example 2026-07-15T12:03:29.322Z
1404
+ */
1405
+ fromDate: string;
1406
+ /**
1407
+ * Format: date-time
1408
+ * @example 2026-07-15T12:03:29.322Z
1409
+ */
1410
+ toDate: string;
1411
+ /** @enum {string} */
1412
+ metric: "price" | "low" | "mid" | "high" | "avg" | "avg1" | "avg7" | "avg30" | "directLow";
1413
+ /** @enum {string} */
1414
+ currencyMode: "native" | "sek";
1415
+ series: {
1416
+ /** @enum {string} */
1417
+ source: "tcgdex" | "cmapi" | "tradera";
1418
+ /** @enum {string} */
1419
+ provider: "cardmarket" | "tcgplayer" | "ebay" | "tradera";
1420
+ /** @enum {string|null} */
1421
+ variant: "normal" | "holo" | "reverse" | null;
1422
+ /** @enum {string|null} */
1423
+ cardType: "loose" | "graded" | null;
1424
+ /** @enum {string|null} */
1425
+ gradingCompany: "PSA" | "BGS" | "CGC" | "SGC" | "ACE" | "RAUKCARD" | "TAG" | "GMA" | null;
1426
+ grade: number | null;
1427
+ currency: string;
1428
+ sampleSize: number | null;
1429
+ points: {
1430
+ /**
1431
+ * Format: date-time
1432
+ * @example 2026-07-15T12:03:29.322Z
1433
+ */
1434
+ snapshotDate: string;
1435
+ price: number;
1436
+ }[];
1437
+ }[];
1438
+ };
1439
+ ItemShopMatches: {
1440
+ item: {
1441
+ /**
1442
+ * @description Resource identifier
1443
+ * @example 6a577711abc1ce71383d3e10
1444
+ */
1445
+ id: string;
1446
+ name: string;
1447
+ };
1448
+ data: {
1449
+ /**
1450
+ * @description Resource identifier
1451
+ * @example 6a577711abc1ce71383d3e10
1452
+ */
1453
+ id: string;
1454
+ shop: {
1455
+ /** @example cardlevels */
1456
+ technicalName: string;
1457
+ /** @example Cardlevels */
1458
+ name: string;
1459
+ delivery: {
1460
+ /** @example 149.5 */
1461
+ cost: number | null;
1462
+ currency: string | null;
1463
+ daysMin: number | null;
1464
+ daysMax: number | null;
1465
+ /** @example 149.5 */
1466
+ freeShippingThreshold: number | null;
1467
+ supportsLocalPickup: boolean | null;
1468
+ note: string | null;
1469
+ };
1470
+ };
1471
+ url: string;
1472
+ /**
1473
+ * @description Resource identifier
1474
+ * @example 6a577711abc1ce71383d3e10
1475
+ */
1476
+ shopUrlId: string | null;
1477
+ /** @example 149.5 */
1478
+ price: number | null;
1479
+ /**
1480
+ * @description ISO-4217 currency code
1481
+ * @example SEK
1482
+ */
1483
+ currency: string | null;
1484
+ inStock: boolean;
1485
+ inPreorder: boolean;
1486
+ inMonitor: boolean;
1487
+ isFullyBooked: boolean;
1488
+ scrapedName: string | null;
1489
+ scrapedType: string | null;
1490
+ matchScore: number | null;
1491
+ hasCategoryMismatch: boolean;
1492
+ /** @enum {string|null} */
1493
+ cardType: "loose" | "graded" | null;
1494
+ /** @enum {string|null} */
1495
+ itemCondition: "NM" | "LP" | "MP" | "HP" | "DMG" | null;
1496
+ /** @enum {string|null} */
1497
+ gradingCompany: "PSA" | "BGS" | "CGC" | "SGC" | "ACE" | "RAUKCARD" | "TAG" | "GMA" | null;
1498
+ grade: number | null;
1499
+ /**
1500
+ * Format: date-time
1501
+ * @example 2026-07-15T12:03:29.322Z
1502
+ */
1503
+ matchedAt: string;
1504
+ /**
1505
+ * Format: date-time
1506
+ * @example 2026-07-15T12:03:29.322Z
1507
+ */
1508
+ updatedAt: string;
1509
+ bargain: {
1510
+ discountPercent: number;
1511
+ /** @enum {string} */
1512
+ referenceSource: "retail" | "tradera" | "cardmarket";
1513
+ } | null;
1514
+ }[];
1515
+ pagination: {
1516
+ /** @description Total matching records, ignoring pagination */
1517
+ total: number;
1518
+ limit: number;
1519
+ skip: number;
1520
+ hasMore: boolean;
1521
+ };
1522
+ };
1523
+ ItemShopPriceHistory: {
1524
+ item: {
1525
+ /**
1526
+ * @description Resource identifier
1527
+ * @example 6a577711abc1ce71383d3e10
1528
+ */
1529
+ id: string;
1530
+ name: string;
1531
+ };
1532
+ shops: {
1533
+ /** @description The shop's technicalName */
1534
+ shop: string;
1535
+ history: {
1536
+ /**
1537
+ * Format: date-time
1538
+ * @example 2026-07-15T12:03:29.322Z
1539
+ */
1540
+ snapshotDate: string;
1541
+ /** @example 149.5 */
1542
+ price: number;
1543
+ /**
1544
+ * @description ISO-4217 currency code
1545
+ * @example SEK
1546
+ */
1547
+ currency: string;
1548
+ inStock: boolean;
1549
+ url: string;
1550
+ }[];
1551
+ }[];
1552
+ recordCount: number;
1553
+ };
1554
+ ItemSoldPrices: {
1555
+ item: {
1556
+ /**
1557
+ * @description Resource identifier
1558
+ * @example 6a577711abc1ce71383d3e10
1559
+ */
1560
+ id: string;
1561
+ name: string;
1562
+ };
1563
+ data: {
1564
+ /**
1565
+ * @description Resource identifier
1566
+ * @example 6a577711abc1ce71383d3e10
1567
+ */
1568
+ id: string;
1569
+ url: string;
1570
+ /** @example 149.5 */
1571
+ price: number;
1572
+ /**
1573
+ * @description ISO-4217 currency code
1574
+ * @example SEK
1575
+ */
1576
+ currency: string;
1577
+ /**
1578
+ * Format: date-time
1579
+ * @example 2026-07-15T12:03:29.322Z
1580
+ */
1581
+ soldAt: string | null;
1582
+ itemId: string | null;
1583
+ /** @example tradera */
1584
+ source: string | null;
1585
+ }[];
1586
+ pagination: {
1587
+ /** @description Total matching records, ignoring pagination */
1588
+ total: number;
1589
+ limit: number;
1590
+ skip: number;
1591
+ hasMore: boolean;
1592
+ };
1593
+ /** @enum {boolean} */
1594
+ premiumRequired: true;
1595
+ };
1596
+ ItemStats: {
1597
+ item: {
1598
+ /**
1599
+ * @description Resource identifier
1600
+ * @example 6a577711abc1ce71383d3e10
1601
+ */
1602
+ id: string;
1603
+ name: string;
1604
+ shortName: string | null;
1605
+ technicalName: string;
1606
+ brand: {
1607
+ /**
1608
+ * @description Resource identifier
1609
+ * @example 6a577711abc1ce71383d3e10
1610
+ */
1611
+ id: string;
1612
+ /** @example Pokémon */
1613
+ name: string;
1614
+ /** @example pokemon */
1615
+ technicalName: string;
1616
+ /**
1617
+ * Format: date-time
1618
+ * @example 2026-07-15T12:03:29.322Z
1619
+ */
1620
+ createdAt: string;
1621
+ /**
1622
+ * Format: date-time
1623
+ * @example 2026-07-15T12:03:29.322Z
1624
+ */
1625
+ updatedAt: string;
1626
+ };
1627
+ manufacturer: string;
1628
+ modelNumber: string | null;
1629
+ category: {
1630
+ /**
1631
+ * @description Resource identifier
1632
+ * @example 6a577711abc1ce71383d3e10
1633
+ */
1634
+ id: string;
1635
+ /** @example Booster Box */
1636
+ name: string;
1637
+ /** @example booster-box */
1638
+ technicalName: string;
1639
+ } | null;
1640
+ expansion: {
1641
+ /**
1642
+ * @description Resource identifier
1643
+ * @example 6a577711abc1ce71383d3e10
1644
+ */
1645
+ id: string;
1646
+ /** @example Mega Evolution 30th Celebration */
1647
+ name: string;
1648
+ /** @example 30th Celebration */
1649
+ shortName: string;
1650
+ /** @example jpn-mega-evolution-30th-celebration */
1651
+ technicalName: string;
1652
+ /**
1653
+ * @description Printing language of the item
1654
+ * @example JPN
1655
+ * @enum {string}
1656
+ */
1657
+ language: "ENG" | "JPN" | "CHI";
1658
+ /** @example m6a */
1659
+ code: string | null;
1660
+ /** @example m6a */
1661
+ cardCode: string | null;
1662
+ /** @example Mega Evolution */
1663
+ seriesName: string | null;
1664
+ /**
1665
+ * Format: date-time
1666
+ * @example 2026-07-15T12:03:29.322Z
1667
+ */
1668
+ releaseDate: string | null;
1669
+ /**
1670
+ * @description Absolute asset URL, or null when absent
1671
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1672
+ */
1673
+ logoUrl: string | null;
1674
+ /**
1675
+ * @description Absolute asset URL, or null when absent
1676
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1677
+ */
1678
+ symbolUrl: string | null;
1679
+ /**
1680
+ * @description Absolute asset URL, or null when absent
1681
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1682
+ */
1683
+ imageUrl: string | null;
1684
+ } | null;
1685
+ /**
1686
+ * @description Printing language of the item
1687
+ * @example JPN
1688
+ * @enum {string|null}
1689
+ */
1690
+ language: "ENG" | "JPN" | "CHI" | null;
1691
+ alternativeNames: {
1692
+ name: string;
1693
+ shortName: string | null;
1694
+ }[];
1695
+ supportsMultipackPricing: boolean;
1696
+ /**
1697
+ * @description Absolute asset URL, or null when absent
1698
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1699
+ */
1700
+ imageUrl: string | null;
1701
+ /**
1702
+ * @description Cheapest current shop price, in SEK
1703
+ * @example 149.5
1704
+ */
1705
+ retailPrice: number | null;
1706
+ /**
1707
+ * @description Estimated market value, in SEK
1708
+ * @example 149.5
1709
+ */
1710
+ estimatedValue: number | null;
1711
+ /** @description Active shops currently tracking this item */
1712
+ shopCount: number;
1713
+ /** @description Observations the estimate rests on */
1714
+ pricingDataPoints: number;
1715
+ /**
1716
+ * Format: date-time
1717
+ * @example 2026-07-15T12:03:29.322Z
1718
+ */
1719
+ pricingUpdatedAt: string | null;
1720
+ /**
1721
+ * Format: date-time
1722
+ * @example 2026-07-15T12:03:29.322Z
1723
+ */
1724
+ createdAt: string;
1725
+ /**
1726
+ * Format: date-time
1727
+ * @example 2026-07-15T12:03:29.322Z
1728
+ */
1729
+ updatedAt: string;
1730
+ /** @enum {string} */
1731
+ kind: "card";
1732
+ /** @example 4/102 */
1733
+ cardNumber: string;
1734
+ /** @example Rare Holo */
1735
+ rarity: string | null;
1736
+ artist: string | null;
1737
+ cardmarketId: string | null;
1738
+ tcgplayerId: string | null;
1739
+ variants: {
1740
+ normal: boolean;
1741
+ holo: boolean;
1742
+ reverse: boolean;
1743
+ firstEdition: boolean;
1744
+ wPromo: boolean;
1745
+ } | null;
1746
+ prisjaktId: string | null;
1747
+ } | {
1748
+ /**
1749
+ * @description Resource identifier
1750
+ * @example 6a577711abc1ce71383d3e10
1751
+ */
1752
+ id: string;
1753
+ name: string;
1754
+ shortName: string | null;
1755
+ technicalName: string;
1756
+ brand: {
1757
+ /**
1758
+ * @description Resource identifier
1759
+ * @example 6a577711abc1ce71383d3e10
1760
+ */
1761
+ id: string;
1762
+ /** @example Pokémon */
1763
+ name: string;
1764
+ /** @example pokemon */
1765
+ technicalName: string;
1766
+ /**
1767
+ * Format: date-time
1768
+ * @example 2026-07-15T12:03:29.322Z
1769
+ */
1770
+ createdAt: string;
1771
+ /**
1772
+ * Format: date-time
1773
+ * @example 2026-07-15T12:03:29.322Z
1774
+ */
1775
+ updatedAt: string;
1776
+ };
1777
+ manufacturer: string;
1778
+ modelNumber: string | null;
1779
+ category: {
1780
+ /**
1781
+ * @description Resource identifier
1782
+ * @example 6a577711abc1ce71383d3e10
1783
+ */
1784
+ id: string;
1785
+ /** @example Booster Box */
1786
+ name: string;
1787
+ /** @example booster-box */
1788
+ technicalName: string;
1789
+ } | null;
1790
+ expansion: {
1791
+ /**
1792
+ * @description Resource identifier
1793
+ * @example 6a577711abc1ce71383d3e10
1794
+ */
1795
+ id: string;
1796
+ /** @example Mega Evolution 30th Celebration */
1797
+ name: string;
1798
+ /** @example 30th Celebration */
1799
+ shortName: string;
1800
+ /** @example jpn-mega-evolution-30th-celebration */
1801
+ technicalName: string;
1802
+ /**
1803
+ * @description Printing language of the item
1804
+ * @example JPN
1805
+ * @enum {string}
1806
+ */
1807
+ language: "ENG" | "JPN" | "CHI";
1808
+ /** @example m6a */
1809
+ code: string | null;
1810
+ /** @example m6a */
1811
+ cardCode: string | null;
1812
+ /** @example Mega Evolution */
1813
+ seriesName: string | null;
1814
+ /**
1815
+ * Format: date-time
1816
+ * @example 2026-07-15T12:03:29.322Z
1817
+ */
1818
+ releaseDate: string | null;
1819
+ /**
1820
+ * @description Absolute asset URL, or null when absent
1821
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1822
+ */
1823
+ logoUrl: string | null;
1824
+ /**
1825
+ * @description Absolute asset URL, or null when absent
1826
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1827
+ */
1828
+ symbolUrl: string | null;
1829
+ /**
1830
+ * @description Absolute asset URL, or null when absent
1831
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1832
+ */
1833
+ imageUrl: string | null;
1834
+ } | null;
1835
+ /**
1836
+ * @description Printing language of the item
1837
+ * @example JPN
1838
+ * @enum {string|null}
1839
+ */
1840
+ language: "ENG" | "JPN" | "CHI" | null;
1841
+ alternativeNames: {
1842
+ name: string;
1843
+ shortName: string | null;
1844
+ }[];
1845
+ supportsMultipackPricing: boolean;
1846
+ /**
1847
+ * @description Absolute asset URL, or null when absent
1848
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
1849
+ */
1850
+ imageUrl: string | null;
1851
+ /**
1852
+ * @description Cheapest current shop price, in SEK
1853
+ * @example 149.5
1854
+ */
1855
+ retailPrice: number | null;
1856
+ /**
1857
+ * @description Estimated market value, in SEK
1858
+ * @example 149.5
1859
+ */
1860
+ estimatedValue: number | null;
1861
+ /** @description Active shops currently tracking this item */
1862
+ shopCount: number;
1863
+ /** @description Observations the estimate rests on */
1864
+ pricingDataPoints: number;
1865
+ /**
1866
+ * Format: date-time
1867
+ * @example 2026-07-15T12:03:29.322Z
1868
+ */
1869
+ pricingUpdatedAt: string | null;
1870
+ /**
1871
+ * Format: date-time
1872
+ * @example 2026-07-15T12:03:29.322Z
1873
+ */
1874
+ createdAt: string;
1875
+ /**
1876
+ * Format: date-time
1877
+ * @example 2026-07-15T12:03:29.322Z
1878
+ */
1879
+ updatedAt: string;
1880
+ /** @enum {string} */
1881
+ kind: "sealed";
1882
+ upc: string | null;
1883
+ asin: string | null;
1884
+ epid: string | null;
1885
+ priceChartingId: string | null;
1886
+ prisjaktId: string | null;
1887
+ };
1888
+ dailyStats: {
1889
+ /**
1890
+ * Format: date-time
1891
+ * @example 2026-07-15T12:03:29.322Z
1892
+ */
1893
+ statDate: string;
1894
+ /** @example 149.5 */
1895
+ averagePrice: number;
1896
+ }[];
1897
+ estimate: {
1898
+ /** @example 149.5 */
1899
+ estimatedValue: number | null;
1900
+ /**
1901
+ * Format: date-time
1902
+ * @example 2026-07-15T12:03:29.322Z
1903
+ */
1904
+ estimateUpdatedAt: string | null;
1905
+ dataPointCount: number;
1906
+ };
1907
+ variantStats: {
1908
+ /** @description Distinct cardType/condition/company/grade combinations */
1909
+ variantCount: number;
1910
+ looseCount: number;
1911
+ gradedCount: number;
1912
+ };
1913
+ };
1914
+ ItemVariantDailyStats: {
1915
+ item: {
1916
+ /**
1917
+ * @description Resource identifier
1918
+ * @example 6a577711abc1ce71383d3e10
1919
+ */
1920
+ id: string;
1921
+ name: string;
1922
+ };
1923
+ variant: {
1924
+ /** @enum {string|null} */
1925
+ cardType: "loose" | "graded" | null;
1926
+ /** @enum {string|null} */
1927
+ condition: "NM" | "LP" | "MP" | "HP" | "DMG" | null;
1928
+ /** @enum {string|null} */
1929
+ gradingCompany: "PSA" | "BGS" | "CGC" | "SGC" | "ACE" | "RAUKCARD" | "TAG" | "GMA" | null;
1930
+ grade: number | null;
1931
+ };
1932
+ dailyStats: {
1933
+ /**
1934
+ * Format: date-time
1935
+ * @example 2026-07-15T12:03:29.322Z
1936
+ */
1937
+ statDate: string;
1938
+ /** @example 149.5 */
1939
+ averagePrice: number;
1940
+ }[];
1941
+ };
1942
+ ItemVariantStats: {
1943
+ item: {
1944
+ /**
1945
+ * @description Resource identifier
1946
+ * @example 6a577711abc1ce71383d3e10
1947
+ */
1948
+ id: string;
1949
+ name: string;
1950
+ };
1951
+ variants: {
1952
+ loose: {
1953
+ [key: string]: {
1954
+ /** @example 149.5 */
1955
+ averagePrice: number;
1956
+ dataPointCount: number;
1957
+ /**
1958
+ * Format: date-time
1959
+ * @example 2026-07-15T12:03:29.322Z
1960
+ */
1961
+ lastSaleDate: string;
1962
+ };
1963
+ };
1964
+ graded: {
1965
+ [key: string]: {
1966
+ [key: string]: {
1967
+ /** @example 149.5 */
1968
+ averagePrice: number;
1969
+ dataPointCount: number;
1970
+ /**
1971
+ * Format: date-time
1972
+ * @example 2026-07-15T12:03:29.322Z
1973
+ */
1974
+ lastSaleDate: string;
1975
+ };
1976
+ };
1977
+ };
1978
+ };
1979
+ };
1980
+ LivePricingForItem: {
1981
+ /**
1982
+ * @description Resource identifier
1983
+ * @example 6a577711abc1ce71383d3e10
1984
+ */
1985
+ id: string;
1986
+ name: string;
1987
+ technicalName: string;
1988
+ pricing: {
1989
+ /** @example 149.5 */
1990
+ retailPrice: number | null;
1991
+ /** @example 149.5 */
1992
+ estimatedValue: number | null;
1993
+ shopCount: number;
1994
+ pricingDataPoints: number;
1995
+ /**
1996
+ * Format: date-time
1997
+ * @example 2026-07-15T12:03:29.322Z
1998
+ */
1999
+ calculatedAt: string;
2000
+ };
2001
+ };
2002
+ PackRate: {
2003
+ /**
2004
+ * @description Resource identifier
2005
+ * @example 6a577711abc1ce71383d3e10
2006
+ */
2007
+ id: string;
2008
+ expansion: {
2009
+ /**
2010
+ * @description Resource identifier
2011
+ * @example 6a577711abc1ce71383d3e10
2012
+ */
2013
+ id: string;
2014
+ /** @example Mega Evolution 30th Celebration */
2015
+ name: string;
2016
+ /** @example 30th Celebration */
2017
+ shortName: string;
2018
+ /** @example jpn-mega-evolution-30th-celebration */
2019
+ technicalName: string;
2020
+ /**
2021
+ * @description Printing language of the item
2022
+ * @example JPN
2023
+ * @enum {string}
2024
+ */
2025
+ language: "ENG" | "JPN" | "CHI";
2026
+ /** @example m6a */
2027
+ code: string | null;
2028
+ /** @example m6a */
2029
+ cardCode: string | null;
2030
+ /** @example Mega Evolution */
2031
+ seriesName: string | null;
2032
+ /**
2033
+ * Format: date-time
2034
+ * @example 2026-07-15T12:03:29.322Z
2035
+ */
2036
+ releaseDate: string | null;
2037
+ /**
2038
+ * @description Absolute asset URL, or null when absent
2039
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
2040
+ */
2041
+ logoUrl: string | null;
2042
+ /**
2043
+ * @description Absolute asset URL, or null when absent
2044
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
2045
+ */
2046
+ symbolUrl: string | null;
2047
+ /**
2048
+ * @description Absolute asset URL, or null when absent
2049
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
2050
+ */
2051
+ imageUrl: string | null;
2052
+ };
2053
+ buckets: {
2054
+ /** @example Double rare */
2055
+ rarity: string;
2056
+ /**
2057
+ * @description Relative draw weight (normalised across buckets)
2058
+ * @example 24
2059
+ */
2060
+ weight: number;
2061
+ }[];
2062
+ /**
2063
+ * Format: date-time
2064
+ * @example 2026-07-15T12:03:29.322Z
2065
+ */
2066
+ createdAt: string;
2067
+ /**
2068
+ * Format: date-time
2069
+ * @example 2026-07-15T12:03:29.322Z
2070
+ */
2071
+ updatedAt: string;
2072
+ };
2073
+ PageMeta: {
2074
+ /** @description Total matching records, ignoring pagination */
2075
+ total: number;
2076
+ limit: number;
2077
+ skip: number;
2078
+ hasMore: boolean;
2079
+ };
2080
+ PlatformStats: {
2081
+ shopCount: number;
2082
+ categoryCount: number;
2083
+ expansionCount: number;
2084
+ productCount: number;
2085
+ priceCount: number;
2086
+ };
2087
+ ProductWithPricing: {
2088
+ /**
2089
+ * @description Resource identifier
2090
+ * @example 6a577711abc1ce71383d3e10
2091
+ */
2092
+ id: string;
2093
+ name: string;
2094
+ shortName: string | null;
2095
+ technicalName: string;
2096
+ brand: {
2097
+ /**
2098
+ * @description Resource identifier
2099
+ * @example 6a577711abc1ce71383d3e10
2100
+ */
2101
+ id: string;
2102
+ /** @example Pokémon */
2103
+ name: string;
2104
+ /** @example pokemon */
2105
+ technicalName: string;
2106
+ /**
2107
+ * Format: date-time
2108
+ * @example 2026-07-15T12:03:29.322Z
2109
+ */
2110
+ createdAt: string;
2111
+ /**
2112
+ * Format: date-time
2113
+ * @example 2026-07-15T12:03:29.322Z
2114
+ */
2115
+ updatedAt: string;
2116
+ };
2117
+ manufacturer: string;
2118
+ modelNumber: string | null;
2119
+ category: {
2120
+ /**
2121
+ * @description Resource identifier
2122
+ * @example 6a577711abc1ce71383d3e10
2123
+ */
2124
+ id: string;
2125
+ /** @example Booster Box */
2126
+ name: string;
2127
+ /** @example booster-box */
2128
+ technicalName: string;
2129
+ } | null;
2130
+ expansion: {
2131
+ /**
2132
+ * @description Resource identifier
2133
+ * @example 6a577711abc1ce71383d3e10
2134
+ */
2135
+ id: string;
2136
+ /** @example Mega Evolution 30th Celebration */
2137
+ name: string;
2138
+ /** @example 30th Celebration */
2139
+ shortName: string;
2140
+ /** @example jpn-mega-evolution-30th-celebration */
2141
+ technicalName: string;
2142
+ /**
2143
+ * @description Printing language of the item
2144
+ * @example JPN
2145
+ * @enum {string}
2146
+ */
2147
+ language: "ENG" | "JPN" | "CHI";
2148
+ /** @example m6a */
2149
+ code: string | null;
2150
+ /** @example m6a */
2151
+ cardCode: string | null;
2152
+ /** @example Mega Evolution */
2153
+ seriesName: string | null;
2154
+ /**
2155
+ * Format: date-time
2156
+ * @example 2026-07-15T12:03:29.322Z
2157
+ */
2158
+ releaseDate: string | null;
2159
+ /**
2160
+ * @description Absolute asset URL, or null when absent
2161
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
2162
+ */
2163
+ logoUrl: string | null;
2164
+ /**
2165
+ * @description Absolute asset URL, or null when absent
2166
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
2167
+ */
2168
+ symbolUrl: string | null;
2169
+ /**
2170
+ * @description Absolute asset URL, or null when absent
2171
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
2172
+ */
2173
+ imageUrl: string | null;
2174
+ } | null;
2175
+ /**
2176
+ * @description Printing language of the item
2177
+ * @example JPN
2178
+ * @enum {string|null}
2179
+ */
2180
+ language: "ENG" | "JPN" | "CHI" | null;
2181
+ alternativeNames: {
2182
+ name: string;
2183
+ shortName: string | null;
2184
+ }[];
2185
+ supportsMultipackPricing: boolean;
2186
+ /**
2187
+ * @description Absolute asset URL, or null when absent
2188
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
2189
+ */
2190
+ imageUrl: string | null;
2191
+ /**
2192
+ * @description Cheapest current shop price, in SEK
2193
+ * @example 149.5
2194
+ */
2195
+ retailPrice: number | null;
2196
+ /**
2197
+ * @description Estimated market value, in SEK
2198
+ * @example 149.5
2199
+ */
2200
+ estimatedValue: number | null;
2201
+ /** @description Active shops currently tracking this item */
2202
+ shopCount: number;
2203
+ /** @description Observations the estimate rests on */
2204
+ pricingDataPoints: number;
2205
+ /**
2206
+ * Format: date-time
2207
+ * @example 2026-07-15T12:03:29.322Z
2208
+ */
2209
+ pricingUpdatedAt: string | null;
2210
+ /**
2211
+ * Format: date-time
2212
+ * @example 2026-07-15T12:03:29.322Z
2213
+ */
2214
+ createdAt: string;
2215
+ /**
2216
+ * Format: date-time
2217
+ * @example 2026-07-15T12:03:29.322Z
2218
+ */
2219
+ updatedAt: string;
2220
+ /** @enum {string} */
2221
+ kind: "sealed";
2222
+ upc: string | null;
2223
+ asin: string | null;
2224
+ epid: string | null;
2225
+ priceChartingId: string | null;
2226
+ prisjaktId: string | null;
2227
+ lowestShopOffer: {
2228
+ shop: {
2229
+ /** @example cardlevels */
2230
+ technicalName: string;
2231
+ /** @example Cardlevels */
2232
+ name: string;
2233
+ };
2234
+ url: string;
2235
+ /** @example 149.5 */
2236
+ price: number;
2237
+ /**
2238
+ * @description ISO-4217 currency code
2239
+ * @example SEK
2240
+ */
2241
+ currency: string;
2242
+ inStock: boolean;
2243
+ inPreorder: boolean;
2244
+ inMonitor: boolean;
2245
+ isFullyBooked: boolean;
2246
+ /**
2247
+ * Format: date-time
2248
+ * @example 2026-07-15T12:03:29.322Z
2249
+ */
2250
+ matchedAt: string;
2251
+ /**
2252
+ * Format: date-time
2253
+ * @example 2026-07-15T12:03:29.322Z
2254
+ */
2255
+ updatedAt: string;
2256
+ bargain: {
2257
+ discountPercent: number;
2258
+ /** @enum {string} */
2259
+ referenceSource: "retail" | "tradera" | "cardmarket";
2260
+ } | null;
2261
+ } | null;
2262
+ referencePriceSnapshotsByProvider: {
2263
+ [key: string]: {
2264
+ /** @enum {string} */
2265
+ provider: "cardmarket" | "tcgplayer" | "ebay" | "tradera";
2266
+ /** @example 149.5 */
2267
+ price: number;
2268
+ /**
2269
+ * @description ISO-4217 currency code
2270
+ * @example SEK
2271
+ */
2272
+ currency: string;
2273
+ /**
2274
+ * @description price converted to SEK at the rate stored on the row
2275
+ * @example 149.5
2276
+ */
2277
+ priceSek: number;
2278
+ /**
2279
+ * Format: date-time
2280
+ * @example 2026-07-15T12:03:29.322Z
2281
+ */
2282
+ snapshotDate: string;
2283
+ };
2284
+ };
2285
+ };
2286
+ Shop: {
2287
+ /**
2288
+ * @description Resource identifier
2289
+ * @example 6a577711abc1ce71383d3e10
2290
+ */
2291
+ id: string;
2292
+ /** @example Cardlevels */
2293
+ name: string;
2294
+ /** @example cardlevels */
2295
+ technicalName: string;
2296
+ websiteUrl: string | null;
2297
+ /**
2298
+ * @description Absolute asset URL, or null when absent
2299
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
2300
+ */
2301
+ logoUrl: string | null;
2302
+ description: string | null;
2303
+ /** @example 149.5 */
2304
+ defaultDeliveryCost: number | null;
2305
+ /**
2306
+ * @description ISO-4217, or null
2307
+ * @example SEK
2308
+ */
2309
+ deliveryCurrency: string | null;
2310
+ deliveryDaysMin: number | null;
2311
+ deliveryDaysMax: number | null;
2312
+ /** @example 149.5 */
2313
+ freeShippingThreshold: number | null;
2314
+ supportsLocalPickup: boolean;
2315
+ deliveryNote: string | null;
2316
+ isActive: boolean;
2317
+ isTemporarilyClosed: boolean;
2318
+ isOptedOut: boolean;
2319
+ matchCount: number | null;
2320
+ /** @description Matches resolved to a catalog item */
2321
+ linkedMatchCount: number | null;
2322
+ inStockCount: number | null;
2323
+ preorderCount: number | null;
2324
+ monitorCount: number | null;
2325
+ fullyBookedCount: number | null;
2326
+ /**
2327
+ * Format: date-time
2328
+ * @example 2026-07-15T12:03:29.322Z
2329
+ */
2330
+ lastMatchedAt: string | null;
2331
+ /**
2332
+ * Format: date-time
2333
+ * @example 2026-07-15T12:03:29.322Z
2334
+ */
2335
+ createdAt: string;
2336
+ /**
2337
+ * Format: date-time
2338
+ * @example 2026-07-15T12:03:29.322Z
2339
+ */
2340
+ updatedAt: string;
2341
+ };
2342
+ ShopMatchStats: {
2343
+ shop: {
2344
+ technicalName: string;
2345
+ name: string;
2346
+ logoUrl: string | null;
2347
+ websiteUrl: string | null;
2348
+ description: string | null;
2349
+ isActive: boolean;
2350
+ isTemporarilyClosed: boolean;
2351
+ isOptedOut: boolean;
2352
+ deliveryNote: string | null;
2353
+ };
2354
+ matchCount: number;
2355
+ /** @description Matches resolved to a catalog item */
2356
+ linkedMatchCount: number;
2357
+ inStockCount: number;
2358
+ preorderCount: number;
2359
+ monitorCount: number;
2360
+ fullyBookedCount: number;
2361
+ /**
2362
+ * Format: date-time
2363
+ * @example 2026-07-15T12:03:29.322Z
2364
+ */
2365
+ lastMatchedAt: string | null;
2366
+ };
2367
+ ShopMatchWithItem: {
2368
+ /**
2369
+ * @description Resource identifier
2370
+ * @example 6a577711abc1ce71383d3e10
2371
+ */
2372
+ id: string;
2373
+ shop: {
2374
+ /** @example cardlevels */
2375
+ technicalName: string;
2376
+ /** @example Cardlevels */
2377
+ name: string;
2378
+ };
2379
+ url: string;
2380
+ /**
2381
+ * @description Resource identifier
2382
+ * @example 6a577711abc1ce71383d3e10
2383
+ */
2384
+ shopUrlId: string | null;
2385
+ /** @example 149.5 */
2386
+ price: number | null;
2387
+ /**
2388
+ * @description ISO-4217 currency code
2389
+ * @example SEK
2390
+ */
2391
+ currency: string | null;
2392
+ inStock: boolean;
2393
+ inPreorder: boolean;
2394
+ inMonitor: boolean;
2395
+ isFullyBooked: boolean;
2396
+ scrapedName: string | null;
2397
+ scrapedType: string | null;
2398
+ matchScore: number | null;
2399
+ hasCategoryMismatch: boolean;
2400
+ /** @enum {string|null} */
2401
+ cardType: "loose" | "graded" | null;
2402
+ /** @enum {string|null} */
2403
+ itemCondition: "NM" | "LP" | "MP" | "HP" | "DMG" | null;
2404
+ /** @enum {string|null} */
2405
+ gradingCompany: "PSA" | "BGS" | "CGC" | "SGC" | "ACE" | "RAUKCARD" | "TAG" | "GMA" | null;
2406
+ grade: number | null;
2407
+ item: {
2408
+ /**
2409
+ * @description Resource identifier
2410
+ * @example 6a577711abc1ce71383d3e10
2411
+ */
2412
+ id: string;
2413
+ /** @enum {string} */
2414
+ kind: "card" | "sealed";
2415
+ name: string;
2416
+ shortName: string | null;
2417
+ technicalName: string;
2418
+ cardNumber: string | null;
2419
+ imageUrl: string | null;
2420
+ language: string | null;
2421
+ priceChartingId: string | null;
2422
+ } | null;
2423
+ expansion: {
2424
+ /**
2425
+ * @description Resource identifier
2426
+ * @example 6a577711abc1ce71383d3e10
2427
+ */
2428
+ id: string;
2429
+ /** @example Mega Evolution 30th Celebration */
2430
+ name: string;
2431
+ /** @example 30th Celebration */
2432
+ shortName: string;
2433
+ /** @example jpn-mega-evolution-30th-celebration */
2434
+ technicalName: string;
2435
+ /**
2436
+ * @description Printing language of the item
2437
+ * @example JPN
2438
+ * @enum {string}
2439
+ */
2440
+ language: "ENG" | "JPN" | "CHI";
2441
+ /** @example m6a */
2442
+ code: string | null;
2443
+ /** @example m6a */
2444
+ cardCode: string | null;
2445
+ /** @example Mega Evolution */
2446
+ seriesName: string | null;
2447
+ /**
2448
+ * Format: date-time
2449
+ * @example 2026-07-15T12:03:29.322Z
2450
+ */
2451
+ releaseDate: string | null;
2452
+ /**
2453
+ * @description Absolute asset URL, or null when absent
2454
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
2455
+ */
2456
+ logoUrl: string | null;
2457
+ /**
2458
+ * @description Absolute asset URL, or null when absent
2459
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
2460
+ */
2461
+ symbolUrl: string | null;
2462
+ /**
2463
+ * @description Absolute asset URL, or null when absent
2464
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
2465
+ */
2466
+ imageUrl: string | null;
2467
+ } | null;
2468
+ category: {
2469
+ /**
2470
+ * @description Resource identifier
2471
+ * @example 6a577711abc1ce71383d3e10
2472
+ */
2473
+ id: string;
2474
+ /** @example Booster Box */
2475
+ name: string;
2476
+ /** @example booster-box */
2477
+ technicalName: string;
2478
+ } | null;
2479
+ /**
2480
+ * Format: date-time
2481
+ * @example 2026-07-15T12:03:29.322Z
2482
+ */
2483
+ matchedAt: string;
2484
+ /**
2485
+ * Format: date-time
2486
+ * @example 2026-07-15T12:03:29.322Z
2487
+ */
2488
+ updatedAt: string;
2489
+ bargain: {
2490
+ discountPercent: number;
2491
+ /** @enum {string} */
2492
+ referenceSource: "retail" | "tradera" | "cardmarket";
2493
+ } | null;
2494
+ };
2495
+ ShopMatchesForShop: {
2496
+ shop: {
2497
+ technicalName: string;
2498
+ name: string;
2499
+ logoUrl: string | null;
2500
+ websiteUrl: string | null;
2501
+ description: string | null;
2502
+ isActive: boolean;
2503
+ isTemporarilyClosed: boolean;
2504
+ isOptedOut: boolean;
2505
+ deliveryNote: string | null;
2506
+ } | null;
2507
+ data: {
2508
+ /**
2509
+ * @description Resource identifier
2510
+ * @example 6a577711abc1ce71383d3e10
2511
+ */
2512
+ id: string;
2513
+ shop: {
2514
+ /** @example cardlevels */
2515
+ technicalName: string;
2516
+ /** @example Cardlevels */
2517
+ name: string;
2518
+ };
2519
+ url: string;
2520
+ /**
2521
+ * @description Resource identifier
2522
+ * @example 6a577711abc1ce71383d3e10
2523
+ */
2524
+ shopUrlId: string | null;
2525
+ /** @example 149.5 */
2526
+ price: number | null;
2527
+ /**
2528
+ * @description ISO-4217 currency code
2529
+ * @example SEK
2530
+ */
2531
+ currency: string | null;
2532
+ inStock: boolean;
2533
+ inPreorder: boolean;
2534
+ inMonitor: boolean;
2535
+ isFullyBooked: boolean;
2536
+ scrapedName: string | null;
2537
+ scrapedType: string | null;
2538
+ matchScore: number | null;
2539
+ hasCategoryMismatch: boolean;
2540
+ /** @enum {string|null} */
2541
+ cardType: "loose" | "graded" | null;
2542
+ /** @enum {string|null} */
2543
+ itemCondition: "NM" | "LP" | "MP" | "HP" | "DMG" | null;
2544
+ /** @enum {string|null} */
2545
+ gradingCompany: "PSA" | "BGS" | "CGC" | "SGC" | "ACE" | "RAUKCARD" | "TAG" | "GMA" | null;
2546
+ grade: number | null;
2547
+ item: {
2548
+ /**
2549
+ * @description Resource identifier
2550
+ * @example 6a577711abc1ce71383d3e10
2551
+ */
2552
+ id: string;
2553
+ /** @enum {string} */
2554
+ kind: "card" | "sealed";
2555
+ name: string;
2556
+ shortName: string | null;
2557
+ technicalName: string;
2558
+ cardNumber: string | null;
2559
+ imageUrl: string | null;
2560
+ language: string | null;
2561
+ priceChartingId: string | null;
2562
+ } | null;
2563
+ expansion: {
2564
+ /**
2565
+ * @description Resource identifier
2566
+ * @example 6a577711abc1ce71383d3e10
2567
+ */
2568
+ id: string;
2569
+ /** @example Mega Evolution 30th Celebration */
2570
+ name: string;
2571
+ /** @example 30th Celebration */
2572
+ shortName: string;
2573
+ /** @example jpn-mega-evolution-30th-celebration */
2574
+ technicalName: string;
2575
+ /**
2576
+ * @description Printing language of the item
2577
+ * @example JPN
2578
+ * @enum {string}
2579
+ */
2580
+ language: "ENG" | "JPN" | "CHI";
2581
+ /** @example m6a */
2582
+ code: string | null;
2583
+ /** @example m6a */
2584
+ cardCode: string | null;
2585
+ /** @example Mega Evolution */
2586
+ seriesName: string | null;
2587
+ /**
2588
+ * Format: date-time
2589
+ * @example 2026-07-15T12:03:29.322Z
2590
+ */
2591
+ releaseDate: string | null;
2592
+ /**
2593
+ * @description Absolute asset URL, or null when absent
2594
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
2595
+ */
2596
+ logoUrl: string | null;
2597
+ /**
2598
+ * @description Absolute asset URL, or null when absent
2599
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
2600
+ */
2601
+ symbolUrl: string | null;
2602
+ /**
2603
+ * @description Absolute asset URL, or null when absent
2604
+ * @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
2605
+ */
2606
+ imageUrl: string | null;
2607
+ } | null;
2608
+ category: {
2609
+ /**
2610
+ * @description Resource identifier
2611
+ * @example 6a577711abc1ce71383d3e10
2612
+ */
2613
+ id: string;
2614
+ /** @example Booster Box */
2615
+ name: string;
2616
+ /** @example booster-box */
2617
+ technicalName: string;
2618
+ } | null;
2619
+ /**
2620
+ * Format: date-time
2621
+ * @example 2026-07-15T12:03:29.322Z
2622
+ */
2623
+ matchedAt: string;
2624
+ /**
2625
+ * Format: date-time
2626
+ * @example 2026-07-15T12:03:29.322Z
2627
+ */
2628
+ updatedAt: string;
2629
+ bargain: {
2630
+ discountPercent: number;
2631
+ /** @enum {string} */
2632
+ referenceSource: "retail" | "tradera" | "cardmarket";
2633
+ } | null;
2634
+ }[];
2635
+ pagination: {
2636
+ /** @description Total matching records, ignoring pagination */
2637
+ total: number;
2638
+ limit: number;
2639
+ skip: number;
2640
+ hasMore: boolean;
2641
+ };
2642
+ };
2643
+ ShopPriceHistoryList: {
2644
+ shop: string;
2645
+ items: {
2646
+ item: {
2647
+ /**
2648
+ * @description Resource identifier
2649
+ * @example 6a577711abc1ce71383d3e10
2650
+ */
2651
+ id: string;
2652
+ name: string;
2653
+ };
2654
+ history: {
2655
+ /**
2656
+ * Format: date-time
2657
+ * @example 2026-07-15T12:03:29.322Z
2658
+ */
2659
+ snapshotDate: string;
2660
+ /** @example 149.5 */
2661
+ price: number;
2662
+ /**
2663
+ * @description ISO-4217 currency code
2664
+ * @example SEK
2665
+ */
2666
+ currency: string;
2667
+ inStock: boolean;
2668
+ url: string;
2669
+ }[];
2670
+ /** @example 149.5 */
2671
+ latestPrice: number | null;
2672
+ /**
2673
+ * Format: date-time
2674
+ * @example 2026-07-15T12:03:29.322Z
2675
+ */
2676
+ latestDate: string | null;
2677
+ }[];
2678
+ itemCount: number;
2679
+ };
2680
+ ShopUrlMutationResult: {
2681
+ message: string;
2682
+ shopUrl: {
2683
+ /**
2684
+ * @description Resource identifier
2685
+ * @example 6a577711abc1ce71383d3e10
2686
+ */
2687
+ id: string;
2688
+ url: string;
2689
+ shop: string | null;
2690
+ /** @enum {string} */
2691
+ status: "pending" | "active" | "invalid" | "rejected" | "sanityRejected";
2692
+ /** @enum {string} */
2693
+ discoveredBy: "scraper" | "user";
2694
+ /**
2695
+ * @description Resource identifier
2696
+ * @example 6a577711abc1ce71383d3e10
2697
+ */
2698
+ itemId: string | null;
2699
+ /** @enum {string|null} */
2700
+ itemKind: "card" | "sealed" | null;
2701
+ lockedItem: boolean;
2702
+ priceChartingId: string | null;
2703
+ scrapedName: string | null;
2704
+ matchScore: number | null;
2705
+ /**
2706
+ * Format: date-time
2707
+ * @example 2026-07-15T12:03:29.322Z
2708
+ */
2709
+ lastMatchedAt: string | null;
2710
+ /**
2711
+ * @description Resource identifier
2712
+ * @example 6a577711abc1ce71383d3e10
2713
+ */
2714
+ expansionId: string | null;
2715
+ /**
2716
+ * @description Resource identifier
2717
+ * @example 6a577711abc1ce71383d3e10
2718
+ */
2719
+ categoryId: string | null;
2720
+ submittedByUserId: string | null;
2721
+ /**
2722
+ * Format: date-time
2723
+ * @example 2026-07-15T12:03:29.322Z
2724
+ */
2725
+ createdAt: string;
2726
+ /**
2727
+ * Format: date-time
2728
+ * @example 2026-07-15T12:03:29.322Z
2729
+ */
2730
+ updatedAt: string;
2731
+ };
2732
+ };
2733
+ TopItem: {
2734
+ /**
2735
+ * @description Resource identifier
2736
+ * @example 6a577711abc1ce71383d3e10
2737
+ */
2738
+ id: string;
2739
+ slug: string | null;
2740
+ shopMatchCount: number;
2741
+ };
2742
+ };
2743
+ responses: never;
2744
+ parameters: never;
2745
+ requestBodies: never;
2746
+ headers: never;
2747
+ pathItems: never;
2748
+ }
2749
+
2750
+ /**
2751
+ * Shared primitives reused across every resource. Pulled from `src/generated/openapi.d.ts` via
2752
+ * indexed access instead of retyped by hand, so a field rename in the API is a compile error here,
2753
+ * not silent drift.
2754
+ *
2755
+ * `CardWithPricing` is the extraction source for the nested ref shapes (`brand`, `category`,
2756
+ * `expansion`, the shop/bargain shape on `lowestShopOffer`). The API inlines these instead of
2757
+ * `$ref`-ing a shared component, so there's no single canonical name to pull from. They're
2758
+ * byte-identical across `ProductWithPricing`, `PackRate` and the shop-match schemas too, so picking
2759
+ * one as the source of truth works fine.
2760
+ */
2761
+
2762
+ type CardSchema = components['schemas']['CardWithPricing'];
2763
+ type LowestShopOfferSchema = NonNullable<CardSchema['lowestShopOffer']>;
2764
+ /** A Mongo ObjectId, always a 24-char lowercase hex string. Just `string`, not a branded type;
2765
+ * nothing here needs to tell it apart from any other id at compile time. */
2766
+ type ResourceId = string;
2767
+ /** ISO-4217 currency code, e.g. `"SEK"` or `"EUR"`. */
2768
+ type CurrencyCode = string;
2769
+ /** ISO 8601 timestamp, as returned by the API (always UTC, `Z`-suffixed). */
2770
+ type Timestamp = string;
2771
+ type PrintingLanguage = NonNullable<CardSchema['language']>;
2772
+ type PageMeta = components['schemas']['PageMeta'];
2773
+ /** The standard paginated list envelope every `list`/`search` method returns. Hand-declared, not
2774
+ * generated: the API repeats a fresh anonymous `{ data, pagination }` object per endpoint rather
2775
+ * than naming it once. */
2776
+ interface ListResponse<T> {
2777
+ data: T[];
2778
+ pagination: PageMeta;
2779
+ }
2780
+ /** Query params shared by every offset-paginated list endpoint. */
2781
+ interface PaginationParams {
2782
+ limit?: number;
2783
+ skip?: number;
2784
+ }
2785
+ type AlternativeName = CardSchema['alternativeNames'][number];
2786
+ type BrandRef = CardSchema['brand'];
2787
+ type CategoryRef = NonNullable<CardSchema['category']>;
2788
+ /** The expansion shape embedded on cards, products and pack rates. Not the full `Expansion`
2789
+ * returned by `client.expansions.list()`, which additionally carries counts and a `brand`. */
2790
+ type ExpansionRef = NonNullable<CardSchema['expansion']>;
2791
+ /** The minimal shop identity embedded on offers and matches. */
2792
+ type ShopRef = LowestShopOfferSchema['shop'];
2793
+ type BargainReferenceSource = NonNullable<LowestShopOfferSchema['bargain']>['referenceSource'];
2794
+ /** Present on an offer/match when its price is a known-good discount off a reference price. */
2795
+ type BargainInfo = NonNullable<LowestShopOfferSchema['bargain']>;
2796
+ /** The cheapest current shop offer for a card or product. */
2797
+ type LowestShopOffer = LowestShopOfferSchema;
2798
+ type ReferencePriceProvider = CardSchema['referencePriceSnapshotsByProvider'][string]['provider'];
2799
+ type ReferencePriceSnapshot = CardSchema['referencePriceSnapshotsByProvider'][string];
2800
+ /** Keyed by provider, at most one snapshot per provider. */
2801
+ type ReferencePriceSnapshotsByProvider = Partial<Record<ReferencePriceProvider, ReferencePriceSnapshot>>;
2802
+
2803
+ /** A card, as returned by `client.cards.get()` / `client.cards.list()`, and as embedded in
2804
+ * `client.expansions.products()`. `kind: 'card'` is a literal on the generated type, which is what
2805
+ * makes `CatalogItem` (below) discriminate cleanly. */
2806
+ type Card = components['schemas']['CardWithPricing'];
2807
+ /** A sealed product (booster box, ETB, tin, ...), as returned by `client.products.get()` /
2808
+ * `client.products.list()`. `kind: 'sealed'` is a literal on the generated type. */
2809
+ type SealedProduct = components['schemas']['ProductWithPricing'];
2810
+ /** A card or sealed product, discriminated on `kind`. */
2811
+ type CatalogItem = Card | SealedProduct;
2812
+ type CardVariants = NonNullable<Card['variants']>;
2813
+ /** The compact item reference used inside flat shop-match rows (`client.shopMatches.list()` /
2814
+ * `.forShop()`), enough to render a result list, not the full `CatalogItem`. */
2815
+ type MatchedItemRef = NonNullable<components['schemas']['ShopMatchWithItem']['item']>;
2816
+ /** One shop listing currently discounted relative to a reference price (retail, Tradera, or
2817
+ * Cardmarket). Returned by `client.bargains.list()` / `client.bargains.search()`. */
2818
+ type Bargain = components['schemas']['BargainListResponse']['data'][number];
2819
+ type BargainProductRef = Bargain['product'];
2820
+
2821
+ /** A set/expansion, as returned by `client.expansions.list()`. This is the full record. The
2822
+ * `expansion` field embedded on a card or product is the smaller `ExpansionRef` from
2823
+ * `types/common.ts`. */
2824
+ type Expansion = components['schemas']['Expansion'];
2825
+ /** Response of `client.expansions.products()`: everything in one expansion, cards and sealed
2826
+ * products kept as separate `cards`/`sealed` groups rather than merged into one mixed list. */
2827
+ type ExpansionContents = components['schemas']['ExpansionContents'];
2828
+
2829
+ type ShopMatchWithItemSchema = components['schemas']['ShopMatchWithItem'];
2830
+ type ItemShopMatchSchema = components['schemas']['ItemShopMatches']['data'][number];
2831
+ /** A shop tracked by tcgpriser, as returned by `client.shops.list()` / `client.shops.get()`. The
2832
+ * `*Count` fields are `null` when the shop has never had a match computed (rather than `0`, which
2833
+ * would mean "matched, currently empty"). */
2834
+ type Shop = components['schemas']['Shop'];
2835
+ /** The lighter shop shape embedded in shop-match responses: a subset of `Shop`, no id or delivery
2836
+ * cost breakdown. */
2837
+ type ShopSummary = components['schemas']['ShopMatchStats']['shop'];
2838
+ type CardType = NonNullable<ShopMatchWithItemSchema['cardType']>;
2839
+ type ItemCondition = NonNullable<ShopMatchWithItemSchema['itemCondition']>;
2840
+ type GradingCompany = NonNullable<ShopMatchWithItemSchema['gradingCompany']>;
2841
+ /** A shop's listing matched (or not yet matched) to a catalog item. Returned by
2842
+ * `client.shopMatches.list()` and as the rows inside `client.shopMatches.forShop()`. */
2843
+ type ShopMatch = ShopMatchWithItemSchema;
2844
+ type ShopMatchDelivery = ItemShopMatchSchema['shop']['delivery'];
2845
+ /** A shop-match row scoped to one already-known item. `client.cards.matches()` and
2846
+ * `client.products.matches()` drop `item`/`expansion`/`category` since the caller already has
2847
+ * them, but add delivery terms since you're looking at one listing's total cost here. */
2848
+ type ItemShopMatch = ItemShopMatchSchema;
2849
+ /** Response of `client.cards.matches()` / `client.products.matches()`. */
2850
+ type ItemShopMatches = components['schemas']['ItemShopMatches'];
2851
+ /** Response of `client.shopMatches.forShop()`: every match, of any item, currently live at one shop. */
2852
+ type ShopMatchesForShop = components['schemas']['ShopMatchesForShop'];
2853
+ /** One row of `client.shopMatches.shopStats()`: match counts per shop, not the matches themselves. */
2854
+ type ShopMatchStats = components['schemas']['ShopMatchStats'];
2855
+
2856
+ /** A named `{ id, name }` reference to a card or product: the compact identity used by every
2857
+ * `price-stats` response, which is keyed by item rather than embedding the full catalog record. */
2858
+ type ItemRef = components['schemas']['ItemDailyStats']['item'];
2859
+ /** One day's average price for one item. */
2860
+ type DailyPricePoint = components['schemas']['ItemDailyStats']['dailyStats'][number];
2861
+ /** Response row of `client.priceStats.daily()`. */
2862
+ type ItemDailyStats = components['schemas']['ItemDailyStats'];
2863
+ type EstimatedValue = components['schemas']['ItemEstimatedValue']['estimate'];
2864
+ /** Response row of `client.priceStats.estimatedValues()`. */
2865
+ type ItemEstimatedValue = components['schemas']['ItemEstimatedValue'];
2866
+ /** Response row of `client.priceStats.topProducts()`: items ranked by shop availability, not price. */
2867
+ type TopItem = components['schemas']['TopItem'];
2868
+
2869
+ /** One rarity's share of a booster pack's pulls. `weight` is relative to the other buckets in the
2870
+ * same pack rate, not a percentage. Normalise across `buckets` yourself if you need one. */
2871
+ type PackRateBucket = components['schemas']['PackRate']['buckets'][number];
2872
+ /** Pull-rate odds for one expansion's booster packs, as returned by `client.packRates.list()` /
2873
+ * `client.packRates.get()`. */
2874
+ type PackRate = components['schemas']['PackRate'];
2875
+
2876
+ /** Platform-wide overview counts, returned by `client.stats.platform()`. */
2877
+ type PlatformStats = components['schemas']['PlatformStats'];
2878
+
2879
+ /**
2880
+ * Types for the premium tier: endpoints that need a signed-in subscriber's JWT (see
2881
+ * `TcgPriserOptions.authToken`, or the `authToken` field on each premium method's params). Split
2882
+ * out from the public-tier types because none of these mean anything without a token: without one,
2883
+ * the API just answers `403 premiumRequired`.
2884
+ *
2885
+ * Derived from `src/generated/openapi.d.ts`, same as everything else in this directory.
2886
+ */
2887
+
2888
+ type ReferencePriceSeries = components['schemas']['ItemReferencePrices']['series'][number];
2889
+ type ReferencePriceSeriesPoint = ReferencePriceSeries['points'][number];
2890
+ type ReferencePriceSource = ReferencePriceSeries['source'];
2891
+ type ReferencePriceCardVariant = NonNullable<ReferencePriceSeries['variant']>;
2892
+ type ReferencePriceMetric = components['schemas']['ItemReferencePrices']['metric'];
2893
+ type ReferencePriceCurrencyMode = components['schemas']['ItemReferencePrices']['currencyMode'];
2894
+ /** Response of `client.cards.referencePrices()` / `client.products.referencePrices()`.
2895
+ *
2896
+ * Non-graded card prices come from TCGdex and are variant-aware (normal / holo / reverse). Graded
2897
+ * prices and eBay medians come from cmapi. Tradera is tcgpriser's own data: realised Swedish
2898
+ * auction sales rather than asking prices, always SEK, no variant. In native mode each series
2899
+ * keeps its own `currency`; in `sek` mode everything is `SEK`, converted at the rate stored on
2900
+ * each point. */
2901
+ type ItemReferencePrices = components['schemas']['ItemReferencePrices'];
2902
+ type SoldPrice = components['schemas']['ItemSoldPrices']['data'][number];
2903
+ /** Response of `client.cards.prices()` / `client.products.prices()`. `premiumRequired` is always
2904
+ * `true` here. That field only exists because this envelope shape is shared with a free preview
2905
+ * elsewhere in the API; this response is never the preview. */
2906
+ type ItemSoldPrices = components['schemas']['ItemSoldPrices'];
2907
+ type LivePricingDetail = components['schemas']['LivePricingForItem']['pricing'];
2908
+ /** Response of `client.cards.livePricing()` / `client.products.livePricing()`. */
2909
+ type LivePricingForItem = components['schemas']['LivePricingForItem'];
2910
+ /** Response of `client.expansions.livePricing()`: live pricing for every item in one expansion. */
2911
+ type ExpansionLivePricing = components['schemas']['ExpansionLivePricing'];
2912
+ /** The catalog item as embedded in stats responses: a `Card`/`SealedProduct` minus
2913
+ * `lowestShopOffer` and `referencePriceSnapshotsByProvider`, which these endpoints already answer
2914
+ * more precisely on their own. */
2915
+ type StatsItemRef = components['schemas']['ItemStats']['item'];
2916
+ type VariantStatsSummary = components['schemas']['ItemStats']['variantStats'];
2917
+ /** Response of `client.priceStats.product()`. */
2918
+ type ItemStats = components['schemas']['ItemStats'];
2919
+ /** Response of `client.priceStats.productFull()`: everything `product()` has, plus the item's
2920
+ * current shop matches. */
2921
+ type ItemFullStats = components['schemas']['ItemFullStats'];
2922
+ type VariantPriceStat = components['schemas']['ItemVariantStats']['variants']['loose'][string];
2923
+ /** Response of `client.priceStats.productByVariant()`. The generated shape keys `loose`/`graded`
2924
+ * by a bare `string` (JSON Schema `additionalProperties` doesn't carry an enum), re-keyed here by
2925
+ * `ItemCondition`/`GradingCompany` for real autocomplete. Only hand-written wrapper in this file.
2926
+ * `graded` has a second string-keyed level for grade (`10`, `9.5` etc, straight from a JSON key). */
2927
+ interface ItemVariantStats {
2928
+ item: components['schemas']['ItemVariantStats']['item'];
2929
+ variants: {
2930
+ loose: Partial<Record<ItemCondition, VariantPriceStat>>;
2931
+ graded: Partial<Record<GradingCompany, Record<string, VariantPriceStat>>>;
2932
+ };
2933
+ }
2934
+ type VariantSelector = components['schemas']['ItemVariantDailyStats']['variant'];
2935
+ /** Response of `client.priceStats.productDailyByVariant()`. */
2936
+ type ItemVariantDailyStats = components['schemas']['ItemVariantDailyStats'];
2937
+ type ShopPricePoint = components['schemas']['ItemShopPriceHistory']['shops'][number]['history'][number];
2938
+ /** Response of `client.shopMatchStats.forProduct()`: one product's price history, broken out per
2939
+ * shop. */
2940
+ type ItemShopPriceHistory = components['schemas']['ItemShopPriceHistory'];
2941
+ /** Response of `client.shopMatchStats.forShop()`: one shop's price history, broken out per
2942
+ * product. */
2943
+ type ShopPriceHistoryList = components['schemas']['ShopPriceHistoryList'];
2944
+ type ShopPriceComparisonRow = components['schemas']['ItemPriceComparison']['items'][number];
2945
+ type ShopPriceComparisonStats = NonNullable<components['schemas']['ItemPriceComparison']['stats']>;
2946
+ /** Response of `client.shopMatchStats.compare()`: one product's price at every shop that carries
2947
+ * it, as of one date. `stats` is `null` when no shop had a price on that date. */
2948
+ type ItemPriceComparison = components['schemas']['ItemPriceComparison'];
2949
+ type ShopUrlStatus = components['schemas']['ShopUrlMutationResult']['shopUrl']['status'];
2950
+ type ShopUrlDiscoveredBy = components['schemas']['ShopUrlMutationResult']['shopUrl']['discoveredBy'];
2951
+ /** A URL at a shop that tcgpriser scrapes, and what it has been matched to. */
2952
+ type ShopUrl = components['schemas']['ShopUrlMutationResult']['shopUrl'];
2953
+ /** Response of `client.shopUrls.submit()` / `client.shopUrls.assignProduct()`. */
2954
+ type ShopUrlMutationResult = components['schemas']['ShopUrlMutationResult'];
2955
+
2956
+ interface ListBargainsParams {
2957
+ type?: 'sealed' | 'card' | 'all';
2958
+ }
2959
+ interface SearchBargainsParams extends PaginationParams {
2960
+ authToken?: string;
2961
+ type?: 'sealed' | 'card' | 'all';
2962
+ /** Filter by shop technicalName. */
2963
+ shop?: string;
2964
+ /** Filter by which reference price source qualified the bargain. */
2965
+ referenceSource?: BargainReferenceSource;
2966
+ /** Minimum discount percentage. Default 10. */
2967
+ minDiscount?: number;
2968
+ /** Default `true`. */
2969
+ inStock?: boolean;
2970
+ cardType?: CardType;
2971
+ itemCondition?: ItemCondition;
2972
+ gradingCompany?: GradingCompany;
2973
+ grade?: number;
2974
+ /** Free-text search on product name / technicalName. */
2975
+ search?: string;
2976
+ }
2977
+ declare class BargainsResource {
2978
+ private readonly http;
2979
+ constructor(http: HttpClient);
2980
+ /** `GET /bargains`: current shop listings priced notably below their reference price. Result
2981
+ * count is fixed by the API (no `limit`/`skip` on the public tier); `pagination.hasMore` tells
2982
+ * you if more exist. */
2983
+ list(params?: ListBargainsParams): Promise<ListResponse<Bargain>>;
2984
+ /** `GET /bargains/search`: like `list()`, but with real pagination and filters (shop, discount
2985
+ * threshold, card condition/grade, free-text search). Premium. */
2986
+ search(params?: SearchBargainsParams): Promise<ListResponse<Bargain>>;
2987
+ }
2988
+
2989
+ interface ListCardsParams extends PaginationParams {
2990
+ /** Free-text search over card and set names. */
2991
+ search?: string;
2992
+ }
2993
+ interface CardMatchesParams extends PaginationParams {
2994
+ /** Keep only matches whose shop currently has stock. */
2995
+ inStock?: boolean;
2996
+ }
2997
+ interface CardReferencePricesParams {
2998
+ /** Bearer token for this call. Overrides the client's default `authToken`. */
2999
+ authToken?: string;
3000
+ /** Rolling window ending today, in days. Ignored when `from`/`to` are supplied. Default 90. */
3001
+ days?: number;
3002
+ /** `YYYY-MM-DD` */
3003
+ from?: string;
3004
+ /** `YYYY-MM-DD` */
3005
+ to?: string;
3006
+ provider?: ReferencePriceProvider;
3007
+ cardType?: CardType;
3008
+ variant?: ReferencePriceCardVariant;
3009
+ }
3010
+ interface CardPricesParams extends PaginationParams {
3011
+ authToken?: string;
3012
+ }
3013
+ declare class CardsResource {
3014
+ private readonly http;
3015
+ constructor(http: HttpClient);
3016
+ /** `GET /cards`: search or list cards. */
3017
+ list(params?: ListCardsParams): Promise<ListResponse<Card>>;
3018
+ /** `GET /cards/{id}`: fetch one card by its id or technicalName. */
3019
+ get(idOrTechnicalName: string): Promise<Card>;
3020
+ /** `GET /cards/{id}/matches`: current shop listings matched to this card (latest per shop). */
3021
+ matches(idOrTechnicalName: string, params?: CardMatchesParams): Promise<ItemShopMatches>;
3022
+ /** `GET /cards/{id}/reference-prices`: Cardmarket/TCGplayer/eBay/Tradera price history. Premium. */
3023
+ referencePrices(idOrTechnicalName: string, params?: CardReferencePricesParams): Promise<ItemReferencePrices>;
3024
+ /** `GET /cards/{id}/prices`: individual marketplace sale records. Premium. */
3025
+ prices(idOrTechnicalName: string, params?: CardPricesParams): Promise<ItemSoldPrices>;
3026
+ /** `GET /cards/{id}/pricing/live`: computed fresh for this request, not read from the last
3027
+ * stats job. Premium. */
3028
+ livePricing(idOrTechnicalName: string, options?: PremiumOptions): Promise<LivePricingForItem>;
3029
+ }
3030
+
3031
+ declare class ExpansionsResource {
3032
+ private readonly http;
3033
+ constructor(http: HttpClient);
3034
+ /** `GET /expansions`: every expansion. Unwrapped to a plain array, nothing to paginate here. */
3035
+ list(): Promise<Expansion[]>;
3036
+ /** `GET /expansions/{technicalName}/products`: every card and sealed product in one
3037
+ * expansion, kept as separate `cards`/`sealed` groups. */
3038
+ products(technicalName: string): Promise<ExpansionContents>;
3039
+ /** `GET /expansions/{technicalName}/products/live-pricing`: computed fresh for every item in
3040
+ * this expansion, not read from the last stats job. Premium. */
3041
+ livePricing(technicalName: string, options?: PremiumOptions): Promise<ExpansionLivePricing>;
3042
+ }
3043
+
3044
+ declare class PackRatesResource {
3045
+ private readonly http;
3046
+ constructor(http: HttpClient);
3047
+ /** `GET /pack-rates`: pull-rate odds for every expansion that has them. Unwrapped to a plain
3048
+ * array, nothing to paginate here. */
3049
+ list(): Promise<PackRate[]>;
3050
+ /** `GET /pack-rates/{expansionId}`: pull-rate odds for one expansion. */
3051
+ get(expansionId: string): Promise<PackRate>;
3052
+ }
3053
+
3054
+ /** Filters shared by `daily()` and `estimatedValues()`: all narrow which product(s) the stats
3055
+ * cover; combine as many as you like. */
3056
+ interface ProductFilterParams {
3057
+ productName?: string;
3058
+ technicalName?: string;
3059
+ priceChartingId?: string;
3060
+ modelNumber?: string;
3061
+ /** Category technicalName. */
3062
+ category?: string;
3063
+ /** Expansion technicalName. */
3064
+ expansion?: string;
3065
+ }
3066
+ interface DailyPriceStatsParams extends ProductFilterParams {
3067
+ /** `YYYY-MM-DD` */
3068
+ startDate?: string;
3069
+ /** `YYYY-MM-DD` */
3070
+ endDate?: string;
3071
+ /** Expansion id (ObjectId), an alternative to `expansion` (technicalName). */
3072
+ expansionId?: string;
3073
+ /** Category id (ObjectId), an alternative to `category` (technicalName). */
3074
+ categoryId?: string;
3075
+ }
3076
+ interface EstimatedValuesParams extends ProductFilterParams {
3077
+ page?: number;
3078
+ limit?: number;
3079
+ }
3080
+ interface TopProductsParams {
3081
+ limit?: number;
3082
+ }
3083
+ interface ProductDailyStatsParams {
3084
+ authToken?: string;
3085
+ /** Number of days to retrieve, from today backwards. Default 30. */
3086
+ days?: number;
3087
+ }
3088
+ interface ProductByVariantParams {
3089
+ authToken?: string;
3090
+ /** Number of days to include in the average calculation. Default 30. */
3091
+ days?: number;
3092
+ }
3093
+ interface ProductDailyByVariantParams {
3094
+ authToken?: string;
3095
+ cardType: CardType;
3096
+ /** Required when `cardType` is `'loose'`. */
3097
+ condition?: ItemCondition;
3098
+ /** Required when `cardType` is `'graded'`. */
3099
+ gradingCompany?: GradingCompany;
3100
+ /** Required when `cardType` is `'graded'`. */
3101
+ grade?: number;
3102
+ /** Number of days to retrieve. Default 30. */
3103
+ days?: number;
3104
+ }
3105
+ declare class PriceStatsResource {
3106
+ private readonly http;
3107
+ constructor(http: HttpClient);
3108
+ /** `GET /price-stats/daily`: daily average price history, filtered to matching product(s). */
3109
+ daily(params?: DailyPriceStatsParams): Promise<ListResponse<ItemDailyStats>>;
3110
+ /** `GET /price-stats/estimated-values`: current estimated market value, filtered to matching
3111
+ * product(s). */
3112
+ estimatedValues(params?: EstimatedValuesParams): Promise<ListResponse<ItemEstimatedValue>>;
3113
+ /** `GET /price-stats/top-products`: items ranked by shop availability (how many shops carry
3114
+ * them), not by price. */
3115
+ topProducts(params?: TopProductsParams): Promise<ListResponse<TopItem>>;
3116
+ /** `GET /price-stats/product/{id}`: daily price history, current estimate, and a variant-count
3117
+ * summary for one product. Premium. */
3118
+ product(idOrTechnicalName: string, options?: PremiumOptions): Promise<ItemStats>;
3119
+ /** `GET /price-stats/product/{id}/full`: everything `product()` has, plus the item's current
3120
+ * shop matches. Premium. */
3121
+ productFull(idOrTechnicalName: string, options?: PremiumOptions): Promise<ItemFullStats>;
3122
+ /** `GET /price-stats/product/{id}/daily`: daily price history for one product, with a
3123
+ * caller-chosen window. Premium. */
3124
+ productDaily(idOrTechnicalName: string, params?: ProductDailyStatsParams): Promise<ItemDailyStats>;
3125
+ /** `GET /price-stats/product/{id}/daily-last-30`: daily price history for the last 30 days
3126
+ * exactly (no window param, for callers that want a stable cache key). Premium. */
3127
+ productDailyLast30(idOrTechnicalName: string, options?: PremiumOptions): Promise<ItemDailyStats>;
3128
+ /** `GET /price-stats/product/{id}/estimated-value`: current estimated value only. Premium. */
3129
+ productEstimatedValue(idOrTechnicalName: string, options?: PremiumOptions): Promise<ItemEstimatedValue>;
3130
+ /** `GET /price-stats/product/{id}/by-variant`: price stats broken out per card condition/grade.
3131
+ * Premium. */
3132
+ productByVariant(idOrTechnicalName: string, params?: ProductByVariantParams): Promise<ItemVariantStats>;
3133
+ /** `GET /price-stats/product/{id}/daily-by-variant`: daily price history for one specific
3134
+ * condition/grade. `condition` is required for `cardType: 'loose'`; `gradingCompany` and `grade`
3135
+ * are required for `cardType: 'graded'`. Premium. */
3136
+ productDailyByVariant(idOrTechnicalName: string, params: ProductDailyByVariantParams): Promise<ItemVariantDailyStats>;
3137
+ }
3138
+
3139
+ interface ListProductsParams extends PaginationParams {
3140
+ /** Whitespace-separated tokens, each matched against the start of a word. */
3141
+ search?: string;
3142
+ }
3143
+ interface ProductMatchesParams extends PaginationParams {
3144
+ /** Keep only matches whose shop currently has stock. */
3145
+ inStock?: boolean;
3146
+ cardType?: CardType;
3147
+ condition?: ItemCondition;
3148
+ gradingCompany?: GradingCompany;
3149
+ grade?: number;
3150
+ }
3151
+ interface ProductReferencePricesParams {
3152
+ authToken?: string;
3153
+ /** Rolling window ending today, in days. Ignored when `from`/`to` are supplied. Default 90. */
3154
+ days?: number;
3155
+ /** `YYYY-MM-DD` */
3156
+ from?: string;
3157
+ /** `YYYY-MM-DD` */
3158
+ to?: string;
3159
+ provider?: ReferencePriceProvider;
3160
+ }
3161
+ interface ProductPricesParams extends PaginationParams {
3162
+ authToken?: string;
3163
+ }
3164
+ /** Sealed products: booster boxes, ETBs, tins, and the like. Single cards live under
3165
+ * `client.cards` instead. */
3166
+ declare class ProductsResource {
3167
+ private readonly http;
3168
+ constructor(http: HttpClient);
3169
+ /** `GET /product`: search or list sealed products. */
3170
+ list(params?: ListProductsParams): Promise<ListResponse<SealedProduct>>;
3171
+ /** `GET /product/{id}`: fetch one sealed product by its id or technicalName. */
3172
+ get(idOrTechnicalName: string): Promise<SealedProduct>;
3173
+ /** `GET /product/{id}/matches`: current shop listings matched to this product (latest per shop). */
3174
+ matches(idOrTechnicalName: string, params?: ProductMatchesParams): Promise<ItemShopMatches>;
3175
+ /** `GET /product/{id}/reference-prices`: Cardmarket/TCGplayer/Tradera price history. Premium. */
3176
+ referencePrices(idOrTechnicalName: string, params?: ProductReferencePricesParams): Promise<ItemReferencePrices>;
3177
+ /** `GET /product/{id}/prices`: individual marketplace sale records. Premium. */
3178
+ prices(idOrTechnicalName: string, params?: ProductPricesParams): Promise<ItemSoldPrices>;
3179
+ /** `GET /product/{id}/pricing/live`: computed fresh for this request, not read from the last
3180
+ * stats job. Premium. */
3181
+ livePricing(idOrTechnicalName: string, options?: PremiumOptions): Promise<LivePricingForItem>;
3182
+ }
3183
+
3184
+ interface ShopMatchStatsForProductParams {
3185
+ authToken?: string;
3186
+ /** `YYYY-MM-DD` */
3187
+ startDate?: string;
3188
+ /** `YYYY-MM-DD` */
3189
+ endDate?: string;
3190
+ /** Filter to one shop's technicalName. */
3191
+ shop?: string;
3192
+ }
3193
+ interface ShopMatchStatsForShopParams {
3194
+ authToken?: string;
3195
+ /** `YYYY-MM-DD` */
3196
+ startDate?: string;
3197
+ /** `YYYY-MM-DD` */
3198
+ endDate?: string;
3199
+ /** Maximum products to return. Default 100. */
3200
+ limit?: number;
3201
+ }
3202
+ interface CompareShopPricesParams {
3203
+ authToken?: string;
3204
+ /** Product/card id or technicalName. */
3205
+ productId: string;
3206
+ /** `YYYY-MM-DD`: defaults to the latest date with data. */
3207
+ date?: string;
3208
+ }
3209
+ /** Historical shop-vs-price data, distinct from `client.shopMatches` (which is the current/latest
3210
+ * match state). Everything here is premium. */
3211
+ declare class ShopMatchStatsResource {
3212
+ private readonly http;
3213
+ constructor(http: HttpClient);
3214
+ /** `GET /shop-match-stats/product/{productId}`: one product's price history, broken out per shop. */
3215
+ forProduct(productId: string, params?: ShopMatchStatsForProductParams): Promise<ItemShopPriceHistory>;
3216
+ /** `GET /shop-match-stats/shop/{shop}`: one shop's price history, broken out per product. */
3217
+ forShop(shop: string, params?: ShopMatchStatsForShopParams): Promise<ShopPriceHistoryList>;
3218
+ /** `GET /shop-match-stats/compare`: one product's price at every shop that carries it, as of
3219
+ * one date (defaults to the latest). */
3220
+ compare(params: CompareShopPricesParams): Promise<ItemPriceComparison>;
3221
+ }
3222
+
3223
+ interface ListShopMatchesParams extends PaginationParams {
3224
+ /** Filter to one shop's technicalName. */
3225
+ shop?: string;
3226
+ inStock?: boolean;
3227
+ /** Filter by whether the listing has been resolved to a catalog item. */
3228
+ linked?: boolean;
3229
+ }
3230
+ interface ShopMatchesForShopParams extends PaginationParams {
3231
+ inStock?: boolean;
3232
+ }
3233
+ /** Raw shop-to-catalog match data: what's currently listed where, independent of which item or
3234
+ * shop you start from. For "what does this card cost at each shop" or "what's in stock at this
3235
+ * shop", prefer `client.cards.matches()` / `client.products.matches()` /
3236
+ * `client.shopMatches.forShop()`. */
3237
+ declare class ShopMatchesResource {
3238
+ private readonly http;
3239
+ constructor(http: HttpClient);
3240
+ /** `GET /shop-matches`: every current match across every shop (latest record per url+shop). */
3241
+ list(params?: ListShopMatchesParams): Promise<ListResponse<ShopMatch>>;
3242
+ /** `GET /shop-matches/{shop}`: every current match at one shop (latest record per url). */
3243
+ forShop(technicalName: string, params?: ShopMatchesForShopParams): Promise<ShopMatchesForShop>;
3244
+ /** `GET /shop-matches/shops`: match counts per shop (based on latest records only). */
3245
+ shopStats(params?: PaginationParams): Promise<ListResponse<ShopMatchStats>>;
3246
+ }
3247
+
3248
+ interface SubmitShopUrlParams extends PremiumOptions {
3249
+ url: string;
3250
+ /** Shop technicalName. Auto-created if it doesn't exist yet. */
3251
+ shop: string;
3252
+ }
3253
+ interface AssignShopUrlProductParams extends PremiumOptions {
3254
+ /** Product/card id to link, or `null` to unlink and let auto-matching resume. */
3255
+ productId: string | null;
3256
+ }
3257
+ /** Lets a signed-in subscriber contribute to the catalog: submit a shop URL for scraping, or
3258
+ * manually correct which product/card a URL resolves to. Both premium, both mutating. */
3259
+ declare class ShopUrlsResource {
3260
+ private readonly http;
3261
+ constructor(http: HttpClient);
3262
+ /** `POST /shop-urls/submit`: submit a shop URL for scraping. */
3263
+ submit(params: SubmitShopUrlParams): Promise<ShopUrlMutationResult>;
3264
+ /** `PATCH /shop-urls/{id}/product`: manually assign (or clear) the product a shop URL resolves to. */
3265
+ assignProduct(shopUrlId: string, params: AssignShopUrlProductParams): Promise<ShopUrlMutationResult>;
3266
+ }
3267
+
3268
+ interface ListShopsParams {
3269
+ active?: boolean;
3270
+ }
3271
+ declare class ShopsResource {
3272
+ private readonly http;
3273
+ constructor(http: HttpClient);
3274
+ /** `GET /shops`: every tracked shop. Unwrapped to a plain array, nothing to paginate here. */
3275
+ list(params?: ListShopsParams): Promise<Shop[]>;
3276
+ /** `GET /shops/{id}`: fetch one shop by its id or technicalName. */
3277
+ get(idOrTechnicalName: string): Promise<Shop>;
3278
+ }
3279
+
3280
+ declare class StatsResource {
3281
+ private readonly http;
3282
+ constructor(http: HttpClient);
3283
+ /** `GET /stats`: platform-wide overview counts (shops, expansions, products, prices tracked). */
3284
+ platform(): Promise<PlatformStats>;
3285
+ }
3286
+
3287
+ declare const DEFAULT_BASE_URL = "https://api.tcgpriser.se";
3288
+ /** Local dev, self-hosting and testing overrides. Most integrations never touch these. */
3289
+ interface TcgPriserAdvancedOptions {
3290
+ /** Point at a local dev server or a self-hosted instance. Defaults to production. */
3291
+ baseUrl?: string;
3292
+ /** Extra headers sent on every request, e.g. a custom `User-Agent`. */
3293
+ headers?: Record<string, string>;
3294
+ /** Swap in a different `fetch` (older Node, testing, a proxying agent). Defaults to global `fetch`. */
3295
+ fetch?: typeof fetch;
3296
+ }
3297
+ interface TcgPriserOptions {
3298
+ /**
3299
+ * A signed-in subscriber's JWT. Only needed for premium methods (`cards.prices()`,
3300
+ * `priceStats.product()`, `bargains.search()` etc.); public methods work fine without it.
3301
+ * This client has no login flow of its own, so bring your own token.
3302
+ *
3303
+ * Every premium method also accepts its own `authToken` to override this per call. Useful when
3304
+ * one server-side client is shared across requests for several different signed-in users.
3305
+ */
3306
+ authToken?: string;
3307
+ /** Local dev / self-hosting / testing overrides. Leave unset unless you know you need it. */
3308
+ advanced?: TcgPriserAdvancedOptions;
3309
+ }
3310
+ /**
3311
+ * Client for the tcgpriser.se API: Pokémon TCG price data, catalog, shop matches and bargains for
3312
+ * shops tracked in Sweden.
3313
+ *
3314
+ * ```ts
3315
+ * import { TcgPriser } from 'tcgpriser';
3316
+ *
3317
+ * const tcgpriser = new TcgPriser();
3318
+ * const card = await tcgpriser.cards.get('mega-evolution-ascended-heroes-fezandipiti-ex');
3319
+ * console.log(card.retailPrice, card.lowestShopOffer?.shop.name);
3320
+ * ```
3321
+ *
3322
+ * That example needs no token. Most of the API is public (https://api.tcgpriser.se/docs). A
3323
+ * smaller set of premium methods (live pricing, per-condition history, shop comparison, bargain
3324
+ * search, shop-URL submission) need a subscriber's JWT (https://api.tcgpriser.se/premium-docs):
3325
+ *
3326
+ * ```ts
3327
+ * const tcgpriser = new TcgPriser(myJwt); // shorthand for { authToken: myJwt }
3328
+ * await tcgpriser.cards.livePricing('fezandipiti-ex');
3329
+ * ```
3330
+ */
3331
+ declare class TcgPriser {
3332
+ readonly cards: CardsResource;
3333
+ readonly products: ProductsResource;
3334
+ readonly expansions: ExpansionsResource;
3335
+ readonly shops: ShopsResource;
3336
+ readonly shopMatches: ShopMatchesResource;
3337
+ readonly shopMatchStats: ShopMatchStatsResource;
3338
+ readonly shopUrls: ShopUrlsResource;
3339
+ readonly priceStats: PriceStatsResource;
3340
+ readonly bargains: BargainsResource;
3341
+ readonly packRates: PackRatesResource;
3342
+ readonly stats: StatsResource;
3343
+ /**
3344
+ * @param optionsOrAuthToken A subscriber JWT (`new TcgPriser(myJwt)`), a full
3345
+ * `TcgPriserOptions` object, or omit it entirely for an anonymous, public-only client.
3346
+ */
3347
+ constructor(optionsOrAuthToken?: string | TcgPriserOptions);
3348
+ }
3349
+
3350
+ /** The stable error codes the API's `error.code` field can hold. */
3351
+ type TcgPriserErrorCode = 'validationFailed' | 'unauthorized' | 'forbidden' | 'notFound' | 'conflict' | 'readOnlyField' | 'rateLimited' | 'premiumRequired' | 'internalError'
3352
+ /** Response body wasn't the `{ error: { code, message } }` shape. Probably a proxy or gateway
3353
+ * error in front of the API. */
3354
+ | 'unknown';
3355
+ /** Thrown for any non-2xx response. Carries the parsed `{ code, message }` when the body matched
3356
+ * the API's error envelope, plus the raw status/body regardless so nothing gets lost. */
3357
+ declare class TcgPriserError extends Error {
3358
+ readonly statusCode: number;
3359
+ readonly statusText: string;
3360
+ readonly url: string;
3361
+ readonly code: TcgPriserErrorCode;
3362
+ readonly details: unknown;
3363
+ /** The raw response body, for debugging when `code`/`details` don't cover what you need. */
3364
+ readonly body: string;
3365
+ constructor(params: {
3366
+ statusCode: number;
3367
+ statusText: string;
3368
+ url: string;
3369
+ code: TcgPriserErrorCode;
3370
+ message: string;
3371
+ details?: unknown;
3372
+ body: string;
3373
+ });
3374
+ }
3375
+
3376
+ export { type AlternativeName, type AssignShopUrlProductParams, type Bargain, type BargainInfo, type BargainProductRef, type BargainReferenceSource, type BrandRef, type Card, type CardMatchesParams, type CardPricesParams, type CardReferencePricesParams, type CardType, type CardVariants, type CatalogItem, type CategoryRef, type CompareShopPricesParams, type CurrencyCode, DEFAULT_BASE_URL, type DailyPricePoint, type DailyPriceStatsParams, type EstimatedValue, type EstimatedValuesParams, type Expansion, type ExpansionContents, type ExpansionLivePricing, type ExpansionRef, type GradingCompany, type ItemCondition, type ItemDailyStats, type ItemEstimatedValue, type ItemFullStats, type ItemPriceComparison, type ItemRef, type ItemReferencePrices, type ItemShopMatch, type ItemShopMatches, type ItemShopPriceHistory, type ItemSoldPrices, type ItemStats, type ItemVariantDailyStats, type ItemVariantStats, type ListBargainsParams, type ListCardsParams, type ListProductsParams, type ListResponse, type ListShopMatchesParams, type ListShopsParams, type LivePricingDetail, type LivePricingForItem, type LowestShopOffer, type MatchedItemRef, type PackRate, type PackRateBucket, type PageMeta, type PaginationParams, type PlatformStats, type PremiumOptions, type PrintingLanguage, type ProductByVariantParams, type ProductDailyByVariantParams, type ProductDailyStatsParams, type ProductFilterParams, type ProductMatchesParams, type ProductPricesParams, type ProductReferencePricesParams, type ReferencePriceCardVariant, type ReferencePriceCurrencyMode, type ReferencePriceMetric, type ReferencePriceProvider, type ReferencePriceSeries, type ReferencePriceSeriesPoint, type ReferencePriceSnapshot, type ReferencePriceSnapshotsByProvider, type ReferencePriceSource, type ResourceId, type SealedProduct, type SearchBargainsParams, type Shop, type ShopMatch, type ShopMatchDelivery, type ShopMatchStats, type ShopMatchStatsForProductParams, type ShopMatchStatsForShopParams, type ShopMatchesForShop, type ShopMatchesForShopParams, type ShopPriceComparisonRow, type ShopPriceComparisonStats, type ShopPriceHistoryList, type ShopPricePoint, type ShopRef, type ShopSummary, type ShopUrl, type ShopUrlDiscoveredBy, type ShopUrlMutationResult, type ShopUrlStatus, type SoldPrice, type StatsItemRef, type SubmitShopUrlParams, TcgPriser, TcgPriserError, type TcgPriserErrorCode, type TcgPriserOptions, type Timestamp, type TopItem, type TopProductsParams, type VariantPriceStat, type VariantSelector, type VariantStatsSummary, type components };