@sendbird/ai-agent-messenger-react 1.18.0 → 1.19.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/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@sendbird/chat");const e=require("./cjs/DXUsaL2W.cjs");require("react");exports.AgentProviderContainer=e.AgentProviderContainer;exports.AgentUIProviderContainer=e.AgentUIProviderContainer;exports.AnonymousSessionInfo=e.AnonymousSessionInfo;exports.CSATType=e.CSATType;exports.Commands=e.DispatcherCommands;exports.Conversation=e.Conversation;exports.ConversationContext=e.ConversationContext;exports.ConversationContextProvider=e.ConversationContextProvider;exports.ConversationHeaderLayout=e.ConversationHeaderLayout;exports.ConversationLayout=e.ConversationLayout;exports.ConversationList=e.ConversationList;exports.ConversationListContext=e.ConversationListContext;exports.ConversationListContextProvider=e.ConversationListContextProvider;exports.ConversationListHeaderLayout=e.ConversationListHeaderLayout;exports.ConversationListItemLayout=e.ConversationListItemLayout;exports.ConversationListLayout=e.ConversationListLayout;exports.DefaultMessenger=e.DefaultMessenger;exports.FixedMessenger=e.FixedMessenger;exports.IncomingMessageLayout=e.IncomingMessageLayout;exports.LauncherBase=e.LauncherBase;exports.LogLevel=e.LogLevel;exports.ManualSessionInfo=e.ManualSessionInfo;exports.MessageListUILayout=e.MessageListUILayout;exports.MessageLogs=e.MessageLogs;exports.OutgoingMessageLayout=e.OutgoingMessageLayout;exports.PlaceholderLayout=e.PlaceholderLayout;exports.SystemMessageLayout=e.SystemMessageLayout;exports.messengerDispatcher=e.messengerDispatcher;exports.useConversationContext=e.useConversationContext;exports.useConversationListContext=e.useConversationListContext;exports.useLocalizationContext=e.useLocalizationContext;exports.useMessengerContext=e.useMessengerContext;exports.useMessengerSessionContext=e.useMessengerSessionContext;exports.useRefreshActiveChannel=e.useRefreshActiveChannel;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@sendbird/chat");const e=require("./cjs/6Zr7tYRh.cjs");require("react");exports.AgentProviderContainer=e.AgentProviderContainer;exports.AgentUIProviderContainer=e.AgentUIProviderContainer;exports.AnonymousSessionInfo=e.AnonymousSessionInfo;exports.CSATType=e.CSATType;exports.Commands=e.DispatcherCommands;exports.Conversation=e.Conversation;exports.ConversationContext=e.ConversationContext;exports.ConversationContextProvider=e.ConversationContextProvider;exports.ConversationHeaderLayout=e.ConversationHeaderLayout;exports.ConversationLayout=e.ConversationLayout;exports.ConversationList=e.ConversationList;exports.ConversationListContext=e.ConversationListContext;exports.ConversationListContextProvider=e.ConversationListContextProvider;exports.ConversationListHeaderLayout=e.ConversationListHeaderLayout;exports.ConversationListItemLayout=e.ConversationListItemLayout;exports.ConversationListLayout=e.ConversationListLayout;exports.DefaultMessenger=e.DefaultMessenger;exports.FixedMessenger=e.FixedMessenger;exports.IncomingMessageLayout=e.IncomingMessageLayout;exports.LauncherBase=e.LauncherBase;exports.LogLevel=e.LogLevel;exports.ManualSessionInfo=e.ManualSessionInfo;exports.MessageListUILayout=e.MessageListUILayout;exports.MessageLogs=e.MessageLogs;exports.OutgoingMessageLayout=e.OutgoingMessageLayout;exports.PlaceholderLayout=e.PlaceholderLayout;exports.SystemMessageLayout=e.SystemMessageLayout;exports.messengerDispatcher=e.messengerDispatcher;exports.useConversationContext=e.useConversationContext;exports.useConversationListContext=e.useConversationListContext;exports.useLocalizationContext=e.useLocalizationContext;exports.useMessengerContext=e.useMessengerContext;exports.useMessengerSessionContext=e.useMessengerSessionContext;exports.useRefreshActiveChannel=e.useRefreshActiveChannel;
package/dist/index.d.ts CHANGED
@@ -931,18 +931,21 @@ declare interface CommandPayloads {
931
931
  [CommandType.ConversationClose]: undefined | CloseConversationCommandParams;
932
932
  [CommandType.MessengerSettingsUpdated]: MessengerSettingsUpdatedParams;
933
933
  [CommandType.ActiveChannelUpdated]: ActiveChannelUpdatedParams;
934
+ [CommandType.AnonymousSessionTokenExpired]: undefined;
934
935
  }
935
936
 
936
937
  export declare const Commands = {
937
938
  CloseConversation: (params?: CloseConversationCommandParams) => new CloseConversationCommand(params),
938
939
  MessengerSettingsUpdated: (params: MessengerSettingsUpdatedParams) => new MessengerSettingsUpdatedCommand(params),
939
940
  ActiveChannelUpdated: (params: ActiveChannelUpdatedParams) => new ActiveChannelUpdatedCommand(params),
941
+ AnonymousSessionTokenExpired: () => new AnonymousSessionTokenExpiredCommand(),
940
942
  };
941
943
 
942
944
  declare enum CommandType {
943
945
  ConversationClose = 'conv.close',
944
946
  MessengerSettingsUpdated = 'messenger.settings.updated',
945
947
  ActiveChannelUpdated = 'active.channel.updated',
948
+ AnonymousSessionTokenExpired = 'anon.token.expired',
946
949
  }
947
950
 
948
951
  declare interface ContextObject {
@@ -2983,7 +2986,11 @@ declare class MessengerDispatcher implements Dispatcher {
2983
2986
  if (callbacks) {
2984
2987
  this.logger.debug(`messenger.dispatcher: dispatching command: ${command.type}`, command.payload);
2985
2988
 
2986
- const callbackPromises = callbacks.map((callback) => callback(command.payload));
2989
+ // Type safety is enforced at subscribe/unsubscribe via generics.
2990
+ // Here, the type is erased because `command.type` is a general CommandType, not a specific literal.
2991
+ const callbackPromises = callbacks.map((callback) =>
2992
+ (callback as (payload: unknown) => void | Promise<void>)(command.payload),
2993
+ );
2987
2994
  await Promise.all(callbackPromises).catch((error) => {
2988
2995
  this.logger.error(`messenger.dispatcher: error in callback for command: ${command.type}`, error);
2989
2996
  });
@@ -3643,6 +3650,7 @@ declare type SystemMessageUnion =
3643
3650
  csatExpireAt?: number;
3644
3651
  isResolvedWhenDeterminedByUser?: boolean;
3645
3652
  onSubmitCSAT: (params: CSATSubmitParams) => Promise<void>;
3653
+ onScrollToBottom?: () => void;
3646
3654
  }>;
3647
3655
 
3648
3656
  declare type TextField = {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "@sendbird/chat";
2
- import { a as t, b as n, d as i, C as r, D as C, f as L, g as u, h as v, i as g, j as y, k as x, l as M, n as d, o as m, p as l, q as I, r as c, F as f, I as h, L as p, s as P, M as S, t as A, u as D, O as z, P as B, S as F, v as H, w as O, x as T, y as U, z as b, B as j, E as k } from "./es/Dzr6sXdx.js";
2
+ import { a as t, b as n, d as i, C as r, D as C, f as L, g as u, h as v, i as g, j as y, k as x, l as M, n as d, o as m, p as l, q as I, r as c, F as f, I as h, L as p, s as P, M as S, t as A, u as D, O as z, P as B, S as F, v as H, w as O, x as T, y as U, z as b, B as j, E as k } from "./es/DbmXdAKl.js";
3
3
  import "react";
4
4
  export {
5
5
  t as AgentProviderContainer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendbird/ai-agent-messenger-react",
3
- "version": "1.18.0",
3
+ "version": "1.19.1",
4
4
  "description": "Delight AI Agent Messenger for React",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -44,9 +44,9 @@
44
44
  "react-dom": "^19.0.0",
45
45
  "strip-json-comments": "^5.0.1",
46
46
  "styled-components": "^6.1.15",
47
- "@sendbird/ai-agent-core": "1.18.0",
48
- "@sendbird/vite-tools": "0.0.1",
49
- "@sendbird/config-editor": "0.1.0"
47
+ "@sendbird/ai-agent-core": "1.19.1",
48
+ "@sendbird/config-editor": "0.1.0",
49
+ "@sendbird/vite-tools": "0.0.1"
50
50
  },
51
51
  "msw": {
52
52
  "workerDirectory": [