alexbruf/elm-clerk/2.0.0

Clerk.Organization

The Clerk organization resource, with the fields listed in coverage.json.

An organization is only present when one is active; see Clerk.setActiveOrganization.

type alias Organization =
{ id : String
, name : String
, slug : Maybe String
, imageUrl : String
, hasImage : Bool
, membersCount : Int
, pendingInvitationsCount : Int
, publicMetadata : Value
, adminDeleteEnabled : Bool
, maxAllowedMemberships : Int
, selfServeSSOEnabled : Bool
, exclusiveMembership : Bool
, createdAt : Posix
, updatedAt : Posix
}

The active Clerk organization.

publicMetadata is passed through untouched as a JSON value, which is always an object.

decoder : Decoder Organization

Decode an Organization from the JSON the shim sends.

{ "id": "org_1"
, "name": "Acme"
, "slug": "acme"
, "imageUrl": "https://img.clerk.com/acme"
, "hasImage": true
, "membersCount": 12
, "pendingInvitationsCount": 3
, "publicMetadata": {}
, "adminDeleteEnabled": true
, "maxAllowedMemberships": 25
, "selfServeSSOEnabled": false
, "exclusiveMembership": false
, "createdAt": 1700000000000
, "updatedAt": 1700003600000
}

slug accepts null; both timestamps arrive as epoch milliseconds.