@enyo-energy/energy-app-sdk 1.14.0 → 1.15.0
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/dist/cjs/implementations/appliances/appliance-manager.cjs +2 -1
- package/dist/cjs/implementations/appliances/appliance-manager.d.cts +12 -0
- package/dist/cjs/implementations/appliances/in-memory-appliance-manager.cjs +3 -1
- package/dist/cjs/types/enyo-appliance.d.cts +8 -0
- package/dist/cjs/version.cjs +1 -1
- package/dist/cjs/version.d.cts +1 -1
- package/dist/implementations/appliances/appliance-manager.d.ts +12 -0
- package/dist/implementations/appliances/appliance-manager.js +2 -1
- package/dist/implementations/appliances/in-memory-appliance-manager.js +3 -1
- package/dist/types/enyo-appliance.d.ts +8 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -211,7 +211,7 @@ class ApplianceManager {
|
|
|
211
211
|
airConditioning: appliance.airConditioning,
|
|
212
212
|
heatingRod: appliance.heatingRod,
|
|
213
213
|
smartPlug: appliance.smartPlug,
|
|
214
|
-
// Conditionally spread the
|
|
214
|
+
// Conditionally spread the optional top-level fields that are NOT
|
|
215
215
|
// covered by MERGEABLE_METADATA_KEYS. If they were always materialized
|
|
216
216
|
// as explicit keys, an omitted (undefined) value would clobber the
|
|
217
217
|
// stored value during mergeApplianceData's `{...existing, ...update}`
|
|
@@ -219,6 +219,7 @@ class ApplianceManager {
|
|
|
219
219
|
// while dropping omitted fields so the existing value is preserved.
|
|
220
220
|
...(appliance.cloudPackageId !== undefined && { cloudPackageId: appliance.cloudPackageId }),
|
|
221
221
|
...(appliance.availableFeatures !== undefined && { availableFeatures: appliance.availableFeatures }),
|
|
222
|
+
...(appliance.compatibilityModes !== undefined && { compatibilityModes: appliance.compatibilityModes }),
|
|
222
223
|
};
|
|
223
224
|
let applianceData = newApplianceData;
|
|
224
225
|
if (existingApplianceId) {
|
|
@@ -65,6 +65,13 @@ export interface ApplianceConfig {
|
|
|
65
65
|
heatingRod?: EnyoHeatingRodApplianceMetadata;
|
|
66
66
|
smartPlug?: EnyoSmartPlugApplianceMetadata;
|
|
67
67
|
availableFeatures?: EnyoApplianceAvailableFeaturesEnum[];
|
|
68
|
+
/**
|
|
69
|
+
* Optional vendor- or integration-specific compatibility modes. Forwarded to
|
|
70
|
+
* {@link EnyoAppliance.compatibilityModes} when the appliance is created or
|
|
71
|
+
* updated. Omit to keep the stored value on an update; pass an explicit `[]`
|
|
72
|
+
* to clear it.
|
|
73
|
+
*/
|
|
74
|
+
compatibilityModes?: string[];
|
|
68
75
|
/**
|
|
69
76
|
* Optional identifier of the cloud-deployed energy app package that manages
|
|
70
77
|
* this appliance. Forwarded to {@link EnyoAppliance.cloudPackageId} when the
|
|
@@ -443,6 +450,11 @@ export interface PartialEnyoAppliance {
|
|
|
443
450
|
smartPlug?: Partial<EnyoSmartPlugApplianceMetadata>;
|
|
444
451
|
/** Optional custom name for the appliance, defined by the user */
|
|
445
452
|
customName?: string;
|
|
453
|
+
/**
|
|
454
|
+
* Optional list of vendor- or integration-specific compatibility modes that
|
|
455
|
+
* are active for this appliance. Mirrors {@link EnyoAppliance.compatibilityModes}.
|
|
456
|
+
*/
|
|
457
|
+
compatibilityModes?: string[];
|
|
446
458
|
/**
|
|
447
459
|
* Optional identifier of the cloud-deployed energy app package that manages
|
|
448
460
|
* this appliance. Mirrors {@link EnyoAppliance.cloudPackageId}.
|
|
@@ -54,7 +54,8 @@ class InMemoryApplianceManager extends appliance_manager_js_1.ApplianceManager {
|
|
|
54
54
|
};
|
|
55
55
|
// Build the incoming appliance data covering every ApplianceConfig field.
|
|
56
56
|
// The two optional top-level fields that are NOT shallow-merged by
|
|
57
|
-
// mergeApplianceData (`cloudPackageId`, `availableFeatures
|
|
57
|
+
// mergeApplianceData (`cloudPackageId`, `availableFeatures`,
|
|
58
|
+
// `compatibilityModes`) are only
|
|
58
59
|
// materialized when provided so an omitted value cannot clobber the stored
|
|
59
60
|
// one during an update; pass an explicit value (e.g. `[]`) to clear them.
|
|
60
61
|
const newApplianceData = {
|
|
@@ -73,6 +74,7 @@ class InMemoryApplianceManager extends appliance_manager_js_1.ApplianceManager {
|
|
|
73
74
|
heatingRod: appliance.heatingRod,
|
|
74
75
|
...(appliance.cloudPackageId !== undefined && { cloudPackageId: appliance.cloudPackageId }),
|
|
75
76
|
...(appliance.availableFeatures !== undefined && { availableFeatures: appliance.availableFeatures }),
|
|
77
|
+
...(appliance.compatibilityModes !== undefined && { compatibilityModes: appliance.compatibilityModes }),
|
|
76
78
|
};
|
|
77
79
|
// On update, merge onto the stored appliance so type-specific metadata and
|
|
78
80
|
// top-level fields that were not supplied in this call are preserved.
|
|
@@ -277,6 +277,14 @@ export interface EnyoAppliance {
|
|
|
277
277
|
smartPlug?: EnyoSmartPlugApplianceMetadata;
|
|
278
278
|
/** Optional custom name for the appliance, defined by the user */
|
|
279
279
|
customName?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Optional list of vendor- or integration-specific compatibility modes that
|
|
282
|
+
* are active for this appliance. Each entry is a free-form, non-localized
|
|
283
|
+
* identifier describing a behavioural deviation the appliance requires
|
|
284
|
+
* (e.g. a firmware quirk workaround or a legacy protocol dialect).
|
|
285
|
+
* Consumers that do not know a given mode should ignore it.
|
|
286
|
+
*/
|
|
287
|
+
compatibilityModes?: string[];
|
|
280
288
|
/**
|
|
281
289
|
* Optional identifier of the cloud-deployed energy app package that manages
|
|
282
290
|
* this appliance. Set when the appliance is provisioned and operated by a
|
package/dist/cjs/version.cjs
CHANGED
|
@@ -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 = '1.
|
|
12
|
+
exports.SDK_VERSION = '1.15.0';
|
|
13
13
|
/**
|
|
14
14
|
* Gets the current SDK version.
|
|
15
15
|
* @returns The semantic version string of the SDK
|
package/dist/cjs/version.d.cts
CHANGED
|
@@ -65,6 +65,13 @@ export interface ApplianceConfig {
|
|
|
65
65
|
heatingRod?: EnyoHeatingRodApplianceMetadata;
|
|
66
66
|
smartPlug?: EnyoSmartPlugApplianceMetadata;
|
|
67
67
|
availableFeatures?: EnyoApplianceAvailableFeaturesEnum[];
|
|
68
|
+
/**
|
|
69
|
+
* Optional vendor- or integration-specific compatibility modes. Forwarded to
|
|
70
|
+
* {@link EnyoAppliance.compatibilityModes} when the appliance is created or
|
|
71
|
+
* updated. Omit to keep the stored value on an update; pass an explicit `[]`
|
|
72
|
+
* to clear it.
|
|
73
|
+
*/
|
|
74
|
+
compatibilityModes?: string[];
|
|
68
75
|
/**
|
|
69
76
|
* Optional identifier of the cloud-deployed energy app package that manages
|
|
70
77
|
* this appliance. Forwarded to {@link EnyoAppliance.cloudPackageId} when the
|
|
@@ -443,6 +450,11 @@ export interface PartialEnyoAppliance {
|
|
|
443
450
|
smartPlug?: Partial<EnyoSmartPlugApplianceMetadata>;
|
|
444
451
|
/** Optional custom name for the appliance, defined by the user */
|
|
445
452
|
customName?: string;
|
|
453
|
+
/**
|
|
454
|
+
* Optional list of vendor- or integration-specific compatibility modes that
|
|
455
|
+
* are active for this appliance. Mirrors {@link EnyoAppliance.compatibilityModes}.
|
|
456
|
+
*/
|
|
457
|
+
compatibilityModes?: string[];
|
|
446
458
|
/**
|
|
447
459
|
* Optional identifier of the cloud-deployed energy app package that manages
|
|
448
460
|
* this appliance. Mirrors {@link EnyoAppliance.cloudPackageId}.
|
|
@@ -205,7 +205,7 @@ export class ApplianceManager {
|
|
|
205
205
|
airConditioning: appliance.airConditioning,
|
|
206
206
|
heatingRod: appliance.heatingRod,
|
|
207
207
|
smartPlug: appliance.smartPlug,
|
|
208
|
-
// Conditionally spread the
|
|
208
|
+
// Conditionally spread the optional top-level fields that are NOT
|
|
209
209
|
// covered by MERGEABLE_METADATA_KEYS. If they were always materialized
|
|
210
210
|
// as explicit keys, an omitted (undefined) value would clobber the
|
|
211
211
|
// stored value during mergeApplianceData's `{...existing, ...update}`
|
|
@@ -213,6 +213,7 @@ export class ApplianceManager {
|
|
|
213
213
|
// while dropping omitted fields so the existing value is preserved.
|
|
214
214
|
...(appliance.cloudPackageId !== undefined && { cloudPackageId: appliance.cloudPackageId }),
|
|
215
215
|
...(appliance.availableFeatures !== undefined && { availableFeatures: appliance.availableFeatures }),
|
|
216
|
+
...(appliance.compatibilityModes !== undefined && { compatibilityModes: appliance.compatibilityModes }),
|
|
216
217
|
};
|
|
217
218
|
let applianceData = newApplianceData;
|
|
218
219
|
if (existingApplianceId) {
|
|
@@ -51,7 +51,8 @@ export class InMemoryApplianceManager extends ApplianceManager {
|
|
|
51
51
|
};
|
|
52
52
|
// Build the incoming appliance data covering every ApplianceConfig field.
|
|
53
53
|
// The two optional top-level fields that are NOT shallow-merged by
|
|
54
|
-
// mergeApplianceData (`cloudPackageId`, `availableFeatures
|
|
54
|
+
// mergeApplianceData (`cloudPackageId`, `availableFeatures`,
|
|
55
|
+
// `compatibilityModes`) are only
|
|
55
56
|
// materialized when provided so an omitted value cannot clobber the stored
|
|
56
57
|
// one during an update; pass an explicit value (e.g. `[]`) to clear them.
|
|
57
58
|
const newApplianceData = {
|
|
@@ -70,6 +71,7 @@ export class InMemoryApplianceManager extends ApplianceManager {
|
|
|
70
71
|
heatingRod: appliance.heatingRod,
|
|
71
72
|
...(appliance.cloudPackageId !== undefined && { cloudPackageId: appliance.cloudPackageId }),
|
|
72
73
|
...(appliance.availableFeatures !== undefined && { availableFeatures: appliance.availableFeatures }),
|
|
74
|
+
...(appliance.compatibilityModes !== undefined && { compatibilityModes: appliance.compatibilityModes }),
|
|
73
75
|
};
|
|
74
76
|
// On update, merge onto the stored appliance so type-specific metadata and
|
|
75
77
|
// top-level fields that were not supplied in this call are preserved.
|
|
@@ -277,6 +277,14 @@ export interface EnyoAppliance {
|
|
|
277
277
|
smartPlug?: EnyoSmartPlugApplianceMetadata;
|
|
278
278
|
/** Optional custom name for the appliance, defined by the user */
|
|
279
279
|
customName?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Optional list of vendor- or integration-specific compatibility modes that
|
|
282
|
+
* are active for this appliance. Each entry is a free-form, non-localized
|
|
283
|
+
* identifier describing a behavioural deviation the appliance requires
|
|
284
|
+
* (e.g. a firmware quirk workaround or a legacy protocol dialect).
|
|
285
|
+
* Consumers that do not know a given mode should ignore it.
|
|
286
|
+
*/
|
|
287
|
+
compatibilityModes?: string[];
|
|
280
288
|
/**
|
|
281
289
|
* Optional identifier of the cloud-deployed energy app package that manages
|
|
282
290
|
* this appliance. Set when the appliance is provisioned and operated by a
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED