@paymanai/payman-ask-sdk 4.0.28 → 4.0.29

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
@@ -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, AgentConfigProbeConfig, ActiveUserAction, UserNotification } from '@paymanai/payman-typescript-ask-sdk';
4
- export { APIConfig, ActiveUserAction, AgentAvailabilityStatus, AgentConfigProbeConfig, AgentStage, ChatSessionAction, ChatSessionMessageEntry, ChatSessionSummary, ChatSessionsConfig, ChunkDisplay, JsonSchemaField, JsonSchemaOption, MessageDisplay, MessageRole, RequestedSchema, SessionParams, StreamProgress, StreamingStep, UseAgentConfigOptions, UseAgentConfigReturn, UseChatV2Return, UseVoiceReturn, UserActionKind, UserActionRequest, UserActionStaleError, UserActionState, UserActionStatus, UserActionSubAction, UserNotification, VerificationType, VoiceCallbacks, VoiceConfig, VoicePermissions, VoiceResult, VoiceState, cancelUserAction, resendUserAction, submitUserAction, useAgentConfig, useChatV2, useVoice } from '@paymanai/payman-typescript-ask-sdk';
3
+ import { MessageDisplay, AgentStage, ChatCallbacks as ChatCallbacks$1, ChatConfig as ChatConfig$1, ActiveUserAction, UserNotification } from '@paymanai/payman-typescript-ask-sdk';
4
+ export { APIConfig, ActiveUserAction, AgentStage, ChunkDisplay, JsonSchemaField, JsonSchemaOption, MessageDisplay, MessageRole, RequestedSchema, SessionParams, StreamProgress, StreamingStep, UseChatV2Return, UseVoiceReturn, UserActionKind, UserActionRequest, UserActionStaleError, UserActionState, UserActionStatus, UserActionSubAction, UserNotification, VerificationType, VoiceCallbacks, VoiceConfig, VoicePermissions, VoiceResult, VoiceState, cancelUserAction, resendUserAction, submitUserAction, useChatV2, useVoice } from '@paymanai/payman-typescript-ask-sdk';
5
5
  import { ClassValue } from 'clsx';
6
6
 
7
7
  declare const NEGATIVE_FEEDBACK_REASONS: readonly [{
@@ -74,20 +74,6 @@ type SlashCommandConfig = {
74
74
  requiredAnyPermissions?: string[];
75
75
  };
76
76
  type ChatConfig = ChatConfig$1 & {
77
- /**
78
- * Availability probe. When `availability.enabled` is set, PaymanChat calls
79
- * GET `/api/agent/config` itself and takes over the chat with a friendly,
80
- * built-in notice whenever the agent is off or the agent-user is blocked —
81
- * so hosts don't have to wire the check by hand. Provide `disabledComponent`
82
- * / `blockedComponent` to render your own UI per state. See
83
- * `AgentConfigProbeConfig` in @paymanai/payman-typescript-ask-sdk.
84
- */
85
- availability?: AgentConfigProbeConfig & {
86
- /** Custom body shown when the agent itself is disabled. Defaults to a built-in notice. */
87
- disabledComponent?: React__default.ReactNode;
88
- /** Custom body shown when this agent-user is blocked. Defaults to a built-in notice. */
89
- blockedComponent?: React__default.ReactNode;
90
- };
91
77
  /** Custom React component to render above the empty state text (e.g. logo, illustration). */
92
78
  emptyStateComponent?: React__default.ReactNode;
93
79
  /** Enable voice input (default: true) */
@@ -212,8 +198,6 @@ type PaymanChatRef = {
212
198
  getSessionId: () => string | undefined;
213
199
  /** Get all messages */
214
200
  getMessages: () => MessageDisplay[];
215
- /** Re-fetch the sessions sidebar list (no-op when `config.sessions.enabled` is not set) */
216
- refreshSessions: () => void;
217
201
  };
218
202
  type PaymanChatProps = {
219
203
  /** Chat configuration - includes API config */
@@ -496,6 +480,14 @@ type ChatHeaderProps = {
496
480
  className?: string;
497
481
  };
498
482
 
483
+ /**
484
+ * PaymanChat — the public component. Delegates to `PaymanChatInner`
485
+ * with a chat hook instance from `useChatV2`. The `config.uiVersion`
486
+ * prop used to gate an older V1 render path; the V1 code has been
487
+ * removed since nothing in the SDK's current consumers (paygent-studio
488
+ * etc.) opted into it. The `uiVersion` prop is still accepted on
489
+ * `ChatConfig` for type compatibility but is now ignored at runtime.
490
+ */
499
491
  declare const PaymanChat: React.ForwardRefExoticComponent<PaymanChatProps & React.RefAttributes<PaymanChatRef>>;
500
492
 
501
493
  interface PaymanChatContextValue {
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, AgentConfigProbeConfig, ActiveUserAction, UserNotification } from '@paymanai/payman-typescript-ask-sdk';
4
- export { APIConfig, ActiveUserAction, AgentAvailabilityStatus, AgentConfigProbeConfig, AgentStage, ChatSessionAction, ChatSessionMessageEntry, ChatSessionSummary, ChatSessionsConfig, ChunkDisplay, JsonSchemaField, JsonSchemaOption, MessageDisplay, MessageRole, RequestedSchema, SessionParams, StreamProgress, StreamingStep, UseAgentConfigOptions, UseAgentConfigReturn, UseChatV2Return, UseVoiceReturn, UserActionKind, UserActionRequest, UserActionStaleError, UserActionState, UserActionStatus, UserActionSubAction, UserNotification, VerificationType, VoiceCallbacks, VoiceConfig, VoicePermissions, VoiceResult, VoiceState, cancelUserAction, resendUserAction, submitUserAction, useAgentConfig, useChatV2, useVoice } from '@paymanai/payman-typescript-ask-sdk';
3
+ import { MessageDisplay, AgentStage, ChatCallbacks as ChatCallbacks$1, ChatConfig as ChatConfig$1, ActiveUserAction, UserNotification } from '@paymanai/payman-typescript-ask-sdk';
4
+ export { APIConfig, ActiveUserAction, AgentStage, ChunkDisplay, JsonSchemaField, JsonSchemaOption, MessageDisplay, MessageRole, RequestedSchema, SessionParams, StreamProgress, StreamingStep, UseChatV2Return, UseVoiceReturn, UserActionKind, UserActionRequest, UserActionStaleError, UserActionState, UserActionStatus, UserActionSubAction, UserNotification, VerificationType, VoiceCallbacks, VoiceConfig, VoicePermissions, VoiceResult, VoiceState, cancelUserAction, resendUserAction, submitUserAction, useChatV2, useVoice } from '@paymanai/payman-typescript-ask-sdk';
5
5
  import { ClassValue } from 'clsx';
6
6
 
7
7
  declare const NEGATIVE_FEEDBACK_REASONS: readonly [{
@@ -74,20 +74,6 @@ type SlashCommandConfig = {
74
74
  requiredAnyPermissions?: string[];
75
75
  };
76
76
  type ChatConfig = ChatConfig$1 & {
77
- /**
78
- * Availability probe. When `availability.enabled` is set, PaymanChat calls
79
- * GET `/api/agent/config` itself and takes over the chat with a friendly,
80
- * built-in notice whenever the agent is off or the agent-user is blocked —
81
- * so hosts don't have to wire the check by hand. Provide `disabledComponent`
82
- * / `blockedComponent` to render your own UI per state. See
83
- * `AgentConfigProbeConfig` in @paymanai/payman-typescript-ask-sdk.
84
- */
85
- availability?: AgentConfigProbeConfig & {
86
- /** Custom body shown when the agent itself is disabled. Defaults to a built-in notice. */
87
- disabledComponent?: React__default.ReactNode;
88
- /** Custom body shown when this agent-user is blocked. Defaults to a built-in notice. */
89
- blockedComponent?: React__default.ReactNode;
90
- };
91
77
  /** Custom React component to render above the empty state text (e.g. logo, illustration). */
92
78
  emptyStateComponent?: React__default.ReactNode;
93
79
  /** Enable voice input (default: true) */
@@ -212,8 +198,6 @@ type PaymanChatRef = {
212
198
  getSessionId: () => string | undefined;
213
199
  /** Get all messages */
214
200
  getMessages: () => MessageDisplay[];
215
- /** Re-fetch the sessions sidebar list (no-op when `config.sessions.enabled` is not set) */
216
- refreshSessions: () => void;
217
201
  };
218
202
  type PaymanChatProps = {
219
203
  /** Chat configuration - includes API config */
@@ -496,6 +480,14 @@ type ChatHeaderProps = {
496
480
  className?: string;
497
481
  };
498
482
 
483
+ /**
484
+ * PaymanChat — the public component. Delegates to `PaymanChatInner`
485
+ * with a chat hook instance from `useChatV2`. The `config.uiVersion`
486
+ * prop used to gate an older V1 render path; the V1 code has been
487
+ * removed since nothing in the SDK's current consumers (paygent-studio
488
+ * etc.) opted into it. The `uiVersion` prop is still accepted on
489
+ * `ChatConfig` for type compatibility but is now ignored at runtime.
490
+ */
499
491
  declare const PaymanChat: React.ForwardRefExoticComponent<PaymanChatProps & React.RefAttributes<PaymanChatRef>>;
500
492
 
501
493
  interface PaymanChatContextValue {