tcgpriser 0.13.0 → 1.0.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 +42 -5
- package/dist/index.cjs +42 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +153 -21
- package/dist/index.d.ts +153 -21
- package/dist/index.js +42 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -140,6 +140,10 @@ interface components {
|
|
|
140
140
|
name: string;
|
|
141
141
|
/** @example pokemon */
|
|
142
142
|
technicalName: string;
|
|
143
|
+
/**
|
|
144
|
+
* @description Absolute asset URL, or undefined when absent.
|
|
145
|
+
*/
|
|
146
|
+
imageUrl: string | undefined;
|
|
143
147
|
/**
|
|
144
148
|
* Format: date-time
|
|
145
149
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -162,6 +166,8 @@ interface components {
|
|
|
162
166
|
technicalName: string;
|
|
163
167
|
brand: components["schemas"]["Brand"];
|
|
164
168
|
manufacturer: string;
|
|
169
|
+
/** @enum {string} */
|
|
170
|
+
productLine: "tcg" | "accessory" | "collectible" | "boardGame" | "videoGame" | "other";
|
|
165
171
|
modelNumber: string | undefined;
|
|
166
172
|
category: components["schemas"]["CategoryRef"] | undefined;
|
|
167
173
|
expansion: components["schemas"]["ExpansionRef"] | undefined;
|
|
@@ -170,7 +176,7 @@ interface components {
|
|
|
170
176
|
* @example JPN
|
|
171
177
|
* @enum {string|null}
|
|
172
178
|
*/
|
|
173
|
-
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
179
|
+
language: "ENG" | "JPN" | "CHI" | "KOR" | "SPA" | "GER" | "FRA" | "ITA" | "POR" | "RUS" | undefined;
|
|
174
180
|
alternativeNames: components["schemas"]["AlternativeName"][];
|
|
175
181
|
supportsMultipackPricing: boolean;
|
|
176
182
|
/**
|
|
@@ -302,7 +308,7 @@ interface components {
|
|
|
302
308
|
* @example JPN
|
|
303
309
|
* @enum {string}
|
|
304
310
|
*/
|
|
305
|
-
language: "ENG" | "JPN" | "CHI";
|
|
311
|
+
language: "ENG" | "JPN" | "CHI" | "KOR" | "SPA" | "GER" | "FRA" | "ITA" | "POR" | "RUS";
|
|
306
312
|
/** @example m6a */
|
|
307
313
|
code: string | undefined;
|
|
308
314
|
/** @example m6a */
|
|
@@ -367,12 +373,16 @@ interface components {
|
|
|
367
373
|
shortName: string;
|
|
368
374
|
/** @example jpn-mega-evolution-30th-celebration */
|
|
369
375
|
technicalName: string;
|
|
376
|
+
/**
|
|
377
|
+
* @description The expansion's owning brand. Undefined only for legacy diagnostic responses that cannot populate it.
|
|
378
|
+
*/
|
|
379
|
+
brand: components["schemas"]["Brand"] | undefined;
|
|
370
380
|
/**
|
|
371
381
|
* @description Printing language of the item
|
|
372
382
|
* @example JPN
|
|
373
383
|
* @enum {string}
|
|
374
384
|
*/
|
|
375
|
-
language: "ENG" | "JPN" | "CHI";
|
|
385
|
+
language: "ENG" | "JPN" | "CHI" | "KOR" | "SPA" | "GER" | "FRA" | "ITA" | "POR" | "RUS";
|
|
376
386
|
/** @example m6a */
|
|
377
387
|
code: string | undefined;
|
|
378
388
|
/** @example m6a */
|
|
@@ -638,6 +648,8 @@ interface components {
|
|
|
638
648
|
technicalName: string;
|
|
639
649
|
brand: components["schemas"]["Brand"];
|
|
640
650
|
manufacturer: string;
|
|
651
|
+
/** @enum {string} */
|
|
652
|
+
productLine: "tcg" | "accessory" | "collectible" | "boardGame" | "videoGame" | "other";
|
|
641
653
|
modelNumber: string | undefined;
|
|
642
654
|
category: components["schemas"]["CategoryRef"] | undefined;
|
|
643
655
|
expansion: components["schemas"]["ExpansionRef"] | undefined;
|
|
@@ -646,7 +658,7 @@ interface components {
|
|
|
646
658
|
* @example JPN
|
|
647
659
|
* @enum {string|null}
|
|
648
660
|
*/
|
|
649
|
-
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
661
|
+
language: "ENG" | "JPN" | "CHI" | "KOR" | "SPA" | "GER" | "FRA" | "ITA" | "POR" | "RUS" | undefined;
|
|
650
662
|
alternativeNames: components["schemas"]["AlternativeName"][];
|
|
651
663
|
supportsMultipackPricing: boolean;
|
|
652
664
|
/**
|
|
@@ -1209,6 +1221,8 @@ type CardSchema = {
|
|
|
1209
1221
|
technicalName: string;
|
|
1210
1222
|
brand: BrandRef;
|
|
1211
1223
|
manufacturer: string;
|
|
1224
|
+
/** @enum {string} */
|
|
1225
|
+
productLine: "tcg" | "accessory" | "collectible" | "boardGame" | "videoGame" | "other";
|
|
1212
1226
|
modelNumber: string | undefined;
|
|
1213
1227
|
category: CategoryRef | undefined;
|
|
1214
1228
|
expansion: ExpansionRef | undefined;
|
|
@@ -1217,7 +1231,7 @@ type CardSchema = {
|
|
|
1217
1231
|
* @example JPN
|
|
1218
1232
|
* @enum {string|null}
|
|
1219
1233
|
*/
|
|
1220
|
-
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
1234
|
+
language: "ENG" | "JPN" | "CHI" | "KOR" | "SPA" | "GER" | "FRA" | "ITA" | "POR" | "RUS" | undefined;
|
|
1221
1235
|
alternativeNames: AlternativeName[];
|
|
1222
1236
|
supportsMultipackPricing: boolean;
|
|
1223
1237
|
/**
|
|
@@ -1285,7 +1299,13 @@ type ResourceId = string;
|
|
|
1285
1299
|
type CurrencyCode = string;
|
|
1286
1300
|
/** ISO 8601 timestamp, as returned by the API (always UTC, `Z`-suffixed). */
|
|
1287
1301
|
type Timestamp = string;
|
|
1288
|
-
type PrintingLanguage = "ENG" | "JPN" | "CHI";
|
|
1302
|
+
type PrintingLanguage = "ENG" | "JPN" | "CHI" | "KOR" | "SPA" | "GER" | "FRA" | "ITA" | "POR" | "RUS";
|
|
1303
|
+
/** What universe of product an item is — `'tcg'` for every card and sealed product today, plus
|
|
1304
|
+
* `'accessory'`/`'collectible'`/`'boardGame'`/`'videoGame'`/`'other'` for non-TCG catalogue items.
|
|
1305
|
+
* Orthogonal to `kind` (which endpoint returned it: `cards` vs `products`) and to `category` (the
|
|
1306
|
+
* specific group within a product line, e.g. "Booster Box"). The value `productLine` filters on
|
|
1307
|
+
* `cards.list()`/`products.list()` accept. */
|
|
1308
|
+
type ProductLine = "tcg" | "accessory" | "collectible" | "boardGame" | "videoGame" | "other";
|
|
1289
1309
|
type PageMeta = {
|
|
1290
1310
|
/** @description Total matching records, ignoring pagination */
|
|
1291
1311
|
total: number;
|
|
@@ -1330,6 +1350,10 @@ type BrandRef = {
|
|
|
1330
1350
|
name: string;
|
|
1331
1351
|
/** @example pokemon */
|
|
1332
1352
|
technicalName: string;
|
|
1353
|
+
/**
|
|
1354
|
+
* @description Absolute asset URL, or undefined when absent.
|
|
1355
|
+
*/
|
|
1356
|
+
imageUrl: string | undefined;
|
|
1333
1357
|
/**
|
|
1334
1358
|
* Format: date-time
|
|
1335
1359
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -1352,8 +1376,9 @@ type CategoryRef = {
|
|
|
1352
1376
|
/** @example booster-box */
|
|
1353
1377
|
technicalName: string;
|
|
1354
1378
|
};
|
|
1355
|
-
/** The expansion shape embedded on cards, products and pack rates
|
|
1356
|
-
*
|
|
1379
|
+
/** The expansion shape embedded on cards, products and pack rates, and returned by
|
|
1380
|
+
* `client.expansions.get()`. It includes the owning `brand`, but not the aggregation counts that
|
|
1381
|
+
* only `client.expansions.list()` computes. */
|
|
1357
1382
|
type ExpansionRef = {
|
|
1358
1383
|
/**
|
|
1359
1384
|
* @description Resource identifier
|
|
@@ -1366,12 +1391,16 @@ type ExpansionRef = {
|
|
|
1366
1391
|
shortName: string;
|
|
1367
1392
|
/** @example jpn-mega-evolution-30th-celebration */
|
|
1368
1393
|
technicalName: string;
|
|
1394
|
+
/**
|
|
1395
|
+
* @description The expansion's owning brand. Undefined only for legacy diagnostic responses that cannot populate it.
|
|
1396
|
+
*/
|
|
1397
|
+
brand: BrandRef | undefined;
|
|
1369
1398
|
/**
|
|
1370
1399
|
* @description Printing language of the item
|
|
1371
1400
|
* @example JPN
|
|
1372
1401
|
* @enum {string}
|
|
1373
1402
|
*/
|
|
1374
|
-
language: "ENG" | "JPN" | "CHI";
|
|
1403
|
+
language: "ENG" | "JPN" | "CHI" | "KOR" | "SPA" | "GER" | "FRA" | "ITA" | "POR" | "RUS";
|
|
1375
1404
|
/** @example m6a */
|
|
1376
1405
|
code: string | undefined;
|
|
1377
1406
|
/** @example m6a */
|
|
@@ -1439,6 +1468,38 @@ type ReferencePriceSnapshot = {
|
|
|
1439
1468
|
type ReferencePriceProvider = "tradera" | "cardmarket" | "tcgplayer" | "ebay";
|
|
1440
1469
|
/** Keyed by provider, at most one snapshot per provider. */
|
|
1441
1470
|
type ReferencePriceSnapshotsByProvider = Partial<Record<ReferencePriceProvider, ReferencePriceSnapshot>>;
|
|
1471
|
+
/** A brand/franchise (e.g. "Pokémon"), as returned by `client.brands.list()` /
|
|
1472
|
+
* `client.brands.get()`. Same shape as `BrandRef` (the form embedded on `Card`/`SealedProduct`/
|
|
1473
|
+
* `Expansion`) today — kept as its own named type for symmetry with `Shop`/`ShopRef` and
|
|
1474
|
+
* `Expansion`/`ExpansionRef`, in case the two diverge later. `imageUrl` is the CDN-hosted brand
|
|
1475
|
+
* mark when one has been uploaded. This is the value `brand` filters on
|
|
1476
|
+
* `cards.list()`, `products.list()` and `expansions.list()` accept (either `id` or
|
|
1477
|
+
* `technicalName`). */
|
|
1478
|
+
type Brand = {
|
|
1479
|
+
/**
|
|
1480
|
+
* @description Resource identifier
|
|
1481
|
+
* @example 6a577711abc1ce71383d3e10
|
|
1482
|
+
*/
|
|
1483
|
+
id: string;
|
|
1484
|
+
/** @example Pokémon */
|
|
1485
|
+
name: string;
|
|
1486
|
+
/** @example pokemon */
|
|
1487
|
+
technicalName: string;
|
|
1488
|
+
/**
|
|
1489
|
+
* @description Absolute asset URL, or undefined when absent.
|
|
1490
|
+
*/
|
|
1491
|
+
imageUrl: string | undefined;
|
|
1492
|
+
/**
|
|
1493
|
+
* Format: date-time
|
|
1494
|
+
* @example 2026-07-15T12:03:29.322Z
|
|
1495
|
+
*/
|
|
1496
|
+
createdAt: string;
|
|
1497
|
+
/**
|
|
1498
|
+
* Format: date-time
|
|
1499
|
+
* @example 2026-07-15T12:03:29.322Z
|
|
1500
|
+
*/
|
|
1501
|
+
updatedAt: string;
|
|
1502
|
+
};
|
|
1442
1503
|
/** A card, as returned by `client.cards.get()` / `client.cards.list()`, and as embedded in
|
|
1443
1504
|
* `client.expansions.cards()`. `kind: 'card'` is a literal on the generated type, which is what
|
|
1444
1505
|
* makes `CatalogItem` (below) discriminate cleanly. Content only — no pricing fields; fetch those
|
|
@@ -1454,6 +1515,8 @@ type Card = {
|
|
|
1454
1515
|
technicalName: string;
|
|
1455
1516
|
brand: BrandRef;
|
|
1456
1517
|
manufacturer: string;
|
|
1518
|
+
/** @enum {string} */
|
|
1519
|
+
productLine: "tcg" | "accessory" | "collectible" | "boardGame" | "videoGame" | "other";
|
|
1457
1520
|
modelNumber: string | undefined;
|
|
1458
1521
|
category: CategoryRef | undefined;
|
|
1459
1522
|
expansion: ExpansionRef | undefined;
|
|
@@ -1462,7 +1525,7 @@ type Card = {
|
|
|
1462
1525
|
* @example JPN
|
|
1463
1526
|
* @enum {string|null}
|
|
1464
1527
|
*/
|
|
1465
|
-
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
1528
|
+
language: "ENG" | "JPN" | "CHI" | "KOR" | "SPA" | "GER" | "FRA" | "ITA" | "POR" | "RUS" | undefined;
|
|
1466
1529
|
alternativeNames: AlternativeName[];
|
|
1467
1530
|
supportsMultipackPricing: boolean;
|
|
1468
1531
|
/**
|
|
@@ -1508,6 +1571,8 @@ type SealedProduct = {
|
|
|
1508
1571
|
technicalName: string;
|
|
1509
1572
|
brand: BrandRef;
|
|
1510
1573
|
manufacturer: string;
|
|
1574
|
+
/** @enum {string} */
|
|
1575
|
+
productLine: "tcg" | "accessory" | "collectible" | "boardGame" | "videoGame" | "other";
|
|
1511
1576
|
modelNumber: string | undefined;
|
|
1512
1577
|
category: CategoryRef | undefined;
|
|
1513
1578
|
expansion: ExpansionRef | undefined;
|
|
@@ -1516,7 +1581,7 @@ type SealedProduct = {
|
|
|
1516
1581
|
* @example JPN
|
|
1517
1582
|
* @enum {string|null}
|
|
1518
1583
|
*/
|
|
1519
|
-
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
1584
|
+
language: "ENG" | "JPN" | "CHI" | "KOR" | "SPA" | "GER" | "FRA" | "ITA" | "POR" | "RUS" | undefined;
|
|
1520
1585
|
alternativeNames: AlternativeName[];
|
|
1521
1586
|
supportsMultipackPricing: boolean;
|
|
1522
1587
|
/**
|
|
@@ -1678,7 +1743,7 @@ type BargainProductRef = {
|
|
|
1678
1743
|
/** A set/expansion, as returned by `client.expansions.list()`. This is the full record, including
|
|
1679
1744
|
* the `sealedCount`/`cardCount`/`productCount` aggregation `list()` runs. The `expansion` field
|
|
1680
1745
|
* embedded on a card or product, and the result of `client.expansions.get()`, are the smaller
|
|
1681
|
-
* `ExpansionRef` from `types/common.ts` instead
|
|
1746
|
+
* `ExpansionRef` from `types/common.ts` instead; both shapes include the owning `brand`. */
|
|
1682
1747
|
type Expansion = {
|
|
1683
1748
|
/**
|
|
1684
1749
|
* @description Resource identifier
|
|
@@ -1696,7 +1761,7 @@ type Expansion = {
|
|
|
1696
1761
|
* @example JPN
|
|
1697
1762
|
* @enum {string}
|
|
1698
1763
|
*/
|
|
1699
|
-
language: "ENG" | "JPN" | "CHI";
|
|
1764
|
+
language: "ENG" | "JPN" | "CHI" | "KOR" | "SPA" | "GER" | "FRA" | "ITA" | "POR" | "RUS";
|
|
1700
1765
|
/** @example m6a */
|
|
1701
1766
|
code: string | undefined;
|
|
1702
1767
|
/** @example m6a */
|
|
@@ -2243,6 +2308,8 @@ type StatsItemRef = {
|
|
|
2243
2308
|
technicalName: string;
|
|
2244
2309
|
brand: BrandRef;
|
|
2245
2310
|
manufacturer: string;
|
|
2311
|
+
/** @enum {string} */
|
|
2312
|
+
productLine: "tcg" | "accessory" | "collectible" | "boardGame" | "videoGame" | "other";
|
|
2246
2313
|
modelNumber: string | undefined;
|
|
2247
2314
|
category: CategoryRef | undefined;
|
|
2248
2315
|
expansion: ExpansionRef | undefined;
|
|
@@ -2251,7 +2318,7 @@ type StatsItemRef = {
|
|
|
2251
2318
|
* @example JPN
|
|
2252
2319
|
* @enum {string|null}
|
|
2253
2320
|
*/
|
|
2254
|
-
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
2321
|
+
language: "ENG" | "JPN" | "CHI" | "KOR" | "SPA" | "GER" | "FRA" | "ITA" | "POR" | "RUS" | undefined;
|
|
2255
2322
|
alternativeNames: AlternativeName[];
|
|
2256
2323
|
supportsMultipackPricing: boolean;
|
|
2257
2324
|
/**
|
|
@@ -2292,6 +2359,8 @@ type StatsItemRef = {
|
|
|
2292
2359
|
technicalName: string;
|
|
2293
2360
|
brand: BrandRef;
|
|
2294
2361
|
manufacturer: string;
|
|
2362
|
+
/** @enum {string} */
|
|
2363
|
+
productLine: "tcg" | "accessory" | "collectible" | "boardGame" | "videoGame" | "other";
|
|
2295
2364
|
modelNumber: string | undefined;
|
|
2296
2365
|
category: CategoryRef | undefined;
|
|
2297
2366
|
expansion: ExpansionRef | undefined;
|
|
@@ -2300,7 +2369,7 @@ type StatsItemRef = {
|
|
|
2300
2369
|
* @example JPN
|
|
2301
2370
|
* @enum {string|null}
|
|
2302
2371
|
*/
|
|
2303
|
-
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
2372
|
+
language: "ENG" | "JPN" | "CHI" | "KOR" | "SPA" | "GER" | "FRA" | "ITA" | "POR" | "RUS" | undefined;
|
|
2304
2373
|
alternativeNames: AlternativeName[];
|
|
2305
2374
|
supportsMultipackPricing: boolean;
|
|
2306
2375
|
/**
|
|
@@ -2650,7 +2719,28 @@ declare class BargainsResource {
|
|
|
2650
2719
|
* threshold, card condition/grade, free-text search). Premium. */
|
|
2651
2720
|
search(params?: SearchBargainsParams): Promise<ListResponse<Bargain>>;
|
|
2652
2721
|
}
|
|
2722
|
+
/** The franchises and makers the catalogue carries — what `brand` filters on `cards.list()`,
|
|
2723
|
+
* `products.list()` and `expansions.list()` accept. Read-only: brand rows are rare and deliberate
|
|
2724
|
+
* on the API side, so there is no create/update method here. */
|
|
2725
|
+
declare class BrandsResource {
|
|
2726
|
+
private readonly http;
|
|
2727
|
+
constructor(http: HttpClient);
|
|
2728
|
+
/** `GET /brands`: every brand. Unwrapped to a plain array, nothing to paginate here — same
|
|
2729
|
+
* shape as `expansions.list()`/`shops.list()`. */
|
|
2730
|
+
list(options?: RequestOptions): Promise<Brand[]>;
|
|
2731
|
+
/** `GET /brands/{id}`: fetch one brand by its id or technicalName. */
|
|
2732
|
+
get(idOrTechnicalName: string, options?: RequestOptions): Promise<Brand>;
|
|
2733
|
+
}
|
|
2653
2734
|
interface ListCardsParams extends PaginationParams {
|
|
2735
|
+
/** Brand `id` or technicalName, e.g. `'pokemon'`. Scopes the listing to one game/universe. An
|
|
2736
|
+
* unrecognized value is a 400, not an empty page. */
|
|
2737
|
+
brand?: string;
|
|
2738
|
+
productLine?: ProductLine;
|
|
2739
|
+
}
|
|
2740
|
+
interface GetCardParams extends RequestOptions {
|
|
2741
|
+
/** Brand `id` or technicalName. Disambiguates a `technicalName` two brands both happen to use —
|
|
2742
|
+
* irrelevant while the catalogue carries only one brand, and unused for an `id` lookup. */
|
|
2743
|
+
brand?: string;
|
|
2654
2744
|
}
|
|
2655
2745
|
interface SearchCardsParams extends PaginationParams {
|
|
2656
2746
|
/** Free-text search over card and set names. */
|
|
@@ -2691,6 +2781,11 @@ interface CardDailyStatsParams extends RequestOptions {
|
|
|
2691
2781
|
categoryId?: string;
|
|
2692
2782
|
/** Expansion id (ObjectId), an alternative to `expansion`. */
|
|
2693
2783
|
expansionId?: string;
|
|
2784
|
+
/** Brand technicalName. */
|
|
2785
|
+
brand?: string;
|
|
2786
|
+
/** Brand id (ObjectId), an alternative to `brand`. */
|
|
2787
|
+
brandId?: string;
|
|
2788
|
+
productLine?: ProductLine;
|
|
2694
2789
|
}
|
|
2695
2790
|
/** Filters for `cards.estimatedValues()`. Note `page`/`limit`, not the `limit`/`skip` the rest of
|
|
2696
2791
|
* the API paginates with — this endpoint predates that convention. */
|
|
@@ -2703,6 +2798,11 @@ interface CardEstimatedValuesParams extends RequestOptions {
|
|
|
2703
2798
|
category?: string;
|
|
2704
2799
|
/** Expansion technicalName. */
|
|
2705
2800
|
expansion?: string;
|
|
2801
|
+
/** Brand technicalName. */
|
|
2802
|
+
brand?: string;
|
|
2803
|
+
/** Brand id (ObjectId), an alternative to `brand`. */
|
|
2804
|
+
brandId?: string;
|
|
2805
|
+
productLine?: ProductLine;
|
|
2706
2806
|
}
|
|
2707
2807
|
declare class CardsResource {
|
|
2708
2808
|
private readonly http;
|
|
@@ -2711,8 +2811,9 @@ declare class CardsResource {
|
|
|
2711
2811
|
list(params?: ListCardsParams): Promise<ListResponse<Card>>;
|
|
2712
2812
|
/** `GET /cards/search`: like `list()`, but with free-text search on card and set names. Premium. */
|
|
2713
2813
|
search(params?: SearchCardsParams): Promise<ListResponse<Card>>;
|
|
2714
|
-
/** `GET /cards/{id}`: fetch one card by its id or technicalName.
|
|
2715
|
-
|
|
2814
|
+
/** `GET /cards/{id}`: fetch one card by its id or technicalName. Pass `brand` if two brands
|
|
2815
|
+
* might share the same technicalName — see `GetCardParams`. */
|
|
2816
|
+
get(idOrTechnicalName: string, params?: GetCardParams): Promise<Card>;
|
|
2716
2817
|
/** `GET /cards/{id}/matches`: current shop listings matched to this card (latest per shop). */
|
|
2717
2818
|
matches(idOrTechnicalName: string, params?: CardMatchesParams): Promise<ItemShopMatches>;
|
|
2718
2819
|
/** `GET /cards/{id}/reference-prices`: Cardmarket/TCGplayer/eBay/Tradera price history. Premium. */
|
|
@@ -2746,11 +2847,16 @@ declare class CardsResource {
|
|
|
2746
2847
|
* card-scoped counterpart to `client.priceStats.estimatedValues()`. */
|
|
2747
2848
|
estimatedValues(params?: CardEstimatedValuesParams): Promise<ListResponse<ItemEstimatedValue>>;
|
|
2748
2849
|
}
|
|
2850
|
+
interface ListExpansionsParams extends RequestOptions {
|
|
2851
|
+
/** Brand `id` or technicalName, e.g. `'pokemon'`. An unrecognized value is a 400, not an empty
|
|
2852
|
+
* list. */
|
|
2853
|
+
brand?: string;
|
|
2854
|
+
}
|
|
2749
2855
|
declare class ExpansionsResource {
|
|
2750
2856
|
private readonly http;
|
|
2751
2857
|
constructor(http: HttpClient);
|
|
2752
2858
|
/** `GET /expansions`: every expansion. Unwrapped to a plain array, nothing to paginate here. */
|
|
2753
|
-
list(
|
|
2859
|
+
list(params?: ListExpansionsParams): Promise<Expansion[]>;
|
|
2754
2860
|
/** `GET /expansions/{technicalName}`: metadata only — no cards or sealed products. Returns the
|
|
2755
2861
|
* smaller `ExpansionRef`, not the full `Expansion`: this is a plain lookup by technicalName, not
|
|
2756
2862
|
* the aggregation `list()` runs, so `sealedCount`/`cardCount`/`productCount` aren't available
|
|
@@ -2793,6 +2899,11 @@ interface ProductFilterParams extends RequestOptions {
|
|
|
2793
2899
|
category?: string;
|
|
2794
2900
|
/** Expansion technicalName. */
|
|
2795
2901
|
expansion?: string;
|
|
2902
|
+
/** Brand technicalName. */
|
|
2903
|
+
brand?: string;
|
|
2904
|
+
/** Brand id (ObjectId), an alternative to `brand`. */
|
|
2905
|
+
brandId?: string;
|
|
2906
|
+
productLine?: ProductLine;
|
|
2796
2907
|
}
|
|
2797
2908
|
interface DailyPriceStatsParams extends ProductFilterParams {
|
|
2798
2909
|
/** `YYYY-MM-DD` */
|
|
@@ -2864,6 +2975,15 @@ declare class PriceStatsResource {
|
|
|
2864
2975
|
productDailyByVariant(idOrTechnicalName: string, params: ProductDailyByVariantParams): Promise<ItemVariantDailyStats>;
|
|
2865
2976
|
}
|
|
2866
2977
|
interface ListProductsParams extends PaginationParams {
|
|
2978
|
+
/** Brand `id` or technicalName, e.g. `'pokemon'`. Scopes the listing to one game/universe. An
|
|
2979
|
+
* unrecognized value is a 400, not an empty page. */
|
|
2980
|
+
brand?: string;
|
|
2981
|
+
productLine?: ProductLine;
|
|
2982
|
+
}
|
|
2983
|
+
interface GetProductParams extends RequestOptions {
|
|
2984
|
+
/** Brand `id` or technicalName. Disambiguates a `technicalName` two brands both happen to use —
|
|
2985
|
+
* irrelevant while the catalogue carries only one brand, and unused for an `id` lookup. */
|
|
2986
|
+
brand?: string;
|
|
2867
2987
|
}
|
|
2868
2988
|
interface SearchProductsParams extends PaginationParams {
|
|
2869
2989
|
/** Whitespace-separated tokens, each matched against the start of a word. */
|
|
@@ -2907,6 +3027,11 @@ interface ProductDailyPriceStatsParams extends RequestOptions {
|
|
|
2907
3027
|
categoryId?: string;
|
|
2908
3028
|
/** Expansion id (ObjectId), an alternative to `expansion`. */
|
|
2909
3029
|
expansionId?: string;
|
|
3030
|
+
/** Brand technicalName. */
|
|
3031
|
+
brand?: string;
|
|
3032
|
+
/** Brand id (ObjectId), an alternative to `brand`. */
|
|
3033
|
+
brandId?: string;
|
|
3034
|
+
productLine?: ProductLine;
|
|
2910
3035
|
}
|
|
2911
3036
|
/** Filters for `products.estimatedValues()`. Note `page`/`limit`, not the `limit`/`skip` the rest
|
|
2912
3037
|
* of the API paginates with — this endpoint predates that convention. */
|
|
@@ -2921,6 +3046,11 @@ interface ProductEstimatedValuesParams extends RequestOptions {
|
|
|
2921
3046
|
category?: string;
|
|
2922
3047
|
/** Expansion technicalName. */
|
|
2923
3048
|
expansion?: string;
|
|
3049
|
+
/** Brand technicalName. */
|
|
3050
|
+
brand?: string;
|
|
3051
|
+
/** Brand id (ObjectId), an alternative to `brand`. */
|
|
3052
|
+
brandId?: string;
|
|
3053
|
+
productLine?: ProductLine;
|
|
2924
3054
|
}
|
|
2925
3055
|
/** Sealed products: booster boxes, ETBs, tins, and the like. Single cards live under
|
|
2926
3056
|
* `client.cards` instead. */
|
|
@@ -2932,8 +3062,9 @@ declare class ProductsResource {
|
|
|
2932
3062
|
list(params?: ListProductsParams): Promise<ListResponse<SealedProduct>>;
|
|
2933
3063
|
/** `GET /product/search`: like `list()`, but with free-text search on the product name. Premium. */
|
|
2934
3064
|
search(params?: SearchProductsParams): Promise<ListResponse<SealedProduct>>;
|
|
2935
|
-
/** `GET /product/{id}`: fetch one sealed product by its id or technicalName.
|
|
2936
|
-
|
|
3065
|
+
/** `GET /product/{id}`: fetch one sealed product by its id or technicalName. Pass `brand` if two
|
|
3066
|
+
* brands might share the same technicalName — see `GetProductParams`. */
|
|
3067
|
+
get(idOrTechnicalName: string, params?: GetProductParams): Promise<SealedProduct>;
|
|
2937
3068
|
/** `GET /product/{id}/matches`: current shop listings matched to this product (latest per shop). */
|
|
2938
3069
|
matches(idOrTechnicalName: string, params?: ProductMatchesParams): Promise<ItemShopMatches>;
|
|
2939
3070
|
/** `GET /product/{id}/reference-prices`: Cardmarket/TCGplayer/Tradera price history. Premium. */
|
|
@@ -3153,6 +3284,7 @@ declare class TcgPriser {
|
|
|
3153
3284
|
readonly cards: CardsResource;
|
|
3154
3285
|
readonly products: ProductsResource;
|
|
3155
3286
|
readonly expansions: ExpansionsResource;
|
|
3287
|
+
readonly brands: BrandsResource;
|
|
3156
3288
|
readonly shops: ShopsResource;
|
|
3157
3289
|
readonly shopMatches: ShopMatchesResource;
|
|
3158
3290
|
readonly shopMatchStats: ShopMatchStatsResource;
|
|
@@ -3229,4 +3361,4 @@ declare class TcgPriserError extends Error {
|
|
|
3229
3361
|
creditsRemaining?: number;
|
|
3230
3362
|
});
|
|
3231
3363
|
}
|
|
3232
|
-
export { type Acknowledgement, type AlternativeName, type AssignShopUrlProductParams, type Bargain, type BargainInfo, type BargainProductRef, type BargainReferenceSource, type BrandRef, type Card, type CardDailyStatsParams, type CardEstimatedValuesParams, type CardMatchesParams, type CardPricesParams, type CardReferencePricesParams, type CardType, type CardVariants, type CatalogItem, type CatalogItemPricing, type CatalogSlug, type CategoryRef, type CompareShopPricesParams, type CreateWebhookParams, type CurrencyCode, DEFAULT_BASE_URL, DEFAULT_TIMEOUT_MS, 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 ProductDailyPriceStatsParams, type ProductDailyStatsParams, type ProductEstimatedValuesParams, 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 RequestOptions, type ResourceId, type SealedProduct, type SearchBargainsParams, type SearchCardsParams, type SearchProductsParams, 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, type TcgPriserAdvancedOptions, TcgPriserError, type TcgPriserErrorCode, type TcgPriserOptions, type Timestamp, type TopItem, type TopProductsParams, type VariantPriceStat, type VariantSelector, type VariantStatsSummary, type Webhook, type WebhookDeliveryStatus, type WebhookEvent, type WebhookTestResult, type WebhookWithSecret, type components };
|
|
3364
|
+
export { type Acknowledgement, type AlternativeName, type AssignShopUrlProductParams, type Bargain, type BargainInfo, type BargainProductRef, type BargainReferenceSource, type Brand, type BrandRef, type Card, type CardDailyStatsParams, type CardEstimatedValuesParams, type CardMatchesParams, type CardPricesParams, type CardReferencePricesParams, type CardType, type CardVariants, type CatalogItem, type CatalogItemPricing, type CatalogSlug, type CategoryRef, type CompareShopPricesParams, type CreateWebhookParams, type CurrencyCode, DEFAULT_BASE_URL, DEFAULT_TIMEOUT_MS, 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 ProductDailyPriceStatsParams, type ProductDailyStatsParams, type ProductEstimatedValuesParams, type ProductFilterParams, type ProductLine, 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 RequestOptions, type ResourceId, type SealedProduct, type SearchBargainsParams, type SearchCardsParams, type SearchProductsParams, 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, type TcgPriserAdvancedOptions, TcgPriserError, type TcgPriserErrorCode, type TcgPriserOptions, type Timestamp, type TopItem, type TopProductsParams, type VariantPriceStat, type VariantSelector, type VariantStatsSummary, type Webhook, type WebhookDeliveryStatus, type WebhookEvent, type WebhookTestResult, type WebhookWithSecret, type components };
|