@enyo-energy/energy-app-sdk 0.0.97 → 0.0.99
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/index.cjs +1 -0
- package/dist/cjs/index.d.cts +1 -0
- package/dist/cjs/packages/energy-app-settings.d.cts +24 -1
- package/dist/cjs/types/enyo-settings.d.cts +67 -1
- package/dist/cjs/version.cjs +1 -1
- package/dist/cjs/version.d.cts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/packages/energy-app-settings.d.ts +24 -1
- package/dist/types/enyo-settings.d.ts +67 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -24,6 +24,7 @@ __exportStar(require("./implementations/ocpp/ocpp201.cjs"), exports);
|
|
|
24
24
|
__exportStar(require("./implementations/ocpp/ocpp-common.cjs"), exports);
|
|
25
25
|
__exportStar(require("./types/enyo-authentication.cjs"), exports);
|
|
26
26
|
__exportStar(require("./types/enyo-settings.cjs"), exports);
|
|
27
|
+
__exportStar(require("./packages/energy-app-settings.cjs"), exports);
|
|
27
28
|
__exportStar(require("./types/enyo-energy-prices.cjs"), exports);
|
|
28
29
|
__exportStar(require("./types/enyo-notification.cjs"), exports);
|
|
29
30
|
__exportStar(require("./types/enyo-secret-manager.cjs"), exports);
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -37,6 +37,7 @@ export * from './implementations/ocpp/ocpp201.cjs';
|
|
|
37
37
|
export * from './implementations/ocpp/ocpp-common.cjs';
|
|
38
38
|
export * from './types/enyo-authentication.cjs';
|
|
39
39
|
export * from './types/enyo-settings.cjs';
|
|
40
|
+
export * from './packages/energy-app-settings.cjs';
|
|
40
41
|
export * from './types/enyo-energy-prices.cjs';
|
|
41
42
|
export * from './types/enyo-notification.cjs';
|
|
42
43
|
export * from './types/enyo-secret-manager.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EnyoPackageConfigurationSetting, EnyoSettingsChangeListener, EnyoSettingConfigWithValue } from "../types/enyo-settings.cjs";
|
|
1
|
+
import { EnyoPackageConfigurationSetting, EnyoPackageConfigurationSettingGroup, EnyoSettingsChangeListener, EnyoSettingConfigWithValue, EnyoSettingGroupWithValues } from "../types/enyo-settings.cjs";
|
|
2
2
|
/**
|
|
3
3
|
* Interface for managing Energy App settings configuration for appliances or the entire package.
|
|
4
4
|
* Provides methods to add, remove, and modify settings, as well as listen for changes.
|
|
@@ -44,4 +44,27 @@ export interface EnergyAppSettings {
|
|
|
44
44
|
* @returns Promise that resolves to an array of all settings with their IDs and current values
|
|
45
45
|
*/
|
|
46
46
|
getSettingsConfig(): Promise<EnyoSettingConfigWithValue[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Adds a group of related settings to the Energy App.
|
|
49
|
+
* The group organizes multiple settings under a common heading with a translated caption.
|
|
50
|
+
* Each group must have a unique groupName. Settings within the group follow the same rules
|
|
51
|
+
* as individual settings (unique names, optional appliance scoping).
|
|
52
|
+
*
|
|
53
|
+
* @param group - The setting group configuration including group name, caption, and 1-n settings
|
|
54
|
+
* @returns Promise that resolves when the setting group is successfully added
|
|
55
|
+
*/
|
|
56
|
+
addSettingGroup(group: EnyoPackageConfigurationSettingGroup): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Removes a setting group and all its contained settings from the Energy App.
|
|
59
|
+
*
|
|
60
|
+
* @param groupName - The unique name of the group to remove
|
|
61
|
+
* @returns Promise that resolves when the group is successfully removed
|
|
62
|
+
*/
|
|
63
|
+
removeSettingGroup(groupName: string): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Retrieves all currently configured setting groups with their settings' unique identifiers and current values.
|
|
66
|
+
*
|
|
67
|
+
* @returns Promise that resolves to an array of all setting groups with their settings including IDs and current values
|
|
68
|
+
*/
|
|
69
|
+
getSettingGroups(): Promise<EnyoSettingGroupWithValues[]>;
|
|
47
70
|
}
|
|
@@ -16,14 +16,52 @@ export interface EnyoPackageConfigurationSettingSelectOption {
|
|
|
16
16
|
/** The displayed name of the option */
|
|
17
17
|
optionName: EnyoPackageConfigurationTranslatedValue[];
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Display option for select-type settings.
|
|
21
|
+
* - `dropdown`: renders as a dropdown/select element
|
|
22
|
+
* - `radioButtons`: renders as radio button group
|
|
23
|
+
*/
|
|
24
|
+
export type EnyoSelectDisplayOption = 'dropdown' | 'radioButtons';
|
|
25
|
+
/**
|
|
26
|
+
* Display option for float-type settings.
|
|
27
|
+
* - `stepper`: renders as a stepper control with +/- buttons
|
|
28
|
+
*/
|
|
29
|
+
export type EnyoFloatDisplayOption = 'stepper';
|
|
30
|
+
/**
|
|
31
|
+
* Step option for time-type settings, defining the interval between selectable time values.
|
|
32
|
+
* - `'15min'`: 15-minute intervals (e.g., 00:00, 00:15, 00:30, ...)
|
|
33
|
+
* - `'30min'`: 30-minute intervals (e.g., 00:00, 00:30, 01:00, ...)
|
|
34
|
+
* - `'1hour'`: 1-hour intervals (e.g., 00:00, 01:00, 02:00, ...)
|
|
35
|
+
*/
|
|
36
|
+
export type EnyoTimeStepOption = '15min' | '30min' | '1hour';
|
|
37
|
+
/**
|
|
38
|
+
* Configuration options for time-type settings.
|
|
39
|
+
* Time values are represented in "HH:mm" format (e.g., "08:00", "14:30").
|
|
40
|
+
*/
|
|
41
|
+
export interface EnyoPackageConfigurationSettingTimeOptions {
|
|
42
|
+
/** The step interval between selectable time values */
|
|
43
|
+
stepOption: EnyoTimeStepOption;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Configuration options for float-type settings.
|
|
47
|
+
*/
|
|
19
48
|
export interface EnyoPackageConfigurationSettingFloatOptions {
|
|
20
49
|
maxValue?: number;
|
|
21
50
|
minValue?: number;
|
|
22
51
|
step?: number;
|
|
52
|
+
/** Optional display option for the float input. Use 'stepper' to render a +/- button control. */
|
|
53
|
+
displayOption?: EnyoFloatDisplayOption;
|
|
54
|
+
/** Optional unit suffix displayed next to the value (e.g., "ct/kWh") */
|
|
55
|
+
suffix?: string;
|
|
23
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Configuration options for integer-type settings.
|
|
59
|
+
*/
|
|
24
60
|
export interface EnyoPackageConfigurationSettingIntegerOptions {
|
|
25
61
|
maxValue?: number;
|
|
26
62
|
minValue?: number;
|
|
63
|
+
/** Optional unit suffix displayed next to the value (e.g., "ct/kWh") */
|
|
64
|
+
suffix?: string;
|
|
27
65
|
}
|
|
28
66
|
export interface EnyoPackageConfigurationSettingTextOptions {
|
|
29
67
|
maxLength?: number;
|
|
@@ -35,7 +73,7 @@ export interface EnyoPackageConfigurationSetting {
|
|
|
35
73
|
/** internal name of the setting - must be unique */
|
|
36
74
|
name: string;
|
|
37
75
|
/** the type of the setting */
|
|
38
|
-
type: 'text' | 'select' | 'float' | 'integer' | 'checkbox';
|
|
76
|
+
type: 'text' | 'select' | 'float' | 'integer' | 'checkbox' | 'time';
|
|
39
77
|
/** if the setting is required */
|
|
40
78
|
required: boolean;
|
|
41
79
|
/** The displayed name of the field */
|
|
@@ -47,9 +85,13 @@ export interface EnyoPackageConfigurationSetting {
|
|
|
47
85
|
/** Optional appliance ID. If provided, setting is for specific appliance. If omitted, setting is for the whole package */
|
|
48
86
|
applianceId?: string;
|
|
49
87
|
selectOptions?: EnyoPackageConfigurationSettingSelectOption[];
|
|
88
|
+
/** Optional display option for select-type settings. Defaults to 'dropdown' if not specified. */
|
|
89
|
+
selectDisplayOption?: EnyoSelectDisplayOption;
|
|
50
90
|
floatOptions?: EnyoPackageConfigurationSettingFloatOptions;
|
|
51
91
|
integerOptions?: EnyoPackageConfigurationSettingIntegerOptions;
|
|
52
92
|
textOptions?: EnyoPackageConfigurationSettingTextOptions;
|
|
93
|
+
/** Optional configuration for time-type settings. Values are in "HH:mm" format. */
|
|
94
|
+
timeOptions?: EnyoPackageConfigurationSettingTimeOptions;
|
|
53
95
|
}
|
|
54
96
|
/**
|
|
55
97
|
* Represents a change event when a setting value is modified.
|
|
@@ -82,3 +124,27 @@ export interface EnyoSettingConfigWithValue extends EnyoSettingConfigWithId {
|
|
|
82
124
|
/** Current value of the setting (if set) */
|
|
83
125
|
currentValue?: string;
|
|
84
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Represents a group of related settings with a name and translated caption.
|
|
129
|
+
* Groups allow organizing multiple settings under a common heading in the UI.
|
|
130
|
+
*/
|
|
131
|
+
export interface EnyoPackageConfigurationSettingGroup {
|
|
132
|
+
/** Internal name of the group - must be unique */
|
|
133
|
+
groupName: string;
|
|
134
|
+
/** Translated caption displayed as the group heading */
|
|
135
|
+
caption: EnyoPackageConfigurationTranslatedValue[];
|
|
136
|
+
/** The settings belonging to this group (1 or more) */
|
|
137
|
+
settings: EnyoPackageConfigurationSetting[];
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Represents a setting group with resolved setting values.
|
|
141
|
+
* Used when retrieving groups including their current persisted values and IDs.
|
|
142
|
+
*/
|
|
143
|
+
export interface EnyoSettingGroupWithValues {
|
|
144
|
+
/** Internal name of the group */
|
|
145
|
+
groupName: string;
|
|
146
|
+
/** Translated caption displayed as the group heading */
|
|
147
|
+
caption: EnyoPackageConfigurationTranslatedValue[];
|
|
148
|
+
/** The settings belonging to this group, including IDs and current values */
|
|
149
|
+
settings: EnyoSettingConfigWithValue[];
|
|
150
|
+
}
|
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 = '0.0.
|
|
12
|
+
exports.SDK_VERSION = '0.0.99';
|
|
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
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export * from './implementations/ocpp/ocpp201.js';
|
|
|
37
37
|
export * from './implementations/ocpp/ocpp-common.js';
|
|
38
38
|
export * from './types/enyo-authentication.js';
|
|
39
39
|
export * from './types/enyo-settings.js';
|
|
40
|
+
export * from './packages/energy-app-settings.js';
|
|
40
41
|
export * from './types/enyo-energy-prices.js';
|
|
41
42
|
export * from './types/enyo-notification.js';
|
|
42
43
|
export * from './types/enyo-secret-manager.js';
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from './implementations/ocpp/ocpp201.js';
|
|
|
7
7
|
export * from './implementations/ocpp/ocpp-common.js';
|
|
8
8
|
export * from './types/enyo-authentication.js';
|
|
9
9
|
export * from './types/enyo-settings.js';
|
|
10
|
+
export * from './packages/energy-app-settings.js';
|
|
10
11
|
export * from './types/enyo-energy-prices.js';
|
|
11
12
|
export * from './types/enyo-notification.js';
|
|
12
13
|
export * from './types/enyo-secret-manager.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EnyoPackageConfigurationSetting, EnyoSettingsChangeListener, EnyoSettingConfigWithValue } from "../types/enyo-settings.js";
|
|
1
|
+
import { EnyoPackageConfigurationSetting, EnyoPackageConfigurationSettingGroup, EnyoSettingsChangeListener, EnyoSettingConfigWithValue, EnyoSettingGroupWithValues } from "../types/enyo-settings.js";
|
|
2
2
|
/**
|
|
3
3
|
* Interface for managing Energy App settings configuration for appliances or the entire package.
|
|
4
4
|
* Provides methods to add, remove, and modify settings, as well as listen for changes.
|
|
@@ -44,4 +44,27 @@ export interface EnergyAppSettings {
|
|
|
44
44
|
* @returns Promise that resolves to an array of all settings with their IDs and current values
|
|
45
45
|
*/
|
|
46
46
|
getSettingsConfig(): Promise<EnyoSettingConfigWithValue[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Adds a group of related settings to the Energy App.
|
|
49
|
+
* The group organizes multiple settings under a common heading with a translated caption.
|
|
50
|
+
* Each group must have a unique groupName. Settings within the group follow the same rules
|
|
51
|
+
* as individual settings (unique names, optional appliance scoping).
|
|
52
|
+
*
|
|
53
|
+
* @param group - The setting group configuration including group name, caption, and 1-n settings
|
|
54
|
+
* @returns Promise that resolves when the setting group is successfully added
|
|
55
|
+
*/
|
|
56
|
+
addSettingGroup(group: EnyoPackageConfigurationSettingGroup): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Removes a setting group and all its contained settings from the Energy App.
|
|
59
|
+
*
|
|
60
|
+
* @param groupName - The unique name of the group to remove
|
|
61
|
+
* @returns Promise that resolves when the group is successfully removed
|
|
62
|
+
*/
|
|
63
|
+
removeSettingGroup(groupName: string): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Retrieves all currently configured setting groups with their settings' unique identifiers and current values.
|
|
66
|
+
*
|
|
67
|
+
* @returns Promise that resolves to an array of all setting groups with their settings including IDs and current values
|
|
68
|
+
*/
|
|
69
|
+
getSettingGroups(): Promise<EnyoSettingGroupWithValues[]>;
|
|
47
70
|
}
|
|
@@ -16,14 +16,52 @@ export interface EnyoPackageConfigurationSettingSelectOption {
|
|
|
16
16
|
/** The displayed name of the option */
|
|
17
17
|
optionName: EnyoPackageConfigurationTranslatedValue[];
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Display option for select-type settings.
|
|
21
|
+
* - `dropdown`: renders as a dropdown/select element
|
|
22
|
+
* - `radioButtons`: renders as radio button group
|
|
23
|
+
*/
|
|
24
|
+
export type EnyoSelectDisplayOption = 'dropdown' | 'radioButtons';
|
|
25
|
+
/**
|
|
26
|
+
* Display option for float-type settings.
|
|
27
|
+
* - `stepper`: renders as a stepper control with +/- buttons
|
|
28
|
+
*/
|
|
29
|
+
export type EnyoFloatDisplayOption = 'stepper';
|
|
30
|
+
/**
|
|
31
|
+
* Step option for time-type settings, defining the interval between selectable time values.
|
|
32
|
+
* - `'15min'`: 15-minute intervals (e.g., 00:00, 00:15, 00:30, ...)
|
|
33
|
+
* - `'30min'`: 30-minute intervals (e.g., 00:00, 00:30, 01:00, ...)
|
|
34
|
+
* - `'1hour'`: 1-hour intervals (e.g., 00:00, 01:00, 02:00, ...)
|
|
35
|
+
*/
|
|
36
|
+
export type EnyoTimeStepOption = '15min' | '30min' | '1hour';
|
|
37
|
+
/**
|
|
38
|
+
* Configuration options for time-type settings.
|
|
39
|
+
* Time values are represented in "HH:mm" format (e.g., "08:00", "14:30").
|
|
40
|
+
*/
|
|
41
|
+
export interface EnyoPackageConfigurationSettingTimeOptions {
|
|
42
|
+
/** The step interval between selectable time values */
|
|
43
|
+
stepOption: EnyoTimeStepOption;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Configuration options for float-type settings.
|
|
47
|
+
*/
|
|
19
48
|
export interface EnyoPackageConfigurationSettingFloatOptions {
|
|
20
49
|
maxValue?: number;
|
|
21
50
|
minValue?: number;
|
|
22
51
|
step?: number;
|
|
52
|
+
/** Optional display option for the float input. Use 'stepper' to render a +/- button control. */
|
|
53
|
+
displayOption?: EnyoFloatDisplayOption;
|
|
54
|
+
/** Optional unit suffix displayed next to the value (e.g., "ct/kWh") */
|
|
55
|
+
suffix?: string;
|
|
23
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Configuration options for integer-type settings.
|
|
59
|
+
*/
|
|
24
60
|
export interface EnyoPackageConfigurationSettingIntegerOptions {
|
|
25
61
|
maxValue?: number;
|
|
26
62
|
minValue?: number;
|
|
63
|
+
/** Optional unit suffix displayed next to the value (e.g., "ct/kWh") */
|
|
64
|
+
suffix?: string;
|
|
27
65
|
}
|
|
28
66
|
export interface EnyoPackageConfigurationSettingTextOptions {
|
|
29
67
|
maxLength?: number;
|
|
@@ -35,7 +73,7 @@ export interface EnyoPackageConfigurationSetting {
|
|
|
35
73
|
/** internal name of the setting - must be unique */
|
|
36
74
|
name: string;
|
|
37
75
|
/** the type of the setting */
|
|
38
|
-
type: 'text' | 'select' | 'float' | 'integer' | 'checkbox';
|
|
76
|
+
type: 'text' | 'select' | 'float' | 'integer' | 'checkbox' | 'time';
|
|
39
77
|
/** if the setting is required */
|
|
40
78
|
required: boolean;
|
|
41
79
|
/** The displayed name of the field */
|
|
@@ -47,9 +85,13 @@ export interface EnyoPackageConfigurationSetting {
|
|
|
47
85
|
/** Optional appliance ID. If provided, setting is for specific appliance. If omitted, setting is for the whole package */
|
|
48
86
|
applianceId?: string;
|
|
49
87
|
selectOptions?: EnyoPackageConfigurationSettingSelectOption[];
|
|
88
|
+
/** Optional display option for select-type settings. Defaults to 'dropdown' if not specified. */
|
|
89
|
+
selectDisplayOption?: EnyoSelectDisplayOption;
|
|
50
90
|
floatOptions?: EnyoPackageConfigurationSettingFloatOptions;
|
|
51
91
|
integerOptions?: EnyoPackageConfigurationSettingIntegerOptions;
|
|
52
92
|
textOptions?: EnyoPackageConfigurationSettingTextOptions;
|
|
93
|
+
/** Optional configuration for time-type settings. Values are in "HH:mm" format. */
|
|
94
|
+
timeOptions?: EnyoPackageConfigurationSettingTimeOptions;
|
|
53
95
|
}
|
|
54
96
|
/**
|
|
55
97
|
* Represents a change event when a setting value is modified.
|
|
@@ -82,3 +124,27 @@ export interface EnyoSettingConfigWithValue extends EnyoSettingConfigWithId {
|
|
|
82
124
|
/** Current value of the setting (if set) */
|
|
83
125
|
currentValue?: string;
|
|
84
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Represents a group of related settings with a name and translated caption.
|
|
129
|
+
* Groups allow organizing multiple settings under a common heading in the UI.
|
|
130
|
+
*/
|
|
131
|
+
export interface EnyoPackageConfigurationSettingGroup {
|
|
132
|
+
/** Internal name of the group - must be unique */
|
|
133
|
+
groupName: string;
|
|
134
|
+
/** Translated caption displayed as the group heading */
|
|
135
|
+
caption: EnyoPackageConfigurationTranslatedValue[];
|
|
136
|
+
/** The settings belonging to this group (1 or more) */
|
|
137
|
+
settings: EnyoPackageConfigurationSetting[];
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Represents a setting group with resolved setting values.
|
|
141
|
+
* Used when retrieving groups including their current persisted values and IDs.
|
|
142
|
+
*/
|
|
143
|
+
export interface EnyoSettingGroupWithValues {
|
|
144
|
+
/** Internal name of the group */
|
|
145
|
+
groupName: string;
|
|
146
|
+
/** Translated caption displayed as the group heading */
|
|
147
|
+
caption: EnyoPackageConfigurationTranslatedValue[];
|
|
148
|
+
/** The settings belonging to this group, including IDs and current values */
|
|
149
|
+
settings: EnyoSettingConfigWithValue[];
|
|
150
|
+
}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED