@supabase/supabase-js 2.114.0 → 2.115.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +18 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +19 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +18 -1
- package/dist/index.mjs.map +1 -1
- package/dist/umd/supabase.js +7 -7
- package/package.json +6 -6
- package/src/SupabaseClient.ts +21 -0
- package/src/index.ts +1 -0
- package/src/lib/types.ts +2 -0
- package/src/lib/version.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supabase/supabase-js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.115.0",
|
|
4
4
|
"description": "Isomorphic Javascript SDK for Supabase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript",
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
"directory": "packages/core/supabase-js"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@supabase/auth-js": "2.
|
|
81
|
-
"@supabase/postgrest-js": "2.
|
|
82
|
-
"@supabase/
|
|
83
|
-
"@supabase/
|
|
84
|
-
"@supabase/functions-js": "2.
|
|
80
|
+
"@supabase/auth-js": "2.115.0",
|
|
81
|
+
"@supabase/postgrest-js": "2.115.0",
|
|
82
|
+
"@supabase/storage-js": "2.115.0",
|
|
83
|
+
"@supabase/realtime-js": "2.115.0",
|
|
84
|
+
"@supabase/functions-js": "2.115.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"@opentelemetry/api": ">=1.0.0"
|
package/src/SupabaseClient.ts
CHANGED
|
@@ -3,7 +3,9 @@ import { FunctionsClient } from '@supabase/functions-js'
|
|
|
3
3
|
import {
|
|
4
4
|
PostgrestClient,
|
|
5
5
|
type PostgrestFilterBuilder,
|
|
6
|
+
type PostgrestOpenApiSpec,
|
|
6
7
|
type PostgrestQueryBuilder,
|
|
8
|
+
type PostgrestSingleResponse,
|
|
7
9
|
} from '@supabase/postgrest-js'
|
|
8
10
|
import {
|
|
9
11
|
type RealtimeChannel,
|
|
@@ -461,6 +463,25 @@ export default class SupabaseClient<
|
|
|
461
463
|
return this.rest.schema<DynamicSchema>(schema)
|
|
462
464
|
}
|
|
463
465
|
|
|
466
|
+
// NOTE: signatures must be kept in sync with PostgrestClient.getOpenApiSpec
|
|
467
|
+
/**
|
|
468
|
+
* Fetch the OpenAPI description PostgREST publishes for this client's schema.
|
|
469
|
+
*
|
|
470
|
+
* The document lists only the tables, views and functions the caller's role
|
|
471
|
+
* holds privileges on. The request carries the same `apikey` and
|
|
472
|
+
* `Authorization` headers as every other query, so the description is scoped
|
|
473
|
+
* to the signed-in user. Call `.schema()` first to describe a schema other
|
|
474
|
+
* than the client default.
|
|
475
|
+
*
|
|
476
|
+
* @example
|
|
477
|
+
* ```ts
|
|
478
|
+
* const { data, error } = await supabase.getOpenApiSpec()
|
|
479
|
+
* ```
|
|
480
|
+
*/
|
|
481
|
+
getOpenApiSpec(): Promise<PostgrestSingleResponse<PostgrestOpenApiSpec>> {
|
|
482
|
+
return this.rest.getOpenApiSpec()
|
|
483
|
+
}
|
|
484
|
+
|
|
464
485
|
// NOTE: signatures must be kept in sync with PostgrestClient.rpc
|
|
465
486
|
/**
|
|
466
487
|
* Perform a function call.
|
package/src/index.ts
CHANGED
package/src/lib/types.ts
CHANGED
|
@@ -108,6 +108,8 @@ export interface TracePropagationOptions {
|
|
|
108
108
|
export type SupabaseClientOptions<SchemaName> = {
|
|
109
109
|
/**
|
|
110
110
|
* The Postgres schema which your tables belong to. Must be on the list of exposed schemas in Supabase. Defaults to `public`.
|
|
111
|
+
*
|
|
112
|
+
* With generated `Database` types, this type-checks against schemas other than `public` only when the schema name is also passed as the second generic to `createClient`, e.g. `createClient<Database, 'myschema'>(url, key, { db: { schema: 'myschema' } })`. `supabase.schema('myschema').from(...)` infers its schema per call and needs no second generic.
|
|
111
113
|
*/
|
|
112
114
|
db?: {
|
|
113
115
|
schema?: SchemaName
|
package/src/lib/version.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
// - Debugging and support (identifying which version is running)
|
|
5
5
|
// - Telemetry and logging (version reporting in errors/analytics)
|
|
6
6
|
// - Ensuring build artifacts match the published package version
|
|
7
|
-
export const version = '2.
|
|
7
|
+
export const version = '2.115.0'
|