@filen/sdk-rs 0.3.13 → 0.3.15
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/browser/sdk-rs.d.ts +305 -122
- package/browser/sdk-rs.js +665 -228
- package/browser/sdk-rs_bg.wasm +0 -0
- package/browser/sdk-rs_bg.wasm.d.ts +85 -38
- package/package.json +1 -1
package/browser/sdk-rs.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function main_js(): void;
|
|
4
3
|
export function login(email: string, password: string, twoFactorCode?: string | null): Promise<Client>;
|
|
4
|
+
export function main_js(): void;
|
|
5
5
|
export function fromStringified(serialized: StringifiedClient): Client;
|
|
6
6
|
/**
|
|
7
7
|
* The `ReadableStreamType` enum.
|
|
@@ -33,65 +33,60 @@ export interface FileMetaChanges {
|
|
|
33
33
|
created?: bigint | null;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
export type DirEnum = Dir | Root;
|
|
37
|
+
|
|
38
|
+
export interface SharedDir {
|
|
39
|
+
dir: DirWithMetaEnum;
|
|
40
|
+
sharingRole: SharingRole;
|
|
41
|
+
writeAccess: boolean;
|
|
39
42
|
}
|
|
40
43
|
|
|
41
|
-
export interface
|
|
44
|
+
export interface RootWithMeta {
|
|
42
45
|
uuid: UuidStr;
|
|
43
|
-
parent: ParentUuid;
|
|
44
46
|
color: DirColor;
|
|
45
47
|
timestamp: bigint;
|
|
46
|
-
favorited: boolean;
|
|
47
48
|
meta?: DecryptedDirMeta;
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
export
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
export interface SharedDir {
|
|
55
|
-
dir: DirWithMetaEnum;
|
|
56
|
-
sharingRole: SharingRole;
|
|
57
|
-
writeAccess: boolean;
|
|
51
|
+
export interface DecryptedDirMeta {
|
|
52
|
+
name: string;
|
|
53
|
+
created?: bigint;
|
|
58
54
|
}
|
|
59
55
|
|
|
60
|
-
export type
|
|
56
|
+
export type AnyDirEnum = Dir | RootWithMeta | Root;
|
|
61
57
|
|
|
62
|
-
export interface
|
|
58
|
+
export interface Dir {
|
|
63
59
|
uuid: UuidStr;
|
|
60
|
+
parent: ParentUuid;
|
|
64
61
|
color: DirColor;
|
|
65
62
|
timestamp: bigint;
|
|
63
|
+
favorited: boolean;
|
|
66
64
|
meta?: DecryptedDirMeta;
|
|
67
65
|
}
|
|
68
66
|
|
|
67
|
+
export type DirWithMetaEnum = Dir | RootWithMeta;
|
|
68
|
+
|
|
69
69
|
export interface Root {
|
|
70
70
|
uuid: UuidStr;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
export type DirColor = "default" | "blue" | "green" | "purple" | "red" | "gray" | string;
|
|
74
74
|
|
|
75
|
-
export type
|
|
75
|
+
export type AnyDirEnumWithShareInfo = Dir | SharedDir | Root;
|
|
76
76
|
|
|
77
|
-
export interface
|
|
77
|
+
export interface File {
|
|
78
78
|
uuid: UuidStr;
|
|
79
|
+
meta?: DecryptedFileMeta;
|
|
80
|
+
parent: ParentUuid;
|
|
79
81
|
size: bigint;
|
|
80
|
-
|
|
82
|
+
favorited: boolean;
|
|
81
83
|
region: string;
|
|
82
84
|
bucket: string;
|
|
83
85
|
timestamp: bigint;
|
|
84
|
-
|
|
86
|
+
chunks: bigint;
|
|
85
87
|
canMakeThumbnail: boolean;
|
|
86
88
|
}
|
|
87
89
|
|
|
88
|
-
export interface FileMetaChanges {
|
|
89
|
-
name: string | undefined;
|
|
90
|
-
mime: string | undefined;
|
|
91
|
-
lastModified: DateTime<Utc> | undefined;
|
|
92
|
-
created: DateTime<Utc> | undefined | undefined;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
90
|
export interface DecryptedFileMeta {
|
|
96
91
|
name: string;
|
|
97
92
|
mime: string;
|
|
@@ -108,21 +103,19 @@ export interface SharedFile {
|
|
|
108
103
|
sharingRole: SharingRole;
|
|
109
104
|
}
|
|
110
105
|
|
|
111
|
-
export
|
|
106
|
+
export type FileEnum = File | RootFile;
|
|
107
|
+
|
|
108
|
+
export interface RootFile {
|
|
112
109
|
uuid: UuidStr;
|
|
113
|
-
meta?: DecryptedFileMeta;
|
|
114
|
-
parent: ParentUuid;
|
|
115
110
|
size: bigint;
|
|
116
|
-
|
|
111
|
+
chunks: bigint;
|
|
117
112
|
region: string;
|
|
118
113
|
bucket: string;
|
|
119
114
|
timestamp: bigint;
|
|
120
|
-
|
|
115
|
+
meta?: DecryptedDirMeta;
|
|
121
116
|
canMakeThumbnail: boolean;
|
|
122
117
|
}
|
|
123
118
|
|
|
124
|
-
export type FileEnum = File | RootFile;
|
|
125
|
-
|
|
126
119
|
export interface FilePublicLink {
|
|
127
120
|
linkUuid: UuidStr;
|
|
128
121
|
password?: string | Uint8Array;
|
|
@@ -151,10 +144,15 @@ export interface UploadFileStreamParams extends UploadFileParams {
|
|
|
151
144
|
progress?: (bytes: bigint) => void;
|
|
152
145
|
}
|
|
153
146
|
|
|
154
|
-
export interface
|
|
147
|
+
export interface DownloadFileToZipParams {
|
|
148
|
+
items: Item[];
|
|
149
|
+
writer: WritableStream<Uint8Array>;
|
|
150
|
+
progress?: (bytesWritten: bigint, totalBytes: bigint, itemsProcessed: bigint, totalItems: bigint) => void;
|
|
155
151
|
managedFuture?: ManagedFuture;
|
|
156
152
|
}
|
|
157
153
|
|
|
154
|
+
export type NonRootItem = File | Dir;
|
|
155
|
+
|
|
158
156
|
export interface FileBuilderParams {
|
|
159
157
|
parent: DirEnum;
|
|
160
158
|
name: string;
|
|
@@ -163,8 +161,6 @@ export interface FileBuilderParams {
|
|
|
163
161
|
mime?: string;
|
|
164
162
|
}
|
|
165
163
|
|
|
166
|
-
export type NonRootItem = File | Dir;
|
|
167
|
-
|
|
168
164
|
export interface DownloadFileStreamParams {
|
|
169
165
|
file: FileEnum;
|
|
170
166
|
writer: WritableStream<Uint8Array>;
|
|
@@ -174,13 +170,97 @@ export interface DownloadFileStreamParams {
|
|
|
174
170
|
managedFuture?: ManagedFuture;
|
|
175
171
|
}
|
|
176
172
|
|
|
177
|
-
export interface
|
|
178
|
-
items: Item[];
|
|
179
|
-
writer: WritableStream<Uint8Array>;
|
|
180
|
-
progress?: (bytesWritten: bigint, totalBytes: bigint, itemsProcessed: bigint, totalItems: bigint) => void;
|
|
173
|
+
export interface UploadFileParams extends FileBuilderParams {
|
|
181
174
|
managedFuture?: ManagedFuture;
|
|
182
175
|
}
|
|
183
176
|
|
|
177
|
+
export interface ChatMessagePartial {
|
|
178
|
+
uuid: UuidStr;
|
|
179
|
+
senderId: bigint;
|
|
180
|
+
senderEmail: string;
|
|
181
|
+
senderAvatar?: string;
|
|
182
|
+
senderNickName: string;
|
|
183
|
+
message?: string;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface ChatParticipant {
|
|
187
|
+
userId: bigint;
|
|
188
|
+
email: string;
|
|
189
|
+
avatar?: string;
|
|
190
|
+
nickName: string;
|
|
191
|
+
permissionsAdd: boolean;
|
|
192
|
+
added: bigint;
|
|
193
|
+
appearOffline: boolean;
|
|
194
|
+
lastActive: bigint;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface Chat {
|
|
198
|
+
uuid: UuidStr;
|
|
199
|
+
lastMessage?: ChatMessage;
|
|
200
|
+
ownerId: bigint;
|
|
201
|
+
key?: string;
|
|
202
|
+
name?: string;
|
|
203
|
+
participants: ChatParticipant[];
|
|
204
|
+
muted: boolean;
|
|
205
|
+
created: bigint;
|
|
206
|
+
lastFocus: bigint;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface ChatMessage {
|
|
210
|
+
chat: UuidStr;
|
|
211
|
+
inner: ChatMessagePartial;
|
|
212
|
+
replyTo?: ChatMessagePartial;
|
|
213
|
+
embedDisabled: boolean;
|
|
214
|
+
edited: boolean;
|
|
215
|
+
editedTimestamp: bigint;
|
|
216
|
+
sentTimestamp: bigint;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface Note {
|
|
220
|
+
uuid: UuidStr;
|
|
221
|
+
ownerId: bigint;
|
|
222
|
+
lastEditorId: bigint;
|
|
223
|
+
favorite: boolean;
|
|
224
|
+
pinned: boolean;
|
|
225
|
+
tags: NoteTag[];
|
|
226
|
+
noteType: NoteType;
|
|
227
|
+
encryptionKey?: string;
|
|
228
|
+
title?: string;
|
|
229
|
+
preview?: string;
|
|
230
|
+
trash: boolean;
|
|
231
|
+
archive: boolean;
|
|
232
|
+
createdTimestamp: bigint;
|
|
233
|
+
editedTimestamp: bigint;
|
|
234
|
+
participants: NoteParticipant[];
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export interface NoteParticipant {
|
|
238
|
+
userId: bigint;
|
|
239
|
+
isOwner: boolean;
|
|
240
|
+
email: string;
|
|
241
|
+
avatar?: string;
|
|
242
|
+
nickName: string;
|
|
243
|
+
permissionsWrite: boolean;
|
|
244
|
+
addedTimestamp: bigint;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface NoteTag {
|
|
248
|
+
uuid: UuidStr;
|
|
249
|
+
name?: string;
|
|
250
|
+
favorite: boolean;
|
|
251
|
+
editedTimestamp: bigint;
|
|
252
|
+
createdTimestamp: bigint;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export interface NoteHistory {
|
|
256
|
+
id: bigint;
|
|
257
|
+
preview?: string;
|
|
258
|
+
content?: string;
|
|
259
|
+
editedTimestamp: bigint;
|
|
260
|
+
editorId: bigint;
|
|
261
|
+
noteType: NoteType;
|
|
262
|
+
}
|
|
263
|
+
|
|
184
264
|
export interface AcquireLockParams {
|
|
185
265
|
resource: string;
|
|
186
266
|
maxSleepTime?: number;
|
|
@@ -199,13 +279,11 @@ export interface MakeThumbnailInMemoryResult {
|
|
|
199
279
|
webpData: Uint8Array;
|
|
200
280
|
}
|
|
201
281
|
|
|
202
|
-
export interface
|
|
282
|
+
export interface ContactRequestOut {
|
|
203
283
|
uuid: UuidStr;
|
|
204
|
-
userId: bigint;
|
|
205
284
|
email: string;
|
|
206
285
|
avatar?: string;
|
|
207
286
|
nickName: string;
|
|
208
|
-
timestamp: bigint;
|
|
209
287
|
}
|
|
210
288
|
|
|
211
289
|
export interface ContactRequestIn {
|
|
@@ -216,11 +294,13 @@ export interface ContactRequestIn {
|
|
|
216
294
|
nickName: string;
|
|
217
295
|
}
|
|
218
296
|
|
|
219
|
-
export interface
|
|
297
|
+
export interface BlockedContact {
|
|
220
298
|
uuid: UuidStr;
|
|
299
|
+
userId: bigint;
|
|
221
300
|
email: string;
|
|
222
301
|
avatar?: string;
|
|
223
302
|
nickName: string;
|
|
303
|
+
timestamp: bigint;
|
|
224
304
|
}
|
|
225
305
|
|
|
226
306
|
export interface Contact {
|
|
@@ -241,6 +321,11 @@ export interface ShareInfo {
|
|
|
241
321
|
|
|
242
322
|
export type SharingRole = ({ role: "sharer" } & ShareInfo) | ({ role: "receiver" } & ShareInfo);
|
|
243
323
|
|
|
324
|
+
export interface DuplicateNoteResponse {
|
|
325
|
+
original: Note;
|
|
326
|
+
duplicated: Note;
|
|
327
|
+
}
|
|
328
|
+
|
|
244
329
|
export interface ItemMatch {
|
|
245
330
|
item: NonRootItemTagged;
|
|
246
331
|
path: string;
|
|
@@ -258,6 +343,10 @@ export type UuidStr = string;
|
|
|
258
343
|
|
|
259
344
|
export type ParentUuid = UuidStr | "trash" | "recents" | "favorites" | "links";
|
|
260
345
|
|
|
346
|
+
export type NoteType = "text" | "md" | "code" | "rich" | "checklist";
|
|
347
|
+
|
|
348
|
+
export type ChatTypingType = "up" | "down";
|
|
349
|
+
|
|
261
350
|
export type FileEncryptionVersion = 1 | 2 | 3;
|
|
262
351
|
|
|
263
352
|
export type PublicLinkExpiration = "never" | "1h" | "6h" | "1d" | "3d" | "7d" | "14d" | "30d";
|
|
@@ -266,57 +355,104 @@ export class Client {
|
|
|
266
355
|
private constructor();
|
|
267
356
|
free(): void;
|
|
268
357
|
toStringified(): StringifiedClient;
|
|
269
|
-
acquireLock(params: AcquireLockParams): Promise<ResourceLock>;
|
|
270
358
|
lockDrive(): Promise<ResourceLock>;
|
|
359
|
+
acquireLock(params: AcquireLockParams): Promise<ResourceLock>;
|
|
271
360
|
makeThumbnailInMemory(params: MakeThumbnailInMemoryParams): Promise<MakeThumbnailInMemoryResult | undefined>;
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
361
|
+
publicLinkFile(file: File): Promise<FilePublicLink>;
|
|
362
|
+
listOutShared(dir?: DirWithMetaEnum | null, contact?: Contact | null): Promise<[SharedDirectory[], SharedFile[]]>;
|
|
363
|
+
getDirLinkStatus(dir: Dir): Promise<DirPublicLink | undefined>;
|
|
364
|
+
listLinkedDir(dir: DirWithMetaEnum, link: DirPublicLink): Promise<[Dir[], File[]]>;
|
|
365
|
+
acceptContactRequest(contact_uuid: string): Promise<string>;
|
|
275
366
|
updateDirLink(dir: Dir, link: DirPublicLink): Promise<void>;
|
|
367
|
+
getFileLinkStatus(file: File): Promise<FilePublicLink | undefined>;
|
|
368
|
+
listInShared(dir?: DirWithMetaEnum | null): Promise<[SharedDirectory[], SharedFile[]]>;
|
|
369
|
+
denyContactRequest(contact_uuid: string): Promise<void>;
|
|
276
370
|
removeDirLink(link: DirPublicLink): Promise<void>;
|
|
277
|
-
|
|
371
|
+
removeSharedLinkIn(link_uuid: string): Promise<void>;
|
|
372
|
+
removeSharedLinkOut(link_uuid: string, receiver_id: bigint): Promise<void>;
|
|
373
|
+
getContacts(): Promise<Contact[]>;
|
|
374
|
+
sendContactRequest(email: string): Promise<string>;
|
|
278
375
|
listOutgoingContactRequests(): Promise<ContactRequestOut[]>;
|
|
279
|
-
|
|
376
|
+
listIncomingContactRequests(): Promise<ContactRequestIn[]>;
|
|
377
|
+
deleteContact(contact_uuid: string): Promise<void>;
|
|
280
378
|
cancelContactRequest(contact_uuid: string): Promise<void>;
|
|
281
|
-
shareFile(file: File, contact: Contact): Promise<void>;
|
|
282
|
-
getDirLinkStatus(dir: Dir): Promise<DirPublicLink | undefined>;
|
|
283
|
-
removeSharedLinkOut(link_uuid: string, receiver_id: bigint): Promise<void>;
|
|
284
|
-
getBlockedContacts(): Promise<BlockedContact[]>;
|
|
285
379
|
unblockContact(contact_uuid: string): Promise<void>;
|
|
286
|
-
|
|
380
|
+
getBlockedContacts(): Promise<BlockedContact[]>;
|
|
381
|
+
publicLinkDir(dir: Dir): Promise<DirPublicLink>;
|
|
382
|
+
blockContact(email: string): Promise<string>;
|
|
287
383
|
updateFileLink(file: File, link: FilePublicLink): Promise<void>;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
getContacts(): Promise<Contact[]>;
|
|
294
|
-
listLinkedDir(dir: DirWithMetaEnum, link: DirPublicLink): Promise<[Dir[], File[]]>;
|
|
295
|
-
sendContactRequest(email: string): Promise<string>;
|
|
296
|
-
publicLinkFile(file: File): Promise<FilePublicLink>;
|
|
384
|
+
shareDir(dir: Dir, contact: Contact): Promise<void>;
|
|
385
|
+
shareFile(file: File, contact: Contact): Promise<void>;
|
|
386
|
+
updateDirMetadata(dir: Dir, changes: DirectoryMetaChanges): Promise<Dir>;
|
|
387
|
+
listFavorites(): Promise<[Dir[], File[]]>;
|
|
388
|
+
getDir(uuid: string): Promise<Dir>;
|
|
297
389
|
setDirColor(dir: Dir, color: DirColor): Promise<Dir>;
|
|
390
|
+
listDir(dir: DirEnum): Promise<[Dir[], File[]]>;
|
|
391
|
+
listDirRecursive(dir: DirEnum): Promise<[Dir[], File[]]>;
|
|
392
|
+
findItemInDir(dir: AnyDirEnum, nameOrUuid: string): Promise<NonRootItemTagged | undefined>;
|
|
298
393
|
root(): Root;
|
|
299
394
|
createDir(parent: DirEnum, name: string): Promise<Dir>;
|
|
300
|
-
listFavorites(): Promise<[Dir[], File[]]>;
|
|
301
|
-
listRecents(): Promise<[Dir[], File[]]>;
|
|
302
|
-
trashDir(dir: Dir): Promise<Dir>;
|
|
303
395
|
deleteDirPermanently(dir: Dir): Promise<void>;
|
|
304
|
-
|
|
396
|
+
listRecents(): Promise<[Dir[], File[]]>;
|
|
305
397
|
dirExists(parent: AnyDirEnum, name: string): Promise<void>;
|
|
306
|
-
findItemInDir(dir: AnyDirEnum, nameOrUuid: string): Promise<NonRootItemTagged | undefined>;
|
|
307
|
-
listDir(dir: DirEnum): Promise<[Dir[], File[]]>;
|
|
308
|
-
updateDirMetadata(dir: Dir, changes: DirectoryMetaChanges): Promise<Dir>;
|
|
309
|
-
listDirRecursive(dir: DirEnum): Promise<[Dir[], File[]]>;
|
|
310
398
|
getDirSize(dir: AnyDirEnumWithShareInfo): Promise<DirSizeResponse>;
|
|
399
|
+
trashDir(dir: Dir): Promise<Dir>;
|
|
400
|
+
listNoteTags(): Promise<NoteTag[]>;
|
|
401
|
+
removeNoteParticipant(note: Note, contact: Contact): Promise<Note>;
|
|
402
|
+
deleteNote(note: Note): Promise<void>;
|
|
403
|
+
createNoteTag(name: string): Promise<NoteTag>;
|
|
404
|
+
removeTagFromNote(note: Note, tag: NoteTag): Promise<Note>;
|
|
405
|
+
addNoteParticipant(note: Note, contact: Contact, write: boolean): Promise<Note>;
|
|
406
|
+
restoreNoteFromHistory(note: Note, history: NoteHistory): Promise<Note>;
|
|
407
|
+
setNoteFavorited(note: Note, favorite: boolean): Promise<Note>;
|
|
408
|
+
getNoteHistory(note: Note): Promise<NoteHistory[]>;
|
|
409
|
+
renameNoteTag(tag: NoteTag, new_name: string): Promise<NoteTag>;
|
|
410
|
+
setNoteTagFavorited(tag: NoteTag, favorite: boolean): Promise<NoteTag>;
|
|
411
|
+
addTagToNote(note: Note, tag: NoteTag): Promise<[Note, NoteTag]>;
|
|
412
|
+
restoreNote(note: Note): Promise<Note>;
|
|
413
|
+
trashNote(note: Note): Promise<Note>;
|
|
414
|
+
getNote(note_uuid: string): Promise<Note | undefined>;
|
|
415
|
+
setNoteParticipantPermission(note: Note, contact: Contact, write: boolean): Promise<Note>;
|
|
416
|
+
createNote(title?: string | null): Promise<Note>;
|
|
417
|
+
setNoteType(note: Note, note_type: NoteType, known_content?: string | null): Promise<Note>;
|
|
418
|
+
setNotePinned(note: Note, pinned: boolean): Promise<Note>;
|
|
419
|
+
deleteNoteTag(tag: NoteTag): Promise<void>;
|
|
420
|
+
getNoteContent(note: Note): Promise<string | undefined>;
|
|
421
|
+
listNotes(): Promise<Note[]>;
|
|
422
|
+
archiveNote(note: Note): Promise<Note>;
|
|
423
|
+
setNoteContent(note: Note, new_content: string, new_preview: string): Promise<Note>;
|
|
424
|
+
setNoteTitle(note: Note, new_title: string): Promise<Note>;
|
|
425
|
+
duplicateNote(note: Note): Promise<DuplicateNoteResponse>;
|
|
311
426
|
findItemMatchesForName(name: string): Promise<ItemMatch[]>;
|
|
312
|
-
|
|
427
|
+
getAllChatsUnreadCount(): Promise<bigint>;
|
|
428
|
+
disableMessageEmbed(message: ChatMessage): Promise<ChatMessage>;
|
|
429
|
+
createChat(contacts: Contact[]): Promise<Chat>;
|
|
430
|
+
leaveChat(chat: Chat): Promise<void>;
|
|
431
|
+
deleteMessage(chat: Chat, message: ChatMessage): Promise<Chat>;
|
|
432
|
+
removeChatParticipant(chat: Chat, contact: Contact): Promise<Chat>;
|
|
433
|
+
addChatParticipant(chat: Chat, contact: Contact): Promise<Chat>;
|
|
434
|
+
getChat(uuid: string): Promise<Chat | undefined>;
|
|
435
|
+
updateChatOnlineStatus(chat: Chat): Promise<Chat>;
|
|
436
|
+
listMessages(chat: Chat): Promise<ChatMessage[]>;
|
|
437
|
+
muteChat(chat: Chat, mute: boolean): Promise<Chat>;
|
|
438
|
+
listChats(): Promise<Chat[]>;
|
|
439
|
+
updateLastChatFocusTimesNow(chats: Chat[]): Promise<Chat[]>;
|
|
440
|
+
editMessage(chat: Chat, message: ChatMessage, new_message: string): Promise<ChatMessage>;
|
|
441
|
+
getChatUnreadCount(chat: Chat): Promise<bigint>;
|
|
442
|
+
markChatRead(chat: Chat): Promise<void>;
|
|
443
|
+
renameChat(chat: Chat, new_name: string): Promise<Chat>;
|
|
444
|
+
sendTypingSignal(chat: Chat, signal_type: ChatTypingType): Promise<void>;
|
|
445
|
+
listMessagesBefore(chat: Chat, before: bigint): Promise<ChatMessage[]>;
|
|
446
|
+
deleteChat(chat: Chat): Promise<void>;
|
|
447
|
+
sendChatMessage(chat: Chat, message: string, reply_to?: ChatMessagePartial | null): Promise<Chat>;
|
|
313
448
|
deleteFilePermanently(file: File): Promise<void>;
|
|
314
|
-
updateFileMetadata(file: File, changes: FileMetaChanges): Promise<File>;
|
|
315
|
-
getFile(uuid: string): Promise<File>;
|
|
316
|
-
downloadFileToWriter(params: DownloadFileStreamParams): Promise<void>;
|
|
317
449
|
trashFile(file: File): Promise<File>;
|
|
318
|
-
|
|
450
|
+
downloadFileToWriter(params: DownloadFileStreamParams): Promise<void>;
|
|
451
|
+
getFile(uuid: string): Promise<File>;
|
|
319
452
|
uploadFile(data: Uint8Array, params: UploadFileParams): Promise<File>;
|
|
453
|
+
uploadFileFromReader(params: UploadFileStreamParams): Promise<File>;
|
|
454
|
+
downloadFile(file: FileEnum): Promise<Uint8Array>;
|
|
455
|
+
updateFileMetadata(file: File, changes: FileMetaChanges): Promise<File>;
|
|
320
456
|
setFavorite(item: NonRootItem, favorited: boolean): Promise<NonRootItemTagged>;
|
|
321
457
|
downloadItemsToZip(params: DownloadFileToZipParams): Promise<void>;
|
|
322
458
|
}
|
|
@@ -345,21 +481,21 @@ export class IntoUnderlyingSource {
|
|
|
345
481
|
export class PauseSignal {
|
|
346
482
|
free(): void;
|
|
347
483
|
resume(): void;
|
|
484
|
+
pause(): void;
|
|
348
485
|
constructor();
|
|
349
486
|
isPaused(): boolean;
|
|
350
|
-
pause(): void;
|
|
351
487
|
}
|
|
352
488
|
export class ResourceLock {
|
|
353
489
|
private constructor();
|
|
354
490
|
free(): void;
|
|
355
|
-
/**
|
|
356
|
-
* Utility function to be able to immediately drop the lock from JS
|
|
357
|
-
*/
|
|
358
|
-
drop(): void;
|
|
359
491
|
/**
|
|
360
492
|
* The resource this lock is for
|
|
361
493
|
*/
|
|
362
494
|
resource(): string;
|
|
495
|
+
/**
|
|
496
|
+
* Utility function to be able to immediately drop the lock from JS
|
|
497
|
+
*/
|
|
498
|
+
drop(): void;
|
|
363
499
|
}
|
|
364
500
|
|
|
365
501
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
@@ -369,66 +505,113 @@ export interface InitOutput {
|
|
|
369
505
|
readonly client_toStringified: (a: number) => any;
|
|
370
506
|
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
371
507
|
readonly pausesignal_new: () => number;
|
|
372
|
-
readonly __wbg_pausesignal_free: (a: number, b: number) => void;
|
|
373
|
-
readonly pausesignal_pause: (a: number) => void;
|
|
374
|
-
readonly pausesignal_isPaused: (a: number) => number;
|
|
375
508
|
readonly pausesignal_resume: (a: number) => void;
|
|
376
|
-
readonly
|
|
509
|
+
readonly pausesignal_isPaused: (a: number) => number;
|
|
510
|
+
readonly pausesignal_pause: (a: number) => void;
|
|
511
|
+
readonly __wbg_pausesignal_free: (a: number, b: number) => void;
|
|
377
512
|
readonly resourcelock_resource: (a: number) => [number, number];
|
|
378
513
|
readonly resourcelock_drop: (a: number) => void;
|
|
379
|
-
readonly __wbg_resourcelock_free: (a: number, b: number) => void;
|
|
380
514
|
readonly client_lockDrive: (a: number) => any;
|
|
515
|
+
readonly client_acquireLock: (a: number, b: any) => any;
|
|
516
|
+
readonly __wbg_resourcelock_free: (a: number, b: number) => void;
|
|
381
517
|
readonly client_makeThumbnailInMemory: (a: number, b: any) => any;
|
|
382
|
-
readonly client_updateDirLink: (a: number, b: any, c: any) => any;
|
|
383
|
-
readonly client_publicLinkDir: (a: number, b: any) => any;
|
|
384
518
|
readonly client_getBlockedContacts: (a: number) => any;
|
|
385
|
-
readonly
|
|
386
|
-
readonly client_denyContactRequest: (a: number, b: number, c: number) => any;
|
|
519
|
+
readonly client_getContacts: (a: number) => any;
|
|
387
520
|
readonly client_removeSharedLinkIn: (a: number, b: number, c: number) => any;
|
|
388
|
-
readonly
|
|
389
|
-
readonly
|
|
390
|
-
readonly client_listOutgoingContactRequests: (a: number) => any;
|
|
391
|
-
readonly client_removeSharedLinkOut: (a: number, b: number, c: number, d: bigint) => any;
|
|
521
|
+
readonly client_getFileLinkStatus: (a: number, b: any) => any;
|
|
522
|
+
readonly client_sendContactRequest: (a: number, b: number, c: number) => any;
|
|
392
523
|
readonly client_cancelContactRequest: (a: number, b: number, c: number) => any;
|
|
524
|
+
readonly client_denyContactRequest: (a: number, b: number, c: number) => any;
|
|
525
|
+
readonly client_getDirLinkStatus: (a: number, b: any) => any;
|
|
393
526
|
readonly client_blockContact: (a: number, b: number, c: number) => any;
|
|
394
|
-
readonly
|
|
395
|
-
readonly
|
|
396
|
-
readonly client_getContacts: (a: number) => any;
|
|
397
|
-
readonly client_getFileLinkStatus: (a: number, b: any) => any;
|
|
527
|
+
readonly client_listInShared: (a: number, b: number) => any;
|
|
528
|
+
readonly client_publicLinkDir: (a: number, b: any) => any;
|
|
398
529
|
readonly client_shareFile: (a: number, b: any, c: any) => any;
|
|
399
|
-
readonly client_listIncomingContactRequests: (a: number) => any;
|
|
400
|
-
readonly client_getDirLinkStatus: (a: number, b: any) => any;
|
|
401
530
|
readonly client_listOutShared: (a: number, b: number, c: number) => any;
|
|
402
|
-
readonly
|
|
531
|
+
readonly client_removeSharedLinkOut: (a: number, b: number, c: number, d: bigint) => any;
|
|
532
|
+
readonly client_updateFileLink: (a: number, b: any, c: any) => any;
|
|
403
533
|
readonly client_unblockContact: (a: number, b: number, c: number) => any;
|
|
534
|
+
readonly client_updateDirLink: (a: number, b: any, c: any) => any;
|
|
404
535
|
readonly client_shareDir: (a: number, b: any, c: any) => any;
|
|
536
|
+
readonly client_publicLinkFile: (a: number, b: any) => any;
|
|
537
|
+
readonly client_listOutgoingContactRequests: (a: number) => any;
|
|
538
|
+
readonly client_removeDirLink: (a: number, b: any) => any;
|
|
405
539
|
readonly client_listLinkedDir: (a: number, b: any, c: any) => any;
|
|
406
540
|
readonly client_deleteContact: (a: number, b: number, c: number) => any;
|
|
541
|
+
readonly client_acceptContactRequest: (a: number, b: number, c: number) => any;
|
|
542
|
+
readonly client_listIncomingContactRequests: (a: number) => any;
|
|
407
543
|
readonly login: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
408
|
-
readonly fromStringified: (a: any) => [number, number, number];
|
|
409
544
|
readonly main_js: () => void;
|
|
410
|
-
readonly
|
|
411
|
-
readonly client_root: (a: number) => any;
|
|
412
|
-
readonly client_trashDir: (a: number, b: any) => any;
|
|
413
|
-
readonly client_createDir: (a: number, b: any, c: number, d: number) => any;
|
|
414
|
-
readonly client_dirExists: (a: number, b: any, c: number, d: number) => any;
|
|
415
|
-
readonly client_listDirRecursive: (a: number, b: any) => any;
|
|
416
|
-
readonly client_setDirColor: (a: number, b: any, c: any) => any;
|
|
417
|
-
readonly client_updateDirMetadata: (a: number, b: any, c: any) => any;
|
|
418
|
-
readonly client_listFavorites: (a: number) => any;
|
|
419
|
-
readonly client_getDir: (a: number, b: number, c: number) => any;
|
|
420
|
-
readonly client_findItemInDir: (a: number, b: any, c: number, d: number) => any;
|
|
545
|
+
readonly fromStringified: (a: any) => [number, number, number];
|
|
421
546
|
readonly client_deleteDirPermanently: (a: number, b: any) => any;
|
|
547
|
+
readonly client_setDirColor: (a: number, b: any, c: any) => any;
|
|
422
548
|
readonly client_listDir: (a: number, b: any) => any;
|
|
549
|
+
readonly client_getDirSize: (a: number, b: any) => any;
|
|
550
|
+
readonly client_getDir: (a: number, b: number, c: number) => any;
|
|
423
551
|
readonly client_listRecents: (a: number) => any;
|
|
552
|
+
readonly client_listDirRecursive: (a: number, b: any) => any;
|
|
553
|
+
readonly client_dirExists: (a: number, b: any, c: number, d: number) => any;
|
|
554
|
+
readonly client_findItemInDir: (a: number, b: any, c: number, d: number) => any;
|
|
555
|
+
readonly client_listFavorites: (a: number) => any;
|
|
556
|
+
readonly client_updateDirMetadata: (a: number, b: any, c: any) => any;
|
|
557
|
+
readonly client_createDir: (a: number, b: any, c: number, d: number) => any;
|
|
558
|
+
readonly client_trashDir: (a: number, b: any) => any;
|
|
559
|
+
readonly client_root: (a: number) => any;
|
|
560
|
+
readonly client_setNoteTagFavorited: (a: number, b: any, c: number) => any;
|
|
561
|
+
readonly client_archiveNote: (a: number, b: any) => any;
|
|
562
|
+
readonly client_getNoteContent: (a: number, b: any) => any;
|
|
563
|
+
readonly client_listNotes: (a: number) => any;
|
|
564
|
+
readonly client_getNote: (a: number, b: number, c: number) => any;
|
|
565
|
+
readonly client_removeTagFromNote: (a: number, b: any, c: any) => any;
|
|
566
|
+
readonly client_setNoteContent: (a: number, b: any, c: number, d: number, e: number, f: number) => any;
|
|
567
|
+
readonly client_setNotePinned: (a: number, b: any, c: number) => any;
|
|
568
|
+
readonly client_createNote: (a: number, b: number, c: number) => any;
|
|
569
|
+
readonly client_setNoteFavorited: (a: number, b: any, c: number) => any;
|
|
570
|
+
readonly client_trashNote: (a: number, b: any) => any;
|
|
571
|
+
readonly client_addNoteParticipant: (a: number, b: any, c: any, d: number) => any;
|
|
572
|
+
readonly client_deleteNote: (a: number, b: any) => any;
|
|
573
|
+
readonly client_listNoteTags: (a: number) => any;
|
|
574
|
+
readonly client_restoreNote: (a: number, b: any) => any;
|
|
575
|
+
readonly client_setNoteParticipantPermission: (a: number, b: any, c: any, d: number) => any;
|
|
576
|
+
readonly client_setNoteType: (a: number, b: any, c: any, d: number, e: number) => any;
|
|
577
|
+
readonly client_removeNoteParticipant: (a: number, b: any, c: any) => any;
|
|
578
|
+
readonly client_getNoteHistory: (a: number, b: any) => any;
|
|
579
|
+
readonly client_restoreNoteFromHistory: (a: number, b: any, c: any) => any;
|
|
580
|
+
readonly client_createNoteTag: (a: number, b: number, c: number) => any;
|
|
581
|
+
readonly client_deleteNoteTag: (a: number, b: any) => any;
|
|
582
|
+
readonly client_addTagToNote: (a: number, b: any, c: any) => any;
|
|
583
|
+
readonly client_renameNoteTag: (a: number, b: any, c: number, d: number) => any;
|
|
584
|
+
readonly client_setNoteTitle: (a: number, b: any, c: number, d: number) => any;
|
|
585
|
+
readonly client_duplicateNote: (a: number, b: any) => any;
|
|
424
586
|
readonly client_findItemMatchesForName: (a: number, b: number, c: number) => any;
|
|
425
|
-
readonly
|
|
587
|
+
readonly client_getChatUnreadCount: (a: number, b: any) => any;
|
|
588
|
+
readonly client_updateLastChatFocusTimesNow: (a: number, b: number, c: number) => any;
|
|
589
|
+
readonly client_muteChat: (a: number, b: any, c: number) => any;
|
|
590
|
+
readonly client_leaveChat: (a: number, b: any) => any;
|
|
591
|
+
readonly client_removeChatParticipant: (a: number, b: any, c: any) => any;
|
|
592
|
+
readonly client_updateChatOnlineStatus: (a: number, b: any) => any;
|
|
593
|
+
readonly client_disableMessageEmbed: (a: number, b: any) => any;
|
|
594
|
+
readonly client_addChatParticipant: (a: number, b: any, c: any) => any;
|
|
595
|
+
readonly client_listChats: (a: number) => any;
|
|
596
|
+
readonly client_editMessage: (a: number, b: any, c: any, d: number, e: number) => any;
|
|
597
|
+
readonly client_listMessagesBefore: (a: number, b: any, c: bigint) => any;
|
|
598
|
+
readonly client_getAllChatsUnreadCount: (a: number) => any;
|
|
599
|
+
readonly client_markChatRead: (a: number, b: any) => any;
|
|
600
|
+
readonly client_deleteMessage: (a: number, b: any, c: any) => any;
|
|
601
|
+
readonly client_createChat: (a: number, b: number, c: number) => any;
|
|
602
|
+
readonly client_listMessages: (a: number, b: any) => any;
|
|
603
|
+
readonly client_sendTypingSignal: (a: number, b: any, c: any) => any;
|
|
604
|
+
readonly client_sendChatMessage: (a: number, b: any, c: number, d: number, e: number) => any;
|
|
605
|
+
readonly client_deleteChat: (a: number, b: any) => any;
|
|
606
|
+
readonly client_renameChat: (a: number, b: any, c: number, d: number) => any;
|
|
607
|
+
readonly client_getChat: (a: number, b: number, c: number) => any;
|
|
608
|
+
readonly client_updateFileMetadata: (a: number, b: any, c: any) => any;
|
|
426
609
|
readonly client_downloadFileToWriter: (a: number, b: any) => any;
|
|
610
|
+
readonly client_uploadFileFromReader: (a: number, b: any) => any;
|
|
611
|
+
readonly client_trashFile: (a: number, b: any) => any;
|
|
427
612
|
readonly client_uploadFile: (a: number, b: number, c: number, d: any) => any;
|
|
428
|
-
readonly client_updateFileMetadata: (a: number, b: any, c: any) => any;
|
|
429
613
|
readonly client_getFile: (a: number, b: number, c: number) => any;
|
|
430
|
-
readonly
|
|
431
|
-
readonly client_uploadFileFromReader: (a: number, b: any) => any;
|
|
614
|
+
readonly client_downloadFile: (a: number, b: any) => any;
|
|
432
615
|
readonly client_deleteFilePermanently: (a: number, b: any) => any;
|
|
433
616
|
readonly client_setFavorite: (a: number, b: any, c: number) => any;
|
|
434
617
|
readonly client_downloadItemsToZip: (a: number, b: any) => any;
|
|
@@ -455,8 +638,8 @@ export interface InitOutput {
|
|
|
455
638
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
456
639
|
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbd803380da322cda: (a: number, b: number) => void;
|
|
457
640
|
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h218a17164c1a612c: (a: number, b: number) => void;
|
|
458
|
-
readonly
|
|
459
|
-
readonly
|
|
641
|
+
readonly closure1408_externref_shim: (a: number, b: number, c: any) => void;
|
|
642
|
+
readonly closure1561_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
460
643
|
readonly __wbindgen_start: () => void;
|
|
461
644
|
}
|
|
462
645
|
|