@iobroker/js-controller-adapter 4.0.20 → 4.1.0-alpha.0-20220804-d8f17893

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.
@@ -1,42 +1,62 @@
1
1
  export = Adapter;
2
+ /**
3
+ * Polyfill to allow calling without `new`
4
+ * @type {AdapterClass}
5
+ */
6
+ declare const Adapter: AdapterClass;
2
7
  /**
3
8
  * Adapter class
4
9
  *
5
10
  * How the initialization happens:
6
- * initObjects => initStates => prepareInitAdapter => initAdapter => initLogging => createInstanceObjects => ready
11
+ * initObjects => initStates => prepareInitAdapter => initAdapter => initLogging => createInstancesObjects => ready
7
12
  *
8
13
  * @class
9
14
  * @param {string|object} options object like {name: "adapterName", systemConfig: true} or just "adapterName"
10
15
  * @return {object} object instance
11
16
  */
12
- declare function Adapter(options: string | object): object;
13
- declare class Adapter {
14
- /**
15
- * Adapter class
16
- *
17
- * How the initialization happens:
18
- * initObjects => initStates => prepareInitAdapter => initAdapter => initLogging => createInstanceObjects => ready
19
- *
20
- * @class
21
- * @param {string|object} options object like {name: "adapterName", systemConfig: true} or just "adapterName"
22
- * @return {object} object instance
23
- */
24
- constructor(options: string | object);
17
+ declare class AdapterClass extends EventEmitter {
18
+ constructor(options: any);
19
+ _options: any;
20
+ /** @type {Record<string, any>} */
21
+ _config: Record<string, any>;
25
22
  startedInCompactMode: any;
26
- logList: any[] | undefined;
27
- aliases: {} | undefined;
28
- aliasPatterns: any[] | undefined;
29
- enums: {} | undefined;
30
- eventLoopLags: any[] | undefined;
31
- overwriteLogLevel: boolean | undefined;
32
- adapterReady: boolean | undefined;
23
+ logList: Set<any>;
24
+ aliases: Map<any, any>;
25
+ aliasPatterns: Set<any>;
26
+ enums: {};
27
+ eventLoopLags: any[];
28
+ overwriteLogLevel: boolean;
29
+ adapterReady: boolean;
30
+ _stopInProgress: boolean;
31
+ _callbackId: number;
32
+ _firstConnection: boolean;
33
+ _timers: Set<any>;
34
+ _intervals: Set<any>;
35
+ _delays: Set<any>;
33
36
  tools: {
34
- encrypt: any;
35
- decrypt: any;
36
- } | undefined;
37
- performStrictObjectChecks: boolean | undefined;
38
- inited: boolean | undefined;
39
- _getObjectsByArray: ((keys: any, objects: any, options: any, cb: any, _index: any, _result: any, _errors: any) => any) | undefined;
37
+ encrypt: typeof tools.encrypt;
38
+ decrypt: typeof tools.decrypt;
39
+ };
40
+ performStrictObjectChecks: boolean;
41
+ _logger: import("winston").Logger;
42
+ /**
43
+ * Decrypt the password/value with given key
44
+ * @param {string} secretVal to use for decrypt (or value if only one parameter is given)
45
+ * @param {string} [value] value to decrypt (if secret is provided)
46
+ * @returns {string}
47
+ */
48
+ decrypt(secretVal: string, value?: string | undefined): string;
49
+ /**
50
+ * Encrypt the password/value with given key
51
+ * @param {string} secretVal to use for encrypt (or value if only one parameter is given)
52
+ * @param {string} [value] value to encrypt (if secret is provided)
53
+ * @returns {string}
54
+ */
55
+ encrypt(secretVal: string, value?: string | undefined): string;
56
+ getSession(id: any, callback: any): void | Promise<never>;
57
+ setSession(id: any, ttl: any, data: any, callback: any): void | Promise<never>;
58
+ destroySession(id: any, callback: any): void | Promise<never>;
59
+ _getObjectsByArray(keys: any, objects: any, options: any, cb: any, _index: any, _result: any, _errors: any): void | Promise<any>;
40
60
  /**
41
61
  * stops the execution of adapter, but not disables it.
42
62
  *
@@ -47,34 +67,10 @@ declare class Adapter {
47
67
  * @param {string | number} [reason] optional termination description
48
68
  * @param {number} [exitCode] optional exit code
49
69
  */
50
- terminate: ((reason?: string | number | undefined, exitCode?: number | undefined) => void) | undefined;
70
+ terminate(reason?: string | number | undefined, exitCode?: number | undefined): void;
51
71
  terminated: boolean | undefined;
52
- adapterDir: any;
53
- pack: any;
54
- ioPack: any;
55
- systemConfig: Record<string, any> | undefined;
56
- name: any;
57
- namespace: string | undefined;
58
- namespaceLog: string | undefined;
59
- _namespaceRegExp: RegExp | undefined;
60
- /** The cache of users */
61
- users: {} | undefined;
62
- /** The cache of usernames */
63
- usernames: {} | undefined;
64
- /** The cache of user groups */
65
- groups: {} | undefined;
66
- defaultHistory: any;
67
- /** An array of instances, that support auto subscribe */
68
- autoSubscribe: any[] | null;
69
- inputCount: number | undefined;
70
- outputCount: number | undefined;
71
- /** A RegExp to test for forbidden chars in object IDs */
72
- FORBIDDEN_CHARS: any;
73
- getPortRunning: {
74
- port: number;
75
- host: string | undefined;
76
- callback: (port: number) => void;
77
- } | null;
72
+ _reportInterval: NodeJS.Timer | null | undefined;
73
+ _restartScheduleJob: any;
78
74
  /**
79
75
  * Helper function to find next free port
80
76
  *
@@ -92,11 +88,12 @@ declare class Adapter {
92
88
  * @param {(port: number) => void} callback return result
93
89
  * <pre><code>function (port) {}</code></pre>
94
90
  */
95
- getPort: ((port: number, host?: string | undefined, callback: (port: number) => void) => void) | undefined;
96
- /**
97
- * Promise-version of Adapter.getPort
98
- */
99
- getPortAsync: any;
91
+ getPort(port: number, host?: string | undefined, callback: (port: number) => void): void;
92
+ getPortRunning: {
93
+ port: number;
94
+ host: string | undefined;
95
+ callback: (port: number) => void;
96
+ } | null | undefined;
100
97
  /**
101
98
  * Method to check for available Features for adapter development
102
99
  *
@@ -112,7 +109,7 @@ declare class Adapter {
112
109
  * @param {string} featureName the name of the feature to check
113
110
  * @returns {boolean} true/false if the feature is in the list of supported features
114
111
  */
115
- supportsFeature: ((featureName: string) => boolean) | undefined;
112
+ supportsFeature(featureName: string): boolean;
116
113
  /**
117
114
  * validates user and password
118
115
  *
@@ -129,18 +126,21 @@ declare class Adapter {
129
126
  * }
130
127
  * </code></pre>
131
128
  */
132
- checkPassword: ((user: string, pw: string, options?: object | undefined, callback: (success: boolean, user: string) => void) => Promise<void>) | undefined;
129
+ checkPassword(user: string, pw: string, options?: object | undefined, callback: (success: boolean, user: string) => void): Promise<void>;
133
130
  /**
134
- * Promise-version of Adapter.checkPassword
131
+ * This method update the cached values in this.usernames
132
+ *
133
+ * @returns {Promise<void>}
135
134
  */
136
- checkPasswordAsync: any;
135
+ _updateUsernameCache(): Promise<void>;
136
+ usernames: {} | undefined;
137
137
  /**
138
138
  * Return ID of given username
139
139
  *
140
140
  * @param {string} username - name of the user
141
141
  * @return {Promise<undefined|string>}
142
142
  */
143
- getUserID: ((username: string) => Promise<undefined | string>) | undefined;
143
+ getUserID(username: string): Promise<undefined | string>;
144
144
  /**
145
145
  * sets the user's password
146
146
  *
@@ -156,11 +156,7 @@ declare class Adapter {
156
156
  * }
157
157
  * </code></pre>
158
158
  */
159
- setPassword: ((user: string, pw: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => Promise<void>) | undefined;
160
- /**
161
- * Promise-version of Adapter.setPassword
162
- */
163
- setPasswordAsync: any;
159
+ setPassword(user: string, pw: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): Promise<void>;
164
160
  /**
165
161
  * returns if user exists and is in the group
166
162
  *
@@ -178,11 +174,7 @@ declare class Adapter {
178
174
  * }
179
175
  * </code></pre>
180
176
  */
181
- checkGroup: ((user: string, group: string, options?: object | undefined, callback: (result: boolean) => void) => Promise<void>) | undefined;
182
- /**
183
- * Promise-version of Adapter.checkGroup
184
- */
185
- checkGroupAsync: any;
177
+ checkGroup(user: string, group: string, options?: object | undefined, callback: (result: boolean) => void): Promise<void>;
186
178
  /** @typedef {{[permission: string]: {type: 'object' | 'state' | '' | 'other' | 'file', operation: string}}} CommandsPermissions */
187
179
  /**
188
180
  * get the user permissions
@@ -203,6 +195,8 @@ declare class Adapter {
203
195
  * setObject: {type: 'object', operation: 'write'},
204
196
  * subscribeObjects: {type: 'object', operation: 'read'},
205
197
  * unsubscribeObjects: {type: 'object', operation: 'read'},
198
+ * subscribeFiles: {type: 'object', operation: 'read'},
199
+ * unsubscribeFiles: {type: 'object', operation: 'read'},
206
200
  *
207
201
  * getStates: {type: 'state', operation: 'list'},
208
202
  * getState: {type: 'state', operation: 'read'},
@@ -277,16 +271,14 @@ declare class Adapter {
277
271
  * }
278
272
  * </code></pre>
279
273
  */
280
- calculatePermissions: ((user: string, commandsPermissions: {
274
+ calculatePermissions(user: string, commandsPermissions: {
281
275
  [permission: string]: {
282
276
  type: 'object' | 'state' | '' | 'other' | 'file';
283
277
  operation: string;
284
278
  };
285
- }, options?: object | undefined, callback?: ((result: ioBroker.PermissionSet) => void) | undefined) => Promise<any>) | undefined;
286
- /**
287
- * Promise-version of Adapter.calculatePermissions
288
- */
289
- calculatePermissionsAsync: any;
279
+ }, options?: object | undefined, callback?: ((result: ioBroker.PermissionSet) => void) | undefined): Promise<void | ioBroker.PermissionSet>;
280
+ _stop(isPause: any, isScheduled: any, exitCode: any, updateAliveState: any): Promise<void>;
281
+ _readFileCertificate(cert: any): any;
290
282
  /**
291
283
  * returns SSL certificates by name
292
284
  *
@@ -308,17 +300,13 @@ declare class Adapter {
308
300
  * }
309
301
  * </code></pre>
310
302
  */
311
- getCertificates: ((publicName?: string | undefined, privateName?: string | undefined, chainedName?: string | undefined, callback: (err: string | null, certs?: ioBroker.Certificates | undefined, useLetsEncryptCert?: boolean | undefined) => void) => void) | undefined;
312
- /**
313
- * Promise-version of Adapter.getCertificates
314
- */
315
- getCertificatesAsync: any;
303
+ getCertificates(publicName?: string | undefined, privateName?: string | undefined, chainedName?: string | undefined, callback: (err: string | null, certs?: ioBroker.Certificates, useLetsEncryptCert?: boolean) => void): void;
316
304
  /**
317
305
  * Restarts an instance of the adapter.
318
306
  *
319
307
  * @memberof Adapter
320
308
  */
321
- restart: (() => void) | undefined;
309
+ restart(): void;
322
310
  /**
323
311
  * Updates the adapter config with new values. Only a subset of the configuration has to be provided,
324
312
  * since merging with the existing config is done automatically, e.g. like this:
@@ -330,13 +318,13 @@ declare class Adapter {
330
318
  * @param {Record<string, any>} newConfig The new config values to be stored
331
319
  * @return Promise<void>
332
320
  */
333
- updateConfig: ((newConfig: Record<string, any>) => Promise<any>) | undefined;
321
+ updateConfig(newConfig: Record<string, any>): Promise<any>;
334
322
  /**
335
323
  * Disables and stops the adapter instance.
336
324
  *
337
325
  * @return Promise<void>
338
326
  */
339
- disable: (() => Promise<any>) | undefined;
327
+ disable(): Promise<any>;
340
328
  /**
341
329
  * Reads the encrypted parameter from config.
342
330
  *
@@ -346,7 +334,8 @@ declare class Adapter {
346
334
  * @returns {Promise<any>} promise if no callback provided
347
335
  *
348
336
  */
349
- getEncryptedConfig: ((attribute: string, callback?: ((error: Error | null | undefined, result?: string | undefined) => void) | undefined) => Promise<any>) | undefined;
337
+ getEncryptedConfig(attribute: string, callback?: ((error: Error | null | undefined, result?: string) => void) | undefined): Promise<any>;
338
+ _systemSecret: any;
350
339
  /**
351
340
  * Same as setTimeout
352
341
  * but it clears the running timers on unload
@@ -357,14 +346,14 @@ declare class Adapter {
357
346
  * @param {any[]} args - as many arguments as needed, which will be passed to setTimeout
358
347
  * @returns {number|void} timer id
359
348
  */
360
- setTimeout: ((cb: Function, timeout: number, ...args: any[]) => number | void) | undefined;
349
+ setTimeout(cb: Function, timeout: number, ...args: any[]): number | void;
361
350
  /**
362
351
  * Same as clearTimeout
363
352
  * but it check the running timers on unload
364
353
  *
365
354
  * @param {number} id - timer id
366
355
  */
367
- clearTimeout: ((id: number) => void) | undefined;
356
+ clearTimeout(id: number): void;
368
357
  /**
369
358
  * delays the fullfillment of the promise the amount of time.
370
359
  * it will not fullfill during and after adapter shutdown
@@ -372,7 +361,7 @@ declare class Adapter {
372
361
  * @param {number} timeout - timeout in milliseconds
373
362
  * @returns {Promise<void>} promise when timeout is over
374
363
  */
375
- delay: ((timeout: number) => Promise<void>) | undefined;
364
+ delay(timeout: number): Promise<void>;
376
365
  /**
377
366
  * Same as setInterval
378
367
  * but it clears the running intervals on unload
@@ -383,20 +372,14 @@ declare class Adapter {
383
372
  * @param {any[]} args - as many arguments as needed, which will be passed to setTimeout
384
373
  * @returns {number|void} interval id
385
374
  */
386
- setInterval: ((cb: Function, timeout: number, ...args: any[]) => number | void) | undefined;
375
+ setInterval(cb: Function, timeout: number, ...args: any[]): number | void;
387
376
  /**
388
377
  * Same as clearInterval
389
378
  * but it check the running intervals on unload
390
379
  *
391
380
  * @param {number} id - interval id
392
381
  */
393
- clearInterval: ((id: number) => void) | undefined;
394
- connected: boolean;
395
- dateFormat: any;
396
- isFloatComma: any;
397
- language: any;
398
- longitude: any;
399
- latitude: any;
382
+ clearInterval(id: number): void;
400
383
  /**
401
384
  * Creates or overwrites object in objectDB.
402
385
  *
@@ -428,11 +411,16 @@ declare class Adapter {
428
411
  * }
429
412
  * </code></pre>
430
413
  */
431
- setObject: (id: string, obj: object, options?: object | undefined, callback?: ioBroker.SetObjectCallback | undefined) => ioBroker.SetObjectPromise;
414
+ setObject(id: string, obj: object, options?: object | undefined, callback?: ioBroker.SetObjectCallback | undefined): ioBroker.SetObjectPromise;
415
+ _defaultObjs: Record<string, Partial<ioBroker.StateCommon>> | undefined;
432
416
  /**
433
- * Promise-version of Adapter.setObject
417
+ * Helper method for `set[Foreign]Object[NotExists]` that also sets the default value if one is configured
418
+ * @param {string} id of the object
419
+ * @param obj The object to set
420
+ * @param {object} [options]
421
+ * @param {function} [callback]
434
422
  */
435
- setObjectAsync: any;
423
+ _setObjectWithDefaultValue(id: string, obj: any, options?: object | undefined, callback?: Function | undefined): Promise<any>;
436
424
  /**
437
425
  * Get all states, channels and devices of this adapter.
438
426
  *
@@ -447,11 +435,7 @@ declare class Adapter {
447
435
  * }
448
436
  * </code></pre>
449
437
  */
450
- getAdapterObjects: (callback: (objects: Record<string, ioBroker.Object>) => void) => Promise<any>;
451
- /**
452
- * Promise-version of Adapter.getAdapterObjects
453
- */
454
- getAdapterObjectsAsync: any;
438
+ getAdapterObjects(callback: (objects: Record<string, ioBroker.Object>) => void): Promise<void>;
455
439
  /**
456
440
  * Extend some object and create it if it does not exist
457
441
  *
@@ -512,11 +496,7 @@ declare class Adapter {
512
496
  * }
513
497
  * </code></pre>
514
498
  */
515
- extendObject: (id: string, obj: object, options?: object | undefined, callback?: ioBroker.ExtendObjectCallback | undefined) => Promise<any>;
516
- /**
517
- * Promise-version of Adapter.extendObject
518
- */
519
- extendObjectAsync: any;
499
+ extendObject(id: string, obj: object, options?: object | undefined, callback?: ioBroker.ExtendObjectCallback | undefined): Promise<any>;
520
500
  /**
521
501
  * Same as {@link Adapter.setObject}, but for any object.
522
502
  *
@@ -535,11 +515,7 @@ declare class Adapter {
535
515
  * }
536
516
  * </code></pre>
537
517
  */
538
- setForeignObject: (id: string, obj: object, options?: object | undefined, callback?: ioBroker.SetObjectCallback | undefined) => any;
539
- /**
540
- * Promise-version of Adapter.setForeignObject
541
- */
542
- setForeignObjectAsync: any;
518
+ setForeignObject(id: string, obj: object, options?: object | undefined, callback?: ioBroker.SetObjectCallback | undefined): void | Promise<never>;
543
519
  /**
544
520
  * Same as {@link Adapter.extendObject}, but for any object.
545
521
  *
@@ -558,11 +534,7 @@ declare class Adapter {
558
534
  * }
559
535
  * </code></pre>
560
536
  */
561
- extendForeignObject: (id: string, obj: object, options?: object | undefined, callback?: ioBroker.SetObjectCallback | undefined) => Promise<any>;
562
- /**
563
- * Promise-version of Adapter.extendForeignObject
564
- */
565
- extendForeignObjectAsync: any;
537
+ extendForeignObject(id: string, obj: object, options?: object | undefined, callback?: ioBroker.SetObjectCallback | undefined): Promise<any>;
566
538
  /**
567
539
  * Get object of this instance.
568
540
  *
@@ -579,11 +551,7 @@ declare class Adapter {
579
551
  * }
580
552
  * </code></pre>
581
553
  */
582
- getObject: (id: string, options?: object | undefined, callback: ioBroker.GetObjectCallback) => any;
583
- /**
584
- * Promise-version of Adapter.getObject
585
- */
586
- getObjectAsync: any;
554
+ getObject(id: string, options?: object | undefined, callback: ioBroker.GetObjectCallback): void;
587
555
  /**
588
556
  * Read object view from DB.
589
557
  *
@@ -612,11 +580,7 @@ declare class Adapter {
612
580
  * }
613
581
  * </code></pre>
614
582
  */
615
- getObjectView: (design: string, search: string, params: object, options: object, callback: ioBroker.GetObjectViewCallback) => any;
616
- /**
617
- * Promise-version of Adapter.getObjectView
618
- */
619
- getObjectViewAsync: any;
583
+ getObjectView(design: string, search: string, params: object, options: object, callback: any): any;
620
584
  /**
621
585
  * Read object list from DB.
622
586
  *
@@ -644,11 +608,7 @@ declare class Adapter {
644
608
  * }
645
609
  * </code></pre>
646
610
  */
647
- getObjectList: (params: object, options: object, callback: ioBroker.GetObjectListCallback) => any;
648
- /**
649
- * Promise-version of Adapter.getObjectList
650
- */
651
- getObjectListAsync: any;
611
+ getObjectList(params: object, options: object, callback: ioBroker.GetObjectListCallback): void;
652
612
  /**
653
613
  * Get the enum tree.
654
614
  *
@@ -679,11 +639,7 @@ declare class Adapter {
679
639
  * }
680
640
  * </code></pre>
681
641
  */
682
- getEnum: (_enum: string, options?: object | undefined, callback: ioBroker.GetEnumCallback) => any;
683
- /**
684
- * Promise-version of Adapter.getEnum
685
- */
686
- getEnumAsync: any;
642
+ getEnum(_enum: string, options?: object | undefined, callback: ioBroker.GetEnumCallback): void;
687
643
  /**
688
644
  * Read the members of given enums.
689
645
  *
@@ -728,11 +684,7 @@ declare class Adapter {
728
684
  * }
729
685
  * </code></pre>
730
686
  */
731
- getEnums: (_enumList: string | array, options?: object | undefined, callback: ioBroker.GetEnumsCallback) => Promise<any>;
732
- /**
733
- * Promise-version of Adapter.getEnums
734
- */
735
- getEnumsAsync: any;
687
+ getEnums(_enumList: string | array, options?: object | undefined, callback: ioBroker.GetEnumsCallback): Promise<void>;
736
688
  /**
737
689
  * Get objects by pattern, by specific type and resolve their enums.
738
690
  *
@@ -777,11 +729,7 @@ declare class Adapter {
777
729
  * }
778
730
  * </code></pre>
779
731
  */
780
- getForeignObjects: (pattern: string, type: string, enums: string | string[], options?: object | undefined, callback: ioBroker.GetObjectsCallback) => any;
781
- /**
782
- * Promise-version of Adapter.getForeignObjects
783
- */
784
- getForeignObjectsAsync: any;
732
+ getForeignObjects(pattern: string, type: string, enums: string | string[], options?: object | undefined, callback: ioBroker.GetObjectsCallback): void;
785
733
  /**
786
734
  * Find any object by name or ID.
787
735
  *
@@ -800,11 +748,7 @@ declare class Adapter {
800
748
  * }
801
749
  * </code></pre>
802
750
  */
803
- findForeignObject: (id: string, type: string, options: object, callback: ioBroker.FindObjectCallback) => any;
804
- /**
805
- * Promise-version of Adapter.findForeignObject
806
- */
807
- findForeignObjectAsync: any;
751
+ findForeignObject(id: string, type: string, options: object, callback: ioBroker.FindObjectCallback): void;
808
752
  /**
809
753
  * Get any object.
810
754
  *
@@ -821,11 +765,7 @@ declare class Adapter {
821
765
  * }
822
766
  * </code></pre>
823
767
  */
824
- getForeignObject: (id: string, options?: object | undefined, callback: ioBroker.GetObjectCallback) => any;
825
- /**
826
- * Promise-version of Adapter.getForeignObject
827
- */
828
- getForeignObjectAsync: any;
768
+ getForeignObject(id: string, options?: object | undefined, callback: ioBroker.GetObjectCallback): void;
829
769
  /**
830
770
  * Delete an object of this instance.
831
771
  *
@@ -845,11 +785,8 @@ declare class Adapter {
845
785
  * }
846
786
  * </code></pre>
847
787
  */
848
- delObject: (id: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => void;
849
- /**
850
- * Promise-version of Adapter.delObject
851
- */
852
- delObjectAsync: any;
788
+ delObject(id: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): void;
789
+ _deleteObjects(tasks: any, options: any, cb: any): void | Promise<void>;
853
790
  /**
854
791
  * Delete any object.
855
792
  *
@@ -866,11 +803,7 @@ declare class Adapter {
866
803
  * }
867
804
  * </code></pre>
868
805
  */
869
- delForeignObject: (id: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => any;
870
- /**
871
- * Promise-version of Adapter.delForeignObject
872
- */
873
- delForeignObjectAsync: any;
806
+ delForeignObject(id: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): void | Promise<void>;
874
807
  /**
875
808
  * Subscribe for the changes of objects in this instance.
876
809
  *
@@ -885,11 +818,7 @@ declare class Adapter {
885
818
  * }
886
819
  * </code></pre>
887
820
  */
888
- subscribeObjects: (pattern: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => any;
889
- /**
890
- * Promise-version of Adapter.subscribeObjects
891
- */
892
- subscribeObjectsAsync: any;
821
+ subscribeObjects(pattern: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): void | Promise<never>;
893
822
  /**
894
823
  * Unsubscribe on the changes of objects in this instance.
895
824
  *
@@ -904,11 +833,7 @@ declare class Adapter {
904
833
  * }
905
834
  * </code></pre>
906
835
  */
907
- unsubscribeObjects: (pattern: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => any;
908
- /**
909
- * Promise-version of Adapter.unsubscribeObjects
910
- */
911
- unsubscribeObjectsAsync: any;
836
+ unsubscribeObjects(pattern: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): void | Promise<never>;
912
837
  /**
913
838
  * Subscribe for the changes of objects in any instance.
914
839
  *
@@ -923,11 +848,7 @@ declare class Adapter {
923
848
  * }
924
849
  * </code></pre>
925
850
  */
926
- subscribeForeignObjects: (pattern: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => any;
927
- /**
928
- * Promise-version of Adapter.subscribeForeignObjects
929
- */
930
- subscribeForeignObjectsAsync: any;
851
+ subscribeForeignObjects(pattern: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): void | Promise<never>;
931
852
  /**
932
853
  * Unsubscribe for the patterns on all objects.
933
854
  *
@@ -942,15 +863,33 @@ declare class Adapter {
942
863
  * }
943
864
  * </code></pre>
944
865
  */
945
- unsubscribeForeignObjects: (pattern: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => any;
866
+ unsubscribeForeignObjects(pattern: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): void | Promise<never>;
946
867
  /**
947
- * Promise-version of Adapter.unsubscribeForeignObjects
868
+ * Subscribe for the changes of files in specific instance.
869
+ * This is async function!
870
+ * @alias subscribeForeignFiles
871
+ * @memberof Adapter
872
+ * @param {string} id adapter ID like 'vis.0' or 'vis.admin'
873
+ * @param {string} pattern pattern like 'channel.*' or '*' (all files) - without namespaces. You can use array of patterns
874
+ * @param {object} [options] optional user context
875
+ * @returns {Promise<>}
876
+ */
877
+ subscribeForeignFiles(id: string, pattern: string, options?: object | undefined): Promise<any>;
878
+ /**
879
+ * Unsubscribe for the changes of files on specific instance.
880
+ * This is async function!
881
+ * @alias unsubscribeForeignFiles
882
+ * @memberof Adapter
883
+ * @param {string} id adapter ID like 'vis.0' or 'vis.admin'
884
+ * @param {string} pattern pattern like 'channel.*' or '*' (all objects) - without namespaces
885
+ * @param {object} [options] optional user context
886
+ * @returns {Promise<>}
948
887
  */
949
- unsubscribeForeignObjectsAsync: any;
888
+ unsubscribeForeignFiles(id: string, pattern: string, options?: object | undefined): Promise<any>;
950
889
  /**
951
890
  * Same as {@link Adapter.setObject}, but with check if the object exists.
952
891
  *
953
- * ID must be specified as a full name with adapter namespace. E.g "hm-rpc.0.ABC98989.1.STATE".
892
+ * Only Ids that belong to this adapter can be modified. So the function automatically adds "adapter.X." to ID.
954
893
  * New object will be created only if no object exists with such ID.
955
894
  *
956
895
  * @alias setObjectNotExists
@@ -967,13 +906,9 @@ declare class Adapter {
967
906
  * </code></pre>
968
907
  * @returns {Promise<{id: string}>}
969
908
  */
970
- setObjectNotExists: (id: string, obj: object, options?: object | undefined, callback?: ioBroker.SetObjectCallback | undefined) => Promise<{
909
+ setObjectNotExists(id: string, obj: object, options?: object | undefined, callback?: ioBroker.SetObjectCallback | undefined): Promise<{
971
910
  id: string;
972
911
  }>;
973
- /**
974
- * Promise-version of Adapter.setObjectNotExists
975
- */
976
- setObjectNotExistsAsync: any;
977
912
  /**
978
913
  * Same as {@link Adapter.setForeignObject}, but with check if the object exists.
979
914
  *
@@ -994,29 +929,13 @@ declare class Adapter {
994
929
  * </code></pre>
995
930
  * @returns {Promise<{id: string}>}
996
931
  */
997
- setForeignObjectNotExists: (id: string, obj: object, options?: object | undefined, callback?: ioBroker.SetObjectCallback | undefined) => Promise<{
932
+ setForeignObjectNotExists(id: string, obj: object, options?: object | undefined, callback?: ioBroker.SetObjectCallback | undefined): Promise<{
998
933
  id: string;
999
934
  }>;
1000
- /**
1001
- * Promise-version of Adapter.setForeignObjectNotExists
1002
- */
1003
- setForeignObjectNotExistsAsync: any;
1004
- _DCS2ID: (device: any, channel: any, stateOrPoint: any) => string;
1005
- createDevice: (deviceName: any, common: any, _native: any, options: any, callback: any) => void;
1006
- /**
1007
- * Promise-version of Adapter.createDevice
1008
- */
1009
- createDeviceAsync: any;
1010
- createChannel: (parentDevice: any, channelName: any, roleOrCommon: any, _native: any, options: any, callback: any) => void;
1011
- /**
1012
- * Promise-version of Adapter.createChannel
1013
- */
1014
- createChannelAsync: any;
1015
- createState: (parentDevice: any, parentChannel: any, stateName: any, roleOrCommon: any, _native: any, options: any, callback: any) => any;
1016
- /**
1017
- * Promise-version of Adapter.createState
1018
- */
1019
- createStateAsync: any;
935
+ _DCS2ID(device: any, channel: any, stateOrPoint: any): string;
936
+ createDevice(deviceName: any, common: any, _native: any, options: any, callback: any): void;
937
+ createChannel(parentDevice: any, channelName: any, roleOrCommon: any, _native: any, options: any, callback: any): void;
938
+ createState(parentDevice: any, parentChannel: any, stateName: any, roleOrCommon: any, _native: any, options: any, callback: any): void | Promise<never>;
1020
939
  /**
1021
940
  * Delete device with all its channels and states.
1022
941
  *
@@ -1031,21 +950,9 @@ declare class Adapter {
1031
950
  * }
1032
951
  * </code></pre>
1033
952
  */
1034
- deleteDevice: (deviceName: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => Promise<any>;
1035
- /**
1036
- * Promise-version of Adapter.deleteDevice
1037
- */
1038
- deleteDeviceAsync: any;
1039
- addChannelToEnum: (enumName: any, addTo: any, parentDevice: any, channelName: any, options: any, callback: any) => any;
1040
- /**
1041
- * Promise-version of Adapter.addChannelToEnum
1042
- */
1043
- addChannelToEnumAsync: any;
1044
- deleteChannelFromEnum: (enumName: any, parentDevice: any, channelName: any, options: any, callback: any) => any;
1045
- /**
1046
- * Promise-version of Adapter.deleteChannelFromEnum
1047
- */
1048
- deleteChannelFromEnumAsync: any;
953
+ deleteDevice(deviceName: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): Promise<void>;
954
+ addChannelToEnum(enumName: any, addTo: any, parentDevice: any, channelName: any, options: any, callback: any): void | Promise<never>;
955
+ deleteChannelFromEnum(enumName: any, parentDevice: any, channelName: any, options: any, callback: any): void | Promise<never>;
1049
956
  /**
1050
957
  * Deletes channel and udnerlying structure
1051
958
  * @alais deleteChannel
@@ -1060,43 +967,13 @@ declare class Adapter {
1060
967
  * }
1061
968
  * </code></pre>
1062
969
  */
1063
- deleteChannel: (parentDevice: string, channelName: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => Promise<any>;
1064
- /**
1065
- * Promise-version of Adapter.deleteChannel
1066
- */
1067
- deleteChannelAsync: any;
1068
- deleteState: (parentDevice: any, parentChannel: any, stateName: any, options: any, callback: any) => void;
1069
- /**
1070
- * Promise-version of Adapter.deleteState
1071
- */
1072
- deleteStateAsync: any;
1073
- getDevices: (options: any, callback: any) => any;
1074
- /**
1075
- * Promise-version of Adapter.getDevices
1076
- */
1077
- getDevicesAsync: any;
1078
- getChannelsOf: (parentDevice: any, options: any, callback: any) => any;
1079
- /**
1080
- * Promise-version of Adapter.getChannelsOf
1081
- */
1082
- getChannelsOfAsync: any;
1083
- getChannels: (parentDevice: any, options: any, callback: any) => any;
1084
- getChannelsAsync: any;
1085
- getStatesOf: (parentDevice: any, parentChannel: any, options: any, callback: any) => any;
1086
- /**
1087
- * Promise-version of Adapter.getStatesOf
1088
- */
1089
- getStatesOfAsync: any;
1090
- addStateToEnum: (enumName: any, addTo: any, parentDevice: any, parentChannel: any, stateName: any, options: any, callback: any) => any;
1091
- /**
1092
- * Promise-version of Adapter.addStateToEnum
1093
- */
1094
- addStateToEnumAsync: any;
1095
- deleteStateFromEnum: (enumName: any, parentDevice: any, parentChannel: any, stateName: any, options: any, callback: any) => any;
1096
- /**
1097
- * Promise-version of Adapter.deleteStateFromEnum
1098
- */
1099
- deleteStateFromEnumAsync: any;
970
+ deleteChannel(parentDevice: string, channelName: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): Promise<void>;
971
+ deleteState(parentDevice: any, parentChannel: any, stateName: any, options: any, callback: any): void;
972
+ getDevices(options: any, callback: any): void | Promise<never>;
973
+ getChannelsOf(parentDevice: any, options: any, callback: any): void | Promise<never>;
974
+ getStatesOf(parentDevice: any, parentChannel: any, options: any, callback: any): void | Promise<never>;
975
+ addStateToEnum(enumName: any, addTo: any, parentDevice: any, parentChannel: any, stateName: any, options: any, callback: any): void | Promise<never>;
976
+ deleteStateFromEnum(enumName: any, parentDevice: any, parentChannel: any, stateName: any, options: any, callback: any): void | Promise<never>;
1100
977
  /**
1101
978
  * Change file access rights
1102
979
  *
@@ -1120,11 +997,7 @@ declare class Adapter {
1120
997
  * }
1121
998
  * </code></pre>
1122
999
  */
1123
- chmodFile: (_adapter: string, path: string, options: object, callback: Function) => any;
1124
- /**
1125
- * Promise-version of Adapter.chmodFile
1126
- */
1127
- chmodFileAsync: any;
1000
+ chmodFile(_adapter: string, path: string, options: object, callback: Function): void | Promise<never>;
1128
1001
  /**
1129
1002
  * Change file owner
1130
1003
  *
@@ -1148,11 +1021,7 @@ declare class Adapter {
1148
1021
  * }
1149
1022
  * </code></pre>
1150
1023
  */
1151
- chownFile: (_adapter: string, path: string, options: object, callback: Function) => any;
1152
- /**
1153
- * Promise-version of Adapter.chownFile
1154
- */
1155
- chownFileAsync: any;
1024
+ chownFile(_adapter: string, path: string, options: object, callback: Function): void | Promise<never>;
1156
1025
  /**
1157
1026
  * Read directory from DB.
1158
1027
  *
@@ -1190,28 +1059,10 @@ declare class Adapter {
1190
1059
  * }
1191
1060
  * </code></pre>
1192
1061
  */
1193
- readDir: (_adapter: string, path: string, options: object, callback: ioBroker.ReadDirCallback) => any;
1194
- /**
1195
- * Promise-version of Adapter.readDir
1196
- */
1197
- readDirAsync: any;
1198
- unlink: (_adapter: any, name: any, options: any, callback: any) => any;
1199
- /**
1200
- * Promise-version of Adapter.unlink
1201
- */
1202
- unlinkAsync: any;
1203
- delFile: (_adapter: any, name: any, options: any, callback: any) => any;
1204
- delFileAsync: any;
1205
- rename: (_adapter: any, oldName: any, newName: any, options: any, callback: any) => any;
1206
- /**
1207
- * Promise-version of Adapter.rename
1208
- */
1209
- renameAsync: any;
1210
- mkdir: (_adapter: any, dirname: any, options: any, callback: any) => any;
1211
- /**
1212
- * Promise-version of Adapter.mkdir
1213
- */
1214
- mkdirAsync: any;
1062
+ readDir(_adapter: string, path: string, options: object, callback: ioBroker.ReadDirCallback): void;
1063
+ unlink(_adapter: any, name: any, options: any, callback: any): void | Promise<never>;
1064
+ rename(_adapter: any, oldName: any, newName: any, options: any, callback: any): void | Promise<never>;
1065
+ mkdir(_adapter: any, dirname: any, options: any, callback: any): void | Promise<never>;
1215
1066
  /**
1216
1067
  * Read file from DB.
1217
1068
  *
@@ -1236,11 +1087,7 @@ declare class Adapter {
1236
1087
  * }
1237
1088
  * </code></pre>
1238
1089
  */
1239
- readFile: (_adapter: string, filename: string, options: object, callback: ioBroker.ReadFileCallback) => any;
1240
- /**
1241
- * Promise-version of Adapter.readFile
1242
- */
1243
- readFileAsync: any;
1090
+ readFile(_adapter: string, filename: string, options: object, callback: ioBroker.ReadFileCallback): void;
1244
1091
  /**
1245
1092
  * Write file to DB.
1246
1093
  *
@@ -1264,11 +1111,7 @@ declare class Adapter {
1264
1111
  * }
1265
1112
  * </code></pre>
1266
1113
  */
1267
- writeFile: (_adapter: string, filename: string, data: object, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => any;
1268
- /**
1269
- * Promise-version of Adapter.writeFile
1270
- */
1271
- writeFileAsync: any;
1114
+ writeFile(_adapter: string, filename: string, data: object, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): any;
1272
1115
  /**
1273
1116
  * Checks if file exists in DB.
1274
1117
  *
@@ -1280,15 +1123,9 @@ declare class Adapter {
1280
1123
  * @param {function} [callback] cb function if none provided, a promise is returned
1281
1124
  * @returns {Promise<boolean>}
1282
1125
  */
1283
- fileExists: any;
1284
- /**
1285
- * Promise-version of Adapter.fileExists
1286
- */
1287
- fileExistsAsync: any;
1288
- formatValue: (value: any, decimals: any, _format: any) => any;
1289
- formatDate: (dateObj: any, isDuration: any, _format: any) => string;
1290
- statesConnectedTime: number;
1291
- patterns: any;
1126
+ fileExists(_adapter: string, filename: string, options?: object | undefined, callback?: Function | undefined): Promise<boolean>;
1127
+ formatValue(value: any, decimals: any, _format: any): any;
1128
+ formatDate(dateObj: any, isDuration: any, _format: any): string;
1292
1129
  /**
1293
1130
  * Send message to other adapter instance or all instances of adapter.
1294
1131
  *
@@ -1308,13 +1145,9 @@ declare class Adapter {
1308
1145
  * }
1309
1146
  * </code></pre>
1310
1147
  */
1311
- sendTo: (instanceName: string, command: string, message: object, callback?: ((arg0: any) => any) | undefined) => Promise<any>;
1312
- mboxSubscribed: boolean;
1148
+ sendTo(instanceName: string, command: string, message: object, callback?: ((arg0: any) => any) | undefined): Promise<void>;
1149
+ mboxSubscribed: boolean | undefined;
1313
1150
  callbacks: any;
1314
- /**
1315
- * Promise-version of Adapter.sendTo
1316
- */
1317
- sendToAsync: any;
1318
1151
  /**
1319
1152
  * Send message to specific host or to all hosts.
1320
1153
  *
@@ -1334,11 +1167,7 @@ declare class Adapter {
1334
1167
  * }
1335
1168
  * </code></pre>
1336
1169
  */
1337
- sendToHost: (hostName: any, command: string, message: object, callback?: ((arg0: any) => any) | undefined) => Promise<any>;
1338
- /**
1339
- * Promise-version of Adapter.sendToHost
1340
- */
1341
- sendToHostAsync: any;
1170
+ sendToHost(hostName: any, command: string, message: object, callback?: ((arg0: any) => any) | undefined): Promise<void>;
1342
1171
  /**
1343
1172
  * Send notification with given scope and category to host of this adapter
1344
1173
  *
@@ -1347,8 +1176,7 @@ declare class Adapter {
1347
1176
  * @param {string} message - message to be stored/checked
1348
1177
  * @return Promise<void>
1349
1178
  */
1350
- registerNotification: (scope: string, category: string | null, message: string) => Promise<void>;
1351
- setExecutableCapabilities: any;
1179
+ registerNotification(scope: string, category: string | null, message: string): Promise<void>;
1352
1180
  /**
1353
1181
  * Writes value into states DB.
1354
1182
  *
@@ -1382,11 +1210,12 @@ declare class Adapter {
1382
1210
  * }
1383
1211
  * </code></pre>
1384
1212
  */
1385
- setState: (id: string, state: object | string | number | boolean, ack?: boolean | undefined, options?: object | undefined, callback?: ioBroker.SetStateCallback | undefined) => Promise<any>;
1386
- /**
1387
- * Promise-version of Adapter.setState
1388
- */
1389
- setStateAsync: any;
1213
+ setState(id: string, state: object | string | number | boolean, ack?: boolean | undefined, options?: object | undefined, callback?: ioBroker.SetStateCallback | undefined): Promise<void>;
1214
+ _getUserGroups(options: any, callback: any): void | Promise<any>;
1215
+ _checkState(obj: any, options: any, command: any): boolean;
1216
+ _checkStates(ids: any, options: any, command: any, callback: any, _helper: any): void | Promise<any>;
1217
+ _getGroups(ids: any, callback: any, i: any): void | Promise<void>;
1218
+ _setStateChangedHelper(id: any, state: any, callback: any): void | Promise<never>;
1390
1219
  /**
1391
1220
  * Writes value into states DB only if the value really changed.
1392
1221
  *
@@ -1408,11 +1237,7 @@ declare class Adapter {
1408
1237
  * }
1409
1238
  * </code></pre>
1410
1239
  */
1411
- setStateChanged: (id: string, state: object | string | number | boolean, ack?: boolean | undefined, options?: object | undefined, callback?: ioBroker.SetStateChangedCallback | undefined) => any;
1412
- /**
1413
- * Promise-version of Adapter.setStateChanged
1414
- */
1415
- setStateChangedAsync: any;
1240
+ setStateChanged(id: string, state: object | string | number | boolean, ack?: boolean | undefined, options?: object | undefined, callback?: ioBroker.SetStateChangedCallback | undefined): void | Promise<void>;
1416
1241
  /**
1417
1242
  * Writes value into states DB for any instance.
1418
1243
  *
@@ -1445,11 +1270,7 @@ declare class Adapter {
1445
1270
  * }
1446
1271
  * </code></pre>
1447
1272
  */
1448
- setForeignState: (id: string, state: object | string | number | boolean, ack?: boolean | undefined, options?: object | undefined, callback?: ioBroker.SetStateCallback | undefined) => Promise<any>;
1449
- /**
1450
- * Promise-version of Adapter.setForeignState
1451
- */
1452
- setForeignStateAsync: any;
1273
+ setForeignState(id: string, state: object | string | number | boolean, ack?: boolean | undefined, options?: object | undefined, callback?: ioBroker.SetStateCallback | undefined): Promise<void>;
1453
1274
  /**
1454
1275
  * Writes value into states DB for any instance, but only if state changed.
1455
1276
  *
@@ -1482,11 +1303,7 @@ declare class Adapter {
1482
1303
  * }
1483
1304
  * </code></pre>
1484
1305
  */
1485
- setForeignStateChanged: (id: string, state: object | string | number | boolean, ack?: boolean | undefined, options?: object | undefined, callback?: ioBroker.SetStateChangedCallback | undefined) => any;
1486
- /**
1487
- * Promise-version of Adapter.setForeignStateChanged
1488
- */
1489
- setForeignStateChangedAsync: any;
1306
+ setForeignStateChanged(id: string, state: object | string | number | boolean, ack?: boolean | undefined, options?: object | undefined, callback?: ioBroker.SetStateChangedCallback | undefined): void | Promise<void>;
1490
1307
  /**
1491
1308
  * Read value from states DB.
1492
1309
  *
@@ -1506,11 +1323,7 @@ declare class Adapter {
1506
1323
  *
1507
1324
  * See possible attributes of the state in @setState explanation
1508
1325
  */
1509
- getState: (id: string, options: object, callback: ioBroker.GetStateCallback) => any;
1510
- /**
1511
- * Promise-version of Adapter.getState
1512
- */
1513
- getStateAsync: any;
1326
+ getState(id: string, options: object, callback: ioBroker.GetStateCallback): void | Promise<void> | Promise<ioBroker.State>;
1514
1327
  /**
1515
1328
  * Read value from states DB for any instance and system state.
1516
1329
  *
@@ -1529,11 +1342,9 @@ declare class Adapter {
1529
1342
  *
1530
1343
  * See possible attributes of the state in @setState explanation
1531
1344
  */
1532
- getForeignState: (id: string, options: object, callback: ioBroker.GetStateCallback) => any;
1533
- /**
1534
- * Promise-version of Adapter.getForeignState
1535
- */
1536
- getForeignStateAsync: any;
1345
+ getForeignState(id: string, options: object, callback: ioBroker.GetStateCallback): void | Promise<void> | Promise<ioBroker.State>;
1346
+ _getDefaultHistory(callback: any): void | Promise<void>;
1347
+ defaultHistory: any;
1537
1348
  /**
1538
1349
  * Read historian data for states of any instance or system state.
1539
1350
  *
@@ -1576,11 +1387,7 @@ declare class Adapter {
1576
1387
  *
1577
1388
  * See possible attributes of the state in @setState explanation
1578
1389
  */
1579
- getHistory: any;
1580
- /**
1581
- * Promise-version of Adapter.getHistory
1582
- */
1583
- getHistoryAsync: any;
1390
+ getHistory(id: string, options: object, callback: ioBroker.GetHistoryCallback): void | Promise<void>;
1584
1391
  /**
1585
1392
  * Convert ID into object with device's, channel's and state's name.
1586
1393
  *
@@ -1592,7 +1399,7 @@ declare class Adapter {
1592
1399
  * @param {string} id short or long string of ID like "stateID" or "adapterName.0.stateID".
1593
1400
  * @return {object} parsed ID as an object
1594
1401
  */
1595
- idToDCS: (id: string) => object;
1402
+ idToDCS(id: string): object;
1596
1403
  /**
1597
1404
  * Deletes a state of this instance.
1598
1405
  * The object will NOT be deleted. If you want to delete it too, use @delObject instead.
@@ -1613,11 +1420,7 @@ declare class Adapter {
1613
1420
  * }
1614
1421
  * </code></pre>
1615
1422
  */
1616
- delState: (id: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => any;
1617
- /**
1618
- * Promise-version of Adapter.delState
1619
- */
1620
- delStateAsync: any;
1423
+ delState(id: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): void | Promise<void>;
1621
1424
  /**
1622
1425
  * Deletes a state of any adapter.
1623
1426
  * The object is NOT deleted. If you want to delete it too, use @delForeignObject instead.
@@ -1630,11 +1433,7 @@ declare class Adapter {
1630
1433
  * @param {object} [options] optional argument to describe the user context
1631
1434
  * @param {ioBroker.ErrorCallback} [callback] return result function (err) {}
1632
1435
  */
1633
- delForeignState: (id: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => any;
1634
- /**
1635
- * Promise-version of Adapter.delForeignState
1636
- */
1637
- delForeignStateAsync: any;
1436
+ delForeignState(id: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): void | Promise<void>;
1638
1437
  /**
1639
1438
  * Read all states of this adapter, that pass the pattern
1640
1439
  *
@@ -1653,13 +1452,9 @@ declare class Adapter {
1653
1452
  * @param {object} options optional argument to describe the user context
1654
1453
  * @param {ioBroker.GetStatesCallback} callback return result function (err, states) {}, where states is an object like {"ID1": {"val": 1, "ack": true}, "ID2": {"val": 2, "ack": false}, ...}
1655
1454
  */
1656
- getStates: (pattern: string, options: object, callback: ioBroker.GetStatesCallback) => void;
1657
- /**
1658
- * Promise-version of Adapter.getStates
1659
- */
1660
- getStatesAsync: any;
1661
- _processStatesSecondary: (keys: any, targetObjs: any, srcObjs: any, callback: any) => void;
1662
- _processStates: (keys: any, targetObjs: any, callback: any) => void;
1455
+ getStates(pattern: string, options: object, callback: ioBroker.GetStatesCallback): void;
1456
+ _processStatesSecondary(keys: any, targetObjs: any, srcObjs: any, callback: any): void;
1457
+ _processStates(keys: any, targetObjs: any, callback: any): void;
1663
1458
  /**
1664
1459
  * Read all states of all adapters (and system states), that pass the pattern
1665
1460
  *
@@ -1678,13 +1473,9 @@ declare class Adapter {
1678
1473
  * @param {object} options optional argument to describe the user context
1679
1474
  * @param {ioBroker.GetStatesCallback} callback return result function (err, states) {}, where states is an object like {"ID1": {"val": 1, "ack": true}, "ID2": {"val": 2, "ack": false}, ...}
1680
1475
  */
1681
- getForeignStates: any;
1682
- /**
1683
- * Promise-version of Adapter.getForeignStates
1684
- */
1685
- getForeignStatesAsync: any;
1686
- _addAliasSubscribe: (aliasObj: any, pattern: any, callback: any) => any;
1687
- _removeAliasSubscribe: (sourceId: any, aliasObj: any, pattern: any, callback: any) => Promise<any>;
1476
+ getForeignStates(pattern: string | string[], options: object, callback: ioBroker.GetStatesCallback): void | Promise<never>;
1477
+ _addAliasSubscribe(aliasObj: any, pattern: any, callback: any): Promise<void>;
1478
+ _removeAliasSubscribe(sourceId: any, aliasObj: any, pattern: any, callback: any): Promise<void>;
1688
1479
  /**
1689
1480
  * Subscribe for changes on all states of all adapters (and system states), that pass the pattern
1690
1481
  *
@@ -1699,12 +1490,8 @@ declare class Adapter {
1699
1490
  * @param {object} [options] optional argument to describe the user context
1700
1491
  * @param {ioBroker.ErrorCallback} [callback] return result function (err) {}
1701
1492
  */
1702
- subscribeForeignStates: (pattern: string | string[], options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => Promise<any>;
1703
- _aliasObjectsSubscribed: boolean;
1704
- /**
1705
- * Promise-version of Adapter.subscribeForeignStates
1706
- */
1707
- subscribeForeignStatesAsync: any;
1493
+ subscribeForeignStates(pattern: string | string[], options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): Promise<void>;
1494
+ _aliasObjectsSubscribed: boolean | undefined;
1708
1495
  /**
1709
1496
  * Unsubscribe for changes for given pattern
1710
1497
  *
@@ -1722,11 +1509,7 @@ declare class Adapter {
1722
1509
  * @param {object} [options] optional argument to describe the user context
1723
1510
  * @param {ioBroker.ErrorCallback} [callback] return result function (err) {}
1724
1511
  */
1725
- unsubscribeForeignStates: (pattern: string | string[], options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => Promise<any>;
1726
- /**
1727
- * Promise-version of Adapter.unsubscribeForeignStates
1728
- */
1729
- unsubscribeForeignStatesAsync: any;
1512
+ unsubscribeForeignStates(pattern: string | string[], options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): Promise<void>;
1730
1513
  /**
1731
1514
  * Subscribe for changes on all states of this instance, that pass the pattern
1732
1515
  *
@@ -1741,11 +1524,7 @@ declare class Adapter {
1741
1524
  * @param {object} [options] optional argument to describe the user context
1742
1525
  * @param {ioBroker.ErrorCallback} [callback]
1743
1526
  */
1744
- subscribeStates: (pattern: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => any;
1745
- /**
1746
- * Promise-version of Adapter.subscribeStates
1747
- */
1748
- subscribeStatesAsync: any;
1527
+ subscribeStates(pattern: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): void | Promise<never>;
1749
1528
  /**
1750
1529
  * Unsubscribe for changes for given pattern for own states.
1751
1530
  *
@@ -1763,28 +1542,7 @@ declare class Adapter {
1763
1542
  * @param {object} [options] optional argument to describe the user context
1764
1543
  * @param {ioBroker.ErrorCallback} [callback]
1765
1544
  */
1766
- unsubscribeStates: (pattern: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => any;
1767
- /**
1768
- * Promise-version of Adapter.unsubscribeStates
1769
- */
1770
- unsubscribeStatesAsync: any;
1771
- /**
1772
- * Decrypt the password/value with given key
1773
- * @param {string} secretVal to use for decrypt (or value if only one parameter is given)
1774
- * @param {string} [value] value to decrypt (if secret is provided)
1775
- * @returns {string}
1776
- */
1777
- decrypt: (secretVal: string, value?: string | undefined) => string;
1778
- /**
1779
- * Encrypt the password/value with given key
1780
- * @param {string} secretVal to use for encrypt (or value if only one parameter is given)
1781
- * @param {string} [value] value to encrypt (if secret is provided)
1782
- * @returns {string}
1783
- */
1784
- encrypt: (secretVal: string, value?: string | undefined) => string;
1785
- getSession: (id: any, callback: any) => any;
1786
- setSession: (id: any, ttl: any, data: any, callback: any) => any;
1787
- destroySession: (id: any, callback: any) => any;
1545
+ unsubscribeStates(pattern: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): void | Promise<never>;
1788
1546
  /**
1789
1547
  * Write binary block into redis, e.g image
1790
1548
  *
@@ -1797,19 +1555,7 @@ declare class Adapter {
1797
1555
  * @param {ioBroker.ErrorCallback} [callback]
1798
1556
  *
1799
1557
  */
1800
- setForeignBinaryState: (id: string, binary: Buffer, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => Promise<any>;
1801
- /**
1802
- * Promise-version of Adapter.setBinaryState
1803
- *
1804
- * @alias setForeignBinaryStateAsync
1805
- * @memberof Adapter
1806
- * @param {string} id of state
1807
- * @param {Buffer} binary data
1808
- * @param {object} [options] optional
1809
- * @return {Promise}
1810
- *
1811
- */
1812
- setForeignBinaryStateAsync: any;
1558
+ setForeignBinaryState(id: string, binary: Buffer, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): Promise<void>;
1813
1559
  /**
1814
1560
  * Same as setForeignBinaryState but prefixes the own namespace to the id
1815
1561
  *
@@ -1821,19 +1567,7 @@ declare class Adapter {
1821
1567
  * @param {object} [options] optional
1822
1568
  * @param {ioBroker.ErrorCallback} [callback]
1823
1569
  */
1824
- setBinaryState: (id: string, binary: Buffer, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => Promise<any>;
1825
- /**
1826
- * Async version of setBinaryState
1827
- *
1828
- * @alias setBinaryStateAsync
1829
- * @memberof Adapter
1830
- *
1831
- * @param {string} id of state
1832
- * @param {Buffer} binary data
1833
- * @param {object} [options] optional
1834
- * @param {Promise<void>}
1835
- */
1836
- setBinaryStateAsync: any;
1570
+ setBinaryState(id: string, binary: Buffer, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): Promise<void>;
1837
1571
  /**
1838
1572
  * Read a binary block from redis, e.g. an image
1839
1573
  *
@@ -1841,15 +1575,7 @@ declare class Adapter {
1841
1575
  * @param {object} options optional
1842
1576
  * @param {ioBroker.GetBinaryStateCallback} callback
1843
1577
  */
1844
- getForeignBinaryState: (id: string, options: object, callback: ioBroker.GetBinaryStateCallback) => any;
1845
- /**
1846
- * Promise-version of Adapter.getBinaryState
1847
- *
1848
- * @alias getForeignBinaryStateAsync
1849
- * @memberof Adapter
1850
- *
1851
- */
1852
- getForeignBinaryStateAsync: any;
1578
+ getForeignBinaryState(id: string, options: object, callback: ioBroker.GetBinaryStateCallback): void;
1853
1579
  /**
1854
1580
  * Same as getForeignBinaryState but prefixes the own namespace to the id
1855
1581
  *
@@ -1857,15 +1583,7 @@ declare class Adapter {
1857
1583
  * @param {object} options optional
1858
1584
  * @param {ioBroker.GetBinaryStateCallback} callback
1859
1585
  */
1860
- getBinaryState: (id: string, options: object, callback: ioBroker.GetBinaryStateCallback) => any;
1861
- /**
1862
- * Promisified version of getBinaryState
1863
- *
1864
- * @param {string} id The state ID
1865
- * @param {object} options optional
1866
- * @return {Promise<Buffer>}
1867
- */
1868
- getBinaryStateAsync: any;
1586
+ getBinaryState(id: string, options: object, callback: ioBroker.GetBinaryStateCallback): void;
1869
1587
  /**
1870
1588
  * Deletes binary state
1871
1589
  *
@@ -1877,78 +1595,430 @@ declare class Adapter {
1877
1595
  * @param {ioBroker.ErrorCallback} [callback]
1878
1596
  *
1879
1597
  */
1880
- delForeignBinaryState: (id: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => any;
1598
+ delForeignBinaryState(id: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): void | Promise<void>;
1881
1599
  /**
1882
- * Promise-version of Adapter.delForeignBinaryState
1600
+ * Deletes binary state but prefixes the own namespace to the id
1883
1601
  *
1884
- * @alias delForeignBinaryStateAsync
1602
+ * @alias delBinaryState
1885
1603
  * @memberof Adapter
1604
+ *
1886
1605
  * @param {string} id
1887
1606
  * @param {object} [options]
1888
- * @return {Promise<void>}
1607
+ * @param {ioBroker.ErrorCallback} [callback]
1889
1608
  *
1890
1609
  */
1891
- delForeignBinaryStateAsync: any;
1610
+ delBinaryState(id: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined): void | Promise<void>;
1892
1611
  /**
1893
- * Deletes binary state but prefixes the own namespace to the id
1612
+ * Return plugin instance
1894
1613
  *
1895
- * @alias delBinaryState
1614
+ * @param name {string} name of the plugin to return
1615
+ * @returns {object} plugin instance or null if not existent or not isActive
1616
+ */
1617
+ getPluginInstance(name: string): object;
1618
+ /**
1619
+ * Return plugin configuration
1620
+ *
1621
+ * @param name {string} name of the plugin to return
1622
+ * @returns {object} plugin configuration or null if not existent or not isActive
1623
+ */
1624
+ getPluginConfig(name: string): object;
1625
+ _autoSubscribeOn(): Promise<void>;
1626
+ autoSubscribe: any[] | null | undefined;
1627
+ /**
1628
+ * This method returns the list of license that can be used by this adapter
1629
+ * @param {boolean} all if return the licenses, that used by other instances (true) or only for this instance (false)
1630
+ * @returns {Promise<object[]>} list of suitable licenses
1631
+ */
1632
+ getSuitableLicenses(all: boolean): Promise<object[]>;
1633
+ _init(): void;
1634
+ inited: boolean | undefined;
1635
+ adapterDir: any;
1636
+ pack: any;
1637
+ ioPack: any;
1638
+ systemConfig: Record<string, any> | undefined;
1639
+ name: any;
1640
+ namespace: string | undefined;
1641
+ namespaceLog: string | undefined;
1642
+ _namespaceRegExp: RegExp | undefined;
1643
+ /** The cache of users */
1644
+ users: {} | undefined;
1645
+ /** The cache of user groups */
1646
+ groups: {} | undefined;
1647
+ inputCount: number | undefined;
1648
+ outputCount: number | undefined;
1649
+ /** A RegExp to test for forbidden chars in object IDs */
1650
+ FORBIDDEN_CHARS: RegExp | undefined;
1651
+ /**
1652
+ * Promise-version of Adapter.getPort
1653
+ */
1654
+ getPortAsync: ((...args: any[]) => Promise<any>) | undefined;
1655
+ /**
1656
+ * Promise-version of Adapter.checkPassword
1657
+ */
1658
+ checkPasswordAsync: ((...args: any[]) => Promise<any>) | undefined;
1659
+ /**
1660
+ * Promise-version of Adapter.setPassword
1661
+ */
1662
+ setPasswordAsync: ((...args: any[]) => Promise<any>) | undefined;
1663
+ /**
1664
+ * Promise-version of Adapter.checkGroup
1665
+ */
1666
+ checkGroupAsync: ((...args: any[]) => Promise<any>) | undefined;
1667
+ /**
1668
+ * Promise-version of Adapter.calculatePermissions
1669
+ */
1670
+ calculatePermissionsAsync: ((...args: any[]) => Promise<any>) | undefined;
1671
+ /**
1672
+ * Promise-version of Adapter.getCertificates
1673
+ */
1674
+ getCertificatesAsync: ((...args: any[]) => Promise<any>) | undefined;
1675
+ /**
1676
+ * Promise-version of Adapter.setObject
1677
+ */
1678
+ setObjectAsync: ((...args: any[]) => Promise<any>) | undefined;
1679
+ /**
1680
+ * Promise-version of Adapter.getAdapterObjects
1681
+ */
1682
+ getAdapterObjectsAsync: ((...args: any[]) => Promise<any>) | undefined;
1683
+ /**
1684
+ * Promise-version of Adapter.extendObject
1685
+ */
1686
+ extendObjectAsync: ((...args: any[]) => Promise<any>) | undefined;
1687
+ /**
1688
+ * Promise-version of Adapter.setForeignObject
1689
+ */
1690
+ setForeignObjectAsync: ((...args: any[]) => Promise<any>) | undefined;
1691
+ /**
1692
+ * Promise-version of Adapter.extendForeignObject
1693
+ */
1694
+ extendForeignObjectAsync: ((...args: any[]) => Promise<any>) | undefined;
1695
+ /**
1696
+ * Promise-version of Adapter.getObject
1697
+ */
1698
+ getObjectAsync: ((...args: any[]) => Promise<any>) | undefined;
1699
+ /**
1700
+ * Promise-version of Adapter.getObjectView
1701
+ */
1702
+ getObjectViewAsync: ((...args: any[]) => Promise<any>) | undefined;
1703
+ /**
1704
+ * Promise-version of Adapter.getObjectList
1705
+ */
1706
+ getObjectListAsync: ((...args: any[]) => Promise<any>) | undefined;
1707
+ /**
1708
+ * Promise-version of Adapter.getEnum
1709
+ */
1710
+ getEnumAsync: ((...args: any[]) => Promise<any>) | undefined;
1711
+ /**
1712
+ * Promise-version of Adapter.getEnums
1713
+ */
1714
+ getEnumsAsync: ((...args: any[]) => Promise<any>) | undefined;
1715
+ /**
1716
+ * Promise-version of Adapter.getForeignObjects
1717
+ */
1718
+ getForeignObjectsAsync: ((...args: any[]) => Promise<any>) | undefined;
1719
+ /**
1720
+ * Promise-version of Adapter.findForeignObject
1721
+ */
1722
+ findForeignObjectAsync: ((...args: any[]) => Promise<any>) | undefined;
1723
+ /**
1724
+ * Promise-version of Adapter.getForeignObject
1725
+ */
1726
+ getForeignObjectAsync: ((...args: any[]) => Promise<any>) | undefined;
1727
+ /**
1728
+ * Promise-version of Adapter.delObject
1729
+ */
1730
+ delObjectAsync: ((...args: any[]) => Promise<any>) | undefined;
1731
+ /**
1732
+ * Promise-version of Adapter.delForeignObject
1733
+ */
1734
+ delForeignObjectAsync: ((...args: any[]) => Promise<any>) | undefined;
1735
+ /**
1736
+ * Promise-version of Adapter.subscribeObjects
1737
+ */
1738
+ subscribeObjectsAsync: ((...args: any[]) => Promise<any>) | undefined;
1739
+ /**
1740
+ * Promise-version of Adapter.unsubscribeObjects
1741
+ */
1742
+ unsubscribeObjectsAsync: ((...args: any[]) => Promise<any>) | undefined;
1743
+ /**
1744
+ * Promise-version of Adapter.subscribeForeignObjects
1745
+ */
1746
+ subscribeForeignObjectsAsync: ((...args: any[]) => Promise<any>) | undefined;
1747
+ /**
1748
+ * Promise-version of Adapter.unsubscribeForeignObjects
1749
+ */
1750
+ unsubscribeForeignObjectsAsync: ((...args: any[]) => Promise<any>) | undefined;
1751
+ /**
1752
+ * Promise-version of Adapter.setObjectNotExists
1753
+ */
1754
+ setObjectNotExistsAsync: ((...args: any[]) => Promise<any>) | undefined;
1755
+ /**
1756
+ * Promise-version of Adapter.setForeignObjectNotExists
1757
+ */
1758
+ setForeignObjectNotExistsAsync: ((...args: any[]) => Promise<any>) | undefined;
1759
+ /**
1760
+ * Promise-version of Adapter.createDevice
1761
+ */
1762
+ createDeviceAsync: ((...args: any[]) => Promise<any>) | undefined;
1763
+ /**
1764
+ * Promise-version of Adapter.createChannel
1765
+ */
1766
+ createChannelAsync: ((...args: any[]) => Promise<any>) | undefined;
1767
+ /**
1768
+ * Promise-version of Adapter.createState
1769
+ */
1770
+ createStateAsync: ((...args: any[]) => Promise<any>) | undefined;
1771
+ /**
1772
+ * Promise-version of Adapter.deleteDevice
1773
+ */
1774
+ deleteDeviceAsync: ((...args: any[]) => Promise<any>) | undefined;
1775
+ /**
1776
+ * Promise-version of Adapter.addChannelToEnum
1777
+ */
1778
+ addChannelToEnumAsync: ((...args: any[]) => Promise<any>) | undefined;
1779
+ /**
1780
+ * Promise-version of Adapter.deleteChannelFromEnum
1781
+ */
1782
+ deleteChannelFromEnumAsync: ((...args: any[]) => Promise<any>) | undefined;
1783
+ /**
1784
+ * Promise-version of Adapter.deleteChannel
1785
+ */
1786
+ deleteChannelAsync: ((...args: any[]) => Promise<any>) | undefined;
1787
+ /**
1788
+ * Promise-version of Adapter.deleteState
1789
+ */
1790
+ deleteStateAsync: ((...args: any[]) => Promise<any>) | undefined;
1791
+ /**
1792
+ * Promise-version of Adapter.getDevices
1793
+ */
1794
+ getDevicesAsync: ((...args: any[]) => Promise<any>) | undefined;
1795
+ /**
1796
+ * Promise-version of Adapter.getChannelsOf
1797
+ */
1798
+ getChannelsOfAsync: ((...args: any[]) => Promise<any>) | undefined;
1799
+ getChannels: ((parentDevice: any, options: any, callback: any) => void | Promise<never>) | undefined;
1800
+ getChannelsAsync: ((...args: any[]) => Promise<any>) | undefined;
1801
+ /**
1802
+ * Promise-version of Adapter.getStatesOf
1803
+ */
1804
+ getStatesOfAsync: ((...args: any[]) => Promise<any>) | undefined;
1805
+ /**
1806
+ * Promise-version of Adapter.addStateToEnum
1807
+ */
1808
+ addStateToEnumAsync: ((...args: any[]) => Promise<any>) | undefined;
1809
+ /**
1810
+ * Promise-version of Adapter.deleteStateFromEnum
1811
+ */
1812
+ deleteStateFromEnumAsync: ((...args: any[]) => Promise<any>) | undefined;
1813
+ /**
1814
+ * Promise-version of Adapter.chmodFile
1815
+ */
1816
+ chmodFileAsync: ((...args: any[]) => Promise<any>) | undefined;
1817
+ /**
1818
+ * Promise-version of Adapter.chownFile
1819
+ */
1820
+ chownFileAsync: ((...args: any[]) => Promise<any>) | undefined;
1821
+ /**
1822
+ * Promise-version of Adapter.readDir
1823
+ */
1824
+ readDirAsync: ((...args: any[]) => Promise<any>) | undefined;
1825
+ /**
1826
+ * Promise-version of Adapter.unlink
1827
+ */
1828
+ unlinkAsync: ((...args: any[]) => Promise<any>) | undefined;
1829
+ delFile: ((_adapter: any, name: any, options: any, callback: any) => void | Promise<never>) | undefined;
1830
+ delFileAsync: ((...args: any[]) => Promise<any>) | undefined;
1831
+ /**
1832
+ * Promise-version of Adapter.rename
1833
+ */
1834
+ renameAsync: ((...args: any[]) => Promise<any>) | undefined;
1835
+ /**
1836
+ * Promise-version of Adapter.mkdir
1837
+ */
1838
+ mkdirAsync: ((...args: any[]) => Promise<any>) | undefined;
1839
+ /**
1840
+ * Promise-version of Adapter.readFile
1841
+ */
1842
+ readFileAsync: ((...args: any[]) => Promise<any>) | undefined;
1843
+ /**
1844
+ * Promise-version of Adapter.writeFile
1845
+ */
1846
+ writeFileAsync: ((...args: any[]) => Promise<any>) | undefined;
1847
+ /**
1848
+ * Promise-version of Adapter.fileExists
1849
+ */
1850
+ fileExistsAsync: ((...args: any[]) => Promise<any>) | undefined;
1851
+ /**
1852
+ * Promise-version of Adapter.sendTo
1853
+ */
1854
+ sendToAsync: ((...args: any[]) => Promise<any>) | undefined;
1855
+ /**
1856
+ * Promise-version of Adapter.sendToHost
1857
+ */
1858
+ sendToHostAsync: ((...args: any[]) => Promise<any>) | undefined;
1859
+ /**
1860
+ * Promise-version of Adapter.setState
1861
+ */
1862
+ setStateAsync: ((...args: any[]) => Promise<any>) | undefined;
1863
+ /**
1864
+ * Promise-version of Adapter.setStateChanged
1865
+ */
1866
+ setStateChangedAsync: ((...args: any[]) => Promise<any>) | undefined;
1867
+ /**
1868
+ * Promise-version of Adapter.setForeignState
1869
+ */
1870
+ setForeignStateAsync: ((...args: any[]) => Promise<any>) | undefined;
1871
+ /**
1872
+ * Promise-version of Adapter.setForeignStateChanged
1873
+ */
1874
+ setForeignStateChangedAsync: ((...args: any[]) => Promise<any>) | undefined;
1875
+ /**
1876
+ * Promise-version of Adapter.getState
1877
+ */
1878
+ getStateAsync: ((...args: any[]) => Promise<any>) | undefined;
1879
+ /**
1880
+ * Promise-version of Adapter.getForeignState
1881
+ */
1882
+ getForeignStateAsync: ((...args: any[]) => Promise<any>) | undefined;
1883
+ /**
1884
+ * Promise-version of Adapter.getHistory
1885
+ */
1886
+ getHistoryAsync: ((...args: any[]) => Promise<any>) | undefined;
1887
+ /**
1888
+ * Promise-version of Adapter.delState
1889
+ */
1890
+ delStateAsync: ((...args: any[]) => Promise<any>) | undefined;
1891
+ /**
1892
+ * Promise-version of Adapter.delForeignState
1893
+ */
1894
+ delForeignStateAsync: ((...args: any[]) => Promise<any>) | undefined;
1895
+ /**
1896
+ * Promise-version of Adapter.getStates
1897
+ */
1898
+ getStatesAsync: ((...args: any[]) => Promise<any>) | undefined;
1899
+ /**
1900
+ * Promise-version of Adapter.getForeignStates
1901
+ */
1902
+ getForeignStatesAsync: ((...args: any[]) => Promise<any>) | undefined;
1903
+ /**
1904
+ * Promise-version of Adapter.subscribeForeignStates
1905
+ */
1906
+ subscribeForeignStatesAsync: ((...args: any[]) => Promise<any>) | undefined;
1907
+ /**
1908
+ * Promise-version of Adapter.unsubscribeForeignStates
1909
+ */
1910
+ unsubscribeForeignStatesAsync: ((...args: any[]) => Promise<any>) | undefined;
1911
+ /**
1912
+ * Promise-version of Adapter.subscribeStates
1913
+ */
1914
+ subscribeStatesAsync: ((...args: any[]) => Promise<any>) | undefined;
1915
+ /**
1916
+ * Promise-version of Adapter.unsubscribeStates
1917
+ */
1918
+ unsubscribeStatesAsync: ((...args: any[]) => Promise<any>) | undefined;
1919
+ /**
1920
+ * Promise-version of Adapter.subscribeForeignFiles
1921
+ */
1922
+ subscribeForeignFilesAsync: ((...args: any[]) => Promise<any>) | undefined;
1923
+ /**
1924
+ * Promise-version of Adapter.unsubscribeForeignFiles
1925
+ */
1926
+ unsubscribeForeignFilesAsync: ((...args: any[]) => Promise<any>) | undefined;
1927
+ /**
1928
+ * Promise-version of Adapter.setBinaryState
1929
+ *
1930
+ * @alias setForeignBinaryStateAsync
1896
1931
  * @memberof Adapter
1932
+ * @param {string} id of state
1933
+ * @param {Buffer} binary data
1934
+ * @param {object} [options] optional
1935
+ * @return {Promise}
1897
1936
  *
1898
- * @param {string} id
1899
- * @param {object} [options]
1900
- * @param {ioBroker.ErrorCallback} [callback]
1937
+ */
1938
+ setForeignBinaryStateAsync: ((...args: any[]) => Promise<any>) | undefined;
1939
+ /**
1940
+ * Async version of setBinaryState
1941
+ *
1942
+ * @alias setBinaryStateAsync
1943
+ * @memberof Adapter
1944
+ *
1945
+ * @param {string} id of state
1946
+ * @param {Buffer} binary data
1947
+ * @param {object} [options] optional
1948
+ * @param {Promise<void>}
1949
+ */
1950
+ setBinaryStateAsync: ((...args: any[]) => Promise<any>) | undefined;
1951
+ /**
1952
+ * Promise-version of Adapter.getBinaryState
1953
+ *
1954
+ * @alias getForeignBinaryStateAsync
1955
+ * @memberof Adapter
1901
1956
  *
1902
1957
  */
1903
- delBinaryState: (id: string, options?: object | undefined, callback?: ioBroker.ErrorCallback | undefined) => any;
1958
+ getForeignBinaryStateAsync: ((...args: any[]) => Promise<any>) | undefined;
1904
1959
  /**
1905
- * Promise-version of Adapter.delBinaryState
1960
+ * Promisified version of getBinaryState
1906
1961
  *
1907
- * @alias delBinaryStateAsync
1962
+ * @param {string} id The state ID
1963
+ * @param {object} options optional
1964
+ * @return {Promise<Buffer>}
1965
+ */
1966
+ getBinaryStateAsync: ((...args: any[]) => Promise<any>) | undefined;
1967
+ /**
1968
+ * Promise-version of Adapter.delForeignBinaryState
1969
+ *
1970
+ * @alias delForeignBinaryStateAsync
1908
1971
  * @memberof Adapter
1909
1972
  * @param {string} id
1910
1973
  * @param {object} [options]
1911
1974
  * @return {Promise<void>}
1912
1975
  *
1913
1976
  */
1914
- delBinaryStateAsync: any;
1977
+ delForeignBinaryStateAsync: ((...args: any[]) => Promise<any>) | undefined;
1915
1978
  /**
1916
- * Return plugin instance
1979
+ * Promise-version of Adapter.delBinaryState
1917
1980
  *
1918
- * @param name {string} name of the plugin to return
1919
- * @returns {object} plugin instance or null if not existent or not isActive
1920
- */
1921
- getPluginInstance: (name: string) => object;
1922
- /**
1923
- * Return plugin configuration
1981
+ * @alias delBinaryStateAsync
1982
+ * @memberof Adapter
1983
+ * @param {string} id
1984
+ * @param {object} [options]
1985
+ * @return {Promise<void>}
1924
1986
  *
1925
- * @param name {string} name of the plugin to return
1926
- * @returns {object} plugin configuration or null if not existent or not isActive
1927
1987
  */
1928
- getPluginConfig: (name: string) => object;
1929
- logRedirect: (isActive: any, id: any) => void;
1930
- requireLog: (isActive: any) => void;
1988
+ delBinaryStateAsync: ((...args: any[]) => Promise<any>) | undefined;
1989
+ setExecutableCapabilities: typeof tools.setExecutableCapabilities | undefined;
1990
+ _initializeTimeout: any;
1991
+ connected: boolean | undefined;
1992
+ dateFormat: any;
1993
+ isFloatComma: any;
1994
+ language: any;
1995
+ longitude: any;
1996
+ latitude: any;
1997
+ statesConnectedTime: number | undefined;
1998
+ patterns: any;
1999
+ logRedirect: ((isActive: any, id: any) => void) | undefined;
2000
+ requireLog: ((isActive: any) => void) | ((_isActive: any) => void) | undefined;
1931
2001
  logRequired: any;
1932
2002
  logOffTimer: any;
1933
- processLog: (msg: any) => void;
2003
+ processLog: ((msg: any) => void) | undefined;
1934
2004
  instance: any;
1935
2005
  config: any;
1936
2006
  host: any;
1937
2007
  common: any;
1938
- stop: () => Promise<void>;
1939
- kill: () => Promise<void>;
2008
+ stop: (() => Promise<void>) | (() => Promise<void>) | (() => Promise<void>) | undefined;
2009
+ kill: (() => Promise<void>) | (() => Promise<void>) | (() => Promise<void>) | undefined;
1940
2010
  adapterConfig: any;
1941
- log: Log;
2011
+ /** @type Utils*/
2012
+ _utils: Utils | undefined;
2013
+ log: Log | undefined;
1942
2014
  oObjects: any;
1943
2015
  version: any;
2016
+ _schedule: any;
1944
2017
  oStates: Record<string, ioBroker.State> | undefined;
1945
2018
  pluginHandler: import("@iobroker/plugin-base/lib/PluginHandler") | undefined;
1946
- /**
1947
- * This method returns the list of license that can be used by this adapter
1948
- * @param {boolean} all if return the licenses, that used by other instances (true) or only for this instance (false)
1949
- * @returns {Promise<object[]>} list of suitable licenses
1950
- */
1951
- getSuitableLicenses: ((all: boolean) => Promise<object[]>) | undefined;
1952
2019
  }
2020
+ import { EventEmitter } from "events";
2021
+ import { tools } from "@iobroker/js-controller-common";
2022
+ import { Utils } from "./utils";
1953
2023
  import Log = require("./log");
1954
2024
  //# sourceMappingURL=adapter.d.ts.map