Yoga.BetterAuth.Om
- Package
- purescript-yoga-better-auth
- Repository
- rowtype-yoga/purescript-yoga-better-auth
Re-exports from Yoga.BetterAuth.OmLayer
#BetterAuthL Source
type BetterAuthL :: Row Type -> Row Typetype BetterAuthL r = (auth :: Auth | r)
#AuthClientL Source
type AuthClientL :: Row Type -> Row Typetype AuthClientL r = (authClient :: AuthClient | r)
#testStackLive Source
testStackLive :: forall opts opts_. Lacks "database" opts => Union opts opts_ BetterAuthOptionsImpl => { baseURL :: String, betterAuthConfig :: Record opts, connectionString :: String } -> OmLayer (scope :: Scope) () { auth :: Auth, authClient :: AuthClient, database :: Database }#testClientLive' Source
testClientLive' :: forall r. String -> OmLayer (auth :: Auth | r) () { authClient :: AuthClient }#testClientLive Source
testClientLive :: forall r. OmLayer (auth :: Auth, baseURL :: String | r) () { authClient :: AuthClient }#databaseLive' Source
databaseLive' :: String -> OmLayer (scope :: Scope) () { database :: Database }#databaseLive Source
databaseLive :: forall r. OmLayer (connectionString :: String, scope :: Scope | r) () { database :: Database }#browserClientLive Source
browserClientLive :: forall r. OmLayer (baseURL :: String | r) () { authClient :: AuthClient }#betterAuthLive' Source
betterAuthLive' :: forall r opts opts_. Lacks "database" opts => Union opts opts_ BetterAuthOptionsImpl => Record opts -> OmLayer (database :: Database | r) () { auth :: Auth }#betterAuthLive Source
betterAuthLive :: forall r opts opts_. Lacks "database" opts => Union opts opts_ BetterAuthOptionsImpl => OmLayer (betterAuthConfig :: Record opts, database :: Database | r) () { auth :: Auth }#authFullLive Source
authFullLive :: forall opts opts_. Lacks "database" opts => Union opts opts_ BetterAuthOptionsImpl => { betterAuthConfig :: Record opts, connectionString :: String } -> OmLayer (scope :: Scope) () { auth :: Auth, database :: Database }Re-exports from Yoga.BetterAuth.Types
#User Source
type User = { createdAt :: ISODateString, email :: Email, emailVerified :: Boolean, id :: UserId, image :: Maybe String, name :: UserName, updatedAt :: ISODateString }#SignUpResult Source
type SignUpResult = { token :: Token, user :: User }#SessionWithUser Source
type SessionWithUser = { session :: Session, user :: User }#Session Source
type Session = { createdAt :: ISODateString, expiresAt :: ISODateString, id :: SessionId, ipAddress :: Maybe String, token :: Token, updatedAt :: ISODateString, userAgent :: Maybe String, userId :: UserId }#ISODateString Source
#ClientSignUpResult Source
type ClientSignUpResult = { token :: Maybe Token, user :: ClientUser }#ClientSignInResult Source
type ClientSignInResult = { redirect :: Boolean, token :: Token, user :: ClientUser }#ClientSessionWithUser Source
type ClientSessionWithUser = { session :: ClientSession, user :: ClientUser }#AuthClient Source
data AuthClientRe-exports from Yoga.Om.Layer
#Scope Source
newtype ScopeA first-class representation of resource lifetime and memoization.
Finalizers are registered via acquireRelease and run in reverse order
when the scope is closed. Layers are automatically memoized by identity
within a scope — the same layer value builds only once.
Instances
FilterScope (Cons "scope" Scope tail) tail
#OmLayer Source
data OmLayer :: Row Type -> Row Type -> Type -> Typedata OmLayer req err a
A layer that requires dependencies (req), may fail with (err), and produces a value (typically Record prov). Each layer has a unique identity used for automatic memoization within a Scope.
Instances
Functor (OmLayer req err)Apply (OmLayer req err)Applicative (OmLayer req err)Bind (OmLayer req err)Monad (OmLayer req err)Parallel (ParOmLayer req err) (OmLayer req err)(RowToList req reqRL, AllLabelsIn reqRL available isReady, FindReadyDispatch isReady sym (OmLayer req err (Record prov)) tail available allLayersRL foundSym foundLayer rest) => FindReady (Cons sym (OmLayer req err (Record prov)) tail) available allLayersRL foundSym foundLayer rest(RowToList prov provRL, HasLabel label provRL hasIt, FindProviderMatch hasIt label sym (Cons sym (OmLayer req err (Record prov)) tail) provider) => FindProvider label (Cons sym (OmLayer req err (Record prov)) tail) provider(RowToList req reqRL, FilterScope reqRL filteredReqRL, EmitEdges sym filteredReqRL allLayers edgeDoc, PrintEdgesRL tail allLayers restDoc) => PrintEdgesRL (Cons sym (OmLayer req err (Record prov)) tail) allLayers (Above edgeDoc restDoc)(RowToList req reqRL) => FindLayerReqs sym (Cons sym (OmLayer req err (Record prov)) tail) reqRL(RowToList req reqRL, FilterScope reqRL filteredReqRL, RowToList prov provRL, FirstProvLabel provRL displayName, HasDirectMissing filteredReqRL allLayers hasMissing, PrintLayerDispatch hasMissing displayName filteredReqRL tail allLayers doc) => PrintEdgesASCII (Cons sym (OmLayer req err (Record prov)) tail) allLayers doc
#withScopedWith Source
withScopedWith :: forall prov a r rl err_ err. RowToList (exception :: Error -> Aff (Record prov) | r) rl => VariantMatchCases rl err_ (Aff (Record prov)) => Union err_ () (exception :: Error | err) => { exception :: Error -> Aff (Record prov) | r } -> OmLayer (scope :: Scope) err (Record prov) -> (Record prov -> Aff a) -> Aff aLike withScoped but accepts error handlers for layers with typed errors.
#withScoped Source
withScoped :: forall prov a. OmLayer (scope :: Scope) () (Record prov) -> (Record prov -> Aff a) -> Aff aBuild a fully-provided scoped layer and pass the provisions to a callback.
A fresh Scope is created and closed when the callback completes,
running all finalizers in reverse order — whether by success, failure,
or interruption.
For layers with typed errors, use withScopedWith.
#runScopedWith Source
runScopedWith :: forall prov r rl err_ err. RowToList (exception :: Error -> Aff (Record prov) | r) rl => VariantMatchCases rl err_ (Aff (Record prov)) => Union err_ () (exception :: Error | err) => { exception :: Error -> Aff (Record prov) | r } -> OmLayer (scope :: Scope) err (Record prov) -> Aff (Record prov)Like runScoped but accepts error handlers for layers with typed errors.