@supabase/supabase-js 2.71.2-canary.3 → 2.71.2-canary.4
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/main/SupabaseClient.d.ts +131 -0
- package/dist/main/SupabaseClient.d.ts.map +1 -0
- package/dist/main/SupabaseClient.js +229 -0
- package/dist/main/SupabaseClient.js.map +1 -0
- package/dist/main/index.d.ts +16 -0
- package/dist/main/index.d.ts.map +1 -0
- package/dist/main/index.js +68 -0
- package/dist/main/index.js.map +1 -0
- package/dist/main/lib/SupabaseAuthClient.d.ts +6 -0
- package/dist/main/lib/SupabaseAuthClient.d.ts.map +1 -0
- package/dist/main/lib/SupabaseAuthClient.js +11 -0
- package/dist/main/lib/SupabaseAuthClient.js.map +1 -0
- package/dist/main/lib/constants.d.ts +16 -0
- package/dist/main/lib/constants.d.ts.map +1 -0
- package/dist/main/lib/constants.js +33 -0
- package/dist/main/lib/constants.js.map +1 -0
- package/dist/main/lib/fetch.d.ts +6 -0
- package/dist/main/lib/fetch.d.ts.map +1 -0
- package/dist/main/lib/fetch.js +86 -0
- package/dist/main/lib/fetch.js.map +1 -0
- package/dist/main/lib/helpers.d.ts +6 -0
- package/dist/main/lib/helpers.d.ts.map +1 -0
- package/dist/main/lib/helpers.js +48 -0
- package/dist/main/lib/helpers.js.map +1 -0
- package/dist/main/lib/types.d.ts +117 -0
- package/dist/main/lib/types.d.ts.map +1 -0
- package/dist/main/lib/types.js +3 -0
- package/dist/main/lib/types.js.map +1 -0
- package/dist/main/lib/version.d.ts +2 -0
- package/dist/main/lib/version.d.ts.map +1 -0
- package/dist/main/lib/version.js +5 -0
- package/dist/main/lib/version.js.map +1 -0
- package/dist/module/SupabaseClient.d.ts +131 -0
- package/dist/module/SupabaseClient.d.ts.map +1 -0
- package/dist/module/SupabaseClient.js +226 -0
- package/dist/module/SupabaseClient.js.map +1 -0
- package/dist/module/index.d.ts +16 -0
- package/dist/module/index.d.ts.map +1 -0
- package/dist/module/index.js +40 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/lib/SupabaseAuthClient.d.ts +6 -0
- package/dist/module/lib/SupabaseAuthClient.d.ts.map +1 -0
- package/dist/module/lib/SupabaseAuthClient.js +7 -0
- package/dist/module/lib/SupabaseAuthClient.js.map +1 -0
- package/dist/module/lib/constants.d.ts +16 -0
- package/dist/module/lib/constants.d.ts.map +1 -0
- package/dist/module/lib/constants.js +30 -0
- package/dist/module/lib/constants.js.map +1 -0
- package/dist/module/lib/fetch.d.ts +6 -0
- package/dist/module/lib/fetch.d.ts.map +1 -0
- package/dist/module/lib/fetch.js +47 -0
- package/dist/module/lib/fetch.js.map +1 -0
- package/dist/module/lib/helpers.d.ts +6 -0
- package/dist/module/lib/helpers.d.ts.map +1 -0
- package/dist/module/lib/helpers.js +41 -0
- package/dist/module/lib/helpers.js.map +1 -0
- package/dist/module/lib/types.d.ts +117 -0
- package/dist/module/lib/types.d.ts.map +1 -0
- package/dist/module/lib/types.js +2 -0
- package/dist/module/lib/types.js.map +1 -0
- package/dist/module/lib/version.d.ts +2 -0
- package/dist/module/lib/version.d.ts.map +1 -0
- package/dist/module/lib/version.js +2 -0
- package/dist/module/lib/version.js.map +1 -0
- package/dist/umd/supabase.js +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { FunctionsClient } from '@supabase/functions-js';
|
|
11
|
+
import { PostgrestClient, } from '@supabase/postgrest-js';
|
|
12
|
+
import { RealtimeClient, } from '@supabase/realtime-js';
|
|
13
|
+
import { StorageClient as SupabaseStorageClient } from '@supabase/storage-js';
|
|
14
|
+
import { DEFAULT_GLOBAL_OPTIONS, DEFAULT_DB_OPTIONS, DEFAULT_AUTH_OPTIONS, DEFAULT_REALTIME_OPTIONS, } from './lib/constants';
|
|
15
|
+
import { fetchWithAuth } from './lib/fetch';
|
|
16
|
+
import { ensureTrailingSlash, applySettingDefaults } from './lib/helpers';
|
|
17
|
+
import { SupabaseAuthClient } from './lib/SupabaseAuthClient';
|
|
18
|
+
/**
|
|
19
|
+
* Supabase Client.
|
|
20
|
+
*
|
|
21
|
+
* An isomorphic Javascript client for interacting with Postgres.
|
|
22
|
+
*/
|
|
23
|
+
export default class SupabaseClient {
|
|
24
|
+
/**
|
|
25
|
+
* Create a new client for use in the browser.
|
|
26
|
+
* @param supabaseUrl The unique Supabase URL which is supplied when you create a new project in your project dashboard.
|
|
27
|
+
* @param supabaseKey The unique Supabase Key which is supplied when you create a new project in your project dashboard.
|
|
28
|
+
* @param options.db.schema You can switch in between schemas. The schema needs to be on the list of exposed schemas inside Supabase.
|
|
29
|
+
* @param options.auth.autoRefreshToken Set to "true" if you want to automatically refresh the token before expiring.
|
|
30
|
+
* @param options.auth.persistSession Set to "true" if you want to automatically save the user session into local storage.
|
|
31
|
+
* @param options.auth.detectSessionInUrl Set to "true" if you want to automatically detects OAuth grants in the URL and signs in the user.
|
|
32
|
+
* @param options.realtime Options passed along to realtime-js constructor.
|
|
33
|
+
* @param options.storage Options passed along to the storage-js constructor.
|
|
34
|
+
* @param options.global.fetch A custom fetch implementation.
|
|
35
|
+
* @param options.global.headers Any additional headers to send with each network request.
|
|
36
|
+
*/
|
|
37
|
+
constructor(supabaseUrl, supabaseKey, options) {
|
|
38
|
+
var _a, _b, _c;
|
|
39
|
+
this.supabaseUrl = supabaseUrl;
|
|
40
|
+
this.supabaseKey = supabaseKey;
|
|
41
|
+
if (!supabaseUrl)
|
|
42
|
+
throw new Error('supabaseUrl is required.');
|
|
43
|
+
if (!supabaseKey)
|
|
44
|
+
throw new Error('supabaseKey is required.');
|
|
45
|
+
const _supabaseUrl = ensureTrailingSlash(supabaseUrl);
|
|
46
|
+
const baseUrl = new URL(_supabaseUrl);
|
|
47
|
+
this.realtimeUrl = new URL('realtime/v1', baseUrl);
|
|
48
|
+
this.realtimeUrl.protocol = this.realtimeUrl.protocol.replace('http', 'ws');
|
|
49
|
+
this.authUrl = new URL('auth/v1', baseUrl);
|
|
50
|
+
this.storageUrl = new URL('storage/v1', baseUrl);
|
|
51
|
+
this.functionsUrl = new URL('functions/v1', baseUrl);
|
|
52
|
+
// default storage key uses the supabase project ref as a namespace
|
|
53
|
+
const defaultStorageKey = `sb-${baseUrl.hostname.split('.')[0]}-auth-token`;
|
|
54
|
+
const DEFAULTS = {
|
|
55
|
+
db: DEFAULT_DB_OPTIONS,
|
|
56
|
+
realtime: DEFAULT_REALTIME_OPTIONS,
|
|
57
|
+
auth: Object.assign(Object.assign({}, DEFAULT_AUTH_OPTIONS), { storageKey: defaultStorageKey }),
|
|
58
|
+
global: DEFAULT_GLOBAL_OPTIONS,
|
|
59
|
+
};
|
|
60
|
+
const settings = applySettingDefaults(options !== null && options !== void 0 ? options : {}, DEFAULTS);
|
|
61
|
+
this.storageKey = (_a = settings.auth.storageKey) !== null && _a !== void 0 ? _a : '';
|
|
62
|
+
this.headers = (_b = settings.global.headers) !== null && _b !== void 0 ? _b : {};
|
|
63
|
+
if (!settings.accessToken) {
|
|
64
|
+
this.auth = this._initSupabaseAuthClient((_c = settings.auth) !== null && _c !== void 0 ? _c : {}, this.headers, settings.global.fetch);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this.accessToken = settings.accessToken;
|
|
68
|
+
this.auth = new Proxy({}, {
|
|
69
|
+
get: (_, prop) => {
|
|
70
|
+
throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(prop)} is not possible`);
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
this.fetch = fetchWithAuth(supabaseKey, this._getAccessToken.bind(this), settings.global.fetch);
|
|
75
|
+
this.realtime = this._initRealtimeClient(Object.assign({ headers: this.headers, accessToken: this._getAccessToken.bind(this) }, settings.realtime));
|
|
76
|
+
this.rest = new PostgrestClient(new URL('rest/v1', baseUrl).href, {
|
|
77
|
+
headers: this.headers,
|
|
78
|
+
schema: settings.db.schema,
|
|
79
|
+
fetch: this.fetch,
|
|
80
|
+
});
|
|
81
|
+
this.storage = new SupabaseStorageClient(this.storageUrl.href, this.headers, this.fetch, options === null || options === void 0 ? void 0 : options.storage);
|
|
82
|
+
if (!settings.accessToken) {
|
|
83
|
+
this._listenForAuthEvents();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Supabase Functions allows you to deploy and invoke edge functions.
|
|
88
|
+
*/
|
|
89
|
+
get functions() {
|
|
90
|
+
return new FunctionsClient(this.functionsUrl.href, {
|
|
91
|
+
headers: this.headers,
|
|
92
|
+
customFetch: this.fetch,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Perform a query on a table or a view.
|
|
97
|
+
*
|
|
98
|
+
* @param relation - The table or view name to query
|
|
99
|
+
*/
|
|
100
|
+
from(relation) {
|
|
101
|
+
return this.rest.from(relation);
|
|
102
|
+
}
|
|
103
|
+
// NOTE: signatures must be kept in sync with PostgrestClient.schema
|
|
104
|
+
/**
|
|
105
|
+
* Select a schema to query or perform an function (rpc) call.
|
|
106
|
+
*
|
|
107
|
+
* The schema needs to be on the list of exposed schemas inside Supabase.
|
|
108
|
+
*
|
|
109
|
+
* @param schema - The schema to query
|
|
110
|
+
*/
|
|
111
|
+
schema(schema) {
|
|
112
|
+
return this.rest.schema(schema);
|
|
113
|
+
}
|
|
114
|
+
// NOTE: signatures must be kept in sync with PostgrestClient.rpc
|
|
115
|
+
/**
|
|
116
|
+
* Perform a function call.
|
|
117
|
+
*
|
|
118
|
+
* @param fn - The function name to call
|
|
119
|
+
* @param args - The arguments to pass to the function call
|
|
120
|
+
* @param options - Named parameters
|
|
121
|
+
* @param options.head - When set to `true`, `data` will not be returned.
|
|
122
|
+
* Useful if you only need the count.
|
|
123
|
+
* @param options.get - When set to `true`, the function will be called with
|
|
124
|
+
* read-only access mode.
|
|
125
|
+
* @param options.count - Count algorithm to use to count rows returned by the
|
|
126
|
+
* function. Only applicable for [set-returning
|
|
127
|
+
* functions](https://www.postgresql.org/docs/current/functions-srf.html).
|
|
128
|
+
*
|
|
129
|
+
* `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
|
|
130
|
+
* hood.
|
|
131
|
+
*
|
|
132
|
+
* `"planned"`: Approximated but fast count algorithm. Uses the Postgres
|
|
133
|
+
* statistics under the hood.
|
|
134
|
+
*
|
|
135
|
+
* `"estimated"`: Uses exact count for low numbers and planned count for high
|
|
136
|
+
* numbers.
|
|
137
|
+
*/
|
|
138
|
+
rpc(fn, args = {}, options = {}) {
|
|
139
|
+
return this.rest.rpc(fn, args, options);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Creates a Realtime channel with Broadcast, Presence, and Postgres Changes.
|
|
143
|
+
*
|
|
144
|
+
* @param {string} name - The name of the Realtime channel.
|
|
145
|
+
* @param {Object} opts - The options to pass to the Realtime channel.
|
|
146
|
+
*
|
|
147
|
+
*/
|
|
148
|
+
channel(name, opts = { config: {} }) {
|
|
149
|
+
return this.realtime.channel(name, opts);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Returns all Realtime channels.
|
|
153
|
+
*/
|
|
154
|
+
getChannels() {
|
|
155
|
+
return this.realtime.getChannels();
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Unsubscribes and removes Realtime channel from Realtime client.
|
|
159
|
+
*
|
|
160
|
+
* @param {RealtimeChannel} channel - The name of the Realtime channel.
|
|
161
|
+
*
|
|
162
|
+
*/
|
|
163
|
+
removeChannel(channel) {
|
|
164
|
+
return this.realtime.removeChannel(channel);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Unsubscribes and removes all Realtime channels from Realtime client.
|
|
168
|
+
*/
|
|
169
|
+
removeAllChannels() {
|
|
170
|
+
return this.realtime.removeAllChannels();
|
|
171
|
+
}
|
|
172
|
+
_getAccessToken() {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
var _a, _b;
|
|
175
|
+
if (this.accessToken) {
|
|
176
|
+
return yield this.accessToken();
|
|
177
|
+
}
|
|
178
|
+
const { data } = yield this.auth.getSession();
|
|
179
|
+
return (_b = (_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token) !== null && _b !== void 0 ? _b : this.supabaseKey;
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
_initSupabaseAuthClient({ autoRefreshToken, persistSession, detectSessionInUrl, storage, storageKey, flowType, lock, debug, }, headers, fetch) {
|
|
183
|
+
const authHeaders = {
|
|
184
|
+
Authorization: `Bearer ${this.supabaseKey}`,
|
|
185
|
+
apikey: `${this.supabaseKey}`,
|
|
186
|
+
};
|
|
187
|
+
return new SupabaseAuthClient({
|
|
188
|
+
url: this.authUrl.href,
|
|
189
|
+
headers: Object.assign(Object.assign({}, authHeaders), headers),
|
|
190
|
+
storageKey: storageKey,
|
|
191
|
+
autoRefreshToken,
|
|
192
|
+
persistSession,
|
|
193
|
+
detectSessionInUrl,
|
|
194
|
+
storage,
|
|
195
|
+
flowType,
|
|
196
|
+
lock,
|
|
197
|
+
debug,
|
|
198
|
+
fetch,
|
|
199
|
+
// auth checks if there is a custom authorizaiton header using this flag
|
|
200
|
+
// so it knows whether to return an error when getUser is called with no session
|
|
201
|
+
hasCustomAuthorizationHeader: 'Authorization' in this.headers,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
_initRealtimeClient(options) {
|
|
205
|
+
return new RealtimeClient(this.realtimeUrl.href, Object.assign(Object.assign({}, options), { params: Object.assign({ apikey: this.supabaseKey }, options === null || options === void 0 ? void 0 : options.params) }));
|
|
206
|
+
}
|
|
207
|
+
_listenForAuthEvents() {
|
|
208
|
+
let data = this.auth.onAuthStateChange((event, session) => {
|
|
209
|
+
this._handleTokenChanged(event, 'CLIENT', session === null || session === void 0 ? void 0 : session.access_token);
|
|
210
|
+
});
|
|
211
|
+
return data;
|
|
212
|
+
}
|
|
213
|
+
_handleTokenChanged(event, source, token) {
|
|
214
|
+
if ((event === 'TOKEN_REFRESHED' || event === 'SIGNED_IN') &&
|
|
215
|
+
this.changedAccessToken !== token) {
|
|
216
|
+
this.changedAccessToken = token;
|
|
217
|
+
}
|
|
218
|
+
else if (event === 'SIGNED_OUT') {
|
|
219
|
+
this.realtime.setAuth();
|
|
220
|
+
if (source == 'STORAGE')
|
|
221
|
+
this.auth.signOut();
|
|
222
|
+
this.changedAccessToken = undefined;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=SupabaseClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SupabaseClient.js","sourceRoot":"","sources":["../../src/SupabaseClient.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EACL,eAAe,GAGhB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAGL,cAAc,GAEf,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,IAAI,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC7E,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,O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ient from './SupabaseClient';
|
|
2
|
+
import type { SupabaseClientOptions } from './lib/types';
|
|
3
|
+
export * from '@supabase/auth-js';
|
|
4
|
+
export type { User as AuthUser, Session as AuthSession } from '@supabase/auth-js';
|
|
5
|
+
export { type PostgrestResponse, type PostgrestSingleResponse, type PostgrestMaybeSingleResponse, PostgrestError, } from '@supabase/postgrest-js';
|
|
6
|
+
export { FunctionsHttpError, FunctionsFetchError, FunctionsRelayError, FunctionsError, type FunctionInvokeOptions, FunctionRegion, } from '@supabase/functions-js';
|
|
7
|
+
export * from '@supabase/realtime-js';
|
|
8
|
+
export { default as SupabaseClient } from './SupabaseClient';
|
|
9
|
+
export type { SupabaseClientOptions, QueryResult, QueryData, QueryError } from './lib/types';
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new Supabase Client.
|
|
12
|
+
*/
|
|
13
|
+
export declare const createClient: <Database = any, SchemaNameOrClientOptions extends (string & keyof Omit<Database, "__InternalSupabase">) | {
|
|
14
|
+
PostgrestVersion: string;
|
|
15
|
+
} = "public" extends keyof Omit<Database, "__InternalSupabase"> ? "public" : string & keyof Omit<Database, "__InternalSupabase">, SchemaName extends string & keyof Omit<Database, "__InternalSupabase"> = SchemaNameOrClientOptions extends string & keyof Omit<Database, "__InternalSupabase"> ? SchemaNameOrClientOptions : "public" extends keyof Omit<Database, "__InternalSupabase"> ? "public" : string & keyof Omit<Omit<Database, "__InternalSupabase">, "__InternalSupabase">>(supabaseUrl: string, supabaseKey: string, options?: SupabaseClientOptions<SchemaName>) => SupabaseClient<Database, SchemaNameOrClientOptions, SchemaName>;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAExD,cAAc,mBAAmB,CAA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qBAAqB,CAAC,UAAU,CAAC,KAC1C,cAAc,CAAC,QAAQ,EAAE,yBAAyB,EAAE,UAAU,CAMhE,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import SupabaseClient from './SupabaseClient';
|
|
2
|
+
export * from '@supabase/auth-js';
|
|
3
|
+
export { PostgrestError, } from '@supabase/postgrest-js';
|
|
4
|
+
export { FunctionsHttpError, FunctionsFetchError, FunctionsRelayError, FunctionsError, FunctionRegion, } from '@supabase/functions-js';
|
|
5
|
+
export * from '@supabase/realtime-js';
|
|
6
|
+
export { default as SupabaseClient } from './SupabaseClient';
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new Supabase Client.
|
|
9
|
+
*/
|
|
10
|
+
export const createClient = (supabaseUrl, supabaseKey, options) => {
|
|
11
|
+
return new SupabaseClient(supabaseUrl, supabaseKey, options);
|
|
12
|
+
};
|
|
13
|
+
// Check for Node.js <= 18 deprecation
|
|
14
|
+
function shouldShowDeprecationWarning() {
|
|
15
|
+
// Skip in browser environments
|
|
16
|
+
if (typeof window !== 'undefined') {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
// Skip if process is not available (e.g., Edge Runtime)
|
|
20
|
+
if (typeof process === 'undefined') {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
// Use dynamic property access to avoid Next.js Edge Runtime static analysis warnings
|
|
24
|
+
const processVersion = process['version'];
|
|
25
|
+
if (processVersion === undefined || processVersion === null) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
const versionMatch = processVersion.match(/^v(\d+)\./);
|
|
29
|
+
if (!versionMatch) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
const majorVersion = parseInt(versionMatch[1], 10);
|
|
33
|
+
return majorVersion <= 18;
|
|
34
|
+
}
|
|
35
|
+
if (shouldShowDeprecationWarning()) {
|
|
36
|
+
console.warn(`⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. ` +
|
|
37
|
+
`Please upgrade to Node.js 20 or later. ` +
|
|
38
|
+
`For more information, visit: https://github.com/orgs/supabase/discussions/37217`);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAG7C,cAAc,mBAAmB,CAAA;AAEjC,OAAO,EAIL,cAAc,GACf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EAEd,cAAc,GACf,MAAM,wBAAwB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAG5D;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAe1B,WAAmB,EACnB,WAAmB,EACnB,OAA2C,EACsB,EAAE;IACnE,OAAO,IAAI,cAAc,CACvB,WAAW,EACX,WAAW,EACX,OAAO,CACR,CAAA;AACH,CAAC,CAAA;AAED,sCAAsC;AACtC,SAAS,4BAA4B;IACnC,+BAA+B;IAC/B,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO,KAAK,CAAA;IACd,CAAC;IAED,wDAAwD;IACxD,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;QACnC,OAAO,KAAK,CAAA;IACd,CAAC;IAED,qFAAqF;IACrF,MAAM,cAAc,GAAI,OAAe,CAAC,SAAS,CAAC,CAAA;IAClD,IAAI,cAAc,KAAK,SAAS,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QAC5D,OAAO,KAAK,CAAA;IACd,CAAC;IAED,MAAM,YAAY,GAAG,cAAc,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;IACtD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,KAAK,CAAA;IACd,CAAC;IAED,MAAM,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAClD,OAAO,YAAY,IAAI,EAAE,CAAA;AAC3B,CAAC;AAED,IAAI,4BAA4B,EAAE,EAAE,CAAC;IACnC,OAAO,CAAC,IAAI,CACV,uHAAuH;QACrH,yCAAyC;QACzC,iFAAiF,CACpF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AuthClient } from '@supabase/auth-js';
|
|
2
|
+
import { SupabaseAuthClientOptions } from './types';
|
|
3
|
+
export declare class SupabaseAuthClient extends AuthClient {
|
|
4
|
+
constructor(options: SupabaseAuthClientOptions);
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=SupabaseAuthClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SupabaseAuthClient.d.ts","sourceRoot":"","sources":["../../../src/lib/SupabaseAuthClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAEnD,qBAAa,kBAAmB,SAAQ,UAAU;gBACpC,OAAO,EAAE,yBAAyB;CAG/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SupabaseAuthClient.js","sourceRoot":"","sources":["../../../src/lib/SupabaseAuthClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAG9C,MAAM,OAAO,kBAAmB,SAAQ,UAAU;IAChD,YAAY,OAAkC;QAC5C,KAAK,CAAC,OAAO,CAAC,CAAA;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RealtimeClientOptions } from '@supabase/realtime-js';
|
|
2
|
+
import { SupabaseAuthClientOptions } from './types';
|
|
3
|
+
export declare const DEFAULT_HEADERS: {
|
|
4
|
+
'X-Client-Info': string;
|
|
5
|
+
};
|
|
6
|
+
export declare const DEFAULT_GLOBAL_OPTIONS: {
|
|
7
|
+
headers: {
|
|
8
|
+
'X-Client-Info': string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const DEFAULT_DB_OPTIONS: {
|
|
12
|
+
schema: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const DEFAULT_AUTH_OPTIONS: SupabaseAuthClientOptions;
|
|
15
|
+
export declare const DEFAULT_REALTIME_OPTIONS: RealtimeClientOptions;
|
|
16
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAenD,eAAO,MAAM,eAAe;;CAA0D,CAAA;AAEtF,eAAO,MAAM,sBAAsB;;;;CAElC,CAAA;AAED,eAAO,MAAM,kBAAkB;;CAE9B,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,yBAKlC,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,qBAA0B,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { version } from './version';
|
|
2
|
+
let JS_ENV = '';
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
if (typeof Deno !== 'undefined') {
|
|
5
|
+
JS_ENV = 'deno';
|
|
6
|
+
}
|
|
7
|
+
else if (typeof document !== 'undefined') {
|
|
8
|
+
JS_ENV = 'web';
|
|
9
|
+
}
|
|
10
|
+
else if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
|
|
11
|
+
JS_ENV = 'react-native';
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
JS_ENV = 'node';
|
|
15
|
+
}
|
|
16
|
+
export const DEFAULT_HEADERS = { 'X-Client-Info': `supabase-js-${JS_ENV}/${version}` };
|
|
17
|
+
export const DEFAULT_GLOBAL_OPTIONS = {
|
|
18
|
+
headers: DEFAULT_HEADERS,
|
|
19
|
+
};
|
|
20
|
+
export const DEFAULT_DB_OPTIONS = {
|
|
21
|
+
schema: 'public',
|
|
22
|
+
};
|
|
23
|
+
export const DEFAULT_AUTH_OPTIONS = {
|
|
24
|
+
autoRefreshToken: true,
|
|
25
|
+
persistSession: true,
|
|
26
|
+
detectSessionInUrl: true,
|
|
27
|
+
flowType: 'implicit',
|
|
28
|
+
};
|
|
29
|
+
export const DEFAULT_REALTIME_OPTIONS = {};
|
|
30
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/lib/constants.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,IAAI,MAAM,GAAG,EAAE,CAAA;AACf,aAAa;AACb,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE,CAAC;IAChC,MAAM,GAAG,MAAM,CAAA;AACjB,CAAC;KAAM,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;IAC3C,MAAM,GAAG,KAAK,CAAA;AAChB,CAAC;KAAM,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,CAAC,OAAO,KAAK,aAAa,EAAE,CAAC;IACnF,MAAM,GAAG,cAAc,CAAA;AACzB,CAAC;KAAM,CAAC;IACN,MAAM,GAAG,MAAM,CAAA;AACjB,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,eAAe,EAAE,eAAe,MAAM,IAAI,OAAO,EAAE,EAAE,CAAA;AAEtF,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,OAAO,EAAE,eAAe;CACzB,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,MAAM,EAAE,QAAQ;CACjB,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAA8B;IAC7D,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE,IAAI;IACpB,kBAAkB,EAAE,IAAI;IACxB,QAAQ,EAAE,UAAU;CACrB,CAAA;AAED,MAAM,CAAC,MAAM,wBAAwB,GAA0B,EAAE,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type Fetch = typeof fetch;
|
|
2
|
+
export declare const resolveFetch: (customFetch?: Fetch) => Fetch;
|
|
3
|
+
export declare const resolveHeadersConstructor: () => any;
|
|
4
|
+
export declare const fetchWithAuth: (supabaseKey: string, getAccessToken: () => Promise<string | null>, customFetch?: Fetch) => Fetch;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/lib/fetch.ts"],"names":[],"mappings":"AAGA,KAAK,KAAK,GAAG,OAAO,KAAK,CAAA;AAEzB,eAAO,MAAM,YAAY,GAAI,cAAc,KAAK,KAAG,KAUlD,CAAA;AAED,eAAO,MAAM,yBAAyB,WAMrC,CAAA;AAED,eAAO,MAAM,aAAa,GACxB,aAAa,MAAM,EACnB,gBAAgB,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,EAC5C,cAAc,KAAK,KAClB,KAkBF,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
import nodeFetch, { Headers as NodeFetchHeaders } from '@supabase/node-fetch';
|
|
12
|
+
export const resolveFetch = (customFetch) => {
|
|
13
|
+
let _fetch;
|
|
14
|
+
if (customFetch) {
|
|
15
|
+
_fetch = customFetch;
|
|
16
|
+
}
|
|
17
|
+
else if (typeof fetch === 'undefined') {
|
|
18
|
+
_fetch = nodeFetch;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
_fetch = fetch;
|
|
22
|
+
}
|
|
23
|
+
return (...args) => _fetch(...args);
|
|
24
|
+
};
|
|
25
|
+
export const resolveHeadersConstructor = () => {
|
|
26
|
+
if (typeof Headers === 'undefined') {
|
|
27
|
+
return NodeFetchHeaders;
|
|
28
|
+
}
|
|
29
|
+
return Headers;
|
|
30
|
+
};
|
|
31
|
+
export const fetchWithAuth = (supabaseKey, getAccessToken, customFetch) => {
|
|
32
|
+
const fetch = resolveFetch(customFetch);
|
|
33
|
+
const HeadersConstructor = resolveHeadersConstructor();
|
|
34
|
+
return (input, init) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
+
var _a;
|
|
36
|
+
const accessToken = (_a = (yield getAccessToken())) !== null && _a !== void 0 ? _a : supabaseKey;
|
|
37
|
+
let headers = new HeadersConstructor(init === null || init === void 0 ? void 0 : init.headers);
|
|
38
|
+
if (!headers.has('apikey')) {
|
|
39
|
+
headers.set('apikey', supabaseKey);
|
|
40
|
+
}
|
|
41
|
+
if (!headers.has('Authorization')) {
|
|
42
|
+
headers.set('Authorization', `Bearer ${accessToken}`);
|
|
43
|
+
}
|
|
44
|
+
return fetch(input, Object.assign(Object.assign({}, init), { headers }));
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=fetch.js.map
|
|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AC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC3B,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAA;QACpC,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC;YAClC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,WAAW,EAAE,CAAC,CAAA;QACvD,CAAC;QAED,OAAO,KAAK,CAAC,KAAK,kCAAO,IAAI,KAAE,OAAO,IAAG,CAAA;IAC3C,CAAC,CAAA,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SupabaseClientOptions } from './types';
|
|
2
|
+
export declare function uuid(): string;
|
|
3
|
+
export declare function ensureTrailingSlash(url: string): string;
|
|
4
|
+
export declare const isBrowser: () => boolean;
|
|
5
|
+
export declare function applySettingDefaults<Database = any, SchemaName extends string & keyof Database = 'public' extends keyof Database ? 'public' : string & keyof Database>(options: SupabaseClientOptions<SchemaName>, defaults: SupabaseClientOptions<any>): Required<SupabaseClientOptions<SchemaName>>;
|
|
6
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE/C,wBAAgB,IAAI,WAMnB;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,eAAO,MAAM,SAAS,eAAsC,CAAA;AAE5D,wBAAgB,oBAAoB,CAClC,QAAQ,GAAG,GAAG,EACd,UAAU,SAAS,MAAM,GAAG,MAAM,QAAQ,GAAG,QAAQ,SAAS,MAAM,QAAQ,GACxE,QAAQ,GACR,MAAM,GAAG,MAAM,QAAQ,EAE3B,OAAO,EAAE,qBAAqB,CAAC,UAAU,CAAC,EAC1C,QAAQ,EAAE,qBAAqB,CAAC,GAAG,CAAC,GACnC,QAAQ,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,CA+C7C"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
export function uuid() {
|
|
11
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
12
|
+
var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
|
|
13
|
+
return v.toString(16);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export function ensureTrailingSlash(url) {
|
|
17
|
+
return url.endsWith('/') ? url : url + '/';
|
|
18
|
+
}
|
|
19
|
+
export const isBrowser = () => typeof window !== 'undefined';
|
|
20
|
+
export function applySettingDefaults(options, defaults) {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
const { db: dbOptions, auth: authOptions, realtime: realtimeOptions, global: globalOptions, } = options;
|
|
23
|
+
const { db: DEFAULT_DB_OPTIONS, auth: DEFAULT_AUTH_OPTIONS, realtime: DEFAULT_REALTIME_OPTIONS, global: DEFAULT_GLOBAL_OPTIONS, } = defaults;
|
|
24
|
+
const result = {
|
|
25
|
+
db: Object.assign(Object.assign({}, DEFAULT_DB_OPTIONS), dbOptions),
|
|
26
|
+
auth: Object.assign(Object.assign({}, DEFAULT_AUTH_OPTIONS), authOptions),
|
|
27
|
+
realtime: Object.assign(Object.assign({}, DEFAULT_REALTIME_OPTIONS), realtimeOptions),
|
|
28
|
+
storage: {},
|
|
29
|
+
global: Object.assign(Object.assign(Object.assign({}, DEFAULT_GLOBAL_OPTIONS), globalOptions), { headers: Object.assign(Object.assign({}, ((_a = DEFAULT_GLOBAL_OPTIONS === null || DEFAULT_GLOBAL_OPTIONS === void 0 ? void 0 : DEFAULT_GLOBAL_OPTIONS.headers) !== null && _a !== void 0 ? _a : {})), ((_b = globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.headers) !== null && _b !== void 0 ? _b : {})) }),
|
|
30
|
+
accessToken: () => __awaiter(this, void 0, void 0, function* () { return ''; }),
|
|
31
|
+
};
|
|
32
|
+
if (options.accessToken) {
|
|
33
|
+
result.accessToken = options.accessToken;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
// hack around Required<>
|
|
37
|
+
delete result.accessToken;
|
|
38
|
+
}
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/lib/helpers.ts"],"names":[],"mappings":";;;;;;;;;AAGA,MAAM,UAAU,IAAI;IAClB,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC;QACxE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAC9B,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAA;QACpC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;IACvB,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CAA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,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { AuthClient } from '@supabase/auth-js';
|
|
2
|
+
import { RealtimeClientOptions } from '@supabase/realtime-js';
|
|
3
|
+
import { PostgrestError } from '@supabase/postgrest-js';
|
|
4
|
+
import { StorageClientOptions } from '@supabase/storage-js/dist/module/StorageClient';
|
|
5
|
+
type AuthClientOptions = ConstructorParameters<typeof AuthClient>[0];
|
|
6
|
+
export interface SupabaseAuthClientOptions extends AuthClientOptions {
|
|
7
|
+
}
|
|
8
|
+
export type Fetch = typeof fetch;
|
|
9
|
+
export type SupabaseClientOptions<SchemaName> = {
|
|
10
|
+
/**
|
|
11
|
+
* The Postgres schema which your tables belong to. Must be on the list of exposed schemas in Supabase. Defaults to `public`.
|
|
12
|
+
*/
|
|
13
|
+
db?: {
|
|
14
|
+
schema?: SchemaName;
|
|
15
|
+
};
|
|
16
|
+
auth?: {
|
|
17
|
+
/**
|
|
18
|
+
* Automatically refreshes the token for logged-in users. Defaults to true.
|
|
19
|
+
*/
|
|
20
|
+
autoRefreshToken?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Optional key name used for storing tokens in local storage.
|
|
23
|
+
*/
|
|
24
|
+
storageKey?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Whether to persist a logged-in session to storage. Defaults to true.
|
|
27
|
+
*/
|
|
28
|
+
persistSession?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Detect a session from the URL. Used for OAuth login callbacks. Defaults to true.
|
|
31
|
+
*/
|
|
32
|
+
detectSessionInUrl?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* A storage provider. Used to store the logged-in session.
|
|
35
|
+
*/
|
|
36
|
+
storage?: SupabaseAuthClientOptions['storage'];
|
|
37
|
+
/**
|
|
38
|
+
* OAuth flow to use - defaults to implicit flow. PKCE is recommended for mobile and server-side applications.
|
|
39
|
+
*/
|
|
40
|
+
flowType?: SupabaseAuthClientOptions['flowType'];
|
|
41
|
+
/**
|
|
42
|
+
* If debug messages for authentication client are emitted. Can be used to inspect the behavior of the library.
|
|
43
|
+
*/
|
|
44
|
+
debug?: SupabaseAuthClientOptions['debug'];
|
|
45
|
+
/**
|
|
46
|
+
* Provide your own locking mechanism based on the environment. By default no locking is done at this time.
|
|
47
|
+
*
|
|
48
|
+
* @experimental
|
|
49
|
+
*/
|
|
50
|
+
lock?: SupabaseAuthClientOptions['lock'];
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Options passed to the realtime-js instance
|
|
54
|
+
*/
|
|
55
|
+
realtime?: RealtimeClientOptions;
|
|
56
|
+
storage?: StorageClientOptions;
|
|
57
|
+
global?: {
|
|
58
|
+
/**
|
|
59
|
+
* A custom `fetch` implementation.
|
|
60
|
+
*/
|
|
61
|
+
fetch?: Fetch;
|
|
62
|
+
/**
|
|
63
|
+
* Optional headers for initializing the client.
|
|
64
|
+
*/
|
|
65
|
+
headers?: Record<string, string>;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Optional function for using a third-party authentication system with
|
|
69
|
+
* Supabase. The function should return an access token or ID token (JWT) by
|
|
70
|
+
* obtaining it from the third-party auth client library. Note that this
|
|
71
|
+
* function may be called concurrently and many times. Use memoization and
|
|
72
|
+
* locking techniques if this is not supported by the client libraries.
|
|
73
|
+
*
|
|
74
|
+
* When set, the `auth` namespace of the Supabase client cannot be used.
|
|
75
|
+
* Create another client if you wish to use Supabase Auth and third-party
|
|
76
|
+
* authentications concurrently in the same application.
|
|
77
|
+
*/
|
|
78
|
+
accessToken?: () => Promise<string | null>;
|
|
79
|
+
};
|
|
80
|
+
export type GenericRelationship = {
|
|
81
|
+
foreignKeyName: string;
|
|
82
|
+
columns: string[];
|
|
83
|
+
isOneToOne?: boolean;
|
|
84
|
+
referencedRelation: string;
|
|
85
|
+
referencedColumns: string[];
|
|
86
|
+
};
|
|
87
|
+
export type GenericTable = {
|
|
88
|
+
Row: Record<string, unknown>;
|
|
89
|
+
Insert: Record<string, unknown>;
|
|
90
|
+
Update: Record<string, unknown>;
|
|
91
|
+
Relationships: GenericRelationship[];
|
|
92
|
+
};
|
|
93
|
+
export type GenericUpdatableView = GenericTable;
|
|
94
|
+
export type GenericNonUpdatableView = {
|
|
95
|
+
Row: Record<string, unknown>;
|
|
96
|
+
Relationships: GenericRelationship[];
|
|
97
|
+
};
|
|
98
|
+
export type GenericView = GenericUpdatableView | GenericNonUpdatableView;
|
|
99
|
+
export type GenericFunction = {
|
|
100
|
+
Args: Record<string, unknown>;
|
|
101
|
+
Returns: unknown;
|
|
102
|
+
};
|
|
103
|
+
export type GenericSchema = {
|
|
104
|
+
Tables: Record<string, GenericTable>;
|
|
105
|
+
Views: Record<string, GenericView>;
|
|
106
|
+
Functions: Record<string, GenericFunction>;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Helper types for query results.
|
|
110
|
+
*/
|
|
111
|
+
export type QueryResult<T> = T extends PromiseLike<infer U> ? U : never;
|
|
112
|
+
export type QueryData<T> = T extends PromiseLike<{
|
|
113
|
+
data: infer U;
|
|
114
|
+
}> ? Exclude<U, null> : never;
|
|
115
|
+
export type QueryError = PostgrestError;
|
|
116
|
+
export {};
|
|
117
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAA;AAErF,KAAK,iBAAiB,GAAG,qBAAqB,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;AAEpE,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;CAAG;A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