@skippr/live-agent-sdk 0.83.0 → 0.84.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 -2
- package/dist/esm/lib-exports.js +239 -150
- package/dist/skippr-sdk.css +1 -1
- package/dist/skippr-sdk.js +142 -142
- package/dist/types/components/LiveAgent.d.ts +0 -1
- package/dist/types/components/ShadowHost.d.ts +2 -1
- package/dist/types/context/LiveAgentContext.d.ts +7 -0
- package/dist/types/hooks/useAuth.d.ts +1 -0
- package/dist/types/hooks/useAvailableModules.d.ts +2 -1
- package/dist/types/hooks/useOnceTrue.d.ts +1 -0
- package/dist/types/lib/brandForeground.d.ts +2 -0
- package/package.json +1 -1
|
@@ -8,7 +8,6 @@ interface LiveAgentBaseProps {
|
|
|
8
8
|
appKey?: string | undefined;
|
|
9
9
|
getUserToken?: (() => Promise<string>) | undefined;
|
|
10
10
|
userToken?: string | undefined;
|
|
11
|
-
position?: 'left' | 'right' | undefined;
|
|
12
11
|
verticalAlign?: VerticalAlign | undefined;
|
|
13
12
|
variant?: 'floating' | 'sidebar' | undefined;
|
|
14
13
|
minimizable?: boolean | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
export declare const PROPERTIES_STYLE_ID = "skippr-tw-properties";
|
|
3
|
-
export declare function ShadowHost({ children }: {
|
|
3
|
+
export declare function ShadowHost({ children, accentColor, }: {
|
|
4
4
|
children: ReactNode;
|
|
5
|
+
accentColor?: string | null;
|
|
5
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -41,6 +41,12 @@ export interface ModuleDefault {
|
|
|
41
41
|
agentId: string | null;
|
|
42
42
|
sessionId: string | null;
|
|
43
43
|
}
|
|
44
|
+
export interface WidgetAppearance {
|
|
45
|
+
accentColor: string | null;
|
|
46
|
+
logoUrl: string | null;
|
|
47
|
+
position: 'left' | 'right' | null;
|
|
48
|
+
verticalAlign: 'top' | 'middle' | 'bottom' | null;
|
|
49
|
+
}
|
|
44
50
|
export interface IdleSessionHistory {
|
|
45
51
|
messages: Message[];
|
|
46
52
|
phases: PhaseStatus[];
|
|
@@ -128,6 +134,7 @@ export interface LiveAgentContextValue extends LiveAgentPublicValue {
|
|
|
128
134
|
phasesSnapshot: unknown[];
|
|
129
135
|
setPhasesSnapshot: (phases: unknown[]) => void;
|
|
130
136
|
hasResolvedModules: boolean;
|
|
137
|
+
appearance: WidgetAppearance | null;
|
|
131
138
|
adoptionGoals: AdoptionGoalMatch[];
|
|
132
139
|
startAdoptionSession: (goal: AdoptionGoalMatch) => void;
|
|
133
140
|
textMode: boolean;
|
|
@@ -4,6 +4,7 @@ interface UseAuthParams {
|
|
|
4
4
|
export declare function useAuth({ appKey }: UseAuthParams): {
|
|
5
5
|
isAuthenticated: boolean;
|
|
6
6
|
isValidating: boolean;
|
|
7
|
+
hasResolvedStoredToken: boolean;
|
|
7
8
|
authToken: string | null;
|
|
8
9
|
requestOtp: (email: string) => Promise<boolean>;
|
|
9
10
|
verifyOtp: (email: string, code: string) => Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Module, ModuleDefault } from '../context/LiveAgentContext';
|
|
1
|
+
import type { Module, ModuleDefault, WidgetAppearance } from '../context/LiveAgentContext';
|
|
2
2
|
import type { AuthedFetch } from './useSession';
|
|
3
3
|
interface UseAvailableModulesParams {
|
|
4
4
|
enabled: boolean;
|
|
@@ -9,6 +9,7 @@ interface UseAvailableModulesParams {
|
|
|
9
9
|
interface UseAvailableModulesResult {
|
|
10
10
|
modules: Module[];
|
|
11
11
|
defaultSelection: ModuleDefault;
|
|
12
|
+
appearance: WidgetAppearance | null;
|
|
12
13
|
isLoading: boolean;
|
|
13
14
|
hasResolved: boolean;
|
|
14
15
|
error: string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useOnceTrue(value: boolean): boolean;
|