@@ -1,530 +1,648 @@
1module BW.Types where
1module BW.Types where
3import Prelude
3import Prelude
5import Data.ArrayBuffer.Types (ArrayBuffer)
4import Data.ArrayBuffer.Types (ArrayBuffer)
6import Data.Date (Date)
5import Data.Date (Date)
7import Data.Nullable (Nullable)
6import Data.Nullable (Nullable)
8import Data.ShowableJson (ShowableJson)
7import Data.ShowableJson (ShowableJson)
9import Data.Undefined.NoProblem (Opt)
8import Data.Undefined.NoProblem (Opt)
10+newtype EncryptedString
11+ = EncryptedString String
13+derive newtype instance Show EncryptedString
11kdfPBKDF2_SHA256 = 0 :: KDF
15kdfPBKDF2_SHA256 = 0 :: KDF
12−type KDF = Int
17+type KDF
14−type PreloginResponse = {
20+type PreloginResponse
15− kdf :: KDF,
21+ = { kdf :: KDF
16− kdfIterations :: Int
22+ , kdfIterations :: Int
19−type PreloginRequest = {
25+type PreloginRequest
20− email :: String
26+ = { email :: String
23−type ProfileResponse = {
29+type ProfileResponse
24− id :: String,
30+ = { id :: String
25− name :: String,
31+ , name :: String
26− email :: String,
32+ , email :: String
27− emailVerified :: Boolean,
33+ , emailVerified :: Boolean
28− masterPasswordHint :: String,
34+ , masterPasswordHint :: String
29− premiumPersonally :: Boolean,
35+ , premiumPersonally :: Boolean
30− premiumFromOrganization :: Boolean,
36+ , premiumFromOrganization :: Boolean
31− culture :: String,
37+ , culture :: String
32− twoFactorEnabled :: Boolean,
38+ , twoFactorEnabled :: Boolean
33− key :: String,
39+ , key :: EncryptedString
34− privateKey :: String,
40+ , privateKey :: EncryptedString
35− securityStamp :: String,
41+ , securityStamp :: String
36− forcePasswordReset :: Boolean,
42+ , forcePasswordReset :: Boolean
37− usesKeyConnector :: Boolean,
43+ , usesKeyConnector :: Boolean
38− organizations :: Array ProfileOrganizationResponse,
44+ , organizations :: Array ProfileOrganizationResponse
39− providers :: Array ProfileProviderResponse,
45+ , providers :: Array ProfileProviderResponse
40− providerOrganizations :: Array ProfileProviderOrganizationResponse
46+ , providerOrganizations :: Array ProfileProviderOrganizationResponse
43−type ProfileOrganizationResponse = {
49+type ProfileOrganizationResponse
44− id :: String,
50+ = { id :: String
45− name :: String,
51+ , name :: String
46− usePolicies :: Boolean,
52+ , usePolicies :: Boolean
47− useGroups :: Boolean,
53+ , useGroups :: Boolean
48− useDirectory :: Boolean,
54+ , useDirectory :: Boolean
49− useEvents :: Boolean,
55+ , useEvents :: Boolean
50− useTotp :: Boolean,
56+ , useTotp :: Boolean
51− use2fa :: Boolean,
57+ , use2fa :: Boolean
52− useApi :: Boolean,
58+ , useApi :: Boolean
53− useSso :: Boolean,
59+ , useSso :: Boolean
54− useKeyConnector :: Boolean,
60+ , useKeyConnector :: Boolean
55− useResetPassword :: Boolean,
61+ , useResetPassword :: Boolean
56− selfHost :: Boolean,
62+ , selfHost :: Boolean
57− usersGetPremium :: Boolean,
63+ , usersGetPremium :: Boolean
58− seats :: Int,
64+ , seats :: Int
59− maxCollections :: Int,
65+ , maxCollections :: Int
60− maxStorageGb :: Nullable Int,
66+ , maxStorageGb :: Nullable Int
61− key :: String,
67+ , key :: String
62− hasPublicAndPrivateKeys :: Boolean,
68+ , hasPublicAndPrivateKeys :: Boolean
63− status :: OrganizationUserStatusType,
69+ , status :: OrganizationUserStatusType
64− type :: OrganizationUserType,
70+ , type :: OrganizationUserType
65− enabled :: Boolean,
71+ , enabled :: Boolean
66− ssoBound :: Boolean,
72+ , ssoBound :: Boolean
67− identifier :: String,
73+ , identifier :: String
68− permissions :: PermissionsApi,
74+ , permissions :: PermissionsApi
69− resetPasswordEnrolled :: Boolean,
75+ , resetPasswordEnrolled :: Boolean
70− userId :: String,
76+ , userId :: String
71− providerId :: String,
77+ , providerId :: String
72− providerName :: String,
78+ , providerName :: String
73− familySponsorshipFriendlyName :: String,
79+ , familySponsorshipFriendlyName :: String
74− familySponsorshipAvailable :: Boolean,
80+ , familySponsorshipAvailable :: Boolean
75− planProductType :: ProductType,
81+ , planProductType :: ProductType
76− keyConnectorEnabled :: Boolean,
82+ , keyConnectorEnabled :: Boolean
77− keyConnectorUrl :: String,
83+ , keyConnectorUrl :: String
78− familySponsorshipLastSyncDate :: Nullable Date,
84+ , familySponsorshipLastSyncDate :: Nullable Date
79− familySponsorshipValidUntil :: Nullable Date,
85+ , familySponsorshipValidUntil :: Nullable Date
80− familySponsorshipToDelete :: Nullable Boolean
86+ , familySponsorshipToDelete :: Nullable Boolean
83organizationUserStatusTypeInvited = 0 :: OrganizationUserStatusType
89organizationUserStatusTypeInvited = 0 :: OrganizationUserStatusType
84organizationUserStatusTypeAccepted = 0 :: OrganizationUserStatusType
91organizationUserStatusTypeAccepted = 0 :: OrganizationUserStatusType
85organizationUserStatusTypeConfirmed = 0 :: OrganizationUserStatusType
93organizationUserStatusTypeConfirmed = 0 :: OrganizationUserStatusType
86−type OrganizationUserStatusType = Int
95+type OrganizationUserStatusType
88organizationUserTypeOwner = 0 :: OrganizationUserType
98organizationUserTypeOwner = 0 :: OrganizationUserType
89organizationUserTypeAdmin = 1 :: OrganizationUserType
100organizationUserTypeAdmin = 1 :: OrganizationUserType
90organizationUserTypeUser = 2 :: OrganizationUserType
102organizationUserTypeUser = 2 :: OrganizationUserType
91organizationUserTypeManager = 3 :: OrganizationUserType
104organizationUserTypeManager = 3 :: OrganizationUserType
92organizationUserTypeCustom = 4 :: OrganizationUserType
106organizationUserTypeCustom = 4 :: OrganizationUserType
93−type OrganizationUserType = Int
108+type OrganizationUserType
95−type PermissionsApi = {
111+type PermissionsApi
96− accessEventLogs :: Boolean,
112+ = { accessEventLogs :: Boolean
97− accessImportExport :: Boolean,
113+ , accessImportExport :: Boolean
98− accessReports :: Boolean,
114+ , accessReports :: Boolean
99− manageAllCollections :: Boolean,
115+ , manageAllCollections :: Boolean
100− createNewCollections :: Boolean,
116+ , createNewCollections :: Boolean
101− editAnyCollection :: Boolean,
117+ , editAnyCollection :: Boolean
102− deleteAnyCollection :: Boolean,
118+ , deleteAnyCollection :: Boolean
103− manageAssignedCollections :: Boolean,
119+ , manageAssignedCollections :: Boolean
104− editAssignedCollections :: Boolean,
120+ , editAssignedCollections :: Boolean
105− deleteAssignedCollections :: Boolean,
121+ , deleteAssignedCollections :: Boolean
106− manageCiphers :: Boolean,
122+ , manageCiphers :: Boolean
107− manageGroups :: Boolean,
123+ , manageGroups :: Boolean
108− manageSso :: Boolean,
124+ , manageSso :: Boolean
109− managePolicies :: Boolean,
125+ , managePolicies :: Boolean
110− manageUsers :: Boolean,
126+ , manageUsers :: Boolean
111− manageResetPassword :: Boolean
127+ , manageResetPassword :: Boolean
114productTypeFree = 0 :: ProductType
130productTypeFree = 0 :: ProductType
115productTypeFamilies = 1 :: ProductType
132productTypeFamilies = 1 :: ProductType
116productTypeTeams = 2 :: ProductType
134productTypeTeams = 2 :: ProductType
117productTypeEnterprise = 3 :: ProductType
136productTypeEnterprise = 3 :: ProductType
118−type ProductType = Int
138+type ProductType
120−type ProfileProviderResponse = {
141+type ProfileProviderResponse
121− id :: String,
142+ = { id :: String
122− name :: String,
143+ , name :: String
123− key :: String,
144+ , key :: String
124− status :: ProviderUserStatusType,
145+ , status :: ProviderUserStatusType
125− type :: ProviderUserType,
146+ , type :: ProviderUserType
126− enabled :: Boolean,
147+ , enabled :: Boolean
127− permissions :: PermissionsApi,
148+ , permissions :: PermissionsApi
128− userId :: String,
149+ , userId :: String
129− useEvents :: Boolean
150+ , useEvents :: Boolean
132providerUserStatusTypeInvited = 0 :: ProviderUserStatusType
153providerUserStatusTypeInvited = 0 :: ProviderUserStatusType
133providerUserStatusTypeAccepted = 1 :: ProviderUserStatusType
155providerUserStatusTypeAccepted = 1 :: ProviderUserStatusType
134providerUserStatusTypeConfirmed = 2 :: ProviderUserStatusType
157providerUserStatusTypeConfirmed = 2 :: ProviderUserStatusType
135−type ProviderUserStatusType = Int
159+type ProviderUserStatusType
137providerUserTypeProviderAdmin = 0 :: ProviderUserType
162providerUserTypeProviderAdmin = 0 :: ProviderUserType
138providerUserTypeServiceUser = 1 :: ProviderUserType
164providerUserTypeServiceUser = 1 :: ProviderUserType
139−type ProviderUserType = Int
166+type ProviderUserType
141−type ProfileProviderOrganizationResponse = {
169+type ProfileProviderOrganizationResponse
142− id :: String,
170+ = { id :: String
143− name :: String,
171+ , name :: String
144− usePolicies :: Boolean,
172+ , usePolicies :: Boolean
145− useGroups :: Boolean,
173+ , useGroups :: Boolean
146− useDirectory :: Boolean,
174+ , useDirectory :: Boolean
147− useEvents :: Boolean,
175+ , useEvents :: Boolean
148− useTotp :: Boolean,
176+ , useTotp :: Boolean
149− use2fa :: Boolean,
177+ , use2fa :: Boolean
150− useApi :: Boolean,
178+ , useApi :: Boolean
151− useSso :: Boolean,
179+ , useSso :: Boolean
152− useKeyConnector :: Boolean,
180+ , useKeyConnector :: Boolean
153− useResetPassword :: Boolean,
181+ , useResetPassword :: Boolean
154− selfHost :: Boolean,
182+ , selfHost :: Boolean
155− usersGetPremium :: Boolean,
183+ , usersGetPremium :: Boolean
156− seats :: Int,
184+ , seats :: Int
157− maxCollections :: Int,
185+ , maxCollections :: Int
158− maxStorageGb :: Nullable Int,
186+ , maxStorageGb :: Nullable Int
159− key :: String,
187+ , key :: String
160− hasPublicAndPrivateKeys :: Boolean,
188+ , hasPublicAndPrivateKeys :: Boolean
161− status :: OrganizationUserStatusType,
189+ , status :: OrganizationUserStatusType
162− type :: OrganizationUserType,
190+ , type :: OrganizationUserType
163− enabled :: Boolean,
191+ , enabled :: Boolean
164− ssoBound :: Boolean,
192+ , ssoBound :: Boolean
165− identifier :: String,
193+ , identifier :: String
166− permissions :: PermissionsApi,
194+ , permissions :: PermissionsApi
167− resetPasswordEnrolled :: Boolean,
195+ , resetPasswordEnrolled :: Boolean
168− userId :: String,
196+ , userId :: String
169− providerId :: String,
197+ , providerId :: String
170− providerName :: String,
198+ , providerName :: String
171− familySponsorshipFriendlyName :: String,
199+ , familySponsorshipFriendlyName :: String
172− familySponsorshipAvailable :: Boolean,
200+ , familySponsorshipAvailable :: Boolean
173− planProductType :: ProductType,
201+ , planProductType :: ProductType
174− keyConnectorEnabled :: Boolean,
202+ , keyConnectorEnabled :: Boolean
175− keyConnectorUrl :: String,
203+ , keyConnectorUrl :: String
176− familySponsorshipLastSyncDate :: Nullable Date,
204+ , familySponsorshipLastSyncDate :: Nullable Date
177− familySponsorshipValidUntil :: Nullable Date,
205+ , familySponsorshipValidUntil :: Nullable Date
178− familySponsorshipToDelete :: Nullable Boolean
206+ , familySponsorshipToDelete :: Nullable Boolean
181−type Urls = {
209+type Urls
182− base :: Nullable String,
210+ = { base :: Nullable String
183− webVault :: Nullable String,
211+ , webVault :: Nullable String
184− api :: Nullable String,
212+ , api :: Nullable String
185− identity :: Nullable String,
213+ , identity :: Nullable String
186− icons :: Nullable String,
214+ , icons :: Nullable String
187− notifications :: Nullable String,
215+ , notifications :: Nullable String
188− events :: Nullable String,
216+ , events :: Nullable String
189− keyConnector :: Nullable String
217+ , keyConnector :: Nullable String
192−type PasswordTokenRequest = {
220+type PasswordTokenRequest
193− email :: Email,
221+ = { email :: Email
194− masterPasswordHash :: String,
222+ , masterPasswordHash :: String
195− captchaResponse :: String,
223+ , captchaResponse :: String
196− twoFactor :: TokenRequestTwoFactor,
224+ , twoFactor :: TokenRequestTwoFactor
197− device :: DeviceRequest
225+ , device :: DeviceRequest
200−type DeviceRequest = {
228+type DeviceRequest
201− type :: DeviceType,
229+ = { type :: DeviceType
202− name :: String,
230+ , name :: String
203− identifier :: String,
231+ , identifier :: String
204− pushToken :: Nullable String
232+ , pushToken :: Nullable String
207deviceTypeAndroid = 0 :: DeviceType
235deviceTypeAndroid = 0 :: DeviceType
208deviceTypeiOS = 1 :: DeviceType
237deviceTypeiOS = 1 :: DeviceType
209deviceTypeChromeExtension = 2 :: DeviceType
239deviceTypeChromeExtension = 2 :: DeviceType
210deviceTypeFirefoxExtension = 3 :: DeviceType
241deviceTypeFirefoxExtension = 3 :: DeviceType
211deviceTypeOperaExtension = 4 :: DeviceType
243deviceTypeOperaExtension = 4 :: DeviceType
212deviceTypeEdgeExtension = 5 :: DeviceType
245deviceTypeEdgeExtension = 5 :: DeviceType
213deviceTypeWindowsDesktop = 6 :: DeviceType
247deviceTypeWindowsDesktop = 6 :: DeviceType
214deviceTypeMacOsDesktop = 7 :: DeviceType
249deviceTypeMacOsDesktop = 7 :: DeviceType
215deviceTypeLinuxDesktop = 8 :: DeviceType
251deviceTypeLinuxDesktop = 8 :: DeviceType
216deviceTypeChromeBrowser = 9 :: DeviceType
253deviceTypeChromeBrowser = 9 :: DeviceType
217deviceTypeFirefoxBrowser = 10 :: DeviceType
255deviceTypeFirefoxBrowser = 10 :: DeviceType
218deviceTypeOperaBrowser = 11 :: DeviceType
257deviceTypeOperaBrowser = 11 :: DeviceType
219deviceTypeEdgeBrowser = 12 :: DeviceType
259deviceTypeEdgeBrowser = 12 :: DeviceType
220deviceTypeIEBrowser = 13 :: DeviceType
261deviceTypeIEBrowser = 13 :: DeviceType
221deviceTypeUnknownBrowser = 14 :: DeviceType
263deviceTypeUnknownBrowser = 14 :: DeviceType
222deviceTypeAndroidAmazon = 15 :: DeviceType
265deviceTypeAndroidAmazon = 15 :: DeviceType
223deviceTypeUWP = 16 :: DeviceType
267deviceTypeUWP = 16 :: DeviceType
224deviceTypeSafariBrowser = 17 :: DeviceType
269deviceTypeSafariBrowser = 17 :: DeviceType
225deviceTypeVivaldiBrowser = 18 :: DeviceType
271deviceTypeVivaldiBrowser = 18 :: DeviceType
226deviceTypeVivaldiExtension = 19 :: DeviceType
273deviceTypeVivaldiExtension = 19 :: DeviceType
227deviceTypeSafariExtension = 20 :: DeviceType
275deviceTypeSafariExtension = 20 :: DeviceType
228−type DeviceType = Int
230−type TokenRequestTwoFactor = {
280+type TokenRequestTwoFactor
231− provider :: TwoFactorProviderType,
281+ = { provider :: TwoFactorProviderType
232− token :: String,
282+ , token :: String
233− remember :: Boolean
283+ , remember :: Boolean
236twoFactorProviderTypeAuthenticator = 0 :: TwoFactorProviderType
286twoFactorProviderTypeAuthenticator = 0 :: TwoFactorProviderType
237twoFactorProviderTypeEmail = 1 :: TwoFactorProviderType
288twoFactorProviderTypeEmail = 1 :: TwoFactorProviderType
238twoFactorProviderTypeDuo = 2 :: TwoFactorProviderType
290twoFactorProviderTypeDuo = 2 :: TwoFactorProviderType
239twoFactorProviderTypeYubikey = 3 :: TwoFactorProviderType
292twoFactorProviderTypeYubikey = 3 :: TwoFactorProviderType
240twoFactorProviderTypeU2f = 4 :: TwoFactorProviderType
294twoFactorProviderTypeU2f = 4 :: TwoFactorProviderType
241twoFactorProviderTypeRemember = 5 :: TwoFactorProviderType
296twoFactorProviderTypeRemember = 5 :: TwoFactorProviderType
242twoFactorProviderTypeOrganizationDuo = 6 :: TwoFactorProviderType
298twoFactorProviderTypeOrganizationDuo = 6 :: TwoFactorProviderType
243twoFactorProviderTypeWebAuthn = 7 :: TwoFactorProviderType
300twoFactorProviderTypeWebAuthn = 7 :: TwoFactorProviderType
244−type TwoFactorProviderType = Int
302+type TwoFactorProviderType
247−type SymmetricCryptoKey = {
249− encKey :: Nullable ArrayBuffer,
250− macKey :: Nullable ArrayBuffer,
251− encType :: EncryptionType,
253− encKeyB64 :: String,
257−encryptionTypeAesCbc256_B64 = 0 :: EncryptionType
258−encryptionTypeAesCbc128_HmacSha256_B64 = 1 :: EncryptionType
259−encryptionTypeAesCbc256_HmacSha256_B64 = 2 :: EncryptionType
260−encryptionTypeRsa2048_OaepSha256_B64 = 3 :: EncryptionType
261−encryptionTypeRsa2048_OaepSha1_B64 = 4 :: EncryptionType
262−encryptionTypeRsa2048_OaepSha256_HmacSha256_B64 = 5 :: EncryptionType
263−encryptionTypeRsa2048_OaepSha1_HmacSha256_B64 = 6 :: EncryptionType
264−type EncryptionType = Int
266−newtype Password = Password String
305+newtype Password
268hashPurposeServerAuthorization = 1 :: HashPurpose
308hashPurposeServerAuthorization = 1 :: HashPurpose
269hashPurposeLocalAuthorization = 2 :: HashPurpose
310hashPurposeLocalAuthorization = 2 :: HashPurpose
270−type HashPurpose = Int
312+type HashPurpose
272−newtype Hash = Hash String
315+newtype Hash
274−newtype AccessToken = AccessToken String
318+newtype AccessToken
319+ = AccessToken String
321+derive newtype instance Show AccessToken
275−newtype RefreshToken = RefreshToken String
323+newtype RefreshToken
276−
324+ = RefreshToken String
326+derive newtype instance Show RefreshToken
277−type IdentityTokenResponse = {
329+type IdentityTokenResponse
278− accessToken :: AccessToken,
330+ = { accessToken :: AccessToken
279− expiresIn :: Int,
331+ , expiresIn :: Int
280− refreshToken :: RefreshToken,
332+ , refreshToken :: RefreshToken
281− tokenType :: String,
333+ , tokenType :: String
282− resetMasterPassword :: Boolean,
334+ , resetMasterPassword :: Boolean
283− privateKey :: String,
335+ , privateKey :: EncryptedString
284− key :: String,
336+ , key :: EncryptedString
285− twoFactorToken :: Nullable String,
337+ , twoFactorToken :: Nullable String
286− kdf :: KDF,
338+ , kdf :: KDF
287− kdfIterations :: Int,
339+ , kdfIterations :: Int
288− forcePasswordReset :: Nullable Boolean,
340+ , forcePasswordReset :: Nullable Boolean
289− apiUseKeyConnector :: Nullable Boolean,
341+ , apiUseKeyConnector :: Nullable Boolean
290− keyConnectorUrl :: Nullable String
342+ , keyConnectorUrl :: Nullable String
293−newtype Email = Email String
345+newtype Email
295−type SyncResponse = {
348+type SyncResponse
296− profile :: Nullable ProfileResponse,
349+ = { profile :: ProfileResponse
297− folders :: Array FolderResponse,
350+ , folders :: Array FolderResponse
298− collections :: Array CollectionDetailsResponse,
351+ , collections :: Array CollectionDetailsResponse
299− ciphers :: Array CipherResponse,
352+ , ciphers :: Array CipherResponse
300− domains :: Nullable DomainsResponse,
353+ , domains :: Nullable DomainsResponse
301− policies :: Nullable (Array PolicyResponse),
354+ , policies :: Nullable (Array PolicyResponse)
302− sends :: Array SendResponse
355+ , sends :: Array SendResponse
305−type FolderResponse = {
358+type FolderResponse
306− id :: String,
359+ = { id :: String
307− name :: String,
360+ , name :: String
308− revisionDate :: String
361+ , revisionDate :: String
311−type CollectionDetailsResponse = {
364+type CollectionDetailsResponse
312− id :: String,
365+ = { id :: String
313− organizationId :: Nullable String,
366+ , organizationId :: Nullable String
314− name :: String,
367+ , name :: String
315− externalId :: Nullable String,
368+ , externalId :: Nullable String
316− readOnly :: Boolean
369+ , readOnly :: Boolean
319−type CipherResponse = {
372+type CipherResponse
320− id :: String,
373+ = { id :: String
321− organizationId :: Nullable String,
374+ , organizationId :: Nullable String
322− folderId :: Nullable String,
375+ , folderId :: Nullable String
323− type :: CipherType,
376+ , type :: CipherType
324− name :: String,
377+ , name :: EncryptedString
325− notes :: Nullable String,
378+ , notes :: Nullable EncryptedString
326− fields :: Nullable (Array FieldApi),
379+ , fields :: Nullable (Array FieldApi)
327− login :: Nullable LoginApi,
380+ , login :: Nullable LoginApi
328− card :: Nullable CardApi,
381+ , card :: Nullable CardApi
329− identity :: Nullable IdentityApi,
382+ , identity :: Nullable IdentityApi
330− secureNote :: Nullable SecureNoteApi,
383+ , secureNote :: Nullable SecureNoteApi
331− favorite :: Boolean,
384+ , favorite :: Boolean
332− edit :: Boolean,
385+ , edit :: Boolean
333− viewPassword :: Boolean,
386+ , viewPassword :: Boolean
334− organizationUseTotp :: Boolean,
387+ , organizationUseTotp :: Boolean
335− revisionDate :: String,
388+ , revisionDate :: String
336− attachments :: Nullable (Array AttachmentResponse),
389+ , attachments :: Nullable (Array AttachmentResponse)
337− passwordHistory :: Nullable (Array PasswordHistoryResponse),
390+ , passwordHistory :: Nullable (Array PasswordHistoryResponse)
338− collectionIds :: Nullable (Array String),
391+ , collectionIds :: Nullable (Array String)
339− deletedDate :: Nullable String,
392+ , deletedDate :: Nullable String
340− reprompt :: CipherRepromptType
393+ , reprompt :: CipherRepromptType
343cipherTypeLogin = 1 :: CipherType
396cipherTypeLogin = 1 :: CipherType
344cipherTypeSecureNote = 2 :: CipherType
398cipherTypeSecureNote = 2 :: CipherType
345cipherTypeCard = 3 :: CipherType
400cipherTypeCard = 3 :: CipherType
346cipherTypeIdentity = 4 :: CipherType
402cipherTypeIdentity = 4 :: CipherType
347−type CipherType = Int
349−type FieldApi = {
407+type FieldApi
350− name :: String,
408+ = { name :: String
351− value :: String,
409+ , value :: String
352− type :: FieldType,
410+ , type :: FieldType
353− linkedId :: Nullable LinkedIdType
411+ , linkedId :: Nullable LinkedIdType
356fieldTypeText = 0 :: FieldType
414fieldTypeText = 0 :: FieldType
357fieldTypeHidden = 1 :: FieldType
416fieldTypeHidden = 1 :: FieldType
358fieldTypeBoolean = 2 :: FieldType
418fieldTypeBoolean = 2 :: FieldType
359fieldTypeLinked = 3 :: FieldType
420fieldTypeLinked = 3 :: FieldType
360−type FieldType = Int
422+type FieldType
362linkedIdTypeLoginLinkedIdUsername = 100 :: LinkedIdType
425linkedIdTypeLoginLinkedIdUsername = 100 :: LinkedIdType
363linkedIdTypeLoginLinkedIdPassword = 101 :: LinkedIdType
427linkedIdTypeLoginLinkedIdPassword = 101 :: LinkedIdType
364linkedIdTypeCardLinkedIdCardholderName = 300 :: LinkedIdType
429linkedIdTypeCardLinkedIdCardholderName = 300 :: LinkedIdType
365linkedIdTypeCardLinkedIdExpMonth = 301 :: LinkedIdType
431linkedIdTypeCardLinkedIdExpMonth = 301 :: LinkedIdType
366linkedIdTypeCardLinkedIdExpYear = 302 :: LinkedIdType
433linkedIdTypeCardLinkedIdExpYear = 302 :: LinkedIdType
367linkedIdTypeCardLinkedIdCode = 303 :: LinkedIdType
435linkedIdTypeCardLinkedIdCode = 303 :: LinkedIdType
368linkedIdTypeCardLinkedIdBrand = 304 :: LinkedIdType
437linkedIdTypeCardLinkedIdBrand = 304 :: LinkedIdType
369linkedIdTypeCardLinkedIdNumber = 305 :: LinkedIdType
439linkedIdTypeCardLinkedIdNumber = 305 :: LinkedIdType
370linkedIdTypeIdentityLinkedIdTitle = 400 :: LinkedIdType
441linkedIdTypeIdentityLinkedIdTitle = 400 :: LinkedIdType
371linkedIdTypeIdentityLinkedIdMiddleName = 401 :: LinkedIdType
443linkedIdTypeIdentityLinkedIdMiddleName = 401 :: LinkedIdType
372linkedIdTypeIdentityLinkedIdAddress1 = 402 :: LinkedIdType
445linkedIdTypeIdentityLinkedIdAddress1 = 402 :: LinkedIdType
373linkedIdTypeIdentityLinkedIdAddress2 = 403 :: LinkedIdType
447linkedIdTypeIdentityLinkedIdAddress2 = 403 :: LinkedIdType
374linkedIdTypeIdentityLinkedIdAddress3 = 404 :: LinkedIdType
449linkedIdTypeIdentityLinkedIdAddress3 = 404 :: LinkedIdType
375linkedIdTypeIdentityLinkedIdCity = 405 :: LinkedIdType
451linkedIdTypeIdentityLinkedIdCity = 405 :: LinkedIdType
376linkedIdTypeIdentityLinkedIdState = 406 :: LinkedIdType
453linkedIdTypeIdentityLinkedIdState = 406 :: LinkedIdType
377linkedIdTypeIdentityLinkedIdPostalCode = 407 :: LinkedIdType
455linkedIdTypeIdentityLinkedIdPostalCode = 407 :: LinkedIdType
378linkedIdTypeIdentityLinkedIdCountry = 408 :: LinkedIdType
457linkedIdTypeIdentityLinkedIdCountry = 408 :: LinkedIdType
379linkedIdTypeIdentityLinkedIdCompany = 409 :: LinkedIdType
459linkedIdTypeIdentityLinkedIdCompany = 409 :: LinkedIdType
380linkedIdTypeIdentityLinkedIdEmail = 410 :: LinkedIdType
461linkedIdTypeIdentityLinkedIdEmail = 410 :: LinkedIdType
381linkedIdTypeIdentityLinkedIdPhone = 411 :: LinkedIdType
463linkedIdTypeIdentityLinkedIdPhone = 411 :: LinkedIdType
382linkedIdTypeIdentityLinkedIdSsn = 412 :: LinkedIdType
465linkedIdTypeIdentityLinkedIdSsn = 412 :: LinkedIdType
383linkedIdTypeIdentityLinkedIdUsername = 413 :: LinkedIdType
467linkedIdTypeIdentityLinkedIdUsername = 413 :: LinkedIdType
384linkedIdTypeIdentityLinkedIdPassportNumber = 414 :: LinkedIdType
469linkedIdTypeIdentityLinkedIdPassportNumber = 414 :: LinkedIdType
385linkedIdTypeIdentityLinkedIdLicenseNumber = 415 :: LinkedIdType
471linkedIdTypeIdentityLinkedIdLicenseNumber = 415 :: LinkedIdType
386linkedIdTypeIdentityLinkedIdFirstName = 416 :: LinkedIdType
473linkedIdTypeIdentityLinkedIdFirstName = 416 :: LinkedIdType
387linkedIdTypeIdentityLinkedIdLastName = 417 :: LinkedIdType
475linkedIdTypeIdentityLinkedIdLastName = 417 :: LinkedIdType
388linkedIdTypeIdentityLinkedIdFullName = 418 :: LinkedIdType
477linkedIdTypeIdentityLinkedIdFullName = 418 :: LinkedIdType
389−type LinkedIdType = Int
479+type LinkedIdType
391−type LoginApi = {
482+type LoginApi
392− uris :: Opt (Array LoginUriApi),
483+ = { uris :: Opt (Array LoginUriApi)
393− username :: Nullable String,
484+ , username :: Nullable EncryptedString
394− password :: Nullable String,
485+ , password :: Nullable EncryptedString
395− passwordRevisionDate :: Nullable String,
486+ , passwordRevisionDate :: Nullable String
396− totp :: Nullable String,
487+ , totp :: Nullable EncryptedString
397− -- This thig is undefined in some cases for some reson. Just ignoring it
488+ -- This thing is undefined in some cases for some reson. Just ignoring it
398− autofillOnPageLoad :: Opt (Nullable Boolean)
489+ , autofillOnPageLoad :: Opt (Nullable Boolean)
401−type LoginUriApi = {
492+type LoginUriApi
402− uri :: String,
493+ = { uri :: String
403− match :: Nullable UriMatchType
494+ , match :: Nullable UriMatchType
406uriMatchTypeDomain = 0 :: UriMatchType
497uriMatchTypeDomain = 0 :: UriMatchType
407uriMatchTypeHost = 1 :: UriMatchType
499uriMatchTypeHost = 1 :: UriMatchType
408uriMatchTypeStartsWith = 2 :: UriMatchType
501uriMatchTypeStartsWith = 2 :: UriMatchType
409uriMatchTypeExact = 3 :: UriMatchType
503uriMatchTypeExact = 3 :: UriMatchType
410uriMatchTypeRegularExpression = 4 :: UriMatchType
505uriMatchTypeRegularExpression = 4 :: UriMatchType
411uriMatchTypeNever = 5 :: UriMatchType
507uriMatchTypeNever = 5 :: UriMatchType
412−type UriMatchType = Int
509+type UriMatchType
414−type CardApi = {
512+type CardApi
415− cardholderName :: Nullable String,
513+ = { cardholderName :: Nullable String
416− brand :: Nullable String,
514+ , brand :: Nullable String
417− number :: Nullable String,
515+ , number :: Nullable String
418− expMonth :: Nullable String,
516+ , expMonth :: Nullable String
419− expYear :: Nullable String,
517+ , expYear :: Nullable String
420− code :: Nullable String
518+ , code :: Nullable String
423−type IdentityApi = {
521+type IdentityApi
424− title :: String,
522+ = { title :: String
425− firstName :: String,
523+ , firstName :: String
426− middleName :: String,
524+ , middleName :: String
427− lastName :: String,
525+ , lastName :: String
428− address1 :: String,
526+ , address1 :: String
429− address2 :: String,
527+ , address2 :: String
430− address3 :: String,
528+ , address3 :: String
431− city :: String,
529+ , city :: String
432− state :: String,
530+ , state :: String
433− postalCode :: String,
531+ , postalCode :: String
434− country :: String,
532+ , country :: String
435− company :: String,
533+ , company :: String
436− email :: String,
534+ , email :: String
437− phone :: String,
535+ , phone :: String
438− ssn :: String,
536+ , ssn :: String
439− username :: String,
537+ , username :: String
440− passportNumber :: String,
538+ , passportNumber :: String
441− licenseNumber :: String
539+ , licenseNumber :: String
444secureNoteApiGeneric = 0 :: SecureNoteApi
542secureNoteApiGeneric = 0 :: SecureNoteApi
445−type SecureNoteApi = Int
544+type SecureNoteApi
447−type AttachmentResponse = {
547+type AttachmentResponse
448− id :: String,
548+ = { id :: String
449− url :: String,
549+ , url :: String
450− fileName :: String,
550+ , fileName :: String
451− key :: String,
551+ , key :: String
452− size :: String,
552+ , size :: String
453− sizeName :: String
553+ , sizeName :: String
456−type PasswordHistoryResponse = {
556+type PasswordHistoryResponse
457− password :: String,
557+ = { password :: String
458− lastUsedDate :: String
558+ , lastUsedDate :: String
461cipherRepromptTypeNone = 0 :: CipherRepromptType
561cipherRepromptTypeNone = 0 :: CipherRepromptType
462cipherRepromptTypePassword = 1 :: CipherRepromptType
563cipherRepromptTypePassword = 1 :: CipherRepromptType
463−type CipherRepromptType = Int
565+type CipherRepromptType
465−type DomainsResponse = {
568+type DomainsResponse
466− equivalentDomains :: Array (Array String),
569+ = { equivalentDomains :: Array (Array String)
467− globalEquivalentDomains :: Array GlobalDomainResponse
570+ , globalEquivalentDomains :: Array GlobalDomainResponse
470−type GlobalDomainResponse = {
573+type GlobalDomainResponse
471− type :: Int,
574+ = { type :: Int
472− domains :: Array String,
575+ , domains :: Array String
473− excluded :: Boolean
576+ , excluded :: Boolean
476−type PolicyResponse = {
579+type PolicyResponse
477− id :: String,
580+ = { id :: String
478− organizationId :: Nullable String,
581+ , organizationId :: Nullable String
479− type :: PolicyType,
582+ , type :: PolicyType
480− data :: ShowableJson,
583+ , data :: ShowableJson
481− enabled :: Boolean
584+ , enabled :: Boolean
484policyTypeTwoFactorAuthentication = 0 :: PolicyType -- Requires users to have 2fa enabled
587policyTypeTwoFactorAuthentication = 0 :: PolicyType -- Requires users to have 2fa enabled
485policyTypeMasterPassword = 1 :: PolicyType -- Sets minimum requirements for master password complexity
589policyTypeMasterPassword = 1 :: PolicyType -- Sets minimum requirements for master password complexity
486policyTypePasswordGenerator = 2 :: PolicyType -- Sets minimum requirements/default type for generated passwords/passphrases
591policyTypePasswordGenerator = 2 :: PolicyType -- Sets minimum requirements/default type for generated passwords/passphrases
487policyTypeSingleOrg = 3 :: PolicyType -- Allows users to only be apart of one organization
593policyTypeSingleOrg = 3 :: PolicyType -- Allows users to only be apart of one organization
488policyTypeRequireSso = 4 :: PolicyType -- Requires users to authenticate with SSO
595policyTypeRequireSso = 4 :: PolicyType -- Requires users to authenticate with SSO
489policyTypePersonalOwnership = 5 :: PolicyType -- Disables personal vault ownership for adding/cloning items
597policyTypePersonalOwnership = 5 :: PolicyType -- Disables personal vault ownership for adding/cloning items
490policyTypeDisableSend = 6 :: PolicyType -- Disables the ability to create and edit Bitwarden Sends
599policyTypeDisableSend = 6 :: PolicyType -- Disables the ability to create and edit Bitwarden Sends
491policyTypeSendOptions = 7 :: PolicyType -- Sets restrictions or defaults for Bitwarden Sends
601policyTypeSendOptions = 7 :: PolicyType -- Sets restrictions or defaults for Bitwarden Sends
492policyTypeResetPassword = 8 :: PolicyType -- Allows orgs to use reset password : also can enable auto-enrollment during invite flow
603policyTypeResetPassword = 8 :: PolicyType -- Allows orgs to use reset password : also can enable auto-enrollment during invite flow
493policyTypeMaximumVaultTimeout = 9 :: PolicyType -- Sets the maximum allowed vault timeout
605policyTypeMaximumVaultTimeout = 9 :: PolicyType -- Sets the maximum allowed vault timeout
494policyTypeDisablePersonalVaultExport = 10 :: PolicyType -- Disable personal vault export
607policyTypeDisablePersonalVaultExport = 10 :: PolicyType -- Disable personal vault export
495−type PolicyType = Int
609+type PolicyType
497−type SendResponse = {
612+type SendResponse
498− id :: String,
613+ = { id :: String
499− accessId :: String,
614+ , accessId :: String
500− type :: SendType,
615+ , type :: SendType
501− name :: String,
616+ , name :: String
502− notes :: Nullable String,
617+ , notes :: Nullable String
503− file :: Nullable SendFileApi,
618+ , file :: Nullable SendFileApi
504− text :: Nullable SendTextApi,
619+ , text :: Nullable SendTextApi
505− key :: String,
620+ , key :: String
506− maxAccessCount :: Nullable Int,
621+ , maxAccessCount :: Nullable Int
507− accessCount :: Int,
622+ , accessCount :: Int
508− revisionDate :: String,
623+ , revisionDate :: String
509− expirationDate :: String,
624+ , expirationDate :: String
510− deletionDate :: Nullable String,
625+ , deletionDate :: Nullable String
511− password :: String,
626+ , password :: String
512− disable :: Boolean,
627+ , disable :: Boolean
513− hideEmail :: Boolean
628+ , hideEmail :: Boolean
516sendTypeText = 0 :: SendType
631sendTypeText = 0 :: SendType
517sendTypeFile = 1 :: SendType
633sendTypeFile = 1 :: SendType
518−type SendType = Int
635+type SendType
520−type SendFileApi = {
638+type SendFileApi
521− id :: String,
639+ = { id :: String
522− fileName :: String,
640+ , fileName :: String
523− size :: String,
641+ , size :: String
524− sizeName :: String
642+ , sizeName :: String
527−type SendTextApi = {
645+type SendTextApi
528− text :: String,
646+ = { text :: String
529− hidden :: Boolean
647+ , hidden :: Boolean