@pfdev/api-types 3.0.20 → 3.0.21
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/package.json +1 -1
- package/v3.ts +6 -6
package/package.json
CHANGED
package/v3.ts
CHANGED
|
@@ -221,7 +221,7 @@ const PricePointSchema = Type.Object(
|
|
|
221
221
|
{
|
|
222
222
|
date: Type.String({ description: 'Date of the price point' }),
|
|
223
223
|
price: Type.Number({ description: 'Price on this date' }),
|
|
224
|
-
|
|
224
|
+
variant_id: Type.Union([Type.Integer(), Type.Null()], { description: 'Variant id (variants[].id on the card). Null when the variant text has no definition.' }),
|
|
225
225
|
grade: Type.Optional(Type.String({ description: 'Grade (graded cards only)' }))
|
|
226
226
|
},
|
|
227
227
|
{ title: 'PricePoint' }
|
|
@@ -229,7 +229,7 @@ const PricePointSchema = Type.Object(
|
|
|
229
229
|
|
|
230
230
|
export const CardPricesQuerySchema = Type.Object({
|
|
231
231
|
interval: Type.Number({ minimum: 1, maximum: 1825, default: 30, description: 'Number of days of price history to return' }),
|
|
232
|
-
|
|
232
|
+
variant_id: Type.Optional(Type.Integer({ minimum: 1, description: 'Variant id (variants[].id on the card). If omitted, returns all variants.' })),
|
|
233
233
|
grade: Type.Optional(Type.String({ description: 'Grade (e.g. "PSA 10", "BGS 9.5"). Omit or use "RAW" for ungraded.' })),
|
|
234
234
|
source: Type.Optional(Type.Union(
|
|
235
235
|
[Type.Literal('tcgplayer'), Type.Literal('ebay')],
|
|
@@ -242,7 +242,7 @@ export type CardPricesQuery = Static<typeof CardPricesQuerySchema>;
|
|
|
242
242
|
export const CardPricesResponseSchema = Type.Object(
|
|
243
243
|
{
|
|
244
244
|
cardid: Type.String({ description: 'Card ID' }),
|
|
245
|
-
|
|
245
|
+
variant_id: Type.Optional(Type.Integer({ description: 'Filtered variant id, if specified' })),
|
|
246
246
|
grade: Type.String({ description: 'Resolved grade used for the query' }),
|
|
247
247
|
source: Type.String({ description: 'Resolved price source used for the query' }),
|
|
248
248
|
interval: Type.Number({ description: 'Number of days of history returned' }),
|
|
@@ -261,7 +261,7 @@ const SaleRecordSchema = Type.Object(
|
|
|
261
261
|
sold_date: Type.String({ description: 'Date the card was sold' }),
|
|
262
262
|
price: Type.Number({ description: 'Sale price' }),
|
|
263
263
|
grade: Type.String({ description: 'Grade at time of sale' }),
|
|
264
|
-
|
|
264
|
+
variant_id: Type.Union([Type.Integer(), Type.Null()], { description: 'Variant id (variants[].id on the card). Null when the variant text has no definition.' }),
|
|
265
265
|
title: Type.Optional(Type.String({ description: 'eBay listing title' })),
|
|
266
266
|
url: Type.Optional(Type.String({ description: 'eBay listing URL' })),
|
|
267
267
|
image_url: Type.Optional(Type.String({ description: 'Listing image URL' })),
|
|
@@ -272,7 +272,7 @@ const SaleRecordSchema = Type.Object(
|
|
|
272
272
|
|
|
273
273
|
export const CardSalesQuerySchema = Type.Object({
|
|
274
274
|
grade: Type.Optional(Type.String({ description: 'Filter by grade (e.g. "PSA 10"). Returns all grades if omitted.' })),
|
|
275
|
-
|
|
275
|
+
variant_id: Type.Optional(Type.Integer({ minimum: 1, description: 'Filter by variant id (variants[].id on the card). Returns all variants if omitted.' })),
|
|
276
276
|
limit: Type.Optional(Type.Number({ minimum: 1, maximum: 100, default: 25, description: 'Max results to return' })),
|
|
277
277
|
offset: Type.Optional(Type.Number({ minimum: 0, default: 0, description: 'Pagination offset' }))
|
|
278
278
|
});
|
|
@@ -283,7 +283,7 @@ export const CardSalesResponseSchema = Type.Object(
|
|
|
283
283
|
{
|
|
284
284
|
cardid: Type.String({ description: 'Card ID' }),
|
|
285
285
|
grade: Type.Optional(Type.String({ description: 'Filtered grade, if specified' })),
|
|
286
|
-
|
|
286
|
+
variant_id: Type.Optional(Type.Integer({ description: 'Filtered variant id, if specified' })),
|
|
287
287
|
data: Type.Array(SaleRecordSchema, { description: 'Individual eBay sold listings, most recent first' }),
|
|
288
288
|
total: Type.Number({ description: 'Total matching sales records' }),
|
|
289
289
|
count: Type.Number({ description: 'Records returned in this response' })
|