@pfdev/api-types 3.0.24 → 3.0.25

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/v3.ts +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pfdev/api-types",
3
- "version": "3.0.24",
3
+ "version": "3.0.25",
4
4
  "description": "TypeScript types for PF API V3",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",
package/v3.ts CHANGED
@@ -75,6 +75,10 @@ const PriceVariantIdSchema = Type.Optional(Type.Union([Type.Integer(), Type.Null
75
75
  description: 'Id of the variant that price, change_1d and change_1d_value come from (the lowest-priced variant that isn\'t hidden)'
76
76
  }));
77
77
 
78
+ const MaxPriceVariantIdSchema = Type.Optional(Type.Union([Type.Integer(), Type.Null()], {
79
+ description: 'Id of the variant max_price comes from (the highest-priced variant that isn\'t hidden)'
80
+ }));
81
+
78
82
  const PriceDateSchema = Type.Optional(Type.Union([Type.String(), Type.Null()], {
79
83
  description: 'Date (YYYY-MM-DD) the price was last updated, for the variant in price_variant_id'
80
84
  }));
@@ -98,6 +102,7 @@ export const CardSchema = Type.Object(
98
102
  ...CardFilterFields,
99
103
  price: Type.Optional(Type.Number({ description: 'Price of the lowest-priced variant' })),
100
104
  max_price: Type.Optional(Type.Number({ description: 'Price of the highest-priced non-hidden variant' })),
105
+ max_price_variant_id: MaxPriceVariantIdSchema,
101
106
  change_1d: Type.Optional(Type.Number({ description: '1-day price change as a percentage' })),
102
107
  change_1d_value: Type.Optional(Type.Number({ description: '1-day price change in dollars' })),
103
108
  price_variant_id: PriceVariantIdSchema,
@@ -195,7 +200,10 @@ export const CardFacetOptionSchema = Type.Object(
195
200
  count: Type.Integer({ description: 'Cards this option matches, ignoring this facet\'s own selection' }),
196
201
  variant_count: Type.Integer({ description: 'Non-hidden variants on those cards, same counting rule. With variant_id, only the selected variants count.' }),
197
202
  order: Type.Optional(Type.Integer({ description: 'Display order, ascending: variant sort_order; sets by release date, newest first (0 = newest); languages English first. Omitted for rarity.' })),
198
- group: Type.Optional(CardFacetGroupSchema)
203
+ group: Type.Optional(CardFacetGroupSchema),
204
+ language: Type.Optional(Type.String({
205
+ description: 'Language code of the set (EN, JP). Set options only.'
206
+ }))
199
207
  },
200
208
  { title: 'CardFacetOption' }
201
209
  );
@@ -268,6 +276,7 @@ export const CardDetailSchema = Type.Object(
268
276
  price_date: PriceDateSchema,
269
277
  price: Type.Optional(Type.Number({ description: 'Price of the lowest-priced variant' })),
270
278
  max_price: Type.Optional(Type.Number({ description: 'Price of the highest-priced non-hidden variant' })),
279
+ max_price_variant_id: MaxPriceVariantIdSchema,
271
280
  change_1d: Type.Optional(Type.Number({ description: '1-day price change as a percentage' })),
272
281
  change_1d_value: Type.Optional(Type.Number({ description: '1-day price change in dollars' })),
273
282
  variants: {