@sendbird/ai-agent-messenger-react 1.27.0 → 1.28.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/VvejebHE.cjs +1 -0
- package/dist/es/{BB3d9QYh.js → BiIgmoXQ.js} +33 -21
- package/dist/index.cjs +72 -72
- package/dist/index.d.ts +52 -1
- package/dist/index.js +2704 -2666
- package/package.json +2 -2
- package/dist/cjs/D2Opuq0j.cjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -392,6 +392,14 @@ declare type AIAgentChatSDKParams = ChatSDKSendbirdChatParams<[ChatSDKGroupChann
|
|
|
392
392
|
|
|
393
393
|
declare interface AIAgentClientHandlers {
|
|
394
394
|
onCustomEvent?: (event: CustomEvent_2) => void;
|
|
395
|
+
/**
|
|
396
|
+
* Called whenever the SDK opens an external URL — markdown links, admin-message
|
|
397
|
+
* URLs, citation links, CTA buttons, and non-media file-preview clicks.
|
|
398
|
+
* Provide this to intercept link navigation (analytics, deep links, custom
|
|
399
|
+
* schemes). When omitted, the SDK falls back to `window.open` on web and
|
|
400
|
+
* `Linking.openURL` on React Native.
|
|
401
|
+
*/
|
|
402
|
+
onClickLink?: (params: { url: string }) => void;
|
|
395
403
|
}
|
|
396
404
|
|
|
397
405
|
declare type AIAgentCommonIconName =
|
|
@@ -1288,6 +1296,7 @@ declare type BaseMessageProps<T> = T & {
|
|
|
1288
1296
|
onClickMedia?: (params: { url: string; type: string }) => void;
|
|
1289
1297
|
onClickMediaFiles?: (params: { files: Array<{ url: string; type: string; name?: string }>; index: number }) => void;
|
|
1290
1298
|
onClickFile?: (params: { url: string; type: string }) => void;
|
|
1299
|
+
onClickLink?: (params: { url: string }) => void;
|
|
1291
1300
|
|
|
1292
1301
|
children?: ReactNode;
|
|
1293
1302
|
};
|
|
@@ -2829,6 +2838,9 @@ export declare const IncomingMessageLayout: {
|
|
|
2829
2838
|
url: string;
|
|
2830
2839
|
type: string;
|
|
2831
2840
|
}) => void;
|
|
2841
|
+
onClickLink?: (params: {
|
|
2842
|
+
url: string;
|
|
2843
|
+
}) => void;
|
|
2832
2844
|
children?: ReactNode;
|
|
2833
2845
|
}) | ({
|
|
2834
2846
|
messageType: "file";
|
|
@@ -2903,6 +2915,9 @@ export declare const IncomingMessageLayout: {
|
|
|
2903
2915
|
url: string;
|
|
2904
2916
|
type: string;
|
|
2905
2917
|
}) => void;
|
|
2918
|
+
onClickLink?: (params: {
|
|
2919
|
+
url: string;
|
|
2920
|
+
}) => void;
|
|
2906
2921
|
children?: ReactNode;
|
|
2907
2922
|
}) | ({
|
|
2908
2923
|
messageType: "multipleFiles";
|
|
@@ -2977,6 +2992,9 @@ export declare const IncomingMessageLayout: {
|
|
|
2977
2992
|
url: string;
|
|
2978
2993
|
type: string;
|
|
2979
2994
|
}) => void;
|
|
2995
|
+
onClickLink?: (params: {
|
|
2996
|
+
url: string;
|
|
2997
|
+
}) => void;
|
|
2980
2998
|
children?: ReactNode;
|
|
2981
2999
|
})) => ReactNode;
|
|
2982
3000
|
CTAButton: ({ extendedMessagePayload, onClickCTA, }: IncomingMessageProps) => ReactNode;
|
|
@@ -3082,6 +3100,9 @@ export declare const IncomingMessageLayout: {
|
|
|
3082
3100
|
url: string;
|
|
3083
3101
|
type: string;
|
|
3084
3102
|
}) => void;
|
|
3103
|
+
onClickLink?: (params: {
|
|
3104
|
+
url: string;
|
|
3105
|
+
}) => void;
|
|
3085
3106
|
children?: ReactNode;
|
|
3086
3107
|
}) | ({
|
|
3087
3108
|
messageType: "file";
|
|
@@ -3156,6 +3177,9 @@ export declare const IncomingMessageLayout: {
|
|
|
3156
3177
|
url: string;
|
|
3157
3178
|
type: string;
|
|
3158
3179
|
}) => void;
|
|
3180
|
+
onClickLink?: (params: {
|
|
3181
|
+
url: string;
|
|
3182
|
+
}) => void;
|
|
3159
3183
|
children?: ReactNode;
|
|
3160
3184
|
}) | ({
|
|
3161
3185
|
messageType: "multipleFiles";
|
|
@@ -3230,6 +3254,9 @@ export declare const IncomingMessageLayout: {
|
|
|
3230
3254
|
url: string;
|
|
3231
3255
|
type: string;
|
|
3232
3256
|
}) => void;
|
|
3257
|
+
onClickLink?: (params: {
|
|
3258
|
+
url: string;
|
|
3259
|
+
}) => void;
|
|
3233
3260
|
children?: ReactNode;
|
|
3234
3261
|
})) => ReactNode;
|
|
3235
3262
|
CTAButton: ({ extendedMessagePayload, onClickCTA, }: IncomingMessageProps) => ReactNode;
|
|
@@ -3330,6 +3357,9 @@ export declare const IncomingMessageLayout: {
|
|
|
3330
3357
|
url: string;
|
|
3331
3358
|
type: string;
|
|
3332
3359
|
}) => void;
|
|
3360
|
+
onClickLink?: (params: {
|
|
3361
|
+
url: string;
|
|
3362
|
+
}) => void;
|
|
3333
3363
|
children?: ReactNode;
|
|
3334
3364
|
}) | ({
|
|
3335
3365
|
messageType: "file";
|
|
@@ -3404,6 +3434,9 @@ export declare const IncomingMessageLayout: {
|
|
|
3404
3434
|
url: string;
|
|
3405
3435
|
type: string;
|
|
3406
3436
|
}) => void;
|
|
3437
|
+
onClickLink?: (params: {
|
|
3438
|
+
url: string;
|
|
3439
|
+
}) => void;
|
|
3407
3440
|
children?: ReactNode;
|
|
3408
3441
|
}) | ({
|
|
3409
3442
|
messageType: "multipleFiles";
|
|
@@ -3478,6 +3511,9 @@ export declare const IncomingMessageLayout: {
|
|
|
3478
3511
|
url: string;
|
|
3479
3512
|
type: string;
|
|
3480
3513
|
}) => void;
|
|
3514
|
+
onClickLink?: (params: {
|
|
3515
|
+
url: string;
|
|
3516
|
+
}) => void;
|
|
3481
3517
|
children?: ReactNode;
|
|
3482
3518
|
})) => ReactNode;
|
|
3483
3519
|
CTAButton: ({ extendedMessagePayload, onClickCTA, }: IncomingMessageProps) => ReactNode;
|
|
@@ -3601,6 +3637,9 @@ export declare const IncomingMessageLayout: {
|
|
|
3601
3637
|
url: string;
|
|
3602
3638
|
type: string;
|
|
3603
3639
|
}) => void;
|
|
3640
|
+
onClickLink?: (params: {
|
|
3641
|
+
url: string;
|
|
3642
|
+
}) => void;
|
|
3604
3643
|
children?: ReactNode;
|
|
3605
3644
|
}) | ({
|
|
3606
3645
|
messageType: "file";
|
|
@@ -3675,6 +3714,9 @@ export declare const IncomingMessageLayout: {
|
|
|
3675
3714
|
url: string;
|
|
3676
3715
|
type: string;
|
|
3677
3716
|
}) => void;
|
|
3717
|
+
onClickLink?: (params: {
|
|
3718
|
+
url: string;
|
|
3719
|
+
}) => void;
|
|
3678
3720
|
children?: ReactNode;
|
|
3679
3721
|
}) | ({
|
|
3680
3722
|
messageType: "multipleFiles";
|
|
@@ -3749,6 +3791,9 @@ export declare const IncomingMessageLayout: {
|
|
|
3749
3791
|
url: string;
|
|
3750
3792
|
type: string;
|
|
3751
3793
|
}) => void;
|
|
3794
|
+
onClickLink?: (params: {
|
|
3795
|
+
url: string;
|
|
3796
|
+
}) => void;
|
|
3752
3797
|
children?: ReactNode;
|
|
3753
3798
|
})) => ReactNode;
|
|
3754
3799
|
}) => null;
|
|
@@ -3980,7 +4025,7 @@ declare type MessageType_2 = OutgoingMessageProps['messageType'];
|
|
|
3980
4025
|
declare interface MessengerContextValue extends AIAgentContextValue {
|
|
3981
4026
|
rootElement: HTMLElement;
|
|
3982
4027
|
agentPreviewConfigs?: AgentPreviewConfigs;
|
|
3983
|
-
handlers
|
|
4028
|
+
handlers: ResolvedHandlers;
|
|
3984
4029
|
state: {
|
|
3985
4030
|
opened: boolean;
|
|
3986
4031
|
setOpened: (value: boolean) => void;
|
|
@@ -4502,6 +4547,12 @@ declare type ReleaseDisabledByValue =
|
|
|
4502
4547
|
| 'reconnecting'
|
|
4503
4548
|
| 'handoff_pending';
|
|
4504
4549
|
|
|
4550
|
+
declare interface ResolvedHandlers extends AgentClientHandlers {
|
|
4551
|
+
onClickLink: (params: {
|
|
4552
|
+
url: string;
|
|
4553
|
+
}) => void;
|
|
4554
|
+
}
|
|
4555
|
+
|
|
4505
4556
|
declare type SBUFoundationProps<T = NonNullable<unknown>> = T & {
|
|
4506
4557
|
className?: string;
|
|
4507
4558
|
children?: ReactNode;
|