@unisphere/genie-types 1.13.1 → 1.14.0
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/README.md +1 -175
- package/index.esm.js +644 -5
- package/package.json +4 -4
- package/src/index.d.ts +3 -0
- 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 +100 -3
- 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 +35 -1
- package/src/lib/avatar-runtime/runtime-types.d.ts +71 -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/content-gallery-tool-runtime/avatar-visual-types.d.ts +32 -0
- package/src/lib/content-gallery-tool-runtime/index.d.ts +2 -0
- package/src/lib/content-gallery-tool-runtime/runtime-types.d.ts +20 -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/gen-ui-components-tool-runtime/card-visual-types.d.ts +39 -0
- package/src/lib/gen-ui-components-tool-runtime/index.d.ts +4 -0
- package/src/lib/gen-ui-components-tool-runtime/markdown-visual-types.d.ts +7 -0
- package/src/lib/gen-ui-components-tool-runtime/player-visual-types.d.ts +25 -0
- package/src/lib/gen-ui-components-tool-runtime/runtime-types.d.ts +13 -0
- package/src/lib/gen-ui-composer-tool-runtime/avatar-visual-types.d.ts +49 -0
- package/src/lib/gen-ui-composer-tool-runtime/index.d.ts +2 -0
- package/src/lib/gen-ui-composer-tool-runtime/runtime-types.d.ts +13 -0
- package/src/lib/gtc-agenda-list-tool-runtime/genie-answer-visual-types.d.ts +17 -2
- 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 +13 -2
- 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 +13 -2
- 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 +83 -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 +66 -1
- package/src/lib/widget-types.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unisphere/genie-types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"author": "kaltura",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"repository": {
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
},
|
|
10
10
|
"types": "./src/index.d.ts",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@kaltura-
|
|
13
|
-
"@unisphere/core": "^1.
|
|
14
|
-
"@unisphere/runtime": "^1.
|
|
12
|
+
"@kaltura-sdk/rtc-core": "^1.25.2",
|
|
13
|
+
"@unisphere/core": "^1.94.1",
|
|
14
|
+
"@unisphere/runtime": "^1.91.0"
|
|
15
15
|
},
|
|
16
16
|
"module": "./index.esm.js",
|
|
17
17
|
"type": "module",
|
package/src/index.d.ts
CHANGED
|
@@ -14,3 +14,6 @@ export * from './lib/nvidia-2026-event-tool-runtime';
|
|
|
14
14
|
export * from './lib/kaltura-video-player-tool-runtime';
|
|
15
15
|
export * from './lib/gtc-agenda-tool-runtime';
|
|
16
16
|
export * from './lib/gtc-agenda-list-tool-runtime';
|
|
17
|
+
export * from './lib/gen-ui-composer-tool-runtime';
|
|
18
|
+
export * from './lib/gen-ui-components-tool-runtime';
|
|
19
|
+
export * from './lib/content-gallery-tool-runtime';
|
|
@@ -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
|
-
import { DeviceEnumerationResult } from '@kaltura-
|
|
3
|
+
import { DeviceEnumerationResult } from '@kaltura-sdk/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
|
};
|
|
49
|
-
|
|
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
|
+
*/
|
|
104
|
+
export type AvatarContentData<TSettings = any> = {
|
|
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';
|
|
59
|
-
settings
|
|
122
|
+
/** Tool settings configuration */
|
|
123
|
+
settings: TSettings;
|
|
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(): {
|
|
@@ -144,4 +239,6 @@ export interface AvatarServiceType extends UnisphereService {
|
|
|
144
239
|
askViaText(text: string): void;
|
|
145
240
|
changeDevice(deviceType: DeviceType, deviceId: string): Promise<boolean>;
|
|
146
241
|
toggleMuteAudio(muted: boolean): Promise<void>;
|
|
242
|
+
joinSTV(containerId: string, sessionId: string, stvUrl: string, onConnected: () => void): Promise<void>;
|
|
243
|
+
leaveSTV(): void;
|
|
147
244
|
}
|
|
@@ -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,43 @@
|
|
|
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;
|
|
40
|
+
/** Hide the start conversation button (e.g. when interaction limit is exceeded) */
|
|
41
|
+
hideStartButton?: boolean;
|
|
8
42
|
}
|
|
9
43
|
export declare const avatarRuntimeLobbyVisualSettingsSchema: ValidatorSchema;
|
|
@@ -1,34 +1,102 @@
|
|
|
1
1
|
import { TinyDataStoreConsumer, ValidatorSchema } from '@unisphere/core';
|
|
2
2
|
import { UnisphereRuntimeBaseType } from '@unisphere/runtime';
|
|
3
3
|
import { widgetName } from '../widget-types';
|
|
4
|
+
/** Runtime name constant for avatar experiences */
|
|
4
5
|
export declare const AvatarRuntimeName: "avatar";
|
|
6
|
+
/**
|
|
7
|
+
* Avatar runtime interface for interactive AI avatar experiences.
|
|
8
|
+
*
|
|
9
|
+
* Provides real-time avatar capabilities including video streaming, connection management,
|
|
10
|
+
* and thread-based conversations.
|
|
11
|
+
*/
|
|
5
12
|
export type AvatarRuntime = UnisphereRuntimeBaseType<AvatarRuntimeSettings> & {
|
|
6
13
|
readonly widgetName: typeof widgetName;
|
|
7
14
|
readonly runtimeName: typeof AvatarRuntimeName;
|
|
15
|
+
/** Establish connection to the avatar service */
|
|
8
16
|
connect(): void;
|
|
17
|
+
/** Disconnect from the avatar service */
|
|
9
18
|
disconnect(): void;
|
|
19
|
+
/** Observable connection status */
|
|
10
20
|
isConnected: TinyDataStoreConsumer<boolean>;
|
|
21
|
+
/** Observable current thread ID */
|
|
11
22
|
threadId: TinyDataStoreConsumer<string | null>;
|
|
23
|
+
/** Set the active conversation thread ID */
|
|
12
24
|
setThreadId(id: string | null): void;
|
|
13
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Configuration settings for the avatar runtime.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* Basic avatar setup (required settings only):
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const settings: AvatarRuntimeSettings = {
|
|
33
|
+
* turnServerUrl: 'https://turn.example.com',
|
|
34
|
+
* serverUrl: 'https://avatar.example.com',
|
|
35
|
+
* srsBaseUrl: 'https://srs.example.com',
|
|
36
|
+
* kaltura: {
|
|
37
|
+
* ks: 'your-kaltura-session-token'
|
|
38
|
+
* }
|
|
39
|
+
* };
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* Advanced avatar with custom configuration:
|
|
44
|
+
* ```typescript
|
|
45
|
+
* const settings: AvatarRuntimeSettings = {
|
|
46
|
+
* turnServerUrl: 'https://turn.example.com',
|
|
47
|
+
* serverUrl: 'https://avatar.example.com',
|
|
48
|
+
* srsBaseUrl: 'https://srs.example.com',
|
|
49
|
+
* clientId: 'client-123',
|
|
50
|
+
* roomId: 'room-456',
|
|
51
|
+
* avatarId: 'avatar-789',
|
|
52
|
+
* agentMode: true,
|
|
53
|
+
* noiseReductionEnabled: true,
|
|
54
|
+
* kaltura: {
|
|
55
|
+
* ks: 'your-kaltura-session-token',
|
|
56
|
+
* partnerId: '12345',
|
|
57
|
+
* entryId: 'entry_xyz'
|
|
58
|
+
* }
|
|
59
|
+
* };
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
14
62
|
export interface AvatarRuntimeSettings {
|
|
63
|
+
/** Settings schema version */
|
|
15
64
|
schemaVersion?: string;
|
|
65
|
+
/** TURN server URL for WebRTC connectivity */
|
|
16
66
|
turnServerUrl: string;
|
|
67
|
+
/** Avatar service server URL */
|
|
17
68
|
serverUrl: string;
|
|
69
|
+
/** SRS (Simple Realtime Server) base URL for media streaming */
|
|
18
70
|
srsBaseUrl: string;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
71
|
+
/** Client identifier for tracking and analytics */
|
|
72
|
+
clientId?: string;
|
|
73
|
+
/** Room identifier for multi-user sessions */
|
|
74
|
+
roomId?: string;
|
|
75
|
+
/** Flow identifier for conversation routing */
|
|
76
|
+
flowId?: string;
|
|
77
|
+
/** URL for loading state video displayed during avatar initialization */
|
|
22
78
|
loadingVideoURL?: string;
|
|
79
|
+
/** Unique identifier for the avatar persona */
|
|
23
80
|
avatarId?: string;
|
|
81
|
+
/** Preview image URL displayed before avatar loads */
|
|
24
82
|
previewImageUrl?: string;
|
|
83
|
+
/** Enable agent mode for advanced AI capabilities */
|
|
25
84
|
agentMode?: boolean;
|
|
85
|
+
/** Enable audio noise reduction for clearer audio */
|
|
26
86
|
noiseReductionEnabled?: boolean;
|
|
87
|
+
/** STV cast mode for avatar streaming ('webrtc' | 'rtmp') */
|
|
88
|
+
castMode?: string;
|
|
89
|
+
/** Kaltura service integration settings */
|
|
27
90
|
kaltura: {
|
|
91
|
+
/** Kaltura session token for authentication */
|
|
28
92
|
ks: string;
|
|
93
|
+
/** Media entry ID for context */
|
|
29
94
|
entryId?: string;
|
|
95
|
+
/** Kaltura server URI */
|
|
30
96
|
kalturaServerURI?: string;
|
|
97
|
+
/** Kaltura partner ID */
|
|
31
98
|
partnerId?: string;
|
|
99
|
+
/** UI configuration ID */
|
|
32
100
|
uiConfId?: string;
|
|
33
101
|
};
|
|
34
102
|
}
|
|
@@ -3,19 +3,61 @@ import { ValidatorSchema } from '@unisphere/core';
|
|
|
3
3
|
import { widgetName } from '../../widget-types';
|
|
4
4
|
import { ChatRuntimeName } from '../types';
|
|
5
5
|
import { GlobalChatSettings } from '../shared-settings';
|
|
6
|
+
/**
|
|
7
|
+
* Chat runtime interface for player plugin integration.
|
|
8
|
+
*
|
|
9
|
+
* Specialized runtime flavor for embedding chat within Kaltura video players.
|
|
10
|
+
*/
|
|
6
11
|
export interface ChatRuntimePlayerPlugin extends UnisphereRuntimeBaseType<ChatRuntimePlayerPluginSettings> {
|
|
7
12
|
readonly widgetName: typeof widgetName;
|
|
8
13
|
readonly runtimeName: typeof ChatRuntimeName;
|
|
9
14
|
readonly flavor: 'player-plugin';
|
|
10
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Configuration settings for chat runtime player plugin.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* Basic player plugin setup:
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const settings: ChatRuntimePlayerPluginSettings = {
|
|
23
|
+
* entryId: 'video_123',
|
|
24
|
+
* ks: 'your-kaltura-session-token'
|
|
25
|
+
* };
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* With integrations:
|
|
30
|
+
* ```typescript
|
|
31
|
+
* const settings: ChatRuntimePlayerPluginSettings = {
|
|
32
|
+
* entryId: 'video_123',
|
|
33
|
+
* ks: 'your-kaltura-session-token',
|
|
34
|
+
* partnerId: '12345',
|
|
35
|
+
* agentMode: true,
|
|
36
|
+
* avatarContainerMode: 'dialog',
|
|
37
|
+
* integrations: {
|
|
38
|
+
* kaltura: {
|
|
39
|
+
* entryId: 'video_123'
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
* };
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
11
45
|
export interface ChatRuntimePlayerPluginSettings {
|
|
46
|
+
/** Media entry ID for the video being played */
|
|
12
47
|
entryId: string;
|
|
48
|
+
/** Kaltura session token for authentication */
|
|
13
49
|
ks: string;
|
|
50
|
+
/** Kaltura partner ID */
|
|
14
51
|
partnerId?: string;
|
|
52
|
+
/** Settings schema version */
|
|
15
53
|
schemaVersion?: '1';
|
|
54
|
+
/** External service integrations */
|
|
16
55
|
integrations?: GlobalChatSettings['integrations'];
|
|
56
|
+
/** Configuration for conversation sharing */
|
|
17
57
|
shareUrl?: GlobalChatSettings['shareUrl'];
|
|
58
|
+
/** Enable agent mode for advanced AI capabilities */
|
|
18
59
|
agentMode?: boolean;
|
|
60
|
+
/** Avatar display mode: 'dialog' for modal or 'contained' for embedded */
|
|
19
61
|
avatarContainerMode?: 'dialog' | 'contained';
|
|
20
62
|
}
|
|
21
63
|
export declare const chatRuntimePlayerPluginSettingsSchema: ValidatorSchema;
|