Supabase Client.
An isomorphic Javascript client for interacting with Postgres.
Schema extends GenericSchema = Database[SchemaName] extends GenericSchema ? Database[SchemaName] : any
accessToken: () => Promise<string | null>
auth: SupabaseAuthClient
Supabase Auth allows you to create and manage user sessions for access to data that is secured by access policies.
changedAccessToken: string
fetch: Fetch
functions: FunctionsClient
Supabase Functions allows you to deploy and invoke edge functions.
functionsUrl: URL
realtime: RealtimeClient
realtimeUrl: URL
rest: PostgrestClient<Database, SchemaName, Schema>
storage: SupabaseStorageClient
Supabase Storage allows you to manage user-generated content, such as photos or videos.
storageKey: string
storageUrl: URL
_getAccessToken()
_handleTokenChanged(): void
_initRealtimeClient(options: RealtimeClientOptions)
_initSupabaseAuthClient()
_listenForAuthEvents()
Creates a Realtime channel with Broadcast, Presence, and Postgres Changes.
getChannels(): RealtimeChannel[]
Returns all Realtime channels.
removeAllChannels(): Promise<("ok"
| "timed out"
| "error")[]>
Unsubscribes and removes all Realtime channels from Realtime client.
removeChannel(channel: RealtimeChannel): Promise<"ok"
| "timed out"
| "error">
Unsubscribes and removes Realtime channel from Realtime client.
rpc<>(fn: FnName,args?: Fn["Args"],): PostgrestFilterBuilder<Schema, Fn["Returns"] extends any[] ? Fn["Returns"][number] extends Record<string, unknown> ? Fn["Returns"][number] : never : never, Fn["Returns"], FnName, null>
Perform a function call.
schema<DynamicSchema extends string & keyof Database>(schema: DynamicSchema): PostgrestClient<Database, DynamicSchema, Database[DynamicSchema] extends GenericSchema ? Database[DynamicSchema] : any>
Select a schema to query or perform an function (rpc) call.
The schema needs to be on the list of exposed schemas inside Supabase.