# lib/types | @supabase/supabase-js
Documentation for @supabase/supabase-js

## Index

### Interfaces

- SupabaseAuthClientOptions

### Type Aliases

- Fetch
- GenericObject
- SupabaseClientOptions
- SupabaseEventTypes
- SupabaseRealtimePayload

## Type Aliases

### Fetch

Fetch: typeof __type

- Defined in src/lib/types.ts:10

### GenericObject

GenericObject: {}

- Defined in src/lib/types.ts:8

#### Type declaration

- ##### [key: string]: string

### SupabaseClientOptions

SupabaseClientOptions: { autoRefreshToken?: boolean; cookieOptions?: SupabaseAuthClientOptions [ "cookieOptions" ]; detectSessionInUrl?: boolean; fetch?: Fetch ; headers?: GenericObject ; localStorage?: SupabaseAuthClientOptions [ "localStorage" ]; multiTab?: boolean; persistSession?: boolean; realtime?: RealtimeClientOptions ; schema?: string; shouldThrowOnError?: boolean }

- Defined in src/lib/types.ts:12

#### Type declaration

- ##### Optional autoRefreshToken?: boolean

  Automatically refreshes the token for logged in users. Defaults to `true`.

- ##### Optional cookieOptions?: SupabaseAuthClientOptions [ "cookieOptions" ]

  Options passed to the gotrue-js instance

- ##### Optional detectSessionInUrl?: boolean

  Detect a session from the URL. Used for OAuth login callbacks. Defaults to `true`.

- ##### Optional fetch?: Fetch

  A custom `fetch` implementation.

- ##### Optional headers?: GenericObject

  Optional headers for initializing the client.

- ##### Optional localStorage?: SupabaseAuthClientOptions [ "localStorage" ]

  A storage provider. Used to store the logged in session.

- ##### Optional multiTab?: boolean

  Allows to enable/disable multi-tab/window events

- ##### Optional persistSession?: boolean

  Whether to persist a logged in session to storage. Defaults to `true`.

- ##### Optional realtime?: RealtimeClientOptions

  Options passed to the realtime-js instance

- ##### Optional schema?: string

  The Postgres schema which your tables belong to. Must be on the list of exposed schemas in Supabase. Defaults to `public`.

- ##### Optional shouldThrowOnError?: boolean

  Throw errors, instead of returning them.

### SupabaseEventTypes

SupabaseEventTypes: "INSERT" | "UPDATE" | "DELETE" | "*"

- Defined in src/lib/types.ts:75

### SupabaseRealtimePayload

SupabaseRealtimePayload<T>: { commit_timestamp: string; errors: string[] | null; eventType: "INSERT" | "UPDATE" | "DELETE"; new: T; old: T; schema: string; table: string }

- Defined in src/lib/types.ts:63

#### Type Parameters

- #### T

#### Type declaration

- ##### commit_timestamp: string

- ##### errors: string[] | null

- ##### eventType: "INSERT" | "UPDATE" | "DELETE"

- ##### new: T

  The new record. Present for 'INSERT' and 'UPDATE' events.

- ##### old: T

  The previous record. Present for 'UPDATE' and 'DELETE' events.

- ##### schema: string

- ##### table: string

Generated using TypeDoc