@bitwarden/sdk-internal 0.2.0-main.3 → 0.2.0-main.30

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,5 +1,10 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ /**
4
+ * @param {KeyAlgorithm} key_algorithm
5
+ * @returns {GenerateSshKeyResult}
6
+ */
7
+ export function generate_ssh_key(key_algorithm: KeyAlgorithm): GenerateSshKeyResult;
3
8
  export enum LogLevel {
4
9
  Trace = 0,
5
10
  Debug = 1,
@@ -51,6 +56,38 @@ export interface InitOrgCryptoRequest {
51
56
  organizationKeys: Map<Uuid, AsymmetricEncString>;
52
57
  }
53
58
 
59
+ export interface CoreError extends Error {
60
+ name: "CoreError";
61
+ variant:
62
+ | "MissingFieldError"
63
+ | "VaultLocked"
64
+ | "NotAuthenticated"
65
+ | "AccessTokenInvalid"
66
+ | "InvalidResponse"
67
+ | "Crypto"
68
+ | "IdentityFail"
69
+ | "Reqwest"
70
+ | "Serde"
71
+ | "Io"
72
+ | "InvalidBase64"
73
+ | "Chrono"
74
+ | "ResponseContent"
75
+ | "ValidationError"
76
+ | "InvalidStateFileVersion"
77
+ | "InvalidStateFile"
78
+ | "Internal"
79
+ | "EncryptionSettings";
80
+ }
81
+
82
+ export function isCoreError(error: any): error is CoreError;
83
+
84
+ export interface EncryptionSettingsError extends Error {
85
+ name: "EncryptionSettingsError";
86
+ variant: "Crypto" | "InvalidBase64" | "VaultLocked" | "InvalidPrivateKey" | "MissingPrivateKey";
87
+ }
88
+
89
+ export function isEncryptionSettingsError(error: any): error is EncryptionSettingsError;
90
+
54
91
  export type DeviceType =
55
92
  | "Android"
56
93
  | "iOS"
@@ -129,6 +166,21 @@ export type Kdf =
129
166
  | { pBKDF2: { iterations: NonZeroU32 } }
130
167
  | { argon2id: { iterations: NonZeroU32; memory: NonZeroU32; parallelism: NonZeroU32 } };
131
168
 
169
+ export interface GenerateSshKeyResult {
170
+ private_key: string;
171
+ public_key: string;
172
+ key_fingerprint: string;
173
+ }
174
+
175
+ export type KeyAlgorithm = "Ed25519" | "Rsa3072" | "Rsa4096";
176
+
177
+ export interface KeyGenerationError extends Error {
178
+ name: "KeyGenerationError";
179
+ variant: "KeyGenerationError" | "KeyConversionError";
180
+ }
181
+
182
+ export function isKeyGenerationError(error: any): error is KeyGenerationError;
183
+
132
184
  export interface Folder {
133
185
  id: Uuid | undefined;
134
186
  name: EncString;
@@ -141,6 +193,12 @@ export interface FolderView {
141
193
  revisionDate: DateTime<Utc>;
142
194
  }
143
195
 
196
+ export interface TestError extends Error {
197
+ name: "TestError";
198
+ }
199
+
200
+ export function isTestError(error: any): error is TestError;
201
+
144
202
  export type Uuid = string;
145
203
 
146
204
  /**
@@ -178,8 +236,9 @@ export class BitwardenClient {
178
236
  version(): string;
179
237
  /**
180
238
  * @param {string} msg
239
+ * @returns {Promise<void>}
181
240
  */
182
- throw(msg: string): void;
241
+ throw(msg: string): Promise<void>;
183
242
  /**
184
243
  * Test method, calls http endpoint
185
244
  * @param {string} url
@@ -3,15 +3,12 @@ export function __wbg_set_wasm(val) {
3
3
  wasm = val;
4
4
  }
5
5
 
6
- const heap = new Array(128).fill(undefined);
7
-
8
- heap.push(undefined, null, true, false);
6
+ const lTextDecoder =
7
+ typeof TextDecoder === "undefined" ? (0, module.require)("util").TextDecoder : TextDecoder;
9
8
 
10
- function getObject(idx) {
11
- return heap[idx];
12
- }
9
+ let cachedTextDecoder = new lTextDecoder("utf-8", { ignoreBOM: true, fatal: true });
13
10
 
14
- let WASM_VECTOR_LEN = 0;
11
+ cachedTextDecoder.decode();
15
12
 
16
13
  let cachedUint8ArrayMemory0 = null;
17
14
 
@@ -22,6 +19,44 @@ function getUint8ArrayMemory0() {
22
19
  return cachedUint8ArrayMemory0;
23
20
  }
24
21
 
22
+ function getStringFromWasm0(ptr, len) {
23
+ ptr = ptr >>> 0;
24
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
25
+ }
26
+
27
+ const heap = new Array(128).fill(undefined);
28
+
29
+ heap.push(undefined, null, true, false);
30
+
31
+ let heap_next = heap.length;
32
+
33
+ function addHeapObject(obj) {
34
+ if (heap_next === heap.length) heap.push(heap.length + 1);
35
+ const idx = heap_next;
36
+ heap_next = heap[idx];
37
+
38
+ heap[idx] = obj;
39
+ return idx;
40
+ }
41
+
42
+ function getObject(idx) {
43
+ return heap[idx];
44
+ }
45
+
46
+ function dropObject(idx) {
47
+ if (idx < 132) return;
48
+ heap[idx] = heap_next;
49
+ heap_next = idx;
50
+ }
51
+
52
+ function takeObject(idx) {
53
+ const ret = getObject(idx);
54
+ dropObject(idx);
55
+ return ret;
56
+ }
57
+
58
+ let WASM_VECTOR_LEN = 0;
59
+
25
60
  const lTextEncoder =
26
61
  typeof TextEncoder === "undefined" ? (0, module.require)("util").TextEncoder : TextEncoder;
27
62
 
@@ -99,41 +134,6 @@ function getDataViewMemory0() {
99
134
  return cachedDataViewMemory0;
100
135
  }
101
136
 
102
- let heap_next = heap.length;
103
-
104
- function dropObject(idx) {
105
- if (idx < 132) return;
106
- heap[idx] = heap_next;
107
- heap_next = idx;
108
- }
109
-
110
- function takeObject(idx) {
111
- const ret = getObject(idx);
112
- dropObject(idx);
113
- return ret;
114
- }
115
-
116
- function addHeapObject(obj) {
117
- if (heap_next === heap.length) heap.push(heap.length + 1);
118
- const idx = heap_next;
119
- heap_next = heap[idx];
120
-
121
- heap[idx] = obj;
122
- return idx;
123
- }
124
-
125
- const lTextDecoder =
126
- typeof TextDecoder === "undefined" ? (0, module.require)("util").TextDecoder : TextDecoder;
127
-
128
- let cachedTextDecoder = new lTextDecoder("utf-8", { ignoreBOM: true, fatal: true });
129
-
130
- cachedTextDecoder.decode();
131
-
132
- function getStringFromWasm0(ptr, len) {
133
- ptr = ptr >>> 0;
134
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
135
- }
136
-
137
137
  function debugString(val) {
138
138
  // primitive types
139
139
  const type = typeof val;
@@ -231,13 +231,92 @@ function makeMutClosure(arg0, arg1, dtor, f) {
231
231
  return real;
232
232
  }
233
233
  function __wbg_adapter_38(arg0, arg1, arg2) {
234
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hec6c9a85ed863308(
234
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc6535a5361f5caf9(
235
235
  arg0,
236
236
  arg1,
237
237
  addHeapObject(arg2),
238
238
  );
239
239
  }
240
240
 
241
+ let stack_pointer = 128;
242
+
243
+ function addBorrowedObject(obj) {
244
+ if (stack_pointer == 1) throw new Error("out of js stack");
245
+ heap[--stack_pointer] = obj;
246
+ return stack_pointer;
247
+ }
248
+ /**
249
+ * @param {any} error
250
+ * @returns {boolean}
251
+ */
252
+ export function isCoreError(error) {
253
+ try {
254
+ const ret = wasm.isCoreError(addBorrowedObject(error));
255
+ return ret !== 0;
256
+ } finally {
257
+ heap[stack_pointer++] = undefined;
258
+ }
259
+ }
260
+
261
+ /**
262
+ * @param {any} error
263
+ * @returns {boolean}
264
+ */
265
+ export function isEncryptionSettingsError(error) {
266
+ try {
267
+ const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
268
+ return ret !== 0;
269
+ } finally {
270
+ heap[stack_pointer++] = undefined;
271
+ }
272
+ }
273
+
274
+ /**
275
+ * @param {any} error
276
+ * @returns {boolean}
277
+ */
278
+ export function isKeyGenerationError(error) {
279
+ try {
280
+ const ret = wasm.isKeyGenerationError(addBorrowedObject(error));
281
+ return ret !== 0;
282
+ } finally {
283
+ heap[stack_pointer++] = undefined;
284
+ }
285
+ }
286
+
287
+ /**
288
+ * @param {any} error
289
+ * @returns {boolean}
290
+ */
291
+ export function isTestError(error) {
292
+ try {
293
+ const ret = wasm.isTestError(addBorrowedObject(error));
294
+ return ret !== 0;
295
+ } finally {
296
+ heap[stack_pointer++] = undefined;
297
+ }
298
+ }
299
+
300
+ /**
301
+ * @param {KeyAlgorithm} key_algorithm
302
+ * @returns {GenerateSshKeyResult}
303
+ */
304
+ export function generate_ssh_key(key_algorithm) {
305
+ try {
306
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
307
+ wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
308
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
309
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
310
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
311
+ if (r2) {
312
+ throw takeObject(r1);
313
+ }
314
+ return takeObject(r0);
315
+ } finally {
316
+ wasm.__wbindgen_add_to_stack_pointer(16);
317
+ }
318
+ }
319
+
241
320
  function handleError(f, args) {
242
321
  try {
243
322
  return f.apply(this, args);
@@ -245,8 +324,8 @@ function handleError(f, args) {
245
324
  wasm.__wbindgen_exn_store(addHeapObject(e));
246
325
  }
247
326
  }
248
- function __wbg_adapter_100(arg0, arg1, arg2, arg3) {
249
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h29c3505e35b3c82d(
327
+ function __wbg_adapter_125(arg0, arg1, arg2, arg3) {
328
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h611846871c2b3245(
250
329
  arg0,
251
330
  arg1,
252
331
  addHeapObject(arg2),
@@ -345,21 +424,13 @@ export class BitwardenClient {
345
424
  }
346
425
  /**
347
426
  * @param {string} msg
427
+ * @returns {Promise<void>}
348
428
  */
349
429
  throw(msg) {
350
- try {
351
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
352
- const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
353
- const len0 = WASM_VECTOR_LEN;
354
- wasm.bitwardenclient_throw(retptr, this.__wbg_ptr, ptr0, len0);
355
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
356
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
357
- if (r1) {
358
- throw takeObject(r0);
359
- }
360
- } finally {
361
- wasm.__wbindgen_add_to_stack_pointer(16);
362
- }
430
+ const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
431
+ const len0 = WASM_VECTOR_LEN;
432
+ const ret = wasm.bitwardenclient_throw(this.__wbg_ptr, ptr0, len0);
433
+ return takeObject(ret);
363
434
  }
364
435
  /**
365
436
  * Test method, calls http endpoint
@@ -516,6 +587,22 @@ export class ClientVault {
516
587
  }
517
588
  }
518
589
 
590
+ export function __wbindgen_string_new(arg0, arg1) {
591
+ const ret = getStringFromWasm0(arg0, arg1);
592
+ return addHeapObject(ret);
593
+ }
594
+
595
+ export function __wbg_get_ef828680c64da212() {
596
+ return handleError(function (arg0, arg1) {
597
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
598
+ return addHeapObject(ret);
599
+ }, arguments);
600
+ }
601
+
602
+ export function __wbindgen_object_drop_ref(arg0) {
603
+ takeObject(arg0);
604
+ }
605
+
519
606
  export function __wbindgen_string_get(arg0, arg1) {
520
607
  const obj = getObject(arg1);
521
608
  const ret = typeof obj === "string" ? obj : undefined;
@@ -527,8 +614,46 @@ export function __wbindgen_string_get(arg0, arg1) {
527
614
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
528
615
  }
529
616
 
530
- export function __wbindgen_object_drop_ref(arg0) {
531
- takeObject(arg0);
617
+ export function __wbg_new_fe19e4f3db5c3999(arg0, arg1) {
618
+ let deferred0_0;
619
+ let deferred0_1;
620
+ try {
621
+ deferred0_0 = arg0;
622
+ deferred0_1 = arg1;
623
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
624
+ return addHeapObject(ret);
625
+ } finally {
626
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
627
+ }
628
+ }
629
+
630
+ export function __wbg_setname_46d623c31ae39910(arg0, arg1, arg2) {
631
+ let deferred0_0;
632
+ let deferred0_1;
633
+ try {
634
+ deferred0_0 = arg1;
635
+ deferred0_1 = arg2;
636
+ getObject(arg0).name = getStringFromWasm0(arg1, arg2);
637
+ } finally {
638
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
639
+ }
640
+ }
641
+
642
+ export function __wbg_setvariant_262a12673324f71b(arg0, arg1, arg2) {
643
+ let deferred0_0;
644
+ let deferred0_1;
645
+ try {
646
+ deferred0_0 = arg1;
647
+ deferred0_1 = arg2;
648
+ getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
649
+ } finally {
650
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
651
+ }
652
+ }
653
+
654
+ export function __wbindgen_jsval_loose_eq(arg0, arg1) {
655
+ const ret = getObject(arg0) == getObject(arg1);
656
+ return ret;
532
657
  }
533
658
 
534
659
  export function __wbindgen_is_object(arg0) {
@@ -582,41 +707,6 @@ export function __wbg_get_5419cf6b954aa11d(arg0, arg1) {
582
707
  return addHeapObject(ret);
583
708
  }
584
709
 
585
- export function __wbindgen_object_clone_ref(arg0) {
586
- const ret = getObject(arg0);
587
- return addHeapObject(ret);
588
- }
589
-
590
- export function __wbg_next_b06e115d1b01e10b() {
591
- return handleError(function (arg0) {
592
- const ret = getObject(arg0).next();
593
- return addHeapObject(ret);
594
- }, arguments);
595
- }
596
-
597
- export function __wbg_done_983b5ffcaec8c583(arg0) {
598
- const ret = getObject(arg0).done;
599
- return ret;
600
- }
601
-
602
- export function __wbg_value_2ab8a198c834c26a(arg0) {
603
- const ret = getObject(arg0).value;
604
- return addHeapObject(ret);
605
- }
606
-
607
- export function __wbg_new_92c27aa873e8170e(arg0, arg1) {
608
- let deferred0_0;
609
- let deferred0_1;
610
- try {
611
- deferred0_0 = arg0;
612
- deferred0_1 = arg1;
613
- const ret = new Error(getStringFromWasm0(arg0, arg1));
614
- return addHeapObject(ret);
615
- } finally {
616
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
617
- }
618
- }
619
-
620
710
  export function __wbg_call_3bfa248576352471() {
621
711
  return handleError(function (arg0, arg1, arg2) {
622
712
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
@@ -700,6 +790,23 @@ export function __wbg_headers_1b9bf90c73fae600(arg0) {
700
790
  return addHeapObject(ret);
701
791
  }
702
792
 
793
+ export function __wbg_next_b06e115d1b01e10b() {
794
+ return handleError(function (arg0) {
795
+ const ret = getObject(arg0).next();
796
+ return addHeapObject(ret);
797
+ }, arguments);
798
+ }
799
+
800
+ export function __wbg_done_983b5ffcaec8c583(arg0) {
801
+ const ret = getObject(arg0).done;
802
+ return ret;
803
+ }
804
+
805
+ export function __wbg_value_2ab8a198c834c26a(arg0) {
806
+ const ret = getObject(arg0).value;
807
+ return addHeapObject(ret);
808
+ }
809
+
703
810
  export function __wbg_stringify_eead5648c09faaf8() {
704
811
  return handleError(function (arg0) {
705
812
  const ret = JSON.stringify(getObject(arg0));
@@ -718,16 +825,11 @@ export function __wbg_text_ebeee8b31af4c919() {
718
825
  }, arguments);
719
826
  }
720
827
 
721
- export function __wbindgen_string_new(arg0, arg1) {
722
- const ret = getStringFromWasm0(arg0, arg1);
828
+ export function __wbindgen_object_clone_ref(arg0) {
829
+ const ret = getObject(arg0);
723
830
  return addHeapObject(ret);
724
831
  }
725
832
 
726
- export function __wbindgen_jsval_loose_eq(arg0, arg1) {
727
- const ret = getObject(arg0) == getObject(arg1);
728
- return ret;
729
- }
730
-
731
833
  export function __wbindgen_cb_drop(arg0) {
732
834
  const obj = takeObject(arg0).original;
733
835
  if (obj.cnt-- == 1) {
@@ -750,7 +852,7 @@ export function __wbg_new_1073970097e5a420(arg0, arg1) {
750
852
  const a = state0.a;
751
853
  state0.a = 0;
752
854
  try {
753
- return __wbg_adapter_100(a, state0.b, arg0, arg1);
855
+ return __wbg_adapter_125(a, state0.b, arg0, arg1);
754
856
  } finally {
755
857
  state0.a = a;
756
858
  }
@@ -791,6 +893,89 @@ export function __wbg_error_f851667af71bcfc6(arg0, arg1) {
791
893
  }
792
894
  }
793
895
 
896
+ export function __wbg_crypto_1d1f22824a6a080c(arg0) {
897
+ const ret = getObject(arg0).crypto;
898
+ return addHeapObject(ret);
899
+ }
900
+
901
+ export function __wbg_process_4a72847cc503995b(arg0) {
902
+ const ret = getObject(arg0).process;
903
+ return addHeapObject(ret);
904
+ }
905
+
906
+ export function __wbg_versions_f686565e586dd935(arg0) {
907
+ const ret = getObject(arg0).versions;
908
+ return addHeapObject(ret);
909
+ }
910
+
911
+ export function __wbg_node_104a2ff8d6ea03a2(arg0) {
912
+ const ret = getObject(arg0).node;
913
+ return addHeapObject(ret);
914
+ }
915
+
916
+ export function __wbg_require_cca90b1a94a0255b() {
917
+ return handleError(function () {
918
+ const ret = module.require;
919
+ return addHeapObject(ret);
920
+ }, arguments);
921
+ }
922
+
923
+ export function __wbindgen_is_function(arg0) {
924
+ const ret = typeof getObject(arg0) === "function";
925
+ return ret;
926
+ }
927
+
928
+ export function __wbg_msCrypto_eb05e62b530a1508(arg0) {
929
+ const ret = getObject(arg0).msCrypto;
930
+ return addHeapObject(ret);
931
+ }
932
+
933
+ export function __wbg_newwithlength_76462a666eca145f(arg0) {
934
+ const ret = new Uint8Array(arg0 >>> 0);
935
+ return addHeapObject(ret);
936
+ }
937
+
938
+ export function __wbindgen_memory() {
939
+ const ret = wasm.memory;
940
+ return addHeapObject(ret);
941
+ }
942
+
943
+ export function __wbg_buffer_ccaed51a635d8a2d(arg0) {
944
+ const ret = getObject(arg0).buffer;
945
+ return addHeapObject(ret);
946
+ }
947
+
948
+ export function __wbg_newwithbyteoffsetandlength_7e3eb787208af730(arg0, arg1, arg2) {
949
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
950
+ return addHeapObject(ret);
951
+ }
952
+
953
+ export function __wbg_randomFillSync_5c9c955aa56b6049() {
954
+ return handleError(function (arg0, arg1) {
955
+ getObject(arg0).randomFillSync(takeObject(arg1));
956
+ }, arguments);
957
+ }
958
+
959
+ export function __wbg_subarray_975a06f9dbd16995(arg0, arg1, arg2) {
960
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
961
+ return addHeapObject(ret);
962
+ }
963
+
964
+ export function __wbg_getRandomValues_3aa56aa6edec874c() {
965
+ return handleError(function (arg0, arg1) {
966
+ getObject(arg0).getRandomValues(getObject(arg1));
967
+ }, arguments);
968
+ }
969
+
970
+ export function __wbg_new_fec2611eb9180f95(arg0) {
971
+ const ret = new Uint8Array(getObject(arg0));
972
+ return addHeapObject(ret);
973
+ }
974
+
975
+ export function __wbg_set_ec2fcf81bc573fd9(arg0, arg1, arg2) {
976
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
977
+ }
978
+
794
979
  export function __wbg_self_bf91bf94d9e04084() {
795
980
  return handleError(function () {
796
981
  const ret = self.self;
@@ -836,18 +1021,6 @@ export function __wbg_iterator_695d699a44d6234c() {
836
1021
  return addHeapObject(ret);
837
1022
  }
838
1023
 
839
- export function __wbg_get_ef828680c64da212() {
840
- return handleError(function (arg0, arg1) {
841
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
842
- return addHeapObject(ret);
843
- }, arguments);
844
- }
845
-
846
- export function __wbindgen_is_function(arg0) {
847
- const ret = typeof getObject(arg0) === "function";
848
- return ret;
849
- }
850
-
851
1024
  export function __wbg_next_13b477da1eaa3897(arg0) {
852
1025
  const ret = getObject(arg0).next;
853
1026
  return addHeapObject(ret);
@@ -901,35 +1074,11 @@ export function __wbg_then_4866a7d9f55d8f3e(arg0, arg1, arg2) {
901
1074
  return addHeapObject(ret);
902
1075
  }
903
1076
 
904
- export function __wbindgen_memory() {
905
- const ret = wasm.memory;
906
- return addHeapObject(ret);
907
- }
908
-
909
- export function __wbg_buffer_ccaed51a635d8a2d(arg0) {
910
- const ret = getObject(arg0).buffer;
911
- return addHeapObject(ret);
912
- }
913
-
914
- export function __wbg_newwithbyteoffsetandlength_7e3eb787208af730(arg0, arg1, arg2) {
915
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
916
- return addHeapObject(ret);
917
- }
918
-
919
1077
  export function __wbg_length_9254c4bd3b9f23c4(arg0) {
920
1078
  const ret = getObject(arg0).length;
921
1079
  return ret;
922
1080
  }
923
1081
 
924
- export function __wbg_new_fec2611eb9180f95(arg0) {
925
- const ret = new Uint8Array(getObject(arg0));
926
- return addHeapObject(ret);
927
- }
928
-
929
- export function __wbg_set_ec2fcf81bc573fd9(arg0, arg1, arg2) {
930
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
931
- }
932
-
933
1082
  export function __wbg_instanceof_Uint8Array_df0761410414ef36(arg0) {
934
1083
  let result;
935
1084
  try {
@@ -981,7 +1130,7 @@ export function __wbg_append_8135c71037096394() {
981
1130
  }, arguments);
982
1131
  }
983
1132
 
984
- export function __wbg_fetch_f8d735ba6fe1b719(arg0) {
1133
+ export function __wbg_fetch_9b133f5ec268a7b8(arg0) {
985
1134
  const ret = fetch(getObject(arg0));
986
1135
  return addHeapObject(ret);
987
1136
  }
@@ -1067,7 +1216,7 @@ export function __wbg_warn_2e2787d40aad9a81(arg0, arg1, arg2, arg3) {
1067
1216
  console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1068
1217
  }
1069
1218
 
1070
- export function __wbindgen_closure_wrapper1610(arg0, arg1, arg2) {
1071
- const ret = makeMutClosure(arg0, arg1, 425, __wbg_adapter_38);
1219
+ export function __wbindgen_closure_wrapper1827(arg0, arg1, arg2) {
1220
+ const ret = makeMutClosure(arg0, arg1, 491, __wbg_adapter_38);
1072
1221
  return addHeapObject(ret);
1073
1222
  }
Binary file
@@ -1,15 +1,20 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export function isCoreError(a: number): number;
5
+ export function isEncryptionSettingsError(a: number): number;
6
+ export function isKeyGenerationError(a: number): number;
4
7
  export function __wbg_bitwardenclient_free(a: number, b: number): void;
5
8
  export function bitwardenclient_new(a: number, b: number): number;
6
9
  export function bitwardenclient_echo(a: number, b: number, c: number, d: number): void;
7
10
  export function bitwardenclient_version(a: number, b: number): void;
8
- export function bitwardenclient_throw(a: number, b: number, c: number, d: number): void;
11
+ export function bitwardenclient_throw(a: number, b: number, c: number): number;
9
12
  export function bitwardenclient_http_get(a: number, b: number, c: number): number;
10
13
  export function bitwardenclient_crypto(a: number): number;
14
+ export function isTestError(a: number): number;
11
15
  export function clientcrypto_initialize_user_crypto(a: number, b: number): number;
12
16
  export function clientcrypto_initialize_org_crypto(a: number, b: number): number;
17
+ export function generate_ssh_key(a: number, b: number): void;
13
18
  export function clientfolders_decrypt(a: number, b: number, c: number): void;
14
19
  export function __wbg_clientcrypto_free(a: number, b: number): void;
15
20
  export function __wbg_clientfolders_free(a: number, b: number): void;
@@ -19,15 +24,15 @@ export function clientvault_folders(a: number): number;
19
24
  export function __wbindgen_malloc(a: number, b: number): number;
20
25
  export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
21
26
  export const __wbindgen_export_2: WebAssembly.Table;
22
- export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hec6c9a85ed863308(
27
+ export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc6535a5361f5caf9(
23
28
  a: number,
24
29
  b: number,
25
30
  c: number,
26
31
  ): void;
27
- export function __wbindgen_add_to_stack_pointer(a: number): number;
28
32
  export function __wbindgen_free(a: number, b: number, c: number): void;
33
+ export function __wbindgen_add_to_stack_pointer(a: number): number;
29
34
  export function __wbindgen_exn_store(a: number): void;
30
- export function wasm_bindgen__convert__closures__invoke2_mut__h29c3505e35b3c82d(
35
+ export function wasm_bindgen__convert__closures__invoke2_mut__h611846871c2b3245(
31
36
  a: number,
32
37
  b: number,
33
38
  c: number,