@prisma-next/extension-supabase 0.14.0-dev.6 → 0.14.0-dev.61
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/contract-D8Ohjhmw.mjs +524 -0
- package/dist/contract-D8Ohjhmw.mjs.map +1 -0
- package/dist/contract.d.mts +18 -0
- package/dist/contract.d.mts.map +1 -1
- package/dist/pack.mjs +1 -413
- package/dist/pack.mjs.map +1 -1
- package/dist/runtime.d.mts +765 -5
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +64 -15
- package/dist/runtime.mjs.map +1 -1
- package/dist/test/utils.d.mts +10 -8
- package/dist/test/utils.d.mts.map +1 -1
- package/dist/test/utils.mjs +54 -11
- package/dist/test/utils.mjs.map +1 -1
- package/package.json +27 -26
- package/src/contract/contract.d.ts +172 -5
- package/src/contract/contract.json +126 -2
- package/src/contract/contract.prisma +16 -0
- package/src/exports/runtime.ts +3 -0
- package/src/runtime/ext-contract-type.ts +9 -0
- package/src/runtime/supabase.ts +118 -15
- package/dist/package-DsJwxFfN.mjs +0 -6
- package/dist/package-DsJwxFfN.mjs.map +0 -1
package/dist/runtime.d.mts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { NamespacedNativeEnums, PostgresRuntime, PostgresRuntimeImpl } from "@prisma-next/postgres/runtime";
|
|
1
2
|
import { orm } from "@prisma-next/sql-orm-client";
|
|
2
3
|
import { RawSqlTag } from "@prisma-next/sql-relational-core/expression";
|
|
3
4
|
import { ExecutionContext, RuntimeConnection, SqlExecutionStackWithDriver, SqlMiddleware, SqlRuntimeExtensionDescriptor, TransactionContext, VerifyMarkerOption } from "@prisma-next/sql-runtime";
|
|
4
5
|
import { Client, Pool } from "pg";
|
|
5
6
|
import { AsyncIterableResult, RuntimeExecuteOptions } from "@prisma-next/framework-components/runtime";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
7
|
+
import { QueryOperationTypes } from "@prisma-next/adapter-postgres/operation-types";
|
|
8
|
+
import { CodecTypes } from "@prisma-next/target-postgres/codec-types";
|
|
9
|
+
import { ContractWithTypeMaps, SqlStorage, TypeMaps } from "@prisma-next/sql-contract/types";
|
|
10
|
+
import { Contract, NamespaceId, ProfileHashBase, StorageHashBase } from "@prisma-next/contract/types";
|
|
8
11
|
import { Db } from "@prisma-next/sql-builder/types";
|
|
9
|
-
import { SqlStorage } from "@prisma-next/sql-contract/types";
|
|
10
12
|
import { SqlExecutionPlan, SqlQueryPlan } from "@prisma-next/sql-relational-core/plan";
|
|
11
13
|
|
|
12
14
|
//#region src/runtime/descriptor.d.ts
|
|
@@ -21,6 +23,738 @@ import { SqlExecutionPlan, SqlQueryPlan } from "@prisma-next/sql-relational-core
|
|
|
21
23
|
*/
|
|
22
24
|
declare const supabaseRuntimeDescriptor: SqlRuntimeExtensionDescriptor<'postgres'>;
|
|
23
25
|
//#endregion
|
|
26
|
+
//#region src/contract/contract.d.ts
|
|
27
|
+
type StorageHash = StorageHashBase<'sha256:01edbb5adbbc0711bed516ea61b0585de2aa906f9aebacedbead613eff89f194'>;
|
|
28
|
+
type ProfileHash = ProfileHashBase<'sha256:9c8aa3114e84ed3b7ea2bd57526d9c2e1bf7c5292be694e9d3801f566fda7ccb'>;
|
|
29
|
+
type CodecTypes$1 = CodecTypes;
|
|
30
|
+
type QueryOperationTypes$1 = QueryOperationTypes<CodecTypes$1>;
|
|
31
|
+
type FieldOutputTypes = {
|
|
32
|
+
readonly auth: {
|
|
33
|
+
readonly AuthIdentity: {
|
|
34
|
+
readonly id: CodecTypes$1['pg/uuid@1']['output'];
|
|
35
|
+
readonly user_id: CodecTypes$1['pg/uuid@1']['output'];
|
|
36
|
+
readonly provider: CodecTypes$1['pg/text@1']['output'];
|
|
37
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
38
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
39
|
+
};
|
|
40
|
+
readonly AuthSession: {
|
|
41
|
+
readonly id: CodecTypes$1['pg/uuid@1']['output'];
|
|
42
|
+
readonly user_id: CodecTypes$1['pg/uuid@1']['output'];
|
|
43
|
+
readonly aal: 'aal1' | 'aal2' | 'aal3' | null;
|
|
44
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
45
|
+
};
|
|
46
|
+
readonly AuthUser: {
|
|
47
|
+
readonly id: CodecTypes$1['pg/uuid@1']['output'];
|
|
48
|
+
readonly email: CodecTypes$1['pg/text@1']['output'];
|
|
49
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
50
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
readonly storage: {
|
|
54
|
+
readonly StorageBucket: {
|
|
55
|
+
readonly id: CodecTypes$1['pg/text@1']['output'];
|
|
56
|
+
readonly name: CodecTypes$1['pg/text@1']['output'];
|
|
57
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
58
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
59
|
+
};
|
|
60
|
+
readonly StorageObject: {
|
|
61
|
+
readonly id: CodecTypes$1['pg/uuid@1']['output'];
|
|
62
|
+
readonly bucket_id: CodecTypes$1['pg/text@1']['output'];
|
|
63
|
+
readonly name: CodecTypes$1['pg/text@1']['output'];
|
|
64
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
65
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
type FieldInputTypes = {
|
|
70
|
+
readonly auth: {
|
|
71
|
+
readonly AuthIdentity: {
|
|
72
|
+
readonly id: CodecTypes$1['pg/uuid@1']['input'];
|
|
73
|
+
readonly user_id: CodecTypes$1['pg/uuid@1']['input'];
|
|
74
|
+
readonly provider: CodecTypes$1['pg/text@1']['input'];
|
|
75
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
76
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
77
|
+
};
|
|
78
|
+
readonly AuthSession: {
|
|
79
|
+
readonly id: CodecTypes$1['pg/uuid@1']['input'];
|
|
80
|
+
readonly user_id: CodecTypes$1['pg/uuid@1']['input'];
|
|
81
|
+
readonly aal: 'aal1' | 'aal2' | 'aal3' | null;
|
|
82
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
83
|
+
};
|
|
84
|
+
readonly AuthUser: {
|
|
85
|
+
readonly id: CodecTypes$1['pg/uuid@1']['input'];
|
|
86
|
+
readonly email: CodecTypes$1['pg/text@1']['input'];
|
|
87
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
88
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
readonly storage: {
|
|
92
|
+
readonly StorageBucket: {
|
|
93
|
+
readonly id: CodecTypes$1['pg/text@1']['input'];
|
|
94
|
+
readonly name: CodecTypes$1['pg/text@1']['input'];
|
|
95
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
96
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
97
|
+
};
|
|
98
|
+
readonly StorageObject: {
|
|
99
|
+
readonly id: CodecTypes$1['pg/uuid@1']['input'];
|
|
100
|
+
readonly bucket_id: CodecTypes$1['pg/text@1']['input'];
|
|
101
|
+
readonly name: CodecTypes$1['pg/text@1']['input'];
|
|
102
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
103
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
type StorageColumnTypes = {
|
|
108
|
+
readonly auth: {
|
|
109
|
+
readonly identities: {
|
|
110
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
111
|
+
readonly id: CodecTypes$1['pg/uuid@1']['output'];
|
|
112
|
+
readonly provider: CodecTypes$1['pg/text@1']['output'];
|
|
113
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
114
|
+
readonly user_id: CodecTypes$1['pg/uuid@1']['output'];
|
|
115
|
+
};
|
|
116
|
+
readonly sessions: {
|
|
117
|
+
readonly aal: 'aal1' | 'aal2' | 'aal3' | null;
|
|
118
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
119
|
+
readonly id: CodecTypes$1['pg/uuid@1']['output'];
|
|
120
|
+
readonly user_id: CodecTypes$1['pg/uuid@1']['output'];
|
|
121
|
+
};
|
|
122
|
+
readonly users: {
|
|
123
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
124
|
+
readonly email: CodecTypes$1['pg/text@1']['output'];
|
|
125
|
+
readonly id: CodecTypes$1['pg/uuid@1']['output'];
|
|
126
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
readonly public: {};
|
|
130
|
+
readonly storage: {
|
|
131
|
+
readonly buckets: {
|
|
132
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
133
|
+
readonly id: CodecTypes$1['pg/text@1']['output'];
|
|
134
|
+
readonly name: CodecTypes$1['pg/text@1']['output'];
|
|
135
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
136
|
+
};
|
|
137
|
+
readonly objects: {
|
|
138
|
+
readonly bucket_id: CodecTypes$1['pg/text@1']['output'];
|
|
139
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
140
|
+
readonly id: CodecTypes$1['pg/uuid@1']['output'];
|
|
141
|
+
readonly name: CodecTypes$1['pg/text@1']['output'];
|
|
142
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['output'];
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
type StorageColumnInputTypes = {
|
|
147
|
+
readonly auth: {
|
|
148
|
+
readonly identities: {
|
|
149
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
150
|
+
readonly id: CodecTypes$1['pg/uuid@1']['input'];
|
|
151
|
+
readonly provider: CodecTypes$1['pg/text@1']['input'];
|
|
152
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
153
|
+
readonly user_id: CodecTypes$1['pg/uuid@1']['input'];
|
|
154
|
+
};
|
|
155
|
+
readonly sessions: {
|
|
156
|
+
readonly aal: 'aal1' | 'aal2' | 'aal3' | null;
|
|
157
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
158
|
+
readonly id: CodecTypes$1['pg/uuid@1']['input'];
|
|
159
|
+
readonly user_id: CodecTypes$1['pg/uuid@1']['input'];
|
|
160
|
+
};
|
|
161
|
+
readonly users: {
|
|
162
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
163
|
+
readonly email: CodecTypes$1['pg/text@1']['input'];
|
|
164
|
+
readonly id: CodecTypes$1['pg/uuid@1']['input'];
|
|
165
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
readonly public: {};
|
|
169
|
+
readonly storage: {
|
|
170
|
+
readonly buckets: {
|
|
171
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
172
|
+
readonly id: CodecTypes$1['pg/text@1']['input'];
|
|
173
|
+
readonly name: CodecTypes$1['pg/text@1']['input'];
|
|
174
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
175
|
+
};
|
|
176
|
+
readonly objects: {
|
|
177
|
+
readonly bucket_id: CodecTypes$1['pg/text@1']['input'];
|
|
178
|
+
readonly created_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
179
|
+
readonly id: CodecTypes$1['pg/uuid@1']['input'];
|
|
180
|
+
readonly name: CodecTypes$1['pg/text@1']['input'];
|
|
181
|
+
readonly updated_at: CodecTypes$1['pg/timestamptz@1']['input'];
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
type TypeMaps$1 = TypeMaps<CodecTypes$1, QueryOperationTypes$1, FieldOutputTypes, FieldInputTypes, StorageColumnTypes, StorageColumnInputTypes>;
|
|
186
|
+
type ContractBase = Omit<Contract<{
|
|
187
|
+
readonly namespaces: {
|
|
188
|
+
readonly auth: {
|
|
189
|
+
readonly id: 'auth';
|
|
190
|
+
readonly kind: 'postgres-schema';
|
|
191
|
+
readonly entries: {
|
|
192
|
+
readonly table: {
|
|
193
|
+
readonly identities: {
|
|
194
|
+
columns: {
|
|
195
|
+
readonly id: {
|
|
196
|
+
readonly nativeType: 'uuid';
|
|
197
|
+
readonly codecId: 'pg/uuid@1';
|
|
198
|
+
readonly nullable: false;
|
|
199
|
+
readonly typeRef: 'Uuid';
|
|
200
|
+
};
|
|
201
|
+
readonly user_id: {
|
|
202
|
+
readonly nativeType: 'uuid';
|
|
203
|
+
readonly codecId: 'pg/uuid@1';
|
|
204
|
+
readonly nullable: false;
|
|
205
|
+
readonly typeRef: 'Uuid';
|
|
206
|
+
};
|
|
207
|
+
readonly provider: {
|
|
208
|
+
readonly nativeType: 'text';
|
|
209
|
+
readonly codecId: 'pg/text@1';
|
|
210
|
+
readonly nullable: false;
|
|
211
|
+
};
|
|
212
|
+
readonly created_at: {
|
|
213
|
+
readonly nativeType: 'timestamptz';
|
|
214
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
215
|
+
readonly nullable: false;
|
|
216
|
+
readonly typeRef: 'Timestamptz';
|
|
217
|
+
};
|
|
218
|
+
readonly updated_at: {
|
|
219
|
+
readonly nativeType: 'timestamptz';
|
|
220
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
221
|
+
readonly nullable: false;
|
|
222
|
+
readonly typeRef: 'Timestamptz';
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
primaryKey: {
|
|
226
|
+
readonly columns: readonly ['id'];
|
|
227
|
+
};
|
|
228
|
+
uniques: readonly [];
|
|
229
|
+
indexes: readonly [];
|
|
230
|
+
foreignKeys: readonly [];
|
|
231
|
+
};
|
|
232
|
+
readonly sessions: {
|
|
233
|
+
columns: {
|
|
234
|
+
readonly id: {
|
|
235
|
+
readonly nativeType: 'uuid';
|
|
236
|
+
readonly codecId: 'pg/uuid@1';
|
|
237
|
+
readonly nullable: false;
|
|
238
|
+
readonly typeRef: 'Uuid';
|
|
239
|
+
};
|
|
240
|
+
readonly user_id: {
|
|
241
|
+
readonly nativeType: 'uuid';
|
|
242
|
+
readonly codecId: 'pg/uuid@1';
|
|
243
|
+
readonly nullable: false;
|
|
244
|
+
readonly typeRef: 'Uuid';
|
|
245
|
+
};
|
|
246
|
+
readonly aal: {
|
|
247
|
+
readonly nativeType: 'auth.aal_level';
|
|
248
|
+
readonly codecId: 'pg/enum@1';
|
|
249
|
+
readonly nullable: true;
|
|
250
|
+
readonly typeParams: {
|
|
251
|
+
readonly typeName: 'auth.aal_level';
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
readonly created_at: {
|
|
255
|
+
readonly nativeType: 'timestamptz';
|
|
256
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
257
|
+
readonly nullable: false;
|
|
258
|
+
readonly typeRef: 'Timestamptz';
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
primaryKey: {
|
|
262
|
+
readonly columns: readonly ['id'];
|
|
263
|
+
};
|
|
264
|
+
uniques: readonly [];
|
|
265
|
+
indexes: readonly [];
|
|
266
|
+
foreignKeys: readonly [];
|
|
267
|
+
};
|
|
268
|
+
readonly users: {
|
|
269
|
+
columns: {
|
|
270
|
+
readonly id: {
|
|
271
|
+
readonly nativeType: 'uuid';
|
|
272
|
+
readonly codecId: 'pg/uuid@1';
|
|
273
|
+
readonly nullable: false;
|
|
274
|
+
readonly typeRef: 'Uuid';
|
|
275
|
+
};
|
|
276
|
+
readonly email: {
|
|
277
|
+
readonly nativeType: 'text';
|
|
278
|
+
readonly codecId: 'pg/text@1';
|
|
279
|
+
readonly nullable: false;
|
|
280
|
+
};
|
|
281
|
+
readonly created_at: {
|
|
282
|
+
readonly nativeType: 'timestamptz';
|
|
283
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
284
|
+
readonly nullable: false;
|
|
285
|
+
readonly typeRef: 'Timestamptz';
|
|
286
|
+
};
|
|
287
|
+
readonly updated_at: {
|
|
288
|
+
readonly nativeType: 'timestamptz';
|
|
289
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
290
|
+
readonly nullable: false;
|
|
291
|
+
readonly typeRef: 'Timestamptz';
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
primaryKey: {
|
|
295
|
+
readonly columns: readonly ['id'];
|
|
296
|
+
};
|
|
297
|
+
uniques: readonly [];
|
|
298
|
+
indexes: readonly [];
|
|
299
|
+
foreignKeys: readonly [];
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
readonly valueSet: {
|
|
303
|
+
readonly AalLevel: {
|
|
304
|
+
readonly kind: 'valueSet';
|
|
305
|
+
readonly values: readonly ['aal1', 'aal2', 'aal3'];
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
readonly public: {
|
|
311
|
+
readonly id: 'public';
|
|
312
|
+
readonly kind: 'postgres-schema';
|
|
313
|
+
readonly entries: {
|
|
314
|
+
readonly table: {};
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
readonly storage: {
|
|
318
|
+
readonly id: 'storage';
|
|
319
|
+
readonly kind: 'postgres-schema';
|
|
320
|
+
readonly entries: {
|
|
321
|
+
readonly table: {
|
|
322
|
+
readonly buckets: {
|
|
323
|
+
columns: {
|
|
324
|
+
readonly id: {
|
|
325
|
+
readonly nativeType: 'text';
|
|
326
|
+
readonly codecId: 'pg/text@1';
|
|
327
|
+
readonly nullable: false;
|
|
328
|
+
};
|
|
329
|
+
readonly name: {
|
|
330
|
+
readonly nativeType: 'text';
|
|
331
|
+
readonly codecId: 'pg/text@1';
|
|
332
|
+
readonly nullable: false;
|
|
333
|
+
};
|
|
334
|
+
readonly created_at: {
|
|
335
|
+
readonly nativeType: 'timestamptz';
|
|
336
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
337
|
+
readonly nullable: false;
|
|
338
|
+
readonly typeRef: 'Timestamptz';
|
|
339
|
+
};
|
|
340
|
+
readonly updated_at: {
|
|
341
|
+
readonly nativeType: 'timestamptz';
|
|
342
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
343
|
+
readonly nullable: false;
|
|
344
|
+
readonly typeRef: 'Timestamptz';
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
primaryKey: {
|
|
348
|
+
readonly columns: readonly ['id'];
|
|
349
|
+
};
|
|
350
|
+
uniques: readonly [];
|
|
351
|
+
indexes: readonly [];
|
|
352
|
+
foreignKeys: readonly [];
|
|
353
|
+
};
|
|
354
|
+
readonly objects: {
|
|
355
|
+
columns: {
|
|
356
|
+
readonly id: {
|
|
357
|
+
readonly nativeType: 'uuid';
|
|
358
|
+
readonly codecId: 'pg/uuid@1';
|
|
359
|
+
readonly nullable: false;
|
|
360
|
+
readonly typeRef: 'Uuid';
|
|
361
|
+
};
|
|
362
|
+
readonly bucket_id: {
|
|
363
|
+
readonly nativeType: 'text';
|
|
364
|
+
readonly codecId: 'pg/text@1';
|
|
365
|
+
readonly nullable: false;
|
|
366
|
+
};
|
|
367
|
+
readonly name: {
|
|
368
|
+
readonly nativeType: 'text';
|
|
369
|
+
readonly codecId: 'pg/text@1';
|
|
370
|
+
readonly nullable: false;
|
|
371
|
+
};
|
|
372
|
+
readonly created_at: {
|
|
373
|
+
readonly nativeType: 'timestamptz';
|
|
374
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
375
|
+
readonly nullable: false;
|
|
376
|
+
readonly typeRef: 'Timestamptz';
|
|
377
|
+
};
|
|
378
|
+
readonly updated_at: {
|
|
379
|
+
readonly nativeType: 'timestamptz';
|
|
380
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
381
|
+
readonly nullable: false;
|
|
382
|
+
readonly typeRef: 'Timestamptz';
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
primaryKey: {
|
|
386
|
+
readonly columns: readonly ['id'];
|
|
387
|
+
};
|
|
388
|
+
uniques: readonly [];
|
|
389
|
+
indexes: readonly [];
|
|
390
|
+
foreignKeys: readonly [];
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
readonly types: {
|
|
397
|
+
readonly Uuid: {
|
|
398
|
+
readonly kind: 'codec-instance';
|
|
399
|
+
readonly codecId: 'pg/uuid@1';
|
|
400
|
+
readonly nativeType: 'uuid';
|
|
401
|
+
readonly typeParams: Record<string, never>;
|
|
402
|
+
};
|
|
403
|
+
readonly Timestamptz: {
|
|
404
|
+
readonly kind: 'codec-instance';
|
|
405
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
406
|
+
readonly nativeType: 'timestamptz';
|
|
407
|
+
readonly typeParams: Record<string, never>;
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
readonly storageHash: StorageHash;
|
|
411
|
+
}>, 'roots' | 'domain'> & {
|
|
412
|
+
readonly target: 'postgres';
|
|
413
|
+
readonly targetFamily: 'sql';
|
|
414
|
+
readonly roots: {
|
|
415
|
+
readonly users: {
|
|
416
|
+
readonly namespace: 'auth' & NamespaceId;
|
|
417
|
+
readonly model: 'AuthUser';
|
|
418
|
+
};
|
|
419
|
+
readonly identities: {
|
|
420
|
+
readonly namespace: 'auth' & NamespaceId;
|
|
421
|
+
readonly model: 'AuthIdentity';
|
|
422
|
+
};
|
|
423
|
+
readonly sessions: {
|
|
424
|
+
readonly namespace: 'auth' & NamespaceId;
|
|
425
|
+
readonly model: 'AuthSession';
|
|
426
|
+
};
|
|
427
|
+
readonly buckets: {
|
|
428
|
+
readonly namespace: 'storage' & NamespaceId;
|
|
429
|
+
readonly model: 'StorageBucket';
|
|
430
|
+
};
|
|
431
|
+
readonly objects: {
|
|
432
|
+
readonly namespace: 'storage' & NamespaceId;
|
|
433
|
+
readonly model: 'StorageObject';
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
readonly domain: {
|
|
437
|
+
readonly namespaces: {
|
|
438
|
+
readonly auth: {
|
|
439
|
+
readonly models: {
|
|
440
|
+
readonly AuthIdentity: {
|
|
441
|
+
readonly fields: {
|
|
442
|
+
readonly id: {
|
|
443
|
+
readonly nullable: false;
|
|
444
|
+
readonly type: {
|
|
445
|
+
readonly kind: 'scalar';
|
|
446
|
+
readonly codecId: 'pg/uuid@1';
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
readonly user_id: {
|
|
450
|
+
readonly nullable: false;
|
|
451
|
+
readonly type: {
|
|
452
|
+
readonly kind: 'scalar';
|
|
453
|
+
readonly codecId: 'pg/uuid@1';
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
readonly provider: {
|
|
457
|
+
readonly nullable: false;
|
|
458
|
+
readonly type: {
|
|
459
|
+
readonly kind: 'scalar';
|
|
460
|
+
readonly codecId: 'pg/text@1';
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
readonly created_at: {
|
|
464
|
+
readonly nullable: false;
|
|
465
|
+
readonly type: {
|
|
466
|
+
readonly kind: 'scalar';
|
|
467
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
468
|
+
};
|
|
469
|
+
};
|
|
470
|
+
readonly updated_at: {
|
|
471
|
+
readonly nullable: false;
|
|
472
|
+
readonly type: {
|
|
473
|
+
readonly kind: 'scalar';
|
|
474
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
475
|
+
};
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
readonly relations: Record<string, never>;
|
|
479
|
+
readonly storage: {
|
|
480
|
+
readonly table: 'identities';
|
|
481
|
+
readonly namespaceId: 'auth';
|
|
482
|
+
readonly fields: {
|
|
483
|
+
readonly id: {
|
|
484
|
+
readonly column: 'id';
|
|
485
|
+
};
|
|
486
|
+
readonly user_id: {
|
|
487
|
+
readonly column: 'user_id';
|
|
488
|
+
};
|
|
489
|
+
readonly provider: {
|
|
490
|
+
readonly column: 'provider';
|
|
491
|
+
};
|
|
492
|
+
readonly created_at: {
|
|
493
|
+
readonly column: 'created_at';
|
|
494
|
+
};
|
|
495
|
+
readonly updated_at: {
|
|
496
|
+
readonly column: 'updated_at';
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
};
|
|
501
|
+
readonly AuthSession: {
|
|
502
|
+
readonly fields: {
|
|
503
|
+
readonly id: {
|
|
504
|
+
readonly nullable: false;
|
|
505
|
+
readonly type: {
|
|
506
|
+
readonly kind: 'scalar';
|
|
507
|
+
readonly codecId: 'pg/uuid@1';
|
|
508
|
+
};
|
|
509
|
+
};
|
|
510
|
+
readonly user_id: {
|
|
511
|
+
readonly nullable: false;
|
|
512
|
+
readonly type: {
|
|
513
|
+
readonly kind: 'scalar';
|
|
514
|
+
readonly codecId: 'pg/uuid@1';
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
readonly aal: {
|
|
518
|
+
readonly nullable: true;
|
|
519
|
+
readonly type: {
|
|
520
|
+
readonly kind: 'scalar';
|
|
521
|
+
readonly codecId: 'pg/enum@1';
|
|
522
|
+
readonly typeParams: {
|
|
523
|
+
readonly typeName: 'auth.aal_level';
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
};
|
|
527
|
+
readonly created_at: {
|
|
528
|
+
readonly nullable: false;
|
|
529
|
+
readonly type: {
|
|
530
|
+
readonly kind: 'scalar';
|
|
531
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
readonly relations: Record<string, never>;
|
|
536
|
+
readonly storage: {
|
|
537
|
+
readonly table: 'sessions';
|
|
538
|
+
readonly namespaceId: 'auth';
|
|
539
|
+
readonly fields: {
|
|
540
|
+
readonly id: {
|
|
541
|
+
readonly column: 'id';
|
|
542
|
+
};
|
|
543
|
+
readonly user_id: {
|
|
544
|
+
readonly column: 'user_id';
|
|
545
|
+
};
|
|
546
|
+
readonly aal: {
|
|
547
|
+
readonly column: 'aal';
|
|
548
|
+
};
|
|
549
|
+
readonly created_at: {
|
|
550
|
+
readonly column: 'created_at';
|
|
551
|
+
};
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
};
|
|
555
|
+
readonly AuthUser: {
|
|
556
|
+
readonly fields: {
|
|
557
|
+
readonly id: {
|
|
558
|
+
readonly nullable: false;
|
|
559
|
+
readonly type: {
|
|
560
|
+
readonly kind: 'scalar';
|
|
561
|
+
readonly codecId: 'pg/uuid@1';
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
readonly email: {
|
|
565
|
+
readonly nullable: false;
|
|
566
|
+
readonly type: {
|
|
567
|
+
readonly kind: 'scalar';
|
|
568
|
+
readonly codecId: 'pg/text@1';
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
readonly created_at: {
|
|
572
|
+
readonly nullable: false;
|
|
573
|
+
readonly type: {
|
|
574
|
+
readonly kind: 'scalar';
|
|
575
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
576
|
+
};
|
|
577
|
+
};
|
|
578
|
+
readonly updated_at: {
|
|
579
|
+
readonly nullable: false;
|
|
580
|
+
readonly type: {
|
|
581
|
+
readonly kind: 'scalar';
|
|
582
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
readonly relations: Record<string, never>;
|
|
587
|
+
readonly storage: {
|
|
588
|
+
readonly table: 'users';
|
|
589
|
+
readonly namespaceId: 'auth';
|
|
590
|
+
readonly fields: {
|
|
591
|
+
readonly id: {
|
|
592
|
+
readonly column: 'id';
|
|
593
|
+
};
|
|
594
|
+
readonly email: {
|
|
595
|
+
readonly column: 'email';
|
|
596
|
+
};
|
|
597
|
+
readonly created_at: {
|
|
598
|
+
readonly column: 'created_at';
|
|
599
|
+
};
|
|
600
|
+
readonly updated_at: {
|
|
601
|
+
readonly column: 'updated_at';
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
};
|
|
608
|
+
readonly storage: {
|
|
609
|
+
readonly models: {
|
|
610
|
+
readonly StorageBucket: {
|
|
611
|
+
readonly fields: {
|
|
612
|
+
readonly id: {
|
|
613
|
+
readonly nullable: false;
|
|
614
|
+
readonly type: {
|
|
615
|
+
readonly kind: 'scalar';
|
|
616
|
+
readonly codecId: 'pg/text@1';
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
readonly name: {
|
|
620
|
+
readonly nullable: false;
|
|
621
|
+
readonly type: {
|
|
622
|
+
readonly kind: 'scalar';
|
|
623
|
+
readonly codecId: 'pg/text@1';
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
readonly created_at: {
|
|
627
|
+
readonly nullable: false;
|
|
628
|
+
readonly type: {
|
|
629
|
+
readonly kind: 'scalar';
|
|
630
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
631
|
+
};
|
|
632
|
+
};
|
|
633
|
+
readonly updated_at: {
|
|
634
|
+
readonly nullable: false;
|
|
635
|
+
readonly type: {
|
|
636
|
+
readonly kind: 'scalar';
|
|
637
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
638
|
+
};
|
|
639
|
+
};
|
|
640
|
+
};
|
|
641
|
+
readonly relations: Record<string, never>;
|
|
642
|
+
readonly storage: {
|
|
643
|
+
readonly table: 'buckets';
|
|
644
|
+
readonly namespaceId: 'storage';
|
|
645
|
+
readonly fields: {
|
|
646
|
+
readonly id: {
|
|
647
|
+
readonly column: 'id';
|
|
648
|
+
};
|
|
649
|
+
readonly name: {
|
|
650
|
+
readonly column: 'name';
|
|
651
|
+
};
|
|
652
|
+
readonly created_at: {
|
|
653
|
+
readonly column: 'created_at';
|
|
654
|
+
};
|
|
655
|
+
readonly updated_at: {
|
|
656
|
+
readonly column: 'updated_at';
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
readonly StorageObject: {
|
|
662
|
+
readonly fields: {
|
|
663
|
+
readonly id: {
|
|
664
|
+
readonly nullable: false;
|
|
665
|
+
readonly type: {
|
|
666
|
+
readonly kind: 'scalar';
|
|
667
|
+
readonly codecId: 'pg/uuid@1';
|
|
668
|
+
};
|
|
669
|
+
};
|
|
670
|
+
readonly bucket_id: {
|
|
671
|
+
readonly nullable: false;
|
|
672
|
+
readonly type: {
|
|
673
|
+
readonly kind: 'scalar';
|
|
674
|
+
readonly codecId: 'pg/text@1';
|
|
675
|
+
};
|
|
676
|
+
};
|
|
677
|
+
readonly name: {
|
|
678
|
+
readonly nullable: false;
|
|
679
|
+
readonly type: {
|
|
680
|
+
readonly kind: 'scalar';
|
|
681
|
+
readonly codecId: 'pg/text@1';
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
readonly created_at: {
|
|
685
|
+
readonly nullable: false;
|
|
686
|
+
readonly type: {
|
|
687
|
+
readonly kind: 'scalar';
|
|
688
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
689
|
+
};
|
|
690
|
+
};
|
|
691
|
+
readonly updated_at: {
|
|
692
|
+
readonly nullable: false;
|
|
693
|
+
readonly type: {
|
|
694
|
+
readonly kind: 'scalar';
|
|
695
|
+
readonly codecId: 'pg/timestamptz@1';
|
|
696
|
+
};
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
readonly relations: Record<string, never>;
|
|
700
|
+
readonly storage: {
|
|
701
|
+
readonly table: 'objects';
|
|
702
|
+
readonly namespaceId: 'storage';
|
|
703
|
+
readonly fields: {
|
|
704
|
+
readonly id: {
|
|
705
|
+
readonly column: 'id';
|
|
706
|
+
};
|
|
707
|
+
readonly bucket_id: {
|
|
708
|
+
readonly column: 'bucket_id';
|
|
709
|
+
};
|
|
710
|
+
readonly name: {
|
|
711
|
+
readonly column: 'name';
|
|
712
|
+
};
|
|
713
|
+
readonly created_at: {
|
|
714
|
+
readonly column: 'created_at';
|
|
715
|
+
};
|
|
716
|
+
readonly updated_at: {
|
|
717
|
+
readonly column: 'updated_at';
|
|
718
|
+
};
|
|
719
|
+
};
|
|
720
|
+
};
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
};
|
|
725
|
+
};
|
|
726
|
+
readonly capabilities: {
|
|
727
|
+
readonly postgres: {
|
|
728
|
+
readonly distinctOn: true;
|
|
729
|
+
readonly jsonAgg: true;
|
|
730
|
+
readonly lateral: true;
|
|
731
|
+
readonly limit: true;
|
|
732
|
+
readonly orderBy: true;
|
|
733
|
+
readonly returning: true;
|
|
734
|
+
};
|
|
735
|
+
readonly sql: {
|
|
736
|
+
readonly defaultInInsert: true;
|
|
737
|
+
readonly enums: true;
|
|
738
|
+
readonly lateral: true;
|
|
739
|
+
readonly returning: true;
|
|
740
|
+
readonly scalarList: true;
|
|
741
|
+
};
|
|
742
|
+
};
|
|
743
|
+
readonly extensionPacks: {};
|
|
744
|
+
readonly meta: {};
|
|
745
|
+
readonly profileHash: ProfileHash;
|
|
746
|
+
};
|
|
747
|
+
type Contract$1 = ContractWithTypeMaps<ContractBase, TypeMaps$1>;
|
|
748
|
+
//#endregion
|
|
749
|
+
//#region src/runtime/ext-contract-type.d.ts
|
|
750
|
+
/**
|
|
751
|
+
* The Supabase extension's own emitted contract type (`auth`, `storage`
|
|
752
|
+
* namespaces), re-exported under a distinct name so the runtime facade can
|
|
753
|
+
* reference it alongside the framework `Contract` (`@prisma-next/contract/types`)
|
|
754
|
+
* without an aliased import. Backs the `service_role` `.supabase` secondary root.
|
|
755
|
+
*/
|
|
756
|
+
type SupabaseExtensionContract = Contract$1;
|
|
757
|
+
//#endregion
|
|
24
758
|
//#region src/runtime/supabase.d.ts
|
|
25
759
|
type SupabaseTargetId = 'postgres';
|
|
26
760
|
type OrmClient<TContract extends Contract<SqlStorage>> = ReturnType<typeof orm<TContract>>;
|
|
@@ -42,12 +776,38 @@ interface RoleBoundDb<TContract extends Contract<SqlStorage>> {
|
|
|
42
776
|
}, options?: RuntimeExecuteOptions): AsyncIterableResult<Row>;
|
|
43
777
|
transaction<R>(fn: (tx: TransactionContext) => PromiseLike<R>): Promise<R>;
|
|
44
778
|
}
|
|
779
|
+
/**
|
|
780
|
+
* Query surface for the Supabase-internal contract (`auth`, `storage`). Exposed
|
|
781
|
+
* as a separate secondary root — never merged into the app contract — and only
|
|
782
|
+
* reachable through `service_role`, the one role with grants on those schemas
|
|
783
|
+
* over a direct Postgres connection.
|
|
784
|
+
*
|
|
785
|
+
* Deliberately omits `transaction` (which {@link RoleBoundDb} has): the primary
|
|
786
|
+
* app root and this secondary root are served by separate runtimes that do not
|
|
787
|
+
* share one pinned connection, so a transaction spanning both is out of scope for v1.
|
|
788
|
+
*/
|
|
789
|
+
interface SupabaseInternalDb {
|
|
790
|
+
readonly sql: Db<SupabaseExtensionContract>;
|
|
791
|
+
readonly orm: OrmClient<SupabaseExtensionContract>;
|
|
792
|
+
readonly nativeEnums: NamespacedNativeEnums<SupabaseExtensionContract>;
|
|
793
|
+
execute<Row>(plan: (SqlExecutionPlan<Row> | SqlQueryPlan<Row>) & {
|
|
794
|
+
readonly _row?: Row;
|
|
795
|
+
}, options?: RuntimeExecuteOptions): AsyncIterableResult<Row>;
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* The `service_role` db: the app-contract role-bound surface (its `.sql` / `.orm`
|
|
799
|
+
* are app-only, exactly like `asUser` / `asAnon`), plus a `.supabase` secondary
|
|
800
|
+
* root for the Supabase-internal namespaces.
|
|
801
|
+
*/
|
|
802
|
+
type ServiceRoleDb<TContract extends Contract<SqlStorage>> = RoleBoundDb<TContract> & {
|
|
803
|
+
readonly supabase: SupabaseInternalDb;
|
|
804
|
+
};
|
|
45
805
|
interface SupabaseDb<TContract extends Contract<SqlStorage>> {
|
|
46
806
|
readonly context: ExecutionContext<TContract>;
|
|
47
807
|
readonly stack: SqlExecutionStackWithDriver<SupabaseTargetId>;
|
|
48
808
|
asUser(jwt: string): Promise<RoleBoundDb<TContract>>;
|
|
49
809
|
asAnon(): RoleBoundDb<TContract>;
|
|
50
|
-
asServiceRole():
|
|
810
|
+
asServiceRole(): ServiceRoleDb<TContract>;
|
|
51
811
|
close(): Promise<void>;
|
|
52
812
|
[Symbol.asyncDispose](): Promise<void>;
|
|
53
813
|
}
|
|
@@ -110,5 +870,5 @@ declare class SupabaseRuntimeImpl<TContract extends Contract<SqlStorage> = Contr
|
|
|
110
870
|
executeWithRole<Row>(plan: SqlExecutionPlan<Row> | SqlQueryPlan<Row>, binding: SupabaseRoleBinding, options?: RuntimeExecuteOptions): AsyncIterableResult<Row>;
|
|
111
871
|
}
|
|
112
872
|
//#endregion
|
|
113
|
-
export { InvalidJwtError, type RoleBoundDb, type RoleSession, SupabaseConfigError, type SupabaseDb, type SupabaseOptions, type SupabaseOptionsWithContract, type SupabaseOptionsWithContractJson, type SupabaseRoleBinding, type SupabaseRuntime, SupabaseRuntimeImpl, type SupabaseTargetId, supabaseRuntimeDescriptor as default, supabase };
|
|
873
|
+
export { InvalidJwtError, type RoleBoundDb, type RoleSession, type ServiceRoleDb, SupabaseConfigError, type SupabaseDb, type SupabaseExtensionContract, type SupabaseInternalDb, type SupabaseOptions, type SupabaseOptionsWithContract, type SupabaseOptionsWithContractJson, type SupabaseRoleBinding, type SupabaseRuntime, SupabaseRuntimeImpl, type SupabaseTargetId, supabaseRuntimeDescriptor as default, supabase };
|
|
114
874
|
//# sourceMappingURL=runtime.d.mts.map
|