@sendbird/ai-agent-messenger-react-native 0.0.1-beta.5 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/icons/icon-bad-filled.png +0 -0
- package/dist/icons/icon-bad-filled@2x.png +0 -0
- package/dist/icons/icon-bad-filled@3x.png +0 -0
- package/dist/icons/icon-bad.png +0 -0
- package/dist/icons/icon-bad@2x.png +0 -0
- package/dist/icons/icon-bad@3x.png +0 -0
- package/dist/icons/icon-delight.png +0 -0
- package/dist/icons/icon-delight@2x.png +0 -0
- package/dist/icons/icon-delight@3x.png +0 -0
- package/dist/icons/icon-good-filled.png +0 -0
- package/dist/icons/icon-good-filled@2x.png +0 -0
- package/dist/icons/icon-good-filled@3x.png +0 -0
- package/dist/icons/icon-good.png +0 -0
- package/dist/icons/icon-good@2x.png +0 -0
- package/dist/icons/icon-good@3x.png +0 -0
- package/dist/icons/icon-thumbnail-none.png +0 -0
- package/dist/icons/icon-thumbnail-none@2x.png +0 -0
- package/dist/icons/icon-thumbnail-none@3x.png +0 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +419 -65
- package/dist/index.js +4051 -2480
- package/package.json +12 -7
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ import { PropsWithChildren } from 'react';
|
|
|
28
28
|
import { ReactNode } from 'react';
|
|
29
29
|
import { RefAttributes } from 'react';
|
|
30
30
|
import { RefObject } from 'react';
|
|
31
|
+
import type * as RNPermissions from 'react-native-permissions';
|
|
31
32
|
import { SendbirdChatParams } from '@sendbird/chat';
|
|
32
33
|
import { SendbirdChatWith } from '@sendbird/chat';
|
|
33
34
|
import { SendbirdError } from '@sendbird/chat';
|
|
@@ -35,6 +36,8 @@ import { SessionHandler } from '@sendbird/chat';
|
|
|
35
36
|
import { User } from '@sendbird/chat';
|
|
36
37
|
import { UserMessage } from '@sendbird/chat/message';
|
|
37
38
|
import { UserMessageCreateParams } from '@sendbird/chat/message';
|
|
39
|
+
import { ViewProps } from 'react-native';
|
|
40
|
+
import { ViewStyle } from 'react-native';
|
|
38
41
|
|
|
39
42
|
declare interface ActionbookInfo {
|
|
40
43
|
key: string;
|
|
@@ -70,6 +73,25 @@ declare interface AIAgentCache {
|
|
|
70
73
|
declare interface AIAgentConfig {
|
|
71
74
|
conversation?: {
|
|
72
75
|
isTalkToAgentViewEnabled?: boolean;
|
|
76
|
+
scrollMode?: ConversationScrollMode;
|
|
77
|
+
input?: {
|
|
78
|
+
/**
|
|
79
|
+
* (Mobile only) Whether to enable the camera option in the attachment menu.
|
|
80
|
+
* */
|
|
81
|
+
camera?: {
|
|
82
|
+
photoEnabled?: boolean;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* (Mobile only) Whether to enable the gallery option in the attachment menu.
|
|
86
|
+
* */
|
|
87
|
+
gallery?: {
|
|
88
|
+
photoEnabled?: boolean;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* (Mobile only) Whether to enable the file option in the attachment menu.
|
|
92
|
+
* */
|
|
93
|
+
fileEnabled?: boolean;
|
|
94
|
+
};
|
|
73
95
|
};
|
|
74
96
|
}
|
|
75
97
|
|
|
@@ -86,6 +108,7 @@ declare interface AIAgentContextValue {
|
|
|
86
108
|
dispatcher: Dispatcher;
|
|
87
109
|
|
|
88
110
|
cache: AIAgentCache;
|
|
111
|
+
networkStateAdapter?: NetworkStateAdapter;
|
|
89
112
|
|
|
90
113
|
queryParams?: AIAgentQueryParams;
|
|
91
114
|
config?: AIAgentConfig;
|
|
@@ -98,6 +121,7 @@ declare interface AIAgentConversationContextValue {
|
|
|
98
121
|
channel: GroupChannel | undefined;
|
|
99
122
|
error: SendbirdError | undefined;
|
|
100
123
|
refetch: () => Promise<void>;
|
|
124
|
+
closeConversation: () => Promise<void>;
|
|
101
125
|
};
|
|
102
126
|
|
|
103
127
|
messageSource: {
|
|
@@ -108,9 +132,15 @@ declare interface AIAgentConversationContextValue {
|
|
|
108
132
|
sendUserMessage: (params: UserMessageCreateParams) => Promise<UserMessage>;
|
|
109
133
|
sendFileMessage: (params: FileMessageCreateParams) => Promise<FileMessage>;
|
|
110
134
|
deleteMessage: (message: UserMessage | FileMessage) => Promise<void>;
|
|
135
|
+
resendMessage: (message: UserMessage | FileMessage) => Promise<UserMessage | FileMessage>;
|
|
111
136
|
};
|
|
112
137
|
|
|
113
138
|
state: {
|
|
139
|
+
streamAnimation: {
|
|
140
|
+
isAnimating: boolean;
|
|
141
|
+
start: (id: string | number) => void;
|
|
142
|
+
stop: (id: string | number) => void;
|
|
143
|
+
};
|
|
114
144
|
input: InputState;
|
|
115
145
|
};
|
|
116
146
|
}
|
|
@@ -171,6 +201,8 @@ declare interface AIAgentInfo {
|
|
|
171
201
|
specialNotice: string;
|
|
172
202
|
specialNoticeEnabled: boolean;
|
|
173
203
|
isMultipleActiveConversationsEnabled: boolean;
|
|
204
|
+
isUserFeedbackEnabled: boolean;
|
|
205
|
+
isUserFeedbackCommentOptionEnabled: boolean;
|
|
174
206
|
}
|
|
175
207
|
|
|
176
208
|
declare interface AIAgentMessengerSessionContextValue {
|
|
@@ -180,7 +212,6 @@ declare interface AIAgentMessengerSessionContextValue {
|
|
|
180
212
|
userSession: null | UserSession;
|
|
181
213
|
aiAgentInfo: null | AIAgentInfo;
|
|
182
214
|
launcherInfo: null | LauncherInfo;
|
|
183
|
-
attachmentMode: AttachmentMode;
|
|
184
215
|
|
|
185
216
|
connectionError?: Error;
|
|
186
217
|
|
|
@@ -192,6 +223,8 @@ declare interface AIAgentMessengerSessionContextValue {
|
|
|
192
223
|
|
|
193
224
|
authenticate: () => Promise<MessengerSettingsResponse>;
|
|
194
225
|
deauthenticate: () => Promise<void>;
|
|
226
|
+
|
|
227
|
+
createAttachmentRules: (params: { channel?: GroupChannel; uploadSizeLimit?: number }) => AttachmentRules;
|
|
195
228
|
}
|
|
196
229
|
|
|
197
230
|
declare interface AIAgentMessengerSessionRef {
|
|
@@ -292,16 +325,23 @@ declare interface AIAgentStringSet {
|
|
|
292
325
|
input_placeholder_disabled: string;
|
|
293
326
|
input_placeholder_wait_ai_agent_response: string;
|
|
294
327
|
input_placeholder_active_form: string;
|
|
328
|
+
input_placeholder_reconnecting: string;
|
|
295
329
|
|
|
296
330
|
unknown_message_type: string;
|
|
297
331
|
powered_by: string;
|
|
298
332
|
citation_title: string;
|
|
299
333
|
start_new_conversation_label: string;
|
|
334
|
+
|
|
335
|
+
failed_message_resend: string;
|
|
336
|
+
failed_message_remove: string;
|
|
337
|
+
|
|
338
|
+
file_upload_no_supported_files: string;
|
|
300
339
|
};
|
|
301
340
|
|
|
302
341
|
conversation_list: {
|
|
303
342
|
header_title: string;
|
|
304
343
|
ended: string;
|
|
344
|
+
footer_title: string;
|
|
305
345
|
};
|
|
306
346
|
|
|
307
347
|
date_format: {
|
|
@@ -336,6 +376,19 @@ declare interface AIAgentStringSet {
|
|
|
336
376
|
placeholder_no_conversations: string;
|
|
337
377
|
placeholder_something_went_wrong_retry_label: string;
|
|
338
378
|
};
|
|
379
|
+
|
|
380
|
+
feedback: {
|
|
381
|
+
title: string;
|
|
382
|
+
good: string;
|
|
383
|
+
bad: string;
|
|
384
|
+
comment_label: string;
|
|
385
|
+
comment_placeholder: string;
|
|
386
|
+
cancel: string;
|
|
387
|
+
submit: string;
|
|
388
|
+
save: string;
|
|
389
|
+
edit: string;
|
|
390
|
+
remove: string;
|
|
391
|
+
};
|
|
339
392
|
}
|
|
340
393
|
|
|
341
394
|
declare type AnonUserSessionData = { userId: string; authToken: string; expireAt: number };
|
|
@@ -346,10 +399,18 @@ export declare class AnonymousSessionInfo {
|
|
|
346
399
|
sessionHandler?: never;
|
|
347
400
|
}
|
|
348
401
|
|
|
349
|
-
declare
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
402
|
+
declare interface AttachmentRules {
|
|
403
|
+
maxAttachmentCount: number;
|
|
404
|
+
|
|
405
|
+
// Attachment button visibility flag
|
|
406
|
+
isEnabled: () => boolean;
|
|
407
|
+
|
|
408
|
+
// Supported mime types
|
|
409
|
+
supportedMimeTypes: string[];
|
|
410
|
+
|
|
411
|
+
isSupportedMimeType: (mimeType: string) => boolean;
|
|
412
|
+
getUploadSizeLimit: (mimeType: string) => number;
|
|
413
|
+
getUploadSizeLimitInMB: (mimeType: string) => number;
|
|
353
414
|
}
|
|
354
415
|
|
|
355
416
|
declare abstract class BaseCommand {
|
|
@@ -421,6 +482,10 @@ export declare interface BottomSheetTemplateProps {
|
|
|
421
482
|
children?: ReactNode;
|
|
422
483
|
}
|
|
423
484
|
|
|
485
|
+
/** Camera capture options - no options needed as camera always captures single photo */
|
|
486
|
+
declare interface CameraOptions {
|
|
487
|
+
}
|
|
488
|
+
|
|
424
489
|
declare interface CitationInfo {
|
|
425
490
|
embedding_id: number;
|
|
426
491
|
source_type: string;
|
|
@@ -460,9 +525,10 @@ declare interface ConversationContextProps extends PropsWithChildren {
|
|
|
460
525
|
onClearChannelUrl?: () => void;
|
|
461
526
|
onNavigateToConversationList?: () => void;
|
|
462
527
|
onClose?: () => void;
|
|
528
|
+
shouldMarkAsRead?: boolean;
|
|
463
529
|
}
|
|
464
530
|
|
|
465
|
-
export declare const ConversationContextProvider: (
|
|
531
|
+
export declare const ConversationContextProvider: (props: ConversationContextProps) => JSX.Element;
|
|
466
532
|
|
|
467
533
|
declare interface ConversationContextValue extends AIAgentConversationContextValue {
|
|
468
534
|
scrollSource: ConversationScrollContextValue;
|
|
@@ -478,6 +544,70 @@ declare interface ConversationCreateParams {
|
|
|
478
544
|
context?: Record<string, string>;
|
|
479
545
|
}
|
|
480
546
|
|
|
547
|
+
export declare const ConversationHeaderLayout: {
|
|
548
|
+
(props: PropsWithChildren): ReactNode;
|
|
549
|
+
defaults: {
|
|
550
|
+
template: ComponentType<ConversationHeaderTemplateProps>;
|
|
551
|
+
components: {
|
|
552
|
+
StartArea: () => ReactNode;
|
|
553
|
+
TitleArea: () => ReactNode;
|
|
554
|
+
EndArea: () => ReactNode;
|
|
555
|
+
MenuButton: () => ReactNode;
|
|
556
|
+
Title: () => ReactNode;
|
|
557
|
+
HandoffButton: () => ReactNode;
|
|
558
|
+
CloseButton: () => ReactNode;
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
Template: ({ template, children }: {
|
|
562
|
+
template?: ComponentType<ConversationHeaderTemplateProps> | undefined;
|
|
563
|
+
children?: ReactNode;
|
|
564
|
+
}) => JSX.Element;
|
|
565
|
+
Context: Context<LayoutContextValue< {
|
|
566
|
+
StartArea: () => ReactNode;
|
|
567
|
+
TitleArea: () => ReactNode;
|
|
568
|
+
EndArea: () => ReactNode;
|
|
569
|
+
MenuButton: () => ReactNode;
|
|
570
|
+
Title: () => ReactNode;
|
|
571
|
+
HandoffButton: () => ReactNode;
|
|
572
|
+
CloseButton: () => ReactNode;
|
|
573
|
+
}, ConversationHeaderTemplateProps>>;
|
|
574
|
+
useContext: () => LayoutContextValue< {
|
|
575
|
+
StartArea: () => ReactNode;
|
|
576
|
+
TitleArea: () => ReactNode;
|
|
577
|
+
EndArea: () => ReactNode;
|
|
578
|
+
MenuButton: () => ReactNode;
|
|
579
|
+
Title: () => ReactNode;
|
|
580
|
+
HandoffButton: () => ReactNode;
|
|
581
|
+
CloseButton: () => ReactNode;
|
|
582
|
+
}, ConversationHeaderTemplateProps>;
|
|
583
|
+
} & {
|
|
584
|
+
StartArea: (props: {
|
|
585
|
+
component: () => ReactNode;
|
|
586
|
+
}) => null;
|
|
587
|
+
TitleArea: (props: {
|
|
588
|
+
component: () => ReactNode;
|
|
589
|
+
}) => null;
|
|
590
|
+
EndArea: (props: {
|
|
591
|
+
component: () => ReactNode;
|
|
592
|
+
}) => null;
|
|
593
|
+
MenuButton: (props: {
|
|
594
|
+
component: () => ReactNode;
|
|
595
|
+
}) => null;
|
|
596
|
+
Title: (props: {
|
|
597
|
+
component: () => ReactNode;
|
|
598
|
+
}) => null;
|
|
599
|
+
HandoffButton: (props: {
|
|
600
|
+
component: () => ReactNode;
|
|
601
|
+
}) => null;
|
|
602
|
+
CloseButton: (props: {
|
|
603
|
+
component: () => ReactNode;
|
|
604
|
+
}) => null;
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
declare interface ConversationHeaderTemplateProps {
|
|
608
|
+
titleAlign?: 'start' | 'center' | 'end';
|
|
609
|
+
}
|
|
610
|
+
|
|
481
611
|
export declare const ConversationLayout: {
|
|
482
612
|
(props: PropsWithChildren): ReactNode;
|
|
483
613
|
defaults: {
|
|
@@ -550,6 +680,58 @@ declare interface ConversationListContextValue extends AIAgentConversationListCo
|
|
|
550
680
|
onClose?: () => void;
|
|
551
681
|
}
|
|
552
682
|
|
|
683
|
+
export declare const ConversationListHeaderLayout: {
|
|
684
|
+
(props: PropsWithChildren): ReactNode;
|
|
685
|
+
defaults: {
|
|
686
|
+
template: ComponentType<ConversationListHeaderTemplateProps>;
|
|
687
|
+
components: {
|
|
688
|
+
StartArea: () => ReactNode;
|
|
689
|
+
TitleArea: () => ReactNode;
|
|
690
|
+
EndArea: () => ReactNode;
|
|
691
|
+
Title: () => ReactNode;
|
|
692
|
+
CloseButton: () => ReactNode;
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
Template: ({ template, children }: {
|
|
696
|
+
template?: ComponentType<ConversationListHeaderTemplateProps> | undefined;
|
|
697
|
+
children?: ReactNode;
|
|
698
|
+
}) => JSX.Element;
|
|
699
|
+
Context: Context<LayoutContextValue< {
|
|
700
|
+
StartArea: () => ReactNode;
|
|
701
|
+
TitleArea: () => ReactNode;
|
|
702
|
+
EndArea: () => ReactNode;
|
|
703
|
+
Title: () => ReactNode;
|
|
704
|
+
CloseButton: () => ReactNode;
|
|
705
|
+
}, ConversationListHeaderTemplateProps>>;
|
|
706
|
+
useContext: () => LayoutContextValue< {
|
|
707
|
+
StartArea: () => ReactNode;
|
|
708
|
+
TitleArea: () => ReactNode;
|
|
709
|
+
EndArea: () => ReactNode;
|
|
710
|
+
Title: () => ReactNode;
|
|
711
|
+
CloseButton: () => ReactNode;
|
|
712
|
+
}, ConversationListHeaderTemplateProps>;
|
|
713
|
+
} & {
|
|
714
|
+
StartArea: (props: {
|
|
715
|
+
component: () => ReactNode;
|
|
716
|
+
}) => null;
|
|
717
|
+
TitleArea: (props: {
|
|
718
|
+
component: () => ReactNode;
|
|
719
|
+
}) => null;
|
|
720
|
+
EndArea: (props: {
|
|
721
|
+
component: () => ReactNode;
|
|
722
|
+
}) => null;
|
|
723
|
+
Title: (props: {
|
|
724
|
+
component: () => ReactNode;
|
|
725
|
+
}) => null;
|
|
726
|
+
CloseButton: (props: {
|
|
727
|
+
component: () => ReactNode;
|
|
728
|
+
}) => null;
|
|
729
|
+
};
|
|
730
|
+
|
|
731
|
+
declare interface ConversationListHeaderTemplateProps {
|
|
732
|
+
titleAlign?: 'start' | 'center' | 'end';
|
|
733
|
+
}
|
|
734
|
+
|
|
553
735
|
export declare const ConversationListLayout: {
|
|
554
736
|
(props: PropsWithChildren): ReactNode;
|
|
555
737
|
defaults: {
|
|
@@ -590,7 +772,7 @@ declare interface ConversationScrollContextValue {
|
|
|
590
772
|
ref: RefObject<FlatList | null>;
|
|
591
773
|
state: {
|
|
592
774
|
distanceFromBottom: number;
|
|
593
|
-
|
|
775
|
+
shouldShowScrollButton: boolean;
|
|
594
776
|
bottomSpace?: number;
|
|
595
777
|
};
|
|
596
778
|
props: {
|
|
@@ -632,6 +814,8 @@ declare interface ConversationScrollContextValue {
|
|
|
632
814
|
};
|
|
633
815
|
}
|
|
634
816
|
|
|
817
|
+
declare type ConversationScrollMode = 'auto' | 'fixed';
|
|
818
|
+
|
|
635
819
|
declare type CSATSubmitParams = {
|
|
636
820
|
csatType: string;
|
|
637
821
|
csat?: number;
|
|
@@ -650,6 +834,15 @@ declare interface Dispatcher {
|
|
|
650
834
|
): void;
|
|
651
835
|
}
|
|
652
836
|
|
|
837
|
+
/** Adapter interface for document picker */
|
|
838
|
+
declare interface DocumentPickerAdapter {
|
|
839
|
+
/**
|
|
840
|
+
* Select files from file picker
|
|
841
|
+
* @returns Array of MediaFiles, or null if cancelled
|
|
842
|
+
*/
|
|
843
|
+
selectFile: (options?: FilePickerOptions) => Promise<MediaFile[] | null>;
|
|
844
|
+
}
|
|
845
|
+
|
|
653
846
|
declare type ExpoDocumentPickerModule = typeof ExpoDocumentPicker;
|
|
654
847
|
|
|
655
848
|
declare type ExpoImagePickerModule = typeof ExpoImagePicker;
|
|
@@ -682,6 +875,7 @@ declare interface ExtendedMessagePayload {
|
|
|
682
875
|
csat_submitted_label: string;
|
|
683
876
|
|
|
684
877
|
cre?: {
|
|
878
|
+
required: boolean; // default: true
|
|
685
879
|
question: string;
|
|
686
880
|
positive_label: string;
|
|
687
881
|
negative_label: string;
|
|
@@ -728,6 +922,70 @@ declare interface FeedbackInfo {
|
|
|
728
922
|
comment?: string;
|
|
729
923
|
}
|
|
730
924
|
|
|
925
|
+
/** File picker options */
|
|
926
|
+
declare interface FilePickerOptions {
|
|
927
|
+
/** Maximum number of files that can be selected (1 for single selection, >1 for multiple) */
|
|
928
|
+
selectionLimit?: number;
|
|
929
|
+
/** Filter by MIME types (e.g., ['application/pdf', 'text/plain']) */
|
|
930
|
+
mimeTypes?: string[];
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
export declare const FixedMessenger: (({ entryPoint, edgeToEdgeEnabled, windowMode, fullscreenInsets, initialChannelUrl, windowContainerProps, children, }: FixedMessengerProps) => JSX.Element) & {
|
|
934
|
+
Style: (props: FixedMessengerStyleProps) => null;
|
|
935
|
+
ConversationChildren: ({ children }: PropsWithChildren) => null;
|
|
936
|
+
ConversationListChildren: ({ children }: PropsWithChildren) => null;
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
declare type FixedMessengerMargin = {
|
|
940
|
+
top: number;
|
|
941
|
+
bottom: number;
|
|
942
|
+
start: number;
|
|
943
|
+
end: number;
|
|
944
|
+
};
|
|
945
|
+
|
|
946
|
+
declare type FixedMessengerPosition = `${PositionHorizontal}-${PositionVertical}`;
|
|
947
|
+
|
|
948
|
+
declare interface FixedMessengerProps {
|
|
949
|
+
/**
|
|
950
|
+
* @description Initial entry point of the messenger. (Defaults to 'Conversation')
|
|
951
|
+
* */
|
|
952
|
+
entryPoint?: 'Conversation' | 'ConversationList';
|
|
953
|
+
/**
|
|
954
|
+
* @description The URL of the channel to open initially when the messenger is first loaded.
|
|
955
|
+
* */
|
|
956
|
+
initialChannelUrl?: string;
|
|
957
|
+
/**
|
|
958
|
+
* @description Window mode of the messenger. (Defaults to 'floating')
|
|
959
|
+
* */
|
|
960
|
+
windowMode?: 'floating' | 'fullscreen';
|
|
961
|
+
/**
|
|
962
|
+
* @description Insets for fullscreen mode. Only applicable when windowMode is 'fullscreen'. (Defaults to zero insets)
|
|
963
|
+
* */
|
|
964
|
+
fullscreenInsets?: Partial<{
|
|
965
|
+
top: number;
|
|
966
|
+
left: number;
|
|
967
|
+
right: number;
|
|
968
|
+
bottom: number;
|
|
969
|
+
}>;
|
|
970
|
+
/**
|
|
971
|
+
* @Platform Android
|
|
972
|
+
* @description On Android, when edge-to-edge is enabled, bottom inset will be considered when the soft keyboard is opened to avoid overlapping. (Defaults to true)
|
|
973
|
+
* */
|
|
974
|
+
edgeToEdgeEnabled?: boolean;
|
|
975
|
+
/**
|
|
976
|
+
* @description Props to pass to the window container.
|
|
977
|
+
* */
|
|
978
|
+
windowContainerProps?: ViewProps;
|
|
979
|
+
children?: ReactNode;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
declare interface FixedMessengerStyleProps {
|
|
983
|
+
position?: FixedMessengerPosition;
|
|
984
|
+
margin?: Partial<FixedMessengerMargin>;
|
|
985
|
+
launcherSize?: number;
|
|
986
|
+
spacing?: number;
|
|
987
|
+
}
|
|
988
|
+
|
|
731
989
|
declare interface Form {
|
|
732
990
|
key: string;
|
|
733
991
|
version: number;
|
|
@@ -757,6 +1015,12 @@ declare interface FunctionCallsInfo {
|
|
|
757
1015
|
};
|
|
758
1016
|
}
|
|
759
1017
|
|
|
1018
|
+
/** Gallery picker options */
|
|
1019
|
+
declare interface GalleryOptions {
|
|
1020
|
+
/** Maximum number of images that can be selected (1 for single selection, >1 for multiple) */
|
|
1021
|
+
selectionLimit?: number;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
760
1024
|
declare interface GroundednessInfo {
|
|
761
1025
|
id: number;
|
|
762
1026
|
source_type:
|
|
@@ -797,10 +1061,30 @@ declare const icons: {
|
|
|
797
1061
|
source: any;
|
|
798
1062
|
'radio-on': any;
|
|
799
1063
|
'radio-off': any;
|
|
1064
|
+
good: any;
|
|
1065
|
+
bad: any;
|
|
1066
|
+
'good-filled': any;
|
|
1067
|
+
'bad-filled': any;
|
|
1068
|
+
delight: any;
|
|
1069
|
+
'thumbnail-none': any;
|
|
800
1070
|
};
|
|
801
1071
|
|
|
802
1072
|
declare type IconType = keyof typeof icons;
|
|
803
1073
|
|
|
1074
|
+
/** Adapter interface for image picker (camera and gallery) */
|
|
1075
|
+
declare interface ImagePickerAdapter {
|
|
1076
|
+
/**
|
|
1077
|
+
* Launch camera to capture a photo
|
|
1078
|
+
* @returns Array with single MediaFile, or null if cancelled
|
|
1079
|
+
*/
|
|
1080
|
+
captureCamera: (options?: CameraOptions) => Promise<MediaFile[] | null>;
|
|
1081
|
+
/**
|
|
1082
|
+
* Select photos from gallery
|
|
1083
|
+
* @returns Array of MediaFiles, or null if cancelled
|
|
1084
|
+
*/
|
|
1085
|
+
selectFromGallery: (options?: GalleryOptions) => Promise<MediaFile[] | null>;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
804
1088
|
declare type IncomingBaseMessageProps<T> = T &
|
|
805
1089
|
BaseMessageProps<{
|
|
806
1090
|
sender: {
|
|
@@ -816,6 +1100,8 @@ BaseMessageProps<{
|
|
|
816
1100
|
isStreaming?: boolean;
|
|
817
1101
|
isHandedOff?: boolean;
|
|
818
1102
|
isConversationClosed?: boolean;
|
|
1103
|
+
isFeedbackEnabled?: boolean;
|
|
1104
|
+
isFeedbackCommentEnabled?: boolean;
|
|
819
1105
|
|
|
820
1106
|
// handlers
|
|
821
1107
|
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
@@ -824,21 +1110,19 @@ BaseMessageProps<{
|
|
|
824
1110
|
onClickSuggestedReply?: (params: { reply: string }) => void;
|
|
825
1111
|
onClickCTA?: (params: { url: string }) => void;
|
|
826
1112
|
onClickCitation?: (citation: CitationInfo) => void;
|
|
827
|
-
onFeedbackUpdate?: (
|
|
828
|
-
params: {
|
|
829
|
-
rating: 'good' | 'bad';
|
|
830
|
-
comment?: string;
|
|
831
|
-
} | null,
|
|
832
|
-
) => void;
|
|
1113
|
+
onFeedbackUpdate?: (params: { rating: 'good' | 'bad'; comment?: string } | null) => void;
|
|
833
1114
|
onSubmitForm?: (params: { key: string; data: Record<string, FormFieldValue> }) => Promise<void>;
|
|
834
1115
|
onCancelForm?: (params: { key: string }) => Promise<void>;
|
|
1116
|
+
onStreamAnimationStart?: () => void;
|
|
1117
|
+
onStreamAnimationComplete?: () => void;
|
|
835
1118
|
|
|
836
1119
|
// fallbacks
|
|
837
1120
|
messageTemplateErrorFallback?: ReactNode;
|
|
838
1121
|
messageTemplateLoadingFallback?: ReactNode;
|
|
839
1122
|
}>;
|
|
840
1123
|
|
|
841
|
-
declare type IncomingMessageBodyProps<T extends
|
|
1124
|
+
declare type IncomingMessageBodyProps<T extends MessageType = MessageType> = IncomingMessageProps<T> & {
|
|
1125
|
+
containerStyle?: ViewStyle;
|
|
842
1126
|
customStyle?: {
|
|
843
1127
|
bubbleContentColor?: string;
|
|
844
1128
|
bubbleBackgroundColor?: string;
|
|
@@ -853,9 +1137,12 @@ export declare const IncomingMessageLayout: {
|
|
|
853
1137
|
components: {
|
|
854
1138
|
SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => JSX.Element;
|
|
855
1139
|
SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => JSX.Element;
|
|
856
|
-
SentTime: ({ createdAt }:
|
|
857
|
-
|
|
858
|
-
|
|
1140
|
+
SentTime: ({ createdAt, containerStyle }: IncomingMessageProps & {
|
|
1141
|
+
containerStyle?: ViewStyle;
|
|
1142
|
+
}) => JSX.Element | null;
|
|
1143
|
+
MessageBody: (props: IncomingMessageBodyProps) => JSX.Element;
|
|
1144
|
+
TypingIndicator: ({ customStyle, containerStyle }: IncomingMessageProps & {
|
|
1145
|
+
containerStyle?: ViewStyle;
|
|
859
1146
|
customStyle?: {
|
|
860
1147
|
bubbleContentColor?: string;
|
|
861
1148
|
bubbleBackgroundColor?: string;
|
|
@@ -872,7 +1159,12 @@ export declare const IncomingMessageLayout: {
|
|
|
872
1159
|
}) => ReactNode;
|
|
873
1160
|
CTAButton: ({ extendedMessagePayload, onClickCTA, }: IncomingMessageProps) => ReactNode;
|
|
874
1161
|
Citation: ({ extendedMessagePayload, onClickCitation, }: IncomingMessageProps) => ReactNode;
|
|
875
|
-
Form: (props: IncomingMessageProps
|
|
1162
|
+
Form: (props: IncomingMessageProps & {
|
|
1163
|
+
containerStyle?: ViewStyle;
|
|
1164
|
+
}) => ReactNode;
|
|
1165
|
+
Feedback: ({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, containerStyle, }: IncomingMessageProps & {
|
|
1166
|
+
containerStyle?: ViewStyle;
|
|
1167
|
+
}) => ReactNode;
|
|
876
1168
|
};
|
|
877
1169
|
};
|
|
878
1170
|
Template: ({ template, children }: {
|
|
@@ -882,9 +1174,12 @@ export declare const IncomingMessageLayout: {
|
|
|
882
1174
|
Context: Context<LayoutContextValue< {
|
|
883
1175
|
SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => JSX.Element;
|
|
884
1176
|
SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => JSX.Element;
|
|
885
|
-
SentTime: ({ createdAt }:
|
|
886
|
-
|
|
887
|
-
|
|
1177
|
+
SentTime: ({ createdAt, containerStyle }: IncomingMessageProps & {
|
|
1178
|
+
containerStyle?: ViewStyle;
|
|
1179
|
+
}) => JSX.Element | null;
|
|
1180
|
+
MessageBody: (props: IncomingMessageBodyProps) => JSX.Element;
|
|
1181
|
+
TypingIndicator: ({ customStyle, containerStyle }: IncomingMessageProps & {
|
|
1182
|
+
containerStyle?: ViewStyle;
|
|
888
1183
|
customStyle?: {
|
|
889
1184
|
bubbleContentColor?: string;
|
|
890
1185
|
bubbleBackgroundColor?: string;
|
|
@@ -901,14 +1196,22 @@ export declare const IncomingMessageLayout: {
|
|
|
901
1196
|
}) => ReactNode;
|
|
902
1197
|
CTAButton: ({ extendedMessagePayload, onClickCTA, }: IncomingMessageProps) => ReactNode;
|
|
903
1198
|
Citation: ({ extendedMessagePayload, onClickCitation, }: IncomingMessageProps) => ReactNode;
|
|
904
|
-
Form: (props: IncomingMessageProps
|
|
1199
|
+
Form: (props: IncomingMessageProps & {
|
|
1200
|
+
containerStyle?: ViewStyle;
|
|
1201
|
+
}) => ReactNode;
|
|
1202
|
+
Feedback: ({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, containerStyle, }: IncomingMessageProps & {
|
|
1203
|
+
containerStyle?: ViewStyle;
|
|
1204
|
+
}) => ReactNode;
|
|
905
1205
|
}, IncomingMessageProps>>;
|
|
906
1206
|
useContext: () => LayoutContextValue< {
|
|
907
1207
|
SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => JSX.Element;
|
|
908
1208
|
SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => JSX.Element;
|
|
909
|
-
SentTime: ({ createdAt }:
|
|
910
|
-
|
|
911
|
-
|
|
1209
|
+
SentTime: ({ createdAt, containerStyle }: IncomingMessageProps & {
|
|
1210
|
+
containerStyle?: ViewStyle;
|
|
1211
|
+
}) => JSX.Element | null;
|
|
1212
|
+
MessageBody: (props: IncomingMessageBodyProps) => JSX.Element;
|
|
1213
|
+
TypingIndicator: ({ customStyle, containerStyle }: IncomingMessageProps & {
|
|
1214
|
+
containerStyle?: ViewStyle;
|
|
912
1215
|
customStyle?: {
|
|
913
1216
|
bubbleContentColor?: string;
|
|
914
1217
|
bubbleBackgroundColor?: string;
|
|
@@ -925,7 +1228,12 @@ export declare const IncomingMessageLayout: {
|
|
|
925
1228
|
}) => ReactNode;
|
|
926
1229
|
CTAButton: ({ extendedMessagePayload, onClickCTA, }: IncomingMessageProps) => ReactNode;
|
|
927
1230
|
Citation: ({ extendedMessagePayload, onClickCitation, }: IncomingMessageProps) => ReactNode;
|
|
928
|
-
Form: (props: IncomingMessageProps
|
|
1231
|
+
Form: (props: IncomingMessageProps & {
|
|
1232
|
+
containerStyle?: ViewStyle;
|
|
1233
|
+
}) => ReactNode;
|
|
1234
|
+
Feedback: ({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, containerStyle, }: IncomingMessageProps & {
|
|
1235
|
+
containerStyle?: ViewStyle;
|
|
1236
|
+
}) => ReactNode;
|
|
929
1237
|
}, IncomingMessageProps>;
|
|
930
1238
|
} & {
|
|
931
1239
|
SenderName: (props: {
|
|
@@ -935,13 +1243,16 @@ export declare const IncomingMessageLayout: {
|
|
|
935
1243
|
component: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => JSX.Element;
|
|
936
1244
|
}) => null;
|
|
937
1245
|
SentTime: (props: {
|
|
938
|
-
component: ({ createdAt }:
|
|
1246
|
+
component: ({ createdAt, containerStyle }: IncomingMessageProps & {
|
|
1247
|
+
containerStyle?: ViewStyle;
|
|
1248
|
+
}) => JSX.Element | null;
|
|
939
1249
|
}) => null;
|
|
940
1250
|
MessageBody: (props: {
|
|
941
|
-
component: (props: IncomingMessageBodyProps) => JSX.Element
|
|
1251
|
+
component: (props: IncomingMessageBodyProps) => JSX.Element;
|
|
942
1252
|
}) => null;
|
|
943
1253
|
TypingIndicator: (props: {
|
|
944
|
-
component: ({ customStyle }: IncomingMessageProps & {
|
|
1254
|
+
component: ({ customStyle, containerStyle }: IncomingMessageProps & {
|
|
1255
|
+
containerStyle?: ViewStyle;
|
|
945
1256
|
customStyle?: {
|
|
946
1257
|
bubbleContentColor?: string;
|
|
947
1258
|
bubbleBackgroundColor?: string;
|
|
@@ -968,7 +1279,14 @@ export declare const IncomingMessageLayout: {
|
|
|
968
1279
|
component: ({ extendedMessagePayload, onClickCitation, }: IncomingMessageProps) => ReactNode;
|
|
969
1280
|
}) => null;
|
|
970
1281
|
Form: (props: {
|
|
971
|
-
component: (props: IncomingMessageProps
|
|
1282
|
+
component: (props: IncomingMessageProps & {
|
|
1283
|
+
containerStyle?: ViewStyle;
|
|
1284
|
+
}) => ReactNode;
|
|
1285
|
+
}) => null;
|
|
1286
|
+
Feedback: (props: {
|
|
1287
|
+
component: ({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, containerStyle, }: IncomingMessageProps & {
|
|
1288
|
+
containerStyle?: ViewStyle;
|
|
1289
|
+
}) => ReactNode;
|
|
972
1290
|
}) => null;
|
|
973
1291
|
};
|
|
974
1292
|
|
|
@@ -998,6 +1316,7 @@ declare type InputState = {
|
|
|
998
1316
|
| 'ai_responding'
|
|
999
1317
|
| 'conversation_closed'
|
|
1000
1318
|
| 'suggested_replies'
|
|
1319
|
+
| 'reconnecting'
|
|
1001
1320
|
| (string & {});
|
|
1002
1321
|
};
|
|
1003
1322
|
|
|
@@ -1060,14 +1379,6 @@ declare interface MediaFile {
|
|
|
1060
1379
|
height?: number;
|
|
1061
1380
|
}
|
|
1062
1381
|
|
|
1063
|
-
/** Picker options */
|
|
1064
|
-
declare interface MediaPickerOptions {
|
|
1065
|
-
/** Allow multiple file selection */
|
|
1066
|
-
multiple?: boolean;
|
|
1067
|
-
/** Filter by MIME types (e.g., ['image/jpeg', 'image/png', 'application/pdf']) */
|
|
1068
|
-
mimeTypes?: string[];
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
1382
|
/**
|
|
1072
1383
|
* @description
|
|
1073
1384
|
* - single: The message is standalone (not grouped with adjacent messages).
|
|
@@ -1100,16 +1411,16 @@ declare interface MessageTemplateShapeAtom {
|
|
|
1100
1411
|
variables?: Record<string, any>;
|
|
1101
1412
|
}
|
|
1102
1413
|
|
|
1103
|
-
declare type MessageType =
|
|
1414
|
+
declare type MessageType = IncomingMessageProps['messageType'];
|
|
1104
1415
|
|
|
1105
|
-
declare type MessageType_2 =
|
|
1416
|
+
declare type MessageType_2 = OutgoingMessageProps['messageType'];
|
|
1106
1417
|
|
|
1107
1418
|
declare interface MessengerSessionCache {
|
|
1108
1419
|
getSettings(userId: string): MessengerSettingsResponse | null;
|
|
1109
1420
|
setSettings(userId: string, value: MessengerSettingsResponse): void;
|
|
1110
1421
|
getAnonUser(): AnonUserSessionData | null;
|
|
1111
1422
|
setAnonUser(value: AnonUserSessionData): void;
|
|
1112
|
-
clear(userId: string): void;
|
|
1423
|
+
clear(userId: string | undefined): void;
|
|
1113
1424
|
}
|
|
1114
1425
|
|
|
1115
1426
|
declare interface MessengerSessionContextValue extends AIAgentMessengerSessionContextValue {
|
|
@@ -1129,6 +1440,8 @@ declare interface MessengerSettingsResponse {
|
|
|
1129
1440
|
is_special_notice_enabled: boolean;
|
|
1130
1441
|
show_handoff_button: boolean;
|
|
1131
1442
|
is_multiple_active_conversations_enabled: boolean;
|
|
1443
|
+
is_user_feedback_enabled: boolean;
|
|
1444
|
+
is_user_feedback_comment_option_enabled: boolean;
|
|
1132
1445
|
};
|
|
1133
1446
|
appearance: {
|
|
1134
1447
|
selected_theme: 'light' | 'dark';
|
|
@@ -1157,6 +1470,12 @@ declare interface MessengerSettingsResponse {
|
|
|
1157
1470
|
session_token: string;
|
|
1158
1471
|
expire_at: number;
|
|
1159
1472
|
};
|
|
1473
|
+
upload_restriction?: {
|
|
1474
|
+
default_upload_size_limit: number;
|
|
1475
|
+
upload_size_limit_per_type: Record<string, number>;
|
|
1476
|
+
supported_image_mime_types: string[];
|
|
1477
|
+
supported_file_mime_types: string[];
|
|
1478
|
+
};
|
|
1160
1479
|
}
|
|
1161
1480
|
|
|
1162
1481
|
declare type MMKVModule = MMKV;
|
|
@@ -1196,27 +1515,27 @@ declare type MultiSelectField = {
|
|
|
1196
1515
|
/** Configuration for NativeAdapter */
|
|
1197
1516
|
declare interface NativeAdapterConfig {
|
|
1198
1517
|
mmkv: MMKVModule;
|
|
1199
|
-
imagePicker: ExpoImagePickerModule | CommunityImagePickerModule;
|
|
1200
|
-
documentPicker: ExpoDocumentPickerModule | CommunityDocumentPickerModule;
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
/** Methods available from useNativeAdapterContext() */
|
|
1204
|
-
declare interface NativeAdapterContextValue {
|
|
1205
1518
|
/**
|
|
1206
|
-
*
|
|
1207
|
-
*
|
|
1519
|
+
* Optional: Image picker module for camera and gallery functionality.
|
|
1520
|
+
* Can be omitted if attachment features are not used.
|
|
1521
|
+
* Supports expo-image-picker or react-native-image-picker.
|
|
1208
1522
|
*/
|
|
1209
|
-
|
|
1523
|
+
imagePicker?: ExpoImagePickerModule | CommunityImagePickerModule;
|
|
1210
1524
|
/**
|
|
1211
|
-
*
|
|
1212
|
-
*
|
|
1525
|
+
* Optional: Document picker module for file selection.
|
|
1526
|
+
* Can be omitted if attachment features are not used.
|
|
1527
|
+
* Supports expo-document-picker or @react-native-documents/picker.
|
|
1213
1528
|
*/
|
|
1214
|
-
|
|
1529
|
+
documentPicker?: ExpoDocumentPickerModule | CommunityDocumentPickerModule;
|
|
1215
1530
|
/**
|
|
1216
|
-
*
|
|
1217
|
-
*
|
|
1531
|
+
* Optional: react-native-permissions module.
|
|
1532
|
+
* Only required when using react-native-image-picker (Community version).
|
|
1218
1533
|
*/
|
|
1219
|
-
|
|
1534
|
+
permissions?: RNPermissionsModule;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
/** Methods available from useNativeAdapterContext() */
|
|
1538
|
+
declare interface NativeAdapterContextValue extends ImagePickerAdapter, DocumentPickerAdapter {
|
|
1220
1539
|
/**
|
|
1221
1540
|
* Key-value storage interface
|
|
1222
1541
|
*/
|
|
@@ -1234,6 +1553,13 @@ declare interface NativeAdapterProviderProps {
|
|
|
1234
1553
|
children: ReactNode | ((context: NativeAdapterContextValue) => ReactNode);
|
|
1235
1554
|
}
|
|
1236
1555
|
|
|
1556
|
+
declare interface NetworkStateAdapter {
|
|
1557
|
+
/** Returns true if network is currently online */
|
|
1558
|
+
isOnline: () => boolean;
|
|
1559
|
+
/** Subscribe to network state changes. Returns unsubscribe function. */
|
|
1560
|
+
subscribe: (callback: (isOnline: boolean) => void) => () => void;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1237
1563
|
declare type NumberField = {
|
|
1238
1564
|
key: string;
|
|
1239
1565
|
type: 'number';
|
|
@@ -1257,9 +1583,11 @@ BaseMessageProps<{
|
|
|
1257
1583
|
};
|
|
1258
1584
|
|
|
1259
1585
|
sendingStatus: 'pending' | 'failed' | 'succeeded' | 'canceled' | 'scheduled';
|
|
1586
|
+
onClickFailedMessage?: () => void;
|
|
1260
1587
|
}>;
|
|
1261
1588
|
|
|
1262
|
-
declare type OutgoingMessageBodyProps<T extends
|
|
1589
|
+
declare type OutgoingMessageBodyProps<T extends MessageType_2 = MessageType_2> = OutgoingMessageProps<T> & {
|
|
1590
|
+
containerStyle?: ViewStyle;
|
|
1263
1591
|
customStyle?: {
|
|
1264
1592
|
bubbleContentColor?: string;
|
|
1265
1593
|
bubbleBackgroundColor?: string;
|
|
@@ -1271,8 +1599,12 @@ export declare const OutgoingMessageLayout: {
|
|
|
1271
1599
|
defaults: {
|
|
1272
1600
|
template: ComponentType<OutgoingMessageProps>;
|
|
1273
1601
|
components: {
|
|
1274
|
-
SendingStatus: ({ sendingStatus }: OutgoingMessageProps
|
|
1275
|
-
|
|
1602
|
+
SendingStatus: ({ sendingStatus, containerStyle }: OutgoingMessageProps<"file" | "user"> & {
|
|
1603
|
+
containerStyle?: ViewStyle;
|
|
1604
|
+
}) => ReactNode;
|
|
1605
|
+
SentTime: ({ createdAt, containerStyle }: OutgoingMessageProps<"file" | "user"> & {
|
|
1606
|
+
containerStyle?: ViewStyle;
|
|
1607
|
+
}) => ReactNode;
|
|
1276
1608
|
MessageBody: (props: OutgoingMessageBodyProps) => ReactNode;
|
|
1277
1609
|
};
|
|
1278
1610
|
};
|
|
@@ -1281,24 +1613,36 @@ export declare const OutgoingMessageLayout: {
|
|
|
1281
1613
|
children?: ReactNode;
|
|
1282
1614
|
}) => JSX.Element;
|
|
1283
1615
|
Context: Context<LayoutContextValue< {
|
|
1284
|
-
SendingStatus: ({ sendingStatus }: OutgoingMessageProps
|
|
1285
|
-
|
|
1616
|
+
SendingStatus: ({ sendingStatus, containerStyle }: OutgoingMessageProps<"file" | "user"> & {
|
|
1617
|
+
containerStyle?: ViewStyle;
|
|
1618
|
+
}) => ReactNode;
|
|
1619
|
+
SentTime: ({ createdAt, containerStyle }: OutgoingMessageProps<"file" | "user"> & {
|
|
1620
|
+
containerStyle?: ViewStyle;
|
|
1621
|
+
}) => ReactNode;
|
|
1286
1622
|
MessageBody: (props: OutgoingMessageBodyProps) => ReactNode;
|
|
1287
1623
|
}, OutgoingMessageProps>>;
|
|
1288
1624
|
useContext: () => LayoutContextValue< {
|
|
1289
|
-
SendingStatus: ({ sendingStatus }: OutgoingMessageProps
|
|
1290
|
-
|
|
1625
|
+
SendingStatus: ({ sendingStatus, containerStyle }: OutgoingMessageProps<"file" | "user"> & {
|
|
1626
|
+
containerStyle?: ViewStyle;
|
|
1627
|
+
}) => ReactNode;
|
|
1628
|
+
SentTime: ({ createdAt, containerStyle }: OutgoingMessageProps<"file" | "user"> & {
|
|
1629
|
+
containerStyle?: ViewStyle;
|
|
1630
|
+
}) => ReactNode;
|
|
1291
1631
|
MessageBody: (props: OutgoingMessageBodyProps) => ReactNode;
|
|
1292
1632
|
}, OutgoingMessageProps>;
|
|
1293
1633
|
} & {
|
|
1294
1634
|
SentTime: (props: {
|
|
1295
|
-
component: ({ createdAt }: OutgoingMessageProps
|
|
1635
|
+
component: ({ createdAt, containerStyle }: OutgoingMessageProps<"file" | "user"> & {
|
|
1636
|
+
containerStyle?: ViewStyle;
|
|
1637
|
+
}) => ReactNode;
|
|
1296
1638
|
}) => null;
|
|
1297
1639
|
MessageBody: (props: {
|
|
1298
1640
|
component: (props: OutgoingMessageBodyProps) => ReactNode;
|
|
1299
1641
|
}) => null;
|
|
1300
1642
|
SendingStatus: (props: {
|
|
1301
|
-
component: ({ sendingStatus }: OutgoingMessageProps
|
|
1643
|
+
component: ({ sendingStatus, containerStyle }: OutgoingMessageProps<"file" | "user"> & {
|
|
1644
|
+
containerStyle?: ViewStyle;
|
|
1645
|
+
}) => ReactNode;
|
|
1302
1646
|
}) => null;
|
|
1303
1647
|
};
|
|
1304
1648
|
|
|
@@ -1373,6 +1717,12 @@ Union,
|
|
|
1373
1717
|
T extends Union extends { messageType: infer MT } ? MT : never = Union extends { messageType: infer MT } ? MT : never,
|
|
1374
1718
|
> = Union extends { messageType: T } ? Union : never;
|
|
1375
1719
|
|
|
1720
|
+
declare type PositionHorizontal = 'start' | 'end';
|
|
1721
|
+
|
|
1722
|
+
declare type PositionVertical = 'top' | 'bottom';
|
|
1723
|
+
|
|
1724
|
+
declare type RNPermissionsModule = typeof RNPermissions;
|
|
1725
|
+
|
|
1376
1726
|
declare type SingleSelectField = {
|
|
1377
1727
|
key: string;
|
|
1378
1728
|
type: 'single-select';
|
|
@@ -1393,6 +1743,9 @@ declare type StringSet = {
|
|
|
1393
1743
|
attachment_camera: string;
|
|
1394
1744
|
attachment_photo: string;
|
|
1395
1745
|
attachment_document: string;
|
|
1746
|
+
file_upload_notification_count_limit: (count: number) => string;
|
|
1747
|
+
file_upload_notification_size_limit: (sizeInMB: number) => string;
|
|
1748
|
+
file_upload_not_supported_file: string;
|
|
1396
1749
|
};
|
|
1397
1750
|
conversation_list: AIAgentStringSet['conversation_list'] & {
|
|
1398
1751
|
footer_title: string;
|
|
@@ -1401,6 +1754,7 @@ declare type StringSet = {
|
|
|
1401
1754
|
csat: AIAgentStringSet['csat'] & {};
|
|
1402
1755
|
form: AIAgentStringSet['form'] & {};
|
|
1403
1756
|
common: AIAgentStringSet['common'] & {};
|
|
1757
|
+
feedback: AIAgentStringSet['feedback'] & {};
|
|
1404
1758
|
};
|
|
1405
1759
|
|
|
1406
1760
|
declare type SystemBaseMessageProps<T> = T & BaseMessageProps<{}>;
|