@filen/sdk-rs 0.3.15 → 0.3.17

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.
@@ -1,7 +1,7 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function login(email: string, password: string, twoFactorCode?: string | null): Promise<Client>;
4
3
  export function main_js(): void;
4
+ export function login(email: string, password: string, twoFactorCode?: string | null): Promise<Client>;
5
5
  export function fromStringified(serialized: StringifiedClient): Client;
6
6
  /**
7
7
  * The `ReadableStreamType` enum.
@@ -26,6 +26,11 @@ export interface ManagedFuture {
26
26
  pauseSignal?: PauseSignal;
27
27
  }
28
28
 
29
+ /**
30
+ * Enum for all the error kinds that can occur in the SDK.
31
+ */
32
+ export type ErrorKind = "Server" | "Unauthenticated" | "Reqwest" | "Response" | "RetryFailed" | "Conversion" | "IO" | "ChunkTooLarge" | "InvalidState" | "InvalidType" | "InvalidName" | "ImageError" | "MetadataWasNotDecrypted" | "Cancelled";
33
+
29
34
  export interface FileMetaChanges {
30
35
  name?: string;
31
36
  mime?: string;
@@ -35,12 +40,18 @@ export interface FileMetaChanges {
35
40
 
36
41
  export type DirEnum = Dir | Root;
37
42
 
43
+ export interface Root {
44
+ uuid: UuidStr;
45
+ }
46
+
38
47
  export interface SharedDir {
39
48
  dir: DirWithMetaEnum;
40
49
  sharingRole: SharingRole;
41
50
  writeAccess: boolean;
42
51
  }
43
52
 
53
+ export type DirWithMetaEnum = Dir | RootWithMeta;
54
+
44
55
  export interface RootWithMeta {
45
56
  uuid: UuidStr;
46
57
  color: DirColor;
@@ -48,11 +59,15 @@ export interface RootWithMeta {
48
59
  meta?: DecryptedDirMeta;
49
60
  }
50
61
 
62
+ export type AnyDirEnumWithShareInfo = Dir | SharedDir | Root;
63
+
51
64
  export interface DecryptedDirMeta {
52
65
  name: string;
53
66
  created?: bigint;
54
67
  }
55
68
 
69
+ export type DirColor = "default" | "blue" | "green" | "purple" | "red" | "gray" | string;
70
+
56
71
  export type AnyDirEnum = Dir | RootWithMeta | Root;
57
72
 
58
73
  export interface Dir {
@@ -64,16 +79,6 @@ export interface Dir {
64
79
  meta?: DecryptedDirMeta;
65
80
  }
66
81
 
67
- export type DirWithMetaEnum = Dir | RootWithMeta;
68
-
69
- export interface Root {
70
- uuid: UuidStr;
71
- }
72
-
73
- export type DirColor = "default" | "blue" | "green" | "purple" | "red" | "gray" | string;
74
-
75
- export type AnyDirEnumWithShareInfo = Dir | SharedDir | Root;
76
-
77
82
  export interface File {
78
83
  uuid: UuidStr;
79
84
  meta?: DecryptedFileMeta;
@@ -87,6 +92,8 @@ export interface File {
87
92
  canMakeThumbnail: boolean;
88
93
  }
89
94
 
95
+ export type FileEnum = File | RootFile;
96
+
90
97
  export interface DecryptedFileMeta {
91
98
  name: string;
92
99
  mime: string;
@@ -103,8 +110,6 @@ export interface SharedFile {
103
110
  sharingRole: SharingRole;
104
111
  }
105
112
 
106
- export type FileEnum = File | RootFile;
107
-
108
113
  export interface RootFile {
109
114
  uuid: UuidStr;
110
115
  size: bigint;
@@ -116,21 +121,21 @@ export interface RootFile {
116
121
  canMakeThumbnail: boolean;
117
122
  }
118
123
 
119
- export interface FilePublicLink {
124
+ export interface DirPublicLink {
120
125
  linkUuid: UuidStr;
126
+ linkKey?: MetaKey;
121
127
  password?: string | Uint8Array;
122
128
  expiration: PublicLinkExpiration;
123
- downloadable: boolean;
124
- salt: Uint8Array;
129
+ enableDownload: boolean;
130
+ salt?: Uint8Array;
125
131
  }
126
132
 
127
- export interface DirPublicLink {
133
+ export interface FilePublicLink {
128
134
  linkUuid: UuidStr;
129
- linkKey?: MetaKey;
130
135
  password?: string | Uint8Array;
131
136
  expiration: PublicLinkExpiration;
132
- enableDownload: boolean;
133
- salt?: Uint8Array;
137
+ downloadable: boolean;
138
+ salt: Uint8Array;
134
139
  }
135
140
 
136
141
  export interface DirectoryMetaChanges {
@@ -138,12 +143,61 @@ export interface DirectoryMetaChanges {
138
143
  created?: bigint | null;
139
144
  }
140
145
 
146
+ export interface ChatParticipant {
147
+ userId: bigint;
148
+ email: string;
149
+ avatar?: string;
150
+ nickName: string;
151
+ permissionsAdd: boolean;
152
+ added: bigint;
153
+ appearOffline: boolean;
154
+ lastActive: bigint;
155
+ }
156
+
157
+ export interface ChatMessagePartial {
158
+ uuid: UuidStr;
159
+ senderId: bigint;
160
+ senderEmail: string;
161
+ senderAvatar?: string;
162
+ senderNickName: string;
163
+ message?: string;
164
+ }
165
+
166
+ export interface Chat {
167
+ uuid: UuidStr;
168
+ lastMessage?: ChatMessage;
169
+ ownerId: bigint;
170
+ key?: string;
171
+ name?: string;
172
+ participants: ChatParticipant[];
173
+ muted: boolean;
174
+ created: bigint;
175
+ lastFocus: bigint;
176
+ }
177
+
178
+ export interface ChatMessage extends ChatMessagePartial {
179
+ chat: UuidStr;
180
+ replyTo?: ChatMessagePartial;
181
+ embedDisabled: boolean;
182
+ edited: boolean;
183
+ editedTimestamp: bigint;
184
+ sentTimestamp: bigint;
185
+ }
186
+
141
187
  export interface UploadFileStreamParams extends UploadFileParams {
142
188
  reader: ReadableStream<Uint8Array>;
143
189
  knownSize: bigint | undefined;
144
190
  progress?: (bytes: bigint) => void;
145
191
  }
146
192
 
193
+ export interface FileBuilderParams {
194
+ parent: DirEnum;
195
+ name: string;
196
+ created?: bigint;
197
+ modified?: bigint;
198
+ mime?: string;
199
+ }
200
+
147
201
  export interface DownloadFileToZipParams {
148
202
  items: Item[];
149
203
  writer: WritableStream<Uint8Array>;
@@ -153,14 +207,6 @@ export interface DownloadFileToZipParams {
153
207
 
154
208
  export type NonRootItem = File | Dir;
155
209
 
156
- export interface FileBuilderParams {
157
- parent: DirEnum;
158
- name: string;
159
- created?: bigint;
160
- modified?: bigint;
161
- mime?: string;
162
- }
163
-
164
210
  export interface DownloadFileStreamParams {
165
211
  file: FileEnum;
166
212
  writer: WritableStream<Uint8Array>;
@@ -174,46 +220,14 @@ export interface UploadFileParams extends FileBuilderParams {
174
220
  managedFuture?: ManagedFuture;
175
221
  }
176
222
 
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 {
223
+ export interface NoteParticipant {
187
224
  userId: bigint;
225
+ isOwner: boolean;
188
226
  email: string;
189
227
  avatar?: string;
190
228
  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;
229
+ permissionsWrite: boolean;
230
+ addedTimestamp: bigint;
217
231
  }
218
232
 
219
233
  export interface Note {
@@ -234,14 +248,13 @@ export interface Note {
234
248
  participants: NoteParticipant[];
235
249
  }
236
250
 
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;
251
+ export interface NoteHistory {
252
+ id: bigint;
253
+ preview?: string;
254
+ content?: string;
255
+ editedTimestamp: bigint;
256
+ editorId: bigint;
257
+ noteType: NoteType;
245
258
  }
246
259
 
247
260
  export interface NoteTag {
@@ -252,15 +265,6 @@ export interface NoteTag {
252
265
  createdTimestamp: bigint;
253
266
  }
254
267
 
255
- export interface NoteHistory {
256
- id: bigint;
257
- preview?: string;
258
- content?: string;
259
- editedTimestamp: bigint;
260
- editorId: bigint;
261
- noteType: NoteType;
262
- }
263
-
264
268
  export interface AcquireLockParams {
265
269
  resource: string;
266
270
  maxSleepTime?: number;
@@ -286,21 +290,21 @@ export interface ContactRequestOut {
286
290
  nickName: string;
287
291
  }
288
292
 
289
- export interface ContactRequestIn {
293
+ export interface BlockedContact {
290
294
  uuid: UuidStr;
291
295
  userId: bigint;
292
296
  email: string;
293
297
  avatar?: string;
294
298
  nickName: string;
299
+ timestamp: bigint;
295
300
  }
296
301
 
297
- export interface BlockedContact {
302
+ export interface ContactRequestIn {
298
303
  uuid: UuidStr;
299
304
  userId: bigint;
300
305
  email: string;
301
306
  avatar?: string;
302
307
  nickName: string;
303
- timestamp: bigint;
304
308
  }
305
309
 
306
310
  export interface Contact {
@@ -331,14 +335,14 @@ export interface ItemMatch {
331
335
  path: string;
332
336
  }
333
337
 
338
+ export type NonRootItemTagged = ({ type: "dir" } & Dir) | ({ type: "file" } & File);
339
+
334
340
  export interface DirSizeResponse {
335
341
  size: bigint;
336
342
  files: bigint;
337
343
  dirs: bigint;
338
344
  }
339
345
 
340
- export type NonRootItemTagged = ({ type: "dir" } & Dir) | ({ type: "file" } & File);
341
-
342
346
  export type UuidStr = string;
343
347
 
344
348
  export type ParentUuid = UuidStr | "trash" | "recents" | "favorites" | "links";
@@ -358,112 +362,121 @@ export class Client {
358
362
  lockDrive(): Promise<ResourceLock>;
359
363
  acquireLock(params: AcquireLockParams): Promise<ResourceLock>;
360
364
  makeThumbnailInMemory(params: MakeThumbnailInMemoryParams): Promise<MakeThumbnailInMemoryResult | undefined>;
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>;
365
+ cancelContactRequest(contact_uuid: string): Promise<void>;
366
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>;
370
- removeDirLink(link: DirPublicLink): Promise<void>;
371
- removeSharedLinkIn(link_uuid: string): Promise<void>;
372
- removeSharedLinkOut(link_uuid: string, receiver_id: bigint): Promise<void>;
373
367
  getContacts(): Promise<Contact[]>;
368
+ shareFile(file: File, contact: Contact): Promise<void>;
369
+ listIncomingContactRequests(): Promise<ContactRequestIn[]>;
370
+ getDirLinkStatus(dir: Dir): Promise<DirPublicLink | undefined>;
371
+ publicLinkDir(dir: Dir): Promise<DirPublicLink>;
372
+ getFileLinkStatus(file: File): Promise<FilePublicLink | undefined>;
373
+ listLinkedDir(dir: DirWithMetaEnum, link: DirPublicLink): Promise<[Dir[], File[]]>;
374
374
  sendContactRequest(email: string): Promise<string>;
375
+ removeSharedLinkIn(link_uuid: string): Promise<void>;
375
376
  listOutgoingContactRequests(): Promise<ContactRequestOut[]>;
376
- listIncomingContactRequests(): Promise<ContactRequestIn[]>;
377
- deleteContact(contact_uuid: string): Promise<void>;
378
- cancelContactRequest(contact_uuid: string): Promise<void>;
377
+ removeSharedLinkOut(link_uuid: string, receiver_id: bigint): Promise<void>;
378
+ publicLinkFile(file: File): Promise<FilePublicLink>;
379
+ denyContactRequest(contact_uuid: string): Promise<void>;
379
380
  unblockContact(contact_uuid: string): Promise<void>;
380
381
  getBlockedContacts(): Promise<BlockedContact[]>;
381
- publicLinkDir(dir: Dir): Promise<DirPublicLink>;
382
- blockContact(email: string): Promise<string>;
383
- updateFileLink(file: File, link: FilePublicLink): Promise<void>;
382
+ deleteContact(contact_uuid: string): Promise<void>;
383
+ acceptContactRequest(contact_uuid: string): Promise<string>;
384
+ removeDirLink(link: DirPublicLink): Promise<void>;
385
+ listOutShared(dir?: DirWithMetaEnum | null, contact?: Contact | null): Promise<[SharedDirectory[], SharedFile[]]>;
384
386
  shareDir(dir: Dir, contact: Contact): Promise<void>;
385
- shareFile(file: File, contact: Contact): Promise<void>;
387
+ listInShared(dir?: DirWithMetaEnum | null): Promise<[SharedDirectory[], SharedFile[]]>;
388
+ updateFileLink(file: File, link: FilePublicLink): Promise<void>;
389
+ blockContact(email: string): Promise<string>;
390
+ trashDir(dir: Dir): Promise<Dir>;
391
+ getDirSize(dir: AnyDirEnumWithShareInfo): Promise<DirSizeResponse>;
392
+ findItemInDir(dir: AnyDirEnum, nameOrUuid: string): Promise<NonRootItemTagged | undefined>;
393
+ listDir(dir: DirEnum): Promise<[Dir[], File[]]>;
386
394
  updateDirMetadata(dir: Dir, changes: DirectoryMetaChanges): Promise<Dir>;
387
- listFavorites(): Promise<[Dir[], File[]]>;
388
395
  getDir(uuid: string): Promise<Dir>;
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>;
393
- root(): Root;
394
396
  createDir(parent: DirEnum, name: string): Promise<Dir>;
397
+ listDirRecursive(dir: DirEnum): Promise<[Dir[], File[]]>;
398
+ dirExists(parent: AnyDirEnum, name: string): Promise<void>;
399
+ setDirColor(dir: Dir, color: DirColor): Promise<Dir>;
395
400
  deleteDirPermanently(dir: Dir): Promise<void>;
401
+ listFavorites(): Promise<[Dir[], File[]]>;
402
+ root(): Root;
396
403
  listRecents(): Promise<[Dir[], File[]]>;
397
- dirExists(parent: AnyDirEnum, name: string): Promise<void>;
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
404
  setNoteTagFavorited(tag: NoteTag, favorite: boolean): Promise<NoteTag>;
411
- addTagToNote(note: Note, tag: NoteTag): Promise<[Note, NoteTag]>;
405
+ getNoteContent(note: Note): Promise<string | undefined>;
406
+ duplicateNote(note: Note): Promise<DuplicateNoteResponse>;
412
407
  restoreNote(note: Note): Promise<Note>;
413
- trashNote(note: Note): Promise<Note>;
408
+ restoreNoteFromHistory(note: Note, history: NoteHistory): Promise<Note>;
409
+ getNoteHistory(note: Note): Promise<NoteHistory[]>;
410
+ setNoteTitle(note: Note, new_title: string): Promise<Note>;
411
+ listNoteTags(): Promise<NoteTag[]>;
412
+ addNoteParticipant(note: Note, contact: Contact, write: boolean): Promise<Note>;
413
+ listNotes(): Promise<Note[]>;
414
+ setNoteContent(note: Note, new_content: string, new_preview: string): Promise<Note>;
415
+ setNoteParticipantPermission(noteUuid: string, participant: NoteParticipant, write: boolean): Promise<NoteParticipant>;
416
+ deleteNote(note: Note): Promise<void>;
414
417
  getNote(note_uuid: string): Promise<Note | undefined>;
415
- setNoteParticipantPermission(note: Note, contact: Contact, write: boolean): Promise<Note>;
418
+ deleteNoteTag(tag: NoteTag): Promise<void>;
416
419
  createNote(title?: string | null): Promise<Note>;
420
+ createNoteTag(name: string): Promise<NoteTag>;
417
421
  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
+ trashNote(note: Note): Promise<Note>;
422
423
  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>;
424
+ addTagToNote(note: Note, tag: NoteTag): Promise<[Note, NoteTag]>;
425
+ setNotePinned(note: Note, pinned: boolean): Promise<Note>;
426
+ renameNoteTag(tag: NoteTag, new_name: string): Promise<NoteTag>;
427
+ removeNoteParticipant(note: Note, contact: Contact): Promise<Note>;
428
+ removeTagFromNote(note: Note, tag: NoteTag): Promise<Note>;
429
+ setNoteFavorited(note: Note, favorite: boolean): Promise<Note>;
426
430
  findItemMatchesForName(name: string): Promise<ItemMatch[]>;
427
431
  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>;
432
+ listMessagesBefore(chat: Chat, before: bigint): Promise<ChatMessage[]>;
434
433
  getChat(uuid: string): Promise<Chat | undefined>;
434
+ leaveChat(chat: Chat): Promise<void>;
435
435
  updateChatOnlineStatus(chat: Chat): Promise<Chat>;
436
- listMessages(chat: Chat): Promise<ChatMessage[]>;
436
+ disableMessageEmbed(message: ChatMessage): Promise<ChatMessage>;
437
437
  muteChat(chat: Chat, mute: boolean): Promise<Chat>;
438
+ renameChat(chat: Chat, new_name: string): Promise<Chat>;
439
+ markChatRead(chat: Chat): Promise<void>;
440
+ listMessages(chat: Chat): Promise<ChatMessage[]>;
438
441
  listChats(): Promise<Chat[]>;
439
- updateLastChatFocusTimesNow(chats: Chat[]): Promise<Chat[]>;
440
- editMessage(chat: Chat, message: ChatMessage, new_message: string): Promise<ChatMessage>;
442
+ deleteChat(chat: Chat): Promise<void>;
441
443
  getChatUnreadCount(chat: Chat): Promise<bigint>;
442
- markChatRead(chat: Chat): Promise<void>;
443
- renameChat(chat: Chat, new_name: string): Promise<Chat>;
444
444
  sendTypingSignal(chat: Chat, signal_type: ChatTypingType): Promise<void>;
445
- listMessagesBefore(chat: Chat, before: bigint): Promise<ChatMessage[]>;
446
- deleteChat(chat: Chat): Promise<void>;
445
+ removeChatParticipant(chat: Chat, contact: Contact): Promise<Chat>;
446
+ createChat(contacts: Contact[]): Promise<Chat>;
447
447
  sendChatMessage(chat: Chat, message: string, reply_to?: ChatMessagePartial | null): Promise<Chat>;
448
- deleteFilePermanently(file: File): Promise<void>;
448
+ editMessage(chat: Chat, message: ChatMessage, new_message: string): Promise<ChatMessage>;
449
+ updateLastChatFocusTimesNow(chats: Chat[]): Promise<Chat[]>;
450
+ deleteMessage(chat: Chat, message: ChatMessage): Promise<Chat>;
451
+ addChatParticipant(chat: Chat, contact: Contact): Promise<Chat>;
449
452
  trashFile(file: File): Promise<File>;
450
- downloadFileToWriter(params: DownloadFileStreamParams): Promise<void>;
453
+ updateFileMetadata(file: File, changes: FileMetaChanges): Promise<File>;
454
+ uploadFileFromReader(params: UploadFileStreamParams): Promise<File>;
451
455
  getFile(uuid: string): Promise<File>;
452
456
  uploadFile(data: Uint8Array, params: UploadFileParams): Promise<File>;
453
- uploadFileFromReader(params: UploadFileStreamParams): Promise<File>;
454
457
  downloadFile(file: FileEnum): Promise<Uint8Array>;
455
- updateFileMetadata(file: File, changes: FileMetaChanges): Promise<File>;
458
+ downloadFileToWriter(params: DownloadFileStreamParams): Promise<void>;
459
+ deleteFilePermanently(file: File): Promise<void>;
456
460
  setFavorite(item: NonRootItem, favorited: boolean): Promise<NonRootItemTagged>;
457
461
  downloadItemsToZip(params: DownloadFileToZipParams): Promise<void>;
458
462
  }
463
+ /**
464
+ * Custom error type for the SDK
465
+ */
466
+ export class FilenSDKError {
467
+ private constructor();
468
+ free(): void;
469
+ toString(): string;
470
+ readonly kind: ErrorKind;
471
+ }
459
472
  export class IntoUnderlyingByteSource {
460
473
  private constructor();
461
474
  free(): void;
462
475
  pull(controller: ReadableByteStreamController): Promise<any>;
463
476
  start(controller: ReadableByteStreamController): void;
464
477
  cancel(): void;
465
- readonly autoAllocateChunkSize: number;
466
478
  readonly type: ReadableStreamType;
479
+ readonly autoAllocateChunkSize: number;
467
480
  }
468
481
  export class IntoUnderlyingSink {
469
482
  private constructor();
@@ -480,10 +493,10 @@ export class IntoUnderlyingSource {
480
493
  }
481
494
  export class PauseSignal {
482
495
  free(): void;
483
- resume(): void;
496
+ isPaused(): boolean;
484
497
  pause(): void;
498
+ resume(): void;
485
499
  constructor();
486
- isPaused(): boolean;
487
500
  }
488
501
  export class ResourceLock {
489
502
  private constructor();
@@ -504,142 +517,146 @@ export interface InitOutput {
504
517
  readonly memory: WebAssembly.Memory;
505
518
  readonly client_toStringified: (a: number) => any;
506
519
  readonly __wbg_client_free: (a: number, b: number) => void;
507
- readonly pausesignal_new: () => number;
520
+ readonly pausesignal_pause: (a: number) => void;
508
521
  readonly pausesignal_resume: (a: number) => void;
509
522
  readonly pausesignal_isPaused: (a: number) => number;
510
- readonly pausesignal_pause: (a: number) => void;
523
+ readonly pausesignal_new: () => number;
511
524
  readonly __wbg_pausesignal_free: (a: number, b: number) => void;
525
+ readonly __wbg_filensdkerror_free: (a: number, b: number) => void;
526
+ readonly filensdkerror_toString: (a: number) => [number, number];
527
+ readonly filensdkerror_kind: (a: number) => any;
528
+ readonly __wbg_resourcelock_free: (a: number, b: number) => void;
529
+ readonly client_acquireLock: (a: number, b: any) => any;
512
530
  readonly resourcelock_resource: (a: number) => [number, number];
513
- readonly resourcelock_drop: (a: number) => void;
514
531
  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;
532
+ readonly resourcelock_drop: (a: number) => void;
517
533
  readonly client_makeThumbnailInMemory: (a: number, b: any) => any;
518
- readonly client_getBlockedContacts: (a: number) => any;
519
- readonly client_getContacts: (a: number) => any;
520
- readonly client_removeSharedLinkIn: (a: number, b: number, c: number) => any;
521
- readonly client_getFileLinkStatus: (a: number, b: any) => any;
522
- readonly client_sendContactRequest: (a: number, b: number, c: number) => any;
523
- readonly client_cancelContactRequest: (a: number, b: number, c: number) => any;
524
534
  readonly client_denyContactRequest: (a: number, b: number, c: number) => any;
525
- readonly client_getDirLinkStatus: (a: number, b: any) => any;
526
- readonly client_blockContact: (a: number, b: number, c: number) => any;
527
- readonly client_listInShared: (a: number, b: number) => any;
528
- readonly client_publicLinkDir: (a: number, b: any) => any;
535
+ readonly client_cancelContactRequest: (a: number, b: number, c: number) => any;
536
+ readonly client_acceptContactRequest: (a: number, b: number, c: number) => any;
537
+ readonly client_shareDir: (a: number, b: any, c: any) => any;
529
538
  readonly client_shareFile: (a: number, b: any, c: any) => any;
530
- readonly client_listOutShared: (a: number, b: number, c: number) => any;
539
+ readonly client_publicLinkDir: (a: number, b: any) => any;
531
540
  readonly client_removeSharedLinkOut: (a: number, b: number, c: number, d: bigint) => any;
541
+ readonly client_deleteContact: (a: number, b: number, c: number) => any;
542
+ readonly client_getFileLinkStatus: (a: number, b: any) => any;
532
543
  readonly client_updateFileLink: (a: number, b: any, c: any) => any;
533
- readonly client_unblockContact: (a: number, b: number, c: number) => any;
544
+ readonly client_removeSharedLinkIn: (a: number, b: number, c: number) => any;
545
+ readonly client_sendContactRequest: (a: number, b: number, c: number) => any;
546
+ readonly client_getBlockedContacts: (a: number) => any;
547
+ readonly client_getDirLinkStatus: (a: number, b: any) => any;
548
+ readonly client_getContacts: (a: number) => any;
534
549
  readonly client_updateDirLink: (a: number, b: any, c: any) => any;
535
- readonly client_shareDir: (a: number, b: any, c: any) => any;
536
550
  readonly client_publicLinkFile: (a: number, b: any) => any;
551
+ readonly client_listIncomingContactRequests: (a: number) => any;
552
+ readonly client_listOutShared: (a: number, b: number, c: number) => any;
553
+ readonly client_blockContact: (a: number, b: number, c: number) => any;
554
+ readonly client_listInShared: (a: number, b: number) => any;
555
+ readonly client_listLinkedDir: (a: number, b: any, c: any) => any;
537
556
  readonly client_listOutgoingContactRequests: (a: number) => any;
538
557
  readonly client_removeDirLink: (a: number, b: any) => any;
539
- readonly client_listLinkedDir: (a: number, b: any, c: any) => any;
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;
543
- readonly login: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
558
+ readonly client_unblockContact: (a: number, b: number, c: number) => any;
544
559
  readonly main_js: () => void;
545
560
  readonly fromStringified: (a: any) => [number, number, number];
546
- readonly client_deleteDirPermanently: (a: number, b: any) => any;
547
- readonly client_setDirColor: (a: number, b: any, c: any) => any;
561
+ readonly login: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
562
+ readonly client_listDirRecursive: (a: number, b: any) => any;
563
+ readonly client_listFavorites: (a: number) => any;
564
+ readonly client_trashDir: (a: number, b: any) => any;
548
565
  readonly client_listDir: (a: number, b: any) => any;
549
- readonly client_getDirSize: (a: number, b: any) => any;
550
566
  readonly client_getDir: (a: number, b: number, c: number) => any;
551
567
  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
568
  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;
569
+ readonly client_setDirColor: (a: number, b: any, c: any) => any;
570
+ readonly client_dirExists: (a: number, b: any, c: number, d: number) => any;
557
571
  readonly client_createDir: (a: number, b: any, c: number, d: number) => any;
558
- readonly client_trashDir: (a: number, b: any) => any;
559
572
  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;
573
+ readonly client_getDirSize: (a: number, b: any) => any;
574
+ readonly client_updateDirMetadata: (a: number, b: any, c: any) => any;
575
+ readonly client_deleteDirPermanently: (a: number, b: any) => any;
576
+ readonly client_removeNoteParticipant: (a: number, b: any, c: any) => any;
577
+ readonly client_createNoteTag: (a: number, b: number, c: number) => any;
566
578
  readonly client_setNoteContent: (a: number, b: any, c: number, d: number, e: number, f: number) => any;
579
+ readonly client_getNote: (a: number, b: number, c: number) => any;
580
+ readonly client_deleteNote: (a: number, b: any) => any;
581
+ readonly client_restoreNoteFromHistory: (a: number, b: any, c: any) => any;
582
+ readonly client_addTagToNote: (a: number, b: any, c: any) => any;
583
+ readonly client_listNotes: (a: number) => any;
584
+ readonly client_getNoteHistory: (a: number, b: any) => any;
567
585
  readonly client_setNotePinned: (a: number, b: any, c: number) => any;
586
+ readonly client_archiveNote: (a: number, b: any) => any;
587
+ readonly client_restoreNote: (a: number, b: any) => any;
568
588
  readonly client_createNote: (a: number, b: number, c: number) => any;
569
- readonly client_setNoteFavorited: (a: number, b: any, c: number) => any;
589
+ readonly client_duplicateNote: (a: number, b: any) => any;
590
+ readonly client_setNoteTitle: (a: number, b: any, c: number, d: number) => any;
591
+ readonly client_getNoteContent: (a: number, b: any) => any;
570
592
  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
593
  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
594
  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;
595
+ readonly client_listNoteTags: (a: number) => any;
596
+ readonly client_setNoteFavorited: (a: number, b: any, c: number) => any;
597
+ readonly client_deleteNoteTag: (a: number, b: any) => any;
598
+ readonly client_removeTagFromNote: (a: number, b: any, c: any) => any;
599
+ readonly client_addNoteParticipant: (a: number, b: any, c: any, d: number) => any;
600
+ readonly client_setNoteParticipantPermission: (a: number, b: number, c: number, d: any, e: number) => any;
601
+ readonly client_setNoteTagFavorited: (a: number, b: any, c: number) => any;
586
602
  readonly client_findItemMatchesForName: (a: number, b: number, c: number) => any;
603
+ readonly client_sendTypingSignal: (a: number, b: any, c: any) => any;
587
604
  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;
605
+ readonly client_renameChat: (a: number, b: any, c: number, d: number) => any;
597
606
  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;
607
+ readonly client_addChatParticipant: (a: number, b: any, c: any) => any;
602
608
  readonly client_listMessages: (a: number, b: any) => any;
603
- readonly client_sendTypingSignal: (a: number, b: any, c: any) => any;
609
+ readonly client_listChats: (a: number) => any;
604
610
  readonly client_sendChatMessage: (a: number, b: any, c: number, d: number, e: number) => any;
611
+ readonly client_updateLastChatFocusTimesNow: (a: number, b: number, c: number) => any;
612
+ readonly client_updateChatOnlineStatus: (a: number, b: any) => any;
605
613
  readonly client_deleteChat: (a: number, b: any) => any;
606
- readonly client_renameChat: (a: number, b: any, c: number, d: number) => any;
614
+ readonly client_removeChatParticipant: (a: number, b: any, c: any) => any;
615
+ readonly client_markChatRead: (a: number, b: any) => any;
616
+ readonly client_deleteMessage: (a: number, b: any, c: any) => any;
607
617
  readonly client_getChat: (a: number, b: number, c: number) => any;
608
- readonly client_updateFileMetadata: (a: number, b: any, c: any) => any;
609
- readonly client_downloadFileToWriter: (a: number, b: any) => any;
618
+ readonly client_editMessage: (a: number, b: any, c: any, d: number, e: number) => any;
619
+ readonly client_leaveChat: (a: number, b: any) => any;
620
+ readonly client_muteChat: (a: number, b: any, c: number) => any;
621
+ readonly client_createChat: (a: number, b: number, c: number) => any;
622
+ readonly client_disableMessageEmbed: (a: number, b: any) => any;
623
+ readonly client_getAllChatsUnreadCount: (a: number) => any;
624
+ readonly client_downloadFile: (a: number, b: any) => any;
610
625
  readonly client_uploadFileFromReader: (a: number, b: any) => any;
626
+ readonly client_updateFileMetadata: (a: number, b: any, c: any) => any;
611
627
  readonly client_trashFile: (a: number, b: any) => any;
612
- readonly client_uploadFile: (a: number, b: number, c: number, d: any) => any;
613
628
  readonly client_getFile: (a: number, b: number, c: number) => any;
614
- readonly client_downloadFile: (a: number, b: any) => any;
629
+ readonly client_downloadFileToWriter: (a: number, b: any) => any;
615
630
  readonly client_deleteFilePermanently: (a: number, b: any) => any;
631
+ readonly client_uploadFile: (a: number, b: number, c: number, d: any) => any;
616
632
  readonly client_setFavorite: (a: number, b: any, c: number) => any;
617
633
  readonly client_downloadItemsToZip: (a: number, b: any) => any;
618
- readonly intounderlyingbytesource_pull: (a: number, b: any) => any;
619
- readonly intounderlyingbytesource_cancel: (a: number) => void;
634
+ readonly intounderlyingbytesource_type: (a: number) => number;
620
635
  readonly intounderlyingbytesource_start: (a: number, b: any) => void;
636
+ readonly intounderlyingbytesource_cancel: (a: number) => void;
637
+ readonly intounderlyingbytesource_pull: (a: number, b: any) => any;
621
638
  readonly __wbg_intounderlyingbytesource_free: (a: number, b: number) => void;
622
- readonly intounderlyingbytesource_type: (a: number) => number;
623
639
  readonly intounderlyingbytesource_autoAllocateChunkSize: (a: number) => number;
624
- readonly intounderlyingsource_cancel: (a: number) => void;
625
- readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void;
626
640
  readonly intounderlyingsource_pull: (a: number, b: any) => any;
627
- readonly intounderlyingsink_write: (a: number, b: any) => any;
641
+ readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void;
642
+ readonly intounderlyingsource_cancel: (a: number) => void;
628
643
  readonly __wbg_intounderlyingsink_free: (a: number, b: number) => void;
629
- readonly intounderlyingsink_close: (a: number) => any;
644
+ readonly intounderlyingsink_write: (a: number, b: any) => any;
630
645
  readonly intounderlyingsink_abort: (a: number, b: any) => any;
646
+ readonly intounderlyingsink_close: (a: number) => any;
631
647
  readonly __wbindgen_malloc: (a: number, b: number) => number;
632
648
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
633
649
  readonly __wbindgen_exn_store: (a: number) => void;
634
650
  readonly __externref_table_alloc: () => number;
635
651
  readonly __wbindgen_export_4: WebAssembly.Table;
636
652
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
637
- readonly __wbindgen_export_6: WebAssembly.Table;
653
+ readonly __externref_drop_slice: (a: number, b: number) => void;
654
+ readonly __wbindgen_export_7: WebAssembly.Table;
638
655
  readonly __externref_table_dealloc: (a: number) => void;
639
- readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbd803380da322cda: (a: number, b: number) => void;
640
- readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h218a17164c1a612c: (a: number, b: number) => void;
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;
656
+ readonly wasm_bindgen__convert__closures_____invoke__hfc6a9985192cba1d: (a: number, b: number) => void;
657
+ readonly wasm_bindgen__convert__closures_____invoke__hbe2051c1baa1d7ae: (a: number, b: number) => void;
658
+ readonly closure1428_externref_shim: (a: number, b: number, c: any) => void;
659
+ readonly closure1580_externref_shim: (a: number, b: number, c: any, d: any) => void;
643
660
  readonly __wbindgen_start: () => void;
644
661
  }
645
662