@pokemontcgapi/sdk 0.1.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/LICENSE +21 -0
- package/README.md +185 -0
- package/dist/client.d.ts +99 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +247 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +81 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +116 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +135 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +202 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +259 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +14 -0
- package/dist/types.js.map +1 -0
- package/package.json +40 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Le forme che l'API restituisce.
|
|
3
|
+
*
|
|
4
|
+
* Sono scritte a mano e non generate, e i campi portano il commento di cio' che
|
|
5
|
+
* contengono DAVVERO: al 2026-08-27 una parte dell'oggetto carta e' modellata
|
|
6
|
+
* ma vuota su tutto il catalogo, e un tipo che promette `attacks: Attack[]`
|
|
7
|
+
* fa scrivere codice che poi non gira mai. `| null` non basta a dirlo: il
|
|
8
|
+
* commento sopra il campo si', ed e' quello che si legge nell'editor.
|
|
9
|
+
*
|
|
10
|
+
* Regola: quando l'API smette di essere vuota su un campo, si toglie la nota.
|
|
11
|
+
* Non prima.
|
|
12
|
+
*/
|
|
13
|
+
export type Locale = 'en' | 'ja' | 'fr' | 'de' | 'es' | 'it';
|
|
14
|
+
/**
|
|
15
|
+
* Regione di stampa. `KR` esiste nello schema del server ma al 2026-08-27 non
|
|
16
|
+
* corrisponde ad alcun set: filtrarci sopra restituisce una pagina vuota, non
|
|
17
|
+
* un errore.
|
|
18
|
+
*/
|
|
19
|
+
export type PrintRegion = 'WEST' | 'JP' | 'CN' | 'KR';
|
|
20
|
+
export type PriceSource = 'TCGPLAYER' | 'CARDMARKET' | 'CARDTRADER'
|
|
21
|
+
/** Vendite concluse su eBay, aggregate da PriceCharting (che resta nominato in `provenance`). */
|
|
22
|
+
| 'EBAY_SOLD' | 'PTCG_INDEX' | 'COMMUNITY';
|
|
23
|
+
/** `DERIVED` e' calcolato da noi; `GUIDE` e' un valore pubblicato a monte. */
|
|
24
|
+
export type PriceBasis = 'GUIDE' | 'DERIVED' | 'SOLD' | 'ASKING';
|
|
25
|
+
export interface Grading {
|
|
26
|
+
readonly company: string;
|
|
27
|
+
readonly score: string;
|
|
28
|
+
}
|
|
29
|
+
export interface Price {
|
|
30
|
+
readonly source: PriceSource | string;
|
|
31
|
+
readonly variant: string;
|
|
32
|
+
readonly basis: PriceBasis | string;
|
|
33
|
+
readonly price: number;
|
|
34
|
+
readonly currency: string;
|
|
35
|
+
readonly locale: string | null;
|
|
36
|
+
readonly condition: string | null;
|
|
37
|
+
readonly printing: string | null;
|
|
38
|
+
readonly grading: Grading | null;
|
|
39
|
+
/** Giorno a cui l'osservazione si riferisce. Mai oggi: ogni fonte esce in ritardo. */
|
|
40
|
+
readonly as_of: string;
|
|
41
|
+
/** Quante osservazioni ci sono dietro, dove la fonte lo dice. */
|
|
42
|
+
readonly sample_n: number | null;
|
|
43
|
+
/** Stringa di attribuzione da mostrare accanto al numero. */
|
|
44
|
+
readonly provenance: string;
|
|
45
|
+
}
|
|
46
|
+
export interface CardImage {
|
|
47
|
+
readonly face: string;
|
|
48
|
+
readonly size: string;
|
|
49
|
+
readonly locale: string | null;
|
|
50
|
+
readonly url: string;
|
|
51
|
+
readonly image_source: string | null;
|
|
52
|
+
/** Modellate ma non popolate: usa il rapporto 5:7 per riservare lo spazio. */
|
|
53
|
+
readonly width: number | null;
|
|
54
|
+
readonly height: number | null;
|
|
55
|
+
}
|
|
56
|
+
export interface Translation {
|
|
57
|
+
readonly locale: Locale | string;
|
|
58
|
+
readonly name: string;
|
|
59
|
+
}
|
|
60
|
+
export interface Card {
|
|
61
|
+
readonly id: string;
|
|
62
|
+
/** Identificatore alternativo nella stessa forma. Risolve sulla stessa rotta. */
|
|
63
|
+
readonly legacy_id: string | null;
|
|
64
|
+
readonly name: string;
|
|
65
|
+
readonly number: string;
|
|
66
|
+
readonly number_sort: number | null;
|
|
67
|
+
readonly supertype: string | null;
|
|
68
|
+
readonly hp: number | null;
|
|
69
|
+
readonly rarity: string | null;
|
|
70
|
+
readonly regulation_mark: string | null;
|
|
71
|
+
readonly set_code: string;
|
|
72
|
+
readonly set_name: string;
|
|
73
|
+
readonly set_total: number | null;
|
|
74
|
+
readonly ptcgo_code: string | null;
|
|
75
|
+
readonly series: string | null;
|
|
76
|
+
readonly release_date: string | null;
|
|
77
|
+
readonly print_region: PrintRegion | string;
|
|
78
|
+
readonly artist_name: string | null;
|
|
79
|
+
readonly artist_slug: string | null;
|
|
80
|
+
/** Indice composito in euro, gia' sulla riga: niente seconda chiamata per una lista. */
|
|
81
|
+
readonly index_eur: number | null;
|
|
82
|
+
readonly last_price_at: string | null;
|
|
83
|
+
readonly tcgplayer_id: number | null;
|
|
84
|
+
readonly cardmarket_id: number | null;
|
|
85
|
+
readonly row_version: number;
|
|
86
|
+
readonly created_at: string;
|
|
87
|
+
readonly updated_at: string;
|
|
88
|
+
readonly prices?: readonly Price[];
|
|
89
|
+
readonly images?: readonly CardImage[];
|
|
90
|
+
readonly translations?: readonly Translation[];
|
|
91
|
+
readonly set?: CardSet;
|
|
92
|
+
/** Vuoto su tutto il catalogo al 2026-08-27. */
|
|
93
|
+
readonly attacks: unknown[] | null;
|
|
94
|
+
/** Vuoto su tutto il catalogo al 2026-08-27. */
|
|
95
|
+
readonly abilities: unknown[] | null;
|
|
96
|
+
/** Vuoto su tutto il catalogo al 2026-08-27. */
|
|
97
|
+
readonly weaknesses: unknown[] | null;
|
|
98
|
+
/** Vuoto su tutto il catalogo al 2026-08-27. */
|
|
99
|
+
readonly resistances: unknown[] | null;
|
|
100
|
+
/** Vuoto su tutto il catalogo al 2026-08-27. */
|
|
101
|
+
readonly subtypes: readonly string[];
|
|
102
|
+
/** Vuoto su tutto il catalogo al 2026-08-27. */
|
|
103
|
+
readonly retreat_cost: readonly string[];
|
|
104
|
+
/** Vuoto su tutto il catalogo al 2026-08-27. */
|
|
105
|
+
readonly rules: readonly string[];
|
|
106
|
+
/** Vuoto su tutto il catalogo al 2026-08-27. */
|
|
107
|
+
readonly flavor_text: string | null;
|
|
108
|
+
/** Popolato solo su parte dell'era Scarlet & Violet. */
|
|
109
|
+
readonly types: readonly string[];
|
|
110
|
+
/** Popolato solo su parte dell'era Scarlet & Violet. */
|
|
111
|
+
readonly national_pokedex_numbers: readonly number[];
|
|
112
|
+
}
|
|
113
|
+
export interface CardSet {
|
|
114
|
+
readonly id: string;
|
|
115
|
+
readonly code: string;
|
|
116
|
+
readonly slug: string;
|
|
117
|
+
readonly legacy_id: string | null;
|
|
118
|
+
readonly name: string;
|
|
119
|
+
readonly series: string | null;
|
|
120
|
+
readonly region: PrintRegion | string;
|
|
121
|
+
readonly release_date: string | null;
|
|
122
|
+
readonly total: number | null;
|
|
123
|
+
readonly printed_total: number | null;
|
|
124
|
+
readonly ptcgo_code: string | null;
|
|
125
|
+
readonly symbol_url: string | null;
|
|
126
|
+
readonly logo_url: string | null;
|
|
127
|
+
readonly updated_at?: string;
|
|
128
|
+
}
|
|
129
|
+
export interface Artist {
|
|
130
|
+
readonly slug: string;
|
|
131
|
+
readonly name: string;
|
|
132
|
+
readonly card_count: number;
|
|
133
|
+
}
|
|
134
|
+
export interface CatalogStatus {
|
|
135
|
+
readonly status: string;
|
|
136
|
+
readonly catalog: {
|
|
137
|
+
readonly sets: number;
|
|
138
|
+
readonly cards: number;
|
|
139
|
+
readonly sealed: number;
|
|
140
|
+
};
|
|
141
|
+
readonly sources: readonly {
|
|
142
|
+
readonly source: string;
|
|
143
|
+
readonly last_success_at: string | null;
|
|
144
|
+
readonly age_hours: number | null;
|
|
145
|
+
readonly status: string;
|
|
146
|
+
}[];
|
|
147
|
+
}
|
|
148
|
+
export interface Health {
|
|
149
|
+
readonly status: string;
|
|
150
|
+
readonly db: boolean;
|
|
151
|
+
readonly uptime_s: number;
|
|
152
|
+
readonly version: string;
|
|
153
|
+
}
|
|
154
|
+
export interface CollectionMeta {
|
|
155
|
+
readonly limit: number;
|
|
156
|
+
readonly count: number;
|
|
157
|
+
readonly total_count?: number;
|
|
158
|
+
readonly has_more: boolean;
|
|
159
|
+
}
|
|
160
|
+
export interface Collection<T> {
|
|
161
|
+
readonly data: readonly T[];
|
|
162
|
+
readonly meta: CollectionMeta;
|
|
163
|
+
readonly links?: {
|
|
164
|
+
readonly next?: string;
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
export interface BatchResult<T> {
|
|
168
|
+
readonly data: readonly T[];
|
|
169
|
+
readonly requested: number;
|
|
170
|
+
readonly found: number;
|
|
171
|
+
}
|
|
172
|
+
export type CardInclude = 'prices' | 'legalities' | 'translations' | 'images' | 'set' | 'artist';
|
|
173
|
+
export interface ListParams {
|
|
174
|
+
/**
|
|
175
|
+
* Grammatica di ricerca. **I nomi dei campi sono camelCase e puntati**
|
|
176
|
+
* (`set.code`, `nationalPokedexNumbers`) mentre le chiavi della risposta sono
|
|
177
|
+
* snake_case (`set_code`). Non e' un refuso: sono due vocabolari diversi, e
|
|
178
|
+
* scriverne uno al posto dell'altro produce un 400 con la lista dei validi.
|
|
179
|
+
*/
|
|
180
|
+
readonly q?: string;
|
|
181
|
+
readonly select?: readonly string[] | string;
|
|
182
|
+
readonly orderBy?: string;
|
|
183
|
+
readonly limit?: number;
|
|
184
|
+
readonly cursor?: string;
|
|
185
|
+
}
|
|
186
|
+
export interface CardListParams extends ListParams {
|
|
187
|
+
readonly include?: readonly CardInclude[] | string;
|
|
188
|
+
/** Sostituisce `name` con il nome nella lingua chiesta; ripiega su `en`. */
|
|
189
|
+
readonly lang?: Locale;
|
|
190
|
+
/** Codice del set, come scorciatoia al posto di `q=set.code:...`. */
|
|
191
|
+
readonly set?: string;
|
|
192
|
+
}
|
|
193
|
+
export interface SetListParams extends ListParams {
|
|
194
|
+
readonly region?: PrintRegion;
|
|
195
|
+
readonly series?: string;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Quanto ci si puo' fidare della classifica.
|
|
199
|
+
*
|
|
200
|
+
* `ambiguous` non e' un fallimento: e' il caso normale sulle ristampe, dove due
|
|
201
|
+
* stampe condividono l'illustrazione e dall'immagine sola non sono
|
|
202
|
+
* distinguibili. Un client che tratta `ambiguous` come `no_match` butta via la
|
|
203
|
+
* risposta giusta; uno che lo tratta come `match` consegna la stampa sbagliata.
|
|
204
|
+
*/
|
|
205
|
+
export type VisionDecision = 'match' | 'ambiguous' | 'no_match';
|
|
206
|
+
export interface VisionCandidate {
|
|
207
|
+
readonly id: string;
|
|
208
|
+
readonly name: string;
|
|
209
|
+
readonly number: string;
|
|
210
|
+
readonly set: {
|
|
211
|
+
readonly code: string;
|
|
212
|
+
readonly name: string;
|
|
213
|
+
readonly print_region: PrintRegion;
|
|
214
|
+
};
|
|
215
|
+
readonly rarity: string | null;
|
|
216
|
+
readonly image_url: string | null;
|
|
217
|
+
/**
|
|
218
|
+
* Distanza di Hamming, 0..512. E' il numero su cui tarare una soglia propria:
|
|
219
|
+
* le corrispondenze reali stanno sotto 150 anche su una foto rumorosa, e
|
|
220
|
+
* niente sopra 170 viene restituito.
|
|
221
|
+
*/
|
|
222
|
+
readonly distance: number;
|
|
223
|
+
/** La stessa informazione riscalata in 0..1. Comoda, non piu' informativa. */
|
|
224
|
+
readonly confidence: number;
|
|
225
|
+
}
|
|
226
|
+
export interface VisionResult {
|
|
227
|
+
readonly decision: VisionDecision;
|
|
228
|
+
/** Valorizzato SOLO quando `decision` e' `match`. Altrimenti `null`. */
|
|
229
|
+
readonly id: string | null;
|
|
230
|
+
readonly candidates: readonly VisionCandidate[];
|
|
231
|
+
}
|
|
232
|
+
export interface VisionMeta {
|
|
233
|
+
readonly count: number;
|
|
234
|
+
readonly cards_indexed: number;
|
|
235
|
+
readonly index_built_at: string;
|
|
236
|
+
readonly signature_version: number;
|
|
237
|
+
/**
|
|
238
|
+
* Quanti quadrilateri simili a una carta sono stati isolati nella foto. Zero
|
|
239
|
+
* con un `no_match` significa "la carta non e' stata trovata nell'immagine",
|
|
240
|
+
* non "non e' in catalogo": e' un problema di inquadratura, e sono due
|
|
241
|
+
* consigli diversi da dare all'utente.
|
|
242
|
+
*/
|
|
243
|
+
readonly regions_detected: number;
|
|
244
|
+
readonly hypotheses_tried: number;
|
|
245
|
+
readonly elapsed_ms: number;
|
|
246
|
+
}
|
|
247
|
+
export interface VisionResponse {
|
|
248
|
+
readonly data: VisionResult;
|
|
249
|
+
readonly meta: VisionMeta;
|
|
250
|
+
}
|
|
251
|
+
export interface IdentifyOptions {
|
|
252
|
+
/** Quanti candidati, 1..10. */
|
|
253
|
+
readonly topK?: number;
|
|
254
|
+
/** Restringe a un set. E' l'indizio che risolve una ristampa. */
|
|
255
|
+
readonly set?: string;
|
|
256
|
+
/** Restringe a una regione di stampa. Stesso scopo. */
|
|
257
|
+
readonly region?: PrintRegion;
|
|
258
|
+
}
|
|
259
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7D;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtD,MAAM,MAAM,WAAW,GACnB,WAAW,GACX,YAAY,GACZ,YAAY;AACd,iGAAiG;GAC/F,WAAW,GACX,YAAY,GACZ,WAAW,CAAC;AAEhB,8EAA8E;AAC9E,MAAM,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8E;IAC9E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,CAAC;CACjD;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,iEAAiE;IACjE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Le forme che l'API restituisce.
|
|
3
|
+
*
|
|
4
|
+
* Sono scritte a mano e non generate, e i campi portano il commento di cio' che
|
|
5
|
+
* contengono DAVVERO: al 2026-08-27 una parte dell'oggetto carta e' modellata
|
|
6
|
+
* ma vuota su tutto il catalogo, e un tipo che promette `attacks: Attack[]`
|
|
7
|
+
* fa scrivere codice che poi non gira mai. `| null` non basta a dirlo: il
|
|
8
|
+
* commento sopra il campo si', ed e' quello che si legge nell'editor.
|
|
9
|
+
*
|
|
10
|
+
* Regola: quando l'API smette di essere vuota su un campo, si toglie la nota.
|
|
11
|
+
* Non prima.
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pokemontcgapi/sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TypeScript client for the pokemontcgapi.com Pokémon TCG API: cards, sets, artists, images and prices with stated provenance.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"engines": { "node": ">=20" },
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": ["dist", "README.md"],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"pokemon",
|
|
20
|
+
"pokemon-tcg",
|
|
21
|
+
"tcg",
|
|
22
|
+
"trading-cards",
|
|
23
|
+
"api",
|
|
24
|
+
"sdk",
|
|
25
|
+
"card-prices",
|
|
26
|
+
"japanese-cards"
|
|
27
|
+
],
|
|
28
|
+
"repository": { "type": "git", "url": "git+https://github.com/pokemontcgapi/sdk-typescript.git" },
|
|
29
|
+
"homepage": "https://pokemontcgapi.com/sdk",
|
|
30
|
+
"bugs": { "url": "https://github.com/pokemontcgapi/sdk-typescript/issues" },
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc -p tsconfig.json",
|
|
33
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
34
|
+
"prepublishOnly": "npm run build"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^22.10.7",
|
|
38
|
+
"typescript": "^5.7.3"
|
|
39
|
+
}
|
|
40
|
+
}
|