@unisphere/genie-types 1.32.1 → 1.33.1-hotfix.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/index.esm.js CHANGED
@@ -3384,6 +3384,11 @@ const blockVisualContextSchema = {
3384
3384
  type: 'primitive',
3385
3385
  value: 'number',
3386
3386
  optional: true
3387
+ },
3388
+ avatarSessionId: {
3389
+ type: 'primitive',
3390
+ value: 'string',
3391
+ optional: true
3387
3392
  }
3388
3393
  }
3389
3394
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/genie-types",
3
- "version": "1.32.1",
3
+ "version": "1.33.1-hotfix.0",
4
4
  "author": "kaltura",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
@@ -2,6 +2,7 @@ import { TinyDataStoreConsumer } from '@unisphere/core';
2
2
  import { DeviceEnumerationResult } from '@kaltura-sdk/rtc-core';
3
3
  import type { ChatEntry } from './chat-types';
4
4
  import { ChatContext } from '../chat-runtime';
5
+ import type { Captions } from './runtime-types';
5
6
  /**
6
7
  * Audio device types for avatar connections.
7
8
  */
@@ -202,6 +203,8 @@ export declare enum DisconnectReasons {
202
203
  PlayerConnectionFailed = "PlayerConnectionFailed"
203
204
  }
204
205
  /**
206
+ * @deprecated Use `AvatarClientManager` instead. This interface will be removed in future versions.
207
+ *
205
208
  * Avatar connection proxy for managing avatar session state and interactions.
206
209
  *
207
210
  * Provides observable properties for connection state and methods for
@@ -280,3 +283,140 @@ export interface AvatarConnectionProxyType {
280
283
  setCaptionFilter(filter: ((text: string) => string) | null): void;
281
284
  }
282
285
  export declare const isAvatarConnectionProxyInternalType: (x: any) => x is AvatarConnectionProxInternalType;
286
+ /**
287
+ * Public surface of `AvatarClientManager` (from `@local/genie-avatar-client-react`).
288
+ * Import this instead of the concrete class when a consumer only needs to
289
+ * read state or call the public API — e.g. UI components, other packages.
290
+ * Supersedes the deprecated `AvatarConnectionProxyType`/
291
+ * `AvatarConnectionProxInternalType` facade above.
292
+ */
293
+ export interface AvatarClientManagerType {
294
+ /**
295
+ * @deprecated Use this interface's own getters/methods directly
296
+ * (`connectionStatus`, `pause`/`resume`, `tapToTalkStart`/`tapToTalkEnd`,
297
+ * etc). Kept only for existing consumers that still read through
298
+ * `.connection` — remove once they're migrated off it.
299
+ */
300
+ readonly connection: TinyDataStoreConsumer<(AvatarConnectionProxyType & AvatarConnectionProxInternalType) | null>;
301
+ /** Observable connection status */
302
+ readonly connectionStatus: TinyDataStoreConsumer<AvatarConnectionStatus>;
303
+ /** Observable player URL */
304
+ readonly playerUrl: TinyDataStoreConsumer<string | null>;
305
+ /** Observable session identifier */
306
+ readonly sessionId: TinyDataStoreConsumer<string | null>;
307
+ /** Observable cast mode from server */
308
+ readonly castMode: TinyDataStoreConsumer<string | null>;
309
+ /** Observable TURN server URL */
310
+ readonly turnServerURL: TinyDataStoreConsumer<string | null>;
311
+ /** Observable disconnect information */
312
+ readonly disconnectData: TinyDataStoreConsumer<{
313
+ reason: DisconnectReasons;
314
+ error?: Error;
315
+ suppressNotification?: boolean;
316
+ skipDisconnect?: boolean;
317
+ } | null>;
318
+ /** Observable agent state and analytics */
319
+ readonly agentData: TinyDataStoreConsumer<AgentData>;
320
+ /** Establish a connection */
321
+ connect(options?: {
322
+ context?: {
323
+ type: 'thread';
324
+ threadId: string;
325
+ messageId?: string;
326
+ };
327
+ dynamicVariables?: Record<string, unknown>;
328
+ }): void;
329
+ /** Tear down the current connection */
330
+ disconnect(): void;
331
+ /** Reconnect using the last `connect()` options */
332
+ reconnect(): void;
333
+ /** Observable paused state */
334
+ readonly isPaused: TinyDataStoreConsumer<boolean>;
335
+ /** Pause the avatar immediately */
336
+ pause(): void;
337
+ /** Resume the avatar */
338
+ resume(): void;
339
+ /** Pause the avatar once it finishes the current speech */
340
+ pauseAfterSpeaking(): void;
341
+ /** Observable content data */
342
+ readonly content: TinyDataStoreConsumer<AvatarContentData | null>;
343
+ /** Observable chat log entries */
344
+ readonly chatLog: TinyDataStoreConsumer<ChatEntry[]>;
345
+ /** Send text message to avatar */
346
+ askViaText(text: string): void;
347
+ /** Request the backend reprocess a turn that produced no avatar response */
348
+ sendAgentTurnRecoveryRequest(speechId: string, messageId: string): void;
349
+ /** Clear current visual content */
350
+ clearContent(): void;
351
+ /** Set current visual content directly */
352
+ setLocalContent(content: AvatarContentData | null): void;
353
+ /** Observable screen share info state */
354
+ readonly screenShareInfo: TinyDataStoreConsumer<AgentScreenShareInfo | null>;
355
+ /** Start screen sharing */
356
+ startScreenShare(): void;
357
+ /** Stop screen sharing */
358
+ stopScreenShare(): void;
359
+ /** Observable tap-to-talk mode state */
360
+ readonly tapToTalkInfo: TinyDataStoreConsumer<AgentTapToTalkInfo | null>;
361
+ /** Start a tap-to-talk recording */
362
+ tapToTalkStart(): void;
363
+ /** End the current tap-to-talk recording */
364
+ tapToTalkEnd(): void;
365
+ /** Enable/disable tap-to-talk mode */
366
+ toggleTapToTalkMode(enabled: boolean): void;
367
+ /** Caption state + controls */
368
+ readonly captions: Captions;
369
+ /** Toggle caption visibility on/off (no effect when feature is disabled) */
370
+ toggleCaptions(): void;
371
+ /** Update word replacements for the caption filter at runtime */
372
+ setCaptionReplacements(replacements: Record<string, string> | null): void;
373
+ /** Set or clear a custom post-processing filter for captions */
374
+ setCaptionFilter(filter: ((text: string) => string) | null): void;
375
+ /** Observable agent Kaltura context data */
376
+ readonly kalturaContext: TinyDataStoreConsumer<AgentKalturaContextData | null>;
377
+ /** Activate/deactivate Kaltura context */
378
+ toggleKalturaContext(active: boolean): void;
379
+ /** Update dynamic variables sent to the agent */
380
+ updateDynamicVariables(data: Record<string, unknown>): void;
381
+ /** Register client-side tool handlers */
382
+ registerClientTools(config: Record<string, unknown>): void;
383
+ /** Unregister client-side tool handlers by name */
384
+ unregisterClientTools(...names: string[]): void;
385
+ /** Observable persistent thread identifier */
386
+ readonly threadId: TinyDataStoreConsumer<string | null>;
387
+ /** Set the thread identifier used for the next `connect()` */
388
+ setExternalThreadId(id: string | null): void;
389
+ /** Observable preview mode flag */
390
+ readonly isPreviewMode: TinyDataStoreConsumer<boolean>;
391
+ setIsPreviewMode(value: boolean): void;
392
+ /** Observable feature flags from runtime settings */
393
+ readonly features: TinyDataStoreConsumer<{
394
+ screenShare?: boolean;
395
+ chat?: boolean;
396
+ captions?: boolean | CaptionConfig;
397
+ kickOffPhrase?: string;
398
+ dynamicVariables?: Record<string, unknown>;
399
+ } | undefined>;
400
+ /** Observable preview loading video URL */
401
+ readonly agentPreviewUrl: TinyDataStoreConsumer<string | null>;
402
+ /** Observable preview image URL */
403
+ readonly agentPreviewImageUrl: TinyDataStoreConsumer<string | null>;
404
+ /** Observable server URL for the current connection */
405
+ readonly serverUrl: TinyDataStoreConsumer<string | null>;
406
+ /** Observable local audio mute/speaking state */
407
+ readonly audioState: TinyDataStoreConsumer<{
408
+ muted: boolean;
409
+ isSpeaking: boolean;
410
+ }>;
411
+ /** Observable local audio volume level */
412
+ readonly audioVolumeLevel: TinyDataStoreConsumer<number>;
413
+ /** Observable available audio devices */
414
+ readonly devicesList: TinyDataStoreConsumer<UserDevicesList | null>;
415
+ joinSTV(videoContainerId: string, sessionId: string, stvUrl: string, onConnected: () => void): Promise<void>;
416
+ leaveSTV(): void;
417
+ changeDevice(deviceType: DeviceType, deviceId: string): Promise<boolean>;
418
+ toggleMuteAudio(muted: boolean): Promise<void>;
419
+ onPlayerReady(): void;
420
+ onPlayerError(error: Error): void;
421
+ stop(): void;
422
+ }
@@ -26,6 +26,8 @@ export interface BlockVisualContext {
26
26
  groupIndex?: number;
27
27
  /** Custom UI styling and behavior options */
28
28
  customization?: ChatCustomization;
29
+ /** Optional session identifier for the avatar */
30
+ avatarSessionId?: string;
29
31
  }
30
32
  export declare const blockVisualContextSchema: ValidatorSchema;
31
33
  export {};