@bitwarden/sdk-internal 0.2.0-main.86 → 0.2.0-main.88

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/VERSION CHANGED
@@ -1 +1 @@
1
- a038b5df1ad69012584a87a49362dd13f4bab2e5
1
+ 00ffa38724a35254f9b610e555bd6a328f1d8eaf
@@ -115,30 +115,6 @@ export interface VerifyAsymmetricKeysResponse {
115
115
  validPrivateKey: boolean;
116
116
  }
117
117
 
118
- export interface CoreError extends Error {
119
- name: "CoreError";
120
- variant:
121
- | "MissingFieldError"
122
- | "VaultLocked"
123
- | "NotAuthenticated"
124
- | "AccessTokenInvalid"
125
- | "InvalidResponse"
126
- | "Crypto"
127
- | "IdentityFail"
128
- | "Reqwest"
129
- | "Serde"
130
- | "Io"
131
- | "InvalidBase64"
132
- | "Chrono"
133
- | "ResponseContent"
134
- | "InvalidStateFileVersion"
135
- | "InvalidStateFile"
136
- | "Internal"
137
- | "EncryptionSettings";
138
- }
139
-
140
- export function isCoreError(error: any): error is CoreError;
141
-
142
118
  export interface EncryptionSettingsError extends Error {
143
119
  name: "EncryptionSettingsError";
144
120
  variant: "Crypto" | "InvalidBase64" | "VaultLocked" | "InvalidPrivateKey" | "MissingPrivateKey";
@@ -224,6 +200,29 @@ export type Kdf =
224
200
  | { pBKDF2: { iterations: NonZeroU32 } }
225
201
  | { argon2id: { iterations: NonZeroU32; memory: NonZeroU32; parallelism: NonZeroU32 } };
226
202
 
203
+ export interface CryptoError extends Error {
204
+ name: "CryptoError";
205
+ variant:
206
+ | "InvalidKey"
207
+ | "InvalidMac"
208
+ | "MacNotProvided"
209
+ | "KeyDecrypt"
210
+ | "InvalidKeyLen"
211
+ | "InvalidUtf8String"
212
+ | "MissingKey"
213
+ | "MissingField"
214
+ | "MissingKeyId"
215
+ | "ReadOnlyKeyStore"
216
+ | "InsufficientKdfParameters"
217
+ | "EncString"
218
+ | "RsaError"
219
+ | "FingerprintError"
220
+ | "ArgonError"
221
+ | "ZeroNumber";
222
+ }
223
+
224
+ export function isCryptoError(error: any): error is CryptoError;
225
+
227
226
  export interface SshKey {
228
227
  /**
229
228
  * The private key in OpenSSH format
@@ -250,9 +250,9 @@ function addBorrowedObject(obj) {
250
250
  * @param {any} error
251
251
  * @returns {boolean}
252
252
  */
253
- export function isCoreError(error) {
253
+ export function isEncryptionSettingsError(error) {
254
254
  try {
255
- const ret = wasm.isCoreError(addBorrowedObject(error));
255
+ const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
256
256
  return ret !== 0;
257
257
  } finally {
258
258
  heap[stack_pointer++] = undefined;
@@ -263,9 +263,9 @@ export function isCoreError(error) {
263
263
  * @param {any} error
264
264
  * @returns {boolean}
265
265
  */
266
- export function isEncryptionSettingsError(error) {
266
+ export function isCryptoError(error) {
267
267
  try {
268
- const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
268
+ const ret = wasm.isCryptoError(addBorrowedObject(error));
269
269
  return ret !== 0;
270
270
  } finally {
271
271
  heap[stack_pointer++] = undefined;
@@ -1405,8 +1405,8 @@ export function __wbindgen_cb_drop(arg0) {
1405
1405
  return ret;
1406
1406
  }
1407
1407
 
1408
- export function __wbindgen_closure_wrapper2097(arg0, arg1, arg2) {
1409
- const ret = makeMutClosure(arg0, arg1, 565, __wbg_adapter_40);
1408
+ export function __wbindgen_closure_wrapper2088(arg0, arg1, arg2) {
1409
+ const ret = makeMutClosure(arg0, arg1, 559, __wbg_adapter_40);
1410
1410
  return addHeapObject(ret);
1411
1411
  }
1412
1412
 
Binary file
@@ -1,8 +1,8 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const isCoreError: (a: number) => number;
5
4
  export const isEncryptionSettingsError: (a: number) => number;
5
+ export const isCryptoError: (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;