@sendbird/ai-agent-messenger-react 1.37.0 → 1.39.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/dist/cjs/6HoSeQJQ.cjs +1 -0
- package/dist/es/{BiIgmoXQ.js → BQuWAZUg.js} +31 -27
- package/dist/es/{ClcdzLx5.js → DeJTwD_w.js} +1 -1
- package/dist/index.cjs +166 -156
- package/dist/index.d.ts +128 -16
- package/dist/index.js +4778 -4514
- package/package.json +2 -2
- package/dist/cjs/VvejebHE.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;
|
|
@@ -421,8 +427,8 @@ declare interface AIAgentClientHandlers {
|
|
|
421
427
|
onClickLink?: (params: { url: string }) => void;
|
|
422
428
|
/**
|
|
423
429
|
* Called whenever the SDK emits a live metric — connection, conversation lifecycle,
|
|
424
|
-
* handoff, and
|
|
425
|
-
* efficient and non-blocking, as this may be called frequently.
|
|
430
|
+
* handoff, message, and memory dialog events. Use for real-time analytics. Implementations
|
|
431
|
+
* should be efficient and non-blocking, as this may be called frequently.
|
|
426
432
|
*/
|
|
427
433
|
onLiveMetric?: (metric: LiveMetric) => void;
|
|
428
434
|
}
|
|
@@ -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;
|
|
@@ -778,6 +783,8 @@ declare interface AIAgentInterface {
|
|
|
778
783
|
getContextObject: (channelUrl: string) => Promise<ContextObject>;
|
|
779
784
|
/** Requests a nudge message to be shown above the launcher. Fire-and-forget: the result is only broadcast to onNudgeMessageReceived subscribers */
|
|
780
785
|
requestNudgeMessage: (params: RequestNudgeMessageParams) => Promise<void>;
|
|
786
|
+
/** Submits customer-provided authorization codes for the current user */
|
|
787
|
+
submitCPAAuthorizationCodes: (authCodes: CPAAuthorizationCode[]) => Promise<SubmitCPAAuthorizationCodesResponse>;
|
|
781
788
|
/** Clears memories saved for the current user */
|
|
782
789
|
clearUserMemories: (params?: ClearUserMemoriesParams) => Promise<void>;
|
|
783
790
|
|
|
@@ -836,6 +843,7 @@ declare interface AIAgentMessengerSessionContextValue {
|
|
|
836
843
|
createConversation: (params: ConversationCreateParams) => Promise<string>;
|
|
837
844
|
searchConversation: (params: SearchConversationParams) => Promise<string[]>;
|
|
838
845
|
refreshActiveChannel: () => Promise<string>;
|
|
846
|
+
submitCPAAuthorizationCodes: (authCodes: CPAAuthorizationCode[]) => Promise<SubmitCPAAuthorizationCodesResponse>;
|
|
839
847
|
|
|
840
848
|
authenticate: () => Promise<MessengerSettingsResponse>;
|
|
841
849
|
deauthenticate: () => Promise<void>;
|
|
@@ -848,6 +856,7 @@ declare interface AIAgentMessengerSessionRef {
|
|
|
848
856
|
chatSDK: AIAgentContextValue['chatSDK'];
|
|
849
857
|
authenticate: () => Promise<MessengerSettingsResponse>;
|
|
850
858
|
deauthenticate: () => Promise<void>;
|
|
859
|
+
submitCPAAuthorizationCodes: (authCodes: CPAAuthorizationCode[]) => Promise<SubmitCPAAuthorizationCodesResponse>;
|
|
851
860
|
getContextObject: () => Promise<ContextObject>;
|
|
852
861
|
updateContext: {
|
|
853
862
|
/** Updates the context of the active conversation initialized at session start. */
|
|
@@ -963,6 +972,11 @@ export declare type AIAgentProps = PropsWithChildren<{
|
|
|
963
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.
|
|
964
973
|
* */
|
|
965
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[];
|
|
966
980
|
/**
|
|
967
981
|
* @public
|
|
968
982
|
* @description AIAgent global default query parameters.
|
|
@@ -1469,6 +1483,8 @@ declare type ChatSDKConversation = Conversation_2;
|
|
|
1469
1483
|
|
|
1470
1484
|
declare type ChatSDKConversationStatus = ConversationStatus;
|
|
1471
1485
|
|
|
1486
|
+
declare type ChatSDKCPAAuthorizationErrorCode = CPAAuthorizationErrorCode;
|
|
1487
|
+
|
|
1472
1488
|
declare type ChatSDKDeskChannelFilter = DeskChannelFilter;
|
|
1473
1489
|
|
|
1474
1490
|
declare type ChatSDKFileMessage = FileMessage;
|
|
@@ -1691,7 +1707,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
1691
1707
|
TitleArea: () => ReactNode;
|
|
1692
1708
|
EndArea: () => ReactNode;
|
|
1693
1709
|
MenuButton: () => ReactNode;
|
|
1694
|
-
Title: () => ReactNode;
|
|
1710
|
+
Title: (props: HeaderTitleProps) => ReactNode;
|
|
1695
1711
|
MemoryIndicator: () => ReactNode;
|
|
1696
1712
|
HandoffButton: () => ReactNode;
|
|
1697
1713
|
ConversationCloseButton: () => ReactNode;
|
|
@@ -1708,7 +1724,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
1708
1724
|
TitleArea: () => ReactNode;
|
|
1709
1725
|
EndArea: () => ReactNode;
|
|
1710
1726
|
MenuButton: () => ReactNode;
|
|
1711
|
-
Title: () => ReactNode;
|
|
1727
|
+
Title: (props: HeaderTitleProps) => ReactNode;
|
|
1712
1728
|
MemoryIndicator: () => ReactNode;
|
|
1713
1729
|
HandoffButton: () => ReactNode;
|
|
1714
1730
|
ConversationCloseButton: () => ReactNode;
|
|
@@ -1720,7 +1736,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
1720
1736
|
TitleArea: () => ReactNode;
|
|
1721
1737
|
EndArea: () => ReactNode;
|
|
1722
1738
|
MenuButton: () => ReactNode;
|
|
1723
|
-
Title: () => ReactNode;
|
|
1739
|
+
Title: (props: HeaderTitleProps) => ReactNode;
|
|
1724
1740
|
MemoryIndicator: () => ReactNode;
|
|
1725
1741
|
HandoffButton: () => ReactNode;
|
|
1726
1742
|
ConversationCloseButton: () => ReactNode;
|
|
@@ -1741,7 +1757,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
1741
1757
|
component: () => ReactNode;
|
|
1742
1758
|
}) => null;
|
|
1743
1759
|
Title: (props: {
|
|
1744
|
-
component: () => ReactNode;
|
|
1760
|
+
component: (props: HeaderTitleProps) => ReactNode;
|
|
1745
1761
|
}) => null;
|
|
1746
1762
|
MemoryIndicator: (props: {
|
|
1747
1763
|
component: () => ReactNode;
|
|
@@ -2794,6 +2810,19 @@ declare interface ConversationScrollContextValue {
|
|
|
2794
2810
|
|
|
2795
2811
|
declare type ConversationScrollMode = 'auto' | 'fixed';
|
|
2796
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
|
+
|
|
2797
2826
|
declare type CSATSubmitParams = {
|
|
2798
2827
|
csatType: string;
|
|
2799
2828
|
csat?: number;
|
|
@@ -3035,6 +3064,7 @@ export declare interface ExtendedMessagePayload {
|
|
|
3035
3064
|
declare type ExternalAuthTokenExpiredData = {
|
|
3036
3065
|
channelUrl: string;
|
|
3037
3066
|
aiAgentId: string;
|
|
3067
|
+
cpaKey: string;
|
|
3038
3068
|
};
|
|
3039
3069
|
|
|
3040
3070
|
export declare interface FeedbackInfo {
|
|
@@ -3133,6 +3163,11 @@ export declare interface GroundednessInfo {
|
|
|
3133
3163
|
preview_title: string;
|
|
3134
3164
|
}
|
|
3135
3165
|
|
|
3166
|
+
declare interface HeaderTitleProps {
|
|
3167
|
+
/** Overrides the default title, which is derived from the channel (AI agent nickname or channel name). */
|
|
3168
|
+
title?: string;
|
|
3169
|
+
}
|
|
3170
|
+
|
|
3136
3171
|
/**
|
|
3137
3172
|
* Hex color string type. Enforces '#' prefix at compile time.
|
|
3138
3173
|
* Only validates the prefix — does not guarantee valid hex digits or length.
|
|
@@ -3185,6 +3220,12 @@ BaseMessageProps<{
|
|
|
3185
3220
|
onStreamAnimationStart?: () => void;
|
|
3186
3221
|
onStreamAnimationProgress?: () => void;
|
|
3187
3222
|
onStreamAnimationComplete?: () => void;
|
|
3223
|
+
/**
|
|
3224
|
+
* Fired (layout effect) when this row starts/stops holding its text — the stream animation is
|
|
3225
|
+
* running but nothing is visible yet. The row renders nothing while holding, so the list draws its
|
|
3226
|
+
* single typing row on the row's behalf and keeps the held row out of the accessibility tree.
|
|
3227
|
+
*/
|
|
3228
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3188
3229
|
|
|
3189
3230
|
// fallbacks
|
|
3190
3231
|
messageTemplateErrorFallback?: ReactNode;
|
|
@@ -3275,6 +3316,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3275
3316
|
onStreamAnimationStart?: () => void;
|
|
3276
3317
|
onStreamAnimationProgress?: () => void;
|
|
3277
3318
|
onStreamAnimationComplete?: () => void;
|
|
3319
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3278
3320
|
messageTemplateErrorFallback?: ReactNode;
|
|
3279
3321
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3280
3322
|
} & {
|
|
@@ -3353,6 +3395,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3353
3395
|
onStreamAnimationStart?: () => void;
|
|
3354
3396
|
onStreamAnimationProgress?: () => void;
|
|
3355
3397
|
onStreamAnimationComplete?: () => void;
|
|
3398
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3356
3399
|
messageTemplateErrorFallback?: ReactNode;
|
|
3357
3400
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3358
3401
|
} & {
|
|
@@ -3431,6 +3474,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3431
3474
|
onStreamAnimationStart?: () => void;
|
|
3432
3475
|
onStreamAnimationProgress?: () => void;
|
|
3433
3476
|
onStreamAnimationComplete?: () => void;
|
|
3477
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3434
3478
|
messageTemplateErrorFallback?: ReactNode;
|
|
3435
3479
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3436
3480
|
} & {
|
|
@@ -3505,6 +3549,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3505
3549
|
onStreamAnimationStart?: () => void;
|
|
3506
3550
|
onStreamAnimationProgress?: () => void;
|
|
3507
3551
|
onStreamAnimationComplete?: () => void;
|
|
3552
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3508
3553
|
messageTemplateErrorFallback?: ReactNode;
|
|
3509
3554
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3510
3555
|
} & {
|
|
@@ -3583,6 +3628,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3583
3628
|
onStreamAnimationStart?: () => void;
|
|
3584
3629
|
onStreamAnimationProgress?: () => void;
|
|
3585
3630
|
onStreamAnimationComplete?: () => void;
|
|
3631
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3586
3632
|
messageTemplateErrorFallback?: ReactNode;
|
|
3587
3633
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3588
3634
|
} & {
|
|
@@ -3661,6 +3707,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3661
3707
|
onStreamAnimationStart?: () => void;
|
|
3662
3708
|
onStreamAnimationProgress?: () => void;
|
|
3663
3709
|
onStreamAnimationComplete?: () => void;
|
|
3710
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3664
3711
|
messageTemplateErrorFallback?: ReactNode;
|
|
3665
3712
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3666
3713
|
} & {
|
|
@@ -3767,6 +3814,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3767
3814
|
onStreamAnimationStart?: () => void;
|
|
3768
3815
|
onStreamAnimationProgress?: () => void;
|
|
3769
3816
|
onStreamAnimationComplete?: () => void;
|
|
3817
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3770
3818
|
messageTemplateErrorFallback?: ReactNode;
|
|
3771
3819
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3772
3820
|
} & {
|
|
@@ -3845,6 +3893,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3845
3893
|
onStreamAnimationStart?: () => void;
|
|
3846
3894
|
onStreamAnimationProgress?: () => void;
|
|
3847
3895
|
onStreamAnimationComplete?: () => void;
|
|
3896
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3848
3897
|
messageTemplateErrorFallback?: ReactNode;
|
|
3849
3898
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3850
3899
|
} & {
|
|
@@ -3923,6 +3972,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3923
3972
|
onStreamAnimationStart?: () => void;
|
|
3924
3973
|
onStreamAnimationProgress?: () => void;
|
|
3925
3974
|
onStreamAnimationComplete?: () => void;
|
|
3975
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
3926
3976
|
messageTemplateErrorFallback?: ReactNode;
|
|
3927
3977
|
messageTemplateLoadingFallback?: ReactNode;
|
|
3928
3978
|
} & {
|
|
@@ -3997,6 +4047,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3997
4047
|
onStreamAnimationStart?: () => void;
|
|
3998
4048
|
onStreamAnimationProgress?: () => void;
|
|
3999
4049
|
onStreamAnimationComplete?: () => void;
|
|
4050
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4000
4051
|
messageTemplateErrorFallback?: ReactNode;
|
|
4001
4052
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4002
4053
|
} & {
|
|
@@ -4075,6 +4126,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4075
4126
|
onStreamAnimationStart?: () => void;
|
|
4076
4127
|
onStreamAnimationProgress?: () => void;
|
|
4077
4128
|
onStreamAnimationComplete?: () => void;
|
|
4129
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4078
4130
|
messageTemplateErrorFallback?: ReactNode;
|
|
4079
4131
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4080
4132
|
} & {
|
|
@@ -4153,6 +4205,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4153
4205
|
onStreamAnimationStart?: () => void;
|
|
4154
4206
|
onStreamAnimationProgress?: () => void;
|
|
4155
4207
|
onStreamAnimationComplete?: () => void;
|
|
4208
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4156
4209
|
messageTemplateErrorFallback?: ReactNode;
|
|
4157
4210
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4158
4211
|
} & {
|
|
@@ -4254,6 +4307,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4254
4307
|
onStreamAnimationStart?: () => void;
|
|
4255
4308
|
onStreamAnimationProgress?: () => void;
|
|
4256
4309
|
onStreamAnimationComplete?: () => void;
|
|
4310
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4257
4311
|
messageTemplateErrorFallback?: ReactNode;
|
|
4258
4312
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4259
4313
|
} & {
|
|
@@ -4332,6 +4386,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4332
4386
|
onStreamAnimationStart?: () => void;
|
|
4333
4387
|
onStreamAnimationProgress?: () => void;
|
|
4334
4388
|
onStreamAnimationComplete?: () => void;
|
|
4389
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4335
4390
|
messageTemplateErrorFallback?: ReactNode;
|
|
4336
4391
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4337
4392
|
} & {
|
|
@@ -4410,6 +4465,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4410
4465
|
onStreamAnimationStart?: () => void;
|
|
4411
4466
|
onStreamAnimationProgress?: () => void;
|
|
4412
4467
|
onStreamAnimationComplete?: () => void;
|
|
4468
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4413
4469
|
messageTemplateErrorFallback?: ReactNode;
|
|
4414
4470
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4415
4471
|
} & {
|
|
@@ -4484,6 +4540,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4484
4540
|
onStreamAnimationStart?: () => void;
|
|
4485
4541
|
onStreamAnimationProgress?: () => void;
|
|
4486
4542
|
onStreamAnimationComplete?: () => void;
|
|
4543
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4487
4544
|
messageTemplateErrorFallback?: ReactNode;
|
|
4488
4545
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4489
4546
|
} & {
|
|
@@ -4562,6 +4619,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4562
4619
|
onStreamAnimationStart?: () => void;
|
|
4563
4620
|
onStreamAnimationProgress?: () => void;
|
|
4564
4621
|
onStreamAnimationComplete?: () => void;
|
|
4622
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4565
4623
|
messageTemplateErrorFallback?: ReactNode;
|
|
4566
4624
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4567
4625
|
} & {
|
|
@@ -4640,6 +4698,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4640
4698
|
onStreamAnimationStart?: () => void;
|
|
4641
4699
|
onStreamAnimationProgress?: () => void;
|
|
4642
4700
|
onStreamAnimationComplete?: () => void;
|
|
4701
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4643
4702
|
messageTemplateErrorFallback?: ReactNode;
|
|
4644
4703
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4645
4704
|
} & {
|
|
@@ -4764,6 +4823,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4764
4823
|
onStreamAnimationStart?: () => void;
|
|
4765
4824
|
onStreamAnimationProgress?: () => void;
|
|
4766
4825
|
onStreamAnimationComplete?: () => void;
|
|
4826
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4767
4827
|
messageTemplateErrorFallback?: ReactNode;
|
|
4768
4828
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4769
4829
|
} & {
|
|
@@ -4842,6 +4902,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4842
4902
|
onStreamAnimationStart?: () => void;
|
|
4843
4903
|
onStreamAnimationProgress?: () => void;
|
|
4844
4904
|
onStreamAnimationComplete?: () => void;
|
|
4905
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4845
4906
|
messageTemplateErrorFallback?: ReactNode;
|
|
4846
4907
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4847
4908
|
} & {
|
|
@@ -4920,6 +4981,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4920
4981
|
onStreamAnimationStart?: () => void;
|
|
4921
4982
|
onStreamAnimationProgress?: () => void;
|
|
4922
4983
|
onStreamAnimationComplete?: () => void;
|
|
4984
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4923
4985
|
messageTemplateErrorFallback?: ReactNode;
|
|
4924
4986
|
messageTemplateLoadingFallback?: ReactNode;
|
|
4925
4987
|
} & {
|
|
@@ -4996,6 +5058,7 @@ export declare const IncomingMessageLayout: {
|
|
|
4996
5058
|
onStreamAnimationStart?: () => void;
|
|
4997
5059
|
onStreamAnimationProgress?: () => void;
|
|
4998
5060
|
onStreamAnimationComplete?: () => void;
|
|
5061
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
4999
5062
|
messageTemplateErrorFallback?: ReactNode;
|
|
5000
5063
|
messageTemplateLoadingFallback?: ReactNode;
|
|
5001
5064
|
} & {
|
|
@@ -5074,6 +5137,7 @@ export declare const IncomingMessageLayout: {
|
|
|
5074
5137
|
onStreamAnimationStart?: () => void;
|
|
5075
5138
|
onStreamAnimationProgress?: () => void;
|
|
5076
5139
|
onStreamAnimationComplete?: () => void;
|
|
5140
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
5077
5141
|
messageTemplateErrorFallback?: ReactNode;
|
|
5078
5142
|
messageTemplateLoadingFallback?: ReactNode;
|
|
5079
5143
|
} & {
|
|
@@ -5152,6 +5216,7 @@ export declare const IncomingMessageLayout: {
|
|
|
5152
5216
|
onStreamAnimationStart?: () => void;
|
|
5153
5217
|
onStreamAnimationProgress?: () => void;
|
|
5154
5218
|
onStreamAnimationComplete?: () => void;
|
|
5219
|
+
onStreamAnimationHoldChange?: (holding: boolean) => void;
|
|
5155
5220
|
messageTemplateErrorFallback?: ReactNode;
|
|
5156
5221
|
messageTemplateLoadingFallback?: ReactNode;
|
|
5157
5222
|
} & {
|
|
@@ -5330,8 +5395,9 @@ declare interface LiveMetricEmitter<S extends MetricSource = MetricSource> {
|
|
|
5330
5395
|
*
|
|
5331
5396
|
* Registers Sendbird SDK handlers, wraps raw callbacks into {@link MetricSource}s,
|
|
5332
5397
|
* routes each source to its category emitter, and lets emitters dispatch public
|
|
5333
|
-
* metrics through the settable {@link LiveMetricManager.dispatch} sink. Outgoing message
|
|
5334
|
-
*
|
|
5398
|
+
* metrics through the settable {@link LiveMetricManager.dispatch} sink. Outgoing message,
|
|
5399
|
+
* explicit conversation-initialized, and memory dialog sources are injected via
|
|
5400
|
+
* {@link LiveMetricManager.track}.
|
|
5335
5401
|
*/
|
|
5336
5402
|
declare class LiveMetricManager {
|
|
5337
5403
|
private readonly id = 'aiagent_livemetric';
|
|
@@ -5354,6 +5420,7 @@ declare class LiveMetricManager {
|
|
|
5354
5420
|
handoff: new HandoffMetricEmitter(this.emit),
|
|
5355
5421
|
incomingMessage: new IncomingMessageMetricEmitter(this.emit, getCurrentUserId),
|
|
5356
5422
|
outgoingMessage: new OutgoingMessageMetricEmitter(this.emit, getCurrentUserId),
|
|
5423
|
+
memory: new MemoryMetricEmitter(this.emit, getCurrentUserId),
|
|
5357
5424
|
};
|
|
5358
5425
|
}
|
|
5359
5426
|
|
|
@@ -5388,7 +5455,7 @@ declare class LiveMetricManager {
|
|
|
5388
5455
|
|
|
5389
5456
|
/**
|
|
5390
5457
|
* Routes a source to its emitter. Also the entry point for externally injected
|
|
5391
|
-
* sources (outgoing message status, explicit conversation-initialized).
|
|
5458
|
+
* sources (outgoing message status, explicit conversation-initialized, memory dialog).
|
|
5392
5459
|
*/
|
|
5393
5460
|
track(source: MetricSource): void {
|
|
5394
5461
|
try {
|
|
@@ -5448,6 +5515,14 @@ declare interface ManualSessionInfoParams {
|
|
|
5448
5515
|
sessionHandler: AIAgentSessionHandler;
|
|
5449
5516
|
}
|
|
5450
5517
|
|
|
5518
|
+
/**
|
|
5519
|
+
* What happened on the memory dialog: it became visible, the user chose one of its two buttons,
|
|
5520
|
+
* or the user closed it without choosing (backdrop, Escape, Android back).
|
|
5521
|
+
*/
|
|
5522
|
+
declare type MemoryDialogAction = 'shown' | 'confirm' | 'cancel' | 'dismiss';
|
|
5523
|
+
|
|
5524
|
+
declare type MemoryDialogVariant = 'consent' | 'on' | 'off' | 'readonly';
|
|
5525
|
+
|
|
5451
5526
|
declare interface MemoryInfo {
|
|
5452
5527
|
enabled: boolean;
|
|
5453
5528
|
showIndicator: boolean;
|
|
@@ -5633,6 +5708,9 @@ declare class MessagePendingStuckStatsTracker extends MultiStatsTrackerBase<Mess
|
|
|
5633
5708
|
}
|
|
5634
5709
|
}
|
|
5635
5710
|
|
|
5711
|
+
/** How a message's sender is drawn: the typing row's user and every message row's sender share this. */
|
|
5712
|
+
declare type MessageSenderInfo = { userId: string; nickname: string; profileUrl?: string };
|
|
5713
|
+
|
|
5636
5714
|
declare interface MessageTemplateCache {
|
|
5637
5715
|
set(key: string, value: string): void;
|
|
5638
5716
|
get(key: string): string | null;
|
|
@@ -5822,7 +5900,7 @@ declare type MessengerSettingsUpdatedParams =
|
|
|
5822
5900
|
| { settings: MessengerSettingsResponse; source: 'server' }
|
|
5823
5901
|
| { settings: CachedMessengerSettings; source: 'cache' };
|
|
5824
5902
|
|
|
5825
|
-
declare type MetricCategory = 'handoff' | 'conversation' | 'message' | 'connection';
|
|
5903
|
+
declare type MetricCategory = 'handoff' | 'conversation' | 'message' | 'connection' | 'memory';
|
|
5826
5904
|
|
|
5827
5905
|
/**
|
|
5828
5906
|
* An event + action represented as a single value. Input to the emitters.
|
|
@@ -5832,7 +5910,8 @@ declare type MetricSource =
|
|
|
5832
5910
|
| { type: 'handoff'; channel: ChatSDKGroupChannel }
|
|
5833
5911
|
| { type: 'conversation'; channel: ChatSDKGroupChannel }
|
|
5834
5912
|
| { type: 'incomingMessage'; channel: ChatSDKGroupChannel; message: ChatSDKBaseMessage }
|
|
5835
|
-
| { type: 'outgoingMessage'; channel: ChatSDKGroupChannel; message: ChatSDKBaseMessage }
|
|
5913
|
+
| { type: 'outgoingMessage'; channel: ChatSDKGroupChannel; message: ChatSDKBaseMessage }
|
|
5914
|
+
| { type: 'memory'; variant: MemoryDialogVariant; action: MemoryDialogAction; deleteOnOff: boolean };
|
|
5836
5915
|
|
|
5837
5916
|
declare type MultiSelectField = {
|
|
5838
5917
|
key: string;
|
|
@@ -6636,6 +6715,25 @@ declare enum StewardTaskStatus {
|
|
|
6636
6715
|
CANCELED = 'CANCELED',
|
|
6637
6716
|
}
|
|
6638
6717
|
|
|
6718
|
+
declare type StreamAnimation = {
|
|
6719
|
+
isAnimating: boolean;
|
|
6720
|
+
start: (id: string | number) => void;
|
|
6721
|
+
stop: (id: string | number) => void;
|
|
6722
|
+
isHolding: (id: string | number) => boolean;
|
|
6723
|
+
/**
|
|
6724
|
+
* Set while a row holds its streamed text. The list draws a single typing row, so it falls back to
|
|
6725
|
+
* this when nobody is typing — a live typing signal always wins.
|
|
6726
|
+
*
|
|
6727
|
+
* Never carries a thinking message, deliberately: a row enters the hold only after its reply started
|
|
6728
|
+
* streaming, so the agent's thinking phase is over by then — the frame is held back by our own start
|
|
6729
|
+
* gate, not by the agent still thinking. Relaying the last thinking text here would report a state it
|
|
6730
|
+
* has already left, so the typing row falls back to dots for this window.
|
|
6731
|
+
*/
|
|
6732
|
+
heldTypingInfo?: TypingRowInfo;
|
|
6733
|
+
holdStart: (id: string | number, info: TypingRowInfo) => void;
|
|
6734
|
+
holdStop: (id: string | number) => void;
|
|
6735
|
+
};
|
|
6736
|
+
|
|
6639
6737
|
declare type StreamMeasure = {
|
|
6640
6738
|
channelUrl?: string;
|
|
6641
6739
|
deliveryTimer: TimeoutId | null;
|
|
@@ -7166,6 +7264,10 @@ export declare type StringSet = {
|
|
|
7166
7264
|
CHANNEL_FROZEN: string;
|
|
7167
7265
|
};
|
|
7168
7266
|
|
|
7267
|
+
declare interface SubmitCPAAuthorizationCodesResponse {
|
|
7268
|
+
cpaAuthorizations: CPAAuthorizationResult[];
|
|
7269
|
+
}
|
|
7270
|
+
|
|
7169
7271
|
declare type SystemBaseMessageProps<T> = T & BaseMessageProps<{}>;
|
|
7170
7272
|
|
|
7171
7273
|
declare type SystemCSATMessageProps = SystemMessageProps & {
|
|
@@ -7513,6 +7615,16 @@ declare type TypingMeasure = {
|
|
|
7513
7615
|
userMessageId?: number;
|
|
7514
7616
|
};
|
|
7515
7617
|
|
|
7618
|
+
/**
|
|
7619
|
+
* What the list's single typing row renders, whoever it is drawn for. `user.userId` identifies the row
|
|
7620
|
+
* it stands in for, which is how the typing bridge tells the awaited reply from anyone else's.
|
|
7621
|
+
*/
|
|
7622
|
+
declare type TypingRowInfo = {
|
|
7623
|
+
user: MessageSenderInfo;
|
|
7624
|
+
isBot: boolean;
|
|
7625
|
+
thinkingMessage?: string;
|
|
7626
|
+
};
|
|
7627
|
+
|
|
7516
7628
|
declare type TypingTurnEntry = {
|
|
7517
7629
|
requestId: string;
|
|
7518
7630
|
record: StatsRecord<TypingIndicatorAbsentTimeoutStats, TypingMeasure>;
|