tcgpriser 0.4.0 → 0.5.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 +112 -85
- package/dist/index.d.ts +112 -85
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1207,18 +1207,18 @@ type CardSchema = {
|
|
|
1207
1207
|
name: string;
|
|
1208
1208
|
shortName: string | undefined;
|
|
1209
1209
|
technicalName: string;
|
|
1210
|
-
brand:
|
|
1210
|
+
brand: BrandRef;
|
|
1211
1211
|
manufacturer: string;
|
|
1212
1212
|
modelNumber: string | undefined;
|
|
1213
|
-
category:
|
|
1214
|
-
expansion:
|
|
1213
|
+
category: CategoryRef | undefined;
|
|
1214
|
+
expansion: ExpansionRef | undefined;
|
|
1215
1215
|
/**
|
|
1216
1216
|
* @description Printing language of the item
|
|
1217
1217
|
* @example JPN
|
|
1218
1218
|
* @enum {string|null}
|
|
1219
1219
|
*/
|
|
1220
1220
|
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
1221
|
-
alternativeNames:
|
|
1221
|
+
alternativeNames: AlternativeName[];
|
|
1222
1222
|
supportsMultipackPricing: boolean;
|
|
1223
1223
|
/**
|
|
1224
1224
|
* @description Absolute asset URL, or null when absent
|
|
@@ -1263,15 +1263,15 @@ type CardSchema = {
|
|
|
1263
1263
|
artist: string | undefined;
|
|
1264
1264
|
cardmarketId: string | undefined;
|
|
1265
1265
|
tcgplayerId: string | undefined;
|
|
1266
|
-
variants:
|
|
1266
|
+
variants: CardVariants | undefined;
|
|
1267
1267
|
prisjaktId: string | undefined;
|
|
1268
|
-
lowestShopOffer:
|
|
1268
|
+
lowestShopOffer: LowestShopOfferSchema | undefined;
|
|
1269
1269
|
referencePriceSnapshotsByProvider: {
|
|
1270
|
-
[key: string]:
|
|
1270
|
+
[key: string]: ReferencePriceSnapshot;
|
|
1271
1271
|
};
|
|
1272
1272
|
};
|
|
1273
1273
|
type LowestShopOfferSchema = {
|
|
1274
|
-
shop:
|
|
1274
|
+
shop: ShopRef;
|
|
1275
1275
|
url: string;
|
|
1276
1276
|
/** @example 149.5 */
|
|
1277
1277
|
price: number;
|
|
@@ -1426,7 +1426,6 @@ type BargainInfo = {
|
|
|
1426
1426
|
};
|
|
1427
1427
|
/** The cheapest current shop offer for a card or product. */
|
|
1428
1428
|
type LowestShopOffer = LowestShopOfferSchema;
|
|
1429
|
-
type ReferencePriceProvider = "tradera" | "cardmarket" | "tcgplayer" | "ebay";
|
|
1430
1429
|
type ReferencePriceSnapshot = {
|
|
1431
1430
|
/** @enum {string} */
|
|
1432
1431
|
provider: "cardmarket" | "tcgplayer" | "ebay" | "tradera";
|
|
@@ -1448,6 +1447,7 @@ type ReferencePriceSnapshot = {
|
|
|
1448
1447
|
*/
|
|
1449
1448
|
snapshotDate: string;
|
|
1450
1449
|
};
|
|
1450
|
+
type ReferencePriceProvider = "tradera" | "cardmarket" | "tcgplayer" | "ebay";
|
|
1451
1451
|
/** Keyed by provider, at most one snapshot per provider. */
|
|
1452
1452
|
type ReferencePriceSnapshotsByProvider = Partial<Record<ReferencePriceProvider, ReferencePriceSnapshot>>;
|
|
1453
1453
|
/** A card, as returned by `client.cards.get()` / `client.cards.list()`, and as embedded in
|
|
@@ -1462,18 +1462,18 @@ type Card = {
|
|
|
1462
1462
|
name: string;
|
|
1463
1463
|
shortName: string | undefined;
|
|
1464
1464
|
technicalName: string;
|
|
1465
|
-
brand:
|
|
1465
|
+
brand: BrandRef;
|
|
1466
1466
|
manufacturer: string;
|
|
1467
1467
|
modelNumber: string | undefined;
|
|
1468
|
-
category:
|
|
1469
|
-
expansion:
|
|
1468
|
+
category: CategoryRef | undefined;
|
|
1469
|
+
expansion: ExpansionRef | undefined;
|
|
1470
1470
|
/**
|
|
1471
1471
|
* @description Printing language of the item
|
|
1472
1472
|
* @example JPN
|
|
1473
1473
|
* @enum {string|null}
|
|
1474
1474
|
*/
|
|
1475
1475
|
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
1476
|
-
alternativeNames:
|
|
1476
|
+
alternativeNames: AlternativeName[];
|
|
1477
1477
|
supportsMultipackPricing: boolean;
|
|
1478
1478
|
/**
|
|
1479
1479
|
* @description Absolute asset URL, or null when absent
|
|
@@ -1518,11 +1518,11 @@ type Card = {
|
|
|
1518
1518
|
artist: string | undefined;
|
|
1519
1519
|
cardmarketId: string | undefined;
|
|
1520
1520
|
tcgplayerId: string | undefined;
|
|
1521
|
-
variants:
|
|
1521
|
+
variants: CardVariants | undefined;
|
|
1522
1522
|
prisjaktId: string | undefined;
|
|
1523
|
-
lowestShopOffer:
|
|
1523
|
+
lowestShopOffer: LowestShopOfferSchema | undefined;
|
|
1524
1524
|
referencePriceSnapshotsByProvider: {
|
|
1525
|
-
[key: string]:
|
|
1525
|
+
[key: string]: ReferencePriceSnapshot;
|
|
1526
1526
|
};
|
|
1527
1527
|
};
|
|
1528
1528
|
/** A sealed product (booster box, ETB, tin, ...), as returned by `client.products.get()` /
|
|
@@ -1536,18 +1536,18 @@ type SealedProduct = {
|
|
|
1536
1536
|
name: string;
|
|
1537
1537
|
shortName: string | undefined;
|
|
1538
1538
|
technicalName: string;
|
|
1539
|
-
brand:
|
|
1539
|
+
brand: BrandRef;
|
|
1540
1540
|
manufacturer: string;
|
|
1541
1541
|
modelNumber: string | undefined;
|
|
1542
|
-
category:
|
|
1543
|
-
expansion:
|
|
1542
|
+
category: CategoryRef | undefined;
|
|
1543
|
+
expansion: ExpansionRef | undefined;
|
|
1544
1544
|
/**
|
|
1545
1545
|
* @description Printing language of the item
|
|
1546
1546
|
* @example JPN
|
|
1547
1547
|
* @enum {string|null}
|
|
1548
1548
|
*/
|
|
1549
1549
|
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
1550
|
-
alternativeNames:
|
|
1550
|
+
alternativeNames: AlternativeName[];
|
|
1551
1551
|
supportsMultipackPricing: boolean;
|
|
1552
1552
|
/**
|
|
1553
1553
|
* @description Absolute asset URL, or null when absent
|
|
@@ -1590,9 +1590,9 @@ type SealedProduct = {
|
|
|
1590
1590
|
epid: string | undefined;
|
|
1591
1591
|
priceChartingId: string | undefined;
|
|
1592
1592
|
prisjaktId: string | undefined;
|
|
1593
|
-
lowestShopOffer:
|
|
1593
|
+
lowestShopOffer: LowestShopOfferSchema | undefined;
|
|
1594
1594
|
referencePriceSnapshotsByProvider: {
|
|
1595
|
-
[key: string]:
|
|
1595
|
+
[key: string]: ReferencePriceSnapshot;
|
|
1596
1596
|
};
|
|
1597
1597
|
};
|
|
1598
1598
|
/** A card or sealed product, discriminated on `kind`. */
|
|
@@ -1633,7 +1633,7 @@ type Bargain = {
|
|
|
1633
1633
|
* @example SEK
|
|
1634
1634
|
*/
|
|
1635
1635
|
currency: string | undefined;
|
|
1636
|
-
shop:
|
|
1636
|
+
shop: ShopRef;
|
|
1637
1637
|
inStock: boolean;
|
|
1638
1638
|
/**
|
|
1639
1639
|
* Format: date-time
|
|
@@ -1718,8 +1718,8 @@ type Expansion = {
|
|
|
1718
1718
|
*/
|
|
1719
1719
|
imageUrl: string | undefined;
|
|
1720
1720
|
year: number | undefined;
|
|
1721
|
-
brand:
|
|
1722
|
-
alternativeNames:
|
|
1721
|
+
brand: BrandRef;
|
|
1722
|
+
alternativeNames: AlternativeName[];
|
|
1723
1723
|
/** @description Sealed products in this expansion */
|
|
1724
1724
|
sealedCount: number;
|
|
1725
1725
|
/** @description Cards in this expansion */
|
|
@@ -1740,14 +1740,14 @@ type Expansion = {
|
|
|
1740
1740
|
/** Response of `client.expansions.products()`: everything in one expansion, cards and sealed
|
|
1741
1741
|
* products kept as separate `cards`/`sealed` groups rather than merged into one mixed list. */
|
|
1742
1742
|
type ExpansionContents = {
|
|
1743
|
-
expansion:
|
|
1743
|
+
expansion: ExpansionRef;
|
|
1744
1744
|
cards: {
|
|
1745
1745
|
count: number;
|
|
1746
|
-
items:
|
|
1746
|
+
items: CardSchema[];
|
|
1747
1747
|
};
|
|
1748
1748
|
sealed: {
|
|
1749
1749
|
count: number;
|
|
1750
|
-
items:
|
|
1750
|
+
items: SealedProduct[];
|
|
1751
1751
|
};
|
|
1752
1752
|
};
|
|
1753
1753
|
/** One card as embedded in `client.expansions.products()`'s `cards` group. `$ref`s `CardWithPricing`
|
|
@@ -1763,7 +1763,7 @@ type ShopMatchWithItemSchema = {
|
|
|
1763
1763
|
* @example 6a577711abc1ce71383d3e10
|
|
1764
1764
|
*/
|
|
1765
1765
|
id: string;
|
|
1766
|
-
shop:
|
|
1766
|
+
shop: ShopRef;
|
|
1767
1767
|
url: string;
|
|
1768
1768
|
/**
|
|
1769
1769
|
* @description Resource identifier
|
|
@@ -1792,9 +1792,9 @@ type ShopMatchWithItemSchema = {
|
|
|
1792
1792
|
/** @enum {string|null} */
|
|
1793
1793
|
gradingCompany: "PSA" | "BGS" | "CGC" | "SGC" | "ACE" | "RAUKCARD" | "TAG" | "GMA" | undefined;
|
|
1794
1794
|
grade: number | undefined;
|
|
1795
|
-
item:
|
|
1796
|
-
expansion:
|
|
1797
|
-
category:
|
|
1795
|
+
item: MatchedItemRef | undefined;
|
|
1796
|
+
expansion: ExpansionRef | undefined;
|
|
1797
|
+
category: CategoryRef | undefined;
|
|
1798
1798
|
/**
|
|
1799
1799
|
* Format: date-time
|
|
1800
1800
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -1817,7 +1817,7 @@ type ItemShopMatchSchema = {
|
|
|
1817
1817
|
* @example 6a577711abc1ce71383d3e10
|
|
1818
1818
|
*/
|
|
1819
1819
|
id: string;
|
|
1820
|
-
shop:
|
|
1820
|
+
shop: MatchShop;
|
|
1821
1821
|
url: string;
|
|
1822
1822
|
/**
|
|
1823
1823
|
* @description Resource identifier
|
|
@@ -1951,25 +1951,34 @@ type ShopMatchDelivery = {
|
|
|
1951
1951
|
supportsLocalPickup: boolean | undefined;
|
|
1952
1952
|
note: string | undefined;
|
|
1953
1953
|
};
|
|
1954
|
+
/** The shop identity embedded on an item-scoped match (`ItemShopMatch.shop`): like `ShopRef`, plus
|
|
1955
|
+
* delivery terms -- this is the one place a match row prices in shipping. */
|
|
1956
|
+
type MatchShop = {
|
|
1957
|
+
/** @example cardlevels */
|
|
1958
|
+
technicalName: string;
|
|
1959
|
+
/** @example Cardlevels */
|
|
1960
|
+
name: string;
|
|
1961
|
+
delivery: ShopMatchDelivery;
|
|
1962
|
+
};
|
|
1954
1963
|
/** A shop-match row scoped to one already-known item. `client.cards.matches()` and
|
|
1955
1964
|
* `client.products.matches()` drop `item`/`expansion`/`category` since the caller already has
|
|
1956
1965
|
* them, but add delivery terms since you're looking at one listing's total cost here. */
|
|
1957
1966
|
type ItemShopMatch = ItemShopMatchSchema;
|
|
1958
1967
|
/** Response of `client.cards.matches()` / `client.products.matches()`. */
|
|
1959
1968
|
type ItemShopMatches = {
|
|
1960
|
-
item:
|
|
1961
|
-
data:
|
|
1962
|
-
pagination:
|
|
1969
|
+
item: ItemRef;
|
|
1970
|
+
data: ItemShopMatchSchema[];
|
|
1971
|
+
pagination: PageMeta;
|
|
1963
1972
|
};
|
|
1964
1973
|
/** Response of `client.shopMatches.forShop()`: every match, of any item, currently live at one shop. */
|
|
1965
1974
|
type ShopMatchesForShop = {
|
|
1966
|
-
shop:
|
|
1967
|
-
data:
|
|
1968
|
-
pagination:
|
|
1975
|
+
shop: ShopSummary | undefined;
|
|
1976
|
+
data: ShopMatchWithItemSchema[];
|
|
1977
|
+
pagination: PageMeta;
|
|
1969
1978
|
};
|
|
1970
1979
|
/** One row of `client.shopMatches.shopStats()`: match counts per shop, not the matches themselves. */
|
|
1971
1980
|
type ShopMatchStats = {
|
|
1972
|
-
shop:
|
|
1981
|
+
shop: ShopSummary;
|
|
1973
1982
|
matchCount: number;
|
|
1974
1983
|
/** @description Matches resolved to a catalog item */
|
|
1975
1984
|
linkedMatchCount: number;
|
|
@@ -2005,8 +2014,8 @@ type DailyPricePoint = {
|
|
|
2005
2014
|
};
|
|
2006
2015
|
/** Response row of `client.priceStats.daily()`. */
|
|
2007
2016
|
type ItemDailyStats = {
|
|
2008
|
-
item:
|
|
2009
|
-
dailyStats:
|
|
2017
|
+
item: ItemRef;
|
|
2018
|
+
dailyStats: DailyPricePoint[];
|
|
2010
2019
|
};
|
|
2011
2020
|
type EstimatedValue = {
|
|
2012
2021
|
/** @example 149.5 */
|
|
@@ -2020,8 +2029,8 @@ type EstimatedValue = {
|
|
|
2020
2029
|
};
|
|
2021
2030
|
/** Response row of `client.priceStats.estimatedValues()`. */
|
|
2022
2031
|
type ItemEstimatedValue = {
|
|
2023
|
-
item:
|
|
2024
|
-
estimate:
|
|
2032
|
+
item: ItemRef;
|
|
2033
|
+
estimate: EstimatedValue;
|
|
2025
2034
|
};
|
|
2026
2035
|
/** Response row of `client.priceStats.topProducts()`: items ranked by shop availability, not price. */
|
|
2027
2036
|
type TopItem = {
|
|
@@ -2052,8 +2061,8 @@ type PackRate = {
|
|
|
2052
2061
|
* @example 6a577711abc1ce71383d3e10
|
|
2053
2062
|
*/
|
|
2054
2063
|
id: string;
|
|
2055
|
-
expansion:
|
|
2056
|
-
buckets:
|
|
2064
|
+
expansion: ExpansionRef;
|
|
2065
|
+
buckets: PackRateBucket[];
|
|
2057
2066
|
/**
|
|
2058
2067
|
* Format: date-time
|
|
2059
2068
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -2095,7 +2104,7 @@ type ReferencePriceSeries = {
|
|
|
2095
2104
|
grade: number | undefined;
|
|
2096
2105
|
currency: string;
|
|
2097
2106
|
sampleSize: number | undefined;
|
|
2098
|
-
points:
|
|
2107
|
+
points: ReferencePriceSeriesPoint[];
|
|
2099
2108
|
};
|
|
2100
2109
|
type ReferencePriceSeriesPoint = {
|
|
2101
2110
|
/**
|
|
@@ -2117,7 +2126,7 @@ type ReferencePriceCurrencyMode = "native" | "sek";
|
|
|
2117
2126
|
* keeps its own `currency`; in `sek` mode everything is `SEK`, converted at the rate stored on
|
|
2118
2127
|
* each point. */
|
|
2119
2128
|
type ItemReferencePrices = {
|
|
2120
|
-
item:
|
|
2129
|
+
item: ItemRef;
|
|
2121
2130
|
/**
|
|
2122
2131
|
* Format: date-time
|
|
2123
2132
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -2132,7 +2141,7 @@ type ItemReferencePrices = {
|
|
|
2132
2141
|
metric: "price" | "low" | "mid" | "high" | "avg" | "avg1" | "avg7" | "avg30" | "directLow";
|
|
2133
2142
|
/** @enum {string} */
|
|
2134
2143
|
currencyMode: "native" | "sek";
|
|
2135
|
-
series:
|
|
2144
|
+
series: ReferencePriceSeries[];
|
|
2136
2145
|
};
|
|
2137
2146
|
type SoldPrice = {
|
|
2138
2147
|
/**
|
|
@@ -2161,9 +2170,9 @@ type SoldPrice = {
|
|
|
2161
2170
|
* `true` here. That field only exists because this envelope shape is shared with a free preview
|
|
2162
2171
|
* elsewhere in the API; this response is never the preview. */
|
|
2163
2172
|
type ItemSoldPrices = {
|
|
2164
|
-
item:
|
|
2165
|
-
data:
|
|
2166
|
-
pagination:
|
|
2173
|
+
item: ItemRef;
|
|
2174
|
+
data: SoldPrice[];
|
|
2175
|
+
pagination: PageMeta;
|
|
2167
2176
|
/** @enum {boolean} */
|
|
2168
2177
|
premiumRequired: true;
|
|
2169
2178
|
};
|
|
@@ -2189,14 +2198,14 @@ type LivePricingForItem = {
|
|
|
2189
2198
|
id: string;
|
|
2190
2199
|
name: string;
|
|
2191
2200
|
technicalName: string;
|
|
2192
|
-
pricing:
|
|
2201
|
+
pricing: LivePricingDetail;
|
|
2193
2202
|
};
|
|
2194
2203
|
/** Response of `client.expansions.livePricing()`: live pricing for every item in one expansion. */
|
|
2195
2204
|
type ExpansionLivePricing = {
|
|
2196
2205
|
expansion: {
|
|
2197
2206
|
technicalName: string;
|
|
2198
2207
|
};
|
|
2199
|
-
items:
|
|
2208
|
+
items: LivePricingForItem[];
|
|
2200
2209
|
};
|
|
2201
2210
|
/** The catalog item as embedded in stats responses: a `Card`/`SealedProduct` minus
|
|
2202
2211
|
* `lowestShopOffer` and `referencePriceSnapshotsByProvider`, which these endpoints already answer
|
|
@@ -2210,18 +2219,18 @@ type StatsItemRef = {
|
|
|
2210
2219
|
name: string;
|
|
2211
2220
|
shortName: string | undefined;
|
|
2212
2221
|
technicalName: string;
|
|
2213
|
-
brand:
|
|
2222
|
+
brand: BrandRef;
|
|
2214
2223
|
manufacturer: string;
|
|
2215
2224
|
modelNumber: string | undefined;
|
|
2216
|
-
category:
|
|
2217
|
-
expansion:
|
|
2225
|
+
category: CategoryRef | undefined;
|
|
2226
|
+
expansion: ExpansionRef | undefined;
|
|
2218
2227
|
/**
|
|
2219
2228
|
* @description Printing language of the item
|
|
2220
2229
|
* @example JPN
|
|
2221
2230
|
* @enum {string|null}
|
|
2222
2231
|
*/
|
|
2223
2232
|
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
2224
|
-
alternativeNames:
|
|
2233
|
+
alternativeNames: AlternativeName[];
|
|
2225
2234
|
supportsMultipackPricing: boolean;
|
|
2226
2235
|
/**
|
|
2227
2236
|
* @description Absolute asset URL, or null when absent
|
|
@@ -2266,7 +2275,7 @@ type StatsItemRef = {
|
|
|
2266
2275
|
artist: string | undefined;
|
|
2267
2276
|
cardmarketId: string | undefined;
|
|
2268
2277
|
tcgplayerId: string | undefined;
|
|
2269
|
-
variants:
|
|
2278
|
+
variants: CardVariants | undefined;
|
|
2270
2279
|
prisjaktId: string | undefined;
|
|
2271
2280
|
} | {
|
|
2272
2281
|
/**
|
|
@@ -2277,18 +2286,18 @@ type StatsItemRef = {
|
|
|
2277
2286
|
name: string;
|
|
2278
2287
|
shortName: string | undefined;
|
|
2279
2288
|
technicalName: string;
|
|
2280
|
-
brand:
|
|
2289
|
+
brand: BrandRef;
|
|
2281
2290
|
manufacturer: string;
|
|
2282
2291
|
modelNumber: string | undefined;
|
|
2283
|
-
category:
|
|
2284
|
-
expansion:
|
|
2292
|
+
category: CategoryRef | undefined;
|
|
2293
|
+
expansion: ExpansionRef | undefined;
|
|
2285
2294
|
/**
|
|
2286
2295
|
* @description Printing language of the item
|
|
2287
2296
|
* @example JPN
|
|
2288
2297
|
* @enum {string|null}
|
|
2289
2298
|
*/
|
|
2290
2299
|
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
2291
|
-
alternativeNames:
|
|
2300
|
+
alternativeNames: AlternativeName[];
|
|
2292
2301
|
supportsMultipackPricing: boolean;
|
|
2293
2302
|
/**
|
|
2294
2303
|
* @description Absolute asset URL, or null when absent
|
|
@@ -2340,23 +2349,23 @@ type VariantStatsSummary = {
|
|
|
2340
2349
|
};
|
|
2341
2350
|
/** Response of `client.priceStats.product()`. */
|
|
2342
2351
|
type ItemStats = {
|
|
2343
|
-
item:
|
|
2344
|
-
dailyStats:
|
|
2345
|
-
estimate:
|
|
2346
|
-
variantStats:
|
|
2352
|
+
item: StatsItemRef;
|
|
2353
|
+
dailyStats: DailyPricePoint[];
|
|
2354
|
+
estimate: EstimatedValue;
|
|
2355
|
+
variantStats: VariantStatsSummary;
|
|
2347
2356
|
};
|
|
2348
2357
|
/** Response of `client.priceStats.productFull()`: everything `product()` has, plus the item's
|
|
2349
2358
|
* current shop matches. */
|
|
2350
2359
|
type ItemFullStats = {
|
|
2351
|
-
item:
|
|
2360
|
+
item: StatsItemRef;
|
|
2352
2361
|
stats: {
|
|
2353
|
-
dailyStats:
|
|
2354
|
-
variantStats:
|
|
2362
|
+
dailyStats: DailyPricePoint[];
|
|
2363
|
+
variantStats: VariantStatsSummary;
|
|
2355
2364
|
};
|
|
2356
|
-
estimate:
|
|
2365
|
+
estimate: EstimatedValue;
|
|
2357
2366
|
shopMatches: {
|
|
2358
|
-
data:
|
|
2359
|
-
pagination:
|
|
2367
|
+
data: ItemShopMatchSchema[];
|
|
2368
|
+
pagination: PageMeta;
|
|
2360
2369
|
};
|
|
2361
2370
|
};
|
|
2362
2371
|
type VariantPriceStat = {
|
|
@@ -2399,9 +2408,9 @@ type VariantSelector = {
|
|
|
2399
2408
|
};
|
|
2400
2409
|
/** Response of `client.priceStats.productDailyByVariant()`. */
|
|
2401
2410
|
type ItemVariantDailyStats = {
|
|
2402
|
-
item:
|
|
2403
|
-
variant:
|
|
2404
|
-
dailyStats:
|
|
2411
|
+
item: ItemRef;
|
|
2412
|
+
variant: VariantSelector;
|
|
2413
|
+
dailyStats: DailyPricePoint[];
|
|
2405
2414
|
};
|
|
2406
2415
|
type ShopPricePoint = {
|
|
2407
2416
|
/**
|
|
@@ -2419,18 +2428,36 @@ type ShopPricePoint = {
|
|
|
2419
2428
|
inStock: boolean;
|
|
2420
2429
|
url: string;
|
|
2421
2430
|
};
|
|
2431
|
+
/** One shop's history for the item `ItemShopPriceHistory` is scoped to. */
|
|
2432
|
+
type ShopPriceHistory = {
|
|
2433
|
+
/** @description The shop's technicalName */
|
|
2434
|
+
shop: string;
|
|
2435
|
+
history: ShopPricePoint[];
|
|
2436
|
+
};
|
|
2422
2437
|
/** Response of `client.shopMatchStats.forProduct()`: one product's price history, broken out per
|
|
2423
2438
|
* shop. */
|
|
2424
2439
|
type ItemShopPriceHistory = {
|
|
2425
|
-
item:
|
|
2426
|
-
shops:
|
|
2440
|
+
item: ItemRef;
|
|
2441
|
+
shops: ShopPriceHistory[];
|
|
2427
2442
|
recordCount: number;
|
|
2428
2443
|
};
|
|
2444
|
+
/** One product's history for the shop `ShopPriceHistoryList` is scoped to. */
|
|
2445
|
+
type ShopItemPriceHistory = {
|
|
2446
|
+
item: ItemRef;
|
|
2447
|
+
history: ShopPricePoint[];
|
|
2448
|
+
/** @example 149.5 */
|
|
2449
|
+
latestPrice: number | undefined;
|
|
2450
|
+
/**
|
|
2451
|
+
* Format: date-time
|
|
2452
|
+
* @example 2026-07-15T12:03:29.322Z
|
|
2453
|
+
*/
|
|
2454
|
+
latestDate: string | undefined;
|
|
2455
|
+
};
|
|
2429
2456
|
/** Response of `client.shopMatchStats.forShop()`: one shop's price history, broken out per
|
|
2430
2457
|
* product. */
|
|
2431
2458
|
type ShopPriceHistoryList = {
|
|
2432
2459
|
shop: string;
|
|
2433
|
-
items:
|
|
2460
|
+
items: ShopItemPriceHistory[];
|
|
2434
2461
|
itemCount: number;
|
|
2435
2462
|
};
|
|
2436
2463
|
type ShopPriceComparisonRow = {
|
|
@@ -2462,9 +2489,9 @@ type ShopPriceComparisonStats = {
|
|
|
2462
2489
|
/** Response of `client.shopMatchStats.compare()`: one product's price at every shop that carries
|
|
2463
2490
|
* it, as of one date. `stats` is `undefined` when no shop had a price on that date. */
|
|
2464
2491
|
type ItemPriceComparison = {
|
|
2465
|
-
item:
|
|
2466
|
-
items:
|
|
2467
|
-
stats:
|
|
2492
|
+
item: ItemRef;
|
|
2493
|
+
items: ShopPriceComparisonRow[];
|
|
2494
|
+
stats: ShopPriceComparisonStats | undefined;
|
|
2468
2495
|
};
|
|
2469
2496
|
type ShopUrlStatus = "pending" | "active" | "invalid" | "rejected" | "sanityRejected";
|
|
2470
2497
|
type ShopUrlDiscoveredBy = "scraper" | "user";
|
|
@@ -2477,7 +2504,7 @@ type ShopUrl = {
|
|
|
2477
2504
|
id: string;
|
|
2478
2505
|
url: string;
|
|
2479
2506
|
shop: string | undefined;
|
|
2480
|
-
status:
|
|
2507
|
+
status: ShopUrlStatus;
|
|
2481
2508
|
/** @enum {string} */
|
|
2482
2509
|
discoveredBy: "scraper" | "user";
|
|
2483
2510
|
/**
|
|
@@ -2521,7 +2548,7 @@ type ShopUrl = {
|
|
|
2521
2548
|
/** Response of `client.shopUrls.submit()` / `client.shopUrls.assignProduct()`. */
|
|
2522
2549
|
type ShopUrlMutationResult = {
|
|
2523
2550
|
message: string;
|
|
2524
|
-
shopUrl:
|
|
2551
|
+
shopUrl: ShopUrl;
|
|
2525
2552
|
};
|
|
2526
2553
|
interface ListBargainsParams {
|
|
2527
2554
|
type?: 'sealed' | 'card' | 'all';
|
|
@@ -2930,4 +2957,4 @@ declare class TcgPriserError extends Error {
|
|
|
2930
2957
|
body: string;
|
|
2931
2958
|
});
|
|
2932
2959
|
}
|
|
2933
|
-
export { type AlternativeName, type AssignShopUrlProductParams, type Bargain, type BargainInfo, type BargainProductRef, type BargainReferenceSource, type BrandRef, type Card, type CardMatchesParams, type CardPricesParams, type CardReferencePricesParams, type CardType, type CardVariants, type CatalogItem, type CategoryRef, type CompareShopPricesParams, type CurrencyCode, DEFAULT_BASE_URL, type DailyPricePoint, type DailyPriceStatsParams, type EstimatedValue, type EstimatedValuesParams, type Expansion, type ExpansionCard, type ExpansionContents, type ExpansionLivePricing, type ExpansionRef, type ExpansionSealedProduct, type GradingCompany, type ItemCondition, type ItemDailyStats, type ItemEstimatedValue, type ItemFullStats, type ItemPriceComparison, type ItemRef, type ItemReferencePrices, type ItemShopMatch, type ItemShopMatches, type ItemShopPriceHistory, type ItemSoldPrices, type ItemStats, type ItemVariantDailyStats, type ItemVariantStats, type ListBargainsParams, type ListCardsParams, type ListProductsParams, type ListResponse, type ListShopMatchesParams, type ListShopsParams, type LivePricingDetail, type LivePricingForItem, type LowestShopOffer, type MatchedItemRef, type PackRate, type PackRateBucket, type PageMeta, type PaginationParams, type PlatformStats, type PremiumOptions, type PrintingLanguage, type ProductByVariantParams, type ProductDailyByVariantParams, type ProductDailyStatsParams, type ProductFilterParams, type ProductMatchesParams, type ProductPricesParams, type ProductReferencePricesParams, type ReferencePriceCardVariant, type ReferencePriceCurrencyMode, type ReferencePriceMetric, type ReferencePriceProvider, type ReferencePriceSeries, type ReferencePriceSeriesPoint, type ReferencePriceSnapshot, type ReferencePriceSnapshotsByProvider, type ReferencePriceSource, type ResourceId, type SealedProduct, type SearchBargainsParams, type Shop, type ShopMatch, type ShopMatchDelivery, type ShopMatchStats, type ShopMatchStatsForProductParams, type ShopMatchStatsForShopParams, type ShopMatchesForShop, type ShopMatchesForShopParams, type ShopPriceComparisonRow, type ShopPriceComparisonStats, 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 };
|
|
2960
|
+
export { type AlternativeName, type AssignShopUrlProductParams, type Bargain, type BargainInfo, type BargainProductRef, type BargainReferenceSource, type BrandRef, type Card, type CardMatchesParams, type CardPricesParams, type CardReferencePricesParams, type CardType, type CardVariants, type CatalogItem, type CategoryRef, type CompareShopPricesParams, type CurrencyCode, DEFAULT_BASE_URL, type DailyPricePoint, type DailyPriceStatsParams, type EstimatedValue, type EstimatedValuesParams, type Expansion, type ExpansionCard, type ExpansionContents, type ExpansionLivePricing, type ExpansionRef, type ExpansionSealedProduct, type GradingCompany, type ItemCondition, type ItemDailyStats, type ItemEstimatedValue, type ItemFullStats, type ItemPriceComparison, type ItemRef, type ItemReferencePrices, type ItemShopMatch, type ItemShopMatches, type ItemShopPriceHistory, type ItemSoldPrices, type ItemStats, type ItemVariantDailyStats, type ItemVariantStats, type ListBargainsParams, type ListCardsParams, type ListProductsParams, type ListResponse, type ListShopMatchesParams, type ListShopsParams, type LivePricingDetail, type LivePricingForItem, type LowestShopOffer, type MatchShop, type MatchedItemRef, type PackRate, type PackRateBucket, type PageMeta, type PaginationParams, type PlatformStats, type PremiumOptions, type PrintingLanguage, type ProductByVariantParams, type ProductDailyByVariantParams, type ProductDailyStatsParams, type ProductFilterParams, type ProductMatchesParams, type ProductPricesParams, type ProductReferencePricesParams, type ReferencePriceCardVariant, type ReferencePriceCurrencyMode, type ReferencePriceMetric, type ReferencePriceProvider, type ReferencePriceSeries, type ReferencePriceSeriesPoint, type ReferencePriceSnapshot, type ReferencePriceSnapshotsByProvider, type ReferencePriceSource, type ResourceId, type SealedProduct, type SearchBargainsParams, type Shop, type ShopItemPriceHistory, type ShopMatch, type ShopMatchDelivery, type ShopMatchStats, type ShopMatchStatsForProductParams, type ShopMatchStatsForShopParams, type ShopMatchesForShop, type ShopMatchesForShopParams, type ShopPriceComparisonRow, type ShopPriceComparisonStats, type ShopPriceHistory, type ShopPriceHistoryList, type ShopPricePoint, type ShopRef, type ShopSummary, type ShopUrl, type ShopUrlDiscoveredBy, type ShopUrlMutationResult, type ShopUrlStatus, type SoldPrice, type StatsItemRef, type SubmitShopUrlParams, TcgPriser, TcgPriserError, type TcgPriserErrorCode, type TcgPriserOptions, type Timestamp, type TopItem, type TopProductsParams, type VariantPriceStat, type VariantSelector, type VariantStatsSummary, type components };
|
package/dist/index.d.ts
CHANGED
|
@@ -1207,18 +1207,18 @@ type CardSchema = {
|
|
|
1207
1207
|
name: string;
|
|
1208
1208
|
shortName: string | undefined;
|
|
1209
1209
|
technicalName: string;
|
|
1210
|
-
brand:
|
|
1210
|
+
brand: BrandRef;
|
|
1211
1211
|
manufacturer: string;
|
|
1212
1212
|
modelNumber: string | undefined;
|
|
1213
|
-
category:
|
|
1214
|
-
expansion:
|
|
1213
|
+
category: CategoryRef | undefined;
|
|
1214
|
+
expansion: ExpansionRef | undefined;
|
|
1215
1215
|
/**
|
|
1216
1216
|
* @description Printing language of the item
|
|
1217
1217
|
* @example JPN
|
|
1218
1218
|
* @enum {string|null}
|
|
1219
1219
|
*/
|
|
1220
1220
|
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
1221
|
-
alternativeNames:
|
|
1221
|
+
alternativeNames: AlternativeName[];
|
|
1222
1222
|
supportsMultipackPricing: boolean;
|
|
1223
1223
|
/**
|
|
1224
1224
|
* @description Absolute asset URL, or null when absent
|
|
@@ -1263,15 +1263,15 @@ type CardSchema = {
|
|
|
1263
1263
|
artist: string | undefined;
|
|
1264
1264
|
cardmarketId: string | undefined;
|
|
1265
1265
|
tcgplayerId: string | undefined;
|
|
1266
|
-
variants:
|
|
1266
|
+
variants: CardVariants | undefined;
|
|
1267
1267
|
prisjaktId: string | undefined;
|
|
1268
|
-
lowestShopOffer:
|
|
1268
|
+
lowestShopOffer: LowestShopOfferSchema | undefined;
|
|
1269
1269
|
referencePriceSnapshotsByProvider: {
|
|
1270
|
-
[key: string]:
|
|
1270
|
+
[key: string]: ReferencePriceSnapshot;
|
|
1271
1271
|
};
|
|
1272
1272
|
};
|
|
1273
1273
|
type LowestShopOfferSchema = {
|
|
1274
|
-
shop:
|
|
1274
|
+
shop: ShopRef;
|
|
1275
1275
|
url: string;
|
|
1276
1276
|
/** @example 149.5 */
|
|
1277
1277
|
price: number;
|
|
@@ -1426,7 +1426,6 @@ type BargainInfo = {
|
|
|
1426
1426
|
};
|
|
1427
1427
|
/** The cheapest current shop offer for a card or product. */
|
|
1428
1428
|
type LowestShopOffer = LowestShopOfferSchema;
|
|
1429
|
-
type ReferencePriceProvider = "tradera" | "cardmarket" | "tcgplayer" | "ebay";
|
|
1430
1429
|
type ReferencePriceSnapshot = {
|
|
1431
1430
|
/** @enum {string} */
|
|
1432
1431
|
provider: "cardmarket" | "tcgplayer" | "ebay" | "tradera";
|
|
@@ -1448,6 +1447,7 @@ type ReferencePriceSnapshot = {
|
|
|
1448
1447
|
*/
|
|
1449
1448
|
snapshotDate: string;
|
|
1450
1449
|
};
|
|
1450
|
+
type ReferencePriceProvider = "tradera" | "cardmarket" | "tcgplayer" | "ebay";
|
|
1451
1451
|
/** Keyed by provider, at most one snapshot per provider. */
|
|
1452
1452
|
type ReferencePriceSnapshotsByProvider = Partial<Record<ReferencePriceProvider, ReferencePriceSnapshot>>;
|
|
1453
1453
|
/** A card, as returned by `client.cards.get()` / `client.cards.list()`, and as embedded in
|
|
@@ -1462,18 +1462,18 @@ type Card = {
|
|
|
1462
1462
|
name: string;
|
|
1463
1463
|
shortName: string | undefined;
|
|
1464
1464
|
technicalName: string;
|
|
1465
|
-
brand:
|
|
1465
|
+
brand: BrandRef;
|
|
1466
1466
|
manufacturer: string;
|
|
1467
1467
|
modelNumber: string | undefined;
|
|
1468
|
-
category:
|
|
1469
|
-
expansion:
|
|
1468
|
+
category: CategoryRef | undefined;
|
|
1469
|
+
expansion: ExpansionRef | undefined;
|
|
1470
1470
|
/**
|
|
1471
1471
|
* @description Printing language of the item
|
|
1472
1472
|
* @example JPN
|
|
1473
1473
|
* @enum {string|null}
|
|
1474
1474
|
*/
|
|
1475
1475
|
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
1476
|
-
alternativeNames:
|
|
1476
|
+
alternativeNames: AlternativeName[];
|
|
1477
1477
|
supportsMultipackPricing: boolean;
|
|
1478
1478
|
/**
|
|
1479
1479
|
* @description Absolute asset URL, or null when absent
|
|
@@ -1518,11 +1518,11 @@ type Card = {
|
|
|
1518
1518
|
artist: string | undefined;
|
|
1519
1519
|
cardmarketId: string | undefined;
|
|
1520
1520
|
tcgplayerId: string | undefined;
|
|
1521
|
-
variants:
|
|
1521
|
+
variants: CardVariants | undefined;
|
|
1522
1522
|
prisjaktId: string | undefined;
|
|
1523
|
-
lowestShopOffer:
|
|
1523
|
+
lowestShopOffer: LowestShopOfferSchema | undefined;
|
|
1524
1524
|
referencePriceSnapshotsByProvider: {
|
|
1525
|
-
[key: string]:
|
|
1525
|
+
[key: string]: ReferencePriceSnapshot;
|
|
1526
1526
|
};
|
|
1527
1527
|
};
|
|
1528
1528
|
/** A sealed product (booster box, ETB, tin, ...), as returned by `client.products.get()` /
|
|
@@ -1536,18 +1536,18 @@ type SealedProduct = {
|
|
|
1536
1536
|
name: string;
|
|
1537
1537
|
shortName: string | undefined;
|
|
1538
1538
|
technicalName: string;
|
|
1539
|
-
brand:
|
|
1539
|
+
brand: BrandRef;
|
|
1540
1540
|
manufacturer: string;
|
|
1541
1541
|
modelNumber: string | undefined;
|
|
1542
|
-
category:
|
|
1543
|
-
expansion:
|
|
1542
|
+
category: CategoryRef | undefined;
|
|
1543
|
+
expansion: ExpansionRef | undefined;
|
|
1544
1544
|
/**
|
|
1545
1545
|
* @description Printing language of the item
|
|
1546
1546
|
* @example JPN
|
|
1547
1547
|
* @enum {string|null}
|
|
1548
1548
|
*/
|
|
1549
1549
|
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
1550
|
-
alternativeNames:
|
|
1550
|
+
alternativeNames: AlternativeName[];
|
|
1551
1551
|
supportsMultipackPricing: boolean;
|
|
1552
1552
|
/**
|
|
1553
1553
|
* @description Absolute asset URL, or null when absent
|
|
@@ -1590,9 +1590,9 @@ type SealedProduct = {
|
|
|
1590
1590
|
epid: string | undefined;
|
|
1591
1591
|
priceChartingId: string | undefined;
|
|
1592
1592
|
prisjaktId: string | undefined;
|
|
1593
|
-
lowestShopOffer:
|
|
1593
|
+
lowestShopOffer: LowestShopOfferSchema | undefined;
|
|
1594
1594
|
referencePriceSnapshotsByProvider: {
|
|
1595
|
-
[key: string]:
|
|
1595
|
+
[key: string]: ReferencePriceSnapshot;
|
|
1596
1596
|
};
|
|
1597
1597
|
};
|
|
1598
1598
|
/** A card or sealed product, discriminated on `kind`. */
|
|
@@ -1633,7 +1633,7 @@ type Bargain = {
|
|
|
1633
1633
|
* @example SEK
|
|
1634
1634
|
*/
|
|
1635
1635
|
currency: string | undefined;
|
|
1636
|
-
shop:
|
|
1636
|
+
shop: ShopRef;
|
|
1637
1637
|
inStock: boolean;
|
|
1638
1638
|
/**
|
|
1639
1639
|
* Format: date-time
|
|
@@ -1718,8 +1718,8 @@ type Expansion = {
|
|
|
1718
1718
|
*/
|
|
1719
1719
|
imageUrl: string | undefined;
|
|
1720
1720
|
year: number | undefined;
|
|
1721
|
-
brand:
|
|
1722
|
-
alternativeNames:
|
|
1721
|
+
brand: BrandRef;
|
|
1722
|
+
alternativeNames: AlternativeName[];
|
|
1723
1723
|
/** @description Sealed products in this expansion */
|
|
1724
1724
|
sealedCount: number;
|
|
1725
1725
|
/** @description Cards in this expansion */
|
|
@@ -1740,14 +1740,14 @@ type Expansion = {
|
|
|
1740
1740
|
/** Response of `client.expansions.products()`: everything in one expansion, cards and sealed
|
|
1741
1741
|
* products kept as separate `cards`/`sealed` groups rather than merged into one mixed list. */
|
|
1742
1742
|
type ExpansionContents = {
|
|
1743
|
-
expansion:
|
|
1743
|
+
expansion: ExpansionRef;
|
|
1744
1744
|
cards: {
|
|
1745
1745
|
count: number;
|
|
1746
|
-
items:
|
|
1746
|
+
items: CardSchema[];
|
|
1747
1747
|
};
|
|
1748
1748
|
sealed: {
|
|
1749
1749
|
count: number;
|
|
1750
|
-
items:
|
|
1750
|
+
items: SealedProduct[];
|
|
1751
1751
|
};
|
|
1752
1752
|
};
|
|
1753
1753
|
/** One card as embedded in `client.expansions.products()`'s `cards` group. `$ref`s `CardWithPricing`
|
|
@@ -1763,7 +1763,7 @@ type ShopMatchWithItemSchema = {
|
|
|
1763
1763
|
* @example 6a577711abc1ce71383d3e10
|
|
1764
1764
|
*/
|
|
1765
1765
|
id: string;
|
|
1766
|
-
shop:
|
|
1766
|
+
shop: ShopRef;
|
|
1767
1767
|
url: string;
|
|
1768
1768
|
/**
|
|
1769
1769
|
* @description Resource identifier
|
|
@@ -1792,9 +1792,9 @@ type ShopMatchWithItemSchema = {
|
|
|
1792
1792
|
/** @enum {string|null} */
|
|
1793
1793
|
gradingCompany: "PSA" | "BGS" | "CGC" | "SGC" | "ACE" | "RAUKCARD" | "TAG" | "GMA" | undefined;
|
|
1794
1794
|
grade: number | undefined;
|
|
1795
|
-
item:
|
|
1796
|
-
expansion:
|
|
1797
|
-
category:
|
|
1795
|
+
item: MatchedItemRef | undefined;
|
|
1796
|
+
expansion: ExpansionRef | undefined;
|
|
1797
|
+
category: CategoryRef | undefined;
|
|
1798
1798
|
/**
|
|
1799
1799
|
* Format: date-time
|
|
1800
1800
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -1817,7 +1817,7 @@ type ItemShopMatchSchema = {
|
|
|
1817
1817
|
* @example 6a577711abc1ce71383d3e10
|
|
1818
1818
|
*/
|
|
1819
1819
|
id: string;
|
|
1820
|
-
shop:
|
|
1820
|
+
shop: MatchShop;
|
|
1821
1821
|
url: string;
|
|
1822
1822
|
/**
|
|
1823
1823
|
* @description Resource identifier
|
|
@@ -1951,25 +1951,34 @@ type ShopMatchDelivery = {
|
|
|
1951
1951
|
supportsLocalPickup: boolean | undefined;
|
|
1952
1952
|
note: string | undefined;
|
|
1953
1953
|
};
|
|
1954
|
+
/** The shop identity embedded on an item-scoped match (`ItemShopMatch.shop`): like `ShopRef`, plus
|
|
1955
|
+
* delivery terms -- this is the one place a match row prices in shipping. */
|
|
1956
|
+
type MatchShop = {
|
|
1957
|
+
/** @example cardlevels */
|
|
1958
|
+
technicalName: string;
|
|
1959
|
+
/** @example Cardlevels */
|
|
1960
|
+
name: string;
|
|
1961
|
+
delivery: ShopMatchDelivery;
|
|
1962
|
+
};
|
|
1954
1963
|
/** A shop-match row scoped to one already-known item. `client.cards.matches()` and
|
|
1955
1964
|
* `client.products.matches()` drop `item`/`expansion`/`category` since the caller already has
|
|
1956
1965
|
* them, but add delivery terms since you're looking at one listing's total cost here. */
|
|
1957
1966
|
type ItemShopMatch = ItemShopMatchSchema;
|
|
1958
1967
|
/** Response of `client.cards.matches()` / `client.products.matches()`. */
|
|
1959
1968
|
type ItemShopMatches = {
|
|
1960
|
-
item:
|
|
1961
|
-
data:
|
|
1962
|
-
pagination:
|
|
1969
|
+
item: ItemRef;
|
|
1970
|
+
data: ItemShopMatchSchema[];
|
|
1971
|
+
pagination: PageMeta;
|
|
1963
1972
|
};
|
|
1964
1973
|
/** Response of `client.shopMatches.forShop()`: every match, of any item, currently live at one shop. */
|
|
1965
1974
|
type ShopMatchesForShop = {
|
|
1966
|
-
shop:
|
|
1967
|
-
data:
|
|
1968
|
-
pagination:
|
|
1975
|
+
shop: ShopSummary | undefined;
|
|
1976
|
+
data: ShopMatchWithItemSchema[];
|
|
1977
|
+
pagination: PageMeta;
|
|
1969
1978
|
};
|
|
1970
1979
|
/** One row of `client.shopMatches.shopStats()`: match counts per shop, not the matches themselves. */
|
|
1971
1980
|
type ShopMatchStats = {
|
|
1972
|
-
shop:
|
|
1981
|
+
shop: ShopSummary;
|
|
1973
1982
|
matchCount: number;
|
|
1974
1983
|
/** @description Matches resolved to a catalog item */
|
|
1975
1984
|
linkedMatchCount: number;
|
|
@@ -2005,8 +2014,8 @@ type DailyPricePoint = {
|
|
|
2005
2014
|
};
|
|
2006
2015
|
/** Response row of `client.priceStats.daily()`. */
|
|
2007
2016
|
type ItemDailyStats = {
|
|
2008
|
-
item:
|
|
2009
|
-
dailyStats:
|
|
2017
|
+
item: ItemRef;
|
|
2018
|
+
dailyStats: DailyPricePoint[];
|
|
2010
2019
|
};
|
|
2011
2020
|
type EstimatedValue = {
|
|
2012
2021
|
/** @example 149.5 */
|
|
@@ -2020,8 +2029,8 @@ type EstimatedValue = {
|
|
|
2020
2029
|
};
|
|
2021
2030
|
/** Response row of `client.priceStats.estimatedValues()`. */
|
|
2022
2031
|
type ItemEstimatedValue = {
|
|
2023
|
-
item:
|
|
2024
|
-
estimate:
|
|
2032
|
+
item: ItemRef;
|
|
2033
|
+
estimate: EstimatedValue;
|
|
2025
2034
|
};
|
|
2026
2035
|
/** Response row of `client.priceStats.topProducts()`: items ranked by shop availability, not price. */
|
|
2027
2036
|
type TopItem = {
|
|
@@ -2052,8 +2061,8 @@ type PackRate = {
|
|
|
2052
2061
|
* @example 6a577711abc1ce71383d3e10
|
|
2053
2062
|
*/
|
|
2054
2063
|
id: string;
|
|
2055
|
-
expansion:
|
|
2056
|
-
buckets:
|
|
2064
|
+
expansion: ExpansionRef;
|
|
2065
|
+
buckets: PackRateBucket[];
|
|
2057
2066
|
/**
|
|
2058
2067
|
* Format: date-time
|
|
2059
2068
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -2095,7 +2104,7 @@ type ReferencePriceSeries = {
|
|
|
2095
2104
|
grade: number | undefined;
|
|
2096
2105
|
currency: string;
|
|
2097
2106
|
sampleSize: number | undefined;
|
|
2098
|
-
points:
|
|
2107
|
+
points: ReferencePriceSeriesPoint[];
|
|
2099
2108
|
};
|
|
2100
2109
|
type ReferencePriceSeriesPoint = {
|
|
2101
2110
|
/**
|
|
@@ -2117,7 +2126,7 @@ type ReferencePriceCurrencyMode = "native" | "sek";
|
|
|
2117
2126
|
* keeps its own `currency`; in `sek` mode everything is `SEK`, converted at the rate stored on
|
|
2118
2127
|
* each point. */
|
|
2119
2128
|
type ItemReferencePrices = {
|
|
2120
|
-
item:
|
|
2129
|
+
item: ItemRef;
|
|
2121
2130
|
/**
|
|
2122
2131
|
* Format: date-time
|
|
2123
2132
|
* @example 2026-07-15T12:03:29.322Z
|
|
@@ -2132,7 +2141,7 @@ type ItemReferencePrices = {
|
|
|
2132
2141
|
metric: "price" | "low" | "mid" | "high" | "avg" | "avg1" | "avg7" | "avg30" | "directLow";
|
|
2133
2142
|
/** @enum {string} */
|
|
2134
2143
|
currencyMode: "native" | "sek";
|
|
2135
|
-
series:
|
|
2144
|
+
series: ReferencePriceSeries[];
|
|
2136
2145
|
};
|
|
2137
2146
|
type SoldPrice = {
|
|
2138
2147
|
/**
|
|
@@ -2161,9 +2170,9 @@ type SoldPrice = {
|
|
|
2161
2170
|
* `true` here. That field only exists because this envelope shape is shared with a free preview
|
|
2162
2171
|
* elsewhere in the API; this response is never the preview. */
|
|
2163
2172
|
type ItemSoldPrices = {
|
|
2164
|
-
item:
|
|
2165
|
-
data:
|
|
2166
|
-
pagination:
|
|
2173
|
+
item: ItemRef;
|
|
2174
|
+
data: SoldPrice[];
|
|
2175
|
+
pagination: PageMeta;
|
|
2167
2176
|
/** @enum {boolean} */
|
|
2168
2177
|
premiumRequired: true;
|
|
2169
2178
|
};
|
|
@@ -2189,14 +2198,14 @@ type LivePricingForItem = {
|
|
|
2189
2198
|
id: string;
|
|
2190
2199
|
name: string;
|
|
2191
2200
|
technicalName: string;
|
|
2192
|
-
pricing:
|
|
2201
|
+
pricing: LivePricingDetail;
|
|
2193
2202
|
};
|
|
2194
2203
|
/** Response of `client.expansions.livePricing()`: live pricing for every item in one expansion. */
|
|
2195
2204
|
type ExpansionLivePricing = {
|
|
2196
2205
|
expansion: {
|
|
2197
2206
|
technicalName: string;
|
|
2198
2207
|
};
|
|
2199
|
-
items:
|
|
2208
|
+
items: LivePricingForItem[];
|
|
2200
2209
|
};
|
|
2201
2210
|
/** The catalog item as embedded in stats responses: a `Card`/`SealedProduct` minus
|
|
2202
2211
|
* `lowestShopOffer` and `referencePriceSnapshotsByProvider`, which these endpoints already answer
|
|
@@ -2210,18 +2219,18 @@ type StatsItemRef = {
|
|
|
2210
2219
|
name: string;
|
|
2211
2220
|
shortName: string | undefined;
|
|
2212
2221
|
technicalName: string;
|
|
2213
|
-
brand:
|
|
2222
|
+
brand: BrandRef;
|
|
2214
2223
|
manufacturer: string;
|
|
2215
2224
|
modelNumber: string | undefined;
|
|
2216
|
-
category:
|
|
2217
|
-
expansion:
|
|
2225
|
+
category: CategoryRef | undefined;
|
|
2226
|
+
expansion: ExpansionRef | undefined;
|
|
2218
2227
|
/**
|
|
2219
2228
|
* @description Printing language of the item
|
|
2220
2229
|
* @example JPN
|
|
2221
2230
|
* @enum {string|null}
|
|
2222
2231
|
*/
|
|
2223
2232
|
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
2224
|
-
alternativeNames:
|
|
2233
|
+
alternativeNames: AlternativeName[];
|
|
2225
2234
|
supportsMultipackPricing: boolean;
|
|
2226
2235
|
/**
|
|
2227
2236
|
* @description Absolute asset URL, or null when absent
|
|
@@ -2266,7 +2275,7 @@ type StatsItemRef = {
|
|
|
2266
2275
|
artist: string | undefined;
|
|
2267
2276
|
cardmarketId: string | undefined;
|
|
2268
2277
|
tcgplayerId: string | undefined;
|
|
2269
|
-
variants:
|
|
2278
|
+
variants: CardVariants | undefined;
|
|
2270
2279
|
prisjaktId: string | undefined;
|
|
2271
2280
|
} | {
|
|
2272
2281
|
/**
|
|
@@ -2277,18 +2286,18 @@ type StatsItemRef = {
|
|
|
2277
2286
|
name: string;
|
|
2278
2287
|
shortName: string | undefined;
|
|
2279
2288
|
technicalName: string;
|
|
2280
|
-
brand:
|
|
2289
|
+
brand: BrandRef;
|
|
2281
2290
|
manufacturer: string;
|
|
2282
2291
|
modelNumber: string | undefined;
|
|
2283
|
-
category:
|
|
2284
|
-
expansion:
|
|
2292
|
+
category: CategoryRef | undefined;
|
|
2293
|
+
expansion: ExpansionRef | undefined;
|
|
2285
2294
|
/**
|
|
2286
2295
|
* @description Printing language of the item
|
|
2287
2296
|
* @example JPN
|
|
2288
2297
|
* @enum {string|null}
|
|
2289
2298
|
*/
|
|
2290
2299
|
language: "ENG" | "JPN" | "CHI" | undefined;
|
|
2291
|
-
alternativeNames:
|
|
2300
|
+
alternativeNames: AlternativeName[];
|
|
2292
2301
|
supportsMultipackPricing: boolean;
|
|
2293
2302
|
/**
|
|
2294
2303
|
* @description Absolute asset URL, or null when absent
|
|
@@ -2340,23 +2349,23 @@ type VariantStatsSummary = {
|
|
|
2340
2349
|
};
|
|
2341
2350
|
/** Response of `client.priceStats.product()`. */
|
|
2342
2351
|
type ItemStats = {
|
|
2343
|
-
item:
|
|
2344
|
-
dailyStats:
|
|
2345
|
-
estimate:
|
|
2346
|
-
variantStats:
|
|
2352
|
+
item: StatsItemRef;
|
|
2353
|
+
dailyStats: DailyPricePoint[];
|
|
2354
|
+
estimate: EstimatedValue;
|
|
2355
|
+
variantStats: VariantStatsSummary;
|
|
2347
2356
|
};
|
|
2348
2357
|
/** Response of `client.priceStats.productFull()`: everything `product()` has, plus the item's
|
|
2349
2358
|
* current shop matches. */
|
|
2350
2359
|
type ItemFullStats = {
|
|
2351
|
-
item:
|
|
2360
|
+
item: StatsItemRef;
|
|
2352
2361
|
stats: {
|
|
2353
|
-
dailyStats:
|
|
2354
|
-
variantStats:
|
|
2362
|
+
dailyStats: DailyPricePoint[];
|
|
2363
|
+
variantStats: VariantStatsSummary;
|
|
2355
2364
|
};
|
|
2356
|
-
estimate:
|
|
2365
|
+
estimate: EstimatedValue;
|
|
2357
2366
|
shopMatches: {
|
|
2358
|
-
data:
|
|
2359
|
-
pagination:
|
|
2367
|
+
data: ItemShopMatchSchema[];
|
|
2368
|
+
pagination: PageMeta;
|
|
2360
2369
|
};
|
|
2361
2370
|
};
|
|
2362
2371
|
type VariantPriceStat = {
|
|
@@ -2399,9 +2408,9 @@ type VariantSelector = {
|
|
|
2399
2408
|
};
|
|
2400
2409
|
/** Response of `client.priceStats.productDailyByVariant()`. */
|
|
2401
2410
|
type ItemVariantDailyStats = {
|
|
2402
|
-
item:
|
|
2403
|
-
variant:
|
|
2404
|
-
dailyStats:
|
|
2411
|
+
item: ItemRef;
|
|
2412
|
+
variant: VariantSelector;
|
|
2413
|
+
dailyStats: DailyPricePoint[];
|
|
2405
2414
|
};
|
|
2406
2415
|
type ShopPricePoint = {
|
|
2407
2416
|
/**
|
|
@@ -2419,18 +2428,36 @@ type ShopPricePoint = {
|
|
|
2419
2428
|
inStock: boolean;
|
|
2420
2429
|
url: string;
|
|
2421
2430
|
};
|
|
2431
|
+
/** One shop's history for the item `ItemShopPriceHistory` is scoped to. */
|
|
2432
|
+
type ShopPriceHistory = {
|
|
2433
|
+
/** @description The shop's technicalName */
|
|
2434
|
+
shop: string;
|
|
2435
|
+
history: ShopPricePoint[];
|
|
2436
|
+
};
|
|
2422
2437
|
/** Response of `client.shopMatchStats.forProduct()`: one product's price history, broken out per
|
|
2423
2438
|
* shop. */
|
|
2424
2439
|
type ItemShopPriceHistory = {
|
|
2425
|
-
item:
|
|
2426
|
-
shops:
|
|
2440
|
+
item: ItemRef;
|
|
2441
|
+
shops: ShopPriceHistory[];
|
|
2427
2442
|
recordCount: number;
|
|
2428
2443
|
};
|
|
2444
|
+
/** One product's history for the shop `ShopPriceHistoryList` is scoped to. */
|
|
2445
|
+
type ShopItemPriceHistory = {
|
|
2446
|
+
item: ItemRef;
|
|
2447
|
+
history: ShopPricePoint[];
|
|
2448
|
+
/** @example 149.5 */
|
|
2449
|
+
latestPrice: number | undefined;
|
|
2450
|
+
/**
|
|
2451
|
+
* Format: date-time
|
|
2452
|
+
* @example 2026-07-15T12:03:29.322Z
|
|
2453
|
+
*/
|
|
2454
|
+
latestDate: string | undefined;
|
|
2455
|
+
};
|
|
2429
2456
|
/** Response of `client.shopMatchStats.forShop()`: one shop's price history, broken out per
|
|
2430
2457
|
* product. */
|
|
2431
2458
|
type ShopPriceHistoryList = {
|
|
2432
2459
|
shop: string;
|
|
2433
|
-
items:
|
|
2460
|
+
items: ShopItemPriceHistory[];
|
|
2434
2461
|
itemCount: number;
|
|
2435
2462
|
};
|
|
2436
2463
|
type ShopPriceComparisonRow = {
|
|
@@ -2462,9 +2489,9 @@ type ShopPriceComparisonStats = {
|
|
|
2462
2489
|
/** Response of `client.shopMatchStats.compare()`: one product's price at every shop that carries
|
|
2463
2490
|
* it, as of one date. `stats` is `undefined` when no shop had a price on that date. */
|
|
2464
2491
|
type ItemPriceComparison = {
|
|
2465
|
-
item:
|
|
2466
|
-
items:
|
|
2467
|
-
stats:
|
|
2492
|
+
item: ItemRef;
|
|
2493
|
+
items: ShopPriceComparisonRow[];
|
|
2494
|
+
stats: ShopPriceComparisonStats | undefined;
|
|
2468
2495
|
};
|
|
2469
2496
|
type ShopUrlStatus = "pending" | "active" | "invalid" | "rejected" | "sanityRejected";
|
|
2470
2497
|
type ShopUrlDiscoveredBy = "scraper" | "user";
|
|
@@ -2477,7 +2504,7 @@ type ShopUrl = {
|
|
|
2477
2504
|
id: string;
|
|
2478
2505
|
url: string;
|
|
2479
2506
|
shop: string | undefined;
|
|
2480
|
-
status:
|
|
2507
|
+
status: ShopUrlStatus;
|
|
2481
2508
|
/** @enum {string} */
|
|
2482
2509
|
discoveredBy: "scraper" | "user";
|
|
2483
2510
|
/**
|
|
@@ -2521,7 +2548,7 @@ type ShopUrl = {
|
|
|
2521
2548
|
/** Response of `client.shopUrls.submit()` / `client.shopUrls.assignProduct()`. */
|
|
2522
2549
|
type ShopUrlMutationResult = {
|
|
2523
2550
|
message: string;
|
|
2524
|
-
shopUrl:
|
|
2551
|
+
shopUrl: ShopUrl;
|
|
2525
2552
|
};
|
|
2526
2553
|
interface ListBargainsParams {
|
|
2527
2554
|
type?: 'sealed' | 'card' | 'all';
|
|
@@ -2930,4 +2957,4 @@ declare class TcgPriserError extends Error {
|
|
|
2930
2957
|
body: string;
|
|
2931
2958
|
});
|
|
2932
2959
|
}
|
|
2933
|
-
export { type AlternativeName, type AssignShopUrlProductParams, type Bargain, type BargainInfo, type BargainProductRef, type BargainReferenceSource, type BrandRef, type Card, type CardMatchesParams, type CardPricesParams, type CardReferencePricesParams, type CardType, type CardVariants, type CatalogItem, type CategoryRef, type CompareShopPricesParams, type CurrencyCode, DEFAULT_BASE_URL, type DailyPricePoint, type DailyPriceStatsParams, type EstimatedValue, type EstimatedValuesParams, type Expansion, type ExpansionCard, type ExpansionContents, type ExpansionLivePricing, type ExpansionRef, type ExpansionSealedProduct, type GradingCompany, type ItemCondition, type ItemDailyStats, type ItemEstimatedValue, type ItemFullStats, type ItemPriceComparison, type ItemRef, type ItemReferencePrices, type ItemShopMatch, type ItemShopMatches, type ItemShopPriceHistory, type ItemSoldPrices, type ItemStats, type ItemVariantDailyStats, type ItemVariantStats, type ListBargainsParams, type ListCardsParams, type ListProductsParams, type ListResponse, type ListShopMatchesParams, type ListShopsParams, type LivePricingDetail, type LivePricingForItem, type LowestShopOffer, type MatchedItemRef, type PackRate, type PackRateBucket, type PageMeta, type PaginationParams, type PlatformStats, type PremiumOptions, type PrintingLanguage, type ProductByVariantParams, type ProductDailyByVariantParams, type ProductDailyStatsParams, type ProductFilterParams, type ProductMatchesParams, type ProductPricesParams, type ProductReferencePricesParams, type ReferencePriceCardVariant, type ReferencePriceCurrencyMode, type ReferencePriceMetric, type ReferencePriceProvider, type ReferencePriceSeries, type ReferencePriceSeriesPoint, type ReferencePriceSnapshot, type ReferencePriceSnapshotsByProvider, type ReferencePriceSource, type ResourceId, type SealedProduct, type SearchBargainsParams, type Shop, type ShopMatch, type ShopMatchDelivery, type ShopMatchStats, type ShopMatchStatsForProductParams, type ShopMatchStatsForShopParams, type ShopMatchesForShop, type ShopMatchesForShopParams, type ShopPriceComparisonRow, type ShopPriceComparisonStats, 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 };
|
|
2960
|
+
export { type AlternativeName, type AssignShopUrlProductParams, type Bargain, type BargainInfo, type BargainProductRef, type BargainReferenceSource, type BrandRef, type Card, type CardMatchesParams, type CardPricesParams, type CardReferencePricesParams, type CardType, type CardVariants, type CatalogItem, type CategoryRef, type CompareShopPricesParams, type CurrencyCode, DEFAULT_BASE_URL, type DailyPricePoint, type DailyPriceStatsParams, type EstimatedValue, type EstimatedValuesParams, type Expansion, type ExpansionCard, type ExpansionContents, type ExpansionLivePricing, type ExpansionRef, type ExpansionSealedProduct, type GradingCompany, type ItemCondition, type ItemDailyStats, type ItemEstimatedValue, type ItemFullStats, type ItemPriceComparison, type ItemRef, type ItemReferencePrices, type ItemShopMatch, type ItemShopMatches, type ItemShopPriceHistory, type ItemSoldPrices, type ItemStats, type ItemVariantDailyStats, type ItemVariantStats, type ListBargainsParams, type ListCardsParams, type ListProductsParams, type ListResponse, type ListShopMatchesParams, type ListShopsParams, type LivePricingDetail, type LivePricingForItem, type LowestShopOffer, type MatchShop, type MatchedItemRef, type PackRate, type PackRateBucket, type PageMeta, type PaginationParams, type PlatformStats, type PremiumOptions, type PrintingLanguage, type ProductByVariantParams, type ProductDailyByVariantParams, type ProductDailyStatsParams, type ProductFilterParams, type ProductMatchesParams, type ProductPricesParams, type ProductReferencePricesParams, type ReferencePriceCardVariant, type ReferencePriceCurrencyMode, type ReferencePriceMetric, type ReferencePriceProvider, type ReferencePriceSeries, type ReferencePriceSeriesPoint, type ReferencePriceSnapshot, type ReferencePriceSnapshotsByProvider, type ReferencePriceSource, type ResourceId, type SealedProduct, type SearchBargainsParams, type Shop, type ShopItemPriceHistory, type ShopMatch, type ShopMatchDelivery, type ShopMatchStats, type ShopMatchStatsForProductParams, type ShopMatchStatsForShopParams, type ShopMatchesForShop, type ShopMatchesForShopParams, type ShopPriceComparisonRow, type ShopPriceComparisonStats, type ShopPriceHistory, type ShopPriceHistoryList, type ShopPricePoint, type ShopRef, type ShopSummary, type ShopUrl, type ShopUrlDiscoveredBy, type ShopUrlMutationResult, type ShopUrlStatus, type SoldPrice, type StatsItemRef, type SubmitShopUrlParams, TcgPriser, TcgPriserError, type TcgPriserErrorCode, type TcgPriserOptions, type Timestamp, type TopItem, type TopProductsParams, type VariantPriceStat, type VariantSelector, type VariantStatsSummary, type components };
|
package/package.json
CHANGED