@bitwarden/commercial-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.
@@ -2453,21 +2457,33 @@ export class PureCrypto {
2453
2457
  /**
2454
2458
  * Given a decrypted private RSA key PKCS8 DER this
2455
2459
  * returns the corresponding public RSA key in DER format.
2460
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
2456
2461
  */
2457
2462
  static rsa_extract_public_key(private_key: Uint8Array): Uint8Array;
2458
2463
  /**
2459
2464
  * Generates a new RSA key pair and returns the private key
2465
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
2460
2466
  */
2461
2467
  static rsa_generate_keypair(): Uint8Array;
2462
2468
  /**
2463
2469
  * Decrypts data using RSAES-OAEP with SHA-1
2470
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
2464
2471
  */
2465
2472
  static rsa_decrypt_data(encrypted_data: Uint8Array, private_key: Uint8Array): Uint8Array;
2466
2473
  /**
2467
2474
  * Encrypts data using RSAES-OAEP with SHA-1
2475
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
2468
2476
  */
2469
2477
  static rsa_encrypt_data(plain_data: Uint8Array, public_key: Uint8Array): Uint8Array;
2470
2478
  }
2479
+ /**
2480
+ * Client for initializing a user account.
2481
+ */
2482
+ export class RegistrationClient {
2483
+ private constructor();
2484
+ free(): void;
2485
+ [Symbol.dispose](): void;
2486
+ }
2471
2487
  /**
2472
2488
  * The `SendAccessClient` is used to interact with the Bitwarden API to get send access tokens.
2473
2489
  */
@@ -868,6 +868,18 @@ export function isEncryptFileError(error) {
868
868
  }
869
869
  }
870
870
 
871
+ function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
872
+ wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
873
+ }
874
+
875
+ function wasm_bindgen__convert__closures_____invoke__h3f3903322ff045ff(arg0, arg1, arg2) {
876
+ wasm.wasm_bindgen__convert__closures_____invoke__h3f3903322ff045ff(
877
+ arg0,
878
+ arg1,
879
+ addHeapObject(arg2),
880
+ );
881
+ }
882
+
871
883
  function wasm_bindgen__convert__closures_____invoke__h35a8188fc7e541fe(arg0, arg1, arg2) {
872
884
  try {
873
885
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -887,18 +899,6 @@ function wasm_bindgen__convert__closures_____invoke__h35a8188fc7e541fe(arg0, arg
887
899
  }
888
900
  }
889
901
 
890
- function wasm_bindgen__convert__closures_____invoke__h3f3903322ff045ff(arg0, arg1, arg2) {
891
- wasm.wasm_bindgen__convert__closures_____invoke__h3f3903322ff045ff(
892
- arg0,
893
- arg1,
894
- addHeapObject(arg2),
895
- );
896
- }
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
 
@@ -4106,6 +4114,7 @@ export class PureCrypto {
4106
4114
  /**
4107
4115
  * Given a decrypted private RSA key PKCS8 DER this
4108
4116
  * returns the corresponding public RSA key in DER format.
4117
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
4109
4118
  * @param {Uint8Array} private_key
4110
4119
  * @returns {Uint8Array}
4111
4120
  */
@@ -4131,6 +4140,7 @@ export class PureCrypto {
4131
4140
  }
4132
4141
  /**
4133
4142
  * Generates a new RSA key pair and returns the private key
4143
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
4134
4144
  * @returns {Uint8Array}
4135
4145
  */
4136
4146
  static rsa_generate_keypair() {
@@ -4153,6 +4163,7 @@ export class PureCrypto {
4153
4163
  }
4154
4164
  /**
4155
4165
  * Decrypts data using RSAES-OAEP with SHA-1
4166
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
4156
4167
  * @param {Uint8Array} encrypted_data
4157
4168
  * @param {Uint8Array} private_key
4158
4169
  * @returns {Uint8Array}
@@ -4181,6 +4192,7 @@ export class PureCrypto {
4181
4192
  }
4182
4193
  /**
4183
4194
  * Encrypts data using RSAES-OAEP with SHA-1
4195
+ * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
4184
4196
  * @param {Uint8Array} plain_data
4185
4197
  * @param {Uint8Array} public_key
4186
4198
  * @returns {Uint8Array}
@@ -4210,6 +4222,37 @@ export class PureCrypto {
4210
4222
  }
4211
4223
  if (Symbol.dispose) PureCrypto.prototype[Symbol.dispose] = PureCrypto.prototype.free;
4212
4224
 
4225
+ const RegistrationClientFinalization =
4226
+ typeof FinalizationRegistry === "undefined"
4227
+ ? { register: () => {}, unregister: () => {} }
4228
+ : new FinalizationRegistry((ptr) => wasm.__wbg_registrationclient_free(ptr >>> 0, 1));
4229
+ /**
4230
+ * Client for initializing a user account.
4231
+ */
4232
+ export class RegistrationClient {
4233
+ static __wrap(ptr) {
4234
+ ptr = ptr >>> 0;
4235
+ const obj = Object.create(RegistrationClient.prototype);
4236
+ obj.__wbg_ptr = ptr;
4237
+ RegistrationClientFinalization.register(obj, obj.__wbg_ptr, obj);
4238
+ return obj;
4239
+ }
4240
+
4241
+ __destroy_into_raw() {
4242
+ const ptr = this.__wbg_ptr;
4243
+ this.__wbg_ptr = 0;
4244
+ RegistrationClientFinalization.unregister(this);
4245
+ return ptr;
4246
+ }
4247
+
4248
+ free() {
4249
+ const ptr = this.__destroy_into_raw();
4250
+ wasm.__wbg_registrationclient_free(ptr, 0);
4251
+ }
4252
+ }
4253
+ if (Symbol.dispose)
4254
+ RegistrationClient.prototype[Symbol.dispose] = RegistrationClient.prototype.free;
4255
+
4213
4256
  const SendAccessClientFinalization =
4214
4257
  typeof FinalizationRegistry === "undefined"
4215
4258
  ? { register: () => {}, unregister: () => {} }
@@ -4624,7 +4667,7 @@ export function __wbg_call_e762c39fa8ea36bf() {
4624
4667
  }, arguments);
4625
4668
  }
4626
4669
 
4627
- export function __wbg_cipher_a69755738b4a95e4(arg0) {
4670
+ export function __wbg_cipher_118c2d2f844c92dc(arg0) {
4628
4671
  const ret = getObject(arg0).cipher;
4629
4672
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4630
4673
  }
@@ -4717,7 +4760,7 @@ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
4717
4760
  return addHeapObject(ret);
4718
4761
  }
4719
4762
 
4720
- export function __wbg_folder_6ddccfa2359908cd(arg0) {
4763
+ export function __wbg_folder_e24dd7de865631e7(arg0) {
4721
4764
  const ret = getObject(arg0).folder;
4722
4765
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4723
4766
  }
@@ -4750,7 +4793,12 @@ export function __wbg_getTime_14776bfb48a1bff9(arg0) {
4750
4793
  return ret;
4751
4794
  }
4752
4795
 
4753
- export function __wbg_get_63fc1a87cfa05664() {
4796
+ export function __wbg_get_7bed016f185add81(arg0, arg1) {
4797
+ const ret = getObject(arg0)[arg1 >>> 0];
4798
+ return addHeapObject(ret);
4799
+ }
4800
+
4801
+ export function __wbg_get_7d311caa64abba59() {
4754
4802
  return handleError(function (arg0, arg1, arg2) {
4755
4803
  let deferred0_0;
4756
4804
  let deferred0_1;
@@ -4765,12 +4813,19 @@ export function __wbg_get_63fc1a87cfa05664() {
4765
4813
  }, arguments);
4766
4814
  }
4767
4815
 
4768
- export function __wbg_get_7bed016f185add81(arg0, arg1) {
4769
- const ret = getObject(arg0)[arg1 >>> 0];
4816
+ export function __wbg_get_access_token_f894d2b087e7d4fe(arg0) {
4817
+ const ret = getObject(arg0).get_access_token();
4770
4818
  return addHeapObject(ret);
4771
4819
  }
4772
4820
 
4773
- export function __wbg_get_7f59e4189b579885() {
4821
+ export function __wbg_get_efcb449f58ec27c2() {
4822
+ return handleError(function (arg0, arg1) {
4823
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
4824
+ return addHeapObject(ret);
4825
+ }, arguments);
4826
+ }
4827
+
4828
+ export function __wbg_get_f8b3055a92ab3a2e() {
4774
4829
  return handleError(function (arg0, arg1, arg2) {
4775
4830
  let deferred0_0;
4776
4831
  let deferred0_1;
@@ -4785,18 +4840,6 @@ export function __wbg_get_7f59e4189b579885() {
4785
4840
  }, arguments);
4786
4841
  }
4787
4842
 
4788
- export function __wbg_get_access_token_5d1676f62fd8cd77(arg0) {
4789
- const ret = getObject(arg0).get_access_token();
4790
- return addHeapObject(ret);
4791
- }
4792
-
4793
- export function __wbg_get_efcb449f58ec27c2() {
4794
- return handleError(function (arg0, arg1) {
4795
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
4796
- return addHeapObject(ret);
4797
- }, arguments);
4798
- }
4799
-
4800
4843
  export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
4801
4844
  const ret = getObject(arg0)[getObject(arg1)];
4802
4845
  return addHeapObject(ret);
@@ -4981,14 +5024,14 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
4981
5024
  return ret;
4982
5025
  }
4983
5026
 
4984
- export function __wbg_list_2aa62e3f6d399917() {
5027
+ export function __wbg_list_87b5111301522ea8() {
4985
5028
  return handleError(function (arg0) {
4986
5029
  const ret = getObject(arg0).list();
4987
5030
  return addHeapObject(ret);
4988
5031
  }, arguments);
4989
5032
  }
4990
5033
 
4991
- export function __wbg_list_3b311a5af885ff76() {
5034
+ export function __wbg_list_905aead152fccf12() {
4992
5035
  return handleError(function (arg0) {
4993
5036
  const ret = getObject(arg0).list();
4994
5037
  return addHeapObject(ret);
@@ -5232,7 +5275,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
5232
5275
  }, arguments);
5233
5276
  }
5234
5277
 
5235
- export function __wbg_remove_47756c4838416808() {
5278
+ export function __wbg_remove_da5583193dd2745c() {
5236
5279
  return handleError(function (arg0, arg1, arg2) {
5237
5280
  let deferred0_0;
5238
5281
  let deferred0_1;
@@ -5247,7 +5290,7 @@ export function __wbg_remove_47756c4838416808() {
5247
5290
  }, arguments);
5248
5291
  }
5249
5292
 
5250
- export function __wbg_remove_e8858f2fbc02dbd1() {
5293
+ export function __wbg_remove_f40ebda9d037255c() {
5251
5294
  return handleError(function (arg0, arg1, arg2) {
5252
5295
  let deferred0_0;
5253
5296
  let deferred0_1;
@@ -5293,26 +5336,11 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
5293
5336
  return addHeapObject(ret);
5294
5337
  }
5295
5338
 
5296
- export function __wbg_set_268d54f279c675e3() {
5297
- return handleError(function (arg0, arg1, arg2, arg3) {
5298
- let deferred0_0;
5299
- let deferred0_1;
5300
- try {
5301
- deferred0_0 = arg1;
5302
- deferred0_1 = arg2;
5303
- const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
5304
- return addHeapObject(ret);
5305
- } finally {
5306
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5307
- }
5308
- }, arguments);
5309
- }
5310
-
5311
5339
  export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5312
5340
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5313
5341
  }
5314
5342
 
5315
- export function __wbg_set_6e08863f9db5b0dc() {
5343
+ export function __wbg_set_7d3480ee15dd45c8() {
5316
5344
  return handleError(function (arg0, arg1, arg2, arg3) {
5317
5345
  let deferred0_0;
5318
5346
  let deferred0_1;
@@ -5351,6 +5379,21 @@ export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
5351
5379
  getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
5352
5380
  }
5353
5381
 
5382
+ export function __wbg_set_f4c903235623f568() {
5383
+ return handleError(function (arg0, arg1, arg2, arg3) {
5384
+ let deferred0_0;
5385
+ let deferred0_1;
5386
+ try {
5387
+ deferred0_0 = arg1;
5388
+ deferred0_1 = arg2;
5389
+ const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
5390
+ return addHeapObject(ret);
5391
+ } finally {
5392
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5393
+ }
5394
+ }, arguments);
5395
+ }
5396
+
5354
5397
  export function __wbg_set_headers_6926da238cd32ee4(arg0, arg1) {
5355
5398
  getObject(arg0).headers = getObject(arg1);
5356
5399
  }
Binary file
@@ -436,11 +436,13 @@ export const __wbg_stateclient_free: (a: number, b: number) => void;
436
436
  export const __wbg_platformclient_free: (a: number, b: number) => void;
437
437
  export const platformclient_state: (a: number) => number;
438
438
  export const authclient_send_access: (a: number) => number;
439
+ export const authclient_registration: (a: number) => number;
439
440
  export const vaultclient_ciphers: (a: number) => number;
440
441
  export const vaultclient_folders: (a: number) => number;
441
442
  export const vaultclient_totp: (a: number) => number;
442
443
  export const vaultclient_collections: (a: number) => number;
443
444
  export const vaultclient_cipher_risk: (a: number) => number;
445
+ export const __wbg_registrationclient_free: (a: number, b: number) => void;
444
446
  export const __wbg_foldersclient_free: (a: number, b: number) => void;
445
447
  export const __wbg_cipherriskclient_free: (a: number, b: number) => void;
446
448
  export const __wbg_ciphersclient_free: (a: number, b: number) => void;
@@ -451,24 +453,24 @@ export const __wbg_totpclient_free: (a: number, b: number) => void;
451
453
  export const __wbg_get_outgoingmessage_destination: (a: number) => number;
452
454
  export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;
453
455
  export const __wbg_cryptoclient_free: (a: number, b: number) => void;
454
- export const wasm_bindgen__convert__closures_____invoke__h35a8188fc7e541fe: (
456
+ export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
455
457
  a: number,
456
458
  b: number,
457
- c: number,
458
- d: number,
459
459
  ) => void;
460
- export const wasm_bindgen__closure__destroy__hba496874d56e8206: (a: number, b: number) => void;
460
+ export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
461
461
  export const wasm_bindgen__convert__closures_____invoke__h3f3903322ff045ff: (
462
462
  a: number,
463
463
  b: number,
464
464
  c: number,
465
465
  ) => void;
466
- export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
466
+ export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
467
+ export const wasm_bindgen__convert__closures_____invoke__h35a8188fc7e541fe: (
467
468
  a: number,
468
469
  b: number,
470
+ c: number,
471
+ d: number,
469
472
  ) => void;
470
- export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
471
- export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
473
+ export const wasm_bindgen__closure__destroy__hba496874d56e8206: (a: number, b: number) => void;
472
474
  export const wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f: (
473
475
  a: number,
474
476
  b: number,