@hachther/akilio-widget 1.0.0 → 1.1.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.
@@ -15,6 +15,7 @@ interface ComposerProps {
15
15
  disabled: boolean;
16
16
  copy: AkilioResolvedCopy;
17
17
  onSubmit: (query: string) => Promise<AkilioChatResponse>;
18
+ onVoiceSubmit?: (audio: Blob, signal: AbortSignal) => Promise<void>;
18
19
  onReviewConsent?: () => void;
19
20
  onDraftChange?: (draft: string, manual: boolean) => void;
20
21
  disabledMessage?: string;
@@ -8,3 +8,5 @@ export declare function ThumbsUpIcon(props: SVGProps<SVGSVGElement>): import("re
8
8
  export declare function ThumbsDownIcon(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
9
9
  export declare function SunIcon(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
10
10
  export declare function MoonIcon(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
11
+ export declare function MicrophoneIcon(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
12
+ export declare function StopIcon(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { AkilioClient } from '../lib/client';
2
+ import type { AkilioResolvedCopy } from '../lib/copy';
3
+ import type { AkilioIdentityRequirement } from '../types';
4
+ export declare function IdentityVerification({ client, projectKey, subject, conversationId, copy, requirement, availableMethods, onVerified, onCancel, }: {
5
+ client: AkilioClient;
6
+ projectKey: string;
7
+ subject?: string;
8
+ conversationId: string;
9
+ copy: AkilioResolvedCopy;
10
+ requirement?: AkilioIdentityRequirement | null;
11
+ availableMethods?: string[];
12
+ onVerified: () => void;
13
+ onCancel: () => void;
14
+ }): import("react").JSX.Element | null;
@@ -15,6 +15,7 @@ interface MessageBubbleProps {
15
15
  feedbackPending?: AkilioFeedbackRating;
16
16
  contactRequestCapability?: AkilioContactRequestCapability;
17
17
  onContactRequest?: (request: AkilioContactRequest, actionType: import('../types').AkilioCustomerActionType) => Promise<AkilioContactRequestResponse>;
18
+ onConfirmExternalOperation?: (message: AkilioChatMessage, tool: AkilioAgentTool) => Promise<void>;
18
19
  onConfirmHumanRequest?: (message: AkilioChatMessage, tool: AkilioAgentTool, request: AkilioContactRequest) => Promise<void>;
19
20
  onClarificationSubmit?: (message: AkilioChatMessage, values: Record<string, string>, submission: string) => Promise<void>;
20
21
  }
@@ -1,3 +1,3 @@
1
1
  import { ChatPanelProps } from '../types';
2
- declare const MessageList: import("react").NamedExoticComponent<Pick<ChatPanelProps, "primaryColor" | "copy" | "cart" | "locale" | "onSuggestion" | "showBranding" | "onProductClick" | "onCommerceAction" | "onFeedback" | "onProactiveAction" | "feedbackPending" | "contactRequestCapability" | "onContactRequest" | "onConfirmHumanRequest" | "onClarificationSubmit" | "messages">>;
2
+ declare const MessageList: import("react").NamedExoticComponent<Pick<ChatPanelProps, "primaryColor" | "copy" | "cart" | "locale" | "onSuggestion" | "showBranding" | "onProductClick" | "onCommerceAction" | "onFeedback" | "onProactiveAction" | "feedbackPending" | "contactRequestCapability" | "onContactRequest" | "onConfirmExternalOperation" | "onConfirmHumanRequest" | "onClarificationSubmit" | "messages">>;
3
3
  export default MessageList;
@@ -0,0 +1,9 @@
1
+ import type { AkilioResolvedCopy } from '../lib/copy';
2
+ import type { AkilioProductVariant } from '../types';
3
+ export declare function variantLabel(variant: AkilioProductVariant): string;
4
+ export default function ProductVariantSelector({ variants, selectedId, onSelect, copy, }: {
5
+ variants: AkilioProductVariant[];
6
+ selectedId?: string;
7
+ onSelect: (id: string) => void;
8
+ copy: AkilioResolvedCopy;
9
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,11 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { AkilioResolvedCopy } from '../lib/copy';
3
+ interface VoiceRecorderProps {
4
+ children?: ReactNode;
5
+ disabled: boolean;
6
+ copy: AkilioResolvedCopy;
7
+ onSubmit: (audio: Blob, signal: AbortSignal) => Promise<void>;
8
+ onBusyChange?: (busy: boolean) => void;
9
+ }
10
+ export declare function VoiceRecorder({ children, disabled, copy, onSubmit, onBusyChange, }: VoiceRecorderProps): import("react").JSX.Element;
11
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { AkilioClient } from '../lib/client';
2
+ import type { AkilioCart } from '../types';
3
+ /** Keep provider checkout state current without overlapping requests or stale identities. */
4
+ export declare function useCurrentCart({ client, projectKey, subject, enabled, open, }: {
5
+ client: Pick<AkilioClient, 'getCurrentCart'>;
6
+ projectKey: string;
7
+ subject?: string;
8
+ enabled: boolean;
9
+ open: boolean;
10
+ }): {
11
+ cart: AkilioCart | null;
12
+ loading: boolean;
13
+ refresh: () => Promise<void>;
14
+ };