@filen/sdk-rs 0.2.4 → 0.3.1

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,8 +1,8 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export function from_serialized(serialized: StringifiedClient): FilenState;
4
- export function login(email: string, password: string, two_factor_code?: string | null): Promise<FilenState>;
5
4
  export function main_js(): void;
5
+ export function login(email: string, password: string, two_factor_code?: string | null): Promise<FilenState>;
6
6
  /**
7
7
  * Chroma subsampling format
8
8
  */
@@ -32,35 +32,67 @@ export enum ChromaSampling {
32
32
  type ReadableStreamType = "bytes";
33
33
  export interface UploadFileStreamParams extends UploadFileParams {
34
34
  reader: ReadableStream<Uint8Array>;
35
- known_size?: bigint;
35
+ known_size?: bigint | undefined;
36
36
  progress?: (bytes: bigint) => void;
37
37
  }
38
38
 
39
- export interface FileMeta {
40
- name: string;
41
- mime: string;
42
- created: Date | undefined;
43
- modified: Date;
44
- hash: Uint8Array | undefined;
39
+ export interface Root {
40
+ uuid: UuidStr;
45
41
  }
46
42
 
43
+ export type NonRootObject = ({ type: "dir" } & Dir) | ({ type: "file" } & File);
44
+
47
45
  export interface DownloadFileStreamParams {
46
+ file: File;
48
47
  writer: WritableStream<Uint8Array>;
49
48
  progress?: (bytes: bigint) => void;
50
49
  }
51
50
 
52
- export interface DirMeta {
51
+ export interface Dir {
52
+ uuid: UuidStr;
53
+ parent: ParentUuid;
54
+ color?: string;
55
+ favorited: boolean;
56
+ meta?: DecryptedDirMeta;
57
+ }
58
+
59
+ export interface DecryptedDirMeta {
60
+ name: string;
61
+ created?: bigint;
62
+ }
63
+
64
+ export type DirEnum = Dir | Root;
65
+
66
+ export interface DecryptedFileMeta {
53
67
  name: string;
54
- created: Date | undefined;
68
+ mime: string;
69
+ created?: bigint;
70
+ modified: bigint;
71
+ hash?: Uint8Array;
72
+ size: bigint;
73
+ key: string;
74
+ version: FileEncryptionVersion;
55
75
  }
56
76
 
57
77
  export interface UploadFileParams {
78
+ parent: DirEnum;
58
79
  name: string;
59
- created?: Date;
60
- modified?: Date;
80
+ created?: bigint;
81
+ modified?: bigint;
61
82
  mime?: string;
62
83
  }
63
84
 
85
+ export interface File {
86
+ uuid: UuidStr;
87
+ meta?: DecryptedFileMeta;
88
+ parent: ParentUuid;
89
+ size: bigint;
90
+ favorited: boolean;
91
+ region: string;
92
+ bucket: string;
93
+ chunks: bigint;
94
+ }
95
+
64
96
  export interface StringifiedClient {
65
97
  email: string;
66
98
  rootUuid: string;
@@ -70,41 +102,23 @@ export interface StringifiedClient {
70
102
  authVersion: number;
71
103
  }
72
104
 
73
- export class Dir {
74
- private constructor();
75
- free(): void;
76
- readonly parent: string;
77
- readonly favorited: boolean;
78
- readonly uuid: string;
79
- readonly color: string;
80
- readonly meta: DirMeta | undefined;
81
- }
82
- export class File {
83
- private constructor();
84
- free(): void;
85
- readonly meta: FileMeta | undefined;
86
- readonly parent: string;
87
- readonly uuid: string;
88
- readonly size: bigint;
89
- readonly favorited: boolean;
90
- }
91
105
  export class FilenState {
92
106
  private constructor();
93
107
  free(): void;
94
108
  serialize(): StringifiedClient;
95
- findItemInDir(dir: Dir, name_or_uuid: string): Promise<Dir | File | undefined>;
96
- dirExists(parent: Dir, name: string): Promise<void>;
109
+ dirExists(parent: DirEnum, name: string): Promise<void>;
97
110
  deleteDirPermanently(dir: Dir): Promise<void>;
98
- trashDir(dir: Dir): Promise<void>;
99
- root(): Dir;
100
- createDir(parent: Dir, name: string): Promise<Dir>;
101
- listDir(dir: Dir): Promise<[Dir[], File[]]>;
102
- uploadFileStream(parent: Dir, params: UploadFileStreamParams): Promise<File>;
103
- trashFile(file: File): Promise<void>;
111
+ root(): Root;
112
+ listDir(dir: DirEnum): Promise<[Dir[], File[]]>;
113
+ trashDir(dir: DirEnum): Promise<void>;
114
+ createDir(parent: DirEnum, name: string): Promise<Dir>;
115
+ findItemInDir(dir: DirEnum, name_or_uuid: string): Promise<NonRootObject | undefined>;
104
116
  downloadFile(file: File): Promise<Uint8Array>;
105
- downloadFileToWriter(file: File, params: DownloadFileStreamParams): Promise<void>;
106
117
  deleteFilePermanently(file: File): Promise<void>;
107
- uploadFile(parent: Dir, data: Uint8Array, params: UploadFileParams): Promise<File>;
118
+ uploadFile(data: Uint8Array, params: UploadFileParams): Promise<File>;
119
+ uploadFileStream(params: UploadFileStreamParams): Promise<File>;
120
+ trashFile(file: File): Promise<void>;
121
+ downloadFileToWriter(params: DownloadFileStreamParams): Promise<void>;
108
122
  }
109
123
  export class IntoUnderlyingByteSource {
110
124
  private constructor();
@@ -238,6 +238,10 @@ export function from_serialized(serialized) {
238
238
  return FilenState.__wrap(ret[0]);
239
239
  }
240
240
 
241
+ export function main_js() {
242
+ wasm.main_js();
243
+ }
244
+
241
245
  /**
242
246
  * @param {string} email
243
247
  * @param {string} password
@@ -255,16 +259,6 @@ export function login(email, password, two_factor_code) {
255
259
  return ret;
256
260
  }
257
261
 
258
- export function main_js() {
259
- wasm.main_js();
260
- }
261
-
262
- function _assertClass(instance, klass) {
263
- if (!(instance instanceof klass)) {
264
- throw new Error(`expected instance of ${klass.name}`);
265
- }
266
- }
267
-
268
262
  function passArray8ToWasm0(arg, malloc) {
269
263
  const ptr = malloc(arg.length * 1, 1) >>> 0;
270
264
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -272,15 +266,15 @@ function passArray8ToWasm0(arg, malloc) {
272
266
  return ptr;
273
267
  }
274
268
  function __wbg_adapter_58(arg0, arg1, arg2) {
275
- wasm.closure110_externref_shim(arg0, arg1, arg2);
269
+ wasm.closure109_externref_shim(arg0, arg1, arg2);
276
270
  }
277
271
 
278
272
  function __wbg_adapter_61(arg0, arg1) {
279
273
  wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3a28bb1da68602c0(arg0, arg1);
280
274
  }
281
275
 
282
- function __wbg_adapter_143(arg0, arg1, arg2, arg3) {
283
- wasm.closure86_externref_shim(arg0, arg1, arg2, arg3);
276
+ function __wbg_adapter_131(arg0, arg1, arg2, arg3) {
277
+ wasm.closure85_externref_shim(arg0, arg1, arg2, arg3);
284
278
  }
285
279
 
286
280
  /**
@@ -316,140 +310,6 @@ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
316
310
 
317
311
  const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
318
312
 
319
- const DirFinalization = (typeof FinalizationRegistry === 'undefined')
320
- ? { register: () => {}, unregister: () => {} }
321
- : new FinalizationRegistry(ptr => wasm.__wbg_dir_free(ptr >>> 0, 1));
322
-
323
- export class Dir {
324
-
325
- static __wrap(ptr) {
326
- ptr = ptr >>> 0;
327
- const obj = Object.create(Dir.prototype);
328
- obj.__wbg_ptr = ptr;
329
- DirFinalization.register(obj, obj.__wbg_ptr, obj);
330
- return obj;
331
- }
332
-
333
- __destroy_into_raw() {
334
- const ptr = this.__wbg_ptr;
335
- this.__wbg_ptr = 0;
336
- DirFinalization.unregister(this);
337
- return ptr;
338
- }
339
-
340
- free() {
341
- const ptr = this.__destroy_into_raw();
342
- wasm.__wbg_dir_free(ptr, 0);
343
- }
344
- /**
345
- * @returns {string}
346
- */
347
- get parent() {
348
- const ret = wasm.dir_parent(this.__wbg_ptr);
349
- var v1 = getCachedStringFromWasm0(ret[0], ret[1]);
350
- if (ret[0] !== 0) { wasm.__wbindgen_free(ret[0], ret[1], 1); }
351
- return v1;
352
- }
353
- /**
354
- * @returns {boolean}
355
- */
356
- get favorited() {
357
- const ret = wasm.dir_favorited(this.__wbg_ptr);
358
- return ret !== 0;
359
- }
360
- /**
361
- * @returns {string}
362
- */
363
- get uuid() {
364
- const ret = wasm.dir_uuid(this.__wbg_ptr);
365
- var v1 = getCachedStringFromWasm0(ret[0], ret[1]);
366
- if (ret[0] !== 0) { wasm.__wbindgen_free(ret[0], ret[1], 1); }
367
- return v1;
368
- }
369
- /**
370
- * @returns {string}
371
- */
372
- get color() {
373
- const ret = wasm.dir_color(this.__wbg_ptr);
374
- var v1 = getCachedStringFromWasm0(ret[0], ret[1]);
375
- if (ret[0] !== 0) { wasm.__wbindgen_free(ret[0], ret[1], 1); }
376
- return v1;
377
- }
378
- /**
379
- * @returns {DirMeta | undefined}
380
- */
381
- get meta() {
382
- const ret = wasm.dir_meta(this.__wbg_ptr);
383
- return ret;
384
- }
385
- }
386
-
387
- const FileFinalization = (typeof FinalizationRegistry === 'undefined')
388
- ? { register: () => {}, unregister: () => {} }
389
- : new FinalizationRegistry(ptr => wasm.__wbg_file_free(ptr >>> 0, 1));
390
-
391
- export class File {
392
-
393
- static __wrap(ptr) {
394
- ptr = ptr >>> 0;
395
- const obj = Object.create(File.prototype);
396
- obj.__wbg_ptr = ptr;
397
- FileFinalization.register(obj, obj.__wbg_ptr, obj);
398
- return obj;
399
- }
400
-
401
- __destroy_into_raw() {
402
- const ptr = this.__wbg_ptr;
403
- this.__wbg_ptr = 0;
404
- FileFinalization.unregister(this);
405
- return ptr;
406
- }
407
-
408
- free() {
409
- const ptr = this.__destroy_into_raw();
410
- wasm.__wbg_file_free(ptr, 0);
411
- }
412
- /**
413
- * @returns {FileMeta | undefined}
414
- */
415
- get meta() {
416
- const ret = wasm.file_meta(this.__wbg_ptr);
417
- return ret;
418
- }
419
- /**
420
- * @returns {string}
421
- */
422
- get parent() {
423
- const ret = wasm.file_parent(this.__wbg_ptr);
424
- var v1 = getCachedStringFromWasm0(ret[0], ret[1]);
425
- if (ret[0] !== 0) { wasm.__wbindgen_free(ret[0], ret[1], 1); }
426
- return v1;
427
- }
428
- /**
429
- * @returns {string}
430
- */
431
- get uuid() {
432
- const ret = wasm.file_uuid(this.__wbg_ptr);
433
- var v1 = getCachedStringFromWasm0(ret[0], ret[1]);
434
- if (ret[0] !== 0) { wasm.__wbindgen_free(ret[0], ret[1], 1); }
435
- return v1;
436
- }
437
- /**
438
- * @returns {bigint}
439
- */
440
- get size() {
441
- const ret = wasm.file_size(this.__wbg_ptr);
442
- return BigInt.asUintN(64, ret);
443
- }
444
- /**
445
- * @returns {boolean}
446
- */
447
- get favorited() {
448
- const ret = wasm.file_favorited(this.__wbg_ptr);
449
- return ret !== 0;
450
- }
451
- }
452
-
453
313
  const FilenStateFinalization = (typeof FinalizationRegistry === 'undefined')
454
314
  ? { register: () => {}, unregister: () => {} }
455
315
  : new FinalizationRegistry(ptr => wasm.__wbg_filenstate_free(ptr >>> 0, 1));
@@ -483,27 +343,14 @@ export class FilenState {
483
343
  return ret;
484
344
  }
485
345
  /**
486
- * @param {Dir} dir
487
- * @param {string} name_or_uuid
488
- * @returns {Dir | File | undefined}
489
- */
490
- findItemInDir(dir, name_or_uuid) {
491
- _assertClass(dir, Dir);
492
- const ptr0 = passStringToWasm0(name_or_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
493
- const len0 = WASM_VECTOR_LEN;
494
- const ret = wasm.filenstate_findItemInDir(this.__wbg_ptr, dir.__wbg_ptr, ptr0, len0);
495
- return ret;
496
- }
497
- /**
498
- * @param {Dir} parent
346
+ * @param {DirEnum} parent
499
347
  * @param {string} name
500
348
  * @returns {Promise<void>}
501
349
  */
502
350
  dirExists(parent, name) {
503
- _assertClass(parent, Dir);
504
351
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
505
352
  const len0 = WASM_VECTOR_LEN;
506
- const ret = wasm.filenstate_dirExists(this.__wbg_ptr, parent.__wbg_ptr, ptr0, len0);
353
+ const ret = wasm.filenstate_dirExists(this.__wbg_ptr, parent, ptr0, len0);
507
354
  return ret;
508
355
  }
509
356
  /**
@@ -511,107 +358,103 @@ export class FilenState {
511
358
  * @returns {Promise<void>}
512
359
  */
513
360
  deleteDirPermanently(dir) {
514
- _assertClass(dir, Dir);
515
- var ptr0 = dir.__destroy_into_raw();
516
- const ret = wasm.filenstate_deleteDirPermanently(this.__wbg_ptr, ptr0);
361
+ const ret = wasm.filenstate_deleteDirPermanently(this.__wbg_ptr, dir);
517
362
  return ret;
518
363
  }
519
364
  /**
520
- * @param {Dir} dir
521
- * @returns {Promise<void>}
365
+ * @returns {Root}
522
366
  */
523
- trashDir(dir) {
524
- _assertClass(dir, Dir);
525
- const ret = wasm.filenstate_trashDir(this.__wbg_ptr, dir.__wbg_ptr);
367
+ root() {
368
+ const ret = wasm.filenstate_root(this.__wbg_ptr);
526
369
  return ret;
527
370
  }
528
371
  /**
529
- * @returns {Dir}
372
+ * @param {DirEnum} dir
373
+ * @returns {[Dir[], File[]]}
530
374
  */
531
- root() {
532
- const ret = wasm.filenstate_root(this.__wbg_ptr);
533
- return Dir.__wrap(ret);
375
+ listDir(dir) {
376
+ const ret = wasm.filenstate_listDir(this.__wbg_ptr, dir);
377
+ return ret;
378
+ }
379
+ /**
380
+ * @param {DirEnum} dir
381
+ * @returns {Promise<void>}
382
+ */
383
+ trashDir(dir) {
384
+ const ret = wasm.filenstate_trashDir(this.__wbg_ptr, dir);
385
+ return ret;
534
386
  }
535
387
  /**
536
- * @param {Dir} parent
388
+ * @param {DirEnum} parent
537
389
  * @param {string} name
538
390
  * @returns {Promise<Dir>}
539
391
  */
540
392
  createDir(parent, name) {
541
- _assertClass(parent, Dir);
542
393
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
543
394
  const len0 = WASM_VECTOR_LEN;
544
- const ret = wasm.filenstate_createDir(this.__wbg_ptr, parent.__wbg_ptr, ptr0, len0);
395
+ const ret = wasm.filenstate_createDir(this.__wbg_ptr, parent, ptr0, len0);
545
396
  return ret;
546
397
  }
547
398
  /**
548
- * @param {Dir} dir
549
- * @returns {[Dir[], File[]]}
399
+ * @param {DirEnum} dir
400
+ * @param {string} name_or_uuid
401
+ * @returns {Promise<NonRootObject | undefined>}
550
402
  */
551
- listDir(dir) {
552
- _assertClass(dir, Dir);
553
- const ret = wasm.filenstate_listDir(this.__wbg_ptr, dir.__wbg_ptr);
403
+ findItemInDir(dir, name_or_uuid) {
404
+ const ptr0 = passStringToWasm0(name_or_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
405
+ const len0 = WASM_VECTOR_LEN;
406
+ const ret = wasm.filenstate_findItemInDir(this.__wbg_ptr, dir, ptr0, len0);
554
407
  return ret;
555
408
  }
556
409
  /**
557
- * @param {Dir} parent
558
- * @param {UploadFileStreamParams} params
559
- * @returns {Promise<File>}
410
+ * @param {File} file
411
+ * @returns {Promise<Uint8Array>}
560
412
  */
561
- uploadFileStream(parent, params) {
562
- _assertClass(parent, Dir);
563
- const ret = wasm.filenstate_uploadFileStream(this.__wbg_ptr, parent.__wbg_ptr, params);
413
+ downloadFile(file) {
414
+ const ret = wasm.filenstate_downloadFile(this.__wbg_ptr, file);
564
415
  return ret;
565
416
  }
566
417
  /**
567
418
  * @param {File} file
568
419
  * @returns {Promise<void>}
569
420
  */
570
- trashFile(file) {
571
- _assertClass(file, File);
572
- const ret = wasm.filenstate_trashFile(this.__wbg_ptr, file.__wbg_ptr);
421
+ deleteFilePermanently(file) {
422
+ const ret = wasm.filenstate_deleteFilePermanently(this.__wbg_ptr, file);
573
423
  return ret;
574
424
  }
575
425
  /**
576
- * @param {File} file
577
- * @returns {Promise<Uint8Array>}
426
+ * @param {Uint8Array} data
427
+ * @param {UploadFileParams} params
428
+ * @returns {Promise<File>}
578
429
  */
579
- downloadFile(file) {
580
- _assertClass(file, File);
581
- const ret = wasm.filenstate_downloadFile(this.__wbg_ptr, file.__wbg_ptr);
430
+ uploadFile(data, params) {
431
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
432
+ const len0 = WASM_VECTOR_LEN;
433
+ const ret = wasm.filenstate_uploadFile(this.__wbg_ptr, ptr0, len0, params);
582
434
  return ret;
583
435
  }
584
436
  /**
585
- * @param {File} file
586
- * @param {DownloadFileStreamParams} params
587
- * @returns {Promise<void>}
437
+ * @param {UploadFileStreamParams} params
438
+ * @returns {Promise<File>}
588
439
  */
589
- downloadFileToWriter(file, params) {
590
- _assertClass(file, File);
591
- const ret = wasm.filenstate_downloadFileToWriter(this.__wbg_ptr, file.__wbg_ptr, params);
440
+ uploadFileStream(params) {
441
+ const ret = wasm.filenstate_uploadFileStream(this.__wbg_ptr, params);
592
442
  return ret;
593
443
  }
594
444
  /**
595
445
  * @param {File} file
596
446
  * @returns {Promise<void>}
597
447
  */
598
- deleteFilePermanently(file) {
599
- _assertClass(file, File);
600
- var ptr0 = file.__destroy_into_raw();
601
- const ret = wasm.filenstate_deleteFilePermanently(this.__wbg_ptr, ptr0);
448
+ trashFile(file) {
449
+ const ret = wasm.filenstate_trashFile(this.__wbg_ptr, file);
602
450
  return ret;
603
451
  }
604
452
  /**
605
- * @param {Dir} parent
606
- * @param {Uint8Array} data
607
- * @param {UploadFileParams} params
608
- * @returns {Promise<File>}
453
+ * @param {DownloadFileStreamParams} params
454
+ * @returns {Promise<void>}
609
455
  */
610
- uploadFile(parent, data, params) {
611
- _assertClass(parent, Dir);
612
- const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
613
- const len0 = WASM_VECTOR_LEN;
614
- const ret = wasm.filenstate_uploadFile(this.__wbg_ptr, parent.__wbg_ptr, ptr0, len0, params);
456
+ downloadFileToWriter(params) {
457
+ const ret = wasm.filenstate_downloadFileToWriter(this.__wbg_ptr, params);
615
458
  return ret;
616
459
  }
617
460
  }
@@ -846,10 +689,10 @@ export function __wbg_debug_e17b51583ca6a632(arg0, arg1, arg2, arg3) {
846
689
  console.debug(arg0, arg1, arg2, arg3);
847
690
  };
848
691
 
849
- export function __wbg_dir_new(arg0) {
850
- const ret = Dir.__wrap(arg0);
692
+ export function __wbg_deleteProperty_96363d4a1d977c97() { return handleError(function (arg0, arg1) {
693
+ const ret = Reflect.deleteProperty(arg0, arg1);
851
694
  return ret;
852
- };
695
+ }, arguments) };
853
696
 
854
697
  export function __wbg_done_769e5ede4b31c67b(arg0) {
855
698
  const ret = arg0.done;
@@ -889,11 +732,6 @@ export function __wbg_fetch_f156d10be9a5c88a(arg0) {
889
732
  return ret;
890
733
  };
891
734
 
892
- export function __wbg_file_new(arg0) {
893
- const ret = File.__wrap(arg0);
894
- return ret;
895
- };
896
-
897
735
  export function __wbg_filenstate_new(arg0) {
898
736
  const ret = FilenState.__wrap(arg0);
899
737
  return ret;
@@ -1083,7 +921,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
1083
921
  const a = state0.a;
1084
922
  state0.a = 0;
1085
923
  try {
1086
- return __wbg_adapter_143(a, state0.b, arg0, arg1);
924
+ return __wbg_adapter_131(a, state0.b, arg0, arg1);
1087
925
  } finally {
1088
926
  state0.a = a;
1089
927
  }
@@ -1095,13 +933,13 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
1095
933
  }
1096
934
  };
1097
935
 
1098
- export function __wbg_new_31a97dac4f10fab7(arg0) {
1099
- const ret = new Date(arg0);
936
+ export function __wbg_new_405e22f390576ce2() {
937
+ const ret = new Object();
1100
938
  return ret;
1101
939
  };
1102
940
 
1103
- export function __wbg_new_405e22f390576ce2() {
1104
- const ret = new Object();
941
+ export function __wbg_new_78feb108b6472713() {
942
+ const ret = new Array();
1105
943
  return ret;
1106
944
  };
1107
945
 
@@ -1259,6 +1097,11 @@ export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
1259
1097
  arg0.set(arg1, arg2 >>> 0);
1260
1098
  };
1261
1099
 
1100
+ export function __wbg_set_bb8cecf6a62b9f46() { return handleError(function (arg0, arg1, arg2) {
1101
+ const ret = Reflect.set(arg0, arg1, arg2);
1102
+ return ret;
1103
+ }, arguments) };
1104
+
1262
1105
  export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
1263
1106
  arg0.body = arg1;
1264
1107
  };
@@ -1434,18 +1277,18 @@ export function __wbindgen_cb_drop(arg0) {
1434
1277
  return ret;
1435
1278
  };
1436
1279
 
1437
- export function __wbindgen_closure_wrapper2358(arg0, arg1, arg2) {
1438
- const ret = makeMutClosure(arg0, arg1, 103, __wbg_adapter_61);
1280
+ export function __wbindgen_closure_wrapper230(arg0, arg1, arg2) {
1281
+ const ret = makeMutClosure(arg0, arg1, 110, __wbg_adapter_58);
1439
1282
  return ret;
1440
1283
  };
1441
1284
 
1442
- export function __wbindgen_closure_wrapper2655(arg0, arg1, arg2) {
1443
- const ret = makeMutClosure(arg0, arg1, 111, __wbg_adapter_61);
1285
+ export function __wbindgen_closure_wrapper2407(arg0, arg1, arg2) {
1286
+ const ret = makeMutClosure(arg0, arg1, 102, __wbg_adapter_61);
1444
1287
  return ret;
1445
1288
  };
1446
1289
 
1447
- export function __wbindgen_closure_wrapper490(arg0, arg1, arg2) {
1448
- const ret = makeMutClosure(arg0, arg1, 111, __wbg_adapter_58);
1290
+ export function __wbindgen_closure_wrapper2703(arg0, arg1, arg2) {
1291
+ const ret = makeMutClosure(arg0, arg1, 110, __wbg_adapter_61);
1449
1292
  return ret;
1450
1293
  };
1451
1294
 
Binary file
@@ -1,36 +1,24 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const __wbg_dir_free: (a: number, b: number) => void;
5
- export const dir_parent: (a: number) => [number, number];
6
- export const dir_favorited: (a: number) => number;
7
- export const file_parent: (a: number) => [number, number];
8
- export const dir_meta: (a: number) => any;
9
- export const file_meta: (a: number) => any;
10
- export const __wbg_file_free: (a: number, b: number) => void;
11
- export const file_uuid: (a: number) => [number, number];
12
- export const dir_uuid: (a: number) => [number, number];
13
- export const dir_color: (a: number) => [number, number];
14
- export const file_favorited: (a: number) => number;
15
- export const file_size: (a: number) => bigint;
16
4
  export const login: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
17
- export const main_js: () => void;
18
5
  export const from_serialized: (a: any) => [number, number, number];
19
6
  export const filenstate_serialize: (a: number) => any;
7
+ export const main_js: () => void;
20
8
  export const __wbg_filenstate_free: (a: number, b: number) => void;
21
- export const filenstate_listDir: (a: number, b: number) => any;
22
- export const filenstate_createDir: (a: number, b: number, c: number, d: number) => any;
23
- export const filenstate_deleteDirPermanently: (a: number, b: number) => any;
24
- export const filenstate_trashDir: (a: number, b: number) => any;
25
- export const filenstate_findItemInDir: (a: number, b: number, c: number, d: number) => any;
26
- export const filenstate_dirExists: (a: number, b: number, c: number, d: number) => any;
27
- export const filenstate_root: (a: number) => number;
28
- export const filenstate_uploadFileStream: (a: number, b: number, c: any) => any;
29
- export const filenstate_uploadFile: (a: number, b: number, c: number, d: number, e: any) => any;
30
- export const filenstate_downloadFileToWriter: (a: number, b: number, c: any) => any;
31
- export const filenstate_deleteFilePermanently: (a: number, b: number) => any;
32
- export const filenstate_downloadFile: (a: number, b: number) => any;
33
- export const filenstate_trashFile: (a: number, b: number) => any;
9
+ export const filenstate_listDir: (a: number, b: any) => any;
10
+ export const filenstate_createDir: (a: number, b: any, c: number, d: number) => any;
11
+ export const filenstate_deleteDirPermanently: (a: number, b: any) => any;
12
+ export const filenstate_trashDir: (a: number, b: any) => any;
13
+ export const filenstate_dirExists: (a: number, b: any, c: number, d: number) => any;
14
+ export const filenstate_findItemInDir: (a: number, b: any, c: number, d: number) => any;
15
+ export const filenstate_root: (a: number) => any;
16
+ export const filenstate_uploadFileStream: (a: number, b: any) => any;
17
+ export const filenstate_downloadFile: (a: number, b: any) => any;
18
+ export const filenstate_downloadFileToWriter: (a: number, b: any) => any;
19
+ export const filenstate_trashFile: (a: number, b: any) => any;
20
+ export const filenstate_deleteFilePermanently: (a: number, b: any) => any;
21
+ export const filenstate_uploadFile: (a: number, b: number, c: number, d: any) => any;
34
22
  export const intounderlyingbytesource_start: (a: number, b: any) => void;
35
23
  export const intounderlyingbytesource_type: (a: number) => number;
36
24
  export const intounderlyingbytesource_pull: (a: number, b: any) => any;
@@ -52,7 +40,7 @@ export const __externref_table_alloc: () => number;
52
40
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
53
41
  export const __wbindgen_export_6: WebAssembly.Table;
54
42
  export const __externref_table_dealloc: (a: number) => void;
55
- export const closure110_externref_shim: (a: number, b: number, c: any) => void;
43
+ export const closure109_externref_shim: (a: number, b: number, c: any) => void;
56
44
  export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3a28bb1da68602c0: (a: number, b: number) => void;
57
- export const closure86_externref_shim: (a: number, b: number, c: any, d: any) => void;
45
+ export const closure85_externref_shim: (a: number, b: number, c: any, d: any) => void;
58
46
  export const __wbindgen_start: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@filen/sdk-rs",
3
- "version": "0.2.4",
3
+ "version": "0.3.1",
4
4
  "description": "Filen WASM SDK using filen-sdk-rs",
5
5
  "type": "module",
6
6
  "scripts": {