@uptiqai/widgets-sdk 1.276.0 → 1.278.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/index.css +1 -1
- package/dist/index.d.ts +19 -5
- package/dist/index.js +20420 -20389
- package/dist/index.umd.cjs +192 -192
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -212,6 +212,17 @@ export declare type ConversationListItem = {
|
|
|
212
212
|
updatedAt: Date;
|
|
213
213
|
};
|
|
214
214
|
|
|
215
|
+
export declare type ConversationSummaryEvent = {
|
|
216
|
+
conversationId: string;
|
|
217
|
+
status: 'Completed' | 'Failed';
|
|
218
|
+
summary?: string;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
/** Summarizes a conversation that is still running, so its work can be carried into a fresh one. */
|
|
222
|
+
export declare type ConversationSummaryPayload = {
|
|
223
|
+
conversationId: string;
|
|
224
|
+
};
|
|
225
|
+
|
|
215
226
|
export declare const createHeadlessAgentInstance: (params: CreateHeadlessAgentInstanceParams) => HeadlessAgentInstance;
|
|
216
227
|
|
|
217
228
|
export declare type CreateHeadlessAgentInstanceParams = Pick<CreateWidgetInstanceParams, 'config' | 'user' | 'instanceId'>;
|
|
@@ -272,7 +283,6 @@ declare type FullChatWidgetContainerProps = {
|
|
|
272
283
|
children: React.ReactNode;
|
|
273
284
|
defaultOpen?: boolean;
|
|
274
285
|
hideTrigger?: boolean;
|
|
275
|
-
isUpWrk?: boolean;
|
|
276
286
|
onClose?: () => void;
|
|
277
287
|
widgetRef?: React.Ref<FullScreenChatWidgetRef>;
|
|
278
288
|
};
|
|
@@ -294,7 +304,7 @@ export declare type FullScreenAnnotationChatWidgetRef = {
|
|
|
294
304
|
close: () => void;
|
|
295
305
|
};
|
|
296
306
|
|
|
297
|
-
export declare const FullScreenChatWidget: ({ defaultOpen, widgetRef, onClose, hideTrigger,
|
|
307
|
+
export declare const FullScreenChatWidget: ({ defaultOpen, widgetRef, onClose, hideTrigger, ...props }: FullScreenChatWidgetProps) => JSX_2.Element;
|
|
298
308
|
|
|
299
309
|
export declare type FullScreenChatWidgetProps = CommonWidgetProps & Omit<FullChatWidgetContainerProps, 'children'>;
|
|
300
310
|
|
|
@@ -309,7 +319,7 @@ export declare type GetConversationsResult = {
|
|
|
309
319
|
};
|
|
310
320
|
|
|
311
321
|
export declare type HeadlessAgentInstance = {
|
|
312
|
-
emit: (event:
|
|
322
|
+
emit: <T extends HeadlessEmitType>(event: T, payload: HeadlessEmitPayload<T>) => void;
|
|
313
323
|
on: <T extends HeadlessEventType>(event: T, handler: HeadlessEventHandler<T>) => () => void;
|
|
314
324
|
/** Attach to a conversation's live element stream without sending on it. Returns its own unsubscribe. */
|
|
315
325
|
subscribeToConversation: (conversationId: string) => () => void;
|
|
@@ -318,9 +328,13 @@ export declare type HeadlessAgentInstance = {
|
|
|
318
328
|
listConversations: (params?: ListConversationsParams) => Promise<GetConversationsResult>;
|
|
319
329
|
};
|
|
320
330
|
|
|
321
|
-
declare type
|
|
331
|
+
declare type HeadlessEmitPayload<T extends HeadlessEmitType> = T extends 'query' ? QueryPayload : ConversationSummaryPayload;
|
|
332
|
+
|
|
333
|
+
declare type HeadlessEmitType = 'query' | 'summarize-conversation' | 'cancel-conversation-summary';
|
|
334
|
+
|
|
335
|
+
declare type HeadlessEventHandler<T extends HeadlessEventType> = T extends 'agent-interrupt' ? (message: AgentInterruptEvent) => void : T extends 'queue-update' ? (event: QueueUpdateEvent) => void : T extends 'conversation-summary' ? (event: ConversationSummaryEvent) => void : never;
|
|
322
336
|
|
|
323
|
-
export declare type HeadlessEventType = 'agent-interrupt' | 'queue-update';
|
|
337
|
+
export declare type HeadlessEventType = 'agent-interrupt' | 'queue-update' | 'conversation-summary';
|
|
324
338
|
|
|
325
339
|
declare type IntegrationServiceId = 'twilio-whatsapp' | 'resend' | 'stripe' | 'redtail';
|
|
326
340
|
|