@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.
@@ -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
  */
@@ -858,6 +858,18 @@ exports.isEncryptFileError = function (error) {
858
858
  }
859
859
  };
860
860
 
861
+ function wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa(arg0, arg1, arg2) {
862
+ wasm.wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa(
863
+ arg0,
864
+ arg1,
865
+ addHeapObject(arg2),
866
+ );
867
+ }
868
+
869
+ function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
870
+ wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
871
+ }
872
+
861
873
  function wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf(arg0, arg1, arg2) {
862
874
  try {
863
875
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -877,18 +889,6 @@ function wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf(arg0, arg
877
889
  }
878
890
  }
879
891
 
880
- function wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa(arg0, arg1, arg2) {
881
- wasm.wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa(
882
- arg0,
883
- arg1,
884
- addHeapObject(arg2),
885
- );
886
- }
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
 
@@ -4165,6 +4173,39 @@ if (Symbol.dispose) PureCrypto.prototype[Symbol.dispose] = PureCrypto.prototype.
4165
4173
 
4166
4174
  exports.PureCrypto = PureCrypto;
4167
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
+
4168
4209
  const SendAccessClientFinalization =
4169
4210
  typeof FinalizationRegistry === "undefined"
4170
4211
  ? { register: () => {}, unregister: () => {} }
@@ -4587,7 +4628,7 @@ exports.__wbg_call_e762c39fa8ea36bf = function () {
4587
4628
  }, arguments);
4588
4629
  };
4589
4630
 
4590
- exports.__wbg_cipher_54d9031d60850622 = function (arg0) {
4631
+ exports.__wbg_cipher_024a86a8b118ddac = function (arg0) {
4591
4632
  const ret = getObject(arg0).cipher;
4592
4633
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4593
4634
  };
@@ -4680,7 +4721,7 @@ exports.__wbg_fetch_f8ba0e29a9d6de0d = function (arg0, arg1) {
4680
4721
  return addHeapObject(ret);
4681
4722
  };
4682
4723
 
4683
- exports.__wbg_folder_2d6703d18bcf6b5f = function (arg0) {
4724
+ exports.__wbg_folder_9cea799de324dd1e = function (arg0) {
4684
4725
  const ret = getObject(arg0).folder;
4685
4726
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4686
4727
  };
@@ -4713,7 +4754,7 @@ exports.__wbg_getTime_14776bfb48a1bff9 = function (arg0) {
4713
4754
  return ret;
4714
4755
  };
4715
4756
 
4716
- exports.__wbg_get_7a7b765d166b78eb = function () {
4757
+ exports.__wbg_get_129fd7e95b5f7904 = function () {
4717
4758
  return handleError(function (arg0, arg1, arg2) {
4718
4759
  let deferred0_0;
4719
4760
  let deferred0_1;
@@ -4733,12 +4774,12 @@ exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
4733
4774
  return addHeapObject(ret);
4734
4775
  };
4735
4776
 
4736
- exports.__wbg_get_access_token_16ca6a078a16a9e6 = function (arg0) {
4777
+ exports.__wbg_get_access_token_abef009db5fa750c = function (arg0) {
4737
4778
  const ret = getObject(arg0).get_access_token();
4738
4779
  return addHeapObject(ret);
4739
4780
  };
4740
4781
 
4741
- exports.__wbg_get_d7c03a2a1838f895 = function () {
4782
+ exports.__wbg_get_eee8ecedab041535 = function () {
4742
4783
  return handleError(function (arg0, arg1, arg2) {
4743
4784
  let deferred0_0;
4744
4785
  let deferred0_1;
@@ -4944,14 +4985,14 @@ exports.__wbg_length_cdd215e10d9dd507 = function (arg0) {
4944
4985
  return ret;
4945
4986
  };
4946
4987
 
4947
- exports.__wbg_list_29517841961e05e3 = function () {
4988
+ exports.__wbg_list_33b035298e503422 = function () {
4948
4989
  return handleError(function (arg0) {
4949
4990
  const ret = getObject(arg0).list();
4950
4991
  return addHeapObject(ret);
4951
4992
  }, arguments);
4952
4993
  };
4953
4994
 
4954
- exports.__wbg_list_935b546af2d9b6de = function () {
4995
+ exports.__wbg_list_dac0fdb39533e45c = function () {
4955
4996
  return handleError(function (arg0) {
4956
4997
  const ret = getObject(arg0).list();
4957
4998
  return addHeapObject(ret);
@@ -5195,7 +5236,7 @@ exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
5195
5236
  }, arguments);
5196
5237
  };
5197
5238
 
5198
- exports.__wbg_remove_610f7f30b398d771 = function () {
5239
+ exports.__wbg_remove_1b8d8ab47af664e0 = function () {
5199
5240
  return handleError(function (arg0, arg1, arg2) {
5200
5241
  let deferred0_0;
5201
5242
  let deferred0_1;
@@ -5210,7 +5251,7 @@ exports.__wbg_remove_610f7f30b398d771 = function () {
5210
5251
  }, arguments);
5211
5252
  };
5212
5253
 
5213
- exports.__wbg_remove_d592b4ab55fa372d = function () {
5254
+ exports.__wbg_remove_6f00aa5f40dfd37c = function () {
5214
5255
  return handleError(function (arg0, arg1, arg2) {
5215
5256
  let deferred0_0;
5216
5257
  let deferred0_1;
@@ -5256,7 +5297,11 @@ exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
5256
5297
  return addHeapObject(ret);
5257
5298
  };
5258
5299
 
5259
- exports.__wbg_set_16779e1c12161eee = function () {
5300
+ exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
5301
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5302
+ };
5303
+
5304
+ exports.__wbg_set_4d0fb27359ddae64 = function () {
5260
5305
  return handleError(function (arg0, arg1, arg2, arg3) {
5261
5306
  let deferred0_0;
5262
5307
  let deferred0_1;
@@ -5271,11 +5316,12 @@ exports.__wbg_set_16779e1c12161eee = function () {
5271
5316
  }, arguments);
5272
5317
  };
5273
5318
 
5274
- exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
5275
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5319
+ exports.__wbg_set_907fb406c34a251d = function (arg0, arg1, arg2) {
5320
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5321
+ return addHeapObject(ret);
5276
5322
  };
5277
5323
 
5278
- exports.__wbg_set_6d45f26bc45340a7 = function () {
5324
+ exports.__wbg_set_a1854a59e5ec2573 = function () {
5279
5325
  return handleError(function (arg0, arg1, arg2, arg3) {
5280
5326
  let deferred0_0;
5281
5327
  let deferred0_1;
@@ -5290,11 +5336,6 @@ exports.__wbg_set_6d45f26bc45340a7 = function () {
5290
5336
  }, arguments);
5291
5337
  };
5292
5338
 
5293
- exports.__wbg_set_907fb406c34a251d = function (arg0, arg1, arg2) {
5294
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5295
- return addHeapObject(ret);
5296
- };
5297
-
5298
5339
  exports.__wbg_set_body_3c365989753d61f4 = function (arg0, arg1) {
5299
5340
  getObject(arg0).body = getObject(arg1);
5300
5341
  };
@@ -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;
@@ -447,13 +449,6 @@ export const __wbg_totpclient_free: (a: number, b: number) => void;
447
449
  export const __wbg_get_outgoingmessage_destination: (a: number) => number;
448
450
  export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;
449
451
  export const __wbg_cryptoclient_free: (a: number, b: number) => void;
450
- export const wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf: (
451
- a: number,
452
- b: number,
453
- c: number,
454
- d: number,
455
- ) => void;
456
- export const wasm_bindgen__closure__destroy__h09d4e676b918dc23: (a: number, b: number) => void;
457
452
  export const wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa: (
458
453
  a: number,
459
454
  b: number,
@@ -464,7 +459,14 @@ export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
464
459
  a: number,
465
460
  b: number,
466
461
  ) => void;
462
+ export const wasm_bindgen__closure__destroy__h09d4e676b918dc23: (a: number, b: number) => void;
467
463
  export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
464
+ export const wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf: (
465
+ a: number,
466
+ b: number,
467
+ c: number,
468
+ d: number,
469
+ ) => 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.405",
3
+ "version": "0.2.0-main.407",
4
4
  "license": "GPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",