@cardog/api 0.2.1 → 0.3.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/CHANGELOG.md +9 -0
- package/dist/index.d.mts +82 -2
- package/dist/index.d.ts +82 -2
- package/dist/index.js +26 -3
- package/dist/index.mjs +26 -3
- package/dist/react/index.js +4 -1
- package/dist/react/index.mjs +4 -1
- package/package.json +12 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.0 (2026-04-03)
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- `vin.corgiV3(vin)` - High-performance VIN decoding using binary indexes (~3x faster)
|
|
7
|
+
- `vin.batchCorgi(vins)` - Ultra high-throughput batch decoding (~6000 VINs/sec)
|
|
8
|
+
- `vin.batchNano(vins)` - Batch nano lookups for variant data
|
|
9
|
+
- New types: `CorgiV3Result`, `BatchDecodeResponse`
|
|
10
|
+
- Query keys for React Query: `vinKeys.corgiV3`, `vinKeys.batchCorgi`, `vinKeys.batchNano`
|
|
11
|
+
|
|
3
12
|
## 0.2.1 (2026-03-31)
|
|
4
13
|
|
|
5
14
|
### Fixed
|
package/dist/index.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ interface ClientConfig {
|
|
|
9
9
|
}
|
|
10
10
|
interface RequestOptions {
|
|
11
11
|
headers?: Record<string, string>;
|
|
12
|
-
params?: Record<string, any
|
|
12
|
+
params?: Record<string, any> | URLSearchParams;
|
|
13
13
|
}
|
|
14
14
|
declare class APIError extends Error {
|
|
15
15
|
status: number;
|
|
@@ -34,14 +34,91 @@ declare class BaseClient {
|
|
|
34
34
|
}): Promise<T>;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
/** Corgi v3 decode result */
|
|
38
|
+
interface CorgiV3Result {
|
|
39
|
+
vin: string;
|
|
40
|
+
valid: boolean;
|
|
41
|
+
components: {
|
|
42
|
+
wmi: string;
|
|
43
|
+
vds: string;
|
|
44
|
+
vis: string;
|
|
45
|
+
modelYear: number;
|
|
46
|
+
checkDigit: string;
|
|
47
|
+
serialNumber: string;
|
|
48
|
+
};
|
|
49
|
+
vehicle?: {
|
|
50
|
+
make: string;
|
|
51
|
+
model: string;
|
|
52
|
+
year: number;
|
|
53
|
+
series?: string;
|
|
54
|
+
trim?: string;
|
|
55
|
+
bodyType?: string;
|
|
56
|
+
driveWheelConfiguration?: string;
|
|
57
|
+
fuelType?: string;
|
|
58
|
+
vehicleTransmission?: string;
|
|
59
|
+
numberOfDoors?: number;
|
|
60
|
+
};
|
|
61
|
+
engine?: {
|
|
62
|
+
model?: string;
|
|
63
|
+
cylinders?: number;
|
|
64
|
+
displacement?: number;
|
|
65
|
+
fuelType?: string;
|
|
66
|
+
power?: number;
|
|
67
|
+
};
|
|
68
|
+
plant?: {
|
|
69
|
+
code: string;
|
|
70
|
+
country?: string;
|
|
71
|
+
city?: string;
|
|
72
|
+
state?: string;
|
|
73
|
+
};
|
|
74
|
+
confidence: number;
|
|
75
|
+
warnings: Array<{
|
|
76
|
+
code: string;
|
|
77
|
+
message: string;
|
|
78
|
+
}>;
|
|
79
|
+
errors: Array<{
|
|
80
|
+
code: string;
|
|
81
|
+
message: string;
|
|
82
|
+
}>;
|
|
83
|
+
}
|
|
84
|
+
/** Batch decode response */
|
|
85
|
+
interface BatchDecodeResponse {
|
|
86
|
+
success: boolean;
|
|
87
|
+
count: number;
|
|
88
|
+
successful: number;
|
|
89
|
+
failed: number;
|
|
90
|
+
processingTime: string;
|
|
91
|
+
avgTimePerVin: string;
|
|
92
|
+
results: Array<{
|
|
93
|
+
vin: string;
|
|
94
|
+
result?: CorgiV3Result;
|
|
95
|
+
error?: string;
|
|
96
|
+
}>;
|
|
97
|
+
}
|
|
37
98
|
declare const vinKeys: {
|
|
38
99
|
readonly all: readonly ["vin"];
|
|
39
100
|
readonly image: (base64: string) => readonly ["vin", "image", string];
|
|
40
101
|
readonly decode: (vin: string) => readonly ["vin", "decode", string];
|
|
102
|
+
readonly corgiV3: (vin: string) => readonly ["vin", "corgi-v3", string];
|
|
103
|
+
readonly batchCorgi: (vins: string[]) => readonly ["vin", "batch-corgi", string[]];
|
|
104
|
+
readonly batchNano: (vins: string[]) => readonly ["vin", "batch-nano", string[]];
|
|
41
105
|
};
|
|
42
106
|
declare class VinAPI extends BaseClient {
|
|
43
107
|
decode(vin: string): Promise<VinDecodeResponse>;
|
|
44
108
|
corgi(vin: string): Promise<Partial<VinCorgiResponse>>;
|
|
109
|
+
/**
|
|
110
|
+
* Decode VIN using Corgi v3 binary indexes (high-performance, fully offline)
|
|
111
|
+
* ~3x faster than v2, no database calls required
|
|
112
|
+
*/
|
|
113
|
+
corgiV3(vin: string): Promise<CorgiV3Result>;
|
|
114
|
+
/**
|
|
115
|
+
* Batch decode VINs using Corgi v3 (up to 1000 VINs, ~6000 VINs/sec)
|
|
116
|
+
*/
|
|
117
|
+
batchCorgi(vins: string[]): Promise<BatchDecodeResponse>;
|
|
118
|
+
/**
|
|
119
|
+
* Batch lookup VINs using nano database
|
|
120
|
+
*/
|
|
121
|
+
batchNano(vins: string[]): Promise<BatchDecodeResponse>;
|
|
45
122
|
image(base64: string): Promise<VinImageResponse>;
|
|
46
123
|
}
|
|
47
124
|
|
|
@@ -1276,6 +1353,9 @@ declare const queryKeys: {
|
|
|
1276
1353
|
readonly all: readonly ["vin"];
|
|
1277
1354
|
readonly image: (base64: string) => readonly ["vin", "image", string];
|
|
1278
1355
|
readonly decode: (vin: string) => readonly ["vin", "decode", string];
|
|
1356
|
+
readonly corgiV3: (vin: string) => readonly ["vin", "corgi-v3", string];
|
|
1357
|
+
readonly batchCorgi: (vins: string[]) => readonly ["vin", "batch-corgi", string[]];
|
|
1358
|
+
readonly batchNano: (vins: string[]) => readonly ["vin", "batch-nano", string[]];
|
|
1279
1359
|
};
|
|
1280
1360
|
readonly market: {
|
|
1281
1361
|
readonly all: readonly ["market"];
|
|
@@ -1591,4 +1671,4 @@ declare class CardogClient {
|
|
|
1591
1671
|
setConfig(config: ClientConfig): void;
|
|
1592
1672
|
}
|
|
1593
1673
|
|
|
1594
|
-
export { APIError, CardogClient, ChargingAPI, type ClientConfig, type Complaint, ComplaintsAPI, type ComplaintsResponse, type ComplaintsSearchParams, EfficiencyAPI, type EfficiencyResponse, type EfficiencyStatsResponse, FuelAPI, type FuelSearchParams, type LineupParams, type Listing, ListingsAPI, type ListingsCountResponse, type ListingsFacetsResponse, type ListingsFilters, type ListingsResponse, type ListingsSearchParams, type LocationDetailResponse, LocationsAPI, type LocationsSearchParams, type LocationsSearchResponse, MarketAPI, RecallsAPI, type RequestOptions, ResearchAPI, type Seller, VinAPI, chargingKeys, complaintSchema, complaintsKeys, complaintsResponseSchema, CardogClient as default, efficiencyKeys, efficiencyResponseSchema, efficiencyStatsResponseSchema, fuelKeys, listingsKeys, locationsKeys, marketKeys, queryKeys, recallKeys, researchKeys, vinKeys };
|
|
1674
|
+
export { APIError, type BatchDecodeResponse, CardogClient, ChargingAPI, type ClientConfig, type Complaint, ComplaintsAPI, type ComplaintsResponse, type ComplaintsSearchParams, type CorgiV3Result, EfficiencyAPI, type EfficiencyResponse, type EfficiencyStatsResponse, FuelAPI, type FuelSearchParams, type LineupParams, type Listing, ListingsAPI, type ListingsCountResponse, type ListingsFacetsResponse, type ListingsFilters, type ListingsResponse, type ListingsSearchParams, type LocationDetailResponse, LocationsAPI, type LocationsSearchParams, type LocationsSearchResponse, MarketAPI, RecallsAPI, type RequestOptions, ResearchAPI, type Seller, VinAPI, chargingKeys, complaintSchema, complaintsKeys, complaintsResponseSchema, CardogClient as default, efficiencyKeys, efficiencyResponseSchema, efficiencyStatsResponseSchema, fuelKeys, listingsKeys, locationsKeys, marketKeys, queryKeys, recallKeys, researchKeys, vinKeys };
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ interface ClientConfig {
|
|
|
9
9
|
}
|
|
10
10
|
interface RequestOptions {
|
|
11
11
|
headers?: Record<string, string>;
|
|
12
|
-
params?: Record<string, any
|
|
12
|
+
params?: Record<string, any> | URLSearchParams;
|
|
13
13
|
}
|
|
14
14
|
declare class APIError extends Error {
|
|
15
15
|
status: number;
|
|
@@ -34,14 +34,91 @@ declare class BaseClient {
|
|
|
34
34
|
}): Promise<T>;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
/** Corgi v3 decode result */
|
|
38
|
+
interface CorgiV3Result {
|
|
39
|
+
vin: string;
|
|
40
|
+
valid: boolean;
|
|
41
|
+
components: {
|
|
42
|
+
wmi: string;
|
|
43
|
+
vds: string;
|
|
44
|
+
vis: string;
|
|
45
|
+
modelYear: number;
|
|
46
|
+
checkDigit: string;
|
|
47
|
+
serialNumber: string;
|
|
48
|
+
};
|
|
49
|
+
vehicle?: {
|
|
50
|
+
make: string;
|
|
51
|
+
model: string;
|
|
52
|
+
year: number;
|
|
53
|
+
series?: string;
|
|
54
|
+
trim?: string;
|
|
55
|
+
bodyType?: string;
|
|
56
|
+
driveWheelConfiguration?: string;
|
|
57
|
+
fuelType?: string;
|
|
58
|
+
vehicleTransmission?: string;
|
|
59
|
+
numberOfDoors?: number;
|
|
60
|
+
};
|
|
61
|
+
engine?: {
|
|
62
|
+
model?: string;
|
|
63
|
+
cylinders?: number;
|
|
64
|
+
displacement?: number;
|
|
65
|
+
fuelType?: string;
|
|
66
|
+
power?: number;
|
|
67
|
+
};
|
|
68
|
+
plant?: {
|
|
69
|
+
code: string;
|
|
70
|
+
country?: string;
|
|
71
|
+
city?: string;
|
|
72
|
+
state?: string;
|
|
73
|
+
};
|
|
74
|
+
confidence: number;
|
|
75
|
+
warnings: Array<{
|
|
76
|
+
code: string;
|
|
77
|
+
message: string;
|
|
78
|
+
}>;
|
|
79
|
+
errors: Array<{
|
|
80
|
+
code: string;
|
|
81
|
+
message: string;
|
|
82
|
+
}>;
|
|
83
|
+
}
|
|
84
|
+
/** Batch decode response */
|
|
85
|
+
interface BatchDecodeResponse {
|
|
86
|
+
success: boolean;
|
|
87
|
+
count: number;
|
|
88
|
+
successful: number;
|
|
89
|
+
failed: number;
|
|
90
|
+
processingTime: string;
|
|
91
|
+
avgTimePerVin: string;
|
|
92
|
+
results: Array<{
|
|
93
|
+
vin: string;
|
|
94
|
+
result?: CorgiV3Result;
|
|
95
|
+
error?: string;
|
|
96
|
+
}>;
|
|
97
|
+
}
|
|
37
98
|
declare const vinKeys: {
|
|
38
99
|
readonly all: readonly ["vin"];
|
|
39
100
|
readonly image: (base64: string) => readonly ["vin", "image", string];
|
|
40
101
|
readonly decode: (vin: string) => readonly ["vin", "decode", string];
|
|
102
|
+
readonly corgiV3: (vin: string) => readonly ["vin", "corgi-v3", string];
|
|
103
|
+
readonly batchCorgi: (vins: string[]) => readonly ["vin", "batch-corgi", string[]];
|
|
104
|
+
readonly batchNano: (vins: string[]) => readonly ["vin", "batch-nano", string[]];
|
|
41
105
|
};
|
|
42
106
|
declare class VinAPI extends BaseClient {
|
|
43
107
|
decode(vin: string): Promise<VinDecodeResponse>;
|
|
44
108
|
corgi(vin: string): Promise<Partial<VinCorgiResponse>>;
|
|
109
|
+
/**
|
|
110
|
+
* Decode VIN using Corgi v3 binary indexes (high-performance, fully offline)
|
|
111
|
+
* ~3x faster than v2, no database calls required
|
|
112
|
+
*/
|
|
113
|
+
corgiV3(vin: string): Promise<CorgiV3Result>;
|
|
114
|
+
/**
|
|
115
|
+
* Batch decode VINs using Corgi v3 (up to 1000 VINs, ~6000 VINs/sec)
|
|
116
|
+
*/
|
|
117
|
+
batchCorgi(vins: string[]): Promise<BatchDecodeResponse>;
|
|
118
|
+
/**
|
|
119
|
+
* Batch lookup VINs using nano database
|
|
120
|
+
*/
|
|
121
|
+
batchNano(vins: string[]): Promise<BatchDecodeResponse>;
|
|
45
122
|
image(base64: string): Promise<VinImageResponse>;
|
|
46
123
|
}
|
|
47
124
|
|
|
@@ -1276,6 +1353,9 @@ declare const queryKeys: {
|
|
|
1276
1353
|
readonly all: readonly ["vin"];
|
|
1277
1354
|
readonly image: (base64: string) => readonly ["vin", "image", string];
|
|
1278
1355
|
readonly decode: (vin: string) => readonly ["vin", "decode", string];
|
|
1356
|
+
readonly corgiV3: (vin: string) => readonly ["vin", "corgi-v3", string];
|
|
1357
|
+
readonly batchCorgi: (vins: string[]) => readonly ["vin", "batch-corgi", string[]];
|
|
1358
|
+
readonly batchNano: (vins: string[]) => readonly ["vin", "batch-nano", string[]];
|
|
1279
1359
|
};
|
|
1280
1360
|
readonly market: {
|
|
1281
1361
|
readonly all: readonly ["market"];
|
|
@@ -1591,4 +1671,4 @@ declare class CardogClient {
|
|
|
1591
1671
|
setConfig(config: ClientConfig): void;
|
|
1592
1672
|
}
|
|
1593
1673
|
|
|
1594
|
-
export { APIError, CardogClient, ChargingAPI, type ClientConfig, type Complaint, ComplaintsAPI, type ComplaintsResponse, type ComplaintsSearchParams, EfficiencyAPI, type EfficiencyResponse, type EfficiencyStatsResponse, FuelAPI, type FuelSearchParams, type LineupParams, type Listing, ListingsAPI, type ListingsCountResponse, type ListingsFacetsResponse, type ListingsFilters, type ListingsResponse, type ListingsSearchParams, type LocationDetailResponse, LocationsAPI, type LocationsSearchParams, type LocationsSearchResponse, MarketAPI, RecallsAPI, type RequestOptions, ResearchAPI, type Seller, VinAPI, chargingKeys, complaintSchema, complaintsKeys, complaintsResponseSchema, CardogClient as default, efficiencyKeys, efficiencyResponseSchema, efficiencyStatsResponseSchema, fuelKeys, listingsKeys, locationsKeys, marketKeys, queryKeys, recallKeys, researchKeys, vinKeys };
|
|
1674
|
+
export { APIError, type BatchDecodeResponse, CardogClient, ChargingAPI, type ClientConfig, type Complaint, ComplaintsAPI, type ComplaintsResponse, type ComplaintsSearchParams, type CorgiV3Result, EfficiencyAPI, type EfficiencyResponse, type EfficiencyStatsResponse, FuelAPI, type FuelSearchParams, type LineupParams, type Listing, ListingsAPI, type ListingsCountResponse, type ListingsFacetsResponse, type ListingsFilters, type ListingsResponse, type ListingsSearchParams, type LocationDetailResponse, LocationsAPI, type LocationsSearchParams, type LocationsSearchResponse, MarketAPI, RecallsAPI, type RequestOptions, ResearchAPI, type Seller, VinAPI, chargingKeys, complaintSchema, complaintsKeys, complaintsResponseSchema, CardogClient as default, efficiencyKeys, efficiencyResponseSchema, efficiencyStatsResponseSchema, fuelKeys, listingsKeys, locationsKeys, marketKeys, queryKeys, recallKeys, researchKeys, vinKeys };
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var zod = require('zod');
|
|
6
6
|
|
|
7
7
|
// src/base.ts
|
|
8
|
-
var CLIENT_VERSION = "0.
|
|
8
|
+
var CLIENT_VERSION = "0.3.0";
|
|
9
9
|
var DEFAULT_BASE_URL = "https://api.cardog.app/v1";
|
|
10
10
|
var APIError = class extends Error {
|
|
11
11
|
constructor(message, status, code, data) {
|
|
@@ -38,7 +38,8 @@ var BaseClient = class {
|
|
|
38
38
|
buildUrl(path, params) {
|
|
39
39
|
const url = new URL(path, this.baseUrl);
|
|
40
40
|
if (params) {
|
|
41
|
-
|
|
41
|
+
const entries = params instanceof URLSearchParams ? params.entries() : Object.entries(params);
|
|
42
|
+
for (const [key, value] of entries) {
|
|
42
43
|
if (value !== void 0 && value !== null) {
|
|
43
44
|
url.searchParams.set(key, String(value));
|
|
44
45
|
}
|
|
@@ -1651,7 +1652,10 @@ var listingQueryCodec = new ListingQueryCodec();
|
|
|
1651
1652
|
var vinKeys = {
|
|
1652
1653
|
all: ["vin"],
|
|
1653
1654
|
image: (base64) => [...vinKeys.all, "image", base64],
|
|
1654
|
-
decode: (vin) => [...vinKeys.all, "decode", vin]
|
|
1655
|
+
decode: (vin) => [...vinKeys.all, "decode", vin],
|
|
1656
|
+
corgiV3: (vin) => [...vinKeys.all, "corgi-v3", vin],
|
|
1657
|
+
batchCorgi: (vins) => [...vinKeys.all, "batch-corgi", vins],
|
|
1658
|
+
batchNano: (vins) => [...vinKeys.all, "batch-nano", vins]
|
|
1655
1659
|
};
|
|
1656
1660
|
var VinAPI = class extends BaseClient {
|
|
1657
1661
|
async decode(vin) {
|
|
@@ -1662,6 +1666,25 @@ var VinAPI = class extends BaseClient {
|
|
|
1662
1666
|
const response = await this.get(`/vin/corgi/${vin}`);
|
|
1663
1667
|
return response;
|
|
1664
1668
|
}
|
|
1669
|
+
/**
|
|
1670
|
+
* Decode VIN using Corgi v3 binary indexes (high-performance, fully offline)
|
|
1671
|
+
* ~3x faster than v2, no database calls required
|
|
1672
|
+
*/
|
|
1673
|
+
async corgiV3(vin) {
|
|
1674
|
+
return this.get(`/vin/corgi/v3/${vin}`);
|
|
1675
|
+
}
|
|
1676
|
+
/**
|
|
1677
|
+
* Batch decode VINs using Corgi v3 (up to 1000 VINs, ~6000 VINs/sec)
|
|
1678
|
+
*/
|
|
1679
|
+
async batchCorgi(vins) {
|
|
1680
|
+
return this.post(`/vin/batch/corgi`, { vins });
|
|
1681
|
+
}
|
|
1682
|
+
/**
|
|
1683
|
+
* Batch lookup VINs using nano database
|
|
1684
|
+
*/
|
|
1685
|
+
async batchNano(vins) {
|
|
1686
|
+
return this.post(`/vin/batch/nano`, { vins });
|
|
1687
|
+
}
|
|
1665
1688
|
async image(base64) {
|
|
1666
1689
|
const response = await this.post(`/vin/image`, {
|
|
1667
1690
|
image: base64
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
3
|
// src/base.ts
|
|
4
|
-
var CLIENT_VERSION = "0.
|
|
4
|
+
var CLIENT_VERSION = "0.3.0";
|
|
5
5
|
var DEFAULT_BASE_URL = "https://api.cardog.app/v1";
|
|
6
6
|
var APIError = class extends Error {
|
|
7
7
|
constructor(message, status, code, data) {
|
|
@@ -34,7 +34,8 @@ var BaseClient = class {
|
|
|
34
34
|
buildUrl(path, params) {
|
|
35
35
|
const url = new URL(path, this.baseUrl);
|
|
36
36
|
if (params) {
|
|
37
|
-
|
|
37
|
+
const entries = params instanceof URLSearchParams ? params.entries() : Object.entries(params);
|
|
38
|
+
for (const [key, value] of entries) {
|
|
38
39
|
if (value !== void 0 && value !== null) {
|
|
39
40
|
url.searchParams.set(key, String(value));
|
|
40
41
|
}
|
|
@@ -1647,7 +1648,10 @@ var listingQueryCodec = new ListingQueryCodec();
|
|
|
1647
1648
|
var vinKeys = {
|
|
1648
1649
|
all: ["vin"],
|
|
1649
1650
|
image: (base64) => [...vinKeys.all, "image", base64],
|
|
1650
|
-
decode: (vin) => [...vinKeys.all, "decode", vin]
|
|
1651
|
+
decode: (vin) => [...vinKeys.all, "decode", vin],
|
|
1652
|
+
corgiV3: (vin) => [...vinKeys.all, "corgi-v3", vin],
|
|
1653
|
+
batchCorgi: (vins) => [...vinKeys.all, "batch-corgi", vins],
|
|
1654
|
+
batchNano: (vins) => [...vinKeys.all, "batch-nano", vins]
|
|
1651
1655
|
};
|
|
1652
1656
|
var VinAPI = class extends BaseClient {
|
|
1653
1657
|
async decode(vin) {
|
|
@@ -1658,6 +1662,25 @@ var VinAPI = class extends BaseClient {
|
|
|
1658
1662
|
const response = await this.get(`/vin/corgi/${vin}`);
|
|
1659
1663
|
return response;
|
|
1660
1664
|
}
|
|
1665
|
+
/**
|
|
1666
|
+
* Decode VIN using Corgi v3 binary indexes (high-performance, fully offline)
|
|
1667
|
+
* ~3x faster than v2, no database calls required
|
|
1668
|
+
*/
|
|
1669
|
+
async corgiV3(vin) {
|
|
1670
|
+
return this.get(`/vin/corgi/v3/${vin}`);
|
|
1671
|
+
}
|
|
1672
|
+
/**
|
|
1673
|
+
* Batch decode VINs using Corgi v3 (up to 1000 VINs, ~6000 VINs/sec)
|
|
1674
|
+
*/
|
|
1675
|
+
async batchCorgi(vins) {
|
|
1676
|
+
return this.post(`/vin/batch/corgi`, { vins });
|
|
1677
|
+
}
|
|
1678
|
+
/**
|
|
1679
|
+
* Batch lookup VINs using nano database
|
|
1680
|
+
*/
|
|
1681
|
+
async batchNano(vins) {
|
|
1682
|
+
return this.post(`/vin/batch/nano`, { vins });
|
|
1683
|
+
}
|
|
1661
1684
|
async image(base64) {
|
|
1662
1685
|
const response = await this.post(`/vin/image`, {
|
|
1663
1686
|
image: base64
|
package/dist/react/index.js
CHANGED
|
@@ -1573,7 +1573,10 @@ createSchemaWithCodec(
|
|
|
1573
1573
|
var vinKeys = {
|
|
1574
1574
|
all: ["vin"],
|
|
1575
1575
|
image: (base64) => [...vinKeys.all, "image", base64],
|
|
1576
|
-
decode: (vin) => [...vinKeys.all, "decode", vin]
|
|
1576
|
+
decode: (vin) => [...vinKeys.all, "decode", vin],
|
|
1577
|
+
corgiV3: (vin) => [...vinKeys.all, "corgi-v3", vin],
|
|
1578
|
+
batchCorgi: (vins) => [...vinKeys.all, "batch-corgi", vins],
|
|
1579
|
+
batchNano: (vins) => [...vinKeys.all, "batch-nano", vins]
|
|
1577
1580
|
};
|
|
1578
1581
|
|
|
1579
1582
|
// src/routes/market.ts
|
package/dist/react/index.mjs
CHANGED
|
@@ -1571,7 +1571,10 @@ createSchemaWithCodec(
|
|
|
1571
1571
|
var vinKeys = {
|
|
1572
1572
|
all: ["vin"],
|
|
1573
1573
|
image: (base64) => [...vinKeys.all, "image", base64],
|
|
1574
|
-
decode: (vin) => [...vinKeys.all, "decode", vin]
|
|
1574
|
+
decode: (vin) => [...vinKeys.all, "decode", vin],
|
|
1575
|
+
corgiV3: (vin) => [...vinKeys.all, "corgi-v3", vin],
|
|
1576
|
+
batchCorgi: (vins) => [...vinKeys.all, "batch-corgi", vins],
|
|
1577
|
+
batchNano: (vins) => [...vinKeys.all, "batch-nano", vins]
|
|
1575
1578
|
};
|
|
1576
1579
|
|
|
1577
1580
|
// src/routes/market.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cardog/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Official Cardog API client library for vehicle data, market analysis, and VIN decoding",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.cardog.app",
|
|
@@ -44,15 +44,6 @@
|
|
|
44
44
|
"CHANGELOG.md",
|
|
45
45
|
"README.md"
|
|
46
46
|
],
|
|
47
|
-
"scripts": {
|
|
48
|
-
"build": "tsup",
|
|
49
|
-
"dev": "tsup --watch",
|
|
50
|
-
"clean": "rm -rf dist",
|
|
51
|
-
"test": "vitest run",
|
|
52
|
-
"test:watch": "vitest",
|
|
53
|
-
"typecheck": "tsc --noEmit",
|
|
54
|
-
"prepublishOnly": "pnpm build"
|
|
55
|
-
},
|
|
56
47
|
"dependencies": {
|
|
57
48
|
"zod": "^3.24.3"
|
|
58
49
|
},
|
|
@@ -73,16 +64,24 @@
|
|
|
73
64
|
}
|
|
74
65
|
},
|
|
75
66
|
"devDependencies": {
|
|
76
|
-
"@cardog/contracts": "workspace:*",
|
|
77
67
|
"@tanstack/react-query": "^5.0.0",
|
|
78
68
|
"@types/node": "^20.11.24",
|
|
79
69
|
"@types/react": "^18.2.0",
|
|
80
70
|
"react": "^18.2.0",
|
|
81
71
|
"tsup": "^8.0.2",
|
|
82
72
|
"typescript": "^5.3.3",
|
|
83
|
-
"vitest": "^1.3.1"
|
|
73
|
+
"vitest": "^1.3.1",
|
|
74
|
+
"@cardog/contracts": "0.1.0"
|
|
84
75
|
},
|
|
85
76
|
"publishConfig": {
|
|
86
77
|
"access": "public"
|
|
78
|
+
},
|
|
79
|
+
"scripts": {
|
|
80
|
+
"build": "tsup",
|
|
81
|
+
"dev": "tsup --watch",
|
|
82
|
+
"clean": "rm -rf dist",
|
|
83
|
+
"test": "vitest run",
|
|
84
|
+
"test:watch": "vitest",
|
|
85
|
+
"typecheck": "tsc --noEmit"
|
|
87
86
|
}
|
|
88
|
-
}
|
|
87
|
+
}
|