@sendbird/ai-agent-messenger-react 1.14.0 → 1.15.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/{_2AhSWhf.cjs → BEg_pRMN.cjs} +1 -1
- package/dist/cjs/{Da-SU-eO.cjs → BzPDUy7W.cjs} +1 -1
- package/dist/cjs/{B1tLGMir.cjs → C7eVnoZp.cjs} +1 -1
- package/dist/cjs/{awgtpOfn.cjs → CO-0wqr2.cjs} +1 -1
- package/dist/cjs/CRQKrE4j.cjs +306 -0
- package/dist/cjs/{Cid7OVHf.cjs → CmQt7ubs.cjs} +1 -1
- package/dist/cjs/{Zam2SMxN.cjs → DWMaO-lW.cjs} +1 -1
- package/dist/cjs/{BgVlF21n.cjs → DZ6obfny.cjs} +1 -1
- package/dist/cjs/{yj3YM6ag.cjs → DhMcbrY_.cjs} +1 -1
- package/dist/cjs/{BBx-8cm_.cjs → Dysq0Ikc.cjs} +1 -1
- package/dist/cjs/{DRYp-Aeq.cjs → zNkrU2Cs.cjs} +1 -1
- package/dist/es/{C1Zy5PCq.js → 4RX-ydvm.js} +2936 -2908
- package/dist/es/{b3j3zOSP.js → B8ZaDXh2.js} +1 -1
- package/dist/es/{t-xO5mFL.js → BcA9gay0.js} +1 -1
- package/dist/es/{DvF4h9BU.js → BppTxw8U.js} +1 -1
- package/dist/es/{C66w0Vo6.js → Bt3E0T2Q.js} +1 -1
- package/dist/es/{BJNTmQ2V.js → DQAcZtD0.js} +1 -1
- package/dist/es/{TXpETEfV.js → DV8d1OF0.js} +1 -1
- package/dist/es/{BW6o50qt.js → DrGzDySi.js} +1 -1
- package/dist/es/{Ge_YPjjg.js → Phe_Bbs4.js} +1 -1
- package/dist/es/{FYaa05gN.js → eGXLshPO.js} +1 -1
- package/dist/es/{Bw9xvmqB.js → uBzsYcnT.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +748 -176
- package/dist/index.js +29 -27
- package/package.json +6 -6
- package/dist/cjs/DKMWo-NT.cjs +0 -306
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Action } from '@sendbird/uikit-message-template';
|
|
2
2
|
import { AIAgentChannelFilter } from '@sendbird/chat/aiAgent';
|
|
3
3
|
import { AIAgentModule } from '@sendbird/chat/aiAgent';
|
|
4
4
|
import { BaseMessage } from '@sendbird/chat/message';
|
|
@@ -39,6 +39,11 @@ export declare interface ActionbookInfo {
|
|
|
39
39
|
step: string | null;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
declare interface ActiveChannelUpdatedParams {
|
|
43
|
+
channelUrl: string;
|
|
44
|
+
status: ConversationStatus;
|
|
45
|
+
}
|
|
46
|
+
|
|
42
47
|
export declare interface AgentClientHandlers {
|
|
43
48
|
onMessageSend?: (message: string) => void;
|
|
44
49
|
onFunctionCallDetailClick?: (func: FunctionCallsInfo) => void;
|
|
@@ -470,9 +475,19 @@ declare interface AIAgentMessengerSessionRef {
|
|
|
470
475
|
chatSDK: AIAgentContextValue['chatSDK'];
|
|
471
476
|
authenticate: () => Promise<MessengerSettingsResponse>;
|
|
472
477
|
deauthenticate: () => Promise<void>;
|
|
473
|
-
updateContext: (context: Record<string, string>) => Promise<ContextObject>;
|
|
474
|
-
patchContext: (context: Record<string, string>) => Promise<ContextObject>;
|
|
475
478
|
getContextObject: () => Promise<ContextObject>;
|
|
479
|
+
updateContext: {
|
|
480
|
+
/** Updates the context of the active conversation initialized at session start. */
|
|
481
|
+
(context: Record<string, string>): Promise<ContextObject>;
|
|
482
|
+
/** Updates the context of a specific conversation by aiAgentId and channelUrl. */
|
|
483
|
+
(aiAgentId: string, channelUrl: string, context: Record<string, string>): Promise<ContextObject>;
|
|
484
|
+
};
|
|
485
|
+
patchContext: {
|
|
486
|
+
/** Patches the context of the active conversation initialized at session start. */
|
|
487
|
+
(context: Record<string, string>): Promise<ContextObject>;
|
|
488
|
+
/** Patches the context of a specific conversation by aiAgentId and channelUrl. */
|
|
489
|
+
(aiAgentId: string, channelUrl: string, context: Record<string, string>): Promise<ContextObject>;
|
|
490
|
+
};
|
|
476
491
|
}
|
|
477
492
|
|
|
478
493
|
export declare type AIAgentProps = PropsWithChildren<{
|
|
@@ -625,6 +640,13 @@ declare interface AIAgentQueryParams {
|
|
|
625
640
|
conversationListParams?: ConversationListCollectionParams;
|
|
626
641
|
}
|
|
627
642
|
|
|
643
|
+
/**
|
|
644
|
+
* AI Agent session handler.
|
|
645
|
+
* */
|
|
646
|
+
declare interface AIAgentSessionHandler extends SessionHandler {
|
|
647
|
+
onExternalAuthTokenExpired?: (data: ExternalAuthTokenExpiredData) => void;
|
|
648
|
+
}
|
|
649
|
+
|
|
628
650
|
/**
|
|
629
651
|
* Common string set interface shared between react and react-native packages
|
|
630
652
|
* These are the base strings that both packages use
|
|
@@ -774,14 +796,20 @@ declare interface CloseConversationCommandParams {
|
|
|
774
796
|
|
|
775
797
|
declare interface CommandPayloads {
|
|
776
798
|
[CommandType.ConversationClose]: undefined | CloseConversationCommandParams;
|
|
799
|
+
[CommandType.MessengerSettingsUpdated]: MessengerSettingsUpdatedParams;
|
|
800
|
+
[CommandType.ActiveChannelUpdated]: ActiveChannelUpdatedParams;
|
|
777
801
|
}
|
|
778
802
|
|
|
779
803
|
export declare const Commands = {
|
|
780
804
|
CloseConversation: (params?: CloseConversationCommandParams) => new CloseConversationCommand(params),
|
|
805
|
+
MessengerSettingsUpdated: (params: MessengerSettingsUpdatedParams) => new MessengerSettingsUpdatedCommand(params),
|
|
806
|
+
ActiveChannelUpdated: (params: ActiveChannelUpdatedParams) => new ActiveChannelUpdatedCommand(params),
|
|
781
807
|
};
|
|
782
808
|
|
|
783
809
|
declare enum CommandType {
|
|
784
810
|
ConversationClose = 'conv.close',
|
|
811
|
+
MessengerSettingsUpdated = 'messenger.settings.updated',
|
|
812
|
+
ActiveChannelUpdated = 'active.channel.updated',
|
|
785
813
|
}
|
|
786
814
|
|
|
787
815
|
declare interface ContextObject {
|
|
@@ -790,7 +818,7 @@ declare interface ContextObject {
|
|
|
790
818
|
context: Record<string, string>;
|
|
791
819
|
}
|
|
792
820
|
|
|
793
|
-
export declare const Conversation: ({ children, onNavigateToConversationList, channelUrl, onClearChannelUrl, shouldMarkAsRead, style, closedChannelUrl, onClearClosedChannelUrl, }:
|
|
821
|
+
export declare const Conversation: ({ children, onNavigateToConversationList, channelUrl, onClearChannelUrl, shouldMarkAsRead, style, closedChannelUrl, onClearClosedChannelUrl, }: Props_3) => JSX.Element;
|
|
794
822
|
|
|
795
823
|
export declare const ConversationContext: Context<ConversationContextValue | null>;
|
|
796
824
|
|
|
@@ -836,7 +864,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
836
864
|
template?: ComponentType<ConversationHeaderTemplateProps> | undefined;
|
|
837
865
|
children?: ReactNode;
|
|
838
866
|
}) => JSX.Element;
|
|
839
|
-
Context: Context<LayoutContextValue<
|
|
867
|
+
Context: Context<LayoutContextValue<ConversationHeaderTemplateProps, {
|
|
840
868
|
StartArea: () => ReactNode;
|
|
841
869
|
TitleArea: () => ReactNode;
|
|
842
870
|
EndArea: () => ReactNode;
|
|
@@ -846,8 +874,8 @@ export declare const ConversationHeaderLayout: {
|
|
|
846
874
|
ConversationCloseButton: () => ReactNode;
|
|
847
875
|
ExpandButton: () => ReactNode;
|
|
848
876
|
CloseButton: () => ReactNode;
|
|
849
|
-
}
|
|
850
|
-
useContext: () => LayoutContextValue<
|
|
877
|
+
}>>;
|
|
878
|
+
useContext: () => LayoutContextValue<ConversationHeaderTemplateProps, {
|
|
851
879
|
StartArea: () => ReactNode;
|
|
852
880
|
TitleArea: () => ReactNode;
|
|
853
881
|
EndArea: () => ReactNode;
|
|
@@ -857,7 +885,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
857
885
|
ConversationCloseButton: () => ReactNode;
|
|
858
886
|
ExpandButton: () => ReactNode;
|
|
859
887
|
CloseButton: () => ReactNode;
|
|
860
|
-
}
|
|
888
|
+
}>;
|
|
861
889
|
} & {
|
|
862
890
|
StartArea: (props: {
|
|
863
891
|
component: () => ReactNode;
|
|
@@ -906,16 +934,16 @@ export declare const ConversationLayout: {
|
|
|
906
934
|
template?: ComponentType<unknown> | undefined;
|
|
907
935
|
children?: ReactNode;
|
|
908
936
|
}) => JSX.Element;
|
|
909
|
-
Context: Context<LayoutContextValue<
|
|
937
|
+
Context: Context<LayoutContextValue<unknown, {
|
|
910
938
|
Header: () => ReactNode;
|
|
911
939
|
Body: () => JSX.Element;
|
|
912
940
|
Footer: () => JSX.Element;
|
|
913
|
-
}
|
|
914
|
-
useContext: () => LayoutContextValue<
|
|
941
|
+
}>>;
|
|
942
|
+
useContext: () => LayoutContextValue<unknown, {
|
|
915
943
|
Header: () => ReactNode;
|
|
916
944
|
Body: () => JSX.Element;
|
|
917
945
|
Footer: () => JSX.Element;
|
|
918
|
-
}
|
|
946
|
+
}>;
|
|
919
947
|
} & {
|
|
920
948
|
Header: (props: {
|
|
921
949
|
component: () => ReactNode;
|
|
@@ -928,7 +956,7 @@ export declare const ConversationLayout: {
|
|
|
928
956
|
}) => null;
|
|
929
957
|
};
|
|
930
958
|
|
|
931
|
-
export declare const ConversationList: ({ conversationListLimit, conversationListFilter, children, onOpenConversationView, style, }:
|
|
959
|
+
export declare const ConversationList: ({ conversationListLimit, conversationListFilter, children, onOpenConversationView, style, }: Props_4) => JSX.Element;
|
|
932
960
|
|
|
933
961
|
/**
|
|
934
962
|
* Parameters for creating a ConversationListCollection instance.
|
|
@@ -970,20 +998,20 @@ export declare const ConversationListHeaderLayout: {
|
|
|
970
998
|
template?: ComponentType<ConversationListHeaderTemplateProps> | undefined;
|
|
971
999
|
children?: ReactNode;
|
|
972
1000
|
}) => JSX.Element;
|
|
973
|
-
Context: Context<LayoutContextValue<
|
|
1001
|
+
Context: Context<LayoutContextValue<ConversationListHeaderTemplateProps, {
|
|
974
1002
|
StartArea: () => ReactNode;
|
|
975
1003
|
TitleArea: () => ReactNode;
|
|
976
1004
|
EndArea: () => ReactNode;
|
|
977
1005
|
Title: () => ReactNode;
|
|
978
1006
|
CloseButton: () => ReactNode;
|
|
979
|
-
}
|
|
980
|
-
useContext: () => LayoutContextValue<
|
|
1007
|
+
}>>;
|
|
1008
|
+
useContext: () => LayoutContextValue<ConversationListHeaderTemplateProps, {
|
|
981
1009
|
StartArea: () => ReactNode;
|
|
982
1010
|
TitleArea: () => ReactNode;
|
|
983
1011
|
EndArea: () => ReactNode;
|
|
984
1012
|
Title: () => ReactNode;
|
|
985
1013
|
CloseButton: () => ReactNode;
|
|
986
|
-
}
|
|
1014
|
+
}>;
|
|
987
1015
|
} & {
|
|
988
1016
|
StartArea: (props: {
|
|
989
1017
|
component: () => ReactNode;
|
|
@@ -1016,8 +1044,8 @@ export declare const ConversationListItemLayout: {
|
|
|
1016
1044
|
template?: ComponentType<ConversationListItemProps> | undefined;
|
|
1017
1045
|
children?: ReactNode;
|
|
1018
1046
|
}) => JSX.Element;
|
|
1019
|
-
Context: Context<LayoutContextValue<
|
|
1020
|
-
useContext: () => LayoutContextValue<
|
|
1047
|
+
Context: Context<LayoutContextValue<ConversationListItemProps, {}>>;
|
|
1048
|
+
useContext: () => LayoutContextValue<ConversationListItemProps, {}>;
|
|
1021
1049
|
} & {};
|
|
1022
1050
|
|
|
1023
1051
|
export declare interface ConversationListItemProps {
|
|
@@ -1044,16 +1072,16 @@ export declare const ConversationListLayout: {
|
|
|
1044
1072
|
template?: ComponentType<unknown> | undefined;
|
|
1045
1073
|
children?: ReactNode;
|
|
1046
1074
|
}) => JSX.Element;
|
|
1047
|
-
Context: Context<LayoutContextValue<
|
|
1075
|
+
Context: Context<LayoutContextValue<unknown, {
|
|
1048
1076
|
Header: () => ReactNode;
|
|
1049
1077
|
Body: () => JSX.Element;
|
|
1050
1078
|
Footer: () => JSX.Element;
|
|
1051
|
-
}
|
|
1052
|
-
useContext: () => LayoutContextValue<
|
|
1079
|
+
}>>;
|
|
1080
|
+
useContext: () => LayoutContextValue<unknown, {
|
|
1053
1081
|
Header: () => ReactNode;
|
|
1054
1082
|
Body: () => JSX.Element;
|
|
1055
1083
|
Footer: () => JSX.Element;
|
|
1056
|
-
}
|
|
1084
|
+
}>;
|
|
1057
1085
|
} & {
|
|
1058
1086
|
Header: (props: {
|
|
1059
1087
|
component: () => ReactNode;
|
|
@@ -1165,6 +1193,11 @@ export declare interface CustomMessageTemplateData {
|
|
|
1165
1193
|
error: string | null;
|
|
1166
1194
|
}
|
|
1167
1195
|
|
|
1196
|
+
export declare type DateSeparatorProps = SBUFoundationProps<{
|
|
1197
|
+
/** date or timestamp */
|
|
1198
|
+
date?: Date | number;
|
|
1199
|
+
}>;
|
|
1200
|
+
|
|
1168
1201
|
export declare const DefaultMessenger: ForwardRefExoticComponent<MessengerProps & RefAttributes<MessengerSessionRef>>;
|
|
1169
1202
|
|
|
1170
1203
|
declare interface Dispatcher {
|
|
@@ -1176,29 +1209,6 @@ declare interface Dispatcher {
|
|
|
1176
1209
|
): void;
|
|
1177
1210
|
}
|
|
1178
1211
|
|
|
1179
|
-
declare function ExtendedCitation({ extendedMessagePayload, onClickCitation, }: IncomingMessageProps): JSX.Element | null;
|
|
1180
|
-
|
|
1181
|
-
declare function ExtendedCTAButton({ extendedMessagePayload, onClickCTA, }: IncomingMessageProps): JSX.Element | null;
|
|
1182
|
-
|
|
1183
|
-
/**
|
|
1184
|
-
* Default component for rendering custom message templates. Intentionally empty by default.
|
|
1185
|
-
*
|
|
1186
|
-
* Replace this to render custom templates from `extendedMessagePayload.custom_message_templates`.
|
|
1187
|
-
*
|
|
1188
|
-
* @example
|
|
1189
|
-
* <IncomingMessageLayout.CustomMessageTemplate component={MyCustomTemplate} />
|
|
1190
|
-
*/
|
|
1191
|
-
declare function ExtendedCustomMessageTemplate(_: Props_4): JSX.Element;
|
|
1192
|
-
|
|
1193
|
-
declare function ExtendedFeedback({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, }: IncomingMessageProps): JSX.Element | null;
|
|
1194
|
-
|
|
1195
|
-
/**
|
|
1196
|
-
* This component is a placeholder for the ExtendedMessageLogs component.
|
|
1197
|
-
* Because message logs are only visible in the action book tester.
|
|
1198
|
-
* @see @contexts/_UNSAFE_INTERNAL_DashboardTesterContext.tsx
|
|
1199
|
-
*/
|
|
1200
|
-
declare function ExtendedMessageLogs(_: IncomingMessageProps): JSX.Element;
|
|
1201
|
-
|
|
1202
1212
|
/**
|
|
1203
1213
|
* For better understanding: https://sendbird.atlassian.net/wiki/spaces/AA/pages/3075014695/Extended+Message+Payload+Spec
|
|
1204
1214
|
*/
|
|
@@ -1272,9 +1282,10 @@ export declare interface ExtendedMessagePayload {
|
|
|
1272
1282
|
agent_message_templates: AgentMessageTemplateInfo[];
|
|
1273
1283
|
}
|
|
1274
1284
|
|
|
1275
|
-
declare
|
|
1276
|
-
|
|
1277
|
-
|
|
1285
|
+
declare type ExternalAuthTokenExpiredData = {
|
|
1286
|
+
channelUrl: string;
|
|
1287
|
+
aiAgentId: string;
|
|
1288
|
+
};
|
|
1278
1289
|
|
|
1279
1290
|
export declare interface FeedbackInfo {
|
|
1280
1291
|
rating: 'good' | 'bad';
|
|
@@ -1450,8 +1461,6 @@ BaseMessageProps<{
|
|
|
1450
1461
|
messageTemplateLoadingFallback?: ReactNode;
|
|
1451
1462
|
}>;
|
|
1452
1463
|
|
|
1453
|
-
declare function IncomingMessageBody(props: IncomingMessageBodyProps): JSX.Element | null;
|
|
1454
|
-
|
|
1455
1464
|
declare type IncomingMessageBodyProps<T extends MessageType = MessageType> = IncomingMessageProps<T> & {
|
|
1456
1465
|
customStyle?: {
|
|
1457
1466
|
bubbleContentColor?: string;
|
|
@@ -1464,94 +1473,634 @@ export declare const IncomingMessageLayout: {
|
|
|
1464
1473
|
defaults: {
|
|
1465
1474
|
template: ComponentType<IncomingMessageProps>;
|
|
1466
1475
|
components: {
|
|
1467
|
-
SenderName:
|
|
1468
|
-
SenderAvatar:
|
|
1469
|
-
SentTime:
|
|
1470
|
-
MessageBody:
|
|
1471
|
-
TypingIndicator:
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1476
|
+
SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => ReactNode;
|
|
1477
|
+
SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => ReactNode;
|
|
1478
|
+
SentTime: ({ createdAt }: Pick<IncomingMessageProps, "createdAt">) => ReactNode;
|
|
1479
|
+
MessageBody: (props: IncomingMessageBodyProps) => ReactNode;
|
|
1480
|
+
TypingIndicator: ({ customStyle }: IncomingMessageProps & {
|
|
1481
|
+
customStyle?: {
|
|
1482
|
+
bubbleContentColor?: string;
|
|
1483
|
+
bubbleBackgroundColor?: string;
|
|
1484
|
+
};
|
|
1485
|
+
}) => ReactNode;
|
|
1486
|
+
SuggestedReplies: ({ extendedMessagePayload, onClickSuggestedReply, suggestedRepliesDirection, }: IncomingMessageProps) => ReactNode;
|
|
1487
|
+
MessageTemplate: (props: {
|
|
1488
|
+
onGetCachedMessageTemplate?: ((templateKey: string) => string | null) | undefined;
|
|
1489
|
+
onRequestMessageTemplate?: ((templateKey: string) => Promise<string>) | undefined;
|
|
1490
|
+
onHandleTemplateInternalAction?: ((action: Action) => void) | undefined;
|
|
1491
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
1492
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
1493
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload> | undefined;
|
|
1494
|
+
}) => ReactNode;
|
|
1495
|
+
CustomMessageTemplate: (_: ({
|
|
1496
|
+
messageType: "user";
|
|
1497
|
+
message: string;
|
|
1498
|
+
} & {
|
|
1499
|
+
sender: {
|
|
1500
|
+
nickname: string;
|
|
1501
|
+
profileUrl?: string;
|
|
1502
|
+
};
|
|
1503
|
+
suggestedRepliesVisible?: boolean;
|
|
1504
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
1505
|
+
isBotMessage?: boolean;
|
|
1506
|
+
isTyping?: boolean;
|
|
1507
|
+
isStreaming?: boolean;
|
|
1508
|
+
isHandedOff?: boolean;
|
|
1509
|
+
isConversationClosed?: boolean;
|
|
1510
|
+
isFeedbackEnabled?: boolean;
|
|
1511
|
+
isFeedbackCommentEnabled?: boolean;
|
|
1512
|
+
isSenderAvatarVisible?: boolean;
|
|
1513
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
1514
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
1515
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
1516
|
+
onClickSuggestedReply?: (params: {
|
|
1517
|
+
reply: string;
|
|
1518
|
+
}) => void;
|
|
1519
|
+
onClickCTA?: (params: {
|
|
1520
|
+
url: string;
|
|
1521
|
+
}) => void;
|
|
1522
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
1523
|
+
onFeedbackUpdate?: (params: {
|
|
1524
|
+
rating: "good" | "bad";
|
|
1525
|
+
comment?: string;
|
|
1526
|
+
} | null) => void;
|
|
1527
|
+
onSubmitForm?: (params: {
|
|
1528
|
+
key: string;
|
|
1529
|
+
data: Record<string, FormFieldValue>;
|
|
1530
|
+
}) => Promise<void>;
|
|
1531
|
+
onCancelForm?: (params: {
|
|
1532
|
+
key: string;
|
|
1533
|
+
}) => Promise<void>;
|
|
1534
|
+
onStreamAnimationStart?: () => void;
|
|
1535
|
+
onStreamAnimationProgress?: () => void;
|
|
1536
|
+
onStreamAnimationComplete?: () => void;
|
|
1537
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
1538
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
1539
|
+
} & {
|
|
1540
|
+
data?: string;
|
|
1541
|
+
createdAt?: number;
|
|
1542
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
1543
|
+
groupType?: MessageGroupType;
|
|
1544
|
+
maxBodyWidth?: number;
|
|
1545
|
+
onClickMedia?: (params: {
|
|
1546
|
+
url: string;
|
|
1547
|
+
type: string;
|
|
1548
|
+
}) => void;
|
|
1549
|
+
onClickFile?: (params: {
|
|
1550
|
+
url: string;
|
|
1551
|
+
type: string;
|
|
1552
|
+
}) => void;
|
|
1553
|
+
children?: ReactNode;
|
|
1554
|
+
}) | ({
|
|
1555
|
+
messageType: "file";
|
|
1556
|
+
message: string;
|
|
1557
|
+
file: {
|
|
1558
|
+
type: string;
|
|
1559
|
+
url: string;
|
|
1560
|
+
name: string;
|
|
1561
|
+
};
|
|
1562
|
+
} & {
|
|
1563
|
+
sender: {
|
|
1564
|
+
nickname: string;
|
|
1565
|
+
profileUrl?: string;
|
|
1566
|
+
};
|
|
1567
|
+
suggestedRepliesVisible?: boolean;
|
|
1568
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
1569
|
+
isBotMessage?: boolean;
|
|
1570
|
+
isTyping?: boolean;
|
|
1571
|
+
isStreaming?: boolean;
|
|
1572
|
+
isHandedOff?: boolean;
|
|
1573
|
+
isConversationClosed?: boolean;
|
|
1574
|
+
isFeedbackEnabled?: boolean;
|
|
1575
|
+
isFeedbackCommentEnabled?: boolean;
|
|
1576
|
+
isSenderAvatarVisible?: boolean;
|
|
1577
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
1578
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
1579
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
1580
|
+
onClickSuggestedReply?: (params: {
|
|
1581
|
+
reply: string;
|
|
1582
|
+
}) => void;
|
|
1583
|
+
onClickCTA?: (params: {
|
|
1584
|
+
url: string;
|
|
1585
|
+
}) => void;
|
|
1586
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
1587
|
+
onFeedbackUpdate?: (params: {
|
|
1588
|
+
rating: "good" | "bad";
|
|
1589
|
+
comment?: string;
|
|
1590
|
+
} | null) => void;
|
|
1591
|
+
onSubmitForm?: (params: {
|
|
1592
|
+
key: string;
|
|
1593
|
+
data: Record<string, FormFieldValue>;
|
|
1594
|
+
}) => Promise<void>;
|
|
1595
|
+
onCancelForm?: (params: {
|
|
1596
|
+
key: string;
|
|
1597
|
+
}) => Promise<void>;
|
|
1598
|
+
onStreamAnimationStart?: () => void;
|
|
1599
|
+
onStreamAnimationProgress?: () => void;
|
|
1600
|
+
onStreamAnimationComplete?: () => void;
|
|
1601
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
1602
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
1603
|
+
} & {
|
|
1604
|
+
data?: string;
|
|
1605
|
+
createdAt?: number;
|
|
1606
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
1607
|
+
groupType?: MessageGroupType;
|
|
1608
|
+
maxBodyWidth?: number;
|
|
1609
|
+
onClickMedia?: (params: {
|
|
1610
|
+
url: string;
|
|
1611
|
+
type: string;
|
|
1612
|
+
}) => void;
|
|
1613
|
+
onClickFile?: (params: {
|
|
1614
|
+
url: string;
|
|
1615
|
+
type: string;
|
|
1616
|
+
}) => void;
|
|
1617
|
+
children?: ReactNode;
|
|
1618
|
+
})) => ReactNode;
|
|
1619
|
+
CTAButton: ({ extendedMessagePayload, onClickCTA, }: IncomingMessageProps) => ReactNode;
|
|
1620
|
+
Citation: ({ extendedMessagePayload, onClickCitation, }: IncomingMessageProps) => ReactNode;
|
|
1621
|
+
Form: (props: IncomingMessageProps) => ReactNode;
|
|
1622
|
+
Feedback: ({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, }: IncomingMessageProps) => ReactNode;
|
|
1623
|
+
MessageLogs: (_: IncomingMessageProps) => ReactNode;
|
|
1480
1624
|
};
|
|
1481
1625
|
};
|
|
1482
1626
|
Template: ({ template, children }: {
|
|
1483
1627
|
template?: ComponentType<IncomingMessageProps> | undefined;
|
|
1484
1628
|
children?: ReactNode;
|
|
1485
1629
|
}) => JSX.Element;
|
|
1486
|
-
Context: Context<LayoutContextValue<
|
|
1487
|
-
SenderName:
|
|
1488
|
-
SenderAvatar:
|
|
1489
|
-
SentTime:
|
|
1490
|
-
MessageBody:
|
|
1491
|
-
TypingIndicator:
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1630
|
+
Context: Context<LayoutContextValue<IncomingMessageProps, {
|
|
1631
|
+
SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => ReactNode;
|
|
1632
|
+
SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => ReactNode;
|
|
1633
|
+
SentTime: ({ createdAt }: Pick<IncomingMessageProps, "createdAt">) => ReactNode;
|
|
1634
|
+
MessageBody: (props: IncomingMessageBodyProps) => ReactNode;
|
|
1635
|
+
TypingIndicator: ({ customStyle }: IncomingMessageProps & {
|
|
1636
|
+
customStyle?: {
|
|
1637
|
+
bubbleContentColor?: string;
|
|
1638
|
+
bubbleBackgroundColor?: string;
|
|
1639
|
+
};
|
|
1640
|
+
}) => ReactNode;
|
|
1641
|
+
SuggestedReplies: ({ extendedMessagePayload, onClickSuggestedReply, suggestedRepliesDirection, }: IncomingMessageProps) => ReactNode;
|
|
1642
|
+
MessageTemplate: (props: {
|
|
1643
|
+
onGetCachedMessageTemplate?: ((templateKey: string) => string | null) | undefined;
|
|
1644
|
+
onRequestMessageTemplate?: ((templateKey: string) => Promise<string>) | undefined;
|
|
1645
|
+
onHandleTemplateInternalAction?: ((action: Action) => void) | undefined;
|
|
1646
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
1647
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
1648
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload> | undefined;
|
|
1649
|
+
}) => ReactNode;
|
|
1650
|
+
CustomMessageTemplate: (_: ({
|
|
1651
|
+
messageType: "user";
|
|
1652
|
+
message: string;
|
|
1653
|
+
} & {
|
|
1654
|
+
sender: {
|
|
1655
|
+
nickname: string;
|
|
1656
|
+
profileUrl?: string;
|
|
1657
|
+
};
|
|
1658
|
+
suggestedRepliesVisible?: boolean;
|
|
1659
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
1660
|
+
isBotMessage?: boolean;
|
|
1661
|
+
isTyping?: boolean;
|
|
1662
|
+
isStreaming?: boolean;
|
|
1663
|
+
isHandedOff?: boolean;
|
|
1664
|
+
isConversationClosed?: boolean;
|
|
1665
|
+
isFeedbackEnabled?: boolean;
|
|
1666
|
+
isFeedbackCommentEnabled?: boolean;
|
|
1667
|
+
isSenderAvatarVisible?: boolean;
|
|
1668
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
1669
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
1670
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
1671
|
+
onClickSuggestedReply?: (params: {
|
|
1672
|
+
reply: string;
|
|
1673
|
+
}) => void;
|
|
1674
|
+
onClickCTA?: (params: {
|
|
1675
|
+
url: string;
|
|
1676
|
+
}) => void;
|
|
1677
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
1678
|
+
onFeedbackUpdate?: (params: {
|
|
1679
|
+
rating: "good" | "bad";
|
|
1680
|
+
comment?: string;
|
|
1681
|
+
} | null) => void;
|
|
1682
|
+
onSubmitForm?: (params: {
|
|
1683
|
+
key: string;
|
|
1684
|
+
data: Record<string, FormFieldValue>;
|
|
1685
|
+
}) => Promise<void>;
|
|
1686
|
+
onCancelForm?: (params: {
|
|
1687
|
+
key: string;
|
|
1688
|
+
}) => Promise<void>;
|
|
1689
|
+
onStreamAnimationStart?: () => void;
|
|
1690
|
+
onStreamAnimationProgress?: () => void;
|
|
1691
|
+
onStreamAnimationComplete?: () => void;
|
|
1692
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
1693
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
1694
|
+
} & {
|
|
1695
|
+
data?: string;
|
|
1696
|
+
createdAt?: number;
|
|
1697
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
1698
|
+
groupType?: MessageGroupType;
|
|
1699
|
+
maxBodyWidth?: number;
|
|
1700
|
+
onClickMedia?: (params: {
|
|
1701
|
+
url: string;
|
|
1702
|
+
type: string;
|
|
1703
|
+
}) => void;
|
|
1704
|
+
onClickFile?: (params: {
|
|
1705
|
+
url: string;
|
|
1706
|
+
type: string;
|
|
1707
|
+
}) => void;
|
|
1708
|
+
children?: ReactNode;
|
|
1709
|
+
}) | ({
|
|
1710
|
+
messageType: "file";
|
|
1711
|
+
message: string;
|
|
1712
|
+
file: {
|
|
1713
|
+
type: string;
|
|
1714
|
+
url: string;
|
|
1715
|
+
name: string;
|
|
1716
|
+
};
|
|
1717
|
+
} & {
|
|
1718
|
+
sender: {
|
|
1719
|
+
nickname: string;
|
|
1720
|
+
profileUrl?: string;
|
|
1721
|
+
};
|
|
1722
|
+
suggestedRepliesVisible?: boolean;
|
|
1723
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
1724
|
+
isBotMessage?: boolean;
|
|
1725
|
+
isTyping?: boolean;
|
|
1726
|
+
isStreaming?: boolean;
|
|
1727
|
+
isHandedOff?: boolean;
|
|
1728
|
+
isConversationClosed?: boolean;
|
|
1729
|
+
isFeedbackEnabled?: boolean;
|
|
1730
|
+
isFeedbackCommentEnabled?: boolean;
|
|
1731
|
+
isSenderAvatarVisible?: boolean;
|
|
1732
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
1733
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
1734
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
1735
|
+
onClickSuggestedReply?: (params: {
|
|
1736
|
+
reply: string;
|
|
1737
|
+
}) => void;
|
|
1738
|
+
onClickCTA?: (params: {
|
|
1739
|
+
url: string;
|
|
1740
|
+
}) => void;
|
|
1741
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
1742
|
+
onFeedbackUpdate?: (params: {
|
|
1743
|
+
rating: "good" | "bad";
|
|
1744
|
+
comment?: string;
|
|
1745
|
+
} | null) => void;
|
|
1746
|
+
onSubmitForm?: (params: {
|
|
1747
|
+
key: string;
|
|
1748
|
+
data: Record<string, FormFieldValue>;
|
|
1749
|
+
}) => Promise<void>;
|
|
1750
|
+
onCancelForm?: (params: {
|
|
1751
|
+
key: string;
|
|
1752
|
+
}) => Promise<void>;
|
|
1753
|
+
onStreamAnimationStart?: () => void;
|
|
1754
|
+
onStreamAnimationProgress?: () => void;
|
|
1755
|
+
onStreamAnimationComplete?: () => void;
|
|
1756
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
1757
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
1758
|
+
} & {
|
|
1759
|
+
data?: string;
|
|
1760
|
+
createdAt?: number;
|
|
1761
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
1762
|
+
groupType?: MessageGroupType;
|
|
1763
|
+
maxBodyWidth?: number;
|
|
1764
|
+
onClickMedia?: (params: {
|
|
1765
|
+
url: string;
|
|
1766
|
+
type: string;
|
|
1767
|
+
}) => void;
|
|
1768
|
+
onClickFile?: (params: {
|
|
1769
|
+
url: string;
|
|
1770
|
+
type: string;
|
|
1771
|
+
}) => void;
|
|
1772
|
+
children?: ReactNode;
|
|
1773
|
+
})) => ReactNode;
|
|
1774
|
+
CTAButton: ({ extendedMessagePayload, onClickCTA, }: IncomingMessageProps) => ReactNode;
|
|
1775
|
+
Citation: ({ extendedMessagePayload, onClickCitation, }: IncomingMessageProps) => ReactNode;
|
|
1776
|
+
Form: (props: IncomingMessageProps) => ReactNode;
|
|
1777
|
+
Feedback: ({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, }: IncomingMessageProps) => ReactNode;
|
|
1778
|
+
MessageLogs: (_: IncomingMessageProps) => ReactNode;
|
|
1779
|
+
}>>;
|
|
1780
|
+
useContext: () => LayoutContextValue<IncomingMessageProps, {
|
|
1781
|
+
SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => ReactNode;
|
|
1782
|
+
SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => ReactNode;
|
|
1783
|
+
SentTime: ({ createdAt }: Pick<IncomingMessageProps, "createdAt">) => ReactNode;
|
|
1784
|
+
MessageBody: (props: IncomingMessageBodyProps) => ReactNode;
|
|
1785
|
+
TypingIndicator: ({ customStyle }: IncomingMessageProps & {
|
|
1786
|
+
customStyle?: {
|
|
1787
|
+
bubbleContentColor?: string;
|
|
1788
|
+
bubbleBackgroundColor?: string;
|
|
1789
|
+
};
|
|
1790
|
+
}) => ReactNode;
|
|
1791
|
+
SuggestedReplies: ({ extendedMessagePayload, onClickSuggestedReply, suggestedRepliesDirection, }: IncomingMessageProps) => ReactNode;
|
|
1792
|
+
MessageTemplate: (props: {
|
|
1793
|
+
onGetCachedMessageTemplate?: ((templateKey: string) => string | null) | undefined;
|
|
1794
|
+
onRequestMessageTemplate?: ((templateKey: string) => Promise<string>) | undefined;
|
|
1795
|
+
onHandleTemplateInternalAction?: ((action: Action) => void) | undefined;
|
|
1796
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
1797
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
1798
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload> | undefined;
|
|
1799
|
+
}) => ReactNode;
|
|
1800
|
+
CustomMessageTemplate: (_: ({
|
|
1801
|
+
messageType: "user";
|
|
1802
|
+
message: string;
|
|
1803
|
+
} & {
|
|
1804
|
+
sender: {
|
|
1805
|
+
nickname: string;
|
|
1806
|
+
profileUrl?: string;
|
|
1807
|
+
};
|
|
1808
|
+
suggestedRepliesVisible?: boolean;
|
|
1809
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
1810
|
+
isBotMessage?: boolean;
|
|
1811
|
+
isTyping?: boolean;
|
|
1812
|
+
isStreaming?: boolean;
|
|
1813
|
+
isHandedOff?: boolean;
|
|
1814
|
+
isConversationClosed?: boolean;
|
|
1815
|
+
isFeedbackEnabled?: boolean;
|
|
1816
|
+
isFeedbackCommentEnabled?: boolean;
|
|
1817
|
+
isSenderAvatarVisible?: boolean;
|
|
1818
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
1819
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
1820
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
1821
|
+
onClickSuggestedReply?: (params: {
|
|
1822
|
+
reply: string;
|
|
1823
|
+
}) => void;
|
|
1824
|
+
onClickCTA?: (params: {
|
|
1825
|
+
url: string;
|
|
1826
|
+
}) => void;
|
|
1827
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
1828
|
+
onFeedbackUpdate?: (params: {
|
|
1829
|
+
rating: "good" | "bad";
|
|
1830
|
+
comment?: string;
|
|
1831
|
+
} | null) => void;
|
|
1832
|
+
onSubmitForm?: (params: {
|
|
1833
|
+
key: string;
|
|
1834
|
+
data: Record<string, FormFieldValue>;
|
|
1835
|
+
}) => Promise<void>;
|
|
1836
|
+
onCancelForm?: (params: {
|
|
1837
|
+
key: string;
|
|
1838
|
+
}) => Promise<void>;
|
|
1839
|
+
onStreamAnimationStart?: () => void;
|
|
1840
|
+
onStreamAnimationProgress?: () => void;
|
|
1841
|
+
onStreamAnimationComplete?: () => void;
|
|
1842
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
1843
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
1844
|
+
} & {
|
|
1845
|
+
data?: string;
|
|
1846
|
+
createdAt?: number;
|
|
1847
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
1848
|
+
groupType?: MessageGroupType;
|
|
1849
|
+
maxBodyWidth?: number;
|
|
1850
|
+
onClickMedia?: (params: {
|
|
1851
|
+
url: string;
|
|
1852
|
+
type: string;
|
|
1853
|
+
}) => void;
|
|
1854
|
+
onClickFile?: (params: {
|
|
1855
|
+
url: string;
|
|
1856
|
+
type: string;
|
|
1857
|
+
}) => void;
|
|
1858
|
+
children?: ReactNode;
|
|
1859
|
+
}) | ({
|
|
1860
|
+
messageType: "file";
|
|
1861
|
+
message: string;
|
|
1862
|
+
file: {
|
|
1863
|
+
type: string;
|
|
1864
|
+
url: string;
|
|
1865
|
+
name: string;
|
|
1866
|
+
};
|
|
1867
|
+
} & {
|
|
1868
|
+
sender: {
|
|
1869
|
+
nickname: string;
|
|
1870
|
+
profileUrl?: string;
|
|
1871
|
+
};
|
|
1872
|
+
suggestedRepliesVisible?: boolean;
|
|
1873
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
1874
|
+
isBotMessage?: boolean;
|
|
1875
|
+
isTyping?: boolean;
|
|
1876
|
+
isStreaming?: boolean;
|
|
1877
|
+
isHandedOff?: boolean;
|
|
1878
|
+
isConversationClosed?: boolean;
|
|
1879
|
+
isFeedbackEnabled?: boolean;
|
|
1880
|
+
isFeedbackCommentEnabled?: boolean;
|
|
1881
|
+
isSenderAvatarVisible?: boolean;
|
|
1882
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
1883
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
1884
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
1885
|
+
onClickSuggestedReply?: (params: {
|
|
1886
|
+
reply: string;
|
|
1887
|
+
}) => void;
|
|
1888
|
+
onClickCTA?: (params: {
|
|
1889
|
+
url: string;
|
|
1890
|
+
}) => void;
|
|
1891
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
1892
|
+
onFeedbackUpdate?: (params: {
|
|
1893
|
+
rating: "good" | "bad";
|
|
1894
|
+
comment?: string;
|
|
1895
|
+
} | null) => void;
|
|
1896
|
+
onSubmitForm?: (params: {
|
|
1897
|
+
key: string;
|
|
1898
|
+
data: Record<string, FormFieldValue>;
|
|
1899
|
+
}) => Promise<void>;
|
|
1900
|
+
onCancelForm?: (params: {
|
|
1901
|
+
key: string;
|
|
1902
|
+
}) => Promise<void>;
|
|
1903
|
+
onStreamAnimationStart?: () => void;
|
|
1904
|
+
onStreamAnimationProgress?: () => void;
|
|
1905
|
+
onStreamAnimationComplete?: () => void;
|
|
1906
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
1907
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
1908
|
+
} & {
|
|
1909
|
+
data?: string;
|
|
1910
|
+
createdAt?: number;
|
|
1911
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
1912
|
+
groupType?: MessageGroupType;
|
|
1913
|
+
maxBodyWidth?: number;
|
|
1914
|
+
onClickMedia?: (params: {
|
|
1915
|
+
url: string;
|
|
1916
|
+
type: string;
|
|
1917
|
+
}) => void;
|
|
1918
|
+
onClickFile?: (params: {
|
|
1919
|
+
url: string;
|
|
1920
|
+
type: string;
|
|
1921
|
+
}) => void;
|
|
1922
|
+
children?: ReactNode;
|
|
1923
|
+
})) => ReactNode;
|
|
1924
|
+
CTAButton: ({ extendedMessagePayload, onClickCTA, }: IncomingMessageProps) => ReactNode;
|
|
1925
|
+
Citation: ({ extendedMessagePayload, onClickCitation, }: IncomingMessageProps) => ReactNode;
|
|
1926
|
+
Form: (props: IncomingMessageProps) => ReactNode;
|
|
1927
|
+
Feedback: ({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, }: IncomingMessageProps) => ReactNode;
|
|
1928
|
+
MessageLogs: (_: IncomingMessageProps) => ReactNode;
|
|
1929
|
+
}>;
|
|
1516
1930
|
} & {
|
|
1517
1931
|
MessageTemplate: (props: {
|
|
1518
|
-
component:
|
|
1932
|
+
component: (props: {
|
|
1933
|
+
onGetCachedMessageTemplate?: ((templateKey: string) => string | null) | undefined;
|
|
1934
|
+
onRequestMessageTemplate?: ((templateKey: string) => Promise<string>) | undefined;
|
|
1935
|
+
onHandleTemplateInternalAction?: ((action: Action) => void) | undefined;
|
|
1936
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
1937
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
1938
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload> | undefined;
|
|
1939
|
+
}) => ReactNode;
|
|
1519
1940
|
}) => null;
|
|
1520
1941
|
SenderName: (props: {
|
|
1521
|
-
component:
|
|
1942
|
+
component: ({ sender }: Pick<IncomingMessageProps, "sender">) => ReactNode;
|
|
1522
1943
|
}) => null;
|
|
1523
1944
|
SenderAvatar: (props: {
|
|
1524
|
-
component:
|
|
1945
|
+
component: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => ReactNode;
|
|
1525
1946
|
}) => null;
|
|
1526
1947
|
SentTime: (props: {
|
|
1527
|
-
component:
|
|
1948
|
+
component: ({ createdAt }: Pick<IncomingMessageProps, "createdAt">) => ReactNode;
|
|
1528
1949
|
}) => null;
|
|
1529
1950
|
MessageBody: (props: {
|
|
1530
|
-
component:
|
|
1951
|
+
component: (props: IncomingMessageBodyProps) => ReactNode;
|
|
1531
1952
|
}) => null;
|
|
1532
1953
|
TypingIndicator: (props: {
|
|
1533
|
-
component:
|
|
1954
|
+
component: ({ customStyle }: IncomingMessageProps & {
|
|
1955
|
+
customStyle?: {
|
|
1956
|
+
bubbleContentColor?: string;
|
|
1957
|
+
bubbleBackgroundColor?: string;
|
|
1958
|
+
};
|
|
1959
|
+
}) => ReactNode;
|
|
1534
1960
|
}) => null;
|
|
1535
1961
|
SuggestedReplies: (props: {
|
|
1536
|
-
component:
|
|
1962
|
+
component: ({ extendedMessagePayload, onClickSuggestedReply, suggestedRepliesDirection, }: IncomingMessageProps) => ReactNode;
|
|
1537
1963
|
}) => null;
|
|
1538
1964
|
CustomMessageTemplate: (props: {
|
|
1539
|
-
component:
|
|
1965
|
+
component: (_: ({
|
|
1966
|
+
messageType: "user";
|
|
1967
|
+
message: string;
|
|
1968
|
+
} & {
|
|
1969
|
+
sender: {
|
|
1970
|
+
nickname: string;
|
|
1971
|
+
profileUrl?: string;
|
|
1972
|
+
};
|
|
1973
|
+
suggestedRepliesVisible?: boolean;
|
|
1974
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
1975
|
+
isBotMessage?: boolean;
|
|
1976
|
+
isTyping?: boolean;
|
|
1977
|
+
isStreaming?: boolean;
|
|
1978
|
+
isHandedOff?: boolean;
|
|
1979
|
+
isConversationClosed?: boolean;
|
|
1980
|
+
isFeedbackEnabled?: boolean;
|
|
1981
|
+
isFeedbackCommentEnabled?: boolean;
|
|
1982
|
+
isSenderAvatarVisible?: boolean;
|
|
1983
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
1984
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
1985
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
1986
|
+
onClickSuggestedReply?: (params: {
|
|
1987
|
+
reply: string;
|
|
1988
|
+
}) => void;
|
|
1989
|
+
onClickCTA?: (params: {
|
|
1990
|
+
url: string;
|
|
1991
|
+
}) => void;
|
|
1992
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
1993
|
+
onFeedbackUpdate?: (params: {
|
|
1994
|
+
rating: "good" | "bad";
|
|
1995
|
+
comment?: string;
|
|
1996
|
+
} | null) => void;
|
|
1997
|
+
onSubmitForm?: (params: {
|
|
1998
|
+
key: string;
|
|
1999
|
+
data: Record<string, FormFieldValue>;
|
|
2000
|
+
}) => Promise<void>;
|
|
2001
|
+
onCancelForm?: (params: {
|
|
2002
|
+
key: string;
|
|
2003
|
+
}) => Promise<void>;
|
|
2004
|
+
onStreamAnimationStart?: () => void;
|
|
2005
|
+
onStreamAnimationProgress?: () => void;
|
|
2006
|
+
onStreamAnimationComplete?: () => void;
|
|
2007
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
2008
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
2009
|
+
} & {
|
|
2010
|
+
data?: string;
|
|
2011
|
+
createdAt?: number;
|
|
2012
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
2013
|
+
groupType?: MessageGroupType;
|
|
2014
|
+
maxBodyWidth?: number;
|
|
2015
|
+
onClickMedia?: (params: {
|
|
2016
|
+
url: string;
|
|
2017
|
+
type: string;
|
|
2018
|
+
}) => void;
|
|
2019
|
+
onClickFile?: (params: {
|
|
2020
|
+
url: string;
|
|
2021
|
+
type: string;
|
|
2022
|
+
}) => void;
|
|
2023
|
+
children?: ReactNode;
|
|
2024
|
+
}) | ({
|
|
2025
|
+
messageType: "file";
|
|
2026
|
+
message: string;
|
|
2027
|
+
file: {
|
|
2028
|
+
type: string;
|
|
2029
|
+
url: string;
|
|
2030
|
+
name: string;
|
|
2031
|
+
};
|
|
2032
|
+
} & {
|
|
2033
|
+
sender: {
|
|
2034
|
+
nickname: string;
|
|
2035
|
+
profileUrl?: string;
|
|
2036
|
+
};
|
|
2037
|
+
suggestedRepliesVisible?: boolean;
|
|
2038
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2039
|
+
isBotMessage?: boolean;
|
|
2040
|
+
isTyping?: boolean;
|
|
2041
|
+
isStreaming?: boolean;
|
|
2042
|
+
isHandedOff?: boolean;
|
|
2043
|
+
isConversationClosed?: boolean;
|
|
2044
|
+
isFeedbackEnabled?: boolean;
|
|
2045
|
+
isFeedbackCommentEnabled?: boolean;
|
|
2046
|
+
isSenderAvatarVisible?: boolean;
|
|
2047
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
2048
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
2049
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
2050
|
+
onClickSuggestedReply?: (params: {
|
|
2051
|
+
reply: string;
|
|
2052
|
+
}) => void;
|
|
2053
|
+
onClickCTA?: (params: {
|
|
2054
|
+
url: string;
|
|
2055
|
+
}) => void;
|
|
2056
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
2057
|
+
onFeedbackUpdate?: (params: {
|
|
2058
|
+
rating: "good" | "bad";
|
|
2059
|
+
comment?: string;
|
|
2060
|
+
} | null) => void;
|
|
2061
|
+
onSubmitForm?: (params: {
|
|
2062
|
+
key: string;
|
|
2063
|
+
data: Record<string, FormFieldValue>;
|
|
2064
|
+
}) => Promise<void>;
|
|
2065
|
+
onCancelForm?: (params: {
|
|
2066
|
+
key: string;
|
|
2067
|
+
}) => Promise<void>;
|
|
2068
|
+
onStreamAnimationStart?: () => void;
|
|
2069
|
+
onStreamAnimationProgress?: () => void;
|
|
2070
|
+
onStreamAnimationComplete?: () => void;
|
|
2071
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
2072
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
2073
|
+
} & {
|
|
2074
|
+
data?: string;
|
|
2075
|
+
createdAt?: number;
|
|
2076
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
2077
|
+
groupType?: MessageGroupType;
|
|
2078
|
+
maxBodyWidth?: number;
|
|
2079
|
+
onClickMedia?: (params: {
|
|
2080
|
+
url: string;
|
|
2081
|
+
type: string;
|
|
2082
|
+
}) => void;
|
|
2083
|
+
onClickFile?: (params: {
|
|
2084
|
+
url: string;
|
|
2085
|
+
type: string;
|
|
2086
|
+
}) => void;
|
|
2087
|
+
children?: ReactNode;
|
|
2088
|
+
})) => ReactNode;
|
|
1540
2089
|
}) => null;
|
|
1541
2090
|
CTAButton: (props: {
|
|
1542
|
-
component:
|
|
2091
|
+
component: ({ extendedMessagePayload, onClickCTA, }: IncomingMessageProps) => ReactNode;
|
|
1543
2092
|
}) => null;
|
|
1544
2093
|
Citation: (props: {
|
|
1545
|
-
component:
|
|
2094
|
+
component: ({ extendedMessagePayload, onClickCitation, }: IncomingMessageProps) => ReactNode;
|
|
1546
2095
|
}) => null;
|
|
1547
2096
|
Form: (props: {
|
|
1548
|
-
component: (props: IncomingMessageProps) =>
|
|
2097
|
+
component: (props: IncomingMessageProps) => ReactNode;
|
|
1549
2098
|
}) => null;
|
|
1550
2099
|
Feedback: (props: {
|
|
1551
|
-
component:
|
|
2100
|
+
component: ({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, }: IncomingMessageProps) => ReactNode;
|
|
1552
2101
|
}) => null;
|
|
1553
2102
|
MessageLogs: (props: {
|
|
1554
|
-
component:
|
|
2103
|
+
component: (_: IncomingMessageProps) => ReactNode;
|
|
1555
2104
|
}) => null;
|
|
1556
2105
|
};
|
|
1557
2106
|
|
|
@@ -1573,14 +2122,6 @@ declare type IncomingMessageUnion =
|
|
|
1573
2122
|
};
|
|
1574
2123
|
}>;
|
|
1575
2124
|
|
|
1576
|
-
declare function IncomingSenderAvatar({ sender, isBotMessage }: Pick<IncomingMessageProps, 'sender' | 'isBotMessage'>): JSX.Element;
|
|
1577
|
-
|
|
1578
|
-
declare function IncomingSenderName({ sender }: Pick<IncomingMessageProps, 'sender'>): JSX.Element;
|
|
1579
|
-
|
|
1580
|
-
declare function IncomingSentTime({ createdAt }: Pick<IncomingMessageProps, 'createdAt'>): JSX.Element | null;
|
|
1581
|
-
|
|
1582
|
-
declare function IncomingTypingIndicator({ customStyle }: TypingIndicatorProps): JSX.Element;
|
|
1583
|
-
|
|
1584
2125
|
declare type InputState = {
|
|
1585
2126
|
disabled: boolean;
|
|
1586
2127
|
disabledBy:
|
|
@@ -1628,11 +2169,11 @@ declare type LauncherProps = {
|
|
|
1628
2169
|
size?: number;
|
|
1629
2170
|
};
|
|
1630
2171
|
|
|
1631
|
-
declare interface LayoutContextValue<Components extends Record<string, ComponentType<
|
|
2172
|
+
declare interface LayoutContextValue<Props, Components extends Record<string, ComponentType<any>>> {
|
|
1632
2173
|
Template: ComponentType<Props>;
|
|
1633
2174
|
updateTemplate: (template: ComponentType<Props>) => void;
|
|
1634
2175
|
components: Components;
|
|
1635
|
-
updateComponent: (key:
|
|
2176
|
+
updateComponent: <K extends keyof Components>(key: K, component: Components[K]) => void;
|
|
1636
2177
|
}
|
|
1637
2178
|
|
|
1638
2179
|
declare interface LocalizationContextValue extends LanguageSet {
|
|
@@ -1659,7 +2200,7 @@ export declare enum LogLevel {
|
|
|
1659
2200
|
export declare class ManualSessionInfo {
|
|
1660
2201
|
userId: string;
|
|
1661
2202
|
authToken: string;
|
|
1662
|
-
sessionHandler:
|
|
2203
|
+
sessionHandler: AIAgentSessionHandler;
|
|
1663
2204
|
|
|
1664
2205
|
constructor({ userId, authToken, sessionHandler }: ManualSessionInfoParams) {
|
|
1665
2206
|
this.userId = userId;
|
|
@@ -1671,7 +2212,7 @@ export declare class ManualSessionInfo {
|
|
|
1671
2212
|
declare interface ManualSessionInfoParams {
|
|
1672
2213
|
userId: string;
|
|
1673
2214
|
authToken: string;
|
|
1674
|
-
sessionHandler:
|
|
2215
|
+
sessionHandler: AIAgentSessionHandler;
|
|
1675
2216
|
}
|
|
1676
2217
|
|
|
1677
2218
|
/**
|
|
@@ -1683,6 +2224,36 @@ declare interface ManualSessionInfoParams {
|
|
|
1683
2224
|
* */
|
|
1684
2225
|
declare type MessageGroupType = 'single' | 'top' | 'bottom' | 'middle';
|
|
1685
2226
|
|
|
2227
|
+
export declare const MessageListUILayout: {
|
|
2228
|
+
(props: PropsWithChildren): ReactNode;
|
|
2229
|
+
defaults: {
|
|
2230
|
+
template: ComponentType<unknown>;
|
|
2231
|
+
components: {
|
|
2232
|
+
DateSeparator: ({ className, date, style }: DateSeparatorProps) => ReactNode;
|
|
2233
|
+
ScrollToBottomButton: ({ className, style, onClick, ariaLabel, }: ScrollToBottomButtonProps) => ReactNode;
|
|
2234
|
+
};
|
|
2235
|
+
};
|
|
2236
|
+
Template: ({ template, children }: {
|
|
2237
|
+
template?: ComponentType<unknown> | undefined;
|
|
2238
|
+
children?: ReactNode;
|
|
2239
|
+
}) => JSX.Element;
|
|
2240
|
+
Context: Context<LayoutContextValue<unknown, {
|
|
2241
|
+
DateSeparator: ({ className, date, style }: DateSeparatorProps) => ReactNode;
|
|
2242
|
+
ScrollToBottomButton: ({ className, style, onClick, ariaLabel, }: ScrollToBottomButtonProps) => ReactNode;
|
|
2243
|
+
}>>;
|
|
2244
|
+
useContext: () => LayoutContextValue<unknown, {
|
|
2245
|
+
DateSeparator: ({ className, date, style }: DateSeparatorProps) => ReactNode;
|
|
2246
|
+
ScrollToBottomButton: ({ className, style, onClick, ariaLabel, }: ScrollToBottomButtonProps) => ReactNode;
|
|
2247
|
+
}>;
|
|
2248
|
+
} & {
|
|
2249
|
+
DateSeparator: (props: {
|
|
2250
|
+
component: ({ className, date, style }: DateSeparatorProps) => ReactNode;
|
|
2251
|
+
}) => null;
|
|
2252
|
+
ScrollToBottomButton: (props: {
|
|
2253
|
+
component: ({ className, style, onClick, ariaLabel, }: ScrollToBottomButtonProps) => ReactNode;
|
|
2254
|
+
}) => null;
|
|
2255
|
+
};
|
|
2256
|
+
|
|
1686
2257
|
export declare const MessageLogs: ({ actionbook, functionCalls, groundedness, agentMessageTemplates, onClickActionbook, onClickFunctionCall, onClickFunctionCallDetail, onClickGroundedness, onClickAgentMessageTemplate, bottomContent, renderCustomGroundednessIcon, style, }: Props_2) => JSX.Element;
|
|
1687
2258
|
|
|
1688
2259
|
declare interface MessageTemplateCache {
|
|
@@ -1758,11 +2329,12 @@ declare class MessengerDispatcher implements Dispatcher {
|
|
|
1758
2329
|
}
|
|
1759
2330
|
|
|
1760
2331
|
unsubscribe<E extends CommandType>(eventType: E, callback: (payload: CommandPayloads[E]) => void): void {
|
|
1761
|
-
|
|
2332
|
+
const callbacks = this.subscribers[eventType];
|
|
2333
|
+
if (!callbacks) {
|
|
1762
2334
|
return;
|
|
1763
2335
|
}
|
|
1764
2336
|
|
|
1765
|
-
this.subscribers[eventType] =
|
|
2337
|
+
this.subscribers[eventType] = callbacks.filter((cb) => cb !== callback) as typeof callbacks;
|
|
1766
2338
|
}
|
|
1767
2339
|
}
|
|
1768
2340
|
|
|
@@ -1855,6 +2427,11 @@ declare interface MessengerSettingsResponse {
|
|
|
1855
2427
|
};
|
|
1856
2428
|
}
|
|
1857
2429
|
|
|
2430
|
+
declare interface MessengerSettingsUpdatedParams {
|
|
2431
|
+
settings: MessengerSettingsResponse;
|
|
2432
|
+
source: 'cache' | 'server';
|
|
2433
|
+
}
|
|
2434
|
+
|
|
1858
2435
|
declare type MultiSelectField = {
|
|
1859
2436
|
key: string;
|
|
1860
2437
|
type: 'multi-select';
|
|
@@ -1907,8 +2484,6 @@ BaseMessageProps<{
|
|
|
1907
2484
|
onClickFailedMessage?: () => void;
|
|
1908
2485
|
}>;
|
|
1909
2486
|
|
|
1910
|
-
declare function OutgoingMessageBody(props: OutgoingMessageBodyProps): JSX.Element;
|
|
1911
|
-
|
|
1912
2487
|
declare type OutgoingMessageBodyProps<T extends MessageType_2 = MessageType_2> = OutgoingMessageProps<T> & {
|
|
1913
2488
|
customStyle?: {
|
|
1914
2489
|
bubbleContentColor?: string;
|
|
@@ -1921,34 +2496,34 @@ export declare const OutgoingMessageLayout: {
|
|
|
1921
2496
|
defaults: {
|
|
1922
2497
|
template: ComponentType<OutgoingMessageProps>;
|
|
1923
2498
|
components: {
|
|
1924
|
-
SendingStatus:
|
|
1925
|
-
SentTime:
|
|
1926
|
-
MessageBody:
|
|
2499
|
+
SendingStatus: ({ sendingStatus }: OutgoingMessageProps) => ReactNode;
|
|
2500
|
+
SentTime: ({ createdAt }: OutgoingMessageProps) => ReactNode;
|
|
2501
|
+
MessageBody: (props: OutgoingMessageBodyProps) => ReactNode;
|
|
1927
2502
|
};
|
|
1928
2503
|
};
|
|
1929
2504
|
Template: ({ template, children }: {
|
|
1930
2505
|
template?: ComponentType<OutgoingMessageProps> | undefined;
|
|
1931
2506
|
children?: ReactNode;
|
|
1932
2507
|
}) => JSX.Element;
|
|
1933
|
-
Context: Context<LayoutContextValue<
|
|
1934
|
-
SendingStatus:
|
|
1935
|
-
SentTime:
|
|
1936
|
-
MessageBody:
|
|
1937
|
-
}
|
|
1938
|
-
useContext: () => LayoutContextValue<
|
|
1939
|
-
SendingStatus:
|
|
1940
|
-
SentTime:
|
|
1941
|
-
MessageBody:
|
|
1942
|
-
}
|
|
2508
|
+
Context: Context<LayoutContextValue<OutgoingMessageProps, {
|
|
2509
|
+
SendingStatus: ({ sendingStatus }: OutgoingMessageProps) => ReactNode;
|
|
2510
|
+
SentTime: ({ createdAt }: OutgoingMessageProps) => ReactNode;
|
|
2511
|
+
MessageBody: (props: OutgoingMessageBodyProps) => ReactNode;
|
|
2512
|
+
}>>;
|
|
2513
|
+
useContext: () => LayoutContextValue<OutgoingMessageProps, {
|
|
2514
|
+
SendingStatus: ({ sendingStatus }: OutgoingMessageProps) => ReactNode;
|
|
2515
|
+
SentTime: ({ createdAt }: OutgoingMessageProps) => ReactNode;
|
|
2516
|
+
MessageBody: (props: OutgoingMessageBodyProps) => ReactNode;
|
|
2517
|
+
}>;
|
|
1943
2518
|
} & {
|
|
1944
2519
|
SentTime: (props: {
|
|
1945
|
-
component:
|
|
2520
|
+
component: ({ createdAt }: OutgoingMessageProps) => ReactNode;
|
|
1946
2521
|
}) => null;
|
|
1947
2522
|
MessageBody: (props: {
|
|
1948
|
-
component:
|
|
2523
|
+
component: (props: OutgoingMessageBodyProps) => ReactNode;
|
|
1949
2524
|
}) => null;
|
|
1950
2525
|
SendingStatus: (props: {
|
|
1951
|
-
component:
|
|
2526
|
+
component: ({ sendingStatus }: OutgoingMessageProps) => ReactNode;
|
|
1952
2527
|
}) => null;
|
|
1953
2528
|
};
|
|
1954
2529
|
|
|
@@ -1974,10 +2549,6 @@ declare type OutgoingMessageUnion =
|
|
|
1974
2549
|
};
|
|
1975
2550
|
}>;
|
|
1976
2551
|
|
|
1977
|
-
declare function OutgoingSendingStatus({ sendingStatus }: OutgoingMessageProps): JSX.Element | null;
|
|
1978
|
-
|
|
1979
|
-
declare function OutgoingSentTime({ createdAt }: OutgoingMessageProps): JSX.Element | null;
|
|
1980
|
-
|
|
1981
2552
|
declare interface PaletteColor {
|
|
1982
2553
|
extraDark: string;
|
|
1983
2554
|
dark: string;
|
|
@@ -2052,18 +2623,18 @@ export declare const PlaceholderLayout: {
|
|
|
2052
2623
|
template?: ComponentType<PlaceholderTemplateProps> | undefined;
|
|
2053
2624
|
children?: ReactNode;
|
|
2054
2625
|
}) => JSX.Element;
|
|
2055
|
-
Context: Context<LayoutContextValue<
|
|
2626
|
+
Context: Context<LayoutContextValue<PlaceholderTemplateProps, {
|
|
2056
2627
|
Loading: ({ iconSize, className }: PlaceholderLoadingProps) => ReactNode;
|
|
2057
2628
|
Error: ({ label, icon, action, ...props }: PlaceholderErrorProps) => ReactNode;
|
|
2058
2629
|
NoChannels: ({ label, icon, ...props }: PlaceholderBaseProps) => ReactNode;
|
|
2059
2630
|
NoMessages: ({ label, icon, ...props }: PlaceholderBaseProps) => ReactNode;
|
|
2060
|
-
}
|
|
2061
|
-
useContext: () => LayoutContextValue<
|
|
2631
|
+
}>>;
|
|
2632
|
+
useContext: () => LayoutContextValue<PlaceholderTemplateProps, {
|
|
2062
2633
|
Loading: ({ iconSize, className }: PlaceholderLoadingProps) => ReactNode;
|
|
2063
2634
|
Error: ({ label, icon, action, ...props }: PlaceholderErrorProps) => ReactNode;
|
|
2064
2635
|
NoChannels: ({ label, icon, ...props }: PlaceholderBaseProps) => ReactNode;
|
|
2065
2636
|
NoMessages: ({ label, icon, ...props }: PlaceholderBaseProps) => ReactNode;
|
|
2066
|
-
}
|
|
2637
|
+
}>;
|
|
2067
2638
|
} & {
|
|
2068
2639
|
Loading: (props: {
|
|
2069
2640
|
component: ({ iconSize, className }: PlaceholderLoadingProps) => ReactNode;
|
|
@@ -2137,11 +2708,7 @@ declare type Props_2 = {
|
|
|
2137
2708
|
}) => ReactNode;
|
|
2138
2709
|
};
|
|
2139
2710
|
|
|
2140
|
-
declare type Props_3 =
|
|
2141
|
-
|
|
2142
|
-
declare type Props_4 = IncomingMessageProps;
|
|
2143
|
-
|
|
2144
|
-
declare type Props_5 = PropsWithChildren<{
|
|
2711
|
+
declare type Props_3 = PropsWithChildren<{
|
|
2145
2712
|
channelUrl?: string;
|
|
2146
2713
|
onClearChannelUrl?: () => void;
|
|
2147
2714
|
onNavigateToConversationList?: () => void;
|
|
@@ -2154,7 +2721,7 @@ declare type Props_5 = PropsWithChildren<{
|
|
|
2154
2721
|
onClearClosedChannelUrl?: () => void;
|
|
2155
2722
|
}>;
|
|
2156
2723
|
|
|
2157
|
-
declare type
|
|
2724
|
+
declare type Props_4 = PropsWithChildren<{
|
|
2158
2725
|
conversationListLimit?: number;
|
|
2159
2726
|
conversationListFilter?: Partial<AIAgentGroupChannelFilter>;
|
|
2160
2727
|
onOpenConversationView?: (channelUrl: string, status: 'open' | 'closed') => void;
|
|
@@ -2162,7 +2729,21 @@ declare type Props_6 = PropsWithChildren<{
|
|
|
2162
2729
|
style?: CSSProperties;
|
|
2163
2730
|
}>;
|
|
2164
2731
|
|
|
2732
|
+
declare type SBUFoundationProps<T = NonNullable<unknown>> = T & {
|
|
2733
|
+
className?: string;
|
|
2734
|
+
children?: ReactNode;
|
|
2735
|
+
testId?: string;
|
|
2736
|
+
style?: CSSProperties;
|
|
2737
|
+
ariaLabel?: string;
|
|
2738
|
+
};
|
|
2739
|
+
|
|
2740
|
+
export declare type ScrollToBottomButtonProps = SBUFoundationProps<{
|
|
2741
|
+
onClick: () => void;
|
|
2742
|
+
ariaLabel?: string;
|
|
2743
|
+
}>;
|
|
2744
|
+
|
|
2165
2745
|
declare interface SearchConversationParams {
|
|
2746
|
+
aiAgentId: string;
|
|
2166
2747
|
context: Record<string, string>;
|
|
2167
2748
|
}
|
|
2168
2749
|
|
|
@@ -2263,7 +2844,7 @@ declare type StringSet = {
|
|
|
2263
2844
|
CONVERSATION_LIST__TOPICS_FALLBACK: string;
|
|
2264
2845
|
/** @deprecated Unused string **/
|
|
2265
2846
|
CONVERSATION_CLOSED_FOOTER_LABEL: string;
|
|
2266
|
-
/** @deprecated Unused string **/
|
|
2847
|
+
/** @deprecated Unused string, please use TALK_TO_AGENT instead **/
|
|
2267
2848
|
START_NEW_CONVERSATION: string;
|
|
2268
2849
|
/** @deprecated Unused string **/
|
|
2269
2850
|
RETURN_TO_CONVERSATION: string;
|
|
@@ -2277,8 +2858,6 @@ declare type StringSet = {
|
|
|
2277
2858
|
CHANNEL_FROZEN: string;
|
|
2278
2859
|
};
|
|
2279
2860
|
|
|
2280
|
-
declare function SystemAdminMessage(props: SystemMessageProps): JSX.Element | null;
|
|
2281
|
-
|
|
2282
2861
|
declare type SystemBaseMessageProps<T> = T & BaseMessageProps<{}>;
|
|
2283
2862
|
|
|
2284
2863
|
export declare const SystemMessageLayout: {
|
|
@@ -2286,28 +2865,28 @@ export declare const SystemMessageLayout: {
|
|
|
2286
2865
|
defaults: {
|
|
2287
2866
|
template: ComponentType<SystemMessageProps>;
|
|
2288
2867
|
components: {
|
|
2289
|
-
AdminMessage:
|
|
2290
|
-
CSATMessage: (props: SystemMessageProps) =>
|
|
2868
|
+
AdminMessage: (props: SystemMessageProps) => ReactNode;
|
|
2869
|
+
CSATMessage: (props: SystemMessageProps) => ReactNode;
|
|
2291
2870
|
};
|
|
2292
2871
|
};
|
|
2293
2872
|
Template: ({ template, children }: {
|
|
2294
2873
|
template?: ComponentType<SystemMessageProps> | undefined;
|
|
2295
2874
|
children?: ReactNode;
|
|
2296
2875
|
}) => JSX.Element;
|
|
2297
|
-
Context: Context<LayoutContextValue<
|
|
2298
|
-
AdminMessage:
|
|
2299
|
-
CSATMessage: (props: SystemMessageProps) =>
|
|
2300
|
-
}
|
|
2301
|
-
useContext: () => LayoutContextValue<
|
|
2302
|
-
AdminMessage:
|
|
2303
|
-
CSATMessage: (props: SystemMessageProps) =>
|
|
2304
|
-
}
|
|
2876
|
+
Context: Context<LayoutContextValue<SystemMessageProps, {
|
|
2877
|
+
AdminMessage: (props: SystemMessageProps) => ReactNode;
|
|
2878
|
+
CSATMessage: (props: SystemMessageProps) => ReactNode;
|
|
2879
|
+
}>>;
|
|
2880
|
+
useContext: () => LayoutContextValue<SystemMessageProps, {
|
|
2881
|
+
AdminMessage: (props: SystemMessageProps) => ReactNode;
|
|
2882
|
+
CSATMessage: (props: SystemMessageProps) => ReactNode;
|
|
2883
|
+
}>;
|
|
2305
2884
|
} & {
|
|
2306
2885
|
AdminMessage: (props: {
|
|
2307
|
-
component:
|
|
2886
|
+
component: (props: SystemMessageProps) => ReactNode;
|
|
2308
2887
|
}) => null;
|
|
2309
2888
|
CSATMessage: (props: {
|
|
2310
|
-
component: (props: SystemMessageProps) =>
|
|
2889
|
+
component: (props: SystemMessageProps) => ReactNode;
|
|
2311
2890
|
}) => null;
|
|
2312
2891
|
};
|
|
2313
2892
|
|
|
@@ -2344,13 +2923,6 @@ declare type TextField = {
|
|
|
2344
2923
|
};
|
|
2345
2924
|
};
|
|
2346
2925
|
|
|
2347
|
-
declare type TypingIndicatorProps = IncomingMessageProps & {
|
|
2348
|
-
customStyle?: {
|
|
2349
|
-
bubbleContentColor?: string;
|
|
2350
|
-
bubbleBackgroundColor?: string;
|
|
2351
|
-
};
|
|
2352
|
-
};
|
|
2353
|
-
|
|
2354
2926
|
declare interface TypographyShape {
|
|
2355
2927
|
h1: TypographyVariant;
|
|
2356
2928
|
h2: TypographyVariant;
|
|
@@ -2427,7 +2999,7 @@ declare type UserSession = {
|
|
|
2427
2999
|
declare interface UserSessionInfo {
|
|
2428
3000
|
userId: string;
|
|
2429
3001
|
authToken: string;
|
|
2430
|
-
sessionHandler:
|
|
3002
|
+
sessionHandler: AIAgentSessionHandler;
|
|
2431
3003
|
}
|
|
2432
3004
|
|
|
2433
3005
|
export { }
|