@bitwarden/commercial-sdk-internal 0.2.0-main.467 → 0.2.0-main.468
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/bitwarden_wasm_internal.d.ts +423 -423
- package/bitwarden_wasm_internal_bg.js +62 -62
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +8 -8
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +423 -423
- package/node/bitwarden_wasm_internal.js +66 -66
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +8 -8
- package/package.json +1 -1
|
@@ -194,17 +194,6 @@ export interface IndexedDbConfiguration {
|
|
|
194
194
|
db_name: string;
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
/**
|
|
198
|
-
* Credentials for sending an OTP to the user\'s email address.
|
|
199
|
-
* This is used when the send requires email verification with an OTP.
|
|
200
|
-
*/
|
|
201
|
-
export interface SendEmailCredentials {
|
|
202
|
-
/**
|
|
203
|
-
* The email address to which the OTP will be sent.
|
|
204
|
-
*/
|
|
205
|
-
email: string;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
197
|
/**
|
|
209
198
|
* Credentials for sending password secured access requests.
|
|
210
199
|
* Clone auto implements the standard lib\'s Clone trait, allowing us to create copies of this
|
|
@@ -218,55 +207,52 @@ export interface SendPasswordCredentials {
|
|
|
218
207
|
}
|
|
219
208
|
|
|
220
209
|
/**
|
|
221
|
-
*
|
|
210
|
+
* Credentials for getting a send access token using an email and OTP.
|
|
222
211
|
*/
|
|
223
|
-
export interface
|
|
212
|
+
export interface SendEmailOtpCredentials {
|
|
224
213
|
/**
|
|
225
|
-
* The
|
|
214
|
+
* The email address to which the OTP will be sent.
|
|
226
215
|
*/
|
|
227
|
-
|
|
216
|
+
email: string;
|
|
228
217
|
/**
|
|
229
|
-
* The
|
|
218
|
+
* The one-time password (OTP) that the user has received via email.
|
|
230
219
|
*/
|
|
231
|
-
|
|
220
|
+
otp: string;
|
|
232
221
|
}
|
|
233
222
|
|
|
234
223
|
/**
|
|
235
|
-
*
|
|
236
|
-
|
|
237
|
-
export type SendAccessCredentials =
|
|
238
|
-
| SendPasswordCredentials
|
|
239
|
-
| SendEmailOtpCredentials
|
|
240
|
-
| SendEmailCredentials;
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Credentials for getting a send access token using an email and OTP.
|
|
224
|
+
* Credentials for sending an OTP to the user\'s email address.
|
|
225
|
+
* This is used when the send requires email verification with an OTP.
|
|
244
226
|
*/
|
|
245
|
-
export interface
|
|
227
|
+
export interface SendEmailCredentials {
|
|
246
228
|
/**
|
|
247
229
|
* The email address to which the OTP will be sent.
|
|
248
230
|
*/
|
|
249
231
|
email: string;
|
|
250
|
-
/**
|
|
251
|
-
* The one-time password (OTP) that the user has received via email.
|
|
252
|
-
*/
|
|
253
|
-
otp: string;
|
|
254
232
|
}
|
|
255
233
|
|
|
256
234
|
/**
|
|
257
|
-
* A
|
|
235
|
+
* A request structure for requesting a send access token from the API.
|
|
258
236
|
*/
|
|
259
|
-
export interface
|
|
237
|
+
export interface SendAccessTokenRequest {
|
|
260
238
|
/**
|
|
261
|
-
* The
|
|
239
|
+
* The id of the send for which the access token is requested.
|
|
262
240
|
*/
|
|
263
|
-
|
|
241
|
+
sendId: string;
|
|
264
242
|
/**
|
|
265
|
-
* The
|
|
243
|
+
* The optional send access credentials.
|
|
266
244
|
*/
|
|
267
|
-
|
|
245
|
+
sendAccessCredentials?: SendAccessCredentials;
|
|
268
246
|
}
|
|
269
247
|
|
|
248
|
+
/**
|
|
249
|
+
* The credentials used for send access requests.
|
|
250
|
+
*/
|
|
251
|
+
export type SendAccessCredentials =
|
|
252
|
+
| SendPasswordCredentials
|
|
253
|
+
| SendEmailOtpCredentials
|
|
254
|
+
| SendEmailCredentials;
|
|
255
|
+
|
|
270
256
|
/**
|
|
271
257
|
* Any unexpected error that occurs when making requests to identity. This could be
|
|
272
258
|
* local/transport/decoding failure from the HTTP client (DNS/TLS/connect/read timeout,
|
|
@@ -285,6 +271,20 @@ export type SendAccessTokenError =
|
|
|
285
271
|
| { kind: "unexpected"; data: UnexpectedIdentityError }
|
|
286
272
|
| { kind: "expected"; data: SendAccessTokenApiErrorResponse };
|
|
287
273
|
|
|
274
|
+
/**
|
|
275
|
+
* A send access token which can be used to access a send.
|
|
276
|
+
*/
|
|
277
|
+
export interface SendAccessTokenResponse {
|
|
278
|
+
/**
|
|
279
|
+
* The actual token string.
|
|
280
|
+
*/
|
|
281
|
+
token: string;
|
|
282
|
+
/**
|
|
283
|
+
* The timestamp in milliseconds when the token expires.
|
|
284
|
+
*/
|
|
285
|
+
expiresAt: number;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
288
|
/**
|
|
289
289
|
* Represents the possible, expected errors that can occur when requesting a send access token.
|
|
290
290
|
*/
|
|
@@ -327,25 +327,30 @@ export type SendAccessTokenInvalidRequestError =
|
|
|
327
327
|
| "unknown";
|
|
328
328
|
|
|
329
329
|
/**
|
|
330
|
-
*
|
|
330
|
+
* Request parameters for TDE (Trusted Device Encryption) registration.
|
|
331
331
|
*/
|
|
332
|
-
export interface
|
|
332
|
+
export interface TdeRegistrationRequest {
|
|
333
333
|
/**
|
|
334
|
-
*
|
|
334
|
+
* Organization ID to enroll in
|
|
335
335
|
*/
|
|
336
|
-
|
|
336
|
+
org_id: OrganizationId;
|
|
337
337
|
/**
|
|
338
|
-
*
|
|
338
|
+
* Organization\'s public key for encrypting the reset password key. This should be verified by
|
|
339
|
+
* the client and not verifying may compromise the security of the user\'s account.
|
|
339
340
|
*/
|
|
340
|
-
|
|
341
|
+
org_public_key: B64;
|
|
341
342
|
/**
|
|
342
|
-
*
|
|
343
|
+
* User ID for the account being initialized
|
|
343
344
|
*/
|
|
344
|
-
|
|
345
|
+
user_id: UserId;
|
|
345
346
|
/**
|
|
346
|
-
*
|
|
347
|
+
* Device identifier for TDE enrollment
|
|
347
348
|
*/
|
|
348
|
-
|
|
349
|
+
device_identifier: string;
|
|
350
|
+
/**
|
|
351
|
+
* Whether to trust this device for TDE
|
|
352
|
+
*/
|
|
353
|
+
trust_device: boolean;
|
|
349
354
|
}
|
|
350
355
|
|
|
351
356
|
/**
|
|
@@ -370,40 +375,6 @@ export interface JitMasterPasswordRegistrationResponse {
|
|
|
370
375
|
user_key: B64;
|
|
371
376
|
}
|
|
372
377
|
|
|
373
|
-
/**
|
|
374
|
-
* Request parameters for TDE (Trusted Device Encryption) registration.
|
|
375
|
-
*/
|
|
376
|
-
export interface TdeRegistrationRequest {
|
|
377
|
-
/**
|
|
378
|
-
* Organization ID to enroll in
|
|
379
|
-
*/
|
|
380
|
-
org_id: OrganizationId;
|
|
381
|
-
/**
|
|
382
|
-
* Organization\'s public key for encrypting the reset password key. This should be verified by
|
|
383
|
-
* the client and not verifying may compromise the security of the user\'s account.
|
|
384
|
-
*/
|
|
385
|
-
org_public_key: B64;
|
|
386
|
-
/**
|
|
387
|
-
* User ID for the account being initialized
|
|
388
|
-
*/
|
|
389
|
-
user_id: UserId;
|
|
390
|
-
/**
|
|
391
|
-
* Device identifier for TDE enrollment
|
|
392
|
-
*/
|
|
393
|
-
device_identifier: string;
|
|
394
|
-
/**
|
|
395
|
-
* Whether to trust this device for TDE
|
|
396
|
-
*/
|
|
397
|
-
trust_device: boolean;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
export interface RegistrationError extends Error {
|
|
401
|
-
name: "RegistrationError";
|
|
402
|
-
variant: "KeyConnectorApi" | "Api" | "Crypto";
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
export function isRegistrationError(error: any): error is RegistrationError;
|
|
406
|
-
|
|
407
378
|
/**
|
|
408
379
|
* Request parameters for SSO JIT master password registration.
|
|
409
380
|
*/
|
|
@@ -449,9 +420,33 @@ export interface TdeRegistrationResponse {
|
|
|
449
420
|
}
|
|
450
421
|
|
|
451
422
|
/**
|
|
452
|
-
*
|
|
423
|
+
* Result of Key Connector registration process.
|
|
453
424
|
*/
|
|
454
|
-
export
|
|
425
|
+
export interface KeyConnectorRegistrationResult {
|
|
426
|
+
/**
|
|
427
|
+
* The account cryptographic state of the user.
|
|
428
|
+
*/
|
|
429
|
+
account_cryptographic_state: WrappedAccountCryptographicState;
|
|
430
|
+
/**
|
|
431
|
+
* The key connector key used for unlocking.
|
|
432
|
+
*/
|
|
433
|
+
key_connector_key: B64;
|
|
434
|
+
/**
|
|
435
|
+
* The encrypted user key, wrapped with the key connector key.
|
|
436
|
+
*/
|
|
437
|
+
key_connector_key_wrapped_user_key: EncString;
|
|
438
|
+
/**
|
|
439
|
+
* The decrypted user key. This can be used to get the consuming client to an unlocked state.
|
|
440
|
+
*/
|
|
441
|
+
user_key: B64;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export interface RegistrationError extends Error {
|
|
445
|
+
name: "RegistrationError";
|
|
446
|
+
variant: "KeyConnectorApi" | "Api" | "Crypto";
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export function isRegistrationError(error: any): error is RegistrationError;
|
|
455
450
|
|
|
456
451
|
export interface Collection {
|
|
457
452
|
id: CollectionId | undefined;
|
|
@@ -470,6 +465,11 @@ export interface Collection {
|
|
|
470
465
|
*/
|
|
471
466
|
export type CollectionType = "SharedCollection" | "DefaultUserCollection";
|
|
472
467
|
|
|
468
|
+
/**
|
|
469
|
+
* NewType wrapper for `CollectionId`
|
|
470
|
+
*/
|
|
471
|
+
export type CollectionId = Tagged<Uuid, "CollectionId">;
|
|
472
|
+
|
|
473
473
|
export interface CollectionView {
|
|
474
474
|
id: CollectionId | undefined;
|
|
475
475
|
organizationId: OrganizationId;
|
|
@@ -490,6 +490,15 @@ export function isCollectionDecryptError(error: any): error is CollectionDecrypt
|
|
|
490
490
|
|
|
491
491
|
export type SignedSecurityState = string;
|
|
492
492
|
|
|
493
|
+
/**
|
|
494
|
+
* Represents the data required to authenticate with the master password.
|
|
495
|
+
*/
|
|
496
|
+
export interface MasterPasswordAuthenticationData {
|
|
497
|
+
kdf: Kdf;
|
|
498
|
+
salt: string;
|
|
499
|
+
masterPasswordAuthenticationHash: B64;
|
|
500
|
+
}
|
|
501
|
+
|
|
493
502
|
/**
|
|
494
503
|
* Represents the data required to unlock with the master password.
|
|
495
504
|
*/
|
|
@@ -508,15 +517,6 @@ export interface MasterPasswordUnlockData {
|
|
|
508
517
|
salt: string;
|
|
509
518
|
}
|
|
510
519
|
|
|
511
|
-
/**
|
|
512
|
-
* Represents the data required to authenticate with the master password.
|
|
513
|
-
*/
|
|
514
|
-
export interface MasterPasswordAuthenticationData {
|
|
515
|
-
kdf: Kdf;
|
|
516
|
-
salt: string;
|
|
517
|
-
masterPasswordAuthenticationHash: B64;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
520
|
export interface MasterPasswordError extends Error {
|
|
521
521
|
name: "MasterPasswordError";
|
|
522
522
|
variant:
|
|
@@ -574,9 +574,13 @@ export interface UpdatePasswordResponse {
|
|
|
574
574
|
}
|
|
575
575
|
|
|
576
576
|
/**
|
|
577
|
-
*
|
|
577
|
+
* Request for `verify_asymmetric_keys`.
|
|
578
578
|
*/
|
|
579
|
-
export interface
|
|
579
|
+
export interface VerifyAsymmetricKeysRequest {
|
|
580
|
+
/**
|
|
581
|
+
* The user\'s user key
|
|
582
|
+
*/
|
|
583
|
+
userKey: B64;
|
|
580
584
|
/**
|
|
581
585
|
* The user\'s public key
|
|
582
586
|
*/
|
|
@@ -587,52 +591,6 @@ export interface MakeKeyPairResponse {
|
|
|
587
591
|
userKeyEncryptedPrivateKey: EncString;
|
|
588
592
|
}
|
|
589
593
|
|
|
590
|
-
export interface EnrollAdminPasswordResetError extends Error {
|
|
591
|
-
name: "EnrollAdminPasswordResetError";
|
|
592
|
-
variant: "Crypto";
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
export function isEnrollAdminPasswordResetError(error: any): error is EnrollAdminPasswordResetError;
|
|
596
|
-
|
|
597
|
-
/**
|
|
598
|
-
* Auth requests supports multiple initialization methods.
|
|
599
|
-
*/
|
|
600
|
-
export type AuthRequestMethod =
|
|
601
|
-
| { userKey: { protected_user_key: UnsignedSharedKey } }
|
|
602
|
-
| { masterKey: { protected_master_key: UnsignedSharedKey; auth_request_key: EncString } };
|
|
603
|
-
|
|
604
|
-
/**
|
|
605
|
-
* Response from the `update_kdf` function
|
|
606
|
-
*/
|
|
607
|
-
export interface UpdateKdfResponse {
|
|
608
|
-
/**
|
|
609
|
-
* The authentication data for the new KDF setting
|
|
610
|
-
*/
|
|
611
|
-
masterPasswordAuthenticationData: MasterPasswordAuthenticationData;
|
|
612
|
-
/**
|
|
613
|
-
* The unlock data for the new KDF setting
|
|
614
|
-
*/
|
|
615
|
-
masterPasswordUnlockData: MasterPasswordUnlockData;
|
|
616
|
-
/**
|
|
617
|
-
* The authentication data for the KDF setting prior to the change
|
|
618
|
-
*/
|
|
619
|
-
oldMasterPasswordAuthenticationData: MasterPasswordAuthenticationData;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* Request for deriving a pin protected user key
|
|
624
|
-
*/
|
|
625
|
-
export interface EnrollPinResponse {
|
|
626
|
-
/**
|
|
627
|
-
* [UserKey] protected by PIN
|
|
628
|
-
*/
|
|
629
|
-
pinProtectedUserKeyEnvelope: PasswordProtectedKeyEnvelope;
|
|
630
|
-
/**
|
|
631
|
-
* PIN protected by [UserKey]
|
|
632
|
-
*/
|
|
633
|
-
userKeyEncryptedPin: EncString;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
594
|
/**
|
|
637
595
|
* State used for initializing the user cryptographic state.
|
|
638
596
|
*/
|
|
@@ -660,47 +618,22 @@ export interface InitUserCryptoRequest {
|
|
|
660
618
|
method: InitUserCryptoMethod;
|
|
661
619
|
}
|
|
662
620
|
|
|
663
|
-
export interface MakeKeysError extends Error {
|
|
664
|
-
name: "MakeKeysError";
|
|
665
|
-
variant:
|
|
666
|
-
| "AccountCryptographyInitialization"
|
|
667
|
-
| "MasterPasswordDerivation"
|
|
668
|
-
| "RequestModelCreation"
|
|
669
|
-
| "Crypto";
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
export function isMakeKeysError(error: any): error is MakeKeysError;
|
|
673
|
-
|
|
674
621
|
/**
|
|
675
|
-
* Response
|
|
622
|
+
* Response from the `update_kdf` function
|
|
676
623
|
*/
|
|
677
|
-
export interface
|
|
624
|
+
export interface UpdateKdfResponse {
|
|
678
625
|
/**
|
|
679
|
-
*
|
|
626
|
+
* The authentication data for the new KDF setting
|
|
680
627
|
*/
|
|
681
|
-
|
|
682
|
-
/**
|
|
683
|
-
* Whether the user\'s private key was a valid RSA key and matched the public key provided.
|
|
684
|
-
*/
|
|
685
|
-
validPrivateKey: boolean;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
/**
|
|
689
|
-
* Request for `verify_asymmetric_keys`.
|
|
690
|
-
*/
|
|
691
|
-
export interface VerifyAsymmetricKeysRequest {
|
|
692
|
-
/**
|
|
693
|
-
* The user\'s user key
|
|
694
|
-
*/
|
|
695
|
-
userKey: B64;
|
|
628
|
+
masterPasswordAuthenticationData: MasterPasswordAuthenticationData;
|
|
696
629
|
/**
|
|
697
|
-
* The
|
|
630
|
+
* The unlock data for the new KDF setting
|
|
698
631
|
*/
|
|
699
|
-
|
|
632
|
+
masterPasswordUnlockData: MasterPasswordUnlockData;
|
|
700
633
|
/**
|
|
701
|
-
*
|
|
634
|
+
* The authentication data for the KDF setting prior to the change
|
|
702
635
|
*/
|
|
703
|
-
|
|
636
|
+
oldMasterPasswordAuthenticationData: MasterPasswordAuthenticationData;
|
|
704
637
|
}
|
|
705
638
|
|
|
706
639
|
/**
|
|
@@ -721,38 +654,6 @@ export type InitUserCryptoMethod =
|
|
|
721
654
|
}
|
|
722
655
|
| { keyConnector: { master_key: B64; user_key: EncString } };
|
|
723
656
|
|
|
724
|
-
/**
|
|
725
|
-
* Request for migrating an account from password to key connector.
|
|
726
|
-
*/
|
|
727
|
-
export interface DeriveKeyConnectorRequest {
|
|
728
|
-
/**
|
|
729
|
-
* Encrypted user key, used to validate the master key
|
|
730
|
-
*/
|
|
731
|
-
userKeyEncrypted: EncString;
|
|
732
|
-
/**
|
|
733
|
-
* The user\'s master password
|
|
734
|
-
*/
|
|
735
|
-
password: string;
|
|
736
|
-
/**
|
|
737
|
-
* The KDF parameters used to derive the master key
|
|
738
|
-
*/
|
|
739
|
-
kdf: Kdf;
|
|
740
|
-
/**
|
|
741
|
-
* The user\'s email address
|
|
742
|
-
*/
|
|
743
|
-
email: string;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
/**
|
|
747
|
-
* Represents the request to initialize the user\'s organizational cryptographic state.
|
|
748
|
-
*/
|
|
749
|
-
export interface InitOrgCryptoRequest {
|
|
750
|
-
/**
|
|
751
|
-
* The encryption keys for all the organizations the user is a part of
|
|
752
|
-
*/
|
|
753
|
-
organizationKeys: Map<OrganizationId, UnsignedSharedKey>;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
657
|
/**
|
|
757
658
|
* Response for the `make_keys_for_user_crypto_v2`, containing a set of keys for a user
|
|
758
659
|
*/
|
|
@@ -798,6 +699,20 @@ export interface DeriveKeyConnectorError extends Error {
|
|
|
798
699
|
|
|
799
700
|
export function isDeriveKeyConnectorError(error: any): error is DeriveKeyConnectorError;
|
|
800
701
|
|
|
702
|
+
/**
|
|
703
|
+
* Request for deriving a pin protected user key
|
|
704
|
+
*/
|
|
705
|
+
export interface DerivePinKeyResponse {
|
|
706
|
+
/**
|
|
707
|
+
* [UserKey] protected by PIN
|
|
708
|
+
*/
|
|
709
|
+
pinProtectedUserKey: EncString;
|
|
710
|
+
/**
|
|
711
|
+
* PIN protected by [UserKey]
|
|
712
|
+
*/
|
|
713
|
+
encryptedPin: EncString;
|
|
714
|
+
}
|
|
715
|
+
|
|
801
716
|
export interface CryptoClientError extends Error {
|
|
802
717
|
name: "CryptoClientError";
|
|
803
718
|
variant: "NotAuthenticated" | "Crypto" | "InvalidKdfSettings" | "PasswordProtectedKeyEnvelope";
|
|
@@ -808,27 +723,112 @@ export function isCryptoClientError(error: any): error is CryptoClientError;
|
|
|
808
723
|
/**
|
|
809
724
|
* Request for deriving a pin protected user key
|
|
810
725
|
*/
|
|
811
|
-
export interface
|
|
726
|
+
export interface EnrollPinResponse {
|
|
812
727
|
/**
|
|
813
728
|
* [UserKey] protected by PIN
|
|
814
729
|
*/
|
|
815
|
-
|
|
730
|
+
pinProtectedUserKeyEnvelope: PasswordProtectedKeyEnvelope;
|
|
816
731
|
/**
|
|
817
732
|
* PIN protected by [UserKey]
|
|
818
733
|
*/
|
|
819
|
-
|
|
734
|
+
userKeyEncryptedPin: EncString;
|
|
820
735
|
}
|
|
821
736
|
|
|
822
737
|
/**
|
|
823
|
-
*
|
|
738
|
+
* Request for migrating an account from password to key connector.
|
|
824
739
|
*/
|
|
825
|
-
export
|
|
740
|
+
export interface DeriveKeyConnectorRequest {
|
|
741
|
+
/**
|
|
742
|
+
* Encrypted user key, used to validate the master key
|
|
743
|
+
*/
|
|
744
|
+
userKeyEncrypted: EncString;
|
|
745
|
+
/**
|
|
746
|
+
* The user\'s master password
|
|
747
|
+
*/
|
|
748
|
+
password: string;
|
|
749
|
+
/**
|
|
750
|
+
* The KDF parameters used to derive the master key
|
|
751
|
+
*/
|
|
752
|
+
kdf: Kdf;
|
|
753
|
+
/**
|
|
754
|
+
* The user\'s email address
|
|
755
|
+
*/
|
|
756
|
+
email: string;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
export interface MakeKeysError extends Error {
|
|
760
|
+
name: "MakeKeysError";
|
|
761
|
+
variant:
|
|
762
|
+
| "AccountCryptographyInitialization"
|
|
763
|
+
| "MasterPasswordDerivation"
|
|
764
|
+
| "RequestModelCreation"
|
|
765
|
+
| "Crypto";
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
export function isMakeKeysError(error: any): error is MakeKeysError;
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Response for `verify_asymmetric_keys`.
|
|
772
|
+
*/
|
|
773
|
+
export interface VerifyAsymmetricKeysResponse {
|
|
774
|
+
/**
|
|
775
|
+
* Whether the user\'s private key was decryptable by the user key.
|
|
776
|
+
*/
|
|
777
|
+
privateKeyDecryptable: boolean;
|
|
778
|
+
/**
|
|
779
|
+
* Whether the user\'s private key was a valid RSA key and matched the public key provided.
|
|
780
|
+
*/
|
|
781
|
+
validPrivateKey: boolean;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
export interface EnrollAdminPasswordResetError extends Error {
|
|
785
|
+
name: "EnrollAdminPasswordResetError";
|
|
786
|
+
variant: "Crypto";
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
export function isEnrollAdminPasswordResetError(error: any): error is EnrollAdminPasswordResetError;
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Auth requests supports multiple initialization methods.
|
|
793
|
+
*/
|
|
794
|
+
export type AuthRequestMethod =
|
|
795
|
+
| { userKey: { protected_user_key: UnsignedSharedKey } }
|
|
796
|
+
| { masterKey: { protected_master_key: UnsignedSharedKey; auth_request_key: EncString } };
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Response from the `make_key_pair` function
|
|
800
|
+
*/
|
|
801
|
+
export interface MakeKeyPairResponse {
|
|
802
|
+
/**
|
|
803
|
+
* The user\'s public key
|
|
804
|
+
*/
|
|
805
|
+
userPublicKey: B64;
|
|
806
|
+
/**
|
|
807
|
+
* User\'s private key, encrypted with the user key
|
|
808
|
+
*/
|
|
809
|
+
userKeyEncryptedPrivateKey: EncString;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* Represents the request to initialize the user\'s organizational cryptographic state.
|
|
814
|
+
*/
|
|
815
|
+
export interface InitOrgCryptoRequest {
|
|
816
|
+
/**
|
|
817
|
+
* The encryption keys for all the organizations the user is a part of
|
|
818
|
+
*/
|
|
819
|
+
organizationKeys: Map<OrganizationId, UnsignedSharedKey>;
|
|
820
|
+
}
|
|
826
821
|
|
|
827
822
|
/**
|
|
828
823
|
* NewType wrapper for `UserId`
|
|
829
824
|
*/
|
|
830
825
|
export type UserId = Tagged<Uuid, "UserId">;
|
|
831
826
|
|
|
827
|
+
/**
|
|
828
|
+
* NewType wrapper for `OrganizationId`
|
|
829
|
+
*/
|
|
830
|
+
export type OrganizationId = Tagged<Uuid, "OrganizationId">;
|
|
831
|
+
|
|
832
832
|
export interface StatefulCryptoError extends Error {
|
|
833
833
|
name: "StatefulCryptoError";
|
|
834
834
|
variant: "MissingSecurityState" | "WrongAccountCryptoVersion" | "Crypto";
|
|
@@ -1066,6 +1066,8 @@ export interface ExportError extends Error {
|
|
|
1066
1066
|
|
|
1067
1067
|
export function isExportError(error: any): error is ExportError;
|
|
1068
1068
|
|
|
1069
|
+
export type PassphraseError = { InvalidNumWords: { minimum: number; maximum: number } };
|
|
1070
|
+
|
|
1069
1071
|
/**
|
|
1070
1072
|
* Passphrase generator request options.
|
|
1071
1073
|
*/
|
|
@@ -1090,8 +1092,6 @@ export interface PassphraseGeneratorRequest {
|
|
|
1090
1092
|
includeNumber: boolean;
|
|
1091
1093
|
}
|
|
1092
1094
|
|
|
1093
|
-
export type PassphraseError = { InvalidNumWords: { minimum: number; maximum: number } };
|
|
1094
|
-
|
|
1095
1095
|
/**
|
|
1096
1096
|
* Password generator request options.
|
|
1097
1097
|
*/
|
|
@@ -1151,15 +1151,6 @@ export interface PasswordError extends Error {
|
|
|
1151
1151
|
|
|
1152
1152
|
export function isPasswordError(error: any): error is PasswordError;
|
|
1153
1153
|
|
|
1154
|
-
export interface UsernameError extends Error {
|
|
1155
|
-
name: "UsernameError";
|
|
1156
|
-
variant: "InvalidApiKey" | "Unknown" | "ResponseContent" | "Reqwest";
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
export function isUsernameError(error: any): error is UsernameError;
|
|
1160
|
-
|
|
1161
|
-
export type AppendType = "random" | { websiteName: { website: string } };
|
|
1162
|
-
|
|
1163
1154
|
/**
|
|
1164
1155
|
* Configures the email forwarding service to use.
|
|
1165
1156
|
* For instructions on how to configure each service, see the documentation:
|
|
@@ -1173,6 +1164,15 @@ export type ForwarderServiceType =
|
|
|
1173
1164
|
| { forwardEmail: { api_token: string; domain: string } }
|
|
1174
1165
|
| { simpleLogin: { api_key: string; base_url: string } };
|
|
1175
1166
|
|
|
1167
|
+
export interface UsernameError extends Error {
|
|
1168
|
+
name: "UsernameError";
|
|
1169
|
+
variant: "InvalidApiKey" | "Unknown" | "ResponseContent" | "Reqwest";
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
export function isUsernameError(error: any): error is UsernameError;
|
|
1173
|
+
|
|
1174
|
+
export type AppendType = "random" | { websiteName: { website: string } };
|
|
1175
|
+
|
|
1176
1176
|
export type UsernameGeneratorRequest =
|
|
1177
1177
|
| { word: { capitalize: boolean; include_number: boolean } }
|
|
1178
1178
|
| { subaddress: { type: AppendType; email: string } }
|
|
@@ -1240,6 +1240,13 @@ export type Endpoint =
|
|
|
1240
1240
|
| "DesktopRenderer"
|
|
1241
1241
|
| "DesktopMain";
|
|
1242
1242
|
|
|
1243
|
+
export interface KeyGenerationError extends Error {
|
|
1244
|
+
name: "KeyGenerationError";
|
|
1245
|
+
variant: "KeyGeneration" | "KeyConversion";
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
export function isKeyGenerationError(error: any): error is KeyGenerationError;
|
|
1249
|
+
|
|
1243
1250
|
export interface SshKeyExportError extends Error {
|
|
1244
1251
|
name: "SshKeyExportError";
|
|
1245
1252
|
variant: "KeyConversion";
|
|
@@ -1254,13 +1261,6 @@ export interface SshKeyImportError extends Error {
|
|
|
1254
1261
|
|
|
1255
1262
|
export function isSshKeyImportError(error: any): error is SshKeyImportError;
|
|
1256
1263
|
|
|
1257
|
-
export interface KeyGenerationError extends Error {
|
|
1258
|
-
name: "KeyGenerationError";
|
|
1259
|
-
variant: "KeyGeneration" | "KeyConversion";
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
export function isKeyGenerationError(error: any): error is KeyGenerationError;
|
|
1263
|
-
|
|
1264
1264
|
export type KeyAlgorithm = "Ed25519" | "Rsa3072" | "Rsa4096";
|
|
1265
1265
|
|
|
1266
1266
|
export interface DatabaseError extends Error {
|
|
@@ -1290,11 +1290,37 @@ export interface CipherRiskError extends Error {
|
|
|
1290
1290
|
|
|
1291
1291
|
export function isCipherRiskError(error: any): error is CipherRiskError;
|
|
1292
1292
|
|
|
1293
|
+
/**
|
|
1294
|
+
* Result of checking password exposure via HIBP API.
|
|
1295
|
+
*/
|
|
1296
|
+
export type ExposedPasswordResult =
|
|
1297
|
+
| { type: "NotChecked" }
|
|
1298
|
+
| { type: "Found"; value: number }
|
|
1299
|
+
| { type: "Error"; value: string };
|
|
1300
|
+
|
|
1293
1301
|
/**
|
|
1294
1302
|
* Password reuse map wrapper for WASM compatibility.
|
|
1295
1303
|
*/
|
|
1296
1304
|
export type PasswordReuseMap = Record<string, number>;
|
|
1297
1305
|
|
|
1306
|
+
/**
|
|
1307
|
+
* Login cipher data needed for risk evaluation.
|
|
1308
|
+
*/
|
|
1309
|
+
export interface CipherLoginDetails {
|
|
1310
|
+
/**
|
|
1311
|
+
* Cipher ID to identify which cipher in results.
|
|
1312
|
+
*/
|
|
1313
|
+
id: CipherId;
|
|
1314
|
+
/**
|
|
1315
|
+
* The decrypted password to evaluate.
|
|
1316
|
+
*/
|
|
1317
|
+
password: string;
|
|
1318
|
+
/**
|
|
1319
|
+
* Username or email (login ciphers only have one field).
|
|
1320
|
+
*/
|
|
1321
|
+
username: string | undefined;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1298
1324
|
/**
|
|
1299
1325
|
* Risk evaluation result for a single cipher.
|
|
1300
1326
|
*/
|
|
@@ -1343,30 +1369,9 @@ export interface CipherRiskOptions {
|
|
|
1343
1369
|
hibpBaseUrl?: string | undefined;
|
|
1344
1370
|
}
|
|
1345
1371
|
|
|
1346
|
-
|
|
1347
|
-
* Result of checking password exposure via HIBP API.
|
|
1348
|
-
*/
|
|
1349
|
-
export type ExposedPasswordResult =
|
|
1350
|
-
| { type: "NotChecked" }
|
|
1351
|
-
| { type: "Found"; value: number }
|
|
1352
|
-
| { type: "Error"; value: string };
|
|
1353
|
-
|
|
1354
|
-
/**
|
|
1355
|
-
* Login cipher data needed for risk evaluation.
|
|
1356
|
-
*/
|
|
1357
|
-
export interface CipherLoginDetails {
|
|
1358
|
-
/**
|
|
1359
|
-
* Cipher ID to identify which cipher in results.
|
|
1360
|
-
*/
|
|
1361
|
-
id: CipherId;
|
|
1362
|
-
/**
|
|
1363
|
-
* The decrypted password to evaluate.
|
|
1364
|
-
*/
|
|
1372
|
+
export interface PasswordHistoryView {
|
|
1365
1373
|
password: string;
|
|
1366
|
-
|
|
1367
|
-
* Username or email (login ciphers only have one field).
|
|
1368
|
-
*/
|
|
1369
|
-
username: string | undefined;
|
|
1374
|
+
lastUsedDate: DateTime<Utc>;
|
|
1370
1375
|
}
|
|
1371
1376
|
|
|
1372
1377
|
export interface PasswordHistory {
|
|
@@ -1374,15 +1379,17 @@ export interface PasswordHistory {
|
|
|
1374
1379
|
lastUsedDate: DateTime<Utc>;
|
|
1375
1380
|
}
|
|
1376
1381
|
|
|
1377
|
-
export interface PasswordHistoryView {
|
|
1378
|
-
password: string;
|
|
1379
|
-
lastUsedDate: DateTime<Utc>;
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
1382
|
export interface AncestorMap {
|
|
1383
1383
|
ancestors: Map<CollectionId, string>;
|
|
1384
1384
|
}
|
|
1385
1385
|
|
|
1386
|
+
export interface TotpError extends Error {
|
|
1387
|
+
name: "TotpError";
|
|
1388
|
+
variant: "InvalidOtpauth" | "MissingSecret" | "Crypto";
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
export function isTotpError(error: any): error is TotpError;
|
|
1392
|
+
|
|
1386
1393
|
export interface TotpResponse {
|
|
1387
1394
|
/**
|
|
1388
1395
|
* Generated TOTP code
|
|
@@ -1394,12 +1401,12 @@ export interface TotpResponse {
|
|
|
1394
1401
|
period: number;
|
|
1395
1402
|
}
|
|
1396
1403
|
|
|
1397
|
-
export interface
|
|
1398
|
-
name: "
|
|
1399
|
-
variant: "
|
|
1404
|
+
export interface EncryptError extends Error {
|
|
1405
|
+
name: "EncryptError";
|
|
1406
|
+
variant: "Crypto" | "MissingUserId";
|
|
1400
1407
|
}
|
|
1401
1408
|
|
|
1402
|
-
export function
|
|
1409
|
+
export function isEncryptError(error: any): error is EncryptError;
|
|
1403
1410
|
|
|
1404
1411
|
export interface DecryptError extends Error {
|
|
1405
1412
|
name: "DecryptError";
|
|
@@ -1408,13 +1415,18 @@ export interface DecryptError extends Error {
|
|
|
1408
1415
|
|
|
1409
1416
|
export function isDecryptError(error: any): error is DecryptError;
|
|
1410
1417
|
|
|
1411
|
-
export interface
|
|
1412
|
-
|
|
1413
|
-
|
|
1418
|
+
export interface Attachment {
|
|
1419
|
+
id: string | undefined;
|
|
1420
|
+
url: string | undefined;
|
|
1421
|
+
size: string | undefined;
|
|
1422
|
+
/**
|
|
1423
|
+
* Readable size, ex: \"4.2 KB\" or \"1.43 GB\
|
|
1424
|
+
*/
|
|
1425
|
+
sizeName: string | undefined;
|
|
1426
|
+
fileName: EncString | undefined;
|
|
1427
|
+
key: EncString | undefined;
|
|
1414
1428
|
}
|
|
1415
1429
|
|
|
1416
|
-
export function isEncryptError(error: any): error is EncryptError;
|
|
1417
|
-
|
|
1418
1430
|
export interface AttachmentView {
|
|
1419
1431
|
id: string | undefined;
|
|
1420
1432
|
url: string | undefined;
|
|
@@ -1437,24 +1449,12 @@ export interface AttachmentView {
|
|
|
1437
1449
|
decryptedKey: string | undefined;
|
|
1438
1450
|
}
|
|
1439
1451
|
|
|
1440
|
-
export interface
|
|
1441
|
-
id: string | undefined;
|
|
1442
|
-
url: string | undefined;
|
|
1443
|
-
size: string | undefined;
|
|
1444
|
-
/**
|
|
1445
|
-
* Readable size, ex: \"4.2 KB\" or \"1.43 GB\
|
|
1446
|
-
*/
|
|
1447
|
-
sizeName: string | undefined;
|
|
1448
|
-
fileName: EncString | undefined;
|
|
1449
|
-
key: EncString | undefined;
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
export interface LocalDataView {
|
|
1452
|
+
export interface LocalData {
|
|
1453
1453
|
lastUsedDate: DateTime<Utc> | undefined;
|
|
1454
1454
|
lastLaunched: DateTime<Utc> | undefined;
|
|
1455
1455
|
}
|
|
1456
1456
|
|
|
1457
|
-
export interface
|
|
1457
|
+
export interface LocalDataView {
|
|
1458
1458
|
lastUsedDate: DateTime<Utc> | undefined;
|
|
1459
1459
|
lastLaunched: DateTime<Utc> | undefined;
|
|
1460
1460
|
}
|
|
@@ -1474,6 +1474,21 @@ export interface GetCipherError extends Error {
|
|
|
1474
1474
|
|
|
1475
1475
|
export function isGetCipherError(error: any): error is GetCipherError;
|
|
1476
1476
|
|
|
1477
|
+
export interface EditCipherError extends Error {
|
|
1478
|
+
name: "EditCipherError";
|
|
1479
|
+
variant:
|
|
1480
|
+
| "ItemNotFound"
|
|
1481
|
+
| "Crypto"
|
|
1482
|
+
| "Api"
|
|
1483
|
+
| "VaultParse"
|
|
1484
|
+
| "MissingField"
|
|
1485
|
+
| "NotAuthenticated"
|
|
1486
|
+
| "Repository"
|
|
1487
|
+
| "Uuid";
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
export function isEditCipherError(error: any): error is EditCipherError;
|
|
1491
|
+
|
|
1477
1492
|
/**
|
|
1478
1493
|
* Request to edit a cipher.
|
|
1479
1494
|
*/
|
|
@@ -1493,21 +1508,6 @@ export interface CipherEditRequest {
|
|
|
1493
1508
|
key: EncString | undefined;
|
|
1494
1509
|
}
|
|
1495
1510
|
|
|
1496
|
-
export interface EditCipherError extends Error {
|
|
1497
|
-
name: "EditCipherError";
|
|
1498
|
-
variant:
|
|
1499
|
-
| "ItemNotFound"
|
|
1500
|
-
| "Crypto"
|
|
1501
|
-
| "Api"
|
|
1502
|
-
| "VaultParse"
|
|
1503
|
-
| "MissingField"
|
|
1504
|
-
| "NotAuthenticated"
|
|
1505
|
-
| "Repository"
|
|
1506
|
-
| "Uuid";
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
|
-
export function isEditCipherError(error: any): error is EditCipherError;
|
|
1510
|
-
|
|
1511
1511
|
export interface GetOrganizationCiphersAdminError extends Error {
|
|
1512
1512
|
name: "GetOrganizationCiphersAdminError";
|
|
1513
1513
|
variant: "Crypto" | "VaultParse" | "Api";
|
|
@@ -1661,46 +1661,62 @@ export interface FieldView {
|
|
|
1661
1661
|
linkedId: LinkedIdType | undefined;
|
|
1662
1662
|
}
|
|
1663
1663
|
|
|
1664
|
-
export interface
|
|
1665
|
-
username: string | undefined;
|
|
1666
|
-
password: string | undefined;
|
|
1667
|
-
passwordRevisionDate: DateTime<Utc> | undefined;
|
|
1668
|
-
uris: LoginUriView[] | undefined;
|
|
1669
|
-
totp: string | undefined;
|
|
1670
|
-
autofillOnPageLoad: boolean | undefined;
|
|
1671
|
-
fido2Credentials: Fido2Credential[] | undefined;
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
export interface Fido2CredentialNewView {
|
|
1664
|
+
export interface Fido2CredentialFullView {
|
|
1675
1665
|
credentialId: string;
|
|
1676
1666
|
keyType: string;
|
|
1677
1667
|
keyAlgorithm: string;
|
|
1678
1668
|
keyCurve: string;
|
|
1669
|
+
keyValue: string;
|
|
1679
1670
|
rpId: string;
|
|
1680
1671
|
userHandle: string | undefined;
|
|
1681
1672
|
userName: string | undefined;
|
|
1682
1673
|
counter: string;
|
|
1683
1674
|
rpName: string | undefined;
|
|
1684
1675
|
userDisplayName: string | undefined;
|
|
1676
|
+
discoverable: string;
|
|
1685
1677
|
creationDate: DateTime<Utc>;
|
|
1686
1678
|
}
|
|
1687
1679
|
|
|
1688
|
-
export interface
|
|
1680
|
+
export interface Fido2CredentialNewView {
|
|
1689
1681
|
credentialId: string;
|
|
1690
1682
|
keyType: string;
|
|
1691
1683
|
keyAlgorithm: string;
|
|
1692
1684
|
keyCurve: string;
|
|
1693
|
-
keyValue: string;
|
|
1694
1685
|
rpId: string;
|
|
1695
1686
|
userHandle: string | undefined;
|
|
1696
1687
|
userName: string | undefined;
|
|
1697
1688
|
counter: string;
|
|
1698
1689
|
rpName: string | undefined;
|
|
1699
1690
|
userDisplayName: string | undefined;
|
|
1700
|
-
discoverable: string;
|
|
1701
1691
|
creationDate: DateTime<Utc>;
|
|
1702
1692
|
}
|
|
1703
1693
|
|
|
1694
|
+
export interface Login {
|
|
1695
|
+
username: EncString | undefined;
|
|
1696
|
+
password: EncString | undefined;
|
|
1697
|
+
passwordRevisionDate: DateTime<Utc> | undefined;
|
|
1698
|
+
uris: LoginUri[] | undefined;
|
|
1699
|
+
totp: EncString | undefined;
|
|
1700
|
+
autofillOnPageLoad: boolean | undefined;
|
|
1701
|
+
fido2Credentials: Fido2Credential[] | undefined;
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
export interface LoginUriView {
|
|
1705
|
+
uri: string | undefined;
|
|
1706
|
+
match: UriMatchType | undefined;
|
|
1707
|
+
uriChecksum: string | undefined;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
export interface LoginView {
|
|
1711
|
+
username: string | undefined;
|
|
1712
|
+
password: string | undefined;
|
|
1713
|
+
passwordRevisionDate: DateTime<Utc> | undefined;
|
|
1714
|
+
uris: LoginUriView[] | undefined;
|
|
1715
|
+
totp: string | undefined;
|
|
1716
|
+
autofillOnPageLoad: boolean | undefined;
|
|
1717
|
+
fido2Credentials: Fido2Credential[] | undefined;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1704
1720
|
export interface LoginListView {
|
|
1705
1721
|
fido2Credentials: Fido2CredentialListView[] | undefined;
|
|
1706
1722
|
hasFido2: boolean;
|
|
@@ -1712,28 +1728,6 @@ export interface LoginListView {
|
|
|
1712
1728
|
uris: LoginUriView[] | undefined;
|
|
1713
1729
|
}
|
|
1714
1730
|
|
|
1715
|
-
export interface LoginUri {
|
|
1716
|
-
uri: EncString | undefined;
|
|
1717
|
-
match: UriMatchType | undefined;
|
|
1718
|
-
uriChecksum: EncString | undefined;
|
|
1719
|
-
}
|
|
1720
|
-
|
|
1721
|
-
export interface Fido2Credential {
|
|
1722
|
-
credentialId: EncString;
|
|
1723
|
-
keyType: EncString;
|
|
1724
|
-
keyAlgorithm: EncString;
|
|
1725
|
-
keyCurve: EncString;
|
|
1726
|
-
keyValue: EncString;
|
|
1727
|
-
rpId: EncString;
|
|
1728
|
-
userHandle: EncString | undefined;
|
|
1729
|
-
userName: EncString | undefined;
|
|
1730
|
-
counter: EncString;
|
|
1731
|
-
rpName: EncString | undefined;
|
|
1732
|
-
userDisplayName: EncString | undefined;
|
|
1733
|
-
discoverable: EncString;
|
|
1734
|
-
creationDate: DateTime<Utc>;
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
1731
|
export interface Fido2CredentialView {
|
|
1738
1732
|
credentialId: string;
|
|
1739
1733
|
keyType: string;
|
|
@@ -1750,14 +1744,10 @@ export interface Fido2CredentialView {
|
|
|
1750
1744
|
creationDate: DateTime<Utc>;
|
|
1751
1745
|
}
|
|
1752
1746
|
|
|
1753
|
-
export interface
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
uris: LoginUri[] | undefined;
|
|
1758
|
-
totp: EncString | undefined;
|
|
1759
|
-
autofillOnPageLoad: boolean | undefined;
|
|
1760
|
-
fido2Credentials: Fido2Credential[] | undefined;
|
|
1747
|
+
export interface LoginUri {
|
|
1748
|
+
uri: EncString | undefined;
|
|
1749
|
+
match: UriMatchType | undefined;
|
|
1750
|
+
uriChecksum: EncString | undefined;
|
|
1761
1751
|
}
|
|
1762
1752
|
|
|
1763
1753
|
export interface Fido2CredentialListView {
|
|
@@ -1769,10 +1759,20 @@ export interface Fido2CredentialListView {
|
|
|
1769
1759
|
counter: string;
|
|
1770
1760
|
}
|
|
1771
1761
|
|
|
1772
|
-
export interface
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1762
|
+
export interface Fido2Credential {
|
|
1763
|
+
credentialId: EncString;
|
|
1764
|
+
keyType: EncString;
|
|
1765
|
+
keyAlgorithm: EncString;
|
|
1766
|
+
keyCurve: EncString;
|
|
1767
|
+
keyValue: EncString;
|
|
1768
|
+
rpId: EncString;
|
|
1769
|
+
userHandle: EncString | undefined;
|
|
1770
|
+
userName: EncString | undefined;
|
|
1771
|
+
counter: EncString;
|
|
1772
|
+
rpName: EncString | undefined;
|
|
1773
|
+
userDisplayName: EncString | undefined;
|
|
1774
|
+
discoverable: EncString;
|
|
1775
|
+
creationDate: DateTime<Utc>;
|
|
1776
1776
|
}
|
|
1777
1777
|
|
|
1778
1778
|
export interface Cipher {
|
|
@@ -1810,15 +1810,46 @@ export interface Cipher {
|
|
|
1810
1810
|
data: string | undefined;
|
|
1811
1811
|
}
|
|
1812
1812
|
|
|
1813
|
-
|
|
1813
|
+
/**
|
|
1814
|
+
* Represents the result of decrypting a list of ciphers.
|
|
1815
|
+
*
|
|
1816
|
+
* This struct contains two vectors: `successes` and `failures`.
|
|
1817
|
+
* `successes` contains the decrypted `CipherListView` objects,
|
|
1818
|
+
* while `failures` contains the original `Cipher` objects that failed to decrypt.
|
|
1819
|
+
*/
|
|
1820
|
+
export interface DecryptCipherListResult {
|
|
1814
1821
|
/**
|
|
1815
|
-
* The
|
|
1816
|
-
* Organization-owned ciphers
|
|
1822
|
+
* The decrypted `CipherListView` objects.
|
|
1817
1823
|
*/
|
|
1818
|
-
|
|
1819
|
-
|
|
1824
|
+
successes: CipherListView[];
|
|
1825
|
+
/**
|
|
1826
|
+
* The original `Cipher` objects that failed to decrypt.
|
|
1827
|
+
*/
|
|
1828
|
+
failures: Cipher[];
|
|
1820
1829
|
}
|
|
1821
1830
|
|
|
1831
|
+
export interface CipherError extends Error {
|
|
1832
|
+
name: "CipherError";
|
|
1833
|
+
variant:
|
|
1834
|
+
| "MissingField"
|
|
1835
|
+
| "Crypto"
|
|
1836
|
+
| "Decrypt"
|
|
1837
|
+
| "Encrypt"
|
|
1838
|
+
| "AttachmentsWithoutKeys"
|
|
1839
|
+
| "OrganizationAlreadySet"
|
|
1840
|
+
| "Repository"
|
|
1841
|
+
| "Chrono"
|
|
1842
|
+
| "SerdeJson"
|
|
1843
|
+
| "Api";
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
export function isCipherError(error: any): error is CipherError;
|
|
1847
|
+
|
|
1848
|
+
/**
|
|
1849
|
+
* NewType wrapper for `CipherId`
|
|
1850
|
+
*/
|
|
1851
|
+
export type CipherId = Tagged<Uuid, "CipherId">;
|
|
1852
|
+
|
|
1822
1853
|
/**
|
|
1823
1854
|
* Available fields on a cipher and can be copied from a the list view in the UI.
|
|
1824
1855
|
*/
|
|
@@ -1835,10 +1866,14 @@ export type CopyableCipherFields =
|
|
|
1835
1866
|
| "SshKey"
|
|
1836
1867
|
| "SecureNotes";
|
|
1837
1868
|
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1869
|
+
export interface EncryptionContext {
|
|
1870
|
+
/**
|
|
1871
|
+
* The Id of the user that encrypted the cipher. It should always represent a UserId, even for
|
|
1872
|
+
* Organization-owned ciphers
|
|
1873
|
+
*/
|
|
1874
|
+
encryptedFor: UserId;
|
|
1875
|
+
cipher: Cipher;
|
|
1876
|
+
}
|
|
1842
1877
|
|
|
1843
1878
|
export type CipherListViewType =
|
|
1844
1879
|
| { login: LoginListView }
|
|
@@ -1880,23 +1915,6 @@ export interface CipherView {
|
|
|
1880
1915
|
archivedDate: DateTime<Utc> | undefined;
|
|
1881
1916
|
}
|
|
1882
1917
|
|
|
1883
|
-
export interface CipherError extends Error {
|
|
1884
|
-
name: "CipherError";
|
|
1885
|
-
variant:
|
|
1886
|
-
| "MissingField"
|
|
1887
|
-
| "Crypto"
|
|
1888
|
-
| "Decrypt"
|
|
1889
|
-
| "Encrypt"
|
|
1890
|
-
| "AttachmentsWithoutKeys"
|
|
1891
|
-
| "OrganizationAlreadySet"
|
|
1892
|
-
| "Repository"
|
|
1893
|
-
| "Chrono"
|
|
1894
|
-
| "SerdeJson"
|
|
1895
|
-
| "Api";
|
|
1896
|
-
}
|
|
1897
|
-
|
|
1898
|
-
export function isCipherError(error: any): error is CipherError;
|
|
1899
|
-
|
|
1900
1918
|
export interface CipherListView {
|
|
1901
1919
|
id: CipherId | undefined;
|
|
1902
1920
|
organizationId: OrganizationId | undefined;
|
|
@@ -1934,22 +1952,19 @@ export interface CipherListView {
|
|
|
1934
1952
|
localData: LocalDataView | undefined;
|
|
1935
1953
|
}
|
|
1936
1954
|
|
|
1937
|
-
|
|
1938
|
-
* Represents the result of decrypting a list of ciphers.
|
|
1939
|
-
*
|
|
1940
|
-
* This struct contains two vectors: `successes` and `failures`.
|
|
1941
|
-
* `successes` contains the decrypted `CipherListView` objects,
|
|
1942
|
-
* while `failures` contains the original `Cipher` objects that failed to decrypt.
|
|
1943
|
-
*/
|
|
1944
|
-
export interface DecryptCipherListResult {
|
|
1955
|
+
export interface SshKeyView {
|
|
1945
1956
|
/**
|
|
1946
|
-
*
|
|
1957
|
+
* SSH private key (ed25519/rsa) in unencrypted openssh private key format [OpenSSH private key](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key)
|
|
1947
1958
|
*/
|
|
1948
|
-
|
|
1959
|
+
privateKey: string;
|
|
1949
1960
|
/**
|
|
1950
|
-
*
|
|
1961
|
+
* SSH public key (ed25519/rsa) according to [RFC4253](https://datatracker.ietf.org/doc/html/rfc4253#section-6.6)
|
|
1951
1962
|
*/
|
|
1952
|
-
|
|
1963
|
+
publicKey: string;
|
|
1964
|
+
/**
|
|
1965
|
+
* SSH fingerprint using SHA256 in the format: `SHA256:BASE64_ENCODED_FINGERPRINT`
|
|
1966
|
+
*/
|
|
1967
|
+
fingerprint: string;
|
|
1953
1968
|
}
|
|
1954
1969
|
|
|
1955
1970
|
export interface SshKey {
|
|
@@ -1967,19 +1982,25 @@ export interface SshKey {
|
|
|
1967
1982
|
fingerprint: EncString;
|
|
1968
1983
|
}
|
|
1969
1984
|
|
|
1970
|
-
export interface
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1985
|
+
export interface IdentityView {
|
|
1986
|
+
title: string | undefined;
|
|
1987
|
+
firstName: string | undefined;
|
|
1988
|
+
middleName: string | undefined;
|
|
1989
|
+
lastName: string | undefined;
|
|
1990
|
+
address1: string | undefined;
|
|
1991
|
+
address2: string | undefined;
|
|
1992
|
+
address3: string | undefined;
|
|
1993
|
+
city: string | undefined;
|
|
1994
|
+
state: string | undefined;
|
|
1995
|
+
postalCode: string | undefined;
|
|
1996
|
+
country: string | undefined;
|
|
1997
|
+
company: string | undefined;
|
|
1998
|
+
email: string | undefined;
|
|
1999
|
+
phone: string | undefined;
|
|
2000
|
+
ssn: string | undefined;
|
|
2001
|
+
username: string | undefined;
|
|
2002
|
+
passportNumber: string | undefined;
|
|
2003
|
+
licenseNumber: string | undefined;
|
|
1983
2004
|
}
|
|
1984
2005
|
|
|
1985
2006
|
export interface Identity {
|
|
@@ -2003,34 +2024,12 @@ export interface Identity {
|
|
|
2003
2024
|
licenseNumber: EncString | undefined;
|
|
2004
2025
|
}
|
|
2005
2026
|
|
|
2006
|
-
export interface IdentityView {
|
|
2007
|
-
title: string | undefined;
|
|
2008
|
-
firstName: string | undefined;
|
|
2009
|
-
middleName: string | undefined;
|
|
2010
|
-
lastName: string | undefined;
|
|
2011
|
-
address1: string | undefined;
|
|
2012
|
-
address2: string | undefined;
|
|
2013
|
-
address3: string | undefined;
|
|
2014
|
-
city: string | undefined;
|
|
2015
|
-
state: string | undefined;
|
|
2016
|
-
postalCode: string | undefined;
|
|
2017
|
-
country: string | undefined;
|
|
2018
|
-
company: string | undefined;
|
|
2019
|
-
email: string | undefined;
|
|
2020
|
-
phone: string | undefined;
|
|
2021
|
-
ssn: string | undefined;
|
|
2022
|
-
username: string | undefined;
|
|
2023
|
-
passportNumber: string | undefined;
|
|
2024
|
-
licenseNumber: string | undefined;
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
2027
|
export type LinkedIdType = LoginLinkedIdType | CardLinkedIdType | IdentityLinkedIdType;
|
|
2028
2028
|
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
}
|
|
2029
|
+
/**
|
|
2030
|
+
* NewType wrapper for `FolderId`
|
|
2031
|
+
*/
|
|
2032
|
+
export type FolderId = Tagged<Uuid, "FolderId">;
|
|
2034
2033
|
|
|
2035
2034
|
export interface FolderView {
|
|
2036
2035
|
id: FolderId | undefined;
|
|
@@ -2038,10 +2037,11 @@ export interface FolderView {
|
|
|
2038
2037
|
revisionDate: DateTime<Utc>;
|
|
2039
2038
|
}
|
|
2040
2039
|
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2040
|
+
export interface Folder {
|
|
2041
|
+
id: FolderId | undefined;
|
|
2042
|
+
name: EncString;
|
|
2043
|
+
revisionDate: DateTime<Utc>;
|
|
2044
|
+
}
|
|
2045
2045
|
|
|
2046
2046
|
export interface EditFolderError extends Error {
|
|
2047
2047
|
name: "EditFolderError";
|