@filen/sdk-rs 0.2.4 → 0.3.0

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
- export function from_serialized(serialized: StringifiedClient): FilenState;
4
- export function login(email: string, password: string, two_factor_code?: string | null): Promise<FilenState>;
5
3
  export function main_js(): void;
4
+ export function login(email: string, password: string, two_factor_code?: string | null): Promise<FilenState>;
5
+ export function from_serialized(serialized: StringifiedClient): FilenState;
6
6
  /**
7
7
  * Chroma subsampling format
8
8
  */
@@ -30,35 +30,67 @@ export enum ChromaSampling {
30
30
  * *This API requires the following crate features to be activated: `ReadableStreamType`*
31
31
  */
32
32
  type ReadableStreamType = "bytes";
33
+ export interface File {
34
+ uuid: UuidStr;
35
+ meta?: DecryptedFileMeta;
36
+ parent: ParentUuid;
37
+ size: bigint;
38
+ favorited: boolean;
39
+ region: string;
40
+ bucket: string;
41
+ chunks: bigint;
42
+ }
43
+
33
44
  export interface UploadFileStreamParams extends UploadFileParams {
34
45
  reader: ReadableStream<Uint8Array>;
35
- known_size?: bigint;
46
+ known_size?: bigint | undefined;
36
47
  progress?: (bytes: bigint) => void;
37
48
  }
38
49
 
39
- export interface FileMeta {
50
+ export interface UploadFileParams {
51
+ parent: DirEnum;
40
52
  name: string;
41
- mime: string;
42
- created: Date | undefined;
43
- modified: Date;
44
- hash: Uint8Array | undefined;
53
+ created?: bigint;
54
+ modified?: bigint;
55
+ mime?: string;
45
56
  }
46
57
 
47
58
  export interface DownloadFileStreamParams {
59
+ file: File;
48
60
  writer: WritableStream<Uint8Array>;
49
61
  progress?: (bytes: bigint) => void;
50
62
  }
51
63
 
52
- export interface DirMeta {
64
+ export type DirEnum = Dir | Root;
65
+
66
+ export type NonRootObject = ({ type: "dir" } & Dir) | ({ type: "file" } & File);
67
+
68
+ export interface Dir {
69
+ uuid: UuidStr;
70
+ parent: ParentUuid;
71
+ color?: string;
72
+ favorited: boolean;
73
+ meta?: DecryptedDirMeta;
74
+ }
75
+
76
+ export interface DecryptedDirMeta {
53
77
  name: string;
54
- created: Date | undefined;
78
+ created?: bigint;
55
79
  }
56
80
 
57
- export interface UploadFileParams {
81
+ export interface DecryptedFileMeta {
58
82
  name: string;
59
- created?: Date;
60
- modified?: Date;
61
- mime?: string;
83
+ mime: string;
84
+ created?: bigint;
85
+ modified: bigint;
86
+ hash?: Uint8Array;
87
+ size: bigint;
88
+ key: string;
89
+ version: FileEncryptionVersion;
90
+ }
91
+
92
+ export interface Root {
93
+ uuid: UuidStr;
62
94
  }
63
95
 
64
96
  export interface StringifiedClient {
@@ -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
+ findItemInDir(dir: DirEnum, name_or_uuid: string): Promise<NonRootObject | undefined>;
110
+ listDir(dir: DirEnum): Promise<[DirEnum[], File[]]>;
111
+ trashDir(dir: DirEnum): Promise<void>;
97
112
  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>;
113
+ dirExists(parent: DirEnum, name: string): Promise<void>;
114
+ createDir(parent: DirEnum, name: string): Promise<Dir>;
115
+ root(): Root;
116
+ uploadFileStream(params: UploadFileStreamParams): Promise<File>;
103
117
  trashFile(file: File): Promise<void>;
104
- downloadFile(file: File): Promise<Uint8Array>;
105
- downloadFileToWriter(file: File, params: DownloadFileStreamParams): Promise<void>;
106
118
  deleteFilePermanently(file: File): Promise<void>;
107
- uploadFile(parent: Dir, data: Uint8Array, params: UploadFileParams): Promise<File>;
119
+ downloadFileToWriter(params: DownloadFileStreamParams): Promise<void>;
120
+ downloadFile(file: File): Promise<Uint8Array>;
121
+ uploadFile(data: Uint8Array, params: UploadFileParams): Promise<File>;
108
122
  }
109
123
  export class IntoUnderlyingByteSource {
110
124
  private constructor();
@@ -221,21 +221,8 @@ function debugString(val) {
221
221
  return className;
222
222
  }
223
223
 
224
- function takeFromExternrefTable0(idx) {
225
- const value = wasm.__wbindgen_export_2.get(idx);
226
- wasm.__externref_table_dealloc(idx);
227
- return value;
228
- }
229
- /**
230
- * @param {StringifiedClient} serialized
231
- * @returns {FilenState}
232
- */
233
- export function from_serialized(serialized) {
234
- const ret = wasm.from_serialized(serialized);
235
- if (ret[2]) {
236
- throw takeFromExternrefTable0(ret[1]);
237
- }
238
- return FilenState.__wrap(ret[0]);
224
+ export function main_js() {
225
+ wasm.main_js();
239
226
  }
240
227
 
241
228
  /**
@@ -255,14 +242,21 @@ export function login(email, password, two_factor_code) {
255
242
  return ret;
256
243
  }
257
244
 
258
- export function main_js() {
259
- wasm.main_js();
245
+ function takeFromExternrefTable0(idx) {
246
+ const value = wasm.__wbindgen_export_2.get(idx);
247
+ wasm.__externref_table_dealloc(idx);
248
+ return value;
260
249
  }
261
-
262
- function _assertClass(instance, klass) {
263
- if (!(instance instanceof klass)) {
264
- throw new Error(`expected instance of ${klass.name}`);
250
+ /**
251
+ * @param {StringifiedClient} serialized
252
+ * @returns {FilenState}
253
+ */
254
+ export function from_serialized(serialized) {
255
+ const ret = wasm.from_serialized(serialized);
256
+ if (ret[2]) {
257
+ throw takeFromExternrefTable0(ret[1]);
265
258
  }
259
+ return FilenState.__wrap(ret[0]);
266
260
  }
267
261
 
268
262
  function passArray8ToWasm0(arg, malloc) {
@@ -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,84 +343,75 @@ export class FilenState {
483
343
  return ret;
484
344
  }
485
345
  /**
486
- * @param {Dir} dir
346
+ * @param {DirEnum} dir
487
347
  * @param {string} name_or_uuid
488
- * @returns {Dir | File | undefined}
348
+ * @returns {Promise<NonRootObject | undefined>}
489
349
  */
490
350
  findItemInDir(dir, name_or_uuid) {
491
- _assertClass(dir, Dir);
492
351
  const ptr0 = passStringToWasm0(name_or_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
493
352
  const len0 = WASM_VECTOR_LEN;
494
- const ret = wasm.filenstate_findItemInDir(this.__wbg_ptr, dir.__wbg_ptr, ptr0, len0);
353
+ const ret = wasm.filenstate_findItemInDir(this.__wbg_ptr, dir, ptr0, len0);
495
354
  return ret;
496
355
  }
497
356
  /**
498
- * @param {Dir} parent
499
- * @param {string} name
500
- * @returns {Promise<void>}
357
+ * @param {DirEnum} dir
358
+ * @returns {[DirEnum[], File[]]}
501
359
  */
502
- dirExists(parent, name) {
503
- _assertClass(parent, Dir);
504
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
505
- const len0 = WASM_VECTOR_LEN;
506
- const ret = wasm.filenstate_dirExists(this.__wbg_ptr, parent.__wbg_ptr, ptr0, len0);
360
+ listDir(dir) {
361
+ const ret = wasm.filenstate_listDir(this.__wbg_ptr, dir);
507
362
  return ret;
508
363
  }
509
364
  /**
510
- * @param {Dir} dir
365
+ * @param {DirEnum} dir
511
366
  * @returns {Promise<void>}
512
367
  */
513
- deleteDirPermanently(dir) {
514
- _assertClass(dir, Dir);
515
- var ptr0 = dir.__destroy_into_raw();
516
- const ret = wasm.filenstate_deleteDirPermanently(this.__wbg_ptr, ptr0);
368
+ trashDir(dir) {
369
+ const ret = wasm.filenstate_trashDir(this.__wbg_ptr, dir);
517
370
  return ret;
518
371
  }
519
372
  /**
520
373
  * @param {Dir} dir
521
374
  * @returns {Promise<void>}
522
375
  */
523
- trashDir(dir) {
524
- _assertClass(dir, Dir);
525
- const ret = wasm.filenstate_trashDir(this.__wbg_ptr, dir.__wbg_ptr);
376
+ deleteDirPermanently(dir) {
377
+ const ret = wasm.filenstate_deleteDirPermanently(this.__wbg_ptr, dir);
526
378
  return ret;
527
379
  }
528
380
  /**
529
- * @returns {Dir}
381
+ * @param {DirEnum} parent
382
+ * @param {string} name
383
+ * @returns {Promise<void>}
530
384
  */
531
- root() {
532
- const ret = wasm.filenstate_root(this.__wbg_ptr);
533
- return Dir.__wrap(ret);
385
+ dirExists(parent, name) {
386
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
387
+ const len0 = WASM_VECTOR_LEN;
388
+ const ret = wasm.filenstate_dirExists(this.__wbg_ptr, parent, ptr0, len0);
389
+ return ret;
534
390
  }
535
391
  /**
536
- * @param {Dir} parent
392
+ * @param {DirEnum} parent
537
393
  * @param {string} name
538
394
  * @returns {Promise<Dir>}
539
395
  */
540
396
  createDir(parent, name) {
541
- _assertClass(parent, Dir);
542
397
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
543
398
  const len0 = WASM_VECTOR_LEN;
544
- const ret = wasm.filenstate_createDir(this.__wbg_ptr, parent.__wbg_ptr, ptr0, len0);
399
+ const ret = wasm.filenstate_createDir(this.__wbg_ptr, parent, ptr0, len0);
545
400
  return ret;
546
401
  }
547
402
  /**
548
- * @param {Dir} dir
549
- * @returns {[Dir[], File[]]}
403
+ * @returns {Root}
550
404
  */
551
- listDir(dir) {
552
- _assertClass(dir, Dir);
553
- const ret = wasm.filenstate_listDir(this.__wbg_ptr, dir.__wbg_ptr);
405
+ root() {
406
+ const ret = wasm.filenstate_root(this.__wbg_ptr);
554
407
  return ret;
555
408
  }
556
409
  /**
557
- * @param {Dir} parent
558
410
  * @param {UploadFileStreamParams} params
559
411
  * @returns {Promise<File>}
560
412
  */
561
- uploadFileStream(parent, params) {
562
- _assertClass(parent, Dir);
563
- const ret = wasm.filenstate_uploadFileStream(this.__wbg_ptr, parent.__wbg_ptr, params);
413
+ uploadFileStream(params) {
414
+ const ret = wasm.filenstate_uploadFileStream(this.__wbg_ptr, params);
564
415
  return ret;
565
416
  }
566
417
  /**
@@ -568,50 +419,42 @@ export class FilenState {
568
419
  * @returns {Promise<void>}
569
420
  */
570
421
  trashFile(file) {
571
- _assertClass(file, File);
572
- const ret = wasm.filenstate_trashFile(this.__wbg_ptr, file.__wbg_ptr);
422
+ const ret = wasm.filenstate_trashFile(this.__wbg_ptr, file);
573
423
  return ret;
574
424
  }
575
425
  /**
576
426
  * @param {File} file
577
- * @returns {Promise<Uint8Array>}
427
+ * @returns {Promise<void>}
578
428
  */
579
- downloadFile(file) {
580
- _assertClass(file, File);
581
- const ret = wasm.filenstate_downloadFile(this.__wbg_ptr, file.__wbg_ptr);
429
+ deleteFilePermanently(file) {
430
+ const ret = wasm.filenstate_deleteFilePermanently(this.__wbg_ptr, file);
582
431
  return ret;
583
432
  }
584
433
  /**
585
- * @param {File} file
586
434
  * @param {DownloadFileStreamParams} params
587
435
  * @returns {Promise<void>}
588
436
  */
589
- downloadFileToWriter(file, params) {
590
- _assertClass(file, File);
591
- const ret = wasm.filenstate_downloadFileToWriter(this.__wbg_ptr, file.__wbg_ptr, params);
437
+ downloadFileToWriter(params) {
438
+ const ret = wasm.filenstate_downloadFileToWriter(this.__wbg_ptr, params);
592
439
  return ret;
593
440
  }
594
441
  /**
595
442
  * @param {File} file
596
- * @returns {Promise<void>}
443
+ * @returns {Promise<Uint8Array>}
597
444
  */
598
- deleteFilePermanently(file) {
599
- _assertClass(file, File);
600
- var ptr0 = file.__destroy_into_raw();
601
- const ret = wasm.filenstate_deleteFilePermanently(this.__wbg_ptr, ptr0);
445
+ downloadFile(file) {
446
+ const ret = wasm.filenstate_downloadFile(this.__wbg_ptr, file);
602
447
  return ret;
603
448
  }
604
449
  /**
605
- * @param {Dir} parent
606
450
  * @param {Uint8Array} data
607
451
  * @param {UploadFileParams} params
608
452
  * @returns {Promise<File>}
609
453
  */
610
- uploadFile(parent, data, params) {
611
- _assertClass(parent, Dir);
454
+ uploadFile(data, params) {
612
455
  const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
613
456
  const len0 = WASM_VECTOR_LEN;
614
- const ret = wasm.filenstate_uploadFile(this.__wbg_ptr, parent.__wbg_ptr, ptr0, len0, params);
457
+ const ret = wasm.filenstate_uploadFile(this.__wbg_ptr, ptr0, len0, 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_wrapper2409(arg0, arg1, arg2) {
1281
+ const ret = makeMutClosure(arg0, arg1, 102, __wbg_adapter_61);
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_wrapper2706(arg0, arg1, arg2) {
1286
+ const ret = makeMutClosure(arg0, arg1, 110, __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_wrapper472(arg0, arg1, arg2) {
1291
+ const ret = makeMutClosure(arg0, arg1, 110, __wbg_adapter_58);
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;
4
+ export const from_serialized: (a: any) => [number, number, number];
5
+ export const __wbg_filenstate_free: (a: number, b: number) => void;
16
6
  export const login: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
17
7
  export const main_js: () => void;
18
- export const from_serialized: (a: any) => [number, number, number];
19
8
  export const filenstate_serialize: (a: number) => any;
20
- 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_trashDir: (a: number, b: any) => any;
10
+ export const filenstate_listDir: (a: number, b: any) => any;
11
+ export const filenstate_createDir: (a: number, b: any, c: number, d: number) => any;
12
+ export const filenstate_deleteDirPermanently: (a: number, b: any) => any;
13
+ export const filenstate_findItemInDir: (a: number, b: any, c: number, d: number) => any;
14
+ export const filenstate_root: (a: number) => any;
15
+ export const filenstate_dirExists: (a: number, b: any, c: number, d: number) => any;
16
+ export const filenstate_downloadFile: (a: number, b: any) => any;
17
+ export const filenstate_uploadFileStream: (a: number, b: any) => any;
18
+ export const filenstate_trashFile: (a: number, b: any) => any;
19
+ export const filenstate_deleteFilePermanently: (a: number, b: any) => any;
20
+ export const filenstate_downloadFileToWriter: (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.0",
4
4
  "description": "Filen WASM SDK using filen-sdk-rs",
5
5
  "type": "module",
6
6
  "scripts": {