@filen/sdk-rs 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/sdk-rs.d.ts +75 -61
- package/browser/sdk-rs.js +121 -91
- package/browser/sdk-rs_bg.wasm +0 -0
- package/browser/sdk-rs_bg.wasm.d.ts +20 -16
- package/package.json +1 -1
package/browser/sdk-rs.d.ts
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export function fromStringified(serialized: StringifiedClient): Client;
|
|
3
4
|
export function main_js(): void;
|
|
4
5
|
export function login(email: string, password: string, twoFactorCode?: string | null): Promise<Client>;
|
|
5
|
-
export function fromStringified(serialized: StringifiedClient): Client;
|
|
6
6
|
/**
|
|
7
7
|
* The `ReadableStreamType` enum.
|
|
8
8
|
*
|
|
9
9
|
* *This API requires the following crate features to be activated: `ReadableStreamType`*
|
|
10
10
|
*/
|
|
11
11
|
type ReadableStreamType = "bytes";
|
|
12
|
+
export type Item = File | Dir | Root;
|
|
13
|
+
|
|
14
|
+
export interface DownloadFileToZipParams {
|
|
15
|
+
items: Item[];
|
|
16
|
+
writer: WritableStream<Uint8Array>;
|
|
17
|
+
progress?: (bytesWritten: bigint, totalBytes: bigint, itemsProcessed: bigint, totalItems: bigint) => void;
|
|
18
|
+
abortSignal?: AbortSignal;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type AbortSignal = AbortSignal;
|
|
22
|
+
|
|
23
|
+
export interface UploadFileStreamParams extends UploadFileParams {
|
|
24
|
+
reader: ReadableStream<Uint8Array>;
|
|
25
|
+
knownSize: bigint | undefined;
|
|
26
|
+
progress?: (bytes: bigint) => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
12
29
|
export interface UploadFileParams {
|
|
13
30
|
parent: DirEnum;
|
|
14
31
|
name: string;
|
|
@@ -18,13 +35,6 @@ export interface UploadFileParams {
|
|
|
18
35
|
abortSignal?: AbortSignal;
|
|
19
36
|
}
|
|
20
37
|
|
|
21
|
-
export interface DownloadFileToZipParams {
|
|
22
|
-
items: Item[];
|
|
23
|
-
writer: WritableStream<Uint8Array>;
|
|
24
|
-
progress?: (bytesWritten: bigint, totalBytes: bigint, itemsProcessed: bigint, totalItems: bigint) => void;
|
|
25
|
-
abortSignal?: AbortSignal;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
38
|
export interface DownloadFileStreamParams {
|
|
29
39
|
file: File;
|
|
30
40
|
writer: WritableStream<Uint8Array>;
|
|
@@ -34,14 +44,11 @@ export interface DownloadFileStreamParams {
|
|
|
34
44
|
end?: bigint | undefined;
|
|
35
45
|
}
|
|
36
46
|
|
|
37
|
-
export interface
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
progress?: (bytes: bigint) => void;
|
|
47
|
+
export interface DecryptedDirMeta {
|
|
48
|
+
name: string;
|
|
49
|
+
created?: bigint;
|
|
41
50
|
}
|
|
42
51
|
|
|
43
|
-
export type AbortSignal = AbortSignal;
|
|
44
|
-
|
|
45
52
|
export interface Root {
|
|
46
53
|
uuid: UuidStr;
|
|
47
54
|
}
|
|
@@ -56,26 +63,6 @@ export interface Dir {
|
|
|
56
63
|
meta?: DecryptedDirMeta;
|
|
57
64
|
}
|
|
58
65
|
|
|
59
|
-
export interface DecryptedDirMeta {
|
|
60
|
-
name: string;
|
|
61
|
-
created?: bigint;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export type NonRootObject = ({ type: "dir" } & Dir) | ({ type: "file" } & File);
|
|
65
|
-
|
|
66
|
-
export interface StringifiedClient {
|
|
67
|
-
email: string;
|
|
68
|
-
rootUuid: string;
|
|
69
|
-
authInfo: string;
|
|
70
|
-
privateKey: string;
|
|
71
|
-
apiKey: string;
|
|
72
|
-
authVersion: number;
|
|
73
|
-
maxParallelRequests?: bigint;
|
|
74
|
-
maxIoMemoryUsage?: bigint;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export type Item = File | Dir | Root;
|
|
78
|
-
|
|
79
66
|
export interface File {
|
|
80
67
|
uuid: UuidStr;
|
|
81
68
|
meta?: DecryptedFileMeta;
|
|
@@ -98,6 +85,25 @@ export interface DecryptedFileMeta {
|
|
|
98
85
|
version: FileEncryptionVersion;
|
|
99
86
|
}
|
|
100
87
|
|
|
88
|
+
export interface StringifiedClient {
|
|
89
|
+
email: string;
|
|
90
|
+
rootUuid: string;
|
|
91
|
+
authInfo: string;
|
|
92
|
+
privateKey: string;
|
|
93
|
+
apiKey: string;
|
|
94
|
+
authVersion: number;
|
|
95
|
+
maxParallelRequests?: number | undefined;
|
|
96
|
+
maxIoMemoryUsage?: number | undefined;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface DirSizeResponse {
|
|
100
|
+
size: bigint;
|
|
101
|
+
files: bigint;
|
|
102
|
+
dirs: bigint;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type NonRootObject = ({ type: "dir" } & Dir) | ({ type: "file" } & File);
|
|
106
|
+
|
|
101
107
|
export type ParentUuid = UuidStr | "trash" | "recents" | "favorites" | "links";
|
|
102
108
|
|
|
103
109
|
export type FileEncryptionVersion = 1 | 2 | 3;
|
|
@@ -107,21 +113,25 @@ export type UuidStr = string;
|
|
|
107
113
|
export class Client {
|
|
108
114
|
private constructor();
|
|
109
115
|
free(): void;
|
|
110
|
-
listDir(dir: DirEnum): Promise<[Dir[], File[]]>;
|
|
111
|
-
createDir(parent: DirEnum, name: string): Promise<Dir>;
|
|
112
|
-
deleteDirPermanently(dir: Dir): Promise<void>;
|
|
113
|
-
root(): Root;
|
|
114
|
-
trashDir(dir: Dir): Promise<Dir>;
|
|
115
|
-
findItemInDir(dir: DirEnum, nameOrUuid: string): Promise<NonRootObject | undefined>;
|
|
116
|
-
dirExists(parent: DirEnum, name: string): Promise<void>;
|
|
117
|
-
toStringified(): StringifiedClient;
|
|
118
116
|
downloadItemsToZip(params: DownloadFileToZipParams): Promise<void>;
|
|
119
|
-
|
|
120
|
-
downloadFileToWriter(params: DownloadFileStreamParams): Promise<void>;
|
|
117
|
+
toStringified(): StringifiedClient;
|
|
121
118
|
deleteFilePermanently(file: File): Promise<void>;
|
|
122
|
-
downloadFile(file: File): Promise<Uint8Array>;
|
|
123
119
|
uploadFileFromReader(params: UploadFileStreamParams): Promise<File>;
|
|
120
|
+
downloadFile(file: File): Promise<Uint8Array>;
|
|
124
121
|
trashFile(file: File): Promise<File>;
|
|
122
|
+
downloadFileToWriter(params: DownloadFileStreamParams): Promise<void>;
|
|
123
|
+
uploadFile(data: Uint8Array, params: UploadFileParams): Promise<File>;
|
|
124
|
+
getDirSize(dir: Dir): Promise<DirSizeResponse>;
|
|
125
|
+
root(): Root;
|
|
126
|
+
createDir(parent: DirEnum, name: string): Promise<Dir>;
|
|
127
|
+
deleteDirPermanently(dir: Dir): Promise<void>;
|
|
128
|
+
dirExists(parent: DirEnum, name: string): Promise<void>;
|
|
129
|
+
trashDir(dir: Dir): Promise<Dir>;
|
|
130
|
+
listRecents(): Promise<[Dir[], File[]]>;
|
|
131
|
+
findItemInDir(dir: DirEnum, nameOrUuid: string): Promise<NonRootObject | undefined>;
|
|
132
|
+
listDir(dir: DirEnum): Promise<[Dir[], File[]]>;
|
|
133
|
+
listFavorites(): Promise<[Dir[], File[]]>;
|
|
134
|
+
listDirRecursive(dir: DirEnum): Promise<[Dir[], File[]]>;
|
|
125
135
|
}
|
|
126
136
|
export class IntoUnderlyingByteSource {
|
|
127
137
|
private constructor();
|
|
@@ -150,25 +160,29 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
150
160
|
|
|
151
161
|
export interface InitOutput {
|
|
152
162
|
readonly memory: WebAssembly.Memory;
|
|
153
|
-
readonly client_listDir: (a: number, b: any) => any;
|
|
154
|
-
readonly client_trashDir: (a: number, b: any) => any;
|
|
155
|
-
readonly client_dirExists: (a: number, b: any, c: number, d: number) => any;
|
|
156
|
-
readonly client_deleteDirPermanently: (a: number, b: any) => any;
|
|
157
|
-
readonly client_createDir: (a: number, b: any, c: number, d: number) => any;
|
|
158
|
-
readonly client_root: (a: number) => any;
|
|
159
|
-
readonly client_findItemInDir: (a: number, b: any, c: number, d: number) => any;
|
|
160
|
-
readonly client_toStringified: (a: number) => any;
|
|
161
|
-
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
162
|
-
readonly client_downloadItemsToZip: (a: number, b: any) => any;
|
|
163
|
-
readonly main_js: () => void;
|
|
164
|
-
readonly fromStringified: (a: any) => [number, number, number];
|
|
165
163
|
readonly login: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
164
|
+
readonly fromStringified: (a: any) => [number, number, number];
|
|
165
|
+
readonly main_js: () => void;
|
|
166
|
+
readonly client_downloadItemsToZip: (a: number, b: any) => any;
|
|
167
|
+
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
168
|
+
readonly client_toStringified: (a: number) => any;
|
|
166
169
|
readonly client_downloadFile: (a: number, b: any) => any;
|
|
170
|
+
readonly client_uploadFileFromReader: (a: number, b: any) => any;
|
|
167
171
|
readonly client_downloadFileToWriter: (a: number, b: any) => any;
|
|
172
|
+
readonly client_uploadFile: (a: number, b: number, c: number, d: any) => any;
|
|
168
173
|
readonly client_deleteFilePermanently: (a: number, b: any) => any;
|
|
169
174
|
readonly client_trashFile: (a: number, b: any) => any;
|
|
170
|
-
readonly
|
|
171
|
-
readonly
|
|
175
|
+
readonly client_findItemInDir: (a: number, b: any, c: number, d: number) => any;
|
|
176
|
+
readonly client_listDir: (a: number, b: any) => any;
|
|
177
|
+
readonly client_deleteDirPermanently: (a: number, b: any) => any;
|
|
178
|
+
readonly client_trashDir: (a: number, b: any) => any;
|
|
179
|
+
readonly client_dirExists: (a: number, b: any, c: number, d: number) => any;
|
|
180
|
+
readonly client_root: (a: number) => any;
|
|
181
|
+
readonly client_createDir: (a: number, b: any, c: number, d: number) => any;
|
|
182
|
+
readonly client_listFavorites: (a: number) => any;
|
|
183
|
+
readonly client_listRecents: (a: number) => any;
|
|
184
|
+
readonly client_listDirRecursive: (a: number, b: any) => any;
|
|
185
|
+
readonly client_getDirSize: (a: number, b: any) => any;
|
|
172
186
|
readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void;
|
|
173
187
|
readonly intounderlyingsource_cancel: (a: number) => void;
|
|
174
188
|
readonly intounderlyingsource_pull: (a: number, b: any) => any;
|
|
@@ -192,8 +206,8 @@ export interface InitOutput {
|
|
|
192
206
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
193
207
|
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1ad07d0627257b45: (a: number, b: number) => void;
|
|
194
208
|
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h96ccbfe273ba439a: (a: number, b: number) => void;
|
|
195
|
-
readonly
|
|
196
|
-
readonly
|
|
209
|
+
readonly closure799_externref_shim: (a: number, b: number, c: any) => void;
|
|
210
|
+
readonly closure957_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
197
211
|
readonly __wbindgen_start: () => void;
|
|
198
212
|
}
|
|
199
213
|
|
package/browser/sdk-rs.js
CHANGED
|
@@ -203,6 +203,23 @@ function debugString(val) {
|
|
|
203
203
|
return className;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
function takeFromExternrefTable0(idx) {
|
|
207
|
+
const value = wasm.__wbindgen_export_4.get(idx);
|
|
208
|
+
wasm.__externref_table_dealloc(idx);
|
|
209
|
+
return value;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* @param {StringifiedClient} serialized
|
|
213
|
+
* @returns {Client}
|
|
214
|
+
*/
|
|
215
|
+
export function fromStringified(serialized) {
|
|
216
|
+
const ret = wasm.fromStringified(serialized);
|
|
217
|
+
if (ret[2]) {
|
|
218
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
219
|
+
}
|
|
220
|
+
return Client.__wrap(ret[0]);
|
|
221
|
+
}
|
|
222
|
+
|
|
206
223
|
export function main_js() {
|
|
207
224
|
wasm.main_js();
|
|
208
225
|
}
|
|
@@ -224,23 +241,6 @@ export function login(email, password, twoFactorCode) {
|
|
|
224
241
|
return ret;
|
|
225
242
|
}
|
|
226
243
|
|
|
227
|
-
function takeFromExternrefTable0(idx) {
|
|
228
|
-
const value = wasm.__wbindgen_export_4.get(idx);
|
|
229
|
-
wasm.__externref_table_dealloc(idx);
|
|
230
|
-
return value;
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* @param {StringifiedClient} serialized
|
|
234
|
-
* @returns {Client}
|
|
235
|
-
*/
|
|
236
|
-
export function fromStringified(serialized) {
|
|
237
|
-
const ret = wasm.fromStringified(serialized);
|
|
238
|
-
if (ret[2]) {
|
|
239
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
240
|
-
}
|
|
241
|
-
return Client.__wrap(ret[0]);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
244
|
function passArray8ToWasm0(arg, malloc) {
|
|
245
245
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
246
246
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
@@ -256,11 +256,11 @@ function __wbg_adapter_63(arg0, arg1) {
|
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
function __wbg_adapter_66(arg0, arg1, arg2) {
|
|
259
|
-
wasm.
|
|
259
|
+
wasm.closure799_externref_shim(arg0, arg1, arg2);
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
function
|
|
263
|
-
wasm.
|
|
262
|
+
function __wbg_adapter_309(arg0, arg1, arg2, arg3) {
|
|
263
|
+
wasm.closure957_externref_shim(arg0, arg1, arg2, arg3);
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
const __wbindgen_enum_ReadableStreamReaderMode = ["byob"];
|
|
@@ -297,133 +297,163 @@ export class Client {
|
|
|
297
297
|
wasm.__wbg_client_free(ptr, 0);
|
|
298
298
|
}
|
|
299
299
|
/**
|
|
300
|
-
* @param {
|
|
301
|
-
* @returns {
|
|
300
|
+
* @param {DownloadFileToZipParams} params
|
|
301
|
+
* @returns {Promise<void>}
|
|
302
302
|
*/
|
|
303
|
-
|
|
304
|
-
const ret = wasm.
|
|
303
|
+
downloadItemsToZip(params) {
|
|
304
|
+
const ret = wasm.client_downloadItemsToZip(this.__wbg_ptr, params);
|
|
305
305
|
return ret;
|
|
306
306
|
}
|
|
307
307
|
/**
|
|
308
|
-
* @
|
|
309
|
-
* @param {string} name
|
|
310
|
-
* @returns {Promise<Dir>}
|
|
308
|
+
* @returns {StringifiedClient}
|
|
311
309
|
*/
|
|
312
|
-
|
|
313
|
-
const
|
|
314
|
-
const len0 = WASM_VECTOR_LEN;
|
|
315
|
-
const ret = wasm.client_createDir(this.__wbg_ptr, parent, ptr0, len0);
|
|
310
|
+
toStringified() {
|
|
311
|
+
const ret = wasm.client_toStringified(this.__wbg_ptr);
|
|
316
312
|
return ret;
|
|
317
313
|
}
|
|
318
314
|
/**
|
|
319
|
-
* @param {
|
|
315
|
+
* @param {File} file
|
|
320
316
|
* @returns {Promise<void>}
|
|
321
317
|
*/
|
|
322
|
-
|
|
323
|
-
const ret = wasm.
|
|
318
|
+
deleteFilePermanently(file) {
|
|
319
|
+
const ret = wasm.client_deleteFilePermanently(this.__wbg_ptr, file);
|
|
324
320
|
return ret;
|
|
325
321
|
}
|
|
326
322
|
/**
|
|
327
|
-
* @
|
|
323
|
+
* @param {UploadFileStreamParams} params
|
|
324
|
+
* @returns {Promise<File>}
|
|
328
325
|
*/
|
|
329
|
-
|
|
330
|
-
const ret = wasm.
|
|
326
|
+
uploadFileFromReader(params) {
|
|
327
|
+
const ret = wasm.client_uploadFileFromReader(this.__wbg_ptr, params);
|
|
331
328
|
return ret;
|
|
332
329
|
}
|
|
333
330
|
/**
|
|
334
|
-
* @param {
|
|
335
|
-
* @returns {Promise<
|
|
331
|
+
* @param {File} file
|
|
332
|
+
* @returns {Promise<Uint8Array>}
|
|
336
333
|
*/
|
|
337
|
-
|
|
338
|
-
const ret = wasm.
|
|
334
|
+
downloadFile(file) {
|
|
335
|
+
const ret = wasm.client_downloadFile(this.__wbg_ptr, file);
|
|
339
336
|
return ret;
|
|
340
337
|
}
|
|
341
338
|
/**
|
|
342
|
-
* @param {
|
|
343
|
-
* @
|
|
344
|
-
* @returns {Promise<NonRootObject | undefined>}
|
|
339
|
+
* @param {File} file
|
|
340
|
+
* @returns {Promise<File>}
|
|
345
341
|
*/
|
|
346
|
-
|
|
347
|
-
const
|
|
342
|
+
trashFile(file) {
|
|
343
|
+
const ret = wasm.client_trashFile(this.__wbg_ptr, file);
|
|
344
|
+
return ret;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* @param {DownloadFileStreamParams} params
|
|
348
|
+
* @returns {Promise<void>}
|
|
349
|
+
*/
|
|
350
|
+
downloadFileToWriter(params) {
|
|
351
|
+
const ret = wasm.client_downloadFileToWriter(this.__wbg_ptr, params);
|
|
352
|
+
return ret;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* @param {Uint8Array} data
|
|
356
|
+
* @param {UploadFileParams} params
|
|
357
|
+
* @returns {Promise<File>}
|
|
358
|
+
*/
|
|
359
|
+
uploadFile(data, params) {
|
|
360
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
348
361
|
const len0 = WASM_VECTOR_LEN;
|
|
349
|
-
const ret = wasm.
|
|
362
|
+
const ret = wasm.client_uploadFile(this.__wbg_ptr, ptr0, len0, params);
|
|
363
|
+
return ret;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* @param {Dir} dir
|
|
367
|
+
* @returns {Promise<DirSizeResponse>}
|
|
368
|
+
*/
|
|
369
|
+
getDirSize(dir) {
|
|
370
|
+
const ret = wasm.client_getDirSize(this.__wbg_ptr, dir);
|
|
371
|
+
return ret;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* @returns {Root}
|
|
375
|
+
*/
|
|
376
|
+
root() {
|
|
377
|
+
const ret = wasm.client_root(this.__wbg_ptr);
|
|
350
378
|
return ret;
|
|
351
379
|
}
|
|
352
380
|
/**
|
|
353
381
|
* @param {DirEnum} parent
|
|
354
382
|
* @param {string} name
|
|
355
|
-
* @returns {Promise<
|
|
383
|
+
* @returns {Promise<Dir>}
|
|
356
384
|
*/
|
|
357
|
-
|
|
385
|
+
createDir(parent, name) {
|
|
358
386
|
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
359
387
|
const len0 = WASM_VECTOR_LEN;
|
|
360
|
-
const ret = wasm.
|
|
388
|
+
const ret = wasm.client_createDir(this.__wbg_ptr, parent, ptr0, len0);
|
|
361
389
|
return ret;
|
|
362
390
|
}
|
|
363
391
|
/**
|
|
364
|
-
* @
|
|
392
|
+
* @param {Dir} dir
|
|
393
|
+
* @returns {Promise<void>}
|
|
365
394
|
*/
|
|
366
|
-
|
|
367
|
-
const ret = wasm.
|
|
395
|
+
deleteDirPermanently(dir) {
|
|
396
|
+
const ret = wasm.client_deleteDirPermanently(this.__wbg_ptr, dir);
|
|
368
397
|
return ret;
|
|
369
398
|
}
|
|
370
399
|
/**
|
|
371
|
-
* @param {
|
|
400
|
+
* @param {DirEnum} parent
|
|
401
|
+
* @param {string} name
|
|
372
402
|
* @returns {Promise<void>}
|
|
373
403
|
*/
|
|
374
|
-
|
|
375
|
-
const
|
|
404
|
+
dirExists(parent, name) {
|
|
405
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
406
|
+
const len0 = WASM_VECTOR_LEN;
|
|
407
|
+
const ret = wasm.client_dirExists(this.__wbg_ptr, parent, ptr0, len0);
|
|
376
408
|
return ret;
|
|
377
409
|
}
|
|
378
410
|
/**
|
|
379
|
-
* @param {
|
|
380
|
-
* @
|
|
381
|
-
* @returns {Promise<File>}
|
|
411
|
+
* @param {Dir} dir
|
|
412
|
+
* @returns {Promise<Dir>}
|
|
382
413
|
*/
|
|
383
|
-
|
|
384
|
-
const
|
|
385
|
-
const len0 = WASM_VECTOR_LEN;
|
|
386
|
-
const ret = wasm.client_uploadFile(this.__wbg_ptr, ptr0, len0, params);
|
|
414
|
+
trashDir(dir) {
|
|
415
|
+
const ret = wasm.client_trashDir(this.__wbg_ptr, dir);
|
|
387
416
|
return ret;
|
|
388
417
|
}
|
|
389
418
|
/**
|
|
390
|
-
* @
|
|
391
|
-
* @returns {Promise<void>}
|
|
419
|
+
* @returns {[Dir[], File[]]}
|
|
392
420
|
*/
|
|
393
|
-
|
|
394
|
-
const ret = wasm.
|
|
421
|
+
listRecents() {
|
|
422
|
+
const ret = wasm.client_listRecents(this.__wbg_ptr);
|
|
395
423
|
return ret;
|
|
396
424
|
}
|
|
397
425
|
/**
|
|
398
|
-
* @param {
|
|
399
|
-
* @
|
|
426
|
+
* @param {DirEnum} dir
|
|
427
|
+
* @param {string} nameOrUuid
|
|
428
|
+
* @returns {Promise<NonRootObject | undefined>}
|
|
400
429
|
*/
|
|
401
|
-
|
|
402
|
-
const
|
|
430
|
+
findItemInDir(dir, nameOrUuid) {
|
|
431
|
+
const ptr0 = passStringToWasm0(nameOrUuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
432
|
+
const len0 = WASM_VECTOR_LEN;
|
|
433
|
+
const ret = wasm.client_findItemInDir(this.__wbg_ptr, dir, ptr0, len0);
|
|
403
434
|
return ret;
|
|
404
435
|
}
|
|
405
436
|
/**
|
|
406
|
-
* @param {
|
|
407
|
-
* @returns {
|
|
437
|
+
* @param {DirEnum} dir
|
|
438
|
+
* @returns {[Dir[], File[]]}
|
|
408
439
|
*/
|
|
409
|
-
|
|
410
|
-
const ret = wasm.
|
|
440
|
+
listDir(dir) {
|
|
441
|
+
const ret = wasm.client_listDir(this.__wbg_ptr, dir);
|
|
411
442
|
return ret;
|
|
412
443
|
}
|
|
413
444
|
/**
|
|
414
|
-
* @
|
|
415
|
-
* @returns {Promise<File>}
|
|
445
|
+
* @returns {[Dir[], File[]]}
|
|
416
446
|
*/
|
|
417
|
-
|
|
418
|
-
const ret = wasm.
|
|
447
|
+
listFavorites() {
|
|
448
|
+
const ret = wasm.client_listFavorites(this.__wbg_ptr);
|
|
419
449
|
return ret;
|
|
420
450
|
}
|
|
421
451
|
/**
|
|
422
|
-
* @param {
|
|
423
|
-
* @returns {
|
|
452
|
+
* @param {DirEnum} dir
|
|
453
|
+
* @returns {[Dir[], File[]]}
|
|
424
454
|
*/
|
|
425
|
-
|
|
426
|
-
const ret = wasm.
|
|
455
|
+
listDirRecursive(dir) {
|
|
456
|
+
const ret = wasm.client_listDirRecursive(this.__wbg_ptr, dir);
|
|
427
457
|
return ret;
|
|
428
458
|
}
|
|
429
459
|
}
|
|
@@ -644,7 +674,7 @@ function __wbg_get_imports() {
|
|
|
644
674
|
const ret = arg0.call(arg1, arg2);
|
|
645
675
|
return ret;
|
|
646
676
|
}, arguments) };
|
|
647
|
-
imports.wbg.
|
|
677
|
+
imports.wbg.__wbg_call_a7beb83688026483 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
648
678
|
const ret = arg0.call(arg1, arg2, arg3, arg4, arg5);
|
|
649
679
|
return ret;
|
|
650
680
|
}, arguments) };
|
|
@@ -886,7 +916,7 @@ function __wbg_get_imports() {
|
|
|
886
916
|
const a = state0.a;
|
|
887
917
|
state0.a = 0;
|
|
888
918
|
try {
|
|
889
|
-
return
|
|
919
|
+
return __wbg_adapter_309(a, state0.b, arg0, arg1);
|
|
890
920
|
} finally {
|
|
891
921
|
state0.a = a;
|
|
892
922
|
}
|
|
@@ -1164,16 +1194,16 @@ function __wbg_get_imports() {
|
|
|
1164
1194
|
const ret = false;
|
|
1165
1195
|
return ret;
|
|
1166
1196
|
};
|
|
1167
|
-
imports.wbg.
|
|
1168
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1197
|
+
imports.wbg.__wbindgen_closure_wrapper1754 = function(arg0, arg1, arg2) {
|
|
1198
|
+
const ret = makeMutClosure(arg0, arg1, 695, __wbg_adapter_60);
|
|
1169
1199
|
return ret;
|
|
1170
1200
|
};
|
|
1171
|
-
imports.wbg.
|
|
1172
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1201
|
+
imports.wbg.__wbindgen_closure_wrapper2002 = function(arg0, arg1, arg2) {
|
|
1202
|
+
const ret = makeMutClosure(arg0, arg1, 760, __wbg_adapter_63);
|
|
1173
1203
|
return ret;
|
|
1174
1204
|
};
|
|
1175
|
-
imports.wbg.
|
|
1176
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1205
|
+
imports.wbg.__wbindgen_closure_wrapper2118 = function(arg0, arg1, arg2) {
|
|
1206
|
+
const ret = makeMutClosure(arg0, arg1, 800, __wbg_adapter_66);
|
|
1177
1207
|
return ret;
|
|
1178
1208
|
};
|
|
1179
1209
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
package/browser/sdk-rs_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const client_listDir: (a: number, b: any) => any;
|
|
5
|
-
export const client_trashDir: (a: number, b: any) => any;
|
|
6
|
-
export const client_dirExists: (a: number, b: any, c: number, d: number) => any;
|
|
7
|
-
export const client_deleteDirPermanently: (a: number, b: any) => any;
|
|
8
|
-
export const client_createDir: (a: number, b: any, c: number, d: number) => any;
|
|
9
|
-
export const client_root: (a: number) => any;
|
|
10
|
-
export const client_findItemInDir: (a: number, b: any, c: number, d: number) => any;
|
|
11
|
-
export const client_toStringified: (a: number) => any;
|
|
12
|
-
export const __wbg_client_free: (a: number, b: number) => void;
|
|
13
|
-
export const client_downloadItemsToZip: (a: number, b: any) => any;
|
|
14
|
-
export const main_js: () => void;
|
|
15
|
-
export const fromStringified: (a: any) => [number, number, number];
|
|
16
4
|
export const login: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
5
|
+
export const fromStringified: (a: any) => [number, number, number];
|
|
6
|
+
export const main_js: () => void;
|
|
7
|
+
export const client_downloadItemsToZip: (a: number, b: any) => any;
|
|
8
|
+
export const __wbg_client_free: (a: number, b: number) => void;
|
|
9
|
+
export const client_toStringified: (a: number) => any;
|
|
17
10
|
export const client_downloadFile: (a: number, b: any) => any;
|
|
11
|
+
export const client_uploadFileFromReader: (a: number, b: any) => any;
|
|
18
12
|
export const client_downloadFileToWriter: (a: number, b: any) => any;
|
|
13
|
+
export const client_uploadFile: (a: number, b: number, c: number, d: any) => any;
|
|
19
14
|
export const client_deleteFilePermanently: (a: number, b: any) => any;
|
|
20
15
|
export const client_trashFile: (a: number, b: any) => any;
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
16
|
+
export const client_findItemInDir: (a: number, b: any, c: number, d: number) => any;
|
|
17
|
+
export const client_listDir: (a: number, b: any) => any;
|
|
18
|
+
export const client_deleteDirPermanently: (a: number, b: any) => any;
|
|
19
|
+
export const client_trashDir: (a: number, b: any) => any;
|
|
20
|
+
export const client_dirExists: (a: number, b: any, c: number, d: number) => any;
|
|
21
|
+
export const client_root: (a: number) => any;
|
|
22
|
+
export const client_createDir: (a: number, b: any, c: number, d: number) => any;
|
|
23
|
+
export const client_listFavorites: (a: number) => any;
|
|
24
|
+
export const client_listRecents: (a: number) => any;
|
|
25
|
+
export const client_listDirRecursive: (a: number, b: any) => any;
|
|
26
|
+
export const client_getDirSize: (a: number, b: any) => any;
|
|
23
27
|
export const __wbg_intounderlyingsource_free: (a: number, b: number) => void;
|
|
24
28
|
export const intounderlyingsource_cancel: (a: number) => void;
|
|
25
29
|
export const intounderlyingsource_pull: (a: number, b: any) => any;
|
|
@@ -43,6 +47,6 @@ export const __wbindgen_export_6: WebAssembly.Table;
|
|
|
43
47
|
export const __externref_table_dealloc: (a: number) => void;
|
|
44
48
|
export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1ad07d0627257b45: (a: number, b: number) => void;
|
|
45
49
|
export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h96ccbfe273ba439a: (a: number, b: number) => void;
|
|
46
|
-
export const
|
|
47
|
-
export const
|
|
50
|
+
export const closure799_externref_shim: (a: number, b: number, c: any) => void;
|
|
51
|
+
export const closure957_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
48
52
|
export const __wbindgen_start: () => void;
|