[{"name":"Clerk","comment":" Clerk authentication for Elm, bridged through ClerkJS by the companion\nnpm package `@viewengine/elm-clerk`.\n\nThis package holds the typed state, the decoders and the command API. The\ntwo ports live in your own application, because the Elm package registry\ndoes not allow a package to declare them. Copy `Ports.elm` from the\nelm-clerk repository into your app: it declares `clerkOut : Value -> Cmd\nmsg` and `clerkIn : (Value -> msg) -> Sub msg`, and it never changes.\n\nThen hand both of them to this package as a `Ports` record:\n\n    clerkPorts : Clerk.Ports Msg\n    clerkPorts =\n        { toJs = Ports.clerkOut, fromJs = Ports.clerkIn }\n\n\n# State\n\n@docs State, Msg, Ports, Event\n\n\n# Wiring\n\n@docs init, update, subscriptions\n\n\n# Commands\n\n@docs signOut, openSignIn, openSignUp, openUserProfile\n@docs mountSignIn, mountUserButton, unmount\n@docs requestToken, setActiveOrganization\n\n\n# Flags\n\n@docs stateDecoder\n\n","unions":[{"name":"Event","comment":" What just happened, returned by [`update`](#update) so the app can react\nto it. Ignore the events you do not care about.\n\n`Error` carries a human readable description of anything that went wrong,\nincluding an unknown message tag and a message this package could not\ndecode. It never crashes the app.\n\n","args":[],"cases":[["StateChanged",["Clerk.State"]],["TokenReceived",["{ requestId : String.String, token : String.String }"]],["TokenFailed",["{ requestId : String.String, reason : String.String }"]],["Error",["String.String"]]]},{"name":"State","comment":" Everything the app knows about the current visitor.\n\n`Loading` is the only state before the shim reports the first\n`stateChanged`, so every app must render something for it.\n\n","args":[],"cases":[["Loading",[]],["SignedOut",[]],["SignedIn",["{ session : Clerk.Session.Session, user : Clerk.User.User, organization : Maybe.Maybe Clerk.Organization.Organization }"]]]}],"aliases":[{"name":"Msg","comment":" An opaque message produced by [`subscriptions`](#subscriptions). Wrap it\nin one of your own constructors and hand it back to [`update`](#update).\n","args":[],"type":"Clerk.Internal.Protocol.Msg"},{"name":"Ports","comment":" The two ports the shim talks over. They are passed to every function in\nthis module, so this package declares none of its own.\n","args":["msg"],"type":"{ toJs : Json.Decode.Value -> Platform.Cmd.Cmd msg, fromJs : (Json.Decode.Value -> msg) -> Platform.Sub.Sub msg }"}],"values":[{"name":"init","comment":" The state before the shim has said anything, which is `Loading`.\n\nIf the shim hands you the current state as a flag, decode that with\n[`stateDecoder`](#stateDecoder) instead so the first render is correct.\n\n","type":"Clerk.State"},{"name":"mountSignIn","comment":" Mount Clerk's sign-in component into the element with the given id.\n\nThe element must already be in the document, so send this from a command\nafter the view that contains it has rendered.\n\n","type":"Clerk.Ports msg -> String.String -> Platform.Cmd.Cmd msg"},{"name":"mountUserButton","comment":" Mount Clerk's user button into the element with the given id.\n","type":"Clerk.Ports msg -> String.String -> Platform.Cmd.Cmd msg"},{"name":"openSignIn","comment":" Open Clerk's hosted sign-in modal.\n","type":"Clerk.Ports msg -> Platform.Cmd.Cmd msg"},{"name":"openSignUp","comment":" Open Clerk's hosted sign-up modal.\n","type":"Clerk.Ports msg -> Platform.Cmd.Cmd msg"},{"name":"openUserProfile","comment":" Open Clerk's hosted user profile modal.\n","type":"Clerk.Ports msg -> Platform.Cmd.Cmd msg"},{"name":"requestToken","comment":" Ask for a session token, optionally minted from a JWT template.\n\nYou choose the `requestId` and get it back on the matching\n`TokenReceived` or `TokenFailed` event, so several requests can be in\nflight at once.\n\n    Clerk.requestToken clerkPorts\n        { requestId = \"backend-call-1\", template = Just \"backend\" }\n\n","type":"Clerk.Ports msg -> { requestId : String.String, template : Maybe.Maybe String.String } -> Platform.Cmd.Cmd msg"},{"name":"setActiveOrganization","comment":" Make the organization with the given id the active one. The shim\nreports the result as a `stateChanged` event.\n","type":"Clerk.Ports msg -> String.String -> Platform.Cmd.Cmd msg"},{"name":"signOut","comment":" Sign the current user out, ending the session in every tab.\n","type":"Clerk.Ports msg -> Platform.Cmd.Cmd msg"},{"name":"stateDecoder","comment":" Decode the state JSON the shim sends, which is also what it passes as\nthe initial flag:\n\n    { \"status\": \"loading\" }\n\n    { \"status\": \"signedOut\" }\n\n    { \"status\": \"signedIn\"\n    , \"session\": Session\n    , \"user\": User\n    , \"organization\": Organization | null\n    }\n\nUse it on your flags so the very first render already knows who is signed\nin:\n\n    Decode.decodeValue Clerk.stateDecoder flags\n        |> Result.withDefault Clerk.init\n\n","type":"Json.Decode.Decoder Clerk.State"},{"name":"subscriptions","comment":" Listen for messages from the shim.\n\n    subscriptions : Model -> Sub Msg\n    subscriptions _ =\n        Clerk.subscriptions clerkPorts ClerkMsg\n\n","type":"Clerk.Ports msg -> (Clerk.Msg -> msg) -> Platform.Sub.Sub msg"},{"name":"unmount","comment":" Unmount whatever Clerk component was mounted on the element with the\ngiven id.\n","type":"Clerk.Ports msg -> String.String -> Platform.Cmd.Cmd msg"},{"name":"update","comment":" Fold an incoming message into the state.\n\nA `stateChanged` message replaces the state and reports\n`Just (StateChanged newState)`; every other message leaves the state alone\nand only reports an event.\n\n    update : Msg -> Model -> ( Model, Cmd Msg )\n    update msg model =\n        case msg of\n            ClerkMsg clerkMsg ->\n                let\n                    ( clerk, cmd, event ) =\n                        Clerk.update clerkPorts clerkMsg model.clerk\n                in\n                ( { model | clerk = clerk }, cmd )\n\n","type":"Clerk.Ports msg -> Clerk.Msg -> Clerk.State -> ( Clerk.State, Platform.Cmd.Cmd msg, Maybe.Maybe Clerk.Event )"}],"binops":[]},{"name":"Clerk.Actor","comment":" The Clerk actor claim, present on a session that is being impersonated.\n\n@docs Actor, decoder\n\n","unions":[],"aliases":[{"name":"Actor","comment":" Who is acting on behalf of the session's user.\n\n`sub` is the impersonator's user id. The JSON key `type` becomes the Elm\nfield `type_`, because `type` is a reserved word.\n\n","args":[],"type":"{ sub : String.String, type_ : Maybe.Maybe String.String }"}],"values":[{"name":"decoder","comment":" Decode an `Actor` from the JSON the shim sends.\n\n    { \"sub\": \"user_admin\", \"type\": \"impersonation\" }\n\n","type":"Json.Decode.Decoder Clerk.Actor.Actor"}],"binops":[]},{"name":"Clerk.EmailAddress","comment":" The Clerk email address resource, one entry of `Clerk.User`'s\n`emailAddresses`.\n\n@docs EmailAddress, decoder\n\n","unions":[],"aliases":[{"name":"EmailAddress","comment":" One of a user's email addresses.\n\n`linkedTo` is empty unless the address arrived through another\nidentification, such as an OAuth account.\n\n","args":[],"type":"{ id : String.String, emailAddress : String.String, verification : Clerk.Verification.Verification, matchesSsoConnection : Basics.Bool, linkedTo : List.List Clerk.IdentificationLink.IdentificationLink }"}],"values":[{"name":"decoder","comment":" Decode an `EmailAddress` from the JSON the shim sends.\n\n    { \"id\": \"idn_1\"\n    , \"emailAddress\": \"ada@example.com\"\n    , \"verification\": Verification\n    , \"matchesSsoConnection\": false\n    , \"linkedTo\": [ IdentificationLink ]\n    }\n\n`linkedTo` is `[]` when ClerkJS has no links.\n\n","type":"Json.Decode.Decoder Clerk.EmailAddress.EmailAddress"}],"binops":[]},{"name":"Clerk.EnterpriseAccount","comment":" The Clerk enterprise account resource, one entry of `Clerk.User`'s\n`enterpriseAccounts`: an account the user holds through enterprise SSO.\n\n@docs EnterpriseAccount, decoder\n\n","unions":[],"aliases":[{"name":"EnterpriseAccount","comment":" One enterprise SSO account.\n\n`publicMetadata` is passed through untouched as a JSON value, which is\nalways an object.\n\n","args":[],"type":"{ id : Maybe.Maybe String.String, active : Basics.Bool, emailAddress : String.String, enterpriseConnectionId : Maybe.Maybe String.String, enterpriseConnection : Maybe.Maybe Clerk.EnterpriseConnection.EnterpriseConnection, firstName : Maybe.Maybe String.String, lastName : Maybe.Maybe String.String, protocol : String.String, provider : String.String, providerUserId : Maybe.Maybe String.String, publicMetadata : Json.Decode.Value, verification : Maybe.Maybe Clerk.Verification.Verification, lastAuthenticatedAt : Maybe.Maybe Time.Posix }"}],"values":[{"name":"decoder","comment":" Decode an `EnterpriseAccount` from the JSON the shim sends.\n\n    { \"id\": \"eac_2\"\n    , \"active\": true\n    , \"emailAddress\": \"ada@acme.test\"\n    , \"enterpriseConnectionId\": \"conn_1\"\n    , \"enterpriseConnection\": EnterpriseConnection\n    , \"firstName\": \"Ada\"\n    , \"lastName\": \"Lovelace\"\n    , \"protocol\": \"saml\"\n    , \"provider\": \"saml_okta\"\n    , \"providerUserId\": \"okta_1\"\n    , \"publicMetadata\": {}\n    , \"verification\": Verification\n    , \"lastAuthenticatedAt\": 1700000000000\n    }\n\n`lastAuthenticatedAt` arrives as epoch milliseconds and accepts `null`.\n\n","type":"Json.Decode.Decoder Clerk.EnterpriseAccount.EnterpriseAccount"}],"binops":[]},{"name":"Clerk.EnterpriseConnection","comment":" The Clerk enterprise connection resource, the SSO connection behind an\nenterprise account.\n\n@docs EnterpriseConnection, decoder\n\n","unions":[],"aliases":[{"name":"EnterpriseConnection","comment":" One enterprise SSO connection.\n\n`protocol` is for example `\"saml\"`, and `provider` names the identity\nprovider.\n\n","args":[],"type":"{ id : Maybe.Maybe String.String, active : Basics.Bool, allowIdpInitiated : Basics.Bool, allowSubdomains : Basics.Bool, disableAdditionalIdentifications : Basics.Bool, domain : String.String, logoPublicUrl : Maybe.Maybe String.String, name : String.String, protocol : String.String, provider : String.String, syncUserAttributes : Basics.Bool, allowOrganizationAccountLinking : Basics.Bool, enterpriseConnectionId : Maybe.Maybe String.String }"}],"values":[{"name":"decoder","comment":" Decode an `EnterpriseConnection` from the JSON the shim sends.\n\n    { \"id\": \"conn_1\"\n    , \"active\": true\n    , \"allowIdpInitiated\": false\n    , \"allowSubdomains\": true\n    , \"disableAdditionalIdentifications\": false\n    , \"domain\": \"acme.test\"\n    , \"logoPublicUrl\": \"https://img.clerk.com/acme\"\n    , \"name\": \"Acme SAML\"\n    , \"protocol\": \"saml\"\n    , \"provider\": \"saml_okta\"\n    , \"syncUserAttributes\": true\n    , \"allowOrganizationAccountLinking\": true\n    , \"enterpriseConnectionId\": \"conn_1\"\n    }\n\n","type":"Json.Decode.Decoder Clerk.EnterpriseConnection.EnterpriseConnection"}],"binops":[]},{"name":"Clerk.ExternalAccount","comment":" The Clerk external account resource, one entry of `Clerk.User`'s\n`externalAccounts`: an OAuth account the user has connected.\n\n@docs ExternalAccount, decoder\n\n","unions":[],"aliases":[{"name":"ExternalAccount","comment":" One connected OAuth account.\n\n`approvedScopes` is the space separated scope string exactly as the\nprovider returned it. `publicMetadata` is passed through untouched as a\nJSON value, which is always an object.\n\n","args":[],"type":"{ id : String.String, identificationId : String.String, provider : String.String, providerUserId : String.String, emailAddress : String.String, approvedScopes : String.String, firstName : String.String, lastName : String.String, imageUrl : String.String, username : Maybe.Maybe String.String, phoneNumber : Maybe.Maybe String.String, label : Maybe.Maybe String.String, publicMetadata : Json.Decode.Value, verification : Maybe.Maybe Clerk.Verification.Verification }"}],"values":[{"name":"decoder","comment":" Decode an `ExternalAccount` from the JSON the shim sends.\n\n    { \"id\": \"eac_1\"\n    , \"identificationId\": \"idn_4\"\n    , \"provider\": \"google\"\n    , \"providerUserId\": \"1234567890\"\n    , \"emailAddress\": \"ada@example.com\"\n    , \"approvedScopes\": \"email profile\"\n    , \"firstName\": \"Ada\"\n    , \"lastName\": \"Lovelace\"\n    , \"imageUrl\": \"https://img.clerk.com/ada\"\n    , \"username\": null\n    , \"phoneNumber\": null\n    , \"label\": null\n    , \"publicMetadata\": {}\n    , \"verification\": Verification\n    }\n\n","type":"Json.Decode.Decoder Clerk.ExternalAccount.ExternalAccount"}],"binops":[]},{"name":"Clerk.IdentificationLink","comment":" The Clerk identification link resource, which ties an email address or\nphone number back to the identification it came from.\n\n@docs IdentificationLink, decoder\n\n","unions":[],"aliases":[{"name":"IdentificationLink","comment":" One entry of an email address's or phone number's `linkedTo` list.\n\nThe JSON key `type` becomes the Elm field `type_`, because `type` is a\nreserved word.\n\n","args":[],"type":"{ id : String.String, type_ : String.String }"}],"values":[{"name":"decoder","comment":" Decode an `IdentificationLink` from the JSON the shim sends.\n\n    { \"id\": \"idn_1\", \"type\": \"oauth_google\" }\n\n","type":"Json.Decode.Decoder Clerk.IdentificationLink.IdentificationLink"}],"binops":[]},{"name":"Clerk.Organization","comment":" The Clerk organization resource, with the fields listed in\n`coverage.json`.\n\nAn organization is only present when one is active; see\n`Clerk.setActiveOrganization`.\n\n@docs Organization, decoder\n\n","unions":[],"aliases":[{"name":"Organization","comment":" The active Clerk organization.\n\n`publicMetadata` is passed through untouched as a JSON value, which is\nalways an object.\n\n","args":[],"type":"{ id : String.String, name : String.String, slug : Maybe.Maybe String.String, imageUrl : String.String, hasImage : Basics.Bool, membersCount : Basics.Int, pendingInvitationsCount : Basics.Int, publicMetadata : Json.Decode.Value, adminDeleteEnabled : Basics.Bool, maxAllowedMemberships : Basics.Int, selfServeSSOEnabled : Basics.Bool, exclusiveMembership : Basics.Bool, createdAt : Time.Posix, updatedAt : Time.Posix }"}],"values":[{"name":"decoder","comment":" Decode an `Organization` from the JSON the shim sends.\n\n    { \"id\": \"org_1\"\n    , \"name\": \"Acme\"\n    , \"slug\": \"acme\"\n    , \"imageUrl\": \"https://img.clerk.com/acme\"\n    , \"hasImage\": true\n    , \"membersCount\": 12\n    , \"pendingInvitationsCount\": 3\n    , \"publicMetadata\": {}\n    , \"adminDeleteEnabled\": true\n    , \"maxAllowedMemberships\": 25\n    , \"selfServeSSOEnabled\": false\n    , \"exclusiveMembership\": false\n    , \"createdAt\": 1700000000000\n    , \"updatedAt\": 1700003600000\n    }\n\n`slug` accepts `null`; both timestamps arrive as epoch milliseconds.\n\n","type":"Json.Decode.Decoder Clerk.Organization.Organization"}],"binops":[]},{"name":"Clerk.OrganizationMembership","comment":" The Clerk organization membership resource, one entry of\n`Clerk.User`'s `organizationMemberships`.\n\n@docs OrganizationMembership, decoder\n\n","unions":[],"aliases":[{"name":"OrganizationMembership","comment":" One membership tying a user to an organization.\n\n`role` is the role key (`\"org:admin\"`) and `roleName` its display name.\n`publicMetadata` is passed through untouched as a JSON value, which is\nalways an object.\n\n","args":[],"type":"{ id : String.String, organization : Clerk.Organization.Organization, permissions : List.List String.String, publicMetadata : Json.Decode.Value, publicUserData : Maybe.Maybe Clerk.PublicUserData.PublicUserData, role : String.String, roleName : String.String, createdAt : Time.Posix, updatedAt : Time.Posix }"}],"values":[{"name":"decoder","comment":" Decode an `OrganizationMembership` from the JSON the shim sends.\n\n    { \"id\": \"orgmem_1\"\n    , \"organization\": Organization\n    , \"permissions\": [ \"org:sys_profile:manage\" ]\n    , \"publicMetadata\": {}\n    , \"publicUserData\": PublicUserData\n    , \"role\": \"org:admin\"\n    , \"roleName\": \"Admin\"\n    , \"createdAt\": 1700000000000\n    , \"updatedAt\": 1700003600000\n    }\n\n`permissions` is `[]` when ClerkJS has none, and `publicUserData` accepts\n`null`.\n\n","type":"Json.Decode.Decoder Clerk.OrganizationMembership.OrganizationMembership"}],"binops":[]},{"name":"Clerk.Passkey","comment":" The Clerk passkey resource, one entry of `Clerk.User`'s `passkeys`.\n\n@docs Passkey, decoder\n\n","unions":[],"aliases":[{"name":"Passkey","comment":" One of a user's registered passkeys.\n\nThe WebAuthn `publicKey` of the verification is browser-only and is\ndeliberately not serialized.\n\n","args":[],"type":"{ id : String.String, name : Maybe.Maybe String.String, lastUsedAt : Maybe.Maybe Time.Posix, verification : Maybe.Maybe Clerk.Verification.Verification }"}],"values":[{"name":"decoder","comment":" Decode a `Passkey` from the JSON the shim sends.\n\n    { \"id\": \"passkey_1\"\n    , \"name\": \"MacBook\"\n    , \"lastUsedAt\": 1700000000000\n    , \"verification\": Verification\n    }\n\n`lastUsedAt` arrives as epoch milliseconds and accepts `null`.\n\n","type":"Json.Decode.Decoder Clerk.Passkey.Passkey"}],"binops":[]},{"name":"Clerk.PhoneNumber","comment":" The Clerk phone number resource, one entry of `Clerk.User`'s\n`phoneNumbers`.\n\n@docs PhoneNumber, decoder\n\n","unions":[],"aliases":[{"name":"PhoneNumber","comment":" One of a user's phone numbers.\n\n`backupCodes` is empty unless ClerkJS has issued backup codes for this\nnumber as a second factor.\n\n","args":[],"type":"{ id : String.String, phoneNumber : String.String, verification : Clerk.Verification.Verification, reservedForSecondFactor : Basics.Bool, defaultSecondFactor : Basics.Bool, linkedTo : List.List Clerk.IdentificationLink.IdentificationLink, backupCodes : List.List String.String }"}],"values":[{"name":"decoder","comment":" Decode a `PhoneNumber` from the JSON the shim sends.\n\n    { \"id\": \"idn_2\"\n    , \"phoneNumber\": \"+15555550100\"\n    , \"verification\": Verification\n    , \"reservedForSecondFactor\": true\n    , \"defaultSecondFactor\": false\n    , \"linkedTo\": [ IdentificationLink ]\n    , \"backupCodes\": [ \"abcd-1234\" ]\n    }\n\nBoth lists are `[]` when ClerkJS has nothing to send.\n\n","type":"Json.Decode.Decoder Clerk.PhoneNumber.PhoneNumber"}],"binops":[]},{"name":"Clerk.PublicUserData","comment":" The public snapshot of a user that Clerk attaches to a session and to an\norganization membership.\n\nIt is deliberately smaller than `Clerk.User`: it is the data Clerk is happy\nto show to other members of an organization.\n\n@docs PublicUserData, decoder\n\n","unions":[],"aliases":[{"name":"PublicUserData","comment":" The public fields of a user.\n\n`identifier` is whatever the user signs in with (an email address, a phone\nnumber or a username).\n\n","args":[],"type":"{ firstName : Maybe.Maybe String.String, lastName : Maybe.Maybe String.String, imageUrl : String.String, hasImage : Basics.Bool, identifier : String.String, userId : Maybe.Maybe String.String, username : Maybe.Maybe String.String, banned : Basics.Bool, deprovisioned : Basics.Bool }"}],"values":[{"name":"decoder","comment":" Decode a `PublicUserData` from the JSON the shim sends.\n\n    { \"firstName\": \"Ada\"\n    , \"lastName\": \"Lovelace\"\n    , \"imageUrl\": \"https://img.clerk.com/ada\"\n    , \"hasImage\": true\n    , \"identifier\": \"ada@example.com\"\n    , \"userId\": \"user_1\"\n    , \"username\": \"ada\"\n    , \"banned\": false\n    , \"deprovisioned\": false\n    }\n\n`banned` and `deprovisioned` are optional in ClerkJS; the shim sends\n`false` when they are absent.\n\n","type":"Json.Decode.Decoder Clerk.PublicUserData.PublicUserData"}],"binops":[]},{"name":"Clerk.Session","comment":" The Clerk session resource, with the fields listed in `coverage.json`.\n\nThe session token is deliberately absent: tokens are only available through\n`Clerk.requestToken`, which round-trips to ClerkJS so the token is always\nfresh. The session's `user` is not repeated here either; it is the sibling\n`user` field of `Clerk.SignedIn`.\n\n@docs Session, FactorVerificationAge, decoder\n\n","unions":[],"aliases":[{"name":"FactorVerificationAge","comment":" Minutes since the first and second authentication factors were verified,\nas ClerkJS reports them for step-up checks. `Nothing` on the session when\nClerkJS has no age information.\n","args":[],"type":"{ firstFactorAge : Basics.Int, secondFactorAge : Basics.Int }"},{"name":"Session","comment":" The active Clerk session.\n\n`status` is passed through as ClerkJS reports it (for example `\"active\"`),\nso a new status value never fails to decode. `tasks` holds the pending\nsession task keys (`\"choose-organization\"`, `\"reset-password\"`,\n`\"setup-mfa\"`) and `currentTask` the one ClerkJS is currently asking for.\n`actor` is set while an admin is impersonating the user.\n\n","args":[],"type":"{ id : String.String, status : String.String, expireAt : Time.Posix, abandonAt : Time.Posix, lastActiveAt : Time.Posix, createdAt : Time.Posix, updatedAt : Time.Posix, factorVerificationAge : Maybe.Maybe Clerk.Session.FactorVerificationAge, lastActiveOrganizationId : Maybe.Maybe String.String, actor : Maybe.Maybe Clerk.Actor.Actor, tasks : List.List String.String, currentTask : Maybe.Maybe String.String, publicUserData : Clerk.PublicUserData.PublicUserData }"}],"values":[{"name":"decoder","comment":" Decode a `Session` from the JSON the shim sends.\n\n    { \"id\": \"sess_1\"\n    , \"status\": \"active\"\n    , \"expireAt\": 1700003600000\n    , \"abandonAt\": 1702592000000\n    , \"lastActiveAt\": 1700000000000\n    , \"createdAt\": 1699990000000\n    , \"updatedAt\": 1700000000000\n    , \"factorVerificationAge\": { \"firstFactorAge\": 5, \"secondFactorAge\": -1 }\n    , \"lastActiveOrganizationId\": \"org_1\"\n    , \"actor\": null\n    , \"tasks\": []\n    , \"currentTask\": null\n    , \"publicUserData\": PublicUserData\n    }\n\nTimestamps arrive as epoch milliseconds. `factorVerificationAge`, `actor`,\n`lastActiveOrganizationId` and `currentTask` accept `null`.\n\n","type":"Json.Decode.Decoder Clerk.Session.Session"}],"binops":[]},{"name":"Clerk.User","comment":" The Clerk user resource, with the fields listed in `coverage.json`.\n\nFields that ClerkJS exposes but this package does not decode are simply\nignored, so a Clerk release that adds a field cannot break decoding.\n\n@docs User, decoder\n\n","unions":[],"aliases":[{"name":"User","comment":" A signed-in Clerk user.\n\n`primaryEmailAddress`, `primaryPhoneNumber` and `primaryWeb3Wallet` are the\nidentifier strings themselves (`user.primaryEmailAddress?.emailAddress` in\nClerkJS), not resource objects; the full resources are in the matching\nlists, keyed by the `primary...Id` fields. `publicMetadata` and\n`unsafeMetadata` are passed through untouched as JSON values, always\nobjects.\n\n","args":[],"type":"{ id : String.String, externalId : Maybe.Maybe String.String, username : Maybe.Maybe String.String, fullName : Maybe.Maybe String.String, firstName : Maybe.Maybe String.String, lastName : Maybe.Maybe String.String, imageUrl : String.String, hasImage : Basics.Bool, primaryEmailAddressId : Maybe.Maybe String.String, primaryEmailAddress : Maybe.Maybe String.String, primaryPhoneNumberId : Maybe.Maybe String.String, primaryPhoneNumber : Maybe.Maybe String.String, primaryWeb3WalletId : Maybe.Maybe String.String, primaryWeb3Wallet : Maybe.Maybe String.String, emailAddresses : List.List Clerk.EmailAddress.EmailAddress, phoneNumbers : List.List Clerk.PhoneNumber.PhoneNumber, web3Wallets : List.List Clerk.Web3Wallet.Web3Wallet, externalAccounts : List.List Clerk.ExternalAccount.ExternalAccount, enterpriseAccounts : List.List Clerk.EnterpriseAccount.EnterpriseAccount, passkeys : List.List Clerk.Passkey.Passkey, organizationMemberships : List.List Clerk.OrganizationMembership.OrganizationMembership, passwordEnabled : Basics.Bool, totpEnabled : Basics.Bool, backupCodeEnabled : Basics.Bool, twoFactorEnabled : Basics.Bool, publicMetadata : Json.Decode.Value, unsafeMetadata : Json.Decode.Value, lastSignInAt : Maybe.Maybe Time.Posix, legalAcceptedAt : Maybe.Maybe Time.Posix, createdAt : Maybe.Maybe Time.Posix, updatedAt : Maybe.Maybe Time.Posix }"}],"values":[{"name":"decoder","comment":" Decode a `User` from the JSON the shim sends.\n\n    { \"id\": \"user_1\"\n    , \"externalId\": null\n    , \"username\": \"ada\"\n    , \"fullName\": \"Ada Lovelace\"\n    , \"firstName\": \"Ada\"\n    , \"lastName\": \"Lovelace\"\n    , \"imageUrl\": \"https://img.clerk.com/ada\"\n    , \"hasImage\": true\n    , \"primaryEmailAddressId\": \"idn_1\"\n    , \"primaryEmailAddress\": \"ada@example.com\"\n    , \"primaryPhoneNumberId\": null\n    , \"primaryPhoneNumber\": null\n    , \"primaryWeb3WalletId\": null\n    , \"primaryWeb3Wallet\": null\n    , \"emailAddresses\": [ EmailAddress ]\n    , \"phoneNumbers\": []\n    , \"web3Wallets\": []\n    , \"externalAccounts\": []\n    , \"enterpriseAccounts\": []\n    , \"passkeys\": []\n    , \"organizationMemberships\": []\n    , \"passwordEnabled\": true\n    , \"totpEnabled\": false\n    , \"backupCodeEnabled\": false\n    , \"twoFactorEnabled\": false\n    , \"publicMetadata\": {}\n    , \"unsafeMetadata\": {}\n    , \"lastSignInAt\": 1700000000000\n    , \"legalAcceptedAt\": null\n    , \"createdAt\": 1699990000000\n    , \"updatedAt\": 1700000000000\n    }\n\nEvery nullable field accepts `null`; lists may be empty. Timestamps arrive\nas epoch milliseconds.\n\n","type":"Json.Decode.Decoder Clerk.User.User"}],"binops":[]},{"name":"Clerk.Verification","comment":" The Clerk verification resource, the state of one attempt to verify an\nemail address, phone number, wallet or external account.\n\nEvery field is nullable because ClerkJS leaves them unset until the\nmatching step of the flow has run.\n\n@docs Verification, decoder\n\n","unions":[],"aliases":[{"name":"Verification","comment":" The verification attached to another resource.\n\n`error` is the `message` of the underlying `ClerkAPIError`, not the whole\nerror object. `externalVerificationRedirectURL` is the URL as a string.\nPasskey `publicKey` is browser-only and is deliberately not serialized.\n\n","args":[],"type":"{ status : Maybe.Maybe String.String, strategy : Maybe.Maybe String.String, expireAt : Maybe.Maybe Time.Posix, error : Maybe.Maybe String.String, message : Maybe.Maybe String.String, nonce : Maybe.Maybe String.String, externalVerificationRedirectURL : Maybe.Maybe String.String, verifiedAtClient : Maybe.Maybe String.String }"}],"values":[{"name":"decoder","comment":" Decode a `Verification` from the JSON the shim sends.\n\n    { \"status\": \"verified\"\n    , \"strategy\": \"email_code\"\n    , \"expireAt\": 1700003600000\n    , \"error\": null\n    , \"message\": null\n    , \"nonce\": null\n    , \"externalVerificationRedirectURL\": null\n    , \"verifiedAtClient\": null\n    }\n\n","type":"Json.Decode.Decoder Clerk.Verification.Verification"}],"binops":[]},{"name":"Clerk.Web3Wallet","comment":" The Clerk web3 wallet resource, one entry of `Clerk.User`'s\n`web3Wallets`.\n\n@docs Web3Wallet, decoder\n\n","unions":[],"aliases":[{"name":"Web3Wallet","comment":" One of a user's web3 wallets. `web3Wallet` is the wallet address.\n","args":[],"type":"{ id : String.String, web3Wallet : String.String, verification : Clerk.Verification.Verification }"}],"values":[{"name":"decoder","comment":" Decode a `Web3Wallet` from the JSON the shim sends.\n\n    { \"id\": \"idn_3\"\n    , \"web3Wallet\": \"0x0000000000000000000000000000000000000001\"\n    , \"verification\": Verification\n    }\n\n","type":"Json.Decode.Decoder Clerk.Web3Wallet.Web3Wallet"}],"binops":[]}]