@nextblock-cms/db 0.0.1 → 0.0.3
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/index.cjs.js +1 -12
- package/index.es.js +42 -1587
- package/package.json +15 -2
- package/server.cjs.js +1 -2
- package/server.es.js +33 -1138
- package/index.js +0 -83
- package/index.mjs +0 -11169
- package/invariant-error-BhRJVCqp.js +0 -57
- package/invariant-error-Df4RSFOM.mjs +0 -8905
- package/libs/db/src/index.d.ts +0 -4
- package/libs/db/src/lib/supabase/client.d.ts +0 -9
- package/libs/db/src/lib/supabase/middleware.d.ts +0 -2
- package/libs/db/src/lib/supabase/server.d.ts +0 -7
- package/libs/db/src/lib/supabase/ssg-client.d.ts +0 -2
- package/libs/db/src/lib/supabase/types.d.ts +0 -505
- package/libs/db/src/server.d.ts +0 -9
package/libs/db/src/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SupabaseClient } from '@supabase/supabase-js';
|
|
2
|
-
import { Database } from './types';
|
|
3
|
-
type Profile = Database['public']['Tables']['profiles']['Row'];
|
|
4
|
-
type Language = Database['public']['Tables']['languages']['Row'];
|
|
5
|
-
export declare const createClient: () => SupabaseClient<any, "public", any>;
|
|
6
|
-
export declare function getProfileWithRoleClientSide(supabase: SupabaseClient, // Accept the client instance
|
|
7
|
-
userId: string): Promise<Profile | null>;
|
|
8
|
-
export declare function getActiveLanguagesClientSide(): Promise<Language[]>;
|
|
9
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Database } from './types';
|
|
2
|
-
type Profile = Database['public']['Tables']['profiles']['Row'];
|
|
3
|
-
type Language = Database['public']['Tables']['languages']['Row'];
|
|
4
|
-
export declare const createClient: () => import('@supabase/supabase-js').SupabaseClient<any, "public", any>;
|
|
5
|
-
export declare function getProfileWithRoleServerSide(userId: string): Promise<Profile | null>;
|
|
6
|
-
export declare function getActiveLanguagesServerSide(): Promise<Language[]>;
|
|
7
|
-
export {};
|
|
@@ -1,505 +0,0 @@
|
|
|
1
|
-
export type Json = string | number | boolean | null | {
|
|
2
|
-
[key: string]: Json | undefined;
|
|
3
|
-
} | Json[];
|
|
4
|
-
export type Database = {
|
|
5
|
-
public: {
|
|
6
|
-
Tables: {
|
|
7
|
-
blocks: {
|
|
8
|
-
Row: {
|
|
9
|
-
block_type: string;
|
|
10
|
-
content: Json | null;
|
|
11
|
-
created_at: string;
|
|
12
|
-
id: number;
|
|
13
|
-
language_id: number;
|
|
14
|
-
order: number;
|
|
15
|
-
page_id: number | null;
|
|
16
|
-
post_id: number | null;
|
|
17
|
-
updated_at: string;
|
|
18
|
-
};
|
|
19
|
-
Insert: {
|
|
20
|
-
block_type: string;
|
|
21
|
-
content?: Json | null;
|
|
22
|
-
created_at?: string;
|
|
23
|
-
id?: number;
|
|
24
|
-
language_id: number;
|
|
25
|
-
order?: number;
|
|
26
|
-
page_id?: number | null;
|
|
27
|
-
post_id?: number | null;
|
|
28
|
-
updated_at?: string;
|
|
29
|
-
};
|
|
30
|
-
Update: {
|
|
31
|
-
block_type?: string;
|
|
32
|
-
content?: Json | null;
|
|
33
|
-
created_at?: string;
|
|
34
|
-
id?: number;
|
|
35
|
-
language_id?: number;
|
|
36
|
-
order?: number;
|
|
37
|
-
page_id?: number | null;
|
|
38
|
-
post_id?: number | null;
|
|
39
|
-
updated_at?: string;
|
|
40
|
-
};
|
|
41
|
-
Relationships: [
|
|
42
|
-
{
|
|
43
|
-
foreignKeyName: "blocks_language_id_fkey";
|
|
44
|
-
columns: ["language_id"];
|
|
45
|
-
isOneToOne: false;
|
|
46
|
-
referencedRelation: "languages";
|
|
47
|
-
referencedColumns: ["id"];
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
foreignKeyName: "blocks_page_id_fkey";
|
|
51
|
-
columns: ["page_id"];
|
|
52
|
-
isOneToOne: false;
|
|
53
|
-
referencedRelation: "pages";
|
|
54
|
-
referencedColumns: ["id"];
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
foreignKeyName: "blocks_post_id_fkey";
|
|
58
|
-
columns: ["post_id"];
|
|
59
|
-
isOneToOne: false;
|
|
60
|
-
referencedRelation: "posts";
|
|
61
|
-
referencedColumns: ["id"];
|
|
62
|
-
}
|
|
63
|
-
];
|
|
64
|
-
};
|
|
65
|
-
languages: {
|
|
66
|
-
Row: {
|
|
67
|
-
code: string;
|
|
68
|
-
created_at: string;
|
|
69
|
-
id: number;
|
|
70
|
-
is_default: boolean;
|
|
71
|
-
is_active: boolean;
|
|
72
|
-
name: string;
|
|
73
|
-
updated_at: string;
|
|
74
|
-
};
|
|
75
|
-
Insert: {
|
|
76
|
-
code: string;
|
|
77
|
-
created_at?: string;
|
|
78
|
-
id?: number;
|
|
79
|
-
is_default?: boolean;
|
|
80
|
-
is_active?: boolean;
|
|
81
|
-
name: string;
|
|
82
|
-
updated_at?: string;
|
|
83
|
-
};
|
|
84
|
-
Update: {
|
|
85
|
-
code?: string;
|
|
86
|
-
created_at?: string;
|
|
87
|
-
id?: number;
|
|
88
|
-
is_default?: boolean;
|
|
89
|
-
is_active?: boolean;
|
|
90
|
-
name?: string;
|
|
91
|
-
updated_at?: string;
|
|
92
|
-
};
|
|
93
|
-
Relationships: [];
|
|
94
|
-
};
|
|
95
|
-
logos: {
|
|
96
|
-
Row: {
|
|
97
|
-
created_at: string;
|
|
98
|
-
id: string;
|
|
99
|
-
media_id: string | null;
|
|
100
|
-
name: string;
|
|
101
|
-
};
|
|
102
|
-
Insert: {
|
|
103
|
-
created_at?: string;
|
|
104
|
-
id?: string;
|
|
105
|
-
media_id?: string | null;
|
|
106
|
-
name: string;
|
|
107
|
-
};
|
|
108
|
-
Update: {
|
|
109
|
-
created_at?: string;
|
|
110
|
-
id?: string;
|
|
111
|
-
media_id?: string | null;
|
|
112
|
-
name?: string;
|
|
113
|
-
};
|
|
114
|
-
Relationships: [
|
|
115
|
-
{
|
|
116
|
-
foreignKeyName: "logos_media_id_fkey";
|
|
117
|
-
columns: ["media_id"];
|
|
118
|
-
isOneToOne: false;
|
|
119
|
-
referencedRelation: "media";
|
|
120
|
-
referencedColumns: ["id"];
|
|
121
|
-
}
|
|
122
|
-
];
|
|
123
|
-
};
|
|
124
|
-
media: {
|
|
125
|
-
Row: {
|
|
126
|
-
blur_data_url: string | null;
|
|
127
|
-
created_at: string;
|
|
128
|
-
description: string | null;
|
|
129
|
-
file_name: string;
|
|
130
|
-
file_path: string | null;
|
|
131
|
-
file_type: string | null;
|
|
132
|
-
height: number | null;
|
|
133
|
-
id: string;
|
|
134
|
-
object_key: string;
|
|
135
|
-
size_bytes: number | null;
|
|
136
|
-
updated_at: string;
|
|
137
|
-
uploader_id: string | null;
|
|
138
|
-
variants: Json | null;
|
|
139
|
-
width: number | null;
|
|
140
|
-
};
|
|
141
|
-
Insert: {
|
|
142
|
-
blur_data_url?: string | null;
|
|
143
|
-
created_at?: string;
|
|
144
|
-
description?: string | null;
|
|
145
|
-
file_name: string;
|
|
146
|
-
file_path?: string | null;
|
|
147
|
-
file_type?: string | null;
|
|
148
|
-
height?: number | null;
|
|
149
|
-
id?: string;
|
|
150
|
-
object_key: string;
|
|
151
|
-
size_bytes?: number | null;
|
|
152
|
-
updated_at?: string;
|
|
153
|
-
uploader_id?: string | null;
|
|
154
|
-
variants?: Json | null;
|
|
155
|
-
width?: number | null;
|
|
156
|
-
};
|
|
157
|
-
Update: {
|
|
158
|
-
blur_data_url?: string | null;
|
|
159
|
-
created_at?: string;
|
|
160
|
-
description?: string | null;
|
|
161
|
-
file_name?: string;
|
|
162
|
-
file_path?: string | null;
|
|
163
|
-
file_type?: string | null;
|
|
164
|
-
height?: number | null;
|
|
165
|
-
id?: string;
|
|
166
|
-
object_key?: string;
|
|
167
|
-
size_bytes?: number | null;
|
|
168
|
-
updated_at?: string;
|
|
169
|
-
uploader_id?: string | null;
|
|
170
|
-
variants?: Json | null;
|
|
171
|
-
width?: number | null;
|
|
172
|
-
};
|
|
173
|
-
Relationships: [
|
|
174
|
-
{
|
|
175
|
-
foreignKeyName: "media_uploader_id_fkey";
|
|
176
|
-
columns: ["uploader_id"];
|
|
177
|
-
isOneToOne: false;
|
|
178
|
-
referencedRelation: "profiles";
|
|
179
|
-
referencedColumns: ["id"];
|
|
180
|
-
}
|
|
181
|
-
];
|
|
182
|
-
};
|
|
183
|
-
navigation_items: {
|
|
184
|
-
Row: {
|
|
185
|
-
created_at: string;
|
|
186
|
-
id: number;
|
|
187
|
-
label: string;
|
|
188
|
-
language_id: number;
|
|
189
|
-
menu_key: Database["public"]["Enums"]["menu_location"];
|
|
190
|
-
order: number;
|
|
191
|
-
page_id: number | null;
|
|
192
|
-
parent_id: number | null;
|
|
193
|
-
translation_group_id: string;
|
|
194
|
-
updated_at: string;
|
|
195
|
-
url: string;
|
|
196
|
-
};
|
|
197
|
-
Insert: {
|
|
198
|
-
created_at?: string;
|
|
199
|
-
id?: number;
|
|
200
|
-
label: string;
|
|
201
|
-
language_id: number;
|
|
202
|
-
menu_key: Database["public"]["Enums"]["menu_location"];
|
|
203
|
-
order?: number;
|
|
204
|
-
page_id?: number | null;
|
|
205
|
-
parent_id?: number | null;
|
|
206
|
-
translation_group_id?: string;
|
|
207
|
-
updated_at?: string;
|
|
208
|
-
url: string;
|
|
209
|
-
};
|
|
210
|
-
Update: {
|
|
211
|
-
created_at?: string;
|
|
212
|
-
id?: number;
|
|
213
|
-
label?: string;
|
|
214
|
-
language_id?: number;
|
|
215
|
-
menu_key?: Database["public"]["Enums"]["menu_location"];
|
|
216
|
-
order?: number;
|
|
217
|
-
page_id?: number | null;
|
|
218
|
-
parent_id?: number | null;
|
|
219
|
-
translation_group_id?: string;
|
|
220
|
-
updated_at?: string;
|
|
221
|
-
url?: string;
|
|
222
|
-
};
|
|
223
|
-
Relationships: [
|
|
224
|
-
{
|
|
225
|
-
foreignKeyName: "navigation_items_language_id_fkey";
|
|
226
|
-
columns: ["language_id"];
|
|
227
|
-
isOneToOne: false;
|
|
228
|
-
referencedRelation: "languages";
|
|
229
|
-
referencedColumns: ["id"];
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
foreignKeyName: "navigation_items_page_id_fkey";
|
|
233
|
-
columns: ["page_id"];
|
|
234
|
-
isOneToOne: false;
|
|
235
|
-
referencedRelation: "pages";
|
|
236
|
-
referencedColumns: ["id"];
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
foreignKeyName: "navigation_items_parent_id_fkey";
|
|
240
|
-
columns: ["parent_id"];
|
|
241
|
-
isOneToOne: false;
|
|
242
|
-
referencedRelation: "navigation_items";
|
|
243
|
-
referencedColumns: ["id"];
|
|
244
|
-
}
|
|
245
|
-
];
|
|
246
|
-
};
|
|
247
|
-
pages: {
|
|
248
|
-
Row: {
|
|
249
|
-
author_id: string | null;
|
|
250
|
-
created_at: string;
|
|
251
|
-
id: number;
|
|
252
|
-
language_id: number;
|
|
253
|
-
meta_description: string | null;
|
|
254
|
-
meta_title: string | null;
|
|
255
|
-
slug: string;
|
|
256
|
-
status: Database["public"]["Enums"]["page_status"];
|
|
257
|
-
title: string;
|
|
258
|
-
translation_group_id: string;
|
|
259
|
-
updated_at: string;
|
|
260
|
-
};
|
|
261
|
-
Insert: {
|
|
262
|
-
author_id?: string | null;
|
|
263
|
-
created_at?: string;
|
|
264
|
-
id?: number;
|
|
265
|
-
language_id: number;
|
|
266
|
-
meta_description?: string | null;
|
|
267
|
-
meta_title?: string | null;
|
|
268
|
-
slug: string;
|
|
269
|
-
status?: Database["public"]["Enums"]["page_status"];
|
|
270
|
-
title: string;
|
|
271
|
-
translation_group_id?: string;
|
|
272
|
-
updated_at?: string;
|
|
273
|
-
};
|
|
274
|
-
Update: {
|
|
275
|
-
author_id?: string | null;
|
|
276
|
-
created_at?: string;
|
|
277
|
-
id?: number;
|
|
278
|
-
language_id?: number;
|
|
279
|
-
meta_description?: string | null;
|
|
280
|
-
meta_title?: string | null;
|
|
281
|
-
slug?: string;
|
|
282
|
-
status?: Database["public"]["Enums"]["page_status"];
|
|
283
|
-
title?: string;
|
|
284
|
-
translation_group_id?: string;
|
|
285
|
-
updated_at?: string;
|
|
286
|
-
};
|
|
287
|
-
Relationships: [
|
|
288
|
-
{
|
|
289
|
-
foreignKeyName: "pages_author_id_fkey";
|
|
290
|
-
columns: ["author_id"];
|
|
291
|
-
isOneToOne: false;
|
|
292
|
-
referencedRelation: "profiles";
|
|
293
|
-
referencedColumns: ["id"];
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
foreignKeyName: "pages_language_id_fkey";
|
|
297
|
-
columns: ["language_id"];
|
|
298
|
-
isOneToOne: false;
|
|
299
|
-
referencedRelation: "languages";
|
|
300
|
-
referencedColumns: ["id"];
|
|
301
|
-
}
|
|
302
|
-
];
|
|
303
|
-
};
|
|
304
|
-
posts: {
|
|
305
|
-
Row: {
|
|
306
|
-
author_id: string | null;
|
|
307
|
-
created_at: string;
|
|
308
|
-
excerpt: string | null;
|
|
309
|
-
feature_image_id: string | null;
|
|
310
|
-
id: number;
|
|
311
|
-
language_id: number;
|
|
312
|
-
meta_description: string | null;
|
|
313
|
-
meta_title: string | null;
|
|
314
|
-
published_at: string | null;
|
|
315
|
-
slug: string;
|
|
316
|
-
status: Database["public"]["Enums"]["page_status"];
|
|
317
|
-
title: string;
|
|
318
|
-
translation_group_id: string;
|
|
319
|
-
updated_at: string;
|
|
320
|
-
};
|
|
321
|
-
Insert: {
|
|
322
|
-
author_id?: string | null;
|
|
323
|
-
created_at?: string;
|
|
324
|
-
excerpt?: string | null;
|
|
325
|
-
feature_image_id?: string | null;
|
|
326
|
-
id?: number;
|
|
327
|
-
language_id: number;
|
|
328
|
-
meta_description?: string | null;
|
|
329
|
-
meta_title?: string | null;
|
|
330
|
-
published_at?: string | null;
|
|
331
|
-
slug: string;
|
|
332
|
-
status?: Database["public"]["Enums"]["page_status"];
|
|
333
|
-
title: string;
|
|
334
|
-
translation_group_id?: string;
|
|
335
|
-
updated_at?: string;
|
|
336
|
-
};
|
|
337
|
-
Update: {
|
|
338
|
-
author_id?: string | null;
|
|
339
|
-
created_at?: string;
|
|
340
|
-
excerpt?: string | null;
|
|
341
|
-
feature_image_id?: string | null;
|
|
342
|
-
id?: number;
|
|
343
|
-
language_id?: number;
|
|
344
|
-
meta_description?: string | null;
|
|
345
|
-
meta_title?: string | null;
|
|
346
|
-
published_at?: string | null;
|
|
347
|
-
slug?: string;
|
|
348
|
-
status?: Database["public"]["Enums"]["page_status"];
|
|
349
|
-
title?: string;
|
|
350
|
-
translation_group_id?: string;
|
|
351
|
-
updated_at?: string;
|
|
352
|
-
};
|
|
353
|
-
Relationships: [
|
|
354
|
-
{
|
|
355
|
-
foreignKeyName: "fk_feature_image";
|
|
356
|
-
columns: ["feature_image_id"];
|
|
357
|
-
isOneToOne: false;
|
|
358
|
-
referencedRelation: "media";
|
|
359
|
-
referencedColumns: ["id"];
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
foreignKeyName: "posts_author_id_fkey";
|
|
363
|
-
columns: ["author_id"];
|
|
364
|
-
isOneToOne: false;
|
|
365
|
-
referencedRelation: "profiles";
|
|
366
|
-
referencedColumns: ["id"];
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
foreignKeyName: "posts_language_id_fkey";
|
|
370
|
-
columns: ["language_id"];
|
|
371
|
-
isOneToOne: false;
|
|
372
|
-
referencedRelation: "languages";
|
|
373
|
-
referencedColumns: ["id"];
|
|
374
|
-
}
|
|
375
|
-
];
|
|
376
|
-
};
|
|
377
|
-
profiles: {
|
|
378
|
-
Row: {
|
|
379
|
-
avatar_url: string | null;
|
|
380
|
-
full_name: string | null;
|
|
381
|
-
id: string;
|
|
382
|
-
role: Database["public"]["Enums"]["user_role"];
|
|
383
|
-
updated_at: string | null;
|
|
384
|
-
username: string | null;
|
|
385
|
-
website: string | null;
|
|
386
|
-
};
|
|
387
|
-
Insert: {
|
|
388
|
-
avatar_url?: string | null;
|
|
389
|
-
full_name?: string | null;
|
|
390
|
-
id: string;
|
|
391
|
-
role?: Database["public"]["Enums"]["user_role"];
|
|
392
|
-
updated_at?: string | null;
|
|
393
|
-
username?: string | null;
|
|
394
|
-
website?: string | null;
|
|
395
|
-
};
|
|
396
|
-
Update: {
|
|
397
|
-
avatar_url?: string | null;
|
|
398
|
-
full_name?: string | null;
|
|
399
|
-
id?: string;
|
|
400
|
-
role?: Database["public"]["Enums"]["user_role"];
|
|
401
|
-
updated_at?: string | null;
|
|
402
|
-
username?: string | null;
|
|
403
|
-
website?: string | null;
|
|
404
|
-
};
|
|
405
|
-
Relationships: [];
|
|
406
|
-
};
|
|
407
|
-
site_settings: {
|
|
408
|
-
Row: {
|
|
409
|
-
key: string;
|
|
410
|
-
value: Json | null;
|
|
411
|
-
};
|
|
412
|
-
Insert: {
|
|
413
|
-
key: string;
|
|
414
|
-
value?: Json | null;
|
|
415
|
-
};
|
|
416
|
-
Update: {
|
|
417
|
-
key?: string;
|
|
418
|
-
value?: Json | null;
|
|
419
|
-
};
|
|
420
|
-
Relationships: [];
|
|
421
|
-
};
|
|
422
|
-
};
|
|
423
|
-
Views: {
|
|
424
|
-
[_ in never]: never;
|
|
425
|
-
};
|
|
426
|
-
Functions: {
|
|
427
|
-
get_current_user_role: {
|
|
428
|
-
Args: Record<PropertyKey, never>;
|
|
429
|
-
Returns: Database["public"]["Enums"]["user_role"];
|
|
430
|
-
};
|
|
431
|
-
get_my_claim: {
|
|
432
|
-
Args: {
|
|
433
|
-
claim: string;
|
|
434
|
-
};
|
|
435
|
-
Returns: string;
|
|
436
|
-
};
|
|
437
|
-
};
|
|
438
|
-
Enums: {
|
|
439
|
-
menu_location: "HEADER" | "FOOTER" | "SIDEBAR";
|
|
440
|
-
page_status: "draft" | "published" | "archived";
|
|
441
|
-
user_role: "ADMIN" | "WRITER" | "USER";
|
|
442
|
-
};
|
|
443
|
-
CompositeTypes: {
|
|
444
|
-
[_ in never]: never;
|
|
445
|
-
};
|
|
446
|
-
};
|
|
447
|
-
};
|
|
448
|
-
type DefaultSchema = Database[Extract<keyof Database, "public">];
|
|
449
|
-
export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
|
|
450
|
-
schema: keyof Database;
|
|
451
|
-
}, TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
452
|
-
schema: keyof Database;
|
|
453
|
-
} ? keyof (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
|
|
454
|
-
schema: keyof Database;
|
|
455
|
-
} ? (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
456
|
-
Row: infer R;
|
|
457
|
-
} ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
|
|
458
|
-
Row: infer R;
|
|
459
|
-
} ? R : never : never;
|
|
460
|
-
export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
|
|
461
|
-
schema: keyof Database;
|
|
462
|
-
}, TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
463
|
-
schema: keyof Database;
|
|
464
|
-
} ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
|
|
465
|
-
schema: keyof Database;
|
|
466
|
-
} ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
467
|
-
Insert: infer I;
|
|
468
|
-
} ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
|
|
469
|
-
Insert: infer I;
|
|
470
|
-
} ? I : never : never;
|
|
471
|
-
export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
|
|
472
|
-
schema: keyof Database;
|
|
473
|
-
}, TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
474
|
-
schema: keyof Database;
|
|
475
|
-
} ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
|
|
476
|
-
schema: keyof Database;
|
|
477
|
-
} ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
478
|
-
Update: infer U;
|
|
479
|
-
} ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
|
|
480
|
-
Update: infer U;
|
|
481
|
-
} ? U : never : never;
|
|
482
|
-
export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
|
|
483
|
-
schema: keyof Database;
|
|
484
|
-
}, EnumName extends DefaultSchemaEnumNameOrOptions extends {
|
|
485
|
-
schema: keyof Database;
|
|
486
|
-
} ? keyof Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
|
|
487
|
-
schema: keyof Database;
|
|
488
|
-
} ? Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
|
|
489
|
-
export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
|
|
490
|
-
schema: keyof Database;
|
|
491
|
-
}, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
|
|
492
|
-
schema: keyof Database;
|
|
493
|
-
} ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
|
|
494
|
-
schema: keyof Database;
|
|
495
|
-
} ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
|
|
496
|
-
export declare const Constants: {
|
|
497
|
-
readonly public: {
|
|
498
|
-
readonly Enums: {
|
|
499
|
-
readonly menu_location: readonly ["HEADER", "FOOTER", "SIDEBAR"];
|
|
500
|
-
readonly page_status: readonly ["draft", "published", "archived"];
|
|
501
|
-
readonly user_role: readonly ["ADMIN", "WRITER", "USER"];
|
|
502
|
-
};
|
|
503
|
-
};
|
|
504
|
-
};
|
|
505
|
-
export {};
|
package/libs/db/src/server.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Database } from './lib/supabase/types';
|
|
2
|
-
import { SupabaseClient } from '@supabase/supabase-js';
|
|
3
|
-
type Profile = Database['public']['Tables']['profiles']['Row'];
|
|
4
|
-
type Language = Database['public']['Tables']['languages']['Row'];
|
|
5
|
-
export declare const createClient: () => SupabaseClient<any, "public", any>;
|
|
6
|
-
export declare function getProfileWithRoleServerSide(userId: string): Promise<Profile | null>;
|
|
7
|
-
export declare function getActiveLanguagesServerSide(): Promise<Language[]>;
|
|
8
|
-
export declare const getSsgSupabaseClient: () => SupabaseClient;
|
|
9
|
-
export {};
|