@prisma/orm-extension-supabase 0.16.0-dev.37
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/LICENSE +201 -0
- package/README.md +29 -0
- package/dist/contract-Dgg9c1xN-oZ0VY2hP.mjs +7233 -0
- package/dist/contract-Dgg9c1xN-oZ0VY2hP.mjs.map +1 -0
- package/dist/contract.d.mts +328 -0
- package/dist/contract.d.mts.map +1 -0
- package/dist/contract.mjs +69 -0
- package/dist/contract.mjs.map +1 -0
- package/dist/pack.d.mts +17 -0
- package/dist/pack.d.mts.map +1 -0
- package/dist/pack.mjs +46 -0
- package/dist/pack.mjs.map +1 -0
- package/dist/roles-CuXa3u9g-bhk28dKK.d.mts +29 -0
- package/dist/roles-CuXa3u9g-bhk28dKK.d.mts.map +1 -0
- package/dist/roles-D5vC3rNp-tYQlvifU.mjs +34 -0
- package/dist/roles-D5vC3rNp-tYQlvifU.mjs.map +1 -0
- package/dist/runtime.d.mts +9286 -0
- package/dist/runtime.d.mts.map +1 -0
- package/dist/runtime.mjs +356 -0
- package/dist/runtime.mjs.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { n as anon, r as authenticated } from "./roles-CuXa3u9g-bhk28dKK.mjs";
|
|
2
|
+
//#region ../../../3-extensions/supabase/dist/contract.d.mts
|
|
3
|
+
//#region src/contract/handles.d.ts
|
|
4
|
+
declare const AuthUser: import("@prisma/orm-family-sql/contract-ts/contract-builder").ContractModelBuilder<"AuthUser", {
|
|
5
|
+
id: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
6
|
+
readonly kind: "scalar";
|
|
7
|
+
readonly descriptor?: {
|
|
8
|
+
readonly codecId: "pg/text@1";
|
|
9
|
+
readonly nativeType: "text";
|
|
10
|
+
} | undefined;
|
|
11
|
+
readonly typeRef?: undefined;
|
|
12
|
+
readonly nullable: false;
|
|
13
|
+
readonly columnName?: undefined;
|
|
14
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
15
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
16
|
+
readonly many?: undefined;
|
|
17
|
+
} & {
|
|
18
|
+
readonly id: {
|
|
19
|
+
readonly name?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
} & {
|
|
22
|
+
readonly unique?: undefined;
|
|
23
|
+
}>;
|
|
24
|
+
email: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
25
|
+
readonly kind: "scalar";
|
|
26
|
+
readonly descriptor?: {
|
|
27
|
+
readonly codecId: "pg/text@1";
|
|
28
|
+
readonly nativeType: "text";
|
|
29
|
+
} | undefined;
|
|
30
|
+
readonly typeRef?: undefined;
|
|
31
|
+
readonly nullable: false;
|
|
32
|
+
readonly columnName?: undefined;
|
|
33
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
34
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
35
|
+
readonly many?: undefined;
|
|
36
|
+
} & {
|
|
37
|
+
readonly id?: undefined;
|
|
38
|
+
} & {
|
|
39
|
+
readonly unique?: undefined;
|
|
40
|
+
}>;
|
|
41
|
+
created_at: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
42
|
+
readonly kind: "scalar";
|
|
43
|
+
readonly descriptor?: {
|
|
44
|
+
readonly codecId: "pg/timestamptz@1";
|
|
45
|
+
readonly nativeType: "timestamptz";
|
|
46
|
+
} | undefined;
|
|
47
|
+
readonly typeRef?: undefined;
|
|
48
|
+
readonly nullable: false;
|
|
49
|
+
readonly columnName?: undefined;
|
|
50
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
51
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
52
|
+
readonly many?: undefined;
|
|
53
|
+
} & {
|
|
54
|
+
readonly id?: undefined;
|
|
55
|
+
} & {
|
|
56
|
+
readonly unique?: undefined;
|
|
57
|
+
}>;
|
|
58
|
+
updated_at: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
59
|
+
readonly kind: "scalar";
|
|
60
|
+
readonly descriptor?: {
|
|
61
|
+
readonly codecId: "pg/timestamptz@1";
|
|
62
|
+
readonly nativeType: "timestamptz";
|
|
63
|
+
} | undefined;
|
|
64
|
+
readonly typeRef?: undefined;
|
|
65
|
+
readonly nullable: false;
|
|
66
|
+
readonly columnName?: undefined;
|
|
67
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
68
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
69
|
+
readonly many?: undefined;
|
|
70
|
+
} & {
|
|
71
|
+
readonly id?: undefined;
|
|
72
|
+
} & {
|
|
73
|
+
readonly unique?: undefined;
|
|
74
|
+
}>;
|
|
75
|
+
}, Record<never, never>, undefined, undefined, Record<never, never>, "supabase">;
|
|
76
|
+
declare const AuthIdentity: import("@prisma/orm-family-sql/contract-ts/contract-builder").ContractModelBuilder<"AuthIdentity", {
|
|
77
|
+
id: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
78
|
+
readonly kind: "scalar";
|
|
79
|
+
readonly descriptor?: {
|
|
80
|
+
readonly codecId: "pg/text@1";
|
|
81
|
+
readonly nativeType: "text";
|
|
82
|
+
} | undefined;
|
|
83
|
+
readonly typeRef?: undefined;
|
|
84
|
+
readonly nullable: false;
|
|
85
|
+
readonly columnName?: undefined;
|
|
86
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
87
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
88
|
+
readonly many?: undefined;
|
|
89
|
+
} & {
|
|
90
|
+
readonly id: {
|
|
91
|
+
readonly name?: string | undefined;
|
|
92
|
+
};
|
|
93
|
+
} & {
|
|
94
|
+
readonly unique?: undefined;
|
|
95
|
+
}>;
|
|
96
|
+
user_id: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
97
|
+
readonly kind: "scalar";
|
|
98
|
+
readonly descriptor?: {
|
|
99
|
+
readonly codecId: "pg/text@1";
|
|
100
|
+
readonly nativeType: "text";
|
|
101
|
+
} | undefined;
|
|
102
|
+
readonly typeRef?: undefined;
|
|
103
|
+
readonly nullable: false;
|
|
104
|
+
readonly columnName?: undefined;
|
|
105
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
106
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
107
|
+
readonly many?: undefined;
|
|
108
|
+
} & {
|
|
109
|
+
readonly id?: undefined;
|
|
110
|
+
} & {
|
|
111
|
+
readonly unique?: undefined;
|
|
112
|
+
}>;
|
|
113
|
+
provider: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
114
|
+
readonly kind: "scalar";
|
|
115
|
+
readonly descriptor?: {
|
|
116
|
+
readonly codecId: "pg/text@1";
|
|
117
|
+
readonly nativeType: "text";
|
|
118
|
+
} | undefined;
|
|
119
|
+
readonly typeRef?: undefined;
|
|
120
|
+
readonly nullable: false;
|
|
121
|
+
readonly columnName?: undefined;
|
|
122
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
123
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
124
|
+
readonly many?: undefined;
|
|
125
|
+
} & {
|
|
126
|
+
readonly id?: undefined;
|
|
127
|
+
} & {
|
|
128
|
+
readonly unique?: undefined;
|
|
129
|
+
}>;
|
|
130
|
+
created_at: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
131
|
+
readonly kind: "scalar";
|
|
132
|
+
readonly descriptor?: {
|
|
133
|
+
readonly codecId: "pg/timestamptz@1";
|
|
134
|
+
readonly nativeType: "timestamptz";
|
|
135
|
+
} | undefined;
|
|
136
|
+
readonly typeRef?: undefined;
|
|
137
|
+
readonly nullable: false;
|
|
138
|
+
readonly columnName?: undefined;
|
|
139
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
140
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
141
|
+
readonly many?: undefined;
|
|
142
|
+
} & {
|
|
143
|
+
readonly id?: undefined;
|
|
144
|
+
} & {
|
|
145
|
+
readonly unique?: undefined;
|
|
146
|
+
}>;
|
|
147
|
+
updated_at: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
148
|
+
readonly kind: "scalar";
|
|
149
|
+
readonly descriptor?: {
|
|
150
|
+
readonly codecId: "pg/timestamptz@1";
|
|
151
|
+
readonly nativeType: "timestamptz";
|
|
152
|
+
} | undefined;
|
|
153
|
+
readonly typeRef?: undefined;
|
|
154
|
+
readonly nullable: false;
|
|
155
|
+
readonly columnName?: undefined;
|
|
156
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
157
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
158
|
+
readonly many?: undefined;
|
|
159
|
+
} & {
|
|
160
|
+
readonly id?: undefined;
|
|
161
|
+
} & {
|
|
162
|
+
readonly unique?: undefined;
|
|
163
|
+
}>;
|
|
164
|
+
}, Record<never, never>, undefined, undefined, Record<never, never>, "supabase">;
|
|
165
|
+
declare const StorageBucket: import("@prisma/orm-family-sql/contract-ts/contract-builder").ContractModelBuilder<"StorageBucket", {
|
|
166
|
+
id: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
167
|
+
readonly kind: "scalar";
|
|
168
|
+
readonly descriptor?: {
|
|
169
|
+
readonly codecId: "pg/text@1";
|
|
170
|
+
readonly nativeType: "text";
|
|
171
|
+
} | undefined;
|
|
172
|
+
readonly typeRef?: undefined;
|
|
173
|
+
readonly nullable: false;
|
|
174
|
+
readonly columnName?: undefined;
|
|
175
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
176
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
177
|
+
readonly many?: undefined;
|
|
178
|
+
} & {
|
|
179
|
+
readonly id: {
|
|
180
|
+
readonly name?: string | undefined;
|
|
181
|
+
};
|
|
182
|
+
} & {
|
|
183
|
+
readonly unique?: undefined;
|
|
184
|
+
}>;
|
|
185
|
+
name: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
186
|
+
readonly kind: "scalar";
|
|
187
|
+
readonly descriptor?: {
|
|
188
|
+
readonly codecId: "pg/text@1";
|
|
189
|
+
readonly nativeType: "text";
|
|
190
|
+
} | undefined;
|
|
191
|
+
readonly typeRef?: undefined;
|
|
192
|
+
readonly nullable: false;
|
|
193
|
+
readonly columnName?: undefined;
|
|
194
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
195
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
196
|
+
readonly many?: undefined;
|
|
197
|
+
} & {
|
|
198
|
+
readonly id?: undefined;
|
|
199
|
+
} & {
|
|
200
|
+
readonly unique?: undefined;
|
|
201
|
+
}>;
|
|
202
|
+
created_at: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
203
|
+
readonly kind: "scalar";
|
|
204
|
+
readonly descriptor?: {
|
|
205
|
+
readonly codecId: "pg/timestamptz@1";
|
|
206
|
+
readonly nativeType: "timestamptz";
|
|
207
|
+
} | undefined;
|
|
208
|
+
readonly typeRef?: undefined;
|
|
209
|
+
readonly nullable: false;
|
|
210
|
+
readonly columnName?: undefined;
|
|
211
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
212
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
213
|
+
readonly many?: undefined;
|
|
214
|
+
} & {
|
|
215
|
+
readonly id?: undefined;
|
|
216
|
+
} & {
|
|
217
|
+
readonly unique?: undefined;
|
|
218
|
+
}>;
|
|
219
|
+
updated_at: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
220
|
+
readonly kind: "scalar";
|
|
221
|
+
readonly descriptor?: {
|
|
222
|
+
readonly codecId: "pg/timestamptz@1";
|
|
223
|
+
readonly nativeType: "timestamptz";
|
|
224
|
+
} | undefined;
|
|
225
|
+
readonly typeRef?: undefined;
|
|
226
|
+
readonly nullable: false;
|
|
227
|
+
readonly columnName?: undefined;
|
|
228
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
229
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
230
|
+
readonly many?: undefined;
|
|
231
|
+
} & {
|
|
232
|
+
readonly id?: undefined;
|
|
233
|
+
} & {
|
|
234
|
+
readonly unique?: undefined;
|
|
235
|
+
}>;
|
|
236
|
+
}, Record<never, never>, undefined, undefined, Record<never, never>, "supabase">;
|
|
237
|
+
declare const StorageObject: import("@prisma/orm-family-sql/contract-ts/contract-builder").ContractModelBuilder<"StorageObject", {
|
|
238
|
+
id: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
239
|
+
readonly kind: "scalar";
|
|
240
|
+
readonly descriptor?: {
|
|
241
|
+
readonly codecId: "pg/text@1";
|
|
242
|
+
readonly nativeType: "text";
|
|
243
|
+
} | undefined;
|
|
244
|
+
readonly typeRef?: undefined;
|
|
245
|
+
readonly nullable: false;
|
|
246
|
+
readonly columnName?: undefined;
|
|
247
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
248
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
249
|
+
readonly many?: undefined;
|
|
250
|
+
} & {
|
|
251
|
+
readonly id: {
|
|
252
|
+
readonly name?: string | undefined;
|
|
253
|
+
};
|
|
254
|
+
} & {
|
|
255
|
+
readonly unique?: undefined;
|
|
256
|
+
}>;
|
|
257
|
+
bucket_id: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
258
|
+
readonly kind: "scalar";
|
|
259
|
+
readonly descriptor?: {
|
|
260
|
+
readonly codecId: "pg/text@1";
|
|
261
|
+
readonly nativeType: "text";
|
|
262
|
+
} | undefined;
|
|
263
|
+
readonly typeRef?: undefined;
|
|
264
|
+
readonly nullable: false;
|
|
265
|
+
readonly columnName?: undefined;
|
|
266
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
267
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
268
|
+
readonly many?: undefined;
|
|
269
|
+
} & {
|
|
270
|
+
readonly id?: undefined;
|
|
271
|
+
} & {
|
|
272
|
+
readonly unique?: undefined;
|
|
273
|
+
}>;
|
|
274
|
+
name: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
275
|
+
readonly kind: "scalar";
|
|
276
|
+
readonly descriptor?: {
|
|
277
|
+
readonly codecId: "pg/text@1";
|
|
278
|
+
readonly nativeType: "text";
|
|
279
|
+
} | undefined;
|
|
280
|
+
readonly typeRef?: undefined;
|
|
281
|
+
readonly nullable: false;
|
|
282
|
+
readonly columnName?: undefined;
|
|
283
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
284
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
285
|
+
readonly many?: undefined;
|
|
286
|
+
} & {
|
|
287
|
+
readonly id?: undefined;
|
|
288
|
+
} & {
|
|
289
|
+
readonly unique?: undefined;
|
|
290
|
+
}>;
|
|
291
|
+
created_at: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
292
|
+
readonly kind: "scalar";
|
|
293
|
+
readonly descriptor?: {
|
|
294
|
+
readonly codecId: "pg/timestamptz@1";
|
|
295
|
+
readonly nativeType: "timestamptz";
|
|
296
|
+
} | undefined;
|
|
297
|
+
readonly typeRef?: undefined;
|
|
298
|
+
readonly nullable: false;
|
|
299
|
+
readonly columnName?: undefined;
|
|
300
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
301
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
302
|
+
readonly many?: undefined;
|
|
303
|
+
} & {
|
|
304
|
+
readonly id?: undefined;
|
|
305
|
+
} & {
|
|
306
|
+
readonly unique?: undefined;
|
|
307
|
+
}>;
|
|
308
|
+
updated_at: import("@prisma/orm-family-sql/contract-ts/contract-builder").ScalarFieldBuilder<{
|
|
309
|
+
readonly kind: "scalar";
|
|
310
|
+
readonly descriptor?: {
|
|
311
|
+
readonly codecId: "pg/timestamptz@1";
|
|
312
|
+
readonly nativeType: "timestamptz";
|
|
313
|
+
} | undefined;
|
|
314
|
+
readonly typeRef?: undefined;
|
|
315
|
+
readonly nullable: false;
|
|
316
|
+
readonly columnName?: undefined;
|
|
317
|
+
readonly default?: import("@prisma/orm-framework/contract/types").ColumnDefault | undefined;
|
|
318
|
+
readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
|
|
319
|
+
readonly many?: undefined;
|
|
320
|
+
} & {
|
|
321
|
+
readonly id?: undefined;
|
|
322
|
+
} & {
|
|
323
|
+
readonly unique?: undefined;
|
|
324
|
+
}>;
|
|
325
|
+
}, Record<never, never>, undefined, undefined, Record<never, never>, "supabase">;
|
|
326
|
+
//#endregion
|
|
327
|
+
export { AuthIdentity, AuthUser, StorageBucket, StorageObject, anon, authenticated };
|
|
328
|
+
//# sourceMappingURL=contract.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.d.mts","names":[],"sources":["../../../../3-extensions/supabase/dist/contract.d.mts"],"mappings":";;;cAEc,+DAA+D;EAC3E,yDAAyD;aAC9C;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;eACE;;;aAGF;;EAEX,4DAA4D;aACjD;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;;aAEA;;GAEV,4CAA4C;cACjC,mEAAmE;EAC/E,yDAAyD;aAC9C;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;eACE;;;aAGF;;EAEX,8DAA8D;aACnD;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,+DAA+D;aACpD;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;;aAEA;;GAEV,4CAA4C;cACjC,oEAAoE;EAChF,yDAAyD;aAC9C;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;eACE;;;aAGF;;EAEX,2DAA2D;aAChD;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;;aAEA;;GAEV,4CAA4C;cACjC,oEAAoE;EAChF,yDAAyD;aAC9C;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;eACE;;;aAGF;;EAEX,gEAAgE;aACrD;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,2DAA2D;aAChD;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;aACA;aACA;aACA,6CAA6C;aAC7C,uDAAuD;aACvD;;aAEA;;aAEA;;GAEV,4CAA4C"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { i as authenticated, r as anon } from "./roles-D5vC3rNp-tYQlvifU.mjs";
|
|
2
|
+
import { extensionModel, field } from "@prisma/orm-family-sql/contract-ts/contract-builder";
|
|
3
|
+
//#region ../../../3-extensions/supabase/dist/contract.mjs
|
|
4
|
+
/**
|
|
5
|
+
* Branded model handles for the Supabase contract space.
|
|
6
|
+
*
|
|
7
|
+
* Each handle is built via `extensionModel` branded `spaceId: 'supabase'` with
|
|
8
|
+
* its real domain model name, namespace, table name, and columns — so
|
|
9
|
+
* `AuthUser.refs.id` is a cross-space `TargetFieldRef` carrying
|
|
10
|
+
* `spaceId:'supabase'`, `namespaceId:'auth'`, `tableName:'users'`.
|
|
11
|
+
*
|
|
12
|
+
* Columns mirror the shipped contract (`src/contract/contract.json`); the
|
|
13
|
+
* handle↔contract consistency test (`test/contract-handles.test.ts`) asserts
|
|
14
|
+
* they agree so any drift is caught at test time.
|
|
15
|
+
*/
|
|
16
|
+
const pgText = {
|
|
17
|
+
codecId: "pg/text@1",
|
|
18
|
+
nativeType: "text"
|
|
19
|
+
};
|
|
20
|
+
const pgTimestamptz = {
|
|
21
|
+
codecId: "pg/timestamptz@1",
|
|
22
|
+
nativeType: "timestamptz"
|
|
23
|
+
};
|
|
24
|
+
const AuthUser = extensionModel("AuthUser", {
|
|
25
|
+
namespace: "auth",
|
|
26
|
+
fields: {
|
|
27
|
+
id: field.column(pgText).id(),
|
|
28
|
+
email: field.column(pgText),
|
|
29
|
+
created_at: field.column(pgTimestamptz),
|
|
30
|
+
updated_at: field.column(pgTimestamptz)
|
|
31
|
+
},
|
|
32
|
+
table: "users"
|
|
33
|
+
}, "supabase");
|
|
34
|
+
const AuthIdentity = extensionModel("AuthIdentity", {
|
|
35
|
+
namespace: "auth",
|
|
36
|
+
fields: {
|
|
37
|
+
id: field.column(pgText).id(),
|
|
38
|
+
user_id: field.column(pgText),
|
|
39
|
+
provider: field.column(pgText),
|
|
40
|
+
created_at: field.column(pgTimestamptz),
|
|
41
|
+
updated_at: field.column(pgTimestamptz)
|
|
42
|
+
},
|
|
43
|
+
table: "identities"
|
|
44
|
+
}, "supabase");
|
|
45
|
+
const StorageBucket = extensionModel("StorageBucket", {
|
|
46
|
+
namespace: "storage",
|
|
47
|
+
fields: {
|
|
48
|
+
id: field.column(pgText).id(),
|
|
49
|
+
name: field.column(pgText),
|
|
50
|
+
created_at: field.column(pgTimestamptz),
|
|
51
|
+
updated_at: field.column(pgTimestamptz)
|
|
52
|
+
},
|
|
53
|
+
table: "buckets"
|
|
54
|
+
}, "supabase");
|
|
55
|
+
const StorageObject = extensionModel("StorageObject", {
|
|
56
|
+
namespace: "storage",
|
|
57
|
+
fields: {
|
|
58
|
+
id: field.column(pgText).id(),
|
|
59
|
+
bucket_id: field.column(pgText),
|
|
60
|
+
name: field.column(pgText),
|
|
61
|
+
created_at: field.column(pgTimestamptz),
|
|
62
|
+
updated_at: field.column(pgTimestamptz)
|
|
63
|
+
},
|
|
64
|
+
table: "objects"
|
|
65
|
+
}, "supabase");
|
|
66
|
+
//#endregion
|
|
67
|
+
export { AuthIdentity, AuthUser, StorageBucket, StorageObject, anon, authenticated };
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=contract.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.mjs","names":[],"sources":["../../../../3-extensions/supabase/dist/contract.mjs"],"sourcesContent":["import { i as authenticated, r as anon } from \"./roles-D5vC3rNp.mjs\";\nimport { extensionModel, field } from \"@internal/sql-contract-ts/contract-builder\";\n//#region src/contract/handles.ts\n/**\n* Branded model handles for the Supabase contract space.\n*\n* Each handle is built via `extensionModel` branded `spaceId: 'supabase'` with\n* its real domain model name, namespace, table name, and columns — so\n* `AuthUser.refs.id` is a cross-space `TargetFieldRef` carrying\n* `spaceId:'supabase'`, `namespaceId:'auth'`, `tableName:'users'`.\n*\n* Columns mirror the shipped contract (`src/contract/contract.json`); the\n* handle↔contract consistency test (`test/contract-handles.test.ts`) asserts\n* they agree so any drift is caught at test time.\n*/\nconst pgText = {\n\tcodecId: \"pg/text@1\",\n\tnativeType: \"text\"\n};\nconst pgTimestamptz = {\n\tcodecId: \"pg/timestamptz@1\",\n\tnativeType: \"timestamptz\"\n};\nconst AuthUser = extensionModel(\"AuthUser\", {\n\tnamespace: \"auth\",\n\tfields: {\n\t\tid: field.column(pgText).id(),\n\t\temail: field.column(pgText),\n\t\tcreated_at: field.column(pgTimestamptz),\n\t\tupdated_at: field.column(pgTimestamptz)\n\t},\n\ttable: \"users\"\n}, \"supabase\");\nconst AuthIdentity = extensionModel(\"AuthIdentity\", {\n\tnamespace: \"auth\",\n\tfields: {\n\t\tid: field.column(pgText).id(),\n\t\tuser_id: field.column(pgText),\n\t\tprovider: field.column(pgText),\n\t\tcreated_at: field.column(pgTimestamptz),\n\t\tupdated_at: field.column(pgTimestamptz)\n\t},\n\ttable: \"identities\"\n}, \"supabase\");\nconst StorageBucket = extensionModel(\"StorageBucket\", {\n\tnamespace: \"storage\",\n\tfields: {\n\t\tid: field.column(pgText).id(),\n\t\tname: field.column(pgText),\n\t\tcreated_at: field.column(pgTimestamptz),\n\t\tupdated_at: field.column(pgTimestamptz)\n\t},\n\ttable: \"buckets\"\n}, \"supabase\");\nconst StorageObject = extensionModel(\"StorageObject\", {\n\tnamespace: \"storage\",\n\tfields: {\n\t\tid: field.column(pgText).id(),\n\t\tbucket_id: field.column(pgText),\n\t\tname: field.column(pgText),\n\t\tcreated_at: field.column(pgTimestamptz),\n\t\tupdated_at: field.column(pgTimestamptz)\n\t},\n\ttable: \"objects\"\n}, \"supabase\");\n//#endregion\nexport { AuthIdentity, AuthUser, StorageBucket, StorageObject, anon, authenticated };\n\n//# sourceMappingURL=contract.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAM,SAAS;CACd,SAAS;CACT,YAAY;AACb;AACA,MAAM,gBAAgB;CACrB,SAAS;CACT,YAAY;AACb;AACA,MAAM,WAAW,eAAe,YAAY;CAC3C,WAAW;CACX,QAAQ;EACP,IAAI,MAAM,OAAO,MAAM,CAAC,CAAC,GAAG;EAC5B,OAAO,MAAM,OAAO,MAAM;EAC1B,YAAY,MAAM,OAAO,aAAa;EACtC,YAAY,MAAM,OAAO,aAAa;CACvC;CACA,OAAO;AACR,GAAG,UAAU;AACb,MAAM,eAAe,eAAe,gBAAgB;CACnD,WAAW;CACX,QAAQ;EACP,IAAI,MAAM,OAAO,MAAM,CAAC,CAAC,GAAG;EAC5B,SAAS,MAAM,OAAO,MAAM;EAC5B,UAAU,MAAM,OAAO,MAAM;EAC7B,YAAY,MAAM,OAAO,aAAa;EACtC,YAAY,MAAM,OAAO,aAAa;CACvC;CACA,OAAO;AACR,GAAG,UAAU;AACb,MAAM,gBAAgB,eAAe,iBAAiB;CACrD,WAAW;CACX,QAAQ;EACP,IAAI,MAAM,OAAO,MAAM,CAAC,CAAC,GAAG;EAC5B,MAAM,MAAM,OAAO,MAAM;EACzB,YAAY,MAAM,OAAO,aAAa;EACtC,YAAY,MAAM,OAAO,aAAa;CACvC;CACA,OAAO;AACR,GAAG,UAAU;AACb,MAAM,gBAAgB,eAAe,iBAAiB;CACrD,WAAW;CACX,QAAQ;EACP,IAAI,MAAM,OAAO,MAAM,CAAC,CAAC,GAAG;EAC5B,WAAW,MAAM,OAAO,MAAM;EAC9B,MAAM,MAAM,OAAO,MAAM;EACzB,YAAY,MAAM,OAAO,aAAa;EACtC,YAAY,MAAM,OAAO,aAAa;CACvC;CACA,OAAO;AACR,GAAG,UAAU"}
|
package/dist/pack.d.mts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SqlControlExtensionDescriptor } from "@prisma/orm-family-sql/family/control";
|
|
2
|
+
//#region ../../../3-extensions/supabase/dist/pack.d.mts
|
|
3
|
+
//#region src/pack/index.d.ts
|
|
4
|
+
declare const supabasePack: SqlControlExtensionDescriptor<'postgres'>;
|
|
5
|
+
/**
|
|
6
|
+
* Returns a pack using `contractOverride` in place of the shipped
|
|
7
|
+
* `contract.json` when provided, otherwise returns the default pack.
|
|
8
|
+
*
|
|
9
|
+
* Intended for tests that need to drive the framework with a synthetic
|
|
10
|
+
* contract while still exercising the full descriptor wiring.
|
|
11
|
+
*/
|
|
12
|
+
declare function supabasePackWith(options?: {
|
|
13
|
+
contractOverride?: unknown;
|
|
14
|
+
}): SqlControlExtensionDescriptor<'postgres'>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { supabasePack as default, supabasePackWith };
|
|
17
|
+
//# sourceMappingURL=pack.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack.d.mts","names":[],"sources":["../../../../3-extensions/supabase/dist/pack.d.mts"],"mappings":";;;cAEc,cAAc;;;;;;;;iBAQX,iBAAiB;EAChC;IACE"}
|
package/dist/pack.mjs
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { n as version, t as contract_default } from "./contract-Dgg9c1xN-oZ0VY2hP.mjs";
|
|
2
|
+
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
3
|
+
//#region ../../../3-extensions/supabase/dist/pack.mjs
|
|
4
|
+
const SUPABASE_SPACE_ID = "supabase";
|
|
5
|
+
function buildContractSpace(contractOverride) {
|
|
6
|
+
const contract = blindCast(contractOverride ?? contract_default);
|
|
7
|
+
return {
|
|
8
|
+
contractJson: contract,
|
|
9
|
+
migrations: [],
|
|
10
|
+
headRef: {
|
|
11
|
+
hash: contract.storage.storageHash,
|
|
12
|
+
invariants: []
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const supabasePackBase = {
|
|
17
|
+
kind: "extension",
|
|
18
|
+
id: SUPABASE_SPACE_ID,
|
|
19
|
+
familyId: "sql",
|
|
20
|
+
targetId: "postgres",
|
|
21
|
+
version,
|
|
22
|
+
contractSpace: buildContractSpace(),
|
|
23
|
+
create: () => ({
|
|
24
|
+
familyId: "sql",
|
|
25
|
+
targetId: "postgres"
|
|
26
|
+
})
|
|
27
|
+
};
|
|
28
|
+
const supabasePack = supabasePackBase;
|
|
29
|
+
/**
|
|
30
|
+
* Returns a pack using `contractOverride` in place of the shipped
|
|
31
|
+
* `contract.json` when provided, otherwise returns the default pack.
|
|
32
|
+
*
|
|
33
|
+
* Intended for tests that need to drive the framework with a synthetic
|
|
34
|
+
* contract while still exercising the full descriptor wiring.
|
|
35
|
+
*/
|
|
36
|
+
function supabasePackWith(options) {
|
|
37
|
+
if (options?.contractOverride === void 0) return supabasePack;
|
|
38
|
+
return {
|
|
39
|
+
...supabasePackBase,
|
|
40
|
+
contractSpace: buildContractSpace(options.contractOverride)
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { supabasePack as default, supabasePackWith };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=pack.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack.mjs","names":[],"sources":["../../../../3-extensions/supabase/dist/pack.mjs"],"sourcesContent":["import { n as version, t as contract_default } from \"./contract-Dgg9c1xN.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/pack/index.ts\nconst SUPABASE_SPACE_ID = \"supabase\";\nfunction buildContractSpace(contractOverride) {\n\tconst contract = blindCast(contractOverride ?? contract_default);\n\treturn {\n\t\tcontractJson: contract,\n\t\tmigrations: [],\n\t\theadRef: {\n\t\t\thash: contract.storage.storageHash,\n\t\t\tinvariants: []\n\t\t}\n\t};\n}\nconst supabasePackBase = {\n\tkind: \"extension\",\n\tid: SUPABASE_SPACE_ID,\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tversion,\n\tcontractSpace: buildContractSpace(),\n\tcreate: () => ({\n\t\tfamilyId: \"sql\",\n\t\ttargetId: \"postgres\"\n\t})\n};\nconst supabasePack = supabasePackBase;\n/**\n* Returns a pack using `contractOverride` in place of the shipped\n* `contract.json` when provided, otherwise returns the default pack.\n*\n* Intended for tests that need to drive the framework with a synthetic\n* contract while still exercising the full descriptor wiring.\n*/\nfunction supabasePackWith(options) {\n\tif (options?.contractOverride === void 0) return supabasePack;\n\treturn {\n\t\t...supabasePackBase,\n\t\tcontractSpace: buildContractSpace(options.contractOverride)\n\t};\n}\n//#endregion\nexport { supabasePack as default, supabasePackWith };\n\n//# sourceMappingURL=pack.mjs.map"],"mappings":";;;AAGA,MAAM,oBAAoB;AAC1B,SAAS,mBAAmB,kBAAkB;CAC7C,MAAM,WAAW,UAAU,oBAAoB,gBAAgB;CAC/D,OAAO;EACN,cAAc;EACd,YAAY,CAAC;EACb,SAAS;GACR,MAAM,SAAS,QAAQ;GACvB,YAAY,CAAC;EACd;CACD;AACD;AACA,MAAM,mBAAmB;CACxB,MAAM;CACN,IAAI;CACJ,UAAU;CACV,UAAU;CACV;CACA,eAAe,mBAAmB;CAClC,eAAe;EACd,UAAU;EACV,UAAU;CACX;AACD;AACA,MAAM,eAAe;;;;;;;;AAQrB,SAAS,iBAAiB,SAAS;CAClC,IAAI,SAAS,qBAAqB,KAAK,GAAG,OAAO;CACjD,OAAO;EACN,GAAG;EACH,eAAe,mBAAmB,QAAQ,gBAAgB;CAC3D;AACD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region ../../../3-extensions/supabase/dist/roles-CuXa3u9g.d.mts
|
|
2
|
+
//#region src/contract/roles.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Supabase's three standard Postgres roles as a Prisma Next enum — the
|
|
5
|
+
* single source of truth for the role vocabulary. Runtime-only: the shipped
|
|
6
|
+
* contract declares the roles via PSL `role` blocks inside an explicit
|
|
7
|
+
* `namespace unbound { }` block, not through this handle. The runtime
|
|
8
|
+
* (`supabase-runtime.ts`, `supabase.ts`) derives its role type from
|
|
9
|
+
* `SupabaseRole.values` and reads member values through `SupabaseRole.members`
|
|
10
|
+
* instead of raw string literals.
|
|
11
|
+
*/
|
|
12
|
+
declare const SupabaseRole: import("@prisma/orm-framework/contract-authoring").EnumTypeHandle<"SupabaseRole", readonly ["anon", "authenticated", "service_role"], readonly ["Anon", "Authenticated", "ServiceRole"], {
|
|
13
|
+
readonly Anon: "anon";
|
|
14
|
+
readonly Authenticated: "authenticated";
|
|
15
|
+
readonly ServiceRole: "service_role";
|
|
16
|
+
}>;
|
|
17
|
+
type SupabaseRole = (typeof SupabaseRole)['values'][number];
|
|
18
|
+
/**
|
|
19
|
+
* Supabase's runtime request roles as `role()` reference handles, for use in
|
|
20
|
+
* a policy's `roles:` list (e.g. `policySelect(Profile, { roles: [anon], … })`).
|
|
21
|
+
* These reference the same role identities `SupabaseRole` declares — Supabase
|
|
22
|
+
* provisions them on every project; referencing one lowers to its bare name,
|
|
23
|
+
* matching PSL's bare-identifier pass-through.
|
|
24
|
+
*/
|
|
25
|
+
declare const anon: import("@prisma/orm-postgres/contract-builder").RlsRoleHandle<"anon">;
|
|
26
|
+
declare const authenticated: import("@prisma/orm-postgres/contract-builder").RlsRoleHandle<"authenticated">;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { anon as n, authenticated as r, SupabaseRole as t };
|
|
29
|
+
//# sourceMappingURL=roles-CuXa3u9g-bhk28dKK.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roles-CuXa3u9g-bhk28dKK.d.mts","names":[],"sources":["../../../../3-extensions/supabase/dist/roles-CuXa3u9g.d.mts"],"mappings":";;;;;;;;;;;cAUc,qDAAqD;WACxD;WACA;WACA;;KAEN,uBAAuB;;;;;;;;cAQd,oDAAoD;cACpD,6DAA6D"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { role } from "@prisma/orm-postgres/contract-builder";
|
|
2
|
+
import { enumType, member } from "@prisma/orm-family-sql/contract-ts/contract-builder";
|
|
3
|
+
//#region ../../../3-extensions/supabase/dist/roles-D5vC3rNp.mjs
|
|
4
|
+
/**
|
|
5
|
+
* Supabase's three standard Postgres roles as a Prisma Next enum — the
|
|
6
|
+
* single source of truth for the role vocabulary. Runtime-only: the shipped
|
|
7
|
+
* contract declares the roles via PSL `role` blocks inside an explicit
|
|
8
|
+
* `namespace unbound { }` block, not through this handle. The runtime
|
|
9
|
+
* (`supabase-runtime.ts`, `supabase.ts`) derives its role type from
|
|
10
|
+
* `SupabaseRole.values` and reads member values through `SupabaseRole.members`
|
|
11
|
+
* instead of raw string literals.
|
|
12
|
+
*/
|
|
13
|
+
const SupabaseRole = enumType("SupabaseRole", {
|
|
14
|
+
codecId: "pg/text@1",
|
|
15
|
+
nativeType: "text"
|
|
16
|
+
}, member("Anon", "anon"), member("Authenticated", "authenticated"), member("ServiceRole", "service_role"));
|
|
17
|
+
/** The JWT claim key Supabase stores the Postgres role under. */
|
|
18
|
+
const SUPABASE_JWT_ROLE_CLAIM = "role";
|
|
19
|
+
function isSupabaseRole(value) {
|
|
20
|
+
return SupabaseRole.values.some((role) => role === value);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Supabase's runtime request roles as `role()` reference handles, for use in
|
|
24
|
+
* a policy's `roles:` list (e.g. `policySelect(Profile, { roles: [anon], … })`).
|
|
25
|
+
* These reference the same role identities `SupabaseRole` declares — Supabase
|
|
26
|
+
* provisions them on every project; referencing one lowers to its bare name,
|
|
27
|
+
* matching PSL's bare-identifier pass-through.
|
|
28
|
+
*/
|
|
29
|
+
const anon = role("anon");
|
|
30
|
+
const authenticated = role("authenticated");
|
|
31
|
+
//#endregion
|
|
32
|
+
export { isSupabaseRole as a, authenticated as i, SupabaseRole as n, anon as r, SUPABASE_JWT_ROLE_CLAIM as t };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=roles-D5vC3rNp-tYQlvifU.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roles-D5vC3rNp-tYQlvifU.mjs","names":[],"sources":["../../../../3-extensions/supabase/dist/roles-D5vC3rNp.mjs"],"sourcesContent":["import { role } from \"@internal/postgres/contract-builder\";\nimport { enumType, member } from \"@internal/sql-contract-ts/contract-builder\";\n//#region src/contract/roles.ts\n/**\n* Supabase's three standard Postgres roles as a Prisma Next enum — the\n* single source of truth for the role vocabulary. Runtime-only: the shipped\n* contract declares the roles via PSL `role` blocks inside an explicit\n* `namespace unbound { }` block, not through this handle. The runtime\n* (`supabase-runtime.ts`, `supabase.ts`) derives its role type from\n* `SupabaseRole.values` and reads member values through `SupabaseRole.members`\n* instead of raw string literals.\n*/\nconst SupabaseRole = enumType(\"SupabaseRole\", {\n\tcodecId: \"pg/text@1\",\n\tnativeType: \"text\"\n}, member(\"Anon\", \"anon\"), member(\"Authenticated\", \"authenticated\"), member(\"ServiceRole\", \"service_role\"));\n/** The JWT claim key Supabase stores the Postgres role under. */\nconst SUPABASE_JWT_ROLE_CLAIM = \"role\";\nfunction isSupabaseRole(value) {\n\treturn SupabaseRole.values.some((role) => role === value);\n}\n/**\n* Supabase's runtime request roles as `role()` reference handles, for use in\n* a policy's `roles:` list (e.g. `policySelect(Profile, { roles: [anon], … })`).\n* These reference the same role identities `SupabaseRole` declares — Supabase\n* provisions them on every project; referencing one lowers to its bare name,\n* matching PSL's bare-identifier pass-through.\n*/\nconst anon = role(\"anon\");\nconst authenticated = role(\"authenticated\");\n//#endregion\nexport { isSupabaseRole as a, authenticated as i, SupabaseRole as n, anon as r, SUPABASE_JWT_ROLE_CLAIM as t };\n\n//# sourceMappingURL=roles-D5vC3rNp.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,eAAe,SAAS,gBAAgB;CAC7C,SAAS;CACT,YAAY;AACb,GAAG,OAAO,QAAQ,MAAM,GAAG,OAAO,iBAAiB,eAAe,GAAG,OAAO,eAAe,cAAc,CAAC;;AAE1G,MAAM,0BAA0B;AAChC,SAAS,eAAe,OAAO;CAC9B,OAAO,aAAa,OAAO,MAAM,SAAS,SAAS,KAAK;AACzD;;;;;;;;AAQA,MAAM,OAAO,KAAK,MAAM;AACxB,MAAM,gBAAgB,KAAK,eAAe"}
|