@skippr/live-agent-sdk 0.115.0 → 0.117.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 +1665 -562
- package/dist/skippr-sdk.css +1 -1
- package/dist/skippr-sdk.js +119 -119
- package/dist/types/context/LiveAgentContext.d.ts +2 -0
- package/dist/types/hooks/useChromeCopy.d.ts +2 -0
- package/dist/types/hooks/usePhaseLabels.d.ts +14 -0
- package/dist/types/hooks/usePhaseUpdates.d.ts +6 -0
- package/dist/types/hooks/useSession.d.ts +2 -0
- package/dist/types/hooks/useSessionHistory.d.ts +2 -1
- package/dist/types/lib/chromeCopy.d.ts +137 -0
- package/dist/types/lib/localeCopy.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { LauncherDropTarget } from '../hooks/useLauncherDrag';
|
|
2
|
+
import type { PhaseLabels } from '../hooks/usePhaseLabels';
|
|
2
3
|
import type { PhaseStatus } from '../hooks/usePhaseUpdates';
|
|
3
4
|
import type { SplashMedia } from '../hooks/useSplashMedia';
|
|
4
5
|
import type { AgentMode } from '../lib/agentMode';
|
|
@@ -197,6 +198,7 @@ export interface LiveAgentContextValue extends LiveAgentPublicValue {
|
|
|
197
198
|
idleHistory: IdleSessionHistory;
|
|
198
199
|
phasesSnapshot: unknown[];
|
|
199
200
|
setPhasesSnapshot: (phases: unknown[]) => void;
|
|
201
|
+
phaseLabels: PhaseLabels;
|
|
200
202
|
hasResolvedModules: boolean;
|
|
201
203
|
appearance: WidgetAppearance | null;
|
|
202
204
|
adoptionGoals: AdoptionGoalMatch[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type TranslatedLocale } from '../lib/localeCopy';
|
|
2
|
+
import type { PhaseStatus } from './usePhaseUpdates';
|
|
3
|
+
export interface PhaseLabelRead {
|
|
4
|
+
agentId: string | null;
|
|
5
|
+
agentName?: string;
|
|
6
|
+
nameTranslations?: Partial<Record<TranslatedLocale, string>>;
|
|
7
|
+
phases: PhaseStatus[];
|
|
8
|
+
}
|
|
9
|
+
export interface PhaseLabels {
|
|
10
|
+
agentId: string | null;
|
|
11
|
+
agentName?: string | undefined;
|
|
12
|
+
byPhaseName: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
export declare function usePhaseLabels(session: PhaseLabelRead | null, { agentId: idleAgentId, phases: idlePhases }: PhaseLabelRead, locale: string | undefined): PhaseLabels;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import type { TranslatedLocale } from '../lib/localeCopy';
|
|
1
2
|
export interface PhaseStatus {
|
|
2
3
|
name: string;
|
|
4
|
+
displayName?: string;
|
|
5
|
+
translations?: Partial<Record<TranslatedLocale, {
|
|
6
|
+
name?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}>>;
|
|
3
9
|
description: string;
|
|
4
10
|
highlights: string[];
|
|
5
11
|
status: 'pending' | 'active' | 'completed';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentControls, CaptureMode, UserContext } from '../context/LiveAgentContext';
|
|
2
2
|
import type { Message } from '../types';
|
|
3
|
+
import type { PhaseLabelRead } from './usePhaseLabels';
|
|
3
4
|
export type AuthedFetch = (input: string, init?: RequestInit) => Promise<Response>;
|
|
4
5
|
interface LiveKitConnection {
|
|
5
6
|
livekitUrl: string;
|
|
@@ -40,6 +41,7 @@ export declare function useSession({ captureMode, locale, authToken, appKey, get
|
|
|
40
41
|
isPaused: boolean;
|
|
41
42
|
isPausing: boolean;
|
|
42
43
|
pauseTimeoutSeconds: number | null;
|
|
44
|
+
sessionAgenda: PhaseLabelRead | null;
|
|
43
45
|
historyMessages: Message[];
|
|
44
46
|
pendingScreenStream: MediaStream | null;
|
|
45
47
|
armScreenStream: (stream: MediaStream | null) => void;
|
|
@@ -10,6 +10,7 @@ interface UseSessionHistoryParams {
|
|
|
10
10
|
agentId: string | undefined;
|
|
11
11
|
enabled: boolean;
|
|
12
12
|
authedFetch: AuthedFetch;
|
|
13
|
+
locale: string | undefined;
|
|
13
14
|
}
|
|
14
|
-
export declare function useSessionHistory({ agentId, enabled, authedFetch, }: UseSessionHistoryParams): SessionHistory;
|
|
15
|
+
export declare function useSessionHistory({ agentId, enabled, authedFetch, locale, }: UseSessionHistoryParams): SessionHistory;
|
|
15
16
|
export {};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
export interface ChromeCopy {
|
|
2
|
+
agendaTitle: string;
|
|
3
|
+
agendaLoading: string;
|
|
4
|
+
agendaProgress: string;
|
|
5
|
+
agendaProgressLabel: string;
|
|
6
|
+
agendaNowBadge: string;
|
|
7
|
+
micHoldToTalk: string;
|
|
8
|
+
micReleaseToSend: string;
|
|
9
|
+
micTapToTalk: string;
|
|
10
|
+
micTapToSend: string;
|
|
11
|
+
micShortcutHint: string;
|
|
12
|
+
voiceBarThinking: string;
|
|
13
|
+
voiceBarTalking: string;
|
|
14
|
+
voiceBarListening: string;
|
|
15
|
+
voiceBarPushToTalk: string;
|
|
16
|
+
voiceBarTapToTalk: string;
|
|
17
|
+
voiceBarWorking: string;
|
|
18
|
+
voiceBarNoActivity: string;
|
|
19
|
+
voiceBarLoading: string;
|
|
20
|
+
voiceBarShortcutTalk: string;
|
|
21
|
+
voiceBarShortcutEnd: string;
|
|
22
|
+
voiceBarTalkToAgent: string;
|
|
23
|
+
openChatLabel: string;
|
|
24
|
+
closeChatLabel: string;
|
|
25
|
+
openAgentLabel: string;
|
|
26
|
+
showNotificationsLabel: string;
|
|
27
|
+
askLabel: string;
|
|
28
|
+
wakeLabel: string;
|
|
29
|
+
dismissLabel: string;
|
|
30
|
+
loading: string;
|
|
31
|
+
endingSession: string;
|
|
32
|
+
loadingConversation: string;
|
|
33
|
+
statusStandingBy: string;
|
|
34
|
+
statusObserving: string;
|
|
35
|
+
statusConnected: string;
|
|
36
|
+
statusTalking: string;
|
|
37
|
+
statusThinking: string;
|
|
38
|
+
statusPaused: string;
|
|
39
|
+
statusAriaStandingBy: string;
|
|
40
|
+
statusAriaPaused: string;
|
|
41
|
+
statusAriaClickToOpenChat: string;
|
|
42
|
+
closeLabel: string;
|
|
43
|
+
muteLabel: string;
|
|
44
|
+
unmuteLabel: string;
|
|
45
|
+
resumeLabel: string;
|
|
46
|
+
stopLabel: string;
|
|
47
|
+
pauseLabel: string;
|
|
48
|
+
endSessionLabel: string;
|
|
49
|
+
shareScreenLabel: string;
|
|
50
|
+
stopSharingScreenLabel: string;
|
|
51
|
+
stopActionsLabel: string;
|
|
52
|
+
chatMessagePlaceholder: string;
|
|
53
|
+
chatMessageLabel: string;
|
|
54
|
+
chatSendMessageLabel: string;
|
|
55
|
+
chatSendLabel: string;
|
|
56
|
+
chatEmptyConversation: string;
|
|
57
|
+
chatWaitingToBegin: string;
|
|
58
|
+
chatJumpToLatest: string;
|
|
59
|
+
chatSwitchToVoice: string;
|
|
60
|
+
chatSwitchToText: string;
|
|
61
|
+
chatToggleVoice: string;
|
|
62
|
+
chatToggleText: string;
|
|
63
|
+
chatPanelLabel: string;
|
|
64
|
+
chatAnalyzingScreen: string;
|
|
65
|
+
cardDismissLink: string;
|
|
66
|
+
cardCopyLink: string;
|
|
67
|
+
cardCopied: string;
|
|
68
|
+
cardDismissPlan: string;
|
|
69
|
+
cardDismissSignIn: string;
|
|
70
|
+
controlBarIdle: string;
|
|
71
|
+
controlBarListening: string;
|
|
72
|
+
controlBarThinking: string;
|
|
73
|
+
controlBarTalking: string;
|
|
74
|
+
controlBarWorking: string;
|
|
75
|
+
controlBarStandingBy: string;
|
|
76
|
+
controlBarAriaActing: string;
|
|
77
|
+
controlBarAriaIdle: string;
|
|
78
|
+
controlBarAriaListening: string;
|
|
79
|
+
controlBarAriaThinking: string;
|
|
80
|
+
controlBarAriaTalking: string;
|
|
81
|
+
controlBarAriaState: string;
|
|
82
|
+
controlBarOpenAgenda: string;
|
|
83
|
+
controlBarClosePanel: string;
|
|
84
|
+
pausedClosingIn: string;
|
|
85
|
+
pausedClosingInAria: string;
|
|
86
|
+
loginTitle: string;
|
|
87
|
+
loginSubtitle: string;
|
|
88
|
+
loginEmailLabel: string;
|
|
89
|
+
loginEmailPlaceholder: string;
|
|
90
|
+
loginContinue: string;
|
|
91
|
+
loginOtpTitle: string;
|
|
92
|
+
loginOtpSubtitle: string;
|
|
93
|
+
loginOtpDigitLabel: string;
|
|
94
|
+
loginVerify: string;
|
|
95
|
+
loginChangeEmail: string;
|
|
96
|
+
loginResendCode: string;
|
|
97
|
+
loginResendCooldown: string;
|
|
98
|
+
loginConsent: string;
|
|
99
|
+
actionClicking: string;
|
|
100
|
+
actionTyping: string;
|
|
101
|
+
actionSelecting: string;
|
|
102
|
+
actionScrolling: string;
|
|
103
|
+
actionHovering: string;
|
|
104
|
+
highlightDefaultLabel: string;
|
|
105
|
+
planTitle: string;
|
|
106
|
+
planApprove: string;
|
|
107
|
+
planApproving: string;
|
|
108
|
+
planCancel: string;
|
|
109
|
+
voiceBarPlanIntro: string;
|
|
110
|
+
voiceBarPlanStepsHint: string;
|
|
111
|
+
voiceBarPlanApprove: string;
|
|
112
|
+
voiceBarPlanApproving: string;
|
|
113
|
+
voiceBarPlanCancel: string;
|
|
114
|
+
voiceBarPlanApproved: string;
|
|
115
|
+
cardOpenLink: string;
|
|
116
|
+
voiceBarCardOpen: string;
|
|
117
|
+
voiceBarCardCopy: string;
|
|
118
|
+
voiceBarCardCopied: string;
|
|
119
|
+
chatTabChat: string;
|
|
120
|
+
chatTabAgenda: string;
|
|
121
|
+
chatPanelTitle: string;
|
|
122
|
+
voiceBarSignInTitle: string;
|
|
123
|
+
voiceBarTextMode: string;
|
|
124
|
+
sessionEndingSoon: string;
|
|
125
|
+
controlBarTranscriptListening: string;
|
|
126
|
+
tipStartLabel: string;
|
|
127
|
+
tipNextLabel: string;
|
|
128
|
+
voiceBarTipStart: string;
|
|
129
|
+
buddyWakeGreeting: string;
|
|
130
|
+
buddyHoldHint: string;
|
|
131
|
+
buddyAutoOffNotice: string;
|
|
132
|
+
attributionPrefix: string;
|
|
133
|
+
consentSessionStart: string;
|
|
134
|
+
consentContinuing: string;
|
|
135
|
+
consentAgentSessionStart: string;
|
|
136
|
+
}
|
|
137
|
+
export declare const resolveChromeCopy: (tag: string | undefined) => ChromeCopy;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type TranslatedLocale = 'fr' | 'de' | 'it' | 'es' | 'pt-PT' | 'pt-BR';
|
|
2
|
+
export declare function matchTranslatedLocale(tag: string | undefined): TranslatedLocale | undefined;
|
|
3
|
+
export declare function createLocaleCopyResolver<T>(defaults: T, translations: Record<TranslatedLocale, T>): (tag: string | undefined) => T;
|
|
4
|
+
export declare function fillPlaceholders(template: string, values: Record<string, string | number>): string;
|
|
5
|
+
export declare function splitOnPlaceholder(template: string, name: string): [string, string];
|