@pfdev/api-types 3.0.29 → 3.0.31
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 +24 -7
package/package.json
CHANGED
package/v3.ts
CHANGED
|
@@ -156,7 +156,11 @@ const CardListFilterFields = {
|
|
|
156
156
|
setid: Type.Optional(Type.String({ description: 'Comma-separated set IDs (max 500). A single ID behaves as before.' })),
|
|
157
157
|
rarity: Type.Optional(Type.String({ description: 'Comma-separated rarities (max 50), matched exactly. A rarity matches cards in every language.' })),
|
|
158
158
|
language: Type.Optional(Type.String({ description: 'Comma-separated language codes (EN, JP; max 50)' })),
|
|
159
|
-
variant_id: Type.Optional(Type.String({ description: 'Comma-separated variant ids (variants[].id, max 50). Matches non-hidden variants only.' }))
|
|
159
|
+
variant_id: Type.Optional(Type.String({ description: 'Comma-separated variant ids (variants[].id, max 50). Matches non-hidden variants only.' })),
|
|
160
|
+
pokemon_id: Type.Optional(Type.Integer({
|
|
161
|
+
minimum: 1,
|
|
162
|
+
description: 'Only cards tied to this Pokémon (DexEntry.id, as in /dex and /users/me/dex/collection). An unknown id matches no cards.'
|
|
163
|
+
}))
|
|
160
164
|
};
|
|
161
165
|
|
|
162
166
|
const CardSearchField = Type.Optional(Type.String({ minLength: 1, description: 'Search by card name and/or number. Tokens with digits match card number; other tokens match card name.' }));
|
|
@@ -457,7 +461,7 @@ export const SealedItemSchema = Type.Object(
|
|
|
457
461
|
set_name: Type.Optional(Type.String({ description: 'Name of the set' })),
|
|
458
462
|
product_slug: Type.Optional(Type.String({ description: 'Product URL slug' })),
|
|
459
463
|
set_slug: Type.Optional(Type.String({ description: 'Set URL slug' })),
|
|
460
|
-
image: Type.Optional(Type.String({ description: 'Product image URL' })),
|
|
464
|
+
image: Type.Optional(Type.String({ description: 'Product image URL (WebP on the Pokefolio CDN). Not every product has an image there yet.' })),
|
|
461
465
|
tcgp_id: Type.Optional(Type.Number({ description: 'TCGPlayer product ID' })),
|
|
462
466
|
language: Type.Optional(Type.String({ description: 'Product language' })),
|
|
463
467
|
price: Type.Optional(Type.Number({ description: 'Current market price' })),
|
|
@@ -755,12 +759,22 @@ const ComparisonRangeSchema = Type.Union(
|
|
|
755
759
|
{ description: 'Period the change was measured over. ALL is measured over 1Y, the longest past price available.' }
|
|
756
760
|
);
|
|
757
761
|
|
|
758
|
-
|
|
762
|
+
const AllocationFields = {
|
|
763
|
+
value: Type.Number({ description: 'Market value in USD' }),
|
|
764
|
+
items: Type.Integer({ description: 'Items owned, counting each copy' }),
|
|
765
|
+
no_price_count: Type.Integer({ description: 'Copies with no current price, counted in items but adding nothing to value' })
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
export const CollectionAllocationSchema = Type.Object(AllocationFields, { title: 'CollectionAllocation' });
|
|
769
|
+
|
|
770
|
+
export const CollectionCardAllocationSchema = Type.Object(
|
|
759
771
|
{
|
|
760
|
-
|
|
761
|
-
|
|
772
|
+
...AllocationFields,
|
|
773
|
+
assumed_raw_count: Type.Integer({
|
|
774
|
+
description: 'Graded copies valued at the raw price because their grade has no current price'
|
|
775
|
+
})
|
|
762
776
|
},
|
|
763
|
-
{ title: '
|
|
777
|
+
{ title: 'CollectionCardAllocation' }
|
|
764
778
|
);
|
|
765
779
|
|
|
766
780
|
export const CollectionSummaryResponseSchema = Type.Object(
|
|
@@ -768,7 +782,7 @@ export const CollectionSummaryResponseSchema = Type.Object(
|
|
|
768
782
|
total_value: Type.Number({ description: 'Market value of everything owned, in USD' }),
|
|
769
783
|
items: Type.Integer({ description: 'Items owned, counting each copy' }),
|
|
770
784
|
allocation: Type.Object({
|
|
771
|
-
cards:
|
|
785
|
+
cards: CollectionCardAllocationSchema,
|
|
772
786
|
sealed: CollectionAllocationSchema
|
|
773
787
|
})
|
|
774
788
|
},
|
|
@@ -1129,6 +1143,9 @@ export const InventorySummaryItemSchema = Type.Object(
|
|
|
1129
1143
|
status: Type.Union([Type.Number(), Type.Null()], {
|
|
1130
1144
|
description: 'Numeric status code. <100 = active, >=100 = sold/past. Null when no details row exists yet.'
|
|
1131
1145
|
}),
|
|
1146
|
+
grade: Type.Union([Type.String(), Type.Null()], {
|
|
1147
|
+
description: 'Grade of this copy (e.g. "PSA 10"), matching a key of variants[].graded. Null when ungraded or no details row exists yet.'
|
|
1148
|
+
}),
|
|
1132
1149
|
acquired: Type.Union([Type.String(), Type.Null()], {
|
|
1133
1150
|
description: 'User-entered acquired date. Null when not set or no details row exists yet.'
|
|
1134
1151
|
}),
|