@iobroker/adapter-react-v5 7.0.2 → 7.1.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/Components/404.d.ts +3 -2
- package/Components/404.js +3 -2
- package/Components/ColorPicker.d.ts +22 -8
- package/Components/ColorPicker.js +34 -17
- package/Components/ComplexCron.js +24 -24
- package/Components/CopyToClipboard.d.ts +10 -1
- package/Components/CopyToClipboard.js +17 -8
- package/Components/CustomModal.d.ts +1 -1
- package/Components/CustomModal.js +8 -8
- package/Components/FileBrowser.d.ts +11 -11
- package/Components/FileBrowser.js +135 -152
- package/Components/FileViewer.js +34 -23
- package/Components/Icon.d.ts +16 -2
- package/Components/Icon.js +19 -8
- package/Components/IconPicker.js +10 -14
- package/Components/IconSelector.d.ts +1 -1
- package/Components/IconSelector.js +64 -74
- package/Components/Image.d.ts +8 -4
- package/Components/Image.js +13 -32
- package/Components/Loader.d.ts +2 -2
- package/Components/Loader.js +21 -18
- package/Components/Loaders/MV.d.ts +6 -1
- package/Components/Loaders/MV.js +23 -7
- package/Components/Loaders/PT.d.ts +7 -2
- package/Components/Loaders/PT.js +20 -7
- package/Components/Loaders/Vendor.d.ts +2 -2
- package/Components/Loaders/Vendor.js +15 -7
- package/Components/Logo.js +16 -18
- package/Components/MDUtils.d.ts +1 -1
- package/Components/MDUtils.js +8 -4
- package/Components/ObjectBrowser.d.ts +40 -39
- package/Components/ObjectBrowser.js +550 -435
- package/Components/Router.d.ts +1 -3
- package/Components/Router.js +3 -1
- package/Components/SaveCloseButtons.d.ts +3 -3
- package/Components/SaveCloseButtons.js +3 -3
- package/Components/Schedule.d.ts +15 -15
- package/Components/Schedule.js +177 -154
- package/Components/SelectWithIcon.d.ts +2 -2
- package/Components/SelectWithIcon.js +45 -34
- package/Components/SimpleCron/index.js +83 -43
- package/Components/TabContainer.js +2 -2
- package/Components/TabContent.js +1 -1
- package/Components/TabHeader.js +1 -1
- package/Components/TableResize.d.ts +2 -2
- package/Components/TableResize.js +5 -5
- package/Components/TextWithIcon.d.ts +1 -1
- package/Components/TextWithIcon.js +10 -8
- package/Components/ToggleThemeMenu.d.ts +2 -2
- package/Components/ToggleThemeMenu.js +3 -3
- package/Components/TreeTable.d.ts +18 -18
- package/Components/TreeTable.js +76 -72
- package/Components/UploadImage.d.ts +2 -2
- package/Components/UploadImage.js +25 -21
- package/Components/Utils.d.ts +42 -22
- package/Components/Utils.js +66 -65
- package/Components/withWidth.d.ts +2 -2
- package/Components/withWidth.js +10 -6
- package/Dialogs/ComplexCron.d.ts +2 -2
- package/Dialogs/ComplexCron.js +3 -3
- package/Dialogs/Confirm.d.ts +4 -4
- package/Dialogs/Confirm.js +18 -8
- package/Dialogs/Cron.d.ts +3 -3
- package/Dialogs/Cron.js +21 -17
- package/Dialogs/Error.d.ts +3 -3
- package/Dialogs/Error.js +6 -4
- package/Dialogs/Message.d.ts +3 -3
- package/Dialogs/Message.js +6 -4
- package/Dialogs/SelectFile.d.ts +4 -4
- package/Dialogs/SelectFile.js +6 -4
- package/Dialogs/SelectID.d.ts +12 -10
- package/Dialogs/SelectID.js +12 -8
- package/Dialogs/SimpleCron.d.ts +2 -2
- package/Dialogs/SimpleCron.js +2 -2
- package/Dialogs/TextInput.d.ts +2 -2
- package/Dialogs/TextInput.js +3 -3
- package/GenericApp.d.ts +19 -13
- package/GenericApp.js +128 -85
- package/LegacyConnection.d.ts +240 -248
- package/LegacyConnection.js +500 -525
- package/README.md +1264 -1171
- package/Theme.d.ts +1 -1
- package/Theme.js +9 -12
- package/assets/devices.json +1 -0
- package/assets/rooms.json +1 -0
- package/craco-module-federation.js +3 -12
- package/i18n/de.json +434 -434
- package/i18n/en.json +434 -434
- package/i18n/es.json +434 -434
- package/i18n/fr.json +434 -434
- package/i18n/it.json +434 -434
- package/i18n/nl.json +434 -434
- package/i18n/pl.json +434 -434
- package/i18n/pt.json +434 -434
- package/i18n/ru.json +434 -434
- package/i18n/uk.json +434 -434
- package/i18n/zh-cn.json +434 -434
- package/i18n.d.ts +26 -19
- package/i18n.js +28 -22
- package/icons/IconAdapter.js +2 -2
- package/icons/IconAlias.js +2 -2
- package/icons/IconChannel.js +2 -2
- package/icons/IconClearFilter.js +2 -2
- package/icons/IconClosed.js +2 -2
- package/icons/IconCopy.js +2 -2
- package/icons/IconDevice.js +2 -2
- package/icons/IconDocument.js +2 -2
- package/icons/IconDocumentReadOnly.js +2 -2
- package/icons/IconExpert.js +2 -2
- package/icons/IconFx.js +2 -2
- package/icons/IconInstance.js +2 -2
- package/icons/IconLogout.js +2 -2
- package/icons/IconNoIcon.js +2 -2
- package/icons/IconOpen.d.ts +2 -2
- package/icons/IconOpen.js +2 -2
- package/icons/IconProps.d.ts +4 -3
- package/icons/IconState.d.ts +2 -2
- package/icons/IconState.js +2 -2
- package/index.css +3 -2
- package/package.json +4 -4
- package/src/Components/404.tsx +32 -31
- package/src/Components/ColorPicker.tsx +142 -114
- package/src/Components/ComplexCron.tsx +174 -137
- package/src/Components/CopyToClipboard.tsx +22 -9
- package/src/Components/CustomModal.tsx +76 -69
- package/src/Components/FileBrowser.tsx +959 -852
- package/src/Components/FileViewer.tsx +146 -127
- package/src/Components/Icon.tsx +80 -52
- package/src/Components/IconPicker.tsx +83 -67
- package/src/Components/IconSelector.tsx +159 -141
- package/src/Components/Image.tsx +43 -26
- package/src/Components/Loader.tsx +56 -32
- package/src/Components/Logo.tsx +62 -52
- package/src/Components/MDUtils.tsx +10 -6
- package/src/Components/ObjectBrowser.tsx +3198 -2478
- package/src/Components/Router.tsx +11 -11
- package/src/Components/SaveCloseButtons.tsx +43 -39
- package/src/Components/Schedule.tsx +1091 -853
- package/src/Components/SelectWithIcon.tsx +135 -93
- package/src/Components/TabContainer.tsx +22 -20
- package/src/Components/TabContent.tsx +13 -12
- package/src/Components/TabHeader.tsx +10 -9
- package/src/Components/TableResize.tsx +52 -37
- package/src/Components/TextWithIcon.tsx +30 -19
- package/src/Components/ToggleThemeMenu.tsx +31 -13
- package/src/Components/TreeTable.tsx +468 -385
- package/src/Components/UploadImage.tsx +153 -121
- package/src/Components/Utils.tsx +135 -127
- package/src/Components/loader.css +40 -31
- package/src/Components/withWidth.tsx +23 -12
- package/src/Connection.tsx +1 -3
- package/src/Dialogs/ComplexCron.tsx +55 -61
- package/src/Dialogs/Confirm.tsx +88 -65
- package/src/Dialogs/Cron.tsx +122 -112
- package/src/Dialogs/Error.tsx +37 -42
- package/src/Dialogs/Message.tsx +39 -37
- package/src/Dialogs/SelectFile.tsx +95 -85
- package/src/Dialogs/SelectID.tsx +141 -129
- package/src/Dialogs/SimpleCron.tsx +44 -44
- package/src/Dialogs/TextInput.tsx +60 -68
- package/src/GenericApp.tsx +342 -242
- package/src/LegacyConnection.tsx +972 -842
- package/src/Prompt.tsx +3 -1
- package/src/Theme.tsx +19 -26
- package/src/icons/IconAdapter.tsx +16 -14
- package/src/icons/IconAlias.tsx +16 -14
- package/src/icons/IconChannel.tsx +55 -16
- package/src/icons/IconClearFilter.tsx +17 -15
- package/src/icons/IconClosed.tsx +16 -11
- package/src/icons/IconCopy.tsx +16 -11
- package/src/icons/IconDevice.tsx +121 -22
- package/src/icons/IconDocument.tsx +16 -11
- package/src/icons/IconDocumentReadOnly.tsx +21 -12
- package/src/icons/IconExpert.tsx +20 -12
- package/src/icons/IconFx.tsx +16 -14
- package/src/icons/IconInstance.tsx +16 -14
- package/src/icons/IconLogout.tsx +20 -18
- package/src/icons/IconNoIcon.tsx +16 -14
- package/src/icons/IconOpen.tsx +17 -12
- package/src/icons/IconProps.tsx +4 -3
- package/src/icons/IconState.tsx +34 -13
- package/src/index.css +3 -2
- package/tasks.js +91 -0
- package/types.d.ts +141 -0
- package/Components/Loaders/PT.css +0 -109
- package/Components/Loaders/Vendor.css +0 -13
- package/Components/loader.css +0 -222
- package/Components/types.d.ts +0 -82
- package/assets/devices/Alarm Systems.svg +0 -19
- package/assets/devices/Amplifier.svg +0 -22
- package/assets/devices/Awnings.svg +0 -5
- package/assets/devices/Battery Status.svg +0 -5
- package/assets/devices/Ceiling Spotlights.svg +0 -16
- package/assets/devices/Chandelier.svg +0 -7
- package/assets/devices/Climate.svg +0 -12
- package/assets/devices/Coffee Makers.svg +0 -6
- package/assets/devices/Cold Water.svg +0 -31
- package/assets/devices/Computer.svg +0 -21
- package/assets/devices/Consumption.svg +0 -8
- package/assets/devices/Curtains.svg +0 -43
- package/assets/devices/Dishwashers.svg +0 -12
- package/assets/devices/Doors.svg +0 -6
- package/assets/devices/Doorstep.svg +0 -35
- package/assets/devices/Dryer.svg +0 -14
- package/assets/devices/Fan.svg +0 -20
- package/assets/devices/Floor Lamps.svg +0 -5
- package/assets/devices/Garage Doors.svg +0 -9
- package/assets/devices/Gates.svg +0 -32
- package/assets/devices/Hairdryer.svg +0 -23
- package/assets/devices/Handle.svg +0 -6
- package/assets/devices/Hanging Lamps.svg +0 -9
- package/assets/devices/Heater.svg +0 -44
- package/assets/devices/Hoods.svg +0 -12
- package/assets/devices/Hot Water.svg +0 -10
- package/assets/devices/Humidity.svg +0 -41
- package/assets/devices/Iron.svg +0 -5
- package/assets/devices/Irrigation.svg +0 -23
- package/assets/devices/Led Strip.svg +0 -31
- package/assets/devices/Light.svg +0 -30
- package/assets/devices/Lightings.svg +0 -46
- package/assets/devices/Lock.svg +0 -19
- package/assets/devices/Louvre.svg +0 -7
- package/assets/devices/Mowing Machine.svg +0 -9
- package/assets/devices/Music.svg +0 -13
- package/assets/devices/Outdoor Blinds.svg +0 -7
- package/assets/devices/People.svg +0 -19
- package/assets/devices/Pool.svg +0 -8
- package/assets/devices/Power Consumption.svg +0 -13
- package/assets/devices/Printer.svg +0 -10
- package/assets/devices/Pump.svg +0 -10
- package/assets/devices/Receiver.svg +0 -19
- package/assets/devices/Sconces.svg +0 -10
- package/assets/devices/Security.svg +0 -34
- package/assets/devices/Shading.svg +0 -5
- package/assets/devices/Shutters.svg +0 -11
- package/assets/devices/SmokeDetector.svg +0 -13
- package/assets/devices/Sockets.svg +0 -13
- package/assets/devices/Speaker.svg +0 -35
- package/assets/devices/Stove.svg +0 -12
- package/assets/devices/Table Lamps.svg +0 -12
- package/assets/devices/Temperature Sensors.svg +0 -28
- package/assets/devices/Tv.svg +0 -8
- package/assets/devices/Vacuum Cleaner.svg +0 -16
- package/assets/devices/Ventilation.svg +0 -12
- package/assets/devices/Washing Machines.svg +0 -16
- package/assets/devices/Water Consumption.svg +0 -6
- package/assets/devices/Water Heater.svg +0 -8
- package/assets/devices/Water.svg +0 -40
- package/assets/devices/Weather.svg +0 -28
- package/assets/devices/Window.svg +0 -8
- package/assets/rooms/Anteroom.svg +0 -53
- package/assets/rooms/Attic.svg +0 -21
- package/assets/rooms/Balcony.svg +0 -13
- package/assets/rooms/Barn.svg +0 -6
- package/assets/rooms/Basement.svg +0 -5
- package/assets/rooms/Bathroom.svg +0 -38
- package/assets/rooms/Bedroom.svg +0 -5
- package/assets/rooms/Boiler Room.svg +0 -13
- package/assets/rooms/Carport.svg +0 -17
- package/assets/rooms/Cellar.svg +0 -89
- package/assets/rooms/Chamber.svg +0 -9
- package/assets/rooms/Corridor.svg +0 -53
- package/assets/rooms/Dining Area.svg +0 -37
- package/assets/rooms/Dining Room.svg +0 -37
- package/assets/rooms/Dining.svg +0 -37
- package/assets/rooms/Dressing Room.svg +0 -5
- package/assets/rooms/Driveway.svg +0 -15
- package/assets/rooms/Entrance.svg +0 -44
- package/assets/rooms/Equipment Room.svg +0 -15
- package/assets/rooms/Front Yard.svg +0 -64
- package/assets/rooms/Gallery.svg +0 -14
- package/assets/rooms/Garage.svg +0 -20
- package/assets/rooms/Garden.svg +0 -13
- package/assets/rooms/Ground Floor.svg +0 -95
- package/assets/rooms/Guest Bathroom.svg +0 -33
- package/assets/rooms/Guest Room.svg +0 -5
- package/assets/rooms/Gym.svg +0 -5
- package/assets/rooms/Hall.svg +0 -19
- package/assets/rooms/Home Theater.svg +0 -8
- package/assets/rooms/Kitchen.svg +0 -18
- package/assets/rooms/Laundry Room.svg +0 -12
- package/assets/rooms/Living Area.svg +0 -11
- package/assets/rooms/Living Room.svg +0 -10
- package/assets/rooms/Locker Room.svg +0 -17
- package/assets/rooms/Nursery.svg +0 -5
- package/assets/rooms/Office.svg +0 -8
- package/assets/rooms/Outdoors.svg +0 -7
- package/assets/rooms/Playroom.svg +0 -6
- package/assets/rooms/Pool.svg +0 -8
- package/assets/rooms/Rear Wall.svg +0 -30
- package/assets/rooms/Second Floor.svg +0 -95
- package/assets/rooms/Shed.svg +0 -16
- package/assets/rooms/Sleeping Area.svg +0 -22
- package/assets/rooms/Stairway.svg +0 -5
- package/assets/rooms/Stairwell.svg +0 -15
- package/assets/rooms/Storeroom.svg +0 -5
- package/assets/rooms/Summer House.svg +0 -27
- package/assets/rooms/Swimming Pool.svg +0 -21
- package/assets/rooms/Terrace.svg +0 -7
- package/assets/rooms/Toilet.svg +0 -10
- package/assets/rooms/Upstairs.svg +0 -6
- package/assets/rooms/Wardrobe.svg +0 -60
- package/assets/rooms/Washroom.svg +0 -20
- package/assets/rooms/Wc.svg +0 -10
- package/assets/rooms/Windscreen.svg +0 -60
- package/assets/rooms/Workshop.svg +0 -23
- package/assets/rooms/Workspace.svg +0 -8
package/LegacyConnection.d.ts
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* MIT License
|
|
5
5
|
*
|
|
6
|
-
|
|
6
|
+
*/
|
|
7
7
|
import { type HostInfo } from '@iobroker/js-controller-common-db/build/esm/lib/common/tools';
|
|
8
8
|
import { type FilteredNotificationInformation } from '@iobroker/js-controller-common/build/esm/lib/common/notificationHandler';
|
|
9
|
+
import type { IoBJson } from '@iobroker/types/build/config';
|
|
9
10
|
declare global {
|
|
10
11
|
interface Window {
|
|
11
12
|
adapterName: undefined | string;
|
|
@@ -15,6 +16,27 @@ declare global {
|
|
|
15
16
|
io: any;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
19
|
+
export type CompactSystemRepositoryEntry = {
|
|
20
|
+
link: string;
|
|
21
|
+
hash?: string;
|
|
22
|
+
stable?: boolean;
|
|
23
|
+
json: {
|
|
24
|
+
_repoInfo: {
|
|
25
|
+
stable?: boolean;
|
|
26
|
+
name?: ioBroker.StringOrTranslated;
|
|
27
|
+
};
|
|
28
|
+
} | null | undefined;
|
|
29
|
+
};
|
|
30
|
+
export type CompactSystemRepository = {
|
|
31
|
+
_id: ioBroker.HostObject['_id'];
|
|
32
|
+
common: {
|
|
33
|
+
name: ioBroker.HostCommon['name'];
|
|
34
|
+
dontDelete: boolean;
|
|
35
|
+
};
|
|
36
|
+
native: {
|
|
37
|
+
repositories: Record<string, CompactSystemRepositoryEntry>;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
18
40
|
/** Possible progress states. */
|
|
19
41
|
export declare const PROGRESS: {
|
|
20
42
|
/** The socket is connecting. */
|
|
@@ -133,7 +155,8 @@ declare class Connection {
|
|
|
133
155
|
constructor(props: ConnectionProps);
|
|
134
156
|
/**
|
|
135
157
|
* Checks if this connection is running in a web adapter and not in an admin.
|
|
136
|
-
*
|
|
158
|
+
*
|
|
159
|
+
* @returns True if running in a web adapter or in a socketio adapter.
|
|
137
160
|
*/
|
|
138
161
|
static isWeb(): boolean;
|
|
139
162
|
/**
|
|
@@ -167,19 +190,16 @@ declare class Connection {
|
|
|
167
190
|
private onConnect;
|
|
168
191
|
/**
|
|
169
192
|
* Called internally.
|
|
170
|
-
* @private
|
|
171
193
|
*/
|
|
172
|
-
static authenticate
|
|
194
|
+
private static authenticate;
|
|
173
195
|
/**
|
|
174
196
|
* Subscribe to changes of the given state.
|
|
197
|
+
*
|
|
198
|
+
* @param id The ioBroker state ID or array of states
|
|
199
|
+
* @param binary Set to true if the given state is binary and requires Base64 decoding
|
|
200
|
+
* @param cb The callback
|
|
175
201
|
*/
|
|
176
|
-
subscribeState(
|
|
177
|
-
/** The ioBroker state ID. */
|
|
178
|
-
id: string | string[],
|
|
179
|
-
/** Set to true if the given state is binary and requires Base64 decoding. */
|
|
180
|
-
binary: boolean | ioBroker.StateChangeHandler | BinaryStateChangeHandler,
|
|
181
|
-
/** The callback. */
|
|
182
|
-
cb?: ioBroker.StateChangeHandler | BinaryStateChangeHandler): void;
|
|
202
|
+
subscribeState(id: string | string[], binary: boolean | ioBroker.StateChangeHandler | BinaryStateChangeHandler, cb?: ioBroker.StateChangeHandler | BinaryStateChangeHandler): void;
|
|
183
203
|
/**
|
|
184
204
|
* Subscribe to changes of the given state.
|
|
185
205
|
*/
|
|
@@ -198,29 +218,28 @@ declare class Connection {
|
|
|
198
218
|
cb?: ioBroker.StateChangeHandler | BinaryStateChangeHandler): void;
|
|
199
219
|
/**
|
|
200
220
|
* Subscribe to changes of the given object.
|
|
221
|
+
*
|
|
222
|
+
* @param id The ioBroker object ID or array of objects
|
|
223
|
+
* @param cb The callback
|
|
201
224
|
*/
|
|
202
|
-
subscribeObject(
|
|
203
|
-
/** The ioBroker object ID. */
|
|
204
|
-
id: string | string[],
|
|
205
|
-
/** The callback. */
|
|
206
|
-
cb: ioBroker.ObjectChangeHandler): Promise<void>;
|
|
225
|
+
subscribeObject(id: string | string[], cb: ioBroker.ObjectChangeHandler): Promise<void>;
|
|
207
226
|
/**
|
|
208
227
|
* Unsubscribes all or the given callback from changes of the given object.
|
|
228
|
+
*
|
|
229
|
+
* @param id The ioBroker object ID or array of objects
|
|
230
|
+
* @param cb The callback
|
|
209
231
|
*/
|
|
210
|
-
unsubscribeObject(
|
|
211
|
-
/** The ioBroker object ID. */
|
|
212
|
-
id: string | string[],
|
|
213
|
-
/** The callback. */
|
|
214
|
-
cb?: ioBroker.ObjectChangeHandler): Promise<void>;
|
|
232
|
+
unsubscribeObject(id: string | string[], cb?: ioBroker.ObjectChangeHandler): Promise<void>;
|
|
215
233
|
/**
|
|
216
234
|
* Called internally.
|
|
217
235
|
*/
|
|
218
236
|
private fileChange;
|
|
219
237
|
/**
|
|
220
238
|
* Subscribe to changes of the files.
|
|
221
|
-
*
|
|
222
|
-
* @param
|
|
223
|
-
* @param
|
|
239
|
+
*
|
|
240
|
+
* @param id The ioBroker state ID for meta-object. Could be a pattern
|
|
241
|
+
* @param filePattern Pattern or file name, like 'main/*' or 'main/visViews.json`
|
|
242
|
+
* @param cb The callback.
|
|
224
243
|
*/
|
|
225
244
|
subscribeFiles(
|
|
226
245
|
/** The ioBroker state ID for meta-object. Could be a pattern */
|
|
@@ -231,9 +250,10 @@ declare class Connection {
|
|
|
231
250
|
cb: ioBroker.FileChangeHandler): Promise<void>;
|
|
232
251
|
/**
|
|
233
252
|
* Unsubscribes the given callback from changes of files.
|
|
234
|
-
*
|
|
235
|
-
* @param
|
|
236
|
-
* @param
|
|
253
|
+
*
|
|
254
|
+
* @param id The ioBroker state ID.
|
|
255
|
+
* @param filePattern Pattern or file name, like 'main/*' or 'main/visViews.json`
|
|
256
|
+
* @param cb The callback.
|
|
237
257
|
*/
|
|
238
258
|
unsubscribeFiles(id: string, filePattern: string, cb?: ioBroker.FileChangeHandler): void;
|
|
239
259
|
/**
|
|
@@ -246,91 +266,85 @@ declare class Connection {
|
|
|
246
266
|
private stateChange;
|
|
247
267
|
/**
|
|
248
268
|
* Called internally.
|
|
249
|
-
*
|
|
250
|
-
* @param
|
|
251
|
-
* @param
|
|
269
|
+
*
|
|
270
|
+
* @param messageType The message type
|
|
271
|
+
* @param sourceInstance The source instance
|
|
272
|
+
* @param data Payload
|
|
252
273
|
*/
|
|
253
274
|
instanceMessage(messageType: string, sourceInstance: string, data: Record<string, any>): void;
|
|
254
275
|
/**
|
|
255
276
|
* Gets all states.
|
|
277
|
+
*
|
|
278
|
+
* @param pattern The pattern to filter states
|
|
279
|
+
* @param disableProgressUpdate Don't call onProgress() when done
|
|
256
280
|
*/
|
|
257
|
-
getStates(
|
|
258
|
-
/** The pattern to filter states. */
|
|
259
|
-
pattern?: string | boolean,
|
|
260
|
-
/** don't call onProgress() when done */
|
|
261
|
-
disableProgressUpdate?: boolean): Promise<Record<string, ioBroker.State>>;
|
|
281
|
+
getStates(pattern?: string | boolean, disableProgressUpdate?: boolean): Promise<Record<string, ioBroker.State>>;
|
|
262
282
|
/**
|
|
263
283
|
* Gets the given state.
|
|
284
|
+
*
|
|
285
|
+
* @param id The state ID
|
|
264
286
|
*/
|
|
265
|
-
getState(
|
|
266
|
-
/** The state ID. */
|
|
267
|
-
id: string): Promise<ioBroker.State | null>;
|
|
287
|
+
getState(id: string): Promise<ioBroker.State | null>;
|
|
268
288
|
/**
|
|
269
|
-
* @deprecated since js-controller 5.0. Use files instead.
|
|
270
289
|
* Get the given binary state.
|
|
290
|
+
*
|
|
291
|
+
* @deprecated since js-controller 5.0. Use files instead.
|
|
292
|
+
* @param id The state ID.
|
|
271
293
|
*/
|
|
272
|
-
getBinaryState(
|
|
273
|
-
/** The state ID. */
|
|
274
|
-
id: string): Promise<string>;
|
|
294
|
+
getBinaryState(id: string): Promise<string>;
|
|
275
295
|
/**
|
|
276
|
-
* @deprecated since js-controller 5.0. Use files instead.
|
|
277
296
|
* Set the given binary state.
|
|
297
|
+
*
|
|
298
|
+
* @deprecated since js-controller 5.0. Use files instead.
|
|
299
|
+
* @param id The state ID.
|
|
300
|
+
* @param base64 The Base64 encoded binary data.
|
|
278
301
|
*/
|
|
279
|
-
setBinaryState(
|
|
280
|
-
/** The state ID. */
|
|
281
|
-
id: string,
|
|
282
|
-
/** The Base64 encoded binary data. */
|
|
283
|
-
base64: string): Promise<void>;
|
|
302
|
+
setBinaryState(id: string, base64: string): Promise<void>;
|
|
284
303
|
/**
|
|
285
304
|
* Sets the given state value.
|
|
305
|
+
*
|
|
306
|
+
* @param id The state ID
|
|
307
|
+
* @param val The state value
|
|
308
|
+
* @param ack The acknowledgment flag
|
|
286
309
|
*/
|
|
287
|
-
setState(
|
|
288
|
-
/** The state ID. */
|
|
289
|
-
id: string,
|
|
290
|
-
/** The state value. */
|
|
291
|
-
val: string | number | boolean | ioBroker.SettableState | null,
|
|
292
|
-
/** The acknowledgment flag. */
|
|
293
|
-
ack?: boolean): Promise<void>;
|
|
310
|
+
setState(id: string, val: string | number | boolean | ioBroker.SettableState | null, ack?: boolean): Promise<void>;
|
|
294
311
|
/**
|
|
295
312
|
* Gets all objects.
|
|
313
|
+
*
|
|
314
|
+
* @param update Set to true to retrieve all objects from the server (instead of using the local cache)
|
|
315
|
+
* @param disableProgressUpdate Don't call onProgress() when done
|
|
296
316
|
*/
|
|
297
|
-
getObjects(
|
|
298
|
-
/** Set to true to retrieve all objects from the server (instead of using the local cache). */
|
|
299
|
-
update?: boolean,
|
|
300
|
-
/** don't call onProgress() when done */
|
|
301
|
-
disableProgressUpdate?: boolean): Promise<Record<string, ioBroker.Object>>;
|
|
317
|
+
getObjects(update?: boolean, disableProgressUpdate?: boolean): Promise<Record<string, ioBroker.Object>>;
|
|
302
318
|
/**
|
|
303
319
|
* Gets objects by list of IDs.
|
|
320
|
+
*
|
|
321
|
+
* @param list Array of object IDs to retrieve
|
|
304
322
|
*/
|
|
305
|
-
getObjectsById(
|
|
306
|
-
/** Array of object IDs to retrieve. */
|
|
307
|
-
list: string[]): Promise<Record<string, ioBroker.Object>>;
|
|
323
|
+
getObjectsById(list: string[]): Promise<Record<string, ioBroker.Object>>;
|
|
308
324
|
/**
|
|
309
325
|
* Called internally.
|
|
310
326
|
*/
|
|
311
327
|
private _subscribe;
|
|
312
328
|
/**
|
|
313
329
|
* Requests log updates.
|
|
330
|
+
*
|
|
331
|
+
* @param isEnabled Set to true to get logs
|
|
314
332
|
*/
|
|
315
|
-
requireLog(
|
|
316
|
-
/** Set to true to get logs. */
|
|
317
|
-
isEnabled: boolean): Promise<void>;
|
|
333
|
+
requireLog(isEnabled: boolean): Promise<void>;
|
|
318
334
|
/**
|
|
319
335
|
* Deletes the given object.
|
|
336
|
+
*
|
|
337
|
+
* @param id The object ID
|
|
338
|
+
* @param maintenance Force deletion of non-conform IDs
|
|
320
339
|
*/
|
|
321
|
-
delObject(
|
|
322
|
-
/** The object ID. */
|
|
323
|
-
id: string,
|
|
324
|
-
/** Force deletion of non-conform IDs. */
|
|
325
|
-
maintenance?: boolean): Promise<void>;
|
|
340
|
+
delObject(id: string, maintenance?: boolean): Promise<void>;
|
|
326
341
|
/**
|
|
327
342
|
* Deletes the given object and all its children.
|
|
343
|
+
*
|
|
344
|
+
* @param id The object ID
|
|
345
|
+
* @param maintenance Force deletion of non-conform IDs
|
|
328
346
|
*/
|
|
329
|
-
delObjects(
|
|
330
|
-
/** The object ID. */
|
|
331
|
-
id: string,
|
|
332
|
-
/** Force deletion of non-conform IDs. */
|
|
333
|
-
maintenance?: boolean): Promise<void>;
|
|
347
|
+
delObjects(id: string, maintenance?: boolean): Promise<void>;
|
|
334
348
|
/**
|
|
335
349
|
* Sets the object.
|
|
336
350
|
*/
|
|
@@ -341,53 +355,48 @@ declare class Connection {
|
|
|
341
355
|
getObject(id: string): Promise<ioBroker.Object>;
|
|
342
356
|
/**
|
|
343
357
|
* Get all instances of the given adapter or all instances of all adapters.
|
|
358
|
+
*
|
|
359
|
+
* @param adapter The name of the adapter
|
|
360
|
+
* @param update Force update
|
|
344
361
|
*/
|
|
345
|
-
getAdapterInstances(
|
|
346
|
-
/** The name of the adapter. */
|
|
347
|
-
adapter?: string | boolean,
|
|
348
|
-
/** Force update. */
|
|
349
|
-
update?: boolean): Promise<ioBroker.InstanceObject[]>;
|
|
362
|
+
getAdapterInstances(adapter?: string | boolean, update?: boolean): Promise<ioBroker.InstanceObject[]>;
|
|
350
363
|
/**
|
|
351
364
|
* Get adapters with the given name or all adapters.
|
|
365
|
+
*
|
|
366
|
+
* @param adapter The name of the adapter
|
|
367
|
+
* @param update Force update
|
|
352
368
|
*/
|
|
353
|
-
getAdapters(
|
|
354
|
-
/** The name of the adapter. */
|
|
355
|
-
adapter?: string | boolean,
|
|
356
|
-
/** Force update. */
|
|
357
|
-
update?: boolean): Promise<ioBroker.AdapterObject[]>;
|
|
369
|
+
getAdapters(adapter?: string | boolean, update?: boolean): Promise<ioBroker.AdapterObject[]>;
|
|
358
370
|
/**
|
|
359
371
|
* Called internally.
|
|
360
372
|
*/
|
|
361
373
|
private _renameGroups;
|
|
362
374
|
/**
|
|
363
375
|
* Rename a group.
|
|
376
|
+
*
|
|
364
377
|
* @param id The id.
|
|
365
|
-
* @param
|
|
366
|
-
* @param
|
|
378
|
+
* @param newId The new id.
|
|
379
|
+
* @param newName The new name.
|
|
367
380
|
*/
|
|
368
381
|
renameGroup(id: string, newId: string, newName: ioBroker.StringOrTranslated): Promise<void>;
|
|
369
382
|
/**
|
|
370
383
|
* Sends a message to a specific instance or all instances of some specific adapter.
|
|
371
|
-
*
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
command: string,
|
|
378
|
-
/** The message data to send. */
|
|
379
|
-
data: any): Promise<{
|
|
384
|
+
*
|
|
385
|
+
* @param instance The instance to send this message to.
|
|
386
|
+
* @param command Command name of the target instance.
|
|
387
|
+
* @param data The message data to send.
|
|
388
|
+
*/
|
|
389
|
+
sendTo(instance: string, command: string, data: any): Promise<{
|
|
380
390
|
result?: any;
|
|
381
391
|
error?: string;
|
|
382
392
|
}>;
|
|
383
393
|
/**
|
|
384
394
|
* Extend an object and create it if it might not exist.
|
|
395
|
+
*
|
|
396
|
+
* @param id The id.
|
|
397
|
+
* @param obj The object.
|
|
385
398
|
*/
|
|
386
|
-
extendObject(
|
|
387
|
-
/** The id. */
|
|
388
|
-
id: string,
|
|
389
|
-
/** The object. */
|
|
390
|
-
obj: ioBroker.PartialObject): Promise<void>;
|
|
399
|
+
extendObject(id: string, obj: ioBroker.PartialObject): Promise<void>;
|
|
391
400
|
/**
|
|
392
401
|
* Register a handler for log messages.
|
|
393
402
|
*/
|
|
@@ -406,7 +415,8 @@ declare class Connection {
|
|
|
406
415
|
unregisterConnectionHandler(handler: (connected: boolean) => void): void;
|
|
407
416
|
/**
|
|
408
417
|
* Set the handler for standard output of a command.
|
|
409
|
-
*
|
|
418
|
+
*
|
|
419
|
+
* @param handler The handler.
|
|
410
420
|
*/
|
|
411
421
|
registerCmdStdoutHandler(handler: (id: string, text: string) => void): void;
|
|
412
422
|
/**
|
|
@@ -415,7 +425,8 @@ declare class Connection {
|
|
|
415
425
|
unregisterCmdStdoutHandler(): void;
|
|
416
426
|
/**
|
|
417
427
|
* Set the handler for standard error of a command.
|
|
418
|
-
*
|
|
428
|
+
*
|
|
429
|
+
* @param handler The handler.
|
|
419
430
|
*/
|
|
420
431
|
registerCmdStderrHandler(handler: (id: string, text: string) => void): void;
|
|
421
432
|
/**
|
|
@@ -440,10 +451,11 @@ declare class Connection {
|
|
|
440
451
|
update?: boolean): Promise<Record<string, ioBroker.EnumObject>>;
|
|
441
452
|
/**
|
|
442
453
|
* Query a predefined object view.
|
|
454
|
+
*
|
|
443
455
|
* @param design design - 'system' or other designs like `custom`.
|
|
444
456
|
* @param type The type of object.
|
|
445
457
|
* @param start The start ID.
|
|
446
|
-
* @param
|
|
458
|
+
* @param end The end ID.
|
|
447
459
|
*/
|
|
448
460
|
getObjectViewCustom(
|
|
449
461
|
/** The design: 'system' or other designs like `custom`. */
|
|
@@ -456,32 +468,27 @@ declare class Connection {
|
|
|
456
468
|
end?: string): Promise<Record<string, ioBroker.Object>>;
|
|
457
469
|
/**
|
|
458
470
|
* Query a predefined object view.
|
|
471
|
+
*
|
|
459
472
|
* @param type The type of object.
|
|
460
473
|
* @param start The start ID.
|
|
461
|
-
* @param
|
|
474
|
+
* @param end The end ID.
|
|
462
475
|
*/
|
|
463
|
-
getObjectViewSystem(
|
|
464
|
-
/** The type of object. */
|
|
465
|
-
type: ioBroker.ObjectType,
|
|
466
|
-
/** The start ID. */
|
|
467
|
-
start: string,
|
|
468
|
-
/** The end ID. */
|
|
469
|
-
end?: string): Promise<Record<string, ioBroker.Object>>;
|
|
476
|
+
getObjectViewSystem(type: ioBroker.ObjectType, start: string, end?: string): Promise<Record<string, ioBroker.Object>>;
|
|
470
477
|
/**
|
|
471
478
|
* @deprecated since version 1.1.15, cause parameter order does not match backend
|
|
479
|
+
*
|
|
472
480
|
* Query a predefined object view.
|
|
473
|
-
* @param
|
|
474
|
-
* @param
|
|
475
|
-
* @param
|
|
476
|
-
* @returns {Promise<Record<string, ioBroker.Object>>}
|
|
481
|
+
* @param start The start ID.
|
|
482
|
+
* @param end The end ID.
|
|
483
|
+
* @param type The type of object.
|
|
477
484
|
*/
|
|
478
485
|
getObjectView(start: string, end: string, type: ioBroker.ObjectType): Promise<Record<string, ioBroker.Object>>;
|
|
479
486
|
/**
|
|
480
487
|
* Get the stored certificates.
|
|
488
|
+
*
|
|
489
|
+
* @param update Force update.
|
|
481
490
|
*/
|
|
482
|
-
getCertificates(
|
|
483
|
-
/** Force update. */
|
|
484
|
-
update?: boolean): Promise<{
|
|
491
|
+
getCertificates(update?: boolean): Promise<{
|
|
485
492
|
name: string;
|
|
486
493
|
type: 'public' | 'private' | 'chained' | '';
|
|
487
494
|
}[]>;
|
|
@@ -503,114 +510,107 @@ declare class Connection {
|
|
|
503
510
|
readMetaItems(): Promise<ioBroker.MetaObject[]>;
|
|
504
511
|
/**
|
|
505
512
|
* Read the directory of an adapter.
|
|
513
|
+
*
|
|
514
|
+
* @param adapter The adapter name.
|
|
515
|
+
* @param fileName The directory name.
|
|
506
516
|
*/
|
|
507
|
-
readDir(
|
|
508
|
-
/** The adapter name. */
|
|
509
|
-
adapter: string,
|
|
510
|
-
/** The directory name. */
|
|
511
|
-
fileName: string): Promise<ioBroker.ReadDirResult[]>;
|
|
517
|
+
readDir(adapter: string, fileName: string): Promise<ioBroker.ReadDirResult[]>;
|
|
512
518
|
/**
|
|
513
519
|
* Read a file of an adapter.
|
|
520
|
+
*
|
|
521
|
+
* @param adapter The adapter name.
|
|
522
|
+
* @param fileName The file name.
|
|
523
|
+
* @param base64 If it must be a base64 format.
|
|
514
524
|
*/
|
|
515
|
-
readFile(
|
|
516
|
-
/** The adapter name. */
|
|
517
|
-
adapter: string,
|
|
518
|
-
/** The file name. */
|
|
519
|
-
fileName: string,
|
|
520
|
-
/** If it must be a base64 format */
|
|
521
|
-
base64?: boolean): Promise<string | {
|
|
525
|
+
readFile(adapter: string, fileName: string, base64?: boolean): Promise<string | {
|
|
522
526
|
data: string;
|
|
523
527
|
type: string;
|
|
524
528
|
}>;
|
|
525
529
|
/**
|
|
526
530
|
* Write a file of an adapter.
|
|
531
|
+
*
|
|
532
|
+
* @param adapter The adapter name.
|
|
533
|
+
* @param fileName The file name.
|
|
534
|
+
* @param data The data (if it's a Buffer, it will be converted to Base64)
|
|
527
535
|
*/
|
|
528
|
-
writeFile64(
|
|
529
|
-
/** The adapter name. */
|
|
530
|
-
adapter: string,
|
|
531
|
-
/** The file name. */
|
|
532
|
-
fileName: string,
|
|
533
|
-
/** The data (if it's a Buffer, it will be converted to Base64). */
|
|
534
|
-
data: Buffer | string): Promise<void>;
|
|
536
|
+
writeFile64(adapter: string, fileName: string, data: Buffer | string): Promise<void>;
|
|
535
537
|
/**
|
|
536
538
|
* Delete a file of an adapter.
|
|
539
|
+
*
|
|
540
|
+
* @param adapter The adapter name.
|
|
541
|
+
* @param fileName The file name.
|
|
537
542
|
*/
|
|
538
|
-
deleteFile(
|
|
539
|
-
/** The adapter name. */
|
|
540
|
-
adapter: string,
|
|
541
|
-
/** The file name. */
|
|
542
|
-
fileName: string): Promise<void>;
|
|
543
|
+
deleteFile(adapter: string, fileName: string): Promise<void>;
|
|
543
544
|
/**
|
|
544
545
|
* Delete a folder of an adapter.
|
|
545
546
|
* All files in folder will be deleted.
|
|
547
|
+
*
|
|
548
|
+
* @param adapter The adapter name.
|
|
549
|
+
* @param folderName The folder name.
|
|
546
550
|
*/
|
|
547
|
-
deleteFolder(
|
|
548
|
-
/** The adapter name. */
|
|
549
|
-
adapter: string,
|
|
550
|
-
/** The file name. */
|
|
551
|
-
folderName: string): Promise<void>;
|
|
551
|
+
deleteFolder(adapter: string, folderName: string): Promise<void>;
|
|
552
552
|
/**
|
|
553
553
|
* Get the list of all hosts.
|
|
554
|
-
*
|
|
554
|
+
*
|
|
555
|
+
* @param update Force update.
|
|
555
556
|
*/
|
|
556
557
|
getHosts(update?: boolean): Promise<ioBroker.HostObject[]>;
|
|
557
558
|
/**
|
|
558
559
|
* Get the list of all users.
|
|
560
|
+
*
|
|
561
|
+
* @param update Force update.
|
|
559
562
|
*/
|
|
560
|
-
getUsers(
|
|
561
|
-
/** Force update. */
|
|
562
|
-
update?: boolean): Promise<ioBroker.UserObject[]>;
|
|
563
|
+
getUsers(update?: boolean): Promise<ioBroker.UserObject[]>;
|
|
563
564
|
/**
|
|
564
565
|
* Get the list of all groups.
|
|
566
|
+
*
|
|
567
|
+
* @param update Force update.
|
|
565
568
|
*/
|
|
566
|
-
getGroups(
|
|
567
|
-
/** Force update. */
|
|
568
|
-
update?: boolean): Promise<ioBroker.GroupObject[]>;
|
|
569
|
+
getGroups(update?: boolean): Promise<ioBroker.GroupObject[]>;
|
|
569
570
|
/**
|
|
570
571
|
* Get the host information.
|
|
572
|
+
*
|
|
573
|
+
* @param host The host name.
|
|
574
|
+
* @param update Force update.
|
|
575
|
+
* @param timeoutMs Optional read timeout.
|
|
571
576
|
*/
|
|
572
|
-
getHostInfo(host: string,
|
|
573
|
-
/** Force update. */
|
|
574
|
-
update?: boolean,
|
|
575
|
-
/** optional read timeout. */
|
|
576
|
-
timeoutMs?: number): Promise<HostInfo>;
|
|
577
|
+
getHostInfo(host: string, update?: boolean, timeoutMs?: number): Promise<HostInfo>;
|
|
577
578
|
/**
|
|
578
579
|
* Get the host information (short version).
|
|
580
|
+
*
|
|
581
|
+
* @param host The host name.
|
|
582
|
+
* @param update Force update.
|
|
583
|
+
* @param timeoutMs Optional read timeout.
|
|
579
584
|
*/
|
|
580
|
-
getHostInfoShort(host: string,
|
|
581
|
-
/** Force update. */
|
|
582
|
-
update?: boolean,
|
|
583
|
-
/** optional read timeout. */
|
|
584
|
-
timeoutMs?: number): Promise<HostInfo>;
|
|
585
|
+
getHostInfoShort(host: string, update?: boolean, timeoutMs?: number): Promise<HostInfo>;
|
|
585
586
|
/**
|
|
586
587
|
* Get the repository.
|
|
588
|
+
*
|
|
589
|
+
* @param host The host name.
|
|
590
|
+
* @param options Options.
|
|
591
|
+
* @param update Force update.
|
|
592
|
+
* @param timeoutMs Timeout in ms.
|
|
587
593
|
*/
|
|
588
594
|
getRepository(host: string, options?: {
|
|
589
595
|
update: boolean;
|
|
590
596
|
repo: string;
|
|
591
|
-
} | string,
|
|
592
|
-
/** Force update. */
|
|
593
|
-
update?: boolean,
|
|
594
|
-
/** timeout in ms. */
|
|
595
|
-
timeoutMs?: number): Promise<Record<string, ioBroker.AdapterObject>>;
|
|
597
|
+
} | string, update?: boolean, timeoutMs?: number): Promise<Record<string, ioBroker.AdapterObject>>;
|
|
596
598
|
/**
|
|
597
599
|
* Get the installed.
|
|
600
|
+
*
|
|
601
|
+
* @param host The host name.
|
|
602
|
+
* @param update Force update.
|
|
603
|
+
* @param cmdTimeout Timeout in ms.
|
|
598
604
|
*/
|
|
599
|
-
getInstalled(host: string,
|
|
600
|
-
/** Force update. */
|
|
601
|
-
update?: boolean,
|
|
602
|
-
/** timeout in ms */
|
|
603
|
-
cmdTimeout?: number): Promise<Record<string, ioBroker.AdapterObject>>;
|
|
605
|
+
getInstalled(host: string, update?: boolean, cmdTimeout?: number): Promise<Record<string, ioBroker.AdapterObject>>;
|
|
604
606
|
/**
|
|
605
607
|
* Rename file or folder in ioBroker DB
|
|
608
|
+
*
|
|
609
|
+
* @param adapter Instance name, like `vis-2.0`.
|
|
610
|
+
* @param oldName The current file name, e.g., main/vis-views.json
|
|
611
|
+
* @param newName The new file name, e.g., main/vis-views-new.json
|
|
606
612
|
*/
|
|
607
|
-
rename(
|
|
608
|
-
/** instance name */
|
|
609
|
-
adapter: string,
|
|
610
|
-
/** current file name, e.g., main/vis-views.json */
|
|
611
|
-
oldName: string,
|
|
612
|
-
/** new file name, e.g., main/vis-views-new.json */
|
|
613
|
-
newName: string): Promise<void>;
|
|
613
|
+
rename(adapter: string, oldName: string, newName: string): Promise<void>;
|
|
614
614
|
/**
|
|
615
615
|
* Rename file in ioBroker DB
|
|
616
616
|
*/
|
|
@@ -647,11 +647,11 @@ declare class Connection {
|
|
|
647
647
|
readBaseSettings(host: string): Promise<Record<string, any>>;
|
|
648
648
|
/**
|
|
649
649
|
* Write the base settings of a given host.
|
|
650
|
-
*
|
|
651
|
-
* @param
|
|
652
|
-
* @
|
|
650
|
+
*
|
|
651
|
+
* @param host The host name.
|
|
652
|
+
* @param config The new base settings.
|
|
653
653
|
*/
|
|
654
|
-
writeBaseSettings(host: string, config:
|
|
654
|
+
writeBaseSettings(host: string, config: IoBJson): Promise<{
|
|
655
655
|
result?: 'ok';
|
|
656
656
|
error?: string;
|
|
657
657
|
}>;
|
|
@@ -661,9 +661,9 @@ declare class Connection {
|
|
|
661
661
|
restartController(host: string): Promise<boolean>;
|
|
662
662
|
/**
|
|
663
663
|
* Read statistics information from host
|
|
664
|
-
*
|
|
665
|
-
* @param
|
|
666
|
-
* @
|
|
664
|
+
*
|
|
665
|
+
* @param host Host name
|
|
666
|
+
* @param typeOfDiag one of none, normal, no-city, extended
|
|
667
667
|
*/
|
|
668
668
|
getDiagData(host: string, typeOfDiag: 'none' | 'normal' | 'no-city' | 'extended'): Promise<Record<string, any>>;
|
|
669
669
|
/**
|
|
@@ -672,13 +672,12 @@ declare class Connection {
|
|
|
672
672
|
getForeignStates(pattern?: string): Promise<Record<string, ioBroker.State>>;
|
|
673
673
|
/**
|
|
674
674
|
* Get foreign objects by pattern, by specific type and resolve their enums. (Only admin)
|
|
675
|
-
* @returns {ioBroker.GetObjectsPromise}
|
|
676
675
|
*/
|
|
677
676
|
getForeignObjects(pattern: string, type?: ioBroker.ObjectType): Promise<Record<string, ioBroker.State>>;
|
|
678
677
|
/**
|
|
679
678
|
* Gets the system configuration.
|
|
680
|
-
*
|
|
681
|
-
* @
|
|
679
|
+
*
|
|
680
|
+
* @param update Force update.
|
|
682
681
|
*/
|
|
683
682
|
getSystemConfig(update?: boolean): Promise<ioBroker.SystemConfigObject>;
|
|
684
683
|
/**
|
|
@@ -731,7 +730,6 @@ declare class Connection {
|
|
|
731
730
|
decrypt(encryptedText: string): Promise<string>;
|
|
732
731
|
/**
|
|
733
732
|
* Gets the version.
|
|
734
|
-
* @returns {Promise<{version: string; serverName: string}>}
|
|
735
733
|
*/
|
|
736
734
|
getVersion(update?: boolean): Promise<{
|
|
737
735
|
version: string;
|
|
@@ -739,11 +737,11 @@ declare class Connection {
|
|
|
739
737
|
}>;
|
|
740
738
|
/**
|
|
741
739
|
* Gets the web server name.
|
|
742
|
-
* @returns {Promise<string>}
|
|
743
740
|
*/
|
|
744
741
|
getWebServerName(): Promise<string>;
|
|
745
742
|
/**
|
|
746
743
|
* Gets the admin version.
|
|
744
|
+
*
|
|
747
745
|
* @deprecated use getVersion()
|
|
748
746
|
*/
|
|
749
747
|
getAdminVersion(): Promise<{
|
|
@@ -751,28 +749,29 @@ declare class Connection {
|
|
|
751
749
|
serverName: string;
|
|
752
750
|
}>;
|
|
753
751
|
/**
|
|
754
|
-
* Change access rights for file
|
|
752
|
+
* Change access rights for a file
|
|
753
|
+
*
|
|
754
|
+
* @param adapter The adapter name.
|
|
755
|
+
* @param fileName file name with a full path. It could be like vis.0/*
|
|
756
|
+
* @param options like {mode: 0x644}
|
|
757
|
+
* @param options.mode Access rights. Default is 0x644
|
|
755
758
|
*/
|
|
756
|
-
chmodFile(
|
|
757
|
-
/** adapter name */
|
|
758
|
-
adapter: string,
|
|
759
|
-
/** file name with a full path. It could be like vis.0/* */
|
|
760
|
-
filename: string,
|
|
761
|
-
/** like {mode: 0x644} */
|
|
762
|
-
options?: {
|
|
759
|
+
chmodFile(adapter: string, fileName: string, options?: {
|
|
763
760
|
mode: number;
|
|
764
761
|
}): Promise<{
|
|
765
762
|
entries: ioBroker.ChownFileResult[];
|
|
766
763
|
id: string;
|
|
767
764
|
}>;
|
|
768
765
|
/**
|
|
769
|
-
* Change an owner or/and owner group for file
|
|
766
|
+
* Change an owner or/and owner group for a file
|
|
767
|
+
*
|
|
768
|
+
* @param adapter The adapter name.
|
|
769
|
+
* @param fileName file name with a full path. It could be like vis.0/*
|
|
770
|
+
* @param options like {owner: 'user', ownerGroup: 'group'}
|
|
771
|
+
* @param options.owner User name
|
|
772
|
+
* @param options.ownerGroup Group name
|
|
770
773
|
*/
|
|
771
|
-
chownFile(
|
|
772
|
-
/** adapter name */
|
|
773
|
-
adapter: string,
|
|
774
|
-
/** file name with a full path. It could be like vis.0/* */
|
|
775
|
-
fileName: string, options: {
|
|
774
|
+
chownFile(adapter: string, fileName: string, options: {
|
|
776
775
|
owner?: string;
|
|
777
776
|
ownerGroup?: string;
|
|
778
777
|
}): Promise<{
|
|
@@ -781,22 +780,20 @@ declare class Connection {
|
|
|
781
780
|
}>;
|
|
782
781
|
/**
|
|
783
782
|
* Check if the file exists
|
|
783
|
+
*
|
|
784
|
+
* @param adapter The adapter name.
|
|
785
|
+
* @param fileName file name with a full path. It could be like vis.0/*
|
|
784
786
|
*/
|
|
785
|
-
fileExists(
|
|
786
|
-
/** adapter name */
|
|
787
|
-
adapter: string,
|
|
788
|
-
/** file name with a full path. It could be like vis.0/* */
|
|
789
|
-
fileName: string): Promise<boolean>;
|
|
787
|
+
fileExists(adapter: string, fileName: string): Promise<boolean>;
|
|
790
788
|
/**
|
|
791
789
|
* Get the alarm notifications from a host (only for admin connection).
|
|
792
|
-
* @returns {Promise<any>}
|
|
793
790
|
*/
|
|
794
791
|
getNotifications(host: string, category?: string): Promise<FilteredNotificationInformation>;
|
|
795
792
|
/**
|
|
796
793
|
* Clear the alarm notifications on a host (only for admin connection).
|
|
797
|
-
*
|
|
798
|
-
* @param
|
|
799
|
-
* @
|
|
794
|
+
*
|
|
795
|
+
* @param host The host name.
|
|
796
|
+
* @param category optional
|
|
800
797
|
*/
|
|
801
798
|
clearNotifications(host: string, category?: string): Promise<{
|
|
802
799
|
result: 'ok';
|
|
@@ -807,18 +804,17 @@ declare class Connection {
|
|
|
807
804
|
getIsEasyModeStrict(): Promise<boolean>;
|
|
808
805
|
/**
|
|
809
806
|
* Read easy mode configuration (only for admin connection).
|
|
810
|
-
* @returns {Promise<any>}
|
|
811
807
|
*/
|
|
812
808
|
getEasyMode(): Promise<any>;
|
|
813
809
|
/**
|
|
814
810
|
* Read current user
|
|
815
|
-
* @returns {Promise<string>}
|
|
816
811
|
*/
|
|
817
812
|
getCurrentUser(): Promise<string>;
|
|
818
|
-
getCurrentSession(cmdTimeout?: number): Promise<
|
|
813
|
+
getCurrentSession(cmdTimeout?: number): Promise<{
|
|
814
|
+
expireInSec: number;
|
|
815
|
+
}>;
|
|
819
816
|
/**
|
|
820
817
|
* Read adapter ratings
|
|
821
|
-
* @returns {Promise<any>}
|
|
822
818
|
*/
|
|
823
819
|
getRatings(update?: boolean): Promise<any>;
|
|
824
820
|
/**
|
|
@@ -834,14 +830,14 @@ declare class Connection {
|
|
|
834
830
|
* Reads only version of installed adapter
|
|
835
831
|
*/
|
|
836
832
|
getCompactInstalled(host: string, update?: boolean, cmdTimeout?: number): Promise<Record<string, ioBroker.AdapterObject>>;
|
|
837
|
-
getCompactSystemRepositories(update?: boolean, cmdTimeout?: number): Promise<
|
|
833
|
+
getCompactSystemRepositories(update?: boolean, cmdTimeout?: number): Promise<CompactSystemRepository>;
|
|
838
834
|
getCompactSystemConfig(update?: boolean): Promise<ioBroker.SystemConfigObject>;
|
|
839
835
|
/**
|
|
840
836
|
* Get the repository in compact form (only version and icon).
|
|
841
|
-
*
|
|
842
|
-
* @param
|
|
843
|
-
* @param
|
|
844
|
-
* @
|
|
837
|
+
*
|
|
838
|
+
* @param host The host name.
|
|
839
|
+
* @param update Force update.
|
|
840
|
+
* @param timeoutMs timeout in ms.
|
|
845
841
|
*/
|
|
846
842
|
getCompactRepository(host: string, update?: boolean, timeoutMs?: number): Promise<Record<string, {
|
|
847
843
|
version: string;
|
|
@@ -858,41 +854,37 @@ declare class Connection {
|
|
|
858
854
|
getUuid(): Promise<string | undefined>;
|
|
859
855
|
/**
|
|
860
856
|
* Subscribe on instance message
|
|
861
|
-
*
|
|
862
|
-
* @param
|
|
863
|
-
* @param
|
|
864
|
-
* @param
|
|
865
|
-
* @
|
|
866
|
-
*/
|
|
867
|
-
subscribeOnInstance(
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
/** message handler. Could be null if all callbacks for this messageType should be unsubscribed */
|
|
873
|
-
callback: (_data: Record<string, any>, sourceInstance: string, _messageType: string) => void): Promise<unknown>;
|
|
857
|
+
*
|
|
858
|
+
* @param targetInstance instance, like 'cameras.0'
|
|
859
|
+
* @param messageType message type like 'startCamera/cam3'
|
|
860
|
+
* @param data optional data object
|
|
861
|
+
* @param callback message handler
|
|
862
|
+
*/
|
|
863
|
+
subscribeOnInstance(targetInstance: string, messageType: string, data: any, callback: (_data: Record<string, any>, sourceInstance: string, _messageType: string) => void): Promise<{
|
|
864
|
+
error?: string;
|
|
865
|
+
accepted?: boolean;
|
|
866
|
+
heartbeat?: number;
|
|
867
|
+
}>;
|
|
874
868
|
/**
|
|
875
869
|
* Unsubscribe from instance message
|
|
870
|
+
*
|
|
871
|
+
* @param targetInstance instance, like 'cameras.0'
|
|
872
|
+
* @param messageType message type like 'startCamera/cam3'
|
|
873
|
+
* @param callback message handler. Could be null if all callbacks for this messageType should be unsubscribed
|
|
876
874
|
*/
|
|
877
|
-
unsubscribeFromInstance(
|
|
878
|
-
/** instance, like 'cameras.0' */
|
|
879
|
-
targetInstance: string,
|
|
880
|
-
/** message type like 'startCamera/cam3' */
|
|
881
|
-
messageType?: string,
|
|
882
|
-
/** message handler. Could be null if all callbacks for this messageType should be unsubscribed */
|
|
883
|
-
callback?: (data: Record<string, any>, sourceInstance: string, _messageType: string) => void): Promise<boolean>;
|
|
875
|
+
unsubscribeFromInstance(targetInstance: string, messageType?: string, callback?: (data: Record<string, any>, sourceInstance: string, _messageType: string) => void): Promise<boolean>;
|
|
884
876
|
/**
|
|
885
877
|
* Send log to ioBroker log
|
|
886
878
|
*/
|
|
887
879
|
log(text: string, level?: 'info' | 'debug' | 'warn' | 'error' | 'silly'): void;
|
|
888
880
|
/**
|
|
889
881
|
* Logout current user
|
|
890
|
-
* @returns {Promise<null>}
|
|
891
882
|
*/
|
|
892
883
|
logout(): Promise<void>;
|
|
893
884
|
/**
|
|
894
885
|
* This is a special method for vis.
|
|
895
886
|
* It is used to not send to server the changes about "nothing_selected" state
|
|
887
|
+
*
|
|
896
888
|
* @param id The state that has to be ignored by communication
|
|
897
889
|
*/
|
|
898
890
|
setStateToIgnore(id?: string | null): void;
|