@skippr/live-agent-sdk 0.89.0 → 0.90.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 -0
- package/dist/esm/lib-exports.js +757 -492
- package/dist/skippr-sdk.css +1 -1
- package/dist/skippr-sdk.js +142 -142
- package/dist/types/components/LinkCard.d.ts +7 -0
- package/dist/types/components/LiveAgent.d.ts +2 -1
- package/dist/types/components/MessageList.d.ts +3 -1
- package/dist/types/components/VoiceBarLinkCard.d.ts +7 -0
- package/dist/types/context/LiveAgentContext.d.ts +1 -0
- package/dist/types/hooks/useLinkCard.d.ts +7 -0
- package/dist/types/hooks/useSession.d.ts +3 -2
- package/dist/types/lib/clipboard.d.ts +1 -0
- package/dist/types/lib/constants.d.ts +1 -0
- package/dist/types/lib-exports.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type AgentControls } from '../context/LiveAgentContext';
|
|
2
|
+
import { type AgentControls, type UserContext } from '../context/LiveAgentContext';
|
|
3
3
|
import { CAPTURE_MODE } from '../lib/constants';
|
|
4
4
|
import { type VerticalAlign } from '../lib/launcher';
|
|
5
5
|
interface LiveAgentBaseProps {
|
|
@@ -8,6 +8,7 @@ interface LiveAgentBaseProps {
|
|
|
8
8
|
appKey?: string | undefined;
|
|
9
9
|
getUserToken?: (() => Promise<string>) | undefined;
|
|
10
10
|
userToken?: string | undefined;
|
|
11
|
+
userContext?: UserContext | undefined;
|
|
11
12
|
verticalAlign?: VerticalAlign | undefined;
|
|
12
13
|
variant?: 'floating' | 'sidebar' | undefined;
|
|
13
14
|
minimizable?: boolean | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LinkCardData } from '../hooks/useLinkCard';
|
|
1
2
|
import { type PlanCardData } from '../hooks/usePlanUpdates';
|
|
2
3
|
import type { Message } from '../types';
|
|
3
4
|
interface MessageListProps {
|
|
@@ -6,8 +7,9 @@ interface MessageListProps {
|
|
|
6
7
|
sendChatMessage?: (message: string) => Promise<unknown>;
|
|
7
8
|
isSendingChat?: boolean;
|
|
8
9
|
plan?: PlanCardData | null;
|
|
10
|
+
linkCard?: LinkCardData | null;
|
|
9
11
|
autoFocus?: boolean;
|
|
10
12
|
readOnly?: boolean;
|
|
11
13
|
}
|
|
12
|
-
export declare function MessageList({ messages, isStreaming, sendChatMessage, isSendingChat, plan, autoFocus, readOnly, }: MessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function MessageList({ messages, isStreaming, sendChatMessage, isSendingChat, plan, linkCard, autoFocus, readOnly, }: MessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LinkCardData } from '../hooks/useLinkCard';
|
|
2
|
+
interface VoiceBarLinkCardProps {
|
|
3
|
+
card: LinkCardData;
|
|
4
|
+
onDismiss: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function VoiceBarLinkCard({ card, onDismiss }: VoiceBarLinkCardProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentControls, CaptureMode } from '../context/LiveAgentContext';
|
|
1
|
+
import type { AgentControls, CaptureMode, UserContext } from '../context/LiveAgentContext';
|
|
2
2
|
import type { Message } from '../types';
|
|
3
3
|
export type AuthedFetch = (input: string, init?: RequestInit) => Promise<Response>;
|
|
4
4
|
interface LiveKitConnection {
|
|
@@ -11,6 +11,7 @@ interface UseSessionParams {
|
|
|
11
11
|
appKey?: string | undefined;
|
|
12
12
|
getUserToken?: (() => Promise<string>) | undefined;
|
|
13
13
|
userToken?: string | undefined;
|
|
14
|
+
userContext?: UserContext | undefined;
|
|
14
15
|
onStart?: () => void;
|
|
15
16
|
onStartError?: () => void;
|
|
16
17
|
onDisconnect?: () => void;
|
|
@@ -22,7 +23,7 @@ export interface StartSessionOptions {
|
|
|
22
23
|
adoptionGoalId?: string | undefined;
|
|
23
24
|
autoStarted?: boolean | undefined;
|
|
24
25
|
}
|
|
25
|
-
export declare function useSession({ captureMode, authToken, appKey, getUserToken, userToken, onStart, onStartError, onDisconnect, }: UseSessionParams): {
|
|
26
|
+
export declare function useSession({ captureMode, authToken, appKey, getUserToken, userToken, userContext, onStart, onStartError, onDisconnect, }: UseSessionParams): {
|
|
26
27
|
connection: LiveKitConnection | null;
|
|
27
28
|
shouldConnect: boolean;
|
|
28
29
|
isStarting: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function copyToClipboard(text: string): Promise<boolean>;
|
|
@@ -92,4 +92,5 @@ export declare const NOTIFICATION_KIND: {
|
|
|
92
92
|
};
|
|
93
93
|
export type NotificationKind = (typeof NOTIFICATION_KIND)[keyof typeof NOTIFICATION_KIND];
|
|
94
94
|
export declare const PLAN_ATTR = "skippr.action-plan";
|
|
95
|
+
export declare const LINK_CARD_ATTR = "skippr.link-card";
|
|
95
96
|
export declare const NAME_MAX_CHARS = 80;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './components/LiveAgent';
|
|
2
|
-
export type { Module } from './context/LiveAgentContext';
|
|
2
|
+
export type { Module, UserContext } from './context/LiveAgentContext';
|
|
3
3
|
export * from './hooks/useAgentVoiceState';
|
|
4
4
|
export * from './hooks/useElapsedSeconds';
|
|
5
5
|
export * from './hooks/useIsLocalSpeaking';
|