@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.
- package/dist/api/Resource.d.ts +2 -2
- package/dist/api/Resource.js +1 -1
- package/dist/api/resources/DimoRestResources.d.ts +8 -8
- package/dist/api/resources/DimoRestResources.js +8 -8
- package/dist/api/resources/VehicleEvents/index.d.ts +2 -2
- package/dist/api/resources/VehicleEvents/index.js +35 -35
- package/dist/environments/index.js +22 -22
- package/dist/graphql/functions/index.d.ts +2 -2
- package/dist/graphql/functions/index.js +2 -2
- package/dist/index.cjs +56 -56
- package/package.json +1 -1
package/dist/api/Resource.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @format */
|
|
2
|
-
import { DimoEnvironment } from
|
|
3
|
-
import { ResourceMap } from
|
|
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;
|
package/dist/api/Resource.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @format */
|
|
2
|
-
import { Attestation } from
|
|
3
|
-
import { Auth } from
|
|
4
|
-
import { DeviceDefinitions } from
|
|
5
|
-
import { Devices } from
|
|
6
|
-
import { TokenExchange } from
|
|
7
|
-
import { Trips } from
|
|
8
|
-
import { Valuations } from
|
|
9
|
-
import { VehicleEvents } from
|
|
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
|
|
3
|
-
import { Auth } from
|
|
4
|
-
import { DeviceDefinitions } from
|
|
5
|
-
import { Devices } from
|
|
6
|
-
import { TokenExchange } from
|
|
7
|
-
import { Trips } from
|
|
8
|
-
import { Valuations } from
|
|
9
|
-
import { VehicleEvents } from
|
|
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
|
|
3
|
-
import { DimoEnvironment } from
|
|
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
|
|
2
|
+
import { Resource } from '../../Resource';
|
|
3
3
|
class VehicleEvents extends Resource {
|
|
4
4
|
constructor(api, env) {
|
|
5
|
-
super(api,
|
|
5
|
+
super(api, 'VehicleEvents', env);
|
|
6
6
|
this.setResource({
|
|
7
7
|
listWebhooks: {
|
|
8
|
-
method:
|
|
9
|
-
path:
|
|
10
|
-
auth:
|
|
8
|
+
method: 'GET',
|
|
9
|
+
path: '/v1/webhooks',
|
|
10
|
+
auth: 'developer_jwt',
|
|
11
11
|
},
|
|
12
12
|
createWebhook: {
|
|
13
|
-
method:
|
|
14
|
-
path:
|
|
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:
|
|
25
|
+
auth: 'developer_jwt',
|
|
26
26
|
},
|
|
27
27
|
updateWebhook: {
|
|
28
|
-
method:
|
|
29
|
-
path:
|
|
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:
|
|
40
|
+
auth: 'developer_jwt',
|
|
41
41
|
},
|
|
42
42
|
deleteWebhook: {
|
|
43
|
-
method:
|
|
44
|
-
path:
|
|
45
|
-
auth:
|
|
43
|
+
method: 'DELETE',
|
|
44
|
+
path: '/v1/webhooks/:webhookId',
|
|
45
|
+
auth: 'developer_jwt',
|
|
46
46
|
},
|
|
47
47
|
getWebhookSignalNames: {
|
|
48
|
-
method:
|
|
49
|
-
path:
|
|
50
|
-
auth:
|
|
48
|
+
method: 'GET',
|
|
49
|
+
path: '/v1/webhooks/signals',
|
|
50
|
+
auth: 'developer_jwt',
|
|
51
51
|
},
|
|
52
52
|
listSubscribedVehicles: {
|
|
53
|
-
method:
|
|
54
|
-
path:
|
|
55
|
-
auth:
|
|
53
|
+
method: 'GET',
|
|
54
|
+
path: '/v1/webhooks/:webhookId',
|
|
55
|
+
auth: 'developer_jwt',
|
|
56
56
|
},
|
|
57
57
|
listVehicleSubscriptions: {
|
|
58
|
-
method:
|
|
59
|
-
path:
|
|
60
|
-
auth:
|
|
58
|
+
method: 'GET',
|
|
59
|
+
path: '/v1/webhooks/vehicles/:tokenId',
|
|
60
|
+
auth: 'developer_jwt',
|
|
61
61
|
},
|
|
62
62
|
subscribeVehicle: {
|
|
63
|
-
method:
|
|
64
|
-
path:
|
|
65
|
-
auth:
|
|
63
|
+
method: 'POST',
|
|
64
|
+
path: '/v1/webhooks/:webhookId/subscribe/:tokenId',
|
|
65
|
+
auth: 'developer_jwt',
|
|
66
66
|
},
|
|
67
67
|
subscribeAllVehicles: {
|
|
68
|
-
method:
|
|
69
|
-
path:
|
|
70
|
-
auth:
|
|
68
|
+
method: 'POST',
|
|
69
|
+
path: '/v1/webhooks/:webhookId/subscribe/all',
|
|
70
|
+
auth: 'developer_jwt',
|
|
71
71
|
},
|
|
72
72
|
unsubscribeVehicle: {
|
|
73
|
-
method:
|
|
74
|
-
path:
|
|
75
|
-
auth:
|
|
73
|
+
method: 'DELETE',
|
|
74
|
+
path: '/v1/webhooks/:webhookId/unsubscribe/:tokenId',
|
|
75
|
+
auth: 'developer_jwt',
|
|
76
76
|
},
|
|
77
77
|
unsubscribeAllVehicles: {
|
|
78
|
-
method:
|
|
79
|
-
path:
|
|
80
|
-
auth:
|
|
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:
|
|
5
|
-
Auth:
|
|
6
|
-
Identity:
|
|
7
|
-
Devices:
|
|
8
|
-
DeviceDefinitions:
|
|
9
|
-
Telemetry:
|
|
10
|
-
TokenExchange:
|
|
11
|
-
Trips:
|
|
12
|
-
Valuations:
|
|
13
|
-
VehicleSignalDecoding:
|
|
14
|
-
VehicleEvents:
|
|
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:
|
|
18
|
-
Auth:
|
|
19
|
-
Identity:
|
|
20
|
-
Devices:
|
|
21
|
-
DeviceDefinitions:
|
|
22
|
-
Telemetry:
|
|
23
|
-
TokenExchange:
|
|
24
|
-
Trips:
|
|
25
|
-
Valuations:
|
|
26
|
-
VehicleSignalDecoding:
|
|
27
|
-
VehicleEvents:
|
|
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
|
|
2
|
-
import { getVin } from
|
|
1
|
+
import { getVehiclePrivileges } from './getVehiclePrivileges';
|
|
2
|
+
import { getVin } from './getVin';
|
|
3
3
|
export { getVehiclePrivileges, getVin };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { getVehiclePrivileges } from
|
|
2
|
-
import { getVin } from
|
|
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:
|
|
22016
|
-
Auth:
|
|
22017
|
-
Identity:
|
|
22018
|
-
Devices:
|
|
22019
|
-
DeviceDefinitions:
|
|
22020
|
-
Telemetry:
|
|
22021
|
-
TokenExchange:
|
|
22022
|
-
Trips:
|
|
22023
|
-
Valuations:
|
|
22024
|
-
VehicleSignalDecoding:
|
|
22025
|
-
VehicleEvents:
|
|
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:
|
|
22029
|
-
Auth:
|
|
22030
|
-
Identity:
|
|
22031
|
-
Devices:
|
|
22032
|
-
DeviceDefinitions:
|
|
22033
|
-
Telemetry:
|
|
22034
|
-
TokenExchange:
|
|
22035
|
-
Trips:
|
|
22036
|
-
Valuations:
|
|
22037
|
-
VehicleSignalDecoding:
|
|
22038
|
-
VehicleEvents:
|
|
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,
|
|
144412
|
+
super(api, 'VehicleEvents', env);
|
|
144413
144413
|
this.setResource({
|
|
144414
144414
|
listWebhooks: {
|
|
144415
|
-
method:
|
|
144416
|
-
path:
|
|
144417
|
-
auth:
|
|
144415
|
+
method: 'GET',
|
|
144416
|
+
path: '/v1/webhooks',
|
|
144417
|
+
auth: 'developer_jwt',
|
|
144418
144418
|
},
|
|
144419
144419
|
createWebhook: {
|
|
144420
|
-
method:
|
|
144421
|
-
path:
|
|
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:
|
|
144432
|
+
auth: 'developer_jwt',
|
|
144433
144433
|
},
|
|
144434
144434
|
updateWebhook: {
|
|
144435
|
-
method:
|
|
144436
|
-
path:
|
|
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:
|
|
144447
|
+
auth: 'developer_jwt',
|
|
144448
144448
|
},
|
|
144449
144449
|
deleteWebhook: {
|
|
144450
|
-
method:
|
|
144451
|
-
path:
|
|
144452
|
-
auth:
|
|
144450
|
+
method: 'DELETE',
|
|
144451
|
+
path: '/v1/webhooks/:webhookId',
|
|
144452
|
+
auth: 'developer_jwt',
|
|
144453
144453
|
},
|
|
144454
144454
|
getWebhookSignalNames: {
|
|
144455
|
-
method:
|
|
144456
|
-
path:
|
|
144457
|
-
auth:
|
|
144455
|
+
method: 'GET',
|
|
144456
|
+
path: '/v1/webhooks/signals',
|
|
144457
|
+
auth: 'developer_jwt',
|
|
144458
144458
|
},
|
|
144459
144459
|
listSubscribedVehicles: {
|
|
144460
|
-
method:
|
|
144461
|
-
path:
|
|
144462
|
-
auth:
|
|
144460
|
+
method: 'GET',
|
|
144461
|
+
path: '/v1/webhooks/:webhookId',
|
|
144462
|
+
auth: 'developer_jwt',
|
|
144463
144463
|
},
|
|
144464
144464
|
listVehicleSubscriptions: {
|
|
144465
|
-
method:
|
|
144466
|
-
path:
|
|
144467
|
-
auth:
|
|
144465
|
+
method: 'GET',
|
|
144466
|
+
path: '/v1/webhooks/vehicles/:tokenId',
|
|
144467
|
+
auth: 'developer_jwt',
|
|
144468
144468
|
},
|
|
144469
144469
|
subscribeVehicle: {
|
|
144470
|
-
method:
|
|
144471
|
-
path:
|
|
144472
|
-
auth:
|
|
144470
|
+
method: 'POST',
|
|
144471
|
+
path: '/v1/webhooks/:webhookId/subscribe/:tokenId',
|
|
144472
|
+
auth: 'developer_jwt',
|
|
144473
144473
|
},
|
|
144474
144474
|
subscribeAllVehicles: {
|
|
144475
|
-
method:
|
|
144476
|
-
path:
|
|
144477
|
-
auth:
|
|
144475
|
+
method: 'POST',
|
|
144476
|
+
path: '/v1/webhooks/:webhookId/subscribe/all',
|
|
144477
|
+
auth: 'developer_jwt',
|
|
144478
144478
|
},
|
|
144479
144479
|
unsubscribeVehicle: {
|
|
144480
|
-
method:
|
|
144481
|
-
path:
|
|
144482
|
-
auth:
|
|
144480
|
+
method: 'DELETE',
|
|
144481
|
+
path: '/v1/webhooks/:webhookId/unsubscribe/:tokenId',
|
|
144482
|
+
auth: 'developer_jwt',
|
|
144483
144483
|
},
|
|
144484
144484
|
unsubscribeAllVehicles: {
|
|
144485
|
-
method:
|
|
144486
|
-
path:
|
|
144487
|
-
auth:
|
|
144485
|
+
method: 'DELETE',
|
|
144486
|
+
path: '/v1/webhooks/:webhookId/unsubscribe/all',
|
|
144487
|
+
auth: 'developer_jwt',
|
|
144488
144488
|
},
|
|
144489
144489
|
});
|
|
144490
144490
|
}
|