@bitwarden/sdk-internal 0.2.0-main.225 → 0.2.0-main.227

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.
@@ -921,6 +921,22 @@ export interface Fido2CredentialView {
921
921
  creationDate: DateTime<Utc>;
922
922
  }
923
923
 
924
+ export interface Fido2CredentialFullView {
925
+ credentialId: string;
926
+ keyType: string;
927
+ keyAlgorithm: string;
928
+ keyCurve: string;
929
+ keyValue: string;
930
+ rpId: string;
931
+ userHandle: string | undefined;
932
+ userName: string | undefined;
933
+ counter: string;
934
+ rpName: string | undefined;
935
+ userDisplayName: string | undefined;
936
+ discoverable: string;
937
+ creationDate: DateTime<Utc>;
938
+ }
939
+
924
940
  export interface Fido2CredentialNewView {
925
941
  credentialId: string;
926
942
  keyType: string;
@@ -1299,6 +1315,17 @@ export class CiphersClient {
1299
1315
  */
1300
1316
  decrypt_list_with_failures(ciphers: Cipher[]): DecryptCipherListResult;
1301
1317
  decrypt_fido2_credentials(cipher_view: CipherView): Fido2CredentialView[];
1318
+ /**
1319
+ * Temporary method used to re-encrypt FIDO2 credentials for a cipher view.
1320
+ * Necessary until the TS clients utilize the SDK entirely for FIDO2 credentials management.
1321
+ * TS clients create decrypted FIDO2 credentials that need to be encrypted manually when
1322
+ * encrypting the rest of the CipherView.
1323
+ * TODO: Remove once TS passkey provider implementation uses SDK - PM-8313
1324
+ */
1325
+ set_fido2_credentials(
1326
+ cipher_view: CipherView,
1327
+ fido2_credentials: Fido2CredentialFullView[],
1328
+ ): CipherView;
1302
1329
  move_to_organization(cipher_view: CipherView, organization_id: OrganizationId): CipherView;
1303
1330
  decrypt_fido2_private_key(cipher_view: CipherView): string;
1304
1331
  }
@@ -747,7 +747,7 @@ function __wbg_adapter_56(arg0, arg1, arg2) {
747
747
  );
748
748
  }
749
749
 
750
- function __wbg_adapter_279(arg0, arg1, arg2, arg3) {
750
+ function __wbg_adapter_280(arg0, arg1, arg2, arg3) {
751
751
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h8776500d04a3e634(
752
752
  arg0,
753
753
  arg1,
@@ -1233,6 +1233,39 @@ class CiphersClient {
1233
1233
  wasm.__wbindgen_add_to_stack_pointer(16);
1234
1234
  }
1235
1235
  }
1236
+ /**
1237
+ * Temporary method used to re-encrypt FIDO2 credentials for a cipher view.
1238
+ * Necessary until the TS clients utilize the SDK entirely for FIDO2 credentials management.
1239
+ * TS clients create decrypted FIDO2 credentials that need to be encrypted manually when
1240
+ * encrypting the rest of the CipherView.
1241
+ * TODO: Remove once TS passkey provider implementation uses SDK - PM-8313
1242
+ * @param {CipherView} cipher_view
1243
+ * @param {Fido2CredentialFullView[]} fido2_credentials
1244
+ * @returns {CipherView}
1245
+ */
1246
+ set_fido2_credentials(cipher_view, fido2_credentials) {
1247
+ try {
1248
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1249
+ const ptr0 = passArrayJsValueToWasm0(fido2_credentials, wasm.__wbindgen_malloc);
1250
+ const len0 = WASM_VECTOR_LEN;
1251
+ wasm.ciphersclient_set_fido2_credentials(
1252
+ retptr,
1253
+ this.__wbg_ptr,
1254
+ addHeapObject(cipher_view),
1255
+ ptr0,
1256
+ len0,
1257
+ );
1258
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1259
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1260
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1261
+ if (r2) {
1262
+ throw takeObject(r1);
1263
+ }
1264
+ return takeObject(r0);
1265
+ } finally {
1266
+ wasm.__wbindgen_add_to_stack_pointer(16);
1267
+ }
1268
+ }
1236
1269
  /**
1237
1270
  * @param {CipherView} cipher_view
1238
1271
  * @param {OrganizationId} organization_id
@@ -3399,7 +3432,7 @@ module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
3399
3432
  return addHeapObject(ret);
3400
3433
  };
3401
3434
 
3402
- module.exports.__wbg_get_cefc449f27b5b2b5 = function () {
3435
+ module.exports.__wbg_get_d1ac75c9c3657dc2 = function () {
3403
3436
  return handleError(function (arg0, arg1, arg2) {
3404
3437
  let deferred0_0;
3405
3438
  let deferred0_1;
@@ -3414,7 +3447,7 @@ module.exports.__wbg_get_cefc449f27b5b2b5 = function () {
3414
3447
  }, arguments);
3415
3448
  };
3416
3449
 
3417
- module.exports.__wbg_getaccesstoken_ea777e2ee11f5d4c = function (arg0) {
3450
+ module.exports.__wbg_getaccesstoken_e4320b5f55eeabba = function (arg0) {
3418
3451
  const ret = getObject(arg0).get_access_token();
3419
3452
  return addHeapObject(ret);
3420
3453
  };
@@ -3519,7 +3552,7 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
3519
3552
  return ret;
3520
3553
  };
3521
3554
 
3522
- module.exports.__wbg_list_4c3389bca02ccd5d = function () {
3555
+ module.exports.__wbg_list_4073f967ea074894 = function () {
3523
3556
  return handleError(function (arg0) {
3524
3557
  const ret = getObject(arg0).list();
3525
3558
  return addHeapObject(ret);
@@ -3554,7 +3587,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
3554
3587
  const a = state0.a;
3555
3588
  state0.a = 0;
3556
3589
  try {
3557
- return __wbg_adapter_279(a, state0.b, arg0, arg1);
3590
+ return __wbg_adapter_280(a, state0.b, arg0, arg1);
3558
3591
  } finally {
3559
3592
  state0.a = a;
3560
3593
  }
@@ -3696,7 +3729,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
3696
3729
  }, arguments);
3697
3730
  };
3698
3731
 
3699
- module.exports.__wbg_remove_5bef744ea27147f9 = function () {
3732
+ module.exports.__wbg_remove_8bd4088f3e0d5ae1 = function () {
3700
3733
  return handleError(function (arg0, arg1, arg2) {
3701
3734
  let deferred0_0;
3702
3735
  let deferred0_1;
@@ -3747,7 +3780,7 @@ module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
3747
3780
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3748
3781
  };
3749
3782
 
3750
- module.exports.__wbg_set_eb62834c6aad321f = function () {
3783
+ module.exports.__wbg_set_9b96b6509594d7ff = function () {
3751
3784
  return handleError(function (arg0, arg1, arg2, arg3) {
3752
3785
  let deferred0_0;
3753
3786
  let deferred0_1;
@@ -3941,18 +3974,18 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
3941
3974
  return ret;
3942
3975
  };
3943
3976
 
3944
- module.exports.__wbindgen_closure_wrapper2909 = function (arg0, arg1, arg2) {
3945
- const ret = makeMutClosure(arg0, arg1, 919, __wbg_adapter_50);
3977
+ module.exports.__wbindgen_closure_wrapper2913 = function (arg0, arg1, arg2) {
3978
+ const ret = makeMutClosure(arg0, arg1, 920, __wbg_adapter_50);
3946
3979
  return addHeapObject(ret);
3947
3980
  };
3948
3981
 
3949
- module.exports.__wbindgen_closure_wrapper3749 = function (arg0, arg1, arg2) {
3950
- const ret = makeMutClosure(arg0, arg1, 1003, __wbg_adapter_53);
3982
+ module.exports.__wbindgen_closure_wrapper3753 = function (arg0, arg1, arg2) {
3983
+ const ret = makeMutClosure(arg0, arg1, 1004, __wbg_adapter_53);
3951
3984
  return addHeapObject(ret);
3952
3985
  };
3953
3986
 
3954
- module.exports.__wbindgen_closure_wrapper4167 = function (arg0, arg1, arg2) {
3955
- const ret = makeMutClosure(arg0, arg1, 1126, __wbg_adapter_56);
3987
+ module.exports.__wbindgen_closure_wrapper4171 = function (arg0, arg1, arg2) {
3988
+ const ret = makeMutClosure(arg0, arg1, 1127, __wbg_adapter_56);
3956
3989
  return addHeapObject(ret);
3957
3990
  };
3958
3991
 
@@ -122,6 +122,13 @@ export const ciphersclient_decrypt: (a: number, b: number, c: number) => void;
122
122
  export const ciphersclient_decrypt_list: (a: number, b: number, c: number, d: number) => void;
123
123
  export const ciphersclient_decrypt_list_with_failures: (a: number, b: number, c: number) => number;
124
124
  export const ciphersclient_decrypt_fido2_credentials: (a: number, b: number, c: number) => void;
125
+ export const ciphersclient_set_fido2_credentials: (
126
+ a: number,
127
+ b: number,
128
+ c: number,
129
+ d: number,
130
+ e: number,
131
+ ) => void;
125
132
  export const ciphersclient_move_to_organization: (
126
133
  a: number,
127
134
  b: number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/sdk-internal",
3
- "version": "0.2.0-main.225",
3
+ "version": "0.2.0-main.227",
4
4
  "license": "GPL-3.0",
5
5
  "files": [
6
6
  "bitwarden_wasm_internal_bg.js",