@unisphere/genie-types 1.13.0 → 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.
- package/index.esm.js +80 -25
- package/package.json +3 -3
- package/src/lib/admin-demo-runtime/runtime-types.d.ts +9 -0
- package/src/lib/admin-runtime/runtime-types.d.ts +25 -0
- package/src/lib/application-runtime/runtime-types.d.ts +36 -0
- package/src/lib/avatar-runtime/agent-visual-types.d.ts +18 -0
- package/src/lib/avatar-runtime/avatar-service-types.d.ts +95 -0
- package/src/lib/avatar-runtime/chat-visual-types.d.ts +9 -0
- package/src/lib/avatar-runtime/contained-visual-types.d.ts +9 -0
- package/src/lib/avatar-runtime/index.d.ts +1 -0
- package/src/lib/avatar-runtime/lobby-visual-types.d.ts +33 -1
- package/src/lib/avatar-runtime/runtime-types.d.ts +69 -3
- package/src/lib/chat-runtime/runtime-flavors/runtime-player-plugin-types.d.ts +42 -0
- package/src/lib/chat-runtime/runtime-flavors/runtime-types.d.ts +60 -0
- package/src/lib/chat-runtime/shared-settings.d.ts +88 -0
- package/src/lib/chat-runtime/types.d.ts +1 -0
- package/src/lib/chat-runtime/visuals-types.d.ts +66 -0
- package/src/lib/flashcards-tool-runtime/runtime-types.d.ts +27 -0
- package/src/lib/flashcards-tool-runtime/visuals-types.d.ts +36 -0
- package/src/lib/followups-tool-runtime/avatar-visual-types.d.ts +18 -0
- package/src/lib/followups-tool-runtime/runtime-types.d.ts +31 -0
- package/src/lib/gtc-agenda-list-tool-runtime/genie-answer-visual-types.d.ts +15 -0
- package/src/lib/gtc-agenda-list-tool-runtime/runtime-types.d.ts +15 -0
- package/src/lib/gtc-agenda-tool-runtime/genie-answer-visual-types.d.ts +11 -0
- package/src/lib/gtc-agenda-tool-runtime/runtime-types.d.ts +15 -0
- package/src/lib/kaltura-video-player-tool-runtime/genie-answer-visual-types.d.ts +11 -0
- package/src/lib/kaltura-video-player-tool-runtime/runtime-types.d.ts +23 -0
- package/src/lib/nvidia-2026-event-tool-runtime/runtime-types.d.ts +45 -0
- package/src/lib/shared/chat-customizations-types.d.ts +80 -0
- package/src/lib/shared/chat-tools-service-types.d.ts +52 -0
- package/src/lib/shared/general-visual-types.d.ts +19 -0
- package/src/lib/sources-tool-runtime/runtime-types.d.ts +38 -0
- package/src/lib/summary-tool-runtime/runtime-types.d.ts +55 -0
- package/src/lib/types.d.ts +57 -0
- package/src/lib/widget-types.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -1,31 +1,9 @@
|
|
|
1
|
+
/** Widget name constant for all Genie experiences */
|
|
1
2
|
const widgetName = 'unisphere.widget.genie';
|
|
2
3
|
|
|
3
4
|
const integrationsSchema = {
|
|
4
5
|
type: 'object',
|
|
5
6
|
properties: {
|
|
6
|
-
marketo: {
|
|
7
|
-
type: 'object',
|
|
8
|
-
properties: {
|
|
9
|
-
type: {
|
|
10
|
-
type: 'primitive',
|
|
11
|
-
value: 'string'
|
|
12
|
-
},
|
|
13
|
-
quota: {
|
|
14
|
-
type: 'primitive',
|
|
15
|
-
value: 'number'
|
|
16
|
-
},
|
|
17
|
-
formId: {
|
|
18
|
-
type: 'primitive',
|
|
19
|
-
value: 'string'
|
|
20
|
-
},
|
|
21
|
-
blocker: {
|
|
22
|
-
type: 'primitive',
|
|
23
|
-
value: 'boolean'
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
deprecationMessage: 'Marketo integration is no longer supported and this field will be ignored if provided',
|
|
27
|
-
optional: true
|
|
28
|
-
},
|
|
29
7
|
avatar: {
|
|
30
8
|
type: 'orByType',
|
|
31
9
|
schemas: {
|
|
@@ -238,12 +216,18 @@ const chatRuntimePlayerPluginSettingsSchema = {
|
|
|
238
216
|
}
|
|
239
217
|
};
|
|
240
218
|
|
|
219
|
+
/**
|
|
220
|
+
* Answer type options for Genie responses.
|
|
221
|
+
*/
|
|
241
222
|
var AnswerTypeEnum;
|
|
242
223
|
(function (AnswerTypeEnum) {
|
|
243
224
|
AnswerTypeEnum["Flashcards"] = "flashcards";
|
|
244
225
|
AnswerTypeEnum["Markdown"] = "markdown";
|
|
245
226
|
AnswerTypeEnum["Summary"] = "summarization";
|
|
246
227
|
})(AnswerTypeEnum || (AnswerTypeEnum = {}));
|
|
228
|
+
/**
|
|
229
|
+
* Answer model performance options.
|
|
230
|
+
*/
|
|
247
231
|
var AnswerModelEnum;
|
|
248
232
|
(function (AnswerModelEnum) {
|
|
249
233
|
AnswerModelEnum["Fast"] = "fast";
|
|
@@ -471,8 +455,10 @@ const popupVisualSettingsSchema = {
|
|
|
471
455
|
}
|
|
472
456
|
};
|
|
473
457
|
|
|
458
|
+
/** Runtime name constant for chat experiences */
|
|
474
459
|
const ChatRuntimeName = 'chat';
|
|
475
460
|
|
|
461
|
+
/** Runtime name constant for flashcards tool */
|
|
476
462
|
const FlashcardsToolRuntimeName = 'flashcards-tool';
|
|
477
463
|
const flashcardsToolRuntimeSettingsSchema = {
|
|
478
464
|
type: 'object',
|
|
@@ -619,6 +605,7 @@ const genieAnswerVisualSettingsSchema = {
|
|
|
619
605
|
}
|
|
620
606
|
};
|
|
621
607
|
|
|
608
|
+
/** Runtime name constant for followups tool */
|
|
622
609
|
const FollowupsToolRuntimeName = 'followups-tool';
|
|
623
610
|
const followupsToolRuntimeSettingsSchema = {
|
|
624
611
|
type: 'object',
|
|
@@ -668,6 +655,7 @@ const followupsToolRuntimeAvatarVisualSettingsSchema = {
|
|
|
668
655
|
}
|
|
669
656
|
};
|
|
670
657
|
|
|
658
|
+
/** Runtime name constant for sources tool */
|
|
671
659
|
const SourcesToolRuntimeName = 'sources-tool';
|
|
672
660
|
const sourcesToolRuntimeSettingsSchema = {
|
|
673
661
|
type: 'object',
|
|
@@ -683,6 +671,11 @@ const sourcesToolRuntimeGenieAnswerVisualSettingsSchema = {
|
|
|
683
671
|
type: 'object',
|
|
684
672
|
properties: {
|
|
685
673
|
blockContext: blockVisualContextSchema,
|
|
674
|
+
variant: {
|
|
675
|
+
type: 'enum',
|
|
676
|
+
values: ['default', 'compact'],
|
|
677
|
+
optional: true
|
|
678
|
+
},
|
|
686
679
|
sources: {
|
|
687
680
|
type: 'array',
|
|
688
681
|
optional: true,
|
|
@@ -743,6 +736,7 @@ const sourcesToolRuntimeGenieAnswerVisualSettingsSchema = {
|
|
|
743
736
|
}
|
|
744
737
|
};
|
|
745
738
|
|
|
739
|
+
/** Runtime name constant for avatar experiences */
|
|
746
740
|
const AvatarRuntimeName = 'avatar';
|
|
747
741
|
const avatarRuntimeSettingsSchema = {
|
|
748
742
|
type: 'object',
|
|
@@ -848,29 +842,56 @@ const avatarRuntimeChatVisualSettingsSchema = {
|
|
|
848
842
|
}
|
|
849
843
|
};
|
|
850
844
|
|
|
845
|
+
/**
|
|
846
|
+
* Audio device types for avatar connections.
|
|
847
|
+
*/
|
|
851
848
|
var DeviceType;
|
|
852
849
|
(function (DeviceType) {
|
|
850
|
+
/** Microphone input device */
|
|
853
851
|
DeviceType["AudioInput"] = "audioinput";
|
|
852
|
+
/** Speaker/headphone output device */
|
|
854
853
|
DeviceType["AudioOutput"] = "audiooutput";
|
|
855
854
|
})(DeviceType || (DeviceType = {}));
|
|
855
|
+
/**
|
|
856
|
+
* Avatar connection status states.
|
|
857
|
+
*
|
|
858
|
+
* @deprecated Use AvatarConnectionStatus instead
|
|
859
|
+
*/
|
|
856
860
|
var AvatarStatus;
|
|
857
861
|
(function (AvatarStatus) {
|
|
862
|
+
/** Establishing connection */
|
|
858
863
|
AvatarStatus["Connecting"] = "connecting";
|
|
864
|
+
/** Successfully connected */
|
|
859
865
|
AvatarStatus["Connected"] = "connected";
|
|
866
|
+
/** Not connected */
|
|
860
867
|
AvatarStatus["Disconnected"] = "disconnected";
|
|
868
|
+
/** Connection error occurred */
|
|
861
869
|
AvatarStatus["Error"] = "error";
|
|
862
870
|
})(AvatarStatus || (AvatarStatus = {}));
|
|
871
|
+
/**
|
|
872
|
+
* Avatar connection lifecycle states.
|
|
873
|
+
*/
|
|
863
874
|
var AvatarConnectionStatus;
|
|
864
875
|
(function (AvatarConnectionStatus) {
|
|
876
|
+
/** Establishing connection */
|
|
865
877
|
AvatarConnectionStatus["Connecting"] = "connecting";
|
|
878
|
+
/** Successfully connected */
|
|
866
879
|
AvatarConnectionStatus["Connected"] = "connected";
|
|
880
|
+
/** Not connected */
|
|
867
881
|
AvatarConnectionStatus["Disconnected"] = "disconnected";
|
|
882
|
+
/** Closing connection */
|
|
868
883
|
AvatarConnectionStatus["Disconnecting"] = "disconnecting";
|
|
884
|
+
/** Connection error occurred */
|
|
869
885
|
AvatarConnectionStatus["Error"] = "error";
|
|
870
886
|
})(AvatarConnectionStatus || (AvatarConnectionStatus = {}));
|
|
887
|
+
/**
|
|
888
|
+
* Reasons why avatar agent may be unavailable.
|
|
889
|
+
*/
|
|
871
890
|
var AgentUnavailabilityReasons;
|
|
872
891
|
(function (AgentUnavailabilityReasons) {
|
|
892
|
+
/** No agents are currently available */
|
|
873
893
|
AgentUnavailabilityReasons["NoAgents"] = "NoAgents";
|
|
894
|
+
/** Maximum concurrent connections reached */
|
|
874
895
|
AgentUnavailabilityReasons["CapacityReached"] = "CapacityReached";
|
|
875
896
|
})(AgentUnavailabilityReasons || (AgentUnavailabilityReasons = {}));
|
|
876
897
|
var DisconnectReasons;
|
|
@@ -921,7 +942,7 @@ const avatarRuntimeLobbyVisualSettingsSchema = {
|
|
|
921
942
|
},
|
|
922
943
|
variant: {
|
|
923
944
|
type: 'enum',
|
|
924
|
-
values: ['default', 'mini', 'buttonOnly'],
|
|
945
|
+
values: ['default', 'mini', 'buttonOnly', 'agent'],
|
|
925
946
|
optional: true
|
|
926
947
|
},
|
|
927
948
|
isTranslucent: {
|
|
@@ -938,6 +959,32 @@ const avatarRuntimeLobbyVisualSettingsSchema = {
|
|
|
938
959
|
type: 'primitive',
|
|
939
960
|
value: 'string',
|
|
940
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
|
|
941
988
|
}
|
|
942
989
|
}
|
|
943
990
|
};
|
|
@@ -961,12 +1008,14 @@ const adminRuntimeSettingsSchema = {
|
|
|
961
1008
|
}
|
|
962
1009
|
}
|
|
963
1010
|
};
|
|
1011
|
+
/** Runtime name constant for admin experiences */
|
|
964
1012
|
const AdminRuntimeName = 'admin';
|
|
965
1013
|
|
|
966
1014
|
const adminDemoRuntimeSettingsSchema = {
|
|
967
1015
|
type: 'object',
|
|
968
1016
|
properties: {}
|
|
969
1017
|
};
|
|
1018
|
+
/** Runtime name constant for admin demo experiences */
|
|
970
1019
|
const AdminDemoRuntimeName = 'admin-demo';
|
|
971
1020
|
|
|
972
1021
|
const applicationRuntimeSettingsSchema = {
|
|
@@ -1042,8 +1091,10 @@ const applicationRuntimeSettingsSchema = {
|
|
|
1042
1091
|
}
|
|
1043
1092
|
}
|
|
1044
1093
|
};
|
|
1094
|
+
/** Runtime name constant for application-level experiences */
|
|
1045
1095
|
const ApplicationRuntimeName = 'application';
|
|
1046
1096
|
|
|
1097
|
+
/** Runtime name constant for summary tool */
|
|
1047
1098
|
const SummaryToolRuntimeName = 'summary-tool';
|
|
1048
1099
|
const summaryToolRuntimeSettingsSchema = {
|
|
1049
1100
|
type: 'object',
|
|
@@ -1090,6 +1141,7 @@ const summaryToolRuntimeGenieAnswerVisualSettingsSchema = {
|
|
|
1090
1141
|
}
|
|
1091
1142
|
};
|
|
1092
1143
|
|
|
1144
|
+
/** Runtime name constant for NVIDIA 2026 event tool */
|
|
1093
1145
|
const Nvidia2026EventToolRuntimeName = 'nvidia-2026-event-tool';
|
|
1094
1146
|
const nvidia2026EventToolRuntimeSettingsSchema = {
|
|
1095
1147
|
type: 'object',
|
|
@@ -1102,6 +1154,7 @@ const nvidia2026EventToolRuntimeSettingsSchema = {
|
|
|
1102
1154
|
}
|
|
1103
1155
|
};
|
|
1104
1156
|
|
|
1157
|
+
/** Runtime name constant for Kaltura video player tool */
|
|
1105
1158
|
const KalturaVideoPlayerToolRuntimeName = 'kaltura-video-player-tool';
|
|
1106
1159
|
const kalturaVideoPlayerToolRuntimeSettingsSchema = {
|
|
1107
1160
|
type: 'object',
|
|
@@ -1135,6 +1188,7 @@ const kalturaVideoPlayerToolRuntimeGenieAnswerVisualSettingsSchema = {
|
|
|
1135
1188
|
}
|
|
1136
1189
|
};
|
|
1137
1190
|
|
|
1191
|
+
/** Runtime name constant for GTC agenda tool */
|
|
1138
1192
|
const GtcAgendaToolRuntimeName = 'gtc-agenda-tool';
|
|
1139
1193
|
const gtcAgendaToolRuntimeSettingsSchema = {
|
|
1140
1194
|
type: 'object',
|
|
@@ -1157,6 +1211,7 @@ const gtcAgendaToolRuntimeGenieAnswerVisualSettingsSchema = {
|
|
|
1157
1211
|
}
|
|
1158
1212
|
};
|
|
1159
1213
|
|
|
1214
|
+
/** Runtime name constant for GTC agenda list tool */
|
|
1160
1215
|
const GtcAgendaListToolRuntimeName = 'gtc-agenda-list-tool';
|
|
1161
1216
|
const gtcAgendaListToolRuntimeSettingsSchema = {
|
|
1162
1217
|
type: 'object',
|
|
@@ -1192,4 +1247,4 @@ const gtcAgendaListToolRuntimeGenieAnswerVisualSettingsSchema = {
|
|
|
1192
1247
|
}
|
|
1193
1248
|
};
|
|
1194
1249
|
|
|
1195
|
-
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.
|
|
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.
|
|
14
|
-
"@unisphere/runtime": "^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;
|
|
@@ -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
|
|
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;
|