tcgpriser 0.10.0 → 0.13.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/dist/index.d.ts CHANGED
@@ -4,31 +4,69 @@ interface HttpClientOptions {
4
4
  headers?: Record<string, string>;
5
5
  /** Default bearer token for premium endpoints, used when a call doesn't pass its own `authToken`. */
6
6
  authToken?: string;
7
+ /** Default per-request timeout. See `RequestOptions.timeoutMs`. */
8
+ timeoutMs?: number;
7
9
  }
8
- /** Per-call auth override for a premium endpoint, on top of the client's default `authToken`.
9
- * Every premium method takes one of these, either standalone or merged into its params object via
10
- * `splitAuthToken`. */
11
- interface PremiumOptions {
12
- /** Overrides the client's default `authToken` for this call. Pass `undefined` explicitly to
13
- * force an anonymous request even when the client has a default token. */
10
+ /**
11
+ * Per-call overrides, accepted by every method — either standalone or merged into its params object
12
+ * and split back out by `splitRequestOptions`.
13
+ */
14
+ interface RequestOptions {
15
+ /**
16
+ * Overrides the client's default `authToken` for this call. Pass `undefined` explicitly to force
17
+ * an anonymous request even when the client has a default token.
18
+ */
14
19
  authToken?: string;
20
+ /**
21
+ * Cancel the request from outside — a user navigating away, a parent operation being abandoned.
22
+ * Composed with `timeoutMs`, so whichever fires first wins; aborting through this signal rejects
23
+ * with the standard `AbortError`, not a `TcgPriserError`.
24
+ */
25
+ signal?: AbortSignal;
26
+ /**
27
+ * Milliseconds before this request is aborted, overriding the client's default. `0` disables the
28
+ * timeout for this call, which is occasionally right for `expansions.cardsLivePricing()` on a very
29
+ * large set. A timeout rejects with a `TcgPriserError` whose `code` is `'timeout'`.
30
+ */
31
+ timeoutMs?: number;
15
32
  }
16
- /** Thin wrapper around `fetch`: joins the base URL, adds default headers, turns non-2xx responses
17
- * into a `TcgPriserError`. Every resource method goes through this instead of calling `fetch`
18
- * directly. */
33
+ /** @deprecated Renamed to `RequestOptions`, which also carries `signal` and `timeoutMs`. */
34
+ type PremiumOptions = RequestOptions;
35
+ /**
36
+ * Default request timeout.
37
+ *
38
+ * There was none, which meant a connection that opened and then stalled hung the caller forever
39
+ * with no way out: `fetch` has no built-in timeout, and without a `signal` there is nothing to
40
+ * cancel. A minute is well clear of the slowest thing the API does (a whole-expansion live-pricing
41
+ * recompute) while still being a bound.
42
+ */
43
+ declare const DEFAULT_TIMEOUT_MS = 60000;
44
+ /** Thin wrapper around `fetch`: joins the base URL, adds default headers, applies the timeout, turns
45
+ * non-2xx responses into a `TcgPriserError`. Every resource method goes through this instead of
46
+ * calling `fetch` directly. */
19
47
  declare class HttpClient {
20
48
  private readonly baseUrl;
21
49
  private readonly fetchImpl;
22
50
  private readonly defaultHeaders;
23
51
  private readonly defaultAuthToken;
52
+ private readonly defaultTimeoutMs;
53
+ /**
54
+ * The `X-Credits-Remaining` value from the most recent charged response, or `undefined` if no
55
+ * charged call has been made yet. See `TcgPriser.creditsRemaining`.
56
+ */
57
+ creditsRemaining: number | undefined;
24
58
  constructor(options: HttpClientOptions);
25
- get<T>(path: string, requestOptions?: PremiumOptions): Promise<T>;
26
- post<T>(path: string, body: unknown, requestOptions?: PremiumOptions): Promise<T>;
27
- patch<T>(path: string, body: unknown, requestOptions?: PremiumOptions): Promise<T>;
59
+ get<T>(path: string, requestOptions?: RequestOptions): Promise<T>;
60
+ post<T>(path: string, body: unknown, requestOptions?: RequestOptions): Promise<T>;
61
+ patch<T>(path: string, body: unknown, requestOptions?: RequestOptions): Promise<T>;
62
+ delete<T>(path: string, requestOptions?: RequestOptions): Promise<T>;
28
63
  private request;
29
64
  }
30
65
  interface components {
31
66
  schemas: {
67
+ Acknowledgement: {
68
+ message: string;
69
+ };
32
70
  AlternativeName: {
33
71
  name: string;
34
72
  shortName: string | undefined;
@@ -1078,6 +1116,70 @@ interface components {
1078
1116
  looseCount: number;
1079
1117
  gradedCount: number;
1080
1118
  };
1119
+ Webhook: {
1120
+ /**
1121
+ * @description Resource identifier
1122
+ * @example 6a577711abc1ce71383d3e10
1123
+ */
1124
+ id: string;
1125
+ url: string;
1126
+ events: components["schemas"]["WebhookEvent"][];
1127
+ isActive: boolean;
1128
+ /**
1129
+ * Format: date-time
1130
+ * @example 2026-07-15T12:03:29.322Z
1131
+ */
1132
+ lastDeliveryAt: string | undefined;
1133
+ /** @enum {string|null} */
1134
+ lastDeliveryStatus: "success" | "failed" | undefined;
1135
+ /**
1136
+ * Format: date-time
1137
+ * @example 2026-07-15T12:03:29.322Z
1138
+ */
1139
+ createdAt: string;
1140
+ /**
1141
+ * Format: date-time
1142
+ * @example 2026-07-15T12:03:29.322Z
1143
+ */
1144
+ updatedAt: string;
1145
+ };
1146
+ /** @enum {string} */
1147
+ WebhookEvent: "price.updated" | "bargain.found" | "product.created" | "card.created";
1148
+ WebhookList: {
1149
+ data: components["schemas"]["Webhook"][];
1150
+ pagination: components["schemas"]["PageMeta"];
1151
+ };
1152
+ WebhookSecret: {
1153
+ /**
1154
+ * @description Resource identifier
1155
+ * @example 6a577711abc1ce71383d3e10
1156
+ */
1157
+ id: string;
1158
+ url: string;
1159
+ events: components["schemas"]["WebhookEvent"][];
1160
+ isActive: boolean;
1161
+ /**
1162
+ * Format: date-time
1163
+ * @example 2026-07-15T12:03:29.322Z
1164
+ */
1165
+ lastDeliveryAt: string | undefined;
1166
+ /** @enum {string|null} */
1167
+ lastDeliveryStatus: "success" | "failed" | undefined;
1168
+ /**
1169
+ * Format: date-time
1170
+ * @example 2026-07-15T12:03:29.322Z
1171
+ */
1172
+ createdAt: string;
1173
+ /**
1174
+ * Format: date-time
1175
+ * @example 2026-07-15T12:03:29.322Z
1176
+ */
1177
+ updatedAt: string;
1178
+ secret: string;
1179
+ };
1180
+ WebhookTestResult: {
1181
+ message: string;
1182
+ };
1081
1183
  };
1082
1184
  responses: never;
1083
1185
  parameters: never;
@@ -1198,8 +1300,14 @@ interface ListResponse<T> {
1198
1300
  data: T[];
1199
1301
  pagination: PageMeta;
1200
1302
  }
1201
- /** Query params shared by every offset-paginated list endpoint. */
1202
- interface PaginationParams {
1303
+ /**
1304
+ * Query params shared by every offset-paginated list endpoint.
1305
+ *
1306
+ * Extends `RequestOptions` so `signal` and `timeoutMs` can be passed inline alongside the filters,
1307
+ * rather than as a second argument on some methods and a merged field on others. `splitRequestOptions`
1308
+ * strips them back out before the query string is built, so they never reach the URL.
1309
+ */
1310
+ interface PaginationParams extends RequestOptions {
1203
1311
  limit?: number;
1204
1312
  skip?: number;
1205
1313
  }
@@ -1478,6 +1586,17 @@ type CardVariants = {
1478
1586
  firstEdition: boolean;
1479
1587
  wPromo: boolean;
1480
1588
  };
1589
+ /** One entry from `client.cards.technicalNames()` / `client.products.technicalNames()`: a slug and
1590
+ * when that item last changed. Enough to build a sitemap or decide what to re-fetch, without paying
1591
+ * for the full catalog page. */
1592
+ type CatalogSlug = {
1593
+ technicalName: string;
1594
+ /**
1595
+ * Format: date-time
1596
+ * @example 2026-07-15T12:03:29.322Z
1597
+ */
1598
+ updatedAt: string;
1599
+ };
1481
1600
  /** The compact item reference used inside flat shop-match rows (`client.shopMatches.list()` /
1482
1601
  * `.forShop()`), enough to render a result list, not the full `CatalogItem`. */
1483
1602
  type MatchedItemRef = {
@@ -2417,11 +2536,93 @@ type ShopUrlMutationResult = {
2417
2536
  message: string;
2418
2537
  shopUrl: ShopUrl;
2419
2538
  };
2420
- interface ListBargainsParams {
2539
+ /**
2540
+ * Types for the Business tier: outbound webhooks, the one feature that distinguishes Business from
2541
+ * Premium. Everything here needs a Business subscriber's API token — a Premium token answers
2542
+ * `403 businessRequired`.
2543
+ *
2544
+ * Derived from `src/generated/openapi.d.ts`, same as everything else in this directory.
2545
+ */
2546
+ /** One registered webhook, as returned by `client.webhooks.list()`. Never carries the signing
2547
+ * secret — see `WebhookWithSecret`, which is returned exactly once at registration. */
2548
+ type Webhook = {
2549
+ /**
2550
+ * @description Resource identifier
2551
+ * @example 6a577711abc1ce71383d3e10
2552
+ */
2553
+ id: string;
2554
+ url: string;
2555
+ events: WebhookEvent[];
2556
+ isActive: boolean;
2557
+ /**
2558
+ * Format: date-time
2559
+ * @example 2026-07-15T12:03:29.322Z
2560
+ */
2561
+ lastDeliveryAt: string | undefined;
2562
+ /** @enum {string|null} */
2563
+ lastDeliveryStatus: "success" | "failed" | undefined;
2564
+ /**
2565
+ * Format: date-time
2566
+ * @example 2026-07-15T12:03:29.322Z
2567
+ */
2568
+ createdAt: string;
2569
+ /**
2570
+ * Format: date-time
2571
+ * @example 2026-07-15T12:03:29.322Z
2572
+ */
2573
+ updatedAt: string;
2574
+ };
2575
+ /** The catalog-wide events a webhook can subscribe to. */
2576
+ type WebhookEvent = "price.updated" | "bargain.found" | "product.created" | "card.created";
2577
+ /** Whether the most recent delivery attempt succeeded. `undefined` until the first attempt. */
2578
+ type WebhookDeliveryStatus = "success" | "failed";
2579
+ /**
2580
+ * What `client.webhooks.create()` returns: a `Webhook` plus the `secret` used to sign deliveries.
2581
+ *
2582
+ * The secret is returned by that one call and never again — there is no endpoint that reads it
2583
+ * back, by design. Store it when you create the webhook; if you lose it, delete the webhook and
2584
+ * register a new one.
2585
+ */
2586
+ type WebhookWithSecret = {
2587
+ /**
2588
+ * @description Resource identifier
2589
+ * @example 6a577711abc1ce71383d3e10
2590
+ */
2591
+ id: string;
2592
+ url: string;
2593
+ events: WebhookEvent[];
2594
+ isActive: boolean;
2595
+ /**
2596
+ * Format: date-time
2597
+ * @example 2026-07-15T12:03:29.322Z
2598
+ */
2599
+ lastDeliveryAt: string | undefined;
2600
+ /** @enum {string|null} */
2601
+ lastDeliveryStatus: "success" | "failed" | undefined;
2602
+ /**
2603
+ * Format: date-time
2604
+ * @example 2026-07-15T12:03:29.322Z
2605
+ */
2606
+ createdAt: string;
2607
+ /**
2608
+ * Format: date-time
2609
+ * @example 2026-07-15T12:03:29.322Z
2610
+ */
2611
+ updatedAt: string;
2612
+ secret: string;
2613
+ };
2614
+ /** Response of `client.webhooks.test()`. */
2615
+ type WebhookTestResult = {
2616
+ message: string;
2617
+ };
2618
+ /** Response of `client.webhooks.delete()`. */
2619
+ type Acknowledgement = {
2620
+ message: string;
2621
+ };
2622
+ interface ListBargainsParams extends RequestOptions {
2421
2623
  type?: 'sealed' | 'card' | 'all';
2422
2624
  }
2423
2625
  interface SearchBargainsParams extends PaginationParams {
2424
- authToken?: string;
2425
2626
  type?: 'sealed' | 'card' | 'all';
2426
2627
  /** Filter by shop technicalName. */
2427
2628
  shop?: string;
@@ -2450,6 +2651,8 @@ declare class BargainsResource {
2450
2651
  search(params?: SearchBargainsParams): Promise<ListResponse<Bargain>>;
2451
2652
  }
2452
2653
  interface ListCardsParams extends PaginationParams {
2654
+ }
2655
+ interface SearchCardsParams extends PaginationParams {
2453
2656
  /** Free-text search over card and set names. */
2454
2657
  search?: string;
2455
2658
  }
@@ -2457,7 +2660,7 @@ interface CardMatchesParams extends PaginationParams {
2457
2660
  /** Keep only matches whose shop currently has stock. */
2458
2661
  inStock?: boolean;
2459
2662
  }
2460
- interface CardReferencePricesParams {
2663
+ interface CardReferencePricesParams extends RequestOptions {
2461
2664
  /** Bearer token for this call. Overrides the client's default `authToken`. */
2462
2665
  authToken?: string;
2463
2666
  /** Rolling window ending today, in days. Ignored when `from`/`to` are supplied. Default 90. */
@@ -2471,15 +2674,45 @@ interface CardReferencePricesParams {
2471
2674
  variant?: ReferencePriceCardVariant;
2472
2675
  }
2473
2676
  interface CardPricesParams extends PaginationParams {
2474
- authToken?: string;
2677
+ }
2678
+ /** Filters for `cards.dailyStats()`. Narrow to one card, or to a whole expansion/category. */
2679
+ interface CardDailyStatsParams extends RequestOptions {
2680
+ /** `YYYY-MM-DD` */
2681
+ startDate?: string;
2682
+ /** `YYYY-MM-DD` */
2683
+ endDate?: string;
2684
+ productName?: string;
2685
+ technicalName?: string;
2686
+ /** Category technicalName. */
2687
+ category?: string;
2688
+ /** Expansion technicalName. */
2689
+ expansion?: string;
2690
+ /** Category id (ObjectId), an alternative to `category`. */
2691
+ categoryId?: string;
2692
+ /** Expansion id (ObjectId), an alternative to `expansion`. */
2693
+ expansionId?: string;
2694
+ }
2695
+ /** Filters for `cards.estimatedValues()`. Note `page`/`limit`, not the `limit`/`skip` the rest of
2696
+ * the API paginates with — this endpoint predates that convention. */
2697
+ interface CardEstimatedValuesParams extends RequestOptions {
2698
+ page?: number;
2699
+ limit?: number;
2700
+ productName?: string;
2701
+ technicalName?: string;
2702
+ /** Category technicalName. */
2703
+ category?: string;
2704
+ /** Expansion technicalName. */
2705
+ expansion?: string;
2475
2706
  }
2476
2707
  declare class CardsResource {
2477
2708
  private readonly http;
2478
2709
  constructor(http: HttpClient);
2479
- /** `GET /cards`: search or list cards. */
2710
+ /** `GET /cards`: list cards, newest first. No free-text search — use `search()` for that. */
2480
2711
  list(params?: ListCardsParams): Promise<ListResponse<Card>>;
2712
+ /** `GET /cards/search`: like `list()`, but with free-text search on card and set names. Premium. */
2713
+ search(params?: SearchCardsParams): Promise<ListResponse<Card>>;
2481
2714
  /** `GET /cards/{id}`: fetch one card by its id or technicalName. */
2482
- get(idOrTechnicalName: string): Promise<Card>;
2715
+ get(idOrTechnicalName: string, options?: RequestOptions): Promise<Card>;
2483
2716
  /** `GET /cards/{id}/matches`: current shop listings matched to this card (latest per shop). */
2484
2717
  matches(idOrTechnicalName: string, params?: CardMatchesParams): Promise<ItemShopMatches>;
2485
2718
  /** `GET /cards/{id}/reference-prices`: Cardmarket/TCGplayer/eBay/Tradera price history. Premium. */
@@ -2488,58 +2721,70 @@ declare class CardsResource {
2488
2721
  prices(idOrTechnicalName: string, params?: CardPricesParams): Promise<ItemSoldPrices>;
2489
2722
  /** `GET /cards/{id}/pricing/live`: computed fresh for this request, not read from the last
2490
2723
  * stats job. Premium. */
2491
- livePricing(idOrTechnicalName: string, options?: PremiumOptions): Promise<LivePricingForItem>;
2724
+ livePricing(idOrTechnicalName: string, options?: RequestOptions): Promise<LivePricingForItem>;
2492
2725
  /** `GET /cards/{id}/pricing`: this card's current pricing snapshot — `retailPrice`,
2493
2726
  * `estimatedValue`, `lowestShopOffer`, `referencePriceSnapshotsByProvider` — refreshed once a day
2494
2727
  * by the nightly pricing/scraper jobs. `get()` returns content only; this is the separate,
2495
2728
  * shorter-cached call for the part of a card that actually changes day to day. */
2496
- pricing(idOrTechnicalName: string): Promise<CatalogItemPricing>;
2729
+ pricing(idOrTechnicalName: string, options?: RequestOptions): Promise<CatalogItemPricing>;
2497
2730
  /** `GET /cards/pricing`: pricing for up to 200 cards in one request, keyed by `id` — the batch
2498
2731
  * counterpart to `pricing()`, for a page of results (a search page, an expansion's contents) that
2499
2732
  * needs pricing for many items at once. Unlike `get()`/`pricing()`, this only accepts `id`s, not
2500
2733
  * technicalNames — pass the `id`s already on the cards you fetched. Ids with no match are
2501
2734
  * silently omitted from the result rather than causing an error. */
2502
- pricingBatch(ids: string[]): Promise<ListResponse<CatalogItemPricing>>;
2735
+ pricingBatch(ids: string[], options?: RequestOptions): Promise<ListResponse<CatalogItemPricing>>;
2736
+ /** `GET /cards/technical-names`: every card's `technicalName` and `updatedAt`, unpaginated and
2737
+ * with no pricing joins. Built for enumerating the whole catalog cheaply — a sitemap, or working
2738
+ * out which items changed since your last sync — where `list()` would make you page through full
2739
+ * card documents to learn the same two fields. */
2740
+ technicalNames(options?: RequestOptions): Promise<ListResponse<CatalogSlug>>;
2741
+ /** `GET /cards/price-stats/daily`: daily average price history, cards only. The same data as
2742
+ * `client.priceStats.daily()`, scoped to the card catalog so a filter like `expansion` can't pull
2743
+ * in that expansion's sealed products too. */
2744
+ dailyStats(params?: CardDailyStatsParams): Promise<ListResponse<ItemDailyStats>>;
2745
+ /** `GET /cards/price-stats/estimated-values`: current estimated market value, cards only. The
2746
+ * card-scoped counterpart to `client.priceStats.estimatedValues()`. */
2747
+ estimatedValues(params?: CardEstimatedValuesParams): Promise<ListResponse<ItemEstimatedValue>>;
2503
2748
  }
2504
2749
  declare class ExpansionsResource {
2505
2750
  private readonly http;
2506
2751
  constructor(http: HttpClient);
2507
2752
  /** `GET /expansions`: every expansion. Unwrapped to a plain array, nothing to paginate here. */
2508
- list(): Promise<Expansion[]>;
2753
+ list(options?: RequestOptions): Promise<Expansion[]>;
2509
2754
  /** `GET /expansions/{technicalName}`: metadata only — no cards or sealed products. Returns the
2510
2755
  * smaller `ExpansionRef`, not the full `Expansion`: this is a plain lookup by technicalName, not
2511
2756
  * the aggregation `list()` runs, so `sealedCount`/`cardCount`/`productCount` aren't available
2512
2757
  * here. See `cards()` and `sealedProducts()` for this expansion's contents. */
2513
- get(technicalName: string): Promise<ExpansionRef>;
2758
+ get(technicalName: string, options?: RequestOptions): Promise<ExpansionRef>;
2514
2759
  /** `GET /expansions/{technicalName}/cards`: every card in this expansion. Content only, no
2515
2760
  * pricing fields — pass the `id`s from the result to `client.cards.pricingBatch()` if you need
2516
2761
  * pricing too. Sealed products are a separate call — see `sealedProducts()` — never merged into
2517
2762
  * this one. */
2518
- cards(technicalName: string): Promise<ListResponse<Card>>;
2763
+ cards(technicalName: string, options?: RequestOptions): Promise<ListResponse<Card>>;
2519
2764
  /** `GET /expansions/{technicalName}/products`: every sealed product in this expansion. Content
2520
2765
  * only, no pricing fields — pass the `id`s from the result to `client.products.pricingBatch()`
2521
2766
  * if you need pricing too. Cards are a separate call — see `cards()` — never merged into this
2522
2767
  * one. */
2523
- sealedProducts(technicalName: string): Promise<ListResponse<SealedProduct>>;
2768
+ sealedProducts(technicalName: string, options?: RequestOptions): Promise<ListResponse<SealedProduct>>;
2524
2769
  /** `GET /expansions/{technicalName}/cards/live-pricing`: computed fresh for every card in this
2525
2770
  * expansion, not read from the last stats job. Premium. */
2526
- cardsLivePricing(technicalName: string, options?: PremiumOptions): Promise<ExpansionLivePricing>;
2771
+ cardsLivePricing(technicalName: string, options?: RequestOptions): Promise<ExpansionLivePricing>;
2527
2772
  /** `GET /expansions/{technicalName}/products/live-pricing`: computed fresh for every sealed
2528
2773
  * product in this expansion, not read from the last stats job. Premium. */
2529
- productsLivePricing(technicalName: string, options?: PremiumOptions): Promise<ExpansionLivePricing>;
2774
+ productsLivePricing(technicalName: string, options?: RequestOptions): Promise<ExpansionLivePricing>;
2530
2775
  }
2531
2776
  declare class PackRatesResource {
2532
2777
  private readonly http;
2533
2778
  constructor(http: HttpClient);
2534
2779
  /** `GET /pack-rates`: pull-rate odds for every expansion that has them. Unwrapped to a plain
2535
2780
  * array, nothing to paginate here. */
2536
- list(): Promise<PackRate[]>;
2781
+ list(options?: RequestOptions): Promise<PackRate[]>;
2537
2782
  /** `GET /pack-rates/{expansionId}`: pull-rate odds for one expansion. */
2538
- get(expansionId: string): Promise<PackRate>;
2783
+ get(expansionId: string, options?: RequestOptions): Promise<PackRate>;
2539
2784
  }
2540
2785
  /** Filters shared by `daily()` and `estimatedValues()`: all narrow which product(s) the stats
2541
2786
  * cover; combine as many as you like. */
2542
- interface ProductFilterParams {
2787
+ interface ProductFilterParams extends RequestOptions {
2543
2788
  productName?: string;
2544
2789
  technicalName?: string;
2545
2790
  priceChartingId?: string;
@@ -2563,21 +2808,18 @@ interface EstimatedValuesParams extends ProductFilterParams {
2563
2808
  page?: number;
2564
2809
  limit?: number;
2565
2810
  }
2566
- interface TopProductsParams {
2811
+ interface TopProductsParams extends RequestOptions {
2567
2812
  limit?: number;
2568
2813
  }
2569
- interface ProductDailyStatsParams {
2570
- authToken?: string;
2814
+ interface ProductDailyStatsParams extends RequestOptions {
2571
2815
  /** Number of days to retrieve, from today backwards. Default 30. */
2572
2816
  days?: number;
2573
2817
  }
2574
- interface ProductByVariantParams {
2575
- authToken?: string;
2818
+ interface ProductByVariantParams extends RequestOptions {
2576
2819
  /** Number of days to include in the average calculation. Default 30. */
2577
2820
  days?: number;
2578
2821
  }
2579
- interface ProductDailyByVariantParams {
2580
- authToken?: string;
2822
+ interface ProductDailyByVariantParams extends RequestOptions {
2581
2823
  cardType: CardType;
2582
2824
  /** Required when `cardType` is `'loose'`. */
2583
2825
  condition?: ItemCondition;
@@ -2601,18 +2843,18 @@ declare class PriceStatsResource {
2601
2843
  topProducts(params?: TopProductsParams): Promise<ListResponse<TopItem>>;
2602
2844
  /** `GET /price-stats/product/{id}`: daily price history, current estimate, and a variant-count
2603
2845
  * summary for one product. Premium. */
2604
- product(idOrTechnicalName: string, options?: PremiumOptions): Promise<ItemStats>;
2846
+ product(idOrTechnicalName: string, options?: RequestOptions): Promise<ItemStats>;
2605
2847
  /** `GET /price-stats/product/{id}/full`: everything `product()` has, plus the item's current
2606
2848
  * shop matches. Premium. */
2607
- productFull(idOrTechnicalName: string, options?: PremiumOptions): Promise<ItemFullStats>;
2849
+ productFull(idOrTechnicalName: string, options?: RequestOptions): Promise<ItemFullStats>;
2608
2850
  /** `GET /price-stats/product/{id}/daily`: daily price history for one product, with a
2609
2851
  * caller-chosen window. Premium. */
2610
2852
  productDaily(idOrTechnicalName: string, params?: ProductDailyStatsParams): Promise<ItemDailyStats>;
2611
2853
  /** `GET /price-stats/product/{id}/daily-last-30`: daily price history for the last 30 days
2612
2854
  * exactly (no window param, for callers that want a stable cache key). Premium. */
2613
- productDailyLast30(idOrTechnicalName: string, options?: PremiumOptions): Promise<ItemDailyStats>;
2855
+ productDailyLast30(idOrTechnicalName: string, options?: RequestOptions): Promise<ItemDailyStats>;
2614
2856
  /** `GET /price-stats/product/{id}/estimated-value`: current estimated value only. Premium. */
2615
- productEstimatedValue(idOrTechnicalName: string, options?: PremiumOptions): Promise<ItemEstimatedValue>;
2857
+ productEstimatedValue(idOrTechnicalName: string, options?: RequestOptions): Promise<ItemEstimatedValue>;
2616
2858
  /** `GET /price-stats/product/{id}/by-variant`: price stats broken out per card condition/grade.
2617
2859
  * Premium. */
2618
2860
  productByVariant(idOrTechnicalName: string, params?: ProductByVariantParams): Promise<ItemVariantStats>;
@@ -2622,6 +2864,8 @@ declare class PriceStatsResource {
2622
2864
  productDailyByVariant(idOrTechnicalName: string, params: ProductDailyByVariantParams): Promise<ItemVariantDailyStats>;
2623
2865
  }
2624
2866
  interface ListProductsParams extends PaginationParams {
2867
+ }
2868
+ interface SearchProductsParams extends PaginationParams {
2625
2869
  /** Whitespace-separated tokens, each matched against the start of a word. */
2626
2870
  search?: string;
2627
2871
  }
@@ -2633,7 +2877,7 @@ interface ProductMatchesParams extends PaginationParams {
2633
2877
  gradingCompany?: GradingCompany;
2634
2878
  grade?: number;
2635
2879
  }
2636
- interface ProductReferencePricesParams {
2880
+ interface ProductReferencePricesParams extends RequestOptions {
2637
2881
  authToken?: string;
2638
2882
  /** Rolling window ending today, in days. Ignored when `from`/`to` are supplied. Default 90. */
2639
2883
  days?: number;
@@ -2644,17 +2888,52 @@ interface ProductReferencePricesParams {
2644
2888
  provider?: ReferencePriceProvider;
2645
2889
  }
2646
2890
  interface ProductPricesParams extends PaginationParams {
2647
- authToken?: string;
2891
+ }
2892
+ /** Filters for `products.dailyStats()`. Narrow to one product, or to a whole expansion/category. */
2893
+ interface ProductDailyPriceStatsParams extends RequestOptions {
2894
+ /** `YYYY-MM-DD` */
2895
+ startDate?: string;
2896
+ /** `YYYY-MM-DD` */
2897
+ endDate?: string;
2898
+ productName?: string;
2899
+ technicalName?: string;
2900
+ priceChartingId?: string;
2901
+ modelNumber?: string;
2902
+ /** Category technicalName. */
2903
+ category?: string;
2904
+ /** Expansion technicalName. */
2905
+ expansion?: string;
2906
+ /** Category id (ObjectId), an alternative to `category`. */
2907
+ categoryId?: string;
2908
+ /** Expansion id (ObjectId), an alternative to `expansion`. */
2909
+ expansionId?: string;
2910
+ }
2911
+ /** Filters for `products.estimatedValues()`. Note `page`/`limit`, not the `limit`/`skip` the rest
2912
+ * of the API paginates with — this endpoint predates that convention. */
2913
+ interface ProductEstimatedValuesParams extends RequestOptions {
2914
+ page?: number;
2915
+ limit?: number;
2916
+ productName?: string;
2917
+ technicalName?: string;
2918
+ priceChartingId?: string;
2919
+ modelNumber?: string;
2920
+ /** Category technicalName. */
2921
+ category?: string;
2922
+ /** Expansion technicalName. */
2923
+ expansion?: string;
2648
2924
  }
2649
2925
  /** Sealed products: booster boxes, ETBs, tins, and the like. Single cards live under
2650
2926
  * `client.cards` instead. */
2651
2927
  declare class ProductsResource {
2652
2928
  private readonly http;
2653
2929
  constructor(http: HttpClient);
2654
- /** `GET /product`: search or list sealed products. */
2930
+ /** `GET /product`: list sealed products, newest first. No free-text search — use `search()` for
2931
+ * that. */
2655
2932
  list(params?: ListProductsParams): Promise<ListResponse<SealedProduct>>;
2933
+ /** `GET /product/search`: like `list()`, but with free-text search on the product name. Premium. */
2934
+ search(params?: SearchProductsParams): Promise<ListResponse<SealedProduct>>;
2656
2935
  /** `GET /product/{id}`: fetch one sealed product by its id or technicalName. */
2657
- get(idOrTechnicalName: string): Promise<SealedProduct>;
2936
+ get(idOrTechnicalName: string, options?: RequestOptions): Promise<SealedProduct>;
2658
2937
  /** `GET /product/{id}/matches`: current shop listings matched to this product (latest per shop). */
2659
2938
  matches(idOrTechnicalName: string, params?: ProductMatchesParams): Promise<ItemShopMatches>;
2660
2939
  /** `GET /product/{id}/reference-prices`: Cardmarket/TCGplayer/Tradera price history. Premium. */
@@ -2663,21 +2942,31 @@ declare class ProductsResource {
2663
2942
  prices(idOrTechnicalName: string, params?: ProductPricesParams): Promise<ItemSoldPrices>;
2664
2943
  /** `GET /product/{id}/pricing/live`: computed fresh for this request, not read from the last
2665
2944
  * stats job. Premium. */
2666
- livePricing(idOrTechnicalName: string, options?: PremiumOptions): Promise<LivePricingForItem>;
2945
+ livePricing(idOrTechnicalName: string, options?: RequestOptions): Promise<LivePricingForItem>;
2667
2946
  /** `GET /product/{id}/pricing`: this product's current pricing snapshot — `retailPrice`,
2668
2947
  * `estimatedValue`, `lowestShopOffer`, `referencePriceSnapshotsByProvider` — refreshed once a day
2669
2948
  * by the nightly pricing/scraper jobs. `get()` returns content only; this is the separate,
2670
2949
  * shorter-cached call for the part of a product that actually changes day to day. */
2671
- pricing(idOrTechnicalName: string): Promise<CatalogItemPricing>;
2950
+ pricing(idOrTechnicalName: string, options?: RequestOptions): Promise<CatalogItemPricing>;
2672
2951
  /** `GET /product/pricing`: pricing for up to 200 sealed products in one request, keyed by `id` —
2673
2952
  * the batch counterpart to `pricing()`, for a page of results (a search page, an expansion's
2674
2953
  * contents) that needs pricing for many items at once. Unlike `get()`/`pricing()`, this only
2675
2954
  * accepts `id`s, not technicalNames — pass the `id`s already on the products you fetched. Ids with
2676
2955
  * no match are silently omitted from the result rather than causing an error. */
2677
- pricingBatch(ids: string[]): Promise<ListResponse<CatalogItemPricing>>;
2956
+ pricingBatch(ids: string[], options?: RequestOptions): Promise<ListResponse<CatalogItemPricing>>;
2957
+ /** `GET /product/technical-names`: every sealed product's `technicalName` and `updatedAt`,
2958
+ * unpaginated and with no pricing joins. The sealed counterpart to
2959
+ * `client.cards.technicalNames()` — for sitemaps and incremental syncs. */
2960
+ technicalNames(options?: RequestOptions): Promise<ListResponse<CatalogSlug>>;
2961
+ /** `GET /product/price-stats/daily`: daily average price history, sealed products only. The same
2962
+ * data as `client.priceStats.daily()`, scoped to the sealed catalog so a filter like `expansion`
2963
+ * can't pull in that expansion's single cards too. */
2964
+ dailyStats(params?: ProductDailyPriceStatsParams): Promise<ListResponse<ItemDailyStats>>;
2965
+ /** `GET /product/price-stats/estimated-values`: current estimated market value, sealed products
2966
+ * only. The sealed-scoped counterpart to `client.priceStats.estimatedValues()`. */
2967
+ estimatedValues(params?: ProductEstimatedValuesParams): Promise<ListResponse<ItemEstimatedValue>>;
2678
2968
  }
2679
- interface ShopMatchStatsForProductParams {
2680
- authToken?: string;
2969
+ interface ShopMatchStatsForProductParams extends RequestOptions {
2681
2970
  /** `YYYY-MM-DD` */
2682
2971
  startDate?: string;
2683
2972
  /** `YYYY-MM-DD` */
@@ -2685,8 +2974,7 @@ interface ShopMatchStatsForProductParams {
2685
2974
  /** Filter to one shop's technicalName. */
2686
2975
  shop?: string;
2687
2976
  }
2688
- interface ShopMatchStatsForShopParams {
2689
- authToken?: string;
2977
+ interface ShopMatchStatsForShopParams extends RequestOptions {
2690
2978
  /** `YYYY-MM-DD` */
2691
2979
  startDate?: string;
2692
2980
  /** `YYYY-MM-DD` */
@@ -2694,8 +2982,7 @@ interface ShopMatchStatsForShopParams {
2694
2982
  /** Maximum products to return. Default 20, max 50. */
2695
2983
  limit?: number;
2696
2984
  }
2697
- interface CompareShopPricesParams {
2698
- authToken?: string;
2985
+ interface CompareShopPricesParams extends RequestOptions {
2699
2986
  /** Product/card id or technicalName. */
2700
2987
  productId: string;
2701
2988
  /** `YYYY-MM-DD`: defaults to the latest date with data. */
@@ -2738,12 +3025,12 @@ declare class ShopMatchesResource {
2738
3025
  /** `GET /shop-matches/shops`: match counts per shop (based on latest records only). */
2739
3026
  shopStats(params?: PaginationParams): Promise<ListResponse<ShopMatchStats>>;
2740
3027
  }
2741
- interface SubmitShopUrlParams extends PremiumOptions {
3028
+ interface SubmitShopUrlParams extends RequestOptions {
2742
3029
  url: string;
2743
3030
  /** Shop technicalName. Auto-created if it doesn't exist yet. */
2744
3031
  shop: string;
2745
3032
  }
2746
- interface AssignShopUrlProductParams extends PremiumOptions {
3033
+ interface AssignShopUrlProductParams extends RequestOptions {
2747
3034
  /** Product/card id to link, or `null` to unlink and let auto-matching resume. */
2748
3035
  productId: string | null;
2749
3036
  }
@@ -2757,7 +3044,7 @@ declare class ShopUrlsResource {
2757
3044
  /** `PATCH /shop-urls/{id}/product`: manually assign (or clear) the product a shop URL resolves to. */
2758
3045
  assignProduct(shopUrlId: string, params: AssignShopUrlProductParams): Promise<ShopUrlMutationResult>;
2759
3046
  }
2760
- interface ListShopsParams {
3047
+ interface ListShopsParams extends RequestOptions {
2761
3048
  active?: boolean;
2762
3049
  }
2763
3050
  declare class ShopsResource {
@@ -2766,13 +3053,48 @@ declare class ShopsResource {
2766
3053
  /** `GET /shops`: every tracked shop. Unwrapped to a plain array, nothing to paginate here. */
2767
3054
  list(params?: ListShopsParams): Promise<Shop[]>;
2768
3055
  /** `GET /shops/{id}`: fetch one shop by its id or technicalName. */
2769
- get(idOrTechnicalName: string): Promise<Shop>;
3056
+ get(idOrTechnicalName: string, options?: RequestOptions): Promise<Shop>;
2770
3057
  }
2771
3058
  declare class StatsResource {
2772
3059
  private readonly http;
2773
3060
  constructor(http: HttpClient);
2774
3061
  /** `GET /stats`: platform-wide overview counts (shops, expansions, products, prices tracked). */
2775
- platform(): Promise<PlatformStats>;
3062
+ platform(options?: RequestOptions): Promise<PlatformStats>;
3063
+ }
3064
+ interface CreateWebhookParams extends RequestOptions {
3065
+ /**
3066
+ * Where deliveries are POSTed. Must be `https://` — the API rejects plaintext, since a delivery
3067
+ * carries the signature that authenticates it.
3068
+ */
3069
+ url: string;
3070
+ /** At least one event to subscribe to. */
3071
+ events: WebhookEvent[];
3072
+ }
3073
+ /**
3074
+ * Outbound webhooks: the API calls you when something changes, instead of you polling for it.
3075
+ *
3076
+ * Business tier, not Premium — a Premium token answers `403 businessRequired`. The feature is also
3077
+ * behind a server-side flag, and when that flag is off these answer `404 notFound` rather than 403,
3078
+ * so a `notFound` here means "not enabled on this instance", not "wrong id".
3079
+ */
3080
+ declare class WebhooksResource {
3081
+ private readonly http;
3082
+ constructor(http: HttpClient);
3083
+ /**
3084
+ * `POST /webhooks`: register a new webhook.
3085
+ *
3086
+ * The returned `secret` is the only copy you will ever get — sign-verification depends on it and
3087
+ * no endpoint reads it back. Persist it here, at creation, or delete the webhook and make a new
3088
+ * one.
3089
+ */
3090
+ create(params: CreateWebhookParams): Promise<WebhookWithSecret>;
3091
+ /** `GET /webhooks`: every webhook registered on this account. Secrets are never included. */
3092
+ list(options?: RequestOptions): Promise<ListResponse<Webhook>>;
3093
+ /** `DELETE /webhooks/{id}`: revoke a webhook. Deliveries stop immediately; its secret is void. */
3094
+ delete(webhookId: string, options?: RequestOptions): Promise<Acknowledgement>;
3095
+ /** `POST /webhooks/{id}/test`: send a sample delivery to the registered URL, so you can verify
3096
+ * your endpoint and your signature check before waiting on a real event. */
3097
+ test(webhookId: string, options?: RequestOptions): Promise<WebhookTestResult>;
2776
3098
  }
2777
3099
  declare const DEFAULT_BASE_URL = "https://api.tcgpriser.se";
2778
3100
  /** Local dev, self-hosting and testing overrides. Most integrations never touch these. */
@@ -2783,6 +3105,12 @@ interface TcgPriserAdvancedOptions {
2783
3105
  headers?: Record<string, string>;
2784
3106
  /** Swap in a different `fetch` (older Node, testing, a proxying agent). Defaults to global `fetch`. */
2785
3107
  fetch?: typeof fetch;
3108
+ /**
3109
+ * Default milliseconds before a request is aborted, for every call this client makes. Defaults to
3110
+ * `DEFAULT_TIMEOUT_MS` (60s). `0` disables the timeout entirely. Every method can override it per
3111
+ * call with `timeoutMs`.
3112
+ */
3113
+ timeoutMs?: number;
2786
3114
  }
2787
3115
  interface TcgPriserOptions {
2788
3116
  /**
@@ -2833,14 +3161,37 @@ declare class TcgPriser {
2833
3161
  readonly bargains: BargainsResource;
2834
3162
  readonly packRates: PackRatesResource;
2835
3163
  readonly stats: StatsResource;
3164
+ readonly webhooks: WebhooksResource;
3165
+ /** Holds the `HttpClient` so `creditsRemaining` can read the running value off it. */
3166
+ private readonly http;
2836
3167
  /**
2837
3168
  * @param optionsOrAuthToken A subscriber's API token (`new TcgPriser(myApiToken)`), a full
2838
3169
  * `TcgPriserOptions` object, or omit it entirely for an anonymous, public-only client.
2839
3170
  */
2840
3171
  constructor(optionsOrAuthToken?: string | TcgPriserOptions);
3172
+ /**
3173
+ * Credits left in this week's allowance, as of the last charged call this client made.
3174
+ *
3175
+ * The API returns `X-Credits-Remaining` on every response it charges for, so this needs no extra
3176
+ * request — but it is only as current as your last premium call, and it is `undefined` until you
3177
+ * make one. Uncharged calls (every public method, and any call authenticated with something other
3178
+ * than an API token) don't update it, because the API doesn't meter them.
3179
+ *
3180
+ * ```ts
3181
+ * await tcgpriser.cards.livePricing('fezandipiti-ex');
3182
+ * if ((tcgpriser.creditsRemaining ?? Infinity) < 100) scheduleFewerRefreshes();
3183
+ * ```
3184
+ *
3185
+ * Reading it in a browser additionally needs the API to expose the header via CORS, which it does.
3186
+ */
3187
+ get creditsRemaining(): number | undefined;
2841
3188
  }
2842
3189
  /** The stable error codes the API's `error.code` field can hold. */
2843
3190
  type TcgPriserErrorCode = 'validationFailed' | 'unauthorized' | 'forbidden' | 'notFound' | 'conflict' | 'readOnlyField' | 'rateLimited' | 'premiumRequired' | 'businessRequired' | 'creditsExhausted' | 'internalError'
3191
+ /** The request exceeded its `timeoutMs` and was aborted client-side. Never sent by the API — the
3192
+ * one code this package raises on its own, so a stalled connection is distinguishable from a
3193
+ * server that answered. */
3194
+ | 'timeout'
2844
3195
  /** Response body wasn't the `{ error: { code, message } }` shape. Probably a proxy or gateway
2845
3196
  * error in front of the API. */
2846
3197
  | 'unknown';
@@ -2854,6 +3205,18 @@ declare class TcgPriserError extends Error {
2854
3205
  readonly details: unknown;
2855
3206
  /** The raw response body, for debugging when `code`/`details` don't cover what you need. */
2856
3207
  readonly body: string;
3208
+ /**
3209
+ * Seconds to wait before retrying, from the `Retry-After` header. Present on `rateLimited`, and
3210
+ * on anything else a proxy in front of the API decides to send it with. Absent otherwise — an
3211
+ * error without it is not one that says retrying will help.
3212
+ */
3213
+ readonly retryAfter: number | undefined;
3214
+ /**
3215
+ * Credits left in this week's allowance, from `X-Credits-Remaining`. Present on errors from
3216
+ * charged routes — notably `creditsExhausted`, where it is `0`. Absent on uncharged routes and on
3217
+ * anything a proxy answered instead of the API.
3218
+ */
3219
+ readonly creditsRemaining: number | undefined;
2857
3220
  constructor(params: {
2858
3221
  statusCode: number;
2859
3222
  statusText: string;
@@ -2862,6 +3225,8 @@ declare class TcgPriserError extends Error {
2862
3225
  message: string;
2863
3226
  details?: unknown;
2864
3227
  body: string;
3228
+ retryAfter?: number;
3229
+ creditsRemaining?: number;
2865
3230
  });
2866
3231
  }
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 };
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 };