@space-df/sdk 0.0.1-dev.4 → 0.0.1-dev.41

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 (223) hide show
  1. package/README.md +4 -7
  2. package/api.doc.md +2057 -20
  3. package/dist/README.md +4 -7
  4. package/dist/core.d.ts +1 -4
  5. package/dist/core.d.ts.map +1 -1
  6. package/dist/core.js +1 -3
  7. package/dist/core.js.map +1 -1
  8. package/dist/core.mjs +1 -3
  9. package/dist/core.mjs.map +1 -1
  10. package/dist/index.d.mts +18 -6
  11. package/dist/index.d.ts +18 -6
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +16 -16
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +16 -16
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/package.json +1 -1
  18. package/dist/resources/auth/auth.d.ts +20 -1
  19. package/dist/resources/auth/auth.d.ts.map +1 -1
  20. package/dist/resources/auth/auth.js +15 -0
  21. package/dist/resources/auth/auth.js.map +1 -1
  22. package/dist/resources/auth/auth.mjs +15 -0
  23. package/dist/resources/auth/auth.mjs.map +1 -1
  24. package/dist/resources/auth/index.d.ts +1 -0
  25. package/dist/resources/auth/index.d.ts.map +1 -1
  26. package/dist/resources/auth/index.js +1 -0
  27. package/dist/resources/auth/index.js.map +1 -1
  28. package/dist/resources/auth/index.mjs +1 -0
  29. package/dist/resources/auth/presigned-url.d.ts +10 -0
  30. package/dist/resources/auth/presigned-url.d.ts.map +1 -0
  31. package/dist/resources/auth/presigned-url.js +11 -0
  32. package/dist/resources/auth/presigned-url.js.map +1 -0
  33. package/dist/resources/auth/presigned-url.mjs +7 -0
  34. package/dist/resources/auth/presigned-url.mjs.map +1 -0
  35. package/dist/resources/auth/space-policies.d.ts +6 -3
  36. package/dist/resources/auth/space-policies.d.ts.map +1 -1
  37. package/dist/resources/auth/space-policies.js +16 -5
  38. package/dist/resources/auth/space-policies.js.map +1 -1
  39. package/dist/resources/auth/space-policies.mjs +16 -5
  40. package/dist/resources/auth/space-policies.mjs.map +1 -1
  41. package/dist/resources/auth/space-role-users.d.ts +13 -3
  42. package/dist/resources/auth/space-role-users.d.ts.map +1 -1
  43. package/dist/resources/auth/space-role-users.js +31 -6
  44. package/dist/resources/auth/space-role-users.js.map +1 -1
  45. package/dist/resources/auth/space-role-users.mjs +31 -6
  46. package/dist/resources/auth/space-role-users.mjs.map +1 -1
  47. package/dist/resources/auth/space-roles.d.ts +14 -3
  48. package/dist/resources/auth/space-roles.d.ts.map +1 -1
  49. package/dist/resources/auth/space-roles.js +14 -12
  50. package/dist/resources/auth/space-roles.js.map +1 -1
  51. package/dist/resources/auth/space-roles.mjs +14 -12
  52. package/dist/resources/auth/space-roles.mjs.map +1 -1
  53. package/dist/resources/auth/spaces.d.ts +21 -8
  54. package/dist/resources/auth/spaces.d.ts.map +1 -1
  55. package/dist/resources/auth/spaces.js +18 -6
  56. package/dist/resources/auth/spaces.js.map +1 -1
  57. package/dist/resources/auth/spaces.mjs +18 -6
  58. package/dist/resources/auth/spaces.mjs.map +1 -1
  59. package/dist/resources/dashboard/index.d.ts +1 -0
  60. package/dist/resources/dashboard/index.d.ts.map +1 -1
  61. package/dist/resources/dashboard/index.js +1 -0
  62. package/dist/resources/dashboard/index.js.map +1 -1
  63. package/dist/resources/dashboard/index.mjs +1 -0
  64. package/dist/resources/dashboard/widget.d.ts +11 -0
  65. package/dist/resources/dashboard/widget.d.ts.map +1 -0
  66. package/dist/resources/dashboard/widget.js +15 -0
  67. package/dist/resources/dashboard/widget.js.map +1 -0
  68. package/dist/resources/dashboard/widget.mjs +11 -0
  69. package/dist/resources/dashboard/widget.mjs.map +1 -0
  70. package/dist/resources/device/device-connector.d.ts +25 -0
  71. package/dist/resources/device/device-connector.d.ts.map +1 -0
  72. package/dist/resources/device/device-connector.js +30 -0
  73. package/dist/resources/device/device-connector.js.map +1 -0
  74. package/dist/resources/device/device-connector.mjs +26 -0
  75. package/dist/resources/device/device-connector.mjs.map +1 -0
  76. package/dist/resources/device/device-model.d.ts +20 -0
  77. package/dist/resources/device/device-model.d.ts.map +1 -0
  78. package/dist/resources/device/device-model.js +52 -0
  79. package/dist/resources/device/device-model.js.map +1 -0
  80. package/dist/resources/device/device-model.mjs +48 -0
  81. package/dist/resources/device/device-model.mjs.map +1 -0
  82. package/dist/resources/device/device-spaces.d.ts +19 -0
  83. package/dist/resources/device/device-spaces.d.ts.map +1 -0
  84. package/dist/resources/device/device-spaces.js +30 -0
  85. package/dist/resources/device/device-spaces.js.map +1 -0
  86. package/dist/resources/device/device-spaces.mjs +26 -0
  87. package/dist/resources/device/device-spaces.mjs.map +1 -0
  88. package/dist/resources/device/devices.d.ts +19 -0
  89. package/dist/resources/device/devices.d.ts.map +1 -0
  90. package/dist/resources/device/devices.js +58 -0
  91. package/dist/resources/device/devices.js.map +1 -0
  92. package/dist/resources/device/devices.mjs +54 -0
  93. package/dist/resources/device/devices.mjs.map +1 -0
  94. package/dist/resources/device/index.d.ts +8 -0
  95. package/dist/resources/device/index.d.ts.map +1 -0
  96. package/dist/resources/device/index.js +24 -0
  97. package/dist/resources/device/index.js.map +1 -0
  98. package/dist/resources/device/index.mjs +8 -0
  99. package/dist/resources/device/index.mjs.map +1 -0
  100. package/dist/resources/device/manufacturers.d.ts +20 -0
  101. package/dist/resources/device/manufacturers.d.ts.map +1 -0
  102. package/dist/resources/device/manufacturers.js +52 -0
  103. package/dist/resources/device/manufacturers.js.map +1 -0
  104. package/dist/resources/device/manufacturers.mjs +48 -0
  105. package/dist/resources/device/manufacturers.mjs.map +1 -0
  106. package/dist/resources/device/network-server.d.ts +19 -0
  107. package/dist/resources/device/network-server.d.ts.map +1 -0
  108. package/dist/resources/device/network-server.js +52 -0
  109. package/dist/resources/device/network-server.js.map +1 -0
  110. package/dist/resources/device/network-server.mjs +48 -0
  111. package/dist/resources/device/network-server.mjs.map +1 -0
  112. package/dist/resources/device/trip.d.ts +24 -0
  113. package/dist/resources/device/trip.d.ts.map +1 -0
  114. package/dist/resources/device/trip.js +49 -0
  115. package/dist/resources/device/trip.js.map +1 -0
  116. package/dist/resources/device/trip.mjs +45 -0
  117. package/dist/resources/device/trip.mjs.map +1 -0
  118. package/dist/resources/index.d.ts +3 -0
  119. package/dist/resources/index.d.ts.map +1 -1
  120. package/dist/resources/index.js +3 -0
  121. package/dist/resources/index.js.map +1 -1
  122. package/dist/resources/index.mjs +3 -0
  123. package/dist/resources/organizations/index.d.ts +2 -0
  124. package/dist/resources/organizations/index.d.ts.map +1 -0
  125. package/dist/resources/organizations/index.js +18 -0
  126. package/dist/resources/organizations/index.js.map +1 -0
  127. package/dist/resources/organizations/index.mjs +2 -0
  128. package/dist/resources/organizations/index.mjs.map +1 -0
  129. package/dist/resources/organizations/organizations.d.ts +9 -0
  130. package/dist/resources/organizations/organizations.d.ts.map +1 -0
  131. package/dist/resources/organizations/organizations.js +11 -0
  132. package/dist/resources/organizations/organizations.js.map +1 -0
  133. package/dist/resources/organizations/organizations.mjs +7 -0
  134. package/dist/resources/organizations/organizations.mjs.map +1 -0
  135. package/dist/resources/telemetry/alerts.d.ts +17 -0
  136. package/dist/resources/telemetry/alerts.d.ts.map +1 -0
  137. package/dist/resources/telemetry/alerts.js +16 -0
  138. package/dist/resources/telemetry/alerts.js.map +1 -0
  139. package/dist/resources/telemetry/alerts.mjs +12 -0
  140. package/dist/resources/telemetry/alerts.mjs.map +1 -0
  141. package/dist/resources/telemetry/entities.d.ts +40 -0
  142. package/dist/resources/telemetry/entities.d.ts.map +1 -0
  143. package/dist/resources/telemetry/entities.js +16 -0
  144. package/dist/resources/telemetry/entities.js.map +1 -0
  145. package/dist/resources/telemetry/entities.mjs +12 -0
  146. package/dist/resources/telemetry/entities.mjs.map +1 -0
  147. package/dist/resources/telemetry/geofences.d.ts +56 -0
  148. package/dist/resources/telemetry/geofences.d.ts.map +1 -0
  149. package/dist/resources/telemetry/geofences.js +52 -0
  150. package/dist/resources/telemetry/geofences.js.map +1 -0
  151. package/dist/resources/telemetry/geofences.mjs +48 -0
  152. package/dist/resources/telemetry/geofences.mjs.map +1 -0
  153. package/dist/resources/telemetry/index.d.ts +11 -0
  154. package/dist/resources/telemetry/index.d.ts.map +1 -0
  155. package/dist/resources/telemetry/index.js +32 -0
  156. package/dist/resources/telemetry/index.js.map +1 -0
  157. package/dist/resources/telemetry/index.mjs +14 -0
  158. package/dist/resources/telemetry/index.mjs.map +1 -0
  159. package/dist/src/core.ts +0 -6
  160. package/dist/src/index.ts +22 -22
  161. package/dist/src/resources/auth/auth.ts +42 -2
  162. package/dist/src/resources/auth/index.ts +1 -0
  163. package/dist/src/resources/auth/presigned-url.ts +13 -0
  164. package/dist/src/resources/auth/space-policies.ts +22 -7
  165. package/dist/src/resources/auth/space-role-users.ts +43 -6
  166. package/dist/src/resources/auth/space-roles.ts +27 -12
  167. package/dist/src/resources/auth/spaces.ts +42 -15
  168. package/dist/src/resources/dashboard/index.ts +1 -0
  169. package/dist/src/resources/dashboard/widget.ts +17 -0
  170. package/dist/src/resources/device/device-connector.ts +49 -0
  171. package/dist/src/resources/device/device-model.ts +65 -0
  172. package/dist/src/resources/device/device-spaces.ts +42 -0
  173. package/dist/src/resources/device/devices.ts +70 -0
  174. package/dist/src/resources/device/index.ts +7 -0
  175. package/dist/src/resources/device/manufacturers.ts +65 -0
  176. package/dist/src/resources/device/network-server.ts +64 -0
  177. package/dist/src/resources/device/trip.ts +69 -0
  178. package/dist/src/resources/index.ts +3 -0
  179. package/dist/src/resources/organizations/index.ts +1 -0
  180. package/dist/src/resources/organizations/organizations.ts +12 -0
  181. package/dist/src/resources/telemetry/alerts.ts +27 -0
  182. package/dist/src/resources/telemetry/entities.ts +51 -0
  183. package/dist/src/resources/telemetry/geofences.ts +92 -0
  184. package/dist/src/resources/telemetry/index.ts +12 -0
  185. package/dist/src/types/api.ts +5 -0
  186. package/dist/src/version.ts +1 -1
  187. package/dist/types/api.d.ts +4 -0
  188. package/dist/types/api.d.ts.map +1 -1
  189. package/dist/version.d.ts +1 -1
  190. package/dist/version.d.ts.map +1 -1
  191. package/dist/version.js +1 -1
  192. package/dist/version.js.map +1 -1
  193. package/dist/version.mjs +1 -1
  194. package/dist/version.mjs.map +1 -1
  195. package/package.json +1 -1
  196. package/src/core.ts +0 -6
  197. package/src/index.ts +22 -22
  198. package/src/resources/auth/auth.ts +42 -2
  199. package/src/resources/auth/index.ts +1 -0
  200. package/src/resources/auth/presigned-url.ts +13 -0
  201. package/src/resources/auth/space-policies.ts +22 -7
  202. package/src/resources/auth/space-role-users.ts +43 -6
  203. package/src/resources/auth/space-roles.ts +27 -12
  204. package/src/resources/auth/spaces.ts +42 -15
  205. package/src/resources/dashboard/index.ts +1 -0
  206. package/src/resources/dashboard/widget.ts +17 -0
  207. package/src/resources/device/device-connector.ts +49 -0
  208. package/src/resources/device/device-model.ts +65 -0
  209. package/src/resources/device/device-spaces.ts +42 -0
  210. package/src/resources/device/devices.ts +70 -0
  211. package/src/resources/device/index.ts +7 -0
  212. package/src/resources/device/manufacturers.ts +65 -0
  213. package/src/resources/device/network-server.ts +64 -0
  214. package/src/resources/device/trip.ts +69 -0
  215. package/src/resources/index.ts +3 -0
  216. package/src/resources/organizations/index.ts +1 -0
  217. package/src/resources/organizations/organizations.ts +12 -0
  218. package/src/resources/telemetry/alerts.ts +27 -0
  219. package/src/resources/telemetry/entities.ts +51 -0
  220. package/src/resources/telemetry/geofences.ts +92 -0
  221. package/src/resources/telemetry/index.ts +12 -0
  222. package/src/types/api.ts +5 -0
  223. 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,42 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+
5
+ interface DeviceSpacesListParams extends ListParamsResponse {
6
+ include_latest_checkpoint?: boolean;
7
+ }
8
+
9
+ export class DeviceSpaces extends APIResource {
10
+ create(params: DeviceSpacesParams, options?: Core.RequestOptions): Core.APIPromise<DeviceSpacesParams> {
11
+ const { ...body } = params;
12
+ return this._client.post(`/device-spaces`, {
13
+ body,
14
+ ...options,
15
+ headers: { ...options?.headers },
16
+ });
17
+ }
18
+
19
+ list(params: DeviceSpacesListParams, options?: Core.RequestOptions): Core.APIPromise<DeviceSpacesListResponse> {
20
+ const { ...query } = params;
21
+ return this._client.get(`/device-spaces`, {
22
+ query,
23
+ ...options,
24
+ headers: { ...options?.headers },
25
+ });
26
+ }
27
+
28
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
29
+ return this._client.delete(`/device-spaces/${id}`, {
30
+ ...options,
31
+ headers: { Accept: '*/*', ...options?.headers },
32
+ });
33
+ }
34
+ }
35
+
36
+ export interface DeviceSpacesParams {
37
+ name: string;
38
+ dev_eui: string;
39
+ description: string;
40
+ }
41
+
42
+ export type DeviceSpacesListResponse = ListResponse<DeviceSpacesParams>;
@@ -0,0 +1,70 @@
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
+ checkClaimCode(code: string, options?: Core.RequestOptions): Core.APIPromise<void> {
57
+ return this._client.get(`/devices/${code}/check`, {
58
+ ...options,
59
+ headers: { ...options?.headers },
60
+ });
61
+ }
62
+ }
63
+
64
+ export interface DeviceParams {
65
+ status?: string;
66
+ device_connector: string;
67
+ device_model: string;
68
+ }
69
+
70
+ export type DeviceListResponse = ListResponse<DeviceParams>;
@@ -0,0 +1,7 @@
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 './device-spaces';
7
+ 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,69 @@
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_checkpoints?: 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: TripListParams, 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(
27
+ params: TripListParams & {
28
+ space_device__device_id: string;
29
+ },
30
+ options?: Core.RequestOptions,
31
+ ): Core.APIPromise<TripListResponse> {
32
+ return this._client.get(`/trips/`, {
33
+ query: params,
34
+ ...options,
35
+ headers: { ...options?.headers },
36
+ });
37
+ }
38
+
39
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
40
+ return this._client.delete(`/trips/${id}/`, {
41
+ ...options,
42
+ headers: { ...options?.headers },
43
+ });
44
+ }
45
+
46
+ partialUpdate(id: string, params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams> {
47
+ return this._client.patch(`/trips/${id}/`, {
48
+ body: params,
49
+ ...options,
50
+ headers: { ...options?.headers },
51
+ });
52
+ }
53
+
54
+ update(id: string, params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams> {
55
+ return this._client.put(`/trips/${id}/`, {
56
+ body: params,
57
+ ...options,
58
+ headers: { ...options?.headers },
59
+ });
60
+ }
61
+ }
62
+
63
+ export interface TripParams {
64
+ space_device: string;
65
+ start_at: string;
66
+ ended_at: string;
67
+ }
68
+
69
+ export type TripListResponse = ListResponse<TripParams>;
@@ -4,3 +4,6 @@
4
4
  export * from './auth/index';
5
5
  export * from './dashboard/index';
6
6
  export * from './console/index';
7
+ export * from './device/index';
8
+ export * from './organizations/index';
9
+ export * from './telemetry/index';
@@ -0,0 +1 @@
1
+ export * from './organizations';
@@ -0,0 +1,12 @@
1
+ import * as Core from '../../core';
2
+ import { APIResource } from '../../resource';
3
+
4
+ export class Organizations extends APIResource {
5
+ checkSlugName(slugName: string, options?: Core.RequestOptions): Core.APIPromise<CheckSlugNameResponse> {
6
+ return this._client.get(`/organizations/check/${slugName}`, options);
7
+ }
8
+ }
9
+
10
+ export interface CheckSlugNameResponse {
11
+ result: string;
12
+ }
@@ -0,0 +1,27 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+
5
+ export interface Alert {
6
+ [key: string]: any;
7
+ }
8
+
9
+ export type AlertsListResponse = ListResponse<Alert>;
10
+
11
+ export interface AlertsListParams extends ListParamsResponse {
12
+ device_id?: string;
13
+ category?: string;
14
+ start_date?: string;
15
+ end_date?: string;
16
+ }
17
+
18
+ export class Alerts extends APIResource {
19
+ list(params: AlertsListParams, options?: Core.RequestOptions): Core.APIPromise<AlertsListResponse> {
20
+ const { ...query } = params;
21
+ return this._client.get(`/telemetry/v1/alerts`, {
22
+ query,
23
+ ...options,
24
+ headers: { ...options?.headers },
25
+ });
26
+ }
27
+ }
@@ -0,0 +1,51 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+
5
+ export class Entities extends APIResource {
6
+ list(params: EntitiesListParams, options?: Core.RequestOptions): Core.APIPromise<EntitiesListResponse> {
7
+ const { ...query } = params;
8
+ return this._client.get(`/telemetry/v1/entities`, {
9
+ query,
10
+ ...options,
11
+ headers: { ...options?.headers },
12
+ });
13
+ }
14
+ }
15
+
16
+ export interface Entity {
17
+ category: string;
18
+ created_at: string;
19
+ device_id: string;
20
+ device_name: string;
21
+ display_type: string[];
22
+ entity_type: {
23
+ id: string;
24
+ image_url: string;
25
+ name: string;
26
+ unique_key: string;
27
+ };
28
+ id: string;
29
+ image_url: string;
30
+ is_enabled: boolean;
31
+ name: string;
32
+ time_end: string;
33
+ time_start: string;
34
+ unique_key: string;
35
+ unit_of_measurement: string;
36
+ updated_at: string;
37
+ }
38
+
39
+ export type EntitiesListResponse = ListResponse<Entity>;
40
+
41
+ export interface EntitiesListParams extends ListParamsResponse {
42
+ /**
43
+ * Query param: Display type filter (e.g., "chart").
44
+ */
45
+ display_type?: string;
46
+
47
+ /**
48
+ * Query param: A search term.
49
+ */
50
+ search?: string;
51
+ }
@@ -0,0 +1,92 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+
5
+ type Condition =
6
+ | { time_between: { start: string; end: string } }
7
+ | { weekday_in: number[] }
8
+ | { distance_from_geofence_km: { lte: number } }
9
+ | { and: Condition[] }
10
+ | { or: Condition[] }
11
+ | { not: Condition[] };
12
+
13
+ type Coordinate = [number, number];
14
+
15
+ type PolygonGeometry = {
16
+ type: 'Polygon';
17
+ coordinates: Coordinate[][];
18
+ properties: {
19
+ mode: 'rectangle' | 'angled-rectangle' | string;
20
+ };
21
+ };
22
+
23
+ export interface Geofence {
24
+ id: string;
25
+ name: string;
26
+ color: string;
27
+ type_zone: 'safe' | 'danger';
28
+ definition: {
29
+ conditions: {
30
+ and: Condition[];
31
+ };
32
+ };
33
+ features: PolygonGeometry[];
34
+ }
35
+
36
+ export type GeofencesListResponse = ListResponse<Geofence>;
37
+
38
+ export interface GeofencesListParams extends ListParamsResponse {
39
+ name?: string;
40
+ bbox?: string;
41
+ }
42
+ export class Geofences extends APIResource {
43
+ list(params: GeofencesListParams, options?: Core.RequestOptions): Core.APIPromise<GeofencesListResponse> {
44
+ const { ...query } = params;
45
+ return this._client.get(`/telemetry/v1/geofences`, {
46
+ query,
47
+ ...options,
48
+ headers: { ...options?.headers },
49
+ });
50
+ }
51
+
52
+ create(params: Omit<Geofence, 'id'>, options?: Core.RequestOptions): Core.APIPromise<Geofence> {
53
+ const { ...body } = params;
54
+ return this._client.post(`/telemetry/v1/geofences`, {
55
+ body,
56
+ ...options,
57
+ headers: { ...options?.headers },
58
+ });
59
+ }
60
+
61
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Geofence> {
62
+ return this._client.get(`/telemetry/v1/geofences/${id}`, {
63
+ ...options,
64
+ headers: { ...options?.headers },
65
+ });
66
+ }
67
+
68
+ update(id: string, params: Omit<Geofence, 'id'>, options?: Core.RequestOptions): Core.APIPromise<Geofence> {
69
+ const { ...body } = params;
70
+ return this._client.put(`/telemetry/v1/geofences/${id}`, {
71
+ body,
72
+ ...options,
73
+ headers: { ...options?.headers },
74
+ });
75
+ }
76
+
77
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
78
+ return this._client.delete(`/telemetry/v1/geofences/${id}`, {
79
+ ...options,
80
+ headers: { ...options?.headers },
81
+ });
82
+ }
83
+
84
+ test(params: Omit<Geofence, 'id' | 'name' | 'color'>, options?: Core.RequestOptions): Core.APIPromise<void> {
85
+ const { ...body } = params;
86
+ return this._client.post(`/telemetry/v1/geofences/test`, {
87
+ body,
88
+ ...options,
89
+ headers: { ...options?.headers },
90
+ });
91
+ }
92
+ }
@@ -0,0 +1,12 @@
1
+ import { APIResource } from "../../resource";
2
+ import { Entities } from './entities';
3
+ import { Alerts } from './alerts';
4
+ import { Geofences } from './geofences';
5
+
6
+ export class Telemetry extends APIResource {
7
+ entities: Entities = new Entities(this._client);
8
+ alerts: Alerts = new Alerts(this._client);
9
+ geofences: Geofences = new Geofences(this._client);
10
+ }
11
+
12
+ export * from './entities';
@@ -28,4 +28,9 @@ export interface ListParamsResponse {
28
28
  * A search term.
29
29
  */
30
30
  search?: string;
31
+
32
+ /**
33
+ * A bounding box.
34
+ */
35
+ bbox?: string;
31
36
  }
@@ -1 +1 @@
1
- export const VERSION = '0.0.1-dev.4';
1
+ export const VERSION = '0.0.1-dev.41';
@@ -21,5 +21,9 @@ export interface ListParamsResponse {
21
21
  * A search term.
22
22
  */
23
23
  search?: string;
24
+ /**
25
+ * A bounding box.
26
+ */
27
+ bbox?: string;
24
28
  }
25
29
  //# sourceMappingURL=api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/types/api.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY,CAAC,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IAEd,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAElB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/types/api.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY,CAAC,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IAEd,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAElB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB"}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.0.1-dev.4";
1
+ export declare const VERSION = "0.0.1-dev.41";
2
2
  //# sourceMappingURL=version.d.ts.map