@phystack/hub-device 4.4.45 → 4.4.47

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.
@@ -6,7 +6,7 @@ export enum TwinTypeEnum {
6
6
  Edge = 'Edge',
7
7
  Cloud = 'Cloud',
8
8
  Web = 'Web',
9
- Peripheral = 'Peripheral'
9
+ Peripheral = 'Peripheral',
10
10
  }
11
11
 
12
12
  export enum TwinStatusEnum {
@@ -329,6 +329,48 @@ export interface System {
329
329
  virtual: boolean;
330
330
  }
331
331
 
332
+ export enum AvailabilityStatus {
333
+ Available = 'Available',
334
+ Unavailable = 'Unavailable',
335
+ Unknown = 'Unknown',
336
+ }
337
+
338
+ export interface AudioPort {
339
+ name: string; // Port identifier (e.g., "analog-output-headphones")
340
+ description: string; // Human-readable description (e.g., "Headphones")
341
+ type?: string; // Port type (e.g., "Headphones", "HDMI", "Line")
342
+ priority?: number; // Port priority
343
+ availabilityStatus?: AvailabilityStatus; // Port availability status
344
+ }
345
+
346
+ export interface AudioDevice {
347
+ identifier: string;
348
+ displayName?: string; // Optional - info is consolidated in label field
349
+ volume?: number; // Volume level (0-100%)
350
+ muted?: boolean; // Mute status
351
+ availablePorts?: AudioPort[]; // Available ports for this device
352
+ label?: string; // Human-readable label with device info (e.g., "Headphones (Default, Available)", "HDMI Display (Available)")
353
+ }
354
+
355
+ export interface AudioDevices {
356
+ outputs: AudioDevice[];
357
+ inputs: AudioDevice[];
358
+ }
359
+
360
+ export interface AudioOutputControl {
361
+ identifier?: string; // The sink identifier from pactl (e.g., "alsa_output.pci-0000_00_1b.0.stereo-fallback").
362
+ volume?: number; // Volume level (0-100%)
363
+ muted?: boolean; // Mute status
364
+ activePort?: string; // Port to activate (e.g., "analog-output-headphones", "hdmi-output-0")
365
+ }
366
+
367
+ export interface AudioInputControl {
368
+ identifier?: string; // The source identifier from pactl (e.g., "alsa_input.pci-0000_00_1b.0.stereo-fallback").
369
+ volume?: number; // Volume level (0-100%)
370
+ muted?: boolean; // Mute status
371
+ activePort?: string; // Port to activate (e.g., "analog-input-microphone", "hdmi-input-0")
372
+ }
373
+
332
374
  export interface DeviceTwinReportedProperties {
333
375
  ip: DeviceIp[];
334
376
  os: {
@@ -361,6 +403,7 @@ export interface DeviceTwinReportedProperties {
361
403
  users: any[]; // todo: update
362
404
  system: System;
363
405
  jobs: Job[];
406
+ audioDevices?: AudioDevices;
364
407
  }
365
408
 
366
409
  export interface EdgeTwinReportedProperties {
@@ -476,6 +519,8 @@ export interface DeviceTwinDesiredProperties {
476
519
  externalId?: string;
477
520
  accessKey: string;
478
521
  jobs?: Job[];
522
+ audioOutputControl?: AudioOutputControl;
523
+ audioInputControl?: AudioInputControl;
479
524
  }
480
525
 
481
526
  export interface DeviceTwinDesiredPropertiesResponse {
@@ -487,6 +532,8 @@ export interface DeviceTwinDesiredPropertiesResponse {
487
532
  accessKey: string;
488
533
  jobs: Job[];
489
534
  timezone?: string;
535
+ audioOutputControl?: AudioOutputControl;
536
+ audioInputControl?: AudioInputControl;
490
537
  }
491
538
 
492
539
  interface ScreenTwinDocument extends TwinDocumentBase {
@@ -530,11 +577,11 @@ interface DeviceTwinDocument extends TwinDocumentBase {
530
577
  }
531
578
 
532
579
  export type TwinDocument =
533
- | ScreenTwinDocument
534
- | EdgeTwinDocument
535
- | CloudTwinDocument
536
- | WebTwinDocument
537
- | DeviceTwinDocument;
580
+ | ScreenTwinDocument
581
+ | EdgeTwinDocument
582
+ | CloudTwinDocument
583
+ | WebTwinDocument
584
+ | DeviceTwinDocument;
538
585
 
539
586
  interface TwinResponseBase {
540
587
  id: string;
@@ -600,19 +647,19 @@ export interface PeripheralTwinResponse extends TwinResponseBase {
600
647
  }
601
648
 
602
649
  export type TwinResponse =
603
- | DeviceTwinResponse
604
- | ScreenTwinResponse
605
- | EdgeTwinResponse
606
- | CloudTwinResponse
607
- | WebTwinResponse
608
- | PeripheralTwinResponse;
650
+ | DeviceTwinResponse
651
+ | ScreenTwinResponse
652
+ | EdgeTwinResponse
653
+ | CloudTwinResponse
654
+ | WebTwinResponse
655
+ | PeripheralTwinResponse;
609
656
 
610
657
  export type TwinDesiredPropertiesResponse =
611
- | DeviceTwinDesiredPropertiesResponse
612
- | ScreenTwinDesiredPropertiesResponse
613
- | EdgeTwinDesiredPropertiesResponse
614
- | CloudTwinDesiredPropertiesResponse
615
- | WebTwinDesiredPropertiesResponse;
658
+ | DeviceTwinDesiredPropertiesResponse
659
+ | ScreenTwinDesiredPropertiesResponse
660
+ | EdgeTwinDesiredPropertiesResponse
661
+ | CloudTwinDesiredPropertiesResponse
662
+ | WebTwinDesiredPropertiesResponse;
616
663
 
617
664
  interface TwinCreateDocumentBase {
618
665
  deviceId: string;
@@ -645,9 +692,9 @@ export interface EdgeTwinCreateDocument extends TwinCreateDocumentBase {
645
692
  }
646
693
 
647
694
  export type TwinCreateDocument =
648
- | DeviceTwinCreateDocument
649
- | ScreenTwinCreateDocument
650
- | EdgeTwinCreateDocument;
695
+ | DeviceTwinCreateDocument
696
+ | ScreenTwinCreateDocument
697
+ | EdgeTwinCreateDocument;
651
698
 
652
699
  export interface TwinsGroupedByDeviceId {
653
700
  _id: string;
@@ -660,9 +707,9 @@ export interface TwinsGroupedByDeviceIdResponse {
660
707
  }
661
708
 
662
709
  export type InstanceTwinReportedProperties =
663
- | EdgeTwinReportedProperties
664
- | DeviceTwinReportedProperties
665
- | ScreenTwinReportedProperties;
710
+ | EdgeTwinReportedProperties
711
+ | DeviceTwinReportedProperties
712
+ | ScreenTwinReportedProperties;
666
713
 
667
714
  export interface DeviceTwinUpdatePayload {
668
715
  spaceId?: string;
@@ -676,6 +723,8 @@ export interface DeviceTwinDesiredPropertiesUpdatePayload {
676
723
  spaceId?: string;
677
724
  env?: string;
678
725
  displayName?: string;
726
+ audioOutputControl?: AudioOutputControl;
727
+ audioInputControl?: AudioInputControl;
679
728
  }
680
729
 
681
730
  export interface ScreenTwinDesiredPropertiesUpdatePayload {
@@ -698,8 +747,8 @@ export interface DeviceTwinUpdateDocument {
698
747
  }
699
748
 
700
749
  export type InstanceTwinDesiredProperties =
701
- | ScreenTwinDesiredPropertiesUpdatePayload
702
- | DeviceTwinDesiredPropertiesUpdatePayload;
750
+ | ScreenTwinDesiredPropertiesUpdatePayload
751
+ | DeviceTwinDesiredPropertiesUpdatePayload;
703
752
 
704
753
  export interface InstanceTwinUpdateDocument {
705
754
  status?: TwinStatusEnum;
@@ -712,7 +761,6 @@ export interface InstanceTwinUpdateDocument {
712
761
 
713
762
  export type TwinUpdateDocument = DeviceTwinUpdateDocument | InstanceTwinUpdateDocument;
714
763
 
715
-
716
764
  export interface DeviceIp {
717
765
  interface: string;
718
766
  ipv4: string;