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

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 (74) hide show
  1. package/api.doc.md +841 -0
  2. package/dist/index.d.mts +5 -0
  3. package/dist/index.d.ts +5 -0
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +5 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +5 -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 +6 -0
  29. package/dist/resources/device/index.d.ts.map +1 -0
  30. package/dist/resources/device/index.js +22 -0
  31. package/dist/resources/device/index.js.map +1 -0
  32. package/dist/resources/device/index.mjs +6 -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/index.d.ts +1 -0
  47. package/dist/resources/index.d.ts.map +1 -1
  48. package/dist/resources/index.js +1 -0
  49. package/dist/resources/index.js.map +1 -1
  50. package/dist/resources/index.mjs +1 -0
  51. package/dist/src/index.ts +5 -0
  52. package/dist/src/resources/auth/presigned-url.ts +1 -1
  53. package/dist/src/resources/device/device-connector.ts +49 -0
  54. package/dist/src/resources/device/device-model.ts +65 -0
  55. package/dist/src/resources/device/devices.ts +63 -0
  56. package/dist/src/resources/device/index.ts +5 -0
  57. package/dist/src/resources/device/manufacturers.ts +65 -0
  58. package/dist/src/resources/device/network-server.ts +64 -0
  59. package/dist/src/resources/index.ts +1 -0
  60. package/dist/src/version.ts +1 -1
  61. package/dist/version.d.ts +1 -1
  62. package/dist/version.js +1 -1
  63. package/dist/version.mjs +1 -1
  64. package/package.json +1 -1
  65. package/src/index.ts +5 -0
  66. package/src/resources/auth/presigned-url.ts +1 -1
  67. package/src/resources/device/device-connector.ts +49 -0
  68. package/src/resources/device/device-model.ts +65 -0
  69. package/src/resources/device/devices.ts +63 -0
  70. package/src/resources/device/index.ts +5 -0
  71. package/src/resources/device/manufacturers.ts +65 -0
  72. package/src/resources/device/network-server.ts +64 -0
  73. package/src/resources/index.ts +1 -0
  74. package/src/version.ts +1 -1
@@ -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,5 @@
1
+ export * from './device-model';
2
+ export * from './device-connector';
3
+ export * from './network-server';
4
+ export * from './devices';
5
+ export * from './manufacturers';
@@ -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>;
@@ -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.15';