@iobroker/types 7.2.3-alpha.8-20260709-8d8c9c5ed → 7.2.3
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/config.d.ts +19 -86
- package/build/objects.d.ts +20 -47
- package/build/shared.d.ts +21 -35
- package/build/types.d.ts +1668 -3451
- package/package.json +5 -6
package/build/config.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ interface DatabaseBackupOptions {
|
|
|
6
6
|
/** All backups older than configured hours will be deleted. But only if the number of files is greater than of backupNumber */
|
|
7
7
|
hours: number;
|
|
8
8
|
'// hours': string;
|
|
9
|
-
/** By default
|
|
9
|
+
/** By default backup every 2 hours. Time is in minutes. To disable backup set the value to 0 */
|
|
10
10
|
period: number;
|
|
11
11
|
'// period': string;
|
|
12
12
|
/** Absolute path to back-up directory or empty to back-up in data directory */
|
|
@@ -46,100 +46,41 @@ interface JsonlOptions {
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
interface DatabaseConnectionOptions {
|
|
50
|
-
/** Password used to authenticate against the database */
|
|
51
|
-
auth_pass: string;
|
|
52
|
-
/** Maximum delay in milliseconds between reconnection attempts */
|
|
53
|
-
retry_max_delay?: number;
|
|
54
|
-
/** Maximum number of reconnection attempts */
|
|
55
|
-
retry_max_count: number;
|
|
56
|
-
/** As soon as the tls property is defined, redis will try to connect via tls (currently only for redis) */
|
|
57
|
-
tls?: {
|
|
58
|
-
/** Needs to be false with self-signed certs */
|
|
59
|
-
rejectUnauthorized?: boolean;
|
|
60
|
-
/** The certificate content */
|
|
61
|
-
ca?: string;
|
|
62
|
-
/** The key file content */
|
|
63
|
-
key?: string;
|
|
64
|
-
/** The cert file content */
|
|
65
|
-
cert?: string;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
// Redis options
|
|
69
|
-
port?: number | number[];
|
|
70
|
-
host?: string | string[];
|
|
71
|
-
/**
|
|
72
|
-
* 4 (IPv4) or 6 (IPv6), Defaults to 4.
|
|
73
|
-
*/
|
|
74
|
-
family?: number;
|
|
75
|
-
/**
|
|
76
|
-
* Local domain socket path. If set the port, host and family will be ignored.
|
|
77
|
-
*/
|
|
78
|
-
path?: string;
|
|
79
|
-
connectionName?: string;
|
|
80
|
-
/**
|
|
81
|
-
* If set, client will send AUTH command with the value of this option when connected.
|
|
82
|
-
*/
|
|
83
|
-
password?: string;
|
|
84
|
-
/**
|
|
85
|
-
* Database index to use.
|
|
86
|
-
*/
|
|
87
|
-
db?: number;
|
|
88
|
-
/**
|
|
89
|
-
* When a connection is established to the Redis server, the server might still be loading
|
|
90
|
-
* the database from disk. While loading, the server not respond to any commands.
|
|
91
|
-
* To work around this, when this option is true, ioredis will check the status of the Redis server,
|
|
92
|
-
* and when the Redis server is able to process commands, a ready event will be emitted.
|
|
93
|
-
*/
|
|
94
|
-
enableReadyCheck?: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* When the return value isn't a number, ioredis will stop trying to reconnect.
|
|
97
|
-
* Fixed in: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/15858
|
|
98
|
-
*/
|
|
99
|
-
retryStrategy?(times: number): number | Error;
|
|
100
|
-
/**
|
|
101
|
-
* After reconnected, if the previous connection was in the subscriber mode, client will auto re-subscribe these channels.
|
|
102
|
-
* default: true.
|
|
103
|
-
*/
|
|
104
|
-
autoResubscribe?: boolean;
|
|
105
|
-
/**
|
|
106
|
-
* default: null.
|
|
107
|
-
*/
|
|
108
|
-
name?: string;
|
|
109
|
-
sentinels?: Array<{ host: string; port: number }>;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/** Configuration of a database connection (objects or states) */
|
|
113
49
|
export interface DatabaseOptions {
|
|
114
50
|
/** Possible values: 'file' - [port 9001], 'jsonl' - [port 9001], 'redis' - [port 6379 or 26379 for sentinel]. */
|
|
115
51
|
type: 'jsonl' | 'file' | 'redis';
|
|
116
|
-
/** Name of the sentinel master to connect to */
|
|
117
52
|
sentinelName?: string;
|
|
118
|
-
/** Host name(s) or IP address(es) of the database server */
|
|
119
53
|
host: string | string[];
|
|
120
|
-
/** Port(s) of the database server */
|
|
121
54
|
port: number | number[];
|
|
122
|
-
/** Maximum time in milliseconds to wait for a connection to be established */
|
|
123
55
|
connectTimeout: number;
|
|
124
|
-
/** Interval in milliseconds between flushing the in-memory database to file */
|
|
125
56
|
writeFileInterval: number;
|
|
126
|
-
/** Directory where the database files are stored, relative to the controller dir */
|
|
127
57
|
dataDir?: string;
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
58
|
+
options: {
|
|
59
|
+
auth_pass: string;
|
|
60
|
+
retry_max_delay: number;
|
|
61
|
+
retry_max_count: number;
|
|
62
|
+
db: number;
|
|
63
|
+
family: number;
|
|
64
|
+
/** As soon as the tls property is defined, redis will try to connect via tls (currently only for redis) */
|
|
65
|
+
tls?: {
|
|
66
|
+
/** Needs to be false with self-signed certs */
|
|
67
|
+
rejectUnauthorized?: boolean;
|
|
68
|
+
/** The certificate content */
|
|
69
|
+
ca?: string;
|
|
70
|
+
/** The key file content */
|
|
71
|
+
key?: string;
|
|
72
|
+
/** The cert file content */
|
|
73
|
+
cert?: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
131
76
|
backup: DatabaseBackupOptions;
|
|
132
|
-
/** Options specific to the JSONL database backend */
|
|
133
77
|
jsonlOptions: JsonlOptions;
|
|
134
78
|
}
|
|
135
79
|
|
|
136
|
-
/** Configuration of the objects database connection */
|
|
137
80
|
export interface ObjectsDatabaseOptions extends DatabaseOptions {
|
|
138
|
-
/** Disable the in-memory file cache for objects */
|
|
139
81
|
noFileCache: boolean;
|
|
140
82
|
}
|
|
141
83
|
|
|
142
|
-
/** Configuration of the states database connection */
|
|
143
84
|
export interface StatesDatabaseOptions extends DatabaseOptions {
|
|
144
85
|
/** Limit maximum number of log entries in the list (only read by adapter.ts from the config file) */
|
|
145
86
|
maxQueue: number;
|
|
@@ -149,7 +90,6 @@ export interface StatesDatabaseOptions extends DatabaseOptions {
|
|
|
149
90
|
* The ioBroker global config
|
|
150
91
|
*/
|
|
151
92
|
export interface IoBJson {
|
|
152
|
-
/** System-wide controller settings */
|
|
153
93
|
system: {
|
|
154
94
|
/** Do not use more than memory limit mb by ioB process (0 to deactivate) */
|
|
155
95
|
memoryLimitMB: number;
|
|
@@ -176,18 +116,14 @@ export interface IoBJson {
|
|
|
176
116
|
memLimitError: number;
|
|
177
117
|
'// memLimitError': string;
|
|
178
118
|
};
|
|
179
|
-
/** Configuration of the multihost service used to connect several ioBroker hosts */
|
|
180
119
|
multihostService: {
|
|
181
120
|
enabled: boolean;
|
|
182
121
|
secure: boolean;
|
|
183
122
|
password: string;
|
|
184
123
|
persist: boolean;
|
|
185
124
|
};
|
|
186
|
-
/** Configuration of the objects database */
|
|
187
125
|
objects: ObjectsDatabaseOptions;
|
|
188
|
-
/** Configuration of the states database */
|
|
189
126
|
states: StatesDatabaseOptions;
|
|
190
|
-
/** Logging configuration */
|
|
191
127
|
log: {
|
|
192
128
|
level: ioBroker.LogLevel;
|
|
193
129
|
maxDays: number;
|
|
@@ -196,16 +132,13 @@ export interface IoBJson {
|
|
|
196
132
|
};
|
|
197
133
|
/** Always relative to iobroker.js-controller/ */
|
|
198
134
|
dataDir: string;
|
|
199
|
-
/** Comment/hint shown next to the dataDir setting in the JSON config */
|
|
200
135
|
'// dataDir': string;
|
|
201
|
-
/** Controller plugins configuration keyed by plugin name */
|
|
202
136
|
plugins: {
|
|
203
137
|
[pluginName: string]: {
|
|
204
138
|
enabled: boolean;
|
|
205
139
|
[other: string]: unknown;
|
|
206
140
|
};
|
|
207
141
|
};
|
|
208
|
-
/** Comment/hint shown next to the dnsResolution setting in the JSON config */
|
|
209
142
|
'// dnsResolution': string;
|
|
210
143
|
/** Use 'verbatim' for ipv6 first, else use 'ipv4first' */
|
|
211
144
|
dnsResolution: 'verbatim' | 'ipv4first';
|
package/build/objects.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ declare global {
|
|
|
6
6
|
/** Defines access rights for a single file */
|
|
7
7
|
interface FileACL {
|
|
8
8
|
/** Full name of the user who owns this file, e.g. "system.user.admin" */
|
|
9
|
-
owner:
|
|
9
|
+
owner: string;
|
|
10
10
|
/** Full name of the group who owns this file, e.g. "system.group.administrator" */
|
|
11
|
-
ownerGroup:
|
|
11
|
+
ownerGroup: string;
|
|
12
12
|
/** Linux-type permissions defining access to this file */
|
|
13
13
|
permissions: number;
|
|
14
14
|
}
|
|
@@ -24,9 +24,9 @@ declare global {
|
|
|
24
24
|
/** Defines access rights for a single object */
|
|
25
25
|
interface ObjectACL {
|
|
26
26
|
/** Full name of the user who owns this object, e.g. "system.user.admin" */
|
|
27
|
-
owner:
|
|
27
|
+
owner: string;
|
|
28
28
|
/** Full name of the group who owns this object, e.g. "system.group.administrator" */
|
|
29
|
-
ownerGroup:
|
|
29
|
+
ownerGroup: string;
|
|
30
30
|
/** Linux-type permissions defining access to this object */
|
|
31
31
|
object: number;
|
|
32
32
|
}
|
|
@@ -536,16 +536,6 @@ declare global {
|
|
|
536
536
|
export interface DevicesWidgets {
|
|
537
537
|
/** Link to the file with components relatively to `admin/dm-widgets` in admin or `${adapterName}` in web. Default is customDevices.js */
|
|
538
538
|
url?: string;
|
|
539
|
-
/**
|
|
540
|
-
* Link to the file (icons.json) with specific icons in form
|
|
541
|
-
* ```ts
|
|
542
|
-
* type IconDescription = {
|
|
543
|
-
* name: ioBroker.Translated,
|
|
544
|
-
* icons: [{id: string, label: ioBroker.Translated, category: string, icon: 'data:image/svg+xml;base64,...'}]
|
|
545
|
-
* };
|
|
546
|
-
* ```
|
|
547
|
-
*/
|
|
548
|
-
iconsManifest?: string;
|
|
549
539
|
/** Description of the components (widgets). It could be multiple widgets in one adapter */
|
|
550
540
|
components: {
|
|
551
541
|
/** Name of the class */
|
|
@@ -696,13 +686,13 @@ declare global {
|
|
|
696
686
|
blockedVersions?: string[];
|
|
697
687
|
/** Whether this adapter includes custom blocks for Blockly. If true, `admin/blockly.js` must exist. */
|
|
698
688
|
blockly?: boolean;
|
|
699
|
-
/** Where the adapter will get its data from. Set this together with
|
|
689
|
+
/** Where the adapter will get its data from. Set this together with @see dataSource */
|
|
700
690
|
connectionType?: ConnectionType;
|
|
701
691
|
/** If true, this adapter can be started in compact mode (in the same process as other adapters) */
|
|
702
692
|
compact?: boolean;
|
|
703
693
|
/** The directory relative to iobroker-data where the adapter stores the data. Supports the placeholder `%INSTANCE%`. This folder will be backed up and restored automatically. */
|
|
704
694
|
dataFolder?: string;
|
|
705
|
-
/** How the adapter will mainly receive its data. Set this together with
|
|
695
|
+
/** How the adapter will mainly receive its data. Set this together with @see connectionType */
|
|
706
696
|
dataSource?: 'poll' | 'push' | 'assumption';
|
|
707
697
|
/** A record of ioBroker adapters (including "js-controller") and version ranges which are required for this adapter on the same host. */
|
|
708
698
|
dependencies?: Dependencies;
|
|
@@ -734,7 +724,7 @@ declare global {
|
|
|
734
724
|
keywords?: string[];
|
|
735
725
|
/** A dictionary of links to web services this adapter provides */
|
|
736
726
|
localLinks?: Record<string, string | LocalLink>;
|
|
737
|
-
/** @deprecated Use
|
|
727
|
+
/** @deprecated Use @see localLinks */
|
|
738
728
|
localLink?: string;
|
|
739
729
|
/** Default log level for this adapter. It can be changed for every instance separately */
|
|
740
730
|
loglevel?: LogLevel;
|
|
@@ -745,9 +735,9 @@ declare global {
|
|
|
745
735
|
/** Whether the admin tab is written in a materialized style. Required for Admin 3+ */
|
|
746
736
|
materializeTab?: boolean;
|
|
747
737
|
/** Whether the admin configuration dialog is written in a materialized style. Required for Admin 3+ */
|
|
748
|
-
/** @
|
|
738
|
+
/** @deprectaed Use adminUI with config = "materialize". But better use jsonConfig.json */
|
|
749
739
|
materialize: boolean;
|
|
750
|
-
/** @deprecated Use
|
|
740
|
+
/** @deprecated Use @see supportedMessages up from controller v5 */
|
|
751
741
|
messagebox?: true;
|
|
752
742
|
/** Messages which are supported by the adapter, supportedMessages.custom: true is the equivalent to messagebox: true */
|
|
753
743
|
supportedMessages?: SupportedMessages;
|
|
@@ -804,11 +794,11 @@ declare global {
|
|
|
804
794
|
subscribable?: boolean;
|
|
805
795
|
/** If `true`, this adapter provides custom per-state settings. Requires a `custom_m.html` file in the `admin` directory. */
|
|
806
796
|
supportCustoms?: boolean;
|
|
807
|
-
/** @deprecated Use
|
|
797
|
+
/** @deprecated Use @see supportedMessages up from controller v5 */
|
|
808
798
|
supportStopInstance?: boolean;
|
|
809
799
|
/** The translated names of this adapter to be shown in the admin UI */
|
|
810
800
|
titleLang?: StringOrTranslated;
|
|
811
|
-
/** @deprecated The name of this adapter to be shown in the admin UI. Use
|
|
801
|
+
/** @deprecated The name of this adapter to be shown in the admin UI. Use @see titleLang instead. */
|
|
812
802
|
title?: string;
|
|
813
803
|
/** The type of this adapter */
|
|
814
804
|
type?:
|
|
@@ -852,7 +842,7 @@ declare global {
|
|
|
852
842
|
webByVersion?: boolean;
|
|
853
843
|
/** Whether the web server in this adapter can be extended with plugin/extensions */
|
|
854
844
|
webExtendable?: boolean;
|
|
855
|
-
/** Relative path to a module that contains an extension for the web adapter. Use together with
|
|
845
|
+
/** Relative path to a module that contains an extension for the web adapter. Use together with @see native.webInstance to configure which instances this affects */
|
|
856
846
|
webExtension?: string;
|
|
857
847
|
/** List of parameters that must be included in info.js by webServer adapter. (Example material: `"webPreSettings": { "materialBackground": "native.loadingBackground" }`). Web adapter uses this setting to create a customized info.js file to provide some essential settings for the index.html file before the socket connection is established to provide e.g., background color of the loading screen. */
|
|
858
848
|
webPreSettings?: Record<string, any>;
|
|
@@ -1004,7 +994,7 @@ declare global {
|
|
|
1004
994
|
acl?: ObjectACL;
|
|
1005
995
|
from?: string;
|
|
1006
996
|
/** The user who created or updated this object */
|
|
1007
|
-
user?:
|
|
997
|
+
user?: string;
|
|
1008
998
|
ts?: number;
|
|
1009
999
|
/** These properties can only be edited if the correct password is provided */
|
|
1010
1000
|
nonEdit?: NonEditable;
|
|
@@ -1098,25 +1088,7 @@ declare global {
|
|
|
1098
1088
|
unsafePerm?: boolean;
|
|
1099
1089
|
/** If given, the packet name differs from the adapter name, e.g. because it is a scoped package */
|
|
1100
1090
|
packetName?: string;
|
|
1101
|
-
|
|
1102
|
-
meta: string;
|
|
1103
|
-
/** List of licenses */
|
|
1104
|
-
licenses?: { type: string; url: string }[];
|
|
1105
|
-
/** Normally by admin is a ISO string with published date */
|
|
1106
|
-
published?: string;
|
|
1107
|
-
|
|
1108
|
-
/** Link to adapter repo */
|
|
1109
|
-
url?: string;
|
|
1110
|
-
/** Adapter icon */
|
|
1111
|
-
icon?: string;
|
|
1112
|
-
/** Internally used flag */
|
|
1113
|
-
processed?: boolean;
|
|
1114
|
-
/** History */
|
|
1115
|
-
news: { [version: string]: ioBroker.Translated };
|
|
1116
|
-
/** A record of ioBroker adapters (including "js-controller") and version ranges which are required for this adapter on the same host. */
|
|
1117
|
-
dependencies: Dependencies;
|
|
1118
|
-
/** A record of ioBroker adapters (including "js-controller") and version ranges which are required for this adapter in the whole system. */
|
|
1119
|
-
globalDependencies: Dependencies;
|
|
1091
|
+
|
|
1120
1092
|
/** Other Adapter related properties, not important for this implementation */
|
|
1121
1093
|
[other: string]: unknown;
|
|
1122
1094
|
}
|
|
@@ -1448,11 +1420,12 @@ declare global {
|
|
|
1448
1420
|
: View extends 'schedule'
|
|
1449
1421
|
? ScheduleObject
|
|
1450
1422
|
: View extends 'config'
|
|
1451
|
-
?
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1423
|
+
?
|
|
1424
|
+
| RepositoryObject
|
|
1425
|
+
| SystemConfigObject
|
|
1426
|
+
| (OtherObject & {
|
|
1427
|
+
type: 'config';
|
|
1428
|
+
})
|
|
1456
1429
|
: View extends 'custom'
|
|
1457
1430
|
? NonNullable<StateObject['common']['custom']>
|
|
1458
1431
|
: ioBroker.Object
|
package/build/shared.d.ts
CHANGED
|
@@ -120,13 +120,7 @@ declare global {
|
|
|
120
120
|
state?: string;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
type Session =
|
|
124
|
-
cookie?: {
|
|
125
|
-
originalMaxAge?: number;
|
|
126
|
-
maxAge?: number;
|
|
127
|
-
};
|
|
128
|
-
[key: string]: any;
|
|
129
|
-
};
|
|
123
|
+
type Session = any; // TODO: implement
|
|
130
124
|
|
|
131
125
|
/** Defines access rights for a single object type */
|
|
132
126
|
interface ObjectOperationPermissions {
|
|
@@ -156,9 +150,9 @@ declare global {
|
|
|
156
150
|
/** Defined the complete set of access rights a user has */
|
|
157
151
|
interface PermissionSet extends ObjectPermissions {
|
|
158
152
|
/** The name of the user this ACL is for */
|
|
159
|
-
user:
|
|
153
|
+
user: string;
|
|
160
154
|
/** The name of the groups this ACL was merged from */
|
|
161
|
-
groups:
|
|
155
|
+
groups: string[];
|
|
162
156
|
/** The access rights for certain commands */
|
|
163
157
|
other: {
|
|
164
158
|
execute: boolean;
|
|
@@ -236,7 +230,7 @@ declare global {
|
|
|
236
230
|
}
|
|
237
231
|
|
|
238
232
|
/** Parameters for adapter.getObjectList */
|
|
239
|
-
type GetObjectListParams = GetObjectViewParams
|
|
233
|
+
type GetObjectListParams = GetObjectViewParams;
|
|
240
234
|
|
|
241
235
|
type LogLevel = 'silly' | 'debug' | 'info' | 'warn' | 'error';
|
|
242
236
|
interface Logger {
|
|
@@ -377,13 +371,14 @@ declare global {
|
|
|
377
371
|
/** when using aggregate method `integral` defines the interpolation method (defaults to `none`). */
|
|
378
372
|
integralInterpolation?: 'none' | 'linear';
|
|
379
373
|
/** If user is set, it will be checked if this user may read the variable */
|
|
380
|
-
user?:
|
|
374
|
+
user?: `system.user.${string}`;
|
|
381
375
|
}
|
|
382
376
|
|
|
383
377
|
interface DelObjectOptions {
|
|
384
378
|
/** Whether all child objects should be deleted as well */
|
|
385
379
|
recursive?: boolean;
|
|
386
|
-
|
|
380
|
+
// Allow non-documented properties
|
|
381
|
+
[other: string]: unknown;
|
|
387
382
|
}
|
|
388
383
|
|
|
389
384
|
interface ExtendObjectOptionsPreserve {
|
|
@@ -393,9 +388,8 @@ declare global {
|
|
|
393
388
|
interface ExtendObjectOptions {
|
|
394
389
|
/** Which properties of the original object should be preserved */
|
|
395
390
|
preserve?: ExtendObjectOptionsPreserve;
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
ownerGroup?: ioBroker.ObjectIDs.Group;
|
|
391
|
+
// Allow non-documented properties
|
|
392
|
+
[other: string]: unknown;
|
|
399
393
|
}
|
|
400
394
|
|
|
401
395
|
/** Predefined notification scopes and their categories */
|
|
@@ -448,7 +442,7 @@ declare global {
|
|
|
448
442
|
type GenericCallback<T> = (err?: Error | null, result?: T) => void;
|
|
449
443
|
|
|
450
444
|
/** Due to backward compatibility first param can be result or error */
|
|
451
|
-
type MessageCallback = (response?:
|
|
445
|
+
type MessageCallback = (response?: Message | Error) => void;
|
|
452
446
|
|
|
453
447
|
type SetObjectCallback = (err?: Error | null, obj?: { id: string }) => void;
|
|
454
448
|
type SetObjectPromise = Promise<NonNullCallbackReturnTypeOf<SetObjectCallback>>;
|
|
@@ -468,7 +462,7 @@ declare global {
|
|
|
468
462
|
) => void;
|
|
469
463
|
type GetEnumsPromise = Promise<NonNullCallbackReturnTypeOf<GetEnumsCallback>>;
|
|
470
464
|
|
|
471
|
-
type GetObjectsCallback = (err?: Error | null, objects?: Record<string, ioBroker.
|
|
465
|
+
type GetObjectsCallback = (err?: Error | null, objects?: Record<string, ioBroker.Object>) => void;
|
|
472
466
|
type GetObjectsPromise = Promise<NonNullCallbackReturnTypeOf<GetObjectsCallback>>;
|
|
473
467
|
|
|
474
468
|
type GetObjectsCallbackTyped<T extends ObjectType> = (
|
|
@@ -522,7 +516,7 @@ declare global {
|
|
|
522
516
|
|
|
523
517
|
type GetHistoryResult = Array<State & { id?: string }>;
|
|
524
518
|
type GetHistoryCallback = (
|
|
525
|
-
err: Error | null
|
|
519
|
+
err: Error | null,
|
|
526
520
|
result?: GetHistoryResult,
|
|
527
521
|
step?: number,
|
|
528
522
|
sessionId?: number,
|
|
@@ -533,9 +527,7 @@ declare global {
|
|
|
533
527
|
/** Name of the file or directory */
|
|
534
528
|
file: string;
|
|
535
529
|
/** File system stats */
|
|
536
|
-
stats
|
|
537
|
-
size?: number;
|
|
538
|
-
};
|
|
530
|
+
stats: Partial<fs.Stats>;
|
|
539
531
|
/** Whether this is a directory or a file */
|
|
540
532
|
isDir: boolean;
|
|
541
533
|
/** Access rights */
|
|
@@ -548,12 +540,8 @@ declare global {
|
|
|
548
540
|
type ReadDirCallback = (err?: NodeJS.ErrnoException | null, entries?: ReadDirResult[]) => void;
|
|
549
541
|
type ReadDirPromise = Promise<ReadDirResult[]>;
|
|
550
542
|
|
|
551
|
-
type ReadFileCallback = (
|
|
552
|
-
|
|
553
|
-
data?: Buffer | string | null,
|
|
554
|
-
mimeType?: string,
|
|
555
|
-
) => void;
|
|
556
|
-
type ReadFilePromise = Promise<{ file: string | Buffer | null; mimeType?: string }>;
|
|
543
|
+
type ReadFileCallback = (err?: NodeJS.ErrnoException | null, data?: Buffer | string, mimeType?: string) => void;
|
|
544
|
+
type ReadFilePromise = Promise<{ file: string | Buffer; mimeType?: string }>;
|
|
557
545
|
|
|
558
546
|
/** Contains the return values of chownFile */
|
|
559
547
|
interface ChownFileResult {
|
|
@@ -562,17 +550,15 @@ declare global {
|
|
|
562
550
|
/** Name of the file or directory */
|
|
563
551
|
file: string;
|
|
564
552
|
/** File system stats */
|
|
565
|
-
stats
|
|
566
|
-
size?: number;
|
|
567
|
-
};
|
|
553
|
+
stats: fs.Stats;
|
|
568
554
|
/** Whether this is a directory or a file */
|
|
569
555
|
isDir: boolean;
|
|
570
556
|
/** Access rights */
|
|
571
|
-
acl:
|
|
557
|
+
acl: FileACL;
|
|
572
558
|
/** Date of last modification */
|
|
573
|
-
modifiedAt
|
|
559
|
+
modifiedAt: number;
|
|
574
560
|
/** Date of creation */
|
|
575
|
-
createdAt
|
|
561
|
+
createdAt: number;
|
|
576
562
|
}
|
|
577
563
|
type ChownFileCallback = (err?: NodeJS.ErrnoException | null, processed?: ChownFileResult[]) => void;
|
|
578
564
|
|
|
@@ -604,7 +590,7 @@ declare global {
|
|
|
604
590
|
interface GetObjectListItem<T extends ioBroker.Object> extends GetObjectViewItem<T> {
|
|
605
591
|
/** A copy of the object */
|
|
606
592
|
value: T;
|
|
607
|
-
/** The same as
|
|
593
|
+
/** The same as @link{value} */
|
|
608
594
|
doc: T;
|
|
609
595
|
}
|
|
610
596
|
type GetObjectListCallback<T extends ioBroker.Object> = (
|
|
@@ -619,7 +605,7 @@ declare global {
|
|
|
619
605
|
id?: string,
|
|
620
606
|
) => void;
|
|
621
607
|
|
|
622
|
-
type GetSessionCallback = (session: Session
|
|
608
|
+
type GetSessionCallback = (session: Session) => void;
|
|
623
609
|
|
|
624
610
|
type Timeout = Branded<number, 'Timeout'> | null; // or null to not allow native clearTimeout
|
|
625
611
|
type Interval = Branded<number, 'Interval'> | null; // or null to not allow native clearInterval
|