@filen/sdk-rs 0.3.8 → 0.3.9

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.js CHANGED
@@ -203,6 +203,13 @@ function debugString(val) {
203
203
  return className;
204
204
  }
205
205
 
206
+ function passArray8ToWasm0(arg, malloc) {
207
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
208
+ getUint8ArrayMemory0().set(arg, ptr / 1);
209
+ WASM_VECTOR_LEN = arg.length;
210
+ return ptr;
211
+ }
212
+
206
213
  function takeFromExternrefTable0(idx) {
207
214
  const value = wasm.__wbindgen_export_4.get(idx);
208
215
  wasm.__externref_table_dealloc(idx);
@@ -220,6 +227,10 @@ export function fromStringified(serialized) {
220
227
  return Client.__wrap(ret[0]);
221
228
  }
222
229
 
230
+ export function main_js() {
231
+ wasm.main_js();
232
+ }
233
+
223
234
  /**
224
235
  * @param {string} email
225
236
  * @param {string} password
@@ -237,30 +248,20 @@ export function login(email, password, twoFactorCode) {
237
248
  return ret;
238
249
  }
239
250
 
240
- export function main_js() {
241
- wasm.main_js();
242
- }
243
-
244
- function passArray8ToWasm0(arg, malloc) {
245
- const ptr = malloc(arg.length * 1, 1) >>> 0;
246
- getUint8ArrayMemory0().set(arg, ptr / 1);
247
- WASM_VECTOR_LEN = arg.length;
248
- return ptr;
249
- }
250
251
  function __wbg_adapter_60(arg0, arg1) {
251
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1ad07d0627257b45(arg0, arg1);
252
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc5d531eab69f2018(arg0, arg1);
252
253
  }
253
254
 
254
255
  function __wbg_adapter_63(arg0, arg1) {
255
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h96ccbfe273ba439a(arg0, arg1);
256
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7a4fb4e79b1372c1(arg0, arg1);
256
257
  }
257
258
 
258
259
  function __wbg_adapter_66(arg0, arg1, arg2) {
259
- wasm.closure937_externref_shim(arg0, arg1, arg2);
260
+ wasm.closure1463_externref_shim(arg0, arg1, arg2);
260
261
  }
261
262
 
262
- function __wbg_adapter_334(arg0, arg1, arg2, arg3) {
263
- wasm.closure1103_externref_shim(arg0, arg1, arg2, arg3);
263
+ function __wbg_adapter_279(arg0, arg1, arg2, arg3) {
264
+ wasm.closure1626_externref_shim(arg0, arg1, arg2, arg3);
264
265
  }
265
266
 
266
267
  const __wbindgen_enum_ReadableStreamReaderMode = ["byob"];
@@ -297,185 +298,171 @@ export class Client {
297
298
  wasm.__wbg_client_free(ptr, 0);
298
299
  }
299
300
  /**
300
- * @returns {ContactRequestOut[]}
301
- */
302
- listOutgoingContactRequests() {
303
- const ret = wasm.client_listOutgoingContactRequests(this.__wbg_ptr);
304
- return ret;
305
- }
306
- /**
307
- * @param {File} file
308
- * @returns {Promise<FilePublicLink | undefined>}
301
+ * @param {MakeThumbnailInMemoryParams} params
302
+ * @returns {Promise<MakeThumbnailInMemoryResult | undefined>}
309
303
  */
310
- getFileLinkStatus(file) {
311
- const ret = wasm.client_getFileLinkStatus(this.__wbg_ptr, file);
304
+ makeThumbnailInMemory(params) {
305
+ const ret = wasm.client_makeThumbnailInMemory(this.__wbg_ptr, params);
312
306
  return ret;
313
307
  }
314
308
  /**
315
- * @param {string} contact_uuid
316
- * @returns {Promise<void>}
317
- */
318
- denyContactRequest(contact_uuid) {
319
- const ptr0 = passStringToWasm0(contact_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
320
- const len0 = WASM_VECTOR_LEN;
321
- const ret = wasm.client_denyContactRequest(this.__wbg_ptr, ptr0, len0);
322
- return ret;
323
- }
324
- /**
325
- * @returns {Contact[]}
309
+ * @param {UploadFileStreamParams} params
310
+ * @returns {Promise<File>}
326
311
  */
327
- getContacts() {
328
- const ret = wasm.client_getContacts(this.__wbg_ptr);
312
+ uploadFileFromReader(params) {
313
+ const ret = wasm.client_uploadFileFromReader(this.__wbg_ptr, params);
329
314
  return ret;
330
315
  }
331
316
  /**
332
- * @param {DirWithMetaEnum | null} [dir]
333
- * @param {User | null} [user]
334
- * @returns {[SharedDirectory[], SharedFile[]]}
317
+ * @param {File} file
318
+ * @returns {Promise<File>}
335
319
  */
336
- listOutShared(dir, user) {
337
- const ret = wasm.client_listOutShared(this.__wbg_ptr, isLikeNone(dir) ? 0 : addToExternrefTable0(dir), isLikeNone(user) ? 0 : addToExternrefTable0(user));
320
+ trashFile(file) {
321
+ const ret = wasm.client_trashFile(this.__wbg_ptr, file);
338
322
  return ret;
339
323
  }
340
324
  /**
341
- * @param {string} contact_uuid
325
+ * @param {File} file
342
326
  * @returns {Promise<void>}
343
327
  */
344
- deleteContact(contact_uuid) {
345
- const ptr0 = passStringToWasm0(contact_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
346
- const len0 = WASM_VECTOR_LEN;
347
- const ret = wasm.client_deleteContact(this.__wbg_ptr, ptr0, len0);
328
+ deleteFilePermanently(file) {
329
+ const ret = wasm.client_deleteFilePermanently(this.__wbg_ptr, file);
348
330
  return ret;
349
331
  }
350
332
  /**
351
- * @param {DirPublicLink} link
333
+ * @param {DownloadFileStreamParams} params
352
334
  * @returns {Promise<void>}
353
335
  */
354
- removeDirLink(link) {
355
- const ret = wasm.client_removeDirLink(this.__wbg_ptr, link);
336
+ downloadFileToWriter(params) {
337
+ const ret = wasm.client_downloadFileToWriter(this.__wbg_ptr, params);
356
338
  return ret;
357
339
  }
358
340
  /**
359
- * @param {DirWithMetaEnum | null} [dir]
360
- * @returns {[SharedDirectory[], SharedFile[]]}
341
+ * @param {Uint8Array} data
342
+ * @param {UploadFileParams} params
343
+ * @returns {Promise<File>}
361
344
  */
362
- listInShared(dir) {
363
- const ret = wasm.client_listInShared(this.__wbg_ptr, isLikeNone(dir) ? 0 : addToExternrefTable0(dir));
345
+ uploadFile(data, params) {
346
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
347
+ const len0 = WASM_VECTOR_LEN;
348
+ const ret = wasm.client_uploadFile(this.__wbg_ptr, ptr0, len0, params);
364
349
  return ret;
365
350
  }
366
351
  /**
367
- * @param {Dir} dir
368
- * @returns {Promise<DirPublicLink>}
352
+ * @param {FileEnum} file
353
+ * @returns {Promise<Uint8Array>}
369
354
  */
370
- publicLinkDir(dir) {
371
- const ret = wasm.client_publicLinkDir(this.__wbg_ptr, dir);
355
+ downloadFile(file) {
356
+ const ret = wasm.client_downloadFile(this.__wbg_ptr, file);
372
357
  return ret;
373
358
  }
374
359
  /**
375
- * @param {File} file
376
- * @param {User} user
377
- * @returns {Promise<void>}
360
+ * @returns {StringifiedClient}
378
361
  */
379
- shareFile(file, user) {
380
- const ret = wasm.client_shareFile(this.__wbg_ptr, file, user);
362
+ toStringified() {
363
+ const ret = wasm.client_toStringified(this.__wbg_ptr);
381
364
  return ret;
382
365
  }
383
366
  /**
384
- * @param {File} file
385
- * @param {FilePublicLink} link
386
- * @returns {Promise<void>}
367
+ * @returns {[Dir[], File[]]}
387
368
  */
388
- updateFileLink(file, link) {
389
- const ret = wasm.client_updateFileLink(this.__wbg_ptr, file, link);
369
+ listFavorites() {
370
+ const ret = wasm.client_listFavorites(this.__wbg_ptr);
390
371
  return ret;
391
372
  }
392
373
  /**
393
- * @param {Contact} contact
394
- * @returns {Promise<User>}
374
+ * @returns {Root}
395
375
  */
396
- makeUserFromContact(contact) {
397
- const ret = wasm.client_makeUserFromContact(this.__wbg_ptr, contact);
376
+ root() {
377
+ const ret = wasm.client_root(this.__wbg_ptr);
398
378
  return ret;
399
379
  }
400
380
  /**
401
381
  * @param {Dir} dir
402
- * @param {DirPublicLink} link
403
- * @returns {Promise<void>}
382
+ * @returns {Promise<Dir>}
404
383
  */
405
- updateDirLink(dir, link) {
406
- const ret = wasm.client_updateDirLink(this.__wbg_ptr, dir, link);
384
+ trashDir(dir) {
385
+ const ret = wasm.client_trashDir(this.__wbg_ptr, dir);
407
386
  return ret;
408
387
  }
409
388
  /**
410
- * @param {string} link_uuid
411
- * @returns {Promise<void>}
389
+ * @param {AnyDirEnum} dir
390
+ * @param {string} nameOrUuid
391
+ * @returns {Promise<NonRootObject | undefined>}
412
392
  */
413
- removeSharedLinkIn(link_uuid) {
414
- const ptr0 = passStringToWasm0(link_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
393
+ findItemInDir(dir, nameOrUuid) {
394
+ const ptr0 = passStringToWasm0(nameOrUuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
415
395
  const len0 = WASM_VECTOR_LEN;
416
- const ret = wasm.client_removeSharedLinkIn(this.__wbg_ptr, ptr0, len0);
396
+ const ret = wasm.client_findItemInDir(this.__wbg_ptr, dir, ptr0, len0);
417
397
  return ret;
418
398
  }
419
399
  /**
420
- * @param {File} file
421
- * @returns {Promise<FilePublicLink>}
400
+ * @param {DirEnum} dir
401
+ * @returns {[Dir[], File[]]}
422
402
  */
423
- publicLinkFile(file) {
424
- const ret = wasm.client_publicLinkFile(this.__wbg_ptr, file);
403
+ listDir(dir) {
404
+ const ret = wasm.client_listDir(this.__wbg_ptr, dir);
425
405
  return ret;
426
406
  }
427
407
  /**
428
408
  * @param {Dir} dir
429
- * @returns {Promise<DirPublicLink | undefined>}
409
+ * @returns {Promise<void>}
430
410
  */
431
- getDirLinkStatus(dir) {
432
- const ret = wasm.client_getDirLinkStatus(this.__wbg_ptr, dir);
411
+ deleteDirPermanently(dir) {
412
+ const ret = wasm.client_deleteDirPermanently(this.__wbg_ptr, dir);
433
413
  return ret;
434
414
  }
435
415
  /**
436
- * @returns {ContactRequestIn[]}
416
+ * @returns {[Dir[], File[]]}
437
417
  */
438
- listIncomingContactRequests() {
439
- const ret = wasm.client_listIncomingContactRequests(this.__wbg_ptr);
418
+ listRecents() {
419
+ const ret = wasm.client_listRecents(this.__wbg_ptr);
440
420
  return ret;
441
421
  }
442
422
  /**
443
- * @param {Dir} dir
444
- * @param {User} user
423
+ * @param {AnyDirEnum} parent
424
+ * @param {string} name
445
425
  * @returns {Promise<void>}
446
426
  */
447
- shareDir(dir, user) {
448
- const ret = wasm.client_shareDir(this.__wbg_ptr, dir, user);
427
+ dirExists(parent, name) {
428
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
429
+ const len0 = WASM_VECTOR_LEN;
430
+ const ret = wasm.client_dirExists(this.__wbg_ptr, parent, ptr0, len0);
449
431
  return ret;
450
432
  }
451
433
  /**
452
- * @param {string} link_uuid
453
- * @param {bigint} receiver_id
454
- * @returns {Promise<void>}
434
+ * @param {Dir} dir
435
+ * @returns {Promise<DirSizeResponse>}
455
436
  */
456
- removeSharedLinkOut(link_uuid, receiver_id) {
457
- const ptr0 = passStringToWasm0(link_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
458
- const len0 = WASM_VECTOR_LEN;
459
- const ret = wasm.client_removeSharedLinkOut(this.__wbg_ptr, ptr0, len0, receiver_id);
437
+ getDirSize(dir) {
438
+ const ret = wasm.client_getDirSize(this.__wbg_ptr, dir);
460
439
  return ret;
461
440
  }
462
441
  /**
463
- * @param {DirWithMetaEnum} dir
464
- * @param {DirPublicLink} link
442
+ * @param {DirEnum} dir
465
443
  * @returns {[Dir[], File[]]}
466
444
  */
467
- listLinkedDir(dir, link) {
468
- const ret = wasm.client_listLinkedDir(this.__wbg_ptr, dir, link);
445
+ listDirRecursive(dir) {
446
+ const ret = wasm.client_listDirRecursive(this.__wbg_ptr, dir);
469
447
  return ret;
470
448
  }
471
449
  /**
472
- * @param {string} email
473
- * @returns {Promise<string>}
450
+ * @param {DirEnum} parent
451
+ * @param {string} name
452
+ * @returns {Promise<Dir>}
474
453
  */
475
- sendContactRequest(email) {
476
- const ptr0 = passStringToWasm0(email, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
454
+ createDir(parent, name) {
455
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
477
456
  const len0 = WASM_VECTOR_LEN;
478
- const ret = wasm.client_sendContactRequest(this.__wbg_ptr, ptr0, len0);
457
+ const ret = wasm.client_createDir(this.__wbg_ptr, parent, ptr0, len0);
458
+ return ret;
459
+ }
460
+ /**
461
+ * @param {DownloadFileToZipParams} params
462
+ * @returns {Promise<void>}
463
+ */
464
+ downloadItemsToZip(params) {
465
+ const ret = wasm.client_downloadItemsToZip(this.__wbg_ptr, params);
479
466
  return ret;
480
467
  }
481
468
  /**
@@ -488,174 +475,196 @@ export class Client {
488
475
  const ret = wasm.client_acceptContactRequest(this.__wbg_ptr, ptr0, len0);
489
476
  return ret;
490
477
  }
478
+ /**
479
+ * @param {DirPublicLink} link
480
+ * @returns {Promise<void>}
481
+ */
482
+ removeDirLink(link) {
483
+ const ret = wasm.client_removeDirLink(this.__wbg_ptr, link);
484
+ return ret;
485
+ }
491
486
  /**
492
487
  * @param {string} contact_uuid
493
488
  * @returns {Promise<void>}
494
489
  */
495
- cancelContactRequest(contact_uuid) {
490
+ deleteContact(contact_uuid) {
496
491
  const ptr0 = passStringToWasm0(contact_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
497
492
  const len0 = WASM_VECTOR_LEN;
498
- const ret = wasm.client_cancelContactRequest(this.__wbg_ptr, ptr0, len0);
493
+ const ret = wasm.client_deleteContact(this.__wbg_ptr, ptr0, len0);
499
494
  return ret;
500
495
  }
501
496
  /**
502
- * @param {File} file
497
+ * @returns {Contact[]}
498
+ */
499
+ getContacts() {
500
+ const ret = wasm.client_getContacts(this.__wbg_ptr);
501
+ return ret;
502
+ }
503
+ /**
504
+ * @param {string} link_uuid
503
505
  * @returns {Promise<void>}
504
506
  */
505
- deleteFilePermanently(file) {
506
- const ret = wasm.client_deleteFilePermanently(this.__wbg_ptr, file);
507
+ removeSharedLinkIn(link_uuid) {
508
+ const ptr0 = passStringToWasm0(link_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
509
+ const len0 = WASM_VECTOR_LEN;
510
+ const ret = wasm.client_removeSharedLinkIn(this.__wbg_ptr, ptr0, len0);
507
511
  return ret;
508
512
  }
509
513
  /**
510
- * @param {File} file
511
- * @returns {Promise<File>}
514
+ * @param {DirWithMetaEnum | null} [dir]
515
+ * @returns {[SharedDirectory[], SharedFile[]]}
512
516
  */
513
- trashFile(file) {
514
- const ret = wasm.client_trashFile(this.__wbg_ptr, file);
517
+ listInShared(dir) {
518
+ const ret = wasm.client_listInShared(this.__wbg_ptr, isLikeNone(dir) ? 0 : addToExternrefTable0(dir));
515
519
  return ret;
516
520
  }
517
521
  /**
518
- * @param {FileEnum} file
519
- * @returns {Promise<Uint8Array>}
522
+ * @param {Contact} contact
523
+ * @returns {Promise<User>}
520
524
  */
521
- downloadFile(file) {
522
- const ret = wasm.client_downloadFile(this.__wbg_ptr, file);
525
+ makeUserFromContact(contact) {
526
+ const ret = wasm.client_makeUserFromContact(this.__wbg_ptr, contact);
523
527
  return ret;
524
528
  }
525
529
  /**
526
- * @param {DownloadFileStreamParams} params
527
- * @returns {Promise<void>}
530
+ * @returns {ContactRequestIn[]}
528
531
  */
529
- downloadFileToWriter(params) {
530
- const ret = wasm.client_downloadFileToWriter(this.__wbg_ptr, params);
532
+ listIncomingContactRequests() {
533
+ const ret = wasm.client_listIncomingContactRequests(this.__wbg_ptr);
531
534
  return ret;
532
535
  }
533
536
  /**
534
- * @param {UploadFileStreamParams} params
535
- * @returns {Promise<File>}
537
+ * @param {DirWithMetaEnum} dir
538
+ * @param {DirPublicLink} link
539
+ * @returns {[Dir[], File[]]}
536
540
  */
537
- uploadFileFromReader(params) {
538
- const ret = wasm.client_uploadFileFromReader(this.__wbg_ptr, params);
541
+ listLinkedDir(dir, link) {
542
+ const ret = wasm.client_listLinkedDir(this.__wbg_ptr, dir, link);
539
543
  return ret;
540
544
  }
541
545
  /**
542
- * @param {Uint8Array} data
543
- * @param {UploadFileParams} params
544
- * @returns {Promise<File>}
546
+ * @param {File} file
547
+ * @returns {Promise<FilePublicLink | undefined>}
545
548
  */
546
- uploadFile(data, params) {
547
- const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
548
- const len0 = WASM_VECTOR_LEN;
549
- const ret = wasm.client_uploadFile(this.__wbg_ptr, ptr0, len0, params);
549
+ getFileLinkStatus(file) {
550
+ const ret = wasm.client_getFileLinkStatus(this.__wbg_ptr, file);
550
551
  return ret;
551
552
  }
552
553
  /**
553
- * @param {DownloadFileToZipParams} params
554
- * @returns {Promise<void>}
554
+ * @param {string} email
555
+ * @returns {Promise<string>}
555
556
  */
556
- downloadItemsToZip(params) {
557
- const ret = wasm.client_downloadItemsToZip(this.__wbg_ptr, params);
557
+ sendContactRequest(email) {
558
+ const ptr0 = passStringToWasm0(email, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
559
+ const len0 = WASM_VECTOR_LEN;
560
+ const ret = wasm.client_sendContactRequest(this.__wbg_ptr, ptr0, len0);
558
561
  return ret;
559
562
  }
560
563
  /**
561
- * @param {DirEnum} dir
562
- * @returns {[Dir[], File[]]}
564
+ * @param {Dir} dir
565
+ * @param {DirPublicLink} link
566
+ * @returns {Promise<void>}
563
567
  */
564
- listDir(dir) {
565
- const ret = wasm.client_listDir(this.__wbg_ptr, dir);
568
+ updateDirLink(dir, link) {
569
+ const ret = wasm.client_updateDirLink(this.__wbg_ptr, dir, link);
566
570
  return ret;
567
571
  }
568
572
  /**
569
- * @returns {[Dir[], File[]]}
573
+ * @param {Dir} dir
574
+ * @returns {Promise<DirPublicLink | undefined>}
570
575
  */
571
- listFavorites() {
572
- const ret = wasm.client_listFavorites(this.__wbg_ptr);
576
+ getDirLinkStatus(dir) {
577
+ const ret = wasm.client_getDirLinkStatus(this.__wbg_ptr, dir);
573
578
  return ret;
574
579
  }
575
580
  /**
576
- * @returns {[Dir[], File[]]}
581
+ * @param {File} file
582
+ * @returns {Promise<FilePublicLink>}
577
583
  */
578
- listRecents() {
579
- const ret = wasm.client_listRecents(this.__wbg_ptr);
584
+ publicLinkFile(file) {
585
+ const ret = wasm.client_publicLinkFile(this.__wbg_ptr, file);
580
586
  return ret;
581
587
  }
582
588
  /**
583
589
  * @param {Dir} dir
584
- * @returns {Promise<Dir>}
590
+ * @returns {Promise<DirPublicLink>}
585
591
  */
586
- trashDir(dir) {
587
- const ret = wasm.client_trashDir(this.__wbg_ptr, dir);
592
+ publicLinkDir(dir) {
593
+ const ret = wasm.client_publicLinkDir(this.__wbg_ptr, dir);
588
594
  return ret;
589
595
  }
590
596
  /**
591
- * @param {Dir} dir
597
+ * @param {string} link_uuid
598
+ * @param {bigint} receiver_id
592
599
  * @returns {Promise<void>}
593
600
  */
594
- deleteDirPermanently(dir) {
595
- const ret = wasm.client_deleteDirPermanently(this.__wbg_ptr, dir);
601
+ removeSharedLinkOut(link_uuid, receiver_id) {
602
+ const ptr0 = passStringToWasm0(link_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
603
+ const len0 = WASM_VECTOR_LEN;
604
+ const ret = wasm.client_removeSharedLinkOut(this.__wbg_ptr, ptr0, len0, receiver_id);
596
605
  return ret;
597
606
  }
598
607
  /**
599
- * @param {DirEnum} parent
600
- * @param {string} name
601
- * @returns {Promise<Dir>}
608
+ * @param {DirWithMetaEnum | null} [dir]
609
+ * @param {User | null} [user]
610
+ * @returns {[SharedDirectory[], SharedFile[]]}
602
611
  */
603
- createDir(parent, name) {
604
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
605
- const len0 = WASM_VECTOR_LEN;
606
- const ret = wasm.client_createDir(this.__wbg_ptr, parent, ptr0, len0);
612
+ listOutShared(dir, user) {
613
+ const ret = wasm.client_listOutShared(this.__wbg_ptr, isLikeNone(dir) ? 0 : addToExternrefTable0(dir), isLikeNone(user) ? 0 : addToExternrefTable0(user));
607
614
  return ret;
608
615
  }
609
616
  /**
610
- * @param {AnyDirEnum} parent
611
- * @param {string} name
617
+ * @param {Dir} dir
618
+ * @param {User} user
612
619
  * @returns {Promise<void>}
613
620
  */
614
- dirExists(parent, name) {
615
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
616
- const len0 = WASM_VECTOR_LEN;
617
- const ret = wasm.client_dirExists(this.__wbg_ptr, parent, ptr0, len0);
621
+ shareDir(dir, user) {
622
+ const ret = wasm.client_shareDir(this.__wbg_ptr, dir, user);
618
623
  return ret;
619
624
  }
620
625
  /**
621
- * @param {AnyDirEnum} dir
622
- * @param {string} nameOrUuid
623
- * @returns {Promise<NonRootObject | undefined>}
626
+ * @param {string} contact_uuid
627
+ * @returns {Promise<void>}
624
628
  */
625
- findItemInDir(dir, nameOrUuid) {
626
- const ptr0 = passStringToWasm0(nameOrUuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
629
+ cancelContactRequest(contact_uuid) {
630
+ const ptr0 = passStringToWasm0(contact_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
627
631
  const len0 = WASM_VECTOR_LEN;
628
- const ret = wasm.client_findItemInDir(this.__wbg_ptr, dir, ptr0, len0);
632
+ const ret = wasm.client_cancelContactRequest(this.__wbg_ptr, ptr0, len0);
629
633
  return ret;
630
634
  }
631
635
  /**
632
- * @returns {Root}
636
+ * @param {string} contact_uuid
637
+ * @returns {Promise<void>}
633
638
  */
634
- root() {
635
- const ret = wasm.client_root(this.__wbg_ptr);
639
+ denyContactRequest(contact_uuid) {
640
+ const ptr0 = passStringToWasm0(contact_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
641
+ const len0 = WASM_VECTOR_LEN;
642
+ const ret = wasm.client_denyContactRequest(this.__wbg_ptr, ptr0, len0);
636
643
  return ret;
637
644
  }
638
645
  /**
639
- * @param {Dir} dir
640
- * @returns {Promise<DirSizeResponse>}
646
+ * @returns {ContactRequestOut[]}
641
647
  */
642
- getDirSize(dir) {
643
- const ret = wasm.client_getDirSize(this.__wbg_ptr, dir);
648
+ listOutgoingContactRequests() {
649
+ const ret = wasm.client_listOutgoingContactRequests(this.__wbg_ptr);
644
650
  return ret;
645
651
  }
646
652
  /**
647
- * @param {DirEnum} dir
648
- * @returns {[Dir[], File[]]}
653
+ * @param {File} file
654
+ * @param {FilePublicLink} link
655
+ * @returns {Promise<void>}
649
656
  */
650
- listDirRecursive(dir) {
651
- const ret = wasm.client_listDirRecursive(this.__wbg_ptr, dir);
657
+ updateFileLink(file, link) {
658
+ const ret = wasm.client_updateFileLink(this.__wbg_ptr, file, link);
652
659
  return ret;
653
660
  }
654
661
  /**
655
- * @returns {StringifiedClient}
662
+ * @param {File} file
663
+ * @param {User} user
664
+ * @returns {Promise<void>}
656
665
  */
657
- toStringified() {
658
- const ret = wasm.client_toStringified(this.__wbg_ptr);
666
+ shareFile(file, user) {
667
+ const ret = wasm.client_shareFile(this.__wbg_ptr, file, user);
659
668
  return ret;
660
669
  }
661
670
  }
@@ -677,13 +686,6 @@ export class IntoUnderlyingByteSource {
677
686
  const ptr = this.__destroy_into_raw();
678
687
  wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
679
688
  }
680
- /**
681
- * @returns {ReadableStreamType}
682
- */
683
- get type() {
684
- const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
685
- return __wbindgen_enum_ReadableStreamType[ret];
686
- }
687
689
  /**
688
690
  * @returns {number}
689
691
  */
@@ -691,11 +693,9 @@ export class IntoUnderlyingByteSource {
691
693
  const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
692
694
  return ret >>> 0;
693
695
  }
694
- /**
695
- * @param {ReadableByteStreamController} controller
696
- */
697
- start(controller) {
698
- wasm.intounderlyingbytesource_start(this.__wbg_ptr, controller);
696
+ cancel() {
697
+ const ptr = this.__destroy_into_raw();
698
+ wasm.intounderlyingbytesource_cancel(ptr);
699
699
  }
700
700
  /**
701
701
  * @param {ReadableByteStreamController} controller
@@ -705,9 +705,18 @@ export class IntoUnderlyingByteSource {
705
705
  const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, controller);
706
706
  return ret;
707
707
  }
708
- cancel() {
709
- const ptr = this.__destroy_into_raw();
710
- wasm.intounderlyingbytesource_cancel(ptr);
708
+ /**
709
+ * @returns {ReadableStreamType}
710
+ */
711
+ get type() {
712
+ const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
713
+ return __wbindgen_enum_ReadableStreamType[ret];
714
+ }
715
+ /**
716
+ * @param {ReadableByteStreamController} controller
717
+ */
718
+ start(controller) {
719
+ wasm.intounderlyingbytesource_start(this.__wbg_ptr, controller);
711
720
  }
712
721
  }
713
722
 
@@ -737,20 +746,20 @@ export class IntoUnderlyingSink {
737
746
  return ret;
738
747
  }
739
748
  /**
740
- * @param {any} reason
741
749
  * @returns {Promise<any>}
742
750
  */
743
- abort(reason) {
751
+ close() {
744
752
  const ptr = this.__destroy_into_raw();
745
- const ret = wasm.intounderlyingsink_abort(ptr, reason);
753
+ const ret = wasm.intounderlyingsink_close(ptr);
746
754
  return ret;
747
755
  }
748
756
  /**
757
+ * @param {any} reason
749
758
  * @returns {Promise<any>}
750
759
  */
751
- close() {
760
+ abort(reason) {
752
761
  const ptr = this.__destroy_into_raw();
753
- const ret = wasm.intounderlyingsink_close(ptr);
762
+ const ret = wasm.intounderlyingsink_abort(ptr, reason);
754
763
  return ret;
755
764
  }
756
765
  }
@@ -868,6 +877,10 @@ function __wbg_get_imports() {
868
877
  const ret = arg0.byteOffset;
869
878
  return ret;
870
879
  };
880
+ imports.wbg.__wbg_call_183d03aa1e7c9e23 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
881
+ const ret = arg0.call(arg1, arg2, arg3, arg4, arg5);
882
+ return ret;
883
+ }, arguments) };
871
884
  imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
872
885
  const ret = arg0.call(arg1);
873
886
  return ret;
@@ -876,10 +889,6 @@ function __wbg_get_imports() {
876
889
  const ret = arg0.call(arg1, arg2);
877
890
  return ret;
878
891
  }, arguments) };
879
- imports.wbg.__wbg_call_efbfaf560bee7c99 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
880
- const ret = arg0.call(arg1, arg2, arg3, arg4, arg5);
881
- return ret;
882
- }, arguments) };
883
892
  imports.wbg.__wbg_cancel_81ebaa65c2a54d20 = function(arg0) {
884
893
  const ret = arg0.cancel();
885
894
  return ret;
@@ -1122,7 +1131,7 @@ function __wbg_get_imports() {
1122
1131
  const a = state0.a;
1123
1132
  state0.a = 0;
1124
1133
  try {
1125
- return __wbg_adapter_334(a, state0.b, arg0, arg1);
1134
+ return __wbg_adapter_279(a, state0.b, arg0, arg1);
1126
1135
  } finally {
1127
1136
  state0.a = a;
1128
1137
  }
@@ -1400,16 +1409,16 @@ function __wbg_get_imports() {
1400
1409
  const ret = false;
1401
1410
  return ret;
1402
1411
  };
1403
- imports.wbg.__wbindgen_closure_wrapper2281 = function(arg0, arg1, arg2) {
1404
- const ret = makeMutClosure(arg0, arg1, 834, __wbg_adapter_60);
1412
+ imports.wbg.__wbindgen_closure_wrapper2347 = function(arg0, arg1, arg2) {
1413
+ const ret = makeMutClosure(arg0, arg1, 895, __wbg_adapter_60);
1405
1414
  return ret;
1406
1415
  };
1407
- imports.wbg.__wbindgen_closure_wrapper2502 = function(arg0, arg1, arg2) {
1408
- const ret = makeMutClosure(arg0, arg1, 898, __wbg_adapter_63);
1416
+ imports.wbg.__wbindgen_closure_wrapper3589 = function(arg0, arg1, arg2) {
1417
+ const ret = makeMutClosure(arg0, arg1, 1424, __wbg_adapter_63);
1409
1418
  return ret;
1410
1419
  };
1411
- imports.wbg.__wbindgen_closure_wrapper2618 = function(arg0, arg1, arg2) {
1412
- const ret = makeMutClosure(arg0, arg1, 938, __wbg_adapter_66);
1420
+ imports.wbg.__wbindgen_closure_wrapper3701 = function(arg0, arg1, arg2) {
1421
+ const ret = makeMutClosure(arg0, arg1, 1464, __wbg_adapter_66);
1413
1422
  return ret;
1414
1423
  };
1415
1424
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {