@bitwarden/sdk-internal 0.2.0-main.405 → 0.2.0-main.407

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
- 7f09fd2f4c29f4627263bcb2dacb9a3ea6599687
1
+ 069d78293ee15074678900109cff76eb116121ae
@@ -286,8 +286,8 @@ export interface SendAccessTokenRequest {
286
286
  */
287
287
  export type SendAccessCredentials =
288
288
  | SendPasswordCredentials
289
- | SendEmailCredentials
290
- | SendEmailOtpCredentials;
289
+ | SendEmailOtpCredentials
290
+ | SendEmailCredentials;
291
291
 
292
292
  /**
293
293
  * Credentials for getting a send access token using an email and OTP.
@@ -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.
@@ -2451,6 +2455,14 @@ export class PureCrypto {
2451
2455
  */
2452
2456
  static rsa_encrypt_data(plain_data: Uint8Array, public_key: Uint8Array): Uint8Array;
2453
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
+ }
2454
2466
  /**
2455
2467
  * The `SendAccessClient` is used to interact with the Bitwarden API to get send access tokens.
2456
2468
  */
@@ -876,10 +876,6 @@ function wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa(arg0, arg
876
876
  );
877
877
  }
878
878
 
879
- function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
880
- wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
881
- }
882
-
883
879
  function wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf(arg0, arg1, arg2) {
884
880
  try {
885
881
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -899,6 +895,10 @@ function wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf(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
 
@@ -4135,6 +4143,37 @@ export class PureCrypto {
4135
4143
  }
4136
4144
  if (Symbol.dispose) PureCrypto.prototype[Symbol.dispose] = PureCrypto.prototype.free;
4137
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
+
4138
4177
  const SendAccessClientFinalization =
4139
4178
  typeof FinalizationRegistry === "undefined"
4140
4179
  ? { register: () => {}, unregister: () => {} }
@@ -4549,7 +4588,7 @@ export function __wbg_call_e762c39fa8ea36bf() {
4549
4588
  }, arguments);
4550
4589
  }
4551
4590
 
4552
- export function __wbg_cipher_54d9031d60850622(arg0) {
4591
+ export function __wbg_cipher_024a86a8b118ddac(arg0) {
4553
4592
  const ret = getObject(arg0).cipher;
4554
4593
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4555
4594
  }
@@ -4642,7 +4681,7 @@ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
4642
4681
  return addHeapObject(ret);
4643
4682
  }
4644
4683
 
4645
- export function __wbg_folder_2d6703d18bcf6b5f(arg0) {
4684
+ export function __wbg_folder_9cea799de324dd1e(arg0) {
4646
4685
  const ret = getObject(arg0).folder;
4647
4686
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4648
4687
  }
@@ -4675,7 +4714,7 @@ export function __wbg_getTime_14776bfb48a1bff9(arg0) {
4675
4714
  return ret;
4676
4715
  }
4677
4716
 
4678
- export function __wbg_get_7a7b765d166b78eb() {
4717
+ export function __wbg_get_129fd7e95b5f7904() {
4679
4718
  return handleError(function (arg0, arg1, arg2) {
4680
4719
  let deferred0_0;
4681
4720
  let deferred0_1;
@@ -4695,12 +4734,12 @@ export function __wbg_get_7bed016f185add81(arg0, arg1) {
4695
4734
  return addHeapObject(ret);
4696
4735
  }
4697
4736
 
4698
- export function __wbg_get_access_token_16ca6a078a16a9e6(arg0) {
4737
+ export function __wbg_get_access_token_abef009db5fa750c(arg0) {
4699
4738
  const ret = getObject(arg0).get_access_token();
4700
4739
  return addHeapObject(ret);
4701
4740
  }
4702
4741
 
4703
- export function __wbg_get_d7c03a2a1838f895() {
4742
+ export function __wbg_get_eee8ecedab041535() {
4704
4743
  return handleError(function (arg0, arg1, arg2) {
4705
4744
  let deferred0_0;
4706
4745
  let deferred0_1;
@@ -4906,14 +4945,14 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
4906
4945
  return ret;
4907
4946
  }
4908
4947
 
4909
- export function __wbg_list_29517841961e05e3() {
4948
+ export function __wbg_list_33b035298e503422() {
4910
4949
  return handleError(function (arg0) {
4911
4950
  const ret = getObject(arg0).list();
4912
4951
  return addHeapObject(ret);
4913
4952
  }, arguments);
4914
4953
  }
4915
4954
 
4916
- export function __wbg_list_935b546af2d9b6de() {
4955
+ export function __wbg_list_dac0fdb39533e45c() {
4917
4956
  return handleError(function (arg0) {
4918
4957
  const ret = getObject(arg0).list();
4919
4958
  return addHeapObject(ret);
@@ -5157,7 +5196,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
5157
5196
  }, arguments);
5158
5197
  }
5159
5198
 
5160
- export function __wbg_remove_610f7f30b398d771() {
5199
+ export function __wbg_remove_1b8d8ab47af664e0() {
5161
5200
  return handleError(function (arg0, arg1, arg2) {
5162
5201
  let deferred0_0;
5163
5202
  let deferred0_1;
@@ -5172,7 +5211,7 @@ export function __wbg_remove_610f7f30b398d771() {
5172
5211
  }, arguments);
5173
5212
  }
5174
5213
 
5175
- export function __wbg_remove_d592b4ab55fa372d() {
5214
+ export function __wbg_remove_6f00aa5f40dfd37c() {
5176
5215
  return handleError(function (arg0, arg1, arg2) {
5177
5216
  let deferred0_0;
5178
5217
  let deferred0_1;
@@ -5218,7 +5257,11 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
5218
5257
  return addHeapObject(ret);
5219
5258
  }
5220
5259
 
5221
- export function __wbg_set_16779e1c12161eee() {
5260
+ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5261
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5262
+ }
5263
+
5264
+ export function __wbg_set_4d0fb27359ddae64() {
5222
5265
  return handleError(function (arg0, arg1, arg2, arg3) {
5223
5266
  let deferred0_0;
5224
5267
  let deferred0_1;
@@ -5233,11 +5276,12 @@ export function __wbg_set_16779e1c12161eee() {
5233
5276
  }, arguments);
5234
5277
  }
5235
5278
 
5236
- export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5237
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5279
+ export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
5280
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5281
+ return addHeapObject(ret);
5238
5282
  }
5239
5283
 
5240
- export function __wbg_set_6d45f26bc45340a7() {
5284
+ export function __wbg_set_a1854a59e5ec2573() {
5241
5285
  return handleError(function (arg0, arg1, arg2, arg3) {
5242
5286
  let deferred0_0;
5243
5287
  let deferred0_1;
@@ -5252,11 +5296,6 @@ export function __wbg_set_6d45f26bc45340a7() {
5252
5296
  }, arguments);
5253
5297
  }
5254
5298
 
5255
- export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
5256
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5257
- return addHeapObject(ret);
5258
- }
5259
-
5260
5299
  export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
5261
5300
  getObject(arg0).body = getObject(arg1);
5262
5301
  }
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;
@@ -452,19 +454,19 @@ export const wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa: (
452
454
  b: number,
453
455
  c: number,
454
456
  ) => void;
455
- 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
457
  export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
461
- export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (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__closure__destroy__h09d4e676b918dc23: (a: number, b: number) => void;
465
+ export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
466
+ a: number,
467
+ b: number,
468
+ ) => 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,