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.js
ADDED
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { components, operations } from "./schema.js";
|
|
2
|
+
type Schemas = components["schemas"];
|
|
3
|
+
/** A decoded VIN. A field that could not be determined is left out. */
|
|
4
|
+
export type VinDecode = Schemas["VinDecode"];
|
|
5
|
+
export type CheckDigit = Schemas["CheckDigit"];
|
|
6
|
+
export type Engine = Schemas["Engine"];
|
|
7
|
+
export type Safety = Schemas["Safety"];
|
|
8
|
+
export type Manufacturer = Schemas["Manufacturer"];
|
|
9
|
+
export type Plant = Schemas["Plant"];
|
|
10
|
+
export type Warning = Schemas["Warning"];
|
|
11
|
+
/** The catalog entry a decoded VIN reaches. */
|
|
12
|
+
export type Selection = Schemas["Selection"];
|
|
13
|
+
/** One vehicle of the catalog. */
|
|
14
|
+
export type Entry = Schemas["Entry"];
|
|
15
|
+
export type Make = Schemas["Make"];
|
|
16
|
+
export type Model = Schemas["Model"];
|
|
17
|
+
export type Submodel = Schemas["Submodel"];
|
|
18
|
+
export type EngineOption = Schemas["EngineOption"];
|
|
19
|
+
export type Meta = Schemas["MetaResponse"];
|
|
20
|
+
/** The body of every error the API sends. */
|
|
21
|
+
export type ErrorBody = Schemas["ErrorBody"];
|
|
22
|
+
/** One answer of a batch: a decode, or the error for that VIN. */
|
|
23
|
+
export type BatchItem = Schemas["BatchItem"];
|
|
24
|
+
type Query<Name extends keyof operations> = NonNullable<operations[Name]["parameters"]["query"]>;
|
|
25
|
+
export type YearsQuery = Query<"years">;
|
|
26
|
+
export type MakesQuery = Query<"makes">;
|
|
27
|
+
export type ModelsQuery = Query<"models">;
|
|
28
|
+
export type SubmodelsQuery = Query<"submodels">;
|
|
29
|
+
export type EnginesQuery = Query<"engines">;
|
|
30
|
+
export type SearchQuery = Query<"search">;
|
|
31
|
+
export {};
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,14 +1,70 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wenmar-open",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "VIN decoding and a year, make, model, trim and engine catalog: a typed client for the Wenmar Open API, and an offline mode that answers from a data file with no network. No API key.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vin",
|
|
7
|
+
"vin-decoder",
|
|
8
|
+
"vehicle",
|
|
9
|
+
"automotive",
|
|
10
|
+
"nhtsa",
|
|
11
|
+
"vpic",
|
|
12
|
+
"offline",
|
|
13
|
+
"webassembly"
|
|
14
|
+
],
|
|
5
15
|
"license": "MIT",
|
|
16
|
+
"author": "Wenmar Pro (https://wenmarpro.com)",
|
|
6
17
|
"homepage": "https://open.wenmarpro.com",
|
|
7
|
-
"
|
|
8
|
-
"README.md"
|
|
9
|
-
],
|
|
18
|
+
"bugs": "https://github.com/wenmar-pro/wenmar-open/issues",
|
|
10
19
|
"repository": {
|
|
11
20
|
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/wenmar-pro/wenmar-open.git"
|
|
21
|
+
"url": "git+https://github.com/wenmar-pro/wenmar-open.git",
|
|
22
|
+
"directory": "clients/js"
|
|
23
|
+
},
|
|
24
|
+
"type": "module",
|
|
25
|
+
"sideEffects": false,
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./offline": {
|
|
32
|
+
"types": "./dist/offline/index.d.ts",
|
|
33
|
+
"default": "./dist/offline/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./offline/node": {
|
|
36
|
+
"types": "./dist/offline/node.d.ts",
|
|
37
|
+
"default": "./dist/offline/node.js"
|
|
38
|
+
},
|
|
39
|
+
"./offline.wasm": "./dist/offline/wenmar_open.wasm",
|
|
40
|
+
"./package.json": "./package.json"
|
|
41
|
+
},
|
|
42
|
+
"types": "./dist/index.d.ts",
|
|
43
|
+
"files": [
|
|
44
|
+
"dist"
|
|
45
|
+
],
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=20"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"wenmar-open-data": "^3.0.0"
|
|
51
|
+
},
|
|
52
|
+
"peerDependenciesMeta": {
|
|
53
|
+
"wenmar-open-data": {
|
|
54
|
+
"optional": true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"generate": "node scripts/generate.mjs",
|
|
59
|
+
"build": "node scripts/clean.mjs dist && tsc -p tsconfig.json && node scripts/build-wasm.mjs",
|
|
60
|
+
"test:types": "node scripts/readme-examples.mjs && tsc -p test/types/tsconfig.dom.json && tsc -p test/types/tsconfig.node.json",
|
|
61
|
+
"test:unit": "node scripts/clean.mjs .test-build && tsc -p tsconfig.test.json && node --test .test-build/*.test.js",
|
|
62
|
+
"test": "npm run build && npm run test:types && npm run test:unit",
|
|
63
|
+
"prepack": "npm run build"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@types/node": "20.19.43",
|
|
67
|
+
"openapi-typescript": "7.13.0",
|
|
68
|
+
"typescript": "5.9.3"
|
|
13
69
|
}
|
|
14
70
|
}
|