tcgpriser 0.5.0 → 0.7.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 +78 -9
- package/dist/index.cjs +35 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +219 -295
- package/dist/index.d.ts +219 -295
- package/dist/index.js +35 -2
- 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" | "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;
|
|
@@ -358,11 +315,11 @@ interface components {
|
|
|
358
315
|
expansion: components["schemas"]["ExpansionRef"];
|
|
359
316
|
cards: {
|
|
360
317
|
count: number;
|
|
361
|
-
items: components["schemas"]["
|
|
318
|
+
items: components["schemas"]["Card"][];
|
|
362
319
|
};
|
|
363
320
|
sealed: {
|
|
364
321
|
count: number;
|
|
365
|
-
items: components["schemas"]["
|
|
322
|
+
items: components["schemas"]["Product"][];
|
|
366
323
|
};
|
|
367
324
|
};
|
|
368
325
|
ExpansionLivePricing: {
|
|
@@ -401,17 +358,17 @@ interface components {
|
|
|
401
358
|
*/
|
|
402
359
|
releaseDate: string | undefined;
|
|
403
360
|
/**
|
|
404
|
-
* @description Absolute asset URL, or null when absent
|
|
361
|
+
* @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
362
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
406
363
|
*/
|
|
407
364
|
logoUrl: string | undefined;
|
|
408
365
|
/**
|
|
409
|
-
* @description Absolute asset URL, or null when absent
|
|
366
|
+
* @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
367
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
411
368
|
*/
|
|
412
369
|
symbolUrl: string | undefined;
|
|
413
370
|
/**
|
|
414
|
-
* @description Absolute asset URL, or null when absent
|
|
371
|
+
* @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
372
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
416
373
|
*/
|
|
417
374
|
imageUrl: string | undefined;
|
|
@@ -563,6 +520,10 @@ interface components {
|
|
|
563
520
|
shortName: string | undefined;
|
|
564
521
|
technicalName: string;
|
|
565
522
|
cardNumber: string | undefined;
|
|
523
|
+
/**
|
|
524
|
+
* @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.
|
|
525
|
+
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
526
|
+
*/
|
|
566
527
|
imageUrl: string | undefined;
|
|
567
528
|
language: string | undefined;
|
|
568
529
|
priceChartingId: string | undefined;
|
|
@@ -575,6 +536,36 @@ interface components {
|
|
|
575
536
|
id: string;
|
|
576
537
|
expansion: components["schemas"]["ExpansionRef"];
|
|
577
538
|
buckets: components["schemas"]["PackRateBucket"][];
|
|
539
|
+
/**
|
|
540
|
+
* @example [
|
|
541
|
+
* "code",
|
|
542
|
+
* "common",
|
|
543
|
+
* "common",
|
|
544
|
+
* "common",
|
|
545
|
+
* "uncommon",
|
|
546
|
+
* "uncommon",
|
|
547
|
+
* "uncommon",
|
|
548
|
+
* "reverse",
|
|
549
|
+
* "common",
|
|
550
|
+
* "hit",
|
|
551
|
+
* "energy"
|
|
552
|
+
* ]
|
|
553
|
+
*/
|
|
554
|
+
slotOrder: ("common" | "uncommon" | "reverse" | "hit" | "energy" | "code")[] | undefined;
|
|
555
|
+
source: {
|
|
556
|
+
/** @example pullrates.gg */
|
|
557
|
+
name: string;
|
|
558
|
+
/**
|
|
559
|
+
* Format: uri
|
|
560
|
+
* @description The specific page these rates were read from, if any
|
|
561
|
+
*/
|
|
562
|
+
url: string | undefined;
|
|
563
|
+
/**
|
|
564
|
+
* Format: date-time
|
|
565
|
+
* @example 2026-07-15T12:03:29.322Z
|
|
566
|
+
*/
|
|
567
|
+
fetchedAt: string | undefined;
|
|
568
|
+
} | undefined;
|
|
578
569
|
/**
|
|
579
570
|
* Format: date-time
|
|
580
571
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -632,29 +623,11 @@ interface components {
|
|
|
632
623
|
alternativeNames: components["schemas"]["AlternativeName"][];
|
|
633
624
|
supportsMultipackPricing: boolean;
|
|
634
625
|
/**
|
|
635
|
-
* @description Absolute asset URL, or null when absent
|
|
626
|
+
* @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
627
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
637
628
|
*/
|
|
638
629
|
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;
|
|
630
|
+
lockedFields: string[];
|
|
658
631
|
/**
|
|
659
632
|
* Format: date-time
|
|
660
633
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -673,77 +646,9 @@ interface components {
|
|
|
673
646
|
priceChartingId: string | undefined;
|
|
674
647
|
prisjaktId: string | undefined;
|
|
675
648
|
};
|
|
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
649
|
ReferencePriceSeries: {
|
|
745
650
|
/** @enum {string} */
|
|
746
|
-
source: "tcgdex" | "cmapi" | "tradera";
|
|
651
|
+
source: "tcgdex" | "cmapi" | "tradera" | "pokemonpricetracker";
|
|
747
652
|
/** @enum {string} */
|
|
748
653
|
provider: "cardmarket" | "tcgplayer" | "ebay" | "tradera";
|
|
749
654
|
/** @enum {string|null} */
|
|
@@ -798,7 +703,7 @@ interface components {
|
|
|
798
703
|
technicalName: string;
|
|
799
704
|
websiteUrl: string | undefined;
|
|
800
705
|
/**
|
|
801
|
-
* @description Absolute asset URL, or null when absent
|
|
706
|
+
* @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
707
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
803
708
|
*/
|
|
804
709
|
logoUrl: string | undefined;
|
|
@@ -1050,6 +955,10 @@ interface components {
|
|
|
1050
955
|
ShopSummary: {
|
|
1051
956
|
technicalName: string;
|
|
1052
957
|
name: string;
|
|
958
|
+
/**
|
|
959
|
+
* @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.
|
|
960
|
+
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
961
|
+
*/
|
|
1053
962
|
logoUrl: string | undefined;
|
|
1054
963
|
websiteUrl: string | undefined;
|
|
1055
964
|
description: string | undefined;
|
|
@@ -1193,9 +1102,9 @@ interface components {
|
|
|
1193
1102
|
* not silent drift.
|
|
1194
1103
|
*
|
|
1195
1104
|
* 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
|
-
*
|
|
1105
|
+
* components and `$ref`s them wherever they're embedded (in `Card`, `Product`, `PackRate`, the
|
|
1106
|
+
* shop-match schemas, ...), so those are pulled by name directly. `CardSchema` is still the
|
|
1107
|
+
* extraction source for the handful of shapes that aren't independently registered
|
|
1199
1108
|
* (`lowestShopOffer`'s `bargain`, the reference-price snapshot map).
|
|
1200
1109
|
*/
|
|
1201
1110
|
type CardSchema = {
|
|
@@ -1221,29 +1130,11 @@ type CardSchema = {
|
|
|
1221
1130
|
alternativeNames: AlternativeName[];
|
|
1222
1131
|
supportsMultipackPricing: boolean;
|
|
1223
1132
|
/**
|
|
1224
|
-
* @description Absolute asset URL, or null when absent
|
|
1133
|
+
* @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
1134
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1226
1135
|
*/
|
|
1227
1136
|
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;
|
|
1137
|
+
lockedFields: string[];
|
|
1247
1138
|
/**
|
|
1248
1139
|
* Format: date-time
|
|
1249
1140
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -1265,10 +1156,6 @@ type CardSchema = {
|
|
|
1265
1156
|
tcgplayerId: string | undefined;
|
|
1266
1157
|
variants: CardVariants | undefined;
|
|
1267
1158
|
prisjaktId: string | undefined;
|
|
1268
|
-
lowestShopOffer: LowestShopOfferSchema | undefined;
|
|
1269
|
-
referencePriceSnapshotsByProvider: {
|
|
1270
|
-
[key: string]: ReferencePriceSnapshot;
|
|
1271
|
-
};
|
|
1272
1159
|
};
|
|
1273
1160
|
type LowestShopOfferSchema = {
|
|
1274
1161
|
shop: ShopRef;
|
|
@@ -1330,6 +1217,11 @@ interface PaginationParams {
|
|
|
1330
1217
|
type AlternativeName = {
|
|
1331
1218
|
name: string;
|
|
1332
1219
|
shortName: string | undefined;
|
|
1220
|
+
/**
|
|
1221
|
+
* @description ISO 639-1 language code the alias is written in (e.g. "sv"), possibly combined ("sv/da/no"). Null means unspecified.
|
|
1222
|
+
* @example sv
|
|
1223
|
+
*/
|
|
1224
|
+
language: string | undefined;
|
|
1333
1225
|
};
|
|
1334
1226
|
type BrandRef = {
|
|
1335
1227
|
/**
|
|
@@ -1395,17 +1287,17 @@ type ExpansionRef = {
|
|
|
1395
1287
|
*/
|
|
1396
1288
|
releaseDate: string | undefined;
|
|
1397
1289
|
/**
|
|
1398
|
-
* @description Absolute asset URL, or null when absent
|
|
1290
|
+
* @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
1291
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1400
1292
|
*/
|
|
1401
1293
|
logoUrl: string | undefined;
|
|
1402
1294
|
/**
|
|
1403
|
-
* @description Absolute asset URL, or null when absent
|
|
1295
|
+
* @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
1296
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1405
1297
|
*/
|
|
1406
1298
|
symbolUrl: string | undefined;
|
|
1407
1299
|
/**
|
|
1408
|
-
* @description Absolute asset URL, or null when absent
|
|
1300
|
+
* @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
1301
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1410
1302
|
*/
|
|
1411
1303
|
imageUrl: string | undefined;
|
|
@@ -1452,7 +1344,8 @@ type ReferencePriceProvider = "tradera" | "cardmarket" | "tcgplayer" | "ebay";
|
|
|
1452
1344
|
type ReferencePriceSnapshotsByProvider = Partial<Record<ReferencePriceProvider, ReferencePriceSnapshot>>;
|
|
1453
1345
|
/** A card, as returned by `client.cards.get()` / `client.cards.list()`, and as embedded in
|
|
1454
1346
|
* `client.expansions.products()`. `kind: 'card'` is a literal on the generated type, which is what
|
|
1455
|
-
* makes `CatalogItem` (below) discriminate cleanly.
|
|
1347
|
+
* makes `CatalogItem` (below) discriminate cleanly. Content only — no pricing fields; fetch those
|
|
1348
|
+
* separately via `client.cards.pricing()` / `.pricingBatch()`. */
|
|
1456
1349
|
type Card = {
|
|
1457
1350
|
/**
|
|
1458
1351
|
* @description Resource identifier
|
|
@@ -1476,29 +1369,11 @@ type Card = {
|
|
|
1476
1369
|
alternativeNames: AlternativeName[];
|
|
1477
1370
|
supportsMultipackPricing: boolean;
|
|
1478
1371
|
/**
|
|
1479
|
-
* @description Absolute asset URL, or null when absent
|
|
1372
|
+
* @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
1373
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1481
1374
|
*/
|
|
1482
1375
|
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;
|
|
1376
|
+
lockedFields: string[];
|
|
1502
1377
|
/**
|
|
1503
1378
|
* Format: date-time
|
|
1504
1379
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -1520,13 +1395,10 @@ type Card = {
|
|
|
1520
1395
|
tcgplayerId: string | undefined;
|
|
1521
1396
|
variants: CardVariants | undefined;
|
|
1522
1397
|
prisjaktId: string | undefined;
|
|
1523
|
-
lowestShopOffer: LowestShopOfferSchema | undefined;
|
|
1524
|
-
referencePriceSnapshotsByProvider: {
|
|
1525
|
-
[key: string]: ReferencePriceSnapshot;
|
|
1526
|
-
};
|
|
1527
1398
|
};
|
|
1528
1399
|
/** A sealed product (booster box, ETB, tin, ...), as returned by `client.products.get()` /
|
|
1529
|
-
* `client.products.list()`. `kind: 'sealed'` is a literal on the generated type.
|
|
1400
|
+
* `client.products.list()`. `kind: 'sealed'` is a literal on the generated type. Content only — no
|
|
1401
|
+
* pricing fields; fetch those separately via `client.products.pricing()` / `.pricingBatch()`. */
|
|
1530
1402
|
type SealedProduct = {
|
|
1531
1403
|
/**
|
|
1532
1404
|
* @description Resource identifier
|
|
@@ -1550,10 +1422,41 @@ type SealedProduct = {
|
|
|
1550
1422
|
alternativeNames: AlternativeName[];
|
|
1551
1423
|
supportsMultipackPricing: boolean;
|
|
1552
1424
|
/**
|
|
1553
|
-
* @description Absolute asset URL, or null when absent
|
|
1425
|
+
* @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
1426
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1555
1427
|
*/
|
|
1556
1428
|
imageUrl: string | undefined;
|
|
1429
|
+
lockedFields: string[];
|
|
1430
|
+
/**
|
|
1431
|
+
* Format: date-time
|
|
1432
|
+
* @example 2026-07-15T12:03:29.322Z
|
|
1433
|
+
*/
|
|
1434
|
+
createdAt: string;
|
|
1435
|
+
/**
|
|
1436
|
+
* Format: date-time
|
|
1437
|
+
* @example 2026-07-15T12:03:29.322Z
|
|
1438
|
+
*/
|
|
1439
|
+
updatedAt: string;
|
|
1440
|
+
/** @enum {string} */
|
|
1441
|
+
kind: "sealed";
|
|
1442
|
+
upc: string | undefined;
|
|
1443
|
+
asin: string | undefined;
|
|
1444
|
+
epid: string | undefined;
|
|
1445
|
+
priceChartingId: string | undefined;
|
|
1446
|
+
prisjaktId: string | undefined;
|
|
1447
|
+
};
|
|
1448
|
+
/** A card or sealed product, discriminated on `kind`. */
|
|
1449
|
+
type CatalogItem = Card | SealedProduct;
|
|
1450
|
+
/** Pricing for one catalog item (card or sealed product) — `retailPrice`, `estimatedValue`,
|
|
1451
|
+
* `lowestShopOffer`, `referencePriceSnapshotsByProvider` — refreshed once a day by the nightly
|
|
1452
|
+
* pricing/scraper jobs, not embedded in `Card`/`SealedProduct` above. Returned by
|
|
1453
|
+
* `client.cards.pricing()` / `.pricingBatch()` and their `client.products` equivalents. */
|
|
1454
|
+
type CatalogItemPricing = {
|
|
1455
|
+
/**
|
|
1456
|
+
* @description Resource identifier
|
|
1457
|
+
* @example 6a577711abc1ce71383d3e10
|
|
1458
|
+
*/
|
|
1459
|
+
id: string;
|
|
1557
1460
|
/**
|
|
1558
1461
|
* @description Cheapest current shop price, in SEK
|
|
1559
1462
|
* @example 149.5
|
|
@@ -1573,30 +1476,11 @@ type SealedProduct = {
|
|
|
1573
1476
|
* @example 2026-07-15T12:03:29.322Z
|
|
1574
1477
|
*/
|
|
1575
1478
|
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
1479
|
lowestShopOffer: LowestShopOfferSchema | undefined;
|
|
1594
1480
|
referencePriceSnapshotsByProvider: {
|
|
1595
1481
|
[key: string]: ReferencePriceSnapshot;
|
|
1596
1482
|
};
|
|
1597
1483
|
};
|
|
1598
|
-
/** A card or sealed product, discriminated on `kind`. */
|
|
1599
|
-
type CatalogItem = Card | SealedProduct;
|
|
1600
1484
|
type CardVariants = {
|
|
1601
1485
|
normal: boolean;
|
|
1602
1486
|
holo: boolean;
|
|
@@ -1618,6 +1502,10 @@ type MatchedItemRef = {
|
|
|
1618
1502
|
shortName: string | undefined;
|
|
1619
1503
|
technicalName: string;
|
|
1620
1504
|
cardNumber: string | undefined;
|
|
1505
|
+
/**
|
|
1506
|
+
* @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.
|
|
1507
|
+
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1508
|
+
*/
|
|
1621
1509
|
imageUrl: string | undefined;
|
|
1622
1510
|
language: string | undefined;
|
|
1623
1511
|
priceChartingId: string | undefined;
|
|
@@ -1650,6 +1538,10 @@ type Bargain = {
|
|
|
1650
1538
|
kind: "sealed" | "card";
|
|
1651
1539
|
name: string;
|
|
1652
1540
|
technicalName: string;
|
|
1541
|
+
/**
|
|
1542
|
+
* @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.
|
|
1543
|
+
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1544
|
+
*/
|
|
1653
1545
|
imageUrl: string | undefined;
|
|
1654
1546
|
};
|
|
1655
1547
|
bargain: {
|
|
@@ -1668,6 +1560,10 @@ type BargainProductRef = {
|
|
|
1668
1560
|
kind: "sealed" | "card";
|
|
1669
1561
|
name: string;
|
|
1670
1562
|
technicalName: string;
|
|
1563
|
+
/**
|
|
1564
|
+
* @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.
|
|
1565
|
+
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1566
|
+
*/
|
|
1671
1567
|
imageUrl: string | undefined;
|
|
1672
1568
|
};
|
|
1673
1569
|
/** A set/expansion, as returned by `client.expansions.list()`. This is the full record. The
|
|
@@ -1703,17 +1599,17 @@ type Expansion = {
|
|
|
1703
1599
|
*/
|
|
1704
1600
|
releaseDate: string | undefined;
|
|
1705
1601
|
/**
|
|
1706
|
-
* @description Absolute asset URL, or null when absent
|
|
1602
|
+
* @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
1603
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1708
1604
|
*/
|
|
1709
1605
|
logoUrl: string | undefined;
|
|
1710
1606
|
/**
|
|
1711
|
-
* @description Absolute asset URL, or null when absent
|
|
1607
|
+
* @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
1608
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1713
1609
|
*/
|
|
1714
1610
|
symbolUrl: string | undefined;
|
|
1715
1611
|
/**
|
|
1716
|
-
* @description Absolute asset URL, or null when absent
|
|
1612
|
+
* @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
1613
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1718
1614
|
*/
|
|
1719
1615
|
imageUrl: string | undefined;
|
|
@@ -1877,7 +1773,7 @@ type Shop = {
|
|
|
1877
1773
|
technicalName: string;
|
|
1878
1774
|
websiteUrl: string | undefined;
|
|
1879
1775
|
/**
|
|
1880
|
-
* @description Absolute asset URL, or null when absent
|
|
1776
|
+
* @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
1777
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1882
1778
|
*/
|
|
1883
1779
|
logoUrl: string | undefined;
|
|
@@ -1926,6 +1822,10 @@ type Shop = {
|
|
|
1926
1822
|
type ShopSummary = {
|
|
1927
1823
|
technicalName: string;
|
|
1928
1824
|
name: string;
|
|
1825
|
+
/**
|
|
1826
|
+
* @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.
|
|
1827
|
+
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
1828
|
+
*/
|
|
1929
1829
|
logoUrl: string | undefined;
|
|
1930
1830
|
websiteUrl: string | undefined;
|
|
1931
1831
|
description: string | undefined;
|
|
@@ -2063,6 +1963,36 @@ type PackRate = {
|
|
|
2063
1963
|
id: string;
|
|
2064
1964
|
expansion: ExpansionRef;
|
|
2065
1965
|
buckets: PackRateBucket[];
|
|
1966
|
+
/**
|
|
1967
|
+
* @example [
|
|
1968
|
+
* "code",
|
|
1969
|
+
* "common",
|
|
1970
|
+
* "common",
|
|
1971
|
+
* "common",
|
|
1972
|
+
* "uncommon",
|
|
1973
|
+
* "uncommon",
|
|
1974
|
+
* "uncommon",
|
|
1975
|
+
* "reverse",
|
|
1976
|
+
* "common",
|
|
1977
|
+
* "hit",
|
|
1978
|
+
* "energy"
|
|
1979
|
+
* ]
|
|
1980
|
+
*/
|
|
1981
|
+
slotOrder: ("common" | "uncommon" | "reverse" | "hit" | "energy" | "code")[] | undefined;
|
|
1982
|
+
source: {
|
|
1983
|
+
/** @example pullrates.gg */
|
|
1984
|
+
name: string;
|
|
1985
|
+
/**
|
|
1986
|
+
* Format: uri
|
|
1987
|
+
* @description The specific page these rates were read from, if any
|
|
1988
|
+
*/
|
|
1989
|
+
url: string | undefined;
|
|
1990
|
+
/**
|
|
1991
|
+
* Format: date-time
|
|
1992
|
+
* @example 2026-07-15T12:03:29.322Z
|
|
1993
|
+
*/
|
|
1994
|
+
fetchedAt: string | undefined;
|
|
1995
|
+
} | undefined;
|
|
2066
1996
|
/**
|
|
2067
1997
|
* Format: date-time
|
|
2068
1998
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -2074,6 +2004,8 @@ type PackRate = {
|
|
|
2074
2004
|
*/
|
|
2075
2005
|
updatedAt: string;
|
|
2076
2006
|
};
|
|
2007
|
+
/** One of the 9 fixed slots in a simulated pack (4 common, 3 uncommon, 1 reverse, 1 hit). */
|
|
2008
|
+
type PackSlot = "common" | "uncommon" | "reverse" | "hit" | "energy" | "code";
|
|
2077
2009
|
/** Platform-wide overview counts, returned by `client.stats.platform()`. */
|
|
2078
2010
|
type PlatformStats = {
|
|
2079
2011
|
shopCount: number;
|
|
@@ -2083,7 +2015,7 @@ type PlatformStats = {
|
|
|
2083
2015
|
priceCount: number;
|
|
2084
2016
|
};
|
|
2085
2017
|
/**
|
|
2086
|
-
* Types for the premium tier: endpoints that need a
|
|
2018
|
+
* Types for the premium tier: endpoints that need a subscriber's API token (see
|
|
2087
2019
|
* `TcgPriserOptions.authToken`, or the `authToken` field on each premium method's params). Split
|
|
2088
2020
|
* out from the public-tier types because none of these mean anything without a token: without one,
|
|
2089
2021
|
* the API just answers `403 premiumRequired`.
|
|
@@ -2092,7 +2024,7 @@ type PlatformStats = {
|
|
|
2092
2024
|
*/
|
|
2093
2025
|
type ReferencePriceSeries = {
|
|
2094
2026
|
/** @enum {string} */
|
|
2095
|
-
source: "tcgdex" | "cmapi" | "tradera";
|
|
2027
|
+
source: "tcgdex" | "cmapi" | "tradera" | "pokemonpricetracker";
|
|
2096
2028
|
/** @enum {string} */
|
|
2097
2029
|
provider: "cardmarket" | "tcgplayer" | "ebay" | "tradera";
|
|
2098
2030
|
/** @enum {string|null} */
|
|
@@ -2114,8 +2046,8 @@ type ReferencePriceSeriesPoint = {
|
|
|
2114
2046
|
snapshotDate: string;
|
|
2115
2047
|
price: number;
|
|
2116
2048
|
};
|
|
2117
|
-
type ReferencePriceSource = "tradera" | "tcgdex" | "cmapi";
|
|
2118
|
-
type ReferencePriceCardVariant = "
|
|
2049
|
+
type ReferencePriceSource = "tradera" | "tcgdex" | "cmapi" | "pokemonpricetracker";
|
|
2050
|
+
type ReferencePriceCardVariant = "reverse" | "normal" | "holo";
|
|
2119
2051
|
type ReferencePriceMetric = "price" | "low" | "mid" | "high" | "avg" | "avg1" | "avg7" | "avg30" | "directLow";
|
|
2120
2052
|
type ReferencePriceCurrencyMode = "native" | "sek";
|
|
2121
2053
|
/** Response of `client.cards.referencePrices()` / `client.products.referencePrices()`.
|
|
@@ -2233,29 +2165,11 @@ type StatsItemRef = {
|
|
|
2233
2165
|
alternativeNames: AlternativeName[];
|
|
2234
2166
|
supportsMultipackPricing: boolean;
|
|
2235
2167
|
/**
|
|
2236
|
-
* @description Absolute asset URL, or null when absent
|
|
2168
|
+
* @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
2169
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
2238
2170
|
*/
|
|
2239
2171
|
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;
|
|
2172
|
+
lockedFields: string[];
|
|
2259
2173
|
/**
|
|
2260
2174
|
* Format: date-time
|
|
2261
2175
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -2300,29 +2214,11 @@ type StatsItemRef = {
|
|
|
2300
2214
|
alternativeNames: AlternativeName[];
|
|
2301
2215
|
supportsMultipackPricing: boolean;
|
|
2302
2216
|
/**
|
|
2303
|
-
* @description Absolute asset URL, or null when absent
|
|
2217
|
+
* @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
2218
|
* @example https://ik.imagekit.io/xgtytqdnv/expansions/example-image.webp
|
|
2305
2219
|
*/
|
|
2306
2220
|
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;
|
|
2221
|
+
lockedFields: string[];
|
|
2326
2222
|
/**
|
|
2327
2223
|
* Format: date-time
|
|
2328
2224
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -2622,6 +2518,17 @@ declare class CardsResource {
|
|
|
2622
2518
|
/** `GET /cards/{id}/pricing/live`: computed fresh for this request, not read from the last
|
|
2623
2519
|
* stats job. Premium. */
|
|
2624
2520
|
livePricing(idOrTechnicalName: string, options?: PremiumOptions): Promise<LivePricingForItem>;
|
|
2521
|
+
/** `GET /cards/{id}/pricing`: this card's current pricing snapshot — `retailPrice`,
|
|
2522
|
+
* `estimatedValue`, `lowestShopOffer`, `referencePriceSnapshotsByProvider` — refreshed once a day
|
|
2523
|
+
* by the nightly pricing/scraper jobs. `get()` returns content only; this is the separate,
|
|
2524
|
+
* shorter-cached call for the part of a card that actually changes day to day. */
|
|
2525
|
+
pricing(idOrTechnicalName: string): Promise<CatalogItemPricing>;
|
|
2526
|
+
/** `GET /cards/pricing`: pricing for up to 200 cards in one request, keyed by `id` — the batch
|
|
2527
|
+
* counterpart to `pricing()`, for a page of results (a search page, an expansion's contents) that
|
|
2528
|
+
* needs pricing for many items at once. Unlike `get()`/`pricing()`, this only accepts `id`s, not
|
|
2529
|
+
* technicalNames — pass the `id`s already on the cards you fetched. Ids with no match are
|
|
2530
|
+
* silently omitted from the result rather than causing an error. */
|
|
2531
|
+
pricingBatch(ids: string[]): Promise<ListResponse<CatalogItemPricing>>;
|
|
2625
2532
|
}
|
|
2626
2533
|
declare class ExpansionsResource {
|
|
2627
2534
|
private readonly http;
|
|
@@ -2629,7 +2536,10 @@ declare class ExpansionsResource {
|
|
|
2629
2536
|
/** `GET /expansions`: every expansion. Unwrapped to a plain array, nothing to paginate here. */
|
|
2630
2537
|
list(): Promise<Expansion[]>;
|
|
2631
2538
|
/** `GET /expansions/{technicalName}/products`: every card and sealed product in one
|
|
2632
|
-
* expansion, kept as separate `cards`/`sealed` groups.
|
|
2539
|
+
* expansion, kept as separate `cards`/`sealed` groups. Content only, no pricing fields — pass the
|
|
2540
|
+
* `id`s from the result to `client.cards.pricingBatch()` / `client.products.pricingBatch()` if you
|
|
2541
|
+
* need pricing too. This mirrors the API 1:1 rather than fetching pricing for you, since pricing
|
|
2542
|
+
* for every item in an expansion is a second, separately-cached call the caller may not want. */
|
|
2633
2543
|
products(technicalName: string): Promise<ExpansionContents>;
|
|
2634
2544
|
/** `GET /expansions/{technicalName}/products/live-pricing`: computed fresh for every item in
|
|
2635
2545
|
* this expansion, not read from the last stats job. Premium. */
|
|
@@ -2771,6 +2681,17 @@ declare class ProductsResource {
|
|
|
2771
2681
|
/** `GET /product/{id}/pricing/live`: computed fresh for this request, not read from the last
|
|
2772
2682
|
* stats job. Premium. */
|
|
2773
2683
|
livePricing(idOrTechnicalName: string, options?: PremiumOptions): Promise<LivePricingForItem>;
|
|
2684
|
+
/** `GET /product/{id}/pricing`: this product's current pricing snapshot — `retailPrice`,
|
|
2685
|
+
* `estimatedValue`, `lowestShopOffer`, `referencePriceSnapshotsByProvider` — refreshed once a day
|
|
2686
|
+
* by the nightly pricing/scraper jobs. `get()` returns content only; this is the separate,
|
|
2687
|
+
* shorter-cached call for the part of a product that actually changes day to day. */
|
|
2688
|
+
pricing(idOrTechnicalName: string): Promise<CatalogItemPricing>;
|
|
2689
|
+
/** `GET /product/pricing`: pricing for up to 200 sealed products in one request, keyed by `id` —
|
|
2690
|
+
* the batch counterpart to `pricing()`, for a page of results (a search page, an expansion's
|
|
2691
|
+
* contents) that needs pricing for many items at once. Unlike `get()`/`pricing()`, this only
|
|
2692
|
+
* accepts `id`s, not technicalNames — pass the `id`s already on the products you fetched. Ids with
|
|
2693
|
+
* no match are silently omitted from the result rather than causing an error. */
|
|
2694
|
+
pricingBatch(ids: string[]): Promise<ListResponse<CatalogItemPricing>>;
|
|
2774
2695
|
}
|
|
2775
2696
|
interface ShopMatchStatsForProductParams {
|
|
2776
2697
|
authToken?: string;
|
|
@@ -2882,9 +2803,11 @@ interface TcgPriserAdvancedOptions {
|
|
|
2882
2803
|
}
|
|
2883
2804
|
interface TcgPriserOptions {
|
|
2884
2805
|
/**
|
|
2885
|
-
* A
|
|
2886
|
-
* `
|
|
2887
|
-
*
|
|
2806
|
+
* A per-account API token, generated from your account page at tcgpriser.se/account/api-token.
|
|
2807
|
+
* Only needed for premium methods (`cards.prices()`, `priceStats.product()`,
|
|
2808
|
+
* `bargains.search()` etc.); public methods work fine without it. This client has no login flow
|
|
2809
|
+
* of its own, and doesn't need one: the API token is a long-lived, revocable secret made for
|
|
2810
|
+
* exactly this, so there's no OAuth dance to drive.
|
|
2888
2811
|
*
|
|
2889
2812
|
* Every premium method also accepts its own `authToken` to override this per call. Useful when
|
|
2890
2813
|
* one server-side client is shared across requests for several different signed-in users.
|
|
@@ -2907,10 +2830,11 @@ interface TcgPriserOptions {
|
|
|
2907
2830
|
*
|
|
2908
2831
|
* That example needs no token. Most of the API is public (https://api.tcgpriser.se/docs). A
|
|
2909
2832
|
* smaller set of premium methods (live pricing, per-condition history, shop comparison, bargain
|
|
2910
|
-
* search, shop-URL submission) need a subscriber's
|
|
2833
|
+
* search, shop-URL submission) need a Premium subscriber's API token
|
|
2834
|
+
* (https://api.tcgpriser.se/premium-docs), generated from tcgpriser.se/account/api-token:
|
|
2911
2835
|
*
|
|
2912
2836
|
* ```ts
|
|
2913
|
-
* const tcgpriser = new TcgPriser(
|
|
2837
|
+
* const tcgpriser = new TcgPriser(myApiToken); // shorthand for { authToken: myApiToken }
|
|
2914
2838
|
* await tcgpriser.cards.livePricing('fezandipiti-ex');
|
|
2915
2839
|
* ```
|
|
2916
2840
|
*/
|
|
@@ -2927,7 +2851,7 @@ declare class TcgPriser {
|
|
|
2927
2851
|
readonly packRates: PackRatesResource;
|
|
2928
2852
|
readonly stats: StatsResource;
|
|
2929
2853
|
/**
|
|
2930
|
-
* @param optionsOrAuthToken A subscriber
|
|
2854
|
+
* @param optionsOrAuthToken A subscriber's API token (`new TcgPriser(myApiToken)`), a full
|
|
2931
2855
|
* `TcgPriserOptions` object, or omit it entirely for an anonymous, public-only client.
|
|
2932
2856
|
*/
|
|
2933
2857
|
constructor(optionsOrAuthToken?: string | TcgPriserOptions);
|
|
@@ -2957,4 +2881,4 @@ declare class TcgPriserError extends Error {
|
|
|
2957
2881
|
body: string;
|
|
2958
2882
|
});
|
|
2959
2883
|
}
|
|
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 ExpansionCard, type ExpansionContents, type ExpansionLivePricing, type ExpansionRef, type ExpansionSealedProduct, 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 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 };
|
|
2884
|
+
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 ExpansionCard, type ExpansionContents, type ExpansionLivePricing, type ExpansionRef, type ExpansionSealedProduct, 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 };
|