@paymanai/payman-typescript-ask-sdk 1.2.7 → 1.2.8
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 +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/dist/index.native.js +3 -1
- package/dist/index.native.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -71,10 +71,13 @@ type UseVoiceReturn = {
|
|
|
71
71
|
type MessageRole = "user" | "assistant" | "system";
|
|
72
72
|
type StreamProgress = "started" | "processing" | "completed" | "error";
|
|
73
73
|
type WorkflowStage = "DEV" | "SANDBOX" | "PROD" | "ARCHIVED";
|
|
74
|
+
type UserActionType = "PAYMENT_APPROVAL" | "PAYEE_APPROVAL";
|
|
74
75
|
type UserActionRequest = {
|
|
75
76
|
userActionId: string;
|
|
77
|
+
userActionType?: UserActionType;
|
|
76
78
|
message: string;
|
|
77
79
|
requestedSchema: Record<string, unknown>;
|
|
80
|
+
metadata?: Record<string, string>;
|
|
78
81
|
};
|
|
79
82
|
type UserActionResult = "approved" | "rejected";
|
|
80
83
|
type UserActionState = {
|
|
@@ -301,8 +304,10 @@ type StreamEvent = {
|
|
|
301
304
|
elapsedMs?: number;
|
|
302
305
|
userActionRequest?: {
|
|
303
306
|
userActionId: string;
|
|
307
|
+
userActionType?: string;
|
|
304
308
|
message: string;
|
|
305
309
|
requestedSchema: Record<string, unknown>;
|
|
310
|
+
metadata?: Record<string, string>;
|
|
306
311
|
};
|
|
307
312
|
[key: string]: unknown;
|
|
308
313
|
};
|
|
@@ -334,4 +339,4 @@ declare function cancelUserAction(config: ChatConfig, userActionId: string): Pro
|
|
|
334
339
|
*/
|
|
335
340
|
declare function resendUserAction(config: ChatConfig, userActionId: string): Promise<UserActionResponse>;
|
|
336
341
|
|
|
337
|
-
export { type APIConfig, type ChatCallbacks, type ChatConfig, type ChunkDisplay, type MessageDisplay, type MessageRole, type SessionParams, type StreamEvent, type StreamOptions, type StreamProgress, type StreamingStep, type UseChatReturn, type UseVoiceReturn, type UserActionRequest, type UserActionResult, type UserActionState, type VoiceCallbacks, type VoiceConfig, type VoicePermissions, type VoiceResult, type VoiceState, type WorkflowStage, cancelUserAction, generateId, resendUserAction, streamWorkflowEvents, submitUserAction, useChat, useVoice };
|
|
342
|
+
export { type APIConfig, type ChatCallbacks, type ChatConfig, type ChunkDisplay, type MessageDisplay, type MessageRole, type SessionParams, type StreamEvent, type StreamOptions, type StreamProgress, type StreamingStep, type UseChatReturn, type UseVoiceReturn, type UserActionRequest, type UserActionResult, type UserActionState, type UserActionType, type VoiceCallbacks, type VoiceConfig, type VoicePermissions, type VoiceResult, type VoiceState, type WorkflowStage, cancelUserAction, generateId, resendUserAction, streamWorkflowEvents, submitUserAction, useChat, useVoice };
|
package/dist/index.d.ts
CHANGED
|
@@ -71,10 +71,13 @@ type UseVoiceReturn = {
|
|
|
71
71
|
type MessageRole = "user" | "assistant" | "system";
|
|
72
72
|
type StreamProgress = "started" | "processing" | "completed" | "error";
|
|
73
73
|
type WorkflowStage = "DEV" | "SANDBOX" | "PROD" | "ARCHIVED";
|
|
74
|
+
type UserActionType = "PAYMENT_APPROVAL" | "PAYEE_APPROVAL";
|
|
74
75
|
type UserActionRequest = {
|
|
75
76
|
userActionId: string;
|
|
77
|
+
userActionType?: UserActionType;
|
|
76
78
|
message: string;
|
|
77
79
|
requestedSchema: Record<string, unknown>;
|
|
80
|
+
metadata?: Record<string, string>;
|
|
78
81
|
};
|
|
79
82
|
type UserActionResult = "approved" | "rejected";
|
|
80
83
|
type UserActionState = {
|
|
@@ -301,8 +304,10 @@ type StreamEvent = {
|
|
|
301
304
|
elapsedMs?: number;
|
|
302
305
|
userActionRequest?: {
|
|
303
306
|
userActionId: string;
|
|
307
|
+
userActionType?: string;
|
|
304
308
|
message: string;
|
|
305
309
|
requestedSchema: Record<string, unknown>;
|
|
310
|
+
metadata?: Record<string, string>;
|
|
306
311
|
};
|
|
307
312
|
[key: string]: unknown;
|
|
308
313
|
};
|
|
@@ -334,4 +339,4 @@ declare function cancelUserAction(config: ChatConfig, userActionId: string): Pro
|
|
|
334
339
|
*/
|
|
335
340
|
declare function resendUserAction(config: ChatConfig, userActionId: string): Promise<UserActionResponse>;
|
|
336
341
|
|
|
337
|
-
export { type APIConfig, type ChatCallbacks, type ChatConfig, type ChunkDisplay, type MessageDisplay, type MessageRole, type SessionParams, type StreamEvent, type StreamOptions, type StreamProgress, type StreamingStep, type UseChatReturn, type UseVoiceReturn, type UserActionRequest, type UserActionResult, type UserActionState, type VoiceCallbacks, type VoiceConfig, type VoicePermissions, type VoiceResult, type VoiceState, type WorkflowStage, cancelUserAction, generateId, resendUserAction, streamWorkflowEvents, submitUserAction, useChat, useVoice };
|
|
342
|
+
export { type APIConfig, type ChatCallbacks, type ChatConfig, type ChunkDisplay, type MessageDisplay, type MessageRole, type SessionParams, type StreamEvent, type StreamOptions, type StreamProgress, type StreamingStep, type UseChatReturn, type UseVoiceReturn, type UserActionRequest, type UserActionResult, type UserActionState, type UserActionType, type VoiceCallbacks, type VoiceConfig, type VoicePermissions, type VoiceResult, type VoiceState, type WorkflowStage, cancelUserAction, generateId, resendUserAction, streamWorkflowEvents, submitUserAction, useChat, useVoice };
|
package/dist/index.js
CHANGED
|
@@ -336,8 +336,10 @@ function processStreamEvent(event, state) {
|
|
|
336
336
|
if (event.userActionRequest) {
|
|
337
337
|
state.userActionRequest = {
|
|
338
338
|
userActionId: event.userActionRequest.userActionId,
|
|
339
|
+
userActionType: event.userActionRequest.userActionType,
|
|
339
340
|
message: event.userActionRequest.message,
|
|
340
|
-
requestedSchema: event.userActionRequest.requestedSchema
|
|
341
|
+
requestedSchema: event.userActionRequest.requestedSchema,
|
|
342
|
+
metadata: event.userActionRequest.metadata
|
|
341
343
|
};
|
|
342
344
|
}
|
|
343
345
|
state.userActionPending = true;
|