wenmar-open 0.0.1 → 0.2.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 +323 -2
- package/dist/batch.d.ts +5 -0
- package/dist/batch.js +7 -0
- package/dist/client.d.ts +80 -0
- package/dist/client.js +200 -0
- package/dist/errors.d.ts +57 -0
- package/dist/errors.js +37 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +3 -0
- package/dist/offline/client.d.ts +70 -0
- package/dist/offline/client.js +245 -0
- package/dist/offline/engine.d.ts +53 -0
- package/dist/offline/engine.js +129 -0
- package/dist/offline/index.d.ts +10 -0
- package/dist/offline/index.js +4 -0
- package/dist/offline/node.d.ts +20 -0
- package/dist/offline/node.js +78 -0
- package/dist/offline/store.d.ts +72 -0
- package/dist/offline/store.js +156 -0
- package/dist/offline/wasm-inline.js +2 -0
- package/dist/offline/wenmar_open.wasm +0 -0
- package/dist/schema.d.ts +984 -0
- package/dist/schema.js +3 -0
- package/dist/types.d.ts +31 -0
- package/dist/types.js +1 -0
- package/package.json +62 -6
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,984 @@
|
|
|
1
|
+
export interface paths {
|
|
2
|
+
"/v1/meta": {
|
|
3
|
+
parameters: {
|
|
4
|
+
query?: never;
|
|
5
|
+
header?: never;
|
|
6
|
+
path?: never;
|
|
7
|
+
cookie?: never;
|
|
8
|
+
};
|
|
9
|
+
/** The data version, the vPIC release it came from, and when it was built. */
|
|
10
|
+
get: operations["meta"];
|
|
11
|
+
put?: never;
|
|
12
|
+
post?: never;
|
|
13
|
+
delete?: never;
|
|
14
|
+
options?: never;
|
|
15
|
+
head?: never;
|
|
16
|
+
patch?: never;
|
|
17
|
+
trace?: never;
|
|
18
|
+
};
|
|
19
|
+
"/v1/vehicles/engines": {
|
|
20
|
+
parameters: {
|
|
21
|
+
query?: never;
|
|
22
|
+
header?: never;
|
|
23
|
+
path?: never;
|
|
24
|
+
cookie?: never;
|
|
25
|
+
};
|
|
26
|
+
/** Engines of a model year, in short form, optionally for one submodel. */
|
|
27
|
+
get: operations["engines"];
|
|
28
|
+
put?: never;
|
|
29
|
+
post?: never;
|
|
30
|
+
delete?: never;
|
|
31
|
+
options?: never;
|
|
32
|
+
head?: never;
|
|
33
|
+
patch?: never;
|
|
34
|
+
trace?: never;
|
|
35
|
+
};
|
|
36
|
+
"/v1/vehicles/makes": {
|
|
37
|
+
parameters: {
|
|
38
|
+
query?: never;
|
|
39
|
+
header?: never;
|
|
40
|
+
path?: never;
|
|
41
|
+
cookie?: never;
|
|
42
|
+
};
|
|
43
|
+
/** Makes, popular ones first and the rest by name. */
|
|
44
|
+
get: operations["makes"];
|
|
45
|
+
put?: never;
|
|
46
|
+
post?: never;
|
|
47
|
+
delete?: never;
|
|
48
|
+
options?: never;
|
|
49
|
+
head?: never;
|
|
50
|
+
patch?: never;
|
|
51
|
+
trace?: never;
|
|
52
|
+
};
|
|
53
|
+
"/v1/vehicles/models": {
|
|
54
|
+
parameters: {
|
|
55
|
+
query?: never;
|
|
56
|
+
header?: never;
|
|
57
|
+
path?: never;
|
|
58
|
+
cookie?: never;
|
|
59
|
+
};
|
|
60
|
+
/** Models of a make, by name. An unknown make has no models. */
|
|
61
|
+
get: operations["models"];
|
|
62
|
+
put?: never;
|
|
63
|
+
post?: never;
|
|
64
|
+
delete?: never;
|
|
65
|
+
options?: never;
|
|
66
|
+
head?: never;
|
|
67
|
+
patch?: never;
|
|
68
|
+
trace?: never;
|
|
69
|
+
};
|
|
70
|
+
"/v1/vehicles/search": {
|
|
71
|
+
parameters: {
|
|
72
|
+
query?: never;
|
|
73
|
+
header?: never;
|
|
74
|
+
path?: never;
|
|
75
|
+
cookie?: never;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Catalog entries for free text, best first. Text that names nothing gives
|
|
79
|
+
* an empty list.
|
|
80
|
+
*/
|
|
81
|
+
get: operations["search"];
|
|
82
|
+
put?: never;
|
|
83
|
+
post?: never;
|
|
84
|
+
delete?: never;
|
|
85
|
+
options?: never;
|
|
86
|
+
head?: never;
|
|
87
|
+
patch?: never;
|
|
88
|
+
trace?: never;
|
|
89
|
+
};
|
|
90
|
+
"/v1/vehicles/submodels": {
|
|
91
|
+
parameters: {
|
|
92
|
+
query?: never;
|
|
93
|
+
header?: never;
|
|
94
|
+
path?: never;
|
|
95
|
+
cookie?: never;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Submodels of a model year: trims where NHTSA has them, else series, else
|
|
99
|
+
* this project's own list.
|
|
100
|
+
*/
|
|
101
|
+
get: operations["submodels"];
|
|
102
|
+
put?: never;
|
|
103
|
+
post?: never;
|
|
104
|
+
delete?: never;
|
|
105
|
+
options?: never;
|
|
106
|
+
head?: never;
|
|
107
|
+
patch?: never;
|
|
108
|
+
trace?: never;
|
|
109
|
+
};
|
|
110
|
+
"/v1/vehicles/trims": {
|
|
111
|
+
parameters: {
|
|
112
|
+
query?: never;
|
|
113
|
+
header?: never;
|
|
114
|
+
path?: never;
|
|
115
|
+
cookie?: never;
|
|
116
|
+
};
|
|
117
|
+
/** The same as `/v1/vehicles/submodels`, under the name most people use. */
|
|
118
|
+
get: operations["trims"];
|
|
119
|
+
put?: never;
|
|
120
|
+
post?: never;
|
|
121
|
+
delete?: never;
|
|
122
|
+
options?: never;
|
|
123
|
+
head?: never;
|
|
124
|
+
patch?: never;
|
|
125
|
+
trace?: never;
|
|
126
|
+
};
|
|
127
|
+
"/v1/vehicles/years": {
|
|
128
|
+
parameters: {
|
|
129
|
+
query?: never;
|
|
130
|
+
header?: never;
|
|
131
|
+
path?: never;
|
|
132
|
+
cookie?: never;
|
|
133
|
+
};
|
|
134
|
+
/** Model years, newest first. */
|
|
135
|
+
get: operations["years"];
|
|
136
|
+
put?: never;
|
|
137
|
+
post?: never;
|
|
138
|
+
delete?: never;
|
|
139
|
+
options?: never;
|
|
140
|
+
head?: never;
|
|
141
|
+
patch?: never;
|
|
142
|
+
trace?: never;
|
|
143
|
+
};
|
|
144
|
+
"/v1/vehicles/{id}": {
|
|
145
|
+
parameters: {
|
|
146
|
+
query?: never;
|
|
147
|
+
header?: never;
|
|
148
|
+
path?: never;
|
|
149
|
+
cookie?: never;
|
|
150
|
+
};
|
|
151
|
+
/** One catalog entry by its stable id. */
|
|
152
|
+
get: operations["entry"];
|
|
153
|
+
put?: never;
|
|
154
|
+
post?: never;
|
|
155
|
+
delete?: never;
|
|
156
|
+
options?: never;
|
|
157
|
+
head?: never;
|
|
158
|
+
patch?: never;
|
|
159
|
+
trace?: never;
|
|
160
|
+
};
|
|
161
|
+
"/v1/vin/batch": {
|
|
162
|
+
parameters: {
|
|
163
|
+
query?: never;
|
|
164
|
+
header?: never;
|
|
165
|
+
path?: never;
|
|
166
|
+
cookie?: never;
|
|
167
|
+
};
|
|
168
|
+
get?: never;
|
|
169
|
+
put?: never;
|
|
170
|
+
/**
|
|
171
|
+
* Decode up to 50 VINs.
|
|
172
|
+
* @description The answer is an array in the order asked. Each item is a decode, or the
|
|
173
|
+
* error object a single request for that VIN would have returned.
|
|
174
|
+
*/
|
|
175
|
+
post: operations["batch"];
|
|
176
|
+
delete?: never;
|
|
177
|
+
options?: never;
|
|
178
|
+
head?: never;
|
|
179
|
+
patch?: never;
|
|
180
|
+
trace?: never;
|
|
181
|
+
};
|
|
182
|
+
"/v1/vin/{vin}": {
|
|
183
|
+
parameters: {
|
|
184
|
+
query?: never;
|
|
185
|
+
header?: never;
|
|
186
|
+
path?: never;
|
|
187
|
+
cookie?: never;
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* Decode one VIN.
|
|
191
|
+
* @description Spaces and dashes in the VIN are ignored and letters may be in either
|
|
192
|
+
* case. A wrong check digit is not an error: `valid` is `false` and a
|
|
193
|
+
* warning says so.
|
|
194
|
+
*/
|
|
195
|
+
get: operations["decode"];
|
|
196
|
+
put?: never;
|
|
197
|
+
post?: never;
|
|
198
|
+
delete?: never;
|
|
199
|
+
options?: never;
|
|
200
|
+
head?: never;
|
|
201
|
+
patch?: never;
|
|
202
|
+
trace?: never;
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
export type webhooks = Record<string, never>;
|
|
206
|
+
export interface components {
|
|
207
|
+
schemas: {
|
|
208
|
+
/**
|
|
209
|
+
* @description One answer of a batch: a decode, or the error a single request for that
|
|
210
|
+
* VIN would have given.
|
|
211
|
+
*/
|
|
212
|
+
BatchItem: components["schemas"]["VinDecode"] | components["schemas"]["ErrorBody"];
|
|
213
|
+
BatchRequest: {
|
|
214
|
+
/**
|
|
215
|
+
* @description At most 50 VINs.
|
|
216
|
+
* @example [
|
|
217
|
+
* "KM8K2CAB4PU001140",
|
|
218
|
+
* "1HGCM82633A004352"
|
|
219
|
+
* ]
|
|
220
|
+
*/
|
|
221
|
+
vins: string[];
|
|
222
|
+
};
|
|
223
|
+
CheckDigit: {
|
|
224
|
+
/**
|
|
225
|
+
* @description What position 9 is.
|
|
226
|
+
* @example 4
|
|
227
|
+
*/
|
|
228
|
+
actual: string;
|
|
229
|
+
/**
|
|
230
|
+
* @description What position 9 should be.
|
|
231
|
+
* @example 4
|
|
232
|
+
*/
|
|
233
|
+
expected: string;
|
|
234
|
+
valid: boolean;
|
|
235
|
+
};
|
|
236
|
+
Engine: {
|
|
237
|
+
configuration?: string | null;
|
|
238
|
+
/** Format: int32 */
|
|
239
|
+
cylinders?: number | null;
|
|
240
|
+
/** Format: int32 */
|
|
241
|
+
displacement_cc?: number | null;
|
|
242
|
+
/** Format: double */
|
|
243
|
+
displacement_l?: number | null;
|
|
244
|
+
electrification?: string | null;
|
|
245
|
+
fuel?: string | null;
|
|
246
|
+
/**
|
|
247
|
+
* @description The short name shops use, such as `2.0L Turbo` or `3.5L V6`.
|
|
248
|
+
* @example 2.0L
|
|
249
|
+
*/
|
|
250
|
+
label?: string | null;
|
|
251
|
+
model?: string | null;
|
|
252
|
+
turbo?: boolean | null;
|
|
253
|
+
};
|
|
254
|
+
/** @description An engine in the engine step. */
|
|
255
|
+
EngineOption: {
|
|
256
|
+
/** @example 3-5l-turbo-v6 */
|
|
257
|
+
id: string;
|
|
258
|
+
/** @example 3.5L Turbo V6 */
|
|
259
|
+
label: string;
|
|
260
|
+
/** @description Whether the engine comes from this project's list instead of NHTSA. */
|
|
261
|
+
preset: boolean;
|
|
262
|
+
/**
|
|
263
|
+
* @description The characters in position 8 of a VIN that mean this engine and no
|
|
264
|
+
* other for this model year, where the data settles it.
|
|
265
|
+
*/
|
|
266
|
+
vin8?: string | null;
|
|
267
|
+
};
|
|
268
|
+
/** @description One vehicle of the catalog, down to whatever level was asked for. */
|
|
269
|
+
Entry: {
|
|
270
|
+
body?: string | null;
|
|
271
|
+
drive?: string | null;
|
|
272
|
+
engine?: string | null;
|
|
273
|
+
/**
|
|
274
|
+
* @description The stable id. It stays the same from one data release to the next
|
|
275
|
+
* for as long as the names do.
|
|
276
|
+
* @example 2019_honda_civic_si
|
|
277
|
+
*/
|
|
278
|
+
id: string;
|
|
279
|
+
make: string;
|
|
280
|
+
model: string;
|
|
281
|
+
submodel?: string | null;
|
|
282
|
+
/**
|
|
283
|
+
* @description One line naming everything above that is known.
|
|
284
|
+
* @example 2019 Honda Civic Si, Manual, FWD, Sedan
|
|
285
|
+
*/
|
|
286
|
+
summary: string;
|
|
287
|
+
transmission?: string | null;
|
|
288
|
+
/** @description NHTSA's vehicle types for this model year, such as `Truck`. */
|
|
289
|
+
vehicle_types: string[];
|
|
290
|
+
/** Format: int32 */
|
|
291
|
+
year: number;
|
|
292
|
+
};
|
|
293
|
+
/** @description The body of every error: `{ "error": { "code", "message", "details" } }`. */
|
|
294
|
+
ErrorBody: {
|
|
295
|
+
error: components["schemas"]["ErrorDetail"];
|
|
296
|
+
};
|
|
297
|
+
ErrorDetail: {
|
|
298
|
+
/**
|
|
299
|
+
* @description A stable code to branch on. One of `invalid_vin`, `validation_failed`,
|
|
300
|
+
* `not_found`, `method_not_allowed`, `payload_too_large`,
|
|
301
|
+
* `uri_too_long`, `rate_limited`, `unavailable`, `internal_error`.
|
|
302
|
+
* @example invalid_vin
|
|
303
|
+
*/
|
|
304
|
+
code: string;
|
|
305
|
+
/**
|
|
306
|
+
* @description More about the error. Always an object; empty when there is nothing
|
|
307
|
+
* to add.
|
|
308
|
+
*/
|
|
309
|
+
details: Record<string, unknown>;
|
|
310
|
+
/**
|
|
311
|
+
* @description A sentence for a person to read.
|
|
312
|
+
* @example a VIN has 17 characters, this has 16
|
|
313
|
+
*/
|
|
314
|
+
message: string;
|
|
315
|
+
};
|
|
316
|
+
/** @description A make in the make step of a vehicle form. */
|
|
317
|
+
Make: {
|
|
318
|
+
/**
|
|
319
|
+
* @description The make's id form.
|
|
320
|
+
* @example mercedes-benz
|
|
321
|
+
*/
|
|
322
|
+
id: string;
|
|
323
|
+
/** @example Mercedes-Benz */
|
|
324
|
+
name: string;
|
|
325
|
+
/** @description Whether it is on the list of popular makes, which are given first. */
|
|
326
|
+
popular: boolean;
|
|
327
|
+
};
|
|
328
|
+
Manufacturer: {
|
|
329
|
+
country?: string | null;
|
|
330
|
+
/** @example Hyundai Motor Co */
|
|
331
|
+
name: string;
|
|
332
|
+
vehicle_type?: string | null;
|
|
333
|
+
/**
|
|
334
|
+
* @description The manufacturer code: three characters, or six for a low-volume
|
|
335
|
+
* maker.
|
|
336
|
+
* @example KM8
|
|
337
|
+
*/
|
|
338
|
+
wmi: string;
|
|
339
|
+
};
|
|
340
|
+
/** @description What is being served. */
|
|
341
|
+
MetaResponse: {
|
|
342
|
+
/**
|
|
343
|
+
* @description When the data file was built, in UTC.
|
|
344
|
+
* @example 2026-10-01 04:25:57
|
|
345
|
+
*/
|
|
346
|
+
built_at: string;
|
|
347
|
+
/**
|
|
348
|
+
* @description The data release, such as `2026.09`. Also sent as `X-Data-Version`.
|
|
349
|
+
* @example 2026.09
|
|
350
|
+
*/
|
|
351
|
+
data_version: string;
|
|
352
|
+
/**
|
|
353
|
+
* @description The version of the server.
|
|
354
|
+
* @example 0.2.0
|
|
355
|
+
*/
|
|
356
|
+
server_version: string;
|
|
357
|
+
/**
|
|
358
|
+
* @description The NHTSA vPIC release the data was built from.
|
|
359
|
+
* @example vPICList_lite_2026_09
|
|
360
|
+
*/
|
|
361
|
+
vpic_release: string;
|
|
362
|
+
};
|
|
363
|
+
/** @description A model in the model step. */
|
|
364
|
+
Model: {
|
|
365
|
+
/**
|
|
366
|
+
* @description The model's id form. Unique within its make.
|
|
367
|
+
* @example f-150
|
|
368
|
+
*/
|
|
369
|
+
id: string;
|
|
370
|
+
/** @example F-150 */
|
|
371
|
+
name: string;
|
|
372
|
+
/**
|
|
373
|
+
* Format: int32
|
|
374
|
+
* @description The first and last model year the model exists in.
|
|
375
|
+
*/
|
|
376
|
+
year_from: number;
|
|
377
|
+
/** Format: int32 */
|
|
378
|
+
year_to: number;
|
|
379
|
+
};
|
|
380
|
+
/** @description Where the vehicle was built. `code` is position 11 of the VIN. */
|
|
381
|
+
Plant: {
|
|
382
|
+
city?: string | null;
|
|
383
|
+
/** @example U */
|
|
384
|
+
code: string;
|
|
385
|
+
company?: string | null;
|
|
386
|
+
country?: string | null;
|
|
387
|
+
state?: string | null;
|
|
388
|
+
};
|
|
389
|
+
/**
|
|
390
|
+
* @description Safety equipment as the manufacturer reported it: `Standard`, `Optional`,
|
|
391
|
+
* or a system type such as `Direct`.
|
|
392
|
+
*/
|
|
393
|
+
Safety: {
|
|
394
|
+
abs?: string | null;
|
|
395
|
+
adaptive_cruise?: string | null;
|
|
396
|
+
airbags_curtain?: string | null;
|
|
397
|
+
airbags_front?: string | null;
|
|
398
|
+
airbags_knee?: string | null;
|
|
399
|
+
airbags_side?: string | null;
|
|
400
|
+
auto_brake?: string | null;
|
|
401
|
+
backup_camera?: string | null;
|
|
402
|
+
blind_spot?: string | null;
|
|
403
|
+
dynamic_brake_support?: string | null;
|
|
404
|
+
esc?: string | null;
|
|
405
|
+
forward_collision?: string | null;
|
|
406
|
+
lane_centering?: string | null;
|
|
407
|
+
lane_departure?: string | null;
|
|
408
|
+
lane_keep?: string | null;
|
|
409
|
+
park_assist?: string | null;
|
|
410
|
+
pedestrian_braking?: string | null;
|
|
411
|
+
rear_cross_traffic?: string | null;
|
|
412
|
+
tpms?: string | null;
|
|
413
|
+
traction_control?: string | null;
|
|
414
|
+
};
|
|
415
|
+
/** @description The catalog's answer for one decoded VIN. */
|
|
416
|
+
Selection: {
|
|
417
|
+
/** @description The engine's id form, when the decode settles on one. */
|
|
418
|
+
engine_id?: string | null;
|
|
419
|
+
/** @description The most specific entry the decode reaches. */
|
|
420
|
+
entry: components["schemas"]["Entry"];
|
|
421
|
+
/** @description The submodel's id form, when the decode names exactly one. */
|
|
422
|
+
submodel_id?: string | null;
|
|
423
|
+
/**
|
|
424
|
+
* @description The id of the year, make and model.
|
|
425
|
+
* @example 2023_hyundai_kona
|
|
426
|
+
*/
|
|
427
|
+
vehicle_id: string;
|
|
428
|
+
};
|
|
429
|
+
/** @description A submodel: a trim, or a series where the data has no trim. */
|
|
430
|
+
Submodel: {
|
|
431
|
+
/** @example ex-l */
|
|
432
|
+
id: string;
|
|
433
|
+
/**
|
|
434
|
+
* @description `trim` or `series` as NHTSA has it, or `preset` from this project's
|
|
435
|
+
* own list.
|
|
436
|
+
* @example trim
|
|
437
|
+
*/
|
|
438
|
+
kind: string;
|
|
439
|
+
/** @example EX-L */
|
|
440
|
+
name: string;
|
|
441
|
+
};
|
|
442
|
+
/** @description A decoded VIN. A field that could not be determined is left out. */
|
|
443
|
+
VinDecode: {
|
|
444
|
+
/**
|
|
445
|
+
* Format: double
|
|
446
|
+
* @description Manufacturer base price in US dollars, when NHTSA has one.
|
|
447
|
+
*/
|
|
448
|
+
base_price_usd?: number | null;
|
|
449
|
+
body?: string | null;
|
|
450
|
+
catalog?: null | components["schemas"]["Selection"];
|
|
451
|
+
check_digit: components["schemas"]["CheckDigit"];
|
|
452
|
+
/** Format: int32 */
|
|
453
|
+
doors?: number | null;
|
|
454
|
+
/** @example FWD */
|
|
455
|
+
drivetrain?: string | null;
|
|
456
|
+
engine?: null | components["schemas"]["Engine"];
|
|
457
|
+
/** @description Gross vehicle weight rating class, as NHTSA words it. */
|
|
458
|
+
gvwr?: string | null;
|
|
459
|
+
/** @example Hyundai */
|
|
460
|
+
make?: string | null;
|
|
461
|
+
manufacturer: components["schemas"]["Manufacturer"];
|
|
462
|
+
/** @example Kona */
|
|
463
|
+
model?: string | null;
|
|
464
|
+
plant: components["schemas"]["Plant"];
|
|
465
|
+
safety?: null | components["schemas"]["Safety"];
|
|
466
|
+
/** Format: int32 */
|
|
467
|
+
seat_rows?: number | null;
|
|
468
|
+
/** Format: int32 */
|
|
469
|
+
seats?: number | null;
|
|
470
|
+
series?: string | null;
|
|
471
|
+
transmission?: string | null;
|
|
472
|
+
/** Format: int32 */
|
|
473
|
+
transmission_speeds?: number | null;
|
|
474
|
+
/** @example SE */
|
|
475
|
+
trim?: string | null;
|
|
476
|
+
/**
|
|
477
|
+
* @description Whether the check digit, position 9, is right. Many genuine VINs from
|
|
478
|
+
* outside North America fail it.
|
|
479
|
+
*/
|
|
480
|
+
valid: boolean;
|
|
481
|
+
/** @example KM8K2CAB4PU001140 */
|
|
482
|
+
vin: string;
|
|
483
|
+
/** @description Things to know about a decode that still succeeded. */
|
|
484
|
+
warnings: components["schemas"]["Warning"][];
|
|
485
|
+
/**
|
|
486
|
+
* Format: int32
|
|
487
|
+
* @description Front wheel diameter in inches.
|
|
488
|
+
*/
|
|
489
|
+
wheel_size_front?: number | null;
|
|
490
|
+
/**
|
|
491
|
+
* Format: int32
|
|
492
|
+
* @description Rear wheel diameter in inches.
|
|
493
|
+
*/
|
|
494
|
+
wheel_size_rear?: number | null;
|
|
495
|
+
/**
|
|
496
|
+
* Format: int32
|
|
497
|
+
* @example 2023
|
|
498
|
+
*/
|
|
499
|
+
year?: number | null;
|
|
500
|
+
};
|
|
501
|
+
Warning: {
|
|
502
|
+
/**
|
|
503
|
+
* @description `invalid_check_digit`, `model_year_unknown`, `no_patterns` or
|
|
504
|
+
* `model_unresolved`. More may be added.
|
|
505
|
+
* @example invalid_check_digit
|
|
506
|
+
*/
|
|
507
|
+
code: string;
|
|
508
|
+
message: string;
|
|
509
|
+
/** @description VINs the caller may have meant. */
|
|
510
|
+
suggestions?: string[];
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
responses: never;
|
|
514
|
+
parameters: never;
|
|
515
|
+
requestBodies: never;
|
|
516
|
+
headers: never;
|
|
517
|
+
pathItems: never;
|
|
518
|
+
}
|
|
519
|
+
export type $defs = Record<string, never>;
|
|
520
|
+
export interface operations {
|
|
521
|
+
meta: {
|
|
522
|
+
parameters: {
|
|
523
|
+
query?: never;
|
|
524
|
+
header?: never;
|
|
525
|
+
path?: never;
|
|
526
|
+
cookie?: never;
|
|
527
|
+
};
|
|
528
|
+
requestBody?: never;
|
|
529
|
+
responses: {
|
|
530
|
+
/** @description About the data being served. */
|
|
531
|
+
200: {
|
|
532
|
+
headers: {
|
|
533
|
+
[name: string]: unknown;
|
|
534
|
+
};
|
|
535
|
+
content: {
|
|
536
|
+
"application/json": components["schemas"]["MetaResponse"];
|
|
537
|
+
};
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
engines: {
|
|
542
|
+
parameters: {
|
|
543
|
+
query: {
|
|
544
|
+
/** @example honda */
|
|
545
|
+
make: string;
|
|
546
|
+
/** @example civic */
|
|
547
|
+
model: string;
|
|
548
|
+
/** @example 2019 */
|
|
549
|
+
year: number;
|
|
550
|
+
/**
|
|
551
|
+
* @description Only engines this submodel comes with.
|
|
552
|
+
* @example si
|
|
553
|
+
*/
|
|
554
|
+
submodel?: string;
|
|
555
|
+
/** @description Only engines whose label starts with this. */
|
|
556
|
+
term?: string;
|
|
557
|
+
};
|
|
558
|
+
header?: never;
|
|
559
|
+
path?: never;
|
|
560
|
+
cookie?: never;
|
|
561
|
+
};
|
|
562
|
+
requestBody?: never;
|
|
563
|
+
responses: {
|
|
564
|
+
/** @description Engines. */
|
|
565
|
+
200: {
|
|
566
|
+
headers: {
|
|
567
|
+
[name: string]: unknown;
|
|
568
|
+
};
|
|
569
|
+
content: {
|
|
570
|
+
"application/json": components["schemas"]["EngineOption"][];
|
|
571
|
+
};
|
|
572
|
+
};
|
|
573
|
+
/** @description `validation_failed`: `make`, `model` or `year` is missing. */
|
|
574
|
+
400: {
|
|
575
|
+
headers: {
|
|
576
|
+
[name: string]: unknown;
|
|
577
|
+
};
|
|
578
|
+
content: {
|
|
579
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
580
|
+
};
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
makes: {
|
|
585
|
+
parameters: {
|
|
586
|
+
query?: {
|
|
587
|
+
/**
|
|
588
|
+
* @description Only makes with a model in this model year.
|
|
589
|
+
* @example 2019
|
|
590
|
+
*/
|
|
591
|
+
year?: number;
|
|
592
|
+
/** @description `light` (the default), `all`, or a vPIC vehicle type id. */
|
|
593
|
+
scope?: string;
|
|
594
|
+
/**
|
|
595
|
+
* @description Only makes whose name or alias starts with this. Case and punctuation
|
|
596
|
+
* are ignored.
|
|
597
|
+
*/
|
|
598
|
+
term?: string;
|
|
599
|
+
/** @description At most this many, up to 500. */
|
|
600
|
+
limit?: number;
|
|
601
|
+
};
|
|
602
|
+
header?: never;
|
|
603
|
+
path?: never;
|
|
604
|
+
cookie?: never;
|
|
605
|
+
};
|
|
606
|
+
requestBody?: never;
|
|
607
|
+
responses: {
|
|
608
|
+
/** @description Makes. */
|
|
609
|
+
200: {
|
|
610
|
+
headers: {
|
|
611
|
+
[name: string]: unknown;
|
|
612
|
+
};
|
|
613
|
+
content: {
|
|
614
|
+
"application/json": components["schemas"]["Make"][];
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
/** @description `validation_failed`. */
|
|
618
|
+
400: {
|
|
619
|
+
headers: {
|
|
620
|
+
[name: string]: unknown;
|
|
621
|
+
};
|
|
622
|
+
content: {
|
|
623
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
models: {
|
|
629
|
+
parameters: {
|
|
630
|
+
query: {
|
|
631
|
+
/**
|
|
632
|
+
* @description A make's name, alias or id: `Chevrolet`, `chevy` or `chevrolet`.
|
|
633
|
+
* @example honda
|
|
634
|
+
*/
|
|
635
|
+
make: string;
|
|
636
|
+
/**
|
|
637
|
+
* @description Only models of this model year.
|
|
638
|
+
* @example 2019
|
|
639
|
+
*/
|
|
640
|
+
year?: number;
|
|
641
|
+
/** @description `light` (the default), `all`, or a vPIC vehicle type id. */
|
|
642
|
+
scope?: string;
|
|
643
|
+
/** @description Only models whose name starts with this. */
|
|
644
|
+
term?: string;
|
|
645
|
+
/** @description At most this many, up to 500. */
|
|
646
|
+
limit?: number;
|
|
647
|
+
};
|
|
648
|
+
header?: never;
|
|
649
|
+
path?: never;
|
|
650
|
+
cookie?: never;
|
|
651
|
+
};
|
|
652
|
+
requestBody?: never;
|
|
653
|
+
responses: {
|
|
654
|
+
/** @description Models. */
|
|
655
|
+
200: {
|
|
656
|
+
headers: {
|
|
657
|
+
[name: string]: unknown;
|
|
658
|
+
};
|
|
659
|
+
content: {
|
|
660
|
+
"application/json": components["schemas"]["Model"][];
|
|
661
|
+
};
|
|
662
|
+
};
|
|
663
|
+
/** @description `validation_failed`: `make` is missing. */
|
|
664
|
+
400: {
|
|
665
|
+
headers: {
|
|
666
|
+
[name: string]: unknown;
|
|
667
|
+
};
|
|
668
|
+
content: {
|
|
669
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
670
|
+
};
|
|
671
|
+
};
|
|
672
|
+
};
|
|
673
|
+
};
|
|
674
|
+
search: {
|
|
675
|
+
parameters: {
|
|
676
|
+
query: {
|
|
677
|
+
/**
|
|
678
|
+
* @description What someone would type: `2019 civic si`, `chevy 1500`, `f150`.
|
|
679
|
+
* @example 2019 civic si
|
|
680
|
+
*/
|
|
681
|
+
q: string;
|
|
682
|
+
/** @description `light` (the default), `all`, or a vPIC vehicle type id. */
|
|
683
|
+
scope?: string;
|
|
684
|
+
/** @description At most this many, up to 50. The default is 10. */
|
|
685
|
+
limit?: number;
|
|
686
|
+
};
|
|
687
|
+
header?: never;
|
|
688
|
+
path?: never;
|
|
689
|
+
cookie?: never;
|
|
690
|
+
};
|
|
691
|
+
requestBody?: never;
|
|
692
|
+
responses: {
|
|
693
|
+
/** @description Entries, best first. */
|
|
694
|
+
200: {
|
|
695
|
+
headers: {
|
|
696
|
+
[name: string]: unknown;
|
|
697
|
+
};
|
|
698
|
+
content: {
|
|
699
|
+
"application/json": components["schemas"]["Entry"][];
|
|
700
|
+
};
|
|
701
|
+
};
|
|
702
|
+
/** @description `validation_failed`: `q` is missing. */
|
|
703
|
+
400: {
|
|
704
|
+
headers: {
|
|
705
|
+
[name: string]: unknown;
|
|
706
|
+
};
|
|
707
|
+
content: {
|
|
708
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
709
|
+
};
|
|
710
|
+
};
|
|
711
|
+
};
|
|
712
|
+
};
|
|
713
|
+
submodels: {
|
|
714
|
+
parameters: {
|
|
715
|
+
query: {
|
|
716
|
+
/** @example honda */
|
|
717
|
+
make: string;
|
|
718
|
+
/**
|
|
719
|
+
* @description A model's name or id: `F-150`, `f150` or `f-150`.
|
|
720
|
+
* @example civic
|
|
721
|
+
*/
|
|
722
|
+
model: string;
|
|
723
|
+
/** @example 2019 */
|
|
724
|
+
year: number;
|
|
725
|
+
/** @description Only submodels whose name starts with this. */
|
|
726
|
+
term?: string;
|
|
727
|
+
};
|
|
728
|
+
header?: never;
|
|
729
|
+
path?: never;
|
|
730
|
+
cookie?: never;
|
|
731
|
+
};
|
|
732
|
+
requestBody?: never;
|
|
733
|
+
responses: {
|
|
734
|
+
/** @description Submodels. */
|
|
735
|
+
200: {
|
|
736
|
+
headers: {
|
|
737
|
+
[name: string]: unknown;
|
|
738
|
+
};
|
|
739
|
+
content: {
|
|
740
|
+
"application/json": components["schemas"]["Submodel"][];
|
|
741
|
+
};
|
|
742
|
+
};
|
|
743
|
+
/** @description `validation_failed`: `make`, `model` or `year` is missing. */
|
|
744
|
+
400: {
|
|
745
|
+
headers: {
|
|
746
|
+
[name: string]: unknown;
|
|
747
|
+
};
|
|
748
|
+
content: {
|
|
749
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
750
|
+
};
|
|
751
|
+
};
|
|
752
|
+
};
|
|
753
|
+
};
|
|
754
|
+
trims: {
|
|
755
|
+
parameters: {
|
|
756
|
+
query: {
|
|
757
|
+
/** @example honda */
|
|
758
|
+
make: string;
|
|
759
|
+
/**
|
|
760
|
+
* @description A model's name or id: `F-150`, `f150` or `f-150`.
|
|
761
|
+
* @example civic
|
|
762
|
+
*/
|
|
763
|
+
model: string;
|
|
764
|
+
/** @example 2019 */
|
|
765
|
+
year: number;
|
|
766
|
+
/** @description Only submodels whose name starts with this. */
|
|
767
|
+
term?: string;
|
|
768
|
+
};
|
|
769
|
+
header?: never;
|
|
770
|
+
path?: never;
|
|
771
|
+
cookie?: never;
|
|
772
|
+
};
|
|
773
|
+
requestBody?: never;
|
|
774
|
+
responses: {
|
|
775
|
+
/** @description Submodels. */
|
|
776
|
+
200: {
|
|
777
|
+
headers: {
|
|
778
|
+
[name: string]: unknown;
|
|
779
|
+
};
|
|
780
|
+
content: {
|
|
781
|
+
"application/json": components["schemas"]["Submodel"][];
|
|
782
|
+
};
|
|
783
|
+
};
|
|
784
|
+
/** @description `validation_failed`: `make`, `model` or `year` is missing. */
|
|
785
|
+
400: {
|
|
786
|
+
headers: {
|
|
787
|
+
[name: string]: unknown;
|
|
788
|
+
};
|
|
789
|
+
content: {
|
|
790
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
791
|
+
};
|
|
792
|
+
};
|
|
793
|
+
};
|
|
794
|
+
};
|
|
795
|
+
years: {
|
|
796
|
+
parameters: {
|
|
797
|
+
query?: {
|
|
798
|
+
/**
|
|
799
|
+
* @description `light` (cars, MPVs and trucks; the default), `all`, or a vPIC
|
|
800
|
+
* vehicle type id such as `6` for trailers.
|
|
801
|
+
*/
|
|
802
|
+
scope?: string;
|
|
803
|
+
/** @description Only years that start with this, such as `201`. */
|
|
804
|
+
term?: string;
|
|
805
|
+
};
|
|
806
|
+
header?: never;
|
|
807
|
+
path?: never;
|
|
808
|
+
cookie?: never;
|
|
809
|
+
};
|
|
810
|
+
requestBody?: never;
|
|
811
|
+
responses: {
|
|
812
|
+
/** @description Model years, newest first. */
|
|
813
|
+
200: {
|
|
814
|
+
headers: {
|
|
815
|
+
[name: string]: unknown;
|
|
816
|
+
};
|
|
817
|
+
content: {
|
|
818
|
+
/**
|
|
819
|
+
* @example [
|
|
820
|
+
* 2027,
|
|
821
|
+
* 2026,
|
|
822
|
+
* 2025
|
|
823
|
+
* ]
|
|
824
|
+
*/
|
|
825
|
+
"application/json": number[];
|
|
826
|
+
};
|
|
827
|
+
};
|
|
828
|
+
/** @description `validation_failed`. */
|
|
829
|
+
400: {
|
|
830
|
+
headers: {
|
|
831
|
+
[name: string]: unknown;
|
|
832
|
+
};
|
|
833
|
+
content: {
|
|
834
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
835
|
+
};
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
};
|
|
839
|
+
entry: {
|
|
840
|
+
parameters: {
|
|
841
|
+
query?: never;
|
|
842
|
+
header?: never;
|
|
843
|
+
path: {
|
|
844
|
+
/**
|
|
845
|
+
* @description A vehicle id: year, make and model, then optionally submodel and engine, joined by underscores.
|
|
846
|
+
* @example 2019_honda_civic_si
|
|
847
|
+
*/
|
|
848
|
+
id: string;
|
|
849
|
+
};
|
|
850
|
+
cookie?: never;
|
|
851
|
+
};
|
|
852
|
+
requestBody?: never;
|
|
853
|
+
responses: {
|
|
854
|
+
/** @description The entry. */
|
|
855
|
+
200: {
|
|
856
|
+
headers: {
|
|
857
|
+
[name: string]: unknown;
|
|
858
|
+
};
|
|
859
|
+
content: {
|
|
860
|
+
"application/json": components["schemas"]["Entry"];
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
/** @description `not_found`: no vehicle has that id. */
|
|
864
|
+
404: {
|
|
865
|
+
headers: {
|
|
866
|
+
[name: string]: unknown;
|
|
867
|
+
};
|
|
868
|
+
content: {
|
|
869
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
870
|
+
};
|
|
871
|
+
};
|
|
872
|
+
};
|
|
873
|
+
};
|
|
874
|
+
batch: {
|
|
875
|
+
parameters: {
|
|
876
|
+
query?: never;
|
|
877
|
+
header?: never;
|
|
878
|
+
path?: never;
|
|
879
|
+
cookie?: never;
|
|
880
|
+
};
|
|
881
|
+
requestBody: {
|
|
882
|
+
content: {
|
|
883
|
+
"application/json": components["schemas"]["BatchRequest"];
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
responses: {
|
|
887
|
+
/** @description One item per VIN, in order. */
|
|
888
|
+
200: {
|
|
889
|
+
headers: {
|
|
890
|
+
[name: string]: unknown;
|
|
891
|
+
};
|
|
892
|
+
content: {
|
|
893
|
+
"application/json": components["schemas"]["BatchItem"][];
|
|
894
|
+
};
|
|
895
|
+
};
|
|
896
|
+
/** @description `validation_failed`: the body is not `{ "vins": [...] }` or lists more than 50. */
|
|
897
|
+
400: {
|
|
898
|
+
headers: {
|
|
899
|
+
[name: string]: unknown;
|
|
900
|
+
};
|
|
901
|
+
content: {
|
|
902
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
903
|
+
};
|
|
904
|
+
};
|
|
905
|
+
/** @description `payload_too_large`. */
|
|
906
|
+
413: {
|
|
907
|
+
headers: {
|
|
908
|
+
[name: string]: unknown;
|
|
909
|
+
};
|
|
910
|
+
content: {
|
|
911
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
912
|
+
};
|
|
913
|
+
};
|
|
914
|
+
/** @description `rate_limited`. */
|
|
915
|
+
429: {
|
|
916
|
+
headers: {
|
|
917
|
+
[name: string]: unknown;
|
|
918
|
+
};
|
|
919
|
+
content: {
|
|
920
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
921
|
+
};
|
|
922
|
+
};
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
decode: {
|
|
926
|
+
parameters: {
|
|
927
|
+
query?: {
|
|
928
|
+
/**
|
|
929
|
+
* @description Use this model year instead of working it out from the VIN.
|
|
930
|
+
* @example 2023
|
|
931
|
+
*/
|
|
932
|
+
year?: number;
|
|
933
|
+
};
|
|
934
|
+
header?: never;
|
|
935
|
+
path: {
|
|
936
|
+
/**
|
|
937
|
+
* @description A 17-character VIN.
|
|
938
|
+
* @example KM8K2CAB4PU001140
|
|
939
|
+
*/
|
|
940
|
+
vin: string;
|
|
941
|
+
};
|
|
942
|
+
cookie?: never;
|
|
943
|
+
};
|
|
944
|
+
requestBody?: never;
|
|
945
|
+
responses: {
|
|
946
|
+
/** @description The decode. */
|
|
947
|
+
200: {
|
|
948
|
+
headers: {
|
|
949
|
+
[name: string]: unknown;
|
|
950
|
+
};
|
|
951
|
+
content: {
|
|
952
|
+
"application/json": components["schemas"]["VinDecode"];
|
|
953
|
+
};
|
|
954
|
+
};
|
|
955
|
+
/** @description `invalid_vin`: wrong length or illegal characters. `details.suggestions` lists likely corrections. */
|
|
956
|
+
400: {
|
|
957
|
+
headers: {
|
|
958
|
+
[name: string]: unknown;
|
|
959
|
+
};
|
|
960
|
+
content: {
|
|
961
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
962
|
+
};
|
|
963
|
+
};
|
|
964
|
+
/** @description `not_found`: no manufacturer is registered for the first three characters. */
|
|
965
|
+
404: {
|
|
966
|
+
headers: {
|
|
967
|
+
[name: string]: unknown;
|
|
968
|
+
};
|
|
969
|
+
content: {
|
|
970
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
/** @description `rate_limited`: over 600 requests a minute. See `Retry-After`. */
|
|
974
|
+
429: {
|
|
975
|
+
headers: {
|
|
976
|
+
[name: string]: unknown;
|
|
977
|
+
};
|
|
978
|
+
content: {
|
|
979
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
980
|
+
};
|
|
981
|
+
};
|
|
982
|
+
};
|
|
983
|
+
};
|
|
984
|
+
}
|