tcgpriser 0.5.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +151 -51
- package/dist/index.cjs +64 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +244 -337
- package/dist/index.d.ts +244 -337
- package/dist/index.js +64 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -32,11 +32,16 @@ interface components {
|
|
|
32
32
|
AlternativeName: {
|
|
33
33
|
name: string;
|
|
34
34
|
shortName: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* @description ISO 639-1 language code the alias is written in (e.g. "sv"), possibly combined ("sv/da/no"). Null means unspecified.
|
|
37
|
+
* @example sv
|
|
38
|
+
*/
|
|
39
|
+
language: string | undefined;
|
|
35
40
|
};
|
|
36
41
|
ApiError: {
|
|
37
42
|
error: {
|
|
38
43
|
/** @enum {string} */
|
|
39
|
-
code: "validationFailed" | "unauthorized" | "forbidden" | "notFound" | "conflict" | "readOnlyField" | "rateLimited" | "premiumRequired" | "internalError";
|
|
44
|
+
code: "validationFailed" | "unauthorized" | "forbidden" | "notFound" | "conflict" | "readOnlyField" | "rateLimited" | "premiumRequired" | "businessRequired" | "creditsExhausted" | "internalError";
|
|
40
45
|
message: string;
|
|
41
46
|
details: unknown;
|
|
42
47
|
};
|
|
@@ -71,6 +76,10 @@ interface components {
|
|
|
71
76
|
kind: "sealed" | "card";
|
|
72
77
|
name: string;
|
|
73
78
|
technicalName: string;
|
|
79
|
+
/**
|
|
80
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
81
|
+
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
82
|
+
*/
|
|
74
83
|
imageUrl: string | undefined;
|
|
75
84
|
};
|
|
76
85
|
bargain: {
|
|
@@ -127,29 +136,11 @@ interface components {
|
|
|
127
136
|
alternativeNames: components["schemas"]["AlternativeName"][];
|
|
128
137
|
supportsMultipackPricing: boolean;
|
|
129
138
|
/**
|
|
130
|
-
* @description Absolute asset URL, or null when absent
|
|
139
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
131
140
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
132
141
|
*/
|
|
133
142
|
imageUrl: string | undefined;
|
|
134
|
-
|
|
135
|
-
* @description Cheapest current shop price, in SEK
|
|
136
|
-
* @example 149.5
|
|
137
|
-
*/
|
|
138
|
-
retailPrice: number | undefined;
|
|
139
|
-
/**
|
|
140
|
-
* @description Estimated market value, in SEK
|
|
141
|
-
* @example 149.5
|
|
142
|
-
*/
|
|
143
|
-
estimatedValue: number | undefined;
|
|
144
|
-
/** @description Active shops currently tracking this item */
|
|
145
|
-
shopCount: number;
|
|
146
|
-
/** @description Observations the estimate rests on */
|
|
147
|
-
pricingDataPoints: number;
|
|
148
|
-
/**
|
|
149
|
-
* Format: date-time
|
|
150
|
-
* @example 2026-07-15T12:03:29.322Z
|
|
151
|
-
*/
|
|
152
|
-
pricingUpdatedAt: string | undefined;
|
|
143
|
+
lockedFields: string[];
|
|
153
144
|
/**
|
|
154
145
|
* Format: date-time
|
|
155
146
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -179,33 +170,13 @@ interface components {
|
|
|
179
170
|
firstEdition: boolean;
|
|
180
171
|
wPromo: boolean;
|
|
181
172
|
};
|
|
182
|
-
|
|
173
|
+
CatalogItem: components["schemas"]["Card"] | components["schemas"]["Product"];
|
|
174
|
+
CatalogItemPricing: {
|
|
183
175
|
/**
|
|
184
176
|
* @description Resource identifier
|
|
185
177
|
* @example 6a577711abc1ce71383d3e10
|
|
186
178
|
*/
|
|
187
179
|
id: string;
|
|
188
|
-
name: string;
|
|
189
|
-
shortName: string | undefined;
|
|
190
|
-
technicalName: string;
|
|
191
|
-
brand: components["schemas"]["Brand"];
|
|
192
|
-
manufacturer: string;
|
|
193
|
-
modelNumber: string | undefined;
|
|
194
|
-
category: components["schemas"]["CategoryRef"] | undefined;
|
|
195
|
-
expansion: components["schemas"]["ExpansionRef"] | undefined;
|
|
196
|
-
/**
|
|
197
|
-
* @description Printing language of the item
|
|
198
|
-
* @example JPN
|
|
199
|
-
* @enum {string|null}
|
|
200
|
-
*/
|
|
201
|
-
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
202
|
-
alternativeNames: components["schemas"]["AlternativeName"][];
|
|
203
|
-
supportsMultipackPricing: boolean;
|
|
204
|
-
/**
|
|
205
|
-
* @description Absolute asset URL, or null when absent
|
|
206
|
-
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
207
|
-
*/
|
|
208
|
-
imageUrl: string | undefined;
|
|
209
180
|
/**
|
|
210
181
|
* @description Cheapest current shop price, in SEK
|
|
211
182
|
* @example 149.5
|
|
@@ -225,33 +196,11 @@ interface components {
|
|
|
225
196
|
* @example 2026-07-15T12:03:29.322Z
|
|
226
197
|
*/
|
|
227
198
|
pricingUpdatedAt: string | undefined;
|
|
228
|
-
/**
|
|
229
|
-
* Format: date-time
|
|
230
|
-
* @example 2026-07-15T12:03:29.322Z
|
|
231
|
-
*/
|
|
232
|
-
createdAt: string;
|
|
233
|
-
/**
|
|
234
|
-
* Format: date-time
|
|
235
|
-
* @example 2026-07-15T12:03:29.322Z
|
|
236
|
-
*/
|
|
237
|
-
updatedAt: string;
|
|
238
|
-
/** @enum {string} */
|
|
239
|
-
kind: "card";
|
|
240
|
-
/** @example 4/102 */
|
|
241
|
-
cardNumber: string;
|
|
242
|
-
/** @example Rare Holo */
|
|
243
|
-
rarity: string | undefined;
|
|
244
|
-
artist: string | undefined;
|
|
245
|
-
cardmarketId: string | undefined;
|
|
246
|
-
tcgplayerId: string | undefined;
|
|
247
|
-
variants: components["schemas"]["CardVariants"] | undefined;
|
|
248
|
-
prisjaktId: string | undefined;
|
|
249
199
|
lowestShopOffer: components["schemas"]["LowestShopOffer"] | undefined;
|
|
250
200
|
referencePriceSnapshotsByProvider: {
|
|
251
201
|
[key: string]: components["schemas"]["ReferencePriceSummary"];
|
|
252
202
|
};
|
|
253
203
|
};
|
|
254
|
-
CatalogItem: components["schemas"]["Card"] | components["schemas"]["Product"];
|
|
255
204
|
CatalogItemRef: {
|
|
256
205
|
/**
|
|
257
206
|
* @description Resource identifier
|
|
@@ -260,6 +209,14 @@ interface components {
|
|
|
260
209
|
id: string;
|
|
261
210
|
name: string;
|
|
262
211
|
};
|
|
212
|
+
CatalogSlug: {
|
|
213
|
+
technicalName: string;
|
|
214
|
+
/**
|
|
215
|
+
* Format: date-time
|
|
216
|
+
* @example 2026-07-15T12:03:29.322Z
|
|
217
|
+
*/
|
|
218
|
+
updatedAt: string;
|
|
219
|
+
};
|
|
263
220
|
CategoryRef: {
|
|
264
221
|
/**
|
|
265
222
|
* @description Resource identifier
|
|
@@ -320,17 +277,17 @@ interface components {
|
|
|
320
277
|
*/
|
|
321
278
|
releaseDate: string | undefined;
|
|
322
279
|
/**
|
|
323
|
-
* @description Absolute asset URL, or null when absent
|
|
280
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
324
281
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
325
282
|
*/
|
|
326
283
|
logoUrl: string | undefined;
|
|
327
284
|
/**
|
|
328
|
-
* @description Absolute asset URL, or null when absent
|
|
285
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
329
286
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
330
287
|
*/
|
|
331
288
|
symbolUrl: string | undefined;
|
|
332
289
|
/**
|
|
333
|
-
* @description Absolute asset URL, or null when absent
|
|
290
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
334
291
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
335
292
|
*/
|
|
336
293
|
imageUrl: string | undefined;
|
|
@@ -354,17 +311,6 @@ interface components {
|
|
|
354
311
|
*/
|
|
355
312
|
updatedAt: string;
|
|
356
313
|
};
|
|
357
|
-
ExpansionContents: {
|
|
358
|
-
expansion: components["schemas"]["ExpansionRef"];
|
|
359
|
-
cards: {
|
|
360
|
-
count: number;
|
|
361
|
-
items: components["schemas"]["CardWithPricing"][];
|
|
362
|
-
};
|
|
363
|
-
sealed: {
|
|
364
|
-
count: number;
|
|
365
|
-
items: components["schemas"]["ProductWithPricing"][];
|
|
366
|
-
};
|
|
367
|
-
};
|
|
368
314
|
ExpansionLivePricing: {
|
|
369
315
|
expansion: {
|
|
370
316
|
technicalName: string;
|
|
@@ -401,17 +347,17 @@ interface components {
|
|
|
401
347
|
*/
|
|
402
348
|
releaseDate: string | undefined;
|
|
403
349
|
/**
|
|
404
|
-
* @description Absolute asset URL, or null when absent
|
|
350
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
405
351
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
406
352
|
*/
|
|
407
353
|
logoUrl: string | undefined;
|
|
408
354
|
/**
|
|
409
|
-
* @description Absolute asset URL, or null when absent
|
|
355
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
410
356
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
411
357
|
*/
|
|
412
358
|
symbolUrl: string | undefined;
|
|
413
359
|
/**
|
|
414
|
-
* @description Absolute asset URL, or null when absent
|
|
360
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
415
361
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
416
362
|
*/
|
|
417
363
|
imageUrl: string | undefined;
|
|
@@ -563,6 +509,10 @@ interface components {
|
|
|
563
509
|
shortName: string | undefined;
|
|
564
510
|
technicalName: string;
|
|
565
511
|
cardNumber: string | undefined;
|
|
512
|
+
/**
|
|
513
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
514
|
+
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
515
|
+
*/
|
|
566
516
|
imageUrl: string | undefined;
|
|
567
517
|
language: string | undefined;
|
|
568
518
|
priceChartingId: string | undefined;
|
|
@@ -575,6 +525,36 @@ interface components {
|
|
|
575
525
|
id: string;
|
|
576
526
|
expansion: components["schemas"]["ExpansionRef"];
|
|
577
527
|
buckets: components["schemas"]["PackRateBucket"][];
|
|
528
|
+
/**
|
|
529
|
+
* @example [
|
|
530
|
+
* "code",
|
|
531
|
+
* "common",
|
|
532
|
+
* "common",
|
|
533
|
+
* "common",
|
|
534
|
+
* "uncommon",
|
|
535
|
+
* "uncommon",
|
|
536
|
+
* "uncommon",
|
|
537
|
+
* "reverse",
|
|
538
|
+
* "common",
|
|
539
|
+
* "hit",
|
|
540
|
+
* "energy"
|
|
541
|
+
* ]
|
|
542
|
+
*/
|
|
543
|
+
slotOrder: ("common" | "uncommon" | "reverse" | "hit" | "energy" | "code")[] | undefined;
|
|
544
|
+
source: {
|
|
545
|
+
/** @example pullrates.gg */
|
|
546
|
+
name: string;
|
|
547
|
+
/**
|
|
548
|
+
* Format: uri
|
|
549
|
+
* @description The specific page these rates were read from, if any
|
|
550
|
+
*/
|
|
551
|
+
url: string | undefined;
|
|
552
|
+
/**
|
|
553
|
+
* Format: date-time
|
|
554
|
+
* @example 2026-07-15T12:03:29.322Z
|
|
555
|
+
*/
|
|
556
|
+
fetchedAt: string | undefined;
|
|
557
|
+
} | undefined;
|
|
578
558
|
/**
|
|
579
559
|
* Format: date-time
|
|
580
560
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -632,29 +612,11 @@ interface components {
|
|
|
632
612
|
alternativeNames: components["schemas"]["AlternativeName"][];
|
|
633
613
|
supportsMultipackPricing: boolean;
|
|
634
614
|
/**
|
|
635
|
-
* @description Absolute asset URL, or null when absent
|
|
615
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
636
616
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
637
617
|
*/
|
|
638
618
|
imageUrl: string | undefined;
|
|
639
|
-
|
|
640
|
-
* @description Cheapest current shop price, in SEK
|
|
641
|
-
* @example 149.5
|
|
642
|
-
*/
|
|
643
|
-
retailPrice: number | undefined;
|
|
644
|
-
/**
|
|
645
|
-
* @description Estimated market value, in SEK
|
|
646
|
-
* @example 149.5
|
|
647
|
-
*/
|
|
648
|
-
estimatedValue: number | undefined;
|
|
649
|
-
/** @description Active shops currently tracking this item */
|
|
650
|
-
shopCount: number;
|
|
651
|
-
/** @description Observations the estimate rests on */
|
|
652
|
-
pricingDataPoints: number;
|
|
653
|
-
/**
|
|
654
|
-
* Format: date-time
|
|
655
|
-
* @example 2026-07-15T12:03:29.322Z
|
|
656
|
-
*/
|
|
657
|
-
pricingUpdatedAt: string | undefined;
|
|
619
|
+
lockedFields: string[];
|
|
658
620
|
/**
|
|
659
621
|
* Format: date-time
|
|
660
622
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -673,77 +635,9 @@ interface components {
|
|
|
673
635
|
priceChartingId: string | undefined;
|
|
674
636
|
prisjaktId: string | undefined;
|
|
675
637
|
};
|
|
676
|
-
ProductWithPricing: {
|
|
677
|
-
/**
|
|
678
|
-
* @description Resource identifier
|
|
679
|
-
* @example 6a577711abc1ce71383d3e10
|
|
680
|
-
*/
|
|
681
|
-
id: string;
|
|
682
|
-
name: string;
|
|
683
|
-
shortName: string | undefined;
|
|
684
|
-
technicalName: string;
|
|
685
|
-
brand: components["schemas"]["Brand"];
|
|
686
|
-
manufacturer: string;
|
|
687
|
-
modelNumber: string | undefined;
|
|
688
|
-
category: components["schemas"]["CategoryRef"] | undefined;
|
|
689
|
-
expansion: components["schemas"]["ExpansionRef"] | undefined;
|
|
690
|
-
/**
|
|
691
|
-
* @description Printing language of the item
|
|
692
|
-
* @example JPN
|
|
693
|
-
* @enum {string|null}
|
|
694
|
-
*/
|
|
695
|
-
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
696
|
-
alternativeNames: components["schemas"]["AlternativeName"][];
|
|
697
|
-
supportsMultipackPricing: boolean;
|
|
698
|
-
/**
|
|
699
|
-
* @description Absolute asset URL, or null when absent
|
|
700
|
-
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
701
|
-
*/
|
|
702
|
-
imageUrl: string | undefined;
|
|
703
|
-
/**
|
|
704
|
-
* @description Cheapest current shop price, in SEK
|
|
705
|
-
* @example 149.5
|
|
706
|
-
*/
|
|
707
|
-
retailPrice: number | undefined;
|
|
708
|
-
/**
|
|
709
|
-
* @description Estimated market value, in SEK
|
|
710
|
-
* @example 149.5
|
|
711
|
-
*/
|
|
712
|
-
estimatedValue: number | undefined;
|
|
713
|
-
/** @description Active shops currently tracking this item */
|
|
714
|
-
shopCount: number;
|
|
715
|
-
/** @description Observations the estimate rests on */
|
|
716
|
-
pricingDataPoints: number;
|
|
717
|
-
/**
|
|
718
|
-
* Format: date-time
|
|
719
|
-
* @example 2026-07-15T12:03:29.322Z
|
|
720
|
-
*/
|
|
721
|
-
pricingUpdatedAt: string | undefined;
|
|
722
|
-
/**
|
|
723
|
-
* Format: date-time
|
|
724
|
-
* @example 2026-07-15T12:03:29.322Z
|
|
725
|
-
*/
|
|
726
|
-
createdAt: string;
|
|
727
|
-
/**
|
|
728
|
-
* Format: date-time
|
|
729
|
-
* @example 2026-07-15T12:03:29.322Z
|
|
730
|
-
*/
|
|
731
|
-
updatedAt: string;
|
|
732
|
-
/** @enum {string} */
|
|
733
|
-
kind: "sealed";
|
|
734
|
-
upc: string | undefined;
|
|
735
|
-
asin: string | undefined;
|
|
736
|
-
epid: string | undefined;
|
|
737
|
-
priceChartingId: string | undefined;
|
|
738
|
-
prisjaktId: string | undefined;
|
|
739
|
-
lowestShopOffer: components["schemas"]["LowestShopOffer"] | undefined;
|
|
740
|
-
referencePriceSnapshotsByProvider: {
|
|
741
|
-
[key: string]: components["schemas"]["ReferencePriceSummary"];
|
|
742
|
-
};
|
|
743
|
-
};
|
|
744
638
|
ReferencePriceSeries: {
|
|
745
639
|
/** @enum {string} */
|
|
746
|
-
source: "tcgdex" | "cmapi" | "tradera";
|
|
640
|
+
source: "tcgdex" | "cmapi" | "tradera" | "pokemonpricetracker";
|
|
747
641
|
/** @enum {string} */
|
|
748
642
|
provider: "cardmarket" | "tcgplayer" | "ebay" | "tradera";
|
|
749
643
|
/** @enum {string|null} */
|
|
@@ -798,7 +692,7 @@ interface components {
|
|
|
798
692
|
technicalName: string;
|
|
799
693
|
websiteUrl: string | undefined;
|
|
800
694
|
/**
|
|
801
|
-
* @description Absolute asset URL, or null when absent
|
|
695
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
802
696
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
803
697
|
*/
|
|
804
698
|
logoUrl: string | undefined;
|
|
@@ -1050,6 +944,10 @@ interface components {
|
|
|
1050
944
|
ShopSummary: {
|
|
1051
945
|
technicalName: string;
|
|
1052
946
|
name: string;
|
|
947
|
+
/**
|
|
948
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
949
|
+
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
950
|
+
*/
|
|
1053
951
|
logoUrl: string | undefined;
|
|
1054
952
|
websiteUrl: string | undefined;
|
|
1055
953
|
description: string | undefined;
|
|
@@ -1112,7 +1010,7 @@ interface components {
|
|
|
1112
1010
|
shopUrl: components["schemas"]["ShopUrl"];
|
|
1113
1011
|
};
|
|
1114
1012
|
/** @enum {string} */
|
|
1115
|
-
ShopUrlStatus: "pending" | "active" | "invalid" | "rejected" | "sanityRejected";
|
|
1013
|
+
ShopUrlStatus: "pending" | "active" | "invalid" | "rejected" | "sanityRejected" | "wrongBrand";
|
|
1116
1014
|
SoldPrice: {
|
|
1117
1015
|
/**
|
|
1118
1016
|
* @description Resource identifier
|
|
@@ -1193,9 +1091,9 @@ interface components {
|
|
|
1193
1091
|
* not silent drift.
|
|
1194
1092
|
*
|
|
1195
1093
|
* The API registers `Brand`, `CategoryRef`, `ExpansionRef`, `ShopRef` etc. as their own named
|
|
1196
|
-
* components and `$ref`s them wherever they're embedded (in `
|
|
1197
|
-
*
|
|
1198
|
-
*
|
|
1094
|
+
* components and `$ref`s them wherever they're embedded (in `Card`, `Product`, `PackRate`, the
|
|
1095
|
+
* shop-match schemas, ...), so those are pulled by name directly. `CardSchema` is still the
|
|
1096
|
+
* extraction source for the handful of shapes that aren't independently registered
|
|
1199
1097
|
* (`lowestShopOffer`'s `bargain`, the reference-price snapshot map).
|
|
1200
1098
|
*/
|
|
1201
1099
|
type CardSchema = {
|
|
@@ -1221,29 +1119,11 @@ type CardSchema = {
|
|
|
1221
1119
|
alternativeNames: AlternativeName[];
|
|
1222
1120
|
supportsMultipackPricing: boolean;
|
|
1223
1121
|
/**
|
|
1224
|
-
* @description Absolute asset URL, or null when absent
|
|
1122
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
1225
1123
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1226
1124
|
*/
|
|
1227
1125
|
imageUrl: string | undefined;
|
|
1228
|
-
|
|
1229
|
-
* @description Cheapest current shop price, in SEK
|
|
1230
|
-
* @example 149.5
|
|
1231
|
-
*/
|
|
1232
|
-
retailPrice: number | undefined;
|
|
1233
|
-
/**
|
|
1234
|
-
* @description Estimated market value, in SEK
|
|
1235
|
-
* @example 149.5
|
|
1236
|
-
*/
|
|
1237
|
-
estimatedValue: number | undefined;
|
|
1238
|
-
/** @description Active shops currently tracking this item */
|
|
1239
|
-
shopCount: number;
|
|
1240
|
-
/** @description Observations the estimate rests on */
|
|
1241
|
-
pricingDataPoints: number;
|
|
1242
|
-
/**
|
|
1243
|
-
* Format: date-time
|
|
1244
|
-
* @example 2026-07-15T12:03:29.322Z
|
|
1245
|
-
*/
|
|
1246
|
-
pricingUpdatedAt: string | undefined;
|
|
1126
|
+
lockedFields: string[];
|
|
1247
1127
|
/**
|
|
1248
1128
|
* Format: date-time
|
|
1249
1129
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -1265,10 +1145,6 @@ type CardSchema = {
|
|
|
1265
1145
|
tcgplayerId: string | undefined;
|
|
1266
1146
|
variants: CardVariants | undefined;
|
|
1267
1147
|
prisjaktId: string | undefined;
|
|
1268
|
-
lowestShopOffer: LowestShopOfferSchema | undefined;
|
|
1269
|
-
referencePriceSnapshotsByProvider: {
|
|
1270
|
-
[key: string]: ReferencePriceSnapshot;
|
|
1271
|
-
};
|
|
1272
1148
|
};
|
|
1273
1149
|
type LowestShopOfferSchema = {
|
|
1274
1150
|
shop: ShopRef;
|
|
@@ -1330,6 +1206,11 @@ interface PaginationParams {
|
|
|
1330
1206
|
type AlternativeName = {
|
|
1331
1207
|
name: string;
|
|
1332
1208
|
shortName: string | undefined;
|
|
1209
|
+
/**
|
|
1210
|
+
* @description ISO 639-1 language code the alias is written in (e.g. "sv"), possibly combined ("sv/da/no"). Null means unspecified.
|
|
1211
|
+
* @example sv
|
|
1212
|
+
*/
|
|
1213
|
+
language: string | undefined;
|
|
1333
1214
|
};
|
|
1334
1215
|
type BrandRef = {
|
|
1335
1216
|
/**
|
|
@@ -1395,17 +1276,17 @@ type ExpansionRef = {
|
|
|
1395
1276
|
*/
|
|
1396
1277
|
releaseDate: string | undefined;
|
|
1397
1278
|
/**
|
|
1398
|
-
* @description Absolute asset URL, or null when absent
|
|
1279
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
1399
1280
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1400
1281
|
*/
|
|
1401
1282
|
logoUrl: string | undefined;
|
|
1402
1283
|
/**
|
|
1403
|
-
* @description Absolute asset URL, or null when absent
|
|
1284
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
1404
1285
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1405
1286
|
*/
|
|
1406
1287
|
symbolUrl: string | undefined;
|
|
1407
1288
|
/**
|
|
1408
|
-
* @description Absolute asset URL, or null when absent
|
|
1289
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
1409
1290
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1410
1291
|
*/
|
|
1411
1292
|
imageUrl: string | undefined;
|
|
@@ -1451,8 +1332,9 @@ type ReferencePriceProvider = "tradera" | "cardmarket" | "tcgplayer" | "ebay";
|
|
|
1451
1332
|
/** Keyed by provider, at most one snapshot per provider. */
|
|
1452
1333
|
type ReferencePriceSnapshotsByProvider = Partial<Record<ReferencePriceProvider, ReferencePriceSnapshot>>;
|
|
1453
1334
|
/** A card, as returned by `client.cards.get()` / `client.cards.list()`, and as embedded in
|
|
1454
|
-
* `client.expansions.
|
|
1455
|
-
* makes `CatalogItem` (below) discriminate cleanly.
|
|
1335
|
+
* `client.expansions.cards()`. `kind: 'card'` is a literal on the generated type, which is what
|
|
1336
|
+
* makes `CatalogItem` (below) discriminate cleanly. Content only — no pricing fields; fetch those
|
|
1337
|
+
* separately via `client.cards.pricing()` / `.pricingBatch()`. */
|
|
1456
1338
|
type Card = {
|
|
1457
1339
|
/**
|
|
1458
1340
|
* @description Resource identifier
|
|
@@ -1476,29 +1358,11 @@ type Card = {
|
|
|
1476
1358
|
alternativeNames: AlternativeName[];
|
|
1477
1359
|
supportsMultipackPricing: boolean;
|
|
1478
1360
|
/**
|
|
1479
|
-
* @description Absolute asset URL, or null when absent
|
|
1361
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
1480
1362
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1481
1363
|
*/
|
|
1482
1364
|
imageUrl: string | undefined;
|
|
1483
|
-
|
|
1484
|
-
* @description Cheapest current shop price, in SEK
|
|
1485
|
-
* @example 149.5
|
|
1486
|
-
*/
|
|
1487
|
-
retailPrice: number | undefined;
|
|
1488
|
-
/**
|
|
1489
|
-
* @description Estimated market value, in SEK
|
|
1490
|
-
* @example 149.5
|
|
1491
|
-
*/
|
|
1492
|
-
estimatedValue: number | undefined;
|
|
1493
|
-
/** @description Active shops currently tracking this item */
|
|
1494
|
-
shopCount: number;
|
|
1495
|
-
/** @description Observations the estimate rests on */
|
|
1496
|
-
pricingDataPoints: number;
|
|
1497
|
-
/**
|
|
1498
|
-
* Format: date-time
|
|
1499
|
-
* @example 2026-07-15T12:03:29.322Z
|
|
1500
|
-
*/
|
|
1501
|
-
pricingUpdatedAt: string | undefined;
|
|
1365
|
+
lockedFields: string[];
|
|
1502
1366
|
/**
|
|
1503
1367
|
* Format: date-time
|
|
1504
1368
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -1520,13 +1384,11 @@ type Card = {
|
|
|
1520
1384
|
tcgplayerId: string | undefined;
|
|
1521
1385
|
variants: CardVariants | undefined;
|
|
1522
1386
|
prisjaktId: string | undefined;
|
|
1523
|
-
lowestShopOffer: LowestShopOfferSchema | undefined;
|
|
1524
|
-
referencePriceSnapshotsByProvider: {
|
|
1525
|
-
[key: string]: ReferencePriceSnapshot;
|
|
1526
|
-
};
|
|
1527
1387
|
};
|
|
1528
1388
|
/** A sealed product (booster box, ETB, tin, ...), as returned by `client.products.get()` /
|
|
1529
|
-
* `client.products.list()
|
|
1389
|
+
* `client.products.list()`, and as embedded in `client.expansions.sealedProducts()`. `kind:
|
|
1390
|
+
* 'sealed'` is a literal on the generated type. Content only — no pricing fields; fetch those
|
|
1391
|
+
* separately via `client.products.pricing()` / `.pricingBatch()`. */
|
|
1530
1392
|
type SealedProduct = {
|
|
1531
1393
|
/**
|
|
1532
1394
|
* @description Resource identifier
|
|
@@ -1550,10 +1412,41 @@ type SealedProduct = {
|
|
|
1550
1412
|
alternativeNames: AlternativeName[];
|
|
1551
1413
|
supportsMultipackPricing: boolean;
|
|
1552
1414
|
/**
|
|
1553
|
-
* @description Absolute asset URL, or null when absent
|
|
1415
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
1554
1416
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1555
1417
|
*/
|
|
1556
1418
|
imageUrl: string | undefined;
|
|
1419
|
+
lockedFields: string[];
|
|
1420
|
+
/**
|
|
1421
|
+
* Format: date-time
|
|
1422
|
+
* @example 2026-07-15T12:03:29.322Z
|
|
1423
|
+
*/
|
|
1424
|
+
createdAt: string;
|
|
1425
|
+
/**
|
|
1426
|
+
* Format: date-time
|
|
1427
|
+
* @example 2026-07-15T12:03:29.322Z
|
|
1428
|
+
*/
|
|
1429
|
+
updatedAt: string;
|
|
1430
|
+
/** @enum {string} */
|
|
1431
|
+
kind: "sealed";
|
|
1432
|
+
upc: string | undefined;
|
|
1433
|
+
asin: string | undefined;
|
|
1434
|
+
epid: string | undefined;
|
|
1435
|
+
priceChartingId: string | undefined;
|
|
1436
|
+
prisjaktId: string | undefined;
|
|
1437
|
+
};
|
|
1438
|
+
/** A card or sealed product, discriminated on `kind`. */
|
|
1439
|
+
type CatalogItem = Card | SealedProduct;
|
|
1440
|
+
/** Pricing for one catalog item (card or sealed product) — `retailPrice`, `estimatedValue`,
|
|
1441
|
+
* `lowestShopOffer`, `referencePriceSnapshotsByProvider` — refreshed once a day by the nightly
|
|
1442
|
+
* pricing/scraper jobs, not embedded in `Card`/`SealedProduct` above. Returned by
|
|
1443
|
+
* `client.cards.pricing()` / `.pricingBatch()` and their `client.products` equivalents. */
|
|
1444
|
+
type CatalogItemPricing = {
|
|
1445
|
+
/**
|
|
1446
|
+
* @description Resource identifier
|
|
1447
|
+
* @example 6a577711abc1ce71383d3e10
|
|
1448
|
+
*/
|
|
1449
|
+
id: string;
|
|
1557
1450
|
/**
|
|
1558
1451
|
* @description Cheapest current shop price, in SEK
|
|
1559
1452
|
* @example 149.5
|
|
@@ -1573,30 +1466,11 @@ type SealedProduct = {
|
|
|
1573
1466
|
* @example 2026-07-15T12:03:29.322Z
|
|
1574
1467
|
*/
|
|
1575
1468
|
pricingUpdatedAt: string | undefined;
|
|
1576
|
-
/**
|
|
1577
|
-
* Format: date-time
|
|
1578
|
-
* @example 2026-07-15T12:03:29.322Z
|
|
1579
|
-
*/
|
|
1580
|
-
createdAt: string;
|
|
1581
|
-
/**
|
|
1582
|
-
* Format: date-time
|
|
1583
|
-
* @example 2026-07-15T12:03:29.322Z
|
|
1584
|
-
*/
|
|
1585
|
-
updatedAt: string;
|
|
1586
|
-
/** @enum {string} */
|
|
1587
|
-
kind: "sealed";
|
|
1588
|
-
upc: string | undefined;
|
|
1589
|
-
asin: string | undefined;
|
|
1590
|
-
epid: string | undefined;
|
|
1591
|
-
priceChartingId: string | undefined;
|
|
1592
|
-
prisjaktId: string | undefined;
|
|
1593
1469
|
lowestShopOffer: LowestShopOfferSchema | undefined;
|
|
1594
1470
|
referencePriceSnapshotsByProvider: {
|
|
1595
1471
|
[key: string]: ReferencePriceSnapshot;
|
|
1596
1472
|
};
|
|
1597
1473
|
};
|
|
1598
|
-
/** A card or sealed product, discriminated on `kind`. */
|
|
1599
|
-
type CatalogItem = Card | SealedProduct;
|
|
1600
1474
|
type CardVariants = {
|
|
1601
1475
|
normal: boolean;
|
|
1602
1476
|
holo: boolean;
|
|
@@ -1618,6 +1492,10 @@ type MatchedItemRef = {
|
|
|
1618
1492
|
shortName: string | undefined;
|
|
1619
1493
|
technicalName: string;
|
|
1620
1494
|
cardNumber: string | undefined;
|
|
1495
|
+
/**
|
|
1496
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
1497
|
+
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1498
|
+
*/
|
|
1621
1499
|
imageUrl: string | undefined;
|
|
1622
1500
|
language: string | undefined;
|
|
1623
1501
|
priceChartingId: string | undefined;
|
|
@@ -1650,6 +1528,10 @@ type Bargain = {
|
|
|
1650
1528
|
kind: "sealed" | "card";
|
|
1651
1529
|
name: string;
|
|
1652
1530
|
technicalName: string;
|
|
1531
|
+
/**
|
|
1532
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
1533
|
+
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1534
|
+
*/
|
|
1653
1535
|
imageUrl: string | undefined;
|
|
1654
1536
|
};
|
|
1655
1537
|
bargain: {
|
|
@@ -1668,11 +1550,16 @@ type BargainProductRef = {
|
|
|
1668
1550
|
kind: "sealed" | "card";
|
|
1669
1551
|
name: string;
|
|
1670
1552
|
technicalName: string;
|
|
1553
|
+
/**
|
|
1554
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
1555
|
+
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1556
|
+
*/
|
|
1671
1557
|
imageUrl: string | undefined;
|
|
1672
1558
|
};
|
|
1673
|
-
/** A set/expansion, as returned by `client.expansions.list()`. This is the full record
|
|
1674
|
-
* `
|
|
1675
|
-
* `
|
|
1559
|
+
/** A set/expansion, as returned by `client.expansions.list()`. This is the full record, including
|
|
1560
|
+
* the `sealedCount`/`cardCount`/`productCount` aggregation `list()` runs. The `expansion` field
|
|
1561
|
+
* embedded on a card or product, and the result of `client.expansions.get()`, are the smaller
|
|
1562
|
+
* `ExpansionRef` from `types/common.ts` instead. */
|
|
1676
1563
|
type Expansion = {
|
|
1677
1564
|
/**
|
|
1678
1565
|
* @description Resource identifier
|
|
@@ -1703,17 +1590,17 @@ type Expansion = {
|
|
|
1703
1590
|
*/
|
|
1704
1591
|
releaseDate: string | undefined;
|
|
1705
1592
|
/**
|
|
1706
|
-
* @description Absolute asset URL, or null when absent
|
|
1593
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
1707
1594
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1708
1595
|
*/
|
|
1709
1596
|
logoUrl: string | undefined;
|
|
1710
1597
|
/**
|
|
1711
|
-
* @description Absolute asset URL, or null when absent
|
|
1598
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
1712
1599
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1713
1600
|
*/
|
|
1714
1601
|
symbolUrl: string | undefined;
|
|
1715
1602
|
/**
|
|
1716
|
-
* @description Absolute asset URL, or null when absent
|
|
1603
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
1717
1604
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1718
1605
|
*/
|
|
1719
1606
|
imageUrl: string | undefined;
|
|
@@ -1737,26 +1624,6 @@ type Expansion = {
|
|
|
1737
1624
|
*/
|
|
1738
1625
|
updatedAt: string;
|
|
1739
1626
|
};
|
|
1740
|
-
/** Response of `client.expansions.products()`: everything in one expansion, cards and sealed
|
|
1741
|
-
* products kept as separate `cards`/`sealed` groups rather than merged into one mixed list. */
|
|
1742
|
-
type ExpansionContents = {
|
|
1743
|
-
expansion: ExpansionRef;
|
|
1744
|
-
cards: {
|
|
1745
|
-
count: number;
|
|
1746
|
-
items: CardSchema[];
|
|
1747
|
-
};
|
|
1748
|
-
sealed: {
|
|
1749
|
-
count: number;
|
|
1750
|
-
items: SealedProduct[];
|
|
1751
|
-
};
|
|
1752
|
-
};
|
|
1753
|
-
/** One card as embedded in `client.expansions.products()`'s `cards` group. `$ref`s `CardWithPricing`
|
|
1754
|
-
* on the wire, so this is literally `Card` — kept as its own name since a card found through an
|
|
1755
|
-
* expansion's contents reads more naturally as `ExpansionCard` at the call site. */
|
|
1756
|
-
type ExpansionCard = Card;
|
|
1757
|
-
/** One sealed product as embedded in `client.expansions.products()`'s `sealed` group. Literally
|
|
1758
|
-
* `SealedProduct`, same reasoning as `ExpansionCard`. */
|
|
1759
|
-
type ExpansionSealedProduct = SealedProduct;
|
|
1760
1627
|
type ShopMatchWithItemSchema = {
|
|
1761
1628
|
/**
|
|
1762
1629
|
* @description Resource identifier
|
|
@@ -1877,7 +1744,7 @@ type Shop = {
|
|
|
1877
1744
|
technicalName: string;
|
|
1878
1745
|
websiteUrl: string | undefined;
|
|
1879
1746
|
/**
|
|
1880
|
-
* @description Absolute asset URL, or null when absent
|
|
1747
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
1881
1748
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1882
1749
|
*/
|
|
1883
1750
|
logoUrl: string | undefined;
|
|
@@ -1926,6 +1793,10 @@ type Shop = {
|
|
|
1926
1793
|
type ShopSummary = {
|
|
1927
1794
|
technicalName: string;
|
|
1928
1795
|
name: string;
|
|
1796
|
+
/**
|
|
1797
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
1798
|
+
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1799
|
+
*/
|
|
1929
1800
|
logoUrl: string | undefined;
|
|
1930
1801
|
websiteUrl: string | undefined;
|
|
1931
1802
|
description: string | undefined;
|
|
@@ -2063,6 +1934,36 @@ type PackRate = {
|
|
|
2063
1934
|
id: string;
|
|
2064
1935
|
expansion: ExpansionRef;
|
|
2065
1936
|
buckets: PackRateBucket[];
|
|
1937
|
+
/**
|
|
1938
|
+
* @example [
|
|
1939
|
+
* "code",
|
|
1940
|
+
* "common",
|
|
1941
|
+
* "common",
|
|
1942
|
+
* "common",
|
|
1943
|
+
* "uncommon",
|
|
1944
|
+
* "uncommon",
|
|
1945
|
+
* "uncommon",
|
|
1946
|
+
* "reverse",
|
|
1947
|
+
* "common",
|
|
1948
|
+
* "hit",
|
|
1949
|
+
* "energy"
|
|
1950
|
+
* ]
|
|
1951
|
+
*/
|
|
1952
|
+
slotOrder: ("common" | "uncommon" | "reverse" | "hit" | "energy" | "code")[] | undefined;
|
|
1953
|
+
source: {
|
|
1954
|
+
/** @example pullrates.gg */
|
|
1955
|
+
name: string;
|
|
1956
|
+
/**
|
|
1957
|
+
* Format: uri
|
|
1958
|
+
* @description The specific page these rates were read from, if any
|
|
1959
|
+
*/
|
|
1960
|
+
url: string | undefined;
|
|
1961
|
+
/**
|
|
1962
|
+
* Format: date-time
|
|
1963
|
+
* @example 2026-07-15T12:03:29.322Z
|
|
1964
|
+
*/
|
|
1965
|
+
fetchedAt: string | undefined;
|
|
1966
|
+
} | undefined;
|
|
2066
1967
|
/**
|
|
2067
1968
|
* Format: date-time
|
|
2068
1969
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -2074,6 +1975,8 @@ type PackRate = {
|
|
|
2074
1975
|
*/
|
|
2075
1976
|
updatedAt: string;
|
|
2076
1977
|
};
|
|
1978
|
+
/** One of the 9 fixed slots in a simulated pack (4 common, 3 uncommon, 1 reverse, 1 hit). */
|
|
1979
|
+
type PackSlot = "common" | "uncommon" | "reverse" | "hit" | "energy" | "code";
|
|
2077
1980
|
/** Platform-wide overview counts, returned by `client.stats.platform()`. */
|
|
2078
1981
|
type PlatformStats = {
|
|
2079
1982
|
shopCount: number;
|
|
@@ -2083,7 +1986,7 @@ type PlatformStats = {
|
|
|
2083
1986
|
priceCount: number;
|
|
2084
1987
|
};
|
|
2085
1988
|
/**
|
|
2086
|
-
* Types for the premium tier: endpoints that need a
|
|
1989
|
+
* Types for the premium tier: endpoints that need a subscriber's API token (see
|
|
2087
1990
|
* `TcgPriserOptions.authToken`, or the `authToken` field on each premium method's params). Split
|
|
2088
1991
|
* out from the public-tier types because none of these mean anything without a token: without one,
|
|
2089
1992
|
* the API just answers `403 premiumRequired`.
|
|
@@ -2092,7 +1995,7 @@ type PlatformStats = {
|
|
|
2092
1995
|
*/
|
|
2093
1996
|
type ReferencePriceSeries = {
|
|
2094
1997
|
/** @enum {string} */
|
|
2095
|
-
source: "tcgdex" | "cmapi" | "tradera";
|
|
1998
|
+
source: "tcgdex" | "cmapi" | "tradera" | "pokemonpricetracker";
|
|
2096
1999
|
/** @enum {string} */
|
|
2097
2000
|
provider: "cardmarket" | "tcgplayer" | "ebay" | "tradera";
|
|
2098
2001
|
/** @enum {string|null} */
|
|
@@ -2114,8 +2017,8 @@ type ReferencePriceSeriesPoint = {
|
|
|
2114
2017
|
snapshotDate: string;
|
|
2115
2018
|
price: number;
|
|
2116
2019
|
};
|
|
2117
|
-
type ReferencePriceSource = "tradera" | "tcgdex" | "cmapi";
|
|
2118
|
-
type ReferencePriceCardVariant = "
|
|
2020
|
+
type ReferencePriceSource = "tradera" | "tcgdex" | "cmapi" | "pokemonpricetracker";
|
|
2021
|
+
type ReferencePriceCardVariant = "reverse" | "normal" | "holo";
|
|
2119
2022
|
type ReferencePriceMetric = "price" | "low" | "mid" | "high" | "avg" | "avg1" | "avg7" | "avg30" | "directLow";
|
|
2120
2023
|
type ReferencePriceCurrencyMode = "native" | "sek";
|
|
2121
2024
|
/** Response of `client.cards.referencePrices()` / `client.products.referencePrices()`.
|
|
@@ -2233,29 +2136,11 @@ type StatsItemRef = {
|
|
|
2233
2136
|
alternativeNames: AlternativeName[];
|
|
2234
2137
|
supportsMultipackPricing: boolean;
|
|
2235
2138
|
/**
|
|
2236
|
-
* @description Absolute asset URL, or null when absent
|
|
2139
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
2237
2140
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
2238
2141
|
*/
|
|
2239
2142
|
imageUrl: string | undefined;
|
|
2240
|
-
|
|
2241
|
-
* @description Cheapest current shop price, in SEK
|
|
2242
|
-
* @example 149.5
|
|
2243
|
-
*/
|
|
2244
|
-
retailPrice: number | undefined;
|
|
2245
|
-
/**
|
|
2246
|
-
* @description Estimated market value, in SEK
|
|
2247
|
-
* @example 149.5
|
|
2248
|
-
*/
|
|
2249
|
-
estimatedValue: number | undefined;
|
|
2250
|
-
/** @description Active shops currently tracking this item */
|
|
2251
|
-
shopCount: number;
|
|
2252
|
-
/** @description Observations the estimate rests on */
|
|
2253
|
-
pricingDataPoints: number;
|
|
2254
|
-
/**
|
|
2255
|
-
* Format: date-time
|
|
2256
|
-
* @example 2026-07-15T12:03:29.322Z
|
|
2257
|
-
*/
|
|
2258
|
-
pricingUpdatedAt: string | undefined;
|
|
2143
|
+
lockedFields: string[];
|
|
2259
2144
|
/**
|
|
2260
2145
|
* Format: date-time
|
|
2261
2146
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -2300,29 +2185,11 @@ type StatsItemRef = {
|
|
|
2300
2185
|
alternativeNames: AlternativeName[];
|
|
2301
2186
|
supportsMultipackPricing: boolean;
|
|
2302
2187
|
/**
|
|
2303
|
-
* @description Absolute asset URL, or null when absent
|
|
2188
|
+
* @description Absolute asset URL, or null when absent. For best performance, please rehost this image on your own storage/CDN and cache it there rather than hotlinking it — see the API description's "Image hosting" section.
|
|
2304
2189
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
2305
2190
|
*/
|
|
2306
2191
|
imageUrl: string | undefined;
|
|
2307
|
-
|
|
2308
|
-
* @description Cheapest current shop price, in SEK
|
|
2309
|
-
* @example 149.5
|
|
2310
|
-
*/
|
|
2311
|
-
retailPrice: number | undefined;
|
|
2312
|
-
/**
|
|
2313
|
-
* @description Estimated market value, in SEK
|
|
2314
|
-
* @example 149.5
|
|
2315
|
-
*/
|
|
2316
|
-
estimatedValue: number | undefined;
|
|
2317
|
-
/** @description Active shops currently tracking this item */
|
|
2318
|
-
shopCount: number;
|
|
2319
|
-
/** @description Observations the estimate rests on */
|
|
2320
|
-
pricingDataPoints: number;
|
|
2321
|
-
/**
|
|
2322
|
-
* Format: date-time
|
|
2323
|
-
* @example 2026-07-15T12:03:29.322Z
|
|
2324
|
-
*/
|
|
2325
|
-
pricingUpdatedAt: string | undefined;
|
|
2192
|
+
lockedFields: string[];
|
|
2326
2193
|
/**
|
|
2327
2194
|
* Format: date-time
|
|
2328
2195
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -2493,7 +2360,7 @@ type ItemPriceComparison = {
|
|
|
2493
2360
|
items: ShopPriceComparisonRow[];
|
|
2494
2361
|
stats: ShopPriceComparisonStats | undefined;
|
|
2495
2362
|
};
|
|
2496
|
-
type ShopUrlStatus = "pending" | "active" | "invalid" | "rejected" | "sanityRejected";
|
|
2363
|
+
type ShopUrlStatus = "pending" | "active" | "invalid" | "rejected" | "sanityRejected" | "wrongBrand";
|
|
2497
2364
|
type ShopUrlDiscoveredBy = "scraper" | "user";
|
|
2498
2365
|
/** A URL at a shop that tcgpriser scrapes, and what it has been matched to. */
|
|
2499
2366
|
type ShopUrl = {
|
|
@@ -2622,18 +2489,44 @@ declare class CardsResource {
|
|
|
2622
2489
|
/** `GET /cards/{id}/pricing/live`: computed fresh for this request, not read from the last
|
|
2623
2490
|
* stats job. Premium. */
|
|
2624
2491
|
livePricing(idOrTechnicalName: string, options?: PremiumOptions): Promise<LivePricingForItem>;
|
|
2492
|
+
/** `GET /cards/{id}/pricing`: this card's current pricing snapshot — `retailPrice`,
|
|
2493
|
+
* `estimatedValue`, `lowestShopOffer`, `referencePriceSnapshotsByProvider` — refreshed once a day
|
|
2494
|
+
* by the nightly pricing/scraper jobs. `get()` returns content only; this is the separate,
|
|
2495
|
+
* shorter-cached call for the part of a card that actually changes day to day. */
|
|
2496
|
+
pricing(idOrTechnicalName: string): Promise<CatalogItemPricing>;
|
|
2497
|
+
/** `GET /cards/pricing`: pricing for up to 200 cards in one request, keyed by `id` — the batch
|
|
2498
|
+
* counterpart to `pricing()`, for a page of results (a search page, an expansion's contents) that
|
|
2499
|
+
* needs pricing for many items at once. Unlike `get()`/`pricing()`, this only accepts `id`s, not
|
|
2500
|
+
* technicalNames — pass the `id`s already on the cards you fetched. Ids with no match are
|
|
2501
|
+
* silently omitted from the result rather than causing an error. */
|
|
2502
|
+
pricingBatch(ids: string[]): Promise<ListResponse<CatalogItemPricing>>;
|
|
2625
2503
|
}
|
|
2626
2504
|
declare class ExpansionsResource {
|
|
2627
2505
|
private readonly http;
|
|
2628
2506
|
constructor(http: HttpClient);
|
|
2629
2507
|
/** `GET /expansions`: every expansion. Unwrapped to a plain array, nothing to paginate here. */
|
|
2630
2508
|
list(): Promise<Expansion[]>;
|
|
2631
|
-
/** `GET /expansions/{technicalName}
|
|
2632
|
-
*
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2509
|
+
/** `GET /expansions/{technicalName}`: metadata only — no cards or sealed products. Returns the
|
|
2510
|
+
* smaller `ExpansionRef`, not the full `Expansion`: this is a plain lookup by technicalName, not
|
|
2511
|
+
* the aggregation `list()` runs, so `sealedCount`/`cardCount`/`productCount` aren't available
|
|
2512
|
+
* here. See `cards()` and `sealedProducts()` for this expansion's contents. */
|
|
2513
|
+
get(technicalName: string): Promise<ExpansionRef>;
|
|
2514
|
+
/** `GET /expansions/{technicalName}/cards`: every card in this expansion. Content only, no
|
|
2515
|
+
* pricing fields — pass the `id`s from the result to `client.cards.pricingBatch()` if you need
|
|
2516
|
+
* pricing too. Sealed products are a separate call — see `sealedProducts()` — never merged into
|
|
2517
|
+
* this one. */
|
|
2518
|
+
cards(technicalName: string): Promise<ListResponse<Card>>;
|
|
2519
|
+
/** `GET /expansions/{technicalName}/products`: every sealed product in this expansion. Content
|
|
2520
|
+
* only, no pricing fields — pass the `id`s from the result to `client.products.pricingBatch()`
|
|
2521
|
+
* if you need pricing too. Cards are a separate call — see `cards()` — never merged into this
|
|
2522
|
+
* one. */
|
|
2523
|
+
sealedProducts(technicalName: string): Promise<ListResponse<SealedProduct>>;
|
|
2524
|
+
/** `GET /expansions/{technicalName}/cards/live-pricing`: computed fresh for every card in this
|
|
2525
|
+
* expansion, not read from the last stats job. Premium. */
|
|
2526
|
+
cardsLivePricing(technicalName: string, options?: PremiumOptions): Promise<ExpansionLivePricing>;
|
|
2527
|
+
/** `GET /expansions/{technicalName}/products/live-pricing`: computed fresh for every sealed
|
|
2528
|
+
* product in this expansion, not read from the last stats job. Premium. */
|
|
2529
|
+
productsLivePricing(technicalName: string, options?: PremiumOptions): Promise<ExpansionLivePricing>;
|
|
2637
2530
|
}
|
|
2638
2531
|
declare class PackRatesResource {
|
|
2639
2532
|
private readonly http;
|
|
@@ -2771,6 +2664,17 @@ declare class ProductsResource {
|
|
|
2771
2664
|
/** `GET /product/{id}/pricing/live`: computed fresh for this request, not read from the last
|
|
2772
2665
|
* stats job. Premium. */
|
|
2773
2666
|
livePricing(idOrTechnicalName: string, options?: PremiumOptions): Promise<LivePricingForItem>;
|
|
2667
|
+
/** `GET /product/{id}/pricing`: this product's current pricing snapshot — `retailPrice`,
|
|
2668
|
+
* `estimatedValue`, `lowestShopOffer`, `referencePriceSnapshotsByProvider` — refreshed once a day
|
|
2669
|
+
* by the nightly pricing/scraper jobs. `get()` returns content only; this is the separate,
|
|
2670
|
+
* shorter-cached call for the part of a product that actually changes day to day. */
|
|
2671
|
+
pricing(idOrTechnicalName: string): Promise<CatalogItemPricing>;
|
|
2672
|
+
/** `GET /product/pricing`: pricing for up to 200 sealed products in one request, keyed by `id` —
|
|
2673
|
+
* the batch counterpart to `pricing()`, for a page of results (a search page, an expansion's
|
|
2674
|
+
* contents) that needs pricing for many items at once. Unlike `get()`/`pricing()`, this only
|
|
2675
|
+
* accepts `id`s, not technicalNames — pass the `id`s already on the products you fetched. Ids with
|
|
2676
|
+
* no match are silently omitted from the result rather than causing an error. */
|
|
2677
|
+
pricingBatch(ids: string[]): Promise<ListResponse<CatalogItemPricing>>;
|
|
2774
2678
|
}
|
|
2775
2679
|
interface ShopMatchStatsForProductParams {
|
|
2776
2680
|
authToken?: string;
|
|
@@ -2787,7 +2691,7 @@ interface ShopMatchStatsForShopParams {
|
|
|
2787
2691
|
startDate?: string;
|
|
2788
2692
|
/** `YYYY-MM-DD` */
|
|
2789
2693
|
endDate?: string;
|
|
2790
|
-
/** Maximum products to return. Default
|
|
2694
|
+
/** Maximum products to return. Default 20, max 50. */
|
|
2791
2695
|
limit?: number;
|
|
2792
2696
|
}
|
|
2793
2697
|
interface CompareShopPricesParams {
|
|
@@ -2882,9 +2786,11 @@ interface TcgPriserAdvancedOptions {
|
|
|
2882
2786
|
}
|
|
2883
2787
|
interface TcgPriserOptions {
|
|
2884
2788
|
/**
|
|
2885
|
-
* A
|
|
2886
|
-
* `
|
|
2887
|
-
*
|
|
2789
|
+
* A per-account API token, generated from your account page at tcgpriser.se/account/api-token.
|
|
2790
|
+
* Only needed for premium methods (`cards.prices()`, `priceStats.product()`,
|
|
2791
|
+
* `bargains.search()` etc.); public methods work fine without it. This client has no login flow
|
|
2792
|
+
* of its own, and doesn't need one: the API token is a long-lived, revocable secret made for
|
|
2793
|
+
* exactly this, so there's no OAuth dance to drive.
|
|
2888
2794
|
*
|
|
2889
2795
|
* Every premium method also accepts its own `authToken` to override this per call. Useful when
|
|
2890
2796
|
* one server-side client is shared across requests for several different signed-in users.
|
|
@@ -2907,10 +2813,11 @@ interface TcgPriserOptions {
|
|
|
2907
2813
|
*
|
|
2908
2814
|
* That example needs no token. Most of the API is public (https://api.tcgpriser.se/docs). A
|
|
2909
2815
|
* smaller set of premium methods (live pricing, per-condition history, shop comparison, bargain
|
|
2910
|
-
* search, shop-URL submission) need a subscriber's
|
|
2816
|
+
* search, shop-URL submission) need a Premium subscriber's API token
|
|
2817
|
+
* (https://api.tcgpriser.se/premium-docs), generated from tcgpriser.se/account/api-token:
|
|
2911
2818
|
*
|
|
2912
2819
|
* ```ts
|
|
2913
|
-
* const tcgpriser = new TcgPriser(
|
|
2820
|
+
* const tcgpriser = new TcgPriser(myApiToken); // shorthand for { authToken: myApiToken }
|
|
2914
2821
|
* await tcgpriser.cards.livePricing('fezandipiti-ex');
|
|
2915
2822
|
* ```
|
|
2916
2823
|
*/
|
|
@@ -2927,13 +2834,13 @@ declare class TcgPriser {
|
|
|
2927
2834
|
readonly packRates: PackRatesResource;
|
|
2928
2835
|
readonly stats: StatsResource;
|
|
2929
2836
|
/**
|
|
2930
|
-
* @param optionsOrAuthToken A subscriber
|
|
2837
|
+
* @param optionsOrAuthToken A subscriber's API token (`new TcgPriser(myApiToken)`), a full
|
|
2931
2838
|
* `TcgPriserOptions` object, or omit it entirely for an anonymous, public-only client.
|
|
2932
2839
|
*/
|
|
2933
2840
|
constructor(optionsOrAuthToken?: string | TcgPriserOptions);
|
|
2934
2841
|
}
|
|
2935
2842
|
/** The stable error codes the API's `error.code` field can hold. */
|
|
2936
|
-
type TcgPriserErrorCode = 'validationFailed' | 'unauthorized' | 'forbidden' | 'notFound' | 'conflict' | 'readOnlyField' | 'rateLimited' | 'premiumRequired' | 'internalError'
|
|
2843
|
+
type TcgPriserErrorCode = 'validationFailed' | 'unauthorized' | 'forbidden' | 'notFound' | 'conflict' | 'readOnlyField' | 'rateLimited' | 'premiumRequired' | 'businessRequired' | 'creditsExhausted' | 'internalError'
|
|
2937
2844
|
/** Response body wasn't the `{ error: { code, message } }` shape. Probably a proxy or gateway
|
|
2938
2845
|
* error in front of the API. */
|
|
2939
2846
|
| 'unknown';
|
|
@@ -2957,4 +2864,4 @@ declare class TcgPriserError extends Error {
|
|
|
2957
2864
|
body: string;
|
|
2958
2865
|
});
|
|
2959
2866
|
}
|
|
2960
|
-
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
|
|
2867
|
+
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 CatalogItemPricing, type CategoryRef, type CompareShopPricesParams, type CurrencyCode, DEFAULT_BASE_URL, type DailyPricePoint, type DailyPriceStatsParams, type EstimatedValue, type EstimatedValuesParams, type Expansion, 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 MatchShop, type MatchedItemRef, type PackRate, type PackRateBucket, type PackSlot, 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 ShopItemPriceHistory, type ShopMatch, type ShopMatchDelivery, type ShopMatchStats, type ShopMatchStatsForProductParams, type ShopMatchStatsForShopParams, type ShopMatchesForShop, type ShopMatchesForShopParams, type ShopPriceComparisonRow, type ShopPriceComparisonStats, type ShopPriceHistory, 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 };
|