@enyo-energy/energy-app-sdk 0.0.171 → 0.0.173

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.
@@ -12,6 +12,21 @@ export interface ModbusRtuOptions {
12
12
  parity?: 'none' | 'even' | 'odd';
13
13
  /** Connection timeout in milliseconds */
14
14
  timeout?: number;
15
+ /**
16
+ * When `true`, requests are not run in parallel on this connection: consecutive requests
17
+ * ({@link EnergyAppModbusRtuInstance.readRegisters} / {@link EnergyAppModbusRtuInstance.writeRegisters})
18
+ * are serialized through an internal operation chain and run sequentially in call order, so a
19
+ * chain of messages cannot be interleaved with requests from concurrent callers. This is
20
+ * especially relevant on RTU, where the serial line is half-duplex and shared across every
21
+ * slave ID on the bus. Defaults to `false` (requests may execute concurrently).
22
+ */
23
+ noParallelRequests?: boolean;
24
+ /**
25
+ * Optional delay, in milliseconds, to wait between two consecutive requests. Only applies when
26
+ * {@link noParallelRequests} is `true`; ignored otherwise. A short inter-message gap is often
27
+ * required by slower RTU slaves to avoid dropped frames. Defaults to `0` (no delay).
28
+ */
29
+ waitBetweenMessagesMs?: number;
15
30
  }
16
31
  /**
17
32
  * Request parameters for reading Modbus RTU registers.
@@ -33,6 +33,20 @@ export interface ModbusOptions {
33
33
  * used when {@link useTls} is true.
34
34
  */
35
35
  rejectUnauthorized?: boolean;
36
+ /**
37
+ * When `true`, requests are not run in parallel on this connection: consecutive Modbus
38
+ * requests (reads and writes) are serialized through an internal operation chain and run
39
+ * sequentially in call order, so a chain of messages cannot be interleaved with requests from
40
+ * concurrent callers. Use this when a sequence of register operations must be applied
41
+ * atomically relative to each other. Defaults to `false` (requests may execute concurrently).
42
+ */
43
+ noParallelRequests?: boolean;
44
+ /**
45
+ * Optional delay, in milliseconds, to wait between two consecutive requests. Only applies when
46
+ * {@link noParallelRequests} is `true`; ignored otherwise. Useful for devices that need a short
47
+ * recovery gap between messages. Defaults to `0` (no delay).
48
+ */
49
+ waitBetweenMessagesMs?: number;
36
50
  }
37
51
  /**
38
52
  * Interface for Modbus TCP/IP communication in enyo packages.
@@ -40,6 +40,20 @@ export interface UdpBindOptions {
40
40
  * callers should leave this `undefined`.
41
41
  */
42
42
  multicastInterface?: string;
43
+ /**
44
+ * When `true`, sends are not run in parallel on this socket: consecutive
45
+ * {@link EnergyAppUdpSocket.send} calls are serialized through an internal operation chain and
46
+ * run sequentially in call order, so a chain of datagrams cannot be interleaved with sends
47
+ * from concurrent callers. Use this when a request/response exchange requires a strict send
48
+ * ordering. Defaults to `false` (sends may execute concurrently).
49
+ */
50
+ noParallelRequests?: boolean;
51
+ /**
52
+ * Optional delay, in milliseconds, to wait between two consecutive sends. Only applies when
53
+ * {@link noParallelRequests} is `true`; ignored otherwise. Useful for peers that need a short
54
+ * gap between datagrams. Defaults to `0` (no delay).
55
+ */
56
+ waitBetweenMessagesMs?: number;
43
57
  }
44
58
  /**
45
59
  * A single inbound datagram delivered to a handler registered with
@@ -266,7 +266,9 @@ export type EnyoDataBusMessageResolution = '1s' | '10s' | '30s' | '1m' | '15m' |
266
266
  /**
267
267
  * Optional addressing information for a {@link EnyoDataBusMessage}. When omitted
268
268
  * the message is broadcast to all subscribers; when set, the message is only
269
- * delivered to packages that match the specified target.
269
+ * delivered to packages that match the specified target. Broadcasting of an
270
+ * untargeted message can additionally be suppressed by setting
271
+ * {@link EnyoDataBusMessage.broadcast} to `false`.
270
272
  *
271
273
  * Exactly one of {@link cloudPackageId} or {@link categories} should be provided.
272
274
  * When both are set, consumers should treat them as an AND (the receiving package
@@ -303,6 +305,15 @@ export interface EnyoDataBusMessage {
303
305
  * {@link EnyoDataBusMessageTarget} for matching semantics.
304
306
  */
305
307
  target?: EnyoDataBusMessageTarget;
308
+ /**
309
+ * Whether this message may be broadcast to all subscribers on the bus.
310
+ * Defaults to `true` when omitted (the message is eligible for broadcast).
311
+ * Set to `false` to prevent the message from fanning out to all subscribers —
312
+ * for example when it should only reach the recipients named by {@link target}.
313
+ * This flag is independent of {@link target}: `target` narrows delivery, while
314
+ * `broadcast` controls whether an untargeted message reaches every subscriber.
315
+ */
316
+ broadcast?: boolean;
306
317
  data: object;
307
318
  }
308
319
  export interface EnyoDataBusMessageAnswer extends EnyoDataBusMessage {
@@ -259,6 +259,16 @@ export interface EnyoOnboardingStepResponse {
259
259
  state: 'success' | 'error';
260
260
  /** Optional translated error message if state is 'error' */
261
261
  errorMessage?: EnyoOnboardingTranslatedContent[];
262
+ /**
263
+ * When true on a successful step response, instructs the host to route the user to the
264
+ * pending authentication request after this step completes. Typically set on the final step
265
+ * of a guide so the user is sent to authenticate (e.g. sign in to a cloud service) once
266
+ * onboarding finishes. The authentication request itself must have been created separately
267
+ * via `EnergyAppAuthentication.requestAuthentication`, and its result is handled through
268
+ * `listenForAuthenticationResponse`. This is fire-and-forget — the guide completes regardless
269
+ * of the authentication outcome. Ignored when `state` is 'error'.
270
+ */
271
+ goToAuthentication?: boolean;
262
272
  }
263
273
  /**
264
274
  * Callback function type for handling step submissions.
@@ -9,7 +9,7 @@ exports.getSdkVersion = getSdkVersion;
9
9
  /**
10
10
  * Current version of the enyo Energy App SDK.
11
11
  */
12
- exports.SDK_VERSION = '0.0.171';
12
+ exports.SDK_VERSION = '0.0.173';
13
13
  /**
14
14
  * Gets the current SDK version.
15
15
  * @returns The semantic version string of the SDK
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export declare const SDK_VERSION = "0.0.171";
8
+ export declare const SDK_VERSION = "0.0.173";
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
@@ -12,6 +12,21 @@ export interface ModbusRtuOptions {
12
12
  parity?: 'none' | 'even' | 'odd';
13
13
  /** Connection timeout in milliseconds */
14
14
  timeout?: number;
15
+ /**
16
+ * When `true`, requests are not run in parallel on this connection: consecutive requests
17
+ * ({@link EnergyAppModbusRtuInstance.readRegisters} / {@link EnergyAppModbusRtuInstance.writeRegisters})
18
+ * are serialized through an internal operation chain and run sequentially in call order, so a
19
+ * chain of messages cannot be interleaved with requests from concurrent callers. This is
20
+ * especially relevant on RTU, where the serial line is half-duplex and shared across every
21
+ * slave ID on the bus. Defaults to `false` (requests may execute concurrently).
22
+ */
23
+ noParallelRequests?: boolean;
24
+ /**
25
+ * Optional delay, in milliseconds, to wait between two consecutive requests. Only applies when
26
+ * {@link noParallelRequests} is `true`; ignored otherwise. A short inter-message gap is often
27
+ * required by slower RTU slaves to avoid dropped frames. Defaults to `0` (no delay).
28
+ */
29
+ waitBetweenMessagesMs?: number;
15
30
  }
16
31
  /**
17
32
  * Request parameters for reading Modbus RTU registers.
@@ -33,6 +33,20 @@ export interface ModbusOptions {
33
33
  * used when {@link useTls} is true.
34
34
  */
35
35
  rejectUnauthorized?: boolean;
36
+ /**
37
+ * When `true`, requests are not run in parallel on this connection: consecutive Modbus
38
+ * requests (reads and writes) are serialized through an internal operation chain and run
39
+ * sequentially in call order, so a chain of messages cannot be interleaved with requests from
40
+ * concurrent callers. Use this when a sequence of register operations must be applied
41
+ * atomically relative to each other. Defaults to `false` (requests may execute concurrently).
42
+ */
43
+ noParallelRequests?: boolean;
44
+ /**
45
+ * Optional delay, in milliseconds, to wait between two consecutive requests. Only applies when
46
+ * {@link noParallelRequests} is `true`; ignored otherwise. Useful for devices that need a short
47
+ * recovery gap between messages. Defaults to `0` (no delay).
48
+ */
49
+ waitBetweenMessagesMs?: number;
36
50
  }
37
51
  /**
38
52
  * Interface for Modbus TCP/IP communication in enyo packages.
@@ -40,6 +40,20 @@ export interface UdpBindOptions {
40
40
  * callers should leave this `undefined`.
41
41
  */
42
42
  multicastInterface?: string;
43
+ /**
44
+ * When `true`, sends are not run in parallel on this socket: consecutive
45
+ * {@link EnergyAppUdpSocket.send} calls are serialized through an internal operation chain and
46
+ * run sequentially in call order, so a chain of datagrams cannot be interleaved with sends
47
+ * from concurrent callers. Use this when a request/response exchange requires a strict send
48
+ * ordering. Defaults to `false` (sends may execute concurrently).
49
+ */
50
+ noParallelRequests?: boolean;
51
+ /**
52
+ * Optional delay, in milliseconds, to wait between two consecutive sends. Only applies when
53
+ * {@link noParallelRequests} is `true`; ignored otherwise. Useful for peers that need a short
54
+ * gap between datagrams. Defaults to `0` (no delay).
55
+ */
56
+ waitBetweenMessagesMs?: number;
43
57
  }
44
58
  /**
45
59
  * A single inbound datagram delivered to a handler registered with
@@ -266,7 +266,9 @@ export type EnyoDataBusMessageResolution = '1s' | '10s' | '30s' | '1m' | '15m' |
266
266
  /**
267
267
  * Optional addressing information for a {@link EnyoDataBusMessage}. When omitted
268
268
  * the message is broadcast to all subscribers; when set, the message is only
269
- * delivered to packages that match the specified target.
269
+ * delivered to packages that match the specified target. Broadcasting of an
270
+ * untargeted message can additionally be suppressed by setting
271
+ * {@link EnyoDataBusMessage.broadcast} to `false`.
270
272
  *
271
273
  * Exactly one of {@link cloudPackageId} or {@link categories} should be provided.
272
274
  * When both are set, consumers should treat them as an AND (the receiving package
@@ -303,6 +305,15 @@ export interface EnyoDataBusMessage {
303
305
  * {@link EnyoDataBusMessageTarget} for matching semantics.
304
306
  */
305
307
  target?: EnyoDataBusMessageTarget;
308
+ /**
309
+ * Whether this message may be broadcast to all subscribers on the bus.
310
+ * Defaults to `true` when omitted (the message is eligible for broadcast).
311
+ * Set to `false` to prevent the message from fanning out to all subscribers —
312
+ * for example when it should only reach the recipients named by {@link target}.
313
+ * This flag is independent of {@link target}: `target` narrows delivery, while
314
+ * `broadcast` controls whether an untargeted message reaches every subscriber.
315
+ */
316
+ broadcast?: boolean;
306
317
  data: object;
307
318
  }
308
319
  export interface EnyoDataBusMessageAnswer extends EnyoDataBusMessage {
@@ -259,6 +259,16 @@ export interface EnyoOnboardingStepResponse {
259
259
  state: 'success' | 'error';
260
260
  /** Optional translated error message if state is 'error' */
261
261
  errorMessage?: EnyoOnboardingTranslatedContent[];
262
+ /**
263
+ * When true on a successful step response, instructs the host to route the user to the
264
+ * pending authentication request after this step completes. Typically set on the final step
265
+ * of a guide so the user is sent to authenticate (e.g. sign in to a cloud service) once
266
+ * onboarding finishes. The authentication request itself must have been created separately
267
+ * via `EnergyAppAuthentication.requestAuthentication`, and its result is handled through
268
+ * `listenForAuthenticationResponse`. This is fire-and-forget — the guide completes regardless
269
+ * of the authentication outcome. Ignored when `state` is 'error'.
270
+ */
271
+ goToAuthentication?: boolean;
262
272
  }
263
273
  /**
264
274
  * Callback function type for handling step submissions.
package/dist/version.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export declare const SDK_VERSION = "0.0.171";
8
+ export declare const SDK_VERSION = "0.0.173";
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
package/dist/version.js CHANGED
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export const SDK_VERSION = '0.0.171';
8
+ export const SDK_VERSION = '0.0.173';
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enyo-energy/energy-app-sdk",
3
- "version": "0.0.171",
3
+ "version": "0.0.173",
4
4
  "description": "enyo Energy App SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",