@iobroker/types 5.0.12 → 5.0.13-alpha.0-20230907-ce27fae4
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 +26 -4
- package/build/shared.d.ts +10 -7
- package/build/types.d.ts +2 -2
- package/package.json +2 -2
package/build/objects.d.ts
CHANGED
|
@@ -146,8 +146,10 @@ declare global {
|
|
|
146
146
|
: AnyObject;
|
|
147
147
|
|
|
148
148
|
type Languages = 'en' | 'de' | 'ru' | 'pt' | 'nl' | 'fr' | 'it' | 'es' | 'pl' | 'zh-cn';
|
|
149
|
+
type Translated = { en: string } & { [lang in Languages]?: string };
|
|
150
|
+
|
|
149
151
|
/** For objects we require the English language to be present */
|
|
150
|
-
type StringOrTranslated = string |
|
|
152
|
+
type StringOrTranslated = string | Translated;
|
|
151
153
|
|
|
152
154
|
type CommonType = 'number' | 'string' | 'boolean' | 'array' | 'object' | 'mixed' | 'file';
|
|
153
155
|
|
|
@@ -397,7 +399,7 @@ declare global {
|
|
|
397
399
|
/** The name of this group */
|
|
398
400
|
name: string;
|
|
399
401
|
/** The users of this group */
|
|
400
|
-
members:
|
|
402
|
+
members: ObjectIDs.User[]; // system.user.name, ...
|
|
401
403
|
/** The default permissions of this group */
|
|
402
404
|
acl: Omit<PermissionSet, 'user' | 'groups'>;
|
|
403
405
|
/** A group can be disabled, if missing, group is active */
|
|
@@ -452,6 +454,8 @@ declare global {
|
|
|
452
454
|
stopInstance: boolean | number;
|
|
453
455
|
}
|
|
454
456
|
|
|
457
|
+
type AutoUpgradePolicy = 'none' | 'patch' | 'minor' | 'major';
|
|
458
|
+
|
|
455
459
|
interface AdapterCommon extends ObjectCommon {
|
|
456
460
|
/** Custom attributes to be shown in admin in the object browser */
|
|
457
461
|
adminColumns?: any[];
|
|
@@ -470,6 +474,8 @@ declare global {
|
|
|
470
474
|
allowInit?: boolean;
|
|
471
475
|
/** Possible values for the instance mode (if more than one is possible) */
|
|
472
476
|
availableModes?: InstanceMode[];
|
|
477
|
+
/** Array which lists all blocked versions. Blocked versions will not be started. Use semver notation to specify the version ranges. The information is always used from the io-package.json in the GitHub repository. */
|
|
478
|
+
blockedVersions?: string[];
|
|
473
479
|
/** Whether this adapter includes custom blocks for Blockly. If true, `admin/blockly.js` must exist. */
|
|
474
480
|
blockly?: boolean;
|
|
475
481
|
/** Where the adapter will get its data from. Set this together with @see dataSource */
|
|
@@ -480,9 +486,11 @@ declare global {
|
|
|
480
486
|
dataFolder?: string;
|
|
481
487
|
/** How the adapter will mainly receive its data. Set this together with @see connectionType */
|
|
482
488
|
dataSource?: 'poll' | 'push' | 'assumption';
|
|
483
|
-
/** A record of ioBroker adapters (including "js-controller") and version ranges which are required for this adapter. */
|
|
489
|
+
/** A record of ioBroker adapters (including "js-controller") and version ranges which are required for this adapter on the same host. */
|
|
484
490
|
dependencies?: Array<Record<string, string>>;
|
|
485
|
-
/**
|
|
491
|
+
/** A record of ioBroker adapters (including "js-controller") and version ranges which are required for this adapter in the whole system. */
|
|
492
|
+
globalDependencies?: Array<Record<string, string>>;
|
|
493
|
+
/** Which files outside the README.md have documentation for the adapter */
|
|
486
494
|
docs?: Partial<Record<Languages, string | string[]>>;
|
|
487
495
|
/** Whether new instances should be enabled by default. *Should* be `false`! */
|
|
488
496
|
enabled: boolean;
|
|
@@ -711,11 +719,23 @@ declare global {
|
|
|
711
719
|
protectedNative?: string[];
|
|
712
720
|
/** These properties will be automatically encrypted and decrypted when used with adapter.config */
|
|
713
721
|
encryptedNative?: string[];
|
|
722
|
+
/** Register notifications for the built-in notification system */
|
|
723
|
+
notifications?: Notification[];
|
|
714
724
|
}
|
|
715
725
|
interface PartialInstanceObject extends Partial<Omit<InstanceObject, 'common'>> {
|
|
716
726
|
common?: Partial<InstanceCommon>;
|
|
717
727
|
}
|
|
718
728
|
|
|
729
|
+
/** TODO: To be defined */
|
|
730
|
+
type NotificationCategory = any;
|
|
731
|
+
|
|
732
|
+
interface Notification {
|
|
733
|
+
scope: string;
|
|
734
|
+
name: Translated;
|
|
735
|
+
description: Translated;
|
|
736
|
+
categories: NotificationCategory[];
|
|
737
|
+
}
|
|
738
|
+
|
|
719
739
|
interface AdapterObject extends BaseObject {
|
|
720
740
|
_id: ObjectIDs.Adapter;
|
|
721
741
|
type: 'adapter';
|
|
@@ -724,6 +744,8 @@ declare global {
|
|
|
724
744
|
protectedNative?: string[];
|
|
725
745
|
/** Like protectedNative, but the properties are also encrypted and decrypted automatically */
|
|
726
746
|
encryptedNative?: string[];
|
|
747
|
+
/** Register notifications for the built-in notification system */
|
|
748
|
+
notifications?: Notification[];
|
|
727
749
|
}
|
|
728
750
|
interface PartialAdapterObject extends Partial<Omit<AdapterObject, 'common'>> {
|
|
729
751
|
common?: Partial<AdapterCommon>;
|
package/build/shared.d.ts
CHANGED
|
@@ -472,13 +472,13 @@ declare global {
|
|
|
472
472
|
|
|
473
473
|
type ChownObjectCallback = (err?: NodeJS.ErrnoException | null, list?: ioBroker.Object[]) => void;
|
|
474
474
|
|
|
475
|
-
type
|
|
475
|
+
type GetKeysCallback = (err?: Error | null, list?: string[]) => void;
|
|
476
476
|
|
|
477
477
|
interface GetObjectViewItem<T extends AnyObject> {
|
|
478
478
|
/** The ID of this object */
|
|
479
479
|
id: string;
|
|
480
480
|
/** A copy of the object from the DB */
|
|
481
|
-
value: T
|
|
481
|
+
value: T;
|
|
482
482
|
}
|
|
483
483
|
type GetObjectViewCallback<T extends AnyObject> = (
|
|
484
484
|
err?: Error | null,
|
|
@@ -486,14 +486,17 @@ declare global {
|
|
|
486
486
|
) => void;
|
|
487
487
|
type GetObjectViewPromise<T extends AnyObject> = Promise<NonNullCallbackReturnTypeOf<GetObjectViewCallback<T>>>;
|
|
488
488
|
|
|
489
|
-
interface GetObjectListItem extends
|
|
489
|
+
interface GetObjectListItem<T extends ioBroker.Object> extends GetObjectViewItem<T> {
|
|
490
490
|
/** A copy of the object */
|
|
491
|
-
value:
|
|
491
|
+
value: T;
|
|
492
492
|
/** The same as @link{value} */
|
|
493
|
-
doc:
|
|
493
|
+
doc: T;
|
|
494
494
|
}
|
|
495
|
-
type GetObjectListCallback = (
|
|
496
|
-
|
|
495
|
+
type GetObjectListCallback<T extends ioBroker.Object> = (
|
|
496
|
+
err?: Error | null,
|
|
497
|
+
result?: { rows: GetObjectListItem<T>[] }
|
|
498
|
+
) => void;
|
|
499
|
+
type GetObjectListPromise = Promise<NonNullCallbackReturnTypeOf<GetObjectListCallback<ioBroker.Object>>>;
|
|
497
500
|
|
|
498
501
|
type ExtendObjectCallback = (
|
|
499
502
|
err?: Error | null,
|
package/build/types.d.ts
CHANGED
|
@@ -502,10 +502,10 @@ export declare class AdapterClass extends EventEmitter {
|
|
|
502
502
|
getObjectView<Design extends string = string, Search extends string = string>(design: Design, search: Search, params: ioBroker.GetObjectViewParams | null | undefined, callback: ioBroker.GetObjectViewCallback<ioBroker.InferGetObjectViewItemType<Design, Search>>): void;
|
|
503
503
|
getObjectView<Design extends string = string, Search extends string = string>(design: Design, search: Search, params: ioBroker.GetObjectViewParams | null | undefined, options: unknown, callback: ioBroker.GetObjectViewCallback<ioBroker.InferGetObjectViewItemType<Design, Search>>): void;
|
|
504
504
|
private _getObjectView;
|
|
505
|
-
getObjectList(params: ioBroker.GetObjectListParams | null, callback: ioBroker.GetObjectListCallback): void;
|
|
505
|
+
getObjectList(params: ioBroker.GetObjectListParams | null, callback: ioBroker.GetObjectListCallback<ioBroker.Object>): void;
|
|
506
506
|
getObjectList(params: ioBroker.GetObjectListParams | null, options: {
|
|
507
507
|
sorted?: boolean;
|
|
508
|
-
} | Record<string, any>, callback: ioBroker.GetObjectListCallback): void;
|
|
508
|
+
} | Record<string, any>, callback: ioBroker.GetObjectListCallback<ioBroker.Object>): void;
|
|
509
509
|
getEnum(callback: ioBroker.GetEnumCallback): void;
|
|
510
510
|
getEnum(name: string, callback: ioBroker.GetEnumCallback): void;
|
|
511
511
|
getEnum(name: string, options: unknown, callback: ioBroker.GetEnumCallback): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/types",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.13-alpha.0-20230907-ce27fae4",
|
|
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": "be5f83b840c9429de4380c2ea400a7e607dd532e"
|
|
45
45
|
}
|