@bitwarden/commercial-sdk-internal 0.2.0-main.461 → 0.2.0-main.462

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.
@@ -326,6 +326,50 @@ export type SendAccessTokenInvalidRequestError =
326
326
  | "email_and_otp_required_otp_sent"
327
327
  | "unknown";
328
328
 
329
+ /**
330
+ * Result of Key Connector registration process.
331
+ */
332
+ export interface KeyConnectorRegistrationResult {
333
+ /**
334
+ * The account cryptographic state of the user.
335
+ */
336
+ account_cryptographic_state: WrappedAccountCryptographicState;
337
+ /**
338
+ * The key connector key used for unlocking.
339
+ */
340
+ key_connector_key: B64;
341
+ /**
342
+ * The encrypted user key, wrapped with the key connector key.
343
+ */
344
+ key_connector_key_wrapped_user_key: EncString;
345
+ /**
346
+ * The decrypted user key. This can be used to get the consuming client to an unlocked state.
347
+ */
348
+ user_key: B64;
349
+ }
350
+
351
+ /**
352
+ * Result of JIT master password registration process.
353
+ */
354
+ export interface JitMasterPasswordRegistrationResponse {
355
+ /**
356
+ * The account cryptographic state of the user
357
+ */
358
+ account_cryptographic_state: WrappedAccountCryptographicState;
359
+ /**
360
+ * The master password unlock data
361
+ */
362
+ master_password_unlock: MasterPasswordUnlockData;
363
+ /**
364
+ * The master key
365
+ */
366
+ master_key: B64;
367
+ /**
368
+ * The decrypted user key.
369
+ */
370
+ user_key: B64;
371
+ }
372
+
329
373
  /**
330
374
  * Request parameters for TDE (Trusted Device Encryption) registration.
331
375
  */
@@ -361,39 +405,43 @@ export interface RegistrationError extends Error {
361
405
  export function isRegistrationError(error: any): error is RegistrationError;
362
406
 
363
407
  /**
364
- * Result of TDE registration process.
408
+ * Request parameters for SSO JIT master password registration.
365
409
  */
366
- export interface TdeRegistrationResponse {
410
+ export interface JitMasterPasswordRegistrationRequest {
367
411
  /**
368
- * The account cryptographic state of the user
412
+ * Organization SSO identifier
369
413
  */
370
- account_cryptographic_state: WrappedAccountCryptographicState;
414
+ organization_sso_identifier: string;
371
415
  /**
372
- * The device key
416
+ * User ID for the account being initialized
373
417
  */
374
- device_key: B64;
418
+ user_id: UserId;
375
419
  /**
376
- * The decrypted user key. This can be used to get the consuming client to an unlocked state.
420
+ * Salt for master password hashing, usually email
377
421
  */
378
- user_key: B64;
422
+ salt: string;
423
+ /**
424
+ * Master password for the account
425
+ */
426
+ master_password: string;
427
+ /**
428
+ * Optional hint for the master password
429
+ */
430
+ master_password_hint: string | undefined;
379
431
  }
380
432
 
381
433
  /**
382
- * Result of Key Connector registration process.
434
+ * Result of TDE registration process.
383
435
  */
384
- export interface KeyConnectorRegistrationResult {
436
+ export interface TdeRegistrationResponse {
385
437
  /**
386
- * The account cryptographic state of the user.
438
+ * The account cryptographic state of the user
387
439
  */
388
440
  account_cryptographic_state: WrappedAccountCryptographicState;
389
441
  /**
390
- * The key connector key used for unlocking.
391
- */
392
- key_connector_key: B64;
393
- /**
394
- * The encrypted user key, wrapped with the key connector key.
442
+ * The device key
395
443
  */
396
- key_connector_key_wrapped_user_key: EncString;
444
+ device_key: B64;
397
445
  /**
398
446
  * The decrypted user key. This can be used to get the consuming client to an unlocked state.
399
447
  */
@@ -614,7 +662,11 @@ export interface InitUserCryptoRequest {
614
662
 
615
663
  export interface MakeKeysError extends Error {
616
664
  name: "MakeKeysError";
617
- variant: "AccountCryptographyInitialization" | "RequestModelCreation" | "Crypto";
665
+ variant:
666
+ | "AccountCryptographyInitialization"
667
+ | "MasterPasswordDerivation"
668
+ | "RequestModelCreation"
669
+ | "Crypto";
618
670
  }
619
671
 
620
672
  export function isMakeKeysError(error: any): error is MakeKeysError;
@@ -2808,6 +2860,13 @@ export class RegistrationClient {
2808
2860
  * admin password reset and finally enrolls the user to TDE unlock.
2809
2861
  */
2810
2862
  post_keys_for_tde_registration(request: TdeRegistrationRequest): Promise<TdeRegistrationResponse>;
2863
+ /**
2864
+ * Initializes a new cryptographic state for a user and posts it to the server;
2865
+ * enrolls the user to master password unlock.
2866
+ */
2867
+ post_keys_for_jit_password_registration(
2868
+ request: JitMasterPasswordRegistrationRequest,
2869
+ ): Promise<JitMasterPasswordRegistrationResponse>;
2811
2870
  /**
2812
2871
  * Initializes a new cryptographic state for a user and posts it to the server; enrolls the
2813
2872
  * user to key connector unlock.
@@ -1,4 +1,4 @@
1
1
  import * as wasm from "./bitwarden_wasm_internal_bg.wasm";
2
2
  export * from "./bitwarden_wasm_internal_bg.js";
3
3
  import { __wbg_set_wasm } from "./bitwarden_wasm_internal_bg.js";
4
- __wbg_set_wasm(wasm);
4
+ __wbg_set_wasm(wasm);