Options
All
  • Public
  • Public/Protected
  • All
Menu

Supabase Client.

An isomorphic Javascript client for interacting with Postgres.

Hierarchy

  • SupabaseClient

Index

Constructors

  • Create a new client for use in the browser.

    Parameters

    • supabaseUrl: string

      The unique Supabase URL which is supplied when you create a new project in your project dashboard.

    • supabaseKey: string

      The unique Supabase Key which is supplied when you create a new project in your project dashboard.

    • Optional options: SupabaseClientOptions

    Returns SupabaseClient

Properties

auth: SupabaseAuthClient

Supabase Auth allows you to create and manage user sessions for access to data that is secured by access policies.

authUrl: string
changedAccessToken: undefined | string
fetch?: ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>)

Type declaration

    • (input: RequestInfo | URL, init?: RequestInit): Promise<Response>
    • Parameters

      • input: RequestInfo | URL
      • Optional init: RequestInit

      Returns Promise<Response>

functionsUrl: string
headers: {}

Type declaration

  • [key: string]: string
multiTab: boolean
realtime: RealtimeClient
realtimeUrl: string
restUrl: string
schema: string
shouldThrowOnError: boolean
storageUrl: string
supabaseKey: string
supabaseUrl: string

Accessors

  • get functions(): FunctionsClient
  • Supabase Functions allows you to deploy and invoke edge functions.

    Returns FunctionsClient

  • get storage(): StorageClient
  • Supabase Storage allows you to manage user-generated content, such as photos or videos.

    Returns StorageClient

Methods

  • _handleTokenChanged(event: AuthChangeEvent, token: undefined | string, source: "CLIENT" | "STORAGE"): void
  • _initPostgRESTClient(): default
  • _listenForMultiTabEvents(): null | void
  • removeAllSubscriptions(): Promise<{ data: { subscription: RealtimeSubscription }; error: null | Error }[]>
  • Closes and removes all subscriptions and returns a list of removed subscriptions and their errors.

    Returns Promise<{ data: { subscription: RealtimeSubscription }; error: null | Error }[]>

  • removeSubscription(subscription: RealtimeSubscription): Promise<{ data: { openSubscriptions: number }; error: null | Error }>
  • Closes and removes a subscription and returns the number of open subscriptions.

    Parameters

    Returns Promise<{ data: { openSubscriptions: number }; error: null | Error }>

  • rpc<T>(fn: string, params?: object, __namedParameters?: { count?: null | "exact" | "planned" | "estimated"; head?: boolean }): default<T>
  • Perform a function call.

    Type Parameters

    • T = any

    Parameters

    • fn: string

      The function name to call.

    • Optional params: object

      The parameters to pass to the function call.

    • __namedParameters: { count?: null | "exact" | "planned" | "estimated"; head?: boolean } = {}
      • Optional count?: null | "exact" | "planned" | "estimated"
      • Optional head?: boolean

    Returns default<T>

Generated using TypeDoc