@@ -9,8 +9,8 @@ import Data.Nullable (Nullable)
99import Effect (Effect)
1010
1111type PreloginResponse = {
12− "Kdf" :: Int, -- seems to be always PBKDF2_SHA256
13− "KdfIterations" :: Int
12+ kdf :: Int, -- seems to be always PBKDF2_SHA256
13+ kdfIterations :: Int
1414}
1515
1616type PreloginRequest = {
@@ -18,63 +18,63 @@ type PreloginRequest = {
1818}
1919
2020type ProfileResponse = {
21− "Id" :: String,
22− "Name" :: String,
23− "Email" :: String,
24− "EmailVerified" :: Boolean,
25− "MasterPasswordHint" :: String,
26− "Premium" :: Boolean,
27− "PremiumFromOrganization" :: Boolean,
28− "Culture" :: String,
29− "TwoFactorEnabled" :: Boolean,
30− "Key" :: String,
31− "PrivateKey" :: String,
32− "SecurityStamp" :: String,
33− "ForcePasswordReset" :: Boolean,
34− "UsesKeyConnector" :: Boolean,
35− "Organizations" :: List ProfileOrganizationResponse,
36− "Providers" :: List ProfileProviderResponse,
37− "ProviderOrganizations" :: List ProfileProviderOrganizationResponse
21+ id :: String,
22+ name :: String,
23+ email :: String,
24+ emailVerified :: Boolean,
25+ masterPasswordHint :: String,
26+ premiumPersonally :: Boolean,
27+ premiumFromOrganization :: Boolean,
28+ culture :: String,
29+ twoFactorEnabled :: Boolean,
30+ key :: String,
31+ privateKey :: String,
32+ securityStamp :: String,
33+ forcePasswordReset :: Boolean,
34+ usesKeyConnector :: Boolean,
35+ organizations :: List ProfileOrganizationResponse,
36+ providers :: List ProfileProviderResponse,
37+ providerOrganizations :: List ProfileProviderOrganizationResponse
3838}
3939
4040type ProfileOrganizationResponse = {
41− "Id" :: String,
42− "Name" :: String,
43− "UsePolicies" :: Boolean,
44− "UseGroups" :: Boolean,
45− "UseDirectory" :: Boolean,
46− "UseEvents" :: Boolean,
47− "UseTotp" :: Boolean,
48− "Use2fa" :: Boolean,
49− "UseApi" :: Boolean,
50− "UseSso" :: Boolean,
51− "UseKeyConnector" :: Boolean,
52− "UseResetPassword" :: Boolean,
53− "SelfHost" :: Boolean,
54− "UsersGetPremium" :: Boolean,
55− "Seats" :: Int,
56− "MaxCollections" :: Int,
57− "MaxStorageGb" :: Nullable Int,
58− "Key" :: String,
59− "HasPublicAndPrivateKeys" :: Boolean,
60− "Status" :: OrganizationUserStatusType,
61− "Type" :: OrganizationUserType,
62− "Enabled" :: Boolean,
63− "SsoBound" :: Boolean,
64− "Identifier" :: String,
65− "permissions" :: PermissionsApi,
66− "ResetPasswordEnrolled" :: Boolean,
67− "UserId" :: String,
68− "ProviderId" :: String,
69− "ProviderName" :: String,
70− "FamilySponsorshipFriendlyName" :: String,
71− "FamilySponsorshipAvailable" :: Boolean,
72− "PlanProductType" :: ProductType,
73− "KeyConnectorEnabled" :: Boolean,
74− "KeyConnectorUrl" :: String,
75− "FamilySponsorshipLastSyncDate" :: Nullable Date,
76− "FamilySponsorshipValidUntil" :: Nullable Date,
77− "FamilySponsorshipToDelete" :: Nullable Boolean
41+ id :: String,
42+ name :: String,
43+ usePolicies :: Boolean,
44+ useGroups :: Boolean,
45+ useDirectory :: Boolean,
46+ useEvents :: Boolean,
47+ useTotp :: Boolean,
48+ use2fa :: Boolean,
49+ useApi :: Boolean,
50+ useSso :: Boolean,
51+ useKeyConnector :: Boolean,
52+ useResetPassword :: Boolean,
53+ selfHost :: Boolean,
54+ usersGetPremium :: Boolean,
55+ seats :: Int,
56+ maxCollections :: Int,
57+ maxStorageGb :: Nullable Int,
58+ key :: String,
59+ hasPublicAndPrivateKeys :: Boolean,
60+ status :: OrganizationUserStatusType,
61+ type :: OrganizationUserType,
62+ enabled :: Boolean,
63+ ssoBound :: Boolean,
64+ identifier :: String,
65+ permissions :: PermissionsApi,
66+ resetPasswordEnrolled :: Boolean,
67+ userId :: String,
68+ providerId :: String,
69+ providerName :: String,
70+ familySponsorshipFriendlyName :: String,
71+ familySponsorshipAvailable :: Boolean,
72+ planProductType :: ProductType,
73+ keyConnectorEnabled :: Boolean,
74+ keyConnectorUrl :: String,
75+ familySponsorshipLastSyncDate :: Nullable Date,
76+ familySponsorshipValidUntil :: Nullable Date,
77+ familySponsorshipToDelete :: Nullable Boolean
7878 }
7979
8080organizationUserStatusTypeInvited = 0 :: OrganizationUserStatusType
@@ -90,22 +90,22 @@ organizationUserTypeCustom = 4 :: OrganizationUserType
9090type OrganizationUserType = Int
9191
9292type PermissionsApi = {
93− "AccessEventLogs" :: Boolean,
94− "AccessImportExport" :: Boolean,
95− "AccessReports" :: Boolean,
96− "ManageAllCollections" :: Boolean,
97− "ManageAssignedCollections" :: Boolean,
98− "CreateNewCollections" :: Boolean,
99− "EditAnyCollection" :: Boolean,
100− "DeleteAnyCollection" :: Boolean,
101− "EditAssignedCollections" :: Boolean,
102− "DeleteAssignedCollections" :: Boolean,
103− "ManageCiphers" :: Boolean,
104− "ManageGroups" :: Boolean,
105− "ManageSso" :: Boolean,
106− "ManagePolicies" :: Boolean,
107− "ManageUsers" :: Boolean,
108− "ManageResetPassword" :: Boolean
93+ accessEventLogs :: Boolean,
94+ accessImportExport :: Boolean,
95+ accessReports :: Boolean,
96+ manageAllCollections :: Boolean,
97+ createNewCollections :: Boolean,
98+ editAnyCollection :: Boolean,
99+ deleteAnyCollection :: Boolean,
100+ manageAssignedCollections :: Boolean,
101+ editAssignedCollections :: Boolean,
102+ deleteAssignedCollections :: Boolean,
103+ manageCiphers :: Boolean,
104+ manageGroups :: Boolean,
105+ manageSso :: Boolean,
106+ managePolicies :: Boolean,
107+ manageUsers :: Boolean,
108+ manageResetPassword :: Boolean
109109}
110110
111111productTypeFree = 0 :: ProductType
@@ -151,6 +151,6 @@ type Urls = {
151151type ApiService = {
152152 postPrelogin :: PreloginRequest -> Promise PreloginResponse,
153153 getProfile :: Unit -> Promise ProfileResponse
154− }
154+}
155155
156156foreign import getAPI :: Urls -> Effect ApiService