@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.
Files changed (54) hide show
  1. package/dist/api/Resource.d.ts +2 -2
  2. package/dist/api/Resource.js +1 -1
  3. package/dist/api/resources/DimoRestResources.d.ts +8 -8
  4. package/dist/api/resources/DimoRestResources.js +8 -8
  5. package/dist/api/resources/VehicleEvents/index.d.ts +2 -2
  6. package/dist/api/resources/VehicleEvents/index.js +35 -35
  7. package/dist/{index.cjs → cjs/index.js} +1325 -3119
  8. package/dist/cjs/index.js.map +1 -0
  9. package/dist/environments/index.js +22 -22
  10. package/dist/esm/index.js +142697 -0
  11. package/dist/esm/index.js.map +1 -0
  12. package/dist/graphql/functions/index.d.ts +2 -2
  13. package/dist/graphql/functions/index.js +2 -2
  14. package/dist/types/api/Method.d.ts +2 -0
  15. package/dist/types/api/Method.test.d.ts +1 -0
  16. package/dist/types/api/Resource.d.ts +11 -0
  17. package/dist/types/api/functions/getDeveloperJwt.d.ts +7 -0
  18. package/dist/types/api/functions/getVehicleJwt.d.ts +7 -0
  19. package/dist/types/api/functions/index.d.ts +4 -0
  20. package/dist/types/api/functions/signChallenge.d.ts +5 -0
  21. package/dist/types/api/index.d.ts +1 -0
  22. package/dist/types/api/resources/Attestation/index.d.ts +5 -0
  23. package/dist/types/api/resources/Auth/index.d.ts +5 -0
  24. package/dist/types/api/resources/DeviceDefinitions/index.d.ts +5 -0
  25. package/dist/types/api/resources/Devices/index.d.ts +5 -0
  26. package/dist/types/api/resources/DimoRestResources.d.ts +10 -0
  27. package/dist/types/api/resources/TokenExchange/index.d.ts +5 -0
  28. package/dist/types/api/resources/Trips/index.d.ts +5 -0
  29. package/dist/types/api/resources/Valuations/index.d.ts +5 -0
  30. package/dist/types/api/resources/VehicleEvents/index.d.ts +7 -0
  31. package/dist/types/api/types/Endpoint.d.ts +11 -0
  32. package/dist/types/constants.d.ts +14 -0
  33. package/dist/types/dimo.d.ts +18 -0
  34. package/dist/types/dimo.test.d.ts +1 -0
  35. package/dist/types/environments/index.d.ts +30 -0
  36. package/dist/types/errors/DimoError.d.ts +9 -0
  37. package/dist/types/errors/index.d.ts +1 -0
  38. package/dist/types/graphql/Query.d.ts +3 -0
  39. package/dist/types/graphql/Query.test.d.ts +1 -0
  40. package/dist/types/graphql/Resource.d.ts +16 -0
  41. package/dist/types/graphql/functions/getVehiclePrivileges.d.ts +6 -0
  42. package/dist/types/graphql/functions/getVin.d.ts +5 -0
  43. package/dist/types/graphql/functions/index.d.ts +3 -0
  44. package/dist/types/graphql/index.d.ts +1 -0
  45. package/dist/types/graphql/resources/DimoGraphqlResources.d.ts +3 -0
  46. package/dist/types/graphql/resources/Identity/index.d.ts +5 -0
  47. package/dist/types/graphql/resources/Telemetry/index.d.ts +5 -0
  48. package/dist/types/graphql/util/paginate.d.ts +9 -0
  49. package/dist/types/index.d.ts +18 -0
  50. package/dist/types/util/decodeJwt.d.ts +1 -0
  51. package/dist/types/util/decodePermissions.d.ts +1 -0
  52. package/dist/types/util/index.d.ts +8 -0
  53. package/package.json +15 -9
  54. package/rollup.config.js +33 -9
@@ -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
  }