@enyo-energy/energy-app-sdk 0.0.38 → 0.0.40

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.
Files changed (47) hide show
  1. package/dist/cjs/energy-app-permission.type.cjs +1 -0
  2. package/dist/cjs/energy-app-permission.type.d.cts +3 -2
  3. package/dist/cjs/enyo-energy-app-sdk.d.cts +3 -0
  4. package/dist/cjs/implementations/appliances/appliance-manager.cjs +52 -24
  5. package/dist/cjs/implementations/appliances/appliance-manager.d.cts +19 -14
  6. package/dist/cjs/implementations/appliances/identifier-strategies.cjs +5 -39
  7. package/dist/cjs/implementations/appliances/identifier-strategies.d.cts +6 -31
  8. package/dist/cjs/implementations/appliances/in-memory-appliance-manager.cjs +292 -0
  9. package/dist/cjs/implementations/appliances/in-memory-appliance-manager.d.cts +118 -0
  10. package/dist/cjs/implementations/data-bus/demo-data-bus.cjs +246 -0
  11. package/dist/cjs/implementations/data-bus/demo-data-bus.d.cts +111 -0
  12. package/dist/cjs/implementations/modbus/EnergyAppModbusDataTypeConverter.cjs +8 -0
  13. package/dist/cjs/implementations/modbus/interfaces.d.cts +5 -1
  14. package/dist/cjs/index.cjs +9 -0
  15. package/dist/cjs/index.d.cts +8 -0
  16. package/dist/cjs/packages/energy-app-secret-manager.cjs +2 -0
  17. package/dist/cjs/packages/energy-app-secret-manager.d.cts +61 -0
  18. package/dist/cjs/types/enyo-data-bus-value.d.cts +16 -4
  19. package/dist/cjs/types/enyo-secret-manager.cjs +15 -0
  20. package/dist/cjs/types/enyo-secret-manager.d.cts +33 -0
  21. package/dist/cjs/version.cjs +1 -1
  22. package/dist/cjs/version.d.cts +1 -1
  23. package/dist/energy-app-permission.type.d.ts +3 -2
  24. package/dist/energy-app-permission.type.js +1 -0
  25. package/dist/enyo-energy-app-sdk.d.ts +3 -0
  26. package/dist/implementations/appliances/appliance-manager.d.ts +19 -14
  27. package/dist/implementations/appliances/appliance-manager.js +52 -24
  28. package/dist/implementations/appliances/demo-appliance-manager.d.ts +118 -0
  29. package/dist/implementations/appliances/demo-appliance-manager.js +277 -0
  30. package/dist/implementations/appliances/identifier-strategies.d.ts +6 -31
  31. package/dist/implementations/appliances/identifier-strategies.js +4 -37
  32. package/dist/implementations/appliances/in-memory-appliance-manager.d.ts +118 -0
  33. package/dist/implementations/appliances/in-memory-appliance-manager.js +288 -0
  34. package/dist/implementations/data-bus/demo-data-bus.d.ts +111 -0
  35. package/dist/implementations/data-bus/demo-data-bus.js +242 -0
  36. package/dist/implementations/modbus/EnergyAppModbusDataTypeConverter.js +8 -0
  37. package/dist/implementations/modbus/interfaces.d.ts +5 -1
  38. package/dist/index.d.ts +8 -0
  39. package/dist/index.js +9 -0
  40. package/dist/packages/energy-app-secret-manager.d.ts +61 -0
  41. package/dist/packages/energy-app-secret-manager.js +1 -0
  42. package/dist/types/enyo-data-bus-value.d.ts +16 -4
  43. package/dist/types/enyo-secret-manager.d.ts +33 -0
  44. package/dist/types/enyo-secret-manager.js +10 -0
  45. package/dist/version.d.ts +1 -1
  46. package/dist/version.js +1 -1
  47. package/package.json +1 -1
@@ -18,4 +18,5 @@ var EnergyAppPermissionTypeEnum;
18
18
  EnergyAppPermissionTypeEnum["ChargingCard"] = "ChargingCard";
19
19
  EnergyAppPermissionTypeEnum["Vehicle"] = "Vehicle";
20
20
  EnergyAppPermissionTypeEnum["Charge"] = "Charge";
21
+ EnergyAppPermissionTypeEnum["SecretManager"] = "SecretManager";
21
22
  })(EnergyAppPermissionTypeEnum || (exports.EnergyAppPermissionTypeEnum = EnergyAppPermissionTypeEnum = {}));
@@ -1,4 +1,4 @@
1
- export type EnergyAppPermissionType = 'RestrictedInternetAccess' | 'NetworkDeviceDiscovery' | 'NetworkDeviceSearch' | 'NetworkDeviceAccess' | 'Modbus' | 'Storage' | 'Appliance' | 'AllAppliances' | 'SendDataBusValues' | 'SubscribeDataBus' | 'SendDataBusCommands' | 'OcppServer';
1
+ export type EnergyAppPermissionType = 'RestrictedInternetAccess' | 'NetworkDeviceDiscovery' | 'NetworkDeviceSearch' | 'NetworkDeviceAccess' | 'Modbus' | 'Storage' | 'Appliance' | 'AllAppliances' | 'SendDataBusValues' | 'SubscribeDataBus' | 'SendDataBusCommands' | 'OcppServer' | 'ChargingCard' | 'Vehicle' | 'Charge' | 'SecretManager';
2
2
  export declare enum EnergyAppPermissionTypeEnum {
3
3
  RestrictedInternetAccess = "RestrictedInternetAccess",
4
4
  NetworkDeviceDiscovery = "NetworkDeviceDiscovery",
@@ -14,5 +14,6 @@ export declare enum EnergyAppPermissionTypeEnum {
14
14
  OcppServer = "OcppServer",
15
15
  ChargingCard = "ChargingCard",
16
16
  Vehicle = "Vehicle",
17
- Charge = "Charge"
17
+ Charge = "Charge",
18
+ SecretManager = "SecretManager"
18
19
  }
@@ -12,6 +12,7 @@ import { EnergyAppAuthentication } from "./packages/energy-app-authentication.cj
12
12
  import { EnergyAppSettings } from "./packages/energy-app-settings.cjs";
13
13
  import { EnergyAppElectricityPrices } from "./packages/energy-app-electricity-prices.cjs";
14
14
  import { EnergyAppNotification } from "./packages/energy-app-notification.cjs";
15
+ import { EnergyAppSecretManager } from "./packages/energy-app-secret-manager.cjs";
15
16
  export declare enum EnergyAppStateEnum {
16
17
  Launching = "launching",
17
18
  Running = "running",
@@ -64,4 +65,6 @@ export interface EnyoEnergyAppSdk {
64
65
  useElectricityPrices: () => EnergyAppElectricityPrices;
65
66
  /** Get the Notification API */
66
67
  useNotification: () => EnergyAppNotification;
68
+ /** Get the Secret Manager API */
69
+ useSecretManager: () => EnergyAppSecretManager;
67
70
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ApplianceManager = void 0;
4
+ const index_js_1 = require("../../index.cjs");
4
5
  const enyo_appliance_js_1 = require("../../types/enyo-appliance.cjs");
5
- const identifier_strategies_js_1 = require("./identifier-strategies.cjs");
6
6
  /**
7
7
  * Manages appliances in the energy system with configurable identification strategies.
8
8
  * Provides comprehensive CRUD operations and state management for energy appliances.
@@ -20,62 +20,90 @@ class ApplianceManager {
20
20
  constructor(energyApp, config) {
21
21
  this.energyApp = energyApp;
22
22
  this.config = {
23
- identifierStrategy: config?.identifierStrategy ?? new identifier_strategies_js_1.NetworkDeviceIdStrategy(),
23
+ identifierStrategy: config?.identifierStrategy ?? new index_js_1.SerialNumberStrategy(),
24
24
  autoUpdateMetadata: config?.autoUpdateMetadata ?? true,
25
25
  enableLogging: config?.enableLogging ?? true,
26
26
  defaultConnectionType: config?.defaultConnectionType ?? enyo_appliance_js_1.EnyoApplianceConnectionType.Connector,
27
- defaultVendorName: config?.defaultVendorName ?? ''
27
+ defaultVendorName: config?.defaultVendorName ?? '',
28
28
  };
29
29
  }
30
+ /**
31
+ * initializes a new ApplianceManager instance with async initialization.
32
+ * This factory method handles cache initialization if configured.
33
+ * @param energyApp The EnergyApp instance to use for API calls
34
+ * @param config Configuration options for the manager
35
+ * @returns Promise that resolves to an initialized ApplianceManager instance
36
+ */
37
+ static async initialize(energyApp, config) {
38
+ const manager = new ApplianceManager(energyApp, config);
39
+ await manager.refreshCache();
40
+ return manager;
41
+ }
30
42
  /**
31
43
  * Creates or updates an appliance with the given configuration.
32
- * @param config The appliance configuration
33
- * @param existingApplianceId Optional ID of an existing appliance to update
44
+ * Automatically detects if an appliance already exists based on the identifier strategy.
45
+ * @param appliance The appliance configuration
34
46
  * @returns The ID of the created or updated appliance
35
47
  */
36
- async createOrUpdateAppliance(config, existingApplianceId) {
48
+ async createOrUpdateAppliance(appliance) {
49
+ // Refresh cache to ensure we have latest appliances
50
+ await this.refreshCache();
51
+ // Try to find existing appliance using identifier strategy
52
+ let existingApplianceId;
53
+ const identifier = this.config.identifierStrategy.extract(appliance);
54
+ if (identifier) {
55
+ const existing = await this.findByIdentifier(identifier);
56
+ if (existing.length > 0) {
57
+ existingApplianceId = existing[0].id;
58
+ if (this.config.enableLogging) {
59
+ console.log(`Found existing appliance with ID ${existingApplianceId} for identifier ${identifier}`);
60
+ }
61
+ }
62
+ }
37
63
  // Build network device IDs list
38
- const networkDeviceIds = config.networkDevices?.map(d => d.id) ?? [];
64
+ const networkDeviceIds = appliance.networkDevices?.map(d => d.id) ?? [];
39
65
  // Merge metadata with defaults
40
66
  const metadata = {
41
67
  connectionType: this.config.defaultConnectionType,
42
68
  state: enyo_appliance_js_1.EnyoApplianceStateEnum.Connected,
43
- ...config.metadata
69
+ ...appliance.metadata
44
70
  };
45
71
  if (this.config.defaultVendorName && !metadata.vendorName) {
46
72
  metadata.vendorName = this.config.defaultVendorName;
47
73
  }
48
74
  // Build appliance data
49
75
  const applianceData = {
50
- name: config.name,
51
- type: config.type,
76
+ name: appliance.name,
77
+ type: appliance.type,
52
78
  networkDeviceIds,
53
79
  metadata,
54
- ...(config.topology && { topology: config.topology })
80
+ ...(appliance.topology && { topology: appliance.topology }),
81
+ meter: appliance.meter,
82
+ heatpump: appliance.heatpump,
83
+ battery: appliance.battery,
84
+ charger: appliance.charger,
85
+ inverter: appliance.inverter,
55
86
  };
56
- // Add type-specific metadata
57
- if (config.typeMetadata) {
58
- Object.assign(applianceData, config.typeMetadata);
59
- }
60
87
  // Save appliance
61
88
  const applianceId = await this.energyApp.useAppliances().save(applianceData, existingApplianceId);
62
89
  // Update cache
63
90
  const savedAppliance = await this.energyApp.useAppliances().getById(applianceId);
64
91
  if (savedAppliance) {
65
- this.updateCache(savedAppliance, config.networkDevices?.[0]);
92
+ this.updateCache(savedAppliance);
93
+ }
94
+ if (this.config.enableLogging) {
95
+ console.log(`${existingApplianceId ? 'Updated' : 'Created'} appliance ${applianceId} of type ${appliance.type}`);
66
96
  }
67
- console.log(`${existingApplianceId ? 'Updated' : 'Created'} appliance ${applianceId} of type ${config.type}`);
68
97
  return applianceId;
69
98
  }
70
99
  /**
71
100
  * Updates the internal cache with an appliance.
72
101
  * @param appliance The appliance to cache
73
- * @param networkDevice Optional network device for identifier extraction
74
102
  */
75
- updateCache(appliance, networkDevice) {
103
+ updateCache(appliance) {
76
104
  this.applianceCache.set(appliance.id, appliance);
77
105
  // Extract identifier
78
- const identifier = this.config.identifierStrategy.extract(appliance, networkDevice);
106
+ const identifier = this.config.identifierStrategy.extract(appliance);
79
107
  if (identifier) {
80
108
  if (!this.identifierToApplianceId.has(identifier)) {
81
109
  this.identifierToApplianceId.set(identifier, new Set());
@@ -99,7 +127,7 @@ class ApplianceManager {
99
127
  for (const appliance of appliances) {
100
128
  // Try to get network devices if available
101
129
  const networkDevices = await this.getNetworkDevicesForAppliance(appliance);
102
- this.updateCache(appliance, networkDevices[0]);
130
+ this.updateCache(appliance);
103
131
  }
104
132
  }
105
133
  /**
@@ -143,10 +171,10 @@ class ApplianceManager {
143
171
  const matches = [];
144
172
  for (const appliance of allAppliances) {
145
173
  const networkDevices = await this.getNetworkDevicesForAppliance(appliance);
146
- const extractedId = this.config.identifierStrategy.extract(appliance, networkDevices[0]);
174
+ const extractedId = this.config.identifierStrategy.extract(appliance);
147
175
  if (extractedId === identifier) {
148
176
  matches.push(appliance);
149
- this.updateCache(appliance, networkDevices[0]);
177
+ this.updateCache(appliance);
150
178
  }
151
179
  }
152
180
  return matches;
@@ -162,7 +190,7 @@ class ApplianceManager {
162
190
  for (const strategy of strategies) {
163
191
  for (const appliance of allAppliances) {
164
192
  const networkDevices = await this.getNetworkDevicesForAppliance(appliance);
165
- const identifier = strategy.extract(appliance, networkDevices[0]);
193
+ const identifier = strategy.extract(appliance);
166
194
  if (identifier === searchValue) {
167
195
  return {
168
196
  appliance,
@@ -1,4 +1,4 @@
1
- import type { EnergyApp } from "../../index.cjs";
1
+ import { EnergyApp } from "../../index.cjs";
2
2
  import type { EnyoNetworkDevice } from "../../types/enyo-network-device.cjs";
3
3
  import { EnyoAppliance, EnyoApplianceConnectionType, EnyoApplianceMetadata, EnyoApplianceName, EnyoApplianceStateEnum, EnyoApplianceTopology, EnyoApplianceTypeEnum } from "../../types/enyo-appliance.cjs";
4
4
  import type { EnyoChargerApplianceMetadata } from "../../types/enyo-charger-appliance.cjs";
@@ -22,13 +22,11 @@ export interface ApplianceConfig {
22
22
  /** Topology information */
23
23
  topology?: EnyoApplianceTopology;
24
24
  /** Type-specific metadata based on appliance type */
25
- typeMetadata?: {
26
- meter?: EnyoMeterAppliance;
27
- inverter?: EnyoInverterApplianceMetadata;
28
- charger?: EnyoChargerApplianceMetadata;
29
- heatpump?: EnyoHeatpumpApplianceMetadata;
30
- battery?: EnyoBatteryApplianceMetadata;
31
- };
25
+ meter?: EnyoMeterAppliance;
26
+ inverter?: EnyoInverterApplianceMetadata;
27
+ charger?: EnyoChargerApplianceMetadata;
28
+ heatpump?: EnyoHeatpumpApplianceMetadata;
29
+ battery?: EnyoBatteryApplianceMetadata;
32
30
  }
33
31
  /**
34
32
  * Configuration options for the ApplianceManager.
@@ -64,26 +62,33 @@ export declare class ApplianceManager {
64
62
  private energyApp;
65
63
  private applianceCache;
66
64
  private identifierToApplianceId;
67
- private config;
65
+ protected config: Required<ApplianceManagerConfig>;
68
66
  /**
69
67
  * Creates a new ApplianceManager instance.
70
68
  * @param energyApp The EnergyApp instance to use for API calls
71
69
  * @param config Configuration options for the manager
72
70
  */
73
71
  constructor(energyApp: EnergyApp, config?: ApplianceManagerConfig);
72
+ /**
73
+ * initializes a new ApplianceManager instance with async initialization.
74
+ * This factory method handles cache initialization if configured.
75
+ * @param energyApp The EnergyApp instance to use for API calls
76
+ * @param config Configuration options for the manager
77
+ * @returns Promise that resolves to an initialized ApplianceManager instance
78
+ */
79
+ private static initialize;
74
80
  /**
75
81
  * Creates or updates an appliance with the given configuration.
76
- * @param config The appliance configuration
77
- * @param existingApplianceId Optional ID of an existing appliance to update
82
+ * Automatically detects if an appliance already exists based on the identifier strategy.
83
+ * @param appliance The appliance configuration
78
84
  * @returns The ID of the created or updated appliance
79
85
  */
80
- createOrUpdateAppliance(config: ApplianceConfig, existingApplianceId?: string): Promise<string>;
86
+ createOrUpdateAppliance(appliance: ApplianceConfig): Promise<string>;
81
87
  /**
82
88
  * Updates the internal cache with an appliance.
83
89
  * @param appliance The appliance to cache
84
- * @param networkDevice Optional network device for identifier extraction
85
90
  */
86
- private updateCache;
91
+ protected updateCache(appliance: EnyoAppliance): void;
87
92
  /**
88
93
  * Clears the internal cache.
89
94
  */
@@ -1,23 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IdentifierStrategyFactory = exports.FallbackIdentifierStrategy = exports.CompositeIdentifierStrategy = exports.CustomMetadataStrategy = exports.SerialNumberStrategy = exports.NetworkDeviceIdStrategy = void 0;
4
- /**
5
- * Strategy that uses the network device ID as the identifier.
6
- * This is the default strategy for most appliances.
7
- */
8
- class NetworkDeviceIdStrategy {
9
- name = 'networkDeviceId';
10
- /**
11
- * Extracts the network device ID.
12
- * @param appliance The appliance (not used in this strategy)
13
- * @param networkDevice The network device to get the ID from
14
- * @returns The network device ID or undefined
15
- */
16
- extract(appliance, networkDevice) {
17
- return networkDevice?.id;
18
- }
19
- }
20
- exports.NetworkDeviceIdStrategy = NetworkDeviceIdStrategy;
3
+ exports.IdentifierStrategyFactory = exports.FallbackIdentifierStrategy = exports.CompositeIdentifierStrategy = exports.CustomMetadataStrategy = exports.SerialNumberStrategy = void 0;
21
4
  /**
22
5
  * Strategy that uses the appliance's serial number as the identifier.
23
6
  * Useful when appliances can move between network devices.
@@ -81,13 +64,12 @@ class CompositeIdentifierStrategy {
81
64
  /**
82
65
  * Extracts and combines identifiers from multiple strategies.
83
66
  * @param appliance The appliance to extract identifiers from
84
- * @param networkDevice The network device if available
85
67
  * @returns The combined identifier or undefined if any part is missing
86
68
  */
87
- extract(appliance, networkDevice) {
69
+ extract(appliance) {
88
70
  const parts = [];
89
71
  for (const strategy of this.strategies) {
90
- const value = strategy.extract(appliance, networkDevice);
72
+ const value = strategy.extract(appliance);
91
73
  if (!value) {
92
74
  return undefined; // All parts must be present
93
75
  }
@@ -115,12 +97,11 @@ class FallbackIdentifierStrategy {
115
97
  /**
116
98
  * Tries strategies in order and returns the first available identifier.
117
99
  * @param appliance The appliance to extract identifiers from
118
- * @param networkDevice The network device if available
119
100
  * @returns The first available identifier or undefined
120
101
  */
121
- extract(appliance, networkDevice) {
102
+ extract(appliance) {
122
103
  for (const strategy of this.strategies) {
123
- const value = strategy.extract(appliance, networkDevice);
104
+ const value = strategy.extract(appliance);
124
105
  if (value) {
125
106
  return value;
126
107
  }
@@ -133,12 +114,6 @@ exports.FallbackIdentifierStrategy = FallbackIdentifierStrategy;
133
114
  * Factory class for creating common identifier strategies.
134
115
  */
135
116
  class IdentifierStrategyFactory {
136
- /**
137
- * Creates the default network device ID strategy.
138
- */
139
- static networkDeviceId() {
140
- return new NetworkDeviceIdStrategy();
141
- }
142
117
  /**
143
118
  * Creates a serial number strategy.
144
119
  */
@@ -167,14 +142,5 @@ class IdentifierStrategyFactory {
167
142
  static fallback(strategies) {
168
143
  return new FallbackIdentifierStrategy(strategies);
169
144
  }
170
- /**
171
- * Creates a strategy that prefers serial number but falls back to network device ID.
172
- */
173
- static serialNumberOrDeviceId() {
174
- return new FallbackIdentifierStrategy([
175
- new SerialNumberStrategy(),
176
- new NetworkDeviceIdStrategy()
177
- ]);
178
- }
179
145
  }
180
146
  exports.IdentifierStrategyFactory = IdentifierStrategyFactory;
@@ -1,5 +1,5 @@
1
1
  import type { EnyoAppliance } from "../../types/enyo-appliance.cjs";
2
- import type { EnyoNetworkDevice } from "../../types/enyo-network-device.cjs";
2
+ import { ApplianceConfig } from "./appliance-manager.cjs";
3
3
  /**
4
4
  * Strategy interface for extracting unique identifiers from appliances.
5
5
  * Allows flexible identification of appliances based on different criteria.
@@ -8,29 +8,14 @@ export interface IdentifierStrategy {
8
8
  /**
9
9
  * Extract the unique identifier from an appliance or its associated data.
10
10
  * @param appliance The appliance to extract the identifier from
11
- * @param networkDevice Optional network device associated with the appliance
12
11
  * @returns The extracted identifier string, or undefined if not available
13
12
  */
14
- extract(appliance: Partial<EnyoAppliance>, networkDevice?: EnyoNetworkDevice): string | undefined;
13
+ extract(appliance: EnyoAppliance | ApplianceConfig): string | undefined;
15
14
  /**
16
15
  * Name of the strategy for logging and debugging purposes.
17
16
  */
18
17
  name: string;
19
18
  }
20
- /**
21
- * Strategy that uses the network device ID as the identifier.
22
- * This is the default strategy for most appliances.
23
- */
24
- export declare class NetworkDeviceIdStrategy implements IdentifierStrategy {
25
- name: string;
26
- /**
27
- * Extracts the network device ID.
28
- * @param appliance The appliance (not used in this strategy)
29
- * @param networkDevice The network device to get the ID from
30
- * @returns The network device ID or undefined
31
- */
32
- extract(appliance: Partial<EnyoAppliance>, networkDevice?: EnyoNetworkDevice): string | undefined;
33
- }
34
19
  /**
35
20
  * Strategy that uses the appliance's serial number as the identifier.
36
21
  * Useful when appliances can move between network devices.
@@ -42,7 +27,7 @@ export declare class SerialNumberStrategy implements IdentifierStrategy {
42
27
  * @param appliance The appliance to extract the serial number from
43
28
  * @returns The serial number or undefined
44
29
  */
45
- extract(appliance: Partial<EnyoAppliance>): string | undefined;
30
+ extract(appliance: EnyoAppliance | ApplianceConfig): string | undefined;
46
31
  }
47
32
  /**
48
33
  * Strategy that uses a custom metadata field as the identifier.
@@ -61,7 +46,7 @@ export declare class CustomMetadataStrategy implements IdentifierStrategy {
61
46
  * @param appliance The appliance to extract the field from
62
47
  * @returns The field value or undefined
63
48
  */
64
- extract(appliance: Partial<EnyoAppliance>): string | undefined;
49
+ extract(appliance: EnyoAppliance | ApplianceConfig): string | undefined;
65
50
  }
66
51
  /**
67
52
  * Strategy that combines multiple identifiers to create a composite key.
@@ -80,10 +65,9 @@ export declare class CompositeIdentifierStrategy implements IdentifierStrategy {
80
65
  /**
81
66
  * Extracts and combines identifiers from multiple strategies.
82
67
  * @param appliance The appliance to extract identifiers from
83
- * @param networkDevice The network device if available
84
68
  * @returns The combined identifier or undefined if any part is missing
85
69
  */
86
- extract(appliance: Partial<EnyoAppliance>, networkDevice?: EnyoNetworkDevice): string | undefined;
70
+ extract(appliance: EnyoAppliance | ApplianceConfig): string | undefined;
87
71
  }
88
72
  /**
89
73
  * Strategy that tries multiple strategies in order and uses the first available identifier.
@@ -100,19 +84,14 @@ export declare class FallbackIdentifierStrategy implements IdentifierStrategy {
100
84
  /**
101
85
  * Tries strategies in order and returns the first available identifier.
102
86
  * @param appliance The appliance to extract identifiers from
103
- * @param networkDevice The network device if available
104
87
  * @returns The first available identifier or undefined
105
88
  */
106
- extract(appliance: Partial<EnyoAppliance>, networkDevice?: EnyoNetworkDevice): string | undefined;
89
+ extract(appliance: EnyoAppliance | ApplianceConfig): string | undefined;
107
90
  }
108
91
  /**
109
92
  * Factory class for creating common identifier strategies.
110
93
  */
111
94
  export declare class IdentifierStrategyFactory {
112
- /**
113
- * Creates the default network device ID strategy.
114
- */
115
- static networkDeviceId(): NetworkDeviceIdStrategy;
116
95
  /**
117
96
  * Creates a serial number strategy.
118
97
  */
@@ -133,8 +112,4 @@ export declare class IdentifierStrategyFactory {
133
112
  * @param strategies The strategies to try
134
113
  */
135
114
  static fallback(strategies: IdentifierStrategy[]): FallbackIdentifierStrategy;
136
- /**
137
- * Creates a strategy that prefers serial number but falls back to network device ID.
138
- */
139
- static serialNumberOrDeviceId(): FallbackIdentifierStrategy;
140
115
  }