@majikah/majik-message 0.3.6 → 0.3.8
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/README.md +3 -3
- package/dist/core/client-state-manager.d.ts +105 -0
- package/dist/core/client-state-manager.js +250 -0
- package/dist/core/contacts/majik-contact-directory.d.ts +0 -5
- package/dist/core/contacts/majik-contact-directory.js +0 -12
- package/dist/core/contacts/majik-contact-groups.d.ts +1 -0
- package/dist/core/contacts/majik-contact-groups.js +5 -0
- package/dist/core/contacts/majik-contact-manager.d.ts +99 -185
- package/dist/core/contacts/majik-contact-manager.js +469 -289
- package/dist/core/contacts/types.d.ts +1 -0
- package/dist/core/crypto/keystore-manager.d.ts +166 -0
- package/dist/core/crypto/keystore-manager.js +371 -0
- package/dist/core/storage/chats/_types.d.ts +8 -0
- package/dist/core/storage/chats/_types.js +1 -0
- package/dist/core/storage/chats/adapter-idb.d.ts +3 -0
- package/dist/core/storage/chats/adapter-idb.js +5 -0
- package/dist/core/storage/chats/adapter-memory.d.ts +23 -0
- package/dist/core/storage/chats/adapter-memory.js +44 -0
- package/dist/core/storage/chats/adapter-sql.d.ts +17 -0
- package/dist/core/storage/chats/adapter-sql.js +85 -0
- package/dist/core/storage/client-state/_types.d.ts +37 -0
- package/dist/core/storage/client-state/_types.js +16 -0
- package/dist/core/storage/client-state/adapter-idb.d.ts +17 -0
- package/dist/core/storage/client-state/adapter-idb.js +19 -0
- package/dist/core/storage/client-state/adapter-memory.d.ts +20 -0
- package/dist/core/storage/client-state/adapter-memory.js +44 -0
- package/dist/core/storage/client-state/adapter-sql.d.ts +41 -0
- package/dist/core/storage/client-state/adapter-sql.js +104 -0
- package/dist/core/storage/contact-directory/contacts/_types.d.ts +3 -0
- package/dist/core/storage/contact-directory/contacts/_types.js +1 -0
- package/dist/core/storage/contact-directory/contacts/adapter-idb.d.ts +3 -0
- package/dist/core/storage/contact-directory/contacts/adapter-idb.js +5 -0
- package/dist/core/storage/contact-directory/contacts/adapter-memory.d.ts +14 -0
- package/dist/core/storage/contact-directory/contacts/adapter-memory.js +32 -0
- package/dist/core/storage/contact-directory/contacts/adapter-sql.d.ts +18 -0
- package/dist/core/storage/contact-directory/contacts/adapter-sql.js +97 -0
- package/dist/core/storage/contact-directory/groups/_types.d.ts +3 -0
- package/dist/core/storage/contact-directory/groups/_types.js +1 -0
- package/dist/core/storage/contact-directory/groups/adapter-idb.d.ts +3 -0
- package/dist/core/storage/contact-directory/groups/adapter-idb.js +5 -0
- package/dist/core/storage/contact-directory/groups/adapter-memory.d.ts +14 -0
- package/dist/core/storage/contact-directory/groups/adapter-memory.js +32 -0
- package/dist/core/storage/contact-directory/groups/adapter-sql.d.ts +16 -0
- package/dist/core/storage/contact-directory/groups/adapter-sql.js +72 -0
- package/dist/core/storage/idb-adapter.d.ts +21 -0
- package/dist/core/storage/idb-adapter.js +107 -0
- package/dist/core/storage/index.d.ts +24 -0
- package/dist/core/storage/index.js +19 -0
- package/dist/core/storage/keystore/_types.d.ts +3 -0
- package/dist/core/storage/keystore/_types.js +1 -0
- package/dist/core/storage/keystore/adapter-idb.d.ts +3 -0
- package/dist/core/storage/keystore/adapter-idb.js +5 -0
- package/dist/core/storage/keystore/adapter-memory.d.ts +14 -0
- package/dist/core/storage/keystore/adapter-memory.js +32 -0
- package/dist/core/storage/keystore/adapter-sql.d.ts +18 -0
- package/dist/core/storage/keystore/adapter-sql.js +93 -0
- package/dist/core/storage/sql-db-manager.d.ts +13 -0
- package/dist/core/storage/sql-db-manager.js +59 -0
- package/dist/core/storage/sql-schema.d.ts +25 -0
- package/dist/core/storage/sql-schema.js +122 -0
- package/dist/core/storage/storage-adapter.d.ts +22 -0
- package/dist/core/storage/storage-adapter.js +1 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.js +2 -4
- package/dist/majik-message.d.ts +114 -174
- package/dist/majik-message.js +449 -675
- package/package.json +5 -6
|
@@ -2,235 +2,149 @@ import { MajikContact, MajikContactData, MajikContactGroup, MajikContactGroupMet
|
|
|
2
2
|
import { MajikContactDirectory } from "./majik-contact-directory";
|
|
3
3
|
import { MajikContactGroupManager } from "./majik-contact-groups";
|
|
4
4
|
import { MAJIK_API_RESPONSE } from "../types";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
* - Wires lifecycle hooks automatically so callers can never forget them:
|
|
15
|
-
* • removeContact() → always calls groups.handleContactRemoved()
|
|
16
|
-
* • blockContact() → always syncs the Blocked system group
|
|
17
|
-
* • unblockContact() → always syncs the Blocked system group
|
|
18
|
-
* - Exposes the group manager via `.group` for all group-specific operations
|
|
19
|
-
* - Serializes both directory and groups into one unified payload for
|
|
20
|
-
* MajikMessage.toJSON() / MajikMessage.fromJSON()
|
|
21
|
-
*
|
|
22
|
-
* Construction:
|
|
23
|
-
* - Pass nothing → fresh directory + fresh group manager (new session)
|
|
24
|
-
* - Pass a directory → wraps it, creates a fresh group manager bound to it
|
|
25
|
-
* - Pass both → fully restores a prior session (used by fromJSON)
|
|
26
|
-
*/
|
|
5
|
+
import { ContactManagerQueryMode, MajikContactManagerJSON } from "./types";
|
|
6
|
+
import { MajikContactStorageAdapter } from "../storage/contact-directory/contacts/_types";
|
|
7
|
+
import { MajikContactGroupStorageAdapter } from "../storage/contact-directory/groups/_types";
|
|
8
|
+
import { MajikRecipient } from "@majikah/majik-envelope";
|
|
9
|
+
import { ExpectedSigner } from "@majikah/majik-signature";
|
|
10
|
+
export interface MajikContactManagerAdapters {
|
|
11
|
+
contacts?: MajikContactStorageAdapter;
|
|
12
|
+
groups?: MajikContactGroupStorageAdapter;
|
|
13
|
+
}
|
|
27
14
|
export declare class MajikContactManager {
|
|
28
15
|
private readonly directory;
|
|
29
16
|
private readonly groupManager;
|
|
30
|
-
|
|
17
|
+
private _contactAdapter;
|
|
18
|
+
private _groupAdapter;
|
|
19
|
+
constructor(directory?: MajikContactDirectory, groupManager?: MajikContactGroupManager, adapters?: MajikContactManagerAdapters);
|
|
20
|
+
get contactAdapter(): MajikContactStorageAdapter;
|
|
21
|
+
get groupAdapter(): MajikContactGroupStorageAdapter;
|
|
31
22
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
23
|
+
* Swap both adapters at runtime. Does NOT migrate data.
|
|
24
|
+
*
|
|
25
|
+
* Migration pattern:
|
|
26
|
+
* ```ts
|
|
27
|
+
* const snap = await manager.toJSON();
|
|
28
|
+
* manager.setAdapters({ contacts: new IDBContactAdapter(), groups: new IDBGroupAdapter() });
|
|
29
|
+
* await manager.hydrate(); // warms from new (empty) adapters
|
|
30
|
+
* await manager.bulkRestoreFromJSON(snap); // writes old data into new adapters
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
setAdapters(adapters: MajikContactManagerAdapters): void;
|
|
34
|
+
/**
|
|
35
|
+
* Load all contacts and groups from the adapters into the in-memory
|
|
36
|
+
* directory and group manager. Call once after construction (or after
|
|
37
|
+
* swapping adapters).
|
|
38
|
+
*
|
|
39
|
+
* Restoration order:
|
|
40
|
+
* 1. Contacts — must come first so groups can validate member existence.
|
|
41
|
+
* 2. Groups — restored via groupManager.fromJSON() which rebuilds the
|
|
42
|
+
* reverse index and re-bootstraps system groups.
|
|
43
|
+
* 3. Orphan pruning — any group member ID not present in the restored
|
|
44
|
+
* directory is silently removed (guards against data drift).
|
|
38
45
|
*/
|
|
39
|
-
|
|
46
|
+
hydrate(): Promise<void>;
|
|
40
47
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* directly — they keep group state in sync automatically.
|
|
48
|
+
* Persists a single contact to the adapter (called after every mutating
|
|
49
|
+
* operation that affects a contact's serialized form).
|
|
44
50
|
*/
|
|
45
|
-
|
|
46
|
-
addContact(contact: MajikContact): this;
|
|
47
|
-
addContacts(contacts: MajikContact[]): this;
|
|
51
|
+
private persistContact;
|
|
48
52
|
/**
|
|
49
|
-
*
|
|
50
|
-
* from every group they belong to via the group manager hook.
|
|
51
|
-
* The two operations are always atomic from the caller's perspective.
|
|
53
|
+
* Persists a single group to the adapter.
|
|
52
54
|
*/
|
|
53
|
-
|
|
54
|
-
getContact(id: string): MajikContact | undefined;
|
|
55
|
-
getContactByFingerprint(fingerprint: string): MajikContact | undefined;
|
|
56
|
-
getContactByPublicKeyBase64(publicKeyBase64: string): Promise<MajikContact | undefined>;
|
|
57
|
-
hasContact(id: string): boolean;
|
|
58
|
-
hasFingerprint(fingerprint: string): boolean;
|
|
59
|
-
hasContactByPublicKeyBase64(publicKeyBase64: string): Promise<boolean>;
|
|
60
|
-
listContacts(sortedByLabel?: boolean, majikahOnly?: boolean): MajikContact[];
|
|
61
|
-
updateContactMeta(id: string, meta: Partial<MajikContactData["meta"]>): MajikContact;
|
|
55
|
+
private persistGroup;
|
|
62
56
|
/**
|
|
63
|
-
*
|
|
64
|
-
* group — both sides are always kept in sync.
|
|
57
|
+
* Adds a contact to the directory and persists it to the adapter.
|
|
65
58
|
*/
|
|
66
|
-
|
|
59
|
+
addContact(contact: MajikContact): Promise<this>;
|
|
67
60
|
/**
|
|
68
|
-
*
|
|
69
|
-
* Blocked group — both sides are always kept in sync.
|
|
61
|
+
* Adds multiple contacts atomically — adapter write uses bulkSave.
|
|
70
62
|
*/
|
|
71
|
-
|
|
72
|
-
setMajikahStatus(id: string, status: boolean): MajikContact;
|
|
73
|
-
isMajikahRegistered(id: string): boolean;
|
|
74
|
-
isMajikahIdentityChecked(id: string): boolean;
|
|
75
|
-
hasContactForEnvelope(envelope: MessageEnvelope): boolean;
|
|
63
|
+
addContacts(contacts: MajikContact[]): Promise<this>;
|
|
76
64
|
/**
|
|
77
|
-
*
|
|
78
|
-
* Throws if a group with the same ID already exists.
|
|
65
|
+
* Removes a contact from the directory, all groups, and the adapter.
|
|
79
66
|
*/
|
|
80
|
-
|
|
67
|
+
removeContact(id: string): Promise<MAJIK_API_RESPONSE>;
|
|
81
68
|
/**
|
|
82
|
-
*
|
|
83
|
-
* Throws if a group with the same ID already exists.
|
|
69
|
+
* Updates contact metadata and persists the change.
|
|
84
70
|
*/
|
|
85
|
-
|
|
71
|
+
updateContactMeta(id: string, meta: Partial<MajikContactData["meta"]>): Promise<MajikContact>;
|
|
86
72
|
/**
|
|
87
|
-
*
|
|
88
|
-
* System groups (Favorites, Blocked) cannot be deleted.
|
|
73
|
+
* Blocks a contact and persists both the contact and the Blocked group.
|
|
89
74
|
*/
|
|
90
|
-
|
|
75
|
+
blockContact(id: string): Promise<MajikContact>;
|
|
91
76
|
/**
|
|
92
|
-
*
|
|
77
|
+
* Unblocks a contact and persists both the contact and the Blocked group.
|
|
93
78
|
*/
|
|
94
|
-
|
|
79
|
+
unblockContact(id: string): Promise<MajikContact>;
|
|
80
|
+
setMajikahStatus(id: string, status: boolean): Promise<MajikContact>;
|
|
95
81
|
/**
|
|
96
|
-
*
|
|
82
|
+
* Clears all contacts and groups from both the in-memory stores and adapters.
|
|
97
83
|
*/
|
|
84
|
+
clear(): Promise<this>;
|
|
85
|
+
getContact(id: string): MajikContact | undefined;
|
|
86
|
+
getContactByFingerprint(fingerprint: string): MajikContact | undefined;
|
|
87
|
+
getContactByPublicKeyBase64(publicKeyBase64: string): Promise<MajikContact | undefined>;
|
|
88
|
+
getContactsByIds(ids: string[], strict?: boolean): MajikContact[];
|
|
89
|
+
getContactsByPublicKeys(publicKeys: string[], strict?: boolean): Promise<MajikContact[]>;
|
|
90
|
+
getMajikRecipients(mode: ContactManagerQueryMode | undefined, input: string[], strict?: boolean): Promise<MajikRecipient[]>;
|
|
91
|
+
getExpectedSigners(mode: ContactManagerQueryMode | undefined, input: string[], strict?: boolean): Promise<ExpectedSigner[]>;
|
|
92
|
+
hasContact(id: string): boolean;
|
|
93
|
+
hasFingerprint(fingerprint: string): boolean;
|
|
94
|
+
hasContactByPublicKeyBase64(publicKeyBase64: string): Promise<boolean>;
|
|
95
|
+
listContacts(sortedByLabel?: boolean, majikahOnly?: boolean): MajikContact[];
|
|
96
|
+
isMajikahRegistered(id: string): boolean;
|
|
97
|
+
isMajikahIdentityChecked(id: string): boolean;
|
|
98
|
+
get group(): MajikContactGroupManager;
|
|
99
|
+
get directory_(): MajikContactDirectory;
|
|
100
|
+
createGroup(id: string, name: string, meta?: Partial<Omit<MajikContactGroupMeta, "name">>, initialMemberIds?: string[]): Promise<MajikContactGroup>;
|
|
101
|
+
addGroup(group: MajikContactGroup): Promise<this>;
|
|
102
|
+
removeGroup(id: string): Promise<MAJIK_API_RESPONSE>;
|
|
103
|
+
getGroup(id: string): MajikContactGroup | undefined;
|
|
98
104
|
getGroupOrThrow(id: string): MajikContactGroup;
|
|
99
|
-
/**
|
|
100
|
-
* Returns true if a group with the given ID exists.
|
|
101
|
-
*/
|
|
102
105
|
hasGroup(id: string): boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Returns all groups.
|
|
105
|
-
*
|
|
106
|
-
* @param includeSystem Include system groups (Favorites, Blocked). Default: true.
|
|
107
|
-
* @param sortedByName Sort results alphabetically by group name. Default: false.
|
|
108
|
-
*/
|
|
109
106
|
listGroups(includeSystem?: boolean, sortedByName?: boolean): MajikContactGroup[];
|
|
110
|
-
/**
|
|
111
|
-
* Returns only user-created groups (excludes Favorites and Blocked).
|
|
112
|
-
* Sorted alphabetically by name.
|
|
113
|
-
*/
|
|
114
107
|
listUserGroups(sortedByName?: boolean): MajikContactGroup[];
|
|
115
|
-
/**
|
|
116
|
-
* Returns only system groups (Favorites and Blocked).
|
|
117
|
-
*/
|
|
118
108
|
listSystemGroups(): MajikContactGroup[];
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
* Validates the contact exists in the directory.
|
|
127
|
-
* If the group is the system Blocked group, also calls contact.block().
|
|
128
|
-
* Throws if the contact is already a member — use addContactToGroupIfAbsent for idempotent.
|
|
129
|
-
*/
|
|
130
|
-
addContactToGroup(groupId: string, contactId: string): MajikContactGroup;
|
|
131
|
-
/**
|
|
132
|
-
* Idempotent variant — does not throw if the contact is already a member.
|
|
133
|
-
*/
|
|
134
|
-
addContactToGroupIfAbsent(groupId: string, contactId: string): MajikContactGroup;
|
|
135
|
-
/**
|
|
136
|
-
* Adds multiple contacts to a group in one call (all-or-nothing).
|
|
137
|
-
*/
|
|
138
|
-
addContactsToGroup(groupId: string, contactIds: string[]): MajikContactGroup;
|
|
139
|
-
/**
|
|
140
|
-
* Removes a contact from a group.
|
|
141
|
-
* If the group is the system Blocked group, also calls contact.unblock().
|
|
142
|
-
* Throws if the contact is not a member — use removeContactFromGroupIfPresent for idempotent.
|
|
143
|
-
*/
|
|
144
|
-
removeContactFromGroup(groupId: string, contactId: string): MajikContactGroup;
|
|
145
|
-
/**
|
|
146
|
-
* Idempotent variant — does not throw if the contact is not a member.
|
|
147
|
-
*/
|
|
148
|
-
removeContactFromGroupIfPresent(groupId: string, contactId: string): MajikContactGroup;
|
|
149
|
-
/**
|
|
150
|
-
* Moves a contact from one group to another atomically.
|
|
151
|
-
* Throws if the contact is not a member of the source group.
|
|
152
|
-
*/
|
|
153
|
-
moveContactBetweenGroups(contactId: string, fromGroupId: string, toGroupId: string): void;
|
|
154
|
-
/**
|
|
155
|
-
* Returns all hydrated MajikContact instances in the given group.
|
|
156
|
-
* Contacts removed from the directory since last save are silently skipped.
|
|
157
|
-
*/
|
|
109
|
+
updateGroupMeta(id: string, meta: Partial<Pick<MajikContactGroupMeta, "name" | "description" | "color">>): Promise<MajikContactGroup>;
|
|
110
|
+
addContactToGroup(groupId: string, contactId: string): Promise<MajikContactGroup>;
|
|
111
|
+
addContactToGroupIfAbsent(groupId: string, contactId: string): Promise<MajikContactGroup>;
|
|
112
|
+
addContactsToGroup(groupId: string, contactIds: string[]): Promise<MajikContactGroup>;
|
|
113
|
+
removeContactFromGroup(groupId: string, contactId: string): Promise<MajikContactGroup>;
|
|
114
|
+
removeContactFromGroupIfPresent(groupId: string, contactId: string): Promise<MajikContactGroup>;
|
|
115
|
+
moveContactBetweenGroups(contactId: string, fromGroupId: string, toGroupId: string): Promise<void>;
|
|
158
116
|
getContactsInGroup(groupId: string): MajikContact[];
|
|
159
|
-
/**
|
|
160
|
-
* Returns hydrated contacts in the group, sorted by label (or ID if no label).
|
|
161
|
-
*/
|
|
162
117
|
getContactsInGroupSorted(groupId: string): MajikContact[];
|
|
163
|
-
/**
|
|
164
|
-
* Returns true if the contact is a member of the given group.
|
|
165
|
-
*/
|
|
166
118
|
isContactInGroup(groupId: string, contactId: string): boolean;
|
|
167
|
-
/**
|
|
168
|
-
* Returns all groups the contact belongs to.
|
|
169
|
-
*/
|
|
170
119
|
getGroupsForContact(contactId: string): MajikContactGroup[];
|
|
171
|
-
/**
|
|
172
|
-
* Returns all group IDs the contact belongs to.
|
|
173
|
-
*/
|
|
174
120
|
getGroupIdsForContact(contactId: string): string[];
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
*/
|
|
178
|
-
addToFavorites(contactId: string): MajikContactGroup;
|
|
179
|
-
/**
|
|
180
|
-
* Removes the contact from the Favorites group (idempotent).
|
|
181
|
-
*/
|
|
182
|
-
removeFromFavorites(contactId: string): MajikContactGroup;
|
|
183
|
-
/**
|
|
184
|
-
* Returns true if the contact is in the Favorites group.
|
|
185
|
-
*/
|
|
121
|
+
addToFavorites(contactId: string): Promise<MajikContactGroup>;
|
|
122
|
+
removeFromFavorites(contactId: string): Promise<MajikContactGroup>;
|
|
186
123
|
isFavorite(contactId: string): boolean;
|
|
187
|
-
/**
|
|
188
|
-
* Returns true if the contact is in the Blocked group.
|
|
189
|
-
*/
|
|
190
124
|
isContactBlocked(contactId: string): boolean;
|
|
191
|
-
/**
|
|
192
|
-
* Returns the Favorites system group instance.
|
|
193
|
-
*/
|
|
194
125
|
getFavoritesGroup(): MajikContactGroup;
|
|
195
|
-
/**
|
|
196
|
-
* Returns the Blocked system group instance.
|
|
197
|
-
*/
|
|
198
126
|
getBlockedGroup(): MajikContactGroup;
|
|
199
|
-
/**
|
|
200
|
-
* Returns all contacts in the Favorites group as hydrated MajikContact instances.
|
|
201
|
-
*/
|
|
202
127
|
getFavoriteContacts(): MajikContact[];
|
|
203
|
-
/**
|
|
204
|
-
* Returns all contacts in the Blocked group as hydrated MajikContact instances.
|
|
205
|
-
*/
|
|
206
128
|
getBlockedContacts(): MajikContact[];
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
* Serializes both the directory and all groups into a single unified payload.
|
|
214
|
-
* This is what MajikMessage.toJSON() should persist.
|
|
215
|
-
*/
|
|
129
|
+
exportContactAsJSON(contactId: string): Promise<string | null>;
|
|
130
|
+
exportContactAsString(contactId: string): Promise<string | null>;
|
|
131
|
+
importContactFromJSON(jsonStr: string): Promise<MAJIK_API_RESPONSE>;
|
|
132
|
+
importContactFromString(base64Str: string): Promise<MAJIK_API_RESPONSE>;
|
|
133
|
+
exportContactCompressed(contact: MajikContact): Promise<string>;
|
|
134
|
+
importContactCompressed(base64Str: string): Promise<MajikContact>;
|
|
216
135
|
toJSON(): Promise<MajikContactManagerJSON>;
|
|
217
136
|
/**
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* 1. Restore the directory (contacts + crypto keys)
|
|
222
|
-
* 2. Restore groups via the group manager
|
|
223
|
-
* 3. Silently strip any group member IDs that no longer exist in the
|
|
224
|
-
* restored directory (orphan pruning) — guards against data drift
|
|
225
|
-
* between directory and group state across serialization rounds
|
|
226
|
-
*
|
|
227
|
-
* @param data The payload produced by toJSON().
|
|
137
|
+
* Restore from a JSON snapshot into the current adapters.
|
|
138
|
+
* Writes all contacts and groups through to the adapters.
|
|
139
|
+
* Used after setAdapters() to migrate data into a new store.
|
|
228
140
|
*/
|
|
229
|
-
|
|
141
|
+
bulkRestoreFromJSON(data: MajikContactManagerJSON): Promise<void>;
|
|
142
|
+
static fromJSON(data: MajikContactManagerJSON, adapters?: MajikContactManagerAdapters): Promise<MajikContactManager>;
|
|
230
143
|
/**
|
|
231
|
-
*
|
|
232
|
-
*
|
|
144
|
+
* Persists every group currently in the group manager to the adapter.
|
|
145
|
+
* Used after bulk contact removal where multiple groups may be affected.
|
|
233
146
|
*/
|
|
147
|
+
private _persistAllGroups;
|
|
234
148
|
private static pruneOrphanedMembers;
|
|
235
149
|
private assertGroupManagerInstance;
|
|
236
150
|
}
|