@bcc-code/vue-bcc-chat-ui 6.4.1 → 6.5.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/chat/accessToken.d.ts +1 -0
- package/dist/chat/cacheScope.d.ts +13 -0
- package/dist/chat/data.d.ts +5 -2
- package/dist/chat/index.d.ts +3 -0
- package/dist/offline/index.d.ts +1 -0
- package/dist/offline/offlineStoreLocalStorage.d.ts +4 -1
- package/dist/offline/types.d.ts +3 -1
- package/dist/vue-bcc-chat-ui.js +10837 -10686
- package/dist/vue-bcc-chat-ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function getChatCacheScope(): string | null;
|
|
2
|
+
export declare function getChatCacheOwner(): string | null;
|
|
3
|
+
/**
|
|
4
|
+
* Ensures a cache scope exists for the given owner. Reuses the current scope
|
|
5
|
+
* when the owner has not changed; rotates it otherwise.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ensureChatCacheScope(ownerId: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Clears the in-memory mirrors so the next read re-fetches from localStorage.
|
|
10
|
+
* Only needed in tests where localStorage is cleared between runs without
|
|
11
|
+
* reloading the module.
|
|
12
|
+
*/
|
|
13
|
+
export declare function resetCacheScopeForTesting(): void;
|
package/dist/chat/data.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { BaseMessage, Group, User } from '@cometchat/chat-sdk-javascript';
|
|
2
|
-
import { Ref } from 'vue';
|
|
2
|
+
import { Ref, WatchHandle } from 'vue';
|
|
3
3
|
import { ParticipantInfo, PersonSettings, SearchedItems, UserChatInfo } from './types';
|
|
4
|
+
export declare const userChats: Ref<UserChatInfo[]>;
|
|
4
5
|
export declare function getGroup(groupUid: string): Promise<Group | null | undefined>;
|
|
5
6
|
export declare function clearGroupChatCount(groupUid: string): Promise<void>;
|
|
6
7
|
export declare function getGroupOnlineCount(groupUid: string): Promise<number>;
|
|
7
8
|
export declare function getGroupMembersInfo(groupUid: string): Promise<ParticipantInfo[]>;
|
|
8
|
-
export declare const userChats: Ref<UserChatInfo[]>;
|
|
9
9
|
export declare function getUserChats(): Promise<UserChatInfo[]>;
|
|
10
|
+
export declare function clearUserChats(): void;
|
|
11
|
+
export declare function restoreUserChatsFromOfflineStore(): UserChatInfo[];
|
|
12
|
+
export declare function installUserChatsSync(initialized: Ref<boolean>): WatchHandle;
|
|
10
13
|
export declare function searchChat(searchQuery: string, limit?: number): SearchedItems | undefined;
|
|
11
14
|
export declare function scrollToMessage(messageId: string): void;
|
|
12
15
|
export declare function getSenderDisplayName(message: BaseMessage | undefined, group?: Ref<Group | undefined>): any;
|
package/dist/chat/index.d.ts
CHANGED
|
@@ -430,6 +430,9 @@ declare const _default: {
|
|
|
430
430
|
getGroupOnlineCount(groupUid: string): Promise<number>;
|
|
431
431
|
getGroupMembersInfo(groupUid: string): Promise<import('./types').ParticipantInfo[]>;
|
|
432
432
|
getUserChats(): Promise<import('./types').UserChatInfo[]>;
|
|
433
|
+
clearUserChats(): void;
|
|
434
|
+
restoreUserChatsFromOfflineStore(): import('./types').UserChatInfo[];
|
|
435
|
+
installUserChatsSync(initialized: Ref<boolean>): import('vue').WatchHandle;
|
|
433
436
|
searchChat(searchQuery: string, limit?: number): import('./types').SearchedItems | undefined;
|
|
434
437
|
scrollToMessage(messageId: string): void;
|
|
435
438
|
getSenderDisplayName(message: import('@cometchat/chat-sdk-javascript').BaseMessage | undefined, group?: Ref<import('@cometchat/chat-sdk-javascript').Group | undefined>): any;
|
package/dist/offline/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OfflineStore } from './types.js';
|
|
2
2
|
export declare let offlineStore: OfflineStore;
|
|
3
3
|
export declare function installOfflineCaching(): void;
|
|
4
|
+
export declare function setOfflineStoreScope(): void;
|
|
4
5
|
export declare function purgeLeftChatsFromCache(conversations: CometChat.Conversation[]): void;
|
|
5
6
|
declare const _default: {
|
|
6
7
|
installOfflineCaching: typeof installOfflineCaching;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { default as Fuse } from 'fuse.js';
|
|
2
|
-
import { CachedLastMessage, CachedParticipantSettings } from '../chat/types';
|
|
2
|
+
import { CachedLastMessage, CachedParticipantSettings, UserChatInfo } from '../chat/types';
|
|
3
3
|
import { Conversation, ConversationPaginationMeta, Group, Message, MessagePaginationMeta, OfflineStore, PaginatedResponse } from './types';
|
|
4
4
|
export declare class OfflineStoreLocalStorage implements OfflineStore {
|
|
5
5
|
#private;
|
|
6
6
|
storePrefix: string;
|
|
7
7
|
constructor(storePrefix?: string);
|
|
8
|
+
setStorePrefix(storePrefix: string, scopedPrefix?: string, clearOtherScopedKeys?: boolean): void;
|
|
8
9
|
getGroupMessages(groupId: string, pagination: MessagePaginationMeta): PaginatedResponse<Message>;
|
|
9
10
|
getThreadMessages(parentId: string, pagination: MessagePaginationMeta): PaginatedResponse<Message>;
|
|
10
11
|
getMessage(messageId: string): {
|
|
@@ -26,4 +27,6 @@ export declare class OfflineStoreLocalStorage implements OfflineStore {
|
|
|
26
27
|
storeSettings(participantSettings: CachedParticipantSettings): void;
|
|
27
28
|
getLastMessage(groupId: string): CachedLastMessage | null;
|
|
28
29
|
storeLastMessage(cachedLastMessage: CachedLastMessage): void;
|
|
30
|
+
getUserChats(): UserChatInfo[];
|
|
31
|
+
saveUserChats(userChats: UserChatInfo[]): void;
|
|
29
32
|
}
|
package/dist/offline/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as Fuse } from 'fuse.js';
|
|
2
|
-
import { CachedLastMessage, CachedParticipantSettings } from '../chat/types';
|
|
2
|
+
import { CachedLastMessage, CachedParticipantSettings, UserChatInfo } from '../chat/types';
|
|
3
3
|
export type ReqType = {
|
|
4
4
|
url: URL;
|
|
5
5
|
query: Record<string, any>;
|
|
@@ -62,6 +62,8 @@ export interface OfflineStore {
|
|
|
62
62
|
storeSettings(participantSettings: CachedParticipantSettings): void;
|
|
63
63
|
getLastMessage(groupId: string): CachedLastMessage | null;
|
|
64
64
|
storeLastMessage(lastMessage: CachedLastMessage): void;
|
|
65
|
+
getUserChats(): UserChatInfo[];
|
|
66
|
+
saveUserChats(userChats: UserChatInfo[]): void;
|
|
65
67
|
checkIfCachedMessagesIsExpired(): boolean;
|
|
66
68
|
updateExpiredCachedMessages(): Promise<void>;
|
|
67
69
|
}
|