@pfdev/api-types 3.0.32 → 3.0.34

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 +9 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pfdev/api-types",
3
- "version": "3.0.32",
3
+ "version": "3.0.34",
4
4
  "description": "TypeScript types for PF API V3",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",
package/v3.ts CHANGED
@@ -623,6 +623,9 @@ export type SealedPricesResponse = Static<typeof SealedPricesResponseSchema>;
623
623
  // ============= SETS =============
624
624
 
625
625
 
626
+ // pfdata_sets.language, same codes as Card.language
627
+ const SetLanguageSchema = Type.Union([Type.Literal('EN'), Type.Literal('JP')], { description: 'Set language code (EN, JP)' });
628
+
626
629
  // Response for list of sets
627
630
  export const SetListItemSchema = Type.Object({
628
631
  setid: Type.String({ description: 'Unique set identifier' }),
@@ -634,7 +637,8 @@ export const SetListItemSchema = Type.Object({
634
637
  printedtotal: Type.Number({ description: 'Total cards in set' }),
635
638
  current_price: Type.Optional(Type.Number({ description: 'Current market price' })),
636
639
  change_7d: Type.Optional(Type.Number({ description: '7-day price change %' })),
637
- slug: Type.String({ description: 'URL-friendly slug' })
640
+ slug: Type.String({ description: 'URL-friendly slug' }),
641
+ language: SetLanguageSchema
638
642
  });
639
643
 
640
644
  export type SetListItem = Static<typeof SetListItemSchema>;
@@ -679,6 +683,7 @@ export const SetDetailSchema = Type.Object(
679
683
  imgsymbol: Type.String({ format: 'uri', description: 'Set symbol image URL' }),
680
684
  imglogo: Type.String({ format: 'uri', description: 'Set logo image URL' }),
681
685
  slug: Type.String({ description: 'URL-friendly identifier' }),
686
+ language: SetLanguageSchema,
682
687
  ptcgocode: Type.Optional(Type.String({ description: 'Pokemon TCG Live code (if available)' })),
683
688
  legalities: Type.Optional(Type.Record(Type.String(), Type.String(), { description: 'Format legalities' })),
684
689
  current_price: Type.Optional(Type.Number({ description: 'Current market price' })),
@@ -1244,9 +1249,9 @@ export const InventoryPatchTransactionSchema = Type.Object(
1244
1249
  transaction_type: Type.Number(),
1245
1250
  transaction_date: Type.String({ description: 'ISO date (YYYY-MM-DD)' }),
1246
1251
  amount: Type.Number(),
1247
- currency: Type.Optional(Type.String({ minLength: 3, maxLength: 3, default: 'USD' })),
1248
- description: Type.Optional(Type.String()),
1249
- source_platform: Type.Optional(Type.String())
1252
+ currency: Type.Optional(Type.String({ minLength: 3, maxLength: 3, default: 'USD', description: 'Currency code from /currencies. Unknown codes are rejected with 400.' })),
1253
+ description: Type.Optional(Type.Union([Type.String(), Type.Null()])),
1254
+ source_platform: Type.Optional(Type.Union([Type.String(), Type.Null()]))
1250
1255
  },
1251
1256
  { title: 'InventoryPatchTransaction' }
1252
1257
  );