@@ -4,25 +4,22 @@ import Prelude
5import Bridge as Bridge
5import Bridge as Bridge
6import Data.Argonaut (class DecodeJson, class EncodeJson)
6import Data.Argonaut (class DecodeJson, class EncodeJson)
7−import Data.Either (Either)
8−import Data.Either as Either
10import Data.JNullable (JNullable)
7import Data.JNullable (JNullable)
11import Data.JOpt (JOpt)
8import Data.JOpt (JOpt)
12import Data.Maybe (Maybe(..))
9import Data.Maybe (Maybe(..))
13−import Data.Nullable (Nullable)
14import Data.ShowableJson (ShowableJson)
10import Data.ShowableJson (ShowableJson)
15import Data.Timestamp (Timestamp)
11import Data.Timestamp (Timestamp)
16−import Data.Traversable (for)
12+import Data.Traversable (traverse)
17−import Data.Tuple.Nested ((/\))
13+import Foreign (Foreign)
18import Foreign as Foreign
14import Foreign as Foreign
15+import Foreign.Object (Object)
19import Literals.Undefined (Undefined)
16import Literals.Undefined (Undefined)
20import Type.Prelude (Proxy(..))
17import Type.Prelude (Proxy(..))
21−import Untagged.TypeCheck (class HasRuntimeType)
18+import Untagged.TypeCheck (class HasRuntimeType, hasRuntimeType)
22import Untagged.Union (type (|+|))
19import Untagged.Union (type (|+|))
23−import Untagged.Union as Union
25−newtype EncryptedString = EncryptedString String
21+newtype EncryptedString
22+ = EncryptedString String
27derive newtype instance Show EncryptedString
24derive newtype instance Show EncryptedString
28derive newtype instance Ord EncryptedString
25derive newtype instance Ord EncryptedString
@@ -31,86 +28,78 @@ derive newtype instance EncodeJson EncryptedString
31derive newtype instance DecodeJson EncryptedString
28derive newtype instance DecodeJson EncryptedString
33kdfPBKDF2_SHA256 = 0 :: KDF
30kdfPBKDF2_SHA256 = 0 :: KDF
34−kdfArgon2id = 1 :: KDF
36−type KDF = Int
32+type KDF
38−type PreloginResponse =
35+type PreloginResponse
39− { kdf :: KDF
36+ = { kdf :: KDF
40− , kdfIterations :: Int
37+ , kdfIterations :: Int
41− , kdfMemory :: JNullable Int
42− , kdfParallelism :: JNullable Int
47− , memory :: JNullable Int
48− , parallelism :: JNullable Int
51−type PreloginRequest =
40+type PreloginRequest
52− { email :: Email
41+ = { email :: Email
55−type ProfileResponse =
44+type ProfileResponse
56− { id :: String
45+ = { id :: String
57− , name :: JNullable String
46+ , name :: JNullable String
58− , email :: String
47+ , email :: String
59− , emailVerified :: Boolean
48+ , emailVerified :: Boolean
60− , masterPasswordHint :: JNullable String
49+ , masterPasswordHint :: JNullable String
61− -- , premiumPersonally :: Boolean
50+ , premiumPersonally :: Boolean
62− -- , premiumFromOrganization :: Boolean
51+ -- , premiumFromOrganization :: Boolean
63− , culture :: JNullable String
52+ , culture :: JNullable String
64− , twoFactorEnabled :: Boolean
53+ , twoFactorEnabled :: Boolean
65− , key :: EncryptedString
54+ , key :: EncryptedString
66− , privateKey :: EncryptedString
55+ , privateKey :: EncryptedString
67− , securityStamp :: JNullable String
56+ , securityStamp :: JNullable String
68− , forcePasswordReset :: Boolean
57+ , forcePasswordReset :: Boolean
69− , usesKeyConnector :: Boolean
58+ , usesKeyConnector :: Boolean
70− -- , organizations :: Array ProfileOrganizationResponse
59+ , organizations :: Array ProfileOrganizationResponse
71− , providers :: Array ProfileProviderResponse
60+ , providers :: Array ProfileProviderResponse
72− , providerOrganizations :: Array ProfileProviderOrganizationResponse
61+ , providerOrganizations :: Array ProfileProviderOrganizationResponse
75−type ProfileOrganizationResponse =
64+type ProfileOrganizationResponse
76− { id :: String
65+ = { id :: String
77− , name :: JNullable String
66+ , name :: JNullable String
78− , usePolicies :: JNullable Boolean
67+ , usePolicies :: JNullable Boolean
79− , useGroups :: JNullable Boolean
68+ , useGroups :: JNullable Boolean
80− , useDirectory :: JNullable Boolean
69+ , useDirectory :: JNullable Boolean
81− , useEvents :: JNullable Boolean
70+ , useEvents :: JNullable Boolean
82− , useTotp :: JNullable Boolean
71+ , useTotp :: JNullable Boolean
83− , use2fa :: JNullable Boolean
72+ , use2fa :: JNullable Boolean
84− , useApi :: JNullable Boolean
73+ , useApi :: JNullable Boolean
85− , useSso :: JNullable Boolean
74+ , useSso :: JNullable Boolean
86− , useKeyConnector :: JNullable Boolean
75+ , useKeyConnector :: JNullable Boolean
87− , useResetPassword :: JNullable Boolean
76+ , useResetPassword :: JNullable Boolean
88− , selfHost :: JNullable Boolean
77+ , selfHost :: JNullable Boolean
89− , usersGetPremium :: JNullable Boolean
78+ , usersGetPremium :: JNullable Boolean
90− , seats :: JNullable Int
79+ , seats :: JNullable Int
91− , maxCollections :: JNullable Int
80+ , maxCollections :: JNullable Int
92− , maxStorageGb :: JNullable Int
81+ , maxStorageGb :: JNullable Int
93− , key :: JNullable String
82+ , key :: JNullable String
94− , hasPublicAndPrivateKeys :: JNullable Boolean
83+ , hasPublicAndPrivateKeys :: JNullable Boolean
95− , status :: JNullable OrganizationUserStatusType
84+ , status :: JNullable OrganizationUserStatusType
96− , type :: JNullable OrganizationUserType
85+ , type :: JNullable OrganizationUserType
97− , enabled :: JNullable Boolean
86+ , enabled :: JNullable Boolean
98− , ssoBound :: JNullable Boolean
87+ , ssoBound :: JNullable Boolean
99− , identifier :: JNullable String
88+ , identifier :: JNullable String
100− , permissions :: JNullable PermissionsApi
89+ , permissions :: JNullable PermissionsApi
101− , resetPasswordEnrolled :: JNullable Boolean
90+ , resetPasswordEnrolled :: JNullable Boolean
102− , userId :: JNullable String
91+ , userId :: JNullable String
103− , providerId :: JNullable String
92+ , providerId :: JNullable String
104− , providerName :: JNullable String
93+ , providerName :: JNullable String
105− , familySponsorshipFriendlyName :: JNullable String
94+ , familySponsorshipFriendlyName :: JNullable String
106− , familySponsorshipAvailable :: JNullable Boolean
95+ , familySponsorshipAvailable :: JNullable Boolean
107− , planProductType :: JNullable ProductType
96+ , planProductType :: JNullable ProductType
108− , keyConnectorEnabled :: JNullable Boolean
97+ , keyConnectorEnabled :: JNullable Boolean
109− , keyConnectorUrl :: JNullable String
98+ , keyConnectorUrl :: JNullable String
110− , familySponsorshipLastSyncDate :: JNullable Timestamp
99+ , familySponsorshipLastSyncDate :: JNullable Timestamp
111− , familySponsorshipValidUntil :: JNullable Timestamp
100+ , familySponsorshipValidUntil :: JNullable Timestamp
112− , familySponsorshipToDelete :: JNullable Boolean
101+ , familySponsorshipToDelete :: JNullable Boolean
115organizationUserStatusTypeInvited = 0 :: OrganizationUserStatusType
104organizationUserStatusTypeInvited = 0 :: OrganizationUserStatusType
@@ -118,7 +107,8 @@ organizationUserStatusTypeAccepted = 0 :: OrganizationUserStatusType
119organizationUserStatusTypeConfirmed = 0 :: OrganizationUserStatusType
108organizationUserStatusTypeConfirmed = 0 :: OrganizationUserStatusType
121−type OrganizationUserStatusType = Int
110+type OrganizationUserStatusType
123organizationUserTypeOwner = 0 :: OrganizationUserType
113organizationUserTypeOwner = 0 :: OrganizationUserType
@@ -130,26 +120,27 @@ organizationUserTypeManager = 3 :: OrganizationUserType
131organizationUserTypeCustom = 4 :: OrganizationUserType
121organizationUserTypeCustom = 4 :: OrganizationUserType
133−type OrganizationUserType = Int
123+type OrganizationUserType
135−type PermissionsApi =
126+type PermissionsApi
136− { accessEventLogs :: Boolean
127+ = { accessEventLogs :: Boolean
137− , accessImportExport :: Boolean
128+ , accessImportExport :: Boolean
138− , accessReports :: Boolean
129+ , accessReports :: Boolean
139− , manageAllCollections :: Boolean
130+ , manageAllCollections :: Boolean
140− , createNewCollections :: Boolean
131+ , createNewCollections :: Boolean
141− , editAnyCollection :: Boolean
132+ , editAnyCollection :: Boolean
142− , deleteAnyCollection :: Boolean
133+ , deleteAnyCollection :: Boolean
143− , manageAssignedCollections :: Boolean
134+ , manageAssignedCollections :: Boolean
144− , editAssignedCollections :: Boolean
135+ , editAssignedCollections :: Boolean
145− , deleteAssignedCollections :: Boolean
136+ , deleteAssignedCollections :: Boolean
146− , manageCiphers :: Boolean
137+ , manageCiphers :: Boolean
147− , manageGroups :: Boolean
138+ , manageGroups :: Boolean
148− , manageSso :: Boolean
139+ , manageSso :: Boolean
149− , managePolicies :: Boolean
140+ , managePolicies :: Boolean
150− , manageUsers :: Boolean
141+ , manageUsers :: Boolean
151− , manageResetPassword :: Boolean
142+ , manageResetPassword :: Boolean
154productTypeFree = 0 :: ProductType
145productTypeFree = 0 :: ProductType
@@ -159,19 +150,20 @@ productTypeTeams = 2 :: ProductType
160productTypeEnterprise = 3 :: ProductType
151productTypeEnterprise = 3 :: ProductType
162−type ProductType = Int
153+type ProductType
164−type ProfileProviderResponse =
156+type ProfileProviderResponse
165− { id :: String
157+ = { id :: String
166− , name :: JNullable String
158+ , name :: JNullable String
167− , key :: JNullable String
159+ , key :: JNullable String
168− , status :: JNullable ProviderUserStatusType
160+ , status :: JNullable ProviderUserStatusType
169− , type :: JNullable ProviderUserType
161+ , type :: JNullable ProviderUserType
170− , enabled :: Boolean
162+ , enabled :: Boolean
171− , permissions :: PermissionsApi
163+ , permissions :: PermissionsApi
172− , userId :: JNullable String
164+ , userId :: JNullable String
173− , useEvents :: Boolean
165+ , useEvents :: Boolean
176providerUserStatusTypeInvited = 0 :: ProviderUserStatusType
168providerUserStatusTypeInvited = 0 :: ProviderUserStatusType
@@ -179,79 +171,81 @@ providerUserStatusTypeAccepted = 1 :: ProviderUserStatusType
180providerUserStatusTypeConfirmed = 2 :: ProviderUserStatusType
172providerUserStatusTypeConfirmed = 2 :: ProviderUserStatusType
182−type ProviderUserStatusType = Int
174+type ProviderUserStatusType
184providerUserTypeProviderAdmin = 0 :: ProviderUserType
177providerUserTypeProviderAdmin = 0 :: ProviderUserType
186providerUserTypeServiceUser = 1 :: ProviderUserType
179providerUserTypeServiceUser = 1 :: ProviderUserType
188−type ProviderUserType = Int
181+type ProviderUserType
190−type ProfileProviderOrganizationResponse =
184+type ProfileProviderOrganizationResponse
191− { id :: String
185+ = { id :: String
192− , name :: JNullable String
186+ , name :: JNullable String
193− , usePolicies :: Boolean
187+ , usePolicies :: Boolean
194− , useGroups :: Boolean
188+ , useGroups :: Boolean
195− , useDirectory :: Boolean
189+ , useDirectory :: Boolean
196− , useEvents :: Boolean
190+ , useEvents :: Boolean
197− , useTotp :: Boolean
191+ , useTotp :: Boolean
198− , use2fa :: Boolean
192+ , use2fa :: Boolean
199− , useApi :: Boolean
193+ , useApi :: Boolean
200− , useSso :: Boolean
194+ , useSso :: Boolean
201− , useKeyConnector :: Boolean
195+ , useKeyConnector :: Boolean
202− , useResetPassword :: Boolean
196+ , useResetPassword :: Boolean
203− , selfHost :: Boolean
197+ , selfHost :: Boolean
204− , usersGetPremium :: Boolean
198+ , usersGetPremium :: Boolean
205− , seats :: Int
199+ , seats :: Int
206− , maxCollections :: Int
200+ , maxCollections :: Int
207− , maxStorageGb :: JNullable Int
201+ , maxStorageGb :: JNullable Int
208− , key :: JNullable String
202+ , key :: JNullable String
209− , hasPublicAndPrivateKeys :: Boolean
203+ , hasPublicAndPrivateKeys :: Boolean
210− , status :: OrganizationUserStatusType
204+ , status :: OrganizationUserStatusType
211− , type :: OrganizationUserType
205+ , type :: OrganizationUserType
212− , enabled :: Boolean
206+ , enabled :: Boolean
213− , ssoBound :: Boolean
207+ , ssoBound :: Boolean
214− , identifier :: JNullable String
208+ , identifier :: JNullable String
215− , permissions :: PermissionsApi
209+ , permissions :: PermissionsApi
216− , resetPasswordEnrolled :: Boolean
210+ , resetPasswordEnrolled :: Boolean
217− , userId :: JNullable String
211+ , userId :: JNullable String
218− , providerId :: JNullable String
212+ , providerId :: JNullable String
219− , providerName :: JNullable String
213+ , providerName :: JNullable String
220− , familySponsorshipFriendlyName :: JNullable String
214+ , familySponsorshipFriendlyName :: JNullable String
221− , familySponsorshipAvailable :: Boolean
215+ , familySponsorshipAvailable :: Boolean
222− , planProductType :: ProductType
216+ , planProductType :: ProductType
223− , keyConnectorEnabled :: Boolean
217+ , keyConnectorEnabled :: Boolean
224− , keyConnectorUrl :: JNullable String
218+ , keyConnectorUrl :: JNullable String
225− , familySponsorshipLastSyncDate :: JNullable Timestamp
219+ , familySponsorshipLastSyncDate :: JNullable Timestamp
226− , familySponsorshipValidUntil :: JNullable Timestamp
220+ , familySponsorshipValidUntil :: JNullable Timestamp
227− , familySponsorshipToDelete :: JNullable Boolean
221+ , familySponsorshipToDelete :: JNullable Boolean
230−type Urls =
224+type Urls
231− { base :: JNullable String
225+ = { base :: JNullable String
232− , webVault :: JNullable String
226+ , webVault :: JNullable String
233− , api :: JNullable String
227+ , api :: JNullable String
234− , identity :: JNullable String
228+ , identity :: JNullable String
235− , icons :: JNullable String
229+ , icons :: JNullable String
236− , notifications :: JNullable String
230+ , notifications :: JNullable String
237− , events :: JNullable String
231+ , events :: JNullable String
238− , keyConnector :: JNullable String
232+ , keyConnector :: JNullable String
241−type PasswordTokenRequest =
235+type PasswordTokenRequest
242− { email :: Email
236+ = { email :: Email
243− , masterPasswordHash :: String
237+ , masterPasswordHash :: String
244− , captchaResponse :: String
238+ , captchaResponse :: String
245− , twoFactor :: TokenRequestTwoFactor
239+ , twoFactor :: TokenRequestTwoFactor
246− , device :: DeviceRequest
240+ , device :: DeviceRequest
249−type DeviceRequest =
243+type DeviceRequest
250− { type :: DeviceType
244+ = { type :: DeviceType
251− , name :: String
245+ , name :: String
252− , identifier :: String
246+ , identifier :: String
253− , pushToken :: JNullable String
247+ , pushToken :: JNullable String
256deviceTypeAndroid = 0 :: DeviceType
250deviceTypeAndroid = 0 :: DeviceType
@@ -295,13 +289,14 @@ deviceTypeVivaldiExtension = 19 :: DeviceType
296deviceTypeSafariExtension = 20 :: DeviceType
290deviceTypeSafariExtension = 20 :: DeviceType
298−type DeviceType = Int
292+type DeviceType
300−type TokenRequestTwoFactor =
295+type TokenRequestTwoFactor
301− { provider :: TwoFactorProviderType
296+ = { provider :: TwoFactorProviderType
302− , token :: String
297+ , token :: String
303− , remember :: Boolean
298+ , remember :: Boolean
306twoFactorProviderTypeAuthenticator = 0 :: TwoFactorProviderType
301twoFactorProviderTypeAuthenticator = 0 :: TwoFactorProviderType
@@ -319,11 +314,12 @@ twoFactorProviderTypeOrganizationDuo = 6 :: TwoFactorProviderType
320twoFactorProviderTypeWebAuthn = 7 :: TwoFactorProviderType
315twoFactorProviderTypeWebAuthn = 7 :: TwoFactorProviderType
322−type TwoFactorProviderType = Int
317+type TwoFactorProviderType
324−secondFactorTypeToBridge
320+secondFactorTypeToBridge ::
325− :: TwoFactorProviderType
321+ TwoFactorProviderType ->
326− -> Maybe Bridge.TwoFactorProviderType
322+ Maybe Bridge.TwoFactorProviderType
327secondFactorTypeToBridge x = case x of
323secondFactorTypeToBridge x = case x of
329 | n == twoFactorProviderTypeAuthenticator -> Just Bridge.Authenticator
325 | n == twoFactorProviderTypeAuthenticator -> Just Bridge.Authenticator
@@ -353,17 +349,21 @@ bridgeToSecondFactorType Bridge.Remember = twoFactorProviderTypeRemember
353bridgeToSecondFactorType Bridge.OrganizationDuo = twoFactorProviderTypeOrganizationDuo
349bridgeToSecondFactorType Bridge.OrganizationDuo = twoFactorProviderTypeOrganizationDuo
354bridgeToSecondFactorType Bridge.WebAuthn = twoFactorProviderTypeWebAuthn
350bridgeToSecondFactorType Bridge.WebAuthn = twoFactorProviderTypeWebAuthn
356−newtype Password = Password String
352+newtype Password
358hashPurposeServerAuthorization = 1 :: HashPurpose
355hashPurposeServerAuthorization = 1 :: HashPurpose
360hashPurposeLocalAuthorization = 2 :: HashPurpose
357hashPurposeLocalAuthorization = 2 :: HashPurpose
362−type HashPurpose = Int
359+type HashPurpose
364−newtype StringHash = StringHash String
362+newtype StringHash
366−newtype AccessToken = AccessToken String
365+newtype AccessToken
366+ = AccessToken String
368derive newtype instance Show AccessToken
368derive newtype instance Show AccessToken
369derive newtype instance Eq AccessToken
369derive newtype instance Eq AccessToken
@@ -371,7 +371,8 @@ derive newtype instance Ord AccessToken
371derive newtype instance EncodeJson AccessToken
371derive newtype instance EncodeJson AccessToken
372derive newtype instance DecodeJson AccessToken
372derive newtype instance DecodeJson AccessToken
374−newtype RefreshToken = RefreshToken String
374+newtype RefreshToken
375+ = RefreshToken String
376derive newtype instance Show RefreshToken
377derive newtype instance Show RefreshToken
377derive newtype instance Eq RefreshToken
378derive newtype instance Eq RefreshToken
@@ -383,33 +384,27 @@ type IdentityCaptchaResponse =
383 { siteKey :: String
384 { siteKey :: String
386−type IdentityTokenResponse =
387+type IdentityTokenResponse
387− { accessToken :: AccessToken
388+ = { accessToken :: AccessToken
388− , expiresIn :: Int
389+ , expiresIn :: Int
389− , refreshToken :: RefreshToken
390+ , refreshToken :: RefreshToken
390− , tokenType :: String
391+ , tokenType :: String
391− , resetMasterPassword :: Boolean
392+ , resetMasterPassword :: Boolean
392− , privateKey :: EncryptedString
393+ , privateKey :: EncryptedString
393− , key :: EncryptedString
394+ , key :: EncryptedString
394− , twoFactorToken :: JNullable String
395+ , twoFactorToken :: JNullable String
395− , kdf :: KDF
396+ , kdf :: KDF
396− , kdfIterations :: Int
397+ , kdfIterations :: Int
397− , forcePasswordReset :: JNullable Boolean
398+ , forcePasswordReset :: JNullable Boolean
398− , apiUseKeyConnector :: JNullable Boolean
399+ , apiUseKeyConnector :: JNullable Boolean
399− , keyConnectorUrl :: JNullable String
400+ , keyConnectorUrl :: JNullable String
402−newtype TwoFactorProviderTypes = TwoFactorProviderTypes (Array (Int |+| String))
403+newtype TwoFactorProviderTypes = TwoFactorProviderTypes (Array TwoFactorProviderType)
404instance HasRuntimeType TwoFactorProviderTypes where
405instance HasRuntimeType TwoFactorProviderTypes where
405 hasRuntimeType Proxy = Foreign.isArray
406 hasRuntimeType Proxy = Foreign.isArray
407−fromTwoFactorProviderType :: TwoFactorProviderTypes -> Either String (Array Bridge.TwoFactorProviderType)
408−fromTwoFactorProviderType (TwoFactorProviderTypes xs) =
409− for xs $ \rawProvider -> do
410− providerInt <- Union.reduce (Either.Right /\ (\x -> Either.note x $ Int.fromString x)) rawProvider
411− Either.note (show providerInt) $ secondFactorTypeToBridge providerInt
413type IdentityTwoFactorResponse =
408type IdentityTwoFactorResponse =
414 { twoFactorProviders :: TwoFactorProviderTypes
409 { twoFactorProviders :: TwoFactorProviderTypes
415 -- it is a Map type and untaged unions gets confused
410 -- it is a Map type and untaged unions gets confused
@@ -417,57 +412,59 @@ type IdentityTwoFactorResponse =
417 , captchaToken :: String |+| Undefined
412 , captchaToken :: String |+| Undefined
420−newtype Email = Email String
415+newtype Email
422−type SyncResponse =
418+type SyncResponse
423− { profile :: ProfileResponse
419+ = { profile :: ProfileResponse
424− , folders :: Array FolderResponse
420+ , folders :: Array FolderResponse
425− , collections :: Array CollectionDetailsResponse
421+ , collections :: Array CollectionDetailsResponse
426− , ciphers :: Array CipherResponse
422+ , ciphers :: Array CipherResponse
427− , domains :: JNullable DomainsResponse
423+ , domains :: JNullable DomainsResponse
428− , policies :: JNullable (Array PolicyResponse)
424+ , policies :: JNullable (Array PolicyResponse)
429− , sends :: Array SendResponse
425+ , sends :: Array SendResponse
432−type FolderResponse =
428+type FolderResponse
433− { id :: String
429+ = { id :: String
434− , name :: JNullable String
430+ , name :: JNullable String
435− , revisionDate :: JNullable String
431+ , revisionDate :: JNullable String
434+type CollectionDetailsResponse
436+ , organizationId :: JNullable String
437+ , name :: JNullable String
438+ , externalId :: JNullable String
439+ , readOnly :: Boolean
438−type CollectionDetailsResponse =
440− , organizationId :: JNullable String
441− , name :: JNullable String
442− , externalId :: JNullable String
443− , readOnly :: Boolean
446type CipherId = String
443type CipherId = String
448−type CipherResponse =
445+type CipherResponse
449− { id :: CipherId
446+ = { id :: CipherId
450− , organizationId :: JNullable String
447+ , organizationId :: JNullable String
451− , folderId :: JNullable String
448+ , folderId :: JNullable String
452− , type :: CipherType
449+ , type :: CipherType
453− , name :: EncryptedString
450+ , name :: EncryptedString
454− , notes :: JNullable EncryptedString
451+ , notes :: JNullable EncryptedString
455− , fields :: JNullable (Array FieldApi)
452+ , fields :: JNullable (Array FieldApi)
456− , login :: JNullable LoginApi
453+ , login :: JNullable LoginApi
457− , card :: JNullable CardApi
454+ , card :: JNullable CardApi
458− , identity :: JNullable IdentityApi
455+ , identity :: JNullable IdentityApi
459− , secureNote :: JNullable SecureNoteApi
456+ , secureNote :: JNullable SecureNoteApi
460− , favorite :: Boolean
457+ , favorite :: Boolean
461− , edit :: JNullable Boolean
458+ , edit :: JNullable Boolean
462− , viewPassword :: JNullable Boolean
459+ , viewPassword :: JNullable Boolean
463− , organizationUseTotp :: JNullable Boolean
460+ , organizationUseTotp :: JNullable Boolean
464− , revisionDate :: JNullable Timestamp
461+ , revisionDate :: JNullable Timestamp
465− , attachments :: JNullable (Array AttachmentResponse)
462+ , attachments :: JNullable (Array AttachmentResponse)
466− , passwordHistory :: JNullable (Array PasswordHistoryResponse)
463+ , passwordHistory :: JNullable (Array PasswordHistoryResponse)
467− , collectionIds :: JNullable (Array String)
464+ , collectionIds :: JNullable (Array String)
468− , deletedDate :: JNullable String
465+ , deletedDate :: JNullable String
469− , reprompt :: CipherRepromptType
466+ , reprompt :: CipherRepromptType
472cipherTypeLogin = 1 :: CipherType
469cipherTypeLogin = 1 :: CipherType
@@ -477,14 +474,15 @@ cipherTypeCard = 3 :: CipherType
478cipherTypeIdentity = 4 :: CipherType
475cipherTypeIdentity = 4 :: CipherType
480−type CipherType = Int
477+type CipherType
482−type FieldApi =
480+type FieldApi
483− { name :: JNullable String
481+ = { name :: JNullable String
484− , value :: JNullable String
482+ , value :: JNullable String
485− , type :: FieldType
483+ , type :: FieldType
486− , linkedId :: JNullable LinkedIdType
484+ , linkedId :: JNullable LinkedIdType
489fieldTypeText = 0 :: FieldType
487fieldTypeText = 0 :: FieldType
@@ -494,7 +492,8 @@ fieldTypeBoolean = 2 :: FieldType
495fieldTypeLinked = 3 :: FieldType
493fieldTypeLinked = 3 :: FieldType
497−type FieldType = Int
495+type FieldType
499linkedIdTypeLoginLinkedIdUsername = 100 :: LinkedIdType
498linkedIdTypeLoginLinkedIdUsername = 100 :: LinkedIdType
@@ -550,22 +549,23 @@ linkedIdTypeIdentityLinkedIdLastName = 417 :: LinkedIdType
551linkedIdTypeIdentityLinkedIdFullName = 418 :: LinkedIdType
550linkedIdTypeIdentityLinkedIdFullName = 418 :: LinkedIdType
553−type LinkedIdType = Int
552+type LinkedIdType
555−type LoginApi =
555+type LoginApi
556− { uris :: JOpt (Array LoginUriApi)
556+ = { uris :: JOpt (Array LoginUriApi)
557− , username :: JNullable EncryptedString
557+ , username :: JNullable EncryptedString
558− , password :: JNullable EncryptedString
558+ , password :: JNullable EncryptedString
559− , passwordRevisionDate :: JNullable String
559+ , passwordRevisionDate :: JNullable String
560− , totp :: JNullable EncryptedString
560+ , totp :: JNullable EncryptedString
561− -- This thing is undefined in some cases for some reson. Just ignoring it
561+ -- This thing is undefined in some cases for some reson. Just ignoring it
562− , autofillOnPageLoad :: JOpt (JNullable Boolean)
562+ , autofillOnPageLoad :: JOpt (JNullable Boolean)
565−type LoginUriApi =
565+type LoginUriApi
566− { uri :: JNullable EncryptedString
566+ = { uri :: EncryptedString
567− , match :: JNullable UriMatchType
567+ , match :: JNullable UriMatchType
570uriMatchTypeDomain = 0 :: UriMatchType
570uriMatchTypeDomain = 0 :: UriMatchType
@@ -579,85 +579,87 @@ uriMatchTypeRegularExpression = 4 :: UriMatchType
580uriMatchTypeNever = 5 :: UriMatchType
580uriMatchTypeNever = 5 :: UriMatchType
582−type UriMatchType = Int
582+type UriMatchType
584−type CardApi =
585+type CardApi
585− { cardholderName :: JNullable EncryptedString
586+ = { cardholderName :: JNullable EncryptedString
586− , brand :: JNullable EncryptedString
587+ , brand :: JNullable EncryptedString
587− , number :: JNullable EncryptedString
588+ , number :: JNullable EncryptedString
588− , expMonth :: JNullable EncryptedString
589+ , expMonth :: JNullable EncryptedString
589− , expYear :: JNullable EncryptedString
590+ , expYear :: JNullable EncryptedString
590− , code :: JNullable EncryptedString
591+ , code :: JNullable EncryptedString
593−type IdentityApi =
594+type IdentityApi
594− { title :: JNullable EncryptedString
595+ = { title :: JNullable EncryptedString
595− , firstName :: JNullable EncryptedString
596+ , firstName :: JNullable EncryptedString
596− , middleName :: JNullable EncryptedString
597+ , middleName :: JNullable EncryptedString
597− , lastName :: JNullable EncryptedString
598+ , lastName :: JNullable EncryptedString
598− , address1 :: JNullable EncryptedString
599+ , address1 :: JNullable EncryptedString
599− , address2 :: JNullable EncryptedString
600+ , address2 :: JNullable EncryptedString
600− , address3 :: JNullable EncryptedString
601+ , address3 :: JNullable EncryptedString
601− , city :: JNullable EncryptedString
602+ , city :: JNullable EncryptedString
602− , state :: JNullable EncryptedString
603+ , state :: JNullable EncryptedString
603− , postalCode :: JNullable EncryptedString
604+ , postalCode :: JNullable EncryptedString
604− , country :: JNullable EncryptedString
605+ , country :: JNullable EncryptedString
605− , company :: JNullable EncryptedString
606+ , company :: JNullable EncryptedString
606− , email :: JNullable EncryptedString
607+ , email :: JNullable EncryptedString
607− , phone :: JNullable EncryptedString
608+ , phone :: JNullable EncryptedString
608− , ssn :: JNullable EncryptedString
609+ , ssn :: JNullable EncryptedString
609− , username :: JNullable EncryptedString
610+ , username :: JNullable EncryptedString
610− , passportNumber :: JNullable EncryptedString
611+ , passportNumber :: JNullable EncryptedString
611− , licenseNumber :: JNullable EncryptedString
612+ , licenseNumber :: JNullable EncryptedString
614secureNoteTypeGeneric = 0 :: SecureNoteType
615secureNoteTypeGeneric = 0 :: SecureNoteType
616−type SecureNoteType = Int
617+type SecureNoteType
618−type SecureNoteApi =
620+type SecureNoteApi = {
620 -- type :: SecureNoteType
621 -- type :: SecureNoteType
623−type AttachmentResponse =
624+type AttachmentResponse
624− { id :: String
625+ = { id :: String
625− , url :: JNullable String
626+ , url :: JNullable String
626− , fileName :: JNullable String
627+ , fileName :: JNullable String
627− , key :: JNullable String
628+ , key :: JNullable String
628− , size :: JNullable String
629+ , size :: JNullable String
629− , sizeName :: JNullable String
630+ , sizeName :: JNullable String
632−type PasswordHistoryResponse =
633+type PasswordHistoryResponse
633− { password :: String
634+ = { password :: String
634− , lastUsedDate :: JNullable String
635+ , lastUsedDate :: JNullable String
637cipherRepromptTypeNone = 0 :: CipherRepromptType
638cipherRepromptTypeNone = 0 :: CipherRepromptType
639cipherRepromptTypePassword = 1 :: CipherRepromptType
640cipherRepromptTypePassword = 1 :: CipherRepromptType
641−type CipherRepromptType = Int
642+type CipherRepromptType
643−type DomainsResponse =
645+type DomainsResponse
644− { equivalentDomains :: Array (Array String)
646+ = { equivalentDomains :: Array (Array String)
645− , globalEquivalentDomains :: Array GlobalDomainResponse
647+ , globalEquivalentDomains :: Array GlobalDomainResponse
648−type GlobalDomainResponse =
650+type GlobalDomainResponse
649− { type :: Int
651+ = { type :: Int
650− , domains :: Array String
652+ , domains :: Array String
651− , excluded :: Boolean
653+ , excluded :: Boolean
654−type PolicyResponse =
656+type PolicyResponse
655− { id :: String
657+ = { id :: String
656− , organizationId :: JNullable String
658+ , organizationId :: JNullable String
657− , type :: PolicyType
659+ , type :: PolicyType
658− , data :: ShowableJson
660+ , data :: ShowableJson
659− , enabled :: Boolean
661+ , enabled :: Boolean
662policyTypeTwoFactorAuthentication = 0 :: PolicyType -- Requires users to have 2fa enabled
664policyTypeTwoFactorAuthentication = 0 :: PolicyType -- Requires users to have 2fa enabled
@@ -681,44 +683,46 @@ policyTypeMaximumVaultTimeout = 9 :: PolicyType -- Sets the maximum allowed vaul
682policyTypeDisablePersonalVaultExport = 10 :: PolicyType -- Disable personal vault export
684policyTypeDisablePersonalVaultExport = 10 :: PolicyType -- Disable personal vault export
684−type PolicyType = Int
686+type PolicyType
686−type SendResponse =
689+type SendResponse
687− { id :: String
690+ = { id :: String
688− , accessId :: JNullable String
691+ , accessId :: JNullable String
689− , type :: SendType
692+ , type :: SendType
690− , name :: JNullable String
693+ , name :: JNullable String
691− , notes :: JNullable String
694+ , notes :: JNullable String
692− , file :: JNullable SendFileApi
695+ , file :: JNullable SendFileApi
693− , text :: JNullable SendTextApi
696+ , text :: JNullable SendTextApi
694− , key :: JNullable String
697+ , key :: JNullable String
695− , maxAccessCount :: JNullable Int
698+ , maxAccessCount :: JNullable Int
696− , accessCount :: JNullable Int
699+ , accessCount :: JNullable Int
697− , revisionDate :: JNullable String
700+ , revisionDate :: JNullable String
698− , expirationDate :: JNullable String
701+ , expirationDate :: JNullable String
699− , deletionDate :: JNullable String
702+ , deletionDate :: JNullable String
700− , password :: JNullable String
703+ , password :: JNullable String
701− , disable :: Boolean
704+ , disable :: Boolean
702− , hideEmail :: Boolean
705+ , hideEmail :: Boolean
705sendTypeText = 0 :: SendType
708sendTypeText = 0 :: SendType
707sendTypeFile = 1 :: SendType
710sendTypeFile = 1 :: SendType
709−type SendType = Int
712+type SendType
711−type SendFileApi =
715+type SendFileApi
712− { id :: String
716+ = { id :: String
713− , fileName :: JNullable String
717+ , fileName :: JNullable String
714− , size :: JNullable String
718+ , size :: JNullable String
715− , sizeName :: JNullable String
719+ , sizeName :: JNullable String
718−type SendTextApi =
722+type SendTextApi
719− { text :: JNullable String
723+ = { text :: JNullable String
720− , hidden :: Boolean
724+ , hidden :: Boolean
723type TwoFactorEmailRequest =
727type TwoFactorEmailRequest =
724 { email :: Email
728 { email :: Email