@sendbird/ai-agent-messenger-react 1.24.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/BjKg30ip.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/{CsqVHJCI.js → BfU8xV9U.js} +42 -20
- package/dist/es/{CkoDhLul.js → CaPTuvBH.js} +41 -19
- package/dist/es/{BEqaF3DV.js → CgKly2NZ.js} +42 -20
- package/dist/es/{BUKDIngh.js → CjJliSJt.js} +44 -22
- package/dist/es/{7vCh5QlQ.js → CxajqGzE.js} +44 -22
- package/dist/es/{5tV340wv.js → D0puKqeb.js} +42 -20
- package/dist/es/{CKLYurhd.js → DHn-_17E.js} +38 -16
- package/dist/es/{CXt8kUk8.js → DhZK0r9g.js} +39 -17
- package/dist/es/{ZdYGAJn_.js → DzAt_5Ix.js} +36 -14
- package/dist/es/tbfFzmFJ.js +198 -0
- package/dist/index.cjs +179 -183
- package/dist/index.d.ts +361 -134
- package/dist/index.js +5906 -4912
- package/package.json +7 -9
- package/dist/cjs/BBssumix.cjs +0 -1
- package/dist/cjs/BCDZXq61.cjs +0 -1
- package/dist/cjs/Bz2jHC-Z.cjs +0 -1
- package/dist/cjs/CFY_588Z.cjs +0 -1
- package/dist/cjs/CHz4H01e.cjs +0 -1
- package/dist/cjs/CfhYXtgc.cjs +0 -1
- package/dist/cjs/Jlh8RyJW.cjs +0 -1
- package/dist/cjs/RKaCusvu.cjs +0 -1
- package/dist/cjs/Sz9ta-fi.cjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { Action } from '@sendbird/uikit-message-template';
|
|
2
|
-
import { AIAgentChannelFilter } from '@sendbird/chat/aiAgent';
|
|
3
|
-
import { AIAgentGroupChannelListQuery } from '@sendbird/chat/aiAgent';
|
|
4
|
-
import { AIAgentModule } from '@sendbird/chat/aiAgent';
|
|
5
|
-
import { BaseChannel } from '@sendbird/chat';
|
|
6
|
-
import { BaseMessage } from '@sendbird/chat/message';
|
|
2
|
+
import type { AIAgentChannelFilter } from '@sendbird/chat/aiAgent';
|
|
3
|
+
import type { AIAgentGroupChannelListQuery } from '@sendbird/chat/aiAgent';
|
|
4
|
+
import type { AIAgentModule } from '@sendbird/chat/aiAgent';
|
|
5
|
+
import type { BaseChannel } from '@sendbird/chat';
|
|
6
|
+
import type { BaseMessage } from '@sendbird/chat/message';
|
|
7
7
|
import type { CollectionEventSource } from '@sendbird/chat';
|
|
8
8
|
import { ComponentType } from 'react';
|
|
9
|
-
import { ConnectionHandler } from '@sendbird/chat';
|
|
9
|
+
import type { ConnectionHandler } from '@sendbird/chat';
|
|
10
10
|
import { Context } from 'react';
|
|
11
|
-
import { Conversation as Conversation_2 } from '@sendbird/chat/aiAgent';
|
|
12
|
-
import { ConversationStatus } from '@sendbird/chat/aiAgent';
|
|
11
|
+
import type { Conversation as Conversation_2 } from '@sendbird/chat/aiAgent';
|
|
12
|
+
import type { ConversationStatus } from '@sendbird/chat/aiAgent';
|
|
13
13
|
import { CSSProperties } from 'react';
|
|
14
|
-
import { DeskChannelFilter } from '@sendbird/chat/aiAgent';
|
|
15
|
-
import { FileMessage } from '@sendbird/chat/message';
|
|
16
|
-
import { FileMessageCreateParams } from '@sendbird/chat/message';
|
|
14
|
+
import type { DeskChannelFilter } from '@sendbird/chat/aiAgent';
|
|
15
|
+
import type { FileMessage } from '@sendbird/chat/message';
|
|
16
|
+
import type { FileMessageCreateParams } from '@sendbird/chat/message';
|
|
17
17
|
import { format } from 'date-fns';
|
|
18
18
|
import { ForwardRefExoticComponent } from 'react';
|
|
19
|
-
import { GroupChannel } from '@sendbird/chat/groupChannel';
|
|
20
|
-
import { GroupChannelChangelogs } from '@sendbird/chat/aiAgent';
|
|
21
|
-
import { GroupChannelHandler } from '@sendbird/chat/groupChannel';
|
|
22
|
-
import { GroupChannelListOrder } from '@sendbird/chat/groupChannel';
|
|
23
|
-
import { GroupChannelModule } from '@sendbird/chat/groupChannel';
|
|
19
|
+
import type { GroupChannel } from '@sendbird/chat/groupChannel';
|
|
20
|
+
import type { GroupChannelChangelogs } from '@sendbird/chat/aiAgent';
|
|
21
|
+
import type { GroupChannelHandler } from '@sendbird/chat/groupChannel';
|
|
22
|
+
import type { GroupChannelListOrder } from '@sendbird/chat/groupChannel';
|
|
23
|
+
import type { GroupChannelModule } from '@sendbird/chat/groupChannel';
|
|
24
24
|
import { JSX } from 'react/jsx-runtime';
|
|
25
25
|
import type { Locale } from 'date-fns';
|
|
26
|
-
import { LogLevel as LogLevel_2 } from '@sendbird/chat';
|
|
27
|
-
import { MultipleFilesMessage } from '@sendbird/chat/message';
|
|
28
|
-
import { MultipleFilesMessageCreateParams } from '@sendbird/chat/message';
|
|
26
|
+
import type { LogLevel as LogLevel_2 } from '@sendbird/chat';
|
|
27
|
+
import type { MultipleFilesMessage } from '@sendbird/chat/message';
|
|
28
|
+
import type { MultipleFilesMessageCreateParams } from '@sendbird/chat/message';
|
|
29
29
|
import { PropsWithChildren } from 'react';
|
|
30
30
|
import { ReactNode } from 'react';
|
|
31
31
|
import { RefAttributes } from 'react';
|
|
32
32
|
import { RefObject } from 'react';
|
|
33
|
-
import { SendbirdChatParams } from '@sendbird/chat';
|
|
34
|
-
import { SendbirdChatWith } from '@sendbird/chat';
|
|
35
|
-
import { SendbirdError } from '@sendbird/chat';
|
|
36
|
-
import { SessionHandler } from '@sendbird/chat';
|
|
33
|
+
import type { SendbirdChatParams } from '@sendbird/chat';
|
|
34
|
+
import type { SendbirdChatWith } from '@sendbird/chat';
|
|
35
|
+
import type { SendbirdError } from '@sendbird/chat';
|
|
36
|
+
import type { SessionHandler } from '@sendbird/chat';
|
|
37
37
|
import { UIEvent as UIEvent_2 } from 'react';
|
|
38
|
-
import { User } from '@sendbird/chat';
|
|
39
|
-
import { UserMessage } from '@sendbird/chat/message';
|
|
40
|
-
import { UserMessageCreateParams } from '@sendbird/chat/message';
|
|
38
|
+
import type { User } from '@sendbird/chat';
|
|
39
|
+
import type { UserMessage } from '@sendbird/chat/message';
|
|
40
|
+
import type { UserMessageCreateParams } from '@sendbird/chat/message';
|
|
41
41
|
|
|
42
42
|
export declare interface ActionbookInfo {
|
|
43
43
|
key: string;
|
|
@@ -58,19 +58,18 @@ declare interface ActiveChannel {
|
|
|
58
58
|
* @description Conversation status of the active channel.
|
|
59
59
|
* If the conversation is not started, this will be undefined.
|
|
60
60
|
* */
|
|
61
|
-
conversationStatus?:
|
|
61
|
+
conversationStatus?: ChatSDKConversationStatus;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
declare interface ActiveChannelUpdatedParams {
|
|
65
65
|
channelUrl: string;
|
|
66
66
|
status: ActiveChannel['status'];
|
|
67
|
-
conversationStatus?:
|
|
67
|
+
conversationStatus?: ChatSDKConversationStatus;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
export declare interface AgentClientHandlers {
|
|
70
|
+
export declare interface AgentClientHandlers extends AIAgentClientHandlers {
|
|
71
71
|
onMessageSend?: (message: string) => void;
|
|
72
72
|
onFunctionCallDetailClick?: (func: FunctionCallsInfo) => void;
|
|
73
|
-
onCustomEvent?: (event: CustomEvent_2) => void;
|
|
74
73
|
onInitializeFailed?: (error: Error) => void;
|
|
75
74
|
}
|
|
76
75
|
|
|
@@ -151,12 +150,12 @@ customWebSocketHost?: string;
|
|
|
151
150
|
* @public
|
|
152
151
|
* @description Inject a custom Chat SDK. GroupChannelModule and AIAgentModule must be included in the initialization.
|
|
153
152
|
* */
|
|
154
|
-
customChatSDK?:
|
|
153
|
+
customChatSDK?: AIAgentChatSDK;
|
|
155
154
|
/**
|
|
156
155
|
* @public
|
|
157
156
|
* @description Custom parameters for initializing the chat SDK.
|
|
158
157
|
* */
|
|
159
|
-
chatParams?: Partial<
|
|
158
|
+
chatParams?: Partial<AIAgentChatSDKParams>;
|
|
160
159
|
/**
|
|
161
160
|
* @public
|
|
162
161
|
* @description Custom state management for the ai agent client.
|
|
@@ -212,7 +211,7 @@ dir?: "ltr" | "rtl";
|
|
|
212
211
|
* @public
|
|
213
212
|
* @description logLevel for the ai agent client.
|
|
214
213
|
* */
|
|
215
|
-
logLevel?:
|
|
214
|
+
logLevel?: ChatSDKLogLevel;
|
|
216
215
|
/**
|
|
217
216
|
* @public
|
|
218
217
|
* @description Language for the ai agent client. Should follow the IETF BCP 47 format.
|
|
@@ -290,7 +289,7 @@ __internalVariables?: InternalMessageTemplateVariables;
|
|
|
290
289
|
children?: ReactNode | undefined;
|
|
291
290
|
} & RefAttributes<MessengerSessionRef>>;
|
|
292
291
|
|
|
293
|
-
export declare function AgentUIProviderContainer({ appearance, rootElement, logger, language, languageCode, stringSet, children, messageTemplate, icons, theme, }: Props): JSX.Element;
|
|
292
|
+
export declare function AgentUIProviderContainer({ appearance, rootElement, logger, language, languageCode, stringSet, children, messageTemplate, icons, theme, entryElement, modalRootElement, }: Props): JSX.Element;
|
|
294
293
|
|
|
295
294
|
declare abstract class AIAgentBaseStats {
|
|
296
295
|
protected timers: Map<string, TimerData> = new Map();
|
|
@@ -385,6 +384,16 @@ declare interface AIAgentCache {
|
|
|
385
384
|
messenger: MessengerSessionCache;
|
|
386
385
|
}
|
|
387
386
|
|
|
387
|
+
declare type AIAgentChatSDK = ChatSDKSendbirdChatWith<[ChatSDKGroupChannelModule, ChatSDKAIAgentModule]>;
|
|
388
|
+
|
|
389
|
+
declare type AIAgentChatSDK_2 = ChatSDKSendbirdChatWith<[ChatSDKGroupChannelModule, ChatSDKAIAgentModule]>;
|
|
390
|
+
|
|
391
|
+
declare type AIAgentChatSDKParams = ChatSDKSendbirdChatParams<[ChatSDKGroupChannelModule, ChatSDKAIAgentModule]>;
|
|
392
|
+
|
|
393
|
+
declare interface AIAgentClientHandlers {
|
|
394
|
+
onCustomEvent?: (event: CustomEvent_2) => void;
|
|
395
|
+
}
|
|
396
|
+
|
|
388
397
|
declare type AIAgentCommonIconName =
|
|
389
398
|
| 'close'
|
|
390
399
|
| 'send'
|
|
@@ -413,7 +422,9 @@ declare type AIAgentCommonIconName =
|
|
|
413
422
|
| 'delight'
|
|
414
423
|
| 'photo'
|
|
415
424
|
| 'add'
|
|
416
|
-
| 'document'
|
|
425
|
+
| 'document'
|
|
426
|
+
| 'download'
|
|
427
|
+
| 'memory';
|
|
417
428
|
|
|
418
429
|
export declare interface AIAgentConfig {
|
|
419
430
|
conversation?: {
|
|
@@ -470,7 +481,7 @@ export declare interface AIAgentConfig {
|
|
|
470
481
|
* */
|
|
471
482
|
messageAlertSoundEnabled?: boolean;
|
|
472
483
|
/**
|
|
473
|
-
*
|
|
484
|
+
* File viewer configuration.
|
|
474
485
|
* */
|
|
475
486
|
fileViewer?: {
|
|
476
487
|
/**
|
|
@@ -488,7 +499,7 @@ declare interface AIAgentContextValue {
|
|
|
488
499
|
|
|
489
500
|
/** @internal Do not use directly. This is an internal SDK instance. */
|
|
490
501
|
_aiAgentSDK: AIAgentInterface;
|
|
491
|
-
chatSDK:
|
|
502
|
+
chatSDK: AIAgentChatSDK_2;
|
|
492
503
|
deskClient: DeskClientInterface;
|
|
493
504
|
|
|
494
505
|
language: string;
|
|
@@ -503,32 +514,38 @@ declare interface AIAgentContextValue {
|
|
|
503
514
|
|
|
504
515
|
queryParams?: AIAgentQueryParams;
|
|
505
516
|
config?: AIAgentConfig;
|
|
517
|
+
|
|
518
|
+
handlers?: AIAgentClientHandlers;
|
|
506
519
|
}
|
|
507
520
|
|
|
508
521
|
declare interface AIAgentConversationContextValue {
|
|
509
|
-
conversation:
|
|
522
|
+
conversation: ChatSDKConversation | undefined;
|
|
523
|
+
|
|
524
|
+
actions: {
|
|
525
|
+
setUserMemoryState: (params: { enabled: boolean }) => Promise<MemoryInfo>;
|
|
526
|
+
};
|
|
510
527
|
|
|
511
528
|
channelSource: {
|
|
512
|
-
channel:
|
|
513
|
-
error:
|
|
529
|
+
channel: ChatSDKGroupChannel | undefined;
|
|
530
|
+
error: ChatSDKSendbirdError | undefined;
|
|
514
531
|
refetch: () => Promise<void>;
|
|
515
532
|
closeConversation: () => Promise<void>;
|
|
516
533
|
};
|
|
517
534
|
|
|
518
535
|
messageSource: {
|
|
519
|
-
messages:
|
|
520
|
-
newMessages:
|
|
536
|
+
messages: ChatSDKBaseMessage[];
|
|
537
|
+
newMessages: ChatSDKBaseMessage[];
|
|
521
538
|
initialized: boolean;
|
|
522
539
|
subscribeMessageEvents: (listener: (event: ConversationMessageEvent) => void) => () => void;
|
|
523
540
|
loadPrevious: () => Promise<void>;
|
|
524
541
|
loadNext: () => Promise<void>;
|
|
525
|
-
sendUserMessage: (params:
|
|
526
|
-
sendFileMessage: (params:
|
|
527
|
-
sendMultipleFilesMessage: (params:
|
|
528
|
-
deleteMessage: (message:
|
|
542
|
+
sendUserMessage: (params: ChatSDKUserMessageCreateParams) => Promise<ChatSDKUserMessage>;
|
|
543
|
+
sendFileMessage: (params: ChatSDKFileMessageCreateParams) => Promise<ChatSDKFileMessage>;
|
|
544
|
+
sendMultipleFilesMessage: (params: ChatSDKMultipleFilesMessageCreateParams) => Promise<ChatSDKMultipleFilesMessage>;
|
|
545
|
+
deleteMessage: (message: ChatSDKUserMessage | ChatSDKFileMessage | ChatSDKMultipleFilesMessage) => Promise<void>;
|
|
529
546
|
resendMessage: (
|
|
530
|
-
message:
|
|
531
|
-
) => Promise<
|
|
547
|
+
message: ChatSDKUserMessage | ChatSDKFileMessage | ChatSDKMultipleFilesMessage,
|
|
548
|
+
) => Promise<ChatSDKUserMessage | ChatSDKFileMessage | ChatSDKMultipleFilesMessage>;
|
|
532
549
|
resetNewMessages: () => void;
|
|
533
550
|
};
|
|
534
551
|
|
|
@@ -545,8 +562,8 @@ declare interface AIAgentConversationContextValue {
|
|
|
545
562
|
declare interface AIAgentConversationListContextValue {
|
|
546
563
|
listSource: {
|
|
547
564
|
initialized: boolean;
|
|
548
|
-
error:
|
|
549
|
-
channels:
|
|
565
|
+
error: ChatSDKSendbirdError | undefined;
|
|
566
|
+
channels: ChatSDKGroupChannel[];
|
|
550
567
|
loadMore: () => Promise<void>;
|
|
551
568
|
};
|
|
552
569
|
}
|
|
@@ -556,12 +573,12 @@ declare interface AIAgentGroupChannelFilter {
|
|
|
556
573
|
* The filter applied to AI agent channels.
|
|
557
574
|
* It determines whether to include or exclude AI agent channels in the query results.
|
|
558
575
|
*/
|
|
559
|
-
aiAgentChannelFilter?:
|
|
576
|
+
aiAgentChannelFilter?: ChatSDKAIAgentChannelFilter;
|
|
560
577
|
/**
|
|
561
578
|
* The filter applied to AI agent conversation statuses.
|
|
562
579
|
* It allows filtering channels based on the status of their conversations.
|
|
563
580
|
*/
|
|
564
|
-
aiAgentConversationStatusFilter?:
|
|
581
|
+
aiAgentConversationStatusFilter?: ChatSDKConversationStatus[];
|
|
565
582
|
/**
|
|
566
583
|
* The list of AI agent IDs to filter the channels.
|
|
567
584
|
* Only channels associated with these AI agents will be included in the results.
|
|
@@ -571,7 +588,7 @@ declare interface AIAgentGroupChannelFilter {
|
|
|
571
588
|
* The filter applied to Desk channels.
|
|
572
589
|
* It determines whether to include or exclude Desk channels in the query results.
|
|
573
590
|
*/
|
|
574
|
-
deskChannelFilter?:
|
|
591
|
+
deskChannelFilter?: ChatSDKDeskChannelFilter;
|
|
575
592
|
/**
|
|
576
593
|
* The list of pinned channel URLs.
|
|
577
594
|
* These channels are prioritized in the query results.
|
|
@@ -680,12 +697,17 @@ declare interface AIAgentInterface {
|
|
|
680
697
|
updateContext: (channelUrl: string, context: Record<string, string>) => Promise<ContextObject>;
|
|
681
698
|
/** Retrieves the context data for the specified channel */
|
|
682
699
|
getContextObject: (channelUrl: string) => Promise<ContextObject>;
|
|
700
|
+
/** Clears memories saved for the current user */
|
|
701
|
+
clearUserMemories: (params?: ClearUserMemoriesParams) => Promise<void>;
|
|
683
702
|
|
|
684
703
|
/** @internal Refreshes the active channel by re-requesting messenger settings */
|
|
685
704
|
refreshActiveChannel: (options?: { useKnownActiveChannelUrl?: boolean }) => Promise<string>;
|
|
686
705
|
|
|
706
|
+
/** @internal Sets whether the current user uses memory */
|
|
707
|
+
setUserMemoryState: (params: SetUserMemoryStateParams) => Promise<MemoryInfo>;
|
|
708
|
+
|
|
687
709
|
/** @internal Initializes a conversation on the channel if needed (AI Agent channel without conversation). */
|
|
688
|
-
initConversationIfNeeded: (channel:
|
|
710
|
+
initConversationIfNeeded: (channel: ChatSDKGroupChannel) => Promise<void>;
|
|
689
711
|
|
|
690
712
|
/** Disposes all resources held by this instance (WebSocket, desk auth, event handlers). */
|
|
691
713
|
dispose: () => void;
|
|
@@ -711,10 +733,11 @@ declare interface AIAgentLanguageSet {
|
|
|
711
733
|
declare interface AIAgentMessengerSessionContextValue {
|
|
712
734
|
userSessionInfo?: UserSessionInfo | ManualSessionInfo | AnonymousSessionInfo;
|
|
713
735
|
|
|
714
|
-
sdkUser: null |
|
|
736
|
+
sdkUser: null | ChatSDKUser;
|
|
715
737
|
userSession: null | UserSession;
|
|
716
738
|
aiAgentInfo: null | AIAgentInfo;
|
|
717
739
|
launcherInfo: null | LauncherInfo;
|
|
740
|
+
memoryInfo: null | MemoryInfo;
|
|
718
741
|
|
|
719
742
|
connectionError?: Error;
|
|
720
743
|
|
|
@@ -728,7 +751,7 @@ declare interface AIAgentMessengerSessionContextValue {
|
|
|
728
751
|
authenticate: () => Promise<MessengerSettingsResponse>;
|
|
729
752
|
deauthenticate: () => Promise<void>;
|
|
730
753
|
|
|
731
|
-
createAttachmentRules: (params: { channel?:
|
|
754
|
+
createAttachmentRules: (params: { channel?: ChatSDKGroupChannel; uploadSizeLimit?: number }) => AttachmentRules;
|
|
732
755
|
/**
|
|
733
756
|
* @internal
|
|
734
757
|
*/
|
|
@@ -774,12 +797,12 @@ export declare type AIAgentProps = PropsWithChildren<{
|
|
|
774
797
|
* @public
|
|
775
798
|
* @description Inject a custom Chat SDK. GroupChannelModule and AIAgentModule must be included in the initialization.
|
|
776
799
|
* */
|
|
777
|
-
customChatSDK?:
|
|
800
|
+
customChatSDK?: AIAgentChatSDK;
|
|
778
801
|
/**
|
|
779
802
|
* @public
|
|
780
803
|
* @description Custom parameters for initializing the chat SDK.
|
|
781
804
|
* */
|
|
782
|
-
chatParams?: Partial<
|
|
805
|
+
chatParams?: Partial<AIAgentChatSDKParams>;
|
|
783
806
|
/**
|
|
784
807
|
* @public
|
|
785
808
|
* @description Custom state management for the ai agent client.
|
|
@@ -837,7 +860,7 @@ export declare type AIAgentProps = PropsWithChildren<{
|
|
|
837
860
|
* @public
|
|
838
861
|
* @description logLevel for the ai agent client.
|
|
839
862
|
* */
|
|
840
|
-
logLevel?:
|
|
863
|
+
logLevel?: ChatSDKLogLevel;
|
|
841
864
|
/**
|
|
842
865
|
* @public
|
|
843
866
|
* @description Language for the ai agent client. Should follow the IETF BCP 47 format.
|
|
@@ -921,7 +944,7 @@ export declare interface AIAgentQueryParams {
|
|
|
921
944
|
* @description Represents an authenticated session state. Created after successful authentication.
|
|
922
945
|
*/
|
|
923
946
|
declare class AIAgentSession {
|
|
924
|
-
private readonly _sdkUser:
|
|
947
|
+
private readonly _sdkUser: ChatSDKUser;
|
|
925
948
|
private readonly _userSession: UserSession;
|
|
926
949
|
private readonly _dispatcher: Dispatcher;
|
|
927
950
|
private _activeChannel: ActiveChannel;
|
|
@@ -936,7 +959,7 @@ declare class AIAgentSession {
|
|
|
936
959
|
/**
|
|
937
960
|
* The authenticated Sendbird user.
|
|
938
961
|
*/
|
|
939
|
-
get sdkUser():
|
|
962
|
+
get sdkUser(): ChatSDKUser {
|
|
940
963
|
return this._sdkUser;
|
|
941
964
|
}
|
|
942
965
|
|
|
@@ -982,12 +1005,12 @@ declare class AIAgentSession {
|
|
|
982
1005
|
/**
|
|
983
1006
|
* AI Agent session handler.
|
|
984
1007
|
* */
|
|
985
|
-
declare interface AIAgentSessionHandler extends
|
|
1008
|
+
declare interface AIAgentSessionHandler extends ChatSDKSessionHandler {
|
|
986
1009
|
onExternalAuthTokenExpired?: (data: ExternalAuthTokenExpiredData) => void;
|
|
987
1010
|
}
|
|
988
1011
|
|
|
989
1012
|
declare interface AIAgentSessionParams {
|
|
990
|
-
sdkUser:
|
|
1013
|
+
sdkUser: ChatSDKUser;
|
|
991
1014
|
userSession: UserSession;
|
|
992
1015
|
activeChannel: ActiveChannel;
|
|
993
1016
|
dispatcher: Dispatcher;
|
|
@@ -1020,7 +1043,7 @@ declare interface AIAgentStringSet {
|
|
|
1020
1043
|
powered_by: string;
|
|
1021
1044
|
citation_title: string;
|
|
1022
1045
|
start_new_conversation_label: string;
|
|
1023
|
-
scroll_to_new_messages_label: (messages:
|
|
1046
|
+
scroll_to_new_messages_label: (messages: ChatSDKBaseMessage[]) => string;
|
|
1024
1047
|
|
|
1025
1048
|
failed_message_resend: string;
|
|
1026
1049
|
failed_message_remove: string;
|
|
@@ -1060,6 +1083,10 @@ declare interface AIAgentStringSet {
|
|
|
1060
1083
|
a11y_file_image: (name: string) => string;
|
|
1061
1084
|
a11y_file_video: (name: string) => string;
|
|
1062
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;
|
|
1063
1090
|
a11y_screen_conversation: string;
|
|
1064
1091
|
a11y_screen_conversation_with_agent: (name: string) => string;
|
|
1065
1092
|
a11y_screen_conversation_list_no_count: string;
|
|
@@ -1080,6 +1107,14 @@ declare interface AIAgentStringSet {
|
|
|
1080
1107
|
a11y_hint_open_file: string;
|
|
1081
1108
|
a11y_hint_open_image: string;
|
|
1082
1109
|
a11y_hint_send_reply: string;
|
|
1110
|
+
|
|
1111
|
+
image_viewer_default_title: string;
|
|
1112
|
+
a11y_image_viewer_close: string;
|
|
1113
|
+
a11y_image_viewer_previous: string;
|
|
1114
|
+
a11y_image_viewer_next: string;
|
|
1115
|
+
a11y_image_viewer_download: string;
|
|
1116
|
+
|
|
1117
|
+
attachment_document: string;
|
|
1083
1118
|
};
|
|
1084
1119
|
|
|
1085
1120
|
conversation_list: {
|
|
@@ -1110,7 +1145,7 @@ declare interface AIAgentStringSet {
|
|
|
1110
1145
|
question: string;
|
|
1111
1146
|
submit_label: string;
|
|
1112
1147
|
submission_expired: string;
|
|
1113
|
-
|
|
1148
|
+
a11y_csat_rating_label: (score: number, label: string) => string;
|
|
1114
1149
|
a11y_hint_select_rating: string;
|
|
1115
1150
|
};
|
|
1116
1151
|
|
|
@@ -1147,6 +1182,29 @@ declare interface AIAgentStringSet {
|
|
|
1147
1182
|
confirm_cancel: string;
|
|
1148
1183
|
confirm_handoff: string;
|
|
1149
1184
|
};
|
|
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
|
+
|
|
1204
|
+
connection_delay: {
|
|
1205
|
+
title: string;
|
|
1206
|
+
description: (formattedTime: string) => string;
|
|
1207
|
+
};
|
|
1150
1208
|
}
|
|
1151
1209
|
|
|
1152
1210
|
declare type AnonUserSessionData = { userId: string; authToken: string; expireAt: number };
|
|
@@ -1204,7 +1262,71 @@ declare type BaseMessageProps<T> = T & {
|
|
|
1204
1262
|
children?: ReactNode;
|
|
1205
1263
|
};
|
|
1206
1264
|
|
|
1207
|
-
|
|
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
|
+
|
|
1273
|
+
declare type ChatSDKAIAgentChannelFilter = AIAgentChannelFilter;
|
|
1274
|
+
|
|
1275
|
+
declare type ChatSDKAIAgentGroupChannelListQuery = AIAgentGroupChannelListQuery;
|
|
1276
|
+
|
|
1277
|
+
declare type ChatSDKAIAgentModule = AIAgentModule;
|
|
1278
|
+
|
|
1279
|
+
declare type ChatSDKBaseChannel = BaseChannel;
|
|
1280
|
+
|
|
1281
|
+
declare type ChatSDKBaseMessage = BaseMessage;
|
|
1282
|
+
|
|
1283
|
+
declare type ChatSDKCollectionEventSource = CollectionEventSource;
|
|
1284
|
+
|
|
1285
|
+
declare type ChatSDKConnectionHandler = ConnectionHandler;
|
|
1286
|
+
|
|
1287
|
+
declare type ChatSDKConversation = Conversation_2;
|
|
1288
|
+
|
|
1289
|
+
declare type ChatSDKConversationStatus = ConversationStatus;
|
|
1290
|
+
|
|
1291
|
+
declare type ChatSDKDeskChannelFilter = DeskChannelFilter;
|
|
1292
|
+
|
|
1293
|
+
declare type ChatSDKFileMessage = FileMessage;
|
|
1294
|
+
|
|
1295
|
+
declare type ChatSDKFileMessageCreateParams = FileMessageCreateParams;
|
|
1296
|
+
|
|
1297
|
+
declare type ChatSDKGroupChannel = GroupChannel;
|
|
1298
|
+
|
|
1299
|
+
declare type ChatSDKGroupChannelChangelogs = GroupChannelChangelogs;
|
|
1300
|
+
|
|
1301
|
+
declare type ChatSDKGroupChannelHandler = GroupChannelHandler;
|
|
1302
|
+
|
|
1303
|
+
declare type ChatSDKGroupChannelListOrder = GroupChannelListOrder;
|
|
1304
|
+
|
|
1305
|
+
declare type ChatSDKGroupChannelModule = GroupChannelModule;
|
|
1306
|
+
|
|
1307
|
+
declare type ChatSDKLogLevel = LogLevel_2;
|
|
1308
|
+
|
|
1309
|
+
declare type ChatSDKModule = ChatSDKGroupChannelModule | ChatSDKAIAgentModule;
|
|
1310
|
+
|
|
1311
|
+
declare type ChatSDKMultipleFilesMessage = MultipleFilesMessage;
|
|
1312
|
+
|
|
1313
|
+
declare type ChatSDKMultipleFilesMessageCreateParams = MultipleFilesMessageCreateParams;
|
|
1314
|
+
|
|
1315
|
+
declare type ChatSDKSendbirdChatParams<Modules extends ChatSDKModule[]> = SendbirdChatParams<Modules>;
|
|
1316
|
+
|
|
1317
|
+
declare type ChatSDKSendbirdChatWith<Modules extends ChatSDKModule[]> = SendbirdChatWith<Modules>;
|
|
1318
|
+
|
|
1319
|
+
declare type ChatSDKSendbirdError = SendbirdError;
|
|
1320
|
+
|
|
1321
|
+
declare type ChatSDKSessionHandler = SessionHandler;
|
|
1322
|
+
|
|
1323
|
+
declare type ChatSDKType = ChatSDKSendbirdChatWith<[ChatSDKGroupChannelModule, ChatSDKAIAgentModule]>;
|
|
1324
|
+
|
|
1325
|
+
declare type ChatSDKUser = User;
|
|
1326
|
+
|
|
1327
|
+
declare type ChatSDKUserMessage = UserMessage;
|
|
1328
|
+
|
|
1329
|
+
declare type ChatSDKUserMessageCreateParams = UserMessageCreateParams;
|
|
1208
1330
|
|
|
1209
1331
|
export declare interface CitationInfo {
|
|
1210
1332
|
embedding_id: number;
|
|
@@ -1214,6 +1336,10 @@ export declare interface CitationInfo {
|
|
|
1214
1336
|
link: string;
|
|
1215
1337
|
}
|
|
1216
1338
|
|
|
1339
|
+
declare interface ClearUserMemoriesParams {
|
|
1340
|
+
contextAiAgentId?: string;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1217
1343
|
declare interface CloseConversationCommandParams {
|
|
1218
1344
|
channelUrl: string;
|
|
1219
1345
|
}
|
|
@@ -1246,6 +1372,17 @@ declare interface ColorSet {
|
|
|
1246
1372
|
csat: {
|
|
1247
1373
|
background: string;
|
|
1248
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
|
+
};
|
|
1249
1386
|
}
|
|
1250
1387
|
|
|
1251
1388
|
/**
|
|
@@ -1291,6 +1428,36 @@ declare enum CommandType {
|
|
|
1291
1428
|
AuthTokenRefreshed = 'auth.token.refreshed',
|
|
1292
1429
|
}
|
|
1293
1430
|
|
|
1431
|
+
export declare interface ConnectionDelayDialogProps {
|
|
1432
|
+
title: string;
|
|
1433
|
+
description: string;
|
|
1434
|
+
highlightedText?: string;
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
export declare const ConnectionDelayLayout: {
|
|
1438
|
+
(props: PropsWithChildren): ReactNode;
|
|
1439
|
+
defaults: {
|
|
1440
|
+
template: ComponentType<unknown>;
|
|
1441
|
+
components: {
|
|
1442
|
+
Dialog: ({ title, description, highlightedText }: ConnectionDelayDialogProps) => ReactNode;
|
|
1443
|
+
};
|
|
1444
|
+
};
|
|
1445
|
+
Template: ({ template, children }: {
|
|
1446
|
+
template?: ComponentType<unknown> | undefined;
|
|
1447
|
+
children?: ReactNode;
|
|
1448
|
+
}) => JSX.Element;
|
|
1449
|
+
Context: Context<LayoutContextValue<unknown, {
|
|
1450
|
+
Dialog: ({ title, description, highlightedText }: ConnectionDelayDialogProps) => ReactNode;
|
|
1451
|
+
}>>;
|
|
1452
|
+
useContext: () => LayoutContextValue<unknown, {
|
|
1453
|
+
Dialog: ({ title, description, highlightedText }: ConnectionDelayDialogProps) => ReactNode;
|
|
1454
|
+
}>;
|
|
1455
|
+
} & {
|
|
1456
|
+
Dialog: (props: {
|
|
1457
|
+
component: ({ title, description, highlightedText }: ConnectionDelayDialogProps) => ReactNode;
|
|
1458
|
+
}) => null;
|
|
1459
|
+
};
|
|
1460
|
+
|
|
1294
1461
|
declare interface ContextObject {
|
|
1295
1462
|
language?: string;
|
|
1296
1463
|
country?: string;
|
|
@@ -1333,6 +1500,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
1333
1500
|
EndArea: () => ReactNode;
|
|
1334
1501
|
MenuButton: () => ReactNode;
|
|
1335
1502
|
Title: () => ReactNode;
|
|
1503
|
+
MemoryIndicator: () => ReactNode;
|
|
1336
1504
|
HandoffButton: () => ReactNode;
|
|
1337
1505
|
ConversationCloseButton: () => ReactNode;
|
|
1338
1506
|
ExpandButton: () => ReactNode;
|
|
@@ -1349,6 +1517,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
1349
1517
|
EndArea: () => ReactNode;
|
|
1350
1518
|
MenuButton: () => ReactNode;
|
|
1351
1519
|
Title: () => ReactNode;
|
|
1520
|
+
MemoryIndicator: () => ReactNode;
|
|
1352
1521
|
HandoffButton: () => ReactNode;
|
|
1353
1522
|
ConversationCloseButton: () => ReactNode;
|
|
1354
1523
|
ExpandButton: () => ReactNode;
|
|
@@ -1360,6 +1529,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
1360
1529
|
EndArea: () => ReactNode;
|
|
1361
1530
|
MenuButton: () => ReactNode;
|
|
1362
1531
|
Title: () => ReactNode;
|
|
1532
|
+
MemoryIndicator: () => ReactNode;
|
|
1363
1533
|
HandoffButton: () => ReactNode;
|
|
1364
1534
|
ConversationCloseButton: () => ReactNode;
|
|
1365
1535
|
ExpandButton: () => ReactNode;
|
|
@@ -1381,6 +1551,9 @@ export declare const ConversationHeaderLayout: {
|
|
|
1381
1551
|
Title: (props: {
|
|
1382
1552
|
component: () => ReactNode;
|
|
1383
1553
|
}) => null;
|
|
1554
|
+
MemoryIndicator: (props: {
|
|
1555
|
+
component: () => ReactNode;
|
|
1556
|
+
}) => null;
|
|
1384
1557
|
HandoffButton: (props: {
|
|
1385
1558
|
component: () => ReactNode;
|
|
1386
1559
|
}) => null;
|
|
@@ -1594,24 +1767,24 @@ declare class ConversationListCollection {
|
|
|
1594
1767
|
readonly filter?: AIAgentGroupChannelFilter;
|
|
1595
1768
|
|
|
1596
1769
|
private _sdk: ChatSDKType;
|
|
1597
|
-
private _pinnedChannels:
|
|
1598
|
-
private _channels:
|
|
1770
|
+
private _pinnedChannels: ChatSDKGroupChannel[];
|
|
1771
|
+
private _channels: ChatSDKGroupChannel[];
|
|
1599
1772
|
|
|
1600
1773
|
private _isDisposed = false;
|
|
1601
1774
|
private _handlerId = `handler-id-${Date.now()}`;
|
|
1602
|
-
private _order:
|
|
1775
|
+
private _order: ChatSDKGroupChannelListOrder = GroupChannelListOrder.LATEST_LAST_MESSAGE;
|
|
1603
1776
|
|
|
1604
1777
|
private _limit: number;
|
|
1605
|
-
private _query:
|
|
1778
|
+
private _query: ChatSDKAIAgentGroupChannelListQuery;
|
|
1606
1779
|
|
|
1607
1780
|
private _token: string;
|
|
1608
1781
|
private _timestamp: number;
|
|
1609
1782
|
private _isSyncing: boolean;
|
|
1610
1783
|
|
|
1611
|
-
private _channelHandler:
|
|
1612
|
-
private _connectionHandler:
|
|
1784
|
+
private _channelHandler: ChatSDKGroupChannelHandler;
|
|
1785
|
+
private _connectionHandler: ChatSDKConnectionHandler;
|
|
1613
1786
|
private _collectionEventHandler?: ConversationListCollectionEventHandler;
|
|
1614
|
-
private _throttledOnChannelChanged: ThrottledFunction<(channel:
|
|
1787
|
+
private _throttledOnChannelChanged: ThrottledFunction<(channel: ChatSDKBaseChannel) => void>;
|
|
1615
1788
|
|
|
1616
1789
|
/**
|
|
1617
1790
|
* Creates a new ConversationListCollection instance.
|
|
@@ -1642,7 +1815,7 @@ declare class ConversationListCollection {
|
|
|
1642
1815
|
this._isSyncing = false;
|
|
1643
1816
|
|
|
1644
1817
|
this._throttledOnChannelChanged = throttle(
|
|
1645
|
-
(channel:
|
|
1818
|
+
(channel: ChatSDKGroupChannel) => {
|
|
1646
1819
|
if (this._query.belongsTo(channel)) {
|
|
1647
1820
|
this._addChannelsToView([channel], false);
|
|
1648
1821
|
} else {
|
|
@@ -1684,7 +1857,7 @@ declare class ConversationListCollection {
|
|
|
1684
1857
|
* Sets the default changelog sync timestamp based on the first non-pinned channel.
|
|
1685
1858
|
* @param channels - Array of channels to analyze
|
|
1686
1859
|
*/
|
|
1687
|
-
private _setDefaultChangelogsSyncTimestamp(channels:
|
|
1860
|
+
private _setDefaultChangelogsSyncTimestamp(channels: ChatSDKGroupChannel[]) {
|
|
1688
1861
|
const pinnedUrlsSet = new Set(this.filter?.pinnedChannelUrls ?? []);
|
|
1689
1862
|
const firstChannel = channels.find((it) => {
|
|
1690
1863
|
return !pinnedUrlsSet.has(it.url);
|
|
@@ -1706,13 +1879,13 @@ declare class ConversationListCollection {
|
|
|
1706
1879
|
* Synchronizes channel changelogs to keep the collection up-to-date.
|
|
1707
1880
|
* @returns Promise that resolves to an empty array
|
|
1708
1881
|
*/
|
|
1709
|
-
private async _syncChannelChangelogs(): Promise<
|
|
1882
|
+
private async _syncChannelChangelogs(): Promise<ChatSDKGroupChannel[]> {
|
|
1710
1883
|
if (this._isDisposed) return [];
|
|
1711
1884
|
if (this._isSyncing) return [];
|
|
1712
1885
|
|
|
1713
1886
|
try {
|
|
1714
1887
|
this._isSyncing = true;
|
|
1715
|
-
let response:
|
|
1888
|
+
let response: ChatSDKGroupChannelChangelogs;
|
|
1716
1889
|
|
|
1717
1890
|
if (this._token) {
|
|
1718
1891
|
response = await this._sdk.aiAgent.getMyGroupChannelChangeLogsByToken(this._token, this.filter);
|
|
@@ -1743,16 +1916,16 @@ declare class ConversationListCollection {
|
|
|
1743
1916
|
* @param channels - Pinned channels to upsert
|
|
1744
1917
|
* @returns Object containing added, updated channels and unmatched URLs
|
|
1745
1918
|
*/
|
|
1746
|
-
private _upsertPinnedChannelsToArray(channels:
|
|
1747
|
-
addedChannels:
|
|
1748
|
-
updatedChannels:
|
|
1919
|
+
private _upsertPinnedChannelsToArray(channels: ChatSDKGroupChannel[]): {
|
|
1920
|
+
addedChannels: ChatSDKGroupChannel[];
|
|
1921
|
+
updatedChannels: ChatSDKGroupChannel[];
|
|
1749
1922
|
unmatchedChannelUrls: string[];
|
|
1750
1923
|
} {
|
|
1751
1924
|
const pinnedUrls = this.filter?.pinnedChannelUrls ?? [];
|
|
1752
1925
|
const pinnedIndexMap = new Map(pinnedUrls.map((url, index) => [url, index]));
|
|
1753
1926
|
|
|
1754
|
-
const addedChannels:
|
|
1755
|
-
const updatedChannels:
|
|
1927
|
+
const addedChannels: ChatSDKGroupChannel[] = [];
|
|
1928
|
+
const updatedChannels: ChatSDKGroupChannel[] = [];
|
|
1756
1929
|
const unmatchedChannelUrls: string[] = [];
|
|
1757
1930
|
|
|
1758
1931
|
for (const channel of channels) {
|
|
@@ -1793,13 +1966,13 @@ declare class ConversationListCollection {
|
|
|
1793
1966
|
* @returns Object containing added, updated channels and unmatched URLs
|
|
1794
1967
|
*/
|
|
1795
1968
|
private _upsertRegularChannelsToArray(
|
|
1796
|
-
channels:
|
|
1969
|
+
channels: ChatSDKGroupChannel[],
|
|
1797
1970
|
forceAppend = false,
|
|
1798
|
-
): { addedChannels:
|
|
1971
|
+
): { addedChannels: ChatSDKGroupChannel[]; updatedChannels: ChatSDKGroupChannel[]; unmatchedChannelUrls: string[] } {
|
|
1799
1972
|
const unmatchedChannelUrls: string[] = [];
|
|
1800
1973
|
|
|
1801
|
-
const addedChannels:
|
|
1802
|
-
const updatedChannels:
|
|
1974
|
+
const addedChannels: ChatSDKGroupChannel[] = [];
|
|
1975
|
+
const updatedChannels: ChatSDKGroupChannel[] = [];
|
|
1803
1976
|
|
|
1804
1977
|
for (const channel of channels) {
|
|
1805
1978
|
if (!this._query.belongsTo(channel)) {
|
|
@@ -1842,11 +2015,11 @@ declare class ConversationListCollection {
|
|
|
1842
2015
|
* @param channels - Channels to add or update
|
|
1843
2016
|
* @param forceAppend - Whether to force append channels at the end
|
|
1844
2017
|
*/
|
|
1845
|
-
private _addChannelsToView(channels:
|
|
2018
|
+
private _addChannelsToView(channels: ChatSDKGroupChannel[], forceAppend = false): void {
|
|
1846
2019
|
const pinnedUrlsSet = new Set(this.filter?.pinnedChannelUrls ?? []);
|
|
1847
2020
|
|
|
1848
|
-
const pinnedChannels:
|
|
1849
|
-
const regularChannels:
|
|
2021
|
+
const pinnedChannels: ChatSDKGroupChannel[] = [];
|
|
2022
|
+
const regularChannels: ChatSDKGroupChannel[] = [];
|
|
1850
2023
|
|
|
1851
2024
|
for (const channel of channels) {
|
|
1852
2025
|
if (pinnedUrlsSet.has(channel.url)) {
|
|
@@ -1900,7 +2073,7 @@ declare class ConversationListCollection {
|
|
|
1900
2073
|
* Pinned channels are always returned first, followed by non-pinned channels.
|
|
1901
2074
|
* @returns Array of GroupChannel objects
|
|
1902
2075
|
*/
|
|
1903
|
-
public get channels():
|
|
2076
|
+
public get channels(): ChatSDKGroupChannel[] {
|
|
1904
2077
|
return this._isDisposed ? [] : [...this._pinnedChannels, ...this._channels];
|
|
1905
2078
|
}
|
|
1906
2079
|
|
|
@@ -1916,7 +2089,7 @@ declare class ConversationListCollection {
|
|
|
1916
2089
|
* Loads the next batch of channels from the server.
|
|
1917
2090
|
* @returns Promise that resolves to an array of newly loaded channels
|
|
1918
2091
|
*/
|
|
1919
|
-
public async loadMore(): Promise<
|
|
2092
|
+
public async loadMore(): Promise<ChatSDKGroupChannel[]> {
|
|
1920
2093
|
if (this._isDisposed) return [];
|
|
1921
2094
|
|
|
1922
2095
|
if (this.hasMore) {
|
|
@@ -1957,9 +2130,9 @@ declare class ConversationListCollection {
|
|
|
1957
2130
|
|
|
1958
2131
|
declare interface ConversationListCollectionEventHandler {
|
|
1959
2132
|
/** Called when there are newly added {@link GroupChannel}s. */
|
|
1960
|
-
onChannelsAdded?: (context: ConversationListContext_2, channels:
|
|
2133
|
+
onChannelsAdded?: (context: ConversationListContext_2, channels: ChatSDKGroupChannel[]) => void;
|
|
1961
2134
|
/** Called when there's an update in one or more of the {@link GroupChannel}s that `GroupChannelCollection` holds. */
|
|
1962
|
-
onChannelsUpdated?: (context: ConversationListContext_2, channels:
|
|
2135
|
+
onChannelsUpdated?: (context: ConversationListContext_2, channels: ChatSDKGroupChannel[]) => void;
|
|
1963
2136
|
/** Called when one or more of the {@link GroupChannel}s that `GroupChannelCollection` holds has been deleted. */
|
|
1964
2137
|
onChannelsDeleted?: (context: ConversationListContext_2, channelUrls: string[]) => void;
|
|
1965
2138
|
}
|
|
@@ -2057,7 +2230,7 @@ export declare const ConversationListItemLayout: {
|
|
|
2057
2230
|
} & {};
|
|
2058
2231
|
|
|
2059
2232
|
export declare interface ConversationListItemProps {
|
|
2060
|
-
channel:
|
|
2233
|
+
channel: ChatSDKGroupChannel;
|
|
2061
2234
|
channelUrl: string;
|
|
2062
2235
|
onClick?: () => void;
|
|
2063
2236
|
/** @deprecated **/
|
|
@@ -2107,18 +2280,18 @@ declare type ConversationMessageEvent = ConversationMessageEventPayload & { id:
|
|
|
2107
2280
|
declare type ConversationMessageEventPayload =
|
|
2108
2281
|
| {
|
|
2109
2282
|
kind: 'messagesAdded';
|
|
2110
|
-
source:
|
|
2111
|
-
messages:
|
|
2283
|
+
source: ChatSDKCollectionEventSource;
|
|
2284
|
+
messages: ChatSDKBaseMessage[];
|
|
2112
2285
|
}
|
|
2113
2286
|
| {
|
|
2114
2287
|
kind: 'messagesUpdated';
|
|
2115
|
-
source:
|
|
2116
|
-
messages:
|
|
2288
|
+
source: ChatSDKCollectionEventSource;
|
|
2289
|
+
messages: ChatSDKBaseMessage[];
|
|
2117
2290
|
}
|
|
2118
2291
|
| {
|
|
2119
2292
|
kind: 'initialized';
|
|
2120
2293
|
source: 'cache' | 'api';
|
|
2121
|
-
messages:
|
|
2294
|
+
messages: ChatSDKBaseMessage[];
|
|
2122
2295
|
};
|
|
2123
2296
|
|
|
2124
2297
|
declare interface ConversationScrollContextValue {
|
|
@@ -2189,17 +2362,20 @@ export declare enum CSATType {
|
|
|
2189
2362
|
HELPDESK_CSAT_5 = 'HELPDESK_CSAT_5',
|
|
2190
2363
|
}
|
|
2191
2364
|
|
|
2192
|
-
declare type CustomEvent_2 =
|
|
2365
|
+
declare type CustomEvent_2 =
|
|
2366
|
+
| {
|
|
2193
2367
|
type: 'message-sent-pending' | 'message-sent-succeeded';
|
|
2194
2368
|
data: {
|
|
2195
|
-
message:
|
|
2369
|
+
message: ChatSDKBaseMessage;
|
|
2196
2370
|
};
|
|
2197
|
-
}
|
|
2371
|
+
}
|
|
2372
|
+
| {
|
|
2198
2373
|
type: 'bot-message-received';
|
|
2199
2374
|
data: {
|
|
2200
|
-
message:
|
|
2375
|
+
message: ChatSDKBaseMessage;
|
|
2201
2376
|
};
|
|
2202
|
-
}
|
|
2377
|
+
}
|
|
2378
|
+
| {
|
|
2203
2379
|
type: 'user-action-requested';
|
|
2204
2380
|
data: UserActionRequestedData;
|
|
2205
2381
|
};
|
|
@@ -3576,22 +3752,13 @@ declare type IncomingMessageUnion =
|
|
|
3576
3752
|
|
|
3577
3753
|
declare function IncomingTextBody(props: IncomingMessageBodyProps): JSX.Element | null;
|
|
3578
3754
|
|
|
3579
|
-
declare type
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
disabled:
|
|
3584
|
-
disabledBy:
|
|
3585
|
-
|
|
3586
|
-
| 'form_active'
|
|
3587
|
-
| 'ai_responding'
|
|
3588
|
-
| 'conversation_closed'
|
|
3589
|
-
| 'suggested_replies'
|
|
3590
|
-
| 'steward'
|
|
3591
|
-
| 'system'
|
|
3592
|
-
| 'reconnecting'
|
|
3593
|
-
| 'handoff_pending'
|
|
3594
|
-
| (string & {});
|
|
3755
|
+
declare type InputState =
|
|
3756
|
+
| { disabled: false; disabledBy: ''; focusPolicy: 'auto' }
|
|
3757
|
+
| { disabled: true; disabledBy: 'ai_responding'; focusPolicy: 'preserve' }
|
|
3758
|
+
| {
|
|
3759
|
+
disabled: true;
|
|
3760
|
+
disabledBy: ReleaseDisabledByValue;
|
|
3761
|
+
focusPolicy: 'release';
|
|
3595
3762
|
};
|
|
3596
3763
|
|
|
3597
3764
|
declare type InternalExtraProps = {
|
|
@@ -3613,7 +3780,7 @@ declare interface LanguageSet extends Omit<AIAgentLanguageSet, 'strings'> {
|
|
|
3613
3780
|
stringSet: StringSet;
|
|
3614
3781
|
}
|
|
3615
3782
|
|
|
3616
|
-
export declare function LauncherBase({ className, children, isOpened, onClick,
|
|
3783
|
+
export declare function LauncherBase({ className, children, isOpened, onClick, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, type, imageUrl, dir, animated, backgroundColor, size, }: LauncherProps): JSX.Element;
|
|
3617
3784
|
|
|
3618
3785
|
declare type LauncherImageType = 'default_icon' | 'custom_image';
|
|
3619
3786
|
|
|
@@ -3627,8 +3794,7 @@ declare type LauncherProps = {
|
|
|
3627
3794
|
children?: ReactNode;
|
|
3628
3795
|
isOpened: boolean;
|
|
3629
3796
|
onClick?: () => void;
|
|
3630
|
-
|
|
3631
|
-
'aria-label'?: string;
|
|
3797
|
+
'aria-label': string;
|
|
3632
3798
|
'aria-describedby'?: string;
|
|
3633
3799
|
type: LauncherImageType;
|
|
3634
3800
|
imageUrl: string;
|
|
@@ -3685,6 +3851,14 @@ declare interface ManualSessionInfoParams {
|
|
|
3685
3851
|
sessionHandler: AIAgentSessionHandler;
|
|
3686
3852
|
}
|
|
3687
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
|
+
|
|
3688
3862
|
/**
|
|
3689
3863
|
* @description
|
|
3690
3864
|
* - single: The message is standalone (not grouped with adjacent messages).
|
|
@@ -3829,7 +4003,7 @@ declare interface MessengerProps extends AIAgentProps {
|
|
|
3829
4003
|
}
|
|
3830
4004
|
|
|
3831
4005
|
declare interface MessengerSessionCache {
|
|
3832
|
-
getSettings(userId: string):
|
|
4006
|
+
getSettings(userId: string): CachedMessengerSettings | null;
|
|
3833
4007
|
setSettings(userId: string, value: MessengerSettingsResponse): void;
|
|
3834
4008
|
getAnonUser(): AnonUserSessionData | null;
|
|
3835
4009
|
setAnonUser(value: AnonUserSessionData): void;
|
|
@@ -3888,6 +4062,13 @@ declare interface MessengerSettingsResponse {
|
|
|
3888
4062
|
image_url: string;
|
|
3889
4063
|
auto_open: boolean;
|
|
3890
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
|
+
};
|
|
3891
4072
|
auto_created_user?: {
|
|
3892
4073
|
user_id: string;
|
|
3893
4074
|
session_token: string;
|
|
@@ -3904,10 +4085,9 @@ declare interface MessengerSettingsResponse {
|
|
|
3904
4085
|
country: string | null;
|
|
3905
4086
|
}
|
|
3906
4087
|
|
|
3907
|
-
declare
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
}
|
|
4088
|
+
declare type MessengerSettingsUpdatedParams =
|
|
4089
|
+
| { settings: MessengerSettingsResponse; source: 'server' }
|
|
4090
|
+
| { settings: CachedMessengerSettings; source: 'cache' };
|
|
3911
4091
|
|
|
3912
4092
|
declare type MultiSelectField = {
|
|
3913
4093
|
key: string;
|
|
@@ -3947,7 +4127,7 @@ declare type NumberField = {
|
|
|
3947
4127
|
};
|
|
3948
4128
|
|
|
3949
4129
|
declare type OnJoinedProactiveConversation = (params: {
|
|
3950
|
-
channel:
|
|
4130
|
+
channel: ChatSDKGroupChannel;
|
|
3951
4131
|
}) => void;
|
|
3952
4132
|
|
|
3953
4133
|
declare type OutgoingBaseMessageProps<T> = T &
|
|
@@ -4203,6 +4383,10 @@ declare type Props = {
|
|
|
4203
4383
|
}>;
|
|
4204
4384
|
colors?: ColorSetInput;
|
|
4205
4385
|
};
|
|
4386
|
+
/** @internal */
|
|
4387
|
+
entryElement?: HTMLElement;
|
|
4388
|
+
/** @internal */
|
|
4389
|
+
modalRootElement?: HTMLElement;
|
|
4206
4390
|
/** @internal DO NOT USE THIS **/
|
|
4207
4391
|
messageTemplate?: {
|
|
4208
4392
|
/** @internal DO NOT USE THIS **/
|
|
@@ -4255,14 +4439,24 @@ declare type Props_4 = PropsWithChildren<{
|
|
|
4255
4439
|
style?: CSSProperties;
|
|
4256
4440
|
}>;
|
|
4257
4441
|
|
|
4258
|
-
declare type ReactOnlyIconName = 'expand' | 'collapse' | 'chevron-right' | '
|
|
4442
|
+
declare type ReactOnlyIconName = 'expand' | 'collapse' | 'chevron-right' | 'attach' | 'close-filled' | 'actionbook' | 'function' | 'confluence' | 'zendesk' | 'salesforce' | 'sprinklr' | 'website' | 'snippet' | 'template' | 'show' | 'mute';
|
|
4443
|
+
|
|
4444
|
+
declare type ReleaseDisabledByValue =
|
|
4445
|
+
| 'unavailable'
|
|
4446
|
+
| 'form_active'
|
|
4447
|
+
| 'conversation_closed'
|
|
4448
|
+
| 'suggested_replies'
|
|
4449
|
+
| 'steward'
|
|
4450
|
+
| 'system'
|
|
4451
|
+
| 'reconnecting'
|
|
4452
|
+
| 'handoff_pending';
|
|
4259
4453
|
|
|
4260
4454
|
declare type SBUFoundationProps<T = NonNullable<unknown>> = T & {
|
|
4261
4455
|
className?: string;
|
|
4262
4456
|
children?: ReactNode;
|
|
4263
4457
|
testId?: string;
|
|
4264
4458
|
style?: CSSProperties;
|
|
4265
|
-
|
|
4459
|
+
'aria-label'?: string;
|
|
4266
4460
|
};
|
|
4267
4461
|
|
|
4268
4462
|
export declare type ScrollToBottomButtonProps = SBUFoundationProps<{
|
|
@@ -4274,6 +4468,11 @@ declare interface SearchConversationParams {
|
|
|
4274
4468
|
context: Record<string, string>;
|
|
4275
4469
|
}
|
|
4276
4470
|
|
|
4471
|
+
declare interface SetUserMemoryStateParams {
|
|
4472
|
+
enabled: boolean;
|
|
4473
|
+
contextAiAgentId?: string;
|
|
4474
|
+
}
|
|
4475
|
+
|
|
4277
4476
|
declare type SingleSelectField = {
|
|
4278
4477
|
key: string;
|
|
4279
4478
|
type: 'single-select';
|
|
@@ -4446,6 +4645,10 @@ declare type StringSet = {
|
|
|
4446
4645
|
A11Y_FILE_IMAGE: (name: string) => string;
|
|
4447
4646
|
A11Y_FILE_VIDEO: (name: string) => string;
|
|
4448
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;
|
|
4449
4652
|
A11Y_FILE_SELECTED?: (label: string) => string;
|
|
4450
4653
|
A11Y_FILE_REMOVE_BUTTON: (name: string) => string;
|
|
4451
4654
|
A11Y_SCREEN_CONVERSATION: string;
|
|
@@ -4458,7 +4661,6 @@ declare type StringSet = {
|
|
|
4458
4661
|
A11Y_FILE_SIZE_EXCEEDED: (maxSizeMB: number) => string;
|
|
4459
4662
|
A11Y_CSAT_FORM_ERROR: string;
|
|
4460
4663
|
A11Y_CONVERSATION_ITEM: (agent: string, status: string, time: string, count: number) => string;
|
|
4461
|
-
A11Y_RATING_LABEL: (score: number, label: string) => string;
|
|
4462
4664
|
A11Y_CONNECT_AGENT: string;
|
|
4463
4665
|
A11Y_CLOSE_MESSENGER: string;
|
|
4464
4666
|
A11Y_EXPAND_MESSENGER: string;
|
|
@@ -4475,11 +4677,28 @@ declare type StringSet = {
|
|
|
4475
4677
|
A11Y_HINT_OPEN_IMAGE: string;
|
|
4476
4678
|
A11Y_HINT_SEND_REPLY: string;
|
|
4477
4679
|
A11Y_HINT_SELECT_RATING: string;
|
|
4478
|
-
SCROLL_TO_NEW_MESSAGES_LABEL: (messages:
|
|
4680
|
+
SCROLL_TO_NEW_MESSAGES_LABEL: (messages: ChatSDKBaseMessage[]) => string;
|
|
4479
4681
|
HANDOFF_CONFIRM__TITLE: string;
|
|
4480
4682
|
HANDOFF_CONFIRM__DESCRIPTION: string;
|
|
4481
4683
|
HANDOFF_CONFIRM__CANCEL: string;
|
|
4482
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;
|
|
4700
|
+
CONNECTION_DELAY__TITLE: string;
|
|
4701
|
+
CONNECTION_DELAY__DESCRIPTION: (formattedTime: string) => string;
|
|
4483
4702
|
/** @deprecated Please use DATE_FORMAT__DATE_SHORT instead. **/
|
|
4484
4703
|
DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE: string;
|
|
4485
4704
|
/** @deprecated Unused string **/
|
|
@@ -4639,7 +4858,15 @@ export declare interface UserActionRequestedData {
|
|
|
4639
4858
|
}[];
|
|
4640
4859
|
}
|
|
4641
4860
|
|
|
4642
|
-
export declare type UserActionStatus =
|
|
4861
|
+
export declare type UserActionStatus =
|
|
4862
|
+
| 'action_requested'
|
|
4863
|
+
| 'action_started'
|
|
4864
|
+
| 'action_submitted'
|
|
4865
|
+
| 'action_processing'
|
|
4866
|
+
| 'action_succeeded'
|
|
4867
|
+
| 'action_failed'
|
|
4868
|
+
| 'action_canceled'
|
|
4869
|
+
| (string & {});
|
|
4643
4870
|
|
|
4644
4871
|
export declare const useRefreshActiveChannel: (updater: () => Promise<void>) => () => Promise<void>;
|
|
4645
4872
|
|