# index | @supabase/supabase-js
Documentation for @supabase/supabase-js

## Index

### References

- Session
- SupabaseClientOptions
- SupabaseRealtimePayload
- User

### Namespaces

- Transformers

### Classes

- GoTrueApi
- GoTrueClient
- RealtimeClient
- RealtimeSubscription
- SupabaseClient

### Interfaces

- AdminUserAttributes
- ApiError
- AuthSession
- AuthUser
- CookieOptions
- OpenIDConnectCredentials
- Subscription
- UserAttributes
- UserCredentials
- UserIdentity
- VerifyEmailOTPParams
- VerifyMobileOTPParams

### Type Aliases

- AuthChangeEvent
- EmailOTPType
- MobileOTPType
- PostgrestError
- PostgrestMaybeSingleResponse
- PostgrestResponse
- PostgrestSingleResponse
- Provider
- RealtimeClientOptions
- SupportedStorage
- VerifyOTPParams

### Functions

- createClient

## References

### Session

Renames and re-exports AuthSession

### SupabaseClientOptions

Re-exports SupabaseClientOptions

### SupabaseRealtimePayload

Re-exports SupabaseRealtimePayload

### User

Renames and re-exports AuthUser

## Type Aliases

### AuthChangeEvent

AuthChangeEvent: "PASSWORD_RECOVERY" | "SIGNED_IN" | "SIGNED_OUT" | "TOKEN_REFRESHED" | "USER_UPDATED" | "USER_DELETED"

- Defined in node_modules/@supabase/gotrue-js/dist/module/lib/types.d.ts:2

### EmailOTPType

EmailOTPType: "signup" | "invite" | "magiclink" | "recovery" | "email_change"

- Defined in node_modules/@supabase/gotrue-js/dist/module/lib/types.d.ts:160

### MobileOTPType

MobileOTPType: "sms" | "phone_change"

- Defined in node_modules/@supabase/gotrue-js/dist/module/lib/types.d.ts:159

### PostgrestError

PostgrestError: { code: string; details: string; hint: string; message: string }

- Defined in node_modules/@supabase/postgrest-js/dist/module/lib/types.d.ts:7

Error format

https://postgrest.org/en/stable/api.html?highlight=options#errors-and-http-status-codes

#### Type declaration

- ##### code: string

- ##### details: string

- ##### hint: string

- ##### message: string

### PostgrestMaybeSingleResponse

PostgrestMaybeSingleResponse<T>: PostgrestSingleResponse <T | null>

- Defined in node_modules/@supabase/postgrest-js/dist/module/lib/types.d.ts:41

#### Type Parameters

- #### T

### PostgrestResponse

PostgrestResponse<T>: PostgrestResponseSuccess<T> | PostgrestResponseFailure

- Defined in node_modules/@supabase/postgrest-js/dist/module/lib/types.d.ts:34

#### Type Parameters

- #### T

### PostgrestSingleResponse

PostgrestSingleResponse<T>: PostgrestSingleResponseSuccess<T> | PostgrestResponseFailure

- Defined in node_modules/@supabase/postgrest-js/dist/module/lib/types.d.ts:40

#### Type Parameters

- #### T

### Provider

Provider: "apple" | "azure" | "bitbucket" | "discord" | "facebook" | "github" | "gitlab" | "google" | "keycloak" | "linkedin" | "notion" | "slack" | "spotify" | "twitch" | "twitter" | "workos"

- Defined in node_modules/@supabase/gotrue-js/dist/module/lib/types.d.ts:1

### RealtimeClientOptions

RealtimeClientOptions: { decode?: Function; encode?: Function; headers?: {}; heartbeatIntervalMs?: number; logger?: Function; longpollerTimeout?: number; params?: {}; reconnectAfterMs?: Function; timeout?: number; transport?: WebSocket }

- Defined in node_modules/@supabase/realtime-js/dist/module/RealtimeClient.d.ts:5

#### Type declaration

- ##### Optional decode?: Function

- ##### Optional encode?: Function

- ##### Optional headers?: {}

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

- ##### Optional heartbeatIntervalMs?: number

- ##### Optional logger?: Function

- ##### Optional longpollerTimeout?: number

- ##### Optional params?: {}

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

- ##### Optional reconnectAfterMs?: Function

- ##### Optional timeout?: number

- ##### Optional transport?: WebSocket

### SupportedStorage

SupportedStorage: PromisifyMethods<Pick<Storage, "getItem" | "setItem" | "removeItem">>

- Defined in node_modules/@supabase/gotrue-js/dist/module/lib/types.d.ts:173

### VerifyOTPParams

VerifyOTPParams: VerifyMobileOTPParams | VerifyEmailOTPParams

- Defined in node_modules/@supabase/gotrue-js/dist/module/lib/types.d.ts:146

## Functions

### createClient

- createClient(supabaseUrl: string, supabaseKey: string, options?: SupabaseClientOptions ): SupabaseClient

- - Defined in src/index.ts:16

  Creates a new Supabase Client.

  #### Parameters

  - ##### supabaseUrl: string

  - ##### supabaseKey: string

  - ##### Optional options: SupabaseClientOptions

  #### Returns SupabaseClient

Generated using TypeDoc