@sendbird/ai-agent-messenger-react-native 1.9.0 → 1.10.1
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 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +52 -6
- package/dist/index.js +2141 -1970
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ import { GroupChannelListOrder } from '@sendbird/chat/groupChannel';
|
|
|
26
26
|
import { GroupChannelModule } from '@sendbird/chat/groupChannel';
|
|
27
27
|
import { JSX } from 'react/jsx-runtime';
|
|
28
28
|
import { LayoutChangeEvent } from 'react-native';
|
|
29
|
-
import { LogLevel } from '@sendbird/chat';
|
|
29
|
+
import { LogLevel as LogLevel_2 } from '@sendbird/chat';
|
|
30
30
|
import { MMKV } from 'react-native-mmkv';
|
|
31
31
|
import { MultipleFilesMessage } from '@sendbird/chat/message';
|
|
32
32
|
import { MultipleFilesMessageCreateParams } from '@sendbird/chat/message';
|
|
@@ -420,6 +420,9 @@ declare interface AIAgentInterface {
|
|
|
420
420
|
/** The context object for AI Agent */
|
|
421
421
|
context?: Record<string, string>;
|
|
422
422
|
|
|
423
|
+
/** @internal Agent version for conversation initialization */
|
|
424
|
+
agentVersion?: number;
|
|
425
|
+
|
|
423
426
|
/** @internal Stats trackers for performance monitoring */
|
|
424
427
|
readonly statsTrackers: {
|
|
425
428
|
initialRender: ConversationInitialRenderStatsTracker;
|
|
@@ -447,6 +450,9 @@ declare interface AIAgentInterface {
|
|
|
447
450
|
/** @internal Refreshes the active channel by re-requesting messenger settings */
|
|
448
451
|
refreshActiveChannel: (options?: { useKnownActiveChannelUrl?: boolean }) => Promise<string>;
|
|
449
452
|
|
|
453
|
+
/** @internal Initializes a conversation on the channel if needed (AI Agent channel without conversation). */
|
|
454
|
+
initConversationIfNeeded: (channel: GroupChannel) => Promise<void>;
|
|
455
|
+
|
|
450
456
|
/** Disposes all resources held by this instance (WebSocket, desk auth, event handlers). */
|
|
451
457
|
dispose: () => void;
|
|
452
458
|
|
|
@@ -543,7 +549,7 @@ userSessionInfo: ManualSessionInfo | AnonymousSessionInfo;
|
|
|
543
549
|
* @public
|
|
544
550
|
* @description logLevel for the ai agent client.
|
|
545
551
|
* */
|
|
546
|
-
logLevel?:
|
|
552
|
+
logLevel?: LogLevel_2;
|
|
547
553
|
/**
|
|
548
554
|
* @public
|
|
549
555
|
* @description Language for the ai agent client. Should follow the IETF BCP 47 format.
|
|
@@ -1692,6 +1698,9 @@ declare interface ConversationScrollContextValue {
|
|
|
1692
1698
|
onLayout?: (event: LayoutChangeEvent) => void;
|
|
1693
1699
|
onContentSizeChange?: (width: number, height: number) => void;
|
|
1694
1700
|
onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
1701
|
+
onScrollBeginDrag?: () => void;
|
|
1702
|
+
onScrollEndDrag?: () => void;
|
|
1703
|
+
onMomentumScrollEnd?: () => void;
|
|
1695
1704
|
};
|
|
1696
1705
|
actions: {
|
|
1697
1706
|
/**
|
|
@@ -1729,6 +1738,12 @@ declare interface ConversationScrollContextValue {
|
|
|
1729
1738
|
* - When reopened or in auto mode: No change
|
|
1730
1739
|
*/
|
|
1731
1740
|
onConversationClosed: (isClosed: boolean) => void;
|
|
1741
|
+
/**
|
|
1742
|
+
* Notify when typing indicator state changes
|
|
1743
|
+
* - Auto mode: Scrolls to bottom when typing starts and user is near bottom
|
|
1744
|
+
* - Fixed mode: No operation
|
|
1745
|
+
*/
|
|
1746
|
+
onTypingIndicatorUpdate: (isTyping: boolean) => void;
|
|
1732
1747
|
};
|
|
1733
1748
|
}
|
|
1734
1749
|
|
|
@@ -1743,6 +1758,12 @@ declare type CSATSubmitParams = {
|
|
|
1743
1758
|
resolutionScore?: number;
|
|
1744
1759
|
};
|
|
1745
1760
|
|
|
1761
|
+
export declare enum CSATType {
|
|
1762
|
+
AI_AGENT_CSAT_5 = 'AI_AGENT_CSAT_5',
|
|
1763
|
+
AI_AGENT_CSAT_5_WITH_CRE = 'AI_AGENT_CSAT_5_WITH_CRE',
|
|
1764
|
+
HELPDESK_CSAT_5 = 'HELPDESK_CSAT_5',
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1746
1767
|
export declare interface CustomMessageTemplateData {
|
|
1747
1768
|
id: string;
|
|
1748
1769
|
response: {
|
|
@@ -2092,6 +2113,7 @@ BaseMessageProps<{
|
|
|
2092
2113
|
nickname: string;
|
|
2093
2114
|
profileUrl?: string;
|
|
2094
2115
|
};
|
|
2116
|
+
thinkingMessage?: string;
|
|
2095
2117
|
|
|
2096
2118
|
// flags
|
|
2097
2119
|
suggestedRepliesVisible?: boolean;
|
|
@@ -2144,7 +2166,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2144
2166
|
containerStyle?: ViewStyle;
|
|
2145
2167
|
}) => JSX.Element | null;
|
|
2146
2168
|
MessageBody: (props: IncomingMessageBodyProps) => JSX.Element;
|
|
2147
|
-
TypingIndicator: ({ customStyle, containerStyle }: IncomingMessageProps & {
|
|
2169
|
+
TypingIndicator: ({ thinkingMessage, customStyle, containerStyle }: IncomingMessageProps & {
|
|
2148
2170
|
containerStyle?: ViewStyle;
|
|
2149
2171
|
customStyle?: {
|
|
2150
2172
|
bubbleContentColor?: string;
|
|
@@ -2168,6 +2190,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2168
2190
|
nickname: string;
|
|
2169
2191
|
profileUrl?: string;
|
|
2170
2192
|
};
|
|
2193
|
+
thinkingMessage?: string;
|
|
2171
2194
|
suggestedRepliesVisible?: boolean;
|
|
2172
2195
|
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2173
2196
|
isBotMessage?: boolean;
|
|
@@ -2240,6 +2263,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2240
2263
|
nickname: string;
|
|
2241
2264
|
profileUrl?: string;
|
|
2242
2265
|
};
|
|
2266
|
+
thinkingMessage?: string;
|
|
2243
2267
|
suggestedRepliesVisible?: boolean;
|
|
2244
2268
|
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2245
2269
|
isBotMessage?: boolean;
|
|
@@ -2312,6 +2336,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2312
2336
|
nickname: string;
|
|
2313
2337
|
profileUrl?: string;
|
|
2314
2338
|
};
|
|
2339
|
+
thinkingMessage?: string;
|
|
2315
2340
|
suggestedRepliesVisible?: boolean;
|
|
2316
2341
|
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2317
2342
|
isBotMessage?: boolean;
|
|
@@ -2393,7 +2418,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2393
2418
|
containerStyle?: ViewStyle;
|
|
2394
2419
|
}) => JSX.Element | null;
|
|
2395
2420
|
MessageBody: (props: IncomingMessageBodyProps) => JSX.Element;
|
|
2396
|
-
TypingIndicator: ({ customStyle, containerStyle }: IncomingMessageProps & {
|
|
2421
|
+
TypingIndicator: ({ thinkingMessage, customStyle, containerStyle }: IncomingMessageProps & {
|
|
2397
2422
|
containerStyle?: ViewStyle;
|
|
2398
2423
|
customStyle?: {
|
|
2399
2424
|
bubbleContentColor?: string;
|
|
@@ -2417,6 +2442,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2417
2442
|
nickname: string;
|
|
2418
2443
|
profileUrl?: string;
|
|
2419
2444
|
};
|
|
2445
|
+
thinkingMessage?: string;
|
|
2420
2446
|
suggestedRepliesVisible?: boolean;
|
|
2421
2447
|
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2422
2448
|
isBotMessage?: boolean;
|
|
@@ -2489,6 +2515,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2489
2515
|
nickname: string;
|
|
2490
2516
|
profileUrl?: string;
|
|
2491
2517
|
};
|
|
2518
|
+
thinkingMessage?: string;
|
|
2492
2519
|
suggestedRepliesVisible?: boolean;
|
|
2493
2520
|
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2494
2521
|
isBotMessage?: boolean;
|
|
@@ -2561,6 +2588,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2561
2588
|
nickname: string;
|
|
2562
2589
|
profileUrl?: string;
|
|
2563
2590
|
};
|
|
2591
|
+
thinkingMessage?: string;
|
|
2564
2592
|
suggestedRepliesVisible?: boolean;
|
|
2565
2593
|
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2566
2594
|
isBotMessage?: boolean;
|
|
@@ -2637,7 +2665,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2637
2665
|
containerStyle?: ViewStyle;
|
|
2638
2666
|
}) => JSX.Element | null;
|
|
2639
2667
|
MessageBody: (props: IncomingMessageBodyProps) => JSX.Element;
|
|
2640
|
-
TypingIndicator: ({ customStyle, containerStyle }: IncomingMessageProps & {
|
|
2668
|
+
TypingIndicator: ({ thinkingMessage, customStyle, containerStyle }: IncomingMessageProps & {
|
|
2641
2669
|
containerStyle?: ViewStyle;
|
|
2642
2670
|
customStyle?: {
|
|
2643
2671
|
bubbleContentColor?: string;
|
|
@@ -2661,6 +2689,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2661
2689
|
nickname: string;
|
|
2662
2690
|
profileUrl?: string;
|
|
2663
2691
|
};
|
|
2692
|
+
thinkingMessage?: string;
|
|
2664
2693
|
suggestedRepliesVisible?: boolean;
|
|
2665
2694
|
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2666
2695
|
isBotMessage?: boolean;
|
|
@@ -2733,6 +2762,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2733
2762
|
nickname: string;
|
|
2734
2763
|
profileUrl?: string;
|
|
2735
2764
|
};
|
|
2765
|
+
thinkingMessage?: string;
|
|
2736
2766
|
suggestedRepliesVisible?: boolean;
|
|
2737
2767
|
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2738
2768
|
isBotMessage?: boolean;
|
|
@@ -2805,6 +2835,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2805
2835
|
nickname: string;
|
|
2806
2836
|
profileUrl?: string;
|
|
2807
2837
|
};
|
|
2838
|
+
thinkingMessage?: string;
|
|
2808
2839
|
suggestedRepliesVisible?: boolean;
|
|
2809
2840
|
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2810
2841
|
isBotMessage?: boolean;
|
|
@@ -2890,7 +2921,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2890
2921
|
component: (props: IncomingMessageBodyProps) => JSX.Element;
|
|
2891
2922
|
}) => null;
|
|
2892
2923
|
TypingIndicator: (props: {
|
|
2893
|
-
component: ({ customStyle, containerStyle }: IncomingMessageProps & {
|
|
2924
|
+
component: ({ thinkingMessage, customStyle, containerStyle }: IncomingMessageProps & {
|
|
2894
2925
|
containerStyle?: ViewStyle;
|
|
2895
2926
|
customStyle?: {
|
|
2896
2927
|
bubbleContentColor?: string;
|
|
@@ -2920,6 +2951,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2920
2951
|
nickname: string;
|
|
2921
2952
|
profileUrl?: string;
|
|
2922
2953
|
};
|
|
2954
|
+
thinkingMessage?: string;
|
|
2923
2955
|
suggestedRepliesVisible?: boolean;
|
|
2924
2956
|
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2925
2957
|
isBotMessage?: boolean;
|
|
@@ -2992,6 +3024,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2992
3024
|
nickname: string;
|
|
2993
3025
|
profileUrl?: string;
|
|
2994
3026
|
};
|
|
3027
|
+
thinkingMessage?: string;
|
|
2995
3028
|
suggestedRepliesVisible?: boolean;
|
|
2996
3029
|
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2997
3030
|
isBotMessage?: boolean;
|
|
@@ -3064,6 +3097,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3064
3097
|
nickname: string;
|
|
3065
3098
|
profileUrl?: string;
|
|
3066
3099
|
};
|
|
3100
|
+
thinkingMessage?: string;
|
|
3067
3101
|
suggestedRepliesVisible?: boolean;
|
|
3068
3102
|
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
3069
3103
|
isBotMessage?: boolean;
|
|
@@ -3179,6 +3213,7 @@ declare type InputState = {
|
|
|
3179
3213
|
| 'conversation_closed'
|
|
3180
3214
|
| 'suggested_replies'
|
|
3181
3215
|
| 'reconnecting'
|
|
3216
|
+
| 'handoff_pending'
|
|
3182
3217
|
| (string & {});
|
|
3183
3218
|
};
|
|
3184
3219
|
|
|
@@ -3211,6 +3246,15 @@ declare interface Loggable {
|
|
|
3211
3246
|
error(...args: any[]): void;
|
|
3212
3247
|
}
|
|
3213
3248
|
|
|
3249
|
+
export declare enum LogLevel {
|
|
3250
|
+
VERBOSE,
|
|
3251
|
+
DEBUG,
|
|
3252
|
+
INFO,
|
|
3253
|
+
WARN,
|
|
3254
|
+
ERROR,
|
|
3255
|
+
NONE,
|
|
3256
|
+
}
|
|
3257
|
+
|
|
3214
3258
|
declare type MaintainVisibleContentPosition = FlatListProps<any>['maintainVisibleContentPosition'];
|
|
3215
3259
|
|
|
3216
3260
|
export declare class ManualSessionInfo {
|
|
@@ -3852,6 +3896,8 @@ declare interface TypographyVariant {
|
|
|
3852
3896
|
lineHeight?: number | string;
|
|
3853
3897
|
}
|
|
3854
3898
|
|
|
3899
|
+
export declare const useAIAgentContext = ctx.useContext;
|
|
3900
|
+
|
|
3855
3901
|
export declare const useConversationContext: {
|
|
3856
3902
|
(): ConversationContextValue;
|
|
3857
3903
|
displayName: string;
|