@paymanai/payman-ask-sdk 1.2.17 → 1.2.19

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 CHANGED
@@ -86,6 +86,8 @@ type ChatConfig = {
86
86
  emptyStateText?: string;
87
87
  /** Show icon in empty state */
88
88
  showEmptyStateIcon?: boolean;
89
+ /** Custom React component to render above the empty state text (e.g. logo, illustration). */
90
+ emptyStateComponent?: React__default.ReactNode;
89
91
  /** Show agent name */
90
92
  showAgentName?: boolean;
91
93
  /** Agent name */
@@ -130,6 +132,8 @@ type ChatConfig = {
130
132
  voiceInterimResults?: boolean;
131
133
  /** Voice continuous mode (default: true) */
132
134
  voiceContinuous?: boolean;
135
+ /** Show a "New Session" reset button inside the input bar (default: false) */
136
+ showResetSession?: boolean;
133
137
  };
134
138
  type ChatCallbacks = {
135
139
  /** Called when a message is sent (before API call) */
@@ -148,6 +152,8 @@ type ChatCallbacks = {
148
152
  }) => void;
149
153
  /** Called when session ID changes */
150
154
  onSessionIdChange?: (sessionId: string) => void;
155
+ /** Called when the session is reset (via SDK reset button or ref.resetSession()) */
156
+ onResetSession?: () => void;
151
157
  /** Called when a user action (e.g. OTP) is required */
152
158
  onUserActionRequired?: (request: UserActionRequest) => void;
153
159
  /** Called on user action events (SUCCESS, INVALID, EXPIRED, REJECTED, RESENT, FAILED) */
@@ -226,6 +232,10 @@ type ChatInputProps = {
226
232
  onCancelRecording?: () => void;
227
233
  /** Live transcript while recording (used to animate waveforms only when user is talking) */
228
234
  transcribedText?: string;
235
+ /** Show a reset/new session button in the input bar */
236
+ showResetSession?: boolean;
237
+ /** Handler called when the reset session button is clicked */
238
+ onResetSession?: () => void;
229
239
  };
230
240
  type MessageListProps = {
231
241
  /** Messages to display */
@@ -236,6 +246,8 @@ type MessageListProps = {
236
246
  emptyStateText?: string;
237
247
  /** Show icon in empty state */
238
248
  showEmptyStateIcon?: boolean;
249
+ /** Custom React component to render above the empty state text */
250
+ emptyStateComponent?: React__default.ReactNode;
239
251
  /** Layout style */
240
252
  layout?: "centered" | "full-width";
241
253
  /** Show timestamps on messages */
@@ -404,6 +416,8 @@ type OtpInputProps = {
404
416
  maxLength: number;
405
417
  /** Disabled state */
406
418
  disabled?: boolean;
419
+ /** Transient error state — triggers red borders + shake */
420
+ error?: boolean;
407
421
  };
408
422
  type UserActionModalProps = {
409
423
  /** Whether the modal is open */
package/dist/index.d.ts CHANGED
@@ -86,6 +86,8 @@ type ChatConfig = {
86
86
  emptyStateText?: string;
87
87
  /** Show icon in empty state */
88
88
  showEmptyStateIcon?: boolean;
89
+ /** Custom React component to render above the empty state text (e.g. logo, illustration). */
90
+ emptyStateComponent?: React__default.ReactNode;
89
91
  /** Show agent name */
90
92
  showAgentName?: boolean;
91
93
  /** Agent name */
@@ -130,6 +132,8 @@ type ChatConfig = {
130
132
  voiceInterimResults?: boolean;
131
133
  /** Voice continuous mode (default: true) */
132
134
  voiceContinuous?: boolean;
135
+ /** Show a "New Session" reset button inside the input bar (default: false) */
136
+ showResetSession?: boolean;
133
137
  };
134
138
  type ChatCallbacks = {
135
139
  /** Called when a message is sent (before API call) */
@@ -148,6 +152,8 @@ type ChatCallbacks = {
148
152
  }) => void;
149
153
  /** Called when session ID changes */
150
154
  onSessionIdChange?: (sessionId: string) => void;
155
+ /** Called when the session is reset (via SDK reset button or ref.resetSession()) */
156
+ onResetSession?: () => void;
151
157
  /** Called when a user action (e.g. OTP) is required */
152
158
  onUserActionRequired?: (request: UserActionRequest) => void;
153
159
  /** Called on user action events (SUCCESS, INVALID, EXPIRED, REJECTED, RESENT, FAILED) */
@@ -226,6 +232,10 @@ type ChatInputProps = {
226
232
  onCancelRecording?: () => void;
227
233
  /** Live transcript while recording (used to animate waveforms only when user is talking) */
228
234
  transcribedText?: string;
235
+ /** Show a reset/new session button in the input bar */
236
+ showResetSession?: boolean;
237
+ /** Handler called when the reset session button is clicked */
238
+ onResetSession?: () => void;
229
239
  };
230
240
  type MessageListProps = {
231
241
  /** Messages to display */
@@ -236,6 +246,8 @@ type MessageListProps = {
236
246
  emptyStateText?: string;
237
247
  /** Show icon in empty state */
238
248
  showEmptyStateIcon?: boolean;
249
+ /** Custom React component to render above the empty state text */
250
+ emptyStateComponent?: React__default.ReactNode;
239
251
  /** Layout style */
240
252
  layout?: "centered" | "full-width";
241
253
  /** Show timestamps on messages */
@@ -404,6 +416,8 @@ type OtpInputProps = {
404
416
  maxLength: number;
405
417
  /** Disabled state */
406
418
  disabled?: boolean;
419
+ /** Transient error state — triggers red borders + shake */
420
+ error?: boolean;
407
421
  };
408
422
  type UserActionModalProps = {
409
423
  /** Whether the modal is open */