@iobroker/gui-components 8.0.2 → 10.0.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/LICENSE +22 -22
- package/README.md +834 -543
- package/build/AdminConnection.js.map +1 -1
- package/build/Components/404.js +13 -13
- package/build/Components/404.js.map +1 -1
- package/build/Components/ColorPicker.js.map +1 -1
- package/build/Components/ComplexCron.js +2 -2
- package/build/Components/ComplexCron.js.map +1 -1
- package/build/Components/CopyToClipboard.js.map +1 -1
- package/build/Components/CustomModal.js +1 -1
- package/build/Components/CustomModal.js.map +1 -1
- package/build/Components/DeviceType/DeviceTypeIcon.js +1 -0
- package/build/Components/DeviceType/DeviceTypeIcon.js.map +1 -1
- package/build/Components/DeviceType/DeviceTypeSelector.js +2 -2
- package/build/Components/DeviceType/DeviceTypeSelector.js.map +1 -1
- package/build/Components/DeviceType/i18n/de.json +1 -0
- package/build/Components/DeviceType/i18n/en.json +1 -0
- package/build/Components/DeviceType/i18n/fr.json +1 -0
- package/build/Components/DeviceType/i18n/it.json +1 -0
- package/build/Components/DeviceType/i18n/nl.json +1 -0
- package/build/Components/DeviceType/i18n/pl.json +1 -0
- package/build/Components/DeviceType/i18n/pt.json +1 -0
- package/build/Components/DeviceType/i18n/ru.json +1 -0
- package/build/Components/DeviceType/i18n/uk.json +1 -0
- package/build/Components/DeviceType/i18n/zh-cn.json +1 -0
- package/build/Components/FileBrowser.d.ts +39 -4
- package/build/Components/FileBrowser.js +104 -11
- package/build/Components/FileBrowser.js.map +1 -1
- package/build/Components/FileViewer.js +2 -4
- package/build/Components/FileViewer.js.map +1 -1
- package/build/Components/Icon.d.ts +1 -3
- package/build/Components/Icon.js +11 -11
- package/build/Components/Icon.js.map +1 -1
- package/build/Components/Image.js +8 -4
- package/build/Components/Image.js.map +1 -1
- package/build/Components/InfoBox.js +1 -1
- package/build/Components/InfoBox.js.map +1 -1
- package/build/Components/IobUri.js +5 -5
- package/build/Components/IobUri.js.map +1 -1
- package/build/Components/Loader.d.ts +2 -3
- package/build/Components/Loader.js +25 -257
- package/build/Components/Loader.js.map +1 -1
- package/build/Components/Loaders/Community.d.ts +31 -0
- package/build/Components/Loaders/Community.js +265 -0
- package/build/Components/Loaders/Community.js.map +1 -0
- package/build/Components/Loaders/HA.d.ts +17 -0
- package/build/Components/Loaders/HA.js +99 -0
- package/build/Components/Loaders/HA.js.map +1 -0
- package/build/Components/Loaders/MV.js.map +1 -1
- package/build/Components/Loaders/NW.d.ts +17 -0
- package/build/Components/Loaders/NW.js +70 -0
- package/build/Components/Loaders/NW.js.map +1 -0
- package/build/Components/Loaders/PT.js +103 -103
- package/build/Components/Loaders/PT.js.map +1 -1
- package/build/Components/Loaders/Vendor.js +7 -7
- package/build/Components/Loaders/Vendor.js.map +1 -1
- package/build/Components/MDUtils.js.map +1 -1
- package/build/Components/ObjectBrowser.d.ts +25 -406
- package/build/Components/ObjectBrowser.js +460 -1543
- package/build/Components/ObjectBrowser.js.map +1 -1
- package/build/Components/Router.js.map +1 -1
- package/build/Components/SaveCloseButtons.js.map +1 -1
- package/build/Components/Schedule.d.ts +27 -1
- package/build/Components/Schedule.js +60 -50
- package/build/Components/Schedule.js.map +1 -1
- package/build/Components/SelectWithIcon.js +1 -1
- package/build/Components/SelectWithIcon.js.map +1 -1
- package/build/Components/SimpleCron/cronText.js.map +1 -1
- package/build/Components/SimpleCron/index.js +3 -3
- package/build/Components/SimpleCron/index.js.map +1 -1
- package/build/Components/TabContainer.js +7 -2
- package/build/Components/TabContainer.js.map +1 -1
- package/build/Components/TabContent.d.ts +1 -1
- package/build/Components/TabContent.js +5 -5
- package/build/Components/TabContent.js.map +1 -1
- package/build/Components/TabHeader.js +2 -2
- package/build/Components/TabHeader.js.map +1 -1
- package/build/Components/TableResize.js.map +1 -1
- package/build/Components/TextWithIcon.js.map +1 -1
- package/build/Components/TreeTable.d.ts +1 -0
- package/build/Components/TreeTable.js +16 -6
- package/build/Components/TreeTable.js.map +1 -1
- package/build/Components/UploadImage.js +305 -305
- package/build/Components/UploadImage.js.map +1 -1
- package/build/Components/Utils.d.ts +17 -3
- package/build/Components/Utils.js +167 -9
- package/build/Components/Utils.js.map +1 -1
- package/build/Components/objectBrowser.types.d.ts +496 -0
- package/build/Components/objectBrowserUtils.d.ts +170 -0
- package/build/Components/objectBrowserUtils.js +1375 -0
- package/build/Components/objectBrowserUtils.js.map +1 -0
- package/build/Connection.js.map +1 -1
- package/build/Dialogs/ComplexCron.js.map +1 -1
- package/build/Dialogs/Confirm.js.map +1 -1
- package/build/Dialogs/Cron.js.map +1 -1
- package/build/Dialogs/Error.js.map +1 -1
- package/build/Dialogs/Message.js.map +1 -1
- package/build/Dialogs/SelectFile.d.ts +1 -1
- package/build/Dialogs/SelectFile.js +1 -1
- package/build/Dialogs/SelectFile.js.map +1 -1
- package/build/Dialogs/SelectID.d.ts +1 -1
- package/build/Dialogs/SelectID.js +1 -1
- package/build/Dialogs/SelectID.js.map +1 -1
- package/build/Dialogs/SimpleCron.js.map +1 -1
- package/build/Dialogs/TextInput.js +1 -1
- package/build/Dialogs/TextInput.js.map +1 -1
- package/build/GenericApp.d.ts +6 -4
- package/build/GenericApp.js +22 -16
- package/build/GenericApp.js.map +1 -1
- package/build/Prompt.js +7 -7
- package/build/Prompt.js.map +1 -1
- package/build/Theme.js +57 -11
- package/build/Theme.js.map +1 -1
- package/build/assets/devices/parseNames.js +1 -0
- package/build/assets/devices/parseNames.js.map +1 -1
- package/build/assets/rooms/parseNames.js +1 -0
- package/build/assets/rooms/parseNames.js.map +1 -1
- package/build/dictionary.js.map +1 -1
- package/build/globals.d.ts +2 -0
- package/build/i18n/de.json +5 -66
- package/build/i18n/en.json +5 -66
- package/build/i18n/es.json +5 -66
- package/build/i18n/fr.json +5 -66
- package/build/i18n/it.json +5 -61
- package/build/i18n/nl.json +5 -61
- package/build/i18n/pl.json +5 -61
- package/build/i18n/pt.json +5 -61
- package/build/i18n/ru.json +5 -61
- package/build/i18n/uk.json +5 -61
- package/build/i18n/zh-cn.json +5 -61
- package/build/i18n.js +12 -15
- package/build/i18n.js.map +1 -1
- package/build/index.css +56 -56
- package/build/index.d.ts +9 -4
- package/build/index.js +5 -2
- package/build/index.js.map +1 -1
- package/build/modulefederation.admin.config.d.ts +1 -0
- package/build/modulefederation.admin.config.js +1 -1
- package/build/modulefederation.admin.config.js.map +1 -1
- package/build/types.d.ts +4 -84
- package/i18n/de.json +5 -66
- package/i18n/en.json +5 -66
- package/i18n/es.json +5 -66
- package/i18n/fr.json +5 -66
- package/i18n/it.json +5 -61
- package/i18n/nl.json +5 -61
- package/i18n/pl.json +5 -61
- package/i18n/pt.json +5 -61
- package/i18n/ru.json +5 -61
- package/i18n/uk.json +5 -61
- package/i18n/zh-cn.json +5 -61
- package/index.css +56 -56
- package/modulefederation.admin.config.d.ts +1 -0
- package/modulefederation.admin.config.js +1 -2
- package/package.json +50 -35
- package/tasksExample.ts +93 -0
- package/build/LegacyConnection.d.ts +0 -938
- package/build/LegacyConnection.js +0 -2849
- package/build/LegacyConnection.js.map +0 -1
- package/tasksExample.js +0 -91
|
@@ -1,938 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2020-2025, Denis Haev (bluefox) <dogafox@gmail.com>
|
|
3
|
-
*
|
|
4
|
-
* MIT License
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
|
-
import type { InstalledInfo, HostInfo } from '@iobroker/socket-client';
|
|
8
|
-
import type { IoBJson } from '@iobroker/types/build/config';
|
|
9
|
-
declare global {
|
|
10
|
-
interface Window {
|
|
11
|
-
adapterName: undefined | string;
|
|
12
|
-
socketUrl: undefined | string;
|
|
13
|
-
registerSocketOnLoad: (func: () => void) => void;
|
|
14
|
-
vendorPrefix: undefined | string;
|
|
15
|
-
io: any;
|
|
16
|
-
iob: any;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
type LogMessage = {
|
|
20
|
-
/** Log message */
|
|
21
|
-
message: string;
|
|
22
|
-
/** origin */
|
|
23
|
-
from: string;
|
|
24
|
-
/** timestamp in ms */
|
|
25
|
-
ts: number;
|
|
26
|
-
/** Log message */
|
|
27
|
-
severity: ioBroker.LogLevel;
|
|
28
|
-
/** unique ID of the message */
|
|
29
|
-
_id: number;
|
|
30
|
-
};
|
|
31
|
-
export type Severity = 'info' | 'notify' | 'alert';
|
|
32
|
-
interface NotificationMessageObject {
|
|
33
|
-
message: string;
|
|
34
|
-
ts: number;
|
|
35
|
-
}
|
|
36
|
-
type MultilingualObject = Exclude<ioBroker.StringOrTranslated, string>;
|
|
37
|
-
export interface FilteredNotificationInformation {
|
|
38
|
-
[scope: string]: {
|
|
39
|
-
description: MultilingualObject;
|
|
40
|
-
name: MultilingualObject;
|
|
41
|
-
categories: {
|
|
42
|
-
[category: string]: {
|
|
43
|
-
description: MultilingualObject;
|
|
44
|
-
name: MultilingualObject;
|
|
45
|
-
severity: Severity;
|
|
46
|
-
instances: {
|
|
47
|
-
[instance: string]: {
|
|
48
|
-
messages: NotificationMessageObject[];
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
export type CompactSystemRepositoryEntry = {
|
|
56
|
-
link: string;
|
|
57
|
-
hash?: string;
|
|
58
|
-
stable?: boolean;
|
|
59
|
-
json: {
|
|
60
|
-
_repoInfo: {
|
|
61
|
-
stable?: boolean;
|
|
62
|
-
name?: ioBroker.StringOrTranslated;
|
|
63
|
-
};
|
|
64
|
-
} | null | undefined;
|
|
65
|
-
};
|
|
66
|
-
export type CompactSystemRepository = {
|
|
67
|
-
_id: ioBroker.HostObject['_id'];
|
|
68
|
-
common: {
|
|
69
|
-
name: ioBroker.HostCommon['name'];
|
|
70
|
-
dontDelete: boolean;
|
|
71
|
-
};
|
|
72
|
-
native: {
|
|
73
|
-
repositories: Record<string, CompactSystemRepositoryEntry>;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
/** Possible progress states. */
|
|
77
|
-
export declare const PROGRESS: {
|
|
78
|
-
/** The socket is connecting. */
|
|
79
|
-
CONNECTING: number;
|
|
80
|
-
/** The socket is successfully connected. */
|
|
81
|
-
CONNECTED: number;
|
|
82
|
-
/** All objects are loaded. */
|
|
83
|
-
OBJECTS_LOADED: number;
|
|
84
|
-
/** All states are loaded. */
|
|
85
|
-
STATES_LOADED: number;
|
|
86
|
-
/** The socket is ready for use. */
|
|
87
|
-
READY: number;
|
|
88
|
-
};
|
|
89
|
-
export declare const ERRORS: {
|
|
90
|
-
PERMISSION_ERROR: string;
|
|
91
|
-
NOT_CONNECTED: string;
|
|
92
|
-
};
|
|
93
|
-
export type BinaryStateChangeHandler = (id: string, base64: string | null) => void;
|
|
94
|
-
/** Converts ioB pattern into regex */
|
|
95
|
-
export declare function pattern2RegEx(pattern: string): string;
|
|
96
|
-
interface ConnectionProps {
|
|
97
|
-
/** The socket name. */
|
|
98
|
-
name?: string;
|
|
99
|
-
/** State IDs to always automatically subscribe to. */
|
|
100
|
-
autoSubscribes?: string[];
|
|
101
|
-
/** Automatically subscribe to logging. */
|
|
102
|
-
autoSubscribeLog?: boolean;
|
|
103
|
-
/** The protocol to use for the socket.io connection. */
|
|
104
|
-
protocol: string;
|
|
105
|
-
/** The host name to use for the socket.io connection. */
|
|
106
|
-
host: string;
|
|
107
|
-
/** The port to use for the socket.io connection. */
|
|
108
|
-
port?: string | number;
|
|
109
|
-
/** The socket.io connection timeout. */
|
|
110
|
-
ioTimeout?: number;
|
|
111
|
-
/** The socket.io command timeout. */
|
|
112
|
-
cmdTimeout?: number;
|
|
113
|
-
/** Flag to indicate if all objects should be loaded or not. Default true (not loaded) */
|
|
114
|
-
doNotLoadAllObjects?: boolean;
|
|
115
|
-
/** Flag to indicate if AccessControlList for current user will be loaded or not. Default true (not loaded) */
|
|
116
|
-
doNotLoadACL?: boolean;
|
|
117
|
-
/** Progress callback. */
|
|
118
|
-
onProgress?: (progress: number) => void;
|
|
119
|
-
/** Ready callback. */
|
|
120
|
-
onReady?: (objects: Record<string, ioBroker.Object>) => void;
|
|
121
|
-
/** Log callback. */
|
|
122
|
-
onLog?: (message: LogMessage) => void;
|
|
123
|
-
/** Error callback. */
|
|
124
|
-
onError?: (error: any) => void;
|
|
125
|
-
/** Object change callback. */
|
|
126
|
-
onObjectChange?: ioBroker.ObjectChangeHandler;
|
|
127
|
-
/** Gets called when the system language is determined */
|
|
128
|
-
onLanguage?: (lang: ioBroker.Languages) => void;
|
|
129
|
-
/** The device UUID with which the communication must be established */
|
|
130
|
-
uuid?: string;
|
|
131
|
-
/** Authentication token (used only in cloud) */
|
|
132
|
-
token?: string;
|
|
133
|
-
}
|
|
134
|
-
export interface ConnectOptions {
|
|
135
|
-
path?: string;
|
|
136
|
-
query?: string;
|
|
137
|
-
name?: string;
|
|
138
|
-
timeout?: number;
|
|
139
|
-
uuid?: string;
|
|
140
|
-
}
|
|
141
|
-
export interface SocketClient {
|
|
142
|
-
connect(url?: string, options?: ConnectOptions): void;
|
|
143
|
-
close(): void;
|
|
144
|
-
destroy(): void;
|
|
145
|
-
readonly connected: boolean;
|
|
146
|
-
on(event: string, callback: (...args: any) => void): void;
|
|
147
|
-
off(event: string, callback: (...args: any) => void): void;
|
|
148
|
-
emit(event: string, ...args: any): boolean;
|
|
149
|
-
}
|
|
150
|
-
export declare class LegacyConnection {
|
|
151
|
-
private _socket;
|
|
152
|
-
private _authTimer;
|
|
153
|
-
private systemLang;
|
|
154
|
-
private readonly _waitForFirstConnection;
|
|
155
|
-
private _waitForFirstConnectionResolve;
|
|
156
|
-
private _promises;
|
|
157
|
-
private readonly _instanceSubscriptions;
|
|
158
|
-
private props;
|
|
159
|
-
private readonly doNotLoadAllObjects;
|
|
160
|
-
private readonly doNotLoadACL;
|
|
161
|
-
private states;
|
|
162
|
-
private objects;
|
|
163
|
-
private scriptLoadCounter;
|
|
164
|
-
private acl;
|
|
165
|
-
private firstConnect;
|
|
166
|
-
private readonly waitForRestart;
|
|
167
|
-
private connected;
|
|
168
|
-
private readonly statesSubscribes;
|
|
169
|
-
private readonly objectsSubscribes;
|
|
170
|
-
private readonly filesSubscribes;
|
|
171
|
-
private onConnectionHandlers;
|
|
172
|
-
private onLogHandlers;
|
|
173
|
-
private readonly onProgress;
|
|
174
|
-
private readonly onError;
|
|
175
|
-
private loaded;
|
|
176
|
-
private loadTimer;
|
|
177
|
-
private loadCounter;
|
|
178
|
-
private ignoreState;
|
|
179
|
-
private readonly simStates;
|
|
180
|
-
private autoSubscribes;
|
|
181
|
-
private readonly autoSubscribeLog;
|
|
182
|
-
private subscribed;
|
|
183
|
-
isSecure: boolean | undefined;
|
|
184
|
-
private onCmdStdoutHandler;
|
|
185
|
-
private onCmdStderrHandler;
|
|
186
|
-
private onCmdExitHandler;
|
|
187
|
-
systemConfig: ioBroker.SystemConfigObject | null;
|
|
188
|
-
private objectViewCached;
|
|
189
|
-
constructor(props: ConnectionProps);
|
|
190
|
-
/**
|
|
191
|
-
* Checks if this connection is running in a web adapter and not in an admin.
|
|
192
|
-
*
|
|
193
|
-
* @returns True if running in a web adapter or in a socketio adapter.
|
|
194
|
-
*/
|
|
195
|
-
static isWeb(): boolean;
|
|
196
|
-
/**
|
|
197
|
-
* Starts the socket.io connection.
|
|
198
|
-
*/
|
|
199
|
-
startSocket(): void;
|
|
200
|
-
/**
|
|
201
|
-
* Called internally.
|
|
202
|
-
*/
|
|
203
|
-
private onPreConnect;
|
|
204
|
-
/**
|
|
205
|
-
* Checks if running in ioBroker cloud
|
|
206
|
-
*/
|
|
207
|
-
static isCloud(): boolean;
|
|
208
|
-
/**
|
|
209
|
-
* Checks if the socket is connected.
|
|
210
|
-
*/
|
|
211
|
-
isConnected(): boolean;
|
|
212
|
-
/**
|
|
213
|
-
* Checks if the socket is connected.
|
|
214
|
-
* Promise resolves if once connected.
|
|
215
|
-
*/
|
|
216
|
-
waitForFirstConnection(): Promise<void>;
|
|
217
|
-
/**
|
|
218
|
-
* Called internally.
|
|
219
|
-
*/
|
|
220
|
-
private _getUserPermissions;
|
|
221
|
-
/**
|
|
222
|
-
* Called internally.
|
|
223
|
-
*/
|
|
224
|
-
private onConnect;
|
|
225
|
-
/**
|
|
226
|
-
* Called internally.
|
|
227
|
-
*/
|
|
228
|
-
private static authenticate;
|
|
229
|
-
/**
|
|
230
|
-
* Subscribe to changes of the given state.
|
|
231
|
-
*
|
|
232
|
-
* @param id The ioBroker state ID or array of states
|
|
233
|
-
* @param binary Set to true if the given state is binary and requires Base64 decoding
|
|
234
|
-
* @param cb The callback
|
|
235
|
-
*/
|
|
236
|
-
subscribeState(id: string | string[], binary: boolean | ioBroker.StateChangeHandler | BinaryStateChangeHandler, cb?: ioBroker.StateChangeHandler | BinaryStateChangeHandler): Promise<void>;
|
|
237
|
-
/**
|
|
238
|
-
* Subscribe to changes of the given state.
|
|
239
|
-
*/
|
|
240
|
-
subscribeStateAsync(
|
|
241
|
-
/** The ioBroker state ID or array of states */
|
|
242
|
-
id: string | string[],
|
|
243
|
-
/** The callback. */
|
|
244
|
-
cb: ioBroker.StateChangeHandler): Promise<void>;
|
|
245
|
-
/**
|
|
246
|
-
* Unsubscribes all or the given callback from changes of the given state.
|
|
247
|
-
*/
|
|
248
|
-
unsubscribeState(
|
|
249
|
-
/** The ioBroker state ID or array of states */
|
|
250
|
-
id: string | string[],
|
|
251
|
-
/** The callback. */
|
|
252
|
-
cb?: ioBroker.StateChangeHandler | BinaryStateChangeHandler): void;
|
|
253
|
-
/**
|
|
254
|
-
* Subscribe to changes of the given object.
|
|
255
|
-
*
|
|
256
|
-
* @param id The ioBroker object ID or array of objects
|
|
257
|
-
* @param cb The callback
|
|
258
|
-
*/
|
|
259
|
-
subscribeObject(id: string | string[], cb: ioBroker.ObjectChangeHandler): Promise<void>;
|
|
260
|
-
/**
|
|
261
|
-
* Unsubscribes all or the given callback from changes of the given object.
|
|
262
|
-
*
|
|
263
|
-
* @param id The ioBroker object ID or array of objects
|
|
264
|
-
* @param cb The callback
|
|
265
|
-
*/
|
|
266
|
-
unsubscribeObject(id: string | string[], cb?: ioBroker.ObjectChangeHandler): Promise<void>;
|
|
267
|
-
/**
|
|
268
|
-
* Called internally.
|
|
269
|
-
*/
|
|
270
|
-
private fileChange;
|
|
271
|
-
/**
|
|
272
|
-
* Subscribe to changes of the files.
|
|
273
|
-
*
|
|
274
|
-
* @param id The ioBroker state ID for meta-object. Could be a pattern
|
|
275
|
-
* @param filePattern Pattern or file name, like 'main/*' or 'main/visViews.json`
|
|
276
|
-
* @param cb The callback.
|
|
277
|
-
*/
|
|
278
|
-
subscribeFiles(
|
|
279
|
-
/** The ioBroker state ID for meta-object. Could be a pattern */
|
|
280
|
-
id: string,
|
|
281
|
-
/** Pattern or file name, like 'main/*' or 'main/visViews.json` */
|
|
282
|
-
filePattern: string | string[],
|
|
283
|
-
/** The callback. */
|
|
284
|
-
cb: ioBroker.FileChangeHandler): Promise<void>;
|
|
285
|
-
/**
|
|
286
|
-
* Unsubscribes the given callback from changes of files.
|
|
287
|
-
*
|
|
288
|
-
* @param id The ioBroker state ID.
|
|
289
|
-
* @param filePattern Pattern or file name, like 'main/*' or 'main/visViews.json`
|
|
290
|
-
* @param cb The callback.
|
|
291
|
-
*/
|
|
292
|
-
unsubscribeFiles(id: string, filePattern: string, cb?: ioBroker.FileChangeHandler): void;
|
|
293
|
-
/**
|
|
294
|
-
* Called internally.
|
|
295
|
-
*/
|
|
296
|
-
private objectChange;
|
|
297
|
-
/**
|
|
298
|
-
* Called internally.
|
|
299
|
-
*/
|
|
300
|
-
private stateChange;
|
|
301
|
-
/**
|
|
302
|
-
* Called internally.
|
|
303
|
-
*
|
|
304
|
-
* @param messageType The message type
|
|
305
|
-
* @param sourceInstance The source instance
|
|
306
|
-
* @param data Payload
|
|
307
|
-
*/
|
|
308
|
-
instanceMessage(messageType: string, sourceInstance: string, data: Record<string, any>): void;
|
|
309
|
-
/**
|
|
310
|
-
* Gets all states.
|
|
311
|
-
*
|
|
312
|
-
* @param pattern The pattern to filter states
|
|
313
|
-
* @param disableProgressUpdate Don't call onProgress() when done
|
|
314
|
-
*/
|
|
315
|
-
getStates(pattern?: string | boolean, disableProgressUpdate?: boolean): Promise<Record<string, ioBroker.State>>;
|
|
316
|
-
/**
|
|
317
|
-
* Gets the given state.
|
|
318
|
-
*
|
|
319
|
-
* @param id The state ID
|
|
320
|
-
*/
|
|
321
|
-
getState(id: string): Promise<ioBroker.State | null>;
|
|
322
|
-
/**
|
|
323
|
-
* Get the given binary state.
|
|
324
|
-
*
|
|
325
|
-
* @deprecated since js-controller 5.0. Use files instead.
|
|
326
|
-
* @param id The state ID.
|
|
327
|
-
*/
|
|
328
|
-
getBinaryState(id: string): Promise<string>;
|
|
329
|
-
/**
|
|
330
|
-
* Set the given binary state.
|
|
331
|
-
*
|
|
332
|
-
* @deprecated since js-controller 5.0. Use files instead.
|
|
333
|
-
* @param id The state ID.
|
|
334
|
-
* @param base64 The Base64 encoded binary data.
|
|
335
|
-
*/
|
|
336
|
-
setBinaryState(id: string, base64: string): Promise<void>;
|
|
337
|
-
/**
|
|
338
|
-
* Sets the given state value.
|
|
339
|
-
*
|
|
340
|
-
* @param id The state ID
|
|
341
|
-
* @param val The state value
|
|
342
|
-
* @param ack The acknowledgment flag
|
|
343
|
-
*/
|
|
344
|
-
setState(id: string, val: string | number | boolean | ioBroker.SettableState | null, ack?: boolean): Promise<void>;
|
|
345
|
-
/**
|
|
346
|
-
* Gets all objects.
|
|
347
|
-
*
|
|
348
|
-
* @param update Set to true to retrieve all objects from the server (instead of using the local cache)
|
|
349
|
-
* @param disableProgressUpdate Don't call onProgress() when done
|
|
350
|
-
*/
|
|
351
|
-
getObjects(update?: boolean, disableProgressUpdate?: boolean): Promise<Record<string, ioBroker.Object>>;
|
|
352
|
-
/**
|
|
353
|
-
* Gets objects by list of IDs.
|
|
354
|
-
*
|
|
355
|
-
* @param list Array of object IDs to retrieve
|
|
356
|
-
*/
|
|
357
|
-
getObjectsById(list: string[]): Promise<Record<string, ioBroker.Object>>;
|
|
358
|
-
/**
|
|
359
|
-
* Called internally.
|
|
360
|
-
*/
|
|
361
|
-
private _subscribe;
|
|
362
|
-
/**
|
|
363
|
-
* Requests log updates.
|
|
364
|
-
*
|
|
365
|
-
* @param isEnabled Set to true to get logs
|
|
366
|
-
*/
|
|
367
|
-
requireLog(isEnabled: boolean): Promise<void>;
|
|
368
|
-
/**
|
|
369
|
-
* Deletes the given object.
|
|
370
|
-
*
|
|
371
|
-
* @param id The object ID
|
|
372
|
-
* @param maintenance Force deletion of non-conform IDs
|
|
373
|
-
*/
|
|
374
|
-
delObject(id: string, maintenance?: boolean): Promise<void>;
|
|
375
|
-
/**
|
|
376
|
-
* Deletes the given object and all its children.
|
|
377
|
-
*
|
|
378
|
-
* @param id The object ID
|
|
379
|
-
* @param maintenance Force deletion of non-conform IDs
|
|
380
|
-
*/
|
|
381
|
-
delObjects(id: string, maintenance?: boolean): Promise<void>;
|
|
382
|
-
/**
|
|
383
|
-
* Sets the object.
|
|
384
|
-
*/
|
|
385
|
-
setObject(id: string, obj: ioBroker.SettableObject): Promise<void>;
|
|
386
|
-
/**
|
|
387
|
-
* Gets the object with the given id from the server.
|
|
388
|
-
*/
|
|
389
|
-
getObject<T = ioBroker.Object>(id: string): Promise<T>;
|
|
390
|
-
/**
|
|
391
|
-
* Get all instances of the given adapter or all instances of all adapters.
|
|
392
|
-
*
|
|
393
|
-
* @param adapter The name of the adapter
|
|
394
|
-
* @param update Force update
|
|
395
|
-
*/
|
|
396
|
-
getAdapterInstances(adapter?: string | boolean, update?: boolean): Promise<ioBroker.InstanceObject[]>;
|
|
397
|
-
/**
|
|
398
|
-
* Get adapters with the given name or all adapters.
|
|
399
|
-
*
|
|
400
|
-
* @param adapter The name of the adapter
|
|
401
|
-
* @param update Force update
|
|
402
|
-
*/
|
|
403
|
-
getAdapters(adapter?: string | boolean, update?: boolean): Promise<ioBroker.AdapterObject[]>;
|
|
404
|
-
/**
|
|
405
|
-
* Called internally.
|
|
406
|
-
*/
|
|
407
|
-
private _renameGroups;
|
|
408
|
-
/**
|
|
409
|
-
* Rename a group.
|
|
410
|
-
*
|
|
411
|
-
* @param id The id.
|
|
412
|
-
* @param newId The new id.
|
|
413
|
-
* @param newName The new name.
|
|
414
|
-
*/
|
|
415
|
-
renameGroup(id: string, newId: string, newName: ioBroker.StringOrTranslated): Promise<void>;
|
|
416
|
-
/**
|
|
417
|
-
* Sends a message to a specific instance or all instances of some specific adapter.
|
|
418
|
-
*
|
|
419
|
-
* @param instance The instance to send this message to.
|
|
420
|
-
* @param command Command name of the target instance.
|
|
421
|
-
* @param data The message data to send.
|
|
422
|
-
*/
|
|
423
|
-
sendTo(instance: string, command: string, data: any): Promise<{
|
|
424
|
-
result?: any;
|
|
425
|
-
error?: string;
|
|
426
|
-
}>;
|
|
427
|
-
/**
|
|
428
|
-
* Extend an object and create it if it might not exist.
|
|
429
|
-
*
|
|
430
|
-
* @param id The id.
|
|
431
|
-
* @param obj The object.
|
|
432
|
-
*/
|
|
433
|
-
extendObject(id: string, obj: ioBroker.PartialObject): Promise<void>;
|
|
434
|
-
/**
|
|
435
|
-
* Register a handler for log messages.
|
|
436
|
-
*/
|
|
437
|
-
registerLogHandler(handler: (message: string) => void): void;
|
|
438
|
-
/**
|
|
439
|
-
* Unregister a handler for log messages.
|
|
440
|
-
*/
|
|
441
|
-
unregisterLogHandler(handler: (message: string) => void): void;
|
|
442
|
-
/**
|
|
443
|
-
* Register a handler for the connection state.
|
|
444
|
-
*/
|
|
445
|
-
registerConnectionHandler(handler: (connected: boolean) => void): void;
|
|
446
|
-
/**
|
|
447
|
-
* Unregister a handler for the connection state.
|
|
448
|
-
*/
|
|
449
|
-
unregisterConnectionHandler(handler: (connected: boolean) => void): void;
|
|
450
|
-
/**
|
|
451
|
-
* Set the handler for standard output of a command.
|
|
452
|
-
*
|
|
453
|
-
* @param handler The handler.
|
|
454
|
-
*/
|
|
455
|
-
registerCmdStdoutHandler(handler: (id: string, text: string) => void): void;
|
|
456
|
-
/**
|
|
457
|
-
* Unset the handler for standard output of a command.
|
|
458
|
-
*/
|
|
459
|
-
unregisterCmdStdoutHandler(): void;
|
|
460
|
-
/**
|
|
461
|
-
* Set the handler for standard error of a command.
|
|
462
|
-
*
|
|
463
|
-
* @param handler The handler.
|
|
464
|
-
*/
|
|
465
|
-
registerCmdStderrHandler(handler: (id: string, text: string) => void): void;
|
|
466
|
-
/**
|
|
467
|
-
* Unset the handler for standard error of a command.
|
|
468
|
-
*/
|
|
469
|
-
unregisterCmdStderrHandler(): void;
|
|
470
|
-
/**
|
|
471
|
-
* Set the handler for exit of a command.
|
|
472
|
-
*/
|
|
473
|
-
registerCmdExitHandler(handler: (id: string, exitCode: number) => void): void;
|
|
474
|
-
/**
|
|
475
|
-
* Unset the handler for exit of a command.
|
|
476
|
-
*/
|
|
477
|
-
unregisterCmdExitHandler(): void;
|
|
478
|
-
/**
|
|
479
|
-
* Get all enums with the given name.
|
|
480
|
-
*/
|
|
481
|
-
getEnums(
|
|
482
|
-
/** The name of the enum. */
|
|
483
|
-
_enum?: string,
|
|
484
|
-
/** Force update. */
|
|
485
|
-
update?: boolean): Promise<Record<string, ioBroker.EnumObject>>;
|
|
486
|
-
/**
|
|
487
|
-
* Query a predefined object view.
|
|
488
|
-
*
|
|
489
|
-
* @param design design - 'system' or other designs like `custom`.
|
|
490
|
-
* @param type The type of object.
|
|
491
|
-
* @param start The start ID.
|
|
492
|
-
* @param end The end ID.
|
|
493
|
-
*/
|
|
494
|
-
getObjectViewCustom(
|
|
495
|
-
/** The design: 'system' or other designs like `custom`. */
|
|
496
|
-
design: string,
|
|
497
|
-
/** The type of object. */
|
|
498
|
-
type: ioBroker.ObjectType,
|
|
499
|
-
/** The start ID. */
|
|
500
|
-
start: string,
|
|
501
|
-
/** The end ID. */
|
|
502
|
-
end?: string): Promise<Record<string, ioBroker.Object>>;
|
|
503
|
-
/**
|
|
504
|
-
* Query a predefined object view.
|
|
505
|
-
*
|
|
506
|
-
* @param type The type of object.
|
|
507
|
-
* @param start The start ID.
|
|
508
|
-
* @param end The end ID.
|
|
509
|
-
*/
|
|
510
|
-
getObjectViewSystem<T extends ioBroker.ObjectType>(type: ioBroker.ObjectType, start: string, end?: string): Promise<Record<string, ioBroker.AnyObject & {
|
|
511
|
-
type: T;
|
|
512
|
-
}>>;
|
|
513
|
-
/**
|
|
514
|
-
* Query a predefined object view.
|
|
515
|
-
*
|
|
516
|
-
* @param type The type of object.
|
|
517
|
-
* @param start The start ID.
|
|
518
|
-
* @param [end] The end ID.
|
|
519
|
-
*/
|
|
520
|
-
getObjectViewSystemCached<T extends ioBroker.ObjectType>(type: T, start?: string, end?: string): Promise<Record<string, ioBroker.AnyObject & {
|
|
521
|
-
type: T;
|
|
522
|
-
}>>;
|
|
523
|
-
/**
|
|
524
|
-
* @deprecated since version 1.1.15, cause parameter order does not match backend
|
|
525
|
-
*
|
|
526
|
-
* Query a predefined object view.
|
|
527
|
-
* @param start The start ID.
|
|
528
|
-
* @param end The end ID.
|
|
529
|
-
* @param type The type of object.
|
|
530
|
-
*/
|
|
531
|
-
getObjectView(start: string, end: string, type: ioBroker.ObjectType): Promise<Record<string, ioBroker.Object>>;
|
|
532
|
-
/**
|
|
533
|
-
* Get the stored certificates.
|
|
534
|
-
*
|
|
535
|
-
* @param update Force update.
|
|
536
|
-
*/
|
|
537
|
-
getCertificates(update?: boolean): Promise<{
|
|
538
|
-
name: string;
|
|
539
|
-
type: 'public' | 'private' | 'chained' | '';
|
|
540
|
-
}[]>;
|
|
541
|
-
/**
|
|
542
|
-
* Get the logs from a host (only for admin connection).
|
|
543
|
-
*/
|
|
544
|
-
getLogs(host: string, linesNumber?: number): Promise<string[]>;
|
|
545
|
-
/**
|
|
546
|
-
* Get the log files (only for admin connection).
|
|
547
|
-
*/
|
|
548
|
-
getLogsFiles(host: string): Promise<string[]>;
|
|
549
|
-
/**
|
|
550
|
-
* Delete the logs from a host (only for admin connection).
|
|
551
|
-
*/
|
|
552
|
-
delLogs(host: string): Promise<void>;
|
|
553
|
-
/**
|
|
554
|
-
* Read the meta items.
|
|
555
|
-
*/
|
|
556
|
-
readMetaItems(): Promise<ioBroker.MetaObject[]>;
|
|
557
|
-
/**
|
|
558
|
-
* Read the directory of an adapter.
|
|
559
|
-
*
|
|
560
|
-
* @param adapter The adapter name.
|
|
561
|
-
* @param fileName The directory name.
|
|
562
|
-
*/
|
|
563
|
-
readDir(adapter: string, fileName: string): Promise<ioBroker.ReadDirResult[]>;
|
|
564
|
-
/**
|
|
565
|
-
* Read a file of an adapter.
|
|
566
|
-
*
|
|
567
|
-
* @param adapter The adapter name.
|
|
568
|
-
* @param fileName The file name.
|
|
569
|
-
* @param base64 If it must be a base64 format.
|
|
570
|
-
*/
|
|
571
|
-
readFile(adapter: string, fileName: string, base64?: boolean): Promise<string | {
|
|
572
|
-
data: string;
|
|
573
|
-
type: string;
|
|
574
|
-
}>;
|
|
575
|
-
/**
|
|
576
|
-
* Write a file of an adapter.
|
|
577
|
-
*
|
|
578
|
-
* @param adapter The adapter name.
|
|
579
|
-
* @param fileName The file name.
|
|
580
|
-
* @param data The data (if it's a Buffer, it will be converted to Base64)
|
|
581
|
-
*/
|
|
582
|
-
writeFile64(adapter: string, fileName: string, data: Buffer | string): Promise<void>;
|
|
583
|
-
/**
|
|
584
|
-
* Delete a file of an adapter.
|
|
585
|
-
*
|
|
586
|
-
* @param adapter The adapter name.
|
|
587
|
-
* @param fileName The file name.
|
|
588
|
-
*/
|
|
589
|
-
deleteFile(adapter: string, fileName: string): Promise<void>;
|
|
590
|
-
/**
|
|
591
|
-
* Delete a folder of an adapter.
|
|
592
|
-
* All files in folder will be deleted.
|
|
593
|
-
*
|
|
594
|
-
* @param adapter The adapter name.
|
|
595
|
-
* @param folderName The folder name.
|
|
596
|
-
*/
|
|
597
|
-
deleteFolder(adapter: string, folderName: string): Promise<void>;
|
|
598
|
-
/**
|
|
599
|
-
* Get the list of all hosts.
|
|
600
|
-
*
|
|
601
|
-
* @param update Force update.
|
|
602
|
-
*/
|
|
603
|
-
getHosts(update?: boolean): Promise<ioBroker.HostObject[]>;
|
|
604
|
-
/**
|
|
605
|
-
* Get the list of all users.
|
|
606
|
-
*
|
|
607
|
-
* @param update Force update.
|
|
608
|
-
*/
|
|
609
|
-
getUsers(update?: boolean): Promise<ioBroker.UserObject[]>;
|
|
610
|
-
/**
|
|
611
|
-
* Get the list of all groups.
|
|
612
|
-
*
|
|
613
|
-
* @param update Force update.
|
|
614
|
-
*/
|
|
615
|
-
getGroups(update?: boolean): Promise<ioBroker.GroupObject[]>;
|
|
616
|
-
/**
|
|
617
|
-
* Get the host information.
|
|
618
|
-
*
|
|
619
|
-
* @param host The host name.
|
|
620
|
-
* @param update Force update.
|
|
621
|
-
* @param timeoutMs Optional read timeout.
|
|
622
|
-
*/
|
|
623
|
-
getHostInfo(host: string, update?: boolean, timeoutMs?: number): Promise<HostInfo>;
|
|
624
|
-
/**
|
|
625
|
-
* Get the host information (short version).
|
|
626
|
-
*
|
|
627
|
-
* @param host The host name.
|
|
628
|
-
* @param update Force update.
|
|
629
|
-
* @param timeoutMs Optional read timeout.
|
|
630
|
-
*/
|
|
631
|
-
getHostInfoShort(host: string, update?: boolean, timeoutMs?: number): Promise<HostInfo>;
|
|
632
|
-
/**
|
|
633
|
-
* Get the repository.
|
|
634
|
-
*
|
|
635
|
-
* @param host The host name.
|
|
636
|
-
* @param options Options.
|
|
637
|
-
* @param update Force update.
|
|
638
|
-
* @param timeoutMs Timeout in ms.
|
|
639
|
-
*/
|
|
640
|
-
getRepository(host: string, options?: {
|
|
641
|
-
update: boolean;
|
|
642
|
-
repo: string;
|
|
643
|
-
} | string, update?: boolean, timeoutMs?: number): Promise<Record<string, ioBroker.AdapterCommon>>;
|
|
644
|
-
/**
|
|
645
|
-
* Get the installed.
|
|
646
|
-
*
|
|
647
|
-
* @param host The host name.
|
|
648
|
-
* @param update Force update.
|
|
649
|
-
* @param cmdTimeout Timeout in ms.
|
|
650
|
-
*/
|
|
651
|
-
getInstalled(host: string, update?: boolean, cmdTimeout?: number): Promise<InstalledInfo>;
|
|
652
|
-
/**
|
|
653
|
-
* Rename file or folder in ioBroker DB
|
|
654
|
-
*
|
|
655
|
-
* @param adapter Instance name, like `vis-2.0`.
|
|
656
|
-
* @param oldName The current file name, e.g., main/vis-views.json
|
|
657
|
-
* @param newName The new file name, e.g., main/vis-views-new.json
|
|
658
|
-
*/
|
|
659
|
-
rename(adapter: string, oldName: string, newName: string): Promise<void>;
|
|
660
|
-
/**
|
|
661
|
-
* Rename file in ioBroker DB
|
|
662
|
-
*/
|
|
663
|
-
renameFile(
|
|
664
|
-
/** instance name */
|
|
665
|
-
adapter: string,
|
|
666
|
-
/** current file name, e.g., main/vis-views.json */
|
|
667
|
-
oldName: string,
|
|
668
|
-
/** new file name, e.g., main/vis-views-new.json */
|
|
669
|
-
newName: string): Promise<void>;
|
|
670
|
-
/**
|
|
671
|
-
* Execute a command on a host.
|
|
672
|
-
*/
|
|
673
|
-
cmdExec(
|
|
674
|
-
/** The host name. */
|
|
675
|
-
host: string,
|
|
676
|
-
/** The command. */
|
|
677
|
-
cmd: string,
|
|
678
|
-
/** The command ID. */
|
|
679
|
-
cmdId: string,
|
|
680
|
-
/** Timeout of command in ms */
|
|
681
|
-
cmdTimeout: number): Promise<void>;
|
|
682
|
-
/**
|
|
683
|
-
* Checks if a given feature is supported.
|
|
684
|
-
*/
|
|
685
|
-
checkFeatureSupported(
|
|
686
|
-
/** The feature to check. */
|
|
687
|
-
feature: string,
|
|
688
|
-
/** Force update. */
|
|
689
|
-
update?: boolean): Promise<boolean>;
|
|
690
|
-
/**
|
|
691
|
-
* Read the base settings of a given host.
|
|
692
|
-
*/
|
|
693
|
-
readBaseSettings(host: string): Promise<Record<string, any>>;
|
|
694
|
-
/**
|
|
695
|
-
* Write the base settings of a given host.
|
|
696
|
-
*
|
|
697
|
-
* @param host The host name.
|
|
698
|
-
* @param config The new base settings.
|
|
699
|
-
*/
|
|
700
|
-
writeBaseSettings(host: string, config: IoBJson): Promise<{
|
|
701
|
-
result?: 'ok';
|
|
702
|
-
error?: string;
|
|
703
|
-
}>;
|
|
704
|
-
/**
|
|
705
|
-
* Send command to restart the iobroker on host
|
|
706
|
-
*/
|
|
707
|
-
restartController(host: string): Promise<boolean>;
|
|
708
|
-
/**
|
|
709
|
-
* Read statistics information from host
|
|
710
|
-
*
|
|
711
|
-
* @param host Host name
|
|
712
|
-
* @param typeOfDiag one of none, normal, no-city, extended
|
|
713
|
-
*/
|
|
714
|
-
getDiagData(host: string, typeOfDiag: 'none' | 'normal' | 'no-city' | 'extended'): Promise<Record<string, any>>;
|
|
715
|
-
/**
|
|
716
|
-
* Read all states (which might not belong to this adapter) which match the given pattern.
|
|
717
|
-
*/
|
|
718
|
-
getForeignStates(pattern?: string): Promise<Record<string, ioBroker.State>>;
|
|
719
|
-
/**
|
|
720
|
-
* Get foreign objects by pattern, by specific type and resolve their enums. (Only admin)
|
|
721
|
-
*/
|
|
722
|
-
getForeignObjects(pattern: string, type?: ioBroker.ObjectType): Promise<Record<string, ioBroker.State>>;
|
|
723
|
-
/**
|
|
724
|
-
* Gets the system configuration.
|
|
725
|
-
*
|
|
726
|
-
* @param update Force update.
|
|
727
|
-
*/
|
|
728
|
-
getSystemConfig(update?: boolean): Promise<ioBroker.SystemConfigObject>;
|
|
729
|
-
/**
|
|
730
|
-
* Sets the system configuration.
|
|
731
|
-
*/
|
|
732
|
-
setSystemConfig(obj: ioBroker.SettableObjectWorker<ioBroker.SystemConfigObject>): Promise<ioBroker.SystemConfigObject>;
|
|
733
|
-
/**
|
|
734
|
-
* Get the raw socket.io socket.
|
|
735
|
-
*/
|
|
736
|
-
getRawSocket(): SocketClient;
|
|
737
|
-
/**
|
|
738
|
-
* Get the history of a given state.
|
|
739
|
-
*/
|
|
740
|
-
getHistory(id: string, options: ioBroker.GetHistoryOptions): Promise<ioBroker.GetHistoryResult>;
|
|
741
|
-
/**
|
|
742
|
-
* Get the history of a given state.
|
|
743
|
-
*/
|
|
744
|
-
getHistoryEx(id: string, options: ioBroker.GetHistoryOptions): Promise<{
|
|
745
|
-
values: ioBroker.GetHistoryResult;
|
|
746
|
-
sessionId: string;
|
|
747
|
-
step: number;
|
|
748
|
-
}>;
|
|
749
|
-
/**
|
|
750
|
-
* Change the password of the given user.
|
|
751
|
-
*/
|
|
752
|
-
changePassword(user: string, password: string): Promise<void>;
|
|
753
|
-
/**
|
|
754
|
-
* Get the IP addresses of the given host.
|
|
755
|
-
*/
|
|
756
|
-
getIpAddresses(host: string,
|
|
757
|
-
/** Force update. */
|
|
758
|
-
update?: boolean): Promise<string[]>;
|
|
759
|
-
/**
|
|
760
|
-
* Get the IP addresses with interface names of the given host or find host by IP.
|
|
761
|
-
*/
|
|
762
|
-
getHostByIp(ipOrHostName: string,
|
|
763
|
-
/** Force update. */
|
|
764
|
-
update?: boolean): Promise<{
|
|
765
|
-
name: string;
|
|
766
|
-
address: string;
|
|
767
|
-
family: 'ipv4' | 'ipv6';
|
|
768
|
-
}[]>;
|
|
769
|
-
/**
|
|
770
|
-
* Encrypt a text
|
|
771
|
-
*/
|
|
772
|
-
encrypt(text: string): Promise<string>;
|
|
773
|
-
/**
|
|
774
|
-
* Decrypt a text
|
|
775
|
-
*/
|
|
776
|
-
decrypt(encryptedText: string): Promise<string>;
|
|
777
|
-
/**
|
|
778
|
-
* Gets the version.
|
|
779
|
-
*/
|
|
780
|
-
getVersion(update?: boolean): Promise<{
|
|
781
|
-
version: string;
|
|
782
|
-
serverName: string;
|
|
783
|
-
}>;
|
|
784
|
-
/**
|
|
785
|
-
* Gets the web server name.
|
|
786
|
-
*/
|
|
787
|
-
getWebServerName(): Promise<string>;
|
|
788
|
-
/**
|
|
789
|
-
* Gets the admin version.
|
|
790
|
-
*
|
|
791
|
-
* @deprecated use getVersion()
|
|
792
|
-
*/
|
|
793
|
-
getAdminVersion(): Promise<{
|
|
794
|
-
version: string;
|
|
795
|
-
serverName: string;
|
|
796
|
-
}>;
|
|
797
|
-
/**
|
|
798
|
-
* Change access rights for a file
|
|
799
|
-
*
|
|
800
|
-
* @param adapter The adapter name.
|
|
801
|
-
* @param fileName file name with a full path. It could be like vis.0/*
|
|
802
|
-
* @param options like {mode: 0x644}
|
|
803
|
-
* @param options.mode Access rights. Default is 0x644
|
|
804
|
-
*/
|
|
805
|
-
chmodFile(adapter: string, fileName: string, options?: {
|
|
806
|
-
mode: number;
|
|
807
|
-
}): Promise<{
|
|
808
|
-
entries: ioBroker.ChownFileResult[];
|
|
809
|
-
id: string;
|
|
810
|
-
}>;
|
|
811
|
-
/**
|
|
812
|
-
* Change an owner or/and owner group for a file
|
|
813
|
-
*
|
|
814
|
-
* @param adapter The adapter name.
|
|
815
|
-
* @param fileName file name with a full path. It could be like vis.0/*
|
|
816
|
-
* @param options like {owner: 'user', ownerGroup: 'group'}
|
|
817
|
-
* @param options.owner User name
|
|
818
|
-
* @param options.ownerGroup Group name
|
|
819
|
-
*/
|
|
820
|
-
chownFile(adapter: string, fileName: string, options: {
|
|
821
|
-
owner?: string;
|
|
822
|
-
ownerGroup?: string;
|
|
823
|
-
}): Promise<{
|
|
824
|
-
entries: ioBroker.ChownFileResult[];
|
|
825
|
-
id: string;
|
|
826
|
-
}>;
|
|
827
|
-
/**
|
|
828
|
-
* Check if the file exists
|
|
829
|
-
*
|
|
830
|
-
* @param adapter The adapter name.
|
|
831
|
-
* @param fileName file name with a full path. It could be like vis.0/*
|
|
832
|
-
*/
|
|
833
|
-
fileExists(adapter: string, fileName: string): Promise<boolean>;
|
|
834
|
-
/**
|
|
835
|
-
* Get the alarm notifications from a host (only for admin connection).
|
|
836
|
-
*/
|
|
837
|
-
getNotifications(host: string, category?: string): Promise<FilteredNotificationInformation>;
|
|
838
|
-
/**
|
|
839
|
-
* Clear the alarm notifications on a host (only for admin connection).
|
|
840
|
-
*
|
|
841
|
-
* @param host The host name.
|
|
842
|
-
* @param category optional
|
|
843
|
-
*/
|
|
844
|
-
clearNotifications(host: string, category?: string): Promise<{
|
|
845
|
-
result: 'ok';
|
|
846
|
-
}>;
|
|
847
|
-
/**
|
|
848
|
-
* Read if only easy mode is allowed (only for admin connection).
|
|
849
|
-
*/
|
|
850
|
-
getIsEasyModeStrict(): Promise<boolean>;
|
|
851
|
-
/**
|
|
852
|
-
* Read easy mode configuration (only for admin connection).
|
|
853
|
-
*/
|
|
854
|
-
getEasyMode(): Promise<any>;
|
|
855
|
-
/**
|
|
856
|
-
* Read current user
|
|
857
|
-
*/
|
|
858
|
-
getCurrentUser(): Promise<string>;
|
|
859
|
-
getCurrentSession(cmdTimeout?: number): Promise<{
|
|
860
|
-
expireInSec: number;
|
|
861
|
-
}>;
|
|
862
|
-
/**
|
|
863
|
-
* Read adapter ratings
|
|
864
|
-
*/
|
|
865
|
-
getRatings(update?: boolean): Promise<any>;
|
|
866
|
-
/**
|
|
867
|
-
* Read current web, socketio or admin namespace, like admin.0
|
|
868
|
-
*/
|
|
869
|
-
getCurrentInstance(): Promise<string>;
|
|
870
|
-
getCompactAdapters(update?: boolean): Promise<Record<string, ioBroker.AdapterObject>>;
|
|
871
|
-
getAdaptersResetCache(adapter?: string): void;
|
|
872
|
-
getCompactInstances(update?: boolean): Promise<Record<string, ioBroker.InstanceObject>>;
|
|
873
|
-
getAdapternInstancesResetCache(adapter?: string): void;
|
|
874
|
-
/**
|
|
875
|
-
* Returns very optimized information for adapters to minimize a connection load.
|
|
876
|
-
* Reads only version of installed adapter
|
|
877
|
-
*/
|
|
878
|
-
getCompactInstalled(host: string, update?: boolean, cmdTimeout?: number): Promise<Record<string, ioBroker.AdapterObject>>;
|
|
879
|
-
getCompactSystemRepositories(update?: boolean, cmdTimeout?: number): Promise<CompactSystemRepository>;
|
|
880
|
-
getCompactSystemConfig(update?: boolean): Promise<ioBroker.SystemConfigObject>;
|
|
881
|
-
/**
|
|
882
|
-
* Get the repository in compact form (only version and icon).
|
|
883
|
-
*
|
|
884
|
-
* @param host The host name.
|
|
885
|
-
* @param update Force update.
|
|
886
|
-
* @param timeoutMs timeout in ms.
|
|
887
|
-
*/
|
|
888
|
-
getCompactRepository(host: string, update?: boolean, timeoutMs?: number): Promise<Record<string, {
|
|
889
|
-
version: string;
|
|
890
|
-
icon: string;
|
|
891
|
-
}>>;
|
|
892
|
-
getInstalledResetCache(): void;
|
|
893
|
-
/**
|
|
894
|
-
* Get the list of all hosts in compact form (only _id, common.name, common.icon, common.color, native.hardware.networkInterfaces)
|
|
895
|
-
*/
|
|
896
|
-
getCompactHosts(update?: boolean): Promise<ioBroker.HostObject[]>;
|
|
897
|
-
/**
|
|
898
|
-
* Get uuid
|
|
899
|
-
*/
|
|
900
|
-
getUuid(): Promise<string | undefined>;
|
|
901
|
-
/**
|
|
902
|
-
* Subscribe on instance message
|
|
903
|
-
*
|
|
904
|
-
* @param targetInstance instance, like 'cameras.0'
|
|
905
|
-
* @param messageType message type like 'startCamera/cam3'
|
|
906
|
-
* @param data optional data object
|
|
907
|
-
* @param callback message handler
|
|
908
|
-
*/
|
|
909
|
-
subscribeOnInstance(targetInstance: string, messageType: string, data: any, callback: (_data: Record<string, any>, sourceInstance: string, _messageType: string) => void): Promise<{
|
|
910
|
-
error?: string;
|
|
911
|
-
accepted?: boolean;
|
|
912
|
-
heartbeat?: number;
|
|
913
|
-
}>;
|
|
914
|
-
/**
|
|
915
|
-
* Unsubscribe from instance message
|
|
916
|
-
*
|
|
917
|
-
* @param targetInstance instance, like 'cameras.0'
|
|
918
|
-
* @param messageType message type like 'startCamera/cam3'
|
|
919
|
-
* @param callback message handler. Could be null if all callbacks for this messageType should be unsubscribed
|
|
920
|
-
*/
|
|
921
|
-
unsubscribeFromInstance(targetInstance: string, messageType?: string, callback?: (data: Record<string, any>, sourceInstance: string, _messageType: string) => void): Promise<boolean>;
|
|
922
|
-
/**
|
|
923
|
-
* Send log to ioBroker log
|
|
924
|
-
*/
|
|
925
|
-
log(text: string, level?: 'info' | 'debug' | 'warn' | 'error' | 'silly'): void;
|
|
926
|
-
/**
|
|
927
|
-
* Logout current user
|
|
928
|
-
*/
|
|
929
|
-
logout(): Promise<void>;
|
|
930
|
-
/**
|
|
931
|
-
* This is a special method for vis.
|
|
932
|
-
* It is used to not send to server the changes about "nothing_selected" state
|
|
933
|
-
*
|
|
934
|
-
* @param id The state that has to be ignored by communication
|
|
935
|
-
*/
|
|
936
|
-
setStateToIgnore(id?: string | null): void;
|
|
937
|
-
}
|
|
938
|
-
export {};
|