@paymanai/payman-ask-sdk 4.0.11 → 4.0.12
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.d.mts +15 -46
- package/dist/index.d.ts +15 -46
- package/dist/index.js +2505 -299
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2474 -252
- package/dist/index.mjs.map +1 -0
- package/dist/styles.css +207 -0
- package/dist/styles.css.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { MessageDisplay, AgentStage, ChatCallbacks as ChatCallbacks$1, ChatConfig as ChatConfig$1, StreamProgress, StreamingStep
|
|
4
|
-
export { APIConfig, AgentStage, ChunkDisplay, MessageDisplay, MessageRole, SessionParams, StreamEvent, StreamOptions, StreamProgress, StreamingStep, UseChatV2Return, UseVoiceReturn, UserActionRequest,
|
|
3
|
+
import { MessageDisplay, AgentStage, ChatCallbacks as ChatCallbacks$1, ChatConfig as ChatConfig$1, ActiveUserAction, UserNotification, StreamProgress, StreamingStep } from '@paymanai/payman-typescript-ask-sdk';
|
|
4
|
+
export { APIConfig, ActiveUserAction, AgentStage, ChunkDisplay, JsonSchemaField, JsonSchemaOption, MessageDisplay, MessageRole, RequestedSchema, SessionParams, StreamEvent, StreamOptions, StreamProgress, StreamingStep, UseChatV2Return, UseVoiceReturn, UserActionKind, UserActionRequest, UserActionStaleError, UserActionState, UserActionStatus, UserActionSubAction, UserNotification, V2EventProcessorState, VerificationType, VoiceCallbacks, VoiceConfig, VoicePermissions, VoiceResult, VoiceState, buildContent, buildFormattedThinking, cancelUserAction, classifyField, classifyUserActionKind, coerceValue, createInitialV2State, defaultValueFor, generateId, getOptions, isNestedOrUnsupported, isRequired, migrateActiveStream, processStreamEventV2, renderableFields, resendUserAction, streamWorkflowEvents, submitUserAction, useChatV2, useVoice, validateField, validateForm } from '@paymanai/payman-typescript-ask-sdk';
|
|
5
5
|
import { ClassValue } from 'clsx';
|
|
6
6
|
|
|
7
7
|
declare const NEGATIVE_FEEDBACK_REASONS: readonly [{
|
|
@@ -328,23 +328,18 @@ type MessageListV2Props = {
|
|
|
328
328
|
messageActions?: MessageActionsConfig;
|
|
329
329
|
/** Disable retry/resend actions while the chat is busy */
|
|
330
330
|
retryDisabled?: boolean;
|
|
331
|
-
/**
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
onApproveAction?: (messageId: string, otp: string) => Promise<void>;
|
|
344
|
-
/** Reject a user action */
|
|
345
|
-
onRejectAction?: (messageId: string) => Promise<void>;
|
|
346
|
-
/** Resend a user action */
|
|
347
|
-
onResendAction?: (messageId: string) => Promise<void>;
|
|
331
|
+
/** Active user-action prompts to render inline (rendered as a stack). */
|
|
332
|
+
userActionPrompts?: ActiveUserAction[];
|
|
333
|
+
/** One-way notifications to render inline. */
|
|
334
|
+
notifications?: UserNotification[];
|
|
335
|
+
/** Submit a prompt's schema-typed form payload. */
|
|
336
|
+
onSubmitUserAction?: (userActionId: string, content: Record<string, unknown>) => Promise<void>;
|
|
337
|
+
/** Cancel / decline a prompt. */
|
|
338
|
+
onCancelUserAction?: (userActionId: string) => Promise<void>;
|
|
339
|
+
/** Resend a prompt (e.g. resend a verification code). */
|
|
340
|
+
onResendUserAction?: (userActionId: string) => Promise<void>;
|
|
341
|
+
/** Dismiss a one-way notification. */
|
|
342
|
+
onDismissNotification?: (id: string) => void;
|
|
348
343
|
/** Persist thumbs-up/down feedback (rejects on failure). */
|
|
349
344
|
onSubmitFeedback?: SubmitFeedbackHandler;
|
|
350
345
|
/**
|
|
@@ -471,32 +466,6 @@ type ChatHeaderProps = {
|
|
|
471
466
|
/** Custom class name */
|
|
472
467
|
className?: string;
|
|
473
468
|
};
|
|
474
|
-
type OtpInputProps = {
|
|
475
|
-
/** Current OTP value */
|
|
476
|
-
value: string;
|
|
477
|
-
/** Called with new OTP value */
|
|
478
|
-
onChange: (value: string) => void;
|
|
479
|
-
/** Number of digit boxes */
|
|
480
|
-
maxLength: number;
|
|
481
|
-
/** Disabled state */
|
|
482
|
-
disabled?: boolean;
|
|
483
|
-
/** Transient error state — triggers red borders + shake */
|
|
484
|
-
error?: boolean;
|
|
485
|
-
};
|
|
486
|
-
type UserActionModalProps = {
|
|
487
|
-
/** Whether the modal is open */
|
|
488
|
-
isOpen: boolean;
|
|
489
|
-
/** User action request data from the stream */
|
|
490
|
-
userActionRequest: UserActionRequest | null;
|
|
491
|
-
/** Submit OTP */
|
|
492
|
-
onApprove: (otp: string) => Promise<void>;
|
|
493
|
-
/** Reject / cancel */
|
|
494
|
-
onReject: () => Promise<void>;
|
|
495
|
-
/** Resend OTP */
|
|
496
|
-
onResend: () => Promise<void>;
|
|
497
|
-
/** Increment to externally clear OTP field */
|
|
498
|
-
clearOtpTrigger: number;
|
|
499
|
-
};
|
|
500
469
|
|
|
501
470
|
/**
|
|
502
471
|
* PaymanChat — the public component. Delegates to `PaymanChatInner`
|
|
@@ -587,4 +556,4 @@ interface ChatSessionContext {
|
|
|
587
556
|
*/
|
|
588
557
|
declare function captureSentryError(error: Error | string, context: ChatSessionContext): void;
|
|
589
558
|
|
|
590
|
-
export { type AgentMessageProps, type AssistantMessageActionsConfig, type ChatCallbacks, type ChatConfig, type ChatHeaderProps, type ChatInputProps, type ChatSessionContext, type MessageActionsConfig, type MessageListProps, type MessageListV2Props, type MessageRowProps,
|
|
559
|
+
export { type AgentMessageProps, type AssistantMessageActionsConfig, type ChatCallbacks, type ChatConfig, type ChatHeaderProps, type ChatInputProps, type ChatSessionContext, type MessageActionsConfig, type MessageListProps, type MessageListV2Props, type MessageRowProps, PaymanChat, PaymanChatContext, type PaymanChatContextValue, type PaymanChatProps, type PaymanChatRef, type SlashCommandConfig, type StreamingMessageProps, type UserMessageActionsConfig, type UserMessageProps, captureSentryError, cn, formatDate, usePaymanChat };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { MessageDisplay, AgentStage, ChatCallbacks as ChatCallbacks$1, ChatConfig as ChatConfig$1, StreamProgress, StreamingStep
|
|
4
|
-
export { APIConfig, AgentStage, ChunkDisplay, MessageDisplay, MessageRole, SessionParams, StreamEvent, StreamOptions, StreamProgress, StreamingStep, UseChatV2Return, UseVoiceReturn, UserActionRequest,
|
|
3
|
+
import { MessageDisplay, AgentStage, ChatCallbacks as ChatCallbacks$1, ChatConfig as ChatConfig$1, ActiveUserAction, UserNotification, StreamProgress, StreamingStep } from '@paymanai/payman-typescript-ask-sdk';
|
|
4
|
+
export { APIConfig, ActiveUserAction, AgentStage, ChunkDisplay, JsonSchemaField, JsonSchemaOption, MessageDisplay, MessageRole, RequestedSchema, SessionParams, StreamEvent, StreamOptions, StreamProgress, StreamingStep, UseChatV2Return, UseVoiceReturn, UserActionKind, UserActionRequest, UserActionStaleError, UserActionState, UserActionStatus, UserActionSubAction, UserNotification, V2EventProcessorState, VerificationType, VoiceCallbacks, VoiceConfig, VoicePermissions, VoiceResult, VoiceState, buildContent, buildFormattedThinking, cancelUserAction, classifyField, classifyUserActionKind, coerceValue, createInitialV2State, defaultValueFor, generateId, getOptions, isNestedOrUnsupported, isRequired, migrateActiveStream, processStreamEventV2, renderableFields, resendUserAction, streamWorkflowEvents, submitUserAction, useChatV2, useVoice, validateField, validateForm } from '@paymanai/payman-typescript-ask-sdk';
|
|
5
5
|
import { ClassValue } from 'clsx';
|
|
6
6
|
|
|
7
7
|
declare const NEGATIVE_FEEDBACK_REASONS: readonly [{
|
|
@@ -328,23 +328,18 @@ type MessageListV2Props = {
|
|
|
328
328
|
messageActions?: MessageActionsConfig;
|
|
329
329
|
/** Disable retry/resend actions while the chat is busy */
|
|
330
330
|
retryDisabled?: boolean;
|
|
331
|
-
/**
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
onApproveAction?: (messageId: string, otp: string) => Promise<void>;
|
|
344
|
-
/** Reject a user action */
|
|
345
|
-
onRejectAction?: (messageId: string) => Promise<void>;
|
|
346
|
-
/** Resend a user action */
|
|
347
|
-
onResendAction?: (messageId: string) => Promise<void>;
|
|
331
|
+
/** Active user-action prompts to render inline (rendered as a stack). */
|
|
332
|
+
userActionPrompts?: ActiveUserAction[];
|
|
333
|
+
/** One-way notifications to render inline. */
|
|
334
|
+
notifications?: UserNotification[];
|
|
335
|
+
/** Submit a prompt's schema-typed form payload. */
|
|
336
|
+
onSubmitUserAction?: (userActionId: string, content: Record<string, unknown>) => Promise<void>;
|
|
337
|
+
/** Cancel / decline a prompt. */
|
|
338
|
+
onCancelUserAction?: (userActionId: string) => Promise<void>;
|
|
339
|
+
/** Resend a prompt (e.g. resend a verification code). */
|
|
340
|
+
onResendUserAction?: (userActionId: string) => Promise<void>;
|
|
341
|
+
/** Dismiss a one-way notification. */
|
|
342
|
+
onDismissNotification?: (id: string) => void;
|
|
348
343
|
/** Persist thumbs-up/down feedback (rejects on failure). */
|
|
349
344
|
onSubmitFeedback?: SubmitFeedbackHandler;
|
|
350
345
|
/**
|
|
@@ -471,32 +466,6 @@ type ChatHeaderProps = {
|
|
|
471
466
|
/** Custom class name */
|
|
472
467
|
className?: string;
|
|
473
468
|
};
|
|
474
|
-
type OtpInputProps = {
|
|
475
|
-
/** Current OTP value */
|
|
476
|
-
value: string;
|
|
477
|
-
/** Called with new OTP value */
|
|
478
|
-
onChange: (value: string) => void;
|
|
479
|
-
/** Number of digit boxes */
|
|
480
|
-
maxLength: number;
|
|
481
|
-
/** Disabled state */
|
|
482
|
-
disabled?: boolean;
|
|
483
|
-
/** Transient error state — triggers red borders + shake */
|
|
484
|
-
error?: boolean;
|
|
485
|
-
};
|
|
486
|
-
type UserActionModalProps = {
|
|
487
|
-
/** Whether the modal is open */
|
|
488
|
-
isOpen: boolean;
|
|
489
|
-
/** User action request data from the stream */
|
|
490
|
-
userActionRequest: UserActionRequest | null;
|
|
491
|
-
/** Submit OTP */
|
|
492
|
-
onApprove: (otp: string) => Promise<void>;
|
|
493
|
-
/** Reject / cancel */
|
|
494
|
-
onReject: () => Promise<void>;
|
|
495
|
-
/** Resend OTP */
|
|
496
|
-
onResend: () => Promise<void>;
|
|
497
|
-
/** Increment to externally clear OTP field */
|
|
498
|
-
clearOtpTrigger: number;
|
|
499
|
-
};
|
|
500
469
|
|
|
501
470
|
/**
|
|
502
471
|
* PaymanChat — the public component. Delegates to `PaymanChatInner`
|
|
@@ -587,4 +556,4 @@ interface ChatSessionContext {
|
|
|
587
556
|
*/
|
|
588
557
|
declare function captureSentryError(error: Error | string, context: ChatSessionContext): void;
|
|
589
558
|
|
|
590
|
-
export { type AgentMessageProps, type AssistantMessageActionsConfig, type ChatCallbacks, type ChatConfig, type ChatHeaderProps, type ChatInputProps, type ChatSessionContext, type MessageActionsConfig, type MessageListProps, type MessageListV2Props, type MessageRowProps,
|
|
559
|
+
export { type AgentMessageProps, type AssistantMessageActionsConfig, type ChatCallbacks, type ChatConfig, type ChatHeaderProps, type ChatInputProps, type ChatSessionContext, type MessageActionsConfig, type MessageListProps, type MessageListV2Props, type MessageRowProps, PaymanChat, PaymanChatContext, type PaymanChatContextValue, type PaymanChatProps, type PaymanChatRef, type SlashCommandConfig, type StreamingMessageProps, type UserMessageActionsConfig, type UserMessageProps, captureSentryError, cn, formatDate, usePaymanChat };
|