@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.
- package/api.doc.md +1250 -198
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- 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/devices.d.ts +18 -0
- package/dist/resources/device/devices.d.ts.map +1 -0
- package/dist/resources/device/devices.js +52 -0
- package/dist/resources/device/devices.js.map +1 -0
- package/dist/resources/device/devices.mjs +48 -0
- package/dist/resources/device/devices.mjs.map +1 -0
- package/dist/resources/device/index.d.ts +7 -0
- package/dist/resources/device/index.d.ts.map +1 -0
- package/dist/resources/device/index.js +23 -0
- package/dist/resources/device/index.js.map +1 -0
- package/dist/resources/device/index.mjs +7 -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 +1 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +1 -0
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/index.mjs +1 -0
- package/dist/src/index.ts +6 -0
- package/dist/src/resources/auth/presigned-url.ts +1 -1
- 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/devices.ts +63 -0
- package/dist/src/resources/device/index.ts +6 -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 +64 -0
- package/dist/src/resources/index.ts +1 -0
- package/dist/src/version.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +1 -1
- package/src/index.ts +6 -0
- package/src/resources/auth/presigned-url.ts +1 -1
- package/src/resources/device/device-connector.ts +49 -0
- package/src/resources/device/device-model.ts +65 -0
- package/src/resources/device/devices.ts +63 -0
- package/src/resources/device/index.ts +6 -0
- package/src/resources/device/manufacturers.ts +65 -0
- package/src/resources/device/network-server.ts +64 -0
- package/src/resources/device/trip.ts +64 -0
- package/src/resources/index.ts +1 -0
- 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>;
|
package/dist/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.0.1-dev.
|
|
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.
|
|
1
|
+
export declare const VERSION = "0.0.1-dev.16";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
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.16';
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/package.json
CHANGED
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;
|
|
@@ -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,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>;
|
package/src/resources/index.ts
CHANGED
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.0.1-dev.
|
|
1
|
+
export const VERSION = '0.0.1-dev.16';
|