@bitwarden/sdk-internal 0.2.0-main.81 → 0.2.0-main.83

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.
@@ -268,6 +268,34 @@ export interface FolderView {
268
268
  revisionDate: DateTime<Utc>;
269
269
  }
270
270
 
271
+ export interface DecryptFileError extends Error {
272
+ name: "DecryptFileError";
273
+ variant: "Decrypt" | "Io";
274
+ }
275
+
276
+ export function isDecryptFileError(error: any): error is DecryptFileError;
277
+
278
+ export interface EncryptFileError extends Error {
279
+ name: "EncryptFileError";
280
+ variant: "Encrypt" | "Io";
281
+ }
282
+
283
+ export function isEncryptFileError(error: any): error is EncryptFileError;
284
+
285
+ export interface DecryptError extends Error {
286
+ name: "DecryptError";
287
+ variant: "Crypto" | "VaultLocked";
288
+ }
289
+
290
+ export function isDecryptError(error: any): error is DecryptError;
291
+
292
+ export interface EncryptError extends Error {
293
+ name: "EncryptError";
294
+ variant: "Crypto" | "VaultLocked";
295
+ }
296
+
297
+ export function isEncryptError(error: any): error is EncryptError;
298
+
271
299
  export interface TotpResponse {
272
300
  /**
273
301
  * Generated TOTP code
@@ -305,6 +305,58 @@ module.exports.isKeyGenerationError = function (error) {
305
305
  }
306
306
  };
307
307
 
308
+ /**
309
+ * @param {any} error
310
+ * @returns {boolean}
311
+ */
312
+ module.exports.isDecryptFileError = function (error) {
313
+ try {
314
+ const ret = wasm.isDecryptFileError(addBorrowedObject(error));
315
+ return ret !== 0;
316
+ } finally {
317
+ heap[stack_pointer++] = undefined;
318
+ }
319
+ };
320
+
321
+ /**
322
+ * @param {any} error
323
+ * @returns {boolean}
324
+ */
325
+ module.exports.isEncryptFileError = function (error) {
326
+ try {
327
+ const ret = wasm.isEncryptFileError(addBorrowedObject(error));
328
+ return ret !== 0;
329
+ } finally {
330
+ heap[stack_pointer++] = undefined;
331
+ }
332
+ };
333
+
334
+ /**
335
+ * @param {any} error
336
+ * @returns {boolean}
337
+ */
338
+ module.exports.isDecryptError = function (error) {
339
+ try {
340
+ const ret = wasm.isDecryptError(addBorrowedObject(error));
341
+ return ret !== 0;
342
+ } finally {
343
+ heap[stack_pointer++] = undefined;
344
+ }
345
+ };
346
+
347
+ /**
348
+ * @param {any} error
349
+ * @returns {boolean}
350
+ */
351
+ module.exports.isEncryptError = function (error) {
352
+ try {
353
+ const ret = wasm.isEncryptError(addBorrowedObject(error));
354
+ return ret !== 0;
355
+ } finally {
356
+ heap[stack_pointer++] = undefined;
357
+ }
358
+ };
359
+
308
360
  /**
309
361
  * @param {any} error
310
362
  * @returns {boolean}
@@ -407,7 +459,7 @@ function __wbg_adapter_40(arg0, arg1, arg2) {
407
459
  );
408
460
  }
409
461
 
410
- function __wbg_adapter_139(arg0, arg1, arg2, arg3) {
462
+ function __wbg_adapter_143(arg0, arg1, arg2, arg3) {
411
463
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h69e15f428907d894(
412
464
  arg0,
413
465
  arg1,
@@ -1035,7 +1087,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
1035
1087
  const a = state0.a;
1036
1088
  state0.a = 0;
1037
1089
  try {
1038
- return __wbg_adapter_139(a, state0.b, arg0, arg1);
1090
+ return __wbg_adapter_143(a, state0.b, arg0, arg1);
1039
1091
  } finally {
1040
1092
  state0.a = a;
1041
1093
  }
@@ -1352,7 +1404,7 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
1352
1404
  return ret;
1353
1405
  };
1354
1406
 
1355
- module.exports.__wbindgen_closure_wrapper2087 = function (arg0, arg1, arg2) {
1407
+ module.exports.__wbindgen_closure_wrapper2092 = function (arg0, arg1, arg2) {
1356
1408
  const ret = makeMutClosure(arg0, arg1, 563, __wbg_adapter_40);
1357
1409
  return addHeapObject(ret);
1358
1410
  };
@@ -6,6 +6,10 @@ export const isEncryptionSettingsError: (a: number) => number;
6
6
  export const isSshKeyExportError: (a: number) => number;
7
7
  export const isSshKeyImportError: (a: number) => number;
8
8
  export const isKeyGenerationError: (a: number) => number;
9
+ export const isDecryptFileError: (a: number) => number;
10
+ export const isEncryptFileError: (a: number) => number;
11
+ export const isDecryptError: (a: number) => number;
12
+ export const isEncryptError: (a: number) => number;
9
13
  export const isTotpError: (a: number) => number;
10
14
  export const __wbg_bitwardenclient_free: (a: number, b: number) => void;
11
15
  export const bitwardenclient_new: (a: number, b: number) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/sdk-internal",
3
- "version": "0.2.0-main.81",
3
+ "version": "0.2.0-main.83",
4
4
  "license": "GPL-3.0",
5
5
  "files": [
6
6
  "bitwarden_wasm_internal_bg.js",