@unisphere/genie-types 1.13.1 → 1.13.2

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 (35) hide show
  1. package/index.esm.js +80 -2
  2. package/package.json +3 -3
  3. package/src/lib/admin-demo-runtime/runtime-types.d.ts +9 -0
  4. package/src/lib/admin-runtime/runtime-types.d.ts +25 -0
  5. package/src/lib/application-runtime/runtime-types.d.ts +36 -0
  6. package/src/lib/avatar-runtime/agent-visual-types.d.ts +18 -0
  7. package/src/lib/avatar-runtime/avatar-service-types.d.ts +95 -0
  8. package/src/lib/avatar-runtime/chat-visual-types.d.ts +9 -0
  9. package/src/lib/avatar-runtime/contained-visual-types.d.ts +9 -0
  10. package/src/lib/avatar-runtime/index.d.ts +1 -0
  11. package/src/lib/avatar-runtime/lobby-visual-types.d.ts +33 -1
  12. package/src/lib/avatar-runtime/runtime-types.d.ts +69 -3
  13. package/src/lib/chat-runtime/runtime-flavors/runtime-player-plugin-types.d.ts +42 -0
  14. package/src/lib/chat-runtime/runtime-flavors/runtime-types.d.ts +60 -0
  15. package/src/lib/chat-runtime/shared-settings.d.ts +88 -0
  16. package/src/lib/chat-runtime/types.d.ts +1 -0
  17. package/src/lib/chat-runtime/visuals-types.d.ts +66 -0
  18. package/src/lib/flashcards-tool-runtime/runtime-types.d.ts +27 -0
  19. package/src/lib/flashcards-tool-runtime/visuals-types.d.ts +36 -0
  20. package/src/lib/followups-tool-runtime/avatar-visual-types.d.ts +18 -0
  21. package/src/lib/followups-tool-runtime/runtime-types.d.ts +31 -0
  22. package/src/lib/gtc-agenda-list-tool-runtime/genie-answer-visual-types.d.ts +15 -0
  23. package/src/lib/gtc-agenda-list-tool-runtime/runtime-types.d.ts +15 -0
  24. package/src/lib/gtc-agenda-tool-runtime/genie-answer-visual-types.d.ts +11 -0
  25. package/src/lib/gtc-agenda-tool-runtime/runtime-types.d.ts +15 -0
  26. package/src/lib/kaltura-video-player-tool-runtime/genie-answer-visual-types.d.ts +11 -0
  27. package/src/lib/kaltura-video-player-tool-runtime/runtime-types.d.ts +23 -0
  28. package/src/lib/nvidia-2026-event-tool-runtime/runtime-types.d.ts +45 -0
  29. package/src/lib/shared/chat-customizations-types.d.ts +80 -0
  30. package/src/lib/shared/chat-tools-service-types.d.ts +52 -0
  31. package/src/lib/shared/general-visual-types.d.ts +19 -0
  32. package/src/lib/sources-tool-runtime/runtime-types.d.ts +38 -0
  33. package/src/lib/summary-tool-runtime/runtime-types.d.ts +55 -0
  34. package/src/lib/types.d.ts +57 -0
  35. package/src/lib/widget-types.d.ts +1 -0
package/index.esm.js CHANGED
@@ -1,3 +1,4 @@
1
+ /** Widget name constant for all Genie experiences */
1
2
  const widgetName = 'unisphere.widget.genie';
2
3
 
3
4
  const integrationsSchema = {
@@ -215,12 +216,18 @@ const chatRuntimePlayerPluginSettingsSchema = {
215
216
  }
216
217
  };
217
218
 
219
+ /**
220
+ * Answer type options for Genie responses.
221
+ */
218
222
  var AnswerTypeEnum;
219
223
  (function (AnswerTypeEnum) {
220
224
  AnswerTypeEnum["Flashcards"] = "flashcards";
221
225
  AnswerTypeEnum["Markdown"] = "markdown";
222
226
  AnswerTypeEnum["Summary"] = "summarization";
223
227
  })(AnswerTypeEnum || (AnswerTypeEnum = {}));
228
+ /**
229
+ * Answer model performance options.
230
+ */
224
231
  var AnswerModelEnum;
225
232
  (function (AnswerModelEnum) {
226
233
  AnswerModelEnum["Fast"] = "fast";
@@ -448,8 +455,10 @@ const popupVisualSettingsSchema = {
448
455
  }
449
456
  };
450
457
 
458
+ /** Runtime name constant for chat experiences */
451
459
  const ChatRuntimeName = 'chat';
452
460
 
461
+ /** Runtime name constant for flashcards tool */
453
462
  const FlashcardsToolRuntimeName = 'flashcards-tool';
454
463
  const flashcardsToolRuntimeSettingsSchema = {
455
464
  type: 'object',
@@ -596,6 +605,7 @@ const genieAnswerVisualSettingsSchema = {
596
605
  }
597
606
  };
598
607
 
608
+ /** Runtime name constant for followups tool */
599
609
  const FollowupsToolRuntimeName = 'followups-tool';
600
610
  const followupsToolRuntimeSettingsSchema = {
601
611
  type: 'object',
@@ -645,6 +655,7 @@ const followupsToolRuntimeAvatarVisualSettingsSchema = {
645
655
  }
646
656
  };
647
657
 
658
+ /** Runtime name constant for sources tool */
648
659
  const SourcesToolRuntimeName = 'sources-tool';
649
660
  const sourcesToolRuntimeSettingsSchema = {
650
661
  type: 'object',
@@ -660,6 +671,11 @@ const sourcesToolRuntimeGenieAnswerVisualSettingsSchema = {
660
671
  type: 'object',
661
672
  properties: {
662
673
  blockContext: blockVisualContextSchema,
674
+ variant: {
675
+ type: 'enum',
676
+ values: ['default', 'compact'],
677
+ optional: true
678
+ },
663
679
  sources: {
664
680
  type: 'array',
665
681
  optional: true,
@@ -720,6 +736,7 @@ const sourcesToolRuntimeGenieAnswerVisualSettingsSchema = {
720
736
  }
721
737
  };
722
738
 
739
+ /** Runtime name constant for avatar experiences */
723
740
  const AvatarRuntimeName = 'avatar';
724
741
  const avatarRuntimeSettingsSchema = {
725
742
  type: 'object',
@@ -825,29 +842,56 @@ const avatarRuntimeChatVisualSettingsSchema = {
825
842
  }
826
843
  };
827
844
 
845
+ /**
846
+ * Audio device types for avatar connections.
847
+ */
828
848
  var DeviceType;
829
849
  (function (DeviceType) {
850
+ /** Microphone input device */
830
851
  DeviceType["AudioInput"] = "audioinput";
852
+ /** Speaker/headphone output device */
831
853
  DeviceType["AudioOutput"] = "audiooutput";
832
854
  })(DeviceType || (DeviceType = {}));
855
+ /**
856
+ * Avatar connection status states.
857
+ *
858
+ * @deprecated Use AvatarConnectionStatus instead
859
+ */
833
860
  var AvatarStatus;
834
861
  (function (AvatarStatus) {
862
+ /** Establishing connection */
835
863
  AvatarStatus["Connecting"] = "connecting";
864
+ /** Successfully connected */
836
865
  AvatarStatus["Connected"] = "connected";
866
+ /** Not connected */
837
867
  AvatarStatus["Disconnected"] = "disconnected";
868
+ /** Connection error occurred */
838
869
  AvatarStatus["Error"] = "error";
839
870
  })(AvatarStatus || (AvatarStatus = {}));
871
+ /**
872
+ * Avatar connection lifecycle states.
873
+ */
840
874
  var AvatarConnectionStatus;
841
875
  (function (AvatarConnectionStatus) {
876
+ /** Establishing connection */
842
877
  AvatarConnectionStatus["Connecting"] = "connecting";
878
+ /** Successfully connected */
843
879
  AvatarConnectionStatus["Connected"] = "connected";
880
+ /** Not connected */
844
881
  AvatarConnectionStatus["Disconnected"] = "disconnected";
882
+ /** Closing connection */
845
883
  AvatarConnectionStatus["Disconnecting"] = "disconnecting";
884
+ /** Connection error occurred */
846
885
  AvatarConnectionStatus["Error"] = "error";
847
886
  })(AvatarConnectionStatus || (AvatarConnectionStatus = {}));
887
+ /**
888
+ * Reasons why avatar agent may be unavailable.
889
+ */
848
890
  var AgentUnavailabilityReasons;
849
891
  (function (AgentUnavailabilityReasons) {
892
+ /** No agents are currently available */
850
893
  AgentUnavailabilityReasons["NoAgents"] = "NoAgents";
894
+ /** Maximum concurrent connections reached */
851
895
  AgentUnavailabilityReasons["CapacityReached"] = "CapacityReached";
852
896
  })(AgentUnavailabilityReasons || (AgentUnavailabilityReasons = {}));
853
897
  var DisconnectReasons;
@@ -898,7 +942,7 @@ const avatarRuntimeLobbyVisualSettingsSchema = {
898
942
  },
899
943
  variant: {
900
944
  type: 'enum',
901
- values: ['default', 'mini', 'buttonOnly'],
945
+ values: ['default', 'mini', 'buttonOnly', 'agent'],
902
946
  optional: true
903
947
  },
904
948
  isTranslucent: {
@@ -915,6 +959,32 @@ const avatarRuntimeLobbyVisualSettingsSchema = {
915
959
  type: 'primitive',
916
960
  value: 'string',
917
961
  optional: true
962
+ },
963
+ agentButtonLabel: {
964
+ type: 'primitive',
965
+ value: 'string',
966
+ optional: true
967
+ },
968
+ agentSize: {
969
+ type: 'primitive',
970
+ value: 'string',
971
+ optional: true
972
+ }
973
+ }
974
+ };
975
+
976
+ const avatarRuntimeAgentVisualSettingsSchema = {
977
+ type: 'object',
978
+ properties: {
979
+ schemaVersion: {
980
+ type: 'literal',
981
+ value: '1',
982
+ optional: true
983
+ },
984
+ panelSide: {
985
+ type: 'enum',
986
+ values: ['left', 'right'],
987
+ optional: true
918
988
  }
919
989
  }
920
990
  };
@@ -938,12 +1008,14 @@ const adminRuntimeSettingsSchema = {
938
1008
  }
939
1009
  }
940
1010
  };
1011
+ /** Runtime name constant for admin experiences */
941
1012
  const AdminRuntimeName = 'admin';
942
1013
 
943
1014
  const adminDemoRuntimeSettingsSchema = {
944
1015
  type: 'object',
945
1016
  properties: {}
946
1017
  };
1018
+ /** Runtime name constant for admin demo experiences */
947
1019
  const AdminDemoRuntimeName = 'admin-demo';
948
1020
 
949
1021
  const applicationRuntimeSettingsSchema = {
@@ -1019,8 +1091,10 @@ const applicationRuntimeSettingsSchema = {
1019
1091
  }
1020
1092
  }
1021
1093
  };
1094
+ /** Runtime name constant for application-level experiences */
1022
1095
  const ApplicationRuntimeName = 'application';
1023
1096
 
1097
+ /** Runtime name constant for summary tool */
1024
1098
  const SummaryToolRuntimeName = 'summary-tool';
1025
1099
  const summaryToolRuntimeSettingsSchema = {
1026
1100
  type: 'object',
@@ -1067,6 +1141,7 @@ const summaryToolRuntimeGenieAnswerVisualSettingsSchema = {
1067
1141
  }
1068
1142
  };
1069
1143
 
1144
+ /** Runtime name constant for NVIDIA 2026 event tool */
1070
1145
  const Nvidia2026EventToolRuntimeName = 'nvidia-2026-event-tool';
1071
1146
  const nvidia2026EventToolRuntimeSettingsSchema = {
1072
1147
  type: 'object',
@@ -1079,6 +1154,7 @@ const nvidia2026EventToolRuntimeSettingsSchema = {
1079
1154
  }
1080
1155
  };
1081
1156
 
1157
+ /** Runtime name constant for Kaltura video player tool */
1082
1158
  const KalturaVideoPlayerToolRuntimeName = 'kaltura-video-player-tool';
1083
1159
  const kalturaVideoPlayerToolRuntimeSettingsSchema = {
1084
1160
  type: 'object',
@@ -1112,6 +1188,7 @@ const kalturaVideoPlayerToolRuntimeGenieAnswerVisualSettingsSchema = {
1112
1188
  }
1113
1189
  };
1114
1190
 
1191
+ /** Runtime name constant for GTC agenda tool */
1115
1192
  const GtcAgendaToolRuntimeName = 'gtc-agenda-tool';
1116
1193
  const gtcAgendaToolRuntimeSettingsSchema = {
1117
1194
  type: 'object',
@@ -1134,6 +1211,7 @@ const gtcAgendaToolRuntimeGenieAnswerVisualSettingsSchema = {
1134
1211
  }
1135
1212
  };
1136
1213
 
1214
+ /** Runtime name constant for GTC agenda list tool */
1137
1215
  const GtcAgendaListToolRuntimeName = 'gtc-agenda-list-tool';
1138
1216
  const gtcAgendaListToolRuntimeSettingsSchema = {
1139
1217
  type: 'object',
@@ -1169,4 +1247,4 @@ const gtcAgendaListToolRuntimeGenieAnswerVisualSettingsSchema = {
1169
1247
  }
1170
1248
  };
1171
1249
 
1172
- export { AdminDemoRuntimeName, AdminRuntimeName, AgentUnavailabilityReasons, AnswerModelEnum, AnswerTypeEnum, ApplicationRuntimeName, AvatarConnectionStatus, AvatarRuntimeName, AvatarStatus, ChatRuntimeName, DeviceType, DisconnectReasons, FlashcardsToolRuntimeName, FollowupsToolRuntimeName, GtcAgendaListToolRuntimeName, GtcAgendaToolRuntimeName, KalturaVideoPlayerToolRuntimeName, Nvidia2026EventToolRuntimeName, SourcesToolRuntimeName, SummaryToolRuntimeName, adminDemoRuntimeSettingsSchema, adminRuntimeSettingsSchema, applicationRuntimeSettingsSchema, avatarRuntimeChatVisualSettingsSchema, avatarRuntimeContainedVisualSettingsSchema, avatarRuntimeLobbyVisualSettingsSchema, avatarRuntimeSettingsSchema, bannerVisualSettingsSchema, blockVisualContextSchema, chatCustomizationSchema, chatRuntimePlayerPluginSettingsSchema, chatRuntimeSettingsSchema, flashcardsToolRuntimeSettingsSchema, followupsToolRuntimeAvatarVisualSettingsSchema, followupsToolRuntimeGenieAnswerVisualSettingsSchema, followupsToolRuntimeSettingsSchema, genieAnswerVisualSettingsSchema, getSourceUrlSchema, gtcAgendaListToolRuntimeGenieAnswerVisualSettingsSchema, gtcAgendaListToolRuntimeSettingsSchema, gtcAgendaToolRuntimeGenieAnswerVisualSettingsSchema, gtcAgendaToolRuntimeSettingsSchema, integrationsSchema, isAvatarConnectionProxyInternalType, kalturaVideoPlayerToolRuntimeGenieAnswerVisualSettingsSchema, kalturaVideoPlayerToolRuntimeSettingsSchema, nvidia2026EventToolRuntimeSettingsSchema, pageVisualSettingsSchema, popupVisualSettingsSchema, shareUrlSchema, sourcesToolRuntimeGenieAnswerVisualSettingsSchema, sourcesToolRuntimeSettingsSchema, summaryToolRuntimeGenieAnswerVisualSettingsSchema, summaryToolRuntimeSettingsSchema, widgetName };
1250
+ export { AdminDemoRuntimeName, AdminRuntimeName, AgentUnavailabilityReasons, AnswerModelEnum, AnswerTypeEnum, ApplicationRuntimeName, AvatarConnectionStatus, AvatarRuntimeName, AvatarStatus, ChatRuntimeName, DeviceType, DisconnectReasons, FlashcardsToolRuntimeName, FollowupsToolRuntimeName, GtcAgendaListToolRuntimeName, GtcAgendaToolRuntimeName, KalturaVideoPlayerToolRuntimeName, Nvidia2026EventToolRuntimeName, SourcesToolRuntimeName, SummaryToolRuntimeName, adminDemoRuntimeSettingsSchema, adminRuntimeSettingsSchema, applicationRuntimeSettingsSchema, avatarRuntimeAgentVisualSettingsSchema, avatarRuntimeChatVisualSettingsSchema, avatarRuntimeContainedVisualSettingsSchema, avatarRuntimeLobbyVisualSettingsSchema, avatarRuntimeSettingsSchema, bannerVisualSettingsSchema, blockVisualContextSchema, chatCustomizationSchema, chatRuntimePlayerPluginSettingsSchema, chatRuntimeSettingsSchema, flashcardsToolRuntimeSettingsSchema, followupsToolRuntimeAvatarVisualSettingsSchema, followupsToolRuntimeGenieAnswerVisualSettingsSchema, followupsToolRuntimeSettingsSchema, genieAnswerVisualSettingsSchema, getSourceUrlSchema, gtcAgendaListToolRuntimeGenieAnswerVisualSettingsSchema, gtcAgendaListToolRuntimeSettingsSchema, gtcAgendaToolRuntimeGenieAnswerVisualSettingsSchema, gtcAgendaToolRuntimeSettingsSchema, integrationsSchema, isAvatarConnectionProxyInternalType, kalturaVideoPlayerToolRuntimeGenieAnswerVisualSettingsSchema, kalturaVideoPlayerToolRuntimeSettingsSchema, nvidia2026EventToolRuntimeSettingsSchema, pageVisualSettingsSchema, popupVisualSettingsSchema, shareUrlSchema, sourcesToolRuntimeGenieAnswerVisualSettingsSchema, sourcesToolRuntimeSettingsSchema, summaryToolRuntimeGenieAnswerVisualSettingsSchema, summaryToolRuntimeSettingsSchema, widgetName };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/genie-types",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "author": "kaltura",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
@@ -10,8 +10,8 @@
10
10
  "types": "./src/index.d.ts",
11
11
  "dependencies": {
12
12
  "@kaltura-corp/unisphere-rtc-core": "^1.22.1",
13
- "@unisphere/core": "^1.91.1",
14
- "@unisphere/runtime": "^1.90.1"
13
+ "@unisphere/core": "^1.94.1",
14
+ "@unisphere/runtime": "^1.91.0"
15
15
  },
16
16
  "module": "./index.esm.js",
17
17
  "type": "module",
@@ -1,5 +1,14 @@
1
1
  import { ValidatorSchema } from '@unisphere/core';
2
+ /**
3
+ * Configuration settings for the admin demo runtime.
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * const settings: AdminDemoRuntimeSettings = {};
8
+ * ```
9
+ */
2
10
  export interface AdminDemoRuntimeSettings {
3
11
  }
4
12
  export declare const adminDemoRuntimeSettingsSchema: ValidatorSchema;
13
+ /** Runtime name constant for admin demo experiences */
5
14
  export declare const AdminDemoRuntimeName: "admin-demo";
@@ -1,8 +1,33 @@
1
1
  import { ValidatorSchema } from '@unisphere/core';
2
+ /**
3
+ * Configuration settings for the admin runtime.
4
+ *
5
+ * @example
6
+ * Basic admin setup:
7
+ * ```typescript
8
+ * const settings: AdminRuntimeSettings = {
9
+ * ks: 'your-kaltura-session-token'
10
+ * };
11
+ * ```
12
+ *
13
+ * @example
14
+ * With partner configuration:
15
+ * ```typescript
16
+ * const settings: AdminRuntimeSettings = {
17
+ * ks: 'your-kaltura-session-token',
18
+ * partnerId: '12345',
19
+ * uiConfId: '54321'
20
+ * };
21
+ * ```
22
+ */
2
23
  export interface AdminRuntimeSettings {
24
+ /** Kaltura session token for authentication */
3
25
  ks: string;
26
+ /** UI configuration ID */
4
27
  uiConfId?: string;
28
+ /** Kaltura partner ID */
5
29
  partnerId?: string;
6
30
  }
7
31
  export declare const adminRuntimeSettingsSchema: ValidatorSchema;
32
+ /** Runtime name constant for admin experiences */
8
33
  export declare const AdminRuntimeName: "admin";
@@ -1,17 +1,53 @@
1
1
  import { ValidatorSchema } from '@unisphere/core';
2
+ /**
3
+ * Configuration settings for the application runtime.
4
+ *
5
+ * @example
6
+ * Basic application setup:
7
+ * ```typescript
8
+ * const settings: ApplicationRuntimeSettings = {
9
+ * pid: 'partner-12345',
10
+ * ks: 'your-kaltura-session-token',
11
+ * kalturaServerURI: 'https://www.kaltura.com'
12
+ * };
13
+ * ```
14
+ *
15
+ * @example
16
+ * With custom source URL generation:
17
+ * ```typescript
18
+ * const settings: ApplicationRuntimeSettings = {
19
+ * pid: 'partner-12345',
20
+ * ks: 'your-kaltura-session-token',
21
+ * kalturaServerURI: 'https://www.kaltura.com',
22
+ * widgetId: 'widget_abc',
23
+ * genieServerUrl: 'https://genie.example.com',
24
+ * getSourceUrl: ({ entryId, startTime }) =>
25
+ * `https://example.com/media/${entryId}${startTime ? `?t=${startTime}` : ''}`
26
+ * };
27
+ * ```
28
+ */
2
29
  export interface ApplicationRuntimeSettings {
30
+ /** Partner ID in the format `partner-{id}` */
3
31
  pid: string;
32
+ /** Widget identifier */
4
33
  widgetId?: string;
34
+ /** Genie server URL for API requests */
5
35
  genieServerUrl?: string;
36
+ /** Kaltura session token for authentication */
6
37
  ks: string;
38
+ /** Kaltura server URI */
7
39
  kalturaServerURI: string;
40
+ /** Callback function to generate source URLs with entry ID and optional start time */
8
41
  getSourceUrl?: ({ entryId, startTime, }: {
9
42
  entryId: string;
10
43
  startTime?: number;
11
44
  }) => string;
45
+ /** Branding options */
12
46
  branding?: {
47
+ /** Display Kaltura logo in the interface */
13
48
  kalturaLogo?: boolean;
14
49
  };
15
50
  }
16
51
  export declare const applicationRuntimeSettingsSchema: ValidatorSchema;
52
+ /** Runtime name constant for application-level experiences */
17
53
  export declare const ApplicationRuntimeName: "application";
@@ -0,0 +1,18 @@
1
+ import { ValidatorSchema } from '@unisphere/core';
2
+ /**
3
+ * Visual settings for avatar agent display mode.
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * const settings: AvatarRuntimeAgentVisualSettings = {
8
+ * panelSide: 'right'
9
+ * };
10
+ * ```
11
+ */
12
+ export interface AvatarRuntimeAgentVisualSettings {
13
+ /** Settings schema version */
14
+ schemaVersion?: string;
15
+ /** Side of screen where agent panel appears */
16
+ panelSide?: 'left' | 'right';
17
+ }
18
+ export declare const avatarRuntimeAgentVisualSettingsSchema: ValidatorSchema;
@@ -1,30 +1,65 @@
1
1
  import { UnisphereService } from '@unisphere/runtime';
2
2
  import { TinyDataStoreConsumer } from '@unisphere/core';
3
3
  import { DeviceEnumerationResult } from '@kaltura-corp/unisphere-rtc-core';
4
+ /**
5
+ * Avatar service configuration.
6
+ */
4
7
  export type AvatarConfig = {
8
+ /** Avatar server URL */
5
9
  serverUrl: string;
10
+ /** Avatar player URL */
6
11
  playerUrl: string;
7
12
  };
13
+ /**
14
+ * Audio device types for avatar connections.
15
+ */
8
16
  export declare enum DeviceType {
17
+ /** Microphone input device */
9
18
  AudioInput = "audioinput",
19
+ /** Speaker/headphone output device */
10
20
  AudioOutput = "audiooutput"
11
21
  }
22
+ /**
23
+ * Avatar connection status states.
24
+ *
25
+ * @deprecated Use AvatarConnectionStatus instead
26
+ */
12
27
  export declare enum AvatarStatus {
28
+ /** Establishing connection */
13
29
  Connecting = "connecting",
30
+ /** Successfully connected */
14
31
  Connected = "connected",
32
+ /** Not connected */
15
33
  Disconnected = "disconnected",
34
+ /** Connection error occurred */
16
35
  Error = "error"
17
36
  }
37
+ /**
38
+ * Avatar connection lifecycle states.
39
+ */
18
40
  export declare enum AvatarConnectionStatus {
41
+ /** Establishing connection */
19
42
  Connecting = "connecting",
43
+ /** Successfully connected */
20
44
  Connected = "connected",
45
+ /** Not connected */
21
46
  Disconnected = "disconnected",
47
+ /** Closing connection */
22
48
  Disconnecting = "disconnecting",
49
+ /** Connection error occurred */
23
50
  Error = "error"
24
51
  }
52
+ /**
53
+ * Avatar client initialization status.
54
+ */
25
55
  export type AvatarClientStatus = 'loading' | 'ready';
56
+ /**
57
+ * Reasons why avatar agent may be unavailable.
58
+ */
26
59
  export declare enum AgentUnavailabilityReasons {
60
+ /** No agents are currently available */
27
61
  NoAgents = "NoAgents",
62
+ /** Maximum concurrent connections reached */
28
63
  CapacityReached = "CapacityReached"
29
64
  }
30
65
  export type UserDevicesList = Pick<DeviceEnumerationResult, 'availableDevices'> & {
@@ -33,38 +68,78 @@ export type UserDevicesList = Pick<DeviceEnumerationResult, 'availableDevices'>
33
68
  audioOutputDevice: string | null;
34
69
  };
35
70
  };
71
+ /**
72
+ * Simplified WebSocket interface for avatar communication.
73
+ */
36
74
  export interface SimplifiedSocket {
75
+ /** Register event listener */
37
76
  on: (event: string, callback: (data: any) => void) => void;
77
+ /** Remove event listener */
38
78
  off: (event: string) => void;
79
+ /** Emit event with data */
39
80
  emit: (event: string, data: any) => void;
40
81
  }
82
+ /**
83
+ * Agent state and analytics data.
84
+ */
41
85
  export type AgentData = {
86
+ /** Whether the agent is currently speaking */
42
87
  isTalking: boolean;
88
+ /** Number of answers provided in this session */
43
89
  answersCount: number;
90
+ /** Optional analytics tracking information */
44
91
  analyticsInfo?: {
92
+ /** Thread identifier */
45
93
  threadId?: string;
94
+ /** Message identifier */
46
95
  messageId?: string;
47
96
  };
48
97
  };
98
+ /**
99
+ * Content data for avatar tool integrations.
100
+ *
101
+ * Represents tool content displayed within avatar experiences, with different
102
+ * states for loading, ready, and error conditions.
103
+ */
49
104
  export type AvatarContentData = {
105
+ /** Unique content identifier */
50
106
  id: string;
107
+ /** Associated thread ID */
51
108
  threadId?: string;
109
+ /** Associated message ID */
52
110
  messageId?: string;
111
+ /** Optional new title for the content */
53
112
  newTitle?: string;
113
+ /** Content type identifier */
54
114
  type: 'unisphere-tool';
115
+ /** Widget name for the tool */
55
116
  widgetName: string;
117
+ /** Runtime name for the tool */
56
118
  runtimeName: string;
57
119
  } & ({
120
+ /** Content status: loading or ready */
58
121
  status: 'loading' | 'ready';
122
+ /** Tool settings configuration */
59
123
  settings: any;
124
+ /** Optional thread ID */
60
125
  threadId?: string;
61
126
  } | {
127
+ /** Content status: error occurred */
62
128
  status: 'error';
63
129
  });
130
+ /**
131
+ * Internal avatar connection proxy interface for advanced operations.
132
+ *
133
+ * @internal
134
+ */
64
135
  export interface AvatarConnectionProxInternalType {
136
+ /** Send direct event to server */
65
137
  _directEventToServer(message: string, data: any): void;
138
+ /** Set local content state */
66
139
  _setLocalContent(content: any): void;
140
+ /** Handle player errors */
67
141
  onPlayerError(error: Error): void;
142
+ /** WebSocket connection observable */
68
143
  webSocket: TinyDataStoreConsumer<SimplifiedSocket | null>;
69
144
  }
70
145
  export declare enum DisconnectReasons {
@@ -88,27 +163,46 @@ export declare enum DisconnectReasons {
88
163
  ConnectionTimeout = "ConnectionTimeout",
89
164
  PlayerConnectionFailed = "PlayerConnectionFailed"
90
165
  }
166
+ /**
167
+ * Avatar connection proxy for managing avatar session state and interactions.
168
+ *
169
+ * Provides observable properties for connection state and methods for
170
+ * sending messages and managing the avatar connection lifecycle.
171
+ */
91
172
  export interface AvatarConnectionProxyType {
173
+ /** Observable connection status */
92
174
  readonly status: TinyDataStoreConsumer<AvatarConnectionStatus>;
175
+ /** Observable player URL */
93
176
  readonly playerUrl: TinyDataStoreConsumer<string | null>;
177
+ /** Observable session identifier */
94
178
  readonly sessionId: TinyDataStoreConsumer<string | null>;
179
+ /** Observable TURN server URL */
95
180
  readonly turnServerURL: TinyDataStoreConsumer<string | null>;
181
+ /** Observable content data */
96
182
  readonly content: TinyDataStoreConsumer<AvatarContentData | null>;
183
+ /** Observable agent state and analytics */
97
184
  readonly agentData: TinyDataStoreConsumer<AgentData | null>;
185
+ /** Observable available audio devices */
98
186
  readonly devicesList: TinyDataStoreConsumer<{
99
187
  audioInput: MediaDeviceInfo[];
100
188
  audioOutput: MediaDeviceInfo[];
101
189
  } | null>;
190
+ /** Observable disconnect information */
102
191
  readonly disconnectData: TinyDataStoreConsumer<{
103
192
  reason: DisconnectReasons;
104
193
  error?: Error;
105
194
  suppressNotification?: boolean;
106
195
  skipDisconnect?: boolean;
107
196
  } | null>;
197
+ /** Observable thread identifier */
108
198
  readonly threadId: TinyDataStoreConsumer<string | null>;
199
+ /** Unique connection identifier */
109
200
  readonly id: string;
201
+ /** Send text message to avatar */
110
202
  sendAskViaText(text: string): void;
203
+ /** Send custom event to avatar */
111
204
  sendDirectEvent(message: string, data: unknown): void;
205
+ /** Terminate the avatar connection */
112
206
  destroy(): void;
113
207
  }
114
208
  export declare const isAvatarConnectionProxyInternalType: (x: any) => x is AvatarConnectionProxInternalType;
@@ -133,6 +227,7 @@ export interface AvatarServiceType extends UnisphereService {
133
227
  threadId?: string;
134
228
  messageId?: string;
135
229
  }): void;
230
+ disconnect(): void;
136
231
  onPlayerReady(): void;
137
232
  onPlayerError(error: Error): void;
138
233
  getKalturaPlayerParams(): {
@@ -1,5 +1,14 @@
1
1
  import { ValidatorSchema } from '@unisphere/core';
2
+ /**
3
+ * Visual settings for avatar runtime chat display.
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * const settings: AvatarRuntimeChatVisualSettings = {};
8
+ * ```
9
+ */
2
10
  export interface AvatarRuntimeChatVisualSettings {
11
+ /** Settings schema version */
3
12
  schemaVersion?: string;
4
13
  }
5
14
  export declare const avatarRuntimeChatVisualSettingsSchema: ValidatorSchema;
@@ -1,5 +1,14 @@
1
1
  import { ValidatorSchema } from '@unisphere/core';
2
+ /**
3
+ * Visual settings for contained/embedded avatar display mode.
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * const settings: AvatarRuntimeContainedVisualSettings = {};
8
+ * ```
9
+ */
2
10
  export interface AvatarRuntimeContainedVisualSettings {
11
+ /** Settings schema version */
3
12
  schemaVersion?: string;
4
13
  }
5
14
  export declare const avatarRuntimeContainedVisualSettingsSchema: ValidatorSchema;
@@ -3,3 +3,4 @@ export * from './chat-visual-types';
3
3
  export * from './avatar-service-types';
4
4
  export * from './contained-visual-types';
5
5
  export * from './lobby-visual-types';
6
+ export * from './agent-visual-types';
@@ -1,9 +1,41 @@
1
1
  import { ValidatorSchema } from '@unisphere/core';
2
+ /**
3
+ * Visual settings for avatar lobby/waiting room display.
4
+ *
5
+ * @example
6
+ * Default lobby:
7
+ * ```typescript
8
+ * const settings: AvatarRuntimeLobbyVisualSettings = {
9
+ * variant: 'default'
10
+ * };
11
+ * ```
12
+ *
13
+ * @example
14
+ * Agent variant with customization:
15
+ * ```typescript
16
+ * const settings: AvatarRuntimeLobbyVisualSettings = {
17
+ * variant: 'agent',
18
+ * agentButtonLabel: 'Start Conversation',
19
+ * agentSize: '20rem',
20
+ * isTranslucent: true,
21
+ * threadId: 'thread-123'
22
+ * };
23
+ * ```
24
+ */
2
25
  export interface AvatarRuntimeLobbyVisualSettings {
26
+ /** Settings schema version */
3
27
  schemaVersion?: string;
4
- variant?: 'default' | 'mini' | 'buttonOnly';
28
+ /** Display variant: 'default' for full lobby, 'mini' for compact, 'buttonOnly' for minimal, 'agent' for agent-specific UI */
29
+ variant?: 'default' | 'mini' | 'buttonOnly' | 'agent';
30
+ /** Enable translucent/semi-transparent UI elements */
5
31
  isTranslucent?: boolean;
32
+ /** Thread identifier for resuming conversations */
6
33
  threadId?: string;
34
+ /** Message identifier for context */
7
35
  messageId?: string;
36
+ /** Agent variant only: label for the start button */
37
+ agentButtonLabel?: string;
38
+ /** Agent variant only: size (width and height) of the card, e.g. '15rem' */
39
+ agentSize?: string;
8
40
  }
9
41
  export declare const avatarRuntimeLobbyVisualSettingsSchema: ValidatorSchema;