@sendbird/ai-agent-messenger-react 1.25.0 → 1.26.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/AH5QEnkP.cjs +1 -0
- package/dist/cjs/BDBlMZr6.cjs +1 -0
- package/dist/cjs/CMRhzGTM.cjs +1 -0
- package/dist/cjs/CuM2FtoD.cjs +1 -0
- package/dist/cjs/DB0sLqre.cjs +1 -0
- package/dist/cjs/DGIKgeo3.cjs +1 -0
- package/dist/cjs/DVhPpubH.cjs +1 -0
- package/dist/cjs/DezBdMzD.cjs +1 -0
- package/dist/cjs/Dz4mUNp4.cjs +1 -0
- package/dist/cjs/HKP2IE1G.cjs +1 -0
- package/dist/es/BBCKVL7d.js +5 -0
- package/dist/es/{DtO4ptZX.js → BfU8xV9U.js} +31 -12
- package/dist/es/{C9zJZRLg.js → CaPTuvBH.js} +27 -8
- package/dist/es/{2pVW9wFx.js → CgKly2NZ.js} +31 -12
- package/dist/es/{DapNV-e6.js → CjJliSJt.js} +32 -13
- package/dist/es/{BWZZDg7i.js → CxajqGzE.js} +31 -12
- package/dist/es/{Dj0fB0I-.js → D0puKqeb.js} +31 -12
- package/dist/es/{E7P-wwKR.js → DHn-_17E.js} +27 -8
- package/dist/es/{Bsfn2AhF.js → DhZK0r9g.js} +27 -8
- package/dist/es/{BD5xoN7u.js → DzAt_5Ix.js} +27 -8
- package/dist/index.cjs +173 -173
- package/dist/index.d.ts +107 -8
- package/dist/index.js +4099 -3797
- package/package.json +5 -5
- package/dist/cjs/1RttGdBR.cjs +0 -1
- package/dist/cjs/B8O63u6F.cjs +0 -1
- package/dist/cjs/Bb7tPFDH.cjs +0 -1
- package/dist/cjs/C9Y_myeI.cjs +0 -1
- package/dist/cjs/COfoIob1.cjs +0 -1
- package/dist/cjs/CY5jZKJU.cjs +0 -1
- package/dist/cjs/DYr6MsyB.cjs +0 -1
- package/dist/cjs/KpILxsy5.cjs +0 -1
- package/dist/cjs/Xd5FCJlT.cjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -423,7 +423,8 @@ declare type AIAgentCommonIconName =
|
|
|
423
423
|
| 'photo'
|
|
424
424
|
| 'add'
|
|
425
425
|
| 'document'
|
|
426
|
-
| 'download'
|
|
426
|
+
| 'download'
|
|
427
|
+
| 'memory';
|
|
427
428
|
|
|
428
429
|
export declare interface AIAgentConfig {
|
|
429
430
|
conversation?: {
|
|
@@ -520,6 +521,10 @@ declare interface AIAgentContextValue {
|
|
|
520
521
|
declare interface AIAgentConversationContextValue {
|
|
521
522
|
conversation: ChatSDKConversation | undefined;
|
|
522
523
|
|
|
524
|
+
actions: {
|
|
525
|
+
setUserMemoryState: (params: { enabled: boolean }) => Promise<MemoryInfo>;
|
|
526
|
+
};
|
|
527
|
+
|
|
523
528
|
channelSource: {
|
|
524
529
|
channel: ChatSDKGroupChannel | undefined;
|
|
525
530
|
error: ChatSDKSendbirdError | undefined;
|
|
@@ -692,10 +697,15 @@ declare interface AIAgentInterface {
|
|
|
692
697
|
updateContext: (channelUrl: string, context: Record<string, string>) => Promise<ContextObject>;
|
|
693
698
|
/** Retrieves the context data for the specified channel */
|
|
694
699
|
getContextObject: (channelUrl: string) => Promise<ContextObject>;
|
|
700
|
+
/** Clears memories saved for the current user */
|
|
701
|
+
clearUserMemories: (params?: ClearUserMemoriesParams) => Promise<void>;
|
|
695
702
|
|
|
696
703
|
/** @internal Refreshes the active channel by re-requesting messenger settings */
|
|
697
704
|
refreshActiveChannel: (options?: { useKnownActiveChannelUrl?: boolean }) => Promise<string>;
|
|
698
705
|
|
|
706
|
+
/** @internal Sets whether the current user uses memory */
|
|
707
|
+
setUserMemoryState: (params: SetUserMemoryStateParams) => Promise<MemoryInfo>;
|
|
708
|
+
|
|
699
709
|
/** @internal Initializes a conversation on the channel if needed (AI Agent channel without conversation). */
|
|
700
710
|
initConversationIfNeeded: (channel: ChatSDKGroupChannel) => Promise<void>;
|
|
701
711
|
|
|
@@ -727,6 +737,7 @@ declare interface AIAgentMessengerSessionContextValue {
|
|
|
727
737
|
userSession: null | UserSession;
|
|
728
738
|
aiAgentInfo: null | AIAgentInfo;
|
|
729
739
|
launcherInfo: null | LauncherInfo;
|
|
740
|
+
memoryInfo: null | MemoryInfo;
|
|
730
741
|
|
|
731
742
|
connectionError?: Error;
|
|
732
743
|
|
|
@@ -1072,6 +1083,10 @@ declare interface AIAgentStringSet {
|
|
|
1072
1083
|
a11y_file_image: (name: string) => string;
|
|
1073
1084
|
a11y_file_video: (name: string) => string;
|
|
1074
1085
|
a11y_file_document: (name: string) => string;
|
|
1086
|
+
a11y_received_file_image: string;
|
|
1087
|
+
a11y_received_file_video: string;
|
|
1088
|
+
a11y_received_file_pdf: (name: string) => string;
|
|
1089
|
+
a11y_received_files_image_count: (count: number) => string;
|
|
1075
1090
|
a11y_screen_conversation: string;
|
|
1076
1091
|
a11y_screen_conversation_with_agent: (name: string) => string;
|
|
1077
1092
|
a11y_screen_conversation_list_no_count: string;
|
|
@@ -1130,7 +1145,7 @@ declare interface AIAgentStringSet {
|
|
|
1130
1145
|
question: string;
|
|
1131
1146
|
submit_label: string;
|
|
1132
1147
|
submission_expired: string;
|
|
1133
|
-
|
|
1148
|
+
a11y_csat_rating_label: (score: number, label: string) => string;
|
|
1134
1149
|
a11y_hint_select_rating: string;
|
|
1135
1150
|
};
|
|
1136
1151
|
|
|
@@ -1168,6 +1183,24 @@ declare interface AIAgentStringSet {
|
|
|
1168
1183
|
confirm_handoff: string;
|
|
1169
1184
|
};
|
|
1170
1185
|
|
|
1186
|
+
memory: {
|
|
1187
|
+
dialog_title: string;
|
|
1188
|
+
desc_on: string;
|
|
1189
|
+
desc_off: string;
|
|
1190
|
+
button_use: string;
|
|
1191
|
+
button_dont_use: string;
|
|
1192
|
+
button_keep_using: string;
|
|
1193
|
+
button_disable: string;
|
|
1194
|
+
button_disable_and_delete: string;
|
|
1195
|
+
button_keep_off: string;
|
|
1196
|
+
button_enable: string;
|
|
1197
|
+
button_cancel: string;
|
|
1198
|
+
error_message: string;
|
|
1199
|
+
a11y_indicator_manage: string;
|
|
1200
|
+
a11y_indicator_on: string;
|
|
1201
|
+
a11y_indicator_off: string;
|
|
1202
|
+
};
|
|
1203
|
+
|
|
1171
1204
|
connection_delay: {
|
|
1172
1205
|
title: string;
|
|
1173
1206
|
description: (formattedTime: string) => string;
|
|
@@ -1229,6 +1262,14 @@ declare type BaseMessageProps<T> = T & {
|
|
|
1229
1262
|
children?: ReactNode;
|
|
1230
1263
|
};
|
|
1231
1264
|
|
|
1265
|
+
/**
|
|
1266
|
+
* Settings shape persisted in the cache layer. The server always returns `memory`,
|
|
1267
|
+
* but caches written before the field was introduced may not have it.
|
|
1268
|
+
*/
|
|
1269
|
+
declare type CachedMessengerSettings = Omit<MessengerSettingsResponse, 'memory'> & {
|
|
1270
|
+
memory?: MessengerSettingsResponse['memory'];
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1232
1273
|
declare type ChatSDKAIAgentChannelFilter = AIAgentChannelFilter;
|
|
1233
1274
|
|
|
1234
1275
|
declare type ChatSDKAIAgentGroupChannelListQuery = AIAgentGroupChannelListQuery;
|
|
@@ -1295,6 +1336,10 @@ export declare interface CitationInfo {
|
|
|
1295
1336
|
link: string;
|
|
1296
1337
|
}
|
|
1297
1338
|
|
|
1339
|
+
declare interface ClearUserMemoriesParams {
|
|
1340
|
+
contextAiAgentId?: string;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1298
1343
|
declare interface CloseConversationCommandParams {
|
|
1299
1344
|
channelUrl: string;
|
|
1300
1345
|
}
|
|
@@ -1327,6 +1372,17 @@ declare interface ColorSet {
|
|
|
1327
1372
|
csat: {
|
|
1328
1373
|
background: string;
|
|
1329
1374
|
};
|
|
1375
|
+
memoryDialog: {
|
|
1376
|
+
titleText: string;
|
|
1377
|
+
markdownBodyText: string;
|
|
1378
|
+
markdownLinkText: string;
|
|
1379
|
+
positiveBackground: string;
|
|
1380
|
+
positiveText: string;
|
|
1381
|
+
positiveBorderColor: string;
|
|
1382
|
+
negativeBackground: string;
|
|
1383
|
+
negativeText: string;
|
|
1384
|
+
negativeBorderColor: string;
|
|
1385
|
+
};
|
|
1330
1386
|
}
|
|
1331
1387
|
|
|
1332
1388
|
/**
|
|
@@ -1444,6 +1500,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
1444
1500
|
EndArea: () => ReactNode;
|
|
1445
1501
|
MenuButton: () => ReactNode;
|
|
1446
1502
|
Title: () => ReactNode;
|
|
1503
|
+
MemoryIndicator: () => ReactNode;
|
|
1447
1504
|
HandoffButton: () => ReactNode;
|
|
1448
1505
|
ConversationCloseButton: () => ReactNode;
|
|
1449
1506
|
ExpandButton: () => ReactNode;
|
|
@@ -1460,6 +1517,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
1460
1517
|
EndArea: () => ReactNode;
|
|
1461
1518
|
MenuButton: () => ReactNode;
|
|
1462
1519
|
Title: () => ReactNode;
|
|
1520
|
+
MemoryIndicator: () => ReactNode;
|
|
1463
1521
|
HandoffButton: () => ReactNode;
|
|
1464
1522
|
ConversationCloseButton: () => ReactNode;
|
|
1465
1523
|
ExpandButton: () => ReactNode;
|
|
@@ -1471,6 +1529,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
1471
1529
|
EndArea: () => ReactNode;
|
|
1472
1530
|
MenuButton: () => ReactNode;
|
|
1473
1531
|
Title: () => ReactNode;
|
|
1532
|
+
MemoryIndicator: () => ReactNode;
|
|
1474
1533
|
HandoffButton: () => ReactNode;
|
|
1475
1534
|
ConversationCloseButton: () => ReactNode;
|
|
1476
1535
|
ExpandButton: () => ReactNode;
|
|
@@ -1492,6 +1551,9 @@ export declare const ConversationHeaderLayout: {
|
|
|
1492
1551
|
Title: (props: {
|
|
1493
1552
|
component: () => ReactNode;
|
|
1494
1553
|
}) => null;
|
|
1554
|
+
MemoryIndicator: (props: {
|
|
1555
|
+
component: () => ReactNode;
|
|
1556
|
+
}) => null;
|
|
1495
1557
|
HandoffButton: (props: {
|
|
1496
1558
|
component: () => ReactNode;
|
|
1497
1559
|
}) => null;
|
|
@@ -3789,6 +3851,14 @@ declare interface ManualSessionInfoParams {
|
|
|
3789
3851
|
sessionHandler: AIAgentSessionHandler;
|
|
3790
3852
|
}
|
|
3791
3853
|
|
|
3854
|
+
declare interface MemoryInfo {
|
|
3855
|
+
enabled: boolean;
|
|
3856
|
+
showIndicator: boolean;
|
|
3857
|
+
toggleAllowed: boolean;
|
|
3858
|
+
deleteOnOff: boolean;
|
|
3859
|
+
consentDialog: MessengerSettingsResponse['memory']['consent_dialog'];
|
|
3860
|
+
}
|
|
3861
|
+
|
|
3792
3862
|
/**
|
|
3793
3863
|
* @description
|
|
3794
3864
|
* - single: The message is standalone (not grouped with adjacent messages).
|
|
@@ -3933,7 +4003,7 @@ declare interface MessengerProps extends AIAgentProps {
|
|
|
3933
4003
|
}
|
|
3934
4004
|
|
|
3935
4005
|
declare interface MessengerSessionCache {
|
|
3936
|
-
getSettings(userId: string):
|
|
4006
|
+
getSettings(userId: string): CachedMessengerSettings | null;
|
|
3937
4007
|
setSettings(userId: string, value: MessengerSettingsResponse): void;
|
|
3938
4008
|
getAnonUser(): AnonUserSessionData | null;
|
|
3939
4009
|
setAnonUser(value: AnonUserSessionData): void;
|
|
@@ -3992,6 +4062,13 @@ declare interface MessengerSettingsResponse {
|
|
|
3992
4062
|
image_url: string;
|
|
3993
4063
|
auto_open: boolean;
|
|
3994
4064
|
};
|
|
4065
|
+
memory: {
|
|
4066
|
+
enabled: boolean;
|
|
4067
|
+
show_indicator: boolean;
|
|
4068
|
+
toggle_allowed: boolean;
|
|
4069
|
+
delete_on_off: boolean;
|
|
4070
|
+
consent_dialog: { body: string } | null;
|
|
4071
|
+
};
|
|
3995
4072
|
auto_created_user?: {
|
|
3996
4073
|
user_id: string;
|
|
3997
4074
|
session_token: string;
|
|
@@ -4008,10 +4085,9 @@ declare interface MessengerSettingsResponse {
|
|
|
4008
4085
|
country: string | null;
|
|
4009
4086
|
}
|
|
4010
4087
|
|
|
4011
|
-
declare
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
}
|
|
4088
|
+
declare type MessengerSettingsUpdatedParams =
|
|
4089
|
+
| { settings: MessengerSettingsResponse; source: 'server' }
|
|
4090
|
+
| { settings: CachedMessengerSettings; source: 'cache' };
|
|
4015
4091
|
|
|
4016
4092
|
declare type MultiSelectField = {
|
|
4017
4093
|
key: string;
|
|
@@ -4392,6 +4468,11 @@ declare interface SearchConversationParams {
|
|
|
4392
4468
|
context: Record<string, string>;
|
|
4393
4469
|
}
|
|
4394
4470
|
|
|
4471
|
+
declare interface SetUserMemoryStateParams {
|
|
4472
|
+
enabled: boolean;
|
|
4473
|
+
contextAiAgentId?: string;
|
|
4474
|
+
}
|
|
4475
|
+
|
|
4395
4476
|
declare type SingleSelectField = {
|
|
4396
4477
|
key: string;
|
|
4397
4478
|
type: 'single-select';
|
|
@@ -4564,6 +4645,10 @@ declare type StringSet = {
|
|
|
4564
4645
|
A11Y_FILE_IMAGE: (name: string) => string;
|
|
4565
4646
|
A11Y_FILE_VIDEO: (name: string) => string;
|
|
4566
4647
|
A11Y_FILE_DOCUMENT: (name: string) => string;
|
|
4648
|
+
A11Y_RECEIVED_FILE_IMAGE: string;
|
|
4649
|
+
A11Y_RECEIVED_FILE_VIDEO: string;
|
|
4650
|
+
A11Y_RECEIVED_FILE_PDF: (name: string) => string;
|
|
4651
|
+
A11Y_RECEIVED_FILES_IMAGE_COUNT: (count: number) => string;
|
|
4567
4652
|
A11Y_FILE_SELECTED?: (label: string) => string;
|
|
4568
4653
|
A11Y_FILE_REMOVE_BUTTON: (name: string) => string;
|
|
4569
4654
|
A11Y_SCREEN_CONVERSATION: string;
|
|
@@ -4576,7 +4661,6 @@ declare type StringSet = {
|
|
|
4576
4661
|
A11Y_FILE_SIZE_EXCEEDED: (maxSizeMB: number) => string;
|
|
4577
4662
|
A11Y_CSAT_FORM_ERROR: string;
|
|
4578
4663
|
A11Y_CONVERSATION_ITEM: (agent: string, status: string, time: string, count: number) => string;
|
|
4579
|
-
A11Y_RATING_LABEL: (score: number, label: string) => string;
|
|
4580
4664
|
A11Y_CONNECT_AGENT: string;
|
|
4581
4665
|
A11Y_CLOSE_MESSENGER: string;
|
|
4582
4666
|
A11Y_EXPAND_MESSENGER: string;
|
|
@@ -4598,6 +4682,21 @@ declare type StringSet = {
|
|
|
4598
4682
|
HANDOFF_CONFIRM__DESCRIPTION: string;
|
|
4599
4683
|
HANDOFF_CONFIRM__CANCEL: string;
|
|
4600
4684
|
HANDOFF_CONFIRM__HANDOFF: string;
|
|
4685
|
+
MEMORY__DIALOG_TITLE: string;
|
|
4686
|
+
MEMORY__DESC_ON: string;
|
|
4687
|
+
MEMORY__DESC_OFF: string;
|
|
4688
|
+
MEMORY__BUTTON_USE: string;
|
|
4689
|
+
MEMORY__BUTTON_DONT_USE: string;
|
|
4690
|
+
MEMORY__BUTTON_KEEP_USING: string;
|
|
4691
|
+
MEMORY__BUTTON_DISABLE: string;
|
|
4692
|
+
MEMORY__BUTTON_DISABLE_AND_DELETE: string;
|
|
4693
|
+
MEMORY__BUTTON_KEEP_OFF: string;
|
|
4694
|
+
MEMORY__BUTTON_ENABLE: string;
|
|
4695
|
+
MEMORY__BUTTON_CANCEL: string;
|
|
4696
|
+
MEMORY__ERROR_MESSAGE: string;
|
|
4697
|
+
A11Y_MEMORY_INDICATOR_MANAGE: string;
|
|
4698
|
+
A11Y_MEMORY_INDICATOR_ON: string;
|
|
4699
|
+
A11Y_MEMORY_INDICATOR_OFF: string;
|
|
4601
4700
|
CONNECTION_DELAY__TITLE: string;
|
|
4602
4701
|
CONNECTION_DELAY__DESCRIPTION: (formattedTime: string) => string;
|
|
4603
4702
|
/** @deprecated Please use DATE_FORMAT__DATE_SHORT instead. **/
|