@@ -10,6 +10,7 @@ import Data.Int as Int
1010import Data.JNullable (JNullable)
1111import Data.JOpt (JOpt)
1212import Data.Maybe (Maybe(..))
13+import Data.Nullable (Nullable)
1314import Data.ShowableJson (ShowableJson)
1415import Data.Timestamp (Timestamp)
1516import Data.Traversable (for)
@@ -21,8 +22,7 @@ import Untagged.TypeCheck (class HasRuntimeType)
2122import Untagged.Union (type (|+|))
2223import Untagged.Union as Union
2324
24−newtype EncryptedString
25− = EncryptedString String
25+newtype EncryptedString = EncryptedString String
2626
2727derive newtype instance Show EncryptedString
2828derive newtype instance Ord EncryptedString
@@ -31,78 +31,86 @@ derive newtype instance EncodeJson EncryptedString
3131derive newtype instance DecodeJson EncryptedString
3232
3333kdfPBKDF2_SHA256 = 0 :: KDF
34+kdfArgon2id = 1 :: KDF
3435
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− }
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+ }
106114
107115organizationUserStatusTypeInvited = 0 :: OrganizationUserStatusType
108116
@@ -110,8 +118,7 @@ organizationUserStatusTypeAccepted = 0 :: OrganizationUserStatusType
110118
111119organizationUserStatusTypeConfirmed = 0 :: OrganizationUserStatusType
112120
113−type OrganizationUserStatusType
114− = Int
121+type OrganizationUserStatusType = Int
115122
116123organizationUserTypeOwner = 0 :: OrganizationUserType
117124
@@ -123,27 +130,26 @@ organizationUserTypeManager = 3 :: OrganizationUserType
123130
124131organizationUserTypeCustom = 4 :: OrganizationUserType
125132
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− }
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+ }
147153
148154productTypeFree = 0 :: ProductType
149155
@@ -153,20 +159,19 @@ productTypeTeams = 2 :: ProductType
153159
154160productTypeEnterprise = 3 :: ProductType
155161
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− }
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+ }
170175
171176providerUserStatusTypeInvited = 0 :: ProviderUserStatusType
172177
@@ -174,81 +179,79 @@ providerUserStatusTypeAccepted = 1 :: ProviderUserStatusType
174179
175180providerUserStatusTypeConfirmed = 2 :: ProviderUserStatusType
176181
177−type ProviderUserStatusType
178− = Int
182+type ProviderUserStatusType = Int
179183
180184providerUserTypeProviderAdmin = 0 :: ProviderUserType
181185
182186providerUserTypeServiceUser = 1 :: ProviderUserType
183187
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− }
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+ }
252255
253256deviceTypeAndroid = 0 :: DeviceType
254257
@@ -292,14 +295,13 @@ deviceTypeVivaldiExtension = 19 :: DeviceType
292295
293296deviceTypeSafariExtension = 20 :: DeviceType
294297
295−type DeviceType
296− = Int
298+type DeviceType = Int
297299
298−type TokenRequestTwoFactor
299− = { provider :: TwoFactorProviderType
300− , token :: String
301− , remember :: Boolean
302− }
300+type TokenRequestTwoFactor =
301+ { provider :: TwoFactorProviderType
302+ , token :: String
303+ , remember :: Boolean
304+ }
303305
304306twoFactorProviderTypeAuthenticator = 0 :: TwoFactorProviderType
305307
@@ -317,12 +319,11 @@ twoFactorProviderTypeOrganizationDuo = 6 :: TwoFactorProviderType
317319
318320twoFactorProviderTypeWebAuthn = 7 :: TwoFactorProviderType
319321
320−type TwoFactorProviderType
321− = Int
322+type TwoFactorProviderType = Int
322323
323−secondFactorTypeToBridge ::
324− TwoFactorProviderType ->
325− Maybe Bridge.TwoFactorProviderType
324+secondFactorTypeToBridge
325+ :: TwoFactorProviderType
326+ -> Maybe Bridge.TwoFactorProviderType
326327secondFactorTypeToBridge x = case x of
327328 n
328329 | n == twoFactorProviderTypeAuthenticator -> Just Bridge.Authenticator
@@ -352,21 +353,17 @@ bridgeToSecondFactorType Bridge.Remember = twoFactorProviderTypeRemember
352353bridgeToSecondFactorType Bridge.OrganizationDuo = twoFactorProviderTypeOrganizationDuo
353354bridgeToSecondFactorType Bridge.WebAuthn = twoFactorProviderTypeWebAuthn
354355
355−newtype Password
356− = Password String
356+newtype Password = Password String
357357
358358hashPurposeServerAuthorization = 1 :: HashPurpose
359359
360360hashPurposeLocalAuthorization = 2 :: HashPurpose
361361
362−type HashPurpose
363− = Int
362+type HashPurpose = Int
364363
365−newtype StringHash
366− = StringHash String
364+newtype StringHash = StringHash String
367365
368−newtype AccessToken
369− = AccessToken String
366+newtype AccessToken = AccessToken String
370367
371368derive newtype instance Show AccessToken
372369derive newtype instance Eq AccessToken
@@ -374,8 +371,7 @@ derive newtype instance Ord AccessToken
374371derive newtype instance EncodeJson AccessToken
375372derive newtype instance DecodeJson AccessToken
376373
377−newtype RefreshToken
378− = RefreshToken String
374+newtype RefreshToken = RefreshToken String
379375
380376derive newtype instance Show RefreshToken
381377derive newtype instance Eq RefreshToken
@@ -387,21 +383,21 @@ type IdentityCaptchaResponse =
387383 { siteKey :: String
388384 }
389385
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− }
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+ }
405401
406402newtype TwoFactorProviderTypes = TwoFactorProviderTypes (Array (Int |+| String))
407403
@@ -421,59 +417,57 @@ type IdentityTwoFactorResponse =
421417 , captchaToken :: String |+| Undefined
422418 }
423419
424−newtype Email
425− = Email String
420+newtype Email = Email String
426421
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− }
436−
437−type FolderResponse
438− = { id :: String
439− , name :: JNullable String
440− , revisionDate :: JNullable String
441− }
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+ }
442431
443−type CollectionDetailsResponse
444− = { id :: String
445− , organizationId :: JNullable String
446− , name :: JNullable String
447− , externalId :: JNullable String
448− , readOnly :: Boolean
449− }
432+type FolderResponse =
433+ { id :: String
434+ , name :: JNullable String
435+ , revisionDate :: JNullable String
436+ }
450437
438+type CollectionDetailsResponse =
439+ { id :: String
440+ , organizationId :: JNullable String
441+ , name :: JNullable String
442+ , externalId :: JNullable String
443+ , readOnly :: Boolean
444+ }
451445
452446type CipherId = String
453447
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− }
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+ }
477471
478472cipherTypeLogin = 1 :: CipherType
479473
@@ -483,15 +477,14 @@ cipherTypeCard = 3 :: CipherType
483477
484478cipherTypeIdentity = 4 :: CipherType
485479
486−type CipherType
487− = Int
480+type CipherType = Int
488481
489−type FieldApi
490− = { name :: JNullable String
491− , value :: JNullable String
492− , type :: FieldType
493− , linkedId :: JNullable LinkedIdType
494− }
482+type FieldApi =
483+ { name :: JNullable String
484+ , value :: JNullable String
485+ , type :: FieldType
486+ , linkedId :: JNullable LinkedIdType
487+ }
495488
496489fieldTypeText = 0 :: FieldType
497490
@@ -501,8 +494,7 @@ fieldTypeBoolean = 2 :: FieldType
501494
502495fieldTypeLinked = 3 :: FieldType
503496
504−type FieldType
505− = Int
497+type FieldType = Int
506498
507499linkedIdTypeLoginLinkedIdUsername = 100 :: LinkedIdType
508500
@@ -558,23 +550,22 @@ linkedIdTypeIdentityLinkedIdLastName = 417 :: LinkedIdType
558550
559551linkedIdTypeIdentityLinkedIdFullName = 418 :: LinkedIdType
560552
561−type LinkedIdType
562− = Int
553+type LinkedIdType = Int
563554
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− }
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+ }
573564
574−type LoginUriApi
575− = { uri :: EncryptedString
576− , match :: JNullable UriMatchType
577− }
565+type LoginUriApi =
566+ { uri :: JNullable EncryptedString
567+ , match :: JNullable UriMatchType
568+ }
578569
579570uriMatchTypeDomain = 0 :: UriMatchType
580571
@@ -588,87 +579,85 @@ uriMatchTypeRegularExpression = 4 :: UriMatchType
588579
589580uriMatchTypeNever = 5 :: UriMatchType
590581
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− }
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+ }
623613
624614secureNoteTypeGeneric = 0 :: SecureNoteType
625615
626−type SecureNoteType
627− = Int
616+type SecureNoteType = Int
628617
629−type SecureNoteApi = {
618+type SecureNoteApi =
619+ {
630620 -- type :: SecureNoteType
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− }
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+ }
646636
647637cipherRepromptTypeNone = 0 :: CipherRepromptType
648638
649639cipherRepromptTypePassword = 1 :: CipherRepromptType
650640
651−type CipherRepromptType
652− = Int
641+type CipherRepromptType = Int
653642
654−type DomainsResponse
655− = { equivalentDomains :: Array (Array String)
656− , globalEquivalentDomains :: Array GlobalDomainResponse
657− }
643+type DomainsResponse =
644+ { equivalentDomains :: Array (Array String)
645+ , globalEquivalentDomains :: Array GlobalDomainResponse
646+ }
658647
659−type GlobalDomainResponse
660− = { type :: Int
661− , domains :: Array String
662− , excluded :: Boolean
663− }
648+type GlobalDomainResponse =
649+ { type :: Int
650+ , domains :: Array String
651+ , excluded :: Boolean
652+ }
664653
665−type PolicyResponse
666− = { id :: String
667− , organizationId :: JNullable String
668− , type :: PolicyType
669− , data :: ShowableJson
670− , enabled :: Boolean
671− }
654+type PolicyResponse =
655+ { id :: String
656+ , organizationId :: JNullable String
657+ , type :: PolicyType
658+ , data :: ShowableJson
659+ , enabled :: Boolean
660+ }
672661
673662policyTypeTwoFactorAuthentication = 0 :: PolicyType -- Requires users to have 2fa enabled
674663
@@ -692,46 +681,44 @@ policyTypeMaximumVaultTimeout = 9 :: PolicyType -- Sets the maximum allowed vaul
692681
693682policyTypeDisablePersonalVaultExport = 10 :: PolicyType -- Disable personal vault export
694683
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− }
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+ }
716704
717705sendTypeText = 0 :: SendType
718706
719707sendTypeFile = 1 :: SendType
720708
721−type SendType
722− = Int
709+type SendType = Int
723710
724−type SendFileApi
725− = { id :: String
726− , fileName :: JNullable String
727− , size :: JNullable String
728− , sizeName :: JNullable String
729− }
711+type SendFileApi =
712+ { id :: String
713+ , fileName :: JNullable String
714+ , size :: JNullable String
715+ , sizeName :: JNullable String
716+ }
730717
731−type SendTextApi
732− = { text :: JNullable String
733− , hidden :: Boolean
734− }
718+type SendTextApi =
719+ { text :: JNullable String
720+ , hidden :: Boolean
721+ }
735722
736723type TwoFactorEmailRequest =
737724 { email :: Email