@bcc-code/vue-bcc-chat-ui 7.3.0 → 7.3.2
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 +886 -11
- package/dist/style.css +1 -1
- package/dist/vue-bcc-chat-ui.js +4796 -4274
- package/dist/vue-bcc-chat-ui.js.map +1 -1
- package/package.json +4 -2
- package/dist/App.vue.d.ts +0 -4
- package/dist/FixtureApp.vue.d.ts +0 -4
- package/dist/auth.d.ts +0 -3
- package/dist/chat/accessToken.d.ts +0 -11
- package/dist/chat/avatar.d.ts +0 -3
- package/dist/chat/cacheScope.d.ts +0 -13
- package/dist/chat/client.d.ts +0 -7
- package/dist/chat/clipboardFiles.d.ts +0 -5
- package/dist/chat/conversationState.d.ts +0 -17
- package/dist/chat/data.d.ts +0 -18
- package/dist/chat/environment.d.ts +0 -8
- package/dist/chat/i18n/en.d.ts +0 -151
- package/dist/chat/i18n/nb.d.ts +0 -151
- package/dist/chat/i18n/types.d.ts +0 -2
- package/dist/chat/index.d.ts +0 -240
- package/dist/chat/localization.d.ts +0 -17
- package/dist/chat/mentions.d.ts +0 -33
- package/dist/chat/messageText.d.ts +0 -21
- package/dist/chat/mockClient.d.ts +0 -13
- package/dist/chat/offlineStore.d.ts +0 -55
- package/dist/chat/participants.d.ts +0 -8
- package/dist/chat/pinnedMessages.d.ts +0 -12
- package/dist/chat/publicChannelMessageFallback.d.ts +0 -1
- package/dist/chat/reactions.d.ts +0 -8
- package/dist/chat/richText.d.ts +0 -9
- package/dist/chat/runtime.d.ts +0 -3
- package/dist/chat/theme.d.ts +0 -19
- package/dist/chat/types.d.ts +0 -409
- package/dist/components/chat/BccChat.vue.d.ts +0 -100
- package/dist/components/chat/ChatStatusOverlay.vue.d.ts +0 -34
- package/dist/components/chat/publicContract.d.ts +0 -44
- package/dist/components/conversations/ConversationList.vue.d.ts +0 -18
- package/dist/components/conversations/UserProfileCard.vue.d.ts +0 -9
- package/dist/components/messages/ActionMessageRow.vue.d.ts +0 -7
- package/dist/components/messages/AudioStickyPlayer.vue.d.ts +0 -12
- package/dist/components/messages/ComposerActionsPopover.vue.d.ts +0 -15
- package/dist/components/messages/ComposerContextBanner.vue.d.ts +0 -15
- package/dist/components/messages/ComposerFormatMenu.vue.d.ts +0 -19
- package/dist/components/messages/ComposerLinkDialog.vue.d.ts +0 -18
- package/dist/components/messages/ComposerPollDialog.vue.d.ts +0 -18
- package/dist/components/messages/ComposerScheduleDialog.vue.d.ts +0 -22
- package/dist/components/messages/ComposerTriggerMenu.vue.d.ts +0 -24
- package/dist/components/messages/ConversationComposer.vue.d.ts +0 -30
- package/dist/components/messages/LinkPreviewCard.vue.d.ts +0 -8
- package/dist/components/messages/LinkifiedText.vue.d.ts +0 -15
- package/dist/components/messages/MessageAttachmentList.vue.d.ts +0 -12
- package/dist/components/messages/MessageComposer.vue.d.ts +0 -59
- package/dist/components/messages/MessageDateSeparator.vue.d.ts +0 -7
- package/dist/components/messages/MessageDeliveryStatus.vue.d.ts +0 -8
- package/dist/components/messages/MessageForwardedLabel.vue.d.ts +0 -8
- package/dist/components/messages/MessageItem.vue.d.ts +0 -36
- package/dist/components/messages/MessageItemHeader.vue.d.ts +0 -8
- package/dist/components/messages/MessageItemMenu.vue.d.ts +0 -36
- package/dist/components/messages/MessageItemMenuReactions.vue.d.ts +0 -13
- package/dist/components/messages/MessageItemReactions.vue.d.ts +0 -16
- package/dist/components/messages/MessageList.vue.d.ts +0 -42
- package/dist/components/messages/MessageListHeader.vue.d.ts +0 -9
- package/dist/components/messages/MessagePinnedLabel.vue.d.ts +0 -4
- package/dist/components/messages/MessagePollContent.vue.d.ts +0 -14
- package/dist/components/messages/MessageReactionList.vue.d.ts +0 -14
- package/dist/components/messages/MessageReplyQuote.vue.d.ts +0 -12
- package/dist/components/messages/MessageTextContent.vue.d.ts +0 -12
- package/dist/components/messages/PinnedMessagesBar.vue.d.ts +0 -4
- package/dist/components/overlays/ForwardMessageDialog.vue.d.ts +0 -16
- package/dist/components/overlays/FullscreenDialog.vue.d.ts +0 -34
- package/dist/components/overlays/MediaViewerDialog.vue.d.ts +0 -12
- package/dist/components/overlays/MessageInfoDialog.vue.d.ts +0 -16
- package/dist/components/overlays/PinnedMessagesDialog.vue.d.ts +0 -20
- package/dist/components/overlays/ReceiptSection.vue.d.ts +0 -13
- package/dist/components/overlays/ScheduledMessagesDialog.vue.d.ts +0 -37
- package/dist/components/shared/PersonAvatar.vue.d.ts +0 -8
- package/dist/composables/chat/index.d.ts +0 -13
- package/dist/composables/chat/useComposerContext.d.ts +0 -44
- package/dist/composables/chat/useConversationContext.d.ts +0 -36
- package/dist/composables/chat/useDialogsContext.d.ts +0 -43
- package/dist/composables/chat/useMessagesContext.d.ts +0 -42
- package/dist/composables/useAudioPlayer.d.ts +0 -18
- package/dist/composables/useChatActions.d.ts +0 -21
- package/dist/composables/useChatEventBus.d.ts +0 -108
- package/dist/composables/useComposerDrafts.d.ts +0 -47
- package/dist/composables/useComposerTriggers.d.ts +0 -63
- package/dist/composables/useConversationComposer.d.ts +0 -16
- package/dist/composables/useGroupMemberTracking.d.ts +0 -33
- package/dist/composables/useImageZoom.d.ts +0 -26
- package/dist/composables/useIsTouchUi.d.ts +0 -4
- package/dist/composables/useMessageActionMenu.d.ts +0 -257
- package/dist/composables/useMessageInfoDialog.d.ts +0 -201
- package/dist/composables/useMessageListScroll.d.ts +0 -15
- package/dist/composables/useMessageNavigation.d.ts +0 -16
- package/dist/composables/usePinnedMessages.d.ts +0 -190
- package/dist/composables/useRichTextComposer.d.ts +0 -75
- package/dist/demo/ApiExamplesPanel.vue.d.ts +0 -8
- package/dist/demo/CallDebugPanel.vue.d.ts +0 -8
- package/dist/demo/ChatShell.vue.d.ts +0 -12
- package/dist/demo/StatCard.vue.d.ts +0 -17
- package/dist/demo/ThemeModeToggle.vue.d.ts +0 -17
- package/dist/demo/useDemoThemeMode.d.ts +0 -7
- package/dist/main.d.ts +0 -0
- package/dist/sfc-styles-entry.d.ts +0 -1
- package/dist/shims-vue.d.ts +0 -6
- package/dist/vite-env.d.ts +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,886 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { BaseMessage } from '@cometchat/chat-sdk-javascript';
|
|
3
|
+
import { Call } from '@cometchat/chat-sdk-javascript';
|
|
4
|
+
import { CometChat as CometChat_2 } from '@cometchat/chat-sdk-javascript';
|
|
5
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
6
|
+
import { ComponentProvideOptions } from 'vue';
|
|
7
|
+
import { ComputedRef } from 'vue';
|
|
8
|
+
import { Conversation } from '@cometchat/chat-sdk-javascript';
|
|
9
|
+
import { DefineComponent } from 'vue';
|
|
10
|
+
import { Group } from '@cometchat/chat-sdk-javascript';
|
|
11
|
+
import { MessageReceipt } from '@cometchat/chat-sdk-javascript';
|
|
12
|
+
import { PublicProps } from 'vue';
|
|
13
|
+
import { Ref } from 'vue';
|
|
14
|
+
import { User } from '@cometchat/chat-sdk-javascript';
|
|
15
|
+
import { WritableComputedRef } from 'vue';
|
|
16
|
+
|
|
17
|
+
declare const __VLS_base: DefineComponent<__VLS_Props, {
|
|
18
|
+
applyComposerFormat: typeof applyComposerFormat;
|
|
19
|
+
applyComposerLink: typeof applyComposerLink;
|
|
20
|
+
cancelComposerLink: typeof cancelComposerLink;
|
|
21
|
+
getComposerSelection: typeof getComposerSelection;
|
|
22
|
+
requestComposerLink: typeof requestComposerLink;
|
|
23
|
+
initiateDirectMessage: typeof initiateDirectMessage_2;
|
|
24
|
+
scrollToMessage: typeof scrollToMessage_2;
|
|
25
|
+
groupMembers: ComputedRef<{
|
|
26
|
+
uid: string;
|
|
27
|
+
displayName: string;
|
|
28
|
+
avatar: string;
|
|
29
|
+
role: string;
|
|
30
|
+
status?: PresenceStatus | undefined;
|
|
31
|
+
lastSeen?: Date | undefined;
|
|
32
|
+
}[]>;
|
|
33
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
34
|
+
chatNotAMember: (chatUid: string) => any;
|
|
35
|
+
composerSelectionChange: (selection: ChatComposerSelectionState | null) => any;
|
|
36
|
+
composerLinkRequest: (selection: ChatComposerSelectionState) => any;
|
|
37
|
+
chatMembersFetched: (members: ParticipantInfo[]) => any;
|
|
38
|
+
chatEmpty: () => any;
|
|
39
|
+
linkClicked: (event: MouseEvent, url: string) => any;
|
|
40
|
+
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
41
|
+
onChatNotAMember?: ((chatUid: string) => any) | undefined;
|
|
42
|
+
onComposerSelectionChange?: ((selection: ChatComposerSelectionState | null) => any) | undefined;
|
|
43
|
+
onComposerLinkRequest?: ((selection: ChatComposerSelectionState) => any) | undefined;
|
|
44
|
+
onChatMembersFetched?: ((members: ParticipantInfo[]) => any) | undefined;
|
|
45
|
+
onChatEmpty?: (() => any) | undefined;
|
|
46
|
+
onLinkClicked?: ((event: MouseEvent, url: string) => any) | undefined;
|
|
47
|
+
}>, {
|
|
48
|
+
chatUid: string;
|
|
49
|
+
hideGroupActions: boolean;
|
|
50
|
+
client: ChatClient | null;
|
|
51
|
+
isReadOnly: boolean;
|
|
52
|
+
initialScheduledMessagesOpen: boolean;
|
|
53
|
+
hideDeletedMessages: boolean;
|
|
54
|
+
displayNoMessagesText: boolean;
|
|
55
|
+
showMessageHeader: boolean;
|
|
56
|
+
composerFormattingMode: ComposerFormattingMode;
|
|
57
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
58
|
+
|
|
59
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
60
|
+
|
|
61
|
+
declare type __VLS_Props = {
|
|
62
|
+
client?: ChatClient | null;
|
|
63
|
+
conversation?: ChatConversationItem | null;
|
|
64
|
+
messages?: ChatMessageItem[];
|
|
65
|
+
threadMessages?: ChatMessageItem[];
|
|
66
|
+
loadingMessages?: boolean;
|
|
67
|
+
loadingThreadMessages?: boolean;
|
|
68
|
+
isReadOnly?: boolean;
|
|
69
|
+
sendOptions?: MessageSendOptions;
|
|
70
|
+
showDefaultEmptyState?: boolean;
|
|
71
|
+
initialScheduledMessagesOpen?: boolean;
|
|
72
|
+
chatUid?: string;
|
|
73
|
+
senderDisplayName?: string;
|
|
74
|
+
hideDeletedMessages?: boolean;
|
|
75
|
+
hideGroupActions?: boolean;
|
|
76
|
+
chatMessageGetter?: ChatMessagesGetter;
|
|
77
|
+
displayNoMessagesText?: boolean;
|
|
78
|
+
language?: Language;
|
|
79
|
+
showHeader?: boolean;
|
|
80
|
+
showMessageHeader?: boolean;
|
|
81
|
+
containerClass?: string;
|
|
82
|
+
actionMessageClass?: string;
|
|
83
|
+
actionMessageRowClass?: string;
|
|
84
|
+
composerFormattingMode?: ComposerFormattingMode;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
declare type __VLS_Slots = {} & {
|
|
88
|
+
'error-message'?: (props: typeof __VLS_6) => any;
|
|
89
|
+
} & {
|
|
90
|
+
'message-header'?: (props: typeof __VLS_23) => any;
|
|
91
|
+
} & {
|
|
92
|
+
'no-messages'?: (props: typeof __VLS_102) => any;
|
|
93
|
+
} & {
|
|
94
|
+
'not-a-member'?: (props: typeof __VLS_105) => any;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
declare type __VLS_WithSlots<T, S> = T & {
|
|
98
|
+
new (): {
|
|
99
|
+
$slots: S;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
declare function applyComposerFormat(command: ComposerFormatCommand, target?: ChatComposerTarget): boolean;
|
|
104
|
+
|
|
105
|
+
declare function applyComposerLink(url: string, target?: ChatComposerTarget): boolean;
|
|
106
|
+
|
|
107
|
+
export declare interface AttachmentUploadInput {
|
|
108
|
+
file: File;
|
|
109
|
+
caption?: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export declare interface BccChatComposerFormattingHandle {
|
|
113
|
+
applyComposerFormat(command: ComposerFormatCommand, target?: ChatComposerTarget): boolean;
|
|
114
|
+
requestComposerLink(target?: ChatComposerTarget): boolean;
|
|
115
|
+
applyComposerLink(url: string, target?: ChatComposerTarget): boolean;
|
|
116
|
+
cancelComposerLink(target?: ChatComposerTarget): void;
|
|
117
|
+
getComposerSelection(target?: ChatComposerTarget): ChatComposerSelectionState | null;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export declare interface BccChatExpose extends BccChatComposerFormattingHandle {
|
|
121
|
+
scrollToMessage(messageId: string): Promise<void>;
|
|
122
|
+
initiateDirectMessage(userUid: string): Promise<ChatConversationItem>;
|
|
123
|
+
readonly groupMembers: ParticipantInfo[];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export declare interface CachedLastMessage {
|
|
127
|
+
chatUid: string;
|
|
128
|
+
lastMessage: null | MessageInfo;
|
|
129
|
+
lastUpdated: number;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export declare interface CachedParticipantSettings {
|
|
133
|
+
chatUid: string;
|
|
134
|
+
mutedUntil: string | null;
|
|
135
|
+
lastUpdated: number;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare function cancelComposerLink(target?: ChatComposerTarget): void;
|
|
139
|
+
|
|
140
|
+
declare const chat: {
|
|
141
|
+
install: typeof install;
|
|
142
|
+
setGetChatMessagesCallback: typeof setGetChatMessagesCallback;
|
|
143
|
+
initialized: Ref<boolean, boolean>;
|
|
144
|
+
connected: ComputedRef<boolean>;
|
|
145
|
+
connecting: ComputedRef<boolean>;
|
|
146
|
+
loggedIn: ComputedRef<boolean>;
|
|
147
|
+
userChats: Ref<{
|
|
148
|
+
chatUid: string;
|
|
149
|
+
type: ChatConversationItem["type"];
|
|
150
|
+
name: string;
|
|
151
|
+
unreadMessageCount: number;
|
|
152
|
+
lastMessage?: {
|
|
153
|
+
text?: string | undefined;
|
|
154
|
+
type: string;
|
|
155
|
+
senderUid: string;
|
|
156
|
+
senderName: string;
|
|
157
|
+
sentAt: Date;
|
|
158
|
+
sentByCurrentUser: boolean;
|
|
159
|
+
readAt: Date | undefined;
|
|
160
|
+
messageReceipts?: {
|
|
161
|
+
RECEIPT_TYPE: {
|
|
162
|
+
READ_RECEIPT: string;
|
|
163
|
+
DELIVERY_RECEIPT: string;
|
|
164
|
+
READ_BY_ALL_RECEIPT: string;
|
|
165
|
+
DELIVERED_TO_ALL_RECEIPT: string;
|
|
166
|
+
};
|
|
167
|
+
getReceiverType: () => string;
|
|
168
|
+
setReceiverType: (receiverType: string) => void;
|
|
169
|
+
getSender: () => User;
|
|
170
|
+
setSender: (sender: User) => void;
|
|
171
|
+
getReceiver: () => string;
|
|
172
|
+
setReceiver: (receiver: string) => void;
|
|
173
|
+
getTimestamp: () => string;
|
|
174
|
+
setTimestamp: (timestamp: string) => void;
|
|
175
|
+
setReadAt: (readAt: number) => void;
|
|
176
|
+
getReadAt: () => number;
|
|
177
|
+
setDeliveredAt: (deliveredAt: number) => void;
|
|
178
|
+
getDeliveredAt: () => number;
|
|
179
|
+
getMessageId: () => string;
|
|
180
|
+
setMessageId: (messageId: string) => void;
|
|
181
|
+
getReceiptType: () => string;
|
|
182
|
+
setReceiptType: (receiptType?: string) => void;
|
|
183
|
+
}[] | undefined;
|
|
184
|
+
} | undefined;
|
|
185
|
+
membersCount: number;
|
|
186
|
+
tags: string[];
|
|
187
|
+
muteSettings?: (Date | null) | undefined;
|
|
188
|
+
hasJoined: boolean;
|
|
189
|
+
}[], UserChatInfo[] | {
|
|
190
|
+
chatUid: string;
|
|
191
|
+
type: ChatConversationItem["type"];
|
|
192
|
+
name: string;
|
|
193
|
+
unreadMessageCount: number;
|
|
194
|
+
lastMessage?: {
|
|
195
|
+
text?: string | undefined;
|
|
196
|
+
type: string;
|
|
197
|
+
senderUid: string;
|
|
198
|
+
senderName: string;
|
|
199
|
+
sentAt: Date;
|
|
200
|
+
sentByCurrentUser: boolean;
|
|
201
|
+
readAt: Date | undefined;
|
|
202
|
+
messageReceipts?: {
|
|
203
|
+
RECEIPT_TYPE: {
|
|
204
|
+
READ_RECEIPT: string;
|
|
205
|
+
DELIVERY_RECEIPT: string;
|
|
206
|
+
READ_BY_ALL_RECEIPT: string;
|
|
207
|
+
DELIVERED_TO_ALL_RECEIPT: string;
|
|
208
|
+
};
|
|
209
|
+
getReceiverType: () => string;
|
|
210
|
+
setReceiverType: (receiverType: string) => void;
|
|
211
|
+
getSender: () => User;
|
|
212
|
+
setSender: (sender: User) => void;
|
|
213
|
+
getReceiver: () => string;
|
|
214
|
+
setReceiver: (receiver: string) => void;
|
|
215
|
+
getTimestamp: () => string;
|
|
216
|
+
setTimestamp: (timestamp: string) => void;
|
|
217
|
+
setReadAt: (readAt: number) => void;
|
|
218
|
+
getReadAt: () => number;
|
|
219
|
+
setDeliveredAt: (deliveredAt: number) => void;
|
|
220
|
+
getDeliveredAt: () => number;
|
|
221
|
+
getMessageId: () => string;
|
|
222
|
+
setMessageId: (messageId: string) => void;
|
|
223
|
+
getReceiptType: () => string;
|
|
224
|
+
setReceiptType: (receiptType?: string) => void;
|
|
225
|
+
}[] | undefined;
|
|
226
|
+
} | undefined;
|
|
227
|
+
membersCount: number;
|
|
228
|
+
tags: string[];
|
|
229
|
+
muteSettings?: (Date | null) | undefined;
|
|
230
|
+
hasJoined: boolean;
|
|
231
|
+
}[]>;
|
|
232
|
+
userUid: ComputedRef<string | undefined>;
|
|
233
|
+
connect: typeof connect;
|
|
234
|
+
disconnect: typeof disconnect;
|
|
235
|
+
disconnectAll: typeof disconnectAll;
|
|
236
|
+
setAccessToken: typeof setAccessToken;
|
|
237
|
+
login: typeof login;
|
|
238
|
+
logout: typeof logout;
|
|
239
|
+
setCurrentEnvironment: typeof setEnvironment;
|
|
240
|
+
getCurrentEnvironment: typeof getCurrentEnvironment;
|
|
241
|
+
setThemeMode: typeof setThemeMode;
|
|
242
|
+
setLanguage: typeof setLanguage;
|
|
243
|
+
getGroup: typeof getGroup;
|
|
244
|
+
getChatMembersInfo: typeof getChatMembersInfo;
|
|
245
|
+
getUserChats: typeof getUserChats;
|
|
246
|
+
initiateDirectMessage: typeof initiateDirectMessage;
|
|
247
|
+
clearChatCount: typeof clearChatCount;
|
|
248
|
+
refreshVisibleMessages: () => Promise<void> | undefined;
|
|
249
|
+
getChatOnlineCount: typeof getChatOnlineCount;
|
|
250
|
+
searchChat: (searchQuery: string, limit?: number) => SearchedItems | undefined;
|
|
251
|
+
getSenderDisplayName: typeof getSenderDisplayName;
|
|
252
|
+
getMessageTextPreview: typeof getMessageTextPreview;
|
|
253
|
+
proxyImage: typeof proxyImage;
|
|
254
|
+
getMutedUntil: typeof getMutedUntil;
|
|
255
|
+
muteChat: typeof muteChat;
|
|
256
|
+
getMyChatSettings: typeof getMyChatSettings;
|
|
257
|
+
updateMyChatSettings: typeof updateMyChatSettings;
|
|
258
|
+
setMuteAll: typeof setMuteAll;
|
|
259
|
+
toggleMuteAll: typeof toggleMuteAll;
|
|
260
|
+
toMarkdownHtml: typeof toMarkdownHtml;
|
|
261
|
+
retrieveCcToken: typeof retrieveCcToken;
|
|
262
|
+
getChatMessages: Ref<ChatMessagesGetter | undefined, ChatMessagesGetter | undefined>;
|
|
263
|
+
scrollToMessageId: Ref<string | undefined, string | undefined>;
|
|
264
|
+
scrollToMessage: typeof scrollToMessage;
|
|
265
|
+
pinnedMessages: ComputedRef<ChatMessageItem[]>;
|
|
266
|
+
pinMessage: typeof pinMessage;
|
|
267
|
+
unpinMessage: typeof unpinMessage;
|
|
268
|
+
togglePinnedMessage: typeof togglePinnedMessage;
|
|
269
|
+
isMessagePinned: typeof isMessagePinned;
|
|
270
|
+
connectivity: {
|
|
271
|
+
onlineMode: WritableComputedRef<OnlineStatus, OnlineStatus>;
|
|
272
|
+
onlineStatus: ComputedRef<OnlineStatus>;
|
|
273
|
+
};
|
|
274
|
+
onlineMode: WritableComputedRef<OnlineStatus, OnlineStatus>;
|
|
275
|
+
onlineStatus: ComputedRef<OnlineStatus>;
|
|
276
|
+
theme: Ref<{
|
|
277
|
+
palette: {
|
|
278
|
+
mode: ThemeMode;
|
|
279
|
+
setMode: (mode: ThemeMode) => void;
|
|
280
|
+
};
|
|
281
|
+
}, {
|
|
282
|
+
palette: {
|
|
283
|
+
mode: ThemeMode;
|
|
284
|
+
setMode(mode: ThemeMode): void;
|
|
285
|
+
};
|
|
286
|
+
} | {
|
|
287
|
+
palette: {
|
|
288
|
+
mode: ThemeMode;
|
|
289
|
+
setMode: (mode: ThemeMode) => void;
|
|
290
|
+
};
|
|
291
|
+
}>;
|
|
292
|
+
themeMode: Ref<ThemeMode, ThemeMode>;
|
|
293
|
+
language: Ref<Language, Language>;
|
|
294
|
+
calls: {
|
|
295
|
+
state: ComputedRef<"idle" | "outgoing" | "incoming" | "connecting" | "in-call">;
|
|
296
|
+
activeType: ComputedRef<"video" | "audio">;
|
|
297
|
+
activeSessionId: ComputedRef<string | null>;
|
|
298
|
+
incomingCall: ComputedRef< Call | null>;
|
|
299
|
+
incomingCalls: ComputedRef<Map<string, Call>>;
|
|
300
|
+
outgoingCall: ComputedRef< Call | null>;
|
|
301
|
+
start: (receiverId: string, container: HTMLElement, callType?: "audio" | "video", receiverType?: "user" | "group") => Promise< Call>;
|
|
302
|
+
accept: (container: HTMLElement, sessionId?: string) => Promise<void>;
|
|
303
|
+
reject: (sessionId?: string) => Promise<void>;
|
|
304
|
+
end: () => Promise<void>;
|
|
305
|
+
joinActive: (container: HTMLElement) => Promise<void>;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
export { chat }
|
|
309
|
+
export default chat;
|
|
310
|
+
|
|
311
|
+
export declare interface ChatAttachmentItem {
|
|
312
|
+
kind: Extract<ChatMessageKind, "image" | "video" | "audio" | "file">;
|
|
313
|
+
name: string;
|
|
314
|
+
url?: string;
|
|
315
|
+
mimeType?: string;
|
|
316
|
+
extension?: string;
|
|
317
|
+
size?: number;
|
|
318
|
+
width?: number;
|
|
319
|
+
height?: number;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export declare interface ChatClient {
|
|
323
|
+
initialized: Ref<boolean>;
|
|
324
|
+
loggingIn: Ref<boolean>;
|
|
325
|
+
loadingConversations: Ref<boolean>;
|
|
326
|
+
loadingMessages: Ref<boolean>;
|
|
327
|
+
loadingThreadMessages: Ref<boolean>;
|
|
328
|
+
loadingOlderMessages: Ref<boolean>;
|
|
329
|
+
loadingOlderThreadMessages: Ref<boolean>;
|
|
330
|
+
loadingScheduledMessages: Ref<boolean>;
|
|
331
|
+
sendingMessage: Ref<boolean>;
|
|
332
|
+
schedulingMessage: Ref<boolean>;
|
|
333
|
+
syncingQueue: Ref<boolean>;
|
|
334
|
+
connected: Ref<boolean>;
|
|
335
|
+
offlineMode: Ref<boolean>;
|
|
336
|
+
hideGroupActions: Ref<boolean>;
|
|
337
|
+
loggedIn: Ref<boolean>;
|
|
338
|
+
error: Ref<string | null>;
|
|
339
|
+
currentUser: Ref<ChatUserProfile | null>;
|
|
340
|
+
conversations: Ref<ChatConversationItem[]>;
|
|
341
|
+
messages: Ref<ChatMessageItem[]>;
|
|
342
|
+
threadMessages: Ref<ChatMessageItem[]>;
|
|
343
|
+
scheduledMessages: Ref<ChatMessageItem[]>;
|
|
344
|
+
/** Pinned messages of the active conversation, most recently pinned first. */
|
|
345
|
+
pinnedMessages: Ref<ChatMessageItem[]>;
|
|
346
|
+
loadingPinnedMessages: Ref<boolean>;
|
|
347
|
+
/** Whether Pin Message is enabled for the chat app. */
|
|
348
|
+
pinningEnabled: Ref<boolean>;
|
|
349
|
+
/** Server-owned cap on pins per conversation; null while unknown. */
|
|
350
|
+
pinnedMessagesLimit: Ref<number | null>;
|
|
351
|
+
hasOlderMessages: Ref<boolean>;
|
|
352
|
+
hasOlderThreadMessages: Ref<boolean>;
|
|
353
|
+
pendingQueueCount: ComputedRef<number>;
|
|
354
|
+
activeConversationId: Ref<string | null>;
|
|
355
|
+
activeConversation: ComputedRef<ChatConversationItem | null>;
|
|
356
|
+
activeThreadParentMessage: Ref<ChatMessageItem | null>;
|
|
357
|
+
replyToMessage: Ref<ChatMessageItem | null>;
|
|
358
|
+
editingMessage: Ref<ChatMessageItem | null>;
|
|
359
|
+
init: () => Promise<void>;
|
|
360
|
+
connectRealtime: () => Promise<void>;
|
|
361
|
+
disconnectRealtime: () => Promise<void>;
|
|
362
|
+
login: (accessToken: string) => Promise<void>;
|
|
363
|
+
logout: () => Promise<void>;
|
|
364
|
+
fetchConversations: () => Promise<void>;
|
|
365
|
+
selectConversation: (conversationId: string | null) => Promise<void>;
|
|
366
|
+
initiateDirectMessage: (userUid: string) => Promise<ChatConversationItem>;
|
|
367
|
+
sendTextMessage: (text: string, options?: MessageSendOptions) => Promise<void>;
|
|
368
|
+
sendAttachmentMessage: (input: AttachmentUploadInput, options?: MessageSendOptions) => Promise<void>;
|
|
369
|
+
sendPollMessage: (input: PollComposerInput, options?: MessageSendOptions) => Promise<void>;
|
|
370
|
+
forwardMessage: (message: ChatMessageItem, target: ForwardMessageTarget) => Promise<void>;
|
|
371
|
+
fetchScheduledMessages: (originalChatUid?: string) => Promise<void>;
|
|
372
|
+
loadOlderMessages: () => Promise<boolean>;
|
|
373
|
+
loadOlderThreadMessages: () => Promise<boolean>;
|
|
374
|
+
ensureMessageLoaded: (messageId: string) => Promise<boolean>;
|
|
375
|
+
scheduleMessage: (input: ScheduleMessageInput, options?: MessageSendOptions) => Promise<void>;
|
|
376
|
+
rescheduleMessage: (input: RescheduleMessageInput) => Promise<void>;
|
|
377
|
+
removeScheduledMessage: (message: ChatMessageItem) => Promise<void>;
|
|
378
|
+
editScheduledMessage: (message: ChatMessageItem, nextText: string) => Promise<void>;
|
|
379
|
+
setReplyToMessage: (message: ChatMessageItem | null) => void;
|
|
380
|
+
setEditingMessage: (message: ChatMessageItem | null) => void;
|
|
381
|
+
openThread: (message: ChatMessageItem) => Promise<void>;
|
|
382
|
+
closeThread: () => void;
|
|
383
|
+
refreshVisibleMessages: (options?: {
|
|
384
|
+
includeThread?: boolean;
|
|
385
|
+
}) => Promise<void>;
|
|
386
|
+
fetchMessageReceipts: (message: ChatMessageItem) => Promise<ChatMessageReceiptItem[]>;
|
|
387
|
+
fetchMessageReactions: (message: ChatMessageItem) => Promise<ChatReactionDetailItem[]>;
|
|
388
|
+
deleteMessage: (message: ChatMessageItem) => Promise<void>;
|
|
389
|
+
votePoll: (message: ChatMessageItem, optionId: string) => Promise<void>;
|
|
390
|
+
toggleReaction: (message: ChatMessageItem, emoji: string) => Promise<void>;
|
|
391
|
+
fetchPinnedMessages: (conversationId?: string) => Promise<void>;
|
|
392
|
+
pinMessage: (message: ChatMessageItem) => Promise<void>;
|
|
393
|
+
unpinMessage: (messageId: string) => Promise<void>;
|
|
394
|
+
togglePinnedMessage: (message: ChatMessageItem) => Promise<void>;
|
|
395
|
+
isMessagePinned: (messageId: string) => boolean;
|
|
396
|
+
translateMessage: (message: ChatMessageItem) => Promise<void>;
|
|
397
|
+
mentionDisplayNamesByUid: Ref<Record<string, string>>;
|
|
398
|
+
rememberMentionDisplayNames: (entries: ReadonlyArray<{
|
|
399
|
+
uid: string;
|
|
400
|
+
displayName: string;
|
|
401
|
+
}>) => void;
|
|
402
|
+
initiateCall: (receiverId: string, container: HTMLElement, callType?: "video" | "audio", receiverType?: "user" | "group") => Promise<InstanceType<typeof CometChat_2.Call>>;
|
|
403
|
+
acceptIncomingCall: (container: HTMLElement, sessionId?: string) => Promise<void>;
|
|
404
|
+
rejectIncomingCall: (sessionId?: string) => Promise<void>;
|
|
405
|
+
endActiveCall: () => Promise<void>;
|
|
406
|
+
joinOutgoingCallSession: (container: HTMLElement) => Promise<void>;
|
|
407
|
+
incomingCall: Ref<InstanceType<typeof CometChat_2.Call> | null>;
|
|
408
|
+
incomingCalls: Ref<Map<string, InstanceType<typeof CometChat_2.Call>>>;
|
|
409
|
+
outgoingCall: Ref<InstanceType<typeof CometChat_2.Call> | null>;
|
|
410
|
+
activeCallSessionId: Ref<string | null>;
|
|
411
|
+
activeCallType: Ref<"audio" | "video">;
|
|
412
|
+
callState: Ref<"idle" | "outgoing" | "incoming" | "connecting" | "in-call">;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export declare interface ChatComposerSelectionState extends ComposerSelectionState {
|
|
416
|
+
target: ChatComposerTarget;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export declare type ChatComposerTarget = "main" | "thread";
|
|
420
|
+
|
|
421
|
+
export declare interface ChatConversationItem {
|
|
422
|
+
id: string;
|
|
423
|
+
targetId: string;
|
|
424
|
+
type: "group" | "user";
|
|
425
|
+
title: string;
|
|
426
|
+
subtitle: string;
|
|
427
|
+
avatar?: string;
|
|
428
|
+
unreadCount: number;
|
|
429
|
+
lastMessageAt?: Date;
|
|
430
|
+
muteSettings?: Date | null;
|
|
431
|
+
hasJoined?: boolean;
|
|
432
|
+
tags: string[];
|
|
433
|
+
memberCount?: number;
|
|
434
|
+
source?: Conversation | null;
|
|
435
|
+
lastMessage?: ChatMessageItem | null;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export declare type ChatDeliveryState = "sent" | "queued" | "sending" | "failed";
|
|
439
|
+
|
|
440
|
+
declare interface ChatEnvironmentConfig {
|
|
441
|
+
region: string;
|
|
442
|
+
appId: string;
|
|
443
|
+
chatApiBaseUrl: string;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export declare interface ChatForwardedFromInfo {
|
|
447
|
+
senderName: string;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export declare interface ChatInstallOptions {
|
|
451
|
+
environment: Environment;
|
|
452
|
+
language?: Language;
|
|
453
|
+
themeMode: ThemeMode;
|
|
454
|
+
accessToken?: Ref<string | null | undefined> | null | undefined | string;
|
|
455
|
+
loggerCallback?: (entry: LogEntry) => void;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export declare interface ChatInstance {
|
|
459
|
+
componentId: string;
|
|
460
|
+
replyToMessage: BaseMessage | null;
|
|
461
|
+
captionedAttachment: {
|
|
462
|
+
fileObject?: File;
|
|
463
|
+
dimensions?: {
|
|
464
|
+
width: number;
|
|
465
|
+
height: number;
|
|
466
|
+
};
|
|
467
|
+
} | null;
|
|
468
|
+
decoyAttachment: {
|
|
469
|
+
fileObject?: File;
|
|
470
|
+
dimensions?: {
|
|
471
|
+
width: number;
|
|
472
|
+
height: number;
|
|
473
|
+
};
|
|
474
|
+
} | null;
|
|
475
|
+
scheduledMessageChat?: Group;
|
|
476
|
+
showScheduledMessagesChat: boolean;
|
|
477
|
+
showAlert: boolean;
|
|
478
|
+
showRescheduleAlert: boolean;
|
|
479
|
+
userInput: string | null;
|
|
480
|
+
rescheduleInfo: {
|
|
481
|
+
rescheduleMuid: string;
|
|
482
|
+
messageId: number;
|
|
483
|
+
} | null;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
export declare interface ChatMessageItem {
|
|
487
|
+
id: string;
|
|
488
|
+
muid?: string;
|
|
489
|
+
conversationId: string;
|
|
490
|
+
senderId: string;
|
|
491
|
+
senderName: string;
|
|
492
|
+
text: string;
|
|
493
|
+
kind: ChatMessageKind;
|
|
494
|
+
sentAt: Date;
|
|
495
|
+
category: string;
|
|
496
|
+
type: string;
|
|
497
|
+
senderAvatar?: string;
|
|
498
|
+
isOwn: boolean;
|
|
499
|
+
isDeleted: boolean;
|
|
500
|
+
isEdited: boolean;
|
|
501
|
+
attachments: ChatAttachmentItem[];
|
|
502
|
+
poll?: ChatPollData;
|
|
503
|
+
scheduled?: ChatScheduledInfo;
|
|
504
|
+
translatedText?: string;
|
|
505
|
+
replyTo?: ChatReplyPreview;
|
|
506
|
+
forwardedFrom?: ChatForwardedFromInfo;
|
|
507
|
+
parentMessageId?: string;
|
|
508
|
+
replyCount: number;
|
|
509
|
+
reactions: ChatReactionItem[];
|
|
510
|
+
receipts: ChatMessageReceiptSummary;
|
|
511
|
+
/** Set while the message is pinned in its conversation; the same value for every member. */
|
|
512
|
+
pinnedAt?: Date;
|
|
513
|
+
/** Uid of the most recent pinner, or the `app_system` sentinel for an app/admin pin. */
|
|
514
|
+
pinnedBy?: string;
|
|
515
|
+
deliveryState: ChatDeliveryState;
|
|
516
|
+
metadata?: Record<string, unknown>;
|
|
517
|
+
source: any;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export declare type ChatMessageKind = "text" | "image" | "video" | "audio" | "file" | "poll" | "action" | "unsupported";
|
|
521
|
+
|
|
522
|
+
export declare interface ChatMessageReceiptItem {
|
|
523
|
+
kind: ChatMessageReceiptKind;
|
|
524
|
+
user: ChatUserProfile;
|
|
525
|
+
timestamp?: Date;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export declare type ChatMessageReceiptKind = "delivered" | "read";
|
|
529
|
+
|
|
530
|
+
export declare interface ChatMessageReceiptSummary {
|
|
531
|
+
deliveredAt?: Date;
|
|
532
|
+
deliveredToMeAt?: Date;
|
|
533
|
+
readAt?: Date;
|
|
534
|
+
readByMeAt?: Date;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
export declare type ChatMessagesGetter = (guid: string, query: string) => Promise<ChatMessagesGetterResult>;
|
|
538
|
+
|
|
539
|
+
export declare interface ChatMessagesGetterPagination {
|
|
540
|
+
total_pages?: number;
|
|
541
|
+
current_page?: number;
|
|
542
|
+
[key: string]: unknown;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
export declare interface ChatMessagesGetterResult<TMessage = Record<string, unknown>> {
|
|
546
|
+
data: TMessage[];
|
|
547
|
+
meta?: {
|
|
548
|
+
pagination?: ChatMessagesGetterPagination;
|
|
549
|
+
[key: string]: unknown;
|
|
550
|
+
};
|
|
551
|
+
[key: string]: unknown;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
export declare interface ChatPollData {
|
|
555
|
+
id?: string;
|
|
556
|
+
question: string;
|
|
557
|
+
options: ChatPollOptionItem[];
|
|
558
|
+
totalVotes: number;
|
|
559
|
+
allowsMultipleAnswers: boolean;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export declare interface ChatPollOptionItem {
|
|
563
|
+
id: string;
|
|
564
|
+
text: string;
|
|
565
|
+
voteCount: number;
|
|
566
|
+
voters: ChatUserProfile[];
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
export declare interface ChatReactionDetailItem {
|
|
570
|
+
emoji: string;
|
|
571
|
+
user: ChatUserProfile;
|
|
572
|
+
reactedAt?: Date;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
export declare interface ChatReactionItem {
|
|
576
|
+
emoji: string;
|
|
577
|
+
count: number;
|
|
578
|
+
reactedByMe: boolean;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
export declare interface ChatReplyPreview {
|
|
582
|
+
messageId: string;
|
|
583
|
+
senderName: string;
|
|
584
|
+
text: string;
|
|
585
|
+
kind: ChatMessageKind;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
export declare interface ChatScheduledInfo {
|
|
589
|
+
scheduleDate?: Date;
|
|
590
|
+
originalChatUid?: string;
|
|
591
|
+
muid?: string;
|
|
592
|
+
messageId?: number;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
export declare interface ChatUserProfile {
|
|
596
|
+
uid: string;
|
|
597
|
+
name: string;
|
|
598
|
+
avatar?: string;
|
|
599
|
+
status?: PresenceStatus;
|
|
600
|
+
lastSeen?: Date;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
declare function clearChatCount(chatUid: string): Promise<void>;
|
|
604
|
+
|
|
605
|
+
export declare type ComposerFormatCommand = "bold" | "italic" | "underline";
|
|
606
|
+
|
|
607
|
+
export declare type ComposerFormattingMode = "default" | "external";
|
|
608
|
+
|
|
609
|
+
export declare interface ComposerSelectionRect {
|
|
610
|
+
x: number;
|
|
611
|
+
y: number;
|
|
612
|
+
top: number;
|
|
613
|
+
right: number;
|
|
614
|
+
bottom: number;
|
|
615
|
+
left: number;
|
|
616
|
+
width: number;
|
|
617
|
+
height: number;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
export declare interface ComposerSelectionState {
|
|
621
|
+
text: string;
|
|
622
|
+
href?: string;
|
|
623
|
+
rect: ComposerSelectionRect;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
declare function connect(connectionName?: string): Promise<void>;
|
|
627
|
+
|
|
628
|
+
export declare function createChatClient({ environment }: CreateChatClientOptions): ChatClient;
|
|
629
|
+
|
|
630
|
+
declare interface CreateChatClientOptions {
|
|
631
|
+
environment: Environment;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
declare const _default: typeof __VLS_export;
|
|
635
|
+
export { _default as BccChat }
|
|
636
|
+
export { _default as BccChatMessageList }
|
|
637
|
+
|
|
638
|
+
declare function disconnect(connectionName?: string): Promise<void>;
|
|
639
|
+
|
|
640
|
+
declare function disconnectAll(): Promise<void>;
|
|
641
|
+
|
|
642
|
+
export declare interface DispatchData {
|
|
643
|
+
muid: string;
|
|
644
|
+
originalChatUid: string;
|
|
645
|
+
scheduleDate: string;
|
|
646
|
+
messageId: number;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
export declare type Environment = "prod" | "sandbox";
|
|
650
|
+
|
|
651
|
+
export declare interface ForwardMessageTarget {
|
|
652
|
+
chatUid: string;
|
|
653
|
+
type: "user" | "group";
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
export declare interface FuseResultMatch {
|
|
657
|
+
indices: ReadonlyArray<[number, number]>;
|
|
658
|
+
key?: {
|
|
659
|
+
src: string;
|
|
660
|
+
} | string;
|
|
661
|
+
value?: string;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
declare function getChatMembersInfo(chatUid: string): Promise<ParticipantInfo[]>;
|
|
665
|
+
|
|
666
|
+
declare function getChatOnlineCount(chatUid: string): Promise<number>;
|
|
667
|
+
|
|
668
|
+
declare function getComposerSelection(target?: ChatComposerTarget): ChatComposerSelectionState | null;
|
|
669
|
+
|
|
670
|
+
declare function getCurrentEnvironment(): ChatEnvironmentConfig;
|
|
671
|
+
|
|
672
|
+
declare function getGroup(groupUid: string, throwErrors?: boolean): Promise<Group | null | undefined>;
|
|
673
|
+
|
|
674
|
+
declare function getMessageTextPreview(message?: any, showEmoji?: boolean, showAttachmentName?: boolean): string;
|
|
675
|
+
|
|
676
|
+
declare function getMutedUntil(chatUid: string): Promise<string | null>;
|
|
677
|
+
|
|
678
|
+
declare function getMyChatSettings(): Promise<PersonSettings>;
|
|
679
|
+
|
|
680
|
+
declare function getSenderDisplayName(message: any, group?: Ref<{
|
|
681
|
+
getMetadata?: () => Record<string, any>;
|
|
682
|
+
} | undefined>): any;
|
|
683
|
+
|
|
684
|
+
declare function getUserChats(): Promise<{
|
|
685
|
+
chatUid: string;
|
|
686
|
+
type: ChatConversationItem["type"];
|
|
687
|
+
name: string;
|
|
688
|
+
unreadMessageCount: number;
|
|
689
|
+
lastMessage?: {
|
|
690
|
+
text?: string | undefined;
|
|
691
|
+
type: string;
|
|
692
|
+
senderUid: string;
|
|
693
|
+
senderName: string;
|
|
694
|
+
sentAt: Date;
|
|
695
|
+
sentByCurrentUser: boolean;
|
|
696
|
+
readAt: Date | undefined;
|
|
697
|
+
messageReceipts?: {
|
|
698
|
+
RECEIPT_TYPE: {
|
|
699
|
+
READ_RECEIPT: string;
|
|
700
|
+
DELIVERY_RECEIPT: string;
|
|
701
|
+
READ_BY_ALL_RECEIPT: string;
|
|
702
|
+
DELIVERED_TO_ALL_RECEIPT: string;
|
|
703
|
+
};
|
|
704
|
+
getReceiverType: () => string;
|
|
705
|
+
setReceiverType: (receiverType: string) => void;
|
|
706
|
+
getSender: () => User;
|
|
707
|
+
setSender: (sender: User) => void;
|
|
708
|
+
getReceiver: () => string;
|
|
709
|
+
setReceiver: (receiver: string) => void;
|
|
710
|
+
getTimestamp: () => string;
|
|
711
|
+
setTimestamp: (timestamp: string) => void;
|
|
712
|
+
setReadAt: (readAt: number) => void;
|
|
713
|
+
getReadAt: () => number;
|
|
714
|
+
setDeliveredAt: (deliveredAt: number) => void;
|
|
715
|
+
getDeliveredAt: () => number;
|
|
716
|
+
getMessageId: () => string;
|
|
717
|
+
setMessageId: (messageId: string) => void;
|
|
718
|
+
getReceiptType: () => string;
|
|
719
|
+
setReceiptType: (receiptType?: string) => void;
|
|
720
|
+
}[] | undefined;
|
|
721
|
+
} | undefined;
|
|
722
|
+
membersCount: number;
|
|
723
|
+
tags: string[];
|
|
724
|
+
muteSettings?: (Date | null) | undefined;
|
|
725
|
+
hasJoined: boolean;
|
|
726
|
+
}[]>;
|
|
727
|
+
|
|
728
|
+
declare function initiateDirectMessage(userUid: string): Promise<ChatConversationItem>;
|
|
729
|
+
|
|
730
|
+
declare function initiateDirectMessage_2(userUid: string): Promise<ChatConversationItem>;
|
|
731
|
+
|
|
732
|
+
declare function install(app: App, options: ChatInstallOptions): Promise<void>;
|
|
733
|
+
|
|
734
|
+
declare function isMessagePinned(messageId: string): boolean;
|
|
735
|
+
|
|
736
|
+
export declare type Language = "nb" | "no" | "ar" | "de" | "en" | "es" | "fr" | "hi" | "ms" | "pt" | "ru" | "zh" | "zh-tw" | "sv" | "lt";
|
|
737
|
+
|
|
738
|
+
export declare interface LogEntry {
|
|
739
|
+
logUid: string;
|
|
740
|
+
correlationUid?: string;
|
|
741
|
+
message: string;
|
|
742
|
+
severity: LogSeverity;
|
|
743
|
+
userMetadata?: Record<string, unknown>;
|
|
744
|
+
timestamp: string;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
declare function login(accessToken?: string): Promise<void>;
|
|
748
|
+
|
|
749
|
+
declare function logout(): Promise<void>;
|
|
750
|
+
|
|
751
|
+
export declare enum LogSeverity {
|
|
752
|
+
DEBUG = "Debug",
|
|
753
|
+
INFO = "Info",
|
|
754
|
+
WARN = "Warn",
|
|
755
|
+
ERROR = "Error"
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
export declare interface MessageInfo {
|
|
759
|
+
text?: string;
|
|
760
|
+
type: string;
|
|
761
|
+
senderUid: string;
|
|
762
|
+
senderName: string;
|
|
763
|
+
sentAt: Date;
|
|
764
|
+
sentByCurrentUser: boolean;
|
|
765
|
+
readAt: Date | undefined;
|
|
766
|
+
messageReceipts?: MessageReceipt[];
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
export declare interface MessageSendOptions {
|
|
770
|
+
senderDisplayName?: string;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
declare function muteChat(chatUid: string, mutedUntil: string | null): Promise<string | null>;
|
|
774
|
+
|
|
775
|
+
export declare type OnlineStatus = "online" | "offline";
|
|
776
|
+
|
|
777
|
+
export declare interface ParticipantInfo {
|
|
778
|
+
uid: string;
|
|
779
|
+
displayName: string;
|
|
780
|
+
avatar: string;
|
|
781
|
+
role: string;
|
|
782
|
+
status?: PresenceStatus;
|
|
783
|
+
lastSeen?: Date;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
export declare interface ParticipantSettings {
|
|
787
|
+
chatUid: string;
|
|
788
|
+
personUid: string;
|
|
789
|
+
mutedUntil: string | null;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
export declare interface PersonSettings {
|
|
793
|
+
mutedAll: boolean;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
declare function pinMessage(message: ChatMessageItem): Promise<void>;
|
|
797
|
+
|
|
798
|
+
export declare interface PollComposerInput {
|
|
799
|
+
question: string;
|
|
800
|
+
options: string[];
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
export declare type PresenceStatus = "online" | "offline";
|
|
804
|
+
|
|
805
|
+
declare function proxyImage(imageUrl: string): string;
|
|
806
|
+
|
|
807
|
+
declare function requestComposerLink(target?: ChatComposerTarget): boolean;
|
|
808
|
+
|
|
809
|
+
export declare interface RescheduleMessageInput {
|
|
810
|
+
messageId: number;
|
|
811
|
+
muid: string;
|
|
812
|
+
originalChatUid: string;
|
|
813
|
+
scheduleDate: string;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
declare function retrieveCcToken(): StoredCometChatToken | null;
|
|
817
|
+
|
|
818
|
+
export declare interface ScheduleMessageInput {
|
|
819
|
+
scheduleDate: string;
|
|
820
|
+
text?: string;
|
|
821
|
+
file?: File;
|
|
822
|
+
caption?: string;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
declare function scrollToMessage(messageId: string): void;
|
|
826
|
+
|
|
827
|
+
declare function scrollToMessage_2(messageId: string): Promise<void>;
|
|
828
|
+
|
|
829
|
+
export declare interface SearchedItems {
|
|
830
|
+
conversations: {
|
|
831
|
+
conversation: ChatConversationItem;
|
|
832
|
+
matches: FuseResultMatch[];
|
|
833
|
+
}[];
|
|
834
|
+
messages: {
|
|
835
|
+
message: ChatMessageItem;
|
|
836
|
+
matches: FuseResultMatch[];
|
|
837
|
+
}[];
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
declare function setAccessToken(token: string): Promise<void>;
|
|
841
|
+
|
|
842
|
+
declare function setEnvironment(environment: Environment): void;
|
|
843
|
+
|
|
844
|
+
declare function setGetChatMessagesCallback(chatMessageGetter: ChatMessagesGetter | undefined): void;
|
|
845
|
+
|
|
846
|
+
declare function setLanguage(language: Language): void;
|
|
847
|
+
|
|
848
|
+
declare function setMuteAll(mute: boolean): Promise<boolean>;
|
|
849
|
+
|
|
850
|
+
declare function setThemeMode(mode: ThemeMode): void;
|
|
851
|
+
|
|
852
|
+
declare interface StoredCometChatToken {
|
|
853
|
+
sub: string;
|
|
854
|
+
token: string;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
export declare type ThemeMode = "dark" | "light";
|
|
858
|
+
|
|
859
|
+
declare function toggleMuteAll(): Promise<boolean>;
|
|
860
|
+
|
|
861
|
+
declare function togglePinnedMessage(message: ChatMessageItem): Promise<void>;
|
|
862
|
+
|
|
863
|
+
declare function toMarkdownHtml(str: string, mentionedUsers?: any[]): string;
|
|
864
|
+
|
|
865
|
+
declare function unpinMessage(messageId: string): Promise<void>;
|
|
866
|
+
|
|
867
|
+
declare function updateMyChatSettings(settings: Partial<PersonSettings>): Promise<PersonSettings>;
|
|
868
|
+
|
|
869
|
+
export declare interface UserChatInfo {
|
|
870
|
+
chatUid: string;
|
|
871
|
+
type: ChatConversationItem["type"];
|
|
872
|
+
name: string;
|
|
873
|
+
unreadMessageCount: number;
|
|
874
|
+
lastMessage?: MessageInfo;
|
|
875
|
+
membersCount: number;
|
|
876
|
+
tags: string[];
|
|
877
|
+
muteSettings?: Date | null;
|
|
878
|
+
hasJoined: boolean;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
export declare interface View {
|
|
882
|
+
componentName: string;
|
|
883
|
+
props?: Record<string, unknown>;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
export { }
|