@bitwarden/sdk-internal 0.2.0-main.404 → 0.2.0-main.406

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.
@@ -1836,6 +1836,10 @@ export class AuthClient {
1836
1836
  * Client for send access functionality
1837
1837
  */
1838
1838
  send_access(): SendAccessClient;
1839
+ /**
1840
+ * Client for initializing user account cryptography and unlock methods after JIT provisioning
1841
+ */
1842
+ registration(): RegistrationClient;
1839
1843
  }
1840
1844
  /**
1841
1845
  * Client for evaluating credential risk for login ciphers.
@@ -2432,21 +2436,33 @@ export class PureCrypto {
2432
2436
  /**
2433
2437
  * Given a decrypted private RSA key PKCS8 DER this
2434
2438
  * returns the corresponding public RSA key in DER format.
2439
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
2435
2440
  */
2436
2441
  static rsa_extract_public_key(private_key: Uint8Array): Uint8Array;
2437
2442
  /**
2438
2443
  * Generates a new RSA key pair and returns the private key
2444
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
2439
2445
  */
2440
2446
  static rsa_generate_keypair(): Uint8Array;
2441
2447
  /**
2442
2448
  * Decrypts data using RSAES-OAEP with SHA-1
2449
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
2443
2450
  */
2444
2451
  static rsa_decrypt_data(encrypted_data: Uint8Array, private_key: Uint8Array): Uint8Array;
2445
2452
  /**
2446
2453
  * Encrypts data using RSAES-OAEP with SHA-1
2454
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
2447
2455
  */
2448
2456
  static rsa_encrypt_data(plain_data: Uint8Array, public_key: Uint8Array): Uint8Array;
2449
2457
  }
2458
+ /**
2459
+ * Client for initializing a user account.
2460
+ */
2461
+ export class RegistrationClient {
2462
+ private constructor();
2463
+ free(): void;
2464
+ [Symbol.dispose](): void;
2465
+ }
2450
2466
  /**
2451
2467
  * The `SendAccessClient` is used to interact with the Bitwarden API to get send access tokens.
2452
2468
  */
@@ -866,10 +866,6 @@ function wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa(arg0, arg
866
866
  );
867
867
  }
868
868
 
869
- function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
870
- wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
871
- }
872
-
873
869
  function wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf(arg0, arg1, arg2) {
874
870
  try {
875
871
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -889,6 +885,10 @@ function wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf(arg0, arg
889
885
  }
890
886
  }
891
887
 
888
+ function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
889
+ wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
890
+ }
891
+
892
892
  function wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f(arg0, arg1, arg2, arg3) {
893
893
  wasm.wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f(
894
894
  arg0,
@@ -1180,6 +1180,14 @@ class AuthClient {
1180
1180
  const ret = wasm.authclient_identity(this.__wbg_ptr);
1181
1181
  return SendAccessClient.__wrap(ret);
1182
1182
  }
1183
+ /**
1184
+ * Client for initializing user account cryptography and unlock methods after JIT provisioning
1185
+ * @returns {RegistrationClient}
1186
+ */
1187
+ registration() {
1188
+ const ret = wasm.authclient_identity(this.__wbg_ptr);
1189
+ return RegistrationClient.__wrap(ret);
1190
+ }
1183
1191
  }
1184
1192
  if (Symbol.dispose) AuthClient.prototype[Symbol.dispose] = AuthClient.prototype.free;
1185
1193
 
@@ -4055,6 +4063,7 @@ class PureCrypto {
4055
4063
  /**
4056
4064
  * Given a decrypted private RSA key PKCS8 DER this
4057
4065
  * returns the corresponding public RSA key in DER format.
4066
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
4058
4067
  * @param {Uint8Array} private_key
4059
4068
  * @returns {Uint8Array}
4060
4069
  */
@@ -4080,6 +4089,7 @@ class PureCrypto {
4080
4089
  }
4081
4090
  /**
4082
4091
  * Generates a new RSA key pair and returns the private key
4092
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
4083
4093
  * @returns {Uint8Array}
4084
4094
  */
4085
4095
  static rsa_generate_keypair() {
@@ -4102,6 +4112,7 @@ class PureCrypto {
4102
4112
  }
4103
4113
  /**
4104
4114
  * Decrypts data using RSAES-OAEP with SHA-1
4115
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
4105
4116
  * @param {Uint8Array} encrypted_data
4106
4117
  * @param {Uint8Array} private_key
4107
4118
  * @returns {Uint8Array}
@@ -4130,6 +4141,7 @@ class PureCrypto {
4130
4141
  }
4131
4142
  /**
4132
4143
  * Encrypts data using RSAES-OAEP with SHA-1
4144
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
4133
4145
  * @param {Uint8Array} plain_data
4134
4146
  * @param {Uint8Array} public_key
4135
4147
  * @returns {Uint8Array}
@@ -4161,6 +4173,39 @@ if (Symbol.dispose) PureCrypto.prototype[Symbol.dispose] = PureCrypto.prototype.
4161
4173
 
4162
4174
  exports.PureCrypto = PureCrypto;
4163
4175
 
4176
+ const RegistrationClientFinalization =
4177
+ typeof FinalizationRegistry === "undefined"
4178
+ ? { register: () => {}, unregister: () => {} }
4179
+ : new FinalizationRegistry((ptr) => wasm.__wbg_registrationclient_free(ptr >>> 0, 1));
4180
+ /**
4181
+ * Client for initializing a user account.
4182
+ */
4183
+ class RegistrationClient {
4184
+ static __wrap(ptr) {
4185
+ ptr = ptr >>> 0;
4186
+ const obj = Object.create(RegistrationClient.prototype);
4187
+ obj.__wbg_ptr = ptr;
4188
+ RegistrationClientFinalization.register(obj, obj.__wbg_ptr, obj);
4189
+ return obj;
4190
+ }
4191
+
4192
+ __destroy_into_raw() {
4193
+ const ptr = this.__wbg_ptr;
4194
+ this.__wbg_ptr = 0;
4195
+ RegistrationClientFinalization.unregister(this);
4196
+ return ptr;
4197
+ }
4198
+
4199
+ free() {
4200
+ const ptr = this.__destroy_into_raw();
4201
+ wasm.__wbg_registrationclient_free(ptr, 0);
4202
+ }
4203
+ }
4204
+ if (Symbol.dispose)
4205
+ RegistrationClient.prototype[Symbol.dispose] = RegistrationClient.prototype.free;
4206
+
4207
+ exports.RegistrationClient = RegistrationClient;
4208
+
4164
4209
  const SendAccessClientFinalization =
4165
4210
  typeof FinalizationRegistry === "undefined"
4166
4211
  ? { register: () => {}, unregister: () => {} }
@@ -4583,7 +4628,7 @@ exports.__wbg_call_e762c39fa8ea36bf = function () {
4583
4628
  }, arguments);
4584
4629
  };
4585
4630
 
4586
- exports.__wbg_cipher_a69755738b4a95e4 = function (arg0) {
4631
+ exports.__wbg_cipher_118c2d2f844c92dc = function (arg0) {
4587
4632
  const ret = getObject(arg0).cipher;
4588
4633
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4589
4634
  };
@@ -4676,7 +4721,7 @@ exports.__wbg_fetch_f8ba0e29a9d6de0d = function (arg0, arg1) {
4676
4721
  return addHeapObject(ret);
4677
4722
  };
4678
4723
 
4679
- exports.__wbg_folder_6ddccfa2359908cd = function (arg0) {
4724
+ exports.__wbg_folder_e24dd7de865631e7 = function (arg0) {
4680
4725
  const ret = getObject(arg0).folder;
4681
4726
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4682
4727
  };
@@ -4709,7 +4754,12 @@ exports.__wbg_getTime_14776bfb48a1bff9 = function (arg0) {
4709
4754
  return ret;
4710
4755
  };
4711
4756
 
4712
- exports.__wbg_get_63fc1a87cfa05664 = function () {
4757
+ exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
4758
+ const ret = getObject(arg0)[arg1 >>> 0];
4759
+ return addHeapObject(ret);
4760
+ };
4761
+
4762
+ exports.__wbg_get_7d311caa64abba59 = function () {
4713
4763
  return handleError(function (arg0, arg1, arg2) {
4714
4764
  let deferred0_0;
4715
4765
  let deferred0_1;
@@ -4724,12 +4774,19 @@ exports.__wbg_get_63fc1a87cfa05664 = function () {
4724
4774
  }, arguments);
4725
4775
  };
4726
4776
 
4727
- exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
4728
- const ret = getObject(arg0)[arg1 >>> 0];
4777
+ exports.__wbg_get_access_token_f894d2b087e7d4fe = function (arg0) {
4778
+ const ret = getObject(arg0).get_access_token();
4729
4779
  return addHeapObject(ret);
4730
4780
  };
4731
4781
 
4732
- exports.__wbg_get_7f59e4189b579885 = function () {
4782
+ exports.__wbg_get_efcb449f58ec27c2 = function () {
4783
+ return handleError(function (arg0, arg1) {
4784
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
4785
+ return addHeapObject(ret);
4786
+ }, arguments);
4787
+ };
4788
+
4789
+ exports.__wbg_get_f8b3055a92ab3a2e = function () {
4733
4790
  return handleError(function (arg0, arg1, arg2) {
4734
4791
  let deferred0_0;
4735
4792
  let deferred0_1;
@@ -4744,18 +4801,6 @@ exports.__wbg_get_7f59e4189b579885 = function () {
4744
4801
  }, arguments);
4745
4802
  };
4746
4803
 
4747
- exports.__wbg_get_access_token_5d1676f62fd8cd77 = function (arg0) {
4748
- const ret = getObject(arg0).get_access_token();
4749
- return addHeapObject(ret);
4750
- };
4751
-
4752
- exports.__wbg_get_efcb449f58ec27c2 = function () {
4753
- return handleError(function (arg0, arg1) {
4754
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
4755
- return addHeapObject(ret);
4756
- }, arguments);
4757
- };
4758
-
4759
4804
  exports.__wbg_get_with_ref_key_1dc361bd10053bfe = function (arg0, arg1) {
4760
4805
  const ret = getObject(arg0)[getObject(arg1)];
4761
4806
  return addHeapObject(ret);
@@ -4940,14 +4985,14 @@ exports.__wbg_length_cdd215e10d9dd507 = function (arg0) {
4940
4985
  return ret;
4941
4986
  };
4942
4987
 
4943
- exports.__wbg_list_2aa62e3f6d399917 = function () {
4988
+ exports.__wbg_list_87b5111301522ea8 = function () {
4944
4989
  return handleError(function (arg0) {
4945
4990
  const ret = getObject(arg0).list();
4946
4991
  return addHeapObject(ret);
4947
4992
  }, arguments);
4948
4993
  };
4949
4994
 
4950
- exports.__wbg_list_3b311a5af885ff76 = function () {
4995
+ exports.__wbg_list_905aead152fccf12 = function () {
4951
4996
  return handleError(function (arg0) {
4952
4997
  const ret = getObject(arg0).list();
4953
4998
  return addHeapObject(ret);
@@ -5191,7 +5236,7 @@ exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
5191
5236
  }, arguments);
5192
5237
  };
5193
5238
 
5194
- exports.__wbg_remove_47756c4838416808 = function () {
5239
+ exports.__wbg_remove_da5583193dd2745c = function () {
5195
5240
  return handleError(function (arg0, arg1, arg2) {
5196
5241
  let deferred0_0;
5197
5242
  let deferred0_1;
@@ -5206,7 +5251,7 @@ exports.__wbg_remove_47756c4838416808 = function () {
5206
5251
  }, arguments);
5207
5252
  };
5208
5253
 
5209
- exports.__wbg_remove_e8858f2fbc02dbd1 = function () {
5254
+ exports.__wbg_remove_f40ebda9d037255c = function () {
5210
5255
  return handleError(function (arg0, arg1, arg2) {
5211
5256
  let deferred0_0;
5212
5257
  let deferred0_1;
@@ -5252,26 +5297,11 @@ exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
5252
5297
  return addHeapObject(ret);
5253
5298
  };
5254
5299
 
5255
- exports.__wbg_set_268d54f279c675e3 = function () {
5256
- return handleError(function (arg0, arg1, arg2, arg3) {
5257
- let deferred0_0;
5258
- let deferred0_1;
5259
- try {
5260
- deferred0_0 = arg1;
5261
- deferred0_1 = arg2;
5262
- const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
5263
- return addHeapObject(ret);
5264
- } finally {
5265
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5266
- }
5267
- }, arguments);
5268
- };
5269
-
5270
5300
  exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
5271
5301
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5272
5302
  };
5273
5303
 
5274
- exports.__wbg_set_6e08863f9db5b0dc = function () {
5304
+ exports.__wbg_set_7d3480ee15dd45c8 = function () {
5275
5305
  return handleError(function (arg0, arg1, arg2, arg3) {
5276
5306
  let deferred0_0;
5277
5307
  let deferred0_1;
@@ -5310,6 +5340,21 @@ exports.__wbg_set_credentials_f621cd2d85c0c228 = function (arg0, arg1) {
5310
5340
  getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
5311
5341
  };
5312
5342
 
5343
+ exports.__wbg_set_f4c903235623f568 = function () {
5344
+ return handleError(function (arg0, arg1, arg2, arg3) {
5345
+ let deferred0_0;
5346
+ let deferred0_1;
5347
+ try {
5348
+ deferred0_0 = arg1;
5349
+ deferred0_1 = arg2;
5350
+ const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
5351
+ return addHeapObject(ret);
5352
+ } finally {
5353
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5354
+ }
5355
+ }, arguments);
5356
+ };
5357
+
5313
5358
  exports.__wbg_set_headers_6926da238cd32ee4 = function (arg0, arg1) {
5314
5359
  getObject(arg0).headers = getObject(arg1);
5315
5360
  };
@@ -432,11 +432,13 @@ export const __wbg_stateclient_free: (a: number, b: number) => void;
432
432
  export const __wbg_platformclient_free: (a: number, b: number) => void;
433
433
  export const platformclient_state: (a: number) => number;
434
434
  export const authclient_send_access: (a: number) => number;
435
+ export const authclient_registration: (a: number) => number;
435
436
  export const vaultclient_ciphers: (a: number) => number;
436
437
  export const vaultclient_folders: (a: number) => number;
437
438
  export const vaultclient_totp: (a: number) => number;
438
439
  export const vaultclient_collections: (a: number) => number;
439
440
  export const vaultclient_cipher_risk: (a: number) => number;
441
+ export const __wbg_registrationclient_free: (a: number, b: number) => void;
440
442
  export const __wbg_foldersclient_free: (a: number, b: number) => void;
441
443
  export const __wbg_cipherriskclient_free: (a: number, b: number) => void;
442
444
  export const __wbg_ciphersclient_free: (a: number, b: number) => void;
@@ -453,18 +455,18 @@ export const wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa: (
453
455
  c: number,
454
456
  ) => void;
455
457
  export const wasm_bindgen__closure__destroy__h09d4e676b918dc23: (a: number, b: number) => void;
456
- export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
457
- a: number,
458
- b: number,
459
- ) => void;
460
- export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
461
- export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
462
458
  export const wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf: (
463
459
  a: number,
464
460
  b: number,
465
461
  c: number,
466
462
  d: number,
467
463
  ) => void;
464
+ export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
465
+ a: number,
466
+ b: number,
467
+ ) => void;
468
+ export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
469
+ export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
468
470
  export const wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f: (
469
471
  a: number,
470
472
  b: number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/sdk-internal",
3
- "version": "0.2.0-main.404",
3
+ "version": "0.2.0-main.406",
4
4
  "license": "GPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",