@realtimexsco/live-chat 1.4.10 → 1.4.12

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.d.ts CHANGED
@@ -95,8 +95,8 @@ interface IAttachment {
95
95
  * Named API targets for selective query-param injection.
96
96
  * Consumers pick which endpoints receive `queryParams`.
97
97
  */
98
- declare const CHAT_GET_API_KEYS: readonly ["users", "conversations", "conversationInfo", "messages", "pinnedMessages", "starredMessages", "searchMessages", "searchMessagesContext"];
99
- declare const CHAT_API_KEYS: readonly ["all", "get", "login", "users", "conversations", "conversationInfo", "messages", "pinnedMessages", "starredMessages", "searchMessages", "searchMessagesContext", "createGroup", "updateGroupPermissions", "updateGroupInfo", "manageMembers", "manageAdmins", "blockUnblock", "presignedUrls"];
98
+ declare const CHAT_GET_API_KEYS: readonly ["users", "conversations", "conversationInfo", "messages", "pinnedMessages", "starredMessages", "searchMessages", "searchMessagesContext", "effectiveSettings"];
99
+ declare const CHAT_API_KEYS: readonly ["all", "get", "login", "users", "conversations", "conversationInfo", "messages", "pinnedMessages", "starredMessages", "searchMessages", "searchMessagesContext", "effectiveSettings", "createGroup", "updateGroupPermissions", "updateGroupInfo", "manageMembers", "manageAdmins", "blockUnblock", "presignedUrls"];
100
100
  type ChatApiKey = (typeof CHAT_API_KEYS)[number];
101
101
  type ChatGetApiKey = (typeof CHAT_GET_API_KEYS)[number];
102
102
  type ChatQueryParamValue = string | number | boolean;
@@ -105,6 +105,29 @@ type ChatQueryParamsByApi = Partial<Record<Exclude<ChatApiKey, "all" | "get">, C
105
105
  /** Match an axios request URL to a named API key (first match wins). */
106
106
  declare function resolveChatApiKey(url?: string): Exclude<ChatApiKey, "all" | "get"> | null;
107
107
 
108
+ type ChatApiVersionKey = "v1" | "v2";
109
+ interface ChatApiVersionConfig {
110
+ /** Primary chat REST API version path segment. Default: `v1`. */
111
+ v1?: string;
112
+ /** Secondary API version path segment (e.g. push). Default: `v2`. */
113
+ v2?: string;
114
+ }
115
+ /**
116
+ * Strip a trailing `/v1`, `/v2`, … from the configured base URL.
117
+ * `https://realtimex.softwareco.com/api/v1` → `https://realtimex.softwareco.com/api`
118
+ */
119
+ declare const resolveApiRoot: (baseUrl?: string) => string;
120
+ declare const buildVersionedApiUrl: (path: string, options?: {
121
+ version?: string;
122
+ baseUrl?: string;
123
+ /** Which configured version slot to use. Default: `v1`. */
124
+ service?: ChatApiVersionKey;
125
+ }) => string;
126
+ declare const setChatApiVersions: (config?: ChatApiVersionConfig | null) => void;
127
+ declare const getChatApiVersions: () => Readonly<Record<ChatApiVersionKey, string>>;
128
+ /** Sets the secondary (`v2`) API version slot. */
129
+ declare const setChatPushApiVersion: (version: string) => void;
130
+
108
131
  declare const setChatClientId: (id: string) => void;
109
132
  declare const setChatAccessToken: (token: string) => void;
110
133
  declare const setChatBaseURL: (url: string) => void;
@@ -121,7 +144,7 @@ declare const getChatQueryParams: () => {
121
144
  * Use `['all']` for every method, or specific keys like `['conversations']`.
122
145
  */
123
146
  declare const setChatQueryParamApis: (apis?: ChatApiKey[] | null) => void;
124
- declare const getChatQueryParamApis: () => ("all" | "get" | "login" | "users" | "conversations" | "conversationInfo" | "messages" | "pinnedMessages" | "starredMessages" | "searchMessages" | "searchMessagesContext" | "createGroup" | "updateGroupPermissions" | "updateGroupInfo" | "manageMembers" | "manageAdmins" | "blockUnblock" | "presignedUrls")[];
147
+ declare const getChatQueryParamApis: () => ("all" | "get" | "login" | "users" | "conversations" | "conversationInfo" | "messages" | "pinnedMessages" | "starredMessages" | "searchMessages" | "searchMessagesContext" | "effectiveSettings" | "createGroup" | "updateGroupPermissions" | "updateGroupInfo" | "manageMembers" | "manageAdmins" | "blockUnblock" | "presignedUrls")[];
125
148
  /** Per-API query params (override / extend shared params for that endpoint). */
126
149
  declare const setChatQueryParamsByApi: (byApi?: ChatQueryParamsByApi | null) => void;
127
150
  declare const getChatQueryParamsByApi: () => {
@@ -134,6 +157,7 @@ declare const getChatQueryParamsByApi: () => {
134
157
  starredMessages?: Record<string, string> | undefined;
135
158
  searchMessages?: Record<string, string> | undefined;
136
159
  searchMessagesContext?: Record<string, string> | undefined;
160
+ effectiveSettings?: Record<string, string> | undefined;
137
161
  createGroup?: Record<string, string> | undefined;
138
162
  updateGroupPermissions?: Record<string, string> | undefined;
139
163
  updateGroupInfo?: Record<string, string> | undefined;
@@ -143,30 +167,6 @@ declare const getChatQueryParamsByApi: () => {
143
167
  presignedUrls?: Record<string, string> | undefined;
144
168
  };
145
169
 
146
- interface ChatForwardItem {
147
- message: IMessage;
148
- attachmentId?: string;
149
- }
150
-
151
- interface ChatLayoutConfig {
152
- /** Sidebar with profile + conversation list */
153
- sidebar?: boolean;
154
- /** Logged-in user profile block at top of sidebar */
155
- loggedUserDetails?: boolean;
156
- /** Conversation list in sidebar */
157
- channelList?: boolean;
158
- /** Active channel header (name, actions, search) */
159
- header?: boolean;
160
- /** Scrollable message area */
161
- messageList?: boolean;
162
- /** Message composer / input box */
163
- input?: boolean;
164
- /** Forward message modal */
165
- forwardModal?: boolean;
166
- }
167
- declare const defaultChatLayoutConfig: Required<ChatLayoutConfig>;
168
- declare const mergeChatLayoutConfig: (config?: ChatLayoutConfig) => Required<ChatLayoutConfig>;
169
-
170
170
  interface IUser {
171
171
  _id: string;
172
172
  id?: string;
@@ -453,6 +453,98 @@ interface SocketState {
453
453
  interface AppStoreState extends SocketState, AuthState {
454
454
  }
455
455
 
456
+ interface EffectiveCallsSettings {
457
+ enabled: boolean;
458
+ configured: boolean;
459
+ }
460
+ interface EffectiveGroupPolicy {
461
+ defaults: GroupPermissions;
462
+ locked: Array<keyof GroupPermissions | string>;
463
+ }
464
+ interface EffectiveMessageTimers {
465
+ dmEditMinutes: number;
466
+ dmDeleteMinutes: number;
467
+ groupEditMinutes: number;
468
+ groupDeleteMinutes: number;
469
+ }
470
+ interface EffectiveAttachmentsSettings {
471
+ enabled: boolean;
472
+ maxFileSizeMB: number;
473
+ allowedMimeTypes: string[];
474
+ maxAttachmentsPerMessage: number;
475
+ }
476
+ interface EffectiveSettings {
477
+ pushNotificationEnabled: boolean;
478
+ videoCallEnabled: boolean;
479
+ audioCallEnabled: boolean;
480
+ blockUsersEnabled: boolean;
481
+ calls: EffectiveCallsSettings;
482
+ groupPolicy: EffectiveGroupPolicy;
483
+ messageTimers: EffectiveMessageTimers;
484
+ attachments: EffectiveAttachmentsSettings;
485
+ maxAdminsPerGroup: number;
486
+ maxParticipantsPerGroup: number;
487
+ maxPinnedMessagesPerConversation: number;
488
+ groupCreationEnabled: boolean;
489
+ }
490
+ declare const DEFAULT_EFFECTIVE_SETTINGS: EffectiveSettings;
491
+ declare const ADMIN_PERMISSION_DENIED_MESSAGE = "This feature is disabled by your administrator.";
492
+ declare const CALLS_NOT_CONFIGURED_MESSAGE = "Calls are not configured. Please contact your administrator.";
493
+
494
+ declare const fetchEffectiveSettings: () => Promise<EffectiveSettings>;
495
+
496
+ interface PushNotificationToggleRenderProps {
497
+ label: string;
498
+ description: string;
499
+ checked: boolean;
500
+ disabled: boolean;
501
+ loading: boolean;
502
+ permissionBlocked: boolean;
503
+ error: string | null;
504
+ onCheckedChange: (checked: boolean) => void;
505
+ }
506
+ interface PushNotificationToggleProps {
507
+ className?: string;
508
+ label?: string;
509
+ description?: string;
510
+ /** Build your own row UI while keeping package push logic. */
511
+ children?: (props: PushNotificationToggleRenderProps) => ReactNode;
512
+ }
513
+ /**
514
+ * Drop-in per-user push notification switch.
515
+ *
516
+ * Always visible when the browser supports push. If workspace admins disable
517
+ * push via effective settings, the switch stays visible but disabled with a tooltip.
518
+ *
519
+ * On: prompts for browser permission and registers this device.
520
+ * Off: unregisters this device.
521
+ */
522
+ declare const PushNotificationToggle: ({ className, label, description, children, }: PushNotificationToggleProps) => React.JSX.Element | null;
523
+
524
+ interface ChatForwardItem {
525
+ message: IMessage;
526
+ attachmentId?: string;
527
+ }
528
+
529
+ interface ChatLayoutConfig {
530
+ /** Sidebar with profile + conversation list */
531
+ sidebar?: boolean;
532
+ /** Logged-in user profile block at top of sidebar */
533
+ loggedUserDetails?: boolean;
534
+ /** Conversation list in sidebar */
535
+ channelList?: boolean;
536
+ /** Active channel header (name, actions, search) */
537
+ header?: boolean;
538
+ /** Scrollable message area */
539
+ messageList?: boolean;
540
+ /** Message composer / input box */
541
+ input?: boolean;
542
+ /** Forward message modal */
543
+ forwardModal?: boolean;
544
+ }
545
+ declare const defaultChatLayoutConfig: Required<ChatLayoutConfig>;
546
+ declare const mergeChatLayoutConfig: (config?: ChatLayoutConfig) => Required<ChatLayoutConfig>;
547
+
456
548
  /** Context passed to phone / video call handlers */
457
549
  interface ChatCallContext {
458
550
  activeChannel: IChannel;
@@ -548,6 +640,33 @@ interface LoggedUserDetailsSlotProps {
548
640
  searchQuery?: string;
549
641
  setSearchQuery?: (val: string) => void;
550
642
  }
643
+ /** Full settings button + modal (replace for a completely custom account settings UI). */
644
+ interface LoggedUserSettingsDialogSlotProps {
645
+ loggedUserDetails: any;
646
+ open?: boolean;
647
+ onOpenChange?: (open: boolean) => void;
648
+ title?: string;
649
+ showProfile?: boolean;
650
+ showPushToggle?: boolean;
651
+ className?: string;
652
+ }
653
+ /** Settings gear button only — used when customizing the dialog shell. */
654
+ interface LoggedUserSettingsTriggerSlotProps {
655
+ onClick: () => void;
656
+ className?: string;
657
+ tooltip?: string;
658
+ ariaLabel?: string;
659
+ }
660
+ /** Modal body — profile, push toggle, or your own settings rows. */
661
+ interface LoggedUserSettingsContentSlotProps {
662
+ loggedUserDetails: any;
663
+ user: IUser;
664
+ onClose?: () => void;
665
+ title?: string;
666
+ showProfile?: boolean;
667
+ showPushToggle?: boolean;
668
+ className?: string;
669
+ }
551
670
  interface ActiveChannelMessagesSlotProps {
552
671
  activeChannel: IChannel | null;
553
672
  loggedUserId?: string;
@@ -758,6 +877,12 @@ interface ChatClassNames {
758
877
  mainPanel?: string;
759
878
  sidebar?: string;
760
879
  loggedUserDetails?: string;
880
+ loggedUserSettingsTrigger?: string;
881
+ loggedUserSettingsDialog?: string;
882
+ loggedUserSettingsHeader?: string;
883
+ loggedUserSettingsContent?: string;
884
+ loggedUserSettingsAvatar?: string;
885
+ pushNotificationToggle?: string;
761
886
  channelList?: string;
762
887
  channelListItem?: string;
763
888
  channelListItemActive?: string;
@@ -788,6 +913,10 @@ interface ChatComponents {
788
913
  /** Case 1: replace the entire chat UI shell */
789
914
  ChatLayout?: React__default.ComponentType<ChatLayoutSlotProps>;
790
915
  LoggedUserDetails?: React__default.ComponentType<LoggedUserDetailsSlotProps>;
916
+ LoggedUserSettingsDialog?: React__default.ComponentType<LoggedUserSettingsDialogSlotProps>;
917
+ LoggedUserSettingsTrigger?: React__default.ComponentType<LoggedUserSettingsTriggerSlotProps>;
918
+ LoggedUserSettingsContent?: React__default.ComponentType<LoggedUserSettingsContentSlotProps>;
919
+ PushNotificationToggle?: React__default.ComponentType<PushNotificationToggleProps>;
791
920
  ChannelList?: React__default.ComponentType<ChannelListSlotProps>;
792
921
  ChannelListItem?: React__default.ComponentType<ChannelListItemSlotProps>;
793
922
  ChannelHeader?: React__default.ComponentType<ChannelHeaderSlotProps>;
@@ -875,13 +1004,19 @@ interface ChatProps {
875
1004
  queryParamApis?: ChatApiKey[];
876
1005
  /** Different query params per API key */
877
1006
  queryParamsByApi?: ChatQueryParamsByApi;
1007
+ /**
1008
+ * API versions after `/api`.
1009
+ * Example: `{ v1: 'v1', v2: 'v2' }`.
1010
+ * `v1` is also parsed from `apiUrl` when it ends with `/v1`, `/v2`, etc.
1011
+ */
1012
+ apiVersions?: ChatApiVersionConfig;
878
1013
  channelsData?: IChannel[];
879
1014
  messagesData?: Record<string, IMessage[]>;
880
1015
  onMessageReceived?: (message: any) => void;
881
1016
  onSocketConnected?: (socketId: string) => void;
882
1017
  onSocketError?: (error: string) => void;
883
1018
  }
884
- declare const Chat: ({ children, onSendMessage, client, theme, uiConfig, themeColor, accessToken, loggedUserDetails, apiUrl, socketUrl, queryParams, queryParamApis, queryParamsByApi, channelsData, messagesData, onMessageReceived, onSocketConnected, onSocketError }: ChatProps) => React__default.JSX.Element;
1019
+ declare const Chat: ({ children, onSendMessage, client, theme, uiConfig, themeColor, accessToken, loggedUserDetails, apiUrl, socketUrl, queryParams, queryParamApis, queryParamsByApi, apiVersions, channelsData, messagesData, onMessageReceived, onSocketConnected, onSocketError }: ChatProps) => React__default.JSX.Element;
885
1020
 
886
1021
  type ChatColorMode = 'light' | 'dark';
887
1022
 
@@ -966,6 +1101,8 @@ interface ChatMainProps {
966
1101
  * pinnedMessages, starredMessages, searchMessages, searchMessagesContext
967
1102
  */
968
1103
  queryParamsByApi?: ChatQueryParamsByApi;
1104
+ /** API versions after `/api` — e.g. `{ v1: 'v1', v2: 'v2' }`. */
1105
+ apiVersions?: ChatApiVersionConfig;
969
1106
  themeColor?: string;
970
1107
  theme?: string;
971
1108
  uiConfig?: UIConfig;
@@ -997,7 +1134,7 @@ interface ChatMainProps {
997
1134
  /** Extra classes on the viewport wrapper */
998
1135
  viewportClassName?: string;
999
1136
  }
1000
- declare const ChatMain: ({ clientId, loggedUserDetails, accessToken, apiUrl, socketUrl, queryParams, queryParamApis, queryParamsByApi, themeColor, theme, uiConfig, components, classNames, features, layout, colorMode, defaultColorMode, onColorModeChange, showColorModeToggle, locale, timeZone, hour12, defaultLocale, defaultTimeZone, defaultHour12, onDateTimePreferencesChange, showDateTimeSettings, error, info, onErrorDismiss, onInfoDismiss, viewportHeight, viewportClassName, }: ChatMainProps) => React__default.JSX.Element;
1137
+ declare const ChatMain: ({ clientId, loggedUserDetails, accessToken, apiUrl, socketUrl, queryParams, queryParamApis, queryParamsByApi, apiVersions, themeColor, theme, uiConfig, components, classNames, features, layout, colorMode, defaultColorMode, onColorModeChange, showColorModeToggle, locale, timeZone, hour12, defaultLocale, defaultTimeZone, defaultHour12, onDateTimePreferencesChange, showDateTimeSettings, error, info, onErrorDismiss, onInfoDismiss, viewportHeight, viewportClassName, }: ChatMainProps) => React__default.JSX.Element;
1001
1138
 
1002
1139
  declare const useStore: zustand.UseBoundStore<Omit<zustand.StoreApi<AppStoreState>, "setState" | "persist"> & {
1003
1140
  setState(partial: AppStoreState | Partial<AppStoreState> | ((state: AppStoreState) => AppStoreState | Partial<AppStoreState>), replace?: false | undefined): unknown;
@@ -1297,6 +1434,14 @@ interface LoggedUserDetailsProps {
1297
1434
  }
1298
1435
  declare const LoggedUserDetails: ({ loggedUserDetails, onUserSelect, isCreateModalOpen, setIsCreateModalOpen, searchQuery, setSearchQuery, }: LoggedUserDetailsProps) => React.JSX.Element;
1299
1436
 
1437
+ declare const LoggedUserSettingsDialog: ({ loggedUserDetails, open: controlledOpen, onOpenChange: controlledOnOpenChange, title, showProfile, showPushToggle, className, }: LoggedUserSettingsDialogSlotProps) => React.JSX.Element;
1438
+
1439
+ declare const LoggedUserSettingsTrigger: ({ onClick, className, tooltip, ariaLabel, }: LoggedUserSettingsTriggerSlotProps) => React.JSX.Element;
1440
+
1441
+ declare const LoggedUserSettingsContent: ({ user, title, showProfile, showPushToggle, className, }: LoggedUserSettingsContentSlotProps) => React.JSX.Element;
1442
+
1443
+ declare const buildLoggedUserProfile: (loggedUserDetails: IUser | null | undefined) => IUser;
1444
+
1300
1445
  interface ForwardModalProps {
1301
1446
  isOpen: boolean;
1302
1447
  onClose: () => void;
@@ -1354,7 +1499,7 @@ declare const useChatController: () => {
1354
1499
  declare function resolveApiUrl(apiUrl?: string): string;
1355
1500
  /**
1356
1501
  * Socket.io connects to the host origin with path `/connection`.
1357
- * Prefer explicit `socketUrl`; otherwise derive from `apiUrl` by stripping `/api/v1`.
1502
+ * Prefer explicit `socketUrl`; otherwise derive from `apiUrl` by stripping `/api/vN`.
1358
1503
  */
1359
1504
  declare function resolveSocketUrl(socketUrl?: string, apiUrl?: string): string;
1360
1505
 
@@ -1537,7 +1682,7 @@ declare function useChatAlerts(): ChatAlertsContextValue;
1537
1682
 
1538
1683
  declare const buttonVariants: (props?: ({
1539
1684
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
1540
- size?: "xs" | "sm" | "lg" | "default" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
1685
+ size?: "sm" | "default" | "xs" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
1541
1686
  } & class_variance_authority_types.ClassProp) | undefined) => string;
1542
1687
  declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
1543
1688
  asChild?: boolean;
@@ -1621,21 +1766,6 @@ interface UsePushNotifications extends PushNotificationsState {
1621
1766
  */
1622
1767
  declare const usePushNotifications: () => UsePushNotifications;
1623
1768
 
1624
- interface PushNotificationToggleProps {
1625
- className?: string;
1626
- label?: string;
1627
- description?: string;
1628
- }
1629
- /**
1630
- * Drop-in per-user push notification switch. Renders nothing while push is
1631
- * unsupported by the browser, disabled by the workspace admins, or not yet
1632
- * configured on the backend — users only ever see a switch they can use.
1633
- *
1634
- * On: prompts for browser permission and registers this device.
1635
- * Off: unregisters this device.
1636
- */
1637
- declare const PushNotificationToggle: ({ className, label, description, }: PushNotificationToggleProps) => React.JSX.Element | null;
1638
-
1639
1769
  interface ForegroundPushPayload {
1640
1770
  title?: string;
1641
1771
  body?: string;
@@ -1689,4 +1819,33 @@ interface NotificationClickBridgeOptions {
1689
1819
  declare const consumePendingOpenFromPushCache: () => Promise<PushOpenRequest | null>;
1690
1820
  declare const installNotificationClickBridge: (options?: NotificationClickBridgeOptions) => (() => void);
1691
1821
 
1692
- export { type ActiveChannelMessagesSlotProps, type AdminsDrawerSlotProps, type AttachmentsDrawerSlotProps, type AvatarSlotProps, CHAT_API_KEYS, CHAT_GET_API_KEYS, Calendar, CalendarDayButton, Channel, type ChannelDetailsDrawerSlotProps, ChannelHeaderView as ChannelHeader, type ChannelHeaderSlotProps, ChannelListView as ChannelList, ChannelListItem, type ChannelListItemSlotProps, type ChannelListSlotProps, type ChannelMessageBoxSlotProps, Chat, type ChatActionModalSlotProps, ChatAlertsProvider, type ChatApiKey, ChatAvatar, type ChatCallContext, type ChatClassNames, type ChatColorMode, type ChatComponents, type ChatCustomizationConfig, ChatCustomizationProvider, ChatDateJumpMenu, type ChatDateTimePreferences, type ChatFeatures, type ChatGetApiKey, ChatLayout, type ChatLayoutConfig, type ChatLayoutSlotProps, ChatLocaleProvider, ChatMain, type ChatPanelAlertsSlotProps, type ChatQueryParams, type ChatQueryParamsByApi, ChatThemeProvider, ChatViewport, type ChatViewportHeight, DefaultChannelListItem, DefaultChatAvatar, DefaultChatLayout, ForegroundPushBridge, type ForegroundPushBridgeProps, type ForegroundPushPayload, ForwardModalView as ForwardModal, type ForwardModalSlotProps, HeaderCallActions, type HeaderCallActionsSlotProps, type HeaderLeftSideSlotProps, type HeaderRightSideSlotProps, type HeaderSearchOverlaySlotProps, type IAttachment, type IChannel, type IDMDelete, type IDMEditMessage, type IDMForward, type IDMMessage, type IDMPin, type IDMReaction, type IDMRead, type IDMStar, type IDMTyping, type IDMUnstar, type IMessage, type ISocketConfig, type JumpToPreset, LoggedUserDetails, type LoggedUserDetailsSlotProps, type MembersDrawerSlotProps, type MessageAttachmentsSlotProps, ChannelMessageBoxView as MessageInput, MessageItemView as MessageItem, type MessageItemSlotProps, ActiveChannelMessagesView as MessageList, type MessageReactionsSlotProps, type MessageReplySnippetSlotProps, type MessageStatusSlotProps, type MessageToolbarSlotProps, NOTIFICATION_CLICK_SW_TYPE, type NotificationClickBridgeOptions, OPEN_CONVERSATION_EVENT, PUSH_BROADCAST_CHANNEL, PUSH_CHANGED_EVENT, PUSH_DATA_CACHE_NAME, type PendingJump, type PermissionDrawerSlotProps, type PhoneCallButtonSlotProps, type PinnedMessagesDrawerSlotProps, type PushConfig, PushNotificationToggle, type PushNotificationToggleProps, type PushNotificationsState, type PushOpenRequest, type PushPreference, type StarredMessagesDrawerSlotProps, type UIConfig, type UsePushNotifications, type VideoCallButtonSlotProps, apiGetPushConfig, apiGetPushPreference, apiRegisterPushToken, apiRemovePushToken, apiUpdatePushPreference, buildChannelFromPushRequest, capitalizeFirst, clampJumpDate, consumePendingOpenConversation, consumePendingOpenFromPushCache, consumePendingOpenRequest, ChatMain as default, defaultChatClassNames, defaultChatComponents, defaultChatFeatures, defaultChatLayoutConfig, disablePushOnThisDevice, downloadFile, enablePushOnThisDevice, getChatBaseUrl, getChatQueryParamApis, getChatQueryParams, getChatQueryParamsByApi, getChatSocketUrl, getFirstAndLastNameOneCharacter, getResponsiveWidth, getSocketConfig, getStoredPushToken, installNotificationClickBridge, isEmpty, isPushSupported, mergeChatCustomization, mergeChatLayoutConfig, onForegroundPush, packageDefaultComponents, peekPendingOpenConversation, peekPendingOpenRequest, requestOpenConversation, resolveApiUrl, resolveChatApiKey, resolveConversationIdFromPushData, resolveJumpDateBounds, resolveJumpPreset, resolveJumpStep, resolveSocketUrl, setChatAccessToken, setChatBaseURL, setChatClientId, setChatQueryParamApis, setChatQueryParams, setChatQueryParamsByApi, setChatSocketUrl, showNotification, smoothScrollToMessage, socketService, startOfLocalDay, toDateInputValue, uniqueList, useChatAlerts, useChatContext, useChatController, useChatCustomization, useChatCustomizationOptional, useChatFeatures, useChatFeaturesOptional, useChatLocale, useStore as useChatStore, useChatTheme, usePushNotifications };
1822
+ interface CallFeatureGate {
1823
+ /** Feature should remain visible. */
1824
+ visible: boolean;
1825
+ /** Interaction allowed. */
1826
+ enabled: boolean;
1827
+ /** Hover / tooltip reason when disabled. */
1828
+ disabledReason: string | null;
1829
+ }
1830
+ interface ChatEffectiveSettingsContextValue {
1831
+ settings: EffectiveSettings;
1832
+ loading: boolean;
1833
+ error: string | null;
1834
+ refresh: () => Promise<void>;
1835
+ isGroupPermissionLocked: (key: keyof GroupPermissions) => boolean;
1836
+ getAudioCallGate: () => CallFeatureGate;
1837
+ getVideoCallGate: () => CallFeatureGate;
1838
+ getPushNotificationGate: () => CallFeatureGate;
1839
+ getBlockUsersGate: () => CallFeatureGate;
1840
+ getAttachmentsGate: () => CallFeatureGate;
1841
+ getGroupCreationGate: () => CallFeatureGate;
1842
+ }
1843
+ declare function ChatEffectiveSettingsProvider({ children, enabled, }: {
1844
+ children: React__default.ReactNode;
1845
+ /** Fetch only after chat session credentials are ready. */
1846
+ enabled?: boolean;
1847
+ }): React__default.JSX.Element;
1848
+ declare function useEffectiveSettings(): ChatEffectiveSettingsContextValue;
1849
+ declare function useEffectiveSettingsOptional(): ChatEffectiveSettingsContextValue;
1850
+
1851
+ export { ADMIN_PERMISSION_DENIED_MESSAGE, type ActiveChannelMessagesSlotProps, type AdminsDrawerSlotProps, type AttachmentsDrawerSlotProps, type AvatarSlotProps, CALLS_NOT_CONFIGURED_MESSAGE, CHAT_API_KEYS, CHAT_GET_API_KEYS, Calendar, CalendarDayButton, Channel, type ChannelDetailsDrawerSlotProps, ChannelHeaderView as ChannelHeader, type ChannelHeaderSlotProps, ChannelListView as ChannelList, ChannelListItem, type ChannelListItemSlotProps, type ChannelListSlotProps, type ChannelMessageBoxSlotProps, Chat, type ChatActionModalSlotProps, ChatAlertsProvider, type ChatApiKey, type ChatApiVersionConfig, type ChatApiVersionKey, ChatAvatar, type ChatCallContext, type ChatClassNames, type ChatColorMode, type ChatComponents, type ChatCustomizationConfig, ChatCustomizationProvider, ChatDateJumpMenu, type ChatDateTimePreferences, ChatEffectiveSettingsProvider, type ChatFeatures, type ChatGetApiKey, ChatLayout, type ChatLayoutConfig, type ChatLayoutSlotProps, ChatLocaleProvider, ChatMain, type ChatPanelAlertsSlotProps, type ChatQueryParams, type ChatQueryParamsByApi, ChatThemeProvider, ChatViewport, type ChatViewportHeight, DEFAULT_EFFECTIVE_SETTINGS, DefaultChannelListItem, DefaultChatAvatar, DefaultChatLayout, type EffectiveAttachmentsSettings, type EffectiveCallsSettings, type EffectiveGroupPolicy, type EffectiveMessageTimers, type EffectiveSettings, ForegroundPushBridge, type ForegroundPushBridgeProps, type ForegroundPushPayload, ForwardModalView as ForwardModal, type ForwardModalSlotProps, HeaderCallActions, type HeaderCallActionsSlotProps, type HeaderLeftSideSlotProps, type HeaderRightSideSlotProps, type HeaderSearchOverlaySlotProps, type IAttachment, type IChannel, type IDMDelete, type IDMEditMessage, type IDMForward, type IDMMessage, type IDMPin, type IDMReaction, type IDMRead, type IDMStar, type IDMTyping, type IDMUnstar, type IMessage, type ISocketConfig, type JumpToPreset, LoggedUserDetails, type LoggedUserDetailsSlotProps, LoggedUserSettingsContent, type LoggedUserSettingsContentSlotProps, LoggedUserSettingsDialog, type LoggedUserSettingsDialogSlotProps, LoggedUserSettingsTrigger, type LoggedUserSettingsTriggerSlotProps, type MembersDrawerSlotProps, type MessageAttachmentsSlotProps, ChannelMessageBoxView as MessageInput, MessageItemView as MessageItem, type MessageItemSlotProps, ActiveChannelMessagesView as MessageList, type MessageReactionsSlotProps, type MessageReplySnippetSlotProps, type MessageStatusSlotProps, type MessageToolbarSlotProps, NOTIFICATION_CLICK_SW_TYPE, type NotificationClickBridgeOptions, OPEN_CONVERSATION_EVENT, PUSH_BROADCAST_CHANNEL, PUSH_CHANGED_EVENT, PUSH_DATA_CACHE_NAME, type PendingJump, type PermissionDrawerSlotProps, type PhoneCallButtonSlotProps, type PinnedMessagesDrawerSlotProps, type PushConfig, PushNotificationToggle, type PushNotificationToggleProps, type PushNotificationToggleRenderProps, type PushNotificationsState, type PushOpenRequest, type PushPreference, type StarredMessagesDrawerSlotProps, type UIConfig, type UsePushNotifications, type VideoCallButtonSlotProps, apiGetPushConfig, apiGetPushPreference, apiRegisterPushToken, apiRemovePushToken, apiUpdatePushPreference, buildChannelFromPushRequest, buildLoggedUserProfile, buildVersionedApiUrl, capitalizeFirst, clampJumpDate, consumePendingOpenConversation, consumePendingOpenFromPushCache, consumePendingOpenRequest, ChatMain as default, defaultChatClassNames, defaultChatComponents, defaultChatFeatures, defaultChatLayoutConfig, disablePushOnThisDevice, downloadFile, enablePushOnThisDevice, fetchEffectiveSettings, getChatApiVersions, getChatBaseUrl, getChatQueryParamApis, getChatQueryParams, getChatQueryParamsByApi, getChatSocketUrl, getFirstAndLastNameOneCharacter, getResponsiveWidth, getSocketConfig, getStoredPushToken, installNotificationClickBridge, isEmpty, isPushSupported, mergeChatCustomization, mergeChatLayoutConfig, onForegroundPush, packageDefaultComponents, peekPendingOpenConversation, peekPendingOpenRequest, requestOpenConversation, resolveApiRoot, resolveApiUrl, resolveChatApiKey, resolveConversationIdFromPushData, resolveJumpDateBounds, resolveJumpPreset, resolveJumpStep, resolveSocketUrl, setChatAccessToken, setChatApiVersions, setChatBaseURL, setChatClientId, setChatPushApiVersion, setChatQueryParamApis, setChatQueryParams, setChatQueryParamsByApi, setChatSocketUrl, showNotification, smoothScrollToMessage, socketService, startOfLocalDay, toDateInputValue, uniqueList, useChatAlerts, useChatContext, useChatController, useChatCustomization, useChatCustomizationOptional, useChatFeatures, useChatFeaturesOptional, useChatLocale, useStore as useChatStore, useChatTheme, useEffectiveSettings, useEffectiveSettingsOptional, usePushNotifications };