@space-df/sdk 0.0.1-dev.14 → 0.0.1-dev.16

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 (82) hide show
  1. package/api.doc.md +1250 -198
  2. package/dist/index.d.mts +6 -0
  3. package/dist/index.d.ts +6 -0
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +6 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +6 -0
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/package.json +1 -1
  10. package/dist/resources/device/device-connector.d.ts +25 -0
  11. package/dist/resources/device/device-connector.d.ts.map +1 -0
  12. package/dist/resources/device/device-connector.js +30 -0
  13. package/dist/resources/device/device-connector.js.map +1 -0
  14. package/dist/resources/device/device-connector.mjs +26 -0
  15. package/dist/resources/device/device-connector.mjs.map +1 -0
  16. package/dist/resources/device/device-model.d.ts +20 -0
  17. package/dist/resources/device/device-model.d.ts.map +1 -0
  18. package/dist/resources/device/device-model.js +52 -0
  19. package/dist/resources/device/device-model.js.map +1 -0
  20. package/dist/resources/device/device-model.mjs +48 -0
  21. package/dist/resources/device/device-model.mjs.map +1 -0
  22. package/dist/resources/device/devices.d.ts +18 -0
  23. package/dist/resources/device/devices.d.ts.map +1 -0
  24. package/dist/resources/device/devices.js +52 -0
  25. package/dist/resources/device/devices.js.map +1 -0
  26. package/dist/resources/device/devices.mjs +48 -0
  27. package/dist/resources/device/devices.mjs.map +1 -0
  28. package/dist/resources/device/index.d.ts +7 -0
  29. package/dist/resources/device/index.d.ts.map +1 -0
  30. package/dist/resources/device/index.js +23 -0
  31. package/dist/resources/device/index.js.map +1 -0
  32. package/dist/resources/device/index.mjs +7 -0
  33. package/dist/resources/device/index.mjs.map +1 -0
  34. package/dist/resources/device/manufacturers.d.ts +20 -0
  35. package/dist/resources/device/manufacturers.d.ts.map +1 -0
  36. package/dist/resources/device/manufacturers.js +52 -0
  37. package/dist/resources/device/manufacturers.js.map +1 -0
  38. package/dist/resources/device/manufacturers.mjs +48 -0
  39. package/dist/resources/device/manufacturers.mjs.map +1 -0
  40. package/dist/resources/device/network-server.d.ts +19 -0
  41. package/dist/resources/device/network-server.d.ts.map +1 -0
  42. package/dist/resources/device/network-server.js +52 -0
  43. package/dist/resources/device/network-server.js.map +1 -0
  44. package/dist/resources/device/network-server.mjs +48 -0
  45. package/dist/resources/device/network-server.mjs.map +1 -0
  46. package/dist/resources/device/trip.d.ts +24 -0
  47. package/dist/resources/device/trip.d.ts.map +1 -0
  48. package/dist/resources/device/trip.js +49 -0
  49. package/dist/resources/device/trip.js.map +1 -0
  50. package/dist/resources/device/trip.mjs +45 -0
  51. package/dist/resources/device/trip.mjs.map +1 -0
  52. package/dist/resources/index.d.ts +1 -0
  53. package/dist/resources/index.d.ts.map +1 -1
  54. package/dist/resources/index.js +1 -0
  55. package/dist/resources/index.js.map +1 -1
  56. package/dist/resources/index.mjs +1 -0
  57. package/dist/src/index.ts +6 -0
  58. package/dist/src/resources/auth/presigned-url.ts +1 -1
  59. package/dist/src/resources/device/device-connector.ts +49 -0
  60. package/dist/src/resources/device/device-model.ts +65 -0
  61. package/dist/src/resources/device/devices.ts +63 -0
  62. package/dist/src/resources/device/index.ts +6 -0
  63. package/dist/src/resources/device/manufacturers.ts +65 -0
  64. package/dist/src/resources/device/network-server.ts +64 -0
  65. package/dist/src/resources/device/trip.ts +64 -0
  66. package/dist/src/resources/index.ts +1 -0
  67. package/dist/src/version.ts +1 -1
  68. package/dist/version.d.ts +1 -1
  69. package/dist/version.js +1 -1
  70. package/dist/version.mjs +1 -1
  71. package/package.json +1 -1
  72. package/src/index.ts +6 -0
  73. package/src/resources/auth/presigned-url.ts +1 -1
  74. package/src/resources/device/device-connector.ts +49 -0
  75. package/src/resources/device/device-model.ts +65 -0
  76. package/src/resources/device/devices.ts +63 -0
  77. package/src/resources/device/index.ts +6 -0
  78. package/src/resources/device/manufacturers.ts +65 -0
  79. package/src/resources/device/network-server.ts +64 -0
  80. package/src/resources/device/trip.ts +64 -0
  81. package/src/resources/index.ts +1 -0
  82. package/src/version.ts +1 -1
@@ -0,0 +1,64 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+
5
+ export class NetworkServer extends APIResource {
6
+ create(params: NetworkServerParams, options?: Core.RequestOptions): Core.APIPromise<NetworkServerParams> {
7
+ const { ...body } = params;
8
+ return this._client.post(`/network-server/`, {
9
+ body,
10
+ ...options,
11
+ headers: { ...options?.headers },
12
+ });
13
+ }
14
+
15
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<NetworkServerParams> {
16
+ return this._client.get(`/network-server/${id}/`, {
17
+ ...options,
18
+ headers: { ...options?.headers },
19
+ });
20
+ }
21
+
22
+ update(id: string, params: NetworkServerParams, options?: Core.RequestOptions): Core.APIPromise<NetworkServerParams> {
23
+ const { ...body } = params;
24
+ return this._client.put(`/network-server/${id}/`, {
25
+ body,
26
+ ...options,
27
+ headers: { ...options?.headers },
28
+ });
29
+ }
30
+
31
+ partialUpdate(id: number, params: NetworkServerParams, options?: Core.RequestOptions): Core.APIPromise<NetworkServerParams> {
32
+ const { ...body } = params;
33
+ return this._client.patch(`/network-server/${id}/`, {
34
+ body,
35
+ ...options,
36
+ headers: { ...options?.headers },
37
+ });
38
+ }
39
+
40
+ list(params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise<NetworkServerListResponse> {
41
+ const { ...query } = params;
42
+ return this._client.get(`/network-server/`, {
43
+ query,
44
+ ...options,
45
+ headers: { ...options?.headers },
46
+ });
47
+ }
48
+
49
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
50
+ return this._client.delete(`/network-server/${id}/`, {
51
+ ...options,
52
+ headers: { Accept: '*/*', ...options?.headers },
53
+ });
54
+ }
55
+ }
56
+
57
+ export interface NetworkServerParams {
58
+ name: string;
59
+ logo: string;
60
+ description: string;
61
+ type_connect: string[];
62
+ }
63
+
64
+ export type NetworkServerListResponse = ListResponse<NetworkServerParams>;
@@ -0,0 +1,64 @@
1
+ import { APIResource } from '../../resource';
2
+ import { ListParamsResponse, ListResponse } from '../../types/api';
3
+ import * as Core from '../../core';
4
+
5
+ interface TripListParams extends ListParamsResponse {
6
+ include_transformed_data?: boolean;
7
+ }
8
+
9
+ export class Trip extends APIResource {
10
+ create(params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams> {
11
+ return this._client.post(`/trips/`, {
12
+ body: params,
13
+ ...options,
14
+ headers: { ...options?.headers },
15
+ });
16
+ }
17
+
18
+ retrieve(id: string, params: { include_transformed_data?: boolean }, options?: Core.RequestOptions): Core.APIPromise<TripParams> {
19
+ return this._client.get(`/trips/${id}/`, {
20
+ query: params,
21
+ ...options,
22
+ headers: { ...options?.headers },
23
+ });
24
+ }
25
+
26
+ list(params: TripListParams, options?: Core.RequestOptions): Core.APIPromise<TripListResponse> {
27
+ return this._client.get(`/trips/`, {
28
+ query: params,
29
+ ...options,
30
+ headers: { ...options?.headers },
31
+ });
32
+ }
33
+
34
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
35
+ return this._client.delete(`/trips/${id}/`, {
36
+ ...options,
37
+ headers: { ...options?.headers },
38
+ });
39
+ }
40
+
41
+ partialUpdate(id: string, params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams> {
42
+ return this._client.patch(`/trips/${id}/`, {
43
+ body: params,
44
+ ...options,
45
+ headers: { ...options?.headers },
46
+ });
47
+ }
48
+
49
+ update(id: string, params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams> {
50
+ return this._client.put(`/trips/${id}/`, {
51
+ body: params,
52
+ ...options,
53
+ headers: { ...options?.headers },
54
+ });
55
+ }
56
+ }
57
+
58
+ export interface TripParams {
59
+ space_device: string;
60
+ start_at: string;
61
+ ended_at: string;
62
+ }
63
+
64
+ export type TripListResponse = ListResponse<TripParams>;
@@ -4,3 +4,4 @@
4
4
  export * from './auth/index';
5
5
  export * from './dashboard/index';
6
6
  export * from './console/index';
7
+ export * from './device/index';
@@ -1 +1 @@
1
- export const VERSION = '0.0.1-dev.14';
1
+ export const VERSION = '0.0.1-dev.16';
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.0.1-dev.14";
1
+ export declare const VERSION = "0.0.1-dev.16";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.0.1-dev.14';
4
+ exports.VERSION = '0.0.1-dev.16';
5
5
  //# sourceMappingURL=version.js.map
package/dist/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.0.1-dev.14';
1
+ export const VERSION = '0.0.1-dev.16';
2
2
  //# sourceMappingURL=version.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@space-df/sdk",
3
- "version": "0.0.1-dev.14",
3
+ "version": "0.0.1-dev.16",
4
4
  "description": "The official TypeScript library for the Spacedf SDK API",
5
5
  "author": "Spacedf SDK <support@digitalfortress.dev>",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -148,6 +148,12 @@ export class SpaceDFSDK extends Core.APIClient {
148
148
  credentials: API.Credentials = new API.Credentials(this);
149
149
  users: API.Users = new API.Users(this);
150
150
  presignedUrl: API.PresignedUrl = new API.PresignedUrl(this);
151
+ deviceConnector: API.DeviceConnector = new API.DeviceConnector(this);
152
+ deviceModel: API.DeviceModel = new API.DeviceModel(this);
153
+ device: API.Device = new API.Device(this);
154
+ manufacturers: API.Manufacturers = new API.Manufacturers(this);
155
+ networkServer: API.NetworkServer = new API.NetworkServer(this);
156
+ trip: API.Trip = new API.Trip(this);
151
157
 
152
158
  protected override defaultQuery(): Core.DefaultQuery | undefined {
153
159
  return this._options.defaultQuery;
@@ -10,4 +10,4 @@ export class PresignedUrl extends APIResource {
10
10
  export interface PresignedUrlResponse {
11
11
  presigned_url: string;
12
12
  file_name: string;
13
- }
13
+ }
@@ -0,0 +1,49 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+
4
+ export class DeviceConnector extends APIResource {
5
+ create(params: DeviceConnectorParams, options?: Core.RequestOptions): Core.APIPromise<DeviceConnectorParams> {
6
+ const { ...body } = params;
7
+ return this._client.post(`/device-connector/`, {
8
+ body,
9
+ ...options,
10
+ headers: { ...options?.headers },
11
+ });
12
+ }
13
+
14
+ testConnectionPreview(params: DeviceConnectorParams, options?: Core.RequestOptions): Core.APIPromise<void> {
15
+ const { ...body } = params;
16
+ return this._client.post(`/device-connector/test-connection-preview/`, {
17
+ body,
18
+ ...options,
19
+ headers: { ...options?.headers },
20
+ });
21
+ }
22
+
23
+ testConnection(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
24
+ return this._client.get(`/device-connector/${id}/`, {
25
+ ...options,
26
+ headers: { ...options?.headers },
27
+ });
28
+ }
29
+ }
30
+
31
+ export interface DeviceConnectorParams {
32
+ network_server: string;
33
+ name: string;
34
+ connector_type: string;
35
+ status?: string;
36
+ deviceHttpConfig?: DeviceHttpConfig;
37
+ deviceMqttConfig?: DeviceMqttConfig;
38
+ }
39
+
40
+ export interface DeviceHttpConfig {
41
+ api_token: string;
42
+ address_url: string;
43
+ }
44
+
45
+ export interface DeviceMqttConfig {
46
+ mqtt_broker: string;
47
+ username: string;
48
+ password: string;
49
+ }
@@ -0,0 +1,65 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+
5
+ export class DeviceModel extends APIResource {
6
+ create(params: DeviceModelParams, options?: Core.RequestOptions): Core.APIPromise<DeviceModelParams> {
7
+ const { ...body } = params;
8
+ return this._client.post(`/device-models/`, {
9
+ body,
10
+ ...options,
11
+ headers: { ...options?.headers },
12
+ });
13
+ }
14
+
15
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<DeviceModelParams> {
16
+ return this._client.get(`/device-models/${id}/`, {
17
+ ...options,
18
+ headers: { ...options?.headers },
19
+ });
20
+ }
21
+
22
+ update(id: string, params: DeviceModelParams, options?: Core.RequestOptions): Core.APIPromise<DeviceModelParams> {
23
+ const { ...body } = params;
24
+ return this._client.put(`/device-models/${id}/`, {
25
+ body,
26
+ ...options,
27
+ headers: { ...options?.headers },
28
+ });
29
+ }
30
+
31
+ partialUpdate(id: number, params: DeviceModelParams, options?: Core.RequestOptions): Core.APIPromise<DeviceModelParams> {
32
+ const { ...body } = params;
33
+ return this._client.patch(`/device-models/${id}/`, {
34
+ body,
35
+ ...options,
36
+ headers: { ...options?.headers },
37
+ });
38
+ }
39
+
40
+ list(params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise<DeviceModelListResponse> {
41
+ const { ...query } = params;
42
+ return this._client.get(`/device-models/`, {
43
+ query,
44
+ ...options,
45
+ headers: { ...options?.headers },
46
+ });
47
+ }
48
+
49
+ delete(id: number, options?: Core.RequestOptions): Core.APIPromise<void> {
50
+ return this._client.delete(`/device-models/${id}/`, {
51
+ ...options,
52
+ headers: { Accept: '*/*', ...options?.headers },
53
+ });
54
+ }
55
+ }
56
+
57
+ export interface DeviceModelParams {
58
+ name: string;
59
+ alias: string;
60
+ image_url: string;
61
+ default_config: object;
62
+ manufacture: string;
63
+ }
64
+
65
+ export type DeviceModelListResponse = ListResponse<DeviceModelParams>;
@@ -0,0 +1,63 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+
5
+ export class Device extends APIResource {
6
+ create(params: DeviceParams, options?: Core.RequestOptions): Core.APIPromise<DeviceParams> {
7
+ const { ...body } = params;
8
+ return this._client.post(`/devices/`, {
9
+ body,
10
+ ...options,
11
+ headers: { ...options?.headers },
12
+ });
13
+ }
14
+
15
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<DeviceParams> {
16
+ return this._client.get(`/devices/${id}/`, {
17
+ ...options,
18
+ headers: { ...options?.headers },
19
+ });
20
+ }
21
+
22
+ update(id: string, params: DeviceParams, options?: Core.RequestOptions): Core.APIPromise<DeviceParams> {
23
+ const { ...body } = params;
24
+ return this._client.put(`/devices/${id}/`, {
25
+ body,
26
+ ...options,
27
+ headers: { ...options?.headers },
28
+ });
29
+ }
30
+
31
+ partialUpdate(id: number, params: DeviceParams, options?: Core.RequestOptions): Core.APIPromise<DeviceParams> {
32
+ const { ...body } = params;
33
+ return this._client.patch(`/devices/${id}/`, {
34
+ body,
35
+ ...options,
36
+ headers: { ...options?.headers },
37
+ });
38
+ }
39
+
40
+ list(params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise<DeviceListResponse> {
41
+ const { ...query } = params;
42
+ return this._client.get(`/devices/`, {
43
+ query,
44
+ ...options,
45
+ headers: { ...options?.headers },
46
+ });
47
+ }
48
+
49
+ delete(id: number, options?: Core.RequestOptions): Core.APIPromise<void> {
50
+ return this._client.delete(`/devices/${id}/`, {
51
+ ...options,
52
+ headers: { Accept: '*/*', ...options?.headers },
53
+ });
54
+ }
55
+ }
56
+
57
+ export interface DeviceParams {
58
+ status?: string;
59
+ device_connector: string;
60
+ device_model: string;
61
+ }
62
+
63
+ export type DeviceListResponse = ListResponse<DeviceParams>;
@@ -0,0 +1,6 @@
1
+ export * from './device-model';
2
+ export * from './device-connector';
3
+ export * from './network-server';
4
+ export * from './devices';
5
+ export * from './manufacturers';
6
+ export * from './trip';
@@ -0,0 +1,65 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+
5
+ export class Manufacturers extends APIResource {
6
+ create(params: ManufacturersParams, options?: Core.RequestOptions): Core.APIPromise<ManufacturersParams> {
7
+ const { ...body } = params;
8
+ return this._client.post(`/manufacturers/`, {
9
+ body,
10
+ ...options,
11
+ headers: { ...options?.headers },
12
+ });
13
+ }
14
+
15
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<ManufacturersParams> {
16
+ return this._client.get(`/manufacturers/${id}/`, {
17
+ ...options,
18
+ headers: { ...options?.headers },
19
+ });
20
+ }
21
+
22
+ update(id: string, params: ManufacturersParams, options?: Core.RequestOptions): Core.APIPromise<ManufacturersParams> {
23
+ const { ...body } = params;
24
+ return this._client.put(`/manufacturers/${id}/`, {
25
+ body,
26
+ ...options,
27
+ headers: { ...options?.headers },
28
+ });
29
+ }
30
+
31
+ partialUpdate(id: number, params: ManufacturersParams, options?: Core.RequestOptions): Core.APIPromise<ManufacturersParams> {
32
+ const { ...body } = params;
33
+ return this._client.patch(`/manufacturers/${id}/`, {
34
+ body,
35
+ ...options,
36
+ headers: { ...options?.headers },
37
+ });
38
+ }
39
+
40
+ list(params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise<ManufacturersListResponse> {
41
+ const { ...query } = params;
42
+ return this._client.get(`/manufacturers/`, {
43
+ query,
44
+ ...options,
45
+ headers: { ...options?.headers },
46
+ });
47
+ }
48
+
49
+ delete(id: number, options?: Core.RequestOptions): Core.APIPromise<void> {
50
+ return this._client.delete(`/manufacturers/${id}/`, {
51
+ ...options,
52
+ headers: { Accept: '*/*', ...options?.headers },
53
+ });
54
+ }
55
+ }
56
+
57
+ export interface ManufacturersParams {
58
+ name: string;
59
+ location: string;
60
+ description: string;
61
+ portal_url: string;
62
+ national: string;
63
+ }
64
+
65
+ export type ManufacturersListResponse = ListResponse<ManufacturersParams>;
@@ -0,0 +1,64 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+
5
+ export class NetworkServer extends APIResource {
6
+ create(params: NetworkServerParams, options?: Core.RequestOptions): Core.APIPromise<NetworkServerParams> {
7
+ const { ...body } = params;
8
+ return this._client.post(`/network-server/`, {
9
+ body,
10
+ ...options,
11
+ headers: { ...options?.headers },
12
+ });
13
+ }
14
+
15
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<NetworkServerParams> {
16
+ return this._client.get(`/network-server/${id}/`, {
17
+ ...options,
18
+ headers: { ...options?.headers },
19
+ });
20
+ }
21
+
22
+ update(id: string, params: NetworkServerParams, options?: Core.RequestOptions): Core.APIPromise<NetworkServerParams> {
23
+ const { ...body } = params;
24
+ return this._client.put(`/network-server/${id}/`, {
25
+ body,
26
+ ...options,
27
+ headers: { ...options?.headers },
28
+ });
29
+ }
30
+
31
+ partialUpdate(id: number, params: NetworkServerParams, options?: Core.RequestOptions): Core.APIPromise<NetworkServerParams> {
32
+ const { ...body } = params;
33
+ return this._client.patch(`/network-server/${id}/`, {
34
+ body,
35
+ ...options,
36
+ headers: { ...options?.headers },
37
+ });
38
+ }
39
+
40
+ list(params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise<NetworkServerListResponse> {
41
+ const { ...query } = params;
42
+ return this._client.get(`/network-server/`, {
43
+ query,
44
+ ...options,
45
+ headers: { ...options?.headers },
46
+ });
47
+ }
48
+
49
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
50
+ return this._client.delete(`/network-server/${id}/`, {
51
+ ...options,
52
+ headers: { Accept: '*/*', ...options?.headers },
53
+ });
54
+ }
55
+ }
56
+
57
+ export interface NetworkServerParams {
58
+ name: string;
59
+ logo: string;
60
+ description: string;
61
+ type_connect: string[];
62
+ }
63
+
64
+ export type NetworkServerListResponse = ListResponse<NetworkServerParams>;
@@ -0,0 +1,64 @@
1
+ import { APIResource } from '../../resource';
2
+ import { ListParamsResponse, ListResponse } from '../../types/api';
3
+ import * as Core from '../../core';
4
+
5
+ interface TripListParams extends ListParamsResponse {
6
+ include_transformed_data?: boolean;
7
+ }
8
+
9
+ export class Trip extends APIResource {
10
+ create(params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams> {
11
+ return this._client.post(`/trips/`, {
12
+ body: params,
13
+ ...options,
14
+ headers: { ...options?.headers },
15
+ });
16
+ }
17
+
18
+ retrieve(id: string, params: { include_transformed_data?: boolean }, options?: Core.RequestOptions): Core.APIPromise<TripParams> {
19
+ return this._client.get(`/trips/${id}/`, {
20
+ query: params,
21
+ ...options,
22
+ headers: { ...options?.headers },
23
+ });
24
+ }
25
+
26
+ list(params: TripListParams, options?: Core.RequestOptions): Core.APIPromise<TripListResponse> {
27
+ return this._client.get(`/trips/`, {
28
+ query: params,
29
+ ...options,
30
+ headers: { ...options?.headers },
31
+ });
32
+ }
33
+
34
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
35
+ return this._client.delete(`/trips/${id}/`, {
36
+ ...options,
37
+ headers: { ...options?.headers },
38
+ });
39
+ }
40
+
41
+ partialUpdate(id: string, params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams> {
42
+ return this._client.patch(`/trips/${id}/`, {
43
+ body: params,
44
+ ...options,
45
+ headers: { ...options?.headers },
46
+ });
47
+ }
48
+
49
+ update(id: string, params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams> {
50
+ return this._client.put(`/trips/${id}/`, {
51
+ body: params,
52
+ ...options,
53
+ headers: { ...options?.headers },
54
+ });
55
+ }
56
+ }
57
+
58
+ export interface TripParams {
59
+ space_device: string;
60
+ start_at: string;
61
+ ended_at: string;
62
+ }
63
+
64
+ export type TripListResponse = ListResponse<TripParams>;
@@ -4,3 +4,4 @@
4
4
  export * from './auth/index';
5
5
  export * from './dashboard/index';
6
6
  export * from './console/index';
7
+ export * from './device/index';
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.0.1-dev.14';
1
+ export const VERSION = '0.0.1-dev.16';