@sendbird/ai-agent-messenger-react-native 1.4.0 → 1.5.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/index.cjs +1 -1
- package/dist/index.d.ts +187 -39
- package/dist/index.js +2414 -2172
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ import { SendbirdChatParams } from '@sendbird/chat';
|
|
|
33
33
|
import { SendbirdChatWith } from '@sendbird/chat';
|
|
34
34
|
import { SendbirdError } from '@sendbird/chat';
|
|
35
35
|
import { SessionHandler } from '@sendbird/chat';
|
|
36
|
+
import { StyleProp } from 'react-native';
|
|
36
37
|
import { User } from '@sendbird/chat';
|
|
37
38
|
import { UserMessage } from '@sendbird/chat/message';
|
|
38
39
|
import { UserMessageCreateParams } from '@sendbird/chat/message';
|
|
@@ -45,6 +46,11 @@ declare interface ActionbookInfo {
|
|
|
45
46
|
step: string | null;
|
|
46
47
|
}
|
|
47
48
|
|
|
49
|
+
declare interface ActiveChannelUpdatedParams {
|
|
50
|
+
channelUrl: string;
|
|
51
|
+
status: ConversationStatus;
|
|
52
|
+
}
|
|
53
|
+
|
|
48
54
|
declare interface AgentMessageTemplateInfo {
|
|
49
55
|
key: string;
|
|
50
56
|
message_template_key:
|
|
@@ -281,9 +287,19 @@ declare interface AIAgentMessengerSessionRef {
|
|
|
281
287
|
chatSDK: AIAgentContextValue['chatSDK'];
|
|
282
288
|
authenticate: () => Promise<MessengerSettingsResponse>;
|
|
283
289
|
deauthenticate: () => Promise<void>;
|
|
284
|
-
updateContext: (context: Record<string, string>) => Promise<ContextObject>;
|
|
285
|
-
patchContext: (context: Record<string, string>) => Promise<ContextObject>;
|
|
286
290
|
getContextObject: () => Promise<ContextObject>;
|
|
291
|
+
updateContext: {
|
|
292
|
+
/** Updates the context of the active conversation initialized at session start. */
|
|
293
|
+
(context: Record<string, string>): Promise<ContextObject>;
|
|
294
|
+
/** Updates the context of a specific conversation by aiAgentId and channelUrl. */
|
|
295
|
+
(aiAgentId: string, channelUrl: string, context: Record<string, string>): Promise<ContextObject>;
|
|
296
|
+
};
|
|
297
|
+
patchContext: {
|
|
298
|
+
/** Patches the context of the active conversation initialized at session start. */
|
|
299
|
+
(context: Record<string, string>): Promise<ContextObject>;
|
|
300
|
+
/** Patches the context of a specific conversation by aiAgentId and channelUrl. */
|
|
301
|
+
(aiAgentId: string, channelUrl: string, context: Record<string, string>): Promise<ContextObject>;
|
|
302
|
+
};
|
|
287
303
|
}
|
|
288
304
|
|
|
289
305
|
export declare const AIAgentProviderContainer: ForwardRefExoticComponent< {
|
|
@@ -363,6 +379,13 @@ declare interface AIAgentQueryParams {
|
|
|
363
379
|
conversationListParams?: ConversationListCollectionParams;
|
|
364
380
|
}
|
|
365
381
|
|
|
382
|
+
/**
|
|
383
|
+
* AI Agent session handler.
|
|
384
|
+
* */
|
|
385
|
+
declare interface AIAgentSessionHandler extends SessionHandler {
|
|
386
|
+
onExternalAuthTokenExpired?: (data: ExternalAuthTokenExpiredData) => void;
|
|
387
|
+
}
|
|
388
|
+
|
|
366
389
|
/**
|
|
367
390
|
* Common string set interface shared between react and react-native packages
|
|
368
391
|
* These are the base strings that both packages use
|
|
@@ -522,12 +545,12 @@ export declare const BottomSheetLayout: {
|
|
|
522
545
|
template?: ComponentType<BottomSheetTemplateProps> | undefined;
|
|
523
546
|
children?: ReactNode;
|
|
524
547
|
}) => JSX.Element;
|
|
525
|
-
Context: Context<LayoutContextValue<
|
|
548
|
+
Context: Context<LayoutContextValue<BottomSheetTemplateProps, {
|
|
526
549
|
ActionItem: ({ icon, label, destructive, onPress, }: BottomSheetActionItemProps) => ReactNode;
|
|
527
|
-
}
|
|
528
|
-
useContext: () => LayoutContextValue<
|
|
550
|
+
}>>;
|
|
551
|
+
useContext: () => LayoutContextValue<BottomSheetTemplateProps, {
|
|
529
552
|
ActionItem: ({ icon, label, destructive, onPress, }: BottomSheetActionItemProps) => ReactNode;
|
|
530
|
-
}
|
|
553
|
+
}>;
|
|
531
554
|
} & {
|
|
532
555
|
ActionItem: (props: {
|
|
533
556
|
component: ({ icon, label, destructive, onPress, }: BottomSheetActionItemProps) => ReactNode;
|
|
@@ -557,10 +580,14 @@ declare interface CloseConversationCommandParams {
|
|
|
557
580
|
|
|
558
581
|
declare interface CommandPayloads {
|
|
559
582
|
[CommandType.ConversationClose]: undefined | CloseConversationCommandParams;
|
|
583
|
+
[CommandType.MessengerSettingsUpdated]: MessengerSettingsUpdatedParams;
|
|
584
|
+
[CommandType.ActiveChannelUpdated]: ActiveChannelUpdatedParams;
|
|
560
585
|
}
|
|
561
586
|
|
|
562
587
|
declare enum CommandType {
|
|
563
588
|
ConversationClose = 'conv.close',
|
|
589
|
+
MessengerSettingsUpdated = 'messenger.settings.updated',
|
|
590
|
+
ActiveChannelUpdated = 'active.channel.updated',
|
|
564
591
|
}
|
|
565
592
|
|
|
566
593
|
declare type CommunityDocumentPickerModule = typeof CommunityDocumentPicker;
|
|
@@ -619,7 +646,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
619
646
|
template?: ComponentType<ConversationHeaderTemplateProps> | undefined;
|
|
620
647
|
children?: ReactNode;
|
|
621
648
|
}) => JSX.Element;
|
|
622
|
-
Context: Context<LayoutContextValue<
|
|
649
|
+
Context: Context<LayoutContextValue<ConversationHeaderTemplateProps, {
|
|
623
650
|
StartArea: () => ReactNode;
|
|
624
651
|
TitleArea: () => ReactNode;
|
|
625
652
|
EndArea: () => ReactNode;
|
|
@@ -627,8 +654,8 @@ export declare const ConversationHeaderLayout: {
|
|
|
627
654
|
Title: () => ReactNode;
|
|
628
655
|
HandoffButton: () => ReactNode;
|
|
629
656
|
CloseButton: () => ReactNode;
|
|
630
|
-
}
|
|
631
|
-
useContext: () => LayoutContextValue<
|
|
657
|
+
}>>;
|
|
658
|
+
useContext: () => LayoutContextValue<ConversationHeaderTemplateProps, {
|
|
632
659
|
StartArea: () => ReactNode;
|
|
633
660
|
TitleArea: () => ReactNode;
|
|
634
661
|
EndArea: () => ReactNode;
|
|
@@ -636,7 +663,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
636
663
|
Title: () => ReactNode;
|
|
637
664
|
HandoffButton: () => ReactNode;
|
|
638
665
|
CloseButton: () => ReactNode;
|
|
639
|
-
}
|
|
666
|
+
}>;
|
|
640
667
|
} & {
|
|
641
668
|
StartArea: (props: {
|
|
642
669
|
component: () => ReactNode;
|
|
@@ -681,20 +708,20 @@ export declare const ConversationLayout: {
|
|
|
681
708
|
template?: ComponentType< {}> | undefined;
|
|
682
709
|
children?: ReactNode;
|
|
683
710
|
}) => JSX.Element;
|
|
684
|
-
Context: Context<LayoutContextValue< {
|
|
711
|
+
Context: Context<LayoutContextValue< {}, {
|
|
685
712
|
Header: () => ReactNode;
|
|
686
713
|
Body: ({ messageStackDirection, }: {
|
|
687
714
|
messageStackDirection?: "top" | "bottom";
|
|
688
715
|
}) => ReactNode;
|
|
689
716
|
Footer: () => ReactNode;
|
|
690
|
-
}
|
|
691
|
-
useContext: () => LayoutContextValue< {
|
|
717
|
+
}>>;
|
|
718
|
+
useContext: () => LayoutContextValue< {}, {
|
|
692
719
|
Header: () => ReactNode;
|
|
693
720
|
Body: ({ messageStackDirection, }: {
|
|
694
721
|
messageStackDirection?: "top" | "bottom";
|
|
695
722
|
}) => ReactNode;
|
|
696
723
|
Footer: () => ReactNode;
|
|
697
|
-
}
|
|
724
|
+
}>;
|
|
698
725
|
} & {
|
|
699
726
|
Header: (props: {
|
|
700
727
|
component: () => ReactNode;
|
|
@@ -753,20 +780,20 @@ export declare const ConversationListHeaderLayout: {
|
|
|
753
780
|
template?: ComponentType<ConversationListHeaderTemplateProps> | undefined;
|
|
754
781
|
children?: ReactNode;
|
|
755
782
|
}) => JSX.Element;
|
|
756
|
-
Context: Context<LayoutContextValue<
|
|
783
|
+
Context: Context<LayoutContextValue<ConversationListHeaderTemplateProps, {
|
|
757
784
|
StartArea: () => ReactNode;
|
|
758
785
|
TitleArea: () => ReactNode;
|
|
759
786
|
EndArea: () => ReactNode;
|
|
760
787
|
Title: () => ReactNode;
|
|
761
788
|
CloseButton: () => ReactNode;
|
|
762
|
-
}
|
|
763
|
-
useContext: () => LayoutContextValue<
|
|
789
|
+
}>>;
|
|
790
|
+
useContext: () => LayoutContextValue<ConversationListHeaderTemplateProps, {
|
|
764
791
|
StartArea: () => ReactNode;
|
|
765
792
|
TitleArea: () => ReactNode;
|
|
766
793
|
EndArea: () => ReactNode;
|
|
767
794
|
Title: () => ReactNode;
|
|
768
795
|
CloseButton: () => ReactNode;
|
|
769
|
-
}
|
|
796
|
+
}>;
|
|
770
797
|
} & {
|
|
771
798
|
StartArea: (props: {
|
|
772
799
|
component: () => ReactNode;
|
|
@@ -803,16 +830,16 @@ export declare const ConversationListLayout: {
|
|
|
803
830
|
template?: ComponentType<unknown> | undefined;
|
|
804
831
|
children?: ReactNode;
|
|
805
832
|
}) => JSX.Element;
|
|
806
|
-
Context: Context<LayoutContextValue<
|
|
833
|
+
Context: Context<LayoutContextValue<unknown, {
|
|
807
834
|
Header: () => ReactNode;
|
|
808
835
|
Body: () => ReactNode;
|
|
809
836
|
Footer: () => ReactNode;
|
|
810
|
-
}
|
|
811
|
-
useContext: () => LayoutContextValue<
|
|
837
|
+
}>>;
|
|
838
|
+
useContext: () => LayoutContextValue<unknown, {
|
|
812
839
|
Header: () => ReactNode;
|
|
813
840
|
Body: () => ReactNode;
|
|
814
841
|
Footer: () => ReactNode;
|
|
815
|
-
}
|
|
842
|
+
}>;
|
|
816
843
|
} & {
|
|
817
844
|
Header: (props: {
|
|
818
845
|
component: () => ReactNode;
|
|
@@ -905,6 +932,10 @@ export declare interface CustomMessageTemplateData {
|
|
|
905
932
|
error: string | null;
|
|
906
933
|
}
|
|
907
934
|
|
|
935
|
+
export declare interface DateSeparatorProps extends ViewProps {
|
|
936
|
+
date?: Date | number;
|
|
937
|
+
}
|
|
938
|
+
|
|
908
939
|
declare interface Dispatcher {
|
|
909
940
|
send(command: BaseCommand): Promise<void>;
|
|
910
941
|
subscribe<E extends CommandType>(eventType: E, callback: (payload: CommandPayloads[E]) => void | Promise<void>): void;
|
|
@@ -1000,6 +1031,11 @@ export declare interface ExtendedMessagePayload {
|
|
|
1000
1031
|
agent_message_templates: AgentMessageTemplateInfo[];
|
|
1001
1032
|
}
|
|
1002
1033
|
|
|
1034
|
+
declare type ExternalAuthTokenExpiredData = {
|
|
1035
|
+
channelUrl: string;
|
|
1036
|
+
aiAgentId: string;
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1003
1039
|
declare interface FeedbackInfo {
|
|
1004
1040
|
rating: 'good' | 'bad';
|
|
1005
1041
|
comment?: string;
|
|
@@ -1380,7 +1416,7 @@ export declare const IncomingMessageLayout: {
|
|
|
1380
1416
|
template?: ComponentType<IncomingMessageProps> | undefined;
|
|
1381
1417
|
children?: ReactNode;
|
|
1382
1418
|
}) => JSX.Element;
|
|
1383
|
-
Context: Context<LayoutContextValue<
|
|
1419
|
+
Context: Context<LayoutContextValue<IncomingMessageProps, {
|
|
1384
1420
|
SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => JSX.Element;
|
|
1385
1421
|
SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => JSX.Element;
|
|
1386
1422
|
SentTime: ({ createdAt, containerStyle }: IncomingMessageProps & {
|
|
@@ -1535,8 +1571,8 @@ export declare const IncomingMessageLayout: {
|
|
|
1535
1571
|
Feedback: ({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, containerStyle, }: IncomingMessageProps & {
|
|
1536
1572
|
containerStyle?: ViewStyle;
|
|
1537
1573
|
}) => ReactNode;
|
|
1538
|
-
}
|
|
1539
|
-
useContext: () => LayoutContextValue<
|
|
1574
|
+
}>>;
|
|
1575
|
+
useContext: () => LayoutContextValue<IncomingMessageProps, {
|
|
1540
1576
|
SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => JSX.Element;
|
|
1541
1577
|
SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => JSX.Element;
|
|
1542
1578
|
SentTime: ({ createdAt, containerStyle }: IncomingMessageProps & {
|
|
@@ -1691,7 +1727,7 @@ export declare const IncomingMessageLayout: {
|
|
|
1691
1727
|
Feedback: ({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, containerStyle, }: IncomingMessageProps & {
|
|
1692
1728
|
containerStyle?: ViewStyle;
|
|
1693
1729
|
}) => ReactNode;
|
|
1694
|
-
}
|
|
1730
|
+
}>;
|
|
1695
1731
|
} & {
|
|
1696
1732
|
SenderName: (props: {
|
|
1697
1733
|
component: ({ sender }: Pick<IncomingMessageProps, "sender">) => JSX.Element;
|
|
@@ -1917,11 +1953,11 @@ declare interface LauncherInfo {
|
|
|
1917
1953
|
imageUrl: string;
|
|
1918
1954
|
}
|
|
1919
1955
|
|
|
1920
|
-
declare interface LayoutContextValue<Components extends Record<string, ComponentType<
|
|
1956
|
+
declare interface LayoutContextValue<Props, Components extends Record<string, ComponentType<any>>> {
|
|
1921
1957
|
Template: ComponentType<Props>;
|
|
1922
1958
|
updateTemplate: (template: ComponentType<Props>) => void;
|
|
1923
1959
|
components: Components;
|
|
1924
|
-
updateComponent: (key:
|
|
1960
|
+
updateComponent: <K extends keyof Components>(key: K, component: Components[K]) => void;
|
|
1925
1961
|
}
|
|
1926
1962
|
|
|
1927
1963
|
declare interface Loggable {
|
|
@@ -1937,7 +1973,7 @@ declare type MaintainVisibleContentPosition = FlatListProps<any>['maintainVisibl
|
|
|
1937
1973
|
export declare class ManualSessionInfo {
|
|
1938
1974
|
userId: string;
|
|
1939
1975
|
authToken: string;
|
|
1940
|
-
sessionHandler:
|
|
1976
|
+
sessionHandler: AIAgentSessionHandler;
|
|
1941
1977
|
|
|
1942
1978
|
constructor({ userId, authToken, sessionHandler }: ManualSessionInfoParams) {
|
|
1943
1979
|
this.userId = userId;
|
|
@@ -1949,7 +1985,7 @@ export declare class ManualSessionInfo {
|
|
|
1949
1985
|
declare interface ManualSessionInfoParams {
|
|
1950
1986
|
userId: string;
|
|
1951
1987
|
authToken: string;
|
|
1952
|
-
sessionHandler:
|
|
1988
|
+
sessionHandler: AIAgentSessionHandler;
|
|
1953
1989
|
}
|
|
1954
1990
|
|
|
1955
1991
|
/** File metadata returned from picker methods */
|
|
@@ -1971,6 +2007,36 @@ declare interface MediaFile {
|
|
|
1971
2007
|
* */
|
|
1972
2008
|
declare type MessageGroupType = 'single' | 'top' | 'bottom' | 'middle';
|
|
1973
2009
|
|
|
2010
|
+
export declare const MessageListUILayout: {
|
|
2011
|
+
(props: PropsWithChildren): ReactNode;
|
|
2012
|
+
defaults: {
|
|
2013
|
+
template: ComponentType<unknown>;
|
|
2014
|
+
components: {
|
|
2015
|
+
DateSeparator: ({ date, style, ...props }: DateSeparatorProps) => ReactNode;
|
|
2016
|
+
ScrollToBottomButton: ({ style, onPress }: ScrollToBottomButtonProps) => JSX.Element;
|
|
2017
|
+
};
|
|
2018
|
+
};
|
|
2019
|
+
Template: ({ template, children }: {
|
|
2020
|
+
template?: ComponentType<unknown> | undefined;
|
|
2021
|
+
children?: ReactNode;
|
|
2022
|
+
}) => JSX.Element;
|
|
2023
|
+
Context: Context<LayoutContextValue<unknown, {
|
|
2024
|
+
DateSeparator: ({ date, style, ...props }: DateSeparatorProps) => ReactNode;
|
|
2025
|
+
ScrollToBottomButton: ({ style, onPress }: ScrollToBottomButtonProps) => JSX.Element;
|
|
2026
|
+
}>>;
|
|
2027
|
+
useContext: () => LayoutContextValue<unknown, {
|
|
2028
|
+
DateSeparator: ({ date, style, ...props }: DateSeparatorProps) => ReactNode;
|
|
2029
|
+
ScrollToBottomButton: ({ style, onPress }: ScrollToBottomButtonProps) => JSX.Element;
|
|
2030
|
+
}>;
|
|
2031
|
+
} & {
|
|
2032
|
+
DateSeparator: (props: {
|
|
2033
|
+
component: ({ date, style, ...props }: DateSeparatorProps) => ReactNode;
|
|
2034
|
+
}) => null;
|
|
2035
|
+
ScrollToBottomButton: (props: {
|
|
2036
|
+
component: ({ style, onPress }: ScrollToBottomButtonProps) => JSX.Element;
|
|
2037
|
+
}) => null;
|
|
2038
|
+
};
|
|
2039
|
+
|
|
1974
2040
|
declare interface MessageTemplateCache {
|
|
1975
2041
|
set(key: string, value: string): void;
|
|
1976
2042
|
get(key: string): string | null;
|
|
@@ -2061,6 +2127,11 @@ declare interface MessengerSettingsResponse {
|
|
|
2061
2127
|
};
|
|
2062
2128
|
}
|
|
2063
2129
|
|
|
2130
|
+
declare interface MessengerSettingsUpdatedParams {
|
|
2131
|
+
settings: MessengerSettingsResponse;
|
|
2132
|
+
source: 'cache' | 'server';
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2064
2135
|
declare type MMKVModule = MMKV;
|
|
2065
2136
|
|
|
2066
2137
|
declare interface ModalContextProps {
|
|
@@ -2195,7 +2266,7 @@ export declare const OutgoingMessageLayout: {
|
|
|
2195
2266
|
template?: ComponentType<OutgoingMessageProps> | undefined;
|
|
2196
2267
|
children?: ReactNode;
|
|
2197
2268
|
}) => JSX.Element;
|
|
2198
|
-
Context: Context<LayoutContextValue<
|
|
2269
|
+
Context: Context<LayoutContextValue<OutgoingMessageProps, {
|
|
2199
2270
|
SendingStatus: ({ sendingStatus, containerStyle }: OutgoingMessageProps<"file" | "user"> & {
|
|
2200
2271
|
containerStyle?: ViewStyle;
|
|
2201
2272
|
}) => ReactNode;
|
|
@@ -2203,8 +2274,8 @@ export declare const OutgoingMessageLayout: {
|
|
|
2203
2274
|
containerStyle?: ViewStyle;
|
|
2204
2275
|
}) => ReactNode;
|
|
2205
2276
|
MessageBody: (props: OutgoingMessageBodyProps) => ReactNode;
|
|
2206
|
-
}
|
|
2207
|
-
useContext: () => LayoutContextValue<
|
|
2277
|
+
}>>;
|
|
2278
|
+
useContext: () => LayoutContextValue<OutgoingMessageProps, {
|
|
2208
2279
|
SendingStatus: ({ sendingStatus, containerStyle }: OutgoingMessageProps<"file" | "user"> & {
|
|
2209
2280
|
containerStyle?: ViewStyle;
|
|
2210
2281
|
}) => ReactNode;
|
|
@@ -2212,7 +2283,7 @@ export declare const OutgoingMessageLayout: {
|
|
|
2212
2283
|
containerStyle?: ViewStyle;
|
|
2213
2284
|
}) => ReactNode;
|
|
2214
2285
|
MessageBody: (props: OutgoingMessageBodyProps) => ReactNode;
|
|
2215
|
-
}
|
|
2286
|
+
}>;
|
|
2216
2287
|
} & {
|
|
2217
2288
|
SentTime: (props: {
|
|
2218
2289
|
component: ({ createdAt, containerStyle }: OutgoingMessageProps<"file" | "user"> & {
|
|
@@ -2300,13 +2371,90 @@ Union,
|
|
|
2300
2371
|
T extends Union extends { messageType: infer MT } ? MT : never = Union extends { messageType: infer MT } ? MT : never,
|
|
2301
2372
|
> = Union extends { messageType: T } ? Union : never;
|
|
2302
2373
|
|
|
2374
|
+
export declare interface PlaceholderBaseProps extends PlaceholderCommonProps {
|
|
2375
|
+
icon?: IconType;
|
|
2376
|
+
label?: string;
|
|
2377
|
+
}
|
|
2378
|
+
|
|
2379
|
+
declare interface PlaceholderCommonProps {
|
|
2380
|
+
style?: ViewStyle;
|
|
2381
|
+
iconSize?: number;
|
|
2382
|
+
children?: ReactNode;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
export declare interface PlaceholderErrorProps extends PlaceholderBaseProps {
|
|
2386
|
+
action?: {
|
|
2387
|
+
label?: string;
|
|
2388
|
+
onPress: () => void;
|
|
2389
|
+
};
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
export declare const PlaceholderLayout: {
|
|
2393
|
+
(props: PropsWithChildren): ReactNode;
|
|
2394
|
+
defaults: {
|
|
2395
|
+
template: ComponentType<PlaceholderTemplateProps>;
|
|
2396
|
+
components: {
|
|
2397
|
+
Loading: ({ iconSize, style }: PlaceholderLoadingProps) => ReactNode;
|
|
2398
|
+
Error: ({ label, icon, action, ...props }: PlaceholderErrorProps) => ReactNode;
|
|
2399
|
+
NoChannels: ({ label, icon, ...props }: PlaceholderBaseProps) => ReactNode;
|
|
2400
|
+
NoMessages: ({ label, icon, ...props }: PlaceholderBaseProps) => ReactNode;
|
|
2401
|
+
};
|
|
2402
|
+
};
|
|
2403
|
+
Template: ({ template, children }: {
|
|
2404
|
+
template?: ComponentType<PlaceholderTemplateProps> | undefined;
|
|
2405
|
+
children?: ReactNode;
|
|
2406
|
+
}) => JSX.Element;
|
|
2407
|
+
Context: Context<LayoutContextValue<PlaceholderTemplateProps, {
|
|
2408
|
+
Loading: ({ iconSize, style }: PlaceholderLoadingProps) => ReactNode;
|
|
2409
|
+
Error: ({ label, icon, action, ...props }: PlaceholderErrorProps) => ReactNode;
|
|
2410
|
+
NoChannels: ({ label, icon, ...props }: PlaceholderBaseProps) => ReactNode;
|
|
2411
|
+
NoMessages: ({ label, icon, ...props }: PlaceholderBaseProps) => ReactNode;
|
|
2412
|
+
}>>;
|
|
2413
|
+
useContext: () => LayoutContextValue<PlaceholderTemplateProps, {
|
|
2414
|
+
Loading: ({ iconSize, style }: PlaceholderLoadingProps) => ReactNode;
|
|
2415
|
+
Error: ({ label, icon, action, ...props }: PlaceholderErrorProps) => ReactNode;
|
|
2416
|
+
NoChannels: ({ label, icon, ...props }: PlaceholderBaseProps) => ReactNode;
|
|
2417
|
+
NoMessages: ({ label, icon, ...props }: PlaceholderBaseProps) => ReactNode;
|
|
2418
|
+
}>;
|
|
2419
|
+
} & {
|
|
2420
|
+
Loading: (props: {
|
|
2421
|
+
component: ({ iconSize, style }: PlaceholderLoadingProps) => ReactNode;
|
|
2422
|
+
}) => null;
|
|
2423
|
+
Error: (props: {
|
|
2424
|
+
component: ({ label, icon, action, ...props }: PlaceholderErrorProps) => ReactNode;
|
|
2425
|
+
}) => null;
|
|
2426
|
+
NoChannels: (props: {
|
|
2427
|
+
component: ({ label, icon, ...props }: PlaceholderBaseProps) => ReactNode;
|
|
2428
|
+
}) => null;
|
|
2429
|
+
NoMessages: (props: {
|
|
2430
|
+
component: ({ label, icon, ...props }: PlaceholderBaseProps) => ReactNode;
|
|
2431
|
+
}) => null;
|
|
2432
|
+
};
|
|
2433
|
+
|
|
2434
|
+
export declare interface PlaceholderLoadingProps extends PlaceholderCommonProps {
|
|
2435
|
+
}
|
|
2436
|
+
|
|
2437
|
+
export declare type PlaceholderTemplateProps = ({
|
|
2438
|
+
type: 'loading';
|
|
2439
|
+
} & PlaceholderLoadingProps) | ({
|
|
2440
|
+
type: 'error';
|
|
2441
|
+
} & PlaceholderErrorProps) | ({
|
|
2442
|
+
type: 'noChannels' | 'noMessages';
|
|
2443
|
+
} & PlaceholderBaseProps);
|
|
2444
|
+
|
|
2303
2445
|
declare type PositionHorizontal = 'start' | 'end';
|
|
2304
2446
|
|
|
2305
2447
|
declare type PositionVertical = 'top' | 'bottom';
|
|
2306
2448
|
|
|
2307
2449
|
declare type RNPermissionsModule = typeof RNPermissions;
|
|
2308
2450
|
|
|
2451
|
+
export declare type ScrollToBottomButtonProps = {
|
|
2452
|
+
style?: StyleProp<ViewStyle>;
|
|
2453
|
+
onPress: () => void;
|
|
2454
|
+
};
|
|
2455
|
+
|
|
2309
2456
|
declare interface SearchConversationParams {
|
|
2457
|
+
aiAgentId: string;
|
|
2310
2458
|
context: Record<string, string>;
|
|
2311
2459
|
}
|
|
2312
2460
|
|
|
@@ -2359,14 +2507,14 @@ export declare const SystemMessageLayout: {
|
|
|
2359
2507
|
template?: ComponentType<SystemMessageProps> | undefined;
|
|
2360
2508
|
children?: ReactNode;
|
|
2361
2509
|
}) => JSX.Element;
|
|
2362
|
-
Context: Context<LayoutContextValue<
|
|
2510
|
+
Context: Context<LayoutContextValue<SystemMessageProps, {
|
|
2363
2511
|
AdminMessage: (props: SystemMessageProps) => JSX.Element | null;
|
|
2364
2512
|
CSATMessage: (props: SystemMessageProps) => JSX.Element | null;
|
|
2365
|
-
}
|
|
2366
|
-
useContext: () => LayoutContextValue<
|
|
2513
|
+
}>>;
|
|
2514
|
+
useContext: () => LayoutContextValue<SystemMessageProps, {
|
|
2367
2515
|
AdminMessage: (props: SystemMessageProps) => JSX.Element | null;
|
|
2368
2516
|
CSATMessage: (props: SystemMessageProps) => JSX.Element | null;
|
|
2369
|
-
}
|
|
2517
|
+
}>;
|
|
2370
2518
|
} & {
|
|
2371
2519
|
AdminMessage: (props: {
|
|
2372
2520
|
component: (props: SystemMessageProps) => JSX.Element | null;
|
|
@@ -2467,7 +2615,7 @@ declare type UserSession = {
|
|
|
2467
2615
|
declare interface UserSessionInfo {
|
|
2468
2616
|
userId: string;
|
|
2469
2617
|
authToken: string;
|
|
2470
|
-
sessionHandler:
|
|
2618
|
+
sessionHandler: AIAgentSessionHandler;
|
|
2471
2619
|
}
|
|
2472
2620
|
|
|
2473
2621
|
export { }
|