@@ -902,6 +902,79 @@ declare module "SendbirdUIKitGlobal" {
902
902
onCloseClick?: () => void;
903
903
}
904
904
905
+ /**
906
+ * NotificationChannel
907
+ */
908
+ export enum ActionType {
909
+ Web = "web",
910
+ Custom = "custom",
911
+ UIKit = "uikit"
912
+ }
913
+
914
+ export interface Action {
915
+ type: ActionType;
916
+ data: string;
917
+ customData?: string;
918
+ }
919
+
920
+ export type NotficationChannelStateInterface = {
921
+ uiState: 'loading' | 'initialized' | 'invalid';
922
+ allMessages: BaseMessage[];
923
+ currentNotificationChannel: GroupChannel;
924
+ hasMore: boolean;
925
+ messageListParams?: MessageListParams;
926
+ lastSeen?: number;
927
+ showDeleteModal: boolean;
928
+ messageToDelete?: BaseMessage;
929
+ }
930
+
931
+ export type NotficationChannelContextProps = {
932
+ channelUrl: string;
933
+ children?: React.ReactElement;
934
+ messageListParams?: MessageListParams;
935
+ lastSeen?: number;
936
+ handleWebAction?(event: React.SyntheticEvent, action: Action, message: BaseMessage);
937
+ handleCustomAction?(event: React.SyntheticEvent, action: Action, message: BaseMessage);
938
+ handlePredefinedAction?(event: React.SyntheticEvent, action: Action, message: BaseMessage);
939
+ };
940
+ export interface NotficationChannelProviderInterface extends NotficationChannelStateInterface,
941
+ NotficationChannelContextProps {
942
+ notificationsDispatcher: React.Dispatch<any>;
943
+ oldestMessageTimeStamp: number;
944
+ scrollRef: React.RefObject<HTMLDivElement>;
945
+ onFetchMore: (cb: any) => void;
946
+ }
947
+ export type RenderNotificationMessageProps = {
948
+ message: BaseMessage;
949
+ }
950
+
951
+ export type renderNotificationMessage = (props: RenderNotificationMessageProps) => React.ReactElement;
952
+ export type renderNotificationMessageHeader = (props: RenderNotificationMessageProps) => React.ReactElement;
953
+
954
+ export type NotificationChannelUIProps = {
955
+ isLoading?: boolean;
956
+ renderPlaceholderLoader?: () => React.ReactElement;
957
+ renderPlaceholderInvalid?: () => React.ReactElement;
958
+ renderPlaceholderEmpty?: () => React.ReactElement;
959
+ renderHeader?: () => React.ReactElement;
960
+ renderMessageHeader?: renderNotificationMessageHeader;
961
+ renderMessage?: renderNotificationMessage;
962
+ }
963
+
964
+ export type NotificationListProps = {
965
+ renderMessage?: renderNotificationMessage;
966
+ renderMessageHeader?: renderNotificationMessageHeader;
967
+ renderPlaceholderEmpty?: () => React.ReactElement;
968
+ }
969
+
970
+ export type NotificationMessageWrapProps = {
971
+ renderMessage?: renderNotificationMessage;
972
+ renderMessageHeader?: renderNotificationMessageHeader;
973
+ message: BaseMessage;
974
+ }
975
+
976
+ export interface NotificationChannelProps extends NotificationChannelUIProps, NotficationChannelContextProps {}
977
+
905
978
/**
906
979
* Thread
907
980
*/
@@ -1510,6 +1583,39 @@ declare module '@sendbird/uikit-react/MessageSearch/components/MessageSearchUI'
1510
1583
export default MessageSearchUI;
1511
1584
}
1512
1585
1586
+ /**
1587
+ * NotificationChannel
1588
+ */
1589
+ declare module '@sendbird/uikit-react/NotificationChannel' {
1590
+ import SendbirdUIKitGlobal from 'SendbirdUIKitGlobal';
1591
+ const NotificationChannel: React.FC<SendbirdUIKitGlobal.NotificationChannelProps>;
1592
+ export default NotificationChannel;
1593
+ }
1594
+
1595
+ declare module '@sendbird/uikit-react/NotificationChannel/context' {
1596
+ import SendbirdUIKitGlobal from 'SendbirdUIKitGlobal';
1597
+ export const useNotficationChannelContext: () => SendbirdUIKitGlobal.NotficationChannelProviderInterface;
1598
+ export const NotficationChannelProvider: React.FC<SendbirdUIKitGlobal.NotficationChannelContextProps>;
1599
+ }
1600
+
1601
+ declare module '@sendbird/uikit-react/NotificationChannel/components/NotificationChannelUI' {
1602
+ import SendbirdUIKitGlobal from 'SendbirdUIKitGlobal';
1603
+ const NotificationChannelUI: React.FC<SendbirdUIKitGlobal.NotificationChannelUIProps>;
1604
+ export default NotificationChannelUI;
1605
+ }
1606
+
1607
+ declare module '@sendbird/uikit-react/NotificationChannel/components/NotificationList' {
1608
+ import SendbirdUIKitGlobal from 'SendbirdUIKitGlobal';
1609
+ const NotificationList: React.FC<SendbirdUIKitGlobal.NotificationListProps>;
1610
+ export default NotificationList;
1611
+ }
1612
+
1613
+ declare module '@sendbird/uikit-react/NotificationChannel/components/NotificationMessageWrap' {
1614
+ import SendbirdUIKitGlobal from 'SendbirdUIKitGlobal';
1615
+ const NotificationMessageWrap: React.FC<SendbirdUIKitGlobal.NotificationMessageWrapProps>;
1616
+ export default NotificationMessageWrap;
1617
+ }
1618
+
1513
1619
/**
1514
1620
* Thread
1515
1621
*/
0 commit comments