@cardog/api 0.1.2 → 0.1.3

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/README.md CHANGED
@@ -291,7 +291,7 @@ queryKeys.recalls.search(params)
291
291
  ```typescript
292
292
  const client = new CardogClient({
293
293
  apiKey: "your-api-key",
294
- baseUrl: "https://api.cardog.io", // Default
294
+ baseUrl: "https://api.cardog.app", // Default
295
295
  });
296
296
 
297
297
  // Update config at runtime
package/dist/index.js CHANGED
@@ -10,6 +10,8 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
10
  var axios__default = /*#__PURE__*/_interopDefault(axios);
11
11
 
12
12
  // src/base.ts
13
+ var CLIENT_VERSION = "0.1.3";
14
+ var DEFAULT_BASE_URL = "https://api.cardog.app/v1";
13
15
  var APIError = class extends Error {
14
16
  constructor(message, status, code, data) {
15
17
  super(message);
@@ -23,9 +25,10 @@ var BaseClient = class {
23
25
  constructor(config) {
24
26
  this.config = config;
25
27
  this.client = axios__default.default.create({
26
- baseURL: config.baseUrl || "https://api.cardog.io",
28
+ baseURL: config.baseUrl || DEFAULT_BASE_URL,
27
29
  headers: {
28
30
  "Content-Type": "application/json",
31
+ "User-Agent": `@cardog/api/${CLIENT_VERSION}`,
29
32
  ...config.apiKey && { Authorization: `Bearer ${config.apiKey}` }
30
33
  }
31
34
  });
package/dist/index.mjs CHANGED
@@ -2,6 +2,8 @@ import axios from 'axios';
2
2
  import { z } from 'zod';
3
3
 
4
4
  // src/base.ts
5
+ var CLIENT_VERSION = "0.1.3";
6
+ var DEFAULT_BASE_URL = "https://api.cardog.app/v1";
5
7
  var APIError = class extends Error {
6
8
  constructor(message, status, code, data) {
7
9
  super(message);
@@ -15,9 +17,10 @@ var BaseClient = class {
15
17
  constructor(config) {
16
18
  this.config = config;
17
19
  this.client = axios.create({
18
- baseURL: config.baseUrl || "https://api.cardog.io",
20
+ baseURL: config.baseUrl || DEFAULT_BASE_URL,
19
21
  headers: {
20
22
  "Content-Type": "application/json",
23
+ "User-Agent": `@cardog/api/${CLIENT_VERSION}`,
21
24
  ...config.apiKey && { Authorization: `Bearer ${config.apiKey}` }
22
25
  }
23
26
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cardog/api",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Official Cardog API client library for vehicle data, market analysis, and VIN decoding",
5
5
  "license": "MIT",
6
6
  "repository": {