@formant/data-sdk 1.81.8 → 1.82.1

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.
@@ -39,9 +39,11 @@ import { createFleet } from "./api/createFleet";
39
39
  import { getAllEventTriggerGroup } from "./api/getAllEventTriggerGroup";
40
40
  import { getEventTriggerGroup } from "./api/getEventTriggerGroup";
41
41
  import { patchEventTriggerGroup } from "./api/patchEventTriggerGroup";
42
+ import { IDevice } from "./message-bus/listeners/EmbeddedAppMessage";
42
43
  export declare class Fleet {
43
44
  static defaultDeviceId: string | undefined;
44
45
  static knownContext: WeakRef<Device>[];
46
+ static groupDevices: IDevice[] | undefined;
45
47
  static createFleet: typeof createFleet;
46
48
  static listFleets: typeof listFleets;
47
49
  static getFleet: typeof getFleet;
@@ -53,6 +55,24 @@ export declare class Fleet {
53
55
  static getCurrentDevice(): Promise<Device>;
54
56
  static getPeerDevice(url: string): Promise<PeerDevice>;
55
57
  static getDevice(deviceId: string): Promise<Device>;
58
+ /**
59
+ * Sets the group devices for multi-device (coherence group) contexts.
60
+ * This is typically called automatically when overview_devices message is received.
61
+ * @param devices Array of device information from the host container
62
+ */
63
+ static setGroupDevices(devices: IDevice[]): void;
64
+ /**
65
+ * Gets the group devices for multi-device contexts.
66
+ * Returns undefined if not in a group context (single device view).
67
+ * @returns Array of device information or undefined
68
+ */
69
+ static getGroupDevices(): IDevice[] | undefined;
70
+ /**
71
+ * Gets all group devices as Device instances.
72
+ * Useful for modules that need full Device objects rather than just IDevice info.
73
+ * @returns Promise resolving to array of Device instances
74
+ */
75
+ static getGroupDevicesAsDeviceInstances(): Promise<Device[]>;
56
76
  static aggregateTelemetry: typeof aggregateTelemetry;
57
77
  static createShareLink: typeof createShareLink;
58
78
  static eventsCounter: typeof eventsCounter;
@@ -45,9 +45,11 @@ export declare class Device extends BaseDevice {
45
45
  /**
46
46
  * Asynchronously retrieves the configuration document for a device.
47
47
  *
48
- * @param {boolean} getDesiredConfigurationVersion - Whether to retrieve the desired configuration version
48
+ * @param {boolean} getDesiredConfigurationVersion - Whether to retrieve the desired configuration version.
49
+ * If false, uses reportedConfiguration.version, falling back to desiredConfigurationVersion
50
+ * if the device has no reportedConfiguration (e.g., agent never connected).
49
51
  * @returns {Promise<ConfigurationDocument>} A promise that resolves to the configuration document
50
- * @throws {Error} Throws an error if the device has no configuration or has never been turned on
52
+ * @throws {Error} Throws an error if the device has no configuration version
51
53
  */
52
54
  getConfiguration(getDesiredConfigurationVersion?: boolean): Promise<ConfigurationDocument>;
53
55
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formant/data-sdk",
3
- "version": "1.81.8",
3
+ "version": "1.82.1",
4
4
  "description": "A library for getting data from Formant",
5
5
  "repository": {
6
6
  "type": "git",