@iobroker/types 5.0.13 → 5.0.14-alpha.0-20231017-1cfd77e8

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.
Files changed (2) hide show
  1. package/build/types.d.ts +32 -27
  2. package/package.json +2 -2
package/build/types.d.ts CHANGED
@@ -287,6 +287,11 @@ export declare interface AdapterClass {
287
287
  *
288
288
  */
289
289
  export declare class AdapterClass extends EventEmitter {
290
+ #private;
291
+ /** States DB constructor */
292
+ private States?;
293
+ /** Objects DB constructor */
294
+ private Objects?;
290
295
  /** Contents of iobroker.json */
291
296
  private readonly _config;
292
297
  private readonly _options;
@@ -778,7 +783,7 @@ export declare interface AdapterOptions {
778
783
  name: string;
779
784
  /** If true, the systemConfig (iobroker.json) will be available in this.systemConfig */
780
785
  systemConfig?: boolean;
781
- /** callback function (id, obj) that will be called if object changed */
786
+ /** callback function (id, obj) that will be called if an object changed */
782
787
  objectChange?: ioBroker.ObjectChangeHandler;
783
788
  /** callback function (id, obj) that will be called if state changed */
784
789
  stateChange?: ioBroker.StateChangeHandler;
@@ -788,7 +793,7 @@ export declare interface AdapterOptions {
788
793
  uiClientSubscribe?: UserInterfaceClientSubscribeHandler;
789
794
  /** callback function that will be called when a new UI client unsubscribes */
790
795
  uiClientUnsubscribe?: UserInterfaceClientUnsubscribeHandler;
791
- /** callback to inform about new message the adapter */
796
+ /** callback to inform about a new message the adapter */
792
797
  message?: ioBroker.MessageHandler;
793
798
  /** callback to stop the adapter */
794
799
  unload?: ioBroker.UnloadHandler;
@@ -1244,7 +1249,7 @@ declare enum STATE_QUALITY {
1244
1249
  BAD = 1,
1245
1250
  /** The instance cannot establish a connection */
1246
1251
  CONNECTION_PROBLEM = 2,
1247
- /** Substitute value from controller, do not set this in adapters */
1252
+ /** Substitute value from controller. Do not set this in adapters */
1248
1253
  SUBSTITUTE_FROM_CONTROLLER = 16,
1249
1254
  /** Quality for default values */
1250
1255
  SUBSTITUTE_INITIAL_VALUE = 32,
@@ -1311,13 +1316,13 @@ export declare interface UserInterfaceSubscribeInfo {
1311
1316
  }
1312
1317
 
1313
1318
  export declare type UserInterfaceUnsubscribeInfo = UserInterfaceUnsubscribeInfoBaseObject & ({
1314
- /** Reason for unsubscribe */
1319
+ /** Reason for unsubscribing */
1315
1320
  reason: Exclude<UserInterfaceClientUnsubscribeReason, ClientUnsubscribeReason>;
1316
1321
  message?: undefined;
1317
1322
  } | {
1318
- /** Reason for unsubscribe */
1323
+ /** Reason for unsubscribing */
1319
1324
  reason: ClientUnsubscribeReason;
1320
- /** Message used for unsubscribe */
1325
+ /** Message used for unsubscribing */
1321
1326
  message: ioBroker.Message;
1322
1327
  });
1323
1328
 
@@ -1327,7 +1332,7 @@ declare type UserInterfaceUnsubscribeInfoBaseObject = {
1327
1332
  };
1328
1333
 
1329
1334
  declare interface ValidateIdOptions {
1330
- /** in maintenance mode we can access ivnalid ids to delete them, only works with the admin user */
1335
+ /** in maintenance mode, we can access invalid ids to delete them, only works with the admin user */
1331
1336
  maintenance?: boolean;
1332
1337
  user?: string;
1333
1338
  }
@@ -1346,12 +1351,12 @@ export declare class Validator {
1346
1351
  * @param namespaceLog - Log prefix
1347
1352
  * @param logger - Logger instance
1348
1353
  * @param namespace - the namespace of the adapter
1349
- * @param namespaceRegExp - the namespace RegExp of the adapter adapter.0
1354
+ * @param namespaceRegExp - the namespace RegExp of the adapter `adapter.0`
1350
1355
  */
1351
1356
  constructor(objects: any, states: any, namespaceLog: string, logger: any, namespace: string, namespaceRegExp: RegExp);
1352
1357
  /**
1353
1358
  * Performs the strict object check, which includes checking object existence, read-only logic, type and min/max
1354
- * additionally it rounds state values whose objects have a common.step attribute defined
1359
+ * additionally it rounds state values whose objects have a `common.step` attribute defined
1355
1360
  *
1356
1361
  * @param id - id of the state
1357
1362
  * @param state - ioBroker setState object
@@ -1374,55 +1379,55 @@ export declare class Validator {
1374
1379
  */
1375
1380
  static getErrorText(code: number): string;
1376
1381
  /**
1377
- * Throws if type is not matching the expected type
1378
- * @param value value to check type of
1382
+ * Throws if a type is not matching the expected type
1383
+ * @param value value to check a type of
1379
1384
  * @param name name of the parameter for logging
1380
1385
  */
1381
1386
  static assertString(value: unknown, name: string): asserts value is string;
1382
1387
  /**
1383
- * Throws if type is not a pattern
1384
- * @param value value to check type of
1388
+ * Throws if a type is not a pattern
1389
+ * @param value value to check a type of
1385
1390
  * @param name name of the parameter for logging
1386
1391
  */
1387
1392
  static assertPattern(value: unknown, name: string): asserts value is Pattern_2;
1388
1393
  /**
1389
- * Throws if type is not matching the expected type
1390
- * @param value value to check type of
1394
+ * Throws if a type is not matching the expected type
1395
+ * @param value value to check a type of
1391
1396
  * @param name name of the parameter for logging
1392
1397
  */
1393
1398
  static assertBoolean(value: unknown, name: string): asserts value is boolean;
1394
1399
  /**
1395
- * Throws if type is not matching the expected type
1396
- * @param value value to check type of
1400
+ * Throws if a type is not matching the expected type
1401
+ * @param value value to check a type of
1397
1402
  * @param name name of the parameter for logging
1398
1403
  */
1399
1404
  static assertNumber(value: unknown, name: string): asserts value is number;
1400
1405
  /**
1401
- * Throws if type is not matching the expected type
1402
- * @param value value to check type of
1406
+ * Throws if a type is not matching the expected type
1407
+ * @param value value to check a type of
1403
1408
  * @param name name of the parameter for logging
1404
1409
  */
1405
1410
  static assertObject(value: unknown, name: string): asserts value is Record<string, any>;
1406
1411
  /**
1407
- * Throws if type is not an optional callback
1408
- * @param value value to check type of
1412
+ * Throws if a type is not an optional callback
1413
+ * @param value value to check a type of
1409
1414
  * @param name name of the parameter for logging
1410
1415
  */
1411
1416
  static assertBuffer(value: unknown, name: string): asserts value is Buffer;
1412
1417
  /**
1413
- * Throws if type is not an optional callback
1414
- * @param value value to check type of
1418
+ * Throws if a type is not an optional callback
1419
+ * @param value value to check a type of
1415
1420
  * @param name name of the parameter for logging
1416
1421
  */
1417
1422
  static assertOptionalCallback(value: unknown, name: string): asserts value is OptionalCallback;
1418
1423
  /**
1419
- * Throws if type is not an optional callback
1420
- * @param value value to check type of
1424
+ * Throws if a type is not an optional callback
1425
+ * @param value value to check a type of
1421
1426
  * @param name name of the parameter for logging
1422
1427
  */
1423
1428
  static assertCallback(value: unknown, name: string): asserts value is Callback;
1424
1429
  /**
1425
- * Adds the namespace to the id if it is missing, if an object is passed it will be converted to an id string
1430
+ * Adds the namespace to the ID if it is missing, if an object is passed it will be converted to an id string
1426
1431
  *
1427
1432
  * @param id id which will be fixed
1428
1433
  * @param isPattern if the id is a pattern
@@ -1434,7 +1439,7 @@ export declare class Validator {
1434
1439
  */
1435
1440
  validateSetStateObjectArgument(obj: Record<string, any>): void;
1436
1441
  /**
1437
- * Validates, that the timeout is not exceeding a 32-bit signed integer
1442
+ * Validates that the timeout is not exceeding a 32-bit signed integer
1438
1443
  *
1439
1444
  * @param ms milliseconds to validate
1440
1445
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/types",
3
- "version": "5.0.13",
3
+ "version": "5.0.14-alpha.0-20231017-1cfd77e8",
4
4
  "engines": {
5
5
  "node": ">=12.0.0"
6
6
  },
@@ -41,5 +41,5 @@
41
41
  ]
42
42
  }
43
43
  },
44
- "gitHead": "1d35bccc401b9219b444ca737cb827d57c7e666c"
44
+ "gitHead": "6310c435dc597062a1a146d55a70e960ec111509"
45
45
  }