@robotbas/robotcloud-client 0.1.15 → 0.2.1
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/dist/helpers/index.d.mts +1 -1
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/index.js +9 -4
- package/dist/helpers/index.js.map +1 -1
- package/dist/helpers/index.mjs +9 -4
- package/dist/helpers/index.mjs.map +1 -1
- package/dist/index-t7vP2gEL.d.mts +330 -0
- package/dist/index-t7vP2gEL.d.ts +330 -0
- package/dist/index.d.mts +71 -186
- package/dist/index.d.ts +71 -186
- package/dist/index.js +88 -68
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +87 -67
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ProjectClassifer.d.ts +0 -6
- package/types/RobotCloudClient.d.ts +5 -39
- package/types/ServiceInstance.d.ts +1 -10
- package/types/request-params.d.ts +87 -0
- package/types/services.d.ts +11 -65
- package/dist/index-NoveF7Iq.d.mts +0 -182
- package/dist/index-NoveF7Iq.d.ts +0 -182
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { AxiosResponse } from 'axios';
|
|
2
|
-
|
|
3
|
-
type TemperatureUnit = "CELSIUS" | "FAHRENHEIT"
|
|
4
|
-
type RegimState = "COLD"|"HEAT"|"AUTO"
|
|
5
|
-
|
|
6
|
-
type OrganizationAccessLevel = "STAFF" | "STANDARD" | "ADMIN" | "SUPERUSER" | "MASTER"
|
|
7
|
-
type ProjectAccessLevel = "BLOCKED" | "RESTRICTED" | "BASIC" | "ADVANCED"
|
|
8
|
-
type AppAccessLevel = "BLOCKED" | "STANDARD" | "ADVANCED" | "ADMIN"
|
|
9
|
-
|
|
10
|
-
type RobotCloudServiceType = "RoomClime_1"|"RoomGuestStatus_1"|"AirQuality_1"
|
|
11
|
-
|
|
12
|
-
// Desired fancoil speed (0 = Auto, 1..3 = Manual Speed)
|
|
13
|
-
type FancoilSpeedState = 0|1|2|3;
|
|
14
|
-
|
|
15
|
-
interface ProjectRequestParams {
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface ProjectDetailsRequestParams {
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
interface SubsystemRequestParams {
|
|
23
|
-
subsystem_id?: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
interface PaginableRequestParams {
|
|
27
|
-
startIndex?: number;
|
|
28
|
-
maxSize?: number;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
interface SubsystemTagsRequestParams extends SubsystemRequestParams {
|
|
32
|
-
tag_id?: string | string[];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface ProjectLocationsRequestParams extends SubsystemTagsRequestParams, PaginableRequestParams {
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
interface ServiceInstanceDataRequestParams {
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
interface ProjectTagRequestParams extends PaginableRequestParams {
|
|
45
|
-
parent_tag?: string;
|
|
46
|
-
no_parent?: boolean;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
interface LocationServiceInstancesRequestParams extends SubsystemRequestParams, PaginableRequestParams {
|
|
51
|
-
tag_id?: string[];
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/** RESPONSE **/
|
|
56
|
-
|
|
57
|
-
interface RobotCloudNamedItem {
|
|
58
|
-
id: string;
|
|
59
|
-
name: string;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
interface RobotCloudProject {
|
|
63
|
-
id: string;
|
|
64
|
-
name: string;
|
|
65
|
-
organization: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/** USERS */
|
|
69
|
-
interface RobotCloudUserAppAccess {
|
|
70
|
-
app_id: string;
|
|
71
|
-
app_name: string;
|
|
72
|
-
access_level: AppAccessLevel;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
interface RobotCloudUserDetails {
|
|
76
|
-
username: string;
|
|
77
|
-
name: string;
|
|
78
|
-
last_name: string;
|
|
79
|
-
email: string;
|
|
80
|
-
org_id: string;
|
|
81
|
-
org_access: OrganizationAccessLevel;
|
|
82
|
-
default_project_access: ProjectAccessLevel;
|
|
83
|
-
default_app_access: RobotCloudUserAppAccess[];
|
|
84
|
-
access_all_projects: boolean;
|
|
85
|
-
blocked: boolean;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
interface RobotCloudUserProject {
|
|
89
|
-
project_id: string;
|
|
90
|
-
project_name: string;
|
|
91
|
-
access_level: ProjectAccessLevel;
|
|
92
|
-
app_access_level: {app_id: string, app_name: string, access_level: AppAccessLevel}[]
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
interface RobotCloudOrganizationDetails extends RobotCloudNamedItem {
|
|
96
|
-
description?: string;
|
|
97
|
-
address?: string;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
interface RobotCloudProjectDetails extends RobotCloudProject {
|
|
101
|
-
version: number;
|
|
102
|
-
description?: string;
|
|
103
|
-
country?: string;
|
|
104
|
-
timezone?: string;
|
|
105
|
-
image_url?: string;
|
|
106
|
-
longitude?: number;
|
|
107
|
-
latitude?: number;
|
|
108
|
-
application_enabled?: boolean;
|
|
109
|
-
access_level?: ProjectAccessLevel;
|
|
110
|
-
app_access_level?: AppAccessLevel;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
interface RobotCloudDeviceDetails extends RobotCloudNamedItem {
|
|
114
|
-
description?: string;
|
|
115
|
-
location: string;
|
|
116
|
-
address: {
|
|
117
|
-
domain: number;
|
|
118
|
-
zone: number;
|
|
119
|
-
id: number;
|
|
120
|
-
};
|
|
121
|
-
type: number;
|
|
122
|
-
configuration_type: string;
|
|
123
|
-
tags: string;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
interface RobotCloudServiceTypeDetails {
|
|
127
|
-
description: string;
|
|
128
|
-
name: RobotCloudServiceType
|
|
129
|
-
}
|
|
130
|
-
/** SERVICE EVENTS VALUES **/
|
|
131
|
-
interface RoomClime1AlertEventValue {
|
|
132
|
-
high_temperature: boolean;
|
|
133
|
-
low_temperature: boolean;
|
|
134
|
-
high_humidity: boolean;
|
|
135
|
-
fancoil_on_overtime: boolean;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
interface RoomConsumes1AlertEventValue {
|
|
139
|
-
high_daily_energy_electric: boolean;
|
|
140
|
-
high_daily_energy_thermal: boolean;
|
|
141
|
-
high_daily_hot_water: boolean;
|
|
142
|
-
high_daily_cold_water: boolean;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
interface ProjectTagTreeNode {
|
|
146
|
-
tag: ProjectTag;
|
|
147
|
-
children: ProjectTagTreeNode[];
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
interface ProjectTagsTree {
|
|
151
|
-
root: ProjectTagTreeNode[]
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
interface ProjectTag {
|
|
155
|
-
id: string;
|
|
156
|
-
name: string;
|
|
157
|
-
parent_id: string;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
declare class TagsClient {
|
|
161
|
-
getTags: (prjId: string, params?: ProjectTagRequestParams) => Promise<AxiosResponse<ProjectTag[]>>;
|
|
162
|
-
}
|
|
163
|
-
declare const tagsClient: TagsClient;
|
|
164
|
-
|
|
165
|
-
declare class TagsHelper {
|
|
166
|
-
private tagsClient;
|
|
167
|
-
constructor(tagsClient: TagsClient);
|
|
168
|
-
getTagsTree: (prjId: string, maxDepth?: number, params?: ProjectTagRequestParams) => Promise<ProjectTagsTree>;
|
|
169
|
-
getTagsChildren: (prjId: string, level?: number, parent_id?: string, params?: ProjectTagRequestParams, maxDepth?: number) => Promise<ProjectTagTreeNode[]>;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
interface RobotCloudPermissionsHelper {
|
|
173
|
-
checkProjectAccess(prjId: string, required_project_access: ProjectAccessLevel): Promise<boolean>;
|
|
174
|
-
hasAccessLevel(project: RobotCloudProjectDetails, required_project_access: ProjectAccessLevel): boolean;
|
|
175
|
-
hasAppAccessLevel(project: RobotCloudProjectDetails, required_application_access: AppAccessLevel): boolean;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
declare const robotCloudPermissionsHelper: RobotCloudPermissionsHelper;
|
|
179
|
-
|
|
180
|
-
declare const tagsHelper: TagsHelper;
|
|
181
|
-
|
|
182
|
-
export { type AppAccessLevel as A, type FancoilSpeedState as F, type LocationServiceInstancesRequestParams as L, type OrganizationAccessLevel as O, type PaginableRequestParams as P, type RegimState as R, type SubsystemRequestParams as S, type TemperatureUnit as T, type SubsystemTagsRequestParams as a, type ServiceInstanceDataRequestParams as b, type RoomClime1AlertEventValue as c, type RoomConsumes1AlertEventValue as d, type RobotCloudDeviceDetails as e, type RobotCloudNamedItem as f, type RobotCloudServiceType as g, type ProjectLocationsRequestParams as h, type ProjectRequestParams as i, type RobotCloudProject as j, type ProjectDetailsRequestParams as k, type RobotCloudProjectDetails as l, type RobotCloudServiceTypeDetails as m, type RobotCloudUserDetails as n, type RobotCloudUserProject as o, type RobotCloudOrganizationDetails as p, tagsHelper as q, robotCloudPermissionsHelper as r, type RobotCloudPermissionsHelper as s, tagsClient as t, type ProjectTagTreeNode as u, type ProjectTagsTree as v, type ProjectTag as w, type ProjectAccessLevel as x, type ProjectTagRequestParams as y, type RobotCloudUserAppAccess as z };
|
package/dist/index-NoveF7Iq.d.ts
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { AxiosResponse } from 'axios';
|
|
2
|
-
|
|
3
|
-
type TemperatureUnit = "CELSIUS" | "FAHRENHEIT"
|
|
4
|
-
type RegimState = "COLD"|"HEAT"|"AUTO"
|
|
5
|
-
|
|
6
|
-
type OrganizationAccessLevel = "STAFF" | "STANDARD" | "ADMIN" | "SUPERUSER" | "MASTER"
|
|
7
|
-
type ProjectAccessLevel = "BLOCKED" | "RESTRICTED" | "BASIC" | "ADVANCED"
|
|
8
|
-
type AppAccessLevel = "BLOCKED" | "STANDARD" | "ADVANCED" | "ADMIN"
|
|
9
|
-
|
|
10
|
-
type RobotCloudServiceType = "RoomClime_1"|"RoomGuestStatus_1"|"AirQuality_1"
|
|
11
|
-
|
|
12
|
-
// Desired fancoil speed (0 = Auto, 1..3 = Manual Speed)
|
|
13
|
-
type FancoilSpeedState = 0|1|2|3;
|
|
14
|
-
|
|
15
|
-
interface ProjectRequestParams {
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface ProjectDetailsRequestParams {
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
interface SubsystemRequestParams {
|
|
23
|
-
subsystem_id?: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
interface PaginableRequestParams {
|
|
27
|
-
startIndex?: number;
|
|
28
|
-
maxSize?: number;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
interface SubsystemTagsRequestParams extends SubsystemRequestParams {
|
|
32
|
-
tag_id?: string | string[];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface ProjectLocationsRequestParams extends SubsystemTagsRequestParams, PaginableRequestParams {
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
interface ServiceInstanceDataRequestParams {
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
interface ProjectTagRequestParams extends PaginableRequestParams {
|
|
45
|
-
parent_tag?: string;
|
|
46
|
-
no_parent?: boolean;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
interface LocationServiceInstancesRequestParams extends SubsystemRequestParams, PaginableRequestParams {
|
|
51
|
-
tag_id?: string[];
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/** RESPONSE **/
|
|
56
|
-
|
|
57
|
-
interface RobotCloudNamedItem {
|
|
58
|
-
id: string;
|
|
59
|
-
name: string;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
interface RobotCloudProject {
|
|
63
|
-
id: string;
|
|
64
|
-
name: string;
|
|
65
|
-
organization: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/** USERS */
|
|
69
|
-
interface RobotCloudUserAppAccess {
|
|
70
|
-
app_id: string;
|
|
71
|
-
app_name: string;
|
|
72
|
-
access_level: AppAccessLevel;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
interface RobotCloudUserDetails {
|
|
76
|
-
username: string;
|
|
77
|
-
name: string;
|
|
78
|
-
last_name: string;
|
|
79
|
-
email: string;
|
|
80
|
-
org_id: string;
|
|
81
|
-
org_access: OrganizationAccessLevel;
|
|
82
|
-
default_project_access: ProjectAccessLevel;
|
|
83
|
-
default_app_access: RobotCloudUserAppAccess[];
|
|
84
|
-
access_all_projects: boolean;
|
|
85
|
-
blocked: boolean;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
interface RobotCloudUserProject {
|
|
89
|
-
project_id: string;
|
|
90
|
-
project_name: string;
|
|
91
|
-
access_level: ProjectAccessLevel;
|
|
92
|
-
app_access_level: {app_id: string, app_name: string, access_level: AppAccessLevel}[]
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
interface RobotCloudOrganizationDetails extends RobotCloudNamedItem {
|
|
96
|
-
description?: string;
|
|
97
|
-
address?: string;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
interface RobotCloudProjectDetails extends RobotCloudProject {
|
|
101
|
-
version: number;
|
|
102
|
-
description?: string;
|
|
103
|
-
country?: string;
|
|
104
|
-
timezone?: string;
|
|
105
|
-
image_url?: string;
|
|
106
|
-
longitude?: number;
|
|
107
|
-
latitude?: number;
|
|
108
|
-
application_enabled?: boolean;
|
|
109
|
-
access_level?: ProjectAccessLevel;
|
|
110
|
-
app_access_level?: AppAccessLevel;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
interface RobotCloudDeviceDetails extends RobotCloudNamedItem {
|
|
114
|
-
description?: string;
|
|
115
|
-
location: string;
|
|
116
|
-
address: {
|
|
117
|
-
domain: number;
|
|
118
|
-
zone: number;
|
|
119
|
-
id: number;
|
|
120
|
-
};
|
|
121
|
-
type: number;
|
|
122
|
-
configuration_type: string;
|
|
123
|
-
tags: string;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
interface RobotCloudServiceTypeDetails {
|
|
127
|
-
description: string;
|
|
128
|
-
name: RobotCloudServiceType
|
|
129
|
-
}
|
|
130
|
-
/** SERVICE EVENTS VALUES **/
|
|
131
|
-
interface RoomClime1AlertEventValue {
|
|
132
|
-
high_temperature: boolean;
|
|
133
|
-
low_temperature: boolean;
|
|
134
|
-
high_humidity: boolean;
|
|
135
|
-
fancoil_on_overtime: boolean;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
interface RoomConsumes1AlertEventValue {
|
|
139
|
-
high_daily_energy_electric: boolean;
|
|
140
|
-
high_daily_energy_thermal: boolean;
|
|
141
|
-
high_daily_hot_water: boolean;
|
|
142
|
-
high_daily_cold_water: boolean;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
interface ProjectTagTreeNode {
|
|
146
|
-
tag: ProjectTag;
|
|
147
|
-
children: ProjectTagTreeNode[];
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
interface ProjectTagsTree {
|
|
151
|
-
root: ProjectTagTreeNode[]
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
interface ProjectTag {
|
|
155
|
-
id: string;
|
|
156
|
-
name: string;
|
|
157
|
-
parent_id: string;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
declare class TagsClient {
|
|
161
|
-
getTags: (prjId: string, params?: ProjectTagRequestParams) => Promise<AxiosResponse<ProjectTag[]>>;
|
|
162
|
-
}
|
|
163
|
-
declare const tagsClient: TagsClient;
|
|
164
|
-
|
|
165
|
-
declare class TagsHelper {
|
|
166
|
-
private tagsClient;
|
|
167
|
-
constructor(tagsClient: TagsClient);
|
|
168
|
-
getTagsTree: (prjId: string, maxDepth?: number, params?: ProjectTagRequestParams) => Promise<ProjectTagsTree>;
|
|
169
|
-
getTagsChildren: (prjId: string, level?: number, parent_id?: string, params?: ProjectTagRequestParams, maxDepth?: number) => Promise<ProjectTagTreeNode[]>;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
interface RobotCloudPermissionsHelper {
|
|
173
|
-
checkProjectAccess(prjId: string, required_project_access: ProjectAccessLevel): Promise<boolean>;
|
|
174
|
-
hasAccessLevel(project: RobotCloudProjectDetails, required_project_access: ProjectAccessLevel): boolean;
|
|
175
|
-
hasAppAccessLevel(project: RobotCloudProjectDetails, required_application_access: AppAccessLevel): boolean;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
declare const robotCloudPermissionsHelper: RobotCloudPermissionsHelper;
|
|
179
|
-
|
|
180
|
-
declare const tagsHelper: TagsHelper;
|
|
181
|
-
|
|
182
|
-
export { type AppAccessLevel as A, type FancoilSpeedState as F, type LocationServiceInstancesRequestParams as L, type OrganizationAccessLevel as O, type PaginableRequestParams as P, type RegimState as R, type SubsystemRequestParams as S, type TemperatureUnit as T, type SubsystemTagsRequestParams as a, type ServiceInstanceDataRequestParams as b, type RoomClime1AlertEventValue as c, type RoomConsumes1AlertEventValue as d, type RobotCloudDeviceDetails as e, type RobotCloudNamedItem as f, type RobotCloudServiceType as g, type ProjectLocationsRequestParams as h, type ProjectRequestParams as i, type RobotCloudProject as j, type ProjectDetailsRequestParams as k, type RobotCloudProjectDetails as l, type RobotCloudServiceTypeDetails as m, type RobotCloudUserDetails as n, type RobotCloudUserProject as o, type RobotCloudOrganizationDetails as p, tagsHelper as q, robotCloudPermissionsHelper as r, type RobotCloudPermissionsHelper as s, tagsClient as t, type ProjectTagTreeNode as u, type ProjectTagsTree as v, type ProjectTag as w, type ProjectAccessLevel as x, type ProjectTagRequestParams as y, type RobotCloudUserAppAccess as z };
|