@skippr/live-agent-sdk 0.44.0 → 0.45.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.
@@ -0,0 +1,8 @@
1
+ import type { AdoptionGoalMatch } from '../context/LiveAgentContext';
2
+ interface AdoptionBubbleProps {
3
+ goal: AdoptionGoalMatch;
4
+ onAttend: (goal: AdoptionGoalMatch) => void;
5
+ onDismiss: (goalId: string) => void;
6
+ }
7
+ export declare function AdoptionBubble({ goal, onAttend, onDismiss }: AdoptionBubbleProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -26,6 +26,16 @@ export interface ResumableSession {
26
26
  id: string;
27
27
  agentId: string;
28
28
  }
29
+ export declare enum AdoptionGoalStatus {
30
+ Attended = "attended",
31
+ Dismissed = "dismissed"
32
+ }
33
+ export interface AdoptionGoalMatch {
34
+ goalId: string;
35
+ agentId: string;
36
+ displayMessage: string;
37
+ priority: number;
38
+ }
29
39
  export interface LiveAgentPublicValue {
30
40
  isConnected: boolean;
31
41
  isStarting: boolean;
@@ -87,5 +97,8 @@ export interface LiveAgentContextValue extends LiveAgentPublicValue {
87
97
  historyMessages: Message[];
88
98
  phasesSnapshot: unknown[];
89
99
  setPhasesSnapshot: (phases: unknown[]) => void;
100
+ adoptionGoals: AdoptionGoalMatch[];
101
+ dismissAdoptionGoal: (goalId: string) => void;
102
+ startAdoptionSession: (goal: AdoptionGoalMatch) => void;
90
103
  }
91
104
  export declare const LiveAgentContext: import("react").Context<LiveAgentContextValue | null>;
@@ -0,0 +1,14 @@
1
+ import { type AdoptionGoalMatch } from '../context/LiveAgentContext';
2
+ import type { AuthedFetch } from './useSession';
3
+ interface UseAdoptionGoalsParams {
4
+ enabled: boolean;
5
+ bearerToken: string | null;
6
+ authedFetch: AuthedFetch;
7
+ }
8
+ interface UseAdoptionGoalsResult {
9
+ goals: AdoptionGoalMatch[];
10
+ dismissGoal: (goalId: string) => void;
11
+ attendGoal: (goalId: string) => void;
12
+ }
13
+ export declare function useAdoptionGoals({ enabled, bearerToken, authedFetch, }: UseAdoptionGoalsParams): UseAdoptionGoalsResult;
14
+ export {};
@@ -19,6 +19,7 @@ export interface StartSessionOptions {
19
19
  agentId: string;
20
20
  agentControls?: AgentControls | undefined;
21
21
  existingSessionId?: string | undefined;
22
+ adoptionGoalId?: string | undefined;
22
23
  }
23
24
  export declare function useSession({ captureMode, authToken, appKey, getUserToken, userToken, onStart, onStartError, onDisconnect, }: UseSessionParams): {
24
25
  connection: LiveKitConnection | null;
@@ -27,7 +28,7 @@ export declare function useSession({ captureMode, authToken, appKey, getUserToke
27
28
  isDisconnecting: boolean;
28
29
  error: string;
29
30
  errorCode: number | null;
30
- startSession: ({ agentId, agentControls, existingSessionId }: StartSessionOptions) => Promise<void>;
31
+ startSession: ({ agentId, agentControls, existingSessionId, adoptionGoalId }: StartSessionOptions) => Promise<void>;
31
32
  pauseSession: () => Promise<void>;
32
33
  disconnect: () => Promise<void>;
33
34
  isPaused: boolean;
@@ -0,0 +1,3 @@
1
+ type LocationListener = () => void;
2
+ export declare function subscribeToLocationChange(listener: LocationListener): () => void;
3
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skippr/live-agent-sdk",
3
- "version": "0.44.0",
3
+ "version": "0.45.0",
4
4
  "type": "module",
5
5
  "main": "dist/esm/lib-exports.js",
6
6
  "module": "dist/esm/lib-exports.js",