@sendbird/ai-agent-messenger-react 1.36.0 → 1.38.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/README.md +1 -1
- package/dist/cjs/B9JzuCyz.cjs +1 -0
- package/dist/cjs/BQ8EaWkc.cjs +1 -0
- package/dist/cjs/C116E0pr.cjs +1 -0
- package/dist/cjs/C2Oi-KA4.cjs +1 -0
- package/dist/cjs/C3VEshQr.cjs +1 -0
- package/dist/cjs/CIjjIGUs.cjs +1 -0
- package/dist/cjs/CKr98WbE.cjs +1 -0
- package/dist/cjs/Cr2LxvlJ.cjs +1 -0
- package/dist/cjs/LFX2h7v2.cjs +1 -0
- package/dist/es/{DbWklFH0.js → 0pQ1gLAM.js} +5 -4
- package/dist/es/{FMOCAKFw.js → 2cuzbJp5.js} +5 -4
- package/dist/es/{Dh05zfqw.js → Bz42IMvh.js} +5 -4
- package/dist/es/{hPxGrQQg.js → C6lvBtlQ.js} +3 -2
- package/dist/es/{BDCT28XM.js → CPxk5f9K.js} +1 -0
- package/dist/es/{CZXgaS-3.js → CrgvxcG1.js} +1 -0
- package/dist/es/{C5fUw0RP.js → DQJT1L-o.js} +1 -0
- package/dist/es/{RwjGyHFV.js → DYWGE-YD.js} +1 -0
- package/dist/es/{BWCZN9kg.js → yYj8P0Nc.js} +3 -2
- package/dist/index.cjs +177 -177
- package/dist/index.d.ts +138 -7
- package/dist/index.js +4788 -4493
- package/package.json +6 -6
- package/dist/cjs/BMDJStMQ.cjs +0 -1
- package/dist/cjs/CLIpC7kY.cjs +0 -1
- package/dist/cjs/CPZf2TWM.cjs +0 -1
- package/dist/cjs/ChrM6HN1.cjs +0 -1
- package/dist/cjs/D7UQ9OK7.cjs +0 -1
- package/dist/cjs/DKQwAy8C.cjs +0 -1
- package/dist/cjs/D_km8dcd.cjs +0 -1
- package/dist/cjs/I-l-5Zo-.cjs +0 -1
- package/dist/cjs/etCQgYrr.cjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { ComponentType } from 'react';
|
|
|
8
8
|
import { Context } from 'react';
|
|
9
9
|
import type { Conversation as Conversation_2 } from '@sendbird/chat/aiAgent';
|
|
10
10
|
import type { ConversationStatus } from '@sendbird/chat/aiAgent';
|
|
11
|
+
import type { CPAAuthorizationErrorCode } from '@sendbird/chat/aiAgent';
|
|
11
12
|
import { CSSProperties } from 'react';
|
|
12
13
|
import type { DeskChannelFilter } from '@sendbird/chat/aiAgent';
|
|
13
14
|
import type { FileMessage } from '@sendbird/chat/message';
|
|
@@ -226,6 +227,11 @@ countryCode?: string;
|
|
|
226
227
|
context?: Record<string, string>;
|
|
227
228
|
/**
|
|
228
229
|
* @public
|
|
230
|
+
* @description Customer-provided authorization codes to submit after the messenger session connects.
|
|
231
|
+
* */
|
|
232
|
+
cpaAuthorizationCodes?: CPAAuthorizationCode[];
|
|
233
|
+
/**
|
|
234
|
+
* @public
|
|
229
235
|
* @description AIAgent global default query parameters.
|
|
230
236
|
* */
|
|
231
237
|
queryParams?: AIAgentQueryParams;
|
|
@@ -579,6 +585,7 @@ declare interface AIAgentContextValue {
|
|
|
579
585
|
language: string;
|
|
580
586
|
countryCode?: string;
|
|
581
587
|
context?: Record<string, string>;
|
|
588
|
+
cpaAuthorizationCodes?: CPAAuthorizationCode[];
|
|
582
589
|
|
|
583
590
|
logger: Loggable;
|
|
584
591
|
dispatcher: Dispatcher;
|
|
@@ -623,11 +630,7 @@ declare interface AIAgentConversationContextValue {
|
|
|
623
630
|
};
|
|
624
631
|
|
|
625
632
|
state: {
|
|
626
|
-
streamAnimation:
|
|
627
|
-
isAnimating: boolean;
|
|
628
|
-
start: (id: string | number) => void;
|
|
629
|
-
stop: (id: string | number) => void;
|
|
630
|
-
};
|
|
633
|
+
streamAnimation: StreamAnimation;
|
|
631
634
|
input: InputState;
|
|
632
635
|
};
|
|
633
636
|
|
|
@@ -745,6 +748,8 @@ declare interface AIAgentInterface {
|
|
|
745
748
|
countryCode?: string;
|
|
746
749
|
/** The context object for AI Agent */
|
|
747
750
|
context?: Record<string, string>;
|
|
751
|
+
/** Customer-provided authorization codes to submit after authentication connects */
|
|
752
|
+
cpaAuthorizationCodes?: CPAAuthorizationCode[];
|
|
748
753
|
|
|
749
754
|
/** @internal Agent version for conversation initialization */
|
|
750
755
|
agentVersion?: number;
|
|
@@ -776,6 +781,10 @@ declare interface AIAgentInterface {
|
|
|
776
781
|
updateContext: (channelUrl: string, context: Record<string, string>) => Promise<ContextObject>;
|
|
777
782
|
/** Retrieves the context data for the specified channel */
|
|
778
783
|
getContextObject: (channelUrl: string) => Promise<ContextObject>;
|
|
784
|
+
/** Requests a nudge message to be shown above the launcher. Fire-and-forget: the result is only broadcast to onNudgeMessageReceived subscribers */
|
|
785
|
+
requestNudgeMessage: (params: RequestNudgeMessageParams) => Promise<void>;
|
|
786
|
+
/** Submits customer-provided authorization codes for the current user */
|
|
787
|
+
submitCPAAuthorizationCodes: (authCodes: CPAAuthorizationCode[]) => Promise<SubmitCPAAuthorizationCodesResponse>;
|
|
779
788
|
/** Clears memories saved for the current user */
|
|
780
789
|
clearUserMemories: (params?: ClearUserMemoriesParams) => Promise<void>;
|
|
781
790
|
|
|
@@ -786,7 +795,7 @@ declare interface AIAgentInterface {
|
|
|
786
795
|
setUserMemoryState: (params: SetUserMemoryStateParams) => Promise<MemoryInfo>;
|
|
787
796
|
|
|
788
797
|
/** @internal Initializes a conversation on the channel if needed (AI Agent channel without conversation). */
|
|
789
|
-
initConversationIfNeeded: (channel: ChatSDKGroupChannel) => Promise<void>;
|
|
798
|
+
initConversationIfNeeded: (channel: ChatSDKGroupChannel, params?: { initialUserMessage?: string }) => Promise<void>;
|
|
790
799
|
|
|
791
800
|
/** @internal Live metric handler; bridged from {@link AIAgentClientHandlers.onLiveMetric}. */
|
|
792
801
|
onLiveMetric?: LiveMetricDispatch;
|
|
@@ -797,6 +806,8 @@ declare interface AIAgentInterface {
|
|
|
797
806
|
/** Disposes all resources held by this instance (WebSocket, desk auth, event handlers). */
|
|
798
807
|
dispose: () => void;
|
|
799
808
|
|
|
809
|
+
/** Registers a handler for nudge message responses */
|
|
810
|
+
onNudgeMessageReceived: (handler: (response: NudgeMessageResponse) => void) => () => void;
|
|
800
811
|
/** Registers a handler for messenger settings updates */
|
|
801
812
|
onMessengerSettingsUpdated: (handler: (params: MessengerSettingsUpdatedParams) => void) => () => void;
|
|
802
813
|
/** Registers a handler for active channel updates */
|
|
@@ -832,6 +843,7 @@ declare interface AIAgentMessengerSessionContextValue {
|
|
|
832
843
|
createConversation: (params: ConversationCreateParams) => Promise<string>;
|
|
833
844
|
searchConversation: (params: SearchConversationParams) => Promise<string[]>;
|
|
834
845
|
refreshActiveChannel: () => Promise<string>;
|
|
846
|
+
submitCPAAuthorizationCodes: (authCodes: CPAAuthorizationCode[]) => Promise<SubmitCPAAuthorizationCodesResponse>;
|
|
835
847
|
|
|
836
848
|
authenticate: () => Promise<MessengerSettingsResponse>;
|
|
837
849
|
deauthenticate: () => Promise<void>;
|
|
@@ -844,6 +856,7 @@ declare interface AIAgentMessengerSessionRef {
|
|
|
844
856
|
chatSDK: AIAgentContextValue['chatSDK'];
|
|
845
857
|
authenticate: () => Promise<MessengerSettingsResponse>;
|
|
846
858
|
deauthenticate: () => Promise<void>;
|
|
859
|
+
submitCPAAuthorizationCodes: (authCodes: CPAAuthorizationCode[]) => Promise<SubmitCPAAuthorizationCodesResponse>;
|
|
847
860
|
getContextObject: () => Promise<ContextObject>;
|
|
848
861
|
updateContext: {
|
|
849
862
|
/** Updates the context of the active conversation initialized at session start. */
|
|
@@ -857,6 +870,8 @@ declare interface AIAgentMessengerSessionRef {
|
|
|
857
870
|
/** Patches the context of a specific conversation by aiAgentId and channelUrl. */
|
|
858
871
|
(aiAgentId: string, channelUrl: string, context: Record<string, string>): Promise<ContextObject>;
|
|
859
872
|
};
|
|
873
|
+
/** Requests a nudge message to be shown above the launcher. Fire-and-forget: the response is not exposed. */
|
|
874
|
+
requestNudgeMessage: (params: RequestNudgeMessageParams) => Promise<void>;
|
|
860
875
|
}
|
|
861
876
|
|
|
862
877
|
export declare type AIAgentProps = PropsWithChildren<{
|
|
@@ -957,6 +972,11 @@ export declare type AIAgentProps = PropsWithChildren<{
|
|
|
957
972
|
* @description Context object for the AI agent client. This is injected when the messenger is first loaded and can provide additional context that may influence how the AI responds to user conversations.
|
|
958
973
|
* */
|
|
959
974
|
context?: Record<string, string>;
|
|
975
|
+
/**
|
|
976
|
+
* @public
|
|
977
|
+
* @description Customer-provided authorization codes to submit after the messenger session connects.
|
|
978
|
+
* */
|
|
979
|
+
cpaAuthorizationCodes?: CPAAuthorizationCode[];
|
|
960
980
|
/**
|
|
961
981
|
* @public
|
|
962
982
|
* @description AIAgent global default query parameters.
|
|
@@ -1163,6 +1183,7 @@ declare interface AIAgentStringSet {
|
|
|
1163
1183
|
a11y_send_message: string;
|
|
1164
1184
|
a11y_attach_file: string;
|
|
1165
1185
|
a11y_close_messenger: string;
|
|
1186
|
+
a11y_dismiss_nudge_message: string;
|
|
1166
1187
|
a11y_expand_messenger: string;
|
|
1167
1188
|
a11y_collapse_messenger: string;
|
|
1168
1189
|
a11y_connect_agent: string;
|
|
@@ -1462,6 +1483,8 @@ declare type ChatSDKConversation = Conversation_2;
|
|
|
1462
1483
|
|
|
1463
1484
|
declare type ChatSDKConversationStatus = ConversationStatus;
|
|
1464
1485
|
|
|
1486
|
+
declare type ChatSDKCPAAuthorizationErrorCode = CPAAuthorizationErrorCode;
|
|
1487
|
+
|
|
1465
1488
|
declare type ChatSDKDeskChannelFilter = DeskChannelFilter;
|
|
1466
1489
|
|
|
1467
1490
|
declare type ChatSDKFileMessage = FileMessage;
|
|
@@ -1540,6 +1563,9 @@ declare interface ColorSet {
|
|
|
1540
1563
|
csat: {
|
|
1541
1564
|
background: string;
|
|
1542
1565
|
};
|
|
1566
|
+
conversation: {
|
|
1567
|
+
headerProfileSkeleton: string;
|
|
1568
|
+
};
|
|
1543
1569
|
memoryDialog: {
|
|
1544
1570
|
titleText: string;
|
|
1545
1571
|
markdownBodyText: string;
|
|
@@ -1578,6 +1604,7 @@ declare interface CommandPayloads {
|
|
|
1578
1604
|
[CommandType.ActiveChannelUpdated]: ActiveChannelUpdatedParams;
|
|
1579
1605
|
[CommandType.AnonymousSessionTokenExpired]: undefined;
|
|
1580
1606
|
[CommandType.AuthTokenRefreshed]: AuthTokenRefreshedParams;
|
|
1607
|
+
[CommandType.NudgeMessageReceived]: NudgeMessageResponse;
|
|
1581
1608
|
}
|
|
1582
1609
|
|
|
1583
1610
|
export declare const Commands = {
|
|
@@ -1586,6 +1613,7 @@ export declare const Commands = {
|
|
|
1586
1613
|
ActiveChannelUpdated: (params: ActiveChannelUpdatedParams) => new ActiveChannelUpdatedCommand(params),
|
|
1587
1614
|
AnonymousSessionTokenExpired: () => new AnonymousSessionTokenExpiredCommand(),
|
|
1588
1615
|
AuthTokenRefreshed: () => new AuthTokenRefreshedCommand(),
|
|
1616
|
+
NudgeMessageReceived: (response: NudgeMessageResponse) => new NudgeMessageReceivedCommand(response),
|
|
1589
1617
|
};
|
|
1590
1618
|
|
|
1591
1619
|
declare enum CommandType {
|
|
@@ -1594,6 +1622,7 @@ declare enum CommandType {
|
|
|
1594
1622
|
ActiveChannelUpdated = 'active.channel.updated',
|
|
1595
1623
|
AnonymousSessionTokenExpired = 'anon.token.expired',
|
|
1596
1624
|
AuthTokenRefreshed = 'auth.token.refreshed',
|
|
1625
|
+
NudgeMessageReceived = 'nudge.message.received',
|
|
1597
1626
|
}
|
|
1598
1627
|
|
|
1599
1628
|
export declare interface ConnectionDelayDialogProps {
|
|
@@ -1639,7 +1668,7 @@ declare interface ContextObject {
|
|
|
1639
1668
|
context: Record<string, string>;
|
|
1640
1669
|
}
|
|
1641
1670
|
|
|
1642
|
-
export declare const Conversation: ({ children, onNavigateToConversationList, channelUrl, onClearChannelUrl, shouldMarkAsRead, shouldInitializeConversation, announcementsEnabled, conversationStatsEnabled, initialFocusTarget, style, closedChannelUrl, onClearClosedChannelUrl, }: ConversationProps) => JSX.Element;
|
|
1671
|
+
export declare const Conversation: ({ children, onNavigateToConversationList, channelUrl, onClearChannelUrl, shouldMarkAsRead, shouldInitializeConversation, initialUserMessage, announcementsEnabled, conversationStatsEnabled, initialFocusTarget, style, closedChannelUrl, onClearClosedChannelUrl, }: ConversationProps) => JSX.Element;
|
|
1643
1672
|
|
|
1644
1673
|
export declare const ConversationContext: Context<ConversationContextValue | null>;
|
|
1645
1674
|
|
|
@@ -1651,6 +1680,7 @@ declare interface ConversationContextProps {
|
|
|
1651
1680
|
conversationStatsEnabled?: boolean;
|
|
1652
1681
|
/** @internal */
|
|
1653
1682
|
shouldInitializeConversation?: boolean;
|
|
1683
|
+
initialUserMessage?: string;
|
|
1654
1684
|
}
|
|
1655
1685
|
|
|
1656
1686
|
export declare const ConversationContextProvider: ({ children, ...props }: PropsWithChildren<ConversationContextProps>) => JSX.Element;
|
|
@@ -2709,6 +2739,12 @@ export declare type ConversationProps = PropsWithChildren<{
|
|
|
2709
2739
|
shouldMarkAsRead?: boolean;
|
|
2710
2740
|
/** @internal */
|
|
2711
2741
|
shouldInitializeConversation?: boolean;
|
|
2742
|
+
/**
|
|
2743
|
+
* Message to send as the first user message when the conversation is initialized
|
|
2744
|
+
* on the server (e.g., the callback user message of a clicked nudge message).
|
|
2745
|
+
* Applied only when the channel has no conversation yet.
|
|
2746
|
+
*/
|
|
2747
|
+
initialUserMessage?: string;
|
|
2712
2748
|
announcementsEnabled?: boolean;
|
|
2713
2749
|
/** @default true */
|
|
2714
2750
|
conversationStatsEnabled?: boolean;
|
|
@@ -2774,6 +2810,19 @@ declare interface ConversationScrollContextValue {
|
|
|
2774
2810
|
|
|
2775
2811
|
declare type ConversationScrollMode = 'auto' | 'fixed';
|
|
2776
2812
|
|
|
2813
|
+
declare interface CPAAuthorizationCode {
|
|
2814
|
+
key: string;
|
|
2815
|
+
code: string;
|
|
2816
|
+
redirectURI?: string;
|
|
2817
|
+
}
|
|
2818
|
+
|
|
2819
|
+
declare interface CPAAuthorizationResult {
|
|
2820
|
+
key: string;
|
|
2821
|
+
status: 'ok' | 'error';
|
|
2822
|
+
errorCode?: ChatSDKCPAAuthorizationErrorCode;
|
|
2823
|
+
errorMessage?: string;
|
|
2824
|
+
}
|
|
2825
|
+
|
|
2777
2826
|
declare type CSATSubmitParams = {
|
|
2778
2827
|
csatType: string;
|
|
2779
2828
|
csat?: number;
|
|
@@ -3015,6 +3064,7 @@ export declare interface ExtendedMessagePayload {
|
|
|
3015
3064
|
declare type ExternalAuthTokenExpiredData = {
|
|
3016
3065
|
channelUrl: string;
|
|
3017
3066
|
aiAgentId: string;
|
|
3067
|
+
cpaKey: string;
|
|
3018
3068
|
};
|
|
3019
3069
|
|
|
3020
3070
|
export declare interface FeedbackInfo {
|
|
@@ -3165,6 +3215,12 @@ BaseMessageProps<{
|
|
|
3165
3215
|
onStreamAnimationStart?: () => void;
|
|
3166
3216
|
onStreamAnimationProgress?: () => void;
|
|
3167
3217
|
onStreamAnimationComplete?: () => void;
|
|
3218
|
+
/**
|
|
3219
|
+
* Fired (layout effect) when this row starts/stops holding its text — the stream animation is
|
|
3220
|
+
* running but nothing is visible yet. The row renders nothing while holding, so the list draws its
|
|
3221
|
+
* single typing row on the row's behalf and keeps the held row out of the accessibility tree.
|
|
3222
|
+
*/
|
|
3223
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3168
3224
|
|
|
3169
3225
|
// fallbacks
|
|
3170
3226
|
messageTemplateErrorFallback?: ReactNode;
|
|
@@ -3255,6 +3311,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3255
3311
|
onStreamAnimationStart?: () => void;
|
|
3256
3312
|
onStreamAnimationProgress?: () => void;
|
|
3257
3313
|
onStreamAnimationComplete?: () => void;
|
|
3314
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3258
3315
|
messageTemplateErrorFallback?: ReactNode;
|
|
3259
3316
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3260
3317
|
} & {
|
|
@@ -3333,6 +3390,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3333
3390
|
onStreamAnimationStart?: () => void;
|
|
3334
3391
|
onStreamAnimationProgress?: () => void;
|
|
3335
3392
|
onStreamAnimationComplete?: () => void;
|
|
3393
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3336
3394
|
messageTemplateErrorFallback?: ReactNode;
|
|
3337
3395
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3338
3396
|
} & {
|
|
@@ -3411,6 +3469,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3411
3469
|
onStreamAnimationStart?: () => void;
|
|
3412
3470
|
onStreamAnimationProgress?: () => void;
|
|
3413
3471
|
onStreamAnimationComplete?: () => void;
|
|
3472
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3414
3473
|
messageTemplateErrorFallback?: ReactNode;
|
|
3415
3474
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3416
3475
|
} & {
|
|
@@ -3485,6 +3544,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3485
3544
|
onStreamAnimationStart?: () => void;
|
|
3486
3545
|
onStreamAnimationProgress?: () => void;
|
|
3487
3546
|
onStreamAnimationComplete?: () => void;
|
|
3547
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3488
3548
|
messageTemplateErrorFallback?: ReactNode;
|
|
3489
3549
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3490
3550
|
} & {
|
|
@@ -3563,6 +3623,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3563
3623
|
onStreamAnimationStart?: () => void;
|
|
3564
3624
|
onStreamAnimationProgress?: () => void;
|
|
3565
3625
|
onStreamAnimationComplete?: () => void;
|
|
3626
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3566
3627
|
messageTemplateErrorFallback?: ReactNode;
|
|
3567
3628
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3568
3629
|
} & {
|
|
@@ -3641,6 +3702,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3641
3702
|
onStreamAnimationStart?: () => void;
|
|
3642
3703
|
onStreamAnimationProgress?: () => void;
|
|
3643
3704
|
onStreamAnimationComplete?: () => void;
|
|
3705
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3644
3706
|
messageTemplateErrorFallback?: ReactNode;
|
|
3645
3707
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3646
3708
|
} & {
|
|
@@ -3747,6 +3809,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3747
3809
|
onStreamAnimationStart?: () => void;
|
|
3748
3810
|
onStreamAnimationProgress?: () => void;
|
|
3749
3811
|
onStreamAnimationComplete?: () => void;
|
|
3812
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3750
3813
|
messageTemplateErrorFallback?: ReactNode;
|
|
3751
3814
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3752
3815
|
} & {
|
|
@@ -3825,6 +3888,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3825
3888
|
onStreamAnimationStart?: () => void;
|
|
3826
3889
|
onStreamAnimationProgress?: () => void;
|
|
3827
3890
|
onStreamAnimationComplete?: () => void;
|
|
3891
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3828
3892
|
messageTemplateErrorFallback?: ReactNode;
|
|
3829
3893
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3830
3894
|
} & {
|
|
@@ -3903,6 +3967,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3903
3967
|
onStreamAnimationStart?: () => void;
|
|
3904
3968
|
onStreamAnimationProgress?: () => void;
|
|
3905
3969
|
onStreamAnimationComplete?: () => void;
|
|
3970
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3906
3971
|
messageTemplateErrorFallback?: ReactNode;
|
|
3907
3972
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3908
3973
|
} & {
|
|
@@ -3977,6 +4042,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3977
4042
|
onStreamAnimationStart?: () => void;
|
|
3978
4043
|
onStreamAnimationProgress?: () => void;
|
|
3979
4044
|
onStreamAnimationComplete?: () => void;
|
|
4045
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3980
4046
|
messageTemplateErrorFallback?: ReactNode;
|
|
3981
4047
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3982
4048
|
} & {
|
|
@@ -4055,6 +4121,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4055
4121
|
onStreamAnimationStart?: () => void;
|
|
4056
4122
|
onStreamAnimationProgress?: () => void;
|
|
4057
4123
|
onStreamAnimationComplete?: () => void;
|
|
4124
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4058
4125
|
messageTemplateErrorFallback?: ReactNode;
|
|
4059
4126
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4060
4127
|
} & {
|
|
@@ -4133,6 +4200,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4133
4200
|
onStreamAnimationStart?: () => void;
|
|
4134
4201
|
onStreamAnimationProgress?: () => void;
|
|
4135
4202
|
onStreamAnimationComplete?: () => void;
|
|
4203
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4136
4204
|
messageTemplateErrorFallback?: ReactNode;
|
|
4137
4205
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4138
4206
|
} & {
|
|
@@ -4234,6 +4302,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4234
4302
|
onStreamAnimationStart?: () => void;
|
|
4235
4303
|
onStreamAnimationProgress?: () => void;
|
|
4236
4304
|
onStreamAnimationComplete?: () => void;
|
|
4305
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4237
4306
|
messageTemplateErrorFallback?: ReactNode;
|
|
4238
4307
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4239
4308
|
} & {
|
|
@@ -4312,6 +4381,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4312
4381
|
onStreamAnimationStart?: () => void;
|
|
4313
4382
|
onStreamAnimationProgress?: () => void;
|
|
4314
4383
|
onStreamAnimationComplete?: () => void;
|
|
4384
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4315
4385
|
messageTemplateErrorFallback?: ReactNode;
|
|
4316
4386
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4317
4387
|
} & {
|
|
@@ -4390,6 +4460,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4390
4460
|
onStreamAnimationStart?: () => void;
|
|
4391
4461
|
onStreamAnimationProgress?: () => void;
|
|
4392
4462
|
onStreamAnimationComplete?: () => void;
|
|
4463
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4393
4464
|
messageTemplateErrorFallback?: ReactNode;
|
|
4394
4465
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4395
4466
|
} & {
|
|
@@ -4464,6 +4535,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4464
4535
|
onStreamAnimationStart?: () => void;
|
|
4465
4536
|
onStreamAnimationProgress?: () => void;
|
|
4466
4537
|
onStreamAnimationComplete?: () => void;
|
|
4538
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4467
4539
|
messageTemplateErrorFallback?: ReactNode;
|
|
4468
4540
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4469
4541
|
} & {
|
|
@@ -4542,6 +4614,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4542
4614
|
onStreamAnimationStart?: () => void;
|
|
4543
4615
|
onStreamAnimationProgress?: () => void;
|
|
4544
4616
|
onStreamAnimationComplete?: () => void;
|
|
4617
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4545
4618
|
messageTemplateErrorFallback?: ReactNode;
|
|
4546
4619
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4547
4620
|
} & {
|
|
@@ -4620,6 +4693,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4620
4693
|
onStreamAnimationStart?: () => void;
|
|
4621
4694
|
onStreamAnimationProgress?: () => void;
|
|
4622
4695
|
onStreamAnimationComplete?: () => void;
|
|
4696
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4623
4697
|
messageTemplateErrorFallback?: ReactNode;
|
|
4624
4698
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4625
4699
|
} & {
|
|
@@ -4744,6 +4818,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4744
4818
|
onStreamAnimationStart?: () => void;
|
|
4745
4819
|
onStreamAnimationProgress?: () => void;
|
|
4746
4820
|
onStreamAnimationComplete?: () => void;
|
|
4821
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4747
4822
|
messageTemplateErrorFallback?: ReactNode;
|
|
4748
4823
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4749
4824
|
} & {
|
|
@@ -4822,6 +4897,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4822
4897
|
onStreamAnimationStart?: () => void;
|
|
4823
4898
|
onStreamAnimationProgress?: () => void;
|
|
4824
4899
|
onStreamAnimationComplete?: () => void;
|
|
4900
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4825
4901
|
messageTemplateErrorFallback?: ReactNode;
|
|
4826
4902
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4827
4903
|
} & {
|
|
@@ -4900,6 +4976,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4900
4976
|
onStreamAnimationStart?: () => void;
|
|
4901
4977
|
onStreamAnimationProgress?: () => void;
|
|
4902
4978
|
onStreamAnimationComplete?: () => void;
|
|
4979
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4903
4980
|
messageTemplateErrorFallback?: ReactNode;
|
|
4904
4981
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4905
4982
|
} & {
|
|
@@ -4976,6 +5053,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4976
5053
|
onStreamAnimationStart?: () => void;
|
|
4977
5054
|
onStreamAnimationProgress?: () => void;
|
|
4978
5055
|
onStreamAnimationComplete?: () => void;
|
|
5056
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4979
5057
|
messageTemplateErrorFallback?: ReactNode;
|
|
4980
5058
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4981
5059
|
} & {
|
|
@@ -5054,6 +5132,7 @@ export declare const IncomingMessageLayout: {
|
|
|
5054
5132
|
onStreamAnimationStart?: () => void;
|
|
5055
5133
|
onStreamAnimationProgress?: () => void;
|
|
5056
5134
|
onStreamAnimationComplete?: () => void;
|
|
5135
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
5057
5136
|
messageTemplateErrorFallback?: ReactNode;
|
|
5058
5137
|
messageTemplateLoadingFallback?: ReactNode;
|
|
5059
5138
|
} & {
|
|
@@ -5132,6 +5211,7 @@ export declare const IncomingMessageLayout: {
|
|
|
5132
5211
|
onStreamAnimationStart?: () => void;
|
|
5133
5212
|
onStreamAnimationProgress?: () => void;
|
|
5134
5213
|
onStreamAnimationComplete?: () => void;
|
|
5214
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
5135
5215
|
messageTemplateErrorFallback?: ReactNode;
|
|
5136
5216
|
messageTemplateLoadingFallback?: ReactNode;
|
|
5137
5217
|
} & {
|
|
@@ -5613,6 +5693,9 @@ declare class MessagePendingStuckStatsTracker extends MultiStatsTrackerBase<Mess
|
|
|
5613
5693
|
}
|
|
5614
5694
|
}
|
|
5615
5695
|
|
|
5696
|
+
/** How a message's sender is drawn: the typing row's user and every message row's sender share this. */
|
|
5697
|
+
declare type MessageSenderInfo = { userId: string; nickname: string; profileUrl?: string };
|
|
5698
|
+
|
|
5616
5699
|
declare interface MessageTemplateCache {
|
|
5617
5700
|
set(key: string, value: string): void;
|
|
5618
5701
|
get(key: string): string | null;
|
|
@@ -5840,6 +5923,13 @@ declare interface NetworkStateAdapter {
|
|
|
5840
5923
|
subscribe: (callback: (isOnline: boolean) => void) => () => void;
|
|
5841
5924
|
}
|
|
5842
5925
|
|
|
5926
|
+
export declare interface NudgeMessageResponse {
|
|
5927
|
+
/** Message to display above the launcher. */
|
|
5928
|
+
message: string;
|
|
5929
|
+
/** Message to send as the first user message when the nudge is clicked. */
|
|
5930
|
+
callbackUserMessage?: string;
|
|
5931
|
+
}
|
|
5932
|
+
|
|
5843
5933
|
declare type NumberField = {
|
|
5844
5934
|
key: string;
|
|
5845
5935
|
type: 'number';
|
|
@@ -6421,6 +6511,13 @@ declare class RenderedContentUnusableStatsTracker extends StatsTrackerBase {
|
|
|
6421
6511
|
}
|
|
6422
6512
|
}
|
|
6423
6513
|
|
|
6514
|
+
export declare interface RequestNudgeMessageParams {
|
|
6515
|
+
/** Event key that triggers the nudge message. */
|
|
6516
|
+
key: string;
|
|
6517
|
+
/** Additional context for the server to generate the message. */
|
|
6518
|
+
context?: Record<string, string>;
|
|
6519
|
+
}
|
|
6520
|
+
|
|
6424
6521
|
declare interface ResolvedHandlers extends AgentClientHandlers {
|
|
6425
6522
|
onClickLink: (params: {
|
|
6426
6523
|
url: string;
|
|
@@ -6602,6 +6699,25 @@ declare enum StewardTaskStatus {
|
|
|
6602
6699
|
CANCELED = 'CANCELED',
|
|
6603
6700
|
}
|
|
6604
6701
|
|
|
6702
|
+
declare type StreamAnimation = {
|
|
6703
|
+
isAnimating: boolean;
|
|
6704
|
+
start: (id: string | number) => void;
|
|
6705
|
+
stop: (id: string | number) => void;
|
|
6706
|
+
isHolding: (id: string | number) => boolean;
|
|
6707
|
+
/**
|
|
6708
|
+
* Set while a row holds its streamed text. The list draws a single typing row, so it falls back to
|
|
6709
|
+
* this when nobody is typing — a live typing signal always wins.
|
|
6710
|
+
*
|
|
6711
|
+
* Never carries a thinking message, deliberately: a row enters the hold only after its reply started
|
|
6712
|
+
* streaming, so the agent's thinking phase is over by then — the frame is held back by our own start
|
|
6713
|
+
* gate, not by the agent still thinking. Relaying the last thinking text here would report a state it
|
|
6714
|
+
* has already left, so the typing row falls back to dots for this window.
|
|
6715
|
+
*/
|
|
6716
|
+
heldTypingInfo?: TypingRowInfo;
|
|
6717
|
+
holdStart: (id: string | number, info: TypingRowInfo) => void;
|
|
6718
|
+
holdStop: (id: string | number) => void;
|
|
6719
|
+
};
|
|
6720
|
+
|
|
6605
6721
|
declare type StreamMeasure = {
|
|
6606
6722
|
channelUrl?: string;
|
|
6607
6723
|
deliveryTimer: TimeoutId | null;
|
|
@@ -7075,6 +7191,7 @@ export declare type StringSet = {
|
|
|
7075
7191
|
A11Y_CONVERSATION_ITEM: (agent: string, status: string, time: string, count: number) => string;
|
|
7076
7192
|
A11Y_CONNECT_AGENT: string;
|
|
7077
7193
|
A11Y_CLOSE_MESSENGER: string;
|
|
7194
|
+
A11Y_DISMISS_NUDGE_MESSAGE: string;
|
|
7078
7195
|
A11Y_EXPAND_MESSENGER: string;
|
|
7079
7196
|
A11Y_COLLAPSE_MESSENGER: string;
|
|
7080
7197
|
A11Y_HINT_SEND_MESSAGE: string;
|
|
@@ -7131,6 +7248,10 @@ export declare type StringSet = {
|
|
|
7131
7248
|
CHANNEL_FROZEN: string;
|
|
7132
7249
|
};
|
|
7133
7250
|
|
|
7251
|
+
declare interface SubmitCPAAuthorizationCodesResponse {
|
|
7252
|
+
cpaAuthorizations: CPAAuthorizationResult[];
|
|
7253
|
+
}
|
|
7254
|
+
|
|
7134
7255
|
declare type SystemBaseMessageProps<T> = T & BaseMessageProps<{}>;
|
|
7135
7256
|
|
|
7136
7257
|
declare type SystemCSATMessageProps = SystemMessageProps & {
|
|
@@ -7478,6 +7599,16 @@ declare type TypingMeasure = {
|
|
|
7478
7599
|
userMessageId?: number;
|
|
7479
7600
|
};
|
|
7480
7601
|
|
|
7602
|
+
/**
|
|
7603
|
+
* What the list's single typing row renders, whoever it is drawn for. `user.userId` identifies the row
|
|
7604
|
+
* it stands in for, which is how the typing bridge tells the awaited reply from anyone else's.
|
|
7605
|
+
*/
|
|
7606
|
+
declare type TypingRowInfo = {
|
|
7607
|
+
user: MessageSenderInfo;
|
|
7608
|
+
isBot: boolean;
|
|
7609
|
+
thinkingMessage?: string;
|
|
7610
|
+
};
|
|
7611
|
+
|
|
7481
7612
|
declare type TypingTurnEntry = {
|
|
7482
7613
|
requestId: string;
|
|
7483
7614
|
record: StatsRecord<TypingIndicatorAbsentTimeoutStats, TypingMeasure>;
|