tcgpriser 0.7.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -41,7 +41,7 @@ interface components {
41
41
  ApiError: {
42
42
  error: {
43
43
  /** @enum {string} */
44
- code: "validationFailed" | "unauthorized" | "forbidden" | "notFound" | "conflict" | "readOnlyField" | "rateLimited" | "premiumRequired" | "businessRequired" | "internalError";
44
+ code: "validationFailed" | "unauthorized" | "forbidden" | "notFound" | "conflict" | "readOnlyField" | "rateLimited" | "premiumRequired" | "businessRequired" | "creditsExhausted" | "internalError";
45
45
  message: string;
46
46
  details: unknown;
47
47
  };
@@ -311,17 +311,6 @@ interface components {
311
311
  */
312
312
  updatedAt: string;
313
313
  };
314
- ExpansionContents: {
315
- expansion: components["schemas"]["ExpansionRef"];
316
- cards: {
317
- count: number;
318
- items: components["schemas"]["Card"][];
319
- };
320
- sealed: {
321
- count: number;
322
- items: components["schemas"]["Product"][];
323
- };
324
- };
325
314
  ExpansionLivePricing: {
326
315
  expansion: {
327
316
  technicalName: string;
@@ -1021,7 +1010,7 @@ interface components {
1021
1010
  shopUrl: components["schemas"]["ShopUrl"];
1022
1011
  };
1023
1012
  /** @enum {string} */
1024
- ShopUrlStatus: "pending" | "active" | "invalid" | "rejected" | "sanityRejected";
1013
+ ShopUrlStatus: "pending" | "active" | "invalid" | "rejected" | "sanityRejected" | "wrongBrand";
1025
1014
  SoldPrice: {
1026
1015
  /**
1027
1016
  * @description Resource identifier
@@ -1343,7 +1332,7 @@ type ReferencePriceProvider = "tradera" | "cardmarket" | "tcgplayer" | "ebay";
1343
1332
  /** Keyed by provider, at most one snapshot per provider. */
1344
1333
  type ReferencePriceSnapshotsByProvider = Partial<Record<ReferencePriceProvider, ReferencePriceSnapshot>>;
1345
1334
  /** A card, as returned by `client.cards.get()` / `client.cards.list()`, and as embedded in
1346
- * `client.expansions.products()`. `kind: 'card'` is a literal on the generated type, which is what
1335
+ * `client.expansions.cards()`. `kind: 'card'` is a literal on the generated type, which is what
1347
1336
  * makes `CatalogItem` (below) discriminate cleanly. Content only — no pricing fields; fetch those
1348
1337
  * separately via `client.cards.pricing()` / `.pricingBatch()`. */
1349
1338
  type Card = {
@@ -1397,8 +1386,9 @@ type Card = {
1397
1386
  prisjaktId: string | undefined;
1398
1387
  };
1399
1388
  /** A sealed product (booster box, ETB, tin, ...), as returned by `client.products.get()` /
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()`. */
1389
+ * `client.products.list()`, and as embedded in `client.expansions.sealedProducts()`. `kind:
1390
+ * 'sealed'` is a literal on the generated type. Content only — no pricing fields; fetch those
1391
+ * separately via `client.products.pricing()` / `.pricingBatch()`. */
1402
1392
  type SealedProduct = {
1403
1393
  /**
1404
1394
  * @description Resource identifier
@@ -1566,9 +1556,10 @@ type BargainProductRef = {
1566
1556
  */
1567
1557
  imageUrl: string | undefined;
1568
1558
  };
1569
- /** A set/expansion, as returned by `client.expansions.list()`. This is the full record. The
1570
- * `expansion` field embedded on a card or product is the smaller `ExpansionRef` from
1571
- * `types/common.ts`. */
1559
+ /** A set/expansion, as returned by `client.expansions.list()`. This is the full record, including
1560
+ * the `sealedCount`/`cardCount`/`productCount` aggregation `list()` runs. The `expansion` field
1561
+ * embedded on a card or product, and the result of `client.expansions.get()`, are the smaller
1562
+ * `ExpansionRef` from `types/common.ts` instead. */
1572
1563
  type Expansion = {
1573
1564
  /**
1574
1565
  * @description Resource identifier
@@ -1633,26 +1624,6 @@ type Expansion = {
1633
1624
  */
1634
1625
  updatedAt: string;
1635
1626
  };
1636
- /** Response of `client.expansions.products()`: everything in one expansion, cards and sealed
1637
- * products kept as separate `cards`/`sealed` groups rather than merged into one mixed list. */
1638
- type ExpansionContents = {
1639
- expansion: ExpansionRef;
1640
- cards: {
1641
- count: number;
1642
- items: CardSchema[];
1643
- };
1644
- sealed: {
1645
- count: number;
1646
- items: SealedProduct[];
1647
- };
1648
- };
1649
- /** One card as embedded in `client.expansions.products()`'s `cards` group. `$ref`s `CardWithPricing`
1650
- * on the wire, so this is literally `Card` — kept as its own name since a card found through an
1651
- * expansion's contents reads more naturally as `ExpansionCard` at the call site. */
1652
- type ExpansionCard = Card;
1653
- /** One sealed product as embedded in `client.expansions.products()`'s `sealed` group. Literally
1654
- * `SealedProduct`, same reasoning as `ExpansionCard`. */
1655
- type ExpansionSealedProduct = SealedProduct;
1656
1627
  type ShopMatchWithItemSchema = {
1657
1628
  /**
1658
1629
  * @description Resource identifier
@@ -2389,7 +2360,7 @@ type ItemPriceComparison = {
2389
2360
  items: ShopPriceComparisonRow[];
2390
2361
  stats: ShopPriceComparisonStats | undefined;
2391
2362
  };
2392
- type ShopUrlStatus = "pending" | "active" | "invalid" | "rejected" | "sanityRejected";
2363
+ type ShopUrlStatus = "pending" | "active" | "invalid" | "rejected" | "sanityRejected" | "wrongBrand";
2393
2364
  type ShopUrlDiscoveredBy = "scraper" | "user";
2394
2365
  /** A URL at a shop that tcgpriser scrapes, and what it has been matched to. */
2395
2366
  type ShopUrl = {
@@ -2535,15 +2506,27 @@ declare class ExpansionsResource {
2535
2506
  constructor(http: HttpClient);
2536
2507
  /** `GET /expansions`: every expansion. Unwrapped to a plain array, nothing to paginate here. */
2537
2508
  list(): Promise<Expansion[]>;
2538
- /** `GET /expansions/{technicalName}/products`: every card and sealed product in one
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. */
2543
- products(technicalName: string): Promise<ExpansionContents>;
2544
- /** `GET /expansions/{technicalName}/products/live-pricing`: computed fresh for every item in
2545
- * this expansion, not read from the last stats job. Premium. */
2546
- livePricing(technicalName: string, options?: PremiumOptions): Promise<ExpansionLivePricing>;
2509
+ /** `GET /expansions/{technicalName}`: metadata only no cards or sealed products. Returns the
2510
+ * smaller `ExpansionRef`, not the full `Expansion`: this is a plain lookup by technicalName, not
2511
+ * the aggregation `list()` runs, so `sealedCount`/`cardCount`/`productCount` aren't available
2512
+ * here. See `cards()` and `sealedProducts()` for this expansion's contents. */
2513
+ get(technicalName: string): Promise<ExpansionRef>;
2514
+ /** `GET /expansions/{technicalName}/cards`: every card in this expansion. Content only, no
2515
+ * pricing fields — pass the `id`s from the result to `client.cards.pricingBatch()` if you need
2516
+ * pricing too. Sealed products are a separate call see `sealedProducts()` — never merged into
2517
+ * this one. */
2518
+ cards(technicalName: string): Promise<ListResponse<Card>>;
2519
+ /** `GET /expansions/{technicalName}/products`: every sealed product in this expansion. Content
2520
+ * only, no pricing fields — pass the `id`s from the result to `client.products.pricingBatch()`
2521
+ * if you need pricing too. Cards are a separate call — see `cards()` — never merged into this
2522
+ * one. */
2523
+ sealedProducts(technicalName: string): Promise<ListResponse<SealedProduct>>;
2524
+ /** `GET /expansions/{technicalName}/cards/live-pricing`: computed fresh for every card in this
2525
+ * expansion, not read from the last stats job. Premium. */
2526
+ cardsLivePricing(technicalName: string, options?: PremiumOptions): Promise<ExpansionLivePricing>;
2527
+ /** `GET /expansions/{technicalName}/products/live-pricing`: computed fresh for every sealed
2528
+ * product in this expansion, not read from the last stats job. Premium. */
2529
+ productsLivePricing(technicalName: string, options?: PremiumOptions): Promise<ExpansionLivePricing>;
2547
2530
  }
2548
2531
  declare class PackRatesResource {
2549
2532
  private readonly http;
@@ -2708,7 +2691,7 @@ interface ShopMatchStatsForShopParams {
2708
2691
  startDate?: string;
2709
2692
  /** `YYYY-MM-DD` */
2710
2693
  endDate?: string;
2711
- /** Maximum products to return. Default 100. */
2694
+ /** Maximum products to return. Default 20, max 50. */
2712
2695
  limit?: number;
2713
2696
  }
2714
2697
  interface CompareShopPricesParams {
@@ -2857,7 +2840,7 @@ declare class TcgPriser {
2857
2840
  constructor(optionsOrAuthToken?: string | TcgPriserOptions);
2858
2841
  }
2859
2842
  /** The stable error codes the API's `error.code` field can hold. */
2860
- type TcgPriserErrorCode = 'validationFailed' | 'unauthorized' | 'forbidden' | 'notFound' | 'conflict' | 'readOnlyField' | 'rateLimited' | 'premiumRequired' | 'internalError'
2843
+ type TcgPriserErrorCode = 'validationFailed' | 'unauthorized' | 'forbidden' | 'notFound' | 'conflict' | 'readOnlyField' | 'rateLimited' | 'premiumRequired' | 'businessRequired' | 'creditsExhausted' | 'internalError'
2861
2844
  /** Response body wasn't the `{ error: { code, message } }` shape. Probably a proxy or gateway
2862
2845
  * error in front of the API. */
2863
2846
  | 'unknown';
@@ -2881,4 +2864,4 @@ declare class TcgPriserError extends Error {
2881
2864
  body: string;
2882
2865
  });
2883
2866
  }
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 };
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 };
package/dist/index.d.ts CHANGED
@@ -41,7 +41,7 @@ interface components {
41
41
  ApiError: {
42
42
  error: {
43
43
  /** @enum {string} */
44
- code: "validationFailed" | "unauthorized" | "forbidden" | "notFound" | "conflict" | "readOnlyField" | "rateLimited" | "premiumRequired" | "businessRequired" | "internalError";
44
+ code: "validationFailed" | "unauthorized" | "forbidden" | "notFound" | "conflict" | "readOnlyField" | "rateLimited" | "premiumRequired" | "businessRequired" | "creditsExhausted" | "internalError";
45
45
  message: string;
46
46
  details: unknown;
47
47
  };
@@ -311,17 +311,6 @@ interface components {
311
311
  */
312
312
  updatedAt: string;
313
313
  };
314
- ExpansionContents: {
315
- expansion: components["schemas"]["ExpansionRef"];
316
- cards: {
317
- count: number;
318
- items: components["schemas"]["Card"][];
319
- };
320
- sealed: {
321
- count: number;
322
- items: components["schemas"]["Product"][];
323
- };
324
- };
325
314
  ExpansionLivePricing: {
326
315
  expansion: {
327
316
  technicalName: string;
@@ -1021,7 +1010,7 @@ interface components {
1021
1010
  shopUrl: components["schemas"]["ShopUrl"];
1022
1011
  };
1023
1012
  /** @enum {string} */
1024
- ShopUrlStatus: "pending" | "active" | "invalid" | "rejected" | "sanityRejected";
1013
+ ShopUrlStatus: "pending" | "active" | "invalid" | "rejected" | "sanityRejected" | "wrongBrand";
1025
1014
  SoldPrice: {
1026
1015
  /**
1027
1016
  * @description Resource identifier
@@ -1343,7 +1332,7 @@ type ReferencePriceProvider = "tradera" | "cardmarket" | "tcgplayer" | "ebay";
1343
1332
  /** Keyed by provider, at most one snapshot per provider. */
1344
1333
  type ReferencePriceSnapshotsByProvider = Partial<Record<ReferencePriceProvider, ReferencePriceSnapshot>>;
1345
1334
  /** A card, as returned by `client.cards.get()` / `client.cards.list()`, and as embedded in
1346
- * `client.expansions.products()`. `kind: 'card'` is a literal on the generated type, which is what
1335
+ * `client.expansions.cards()`. `kind: 'card'` is a literal on the generated type, which is what
1347
1336
  * makes `CatalogItem` (below) discriminate cleanly. Content only — no pricing fields; fetch those
1348
1337
  * separately via `client.cards.pricing()` / `.pricingBatch()`. */
1349
1338
  type Card = {
@@ -1397,8 +1386,9 @@ type Card = {
1397
1386
  prisjaktId: string | undefined;
1398
1387
  };
1399
1388
  /** A sealed product (booster box, ETB, tin, ...), as returned by `client.products.get()` /
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()`. */
1389
+ * `client.products.list()`, and as embedded in `client.expansions.sealedProducts()`. `kind:
1390
+ * 'sealed'` is a literal on the generated type. Content only — no pricing fields; fetch those
1391
+ * separately via `client.products.pricing()` / `.pricingBatch()`. */
1402
1392
  type SealedProduct = {
1403
1393
  /**
1404
1394
  * @description Resource identifier
@@ -1566,9 +1556,10 @@ type BargainProductRef = {
1566
1556
  */
1567
1557
  imageUrl: string | undefined;
1568
1558
  };
1569
- /** A set/expansion, as returned by `client.expansions.list()`. This is the full record. The
1570
- * `expansion` field embedded on a card or product is the smaller `ExpansionRef` from
1571
- * `types/common.ts`. */
1559
+ /** A set/expansion, as returned by `client.expansions.list()`. This is the full record, including
1560
+ * the `sealedCount`/`cardCount`/`productCount` aggregation `list()` runs. The `expansion` field
1561
+ * embedded on a card or product, and the result of `client.expansions.get()`, are the smaller
1562
+ * `ExpansionRef` from `types/common.ts` instead. */
1572
1563
  type Expansion = {
1573
1564
  /**
1574
1565
  * @description Resource identifier
@@ -1633,26 +1624,6 @@ type Expansion = {
1633
1624
  */
1634
1625
  updatedAt: string;
1635
1626
  };
1636
- /** Response of `client.expansions.products()`: everything in one expansion, cards and sealed
1637
- * products kept as separate `cards`/`sealed` groups rather than merged into one mixed list. */
1638
- type ExpansionContents = {
1639
- expansion: ExpansionRef;
1640
- cards: {
1641
- count: number;
1642
- items: CardSchema[];
1643
- };
1644
- sealed: {
1645
- count: number;
1646
- items: SealedProduct[];
1647
- };
1648
- };
1649
- /** One card as embedded in `client.expansions.products()`'s `cards` group. `$ref`s `CardWithPricing`
1650
- * on the wire, so this is literally `Card` — kept as its own name since a card found through an
1651
- * expansion's contents reads more naturally as `ExpansionCard` at the call site. */
1652
- type ExpansionCard = Card;
1653
- /** One sealed product as embedded in `client.expansions.products()`'s `sealed` group. Literally
1654
- * `SealedProduct`, same reasoning as `ExpansionCard`. */
1655
- type ExpansionSealedProduct = SealedProduct;
1656
1627
  type ShopMatchWithItemSchema = {
1657
1628
  /**
1658
1629
  * @description Resource identifier
@@ -2389,7 +2360,7 @@ type ItemPriceComparison = {
2389
2360
  items: ShopPriceComparisonRow[];
2390
2361
  stats: ShopPriceComparisonStats | undefined;
2391
2362
  };
2392
- type ShopUrlStatus = "pending" | "active" | "invalid" | "rejected" | "sanityRejected";
2363
+ type ShopUrlStatus = "pending" | "active" | "invalid" | "rejected" | "sanityRejected" | "wrongBrand";
2393
2364
  type ShopUrlDiscoveredBy = "scraper" | "user";
2394
2365
  /** A URL at a shop that tcgpriser scrapes, and what it has been matched to. */
2395
2366
  type ShopUrl = {
@@ -2535,15 +2506,27 @@ declare class ExpansionsResource {
2535
2506
  constructor(http: HttpClient);
2536
2507
  /** `GET /expansions`: every expansion. Unwrapped to a plain array, nothing to paginate here. */
2537
2508
  list(): Promise<Expansion[]>;
2538
- /** `GET /expansions/{technicalName}/products`: every card and sealed product in one
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. */
2543
- products(technicalName: string): Promise<ExpansionContents>;
2544
- /** `GET /expansions/{technicalName}/products/live-pricing`: computed fresh for every item in
2545
- * this expansion, not read from the last stats job. Premium. */
2546
- livePricing(technicalName: string, options?: PremiumOptions): Promise<ExpansionLivePricing>;
2509
+ /** `GET /expansions/{technicalName}`: metadata only no cards or sealed products. Returns the
2510
+ * smaller `ExpansionRef`, not the full `Expansion`: this is a plain lookup by technicalName, not
2511
+ * the aggregation `list()` runs, so `sealedCount`/`cardCount`/`productCount` aren't available
2512
+ * here. See `cards()` and `sealedProducts()` for this expansion's contents. */
2513
+ get(technicalName: string): Promise<ExpansionRef>;
2514
+ /** `GET /expansions/{technicalName}/cards`: every card in this expansion. Content only, no
2515
+ * pricing fields — pass the `id`s from the result to `client.cards.pricingBatch()` if you need
2516
+ * pricing too. Sealed products are a separate call see `sealedProducts()` — never merged into
2517
+ * this one. */
2518
+ cards(technicalName: string): Promise<ListResponse<Card>>;
2519
+ /** `GET /expansions/{technicalName}/products`: every sealed product in this expansion. Content
2520
+ * only, no pricing fields — pass the `id`s from the result to `client.products.pricingBatch()`
2521
+ * if you need pricing too. Cards are a separate call — see `cards()` — never merged into this
2522
+ * one. */
2523
+ sealedProducts(technicalName: string): Promise<ListResponse<SealedProduct>>;
2524
+ /** `GET /expansions/{technicalName}/cards/live-pricing`: computed fresh for every card in this
2525
+ * expansion, not read from the last stats job. Premium. */
2526
+ cardsLivePricing(technicalName: string, options?: PremiumOptions): Promise<ExpansionLivePricing>;
2527
+ /** `GET /expansions/{technicalName}/products/live-pricing`: computed fresh for every sealed
2528
+ * product in this expansion, not read from the last stats job. Premium. */
2529
+ productsLivePricing(technicalName: string, options?: PremiumOptions): Promise<ExpansionLivePricing>;
2547
2530
  }
2548
2531
  declare class PackRatesResource {
2549
2532
  private readonly http;
@@ -2708,7 +2691,7 @@ interface ShopMatchStatsForShopParams {
2708
2691
  startDate?: string;
2709
2692
  /** `YYYY-MM-DD` */
2710
2693
  endDate?: string;
2711
- /** Maximum products to return. Default 100. */
2694
+ /** Maximum products to return. Default 20, max 50. */
2712
2695
  limit?: number;
2713
2696
  }
2714
2697
  interface CompareShopPricesParams {
@@ -2857,7 +2840,7 @@ declare class TcgPriser {
2857
2840
  constructor(optionsOrAuthToken?: string | TcgPriserOptions);
2858
2841
  }
2859
2842
  /** The stable error codes the API's `error.code` field can hold. */
2860
- type TcgPriserErrorCode = 'validationFailed' | 'unauthorized' | 'forbidden' | 'notFound' | 'conflict' | 'readOnlyField' | 'rateLimited' | 'premiumRequired' | 'internalError'
2843
+ type TcgPriserErrorCode = 'validationFailed' | 'unauthorized' | 'forbidden' | 'notFound' | 'conflict' | 'readOnlyField' | 'rateLimited' | 'premiumRequired' | 'businessRequired' | 'creditsExhausted' | 'internalError'
2861
2844
  /** Response body wasn't the `{ error: { code, message } }` shape. Probably a proxy or gateway
2862
2845
  * error in front of the API. */
2863
2846
  | 'unknown';
@@ -2881,4 +2864,4 @@ declare class TcgPriserError extends Error {
2881
2864
  body: string;
2882
2865
  });
2883
2866
  }
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 };
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 };
package/dist/index.js CHANGED
@@ -42,6 +42,8 @@ var KNOWN_ERROR_CODES = /* @__PURE__ */ new Set([
42
42
  "readOnlyField",
43
43
  "rateLimited",
44
44
  "premiumRequired",
45
+ "businessRequired",
46
+ "creditsExhausted",
45
47
  "internalError"
46
48
  ]);
47
49
  async function toApiError(res, url) {
@@ -195,17 +197,38 @@ var ExpansionsResource = class {
195
197
  const res = await this.http.get("/expansions");
196
198
  return res.data;
197
199
  }
198
- /** `GET /expansions/{technicalName}/products`: every card and sealed product in one
199
- * expansion, kept as separate `cards`/`sealed` groups. Content only, no pricing fields pass the
200
- * `id`s from the result to `client.cards.pricingBatch()` / `client.products.pricingBatch()` if you
201
- * need pricing too. This mirrors the API 1:1 rather than fetching pricing for you, since pricing
202
- * for every item in an expansion is a second, separately-cached call the caller may not want. */
203
- products(technicalName) {
204
- return this.http.get(`/expansions/${encodeURIComponent(technicalName)}/products?grouped=true`);
205
- }
206
- /** `GET /expansions/{technicalName}/products/live-pricing`: computed fresh for every item in
207
- * this expansion, not read from the last stats job. Premium. */
208
- livePricing(technicalName, options = {}) {
200
+ /** `GET /expansions/{technicalName}`: metadata only no cards or sealed products. Returns the
201
+ * smaller `ExpansionRef`, not the full `Expansion`: this is a plain lookup by technicalName, not
202
+ * the aggregation `list()` runs, so `sealedCount`/`cardCount`/`productCount` aren't available
203
+ * here. See `cards()` and `sealedProducts()` for this expansion's contents. */
204
+ get(technicalName) {
205
+ return this.http.get(`/expansions/${encodeURIComponent(technicalName)}`);
206
+ }
207
+ /** `GET /expansions/{technicalName}/cards`: every card in this expansion. Content only, no
208
+ * pricing fields — pass the `id`s from the result to `client.cards.pricingBatch()` if you need
209
+ * pricing too. Sealed products are a separate call see `sealedProducts()` — never merged into
210
+ * this one. */
211
+ cards(technicalName) {
212
+ return this.http.get(`/expansions/${encodeURIComponent(technicalName)}/cards`);
213
+ }
214
+ /** `GET /expansions/{technicalName}/products`: every sealed product in this expansion. Content
215
+ * only, no pricing fields — pass the `id`s from the result to `client.products.pricingBatch()`
216
+ * if you need pricing too. Cards are a separate call — see `cards()` — never merged into this
217
+ * one. */
218
+ sealedProducts(technicalName) {
219
+ return this.http.get(`/expansions/${encodeURIComponent(technicalName)}/products`);
220
+ }
221
+ /** `GET /expansions/{technicalName}/cards/live-pricing`: computed fresh for every card in this
222
+ * expansion, not read from the last stats job. Premium. */
223
+ cardsLivePricing(technicalName, options = {}) {
224
+ return this.http.get(
225
+ `/expansions/${encodeURIComponent(technicalName)}/cards/live-pricing`,
226
+ options
227
+ );
228
+ }
229
+ /** `GET /expansions/{technicalName}/products/live-pricing`: computed fresh for every sealed
230
+ * product in this expansion, not read from the last stats job. Premium. */
231
+ productsLivePricing(technicalName, options = {}) {
209
232
  return this.http.get(
210
233
  `/expansions/${encodeURIComponent(technicalName)}/products/live-pricing`,
211
234
  options