@enyo-energy/energy-app-sdk 0.0.169 → 0.0.170

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,27 @@ export interface ModbusOptions {
12
12
  unitId?: number;
13
13
  /** Whether to use TLS/SSL for the Modbus connection. Defaults to false (plain Modbus TCP). Set to true to enable Modbus Security (TLS, typically port 802). */
14
14
  useTls?: boolean;
15
+ /**
16
+ * PEM-encoded client certificate (or Buffer) presented for mutual-TLS Modbus Security
17
+ * connections. Only used when {@link useTls} is true.
18
+ */
19
+ cert?: string | Buffer;
20
+ /**
21
+ * PEM-encoded private key (or Buffer) matching {@link cert} for mutual-TLS connections.
22
+ * Only used when {@link useTls} is true.
23
+ */
24
+ key?: string | Buffer;
25
+ /**
26
+ * Trusted CA certificate(s) — a PEM string/Buffer, or an array of them — used to verify the
27
+ * server's certificate. Only used when {@link useTls} is true.
28
+ */
29
+ ca?: string | Buffer | Array<string | Buffer>;
30
+ /**
31
+ * Whether to reject a TLS connection whose server certificate cannot be verified against
32
+ * {@link ca}. When omitted, the transport's default verification behaviour is used. Only
33
+ * used when {@link useTls} is true.
34
+ */
35
+ rejectUnauthorized?: boolean;
15
36
  }
16
37
  /**
17
38
  * Interface for Modbus TCP/IP communication in enyo packages.
@@ -18,9 +18,11 @@ export interface EnergyAppSettings {
18
18
  * This will remove the setting regardless of whether it's for an appliance or the package.
19
19
  *
20
20
  * @param settingName - The unique name of the setting to remove
21
+ * @param applianceId - Optional appliance ID. If provided, only the setting scoped to that
22
+ * specific appliance is removed. If omitted, the setting is removed regardless of scope.
21
23
  * @returns Promise that resolves when the setting is successfully removed
22
24
  */
23
- removeSettingConfig(settingName: string): Promise<void>;
25
+ removeSettingConfig(settingName: string, applianceId?: string): Promise<void>;
24
26
  /**
25
27
  * Updates the value of an existing setting.
26
28
  * The setting is identified by its unique name across all appliances and package settings.
@@ -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.169';
12
+ exports.SDK_VERSION = '0.0.170';
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.169";
8
+ export declare const SDK_VERSION = "0.0.170";
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
@@ -12,6 +12,27 @@ export interface ModbusOptions {
12
12
  unitId?: number;
13
13
  /** Whether to use TLS/SSL for the Modbus connection. Defaults to false (plain Modbus TCP). Set to true to enable Modbus Security (TLS, typically port 802). */
14
14
  useTls?: boolean;
15
+ /**
16
+ * PEM-encoded client certificate (or Buffer) presented for mutual-TLS Modbus Security
17
+ * connections. Only used when {@link useTls} is true.
18
+ */
19
+ cert?: string | Buffer;
20
+ /**
21
+ * PEM-encoded private key (or Buffer) matching {@link cert} for mutual-TLS connections.
22
+ * Only used when {@link useTls} is true.
23
+ */
24
+ key?: string | Buffer;
25
+ /**
26
+ * Trusted CA certificate(s) — a PEM string/Buffer, or an array of them — used to verify the
27
+ * server's certificate. Only used when {@link useTls} is true.
28
+ */
29
+ ca?: string | Buffer | Array<string | Buffer>;
30
+ /**
31
+ * Whether to reject a TLS connection whose server certificate cannot be verified against
32
+ * {@link ca}. When omitted, the transport's default verification behaviour is used. Only
33
+ * used when {@link useTls} is true.
34
+ */
35
+ rejectUnauthorized?: boolean;
15
36
  }
16
37
  /**
17
38
  * Interface for Modbus TCP/IP communication in enyo packages.
@@ -18,9 +18,11 @@ export interface EnergyAppSettings {
18
18
  * This will remove the setting regardless of whether it's for an appliance or the package.
19
19
  *
20
20
  * @param settingName - The unique name of the setting to remove
21
+ * @param applianceId - Optional appliance ID. If provided, only the setting scoped to that
22
+ * specific appliance is removed. If omitted, the setting is removed regardless of scope.
21
23
  * @returns Promise that resolves when the setting is successfully removed
22
24
  */
23
- removeSettingConfig(settingName: string): Promise<void>;
25
+ removeSettingConfig(settingName: string, applianceId?: string): Promise<void>;
24
26
  /**
25
27
  * Updates the value of an existing setting.
26
28
  * The setting is identified by its unique name across all appliances and package settings.
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.169";
8
+ export declare const SDK_VERSION = "0.0.170";
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.169';
8
+ export const SDK_VERSION = '0.0.170';
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.169",
3
+ "version": "0.0.170",
4
4
  "description": "enyo Energy App SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",