@bitwarden/sdk-internal 0.2.0-main.444 → 0.2.0-main.446

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.
@@ -180,9 +180,8 @@ export interface TokenProvider {
180
180
  get_access_token(): Promise<string | undefined>;
181
181
  }
182
182
 
183
- export interface Repositories {
184
- cipher: Repository<Cipher> | null;
185
- folder: Repository<Folder> | null;
183
+ export interface IndexedDbConfiguration {
184
+ db_name: string;
186
185
  }
187
186
 
188
187
  /**
@@ -190,8 +189,9 @@ export interface Repositories {
190
189
  */
191
190
  export interface FeatureFlags extends Map<string, boolean> {}
192
191
 
193
- export interface IndexedDbConfiguration {
194
- db_name: string;
192
+ export interface Repositories {
193
+ cipher: Repository<Cipher> | null;
194
+ folder: Repository<Folder> | null;
195
195
  }
196
196
 
197
197
  /**
@@ -206,27 +206,27 @@ export interface SendEmailCredentials {
206
206
  }
207
207
 
208
208
  /**
209
- * The credentials used for send access requests.
210
- */
211
- export type SendAccessCredentials =
212
- | SendPasswordCredentials
213
- | SendEmailOtpCredentials
214
- | SendEmailCredentials;
215
-
216
- /**
217
- * A request structure for requesting a send access token from the API.
209
+ * Credentials for getting a send access token using an email and OTP.
218
210
  */
219
- export interface SendAccessTokenRequest {
211
+ export interface SendEmailOtpCredentials {
220
212
  /**
221
- * The id of the send for which the access token is requested.
213
+ * The email address to which the OTP will be sent.
222
214
  */
223
- sendId: string;
215
+ email: string;
224
216
  /**
225
- * The optional send access credentials.
217
+ * The one-time password (OTP) that the user has received via email.
226
218
  */
227
- sendAccessCredentials?: SendAccessCredentials;
219
+ otp: string;
228
220
  }
229
221
 
222
+ /**
223
+ * The credentials used for send access requests.
224
+ */
225
+ export type SendAccessCredentials =
226
+ | SendPasswordCredentials
227
+ | SendEmailOtpCredentials
228
+ | SendEmailCredentials;
229
+
230
230
  /**
231
231
  * Credentials for sending password secured access requests.
232
232
  * Clone auto implements the standard lib\'s Clone trait, allowing us to create copies of this
@@ -240,29 +240,19 @@ export interface SendPasswordCredentials {
240
240
  }
241
241
 
242
242
  /**
243
- * Credentials for getting a send access token using an email and OTP.
243
+ * A request structure for requesting a send access token from the API.
244
244
  */
245
- export interface SendEmailOtpCredentials {
245
+ export interface SendAccessTokenRequest {
246
246
  /**
247
- * The email address to which the OTP will be sent.
247
+ * The id of the send for which the access token is requested.
248
248
  */
249
- email: string;
249
+ sendId: string;
250
250
  /**
251
- * The one-time password (OTP) that the user has received via email.
251
+ * The optional send access credentials.
252
252
  */
253
- otp: string;
253
+ sendAccessCredentials?: SendAccessCredentials;
254
254
  }
255
255
 
256
- /**
257
- * Any unexpected error that occurs when making requests to identity. This could be
258
- * local/transport/decoding failure from the HTTP client (DNS/TLS/connect/read timeout,
259
- * connection reset, or JSON decode failure on a success response) or non-2xx response with an
260
- * unexpected body or status. Used when decoding the server\'s error payload into
261
- * `SendAccessTokenApiErrorResponse` fails, or for 5xx responses where no structured error is
262
- * available.
263
- */
264
- export type UnexpectedIdentityError = string;
265
-
266
256
  /**
267
257
  * A send access token which can be used to access a send.
268
258
  */
@@ -286,14 +276,14 @@ export type SendAccessTokenError =
286
276
  | { kind: "expected"; data: SendAccessTokenApiErrorResponse };
287
277
 
288
278
  /**
289
- * Invalid request errors - typically due to missing parameters.
279
+ * Any unexpected error that occurs when making requests to identity. This could be
280
+ * local/transport/decoding failure from the HTTP client (DNS/TLS/connect/read timeout,
281
+ * connection reset, or JSON decode failure on a success response) or non-2xx response with an
282
+ * unexpected body or status. Used when decoding the server\'s error payload into
283
+ * `SendAccessTokenApiErrorResponse` fails, or for 5xx responses where no structured error is
284
+ * available.
290
285
  */
291
- export type SendAccessTokenInvalidRequestError =
292
- | "send_id_required"
293
- | "password_hash_b64_required"
294
- | "email_required"
295
- | "email_and_otp_required_otp_sent"
296
- | "unknown";
286
+ export type UnexpectedIdentityError = string;
297
287
 
298
288
  /**
299
289
  * Invalid grant errors - typically due to invalid credentials.
@@ -306,6 +296,16 @@ export type SendAccessTokenInvalidGrantError =
306
296
  | "otp_generation_failed"
307
297
  | "unknown";
308
298
 
299
+ /**
300
+ * Invalid request errors - typically due to missing parameters.
301
+ */
302
+ export type SendAccessTokenInvalidRequestError =
303
+ | "send_id_required"
304
+ | "password_hash_b64_required"
305
+ | "email_required"
306
+ | "email_and_otp_required_otp_sent"
307
+ | "unknown";
308
+
309
309
  /**
310
310
  * Represents the possible, expected errors that can occur when requesting a send access token.
311
311
  */
@@ -326,6 +326,31 @@ export type SendAccessTokenApiErrorResponse =
326
326
  | { error: "invalid_scope"; error_description?: string }
327
327
  | { error: "invalid_target"; error_description?: string };
328
328
 
329
+ /**
330
+ * Result of TDE registration process.
331
+ */
332
+ export interface TdeRegistrationResponse {
333
+ /**
334
+ * The account cryptographic state of the user
335
+ */
336
+ account_cryptographic_state: WrappedAccountCryptographicState;
337
+ /**
338
+ * The device key
339
+ */
340
+ device_key: B64;
341
+ /**
342
+ * The decrypted user key. This can be used to get the consuming client to an unlocked state.
343
+ */
344
+ user_key: B64;
345
+ }
346
+
347
+ export interface RegistrationError extends Error {
348
+ name: "RegistrationError";
349
+ variant: "Api" | "Crypto";
350
+ }
351
+
352
+ export function isRegistrationError(error: any): error is RegistrationError;
353
+
329
354
  /**
330
355
  * Request parameters for TDE (Trusted Device Encryption) registration.
331
356
  */
@@ -353,61 +378,36 @@ export interface TdeRegistrationRequest {
353
378
  trust_device: boolean;
354
379
  }
355
380
 
356
- export interface RegistrationError extends Error {
357
- name: "RegistrationError";
358
- variant: "Api" | "Crypto";
359
- }
360
-
361
- export function isRegistrationError(error: any): error is RegistrationError;
362
-
363
381
  /**
364
- * Result of TDE registration process.
382
+ * NewType wrapper for `CollectionId`
365
383
  */
366
- export interface TdeRegistrationResponse {
367
- /**
368
- * The account cryptographic state of the user
369
- */
370
- account_cryptographic_state: WrappedAccountCryptographicState;
371
- /**
372
- * The device key
373
- */
374
- device_key: B64;
375
- /**
376
- * The decrypted user key. This can be used to get the consuming client to an unlocked state.
377
- */
378
- user_key: B64;
379
- }
384
+ export type CollectionId = Tagged<Uuid, "CollectionId">;
380
385
 
381
386
  /**
382
- * NewType wrapper for `CollectionId`
387
+ * Type of collection
383
388
  */
384
- export type CollectionId = Tagged<Uuid, "CollectionId">;
389
+ export type CollectionType = "SharedCollection" | "DefaultUserCollection";
385
390
 
386
- export interface Collection {
391
+ export interface CollectionView {
387
392
  id: CollectionId | undefined;
388
393
  organizationId: OrganizationId;
389
- name: EncString;
394
+ name: string;
390
395
  externalId: string | undefined;
391
396
  hidePasswords: boolean;
392
397
  readOnly: boolean;
393
398
  manage: boolean;
394
- defaultUserCollectionEmail: string | undefined;
395
399
  type: CollectionType;
396
400
  }
397
401
 
398
- /**
399
- * Type of collection
400
- */
401
- export type CollectionType = "SharedCollection" | "DefaultUserCollection";
402
-
403
- export interface CollectionView {
402
+ export interface Collection {
404
403
  id: CollectionId | undefined;
405
404
  organizationId: OrganizationId;
406
- name: string;
405
+ name: EncString;
407
406
  externalId: string | undefined;
408
407
  hidePasswords: boolean;
409
408
  readOnly: boolean;
410
409
  manage: boolean;
410
+ defaultUserCollectionEmail: string | undefined;
411
411
  type: CollectionType;
412
412
  }
413
413
 
@@ -432,6 +432,15 @@ export interface MasterPasswordError extends Error {
432
432
 
433
433
  export function isMasterPasswordError(error: any): error is MasterPasswordError;
434
434
 
435
+ /**
436
+ * Represents the data required to authenticate with the master password.
437
+ */
438
+ export interface MasterPasswordAuthenticationData {
439
+ kdf: Kdf;
440
+ salt: string;
441
+ masterPasswordAuthenticationHash: B64;
442
+ }
443
+
435
444
  /**
436
445
  * Represents the data required to unlock with the master password.
437
446
  */
@@ -450,15 +459,6 @@ export interface MasterPasswordUnlockData {
450
459
  salt: string;
451
460
  }
452
461
 
453
- /**
454
- * Represents the data required to authenticate with the master password.
455
- */
456
- export interface MasterPasswordAuthenticationData {
457
- kdf: Kdf;
458
- salt: string;
459
- masterPasswordAuthenticationHash: B64;
460
- }
461
-
462
462
  /**
463
463
  * Any keys / cryptographic protection \"downstream\" from the account symmetric key (user key).
464
464
  * Private keys are protected by the user key.
@@ -490,43 +490,97 @@ export function isAccountCryptographyInitializationError(
490
490
  ): error is AccountCryptographyInitializationError;
491
491
 
492
492
  /**
493
- * Request for deriving a pin protected user key
493
+ * Response for the `make_keys_for_user_crypto_v2`, containing a set of keys for a user
494
494
  */
495
- export interface DerivePinKeyResponse {
495
+ export interface UserCryptoV2KeysResponse {
496
496
  /**
497
- * [UserKey] protected by PIN
497
+ * User key
498
498
  */
499
- pinProtectedUserKey: EncString;
499
+ userKey: B64;
500
500
  /**
501
- * PIN protected by [UserKey]
501
+ * Wrapped private key
502
502
  */
503
- encryptedPin: EncString;
503
+ privateKey: EncString;
504
+ /**
505
+ * Public key
506
+ */
507
+ publicKey: B64;
508
+ /**
509
+ * The user\'s public key, signed by the signing key
510
+ */
511
+ signedPublicKey: SignedPublicKey;
512
+ /**
513
+ * Signing key, encrypted with the user\'s symmetric key
514
+ */
515
+ signingKey: EncString;
516
+ /**
517
+ * Base64 encoded verifying key
518
+ */
519
+ verifyingKey: B64;
520
+ /**
521
+ * The user\'s signed security state
522
+ */
523
+ securityState: SignedSecurityState;
524
+ /**
525
+ * The security state\'s version
526
+ */
527
+ securityVersion: number;
504
528
  }
505
529
 
506
530
  /**
507
- * Response from the `make_update_password` function
531
+ * Response from the `update_kdf` function
508
532
  */
509
- export interface UpdatePasswordResponse {
533
+ export interface UpdateKdfResponse {
510
534
  /**
511
- * Hash of the new password
535
+ * The authentication data for the new KDF setting
512
536
  */
513
- passwordHash: B64;
537
+ masterPasswordAuthenticationData: MasterPasswordAuthenticationData;
514
538
  /**
515
- * User key, encrypted with the new password
539
+ * The unlock data for the new KDF setting
516
540
  */
517
- newKey: EncString;
541
+ masterPasswordUnlockData: MasterPasswordUnlockData;
542
+ /**
543
+ * The authentication data for the KDF setting prior to the change
544
+ */
545
+ oldMasterPasswordAuthenticationData: MasterPasswordAuthenticationData;
518
546
  }
519
547
 
520
548
  /**
521
- * Represents the request to initialize the user\'s organizational cryptographic state.
549
+ * Request for migrating an account from password to key connector.
522
550
  */
523
- export interface InitOrgCryptoRequest {
551
+ export interface DeriveKeyConnectorRequest {
524
552
  /**
525
- * The encryption keys for all the organizations the user is a part of
553
+ * Encrypted user key, used to validate the master key
526
554
  */
527
- organizationKeys: Map<OrganizationId, UnsignedSharedKey>;
555
+ userKeyEncrypted: EncString;
556
+ /**
557
+ * The user\'s master password
558
+ */
559
+ password: string;
560
+ /**
561
+ * The KDF parameters used to derive the master key
562
+ */
563
+ kdf: Kdf;
564
+ /**
565
+ * The user\'s email address
566
+ */
567
+ email: string;
528
568
  }
529
569
 
570
+ /**
571
+ * Auth requests supports multiple initialization methods.
572
+ */
573
+ export type AuthRequestMethod =
574
+ | { userKey: { protected_user_key: UnsignedSharedKey } }
575
+ | { masterKey: { protected_master_key: UnsignedSharedKey; auth_request_key: EncString } };
576
+
577
+ export interface DeriveKeyConnectorError extends Error {
578
+ name: "DeriveKeyConnectorError";
579
+ variant: "WrongPassword" | "Crypto";
580
+ }
581
+
582
+ export function isDeriveKeyConnectorError(error: any): error is DeriveKeyConnectorError;
583
+
530
584
  export interface MakeKeysError extends Error {
531
585
  name: "MakeKeysError";
532
586
  variant: "AccountCryptographyInitialization" | "RequestModelCreation" | "Crypto";
@@ -535,17 +589,17 @@ export interface MakeKeysError extends Error {
535
589
  export function isMakeKeysError(error: any): error is MakeKeysError;
536
590
 
537
591
  /**
538
- * Response from the `make_key_pair` function
592
+ * Request for deriving a pin protected user key
539
593
  */
540
- export interface MakeKeyPairResponse {
594
+ export interface EnrollPinResponse {
541
595
  /**
542
- * The user\'s public key
596
+ * [UserKey] protected by PIN
543
597
  */
544
- userPublicKey: B64;
598
+ pinProtectedUserKeyEnvelope: PasswordProtectedKeyEnvelope;
545
599
  /**
546
- * User\'s private key, encrypted with the user key
600
+ * PIN protected by [UserKey]
547
601
  */
548
- userKeyEncryptedPrivateKey: EncString;
602
+ userKeyEncryptedPin: EncString;
549
603
  }
550
604
 
551
605
  /**
@@ -570,76 +624,17 @@ export type InitUserCryptoMethod =
570
624
  /**
571
625
  * Request for deriving a pin protected user key
572
626
  */
573
- export interface EnrollPinResponse {
627
+ export interface DerivePinKeyResponse {
574
628
  /**
575
629
  * [UserKey] protected by PIN
576
630
  */
577
- pinProtectedUserKeyEnvelope: PasswordProtectedKeyEnvelope;
631
+ pinProtectedUserKey: EncString;
578
632
  /**
579
633
  * PIN protected by [UserKey]
580
634
  */
581
- userKeyEncryptedPin: EncString;
582
- }
583
-
584
- /**
585
- * Auth requests supports multiple initialization methods.
586
- */
587
- export type AuthRequestMethod =
588
- | { userKey: { protected_user_key: UnsignedSharedKey } }
589
- | { masterKey: { protected_master_key: UnsignedSharedKey; auth_request_key: EncString } };
590
-
591
- export interface EnrollAdminPasswordResetError extends Error {
592
- name: "EnrollAdminPasswordResetError";
593
- variant: "Crypto";
594
- }
595
-
596
- export function isEnrollAdminPasswordResetError(error: any): error is EnrollAdminPasswordResetError;
597
-
598
- /**
599
- * Response for the `make_keys_for_user_crypto_v2`, containing a set of keys for a user
600
- */
601
- export interface UserCryptoV2KeysResponse {
602
- /**
603
- * User key
604
- */
605
- userKey: B64;
606
- /**
607
- * Wrapped private key
608
- */
609
- privateKey: EncString;
610
- /**
611
- * Public key
612
- */
613
- publicKey: B64;
614
- /**
615
- * The user\'s public key, signed by the signing key
616
- */
617
- signedPublicKey: SignedPublicKey;
618
- /**
619
- * Signing key, encrypted with the user\'s symmetric key
620
- */
621
- signingKey: EncString;
622
- /**
623
- * Base64 encoded verifying key
624
- */
625
- verifyingKey: B64;
626
- /**
627
- * The user\'s signed security state
628
- */
629
- securityState: SignedSecurityState;
630
- /**
631
- * The security state\'s version
632
- */
633
- securityVersion: number;
634
- }
635
-
636
- export interface CryptoClientError extends Error {
637
- name: "CryptoClientError";
638
- variant: "NotAuthenticated" | "Crypto" | "InvalidKdfSettings" | "PasswordProtectedKeyEnvelope";
635
+ encryptedPin: EncString;
639
636
  }
640
637
 
641
- export function isCryptoClientError(error: any): error is CryptoClientError;
642
-
643
638
  /**
644
639
  * Response for `verify_asymmetric_keys`.
645
640
  */
@@ -654,53 +649,6 @@ export interface VerifyAsymmetricKeysResponse {
654
649
  validPrivateKey: boolean;
655
650
  }
656
651
 
657
- /**
658
- * Response from the `update_kdf` function
659
- */
660
- export interface UpdateKdfResponse {
661
- /**
662
- * The authentication data for the new KDF setting
663
- */
664
- masterPasswordAuthenticationData: MasterPasswordAuthenticationData;
665
- /**
666
- * The unlock data for the new KDF setting
667
- */
668
- masterPasswordUnlockData: MasterPasswordUnlockData;
669
- /**
670
- * The authentication data for the KDF setting prior to the change
671
- */
672
- oldMasterPasswordAuthenticationData: MasterPasswordAuthenticationData;
673
- }
674
-
675
- export interface DeriveKeyConnectorError extends Error {
676
- name: "DeriveKeyConnectorError";
677
- variant: "WrongPassword" | "Crypto";
678
- }
679
-
680
- export function isDeriveKeyConnectorError(error: any): error is DeriveKeyConnectorError;
681
-
682
- /**
683
- * Request for migrating an account from password to key connector.
684
- */
685
- export interface DeriveKeyConnectorRequest {
686
- /**
687
- * Encrypted user key, used to validate the master key
688
- */
689
- userKeyEncrypted: EncString;
690
- /**
691
- * The user\'s master password
692
- */
693
- password: string;
694
- /**
695
- * The KDF parameters used to derive the master key
696
- */
697
- kdf: Kdf;
698
- /**
699
- * The user\'s email address
700
- */
701
- email: string;
702
- }
703
-
704
652
  /**
705
653
  * Request for `verify_asymmetric_keys`.
706
654
  */
@@ -719,6 +667,13 @@ export interface VerifyAsymmetricKeysRequest {
719
667
  userKeyEncryptedPrivateKey: EncString;
720
668
  }
721
669
 
670
+ export interface EnrollAdminPasswordResetError extends Error {
671
+ name: "EnrollAdminPasswordResetError";
672
+ variant: "Crypto";
673
+ }
674
+
675
+ export function isEnrollAdminPasswordResetError(error: any): error is EnrollAdminPasswordResetError;
676
+
722
677
  /**
723
678
  * State used for initializing the user cryptographic state.
724
679
  */
@@ -747,15 +702,60 @@ export interface InitUserCryptoRequest {
747
702
  }
748
703
 
749
704
  /**
750
- * NewType wrapper for `UserId`
705
+ * Represents the request to initialize the user\'s organizational cryptographic state.
751
706
  */
752
- export type UserId = Tagged<Uuid, "UserId">;
707
+ export interface InitOrgCryptoRequest {
708
+ /**
709
+ * The encryption keys for all the organizations the user is a part of
710
+ */
711
+ organizationKeys: Map<OrganizationId, UnsignedSharedKey>;
712
+ }
713
+
714
+ /**
715
+ * Response from the `make_update_password` function
716
+ */
717
+ export interface UpdatePasswordResponse {
718
+ /**
719
+ * Hash of the new password
720
+ */
721
+ passwordHash: B64;
722
+ /**
723
+ * User key, encrypted with the new password
724
+ */
725
+ newKey: EncString;
726
+ }
727
+
728
+ /**
729
+ * Response from the `make_key_pair` function
730
+ */
731
+ export interface MakeKeyPairResponse {
732
+ /**
733
+ * The user\'s public key
734
+ */
735
+ userPublicKey: B64;
736
+ /**
737
+ * User\'s private key, encrypted with the user key
738
+ */
739
+ userKeyEncryptedPrivateKey: EncString;
740
+ }
741
+
742
+ export interface CryptoClientError extends Error {
743
+ name: "CryptoClientError";
744
+ variant: "NotAuthenticated" | "Crypto" | "InvalidKdfSettings" | "PasswordProtectedKeyEnvelope";
745
+ }
746
+
747
+ export function isCryptoClientError(error: any): error is CryptoClientError;
753
748
 
754
749
  /**
755
750
  * NewType wrapper for `OrganizationId`
756
751
  */
757
752
  export type OrganizationId = Tagged<Uuid, "OrganizationId">;
758
753
 
754
+ /**
755
+ * NewType wrapper for `UserId`
756
+ */
757
+ export type UserId = Tagged<Uuid, "UserId">;
758
+
759
759
  export interface StatefulCryptoError extends Error {
760
760
  name: "StatefulCryptoError";
761
761
  variant: "MissingSecurityState" | "WrongAccountCryptoVersion" | "Crypto";
@@ -763,6 +763,35 @@ export interface StatefulCryptoError extends Error {
763
763
 
764
764
  export function isStatefulCryptoError(error: any): error is StatefulCryptoError;
765
765
 
766
+ export type DeviceType =
767
+ | "Android"
768
+ | "iOS"
769
+ | "ChromeExtension"
770
+ | "FirefoxExtension"
771
+ | "OperaExtension"
772
+ | "EdgeExtension"
773
+ | "WindowsDesktop"
774
+ | "MacOsDesktop"
775
+ | "LinuxDesktop"
776
+ | "ChromeBrowser"
777
+ | "FirefoxBrowser"
778
+ | "OperaBrowser"
779
+ | "EdgeBrowser"
780
+ | "IEBrowser"
781
+ | "UnknownBrowser"
782
+ | "AndroidAmazon"
783
+ | "UWP"
784
+ | "SafariBrowser"
785
+ | "VivaldiBrowser"
786
+ | "VivaldiExtension"
787
+ | "SafariExtension"
788
+ | "SDK"
789
+ | "Server"
790
+ | "WindowsCLI"
791
+ | "MacOsCLI"
792
+ | "LinuxCLI"
793
+ | "DuckDuckGoBrowser";
794
+
766
795
  /**
767
796
  * Basic client behavior settings. These settings specify the various targets and behavior of the
768
797
  * Bitwarden Client. They are optional and uneditable once the client is initialized.
@@ -815,35 +844,6 @@ export interface ClientSettings {
815
844
  bitwardenPackageType?: string | undefined;
816
845
  }
817
846
 
818
- export type DeviceType =
819
- | "Android"
820
- | "iOS"
821
- | "ChromeExtension"
822
- | "FirefoxExtension"
823
- | "OperaExtension"
824
- | "EdgeExtension"
825
- | "WindowsDesktop"
826
- | "MacOsDesktop"
827
- | "LinuxDesktop"
828
- | "ChromeBrowser"
829
- | "FirefoxBrowser"
830
- | "OperaBrowser"
831
- | "EdgeBrowser"
832
- | "IEBrowser"
833
- | "UnknownBrowser"
834
- | "AndroidAmazon"
835
- | "UWP"
836
- | "SafariBrowser"
837
- | "VivaldiBrowser"
838
- | "VivaldiExtension"
839
- | "SafariExtension"
840
- | "SDK"
841
- | "Server"
842
- | "WindowsCLI"
843
- | "MacOsCLI"
844
- | "LinuxCLI"
845
- | "DuckDuckGoBrowser";
846
-
847
847
  export interface EncryptionSettingsError extends Error {
848
848
  name: "EncryptionSettingsError";
849
849
  variant:
@@ -1079,14 +1079,6 @@ export interface PasswordError extends Error {
1079
1079
 
1080
1080
  export function isPasswordError(error: any): error is PasswordError;
1081
1081
 
1082
- export type UsernameGeneratorRequest =
1083
- | { word: { capitalize: boolean; include_number: boolean } }
1084
- | { subaddress: { type: AppendType; email: string } }
1085
- | { catchall: { type: AppendType; domain: string } }
1086
- | { forwarded: { service: ForwarderServiceType; website: string | undefined } };
1087
-
1088
- export type AppendType = "random" | { websiteName: { website: string } };
1089
-
1090
1082
  export interface UsernameError extends Error {
1091
1083
  name: "UsernameError";
1092
1084
  variant: "InvalidApiKey" | "Unknown" | "ResponseContent" | "Reqwest";
@@ -1094,6 +1086,8 @@ export interface UsernameError extends Error {
1094
1086
 
1095
1087
  export function isUsernameError(error: any): error is UsernameError;
1096
1088
 
1089
+ export type AppendType = "random" | { websiteName: { website: string } };
1090
+
1097
1091
  /**
1098
1092
  * Configures the email forwarding service to use.
1099
1093
  * For instructions on how to configure each service, see the documentation:
@@ -1107,6 +1101,12 @@ export type ForwarderServiceType =
1107
1101
  | { forwardEmail: { api_token: string; domain: string } }
1108
1102
  | { simpleLogin: { api_key: string; base_url: string } };
1109
1103
 
1104
+ export type UsernameGeneratorRequest =
1105
+ | { word: { capitalize: boolean; include_number: boolean } }
1106
+ | { subaddress: { type: AppendType; email: string } }
1107
+ | { catchall: { type: AppendType; domain: string } }
1108
+ | { forwarded: { service: ForwarderServiceType; website: string | undefined } };
1109
+
1110
1110
  export interface ReceiveError extends Error {
1111
1111
  name: "ReceiveError";
1112
1112
  variant: "Channel" | "Timeout" | "Cancelled";
@@ -1168,13 +1168,6 @@ export type Endpoint =
1168
1168
  | "DesktopRenderer"
1169
1169
  | "DesktopMain";
1170
1170
 
1171
- export interface SshKeyImportError extends Error {
1172
- name: "SshKeyImportError";
1173
- variant: "Parsing" | "PasswordRequired" | "WrongPassword" | "UnsupportedKeyType";
1174
- }
1175
-
1176
- export function isSshKeyImportError(error: any): error is SshKeyImportError;
1177
-
1178
1171
  export interface KeyGenerationError extends Error {
1179
1172
  name: "KeyGenerationError";
1180
1173
  variant: "KeyGeneration" | "KeyConversion";
@@ -1182,6 +1175,13 @@ export interface KeyGenerationError extends Error {
1182
1175
 
1183
1176
  export function isKeyGenerationError(error: any): error is KeyGenerationError;
1184
1177
 
1178
+ export interface SshKeyImportError extends Error {
1179
+ name: "SshKeyImportError";
1180
+ variant: "Parsing" | "PasswordRequired" | "WrongPassword" | "UnsupportedKeyType";
1181
+ }
1182
+
1183
+ export function isSshKeyImportError(error: any): error is SshKeyImportError;
1184
+
1185
1185
  export interface SshKeyExportError extends Error {
1186
1186
  name: "SshKeyExportError";
1187
1187
  variant: "KeyConversion";
@@ -1218,35 +1218,6 @@ export interface CipherRiskError extends Error {
1218
1218
 
1219
1219
  export function isCipherRiskError(error: any): error is CipherRiskError;
1220
1220
 
1221
- /**
1222
- * Options for configuring risk computation.
1223
- */
1224
- export interface CipherRiskOptions {
1225
- /**
1226
- * Pre-computed password reuse map (password → count).
1227
- * If provided, enables reuse detection across ciphers.
1228
- */
1229
- passwordMap?: PasswordReuseMap | undefined;
1230
- /**
1231
- * Whether to check passwords against Have I Been Pwned API.
1232
- * When true, makes network requests to check for exposed passwords.
1233
- */
1234
- checkExposed?: boolean;
1235
- /**
1236
- * Optional HIBP API base URL override. When None, uses the production HIBP URL.
1237
- * Can be used for testing or alternative password breach checking services.
1238
- */
1239
- hibpBaseUrl?: string | undefined;
1240
- }
1241
-
1242
- /**
1243
- * Result of checking password exposure via HIBP API.
1244
- */
1245
- export type ExposedPasswordResult =
1246
- | { type: "NotChecked" }
1247
- | { type: "Found"; value: number }
1248
- | { type: "Error"; value: string };
1249
-
1250
1221
  /**
1251
1222
  * Risk evaluation result for a single cipher.
1252
1223
  */
@@ -1297,6 +1268,35 @@ export interface CipherLoginDetails {
1297
1268
  */
1298
1269
  export type PasswordReuseMap = Record<string, number>;
1299
1270
 
1271
+ /**
1272
+ * Options for configuring risk computation.
1273
+ */
1274
+ export interface CipherRiskOptions {
1275
+ /**
1276
+ * Pre-computed password reuse map (password → count).
1277
+ * If provided, enables reuse detection across ciphers.
1278
+ */
1279
+ passwordMap?: PasswordReuseMap | undefined;
1280
+ /**
1281
+ * Whether to check passwords against Have I Been Pwned API.
1282
+ * When true, makes network requests to check for exposed passwords.
1283
+ */
1284
+ checkExposed?: boolean;
1285
+ /**
1286
+ * Optional HIBP API base URL override. When None, uses the production HIBP URL.
1287
+ * Can be used for testing or alternative password breach checking services.
1288
+ */
1289
+ hibpBaseUrl?: string | undefined;
1290
+ }
1291
+
1292
+ /**
1293
+ * Result of checking password exposure via HIBP API.
1294
+ */
1295
+ export type ExposedPasswordResult =
1296
+ | { type: "NotChecked" }
1297
+ | { type: "Found"; value: number }
1298
+ | { type: "Error"; value: string };
1299
+
1300
1300
  export interface PasswordHistory {
1301
1301
  password: EncString;
1302
1302
  lastUsedDate: DateTime<Utc>;
@@ -1329,6 +1329,13 @@ export interface TotpResponse {
1329
1329
  period: number;
1330
1330
  }
1331
1331
 
1332
+ export interface DecryptError extends Error {
1333
+ name: "DecryptError";
1334
+ variant: "Crypto";
1335
+ }
1336
+
1337
+ export function isDecryptError(error: any): error is DecryptError;
1338
+
1332
1339
  export interface EncryptError extends Error {
1333
1340
  name: "EncryptError";
1334
1341
  variant: "Crypto" | "MissingUserId";
@@ -1336,13 +1343,18 @@ export interface EncryptError extends Error {
1336
1343
 
1337
1344
  export function isEncryptError(error: any): error is EncryptError;
1338
1345
 
1339
- export interface DecryptError extends Error {
1340
- name: "DecryptError";
1341
- variant: "Crypto";
1346
+ export interface Attachment {
1347
+ id: string | undefined;
1348
+ url: string | undefined;
1349
+ size: string | undefined;
1350
+ /**
1351
+ * Readable size, ex: \"4.2 KB\" or \"1.43 GB\
1352
+ */
1353
+ sizeName: string | undefined;
1354
+ fileName: EncString | undefined;
1355
+ key: EncString | undefined;
1342
1356
  }
1343
1357
 
1344
- export function isDecryptError(error: any): error is DecryptError;
1345
-
1346
1358
  export interface AttachmentView {
1347
1359
  id: string | undefined;
1348
1360
  url: string | undefined;
@@ -1365,18 +1377,6 @@ export interface AttachmentView {
1365
1377
  decryptedKey: string | undefined;
1366
1378
  }
1367
1379
 
1368
- export interface Attachment {
1369
- id: string | undefined;
1370
- url: string | undefined;
1371
- size: string | undefined;
1372
- /**
1373
- * Readable size, ex: \"4.2 KB\" or \"1.43 GB\
1374
- */
1375
- sizeName: string | undefined;
1376
- fileName: EncString | undefined;
1377
- key: EncString | undefined;
1378
- }
1379
-
1380
1380
  export interface LocalDataView {
1381
1381
  lastUsedDate: DateTime<Utc> | undefined;
1382
1382
  lastLaunched: DateTime<Utc> | undefined;
@@ -1402,21 +1402,6 @@ export interface GetCipherError extends Error {
1402
1402
 
1403
1403
  export function isGetCipherError(error: any): error is GetCipherError;
1404
1404
 
1405
- export interface EditCipherError extends Error {
1406
- name: "EditCipherError";
1407
- variant:
1408
- | "ItemNotFound"
1409
- | "Crypto"
1410
- | "Api"
1411
- | "VaultParse"
1412
- | "MissingField"
1413
- | "NotAuthenticated"
1414
- | "Repository"
1415
- | "Uuid";
1416
- }
1417
-
1418
- export function isEditCipherError(error: any): error is EditCipherError;
1419
-
1420
1405
  /**
1421
1406
  * Request to edit a cipher.
1422
1407
  */
@@ -1436,12 +1421,20 @@ export interface CipherEditRequest {
1436
1421
  key: EncString | undefined;
1437
1422
  }
1438
1423
 
1439
- export interface CreateCipherError extends Error {
1440
- name: "CreateCipherError";
1441
- variant: "Crypto" | "Api" | "VaultParse" | "MissingField" | "NotAuthenticated" | "Repository";
1424
+ export interface EditCipherError extends Error {
1425
+ name: "EditCipherError";
1426
+ variant:
1427
+ | "ItemNotFound"
1428
+ | "Crypto"
1429
+ | "Api"
1430
+ | "VaultParse"
1431
+ | "MissingField"
1432
+ | "NotAuthenticated"
1433
+ | "Repository"
1434
+ | "Uuid";
1442
1435
  }
1443
1436
 
1444
- export function isCreateCipherError(error: any): error is CreateCipherError;
1437
+ export function isEditCipherError(error: any): error is EditCipherError;
1445
1438
 
1446
1439
  /**
1447
1440
  * Request to add a cipher.
@@ -1457,6 +1450,13 @@ export interface CipherCreateRequest {
1457
1450
  fields: FieldView[];
1458
1451
  }
1459
1452
 
1453
+ export interface CreateCipherError extends Error {
1454
+ name: "CreateCipherError";
1455
+ variant: "Crypto" | "Api" | "VaultParse" | "MissingField" | "NotAuthenticated" | "Repository";
1456
+ }
1457
+
1458
+ export function isCreateCipherError(error: any): error is CreateCipherError;
1459
+
1460
1460
  /**
1461
1461
  * Represents the inner data of a cipher view.
1462
1462
  */
@@ -1514,104 +1514,42 @@ export interface CardListView {
1514
1514
  brand: string | undefined;
1515
1515
  }
1516
1516
 
1517
- export interface Field {
1518
- name: EncString | undefined;
1519
- value: EncString | undefined;
1520
- type: FieldType;
1521
- linkedId: LinkedIdType | undefined;
1522
- }
1523
-
1524
- export interface FieldView {
1525
- name: string | undefined;
1526
- value: string | undefined;
1527
- type: FieldType;
1528
- linkedId: LinkedIdType | undefined;
1529
- }
1530
-
1531
- export interface Fido2Credential {
1532
- credentialId: EncString;
1533
- keyType: EncString;
1534
- keyAlgorithm: EncString;
1535
- keyCurve: EncString;
1536
- keyValue: EncString;
1537
- rpId: EncString;
1538
- userHandle: EncString | undefined;
1539
- userName: EncString | undefined;
1540
- counter: EncString;
1541
- rpName: EncString | undefined;
1542
- userDisplayName: EncString | undefined;
1543
- discoverable: EncString;
1544
- creationDate: DateTime<Utc>;
1545
- }
1546
-
1547
- export interface Login {
1548
- username: EncString | undefined;
1549
- password: EncString | undefined;
1550
- passwordRevisionDate: DateTime<Utc> | undefined;
1551
- uris: LoginUri[] | undefined;
1552
- totp: EncString | undefined;
1553
- autofillOnPageLoad: boolean | undefined;
1554
- fido2Credentials: Fido2Credential[] | undefined;
1555
- }
1556
-
1557
- export interface LoginView {
1558
- username: string | undefined;
1559
- password: string | undefined;
1560
- passwordRevisionDate: DateTime<Utc> | undefined;
1561
- uris: LoginUriView[] | undefined;
1562
- totp: string | undefined;
1563
- autofillOnPageLoad: boolean | undefined;
1564
- fido2Credentials: Fido2Credential[] | undefined;
1565
- }
1566
-
1567
- export interface LoginUri {
1568
- uri: EncString | undefined;
1569
- match: UriMatchType | undefined;
1570
- uriChecksum: EncString | undefined;
1571
- }
1572
-
1573
- export interface Fido2CredentialFullView {
1574
- credentialId: string;
1575
- keyType: string;
1576
- keyAlgorithm: string;
1577
- keyCurve: string;
1578
- keyValue: string;
1579
- rpId: string;
1580
- userHandle: string | undefined;
1581
- userName: string | undefined;
1582
- counter: string;
1583
- rpName: string | undefined;
1584
- userDisplayName: string | undefined;
1585
- discoverable: string;
1586
- creationDate: DateTime<Utc>;
1517
+ export interface FieldView {
1518
+ name: string | undefined;
1519
+ value: string | undefined;
1520
+ type: FieldType;
1521
+ linkedId: LinkedIdType | undefined;
1587
1522
  }
1588
1523
 
1589
- export interface LoginUriView {
1590
- uri: string | undefined;
1591
- match: UriMatchType | undefined;
1592
- uriChecksum: string | undefined;
1524
+ export interface Field {
1525
+ name: EncString | undefined;
1526
+ value: EncString | undefined;
1527
+ type: FieldType;
1528
+ linkedId: LinkedIdType | undefined;
1593
1529
  }
1594
1530
 
1595
- export interface Fido2CredentialNewView {
1531
+ export interface Fido2CredentialView {
1596
1532
  credentialId: string;
1597
1533
  keyType: string;
1598
1534
  keyAlgorithm: string;
1599
1535
  keyCurve: string;
1536
+ keyValue: EncString;
1600
1537
  rpId: string;
1601
1538
  userHandle: string | undefined;
1602
1539
  userName: string | undefined;
1603
1540
  counter: string;
1604
1541
  rpName: string | undefined;
1605
1542
  userDisplayName: string | undefined;
1543
+ discoverable: string;
1606
1544
  creationDate: DateTime<Utc>;
1607
1545
  }
1608
1546
 
1609
- export interface Fido2CredentialView {
1547
+ export interface Fido2CredentialFullView {
1610
1548
  credentialId: string;
1611
1549
  keyType: string;
1612
1550
  keyAlgorithm: string;
1613
1551
  keyCurve: string;
1614
- keyValue: EncString;
1552
+ keyValue: string;
1615
1553
  rpId: string;
1616
1554
  userHandle: string | undefined;
1617
1555
  userName: string | undefined;
@@ -1642,6 +1580,68 @@ export interface Fido2CredentialListView {
1642
1580
  counter: string;
1643
1581
  }
1644
1582
 
1583
+ export interface LoginUriView {
1584
+ uri: string | undefined;
1585
+ match: UriMatchType | undefined;
1586
+ uriChecksum: string | undefined;
1587
+ }
1588
+
1589
+ export interface Fido2Credential {
1590
+ credentialId: EncString;
1591
+ keyType: EncString;
1592
+ keyAlgorithm: EncString;
1593
+ keyCurve: EncString;
1594
+ keyValue: EncString;
1595
+ rpId: EncString;
1596
+ userHandle: EncString | undefined;
1597
+ userName: EncString | undefined;
1598
+ counter: EncString;
1599
+ rpName: EncString | undefined;
1600
+ userDisplayName: EncString | undefined;
1601
+ discoverable: EncString;
1602
+ creationDate: DateTime<Utc>;
1603
+ }
1604
+
1605
+ export interface LoginUri {
1606
+ uri: EncString | undefined;
1607
+ match: UriMatchType | undefined;
1608
+ uriChecksum: EncString | undefined;
1609
+ }
1610
+
1611
+ export interface Fido2CredentialNewView {
1612
+ credentialId: string;
1613
+ keyType: string;
1614
+ keyAlgorithm: string;
1615
+ keyCurve: string;
1616
+ rpId: string;
1617
+ userHandle: string | undefined;
1618
+ userName: string | undefined;
1619
+ counter: string;
1620
+ rpName: string | undefined;
1621
+ userDisplayName: string | undefined;
1622
+ creationDate: DateTime<Utc>;
1623
+ }
1624
+
1625
+ export interface LoginView {
1626
+ username: string | undefined;
1627
+ password: string | undefined;
1628
+ passwordRevisionDate: DateTime<Utc> | undefined;
1629
+ uris: LoginUriView[] | undefined;
1630
+ totp: string | undefined;
1631
+ autofillOnPageLoad: boolean | undefined;
1632
+ fido2Credentials: Fido2Credential[] | undefined;
1633
+ }
1634
+
1635
+ export interface Login {
1636
+ username: EncString | undefined;
1637
+ password: EncString | undefined;
1638
+ passwordRevisionDate: DateTime<Utc> | undefined;
1639
+ uris: LoginUri[] | undefined;
1640
+ totp: EncString | undefined;
1641
+ autofillOnPageLoad: boolean | undefined;
1642
+ fido2Credentials: Fido2Credential[] | undefined;
1643
+ }
1644
+
1645
1645
  export interface CipherView {
1646
1646
  id: CipherId | undefined;
1647
1647
  organizationId: OrganizationId | undefined;
@@ -1684,41 +1684,6 @@ export interface EncryptionContext {
1684
1684
  cipher: Cipher;
1685
1685
  }
1686
1686
 
1687
- export interface Cipher {
1688
- id: CipherId | undefined;
1689
- organizationId: OrganizationId | undefined;
1690
- folderId: FolderId | undefined;
1691
- collectionIds: CollectionId[];
1692
- /**
1693
- * More recent ciphers uses individual encryption keys to encrypt the other fields of the
1694
- * Cipher.
1695
- */
1696
- key: EncString | undefined;
1697
- name: EncString;
1698
- notes: EncString | undefined;
1699
- type: CipherType;
1700
- login: Login | undefined;
1701
- identity: Identity | undefined;
1702
- card: Card | undefined;
1703
- secureNote: SecureNote | undefined;
1704
- sshKey: SshKey | undefined;
1705
- favorite: boolean;
1706
- reprompt: CipherRepromptType;
1707
- organizationUseTotp: boolean;
1708
- edit: boolean;
1709
- permissions: CipherPermissions | undefined;
1710
- viewPassword: boolean;
1711
- localData: LocalData | undefined;
1712
- attachments: Attachment[] | undefined;
1713
- fields: Field[] | undefined;
1714
- passwordHistory: PasswordHistory[] | undefined;
1715
- creationDate: DateTime<Utc>;
1716
- deletedDate: DateTime<Utc> | undefined;
1717
- revisionDate: DateTime<Utc>;
1718
- archivedDate: DateTime<Utc> | undefined;
1719
- data: string | undefined;
1720
- }
1721
-
1722
1687
  export interface CipherError extends Error {
1723
1688
  name: "CipherError";
1724
1689
  variant:
@@ -1737,6 +1702,11 @@ export interface CipherError extends Error {
1737
1702
 
1738
1703
  export function isCipherError(error: any): error is CipherError;
1739
1704
 
1705
+ /**
1706
+ * NewType wrapper for `CipherId`
1707
+ */
1708
+ export type CipherId = Tagged<Uuid, "CipherId">;
1709
+
1740
1710
  export interface CipherListView {
1741
1711
  id: CipherId | undefined;
1742
1712
  organizationId: OrganizationId | undefined;
@@ -1774,26 +1744,40 @@ export interface CipherListView {
1774
1744
  localData: LocalDataView | undefined;
1775
1745
  }
1776
1746
 
1777
- /**
1778
- * Available fields on a cipher and can be copied from a the list view in the UI.
1779
- */
1780
- export type CopyableCipherFields =
1781
- | "LoginUsername"
1782
- | "LoginPassword"
1783
- | "LoginTotp"
1784
- | "CardNumber"
1785
- | "CardSecurityCode"
1786
- | "IdentityUsername"
1787
- | "IdentityEmail"
1788
- | "IdentityPhone"
1789
- | "IdentityAddress"
1790
- | "SshKey"
1791
- | "SecureNotes";
1792
-
1793
- /**
1794
- * NewType wrapper for `CipherId`
1795
- */
1796
- export type CipherId = Tagged<Uuid, "CipherId">;
1747
+ export interface Cipher {
1748
+ id: CipherId | undefined;
1749
+ organizationId: OrganizationId | undefined;
1750
+ folderId: FolderId | undefined;
1751
+ collectionIds: CollectionId[];
1752
+ /**
1753
+ * More recent ciphers uses individual encryption keys to encrypt the other fields of the
1754
+ * Cipher.
1755
+ */
1756
+ key: EncString | undefined;
1757
+ name: EncString;
1758
+ notes: EncString | undefined;
1759
+ type: CipherType;
1760
+ login: Login | undefined;
1761
+ identity: Identity | undefined;
1762
+ card: Card | undefined;
1763
+ secureNote: SecureNote | undefined;
1764
+ sshKey: SshKey | undefined;
1765
+ favorite: boolean;
1766
+ reprompt: CipherRepromptType;
1767
+ organizationUseTotp: boolean;
1768
+ edit: boolean;
1769
+ permissions: CipherPermissions | undefined;
1770
+ viewPassword: boolean;
1771
+ localData: LocalData | undefined;
1772
+ attachments: Attachment[] | undefined;
1773
+ fields: Field[] | undefined;
1774
+ passwordHistory: PasswordHistory[] | undefined;
1775
+ creationDate: DateTime<Utc>;
1776
+ deletedDate: DateTime<Utc> | undefined;
1777
+ revisionDate: DateTime<Utc>;
1778
+ archivedDate: DateTime<Utc> | undefined;
1779
+ data: string | undefined;
1780
+ }
1797
1781
 
1798
1782
  /**
1799
1783
  * Represents the result of decrypting a list of ciphers.
@@ -1813,6 +1797,22 @@ export interface DecryptCipherListResult {
1813
1797
  failures: Cipher[];
1814
1798
  }
1815
1799
 
1800
+ /**
1801
+ * Available fields on a cipher and can be copied from a the list view in the UI.
1802
+ */
1803
+ export type CopyableCipherFields =
1804
+ | "LoginUsername"
1805
+ | "LoginPassword"
1806
+ | "LoginTotp"
1807
+ | "CardNumber"
1808
+ | "CardSecurityCode"
1809
+ | "IdentityUsername"
1810
+ | "IdentityEmail"
1811
+ | "IdentityPhone"
1812
+ | "IdentityAddress"
1813
+ | "SshKey"
1814
+ | "SecureNotes";
1815
+
1816
1816
  export type CipherListViewType =
1817
1817
  | { login: LoginListView }
1818
1818
  | "secureNote"
@@ -1820,34 +1820,34 @@ export type CipherListViewType =
1820
1820
  | "identity"
1821
1821
  | "sshKey";
1822
1822
 
1823
- export interface SshKey {
1823
+ export interface SshKeyView {
1824
1824
  /**
1825
1825
  * SSH private key (ed25519/rsa) in unencrypted openssh private key format [OpenSSH private key](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key)
1826
1826
  */
1827
- privateKey: EncString;
1827
+ privateKey: string;
1828
1828
  /**
1829
1829
  * SSH public key (ed25519/rsa) according to [RFC4253](https://datatracker.ietf.org/doc/html/rfc4253#section-6.6)
1830
1830
  */
1831
- publicKey: EncString;
1831
+ publicKey: string;
1832
1832
  /**
1833
1833
  * SSH fingerprint using SHA256 in the format: `SHA256:BASE64_ENCODED_FINGERPRINT`
1834
1834
  */
1835
- fingerprint: EncString;
1835
+ fingerprint: string;
1836
1836
  }
1837
1837
 
1838
- export interface SshKeyView {
1838
+ export interface SshKey {
1839
1839
  /**
1840
1840
  * SSH private key (ed25519/rsa) in unencrypted openssh private key format [OpenSSH private key](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key)
1841
1841
  */
1842
- privateKey: string;
1842
+ privateKey: EncString;
1843
1843
  /**
1844
1844
  * SSH public key (ed25519/rsa) according to [RFC4253](https://datatracker.ietf.org/doc/html/rfc4253#section-6.6)
1845
1845
  */
1846
- publicKey: string;
1846
+ publicKey: EncString;
1847
1847
  /**
1848
1848
  * SSH fingerprint using SHA256 in the format: `SHA256:BASE64_ENCODED_FINGERPRINT`
1849
1849
  */
1850
- fingerprint: string;
1850
+ fingerprint: EncString;
1851
1851
  }
1852
1852
 
1853
1853
  export interface Identity {
@@ -1894,11 +1894,10 @@ export interface IdentityView {
1894
1894
 
1895
1895
  export type LinkedIdType = LoginLinkedIdType | CardLinkedIdType | IdentityLinkedIdType;
1896
1896
 
1897
- export interface FolderView {
1898
- id: FolderId | undefined;
1899
- name: string;
1900
- revisionDate: DateTime<Utc>;
1901
- }
1897
+ /**
1898
+ * NewType wrapper for `FolderId`
1899
+ */
1900
+ export type FolderId = Tagged<Uuid, "FolderId">;
1902
1901
 
1903
1902
  export interface Folder {
1904
1903
  id: FolderId | undefined;
@@ -1906,10 +1905,11 @@ export interface Folder {
1906
1905
  revisionDate: DateTime<Utc>;
1907
1906
  }
1908
1907
 
1909
- /**
1910
- * NewType wrapper for `FolderId`
1911
- */
1912
- export type FolderId = Tagged<Uuid, "FolderId">;
1908
+ export interface FolderView {
1909
+ id: FolderId | undefined;
1910
+ name: string;
1911
+ revisionDate: DateTime<Utc>;
1912
+ }
1913
1913
 
1914
1914
  export interface EditFolderError extends Error {
1915
1915
  name: "EditFolderError";
@@ -1925,13 +1925,6 @@ export interface EditFolderError extends Error {
1925
1925
 
1926
1926
  export function isEditFolderError(error: any): error is EditFolderError;
1927
1927
 
1928
- export interface CreateFolderError extends Error {
1929
- name: "CreateFolderError";
1930
- variant: "Crypto" | "Api" | "VaultParse" | "MissingField" | "Repository";
1931
- }
1932
-
1933
- export function isCreateFolderError(error: any): error is CreateFolderError;
1934
-
1935
1928
  /**
1936
1929
  * Request to add or edit a folder.
1937
1930
  */
@@ -1942,6 +1935,13 @@ export interface FolderAddEditRequest {
1942
1935
  name: string;
1943
1936
  }
1944
1937
 
1938
+ export interface CreateFolderError extends Error {
1939
+ name: "CreateFolderError";
1940
+ variant: "Crypto" | "Api" | "VaultParse" | "MissingField" | "Repository";
1941
+ }
1942
+
1943
+ export function isCreateFolderError(error: any): error is CreateFolderError;
1944
+
1945
1945
  export interface GetFolderError extends Error {
1946
1946
  name: "GetFolderError";
1947
1947
  variant: "ItemNotFound" | "Crypto" | "Repository";