@dimo-network/data-sdk 1.3.0 → 1.3.1

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.
@@ -1,6 +1,6 @@
1
1
  /** @format */
2
- import { DimoEnvironment } from "../environments";
3
- import { ResourceMap } from "./types/Endpoint";
2
+ import { DimoEnvironment } from '../environments';
3
+ import { ResourceMap } from './types/Endpoint';
4
4
  export declare class Resource<TApi = string> {
5
5
  [key: string]: any;
6
6
  api: TApi;
@@ -1,5 +1,5 @@
1
1
  /** @format */
2
- import { Method } from "./Method";
2
+ import { Method } from './Method';
3
3
  export class Resource {
4
4
  api;
5
5
  resourceName;
@@ -1,10 +1,10 @@
1
1
  /** @format */
2
- import { Attestation } from "./Attestation";
3
- import { Auth } from "./Auth";
4
- import { DeviceDefinitions } from "./DeviceDefinitions";
5
- import { Devices } from "./Devices";
6
- import { TokenExchange } from "./TokenExchange";
7
- import { Trips } from "./Trips";
8
- import { Valuations } from "./Valuations";
9
- import { VehicleEvents } from "./VehicleEvents";
2
+ import { Attestation } from './Attestation';
3
+ import { Auth } from './Auth';
4
+ import { DeviceDefinitions } from './DeviceDefinitions';
5
+ import { Devices } from './Devices';
6
+ import { TokenExchange } from './TokenExchange';
7
+ import { Trips } from './Trips';
8
+ import { Valuations } from './Valuations';
9
+ import { VehicleEvents } from './VehicleEvents';
10
10
  export { Attestation, Auth, DeviceDefinitions, Devices, TokenExchange, Trips, Valuations, VehicleEvents, };
@@ -1,10 +1,10 @@
1
1
  /** @format */
2
- import { Attestation } from "./Attestation";
3
- import { Auth } from "./Auth";
4
- import { DeviceDefinitions } from "./DeviceDefinitions";
5
- import { Devices } from "./Devices";
6
- import { TokenExchange } from "./TokenExchange";
7
- import { Trips } from "./Trips";
8
- import { Valuations } from "./Valuations";
9
- import { VehicleEvents } from "./VehicleEvents";
2
+ import { Attestation } from './Attestation';
3
+ import { Auth } from './Auth';
4
+ import { DeviceDefinitions } from './DeviceDefinitions';
5
+ import { Devices } from './Devices';
6
+ import { TokenExchange } from './TokenExchange';
7
+ import { Trips } from './Trips';
8
+ import { Valuations } from './Valuations';
9
+ import { VehicleEvents } from './VehicleEvents';
10
10
  export { Attestation, Auth, DeviceDefinitions, Devices, TokenExchange, Trips, Valuations, VehicleEvents, };
@@ -1,6 +1,6 @@
1
1
  /** @format */
2
- import { Resource } from "api/Resource";
3
- import { DimoEnvironment } from "environments";
2
+ import { Resource } from '../../Resource';
3
+ import { DimoEnvironment } from '../../../environments';
4
4
  declare class VehicleEvents extends Resource {
5
5
  constructor(api: any, env: keyof typeof DimoEnvironment);
6
6
  }
@@ -1,17 +1,17 @@
1
1
  /** @format */
2
- import { Resource } from "api/Resource";
2
+ import { Resource } from '../../Resource';
3
3
  class VehicleEvents extends Resource {
4
4
  constructor(api, env) {
5
- super(api, "VehicleEvents", env);
5
+ super(api, 'VehicleEvents', env);
6
6
  this.setResource({
7
7
  listWebhooks: {
8
- method: "GET",
9
- path: "/v1/webhooks",
10
- auth: "developer_jwt",
8
+ method: 'GET',
9
+ path: '/v1/webhooks',
10
+ auth: 'developer_jwt',
11
11
  },
12
12
  createWebhook: {
13
- method: "POST",
14
- path: "/v1/webhooks",
13
+ method: 'POST',
14
+ path: '/v1/webhooks',
15
15
  body: {
16
16
  service: true,
17
17
  data: true,
@@ -22,11 +22,11 @@ class VehicleEvents extends Resource {
22
22
  status: true,
23
23
  verification_token: true,
24
24
  },
25
- auth: "developer_jwt",
25
+ auth: 'developer_jwt',
26
26
  },
27
27
  updateWebhook: {
28
- method: "PUT",
29
- path: "/v1/webhooks/:webhookId",
28
+ method: 'PUT',
29
+ path: '/v1/webhooks/:webhookId',
30
30
  body: {
31
31
  service: true,
32
32
  data: true,
@@ -37,47 +37,47 @@ class VehicleEvents extends Resource {
37
37
  status: true,
38
38
  verification_token: true,
39
39
  },
40
- auth: "developer_jwt",
40
+ auth: 'developer_jwt',
41
41
  },
42
42
  deleteWebhook: {
43
- method: "DELETE",
44
- path: "/v1/webhooks/:webhookId",
45
- auth: "developer_jwt",
43
+ method: 'DELETE',
44
+ path: '/v1/webhooks/:webhookId',
45
+ auth: 'developer_jwt',
46
46
  },
47
47
  getWebhookSignalNames: {
48
- method: "GET",
49
- path: "/v1/webhooks/signals",
50
- auth: "developer_jwt",
48
+ method: 'GET',
49
+ path: '/v1/webhooks/signals',
50
+ auth: 'developer_jwt',
51
51
  },
52
52
  listSubscribedVehicles: {
53
- method: "GET",
54
- path: "/v1/webhooks/:webhookId",
55
- auth: "developer_jwt",
53
+ method: 'GET',
54
+ path: '/v1/webhooks/:webhookId',
55
+ auth: 'developer_jwt',
56
56
  },
57
57
  listVehicleSubscriptions: {
58
- method: "GET",
59
- path: "/v1/webhooks/vehicles/:tokenId",
60
- auth: "developer_jwt",
58
+ method: 'GET',
59
+ path: '/v1/webhooks/vehicles/:tokenId',
60
+ auth: 'developer_jwt',
61
61
  },
62
62
  subscribeVehicle: {
63
- method: "POST",
64
- path: "/v1/webhooks/:webhookId/subscribe/:tokenId",
65
- auth: "developer_jwt",
63
+ method: 'POST',
64
+ path: '/v1/webhooks/:webhookId/subscribe/:tokenId',
65
+ auth: 'developer_jwt',
66
66
  },
67
67
  subscribeAllVehicles: {
68
- method: "POST",
69
- path: "/v1/webhooks/:webhookId/subscribe/all",
70
- auth: "developer_jwt",
68
+ method: 'POST',
69
+ path: '/v1/webhooks/:webhookId/subscribe/all',
70
+ auth: 'developer_jwt',
71
71
  },
72
72
  unsubscribeVehicle: {
73
- method: "DELETE",
74
- path: "/v1/webhooks/:webhookId/unsubscribe/:tokenId",
75
- auth: "developer_jwt",
73
+ method: 'DELETE',
74
+ path: '/v1/webhooks/:webhookId/unsubscribe/:tokenId',
75
+ auth: 'developer_jwt',
76
76
  },
77
77
  unsubscribeAllVehicles: {
78
- method: "DELETE",
79
- path: "/v1/webhooks/:webhookId/unsubscribe/all",
80
- auth: "developer_jwt",
78
+ method: 'DELETE',
79
+ path: '/v1/webhooks/:webhookId/unsubscribe/all',
80
+ auth: 'developer_jwt',
81
81
  },
82
82
  });
83
83
  }
@@ -1,29 +1,29 @@
1
1
  /** @format */
2
2
  export const DimoEnvironment = {
3
3
  Production: {
4
- Attestation: "https://attestation-api.dimo.zone",
5
- Auth: "https://auth.dimo.zone",
6
- Identity: "https://identity-api.dimo.zone/query",
7
- Devices: "https://devices-api.dimo.zone",
8
- DeviceDefinitions: "https://device-definitions-api.dimo.zone",
9
- Telemetry: "https://telemetry-api.dimo.zone/query",
10
- TokenExchange: "https://token-exchange-api.dimo.zone",
11
- Trips: "https://trips-api.dimo.zone",
12
- Valuations: "https://valuations-api.dimo.zone",
13
- VehicleSignalDecoding: "https://vehicle-signal-decoding.dimo.zone",
14
- VehicleEvents: "https://vehicle-events-api.dimo.zone",
4
+ Attestation: 'https://attestation-api.dimo.zone',
5
+ Auth: 'https://auth.dimo.zone',
6
+ Identity: 'https://identity-api.dimo.zone/query',
7
+ Devices: 'https://devices-api.dimo.zone',
8
+ DeviceDefinitions: 'https://device-definitions-api.dimo.zone',
9
+ Telemetry: 'https://telemetry-api.dimo.zone/query',
10
+ TokenExchange: 'https://token-exchange-api.dimo.zone',
11
+ Trips: 'https://trips-api.dimo.zone',
12
+ Valuations: 'https://valuations-api.dimo.zone',
13
+ VehicleSignalDecoding: 'https://vehicle-signal-decoding.dimo.zone',
14
+ VehicleEvents: 'https://vehicle-events-api.dimo.zone',
15
15
  },
16
16
  Dev: {
17
- Attestation: "https://attestation-api.dev.dimo.zone",
18
- Auth: "https://auth.dev.dimo.zone",
19
- Identity: "https://identity-api.dev.dimo.zone/query",
20
- Devices: "https://devices-api.dev.dimo.zone",
21
- DeviceDefinitions: "https://device-definitions-api.dev.dimo.zone",
22
- Telemetry: "https://telemetry-api.dev.dimo.zone/query",
23
- TokenExchange: "https://token-exchange-api.dev.dimo.zone",
24
- Trips: "https://trips-api.dev.dimo.zone",
25
- Valuations: "https://valuations-api.dev.dimo.zone",
26
- VehicleSignalDecoding: "https://vehicle-signal-decoding.dev.dimo.zone",
27
- VehicleEvents: "https://vehicle-events-api.dev.dimo.zone",
17
+ Attestation: 'https://attestation-api.dev.dimo.zone',
18
+ Auth: 'https://auth.dev.dimo.zone',
19
+ Identity: 'https://identity-api.dev.dimo.zone/query',
20
+ Devices: 'https://devices-api.dev.dimo.zone',
21
+ DeviceDefinitions: 'https://device-definitions-api.dev.dimo.zone',
22
+ Telemetry: 'https://telemetry-api.dev.dimo.zone/query',
23
+ TokenExchange: 'https://token-exchange-api.dev.dimo.zone',
24
+ Trips: 'https://trips-api.dev.dimo.zone',
25
+ Valuations: 'https://valuations-api.dev.dimo.zone',
26
+ VehicleSignalDecoding: 'https://vehicle-signal-decoding.dev.dimo.zone',
27
+ VehicleEvents: 'https://vehicle-events-api.dev.dimo.zone',
28
28
  },
29
29
  };
@@ -1,3 +1,3 @@
1
- import { getVehiclePrivileges } from "./getVehiclePrivileges";
2
- import { getVin } from "./getVin";
1
+ import { getVehiclePrivileges } from './getVehiclePrivileges';
2
+ import { getVin } from './getVin';
3
3
  export { getVehiclePrivileges, getVin };
@@ -1,3 +1,3 @@
1
- import { getVehiclePrivileges } from "./getVehiclePrivileges";
2
- import { getVin } from "./getVin";
1
+ import { getVehiclePrivileges } from './getVehiclePrivileges';
2
+ import { getVin } from './getVin';
3
3
  export { getVehiclePrivileges, getVin };
package/dist/index.cjs CHANGED
@@ -22012,30 +22012,30 @@ const {
22012
22012
  /** @format */
22013
22013
  const DimoEnvironment = {
22014
22014
  Production: {
22015
- Attestation: "https://attestation-api.dimo.zone",
22016
- Auth: "https://auth.dimo.zone",
22017
- Identity: "https://identity-api.dimo.zone/query",
22018
- Devices: "https://devices-api.dimo.zone",
22019
- DeviceDefinitions: "https://device-definitions-api.dimo.zone",
22020
- Telemetry: "https://telemetry-api.dimo.zone/query",
22021
- TokenExchange: "https://token-exchange-api.dimo.zone",
22022
- Trips: "https://trips-api.dimo.zone",
22023
- Valuations: "https://valuations-api.dimo.zone",
22024
- VehicleSignalDecoding: "https://vehicle-signal-decoding.dimo.zone",
22025
- VehicleEvents: "https://vehicle-events-api.dimo.zone",
22015
+ Attestation: 'https://attestation-api.dimo.zone',
22016
+ Auth: 'https://auth.dimo.zone',
22017
+ Identity: 'https://identity-api.dimo.zone/query',
22018
+ Devices: 'https://devices-api.dimo.zone',
22019
+ DeviceDefinitions: 'https://device-definitions-api.dimo.zone',
22020
+ Telemetry: 'https://telemetry-api.dimo.zone/query',
22021
+ TokenExchange: 'https://token-exchange-api.dimo.zone',
22022
+ Trips: 'https://trips-api.dimo.zone',
22023
+ Valuations: 'https://valuations-api.dimo.zone',
22024
+ VehicleSignalDecoding: 'https://vehicle-signal-decoding.dimo.zone',
22025
+ VehicleEvents: 'https://vehicle-events-api.dimo.zone',
22026
22026
  },
22027
22027
  Dev: {
22028
- Attestation: "https://attestation-api.dev.dimo.zone",
22029
- Auth: "https://auth.dev.dimo.zone",
22030
- Identity: "https://identity-api.dev.dimo.zone/query",
22031
- Devices: "https://devices-api.dev.dimo.zone",
22032
- DeviceDefinitions: "https://device-definitions-api.dev.dimo.zone",
22033
- Telemetry: "https://telemetry-api.dev.dimo.zone/query",
22034
- TokenExchange: "https://token-exchange-api.dev.dimo.zone",
22035
- Trips: "https://trips-api.dev.dimo.zone",
22036
- Valuations: "https://valuations-api.dev.dimo.zone",
22037
- VehicleSignalDecoding: "https://vehicle-signal-decoding.dev.dimo.zone",
22038
- VehicleEvents: "https://vehicle-events-api.dev.dimo.zone",
22028
+ Attestation: 'https://attestation-api.dev.dimo.zone',
22029
+ Auth: 'https://auth.dev.dimo.zone',
22030
+ Identity: 'https://identity-api.dev.dimo.zone/query',
22031
+ Devices: 'https://devices-api.dev.dimo.zone',
22032
+ DeviceDefinitions: 'https://device-definitions-api.dev.dimo.zone',
22033
+ Telemetry: 'https://telemetry-api.dev.dimo.zone/query',
22034
+ TokenExchange: 'https://token-exchange-api.dev.dimo.zone',
22035
+ Trips: 'https://trips-api.dev.dimo.zone',
22036
+ Valuations: 'https://valuations-api.dev.dimo.zone',
22037
+ VehicleSignalDecoding: 'https://vehicle-signal-decoding.dev.dimo.zone',
22038
+ VehicleEvents: 'https://vehicle-events-api.dev.dimo.zone',
22039
22039
  },
22040
22040
  };
22041
22041
 
@@ -144409,16 +144409,16 @@ class Valuations extends Resource {
144409
144409
  /** @format */
144410
144410
  class VehicleEvents extends Resource {
144411
144411
  constructor(api, env) {
144412
- super(api, "VehicleEvents", env);
144412
+ super(api, 'VehicleEvents', env);
144413
144413
  this.setResource({
144414
144414
  listWebhooks: {
144415
- method: "GET",
144416
- path: "/v1/webhooks",
144417
- auth: "developer_jwt",
144415
+ method: 'GET',
144416
+ path: '/v1/webhooks',
144417
+ auth: 'developer_jwt',
144418
144418
  },
144419
144419
  createWebhook: {
144420
- method: "POST",
144421
- path: "/v1/webhooks",
144420
+ method: 'POST',
144421
+ path: '/v1/webhooks',
144422
144422
  body: {
144423
144423
  service: true,
144424
144424
  data: true,
@@ -144429,11 +144429,11 @@ class VehicleEvents extends Resource {
144429
144429
  status: true,
144430
144430
  verification_token: true,
144431
144431
  },
144432
- auth: "developer_jwt",
144432
+ auth: 'developer_jwt',
144433
144433
  },
144434
144434
  updateWebhook: {
144435
- method: "PUT",
144436
- path: "/v1/webhooks/:webhookId",
144435
+ method: 'PUT',
144436
+ path: '/v1/webhooks/:webhookId',
144437
144437
  body: {
144438
144438
  service: true,
144439
144439
  data: true,
@@ -144444,47 +144444,47 @@ class VehicleEvents extends Resource {
144444
144444
  status: true,
144445
144445
  verification_token: true,
144446
144446
  },
144447
- auth: "developer_jwt",
144447
+ auth: 'developer_jwt',
144448
144448
  },
144449
144449
  deleteWebhook: {
144450
- method: "DELETE",
144451
- path: "/v1/webhooks/:webhookId",
144452
- auth: "developer_jwt",
144450
+ method: 'DELETE',
144451
+ path: '/v1/webhooks/:webhookId',
144452
+ auth: 'developer_jwt',
144453
144453
  },
144454
144454
  getWebhookSignalNames: {
144455
- method: "GET",
144456
- path: "/v1/webhooks/signals",
144457
- auth: "developer_jwt",
144455
+ method: 'GET',
144456
+ path: '/v1/webhooks/signals',
144457
+ auth: 'developer_jwt',
144458
144458
  },
144459
144459
  listSubscribedVehicles: {
144460
- method: "GET",
144461
- path: "/v1/webhooks/:webhookId",
144462
- auth: "developer_jwt",
144460
+ method: 'GET',
144461
+ path: '/v1/webhooks/:webhookId',
144462
+ auth: 'developer_jwt',
144463
144463
  },
144464
144464
  listVehicleSubscriptions: {
144465
- method: "GET",
144466
- path: "/v1/webhooks/vehicles/:tokenId",
144467
- auth: "developer_jwt",
144465
+ method: 'GET',
144466
+ path: '/v1/webhooks/vehicles/:tokenId',
144467
+ auth: 'developer_jwt',
144468
144468
  },
144469
144469
  subscribeVehicle: {
144470
- method: "POST",
144471
- path: "/v1/webhooks/:webhookId/subscribe/:tokenId",
144472
- auth: "developer_jwt",
144470
+ method: 'POST',
144471
+ path: '/v1/webhooks/:webhookId/subscribe/:tokenId',
144472
+ auth: 'developer_jwt',
144473
144473
  },
144474
144474
  subscribeAllVehicles: {
144475
- method: "POST",
144476
- path: "/v1/webhooks/:webhookId/subscribe/all",
144477
- auth: "developer_jwt",
144475
+ method: 'POST',
144476
+ path: '/v1/webhooks/:webhookId/subscribe/all',
144477
+ auth: 'developer_jwt',
144478
144478
  },
144479
144479
  unsubscribeVehicle: {
144480
- method: "DELETE",
144481
- path: "/v1/webhooks/:webhookId/unsubscribe/:tokenId",
144482
- auth: "developer_jwt",
144480
+ method: 'DELETE',
144481
+ path: '/v1/webhooks/:webhookId/unsubscribe/:tokenId',
144482
+ auth: 'developer_jwt',
144483
144483
  },
144484
144484
  unsubscribeAllVehicles: {
144485
- method: "DELETE",
144486
- path: "/v1/webhooks/:webhookId/unsubscribe/all",
144487
- auth: "developer_jwt",
144485
+ method: 'DELETE',
144486
+ path: '/v1/webhooks/:webhookId/unsubscribe/all',
144487
+ auth: 'developer_jwt',
144488
144488
  },
144489
144489
  });
144490
144490
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimo-network/data-sdk",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "DIMO Data SDK for JavaScript",
5
5
  "main": "dist/index.js",
6
6
  "author": "James Li",