@dimo-network/data-sdk 1.3.0 → 1.3.2
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/{index.cjs → cjs/index.js} +1325 -3119
- package/dist/cjs/index.js.map +1 -0
- package/dist/environments/index.js +22 -22
- package/dist/esm/index.js +142697 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/graphql/functions/index.d.ts +2 -2
- package/dist/graphql/functions/index.js +2 -2
- package/dist/types/api/Method.d.ts +2 -0
- package/dist/types/api/Method.test.d.ts +1 -0
- package/dist/types/api/Resource.d.ts +11 -0
- package/dist/types/api/functions/getDeveloperJwt.d.ts +7 -0
- package/dist/types/api/functions/getVehicleJwt.d.ts +7 -0
- package/dist/types/api/functions/index.d.ts +4 -0
- package/dist/types/api/functions/signChallenge.d.ts +5 -0
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/api/resources/Attestation/index.d.ts +5 -0
- package/dist/types/api/resources/Auth/index.d.ts +5 -0
- package/dist/types/api/resources/DeviceDefinitions/index.d.ts +5 -0
- package/dist/types/api/resources/Devices/index.d.ts +5 -0
- package/dist/types/api/resources/DimoRestResources.d.ts +10 -0
- package/dist/types/api/resources/TokenExchange/index.d.ts +5 -0
- package/dist/types/api/resources/Trips/index.d.ts +5 -0
- package/dist/types/api/resources/Valuations/index.d.ts +5 -0
- package/dist/types/api/resources/VehicleEvents/index.d.ts +7 -0
- package/dist/types/api/types/Endpoint.d.ts +11 -0
- package/dist/types/constants.d.ts +14 -0
- package/dist/types/dimo.d.ts +18 -0
- package/dist/types/dimo.test.d.ts +1 -0
- package/dist/types/environments/index.d.ts +30 -0
- package/dist/types/errors/DimoError.d.ts +9 -0
- package/dist/types/errors/index.d.ts +1 -0
- package/dist/types/graphql/Query.d.ts +3 -0
- package/dist/types/graphql/Query.test.d.ts +1 -0
- package/dist/types/graphql/Resource.d.ts +16 -0
- package/dist/types/graphql/functions/getVehiclePrivileges.d.ts +6 -0
- package/dist/types/graphql/functions/getVin.d.ts +5 -0
- package/dist/types/graphql/functions/index.d.ts +3 -0
- package/dist/types/graphql/index.d.ts +1 -0
- package/dist/types/graphql/resources/DimoGraphqlResources.d.ts +3 -0
- package/dist/types/graphql/resources/Identity/index.d.ts +5 -0
- package/dist/types/graphql/resources/Telemetry/index.d.ts +5 -0
- package/dist/types/graphql/util/paginate.d.ts +9 -0
- package/dist/types/index.d.ts +18 -0
- package/dist/types/util/decodeJwt.d.ts +1 -0
- package/dist/types/util/decodePermissions.d.ts +1 -0
- package/dist/types/util/index.d.ts +8 -0
- package/package.json +15 -9
- package/rollup.config.js +33 -9
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
|
}
|