@iobroker/types 7.0.3 → 7.0.4-alpha.0-20241116-db3148f4f

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/shared.d.ts CHANGED
@@ -219,6 +219,20 @@ declare global {
219
219
  level: LogLevel;
220
220
  }
221
221
 
222
+ /** Log message */
223
+ interface LogMessage {
224
+ /** unique ID */
225
+ _id: number;
226
+ /** id of the source instance */
227
+ from: string;
228
+ /** log level */
229
+ severity: string;
230
+ /** timestamp */
231
+ ts: number;
232
+ /** actual content */
233
+ message: string;
234
+ }
235
+
222
236
  interface Certificates {
223
237
  /** private key file */
224
238
  key: string;
package/build/types.d.ts CHANGED
@@ -19,7 +19,7 @@ export declare interface AdapterClass {
19
19
  on(event: 'message', listener: ioBroker.MessageHandler): this;
20
20
  /** Only emitted for compact instances */
21
21
  on(event: 'exit', listener: (exitCode: number, reason: string) => Promise<void> | void): this;
22
- on(event: 'log', listener: (info: any) => Promise<void> | void): this;
22
+ on(event: 'log', listener: (message: ioBroker.LogMessage) => Promise<void> | void): this;
23
23
  /**
24
24
  * Extend an object and create it if it might not exist
25
25
  *
@@ -377,7 +377,7 @@ export declare class AdapterClass extends EventEmitter {
377
377
  version?: string;
378
378
  /** Stop the adapter only defined in compact, not for external usage */
379
379
  protected kill?: () => Promise<void>;
380
- processLog?: (msg: any) => void;
380
+ processLog?: (msg: ioBroker.LogMessage) => void;
381
381
  /**
382
382
  * Start or stop subscribing to log messages
383
383
  * The method is only available if logTransporter is active via io-pack or adapter options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/types",
3
- "version": "7.0.3",
3
+ "version": "7.0.4-alpha.0-20241116-db3148f4f",
4
4
  "engines": {
5
5
  "node": ">=12.0.0"
6
6
  },
@@ -41,5 +41,5 @@
41
41
  ]
42
42
  }
43
43
  },
44
- "gitHead": "1c716ca37fe7c26d4f56571f90d33be69d45726e"
44
+ "gitHead": "55ff47d48ea22e3b8e6dae0f7ecda51344da0a09"
45
45
  }