@space-df/sdk 0.0.1-dev.13 → 0.0.1-dev.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.doc.md +1066 -219
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -0
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/dist/resources/auth/auth.d.ts +0 -1
- package/dist/resources/auth/auth.d.ts.map +1 -1
- 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 +11 -7
- package/dist/resources/auth/space-role-users.d.ts.map +1 -1
- package/dist/resources/auth/space-role-users.js +15 -12
- package/dist/resources/auth/space-role-users.js.map +1 -1
- package/dist/resources/auth/space-role-users.mjs +15 -12
- 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 +11 -3
- package/dist/resources/auth/spaces.d.ts.map +1 -1
- package/dist/resources/auth/spaces.js +14 -8
- package/dist/resources/auth/spaces.js.map +1 -1
- package/dist/resources/auth/spaces.mjs +14 -8
- package/dist/resources/auth/spaces.mjs.map +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 +6 -0
- package/dist/resources/device/index.d.ts.map +1 -0
- package/dist/resources/device/index.js +22 -0
- package/dist/resources/device/index.js.map +1 -0
- package/dist/resources/device/index.mjs +6 -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/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 +5 -0
- package/dist/src/resources/auth/auth.ts +0 -2
- package/dist/src/resources/auth/presigned-url.ts +1 -1
- package/dist/src/resources/auth/space-policies.ts +22 -7
- package/dist/src/resources/auth/space-role-users.ts +24 -16
- package/dist/src/resources/auth/space-roles.ts +27 -12
- package/dist/src/resources/auth/spaces.ts +26 -11
- 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 +5 -0
- package/dist/src/resources/device/manufacturers.ts +65 -0
- package/dist/src/resources/device/network-server.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 +5 -0
- package/src/resources/auth/auth.ts +0 -2
- package/src/resources/auth/presigned-url.ts +1 -1
- package/src/resources/auth/space-policies.ts +22 -7
- package/src/resources/auth/space-role-users.ts +24 -16
- package/src/resources/auth/space-roles.ts +27 -12
- package/src/resources/auth/spaces.ts +26 -11
- 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 +5 -0
- package/src/resources/device/manufacturers.ts +65 -0
- package/src/resources/device/network-server.ts +64 -0
- package/src/resources/index.ts +1 -0
- package/src/version.ts +1 -1
|
@@ -4,52 +4,54 @@ import * as Core from '../../core';
|
|
|
4
4
|
|
|
5
5
|
export class SpaceRoles extends APIResource {
|
|
6
6
|
create(params: SpaceRoleCreateParams, options?: Core.RequestOptions): Core.APIPromise<SpaceRole> {
|
|
7
|
-
const { ...body } = params;
|
|
7
|
+
const { 'X-Space': xspace, ...body } = params;
|
|
8
8
|
return this._client.post(`/space-roles`, {
|
|
9
9
|
body,
|
|
10
10
|
...options,
|
|
11
|
-
headers: { ...options?.headers },
|
|
11
|
+
headers: { ...options?.headers, 'X-Space': xspace },
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
retrieve(id: number, options?: Core.RequestOptions): Core.APIPromise<SpaceRole> {
|
|
15
|
+
retrieve(id: number, params: SpaceRoleParams, options?: Core.RequestOptions): Core.APIPromise<SpaceRole> {
|
|
16
|
+
const { 'X-Space': xspace } = params;
|
|
16
17
|
return this._client.get(`/space-roles/${id}`, {
|
|
17
18
|
...options,
|
|
18
|
-
headers: { ...options?.headers },
|
|
19
|
+
headers: { ...options?.headers, 'X-Space': xspace },
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
update(id: number, params: SpaceRoleUpdateParams, options?: Core.RequestOptions): Core.APIPromise<SpaceRole> {
|
|
23
|
-
const { ...body } = params;
|
|
24
|
+
const { 'X-Space': xspace, ...body } = params;
|
|
24
25
|
return this._client.put(`/space-roles/${id}`, {
|
|
25
26
|
body,
|
|
26
27
|
...options,
|
|
27
|
-
headers: { ...options?.headers },
|
|
28
|
+
headers: { ...options?.headers, 'X-Space': xspace },
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
partialUpdate(id: number, params: SpaceRoleUpdateParams, options?: Core.RequestOptions): Core.APIPromise<SpaceRole> {
|
|
32
|
-
const { ...body } = params;
|
|
33
|
+
const { 'X-Space': xspace, ...body } = params;
|
|
33
34
|
return this._client.patch(`/space-roles/${id}`, {
|
|
34
35
|
body,
|
|
35
36
|
...options,
|
|
36
|
-
headers: { ...options?.headers },
|
|
37
|
+
headers: { ...options?.headers, 'X-Space': xspace },
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
list(params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise<SpaceRoleListResponse> {
|
|
41
|
+
list(spaceName: string, params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise<SpaceRoleListResponse> {
|
|
41
42
|
const { ...query } = params;
|
|
42
43
|
return this._client.get(`/space-roles`, {
|
|
43
44
|
query,
|
|
44
45
|
...options,
|
|
45
|
-
headers: { ...options?.headers },
|
|
46
|
+
headers: { ...options?.headers, 'X-Space': spaceName },
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
delete(id: number, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
50
|
+
delete(id: number, params: SpaceRoleParams, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
51
|
+
const { 'X-Space': xspace } = params;
|
|
50
52
|
return this._client.delete(`/space-roles/${id}`, {
|
|
51
53
|
...options,
|
|
52
|
-
headers: { Accept: '*/*', ...options?.headers },
|
|
54
|
+
headers: { Accept: '*/*', ...options?.headers, 'X-Space': xspace },
|
|
53
55
|
});
|
|
54
56
|
}
|
|
55
57
|
}
|
|
@@ -80,6 +82,11 @@ export interface SpaceRoleCreateParams {
|
|
|
80
82
|
* Body param:
|
|
81
83
|
*/
|
|
82
84
|
policies: Array<number>;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Header param:
|
|
88
|
+
*/
|
|
89
|
+
'X-Space': string;
|
|
83
90
|
}
|
|
84
91
|
|
|
85
92
|
export interface SpaceRoleUpdateParams {
|
|
@@ -92,4 +99,12 @@ export interface SpaceRoleUpdateParams {
|
|
|
92
99
|
* Body param:
|
|
93
100
|
*/
|
|
94
101
|
policies: Array<number>;
|
|
102
|
+
/**
|
|
103
|
+
* Header param:
|
|
104
|
+
*/
|
|
105
|
+
'X-Space': string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface SpaceRoleParams {
|
|
109
|
+
'X-Space': string;
|
|
95
110
|
}
|
|
@@ -9,20 +9,20 @@ export class Spaces extends APIResource {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
update(params: SpaceUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Space> {
|
|
12
|
-
const { ...body } = params;
|
|
12
|
+
const { 'X-Space': xspace, ...body } = params;
|
|
13
13
|
return this._client.put(`/spaces`, {
|
|
14
14
|
body,
|
|
15
15
|
...options,
|
|
16
|
-
headers: { ...options?.headers },
|
|
16
|
+
headers: { ...options?.headers, 'X-Space': xspace },
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
partialUpdate(params: SpaceUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Space> {
|
|
21
|
-
const { ...body } = params;
|
|
21
|
+
const { 'X-Space': xspace, ...body } = params;
|
|
22
22
|
return this._client.patch(`/spaces`, {
|
|
23
23
|
body,
|
|
24
24
|
...options,
|
|
25
|
-
headers: { ...options?.headers },
|
|
25
|
+
headers: { ...options?.headers, 'X-Space': xspace },
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -39,16 +39,21 @@ export class Spaces extends APIResource {
|
|
|
39
39
|
headers: { ...options?.headers },
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
delete(params: SpaceParams, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
43
|
+
const { 'X-Space': xspace } = params;
|
|
44
44
|
return this._client.delete(`/spaces`, {
|
|
45
45
|
...options,
|
|
46
|
-
headers: { Accept: '*/*', ...options?.headers },
|
|
46
|
+
headers: { Accept: '*/*', ...options?.headers, 'X-Space': xspace },
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
invitation(
|
|
51
|
-
|
|
50
|
+
invitation(params: OAuthInvitationParams, options?: Core.RequestOptions): Core.APIPromise<OAuthInvitationParams> {
|
|
51
|
+
const { 'X-Space': xspace, ...body } = params;
|
|
52
|
+
return this._client.post(`/spaces/invitation`, {
|
|
53
|
+
body,
|
|
54
|
+
...options,
|
|
55
|
+
headers: { ...options?.headers, 'X-Space': xspace },
|
|
56
|
+
});
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
joinSpace(token: string, options?: Core.RequestOptions): Core.APIPromise<JoinSpaceResponse> {
|
|
@@ -101,6 +106,15 @@ export interface SpaceUpdateParams {
|
|
|
101
106
|
* Body param:
|
|
102
107
|
*/
|
|
103
108
|
slug_name: string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Header param:
|
|
112
|
+
*/
|
|
113
|
+
'X-Space': string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface SpaceParams {
|
|
117
|
+
'X-Space': string;
|
|
104
118
|
}
|
|
105
119
|
|
|
106
120
|
export interface SpaceUpdateParams {
|
|
@@ -125,8 +139,9 @@ export interface SpaceUpdateParams {
|
|
|
125
139
|
is_active?: boolean;
|
|
126
140
|
}
|
|
127
141
|
|
|
128
|
-
export interface
|
|
142
|
+
export interface OAuthInvitationParams {
|
|
129
143
|
receiver_list: Receiver[];
|
|
144
|
+
'X-Space': string;
|
|
130
145
|
}
|
|
131
146
|
|
|
132
147
|
export interface Receiver {
|
|
@@ -137,4 +152,4 @@ export interface Receiver {
|
|
|
137
152
|
export interface JoinSpaceResponse {
|
|
138
153
|
error?: string;
|
|
139
154
|
result?: string;
|
|
140
|
-
}
|
|
155
|
+
}
|
|
@@ -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>;
|
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.15';
|