@iobroker/types 7.2.3 → 7.2.5
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/build/objects.d.ts +4 -2
- package/build/shared.d.ts +16 -0
- package/build/types.d.ts +16 -2
- package/package.json +2 -2
package/build/objects.d.ts
CHANGED
|
@@ -650,7 +650,7 @@ declare global {
|
|
|
650
650
|
/** Settings for custom Admin Tabs */
|
|
651
651
|
adminTab?: {
|
|
652
652
|
name?: StringOrTranslated;
|
|
653
|
-
/**
|
|
653
|
+
/** Icon for the tab: a file name relative to the "admin" folder, a URL or a base64 data URL. If not set, the adapter icon is shown */
|
|
654
654
|
icon?: string;
|
|
655
655
|
/** If true, the Tab is not reloaded when the configuration changes */
|
|
656
656
|
ignoreConfigUpdate?: boolean;
|
|
@@ -658,7 +658,7 @@ declare global {
|
|
|
658
658
|
link?: string;
|
|
659
659
|
/** If true, only one instance of this tab will be created for all instances */
|
|
660
660
|
singleton?: boolean;
|
|
661
|
-
/**
|
|
661
|
+
/** Position in the admin menu: the built-in tabs use 1 to 120, a tab without order gets 200. 0 counts as not set. Once the user has sorted the menu, the stored order wins */
|
|
662
662
|
order?: number;
|
|
663
663
|
/**
|
|
664
664
|
* If the page sends an 'iobLoaded' event:
|
|
@@ -951,6 +951,8 @@ declare global {
|
|
|
951
951
|
}[];
|
|
952
952
|
/** Global saved expert mode for admin */
|
|
953
953
|
expertMode?: boolean;
|
|
954
|
+
/** The "Did you know ...?" tips of the admin are not shown when it is opened */
|
|
955
|
+
tipsDisabled?: boolean;
|
|
954
956
|
|
|
955
957
|
// Make it possible to narrow the object type using the custom property
|
|
956
958
|
custom?: undefined;
|
package/build/shared.d.ts
CHANGED
|
@@ -293,6 +293,22 @@ declare global {
|
|
|
293
293
|
message: MessagePayload;
|
|
294
294
|
/** The source of this message */
|
|
295
295
|
from: string;
|
|
296
|
+
/**
|
|
297
|
+
* The user this message is sent on behalf of, if the sender named one (`options.user` of
|
|
298
|
+
* `sendTo`/`sendToHost`). A socket server such as `admin` or `web` puts the authenticated
|
|
299
|
+
* user of the connection here, so the receiving instance can check what that user may do
|
|
300
|
+
* instead of acting with its own rights.
|
|
301
|
+
*
|
|
302
|
+
* It is only as trustworthy as `from`: every instance can claim any user here, and all of
|
|
303
|
+
* them run with full database rights anyway. Trust it when `from` is an instance you trust
|
|
304
|
+
* to have authenticated the user, and never as a substitute for your own permission check.
|
|
305
|
+
*
|
|
306
|
+
* Set from js-controller 7.2.5 on; an older one never sets it. A message that was sent
|
|
307
|
+
* without a user does not carry the field at all, so the absence of the field means
|
|
308
|
+
* "nobody was named" - for whichever of the two reasons, and in both cases there is
|
|
309
|
+
* nothing to check against.
|
|
310
|
+
*/
|
|
311
|
+
user?: ioBroker.ObjectIDs.User;
|
|
296
312
|
/** Callback information. This is set when the source expects a response */
|
|
297
313
|
callback?: MessageCallbackInfo;
|
|
298
314
|
}
|
package/build/types.d.ts
CHANGED
|
@@ -166,7 +166,7 @@ export declare interface AdapterClass {
|
|
|
166
166
|
* Sends a message to a specific host or all hosts.
|
|
167
167
|
*/
|
|
168
168
|
sendToHostAsync(hostName: string, message: ioBroker.MessagePayload): Promise<ioBroker.Message | undefined>;
|
|
169
|
-
sendToHostAsync(hostName: string, command: string, message: ioBroker.MessagePayload): Promise<ioBroker.Message | undefined>;
|
|
169
|
+
sendToHostAsync(hostName: string, command: string, message: ioBroker.MessagePayload, options?: SendToOptions): Promise<ioBroker.Message | undefined>;
|
|
170
170
|
/**
|
|
171
171
|
* Sends a message to a specific instance or all instances of some specific adapter.
|
|
172
172
|
*/
|
|
@@ -330,6 +330,8 @@ export declare class AdapterClass extends EventEmitter {
|
|
|
330
330
|
namespace: `${string}.${number}`;
|
|
331
331
|
name: string;
|
|
332
332
|
private _systemSecret?;
|
|
333
|
+
/** Attributes of `encryptedNative`: their values in `this.config` are decrypted on start */
|
|
334
|
+
private _decryptedNativeAttributes;
|
|
333
335
|
/** Whether the adapter has already terminated */
|
|
334
336
|
private terminated;
|
|
335
337
|
/** The cache of usernames */
|
|
@@ -483,6 +485,15 @@ export declare class AdapterClass extends EventEmitter {
|
|
|
483
485
|
*
|
|
484
486
|
*/
|
|
485
487
|
disable(): ioBroker.SetObjectPromise;
|
|
488
|
+
/**
|
|
489
|
+
* Reads a parameter which is stored encrypted and returns its decrypted value.
|
|
490
|
+
*
|
|
491
|
+
* An attribute listed in `encryptedNative` is already decrypted in `this.config` when the adapter
|
|
492
|
+
* starts, and is returned as it is.
|
|
493
|
+
*
|
|
494
|
+
* @param attribute the config attribute to decrypt
|
|
495
|
+
* @param callback return result
|
|
496
|
+
*/
|
|
486
497
|
getEncryptedConfig(attribute: string, callback?: GetEncryptedConfigCallback): Promise<string | string[] | void>;
|
|
487
498
|
private _getEncryptedConfig;
|
|
488
499
|
/**
|
|
@@ -703,7 +714,7 @@ export declare class AdapterClass extends EventEmitter {
|
|
|
703
714
|
sendTo(instanceName: string, command: string, message: any, callback?: ioBroker.MessageCallback | ioBroker.MessageCallbackInfo, options?: SendToOptions): void;
|
|
704
715
|
private _sendTo;
|
|
705
716
|
sendToHost(hostName: string | null, message: any, callback?: ioBroker.MessageCallback | ioBroker.MessageCallbackInfo): void;
|
|
706
|
-
sendToHost(hostName: string | null, command: string, message: any, callback?: ioBroker.MessageCallback | ioBroker.MessageCallbackInfo): void;
|
|
717
|
+
sendToHost(hostName: string | null, command: string, message: any, callback?: ioBroker.MessageCallback | ioBroker.MessageCallbackInfo, options?: SendToOptions): void;
|
|
707
718
|
private _sendToHost;
|
|
708
719
|
sendToUI(options: SendToUserInterfaceClientOptions): Promise<void>;
|
|
709
720
|
registerNotification<Scope extends keyof ioBroker.NotificationScopes>(scope: Scope, category: ioBroker.NotificationScopes[Scope] | null, message: string, options?: NotificationOptions): Promise<void>;
|
|
@@ -1246,6 +1257,7 @@ export declare interface InternalSendToHostOptions {
|
|
|
1246
1257
|
command: string;
|
|
1247
1258
|
message: any;
|
|
1248
1259
|
callback?: ioBroker.MessageCallback | ioBroker.MessageCallbackInfo;
|
|
1260
|
+
options?: SendToOptions;
|
|
1249
1261
|
}
|
|
1250
1262
|
|
|
1251
1263
|
export declare interface InternalSendToOptions {
|
|
@@ -1367,6 +1379,8 @@ declare type Pattern_2 = string | string[];
|
|
|
1367
1379
|
export declare interface SendToOptions {
|
|
1368
1380
|
/** Method throws or calls error cb, if callback not called in time, works for single targets only */
|
|
1369
1381
|
timeout?: number;
|
|
1382
|
+
/** The user on whose behalf the message is sent */
|
|
1383
|
+
user?: ioBroker.ObjectIDs.User;
|
|
1370
1384
|
}
|
|
1371
1385
|
|
|
1372
1386
|
export declare interface SendToUserInterfaceClientOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/types",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.5",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=12.0.0"
|
|
6
6
|
},
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
]
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "9bc56bf00b9eedf53f0028d88c1e19d6d769615a"
|
|
45
45
|
}
|