Module

Supabase

Package
purescript-supabase
Repository
i-am-the-slime/purescript-supabase

Re-exports from Supabase.Auth

#User Source

type User = { app_metadata :: Foreign, aud :: String, created_at :: Timestamp, email :: UserEmail, id :: UserId, role :: String, updated_at :: Timestamp, user_metadata :: Foreign }

#SignInWithOAuthOptions Source

type SignInWithOAuthOptions :: Row Typetype SignInWithOAuthOptions = (options :: { queryParams :: Foreign, redirectTo :: String, scopes :: String }, provider :: OAuthProvider)

#Session Source

type Session = { access_token :: AccessToken, expires_at :: Int, expires_in :: Int, refresh_token :: RefreshToken, token_type :: String, user :: User }

#FunctionResponse Source

type FunctionResponse d = { data :: Maybe d, error :: Maybe { message :: String } }

#AuthResult Source

type AuthResult = { session :: Maybe Session, user :: Maybe User }

#AuthResponse Source

type AuthResponse = { data :: AuthResult, error :: Maybe AuthError }

#AuthError Source

type AuthError = { message :: String, status :: Maybe Int }

#verifyPhoneOtp Source

verifyPhoneOtp :: { phone :: UserPhone, token :: OTPToken, type :: OTPType } -> Client -> Aff AuthResponse

#verifyEmailOtp Source

verifyEmailOtp :: { email :: UserEmail, token :: OTPToken, type :: OTPType } -> Client -> Aff AuthResponse

#updateUser Source

#signUpWithPhone Source

signUpWithPhone :: { password :: UserPassword, phone :: UserPhone } -> Client -> Aff AuthResponse

#signUpWithEmail Source

signUpWithEmail :: { email :: UserEmail, password :: UserPassword } -> Client -> Aff AuthResponse

#signOut Source

signOut :: Client -> Aff { error :: Maybe AuthError }

#signInWithSSO Source

signInWithSSO :: { domain :: SSODomain } -> Client -> Aff { data :: { url :: Maybe String }, error :: Maybe AuthError }

#signInWithPhone Source

signInWithPhone :: { password :: UserPassword, phone :: UserPhone } -> Client -> Aff AuthResponse

#signInWithOAuth Source

signInWithOAuth :: forall opts thru. Union opts thru SignInWithOAuthOptions => WriteForeign (Record opts) => Record opts -> Client -> Aff { data :: { provider :: OAuthProvider, url :: Maybe String }, error :: Maybe AuthError }

#signInWithIdToken Source

signInWithIdToken :: { provider :: OAuthProvider, token :: IdToken } -> Client -> Aff AuthResponse

#signInWithEmail Source

signInWithEmail :: { email :: UserEmail, password :: UserPassword } -> Client -> Aff AuthResponse

#setSession Source

setSession :: { access_token :: AccessToken, refresh_token :: RefreshToken } -> Client -> Aff AuthResponse

#sendOtpToPhone Source

#sendOtpToEmail Source

#resetPasswordForEmail Source

#removeAllChannels Source

#reauthenticate Source

#onAuthStateChange Source

onAuthStateChange :: (Maybe Session -> Effect Unit) -> Client -> Effect { data :: { subscription :: { id :: String, unsubscribe :: Effect Unit } } }

#invoke Source

invoke :: forall t body headers. ReadForeign t => WriteForeign body => WriteForeign headers => FunctionName -> body -> headers -> Client -> Aff (FunctionResponse t)

#getUser Source

getUser :: Client -> Aff { data :: { user :: Maybe User }, error :: Maybe AuthError }

#getSession Source

getSession :: Client -> Aff { data :: { session :: Maybe Session }, error :: Maybe AuthError }

Re-exports from Supabase.AuthHelpers

#ClientOptions Source

type ClientOptions :: Row Type -> Typetype ClientOptions r = { cookieOptions :: Maybe CookieOptions, options :: Maybe Options, supabaseKey :: Maybe String, supabaseUrl :: Maybe String | r }

#createBrowserClientWithOptions Source

Re-exports from Supabase.Filter

#FilterOp Source

newtype FilterOp

#Condition Source

newtype Condition :: Row Type -> Typenewtype Condition (table :: Row Type)

#neqOp Source

neqOp :: forall a. ToPostgrest a => a -> FilterOp

#neqC Source

neqC :: forall @col colType filterType table rest. IsSymbol col => Cons col colType rest table => FilterVal colType filterType => ToPostgrest filterType => filterType -> Condition table

#lteOp Source

lteOp :: forall a. ToPostgrest a => a -> FilterOp

#lteC Source

lteC :: forall @col colType filterType table rest. IsSymbol col => Cons col colType rest table => FilterVal colType filterType => ToPostgrest filterType => filterType -> Condition table

#ltOp Source

ltOp :: forall a. ToPostgrest a => a -> FilterOp

#ltC Source

ltC :: forall @col colType filterType table rest. IsSymbol col => Cons col colType rest table => FilterVal colType filterType => ToPostgrest filterType => filterType -> Condition table

#likeC Source

likeC :: forall @col colType filterType table rest. IsSymbol col => Cons col colType rest table => FilterVal colType filterType => ToPostgrest filterType => filterType -> Condition table

#isNullC Source

isNullC :: forall @col colType table rest. IsSymbol col => Cons col colType rest table => Condition table

#ilikeC Source

ilikeC :: forall @col colType filterType table rest. IsSymbol col => Cons col colType rest table => FilterVal colType filterType => ToPostgrest filterType => filterType -> Condition table

#gteOp Source

gteOp :: forall a. ToPostgrest a => a -> FilterOp

#gteC Source

gteC :: forall @col colType filterType table rest. IsSymbol col => Cons col colType rest table => FilterVal colType filterType => ToPostgrest filterType => filterType -> Condition table

#gtOp Source

gtOp :: forall a. ToPostgrest a => a -> FilterOp

#gtC Source

gtC :: forall @col colType filterType table rest. IsSymbol col => Cons col colType rest table => FilterVal colType filterType => ToPostgrest filterType => filterType -> Condition table

#eqOp Source

eqOp :: forall a. ToPostgrest a => a -> FilterOp

#eqC Source

eqC :: forall @col colType filterType table rest. IsSymbol col => Cons col colType rest table => FilterVal colType filterType => ToPostgrest filterType => filterType -> Condition table

Re-exports from Supabase.Realtime

#track Source

track :: forall payload. WriteForeign (Record payload) => Record payload -> Channel -> Aff RealtimeResponse

#on Source

on :: forall f cbi. WriteForeign f => ReadForeign cbi => RealtimeListenType -> f -> (cbi -> Effect Unit) -> Channel -> Effect Unit

Re-exports from Supabase.SSR

#CookieWithOptions Source

type CookieWithOptions = { name :: CookieName, options :: CookieOptions, value :: CookieValue }

#CookieOptions Source

type CookieOptions = { domain :: Maybe String, httpOnly :: Maybe Boolean, maxAge :: Maybe Seconds, path :: Maybe String, sameSite :: Maybe String, secure :: Maybe Boolean }

#CookieMethods Source

type CookieMethods = { getAll :: Effect (Array Cookie), setAll :: Array CookieWithOptions -> Effect Unit }

#Cookie Source

type Cookie = { name :: CookieName, value :: CookieValue }

Re-exports from Supabase.Storage

#StorageBucket Source

#Storage Source

data Storage

#ListOptionsR Source

type ListOptionsR :: Row Typetype ListOptionsR = (limit :: Int, offset :: Int, sortBy :: { column :: String, order :: String })

#ListOptions Source

type ListOptions = { limit :: Int, offset :: Int, sortBy :: { column :: String, order :: String } }

#FileOptions Source

type FileOptions = { upsert :: Boolean }

#list Source

list :: forall opts thru. WriteForeign (Record opts) => Union opts thru ListOptionsR => StoragePath -> Record opts -> StorageBucket -> Aff { data :: Maybe (Array { id :: Maybe String, name :: String }), error :: Maybe ResultError }

#exists Source

#createSignedUrls Source

createSignedUrls :: Array StoragePath -> Seconds -> StorageBucket -> Aff (Response (Array { error :: Maybe String, path :: String, signedUrl :: String }))

#createSignedUrl Source

Re-exports from Supabase.Supabase

#TextSearchType Source

#StatusR Source

type StatusR :: Row Type -> Row Typetype StatusR r = (status :: Int | r)

#ResultError Source

type ResultError = { code :: Maybe String, details :: Maybe String, message :: String }

#Response Source

#QueryBuilder Source

data QueryBuilder :: Row Type -> Row Type -> Typedata QueryBuilder t0 t1

#OrderOptions Source

type OrderOptions = { ascending :: Boolean, nullsFirst :: Boolean }

#IsValue Source

#FilterBuilder Source

data FilterBuilder :: Row Type -> Row Type -> Typedata FilterBuilder t0 t1

#ErrorR Source

type ErrorR :: Row Type -> Row Typetype ErrorR r = (error :: Maybe ResultError | r)

#DataR Source

type DataR :: Type -> Row Type -> Row Typetype DataR d r = (data :: Maybe d | r)

#CountResponse Source

#CountR Source

type CountR :: Row Type -> Row Typetype CountR r = (count :: Int | r)

#Count Source

#upsertWith Source

upsertWith :: forall row rels d rest. WriteForeign (Record d) => Union d rest row => Record d -> UpsertOptions -> QueryBuilder row rels -> FilterBuilder row row

#upsert Source

upsert :: forall row rels @d rest. WriteForeign (Record d) => Union d rest row => Record d -> QueryBuilder row rels -> FilterBuilder row row

#update Source

update :: forall row rels d rest. WriteForeign (Record d) => Union d rest row => Record d -> QueryBuilder row rels -> FilterBuilder row row

#textSearch Source

textSearch :: forall @col colType filterType table result rest. IsSymbol col => Cons col colType rest table => FilterType colType filterType => WriteForeign filterType => filterType -> { config :: String, type :: TextSearchType } -> FilterBuilder table result -> FilterBuilder table result

#singleWith Source

singleWith :: forall @t table result. ReadForeign t => FilterBuilder table result -> Aff (Response t)

#single Source

single :: forall table result. ReadForeign (Record result) => FilterBuilder table result -> Aff (Response (Record result))

#selectColumnsWithCount Source

selectColumnsWithCount :: forall @cols row rels result. IsSymbol cols => ParseSelect cols row rels result => Count -> QueryBuilder row rels -> FilterBuilder row result

#selectColumns Source

selectColumns :: forall @cols row rels result. IsSymbol cols => ParseSelect cols row rels result => QueryBuilder row rels -> FilterBuilder row result

#select Source

select :: forall row rels. QueryBuilder row rels -> FilterBuilder row row

#runWith Source

runWith :: forall @t table result. ReadForeign t => FilterBuilder table result -> Aff (Response t)

#run Source

run :: forall table result. ReadForeign (Record result) => FilterBuilder table result -> Aff (Response (Array (Record result)))

#range Source

range :: forall table result. ReadForeign (Record result) => { from :: Int, to :: Int } -> FilterBuilder table result -> Aff (Response (Array (Record result)))

#overlaps Source

overlaps :: forall @col colType filterType table result rest. IsSymbol col => Cons col colType rest table => FilterType colType filterType => WriteForeign filterType => filterType -> FilterBuilder table result -> FilterBuilder table result

#orderWith Source

orderWith :: forall @col val table result rest. IsSymbol col => Cons col val rest table => OrderOptions -> FilterBuilder table result -> FilterBuilder table result

#order Source

order :: forall @col val table result rest. IsSymbol col => Cons col val rest table => FilterBuilder table result -> FilterBuilder table result

#or Source

or :: forall table result. NonEmptyArray (Condition table) -> FilterBuilder table result -> FilterBuilder table result

#not_ Source

not_ :: forall @col colType table result rest. IsSymbol col => Cons col colType rest table => FilterOp -> FilterBuilder table result -> FilterBuilder table result

#neq Source

neq :: forall @col colType filterType table result rest. IsSymbol col => Cons col colType rest table => FilterType colType filterType => WriteForeign filterType => filterType -> FilterBuilder table result -> FilterBuilder table result

#maybeSingleWith Source

maybeSingleWith :: forall @t table result. ReadForeign t => FilterBuilder table result -> Aff (Response t)

#maybeSingle Source

maybeSingle :: forall table result. ReadForeign (Record result) => FilterBuilder table result -> Aff (Response (Record result))

#lte Source

lte :: forall @col colType filterType table result rest. IsSymbol col => Cons col colType rest table => FilterType colType filterType => WriteForeign filterType => filterType -> FilterBuilder table result -> FilterBuilder table result

#lt Source

lt :: forall @col colType filterType table result rest. IsSymbol col => Cons col colType rest table => FilterType colType filterType => WriteForeign filterType => filterType -> FilterBuilder table result -> FilterBuilder table result

#limit Source

limit :: forall table result. Int -> FilterBuilder table result -> FilterBuilder table result

#like Source

like :: forall @col colType filterType table result rest. IsSymbol col => Cons col colType rest table => FilterType colType filterType => WriteForeign filterType => filterType -> FilterBuilder table result -> FilterBuilder table result

#is Source

is :: forall @col colType table result rest. IsSymbol col => Cons col colType rest table => IsValue -> FilterBuilder table result -> FilterBuilder table result

#insertInto Source

insertInto :: forall row required rels @d rest reqRest. WriteForeign (Record d) => Union d rest row => Union required reqRest d => Table row required rels -> Record d -> Client -> FilterBuilder row row

#insert Source

insert :: forall row rels @d rest. WriteForeign (Record d) => Union d rest row => Record d -> QueryBuilder row rels -> FilterBuilder row row

#in_ Source

in_ :: forall @col colType filterType table result rest. IsSymbol col => Cons col colType rest table => FilterType colType filterType => WriteForeign filterType => NonEmptyArray filterType -> FilterBuilder table result -> FilterBuilder table result

#ilike Source

ilike :: forall @col colType filterType table result rest. IsSymbol col => Cons col colType rest table => FilterType colType filterType => WriteForeign filterType => filterType -> FilterBuilder table result -> FilterBuilder table result

#gte Source

gte :: forall @col colType filterType table result rest. IsSymbol col => Cons col colType rest table => FilterType colType filterType => WriteForeign filterType => filterType -> FilterBuilder table result -> FilterBuilder table result

#gt Source

gt :: forall @col colType filterType table result rest. IsSymbol col => Cons col colType rest table => FilterType colType filterType => WriteForeign filterType => filterType -> FilterBuilder table result -> FilterBuilder table result

#from Source

from :: forall row required rels. Table row required rels -> Client -> QueryBuilder row rels

#eq_ Source

eq_ :: forall @col colType filterType table result rest. IsSymbol col => Cons col colType rest table => FilterType colType filterType => WriteForeign filterType => filterType -> FilterBuilder table result -> FilterBuilder table result

#delete Source

delete :: forall row rels. QueryBuilder row rels -> FilterBuilder row row

#csv Source

csv :: forall table result. FilterBuilder table result -> FilterBuilder table result

#contains Source

contains :: forall @col colType filterType table result rest. IsSymbol col => Cons col colType rest table => FilterType colType filterType => WriteForeign filterType => filterType -> FilterBuilder table result -> FilterBuilder table result

#containedBy Source

containedBy :: forall @col colType filterType table result rest. IsSymbol col => Cons col colType rest table => FilterType colType filterType => WriteForeign filterType => filterType -> FilterBuilder table result -> FilterBuilder table result

#callRpcWith Source

callRpcWith :: forall params result. WriteForeign (Record params) => Rpc params result -> Record params -> Client -> FilterBuilder result result

#callRpc Source

callRpc :: forall params result. Rpc params result -> Client -> FilterBuilder result result

Re-exports from Supabase.Types

#Table Source

newtype Table :: Row Type -> Row Type -> Row Type -> Typenewtype Table row required relations

#Rpc Source

newtype Rpc :: Row Type -> Row Type -> Typenewtype Rpc params result

#Rel Source

data Rel :: Row Type -> Row Type -> Typedata Rel row rels

#Client Source

data Client

#mkTable Source

mkTable :: forall row required relations. String -> Table row required relations

#mkRpc Source

mkRpc :: forall params result. String -> Rpc params result

Re-exports from Supabase.UUID

Re-exports from Supabase.Util

#fromJSON Source

fromJSON :: forall json m. MonadThrow Error m => ReadForeign json => Foreign -> m json

#fromEither Source

fromEither :: forall t m. MonadThrow Error m => Either Error t -> m t