@skippr/live-agent-sdk 0.101.0 → 0.103.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/dist/esm/lib-exports.js +142 -97
- package/dist/skippr-sdk.css +1 -1
- package/dist/skippr-sdk.js +107 -107
- package/dist/types/components/ConsentBubble.d.ts +2 -1
- package/dist/types/components/ConsentNotice.d.ts +3 -2
- package/dist/types/context/LiveAgentContext.d.ts +14 -2
- package/dist/types/lib/constants.d.ts +5 -0
- package/dist/types/lib/session.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
interface ConsentBubbleProps {
|
|
2
2
|
className?: string;
|
|
3
3
|
style?: React.CSSProperties;
|
|
4
|
+
leadIn: string;
|
|
4
5
|
onPointerEnter?: React.PointerEventHandler<HTMLDivElement>;
|
|
5
6
|
onPointerLeave?: React.PointerEventHandler<HTMLDivElement>;
|
|
6
7
|
}
|
|
7
|
-
export declare function ConsentBubble({ className, style, onPointerEnter, onPointerLeave, }: ConsentBubbleProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function ConsentBubble({ className, style, leadIn, onPointerEnter, onPointerLeave, }: ConsentBubbleProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
interface ConsentNoticeProps {
|
|
2
2
|
className?: string;
|
|
3
|
-
|
|
3
|
+
leadIn: string;
|
|
4
|
+
determiner?: string;
|
|
4
5
|
}
|
|
5
|
-
export declare function ConsentNotice({ className,
|
|
6
|
+
export declare function ConsentNotice({ className, leadIn, determiner }: ConsentNoticeProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LauncherDropTarget } from '../hooks/useLauncherDrag';
|
|
2
2
|
import type { PhaseStatus } from '../hooks/usePhaseUpdates';
|
|
3
3
|
import type { AgentMode } from '../lib/agentMode';
|
|
4
|
-
import { type ActionPlanMode, type BuddyShape, CAPTURE_MODE, type CaptureMode, type ChatSurface, DEFAULT_CAPTURE_MODE, type LauncherMode, MIC_MODE, type MicMode } from '../lib/constants';
|
|
4
|
+
import { type ActionPlanMode, type BuddyShape, CAPTURE_MODE, type CaptureMode, type ChatSurface, DEFAULT_CAPTURE_MODE, type LauncherMode, MIC_MODE, type MicMode, type PENDING_START_KIND } from '../lib/constants';
|
|
5
5
|
import type { SessionStatus } from '../lib/sessionStatus';
|
|
6
6
|
import type { BarPos } from '../lib/voiceBar';
|
|
7
7
|
import type { Message } from '../types';
|
|
@@ -80,9 +80,17 @@ export interface AdoptionGoalMatch {
|
|
|
80
80
|
hashPattern: string | null;
|
|
81
81
|
priority: number;
|
|
82
82
|
}
|
|
83
|
+
export type PendingStart = {
|
|
84
|
+
kind: typeof PENDING_START_KIND.Goal;
|
|
85
|
+
goal: AdoptionGoalMatch;
|
|
86
|
+
} | {
|
|
87
|
+
kind: typeof PENDING_START_KIND.Module;
|
|
88
|
+
moduleId: string;
|
|
89
|
+
};
|
|
83
90
|
export interface LiveAgentPublicValue {
|
|
84
91
|
isConnected: boolean;
|
|
85
92
|
isStarting: boolean;
|
|
93
|
+
isExchanging: boolean;
|
|
86
94
|
isDisconnecting: boolean;
|
|
87
95
|
isPausing: boolean;
|
|
88
96
|
error: string;
|
|
@@ -110,6 +118,7 @@ export interface LiveAgentPublicValue {
|
|
|
110
118
|
isMinimized: boolean;
|
|
111
119
|
expandPanel: () => void;
|
|
112
120
|
minimizePanel: () => void;
|
|
121
|
+
revealBar: () => void;
|
|
113
122
|
isAuthenticated: boolean;
|
|
114
123
|
isValidating: boolean;
|
|
115
124
|
authError: string;
|
|
@@ -129,12 +138,15 @@ export interface LiveAgentPublicValue {
|
|
|
129
138
|
isLoadingModules: boolean;
|
|
130
139
|
modulesError: string | null;
|
|
131
140
|
refetchModules: () => Promise<void>;
|
|
132
|
-
selectModule: (id: string) => void
|
|
141
|
+
selectModule: (id: string) => Promise<void>;
|
|
133
142
|
textMode: boolean;
|
|
134
143
|
}
|
|
135
144
|
export interface LiveAgentContextValue extends LiveAgentPublicValue {
|
|
136
145
|
defaultAgentId: string | null;
|
|
137
146
|
startDefaultSession: () => void;
|
|
147
|
+
startPrimarySession: () => void;
|
|
148
|
+
pendingStart: PendingStart | null;
|
|
149
|
+
previewStart: (pending: PendingStart) => void;
|
|
138
150
|
buddyActive: boolean;
|
|
139
151
|
buddyShape: BuddyShape;
|
|
140
152
|
pauseTimeoutSeconds: number | null;
|
|
@@ -98,6 +98,11 @@ export declare const NOTIFICATION_KIND: {
|
|
|
98
98
|
readonly Module: "module";
|
|
99
99
|
};
|
|
100
100
|
export type NotificationKind = (typeof NOTIFICATION_KIND)[keyof typeof NOTIFICATION_KIND];
|
|
101
|
+
export declare const PENDING_START_KIND: {
|
|
102
|
+
readonly Goal: "goal";
|
|
103
|
+
readonly Module: "module";
|
|
104
|
+
};
|
|
105
|
+
export type PendingStartKind = (typeof PENDING_START_KIND)[keyof typeof PENDING_START_KIND];
|
|
101
106
|
export declare const PLAN_ATTR = "skippr.action-plan";
|
|
102
107
|
export declare const LINK_CARD_ATTR = "skippr.link-card";
|
|
103
108
|
export declare const NAME_MAX_CHARS = 80;
|
|
@@ -7,6 +7,14 @@ export interface ApiSessionMessage {
|
|
|
7
7
|
createdAt: string;
|
|
8
8
|
}
|
|
9
9
|
export declare function mapApiMessages(messages: ApiSessionMessage[]): Message[];
|
|
10
|
+
export interface SessionLifecycleFlags {
|
|
11
|
+
isConnected: boolean;
|
|
12
|
+
isStarting: boolean;
|
|
13
|
+
isPausing: boolean;
|
|
14
|
+
isDisconnecting: boolean;
|
|
15
|
+
isExchanging: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function hasLiveSession(flags: SessionLifecycleFlags): boolean;
|
|
10
18
|
export declare function getResumableSessionId(currentSession: ModuleCurrentSession | null | undefined, mode: AgentMode | null): string | undefined;
|
|
11
19
|
export declare function canResumeSession(currentSession: ModuleCurrentSession | null | undefined, mode: AgentMode | null): boolean;
|
|
12
20
|
export declare function getResumableSession(module: Module | null | undefined): ResumableSession | null;
|