@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.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 59f40d406211ea591c2ef0e27aed2360f3f47d12
1
+ a09e691a401c219ca5033000fe421a91d2531f52
@@ -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
  */
@@ -887,10 +887,6 @@ function wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf(arg0, arg
887
887
  }
888
888
  }
889
889
 
890
- function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
891
- wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
892
- }
893
-
894
890
  function wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa(arg0, arg1, arg2) {
895
891
  wasm.wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa(
896
892
  arg0,
@@ -899,6 +895,10 @@ function wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa(arg0, arg
899
895
  );
900
896
  }
901
897
 
898
+ function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
899
+ wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
900
+ }
901
+
902
902
  function wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f(arg0, arg1, arg2, arg3) {
903
903
  wasm.wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f(
904
904
  arg0,
@@ -1188,6 +1188,14 @@ export class AuthClient {
1188
1188
  const ret = wasm.authclient_identity(this.__wbg_ptr);
1189
1189
  return SendAccessClient.__wrap(ret);
1190
1190
  }
1191
+ /**
1192
+ * Client for initializing user account cryptography and unlock methods after JIT provisioning
1193
+ * @returns {RegistrationClient}
1194
+ */
1195
+ registration() {
1196
+ const ret = wasm.authclient_identity(this.__wbg_ptr);
1197
+ return RegistrationClient.__wrap(ret);
1198
+ }
1191
1199
  }
1192
1200
  if (Symbol.dispose) AuthClient.prototype[Symbol.dispose] = AuthClient.prototype.free;
1193
1201
 
@@ -4027,6 +4035,7 @@ export class PureCrypto {
4027
4035
  /**
4028
4036
  * Given a decrypted private RSA key PKCS8 DER this
4029
4037
  * returns the corresponding public RSA key in DER format.
4038
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
4030
4039
  * @param {Uint8Array} private_key
4031
4040
  * @returns {Uint8Array}
4032
4041
  */
@@ -4052,6 +4061,7 @@ export class PureCrypto {
4052
4061
  }
4053
4062
  /**
4054
4063
  * Generates a new RSA key pair and returns the private key
4064
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
4055
4065
  * @returns {Uint8Array}
4056
4066
  */
4057
4067
  static rsa_generate_keypair() {
@@ -4074,6 +4084,7 @@ export class PureCrypto {
4074
4084
  }
4075
4085
  /**
4076
4086
  * Decrypts data using RSAES-OAEP with SHA-1
4087
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
4077
4088
  * @param {Uint8Array} encrypted_data
4078
4089
  * @param {Uint8Array} private_key
4079
4090
  * @returns {Uint8Array}
@@ -4102,6 +4113,7 @@ export class PureCrypto {
4102
4113
  }
4103
4114
  /**
4104
4115
  * Encrypts data using RSAES-OAEP with SHA-1
4116
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
4105
4117
  * @param {Uint8Array} plain_data
4106
4118
  * @param {Uint8Array} public_key
4107
4119
  * @returns {Uint8Array}
@@ -4131,6 +4143,37 @@ export class PureCrypto {
4131
4143
  }
4132
4144
  if (Symbol.dispose) PureCrypto.prototype[Symbol.dispose] = PureCrypto.prototype.free;
4133
4145
 
4146
+ const RegistrationClientFinalization =
4147
+ typeof FinalizationRegistry === "undefined"
4148
+ ? { register: () => {}, unregister: () => {} }
4149
+ : new FinalizationRegistry((ptr) => wasm.__wbg_registrationclient_free(ptr >>> 0, 1));
4150
+ /**
4151
+ * Client for initializing a user account.
4152
+ */
4153
+ export class RegistrationClient {
4154
+ static __wrap(ptr) {
4155
+ ptr = ptr >>> 0;
4156
+ const obj = Object.create(RegistrationClient.prototype);
4157
+ obj.__wbg_ptr = ptr;
4158
+ RegistrationClientFinalization.register(obj, obj.__wbg_ptr, obj);
4159
+ return obj;
4160
+ }
4161
+
4162
+ __destroy_into_raw() {
4163
+ const ptr = this.__wbg_ptr;
4164
+ this.__wbg_ptr = 0;
4165
+ RegistrationClientFinalization.unregister(this);
4166
+ return ptr;
4167
+ }
4168
+
4169
+ free() {
4170
+ const ptr = this.__destroy_into_raw();
4171
+ wasm.__wbg_registrationclient_free(ptr, 0);
4172
+ }
4173
+ }
4174
+ if (Symbol.dispose)
4175
+ RegistrationClient.prototype[Symbol.dispose] = RegistrationClient.prototype.free;
4176
+
4134
4177
  const SendAccessClientFinalization =
4135
4178
  typeof FinalizationRegistry === "undefined"
4136
4179
  ? { register: () => {}, unregister: () => {} }
@@ -4545,7 +4588,7 @@ export function __wbg_call_e762c39fa8ea36bf() {
4545
4588
  }, arguments);
4546
4589
  }
4547
4590
 
4548
- export function __wbg_cipher_a69755738b4a95e4(arg0) {
4591
+ export function __wbg_cipher_118c2d2f844c92dc(arg0) {
4549
4592
  const ret = getObject(arg0).cipher;
4550
4593
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4551
4594
  }
@@ -4638,7 +4681,7 @@ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
4638
4681
  return addHeapObject(ret);
4639
4682
  }
4640
4683
 
4641
- export function __wbg_folder_6ddccfa2359908cd(arg0) {
4684
+ export function __wbg_folder_e24dd7de865631e7(arg0) {
4642
4685
  const ret = getObject(arg0).folder;
4643
4686
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4644
4687
  }
@@ -4671,7 +4714,12 @@ export function __wbg_getTime_14776bfb48a1bff9(arg0) {
4671
4714
  return ret;
4672
4715
  }
4673
4716
 
4674
- export function __wbg_get_63fc1a87cfa05664() {
4717
+ export function __wbg_get_7bed016f185add81(arg0, arg1) {
4718
+ const ret = getObject(arg0)[arg1 >>> 0];
4719
+ return addHeapObject(ret);
4720
+ }
4721
+
4722
+ export function __wbg_get_7d311caa64abba59() {
4675
4723
  return handleError(function (arg0, arg1, arg2) {
4676
4724
  let deferred0_0;
4677
4725
  let deferred0_1;
@@ -4686,12 +4734,19 @@ export function __wbg_get_63fc1a87cfa05664() {
4686
4734
  }, arguments);
4687
4735
  }
4688
4736
 
4689
- export function __wbg_get_7bed016f185add81(arg0, arg1) {
4690
- const ret = getObject(arg0)[arg1 >>> 0];
4737
+ export function __wbg_get_access_token_f894d2b087e7d4fe(arg0) {
4738
+ const ret = getObject(arg0).get_access_token();
4691
4739
  return addHeapObject(ret);
4692
4740
  }
4693
4741
 
4694
- export function __wbg_get_7f59e4189b579885() {
4742
+ export function __wbg_get_efcb449f58ec27c2() {
4743
+ return handleError(function (arg0, arg1) {
4744
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
4745
+ return addHeapObject(ret);
4746
+ }, arguments);
4747
+ }
4748
+
4749
+ export function __wbg_get_f8b3055a92ab3a2e() {
4695
4750
  return handleError(function (arg0, arg1, arg2) {
4696
4751
  let deferred0_0;
4697
4752
  let deferred0_1;
@@ -4706,18 +4761,6 @@ export function __wbg_get_7f59e4189b579885() {
4706
4761
  }, arguments);
4707
4762
  }
4708
4763
 
4709
- export function __wbg_get_access_token_5d1676f62fd8cd77(arg0) {
4710
- const ret = getObject(arg0).get_access_token();
4711
- return addHeapObject(ret);
4712
- }
4713
-
4714
- export function __wbg_get_efcb449f58ec27c2() {
4715
- return handleError(function (arg0, arg1) {
4716
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
4717
- return addHeapObject(ret);
4718
- }, arguments);
4719
- }
4720
-
4721
4764
  export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
4722
4765
  const ret = getObject(arg0)[getObject(arg1)];
4723
4766
  return addHeapObject(ret);
@@ -4902,14 +4945,14 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
4902
4945
  return ret;
4903
4946
  }
4904
4947
 
4905
- export function __wbg_list_2aa62e3f6d399917() {
4948
+ export function __wbg_list_87b5111301522ea8() {
4906
4949
  return handleError(function (arg0) {
4907
4950
  const ret = getObject(arg0).list();
4908
4951
  return addHeapObject(ret);
4909
4952
  }, arguments);
4910
4953
  }
4911
4954
 
4912
- export function __wbg_list_3b311a5af885ff76() {
4955
+ export function __wbg_list_905aead152fccf12() {
4913
4956
  return handleError(function (arg0) {
4914
4957
  const ret = getObject(arg0).list();
4915
4958
  return addHeapObject(ret);
@@ -5153,7 +5196,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
5153
5196
  }, arguments);
5154
5197
  }
5155
5198
 
5156
- export function __wbg_remove_47756c4838416808() {
5199
+ export function __wbg_remove_da5583193dd2745c() {
5157
5200
  return handleError(function (arg0, arg1, arg2) {
5158
5201
  let deferred0_0;
5159
5202
  let deferred0_1;
@@ -5168,7 +5211,7 @@ export function __wbg_remove_47756c4838416808() {
5168
5211
  }, arguments);
5169
5212
  }
5170
5213
 
5171
- export function __wbg_remove_e8858f2fbc02dbd1() {
5214
+ export function __wbg_remove_f40ebda9d037255c() {
5172
5215
  return handleError(function (arg0, arg1, arg2) {
5173
5216
  let deferred0_0;
5174
5217
  let deferred0_1;
@@ -5214,26 +5257,11 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
5214
5257
  return addHeapObject(ret);
5215
5258
  }
5216
5259
 
5217
- export function __wbg_set_268d54f279c675e3() {
5218
- return handleError(function (arg0, arg1, arg2, arg3) {
5219
- let deferred0_0;
5220
- let deferred0_1;
5221
- try {
5222
- deferred0_0 = arg1;
5223
- deferred0_1 = arg2;
5224
- const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
5225
- return addHeapObject(ret);
5226
- } finally {
5227
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5228
- }
5229
- }, arguments);
5230
- }
5231
-
5232
5260
  export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5233
5261
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5234
5262
  }
5235
5263
 
5236
- export function __wbg_set_6e08863f9db5b0dc() {
5264
+ export function __wbg_set_7d3480ee15dd45c8() {
5237
5265
  return handleError(function (arg0, arg1, arg2, arg3) {
5238
5266
  let deferred0_0;
5239
5267
  let deferred0_1;
@@ -5272,6 +5300,21 @@ export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
5272
5300
  getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
5273
5301
  }
5274
5302
 
5303
+ export function __wbg_set_f4c903235623f568() {
5304
+ return handleError(function (arg0, arg1, arg2, arg3) {
5305
+ let deferred0_0;
5306
+ let deferred0_1;
5307
+ try {
5308
+ deferred0_0 = arg1;
5309
+ deferred0_1 = arg2;
5310
+ const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
5311
+ return addHeapObject(ret);
5312
+ } finally {
5313
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5314
+ }
5315
+ }, arguments);
5316
+ }
5317
+
5275
5318
  export function __wbg_set_headers_6926da238cd32ee4(arg0, arg1) {
5276
5319
  getObject(arg0).headers = getObject(arg1);
5277
5320
  }
Binary file
@@ -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;
@@ -454,17 +456,17 @@ export const wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf: (
454
456
  d: number,
455
457
  ) => void;
456
458
  export const wasm_bindgen__closure__destroy__h09d4e676b918dc23: (a: number, b: number) => void;
457
- export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
459
+ export const wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa: (
458
460
  a: number,
459
461
  b: number,
462
+ c: number,
460
463
  ) => void;
461
- export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
462
- export const wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa: (
464
+ export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
463
465
  a: number,
464
466
  b: number,
465
- c: number,
466
467
  ) => void;
467
468
  export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
469
+ export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
468
470
  export const wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f: (
469
471
  a: number,
470
472
  b: number,