@@ -10,7 +10,6 @@ import Data.Int as Int
1010import Data.JNullable (JNullable)
1111import Data.JOpt (JOpt)
1212import Data.Maybe (Maybe(..))
13−import Data.Nullable (Nullable)
1413import Data.ShowableJson (ShowableJson)
1514import Data.Timestamp (Timestamp)
1615import Data.Traversable (for)
@@ -22,7 +21,8 @@ import Untagged.TypeCheck (class HasRuntimeType)
2221import Untagged.Union (type (|+|))
2322import Untagged.Union as Union
2423
25−newtype EncryptedString = EncryptedString String
24+newtype EncryptedString
25+ = EncryptedString String
2626
2727derive newtype instance Show EncryptedString
2828derive newtype instance Ord EncryptedString
@@ -31,86 +31,78 @@ derive newtype instance EncodeJson EncryptedString
3131derive newtype instance DecodeJson EncryptedString
3232
3333kdfPBKDF2_SHA256 = 0 :: KDF
34−kdfArgon2id = 1 :: KDF
3534
36−type KDF = Int
37−
38−type PreloginResponse =
39− { kdf :: KDF
40− , kdfIterations :: Int
41− , kdfMemory :: JNullable Int
42− , kdfParallelism :: JNullable Int
43− }
44−
45−type KdfConfig =
46− { iterations :: Int
47− , memory :: JNullable Int
48− , parallelism :: JNullable Int
49− }
50−
51−type PreloginRequest =
52− { email :: Email
53− }
54−
55−type ProfileResponse =
56− { id :: String
57− , name :: JNullable String
58− , email :: String
59− , emailVerified :: Boolean
60− , masterPasswordHint :: JNullable String
61− -- , premiumPersonally :: Boolean
62− -- , premiumFromOrganization :: Boolean
63− , culture :: JNullable String
64− , twoFactorEnabled :: Boolean
65− , key :: EncryptedString
66− , privateKey :: EncryptedString
67− , securityStamp :: JNullable String
68− , forcePasswordReset :: Boolean
69− , usesKeyConnector :: Boolean
70− -- , organizations :: Array ProfileOrganizationResponse
71− , providers :: Array ProfileProviderResponse
72− , providerOrganizations :: Array ProfileProviderOrganizationResponse
73− }
74−
75−type ProfileOrganizationResponse =
76− { id :: String
77− , name :: JNullable String
78− , usePolicies :: JNullable Boolean
79− , useGroups :: JNullable Boolean
80− , useDirectory :: JNullable Boolean
81− , useEvents :: JNullable Boolean
82− , useTotp :: JNullable Boolean
83− , use2fa :: JNullable Boolean
84− , useApi :: JNullable Boolean
85− , useSso :: JNullable Boolean
86− , useKeyConnector :: JNullable Boolean
87− , useResetPassword :: JNullable Boolean
88− , selfHost :: JNullable Boolean
89− , usersGetPremium :: JNullable Boolean
90− , seats :: JNullable Int
91− , maxCollections :: JNullable Int
92− , maxStorageGb :: JNullable Int
93− , key :: JNullable String
94− , hasPublicAndPrivateKeys :: JNullable Boolean
95− , status :: JNullable OrganizationUserStatusType
96− , type :: JNullable OrganizationUserType
97− , enabled :: JNullable Boolean
98− , ssoBound :: JNullable Boolean
99− , identifier :: JNullable String
100− , permissions :: JNullable PermissionsApi
101− , resetPasswordEnrolled :: JNullable Boolean
102− , userId :: JNullable String
103− , providerId :: JNullable String
104− , providerName :: JNullable String
105− , familySponsorshipFriendlyName :: JNullable String
106− , familySponsorshipAvailable :: JNullable Boolean
107− , planProductType :: JNullable ProductType
108− , keyConnectorEnabled :: JNullable Boolean
109− , keyConnectorUrl :: JNullable String
110− , familySponsorshipLastSyncDate :: JNullable Timestamp
111− , familySponsorshipValidUntil :: JNullable Timestamp
112− , familySponsorshipToDelete :: JNullable Boolean
113− }
35+type KDF
36+ = Int
37+
38+type PreloginResponse
39+ = { kdf :: KDF
40+ , kdfIterations :: Int
41+ }
42+
43+type PreloginRequest
44+ = { email :: Email
45+ }
46+
47+type ProfileResponse
48+ = { id :: String
49+ , name :: JNullable String
50+ , email :: String
51+ , emailVerified :: Boolean
52+ , masterPasswordHint :: JNullable String
53+ , premiumPersonally :: Boolean
54+ -- , premiumFromOrganization :: Boolean
55+ , culture :: JNullable String
56+ , twoFactorEnabled :: Boolean
57+ , key :: EncryptedString
58+ , privateKey :: EncryptedString
59+ , securityStamp :: JNullable String
60+ , forcePasswordReset :: Boolean
61+ , usesKeyConnector :: Boolean
62+ , organizations :: Array ProfileOrganizationResponse
63+ , providers :: Array ProfileProviderResponse
64+ , providerOrganizations :: Array ProfileProviderOrganizationResponse
65+ }
66+
67+type ProfileOrganizationResponse
68+ = { id :: String
69+ , name :: JNullable String
70+ , usePolicies :: JNullable Boolean
71+ , useGroups :: JNullable Boolean
72+ , useDirectory :: JNullable Boolean
73+ , useEvents :: JNullable Boolean
74+ , useTotp :: JNullable Boolean
75+ , use2fa :: JNullable Boolean
76+ , useApi :: JNullable Boolean
77+ , useSso :: JNullable Boolean
78+ , useKeyConnector :: JNullable Boolean
79+ , useResetPassword :: JNullable Boolean
80+ , selfHost :: JNullable Boolean
81+ , usersGetPremium :: JNullable Boolean
82+ , seats :: JNullable Int
83+ , maxCollections :: JNullable Int
84+ , maxStorageGb :: JNullable Int
85+ , key :: JNullable String
86+ , hasPublicAndPrivateKeys :: JNullable Boolean
87+ , status :: JNullable OrganizationUserStatusType
88+ , type :: JNullable OrganizationUserType
89+ , enabled :: JNullable Boolean
90+ , ssoBound :: JNullable Boolean
91+ , identifier :: JNullable String
92+ , permissions :: JNullable PermissionsApi
93+ , resetPasswordEnrolled :: JNullable Boolean
94+ , userId :: JNullable String
95+ , providerId :: JNullable String
96+ , providerName :: JNullable String
97+ , familySponsorshipFriendlyName :: JNullable String
98+ , familySponsorshipAvailable :: JNullable Boolean
99+ , planProductType :: JNullable ProductType
100+ , keyConnectorEnabled :: JNullable Boolean
101+ , keyConnectorUrl :: JNullable String
102+ , familySponsorshipLastSyncDate :: JNullable Timestamp
103+ , familySponsorshipValidUntil :: JNullable Timestamp
104+ , familySponsorshipToDelete :: JNullable Boolean
105+ }
114106
115107organizationUserStatusTypeInvited = 0 :: OrganizationUserStatusType
116108
@@ -118,7 +110,8 @@ organizationUserStatusTypeAccepted = 0 :: OrganizationUserStatusType
118110
119111organizationUserStatusTypeConfirmed = 0 :: OrganizationUserStatusType
120112
121−type OrganizationUserStatusType = Int
113+type OrganizationUserStatusType
114+ = Int
122115
123116organizationUserTypeOwner = 0 :: OrganizationUserType
124117
@@ -130,26 +123,27 @@ organizationUserTypeManager = 3 :: OrganizationUserType
130123
131124organizationUserTypeCustom = 4 :: OrganizationUserType
132125
133−type OrganizationUserType = Int
134−
135−type PermissionsApi =
136− { accessEventLogs :: Boolean
137− , accessImportExport :: Boolean
138− , accessReports :: Boolean
139− , manageAllCollections :: Boolean
140− , createNewCollections :: Boolean
141− , editAnyCollection :: Boolean
142− , deleteAnyCollection :: Boolean
143− , manageAssignedCollections :: Boolean
144− , editAssignedCollections :: Boolean
145− , deleteAssignedCollections :: Boolean
146− , manageCiphers :: Boolean
147− , manageGroups :: Boolean
148− , manageSso :: Boolean
149− , managePolicies :: Boolean
150− , manageUsers :: Boolean
151− , manageResetPassword :: Boolean
152− }
126+type OrganizationUserType
127+ = Int
128+
129+type PermissionsApi
130+ = { accessEventLogs :: Boolean
131+ , accessImportExport :: Boolean
132+ , accessReports :: Boolean
133+ , manageAllCollections :: Boolean
134+ , createNewCollections :: Boolean
135+ , editAnyCollection :: Boolean
136+ , deleteAnyCollection :: Boolean
137+ , manageAssignedCollections :: Boolean
138+ , editAssignedCollections :: Boolean
139+ , deleteAssignedCollections :: Boolean
140+ , manageCiphers :: Boolean
141+ , manageGroups :: Boolean
142+ , manageSso :: Boolean
143+ , managePolicies :: Boolean
144+ , manageUsers :: Boolean
145+ , manageResetPassword :: Boolean
146+ }
153147
154148productTypeFree = 0 :: ProductType
155149
@@ -159,19 +153,20 @@ productTypeTeams = 2 :: ProductType
159153
160154productTypeEnterprise = 3 :: ProductType
161155
162−type ProductType = Int
163−
164−type ProfileProviderResponse =
165− { id :: String
166− , name :: JNullable String
167− , key :: JNullable String
168− , status :: JNullable ProviderUserStatusType
169− , type :: JNullable ProviderUserType
170− , enabled :: Boolean
171− , permissions :: PermissionsApi
172− , userId :: JNullable String
173− , useEvents :: Boolean
174− }
156+type ProductType
157+ = Int
158+
159+type ProfileProviderResponse
160+ = { id :: String
161+ , name :: JNullable String
162+ , key :: JNullable String
163+ , status :: JNullable ProviderUserStatusType
164+ , type :: JNullable ProviderUserType
165+ , enabled :: Boolean
166+ , permissions :: PermissionsApi
167+ , userId :: JNullable String
168+ , useEvents :: Boolean
169+ }
175170
176171providerUserStatusTypeInvited = 0 :: ProviderUserStatusType
177172
@@ -179,79 +174,81 @@ providerUserStatusTypeAccepted = 1 :: ProviderUserStatusType
179174
180175providerUserStatusTypeConfirmed = 2 :: ProviderUserStatusType
181176
182−type ProviderUserStatusType = Int
177+type ProviderUserStatusType
178+ = Int
183179
184180providerUserTypeProviderAdmin = 0 :: ProviderUserType
185181
186182providerUserTypeServiceUser = 1 :: ProviderUserType
187183
188−type ProviderUserType = Int
189−
190−type ProfileProviderOrganizationResponse =
191− { id :: String
192− , name :: JNullable String
193− , usePolicies :: Boolean
194− , useGroups :: Boolean
195− , useDirectory :: Boolean
196− , useEvents :: Boolean
197− , useTotp :: Boolean
198− , use2fa :: Boolean
199− , useApi :: Boolean
200− , useSso :: Boolean
201− , useKeyConnector :: Boolean
202− , useResetPassword :: Boolean
203− , selfHost :: Boolean
204− , usersGetPremium :: Boolean
205− , seats :: Int
206− , maxCollections :: Int
207− , maxStorageGb :: JNullable Int
208− , key :: JNullable String
209− , hasPublicAndPrivateKeys :: Boolean
210− , status :: OrganizationUserStatusType
211− , type :: OrganizationUserType
212− , enabled :: Boolean
213− , ssoBound :: Boolean
214− , identifier :: JNullable String
215− , permissions :: PermissionsApi
216− , resetPasswordEnrolled :: Boolean
217− , userId :: JNullable String
218− , providerId :: JNullable String
219− , providerName :: JNullable String
220− , familySponsorshipFriendlyName :: JNullable String
221− , familySponsorshipAvailable :: Boolean
222− , planProductType :: ProductType
223− , keyConnectorEnabled :: Boolean
224− , keyConnectorUrl :: JNullable String
225− , familySponsorshipLastSyncDate :: JNullable Timestamp
226− , familySponsorshipValidUntil :: JNullable Timestamp
227− , familySponsorshipToDelete :: JNullable Boolean
228− }
229−
230−type Urls =
231− { base :: JNullable String
232− , webVault :: JNullable String
233− , api :: JNullable String
234− , identity :: JNullable String
235− , icons :: JNullable String
236− , notifications :: JNullable String
237− , events :: JNullable String
238− , keyConnector :: JNullable String
239− }
240−
241−type PasswordTokenRequest =
242− { email :: Email
243− , masterPasswordHash :: String
244− , captchaResponse :: String
245− , twoFactor :: TokenRequestTwoFactor
246− , device :: DeviceRequest
247− }
248−
249−type DeviceRequest =
250− { type :: DeviceType
251− , name :: String
252− , identifier :: String
253− , pushToken :: JNullable String
254− }
184+type ProviderUserType
185+ = Int
186+
187+type ProfileProviderOrganizationResponse
188+ = { id :: String
189+ , name :: JNullable String
190+ , usePolicies :: Boolean
191+ , useGroups :: Boolean
192+ , useDirectory :: Boolean
193+ , useEvents :: Boolean
194+ , useTotp :: Boolean
195+ , use2fa :: Boolean
196+ , useApi :: Boolean
197+ , useSso :: Boolean
198+ , useKeyConnector :: Boolean
199+ , useResetPassword :: Boolean
200+ , selfHost :: Boolean
201+ , usersGetPremium :: Boolean
202+ , seats :: Int
203+ , maxCollections :: Int
204+ , maxStorageGb :: JNullable Int
205+ , key :: JNullable String
206+ , hasPublicAndPrivateKeys :: Boolean
207+ , status :: OrganizationUserStatusType
208+ , type :: OrganizationUserType
209+ , enabled :: Boolean
210+ , ssoBound :: Boolean
211+ , identifier :: JNullable String
212+ , permissions :: PermissionsApi
213+ , resetPasswordEnrolled :: Boolean
214+ , userId :: JNullable String
215+ , providerId :: JNullable String
216+ , providerName :: JNullable String
217+ , familySponsorshipFriendlyName :: JNullable String
218+ , familySponsorshipAvailable :: Boolean
219+ , planProductType :: ProductType
220+ , keyConnectorEnabled :: Boolean
221+ , keyConnectorUrl :: JNullable String
222+ , familySponsorshipLastSyncDate :: JNullable Timestamp
223+ , familySponsorshipValidUntil :: JNullable Timestamp
224+ , familySponsorshipToDelete :: JNullable Boolean
225+ }
226+
227+type Urls
228+ = { base :: JNullable String
229+ , webVault :: JNullable String
230+ , api :: JNullable String
231+ , identity :: JNullable String
232+ , icons :: JNullable String
233+ , notifications :: JNullable String
234+ , events :: JNullable String
235+ , keyConnector :: JNullable String
236+ }
237+
238+type PasswordTokenRequest
239+ = { email :: Email
240+ , masterPasswordHash :: String
241+ , captchaResponse :: String
242+ , twoFactor :: TokenRequestTwoFactor
243+ , device :: DeviceRequest
244+ }
245+
246+type DeviceRequest
247+ = { type :: DeviceType
248+ , name :: String
249+ , identifier :: String
250+ , pushToken :: JNullable String
251+ }
255252
256253deviceTypeAndroid = 0 :: DeviceType
257254
@@ -295,13 +292,14 @@ deviceTypeVivaldiExtension = 19 :: DeviceType
295292
296293deviceTypeSafariExtension = 20 :: DeviceType
297294
298−type DeviceType = Int
295+type DeviceType
296+ = Int
299297
300−type TokenRequestTwoFactor =
301− { provider :: TwoFactorProviderType
302− , token :: String
303− , remember :: Boolean
304− }
298+type TokenRequestTwoFactor
299+ = { provider :: TwoFactorProviderType
300+ , token :: String
301+ , remember :: Boolean
302+ }
305303
306304twoFactorProviderTypeAuthenticator = 0 :: TwoFactorProviderType
307305
@@ -319,11 +317,12 @@ twoFactorProviderTypeOrganizationDuo = 6 :: TwoFactorProviderType
319317
320318twoFactorProviderTypeWebAuthn = 7 :: TwoFactorProviderType
321319
322−type TwoFactorProviderType = Int
320+type TwoFactorProviderType
321+ = Int
323322
324−secondFactorTypeToBridge
325− :: TwoFactorProviderType
326− -> Maybe Bridge.TwoFactorProviderType
323+secondFactorTypeToBridge ::
324+ TwoFactorProviderType ->
325+ Maybe Bridge.TwoFactorProviderType
327326secondFactorTypeToBridge x = case x of
328327 n
329328 | n == twoFactorProviderTypeAuthenticator -> Just Bridge.Authenticator
@@ -353,17 +352,21 @@ bridgeToSecondFactorType Bridge.Remember = twoFactorProviderTypeRemember
353352bridgeToSecondFactorType Bridge.OrganizationDuo = twoFactorProviderTypeOrganizationDuo
354353bridgeToSecondFactorType Bridge.WebAuthn = twoFactorProviderTypeWebAuthn
355354
356−newtype Password = Password String
355+newtype Password
356+ = Password String
357357
358358hashPurposeServerAuthorization = 1 :: HashPurpose
359359
360360hashPurposeLocalAuthorization = 2 :: HashPurpose
361361
362−type HashPurpose = Int
362+type HashPurpose
363+ = Int
363364
364−newtype StringHash = StringHash String
365+newtype StringHash
366+ = StringHash String
365367
366−newtype AccessToken = AccessToken String
368+newtype AccessToken
369+ = AccessToken String
367370
368371derive newtype instance Show AccessToken
369372derive newtype instance Eq AccessToken
@@ -371,7 +374,8 @@ derive newtype instance Ord AccessToken
371374derive newtype instance EncodeJson AccessToken
372375derive newtype instance DecodeJson AccessToken
373376
374−newtype RefreshToken = RefreshToken String
377+newtype RefreshToken
378+ = RefreshToken String
375379
376380derive newtype instance Show RefreshToken
377381derive newtype instance Eq RefreshToken
@@ -383,21 +387,21 @@ type IdentityCaptchaResponse =
383387 { siteKey :: String
384388 }
385389
386−type IdentityTokenResponse =
387− { accessToken :: AccessToken
388− , expiresIn :: Int
389− , refreshToken :: RefreshToken
390− , tokenType :: String
391− , resetMasterPassword :: Boolean
392− , privateKey :: EncryptedString
393− , key :: EncryptedString
394− , twoFactorToken :: JNullable String
395− , kdf :: KDF
396− , kdfIterations :: Int
397− , forcePasswordReset :: JNullable Boolean
398− , apiUseKeyConnector :: JNullable Boolean
399− , keyConnectorUrl :: JNullable String
400− }
390+type IdentityTokenResponse
391+ = { accessToken :: AccessToken
392+ , expiresIn :: Int
393+ , refreshToken :: RefreshToken
394+ , tokenType :: String
395+ , resetMasterPassword :: Boolean
396+ , privateKey :: EncryptedString
397+ , key :: EncryptedString
398+ , twoFactorToken :: JNullable String
399+ , kdf :: KDF
400+ , kdfIterations :: Int
401+ , forcePasswordReset :: JNullable Boolean
402+ , apiUseKeyConnector :: JNullable Boolean
403+ , keyConnectorUrl :: JNullable String
404+ }
401405
402406newtype TwoFactorProviderTypes = TwoFactorProviderTypes (Array (Int |+| String))
403407
@@ -417,57 +421,59 @@ type IdentityTwoFactorResponse =
417421 , captchaToken :: String |+| Undefined
418422 }
419423
420−newtype Email = Email String
424+newtype Email
425+ = Email String
421426
422−type SyncResponse =
423− { profile :: ProfileResponse
424− , folders :: Array FolderResponse
425− , collections :: Array CollectionDetailsResponse
426− , ciphers :: Array CipherResponse
427− , domains :: JNullable DomainsResponse
428− , policies :: JNullable (Array PolicyResponse)
429− , sends :: Array SendResponse
430− }
427+type SyncResponse
428+ = { profile :: ProfileResponse
429+ , folders :: Array FolderResponse
430+ , collections :: Array CollectionDetailsResponse
431+ , ciphers :: Array CipherResponse
432+ , domains :: JNullable DomainsResponse
433+ , policies :: JNullable (Array PolicyResponse)
434+ , sends :: Array SendResponse
435+ }
431436
432−type FolderResponse =
433− { id :: String
434− , name :: JNullable String
435− , revisionDate :: JNullable String
436− }
437+type FolderResponse
438+ = { id :: String
439+ , name :: JNullable String
440+ , revisionDate :: JNullable String
441+ }
442+
443+type CollectionDetailsResponse
444+ = { id :: String
445+ , organizationId :: JNullable String
446+ , name :: JNullable String
447+ , externalId :: JNullable String
448+ , readOnly :: Boolean
449+ }
437450
438−type CollectionDetailsResponse =
439− { id :: String
440− , organizationId :: JNullable String
441− , name :: JNullable String
442− , externalId :: JNullable String
443− , readOnly :: Boolean
444− }
445451
446452type CipherId = String
447453
448−type CipherResponse =
449− { id :: CipherId
450− , organizationId :: JNullable String
451− , folderId :: JNullable String
452− , type :: CipherType
453− , name :: EncryptedString
454− , notes :: JNullable EncryptedString
455− , fields :: JNullable (Array FieldApi)
456− , login :: JNullable LoginApi
457− , card :: JNullable CardApi
458− , identity :: JNullable IdentityApi
459− , secureNote :: JNullable SecureNoteApi
460− , favorite :: Boolean
461− , edit :: JNullable Boolean
462− , viewPassword :: JNullable Boolean
463− , organizationUseTotp :: JNullable Boolean
464− , revisionDate :: JNullable Timestamp
465− , attachments :: JNullable (Array AttachmentResponse)
466− , passwordHistory :: JNullable (Array PasswordHistoryResponse)
467− , collectionIds :: JNullable (Array String)
468− , deletedDate :: JNullable String
469− , reprompt :: CipherRepromptType
470− }
454+type CipherResponse
455+ = { id :: CipherId
456+ , organizationId :: JNullable String
457+ , folderId :: JNullable String
458+ , type :: CipherType
459+ , name :: EncryptedString
460+ , notes :: JNullable EncryptedString
461+ , fields :: JNullable (Array FieldApi)
462+ , login :: JNullable LoginApi
463+ , card :: JNullable CardApi
464+ , identity :: JNullable IdentityApi
465+ , secureNote :: JNullable SecureNoteApi
466+ , favorite :: Boolean
467+ , edit :: JNullable Boolean
468+ , viewPassword :: JNullable Boolean
469+ , organizationUseTotp :: JNullable Boolean
470+ , revisionDate :: JNullable Timestamp
471+ , attachments :: JNullable (Array AttachmentResponse)
472+ , passwordHistory :: JNullable (Array PasswordHistoryResponse)
473+ , collectionIds :: JNullable (Array String)
474+ , deletedDate :: JNullable String
475+ , reprompt :: CipherRepromptType
476+ }
471477
472478cipherTypeLogin = 1 :: CipherType
473479
@@ -477,14 +483,15 @@ cipherTypeCard = 3 :: CipherType
477483
478484cipherTypeIdentity = 4 :: CipherType
479485
480−type CipherType = Int
486+type CipherType
487+ = Int
481488
482−type FieldApi =
483− { name :: JNullable String
484− , value :: JNullable String
485− , type :: FieldType
486− , linkedId :: JNullable LinkedIdType
487− }
489+type FieldApi
490+ = { name :: JNullable String
491+ , value :: JNullable String
492+ , type :: FieldType
493+ , linkedId :: JNullable LinkedIdType
494+ }
488495
489496fieldTypeText = 0 :: FieldType
490497
@@ -494,7 +501,8 @@ fieldTypeBoolean = 2 :: FieldType
494501
495502fieldTypeLinked = 3 :: FieldType
496503
497−type FieldType = Int
504+type FieldType
505+ = Int
498506
499507linkedIdTypeLoginLinkedIdUsername = 100 :: LinkedIdType
500508
@@ -550,22 +558,23 @@ linkedIdTypeIdentityLinkedIdLastName = 417 :: LinkedIdType
550558
551559linkedIdTypeIdentityLinkedIdFullName = 418 :: LinkedIdType
552560
553−type LinkedIdType = Int
561+type LinkedIdType
562+ = Int
554563
555−type LoginApi =
556− { uris :: JOpt (Array LoginUriApi)
557− , username :: JNullable EncryptedString
558− , password :: JNullable EncryptedString
559− , passwordRevisionDate :: JNullable String
560− , totp :: JNullable EncryptedString
561− -- This thing is undefined in some cases for some reson. Just ignoring it
562− , autofillOnPageLoad :: JOpt (JNullable Boolean)
563− }
564+type LoginApi
565+ = { uris :: JOpt (Array LoginUriApi)
566+ , username :: JNullable EncryptedString
567+ , password :: JNullable EncryptedString
568+ , passwordRevisionDate :: JNullable String
569+ , totp :: JNullable EncryptedString
570+ -- This thing is undefined in some cases for some reson. Just ignoring it
571+ , autofillOnPageLoad :: JOpt (JNullable Boolean)
572+ }
564573
565−type LoginUriApi =
566− { uri :: JNullable EncryptedString
567− , match :: JNullable UriMatchType
568− }
574+type LoginUriApi
575+ = { uri :: EncryptedString
576+ , match :: JNullable UriMatchType
577+ }
569578
570579uriMatchTypeDomain = 0 :: UriMatchType
571580
@@ -579,85 +588,87 @@ uriMatchTypeRegularExpression = 4 :: UriMatchType
579588
580589uriMatchTypeNever = 5 :: UriMatchType
581590
582−type UriMatchType = Int
583−
584−type CardApi =
585− { cardholderName :: JNullable EncryptedString
586− , brand :: JNullable EncryptedString
587− , number :: JNullable EncryptedString
588− , expMonth :: JNullable EncryptedString
589− , expYear :: JNullable EncryptedString
590− , code :: JNullable EncryptedString
591− }
592−
593−type IdentityApi =
594− { title :: JNullable EncryptedString
595− , firstName :: JNullable EncryptedString
596− , middleName :: JNullable EncryptedString
597− , lastName :: JNullable EncryptedString
598− , address1 :: JNullable EncryptedString
599− , address2 :: JNullable EncryptedString
600− , address3 :: JNullable EncryptedString
601− , city :: JNullable EncryptedString
602− , state :: JNullable EncryptedString
603− , postalCode :: JNullable EncryptedString
604− , country :: JNullable EncryptedString
605− , company :: JNullable EncryptedString
606− , email :: JNullable EncryptedString
607− , phone :: JNullable EncryptedString
608− , ssn :: JNullable EncryptedString
609− , username :: JNullable EncryptedString
610− , passportNumber :: JNullable EncryptedString
611− , licenseNumber :: JNullable EncryptedString
612− }
591+type UriMatchType
592+ = Int
593+
594+type CardApi
595+ = { cardholderName :: JNullable EncryptedString
596+ , brand :: JNullable EncryptedString
597+ , number :: JNullable EncryptedString
598+ , expMonth :: JNullable EncryptedString
599+ , expYear :: JNullable EncryptedString
600+ , code :: JNullable EncryptedString
601+ }
602+
603+type IdentityApi
604+ = { title :: JNullable EncryptedString
605+ , firstName :: JNullable EncryptedString
606+ , middleName :: JNullable EncryptedString
607+ , lastName :: JNullable EncryptedString
608+ , address1 :: JNullable EncryptedString
609+ , address2 :: JNullable EncryptedString
610+ , address3 :: JNullable EncryptedString
611+ , city :: JNullable EncryptedString
612+ , state :: JNullable EncryptedString
613+ , postalCode :: JNullable EncryptedString
614+ , country :: JNullable EncryptedString
615+ , company :: JNullable EncryptedString
616+ , email :: JNullable EncryptedString
617+ , phone :: JNullable EncryptedString
618+ , ssn :: JNullable EncryptedString
619+ , username :: JNullable EncryptedString
620+ , passportNumber :: JNullable EncryptedString
621+ , licenseNumber :: JNullable EncryptedString
622+ }
613623
614624secureNoteTypeGeneric = 0 :: SecureNoteType
615625
616−type SecureNoteType = Int
626+type SecureNoteType
627+ = Int
617628
618−type SecureNoteApi =
619− {
629+type SecureNoteApi = {
620630 -- type :: SecureNoteType
621− }
622−
623−type AttachmentResponse =
624− { id :: String
625− , url :: JNullable String
626− , fileName :: JNullable String
627− , key :: JNullable String
628− , size :: JNullable String
629− , sizeName :: JNullable String
630− }
631−
632−type PasswordHistoryResponse =
633− { password :: String
634− , lastUsedDate :: JNullable String
635− }
631+}
632+
633+type AttachmentResponse
634+ = { id :: String
635+ , url :: JNullable String
636+ , fileName :: JNullable String
637+ , key :: JNullable String
638+ , size :: JNullable String
639+ , sizeName :: JNullable String
640+ }
641+
642+type PasswordHistoryResponse
643+ = { password :: String
644+ , lastUsedDate :: JNullable String
645+ }
636646
637647cipherRepromptTypeNone = 0 :: CipherRepromptType
638648
639649cipherRepromptTypePassword = 1 :: CipherRepromptType
640650
641−type CipherRepromptType = Int
651+type CipherRepromptType
652+ = Int
642653
643−type DomainsResponse =
644− { equivalentDomains :: Array (Array String)
645− , globalEquivalentDomains :: Array GlobalDomainResponse
646− }
654+type DomainsResponse
655+ = { equivalentDomains :: Array (Array String)
656+ , globalEquivalentDomains :: Array GlobalDomainResponse
657+ }
647658
648−type GlobalDomainResponse =
649− { type :: Int
650− , domains :: Array String
651− , excluded :: Boolean
652− }
659+type GlobalDomainResponse
660+ = { type :: Int
661+ , domains :: Array String
662+ , excluded :: Boolean
663+ }
653664
654−type PolicyResponse =
655− { id :: String
656− , organizationId :: JNullable String
657− , type :: PolicyType
658− , data :: ShowableJson
659− , enabled :: Boolean
660− }
665+type PolicyResponse
666+ = { id :: String
667+ , organizationId :: JNullable String
668+ , type :: PolicyType
669+ , data :: ShowableJson
670+ , enabled :: Boolean
671+ }
661672
662673policyTypeTwoFactorAuthentication = 0 :: PolicyType -- Requires users to have 2fa enabled
663674
@@ -681,44 +692,46 @@ policyTypeMaximumVaultTimeout = 9 :: PolicyType -- Sets the maximum allowed vaul
681692
682693policyTypeDisablePersonalVaultExport = 10 :: PolicyType -- Disable personal vault export
683694
684−type PolicyType = Int
685−
686−type SendResponse =
687− { id :: String
688− , accessId :: JNullable String
689− , type :: SendType
690− , name :: JNullable String
691− , notes :: JNullable String
692− , file :: JNullable SendFileApi
693− , text :: JNullable SendTextApi
694− , key :: JNullable String
695− , maxAccessCount :: JNullable Int
696− , accessCount :: JNullable Int
697− , revisionDate :: JNullable String
698− , expirationDate :: JNullable String
699− , deletionDate :: JNullable String
700− , password :: JNullable String
701− , disable :: Boolean
702− , hideEmail :: Boolean
703− }
695+type PolicyType
696+ = Int
697+
698+type SendResponse
699+ = { id :: String
700+ , accessId :: JNullable String
701+ , type :: SendType
702+ , name :: JNullable String
703+ , notes :: JNullable String
704+ , file :: JNullable SendFileApi
705+ , text :: JNullable SendTextApi
706+ , key :: JNullable String
707+ , maxAccessCount :: JNullable Int
708+ , accessCount :: JNullable Int
709+ , revisionDate :: JNullable String
710+ , expirationDate :: JNullable String
711+ , deletionDate :: JNullable String
712+ , password :: JNullable String
713+ , disable :: Boolean
714+ , hideEmail :: Boolean
715+ }
704716
705717sendTypeText = 0 :: SendType
706718
707719sendTypeFile = 1 :: SendType
708720
709−type SendType = Int
721+type SendType
722+ = Int
710723
711−type SendFileApi =
712− { id :: String
713− , fileName :: JNullable String
714− , size :: JNullable String
715− , sizeName :: JNullable String
716− }
724+type SendFileApi
725+ = { id :: String
726+ , fileName :: JNullable String
727+ , size :: JNullable String
728+ , sizeName :: JNullable String
729+ }
717730
718−type SendTextApi =
719− { text :: JNullable String
720− , hidden :: Boolean
721− }
731+type SendTextApi
732+ = { text :: JNullable String
733+ , hidden :: Boolean
734+ }
722735
723736type TwoFactorEmailRequest =
724737 { email :: Email