Skip to content

Commit

Permalink
feat: change type for db
Browse files Browse the repository at this point in the history
  • Loading branch information
joel@joellee.org committed Jun 22, 2022
1 parent 458cdeb commit 36dc881
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/SupabaseClient.ts
Expand Up @@ -103,7 +103,7 @@ export default class SupabaseClient<
this.realtime = this._initRealtimeClient({ headers: this.headers, ...settings.realtime })
this.rest = new PostgrestClient(`${_supabaseUrl}/rest/v1`, {
headers: this.headers,
schema: options?.db?.schema ?? 'public',
schema: options?.db?.schema,
fetch: this.fetch,
throwOnError: this.shouldThrowOnError,
})
Expand Down
9 changes: 6 additions & 3 deletions src/lib/types.ts
Expand Up @@ -12,7 +12,7 @@ export type SupabaseClientOptions<SchemaName> = {
* The Postgres schema which your tables belong to. Must be on the list of exposed schemas in Supabase. Defaults to 'public'.
*/
db?: {
schema?: string
schema?: SchemaName
}

auth?: {
Expand All @@ -21,8 +21,7 @@ export type SupabaseClientOptions<SchemaName> = {
*/
autoRefreshToken?: boolean
/**
* Allows to enable/disable multi-tab/window events
*/
* Allows to enable/disable multi-tab/window /
multiTab?: boolean
/**
* Whether to persist a logged in session to storage.
Expand All @@ -40,6 +39,10 @@ export type SupabaseClientOptions<SchemaName> = {
* Options passed to the gotrue-js instance
*/
cookieOptions?: SupabaseAuthClientOptions['cookieOptions']
/**
* Allows to enable/disable multi-tab/window events
*/
multiTab?: boolean
}
/**
* Options passed to the realtime-js instance
Expand Down

0 comments on commit 36dc881

Please sign in to comment.