@space-df/sdk 0.0.1-dev.4 → 0.0.1-dev.40
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/README.md +4 -7
- package/api.doc.md +2056 -20
- package/dist/README.md +4 -7
- package/dist/core.d.ts +1 -4
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +1 -3
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +1 -3
- package/dist/core.mjs.map +1 -1
- package/dist/index.d.mts +18 -6
- package/dist/index.d.ts +18 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -16
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/dist/resources/auth/auth.d.ts +20 -1
- package/dist/resources/auth/auth.d.ts.map +1 -1
- package/dist/resources/auth/auth.js +15 -0
- package/dist/resources/auth/auth.js.map +1 -1
- package/dist/resources/auth/auth.mjs +15 -0
- package/dist/resources/auth/auth.mjs.map +1 -1
- package/dist/resources/auth/index.d.ts +1 -0
- package/dist/resources/auth/index.d.ts.map +1 -1
- package/dist/resources/auth/index.js +1 -0
- package/dist/resources/auth/index.js.map +1 -1
- package/dist/resources/auth/index.mjs +1 -0
- package/dist/resources/auth/presigned-url.d.ts +10 -0
- package/dist/resources/auth/presigned-url.d.ts.map +1 -0
- package/dist/resources/auth/presigned-url.js +11 -0
- package/dist/resources/auth/presigned-url.js.map +1 -0
- package/dist/resources/auth/presigned-url.mjs +7 -0
- package/dist/resources/auth/presigned-url.mjs.map +1 -0
- package/dist/resources/auth/space-policies.d.ts +6 -3
- package/dist/resources/auth/space-policies.d.ts.map +1 -1
- package/dist/resources/auth/space-policies.js +16 -5
- package/dist/resources/auth/space-policies.js.map +1 -1
- package/dist/resources/auth/space-policies.mjs +16 -5
- package/dist/resources/auth/space-policies.mjs.map +1 -1
- package/dist/resources/auth/space-role-users.d.ts +13 -3
- package/dist/resources/auth/space-role-users.d.ts.map +1 -1
- package/dist/resources/auth/space-role-users.js +31 -6
- package/dist/resources/auth/space-role-users.js.map +1 -1
- package/dist/resources/auth/space-role-users.mjs +31 -6
- package/dist/resources/auth/space-role-users.mjs.map +1 -1
- package/dist/resources/auth/space-roles.d.ts +14 -3
- package/dist/resources/auth/space-roles.d.ts.map +1 -1
- package/dist/resources/auth/space-roles.js +14 -12
- package/dist/resources/auth/space-roles.js.map +1 -1
- package/dist/resources/auth/space-roles.mjs +14 -12
- package/dist/resources/auth/space-roles.mjs.map +1 -1
- package/dist/resources/auth/spaces.d.ts +21 -8
- package/dist/resources/auth/spaces.d.ts.map +1 -1
- package/dist/resources/auth/spaces.js +18 -6
- package/dist/resources/auth/spaces.js.map +1 -1
- package/dist/resources/auth/spaces.mjs +18 -6
- package/dist/resources/auth/spaces.mjs.map +1 -1
- package/dist/resources/dashboard/index.d.ts +1 -0
- package/dist/resources/dashboard/index.d.ts.map +1 -1
- package/dist/resources/dashboard/index.js +1 -0
- package/dist/resources/dashboard/index.js.map +1 -1
- package/dist/resources/dashboard/index.mjs +1 -0
- package/dist/resources/dashboard/widget.d.ts +11 -0
- package/dist/resources/dashboard/widget.d.ts.map +1 -0
- package/dist/resources/dashboard/widget.js +15 -0
- package/dist/resources/dashboard/widget.js.map +1 -0
- package/dist/resources/dashboard/widget.mjs +11 -0
- package/dist/resources/dashboard/widget.mjs.map +1 -0
- package/dist/resources/device/device-connector.d.ts +25 -0
- package/dist/resources/device/device-connector.d.ts.map +1 -0
- package/dist/resources/device/device-connector.js +30 -0
- package/dist/resources/device/device-connector.js.map +1 -0
- package/dist/resources/device/device-connector.mjs +26 -0
- package/dist/resources/device/device-connector.mjs.map +1 -0
- package/dist/resources/device/device-model.d.ts +20 -0
- package/dist/resources/device/device-model.d.ts.map +1 -0
- package/dist/resources/device/device-model.js +52 -0
- package/dist/resources/device/device-model.js.map +1 -0
- package/dist/resources/device/device-model.mjs +48 -0
- package/dist/resources/device/device-model.mjs.map +1 -0
- package/dist/resources/device/device-spaces.d.ts +19 -0
- package/dist/resources/device/device-spaces.d.ts.map +1 -0
- package/dist/resources/device/device-spaces.js +30 -0
- package/dist/resources/device/device-spaces.js.map +1 -0
- package/dist/resources/device/device-spaces.mjs +26 -0
- package/dist/resources/device/device-spaces.mjs.map +1 -0
- package/dist/resources/device/devices.d.ts +19 -0
- package/dist/resources/device/devices.d.ts.map +1 -0
- package/dist/resources/device/devices.js +58 -0
- package/dist/resources/device/devices.js.map +1 -0
- package/dist/resources/device/devices.mjs +54 -0
- package/dist/resources/device/devices.mjs.map +1 -0
- package/dist/resources/device/index.d.ts +8 -0
- package/dist/resources/device/index.d.ts.map +1 -0
- package/dist/resources/device/index.js +24 -0
- package/dist/resources/device/index.js.map +1 -0
- package/dist/resources/device/index.mjs +8 -0
- package/dist/resources/device/index.mjs.map +1 -0
- package/dist/resources/device/manufacturers.d.ts +20 -0
- package/dist/resources/device/manufacturers.d.ts.map +1 -0
- package/dist/resources/device/manufacturers.js +52 -0
- package/dist/resources/device/manufacturers.js.map +1 -0
- package/dist/resources/device/manufacturers.mjs +48 -0
- package/dist/resources/device/manufacturers.mjs.map +1 -0
- package/dist/resources/device/network-server.d.ts +19 -0
- package/dist/resources/device/network-server.d.ts.map +1 -0
- package/dist/resources/device/network-server.js +52 -0
- package/dist/resources/device/network-server.js.map +1 -0
- package/dist/resources/device/network-server.mjs +48 -0
- package/dist/resources/device/network-server.mjs.map +1 -0
- package/dist/resources/device/trip.d.ts +24 -0
- package/dist/resources/device/trip.d.ts.map +1 -0
- package/dist/resources/device/trip.js +49 -0
- package/dist/resources/device/trip.js.map +1 -0
- package/dist/resources/device/trip.mjs +45 -0
- package/dist/resources/device/trip.mjs.map +1 -0
- package/dist/resources/index.d.ts +3 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +3 -0
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/index.mjs +3 -0
- package/dist/resources/organizations/index.d.ts +2 -0
- package/dist/resources/organizations/index.d.ts.map +1 -0
- package/dist/resources/organizations/index.js +18 -0
- package/dist/resources/organizations/index.js.map +1 -0
- package/dist/resources/organizations/index.mjs +2 -0
- package/dist/resources/organizations/index.mjs.map +1 -0
- package/dist/resources/organizations/organizations.d.ts +9 -0
- package/dist/resources/organizations/organizations.d.ts.map +1 -0
- package/dist/resources/organizations/organizations.js +11 -0
- package/dist/resources/organizations/organizations.js.map +1 -0
- package/dist/resources/organizations/organizations.mjs +7 -0
- package/dist/resources/organizations/organizations.mjs.map +1 -0
- package/dist/resources/telemetry/alerts.d.ts +17 -0
- package/dist/resources/telemetry/alerts.d.ts.map +1 -0
- package/dist/resources/telemetry/alerts.js +16 -0
- package/dist/resources/telemetry/alerts.js.map +1 -0
- package/dist/resources/telemetry/alerts.mjs +12 -0
- package/dist/resources/telemetry/alerts.mjs.map +1 -0
- package/dist/resources/telemetry/entities.d.ts +40 -0
- package/dist/resources/telemetry/entities.d.ts.map +1 -0
- package/dist/resources/telemetry/entities.js +16 -0
- package/dist/resources/telemetry/entities.js.map +1 -0
- package/dist/resources/telemetry/entities.mjs +12 -0
- package/dist/resources/telemetry/entities.mjs.map +1 -0
- package/dist/resources/telemetry/geofences.d.ts +56 -0
- package/dist/resources/telemetry/geofences.d.ts.map +1 -0
- package/dist/resources/telemetry/geofences.js +52 -0
- package/dist/resources/telemetry/geofences.js.map +1 -0
- package/dist/resources/telemetry/geofences.mjs +48 -0
- package/dist/resources/telemetry/geofences.mjs.map +1 -0
- package/dist/resources/telemetry/index.d.ts +11 -0
- package/dist/resources/telemetry/index.d.ts.map +1 -0
- package/dist/resources/telemetry/index.js +32 -0
- package/dist/resources/telemetry/index.js.map +1 -0
- package/dist/resources/telemetry/index.mjs +14 -0
- package/dist/resources/telemetry/index.mjs.map +1 -0
- package/dist/src/core.ts +0 -6
- package/dist/src/index.ts +22 -22
- package/dist/src/resources/auth/auth.ts +42 -2
- package/dist/src/resources/auth/index.ts +1 -0
- package/dist/src/resources/auth/presigned-url.ts +13 -0
- package/dist/src/resources/auth/space-policies.ts +22 -7
- package/dist/src/resources/auth/space-role-users.ts +43 -6
- package/dist/src/resources/auth/space-roles.ts +27 -12
- package/dist/src/resources/auth/spaces.ts +42 -15
- package/dist/src/resources/dashboard/index.ts +1 -0
- package/dist/src/resources/dashboard/widget.ts +17 -0
- package/dist/src/resources/device/device-connector.ts +49 -0
- package/dist/src/resources/device/device-model.ts +65 -0
- package/dist/src/resources/device/device-spaces.ts +42 -0
- package/dist/src/resources/device/devices.ts +70 -0
- package/dist/src/resources/device/index.ts +7 -0
- package/dist/src/resources/device/manufacturers.ts +65 -0
- package/dist/src/resources/device/network-server.ts +64 -0
- package/dist/src/resources/device/trip.ts +69 -0
- package/dist/src/resources/index.ts +3 -0
- package/dist/src/resources/organizations/index.ts +1 -0
- package/dist/src/resources/organizations/organizations.ts +12 -0
- package/dist/src/resources/telemetry/alerts.ts +27 -0
- package/dist/src/resources/telemetry/entities.ts +51 -0
- package/dist/src/resources/telemetry/geofences.ts +91 -0
- package/dist/src/resources/telemetry/index.ts +12 -0
- package/dist/src/version.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/package.json +1 -1
- package/src/core.ts +0 -6
- package/src/index.ts +22 -22
- package/src/resources/auth/auth.ts +42 -2
- package/src/resources/auth/index.ts +1 -0
- package/src/resources/auth/presigned-url.ts +13 -0
- package/src/resources/auth/space-policies.ts +22 -7
- package/src/resources/auth/space-role-users.ts +43 -6
- package/src/resources/auth/space-roles.ts +27 -12
- package/src/resources/auth/spaces.ts +42 -15
- package/src/resources/dashboard/index.ts +1 -0
- package/src/resources/dashboard/widget.ts +17 -0
- package/src/resources/device/device-connector.ts +49 -0
- package/src/resources/device/device-model.ts +65 -0
- package/src/resources/device/device-spaces.ts +42 -0
- package/src/resources/device/devices.ts +70 -0
- package/src/resources/device/index.ts +7 -0
- package/src/resources/device/manufacturers.ts +65 -0
- package/src/resources/device/network-server.ts +64 -0
- package/src/resources/device/trip.ts +69 -0
- package/src/resources/index.ts +3 -0
- package/src/resources/organizations/index.ts +1 -0
- package/src/resources/organizations/organizations.ts +12 -0
- package/src/resources/telemetry/alerts.ts +27 -0
- package/src/resources/telemetry/entities.ts +51 -0
- package/src/resources/telemetry/geofences.ts +91 -0
- package/src/resources/telemetry/index.ts +12 -0
- 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,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>;
|
|
@@ -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,91 @@
|
|
|
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
|
+
create(params: Omit<Geofence, 'id'>, options?: Core.RequestOptions): Core.APIPromise<Geofence> {
|
|
52
|
+
const { ...body } = params;
|
|
53
|
+
return this._client.post(`/telemetry/v1/geofences`, {
|
|
54
|
+
body,
|
|
55
|
+
...options,
|
|
56
|
+
headers: { ...options?.headers },
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Geofence> {
|
|
61
|
+
return this._client.get(`/telemetry/v1/geofences/${id}`, {
|
|
62
|
+
...options,
|
|
63
|
+
headers: { ...options?.headers },
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
update(id: string, params: Omit<Geofence, 'id'>, options?: Core.RequestOptions): Core.APIPromise<Geofence> {
|
|
68
|
+
const { ...body } = params;
|
|
69
|
+
return this._client.put(`/telemetry/v1/geofences/${id}`, {
|
|
70
|
+
body,
|
|
71
|
+
...options,
|
|
72
|
+
headers: { ...options?.headers },
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
77
|
+
return this._client.delete(`/telemetry/v1/geofences/${id}`, {
|
|
78
|
+
...options,
|
|
79
|
+
headers: { ...options?.headers },
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
test(params: Omit<Geofence, 'id' | 'name' | 'color'>, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
84
|
+
const { ...body } = params;
|
|
85
|
+
return this._client.post(`/telemetry/v1/geofences/test`, {
|
|
86
|
+
body,
|
|
87
|
+
...options,
|
|
88
|
+
headers: { ...options?.headers },
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -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';
|
package/dist/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.0.1-dev.
|
|
1
|
+
export const VERSION = '0.0.1-dev.40';
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.1-dev.
|
|
1
|
+
export declare const VERSION = "0.0.1-dev.40";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"}
|
package/dist/version.js
CHANGED
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,cAAc,CAAC"}
|
package/dist/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.0.1-dev.
|
|
1
|
+
export const VERSION = '0.0.1-dev.40';
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|