@enyo-energy/energy-app-sdk 0.0.137 → 0.0.138

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.
@@ -11,7 +11,8 @@ import { EebusHvacOperationMode, EebusHvacZoneState } from '../../types/enyo-eeb
11
11
  * The client exposes both actor roles on a single interface:
12
12
  * - **EMS role (outbound):** {@link getOperationMode}, {@link setOperationMode},
13
13
  * {@link getZoneStates}, {@link onZoneStateChanged}
14
- * - **CS role (inbound):** {@link provideOperationMode}, {@link provideZoneStates}
14
+ * - **CS role (inbound):** {@link provideOperationMode}, {@link provideZoneStates},
15
+ * {@link onOperationModeReceived}
15
16
  *
16
17
  * Consumers that only act in one role simply never call the other half — there
17
18
  * is no `asManager` / `asAppliance` split.
@@ -54,7 +55,17 @@ export interface EebusHvacClient {
54
55
  */
55
56
  provideZoneStates: (provider: () => Promise<EebusHvacZoneState[]>) => void;
56
57
  /**
57
- * Remove a listener previously registered via {@link onZoneStateChanged}.
58
+ * Register a handler invoked when a remote EMS writes the operation mode
59
+ * to this device. Implementations should apply the mode to the local
60
+ * controller. Mirrors {@link EebusSetpointClient.onSetpointReceived} so
61
+ * package authors see a consistent write-handler shape across features.
62
+ * @param handler Callback invoked with the incoming operation mode
63
+ * @returns Listener ID that can be passed to {@link removeListener} to deregister
64
+ */
65
+ onOperationModeReceived: (handler: (mode: EebusHvacOperationMode) => Promise<void>) => string;
66
+ /**
67
+ * Remove a listener previously registered via {@link onZoneStateChanged}
68
+ * or {@link onOperationModeReceived}.
58
69
  * @param listenerId The ID returned by the registration method
59
70
  */
60
71
  removeListener: (listenerId: string) => void;
@@ -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.137';
12
+ exports.SDK_VERSION = '0.0.138';
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.137";
8
+ export declare const SDK_VERSION = "0.0.138";
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
@@ -11,7 +11,8 @@ import { EebusHvacOperationMode, EebusHvacZoneState } from '../../types/enyo-eeb
11
11
  * The client exposes both actor roles on a single interface:
12
12
  * - **EMS role (outbound):** {@link getOperationMode}, {@link setOperationMode},
13
13
  * {@link getZoneStates}, {@link onZoneStateChanged}
14
- * - **CS role (inbound):** {@link provideOperationMode}, {@link provideZoneStates}
14
+ * - **CS role (inbound):** {@link provideOperationMode}, {@link provideZoneStates},
15
+ * {@link onOperationModeReceived}
15
16
  *
16
17
  * Consumers that only act in one role simply never call the other half — there
17
18
  * is no `asManager` / `asAppliance` split.
@@ -54,7 +55,17 @@ export interface EebusHvacClient {
54
55
  */
55
56
  provideZoneStates: (provider: () => Promise<EebusHvacZoneState[]>) => void;
56
57
  /**
57
- * Remove a listener previously registered via {@link onZoneStateChanged}.
58
+ * Register a handler invoked when a remote EMS writes the operation mode
59
+ * to this device. Implementations should apply the mode to the local
60
+ * controller. Mirrors {@link EebusSetpointClient.onSetpointReceived} so
61
+ * package authors see a consistent write-handler shape across features.
62
+ * @param handler Callback invoked with the incoming operation mode
63
+ * @returns Listener ID that can be passed to {@link removeListener} to deregister
64
+ */
65
+ onOperationModeReceived: (handler: (mode: EebusHvacOperationMode) => Promise<void>) => string;
66
+ /**
67
+ * Remove a listener previously registered via {@link onZoneStateChanged}
68
+ * or {@link onOperationModeReceived}.
58
69
  * @param listenerId The ID returned by the registration method
59
70
  */
60
71
  removeListener: (listenerId: string) => void;
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.137";
8
+ export declare const SDK_VERSION = "0.0.138";
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.137';
8
+ export const SDK_VERSION = '0.0.138';
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.137",
3
+ "version": "0.0.138",
4
4
  "description": "enyo Energy App SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",