libfw-client 0.4.5 → 0.4.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.
@@ -1,142 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
-
4
- /**
5
- * WASM engine facade. Construct via `new LibfwClient(options)`.
6
- */
7
- export class LibfwClient {
8
- free(): void;
9
- [Symbol.dispose](): void;
10
- /**
11
- * Cancel the active transfer (state → `failed`).
12
- */
13
- cancel(): void;
14
- /**
15
- * Bytes transferred so far.
16
- */
17
- done_bytes(): number;
18
- /**
19
- * Download a single file at `file_path` into the chosen local directory.
20
- */
21
- download_file(base_url: string, token: string, file_path: string): Promise<any>;
22
- /**
23
- * Download every file under the virtual `dirPath` (empty = root).
24
- */
25
- download_folder(base_url: string, token: string, dir_path: string): Promise<any>;
26
- /**
27
- * Whether callbacks have been installed.
28
- */
29
- has_callbacks(): boolean;
30
- /**
31
- * Create an engine. `options` may include:
32
- * `{ concurrency, uploadWindow, downloadWindow, compress,
33
- * compressLevel, chunkSize, maxRetries, baseRetryDelayMs,
34
- * maxRetryDelayMs, timeoutMs, autoTune, tuneTtlMs }`.
35
- */
36
- constructor(opts: any);
37
- /**
38
- * Pause the active transfer (state → `paused`).
39
- */
40
- pause(): void;
41
- /**
42
- * Progress in `[0, 1]`.
43
- */
44
- progress(): number;
45
- /**
46
- * Resume a paused transfer.
47
- */
48
- resume(): void;
49
- /**
50
- * Install the JS callbacks object (required before any transfer).
51
- */
52
- set_callbacks(callbacks: any): void;
53
- /**
54
- * Install an `onTuning(phase, params, stats)` callback, invoked on
55
- * every tuning state change (phase transitions and window evaluations).
56
- */
57
- set_tune_callback(cb: any): void;
58
- /**
59
- * Current state: `idle | downloading | uploading | paused | completed |
60
- * failed`.
61
- */
62
- state(): string;
63
- /**
64
- * Total bytes to transfer.
65
- */
66
- total_bytes(): number;
67
- /**
68
- * Snapshot the tuning engine: `{ phase, params, stats, capsHash }`.
69
- */
70
- tune_state(): any;
71
- /**
72
- * Upload the files reported by the JS `getFileList` callback.
73
- */
74
- upload(base_url: string, token: string): Promise<any>;
75
- }
76
-
77
- /**
78
- * Read an optional string field from a JS object (helper for the SDK).
79
- */
80
- export function js_option_string(obj: any, key: string): string | undefined;
81
-
82
- export function start(): void;
83
-
84
- export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
85
-
86
- export interface InitOutput {
87
- readonly memory: WebAssembly.Memory;
88
- readonly __wbg_libfwclient_free: (a: number, b: number) => void;
89
- readonly js_option_string: (a: any, b: number, c: number) => [number, number];
90
- readonly libfwclient_cancel: (a: number) => void;
91
- readonly libfwclient_done_bytes: (a: number) => number;
92
- readonly libfwclient_download_file: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
93
- readonly libfwclient_download_folder: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
94
- readonly libfwclient_has_callbacks: (a: number) => number;
95
- readonly libfwclient_new: (a: any) => number;
96
- readonly libfwclient_pause: (a: number) => void;
97
- readonly libfwclient_progress: (a: number) => number;
98
- readonly libfwclient_resume: (a: number) => void;
99
- readonly libfwclient_set_callbacks: (a: number, b: any) => void;
100
- readonly libfwclient_set_tune_callback: (a: number, b: any) => void;
101
- readonly libfwclient_state: (a: number) => [number, number];
102
- readonly libfwclient_total_bytes: (a: number) => number;
103
- readonly libfwclient_tune_state: (a: number) => any;
104
- readonly libfwclient_upload: (a: number, b: number, c: number, d: number, e: number) => any;
105
- readonly start: () => void;
106
- readonly wasm_bindgen_b2c787b844a3ac79___convert__closures_____invoke___wasm_bindgen_b2c787b844a3ac79___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_b2c787b844a3ac79___JsError___true_: (a: number, b: number, c: any) => [number, number];
107
- readonly wasm_bindgen_b2c787b844a3ac79___convert__closures_____invoke___js_sys_209827a80d159db4___Function_fn_wasm_bindgen_b2c787b844a3ac79___JsValue_____wasm_bindgen_b2c787b844a3ac79___sys__Undefined___js_sys_209827a80d159db4___Function_fn_wasm_bindgen_b2c787b844a3ac79___JsValue_____wasm_bindgen_b2c787b844a3ac79___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
108
- readonly wasm_bindgen_b2c787b844a3ac79___convert__closures_____invoke___wasm_bindgen_b2c787b844a3ac79___JsValue______true_: (a: number, b: number, c: any) => void;
109
- readonly wasm_bindgen_b2c787b844a3ac79___convert__closures_____invoke___wasm_bindgen_b2c787b844a3ac79___JsValue______true__2: (a: number, b: number, c: any) => void;
110
- readonly wasm_bindgen_b2c787b844a3ac79___convert__closures_____invoke_______true_: (a: number, b: number) => void;
111
- readonly __wbindgen_malloc: (a: number, b: number) => number;
112
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
113
- readonly __wbindgen_exn_store: (a: number) => void;
114
- readonly __externref_table_alloc: () => number;
115
- readonly __wbindgen_externrefs: WebAssembly.Table;
116
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
117
- readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
118
- readonly __externref_table_dealloc: (a: number) => void;
119
- readonly __wbindgen_start: () => void;
120
- }
121
-
122
- export type SyncInitInput = BufferSource | WebAssembly.Module;
123
-
124
- /**
125
- * Instantiates the given `module`, which can either be bytes or
126
- * a precompiled `WebAssembly.Module`.
127
- *
128
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
129
- *
130
- * @returns {InitOutput}
131
- */
132
- export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
133
-
134
- /**
135
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
136
- * for everything else, calls `WebAssembly.instantiate` directly.
137
- *
138
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
139
- *
140
- * @returns {Promise<InitOutput>}
141
- */
142
- export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;