@webstudio-is/postgrest 0.252.1

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.
@@ -0,0 +1,1176 @@
1
+ export type Json =
2
+ | string
3
+ | number
4
+ | boolean
5
+ | null
6
+ | { [key: string]: Json | undefined }
7
+ | Json[];
8
+
9
+ export type Database = {
10
+ graphql_public: {
11
+ Tables: {
12
+ [_ in never]: never;
13
+ };
14
+ Views: {
15
+ [_ in never]: never;
16
+ };
17
+ Functions: {
18
+ graphql: {
19
+ Args: {
20
+ extensions?: Json;
21
+ operationName?: string;
22
+ query?: string;
23
+ variables?: Json;
24
+ };
25
+ Returns: Json;
26
+ };
27
+ };
28
+ Enums: {
29
+ [_ in never]: never;
30
+ };
31
+ CompositeTypes: {
32
+ [_ in never]: never;
33
+ };
34
+ };
35
+ public: {
36
+ Tables: {
37
+ _prisma_migrations: {
38
+ Row: {
39
+ applied_steps_count: number;
40
+ checksum: string;
41
+ finished_at: string | null;
42
+ id: string;
43
+ logs: string | null;
44
+ migration_name: string;
45
+ rolled_back_at: string | null;
46
+ started_at: string;
47
+ };
48
+ Insert: {
49
+ applied_steps_count?: number;
50
+ checksum: string;
51
+ finished_at?: string | null;
52
+ id: string;
53
+ logs?: string | null;
54
+ migration_name: string;
55
+ rolled_back_at?: string | null;
56
+ started_at?: string;
57
+ };
58
+ Update: {
59
+ applied_steps_count?: number;
60
+ checksum?: string;
61
+ finished_at?: string | null;
62
+ id?: string;
63
+ logs?: string | null;
64
+ migration_name?: string;
65
+ rolled_back_at?: string | null;
66
+ started_at?: string;
67
+ };
68
+ Relationships: [];
69
+ };
70
+ Asset: {
71
+ Row: {
72
+ description: string | null;
73
+ filename: string | null;
74
+ id: string;
75
+ name: string;
76
+ projectId: string;
77
+ };
78
+ Insert: {
79
+ description?: string | null;
80
+ filename?: string | null;
81
+ id: string;
82
+ name: string;
83
+ projectId: string;
84
+ };
85
+ Update: {
86
+ description?: string | null;
87
+ filename?: string | null;
88
+ id?: string;
89
+ name?: string;
90
+ projectId?: string;
91
+ };
92
+ Relationships: [
93
+ {
94
+ foreignKeyName: "Asset_name_fkey";
95
+ columns: ["name"];
96
+ isOneToOne: false;
97
+ referencedRelation: "File";
98
+ referencedColumns: ["name"];
99
+ },
100
+ ];
101
+ };
102
+ AuthorizationToken: {
103
+ Row: {
104
+ canClone: boolean;
105
+ canCopy: boolean;
106
+ canPublish: boolean;
107
+ createdAt: string;
108
+ name: string;
109
+ projectId: string;
110
+ relation: Database["public"]["Enums"]["AuthorizationRelation"];
111
+ token: string;
112
+ };
113
+ Insert: {
114
+ canClone?: boolean;
115
+ canCopy?: boolean;
116
+ canPublish?: boolean;
117
+ createdAt?: string;
118
+ name?: string;
119
+ projectId: string;
120
+ relation?: Database["public"]["Enums"]["AuthorizationRelation"];
121
+ token: string;
122
+ };
123
+ Update: {
124
+ canClone?: boolean;
125
+ canCopy?: boolean;
126
+ canPublish?: boolean;
127
+ createdAt?: string;
128
+ name?: string;
129
+ projectId?: string;
130
+ relation?: Database["public"]["Enums"]["AuthorizationRelation"];
131
+ token?: string;
132
+ };
133
+ Relationships: [
134
+ {
135
+ foreignKeyName: "AuthorizationToken_projectId_fkey";
136
+ columns: ["projectId"];
137
+ isOneToOne: false;
138
+ referencedRelation: "DashboardProject";
139
+ referencedColumns: ["id"];
140
+ },
141
+ {
142
+ foreignKeyName: "AuthorizationToken_projectId_fkey";
143
+ columns: ["projectId"];
144
+ isOneToOne: false;
145
+ referencedRelation: "Project";
146
+ referencedColumns: ["id"];
147
+ },
148
+ ];
149
+ };
150
+ Build: {
151
+ Row: {
152
+ breakpoints: string;
153
+ createdAt: string;
154
+ dataSources: string;
155
+ deployment: string | null;
156
+ id: string;
157
+ instances: string;
158
+ isCleaned: boolean | null;
159
+ lastTransactionId: string | null;
160
+ marketplaceProduct: string;
161
+ pages: string;
162
+ projectId: string;
163
+ props: string;
164
+ publishStatus: Database["public"]["Enums"]["PublishStatus"];
165
+ resources: string;
166
+ styles: string;
167
+ styleSources: string;
168
+ styleSourceSelections: string;
169
+ updatedAt: string;
170
+ version: number;
171
+ };
172
+ Insert: {
173
+ breakpoints?: string;
174
+ createdAt?: string;
175
+ dataSources?: string;
176
+ deployment?: string | null;
177
+ id: string;
178
+ instances?: string;
179
+ isCleaned?: boolean | null;
180
+ lastTransactionId?: string | null;
181
+ marketplaceProduct?: string;
182
+ pages: string;
183
+ projectId: string;
184
+ props?: string;
185
+ publishStatus?: Database["public"]["Enums"]["PublishStatus"];
186
+ resources?: string;
187
+ styles?: string;
188
+ styleSources?: string;
189
+ styleSourceSelections?: string;
190
+ updatedAt?: string;
191
+ version?: number;
192
+ };
193
+ Update: {
194
+ breakpoints?: string;
195
+ createdAt?: string;
196
+ dataSources?: string;
197
+ deployment?: string | null;
198
+ id?: string;
199
+ instances?: string;
200
+ isCleaned?: boolean | null;
201
+ lastTransactionId?: string | null;
202
+ marketplaceProduct?: string;
203
+ pages?: string;
204
+ projectId?: string;
205
+ props?: string;
206
+ publishStatus?: Database["public"]["Enums"]["PublishStatus"];
207
+ resources?: string;
208
+ styles?: string;
209
+ styleSources?: string;
210
+ styleSourceSelections?: string;
211
+ updatedAt?: string;
212
+ version?: number;
213
+ };
214
+ Relationships: [
215
+ {
216
+ foreignKeyName: "Build_projectId_fkey";
217
+ columns: ["projectId"];
218
+ isOneToOne: false;
219
+ referencedRelation: "DashboardProject";
220
+ referencedColumns: ["id"];
221
+ },
222
+ {
223
+ foreignKeyName: "Build_projectId_fkey";
224
+ columns: ["projectId"];
225
+ isOneToOne: false;
226
+ referencedRelation: "Project";
227
+ referencedColumns: ["id"];
228
+ },
229
+ ];
230
+ };
231
+ ClientReferences: {
232
+ Row: {
233
+ createdAt: string;
234
+ reference: string;
235
+ service: string;
236
+ userId: string;
237
+ };
238
+ Insert: {
239
+ createdAt?: string;
240
+ reference?: string;
241
+ service: string;
242
+ userId: string;
243
+ };
244
+ Update: {
245
+ createdAt?: string;
246
+ reference?: string;
247
+ service?: string;
248
+ userId?: string;
249
+ };
250
+ Relationships: [
251
+ {
252
+ foreignKeyName: "ClientReferences_userId_fkey";
253
+ columns: ["userId"];
254
+ isOneToOne: false;
255
+ referencedRelation: "User";
256
+ referencedColumns: ["id"];
257
+ },
258
+ ];
259
+ };
260
+ Domain: {
261
+ Row: {
262
+ createdAt: string;
263
+ domain: string;
264
+ error: string | null;
265
+ id: string;
266
+ status: Database["public"]["Enums"]["DomainStatus"];
267
+ txtRecord: string | null;
268
+ updatedAt: string;
269
+ };
270
+ Insert: {
271
+ createdAt?: string;
272
+ domain: string;
273
+ error?: string | null;
274
+ id: string;
275
+ status?: Database["public"]["Enums"]["DomainStatus"];
276
+ txtRecord?: string | null;
277
+ updatedAt?: string;
278
+ };
279
+ Update: {
280
+ createdAt?: string;
281
+ domain?: string;
282
+ error?: string | null;
283
+ id?: string;
284
+ status?: Database["public"]["Enums"]["DomainStatus"];
285
+ txtRecord?: string | null;
286
+ updatedAt?: string;
287
+ };
288
+ Relationships: [];
289
+ };
290
+ domainsVirtual: {
291
+ Row: {
292
+ cname: string;
293
+ createdAt: string;
294
+ domain: string;
295
+ domainId: string;
296
+ domainTxtRecord: string | null;
297
+ error: string | null;
298
+ expectedTxtRecord: string;
299
+ id: string;
300
+ projectId: string;
301
+ status: Database["public"]["Enums"]["DomainStatus"];
302
+ updatedAt: string;
303
+ verified: boolean;
304
+ };
305
+ Insert: {
306
+ cname: string;
307
+ createdAt: string;
308
+ domain: string;
309
+ domainId: string;
310
+ domainTxtRecord?: string | null;
311
+ error?: string | null;
312
+ expectedTxtRecord: string;
313
+ id: string;
314
+ projectId: string;
315
+ status?: Database["public"]["Enums"]["DomainStatus"];
316
+ updatedAt: string;
317
+ verified?: boolean;
318
+ };
319
+ Update: {
320
+ cname?: string;
321
+ createdAt?: string;
322
+ domain?: string;
323
+ domainId?: string;
324
+ domainTxtRecord?: string | null;
325
+ error?: string | null;
326
+ expectedTxtRecord?: string;
327
+ id?: string;
328
+ projectId?: string;
329
+ status?: Database["public"]["Enums"]["DomainStatus"];
330
+ updatedAt?: string;
331
+ verified?: boolean;
332
+ };
333
+ Relationships: [
334
+ {
335
+ foreignKeyName: "domainsVirtual_domainId_fkey";
336
+ columns: ["domainId"];
337
+ isOneToOne: false;
338
+ referencedRelation: "Domain";
339
+ referencedColumns: ["id"];
340
+ },
341
+ {
342
+ foreignKeyName: "domainsVirtual_projectId_fkey";
343
+ columns: ["projectId"];
344
+ isOneToOne: false;
345
+ referencedRelation: "DashboardProject";
346
+ referencedColumns: ["id"];
347
+ },
348
+ {
349
+ foreignKeyName: "domainsVirtual_projectId_fkey";
350
+ columns: ["projectId"];
351
+ isOneToOne: false;
352
+ referencedRelation: "Project";
353
+ referencedColumns: ["id"];
354
+ },
355
+ ];
356
+ };
357
+ File: {
358
+ Row: {
359
+ createdAt: string;
360
+ description: string | null;
361
+ format: string;
362
+ isDeleted: boolean;
363
+ meta: string;
364
+ name: string;
365
+ size: number;
366
+ status: Database["public"]["Enums"]["UploadStatus"];
367
+ updatedAt: string;
368
+ uploaderProjectId: string | null;
369
+ };
370
+ Insert: {
371
+ createdAt?: string;
372
+ description?: string | null;
373
+ format: string;
374
+ isDeleted?: boolean;
375
+ meta?: string;
376
+ name: string;
377
+ size: number;
378
+ status?: Database["public"]["Enums"]["UploadStatus"];
379
+ updatedAt?: string;
380
+ uploaderProjectId?: string | null;
381
+ };
382
+ Update: {
383
+ createdAt?: string;
384
+ description?: string | null;
385
+ format?: string;
386
+ isDeleted?: boolean;
387
+ meta?: string;
388
+ name?: string;
389
+ size?: number;
390
+ status?: Database["public"]["Enums"]["UploadStatus"];
391
+ updatedAt?: string;
392
+ uploaderProjectId?: string | null;
393
+ };
394
+ Relationships: [
395
+ {
396
+ foreignKeyName: "File_uploaderProjectId_fkey";
397
+ columns: ["uploaderProjectId"];
398
+ isOneToOne: false;
399
+ referencedRelation: "DashboardProject";
400
+ referencedColumns: ["id"];
401
+ },
402
+ {
403
+ foreignKeyName: "File_uploaderProjectId_fkey";
404
+ columns: ["uploaderProjectId"];
405
+ isOneToOne: false;
406
+ referencedRelation: "Project";
407
+ referencedColumns: ["id"];
408
+ },
409
+ ];
410
+ };
411
+ latestBuildVirtual: {
412
+ Row: {
413
+ buildId: string;
414
+ createdAt: string;
415
+ domain: string;
416
+ domainsVirtualId: string;
417
+ projectId: string;
418
+ publishStatus: Database["public"]["Enums"]["PublishStatus"];
419
+ updatedAt: string;
420
+ };
421
+ Insert: {
422
+ buildId: string;
423
+ createdAt: string;
424
+ domain: string;
425
+ domainsVirtualId: string;
426
+ projectId: string;
427
+ publishStatus: Database["public"]["Enums"]["PublishStatus"];
428
+ updatedAt: string;
429
+ };
430
+ Update: {
431
+ buildId?: string;
432
+ createdAt?: string;
433
+ domain?: string;
434
+ domainsVirtualId?: string;
435
+ projectId?: string;
436
+ publishStatus?: Database["public"]["Enums"]["PublishStatus"];
437
+ updatedAt?: string;
438
+ };
439
+ Relationships: [
440
+ {
441
+ foreignKeyName: "latestBuildVirtual_buildId_fkey";
442
+ columns: ["buildId"];
443
+ isOneToOne: true;
444
+ referencedRelation: "Build";
445
+ referencedColumns: ["id"];
446
+ },
447
+ {
448
+ foreignKeyName: "latestBuildVirtual_buildId_fkey";
449
+ columns: ["buildId"];
450
+ isOneToOne: true;
451
+ referencedRelation: "LatestStaticBuildPerProject";
452
+ referencedColumns: ["buildId"];
453
+ },
454
+ {
455
+ foreignKeyName: "latestBuildVirtual_buildId_fkey";
456
+ columns: ["buildId"];
457
+ isOneToOne: true;
458
+ referencedRelation: "published_builds";
459
+ referencedColumns: ["buildId"];
460
+ },
461
+ {
462
+ foreignKeyName: "latestBuildVirtual_domainsVirtualId_fkey";
463
+ columns: ["domainsVirtualId"];
464
+ isOneToOne: true;
465
+ referencedRelation: "domainsVirtual";
466
+ referencedColumns: ["id"];
467
+ },
468
+ {
469
+ foreignKeyName: "latestBuildVirtual_projectId_fkey";
470
+ columns: ["projectId"];
471
+ isOneToOne: true;
472
+ referencedRelation: "DashboardProject";
473
+ referencedColumns: ["id"];
474
+ },
475
+ {
476
+ foreignKeyName: "latestBuildVirtual_projectId_fkey";
477
+ columns: ["projectId"];
478
+ isOneToOne: true;
479
+ referencedRelation: "Project";
480
+ referencedColumns: ["id"];
481
+ },
482
+ ];
483
+ };
484
+ Product: {
485
+ Row: {
486
+ createdAt: string;
487
+ description: string | null;
488
+ features: string[] | null;
489
+ id: string;
490
+ images: string[] | null;
491
+ meta: Json;
492
+ name: string;
493
+ };
494
+ Insert: {
495
+ createdAt?: string;
496
+ description?: string | null;
497
+ features?: string[] | null;
498
+ id: string;
499
+ images?: string[] | null;
500
+ meta: Json;
501
+ name: string;
502
+ };
503
+ Update: {
504
+ createdAt?: string;
505
+ description?: string | null;
506
+ features?: string[] | null;
507
+ id?: string;
508
+ images?: string[] | null;
509
+ meta?: Json;
510
+ name?: string;
511
+ };
512
+ Relationships: [];
513
+ };
514
+ Project: {
515
+ Row: {
516
+ createdAt: string;
517
+ domain: string;
518
+ id: string;
519
+ isDeleted: boolean;
520
+ marketplaceApprovalStatus: Database["public"]["Enums"]["MarketplaceApprovalStatus"];
521
+ previewImageAssetId: string | null;
522
+ tags: string[] | null;
523
+ title: string;
524
+ userId: string | null;
525
+ };
526
+ Insert: {
527
+ createdAt?: string;
528
+ domain: string;
529
+ id: string;
530
+ isDeleted?: boolean;
531
+ marketplaceApprovalStatus?: Database["public"]["Enums"]["MarketplaceApprovalStatus"];
532
+ previewImageAssetId?: string | null;
533
+ tags?: string[] | null;
534
+ title: string;
535
+ userId?: string | null;
536
+ };
537
+ Update: {
538
+ createdAt?: string;
539
+ domain?: string;
540
+ id?: string;
541
+ isDeleted?: boolean;
542
+ marketplaceApprovalStatus?: Database["public"]["Enums"]["MarketplaceApprovalStatus"];
543
+ previewImageAssetId?: string | null;
544
+ tags?: string[] | null;
545
+ title?: string;
546
+ userId?: string | null;
547
+ };
548
+ Relationships: [
549
+ {
550
+ foreignKeyName: "Project_previewImageAssetId_id_fkey";
551
+ columns: ["previewImageAssetId", "id"];
552
+ isOneToOne: false;
553
+ referencedRelation: "Asset";
554
+ referencedColumns: ["id", "projectId"];
555
+ },
556
+ {
557
+ foreignKeyName: "Project_userId_fkey";
558
+ columns: ["userId"];
559
+ isOneToOne: false;
560
+ referencedRelation: "User";
561
+ referencedColumns: ["id"];
562
+ },
563
+ ];
564
+ };
565
+ ProjectDomain: {
566
+ Row: {
567
+ cname: string;
568
+ createdAt: string;
569
+ domainId: string;
570
+ projectId: string;
571
+ txtRecord: string;
572
+ };
573
+ Insert: {
574
+ cname: string;
575
+ createdAt?: string;
576
+ domainId: string;
577
+ projectId: string;
578
+ txtRecord: string;
579
+ };
580
+ Update: {
581
+ cname?: string;
582
+ createdAt?: string;
583
+ domainId?: string;
584
+ projectId?: string;
585
+ txtRecord?: string;
586
+ };
587
+ Relationships: [
588
+ {
589
+ foreignKeyName: "ProjectDomain_domainId_fkey";
590
+ columns: ["domainId"];
591
+ isOneToOne: false;
592
+ referencedRelation: "Domain";
593
+ referencedColumns: ["id"];
594
+ },
595
+ {
596
+ foreignKeyName: "ProjectDomain_projectId_fkey";
597
+ columns: ["projectId"];
598
+ isOneToOne: false;
599
+ referencedRelation: "DashboardProject";
600
+ referencedColumns: ["id"];
601
+ },
602
+ {
603
+ foreignKeyName: "ProjectDomain_projectId_fkey";
604
+ columns: ["projectId"];
605
+ isOneToOne: false;
606
+ referencedRelation: "Project";
607
+ referencedColumns: ["id"];
608
+ },
609
+ ];
610
+ };
611
+ Team: {
612
+ Row: {
613
+ id: string;
614
+ };
615
+ Insert: {
616
+ id: string;
617
+ };
618
+ Update: {
619
+ id?: string;
620
+ };
621
+ Relationships: [];
622
+ };
623
+ TransactionLog: {
624
+ Row: {
625
+ createdAt: string;
626
+ customerEmail: string | null;
627
+ customerId: string | null;
628
+ eventCreated: number | null;
629
+ eventData: Json | null;
630
+ eventId: string;
631
+ eventType: string | null;
632
+ paymentIntent: string | null;
633
+ productId: string | null;
634
+ status: string | null;
635
+ subscriptionId: string | null;
636
+ userId: string | null;
637
+ };
638
+ Insert: {
639
+ createdAt?: string;
640
+ customerEmail?: string | null;
641
+ customerId?: string | null;
642
+ eventCreated?: number | null;
643
+ eventData?: Json | null;
644
+ eventId: string;
645
+ eventType?: string | null;
646
+ paymentIntent?: string | null;
647
+ productId?: string | null;
648
+ status?: string | null;
649
+ subscriptionId?: string | null;
650
+ userId?: string | null;
651
+ };
652
+ Update: {
653
+ createdAt?: string;
654
+ customerEmail?: string | null;
655
+ customerId?: string | null;
656
+ eventCreated?: number | null;
657
+ eventData?: Json | null;
658
+ eventId?: string;
659
+ eventType?: string | null;
660
+ paymentIntent?: string | null;
661
+ productId?: string | null;
662
+ status?: string | null;
663
+ subscriptionId?: string | null;
664
+ userId?: string | null;
665
+ };
666
+ Relationships: [
667
+ {
668
+ foreignKeyName: "TransactionLog_productId_fkey";
669
+ columns: ["productId"];
670
+ isOneToOne: false;
671
+ referencedRelation: "Product";
672
+ referencedColumns: ["id"];
673
+ },
674
+ {
675
+ foreignKeyName: "TransactionLog_userId_fkey";
676
+ columns: ["userId"];
677
+ isOneToOne: false;
678
+ referencedRelation: "User";
679
+ referencedColumns: ["id"];
680
+ },
681
+ ];
682
+ };
683
+ User: {
684
+ Row: {
685
+ createdAt: string;
686
+ email: string | null;
687
+ id: string;
688
+ image: string | null;
689
+ projectsTags: Json;
690
+ provider: string | null;
691
+ teamId: string | null;
692
+ username: string | null;
693
+ };
694
+ Insert: {
695
+ createdAt?: string;
696
+ email?: string | null;
697
+ id: string;
698
+ image?: string | null;
699
+ projectsTags?: Json;
700
+ provider?: string | null;
701
+ teamId?: string | null;
702
+ username?: string | null;
703
+ };
704
+ Update: {
705
+ createdAt?: string;
706
+ email?: string | null;
707
+ id?: string;
708
+ image?: string | null;
709
+ projectsTags?: Json;
710
+ provider?: string | null;
711
+ teamId?: string | null;
712
+ username?: string | null;
713
+ };
714
+ Relationships: [
715
+ {
716
+ foreignKeyName: "User_teamId_fkey";
717
+ columns: ["teamId"];
718
+ isOneToOne: false;
719
+ referencedRelation: "Team";
720
+ referencedColumns: ["id"];
721
+ },
722
+ ];
723
+ };
724
+ };
725
+ Views: {
726
+ ApprovedMarketplaceProduct: {
727
+ Row: {
728
+ authorizationToken: string | null;
729
+ marketplaceProduct: string | null;
730
+ projectId: string | null;
731
+ };
732
+ Relationships: [
733
+ {
734
+ foreignKeyName: "Build_projectId_fkey";
735
+ columns: ["projectId"];
736
+ isOneToOne: false;
737
+ referencedRelation: "DashboardProject";
738
+ referencedColumns: ["id"];
739
+ },
740
+ {
741
+ foreignKeyName: "Build_projectId_fkey";
742
+ columns: ["projectId"];
743
+ isOneToOne: false;
744
+ referencedRelation: "Project";
745
+ referencedColumns: ["id"];
746
+ },
747
+ ];
748
+ };
749
+ DashboardProject: {
750
+ Row: {
751
+ createdAt: string | null;
752
+ domain: string | null;
753
+ id: string | null;
754
+ isDeleted: boolean | null;
755
+ isPublished: boolean | null;
756
+ marketplaceApprovalStatus:
757
+ | Database["public"]["Enums"]["MarketplaceApprovalStatus"]
758
+ | null;
759
+ previewImageAssetId: string | null;
760
+ tags: string[] | null;
761
+ title: string | null;
762
+ userId: string | null;
763
+ };
764
+ Insert: {
765
+ createdAt?: string | null;
766
+ domain?: string | null;
767
+ id?: string | null;
768
+ isDeleted?: boolean | null;
769
+ isPublished?: never;
770
+ marketplaceApprovalStatus?:
771
+ | Database["public"]["Enums"]["MarketplaceApprovalStatus"]
772
+ | null;
773
+ previewImageAssetId?: string | null;
774
+ tags?: string[] | null;
775
+ title?: string | null;
776
+ userId?: string | null;
777
+ };
778
+ Update: {
779
+ createdAt?: string | null;
780
+ domain?: string | null;
781
+ id?: string | null;
782
+ isDeleted?: boolean | null;
783
+ isPublished?: never;
784
+ marketplaceApprovalStatus?:
785
+ | Database["public"]["Enums"]["MarketplaceApprovalStatus"]
786
+ | null;
787
+ previewImageAssetId?: string | null;
788
+ tags?: string[] | null;
789
+ title?: string | null;
790
+ userId?: string | null;
791
+ };
792
+ Relationships: [
793
+ {
794
+ foreignKeyName: "Project_previewImageAssetId_id_fkey";
795
+ columns: ["previewImageAssetId", "id"];
796
+ isOneToOne: false;
797
+ referencedRelation: "Asset";
798
+ referencedColumns: ["id", "projectId"];
799
+ },
800
+ {
801
+ foreignKeyName: "Project_userId_fkey";
802
+ columns: ["userId"];
803
+ isOneToOne: false;
804
+ referencedRelation: "User";
805
+ referencedColumns: ["id"];
806
+ },
807
+ ];
808
+ };
809
+ LatestStaticBuildPerProject: {
810
+ Row: {
811
+ buildId: string | null;
812
+ projectId: string | null;
813
+ publishStatus: Database["public"]["Enums"]["PublishStatus"] | null;
814
+ updatedAt: string | null;
815
+ };
816
+ Relationships: [
817
+ {
818
+ foreignKeyName: "Build_projectId_fkey";
819
+ columns: ["projectId"];
820
+ isOneToOne: false;
821
+ referencedRelation: "DashboardProject";
822
+ referencedColumns: ["id"];
823
+ },
824
+ {
825
+ foreignKeyName: "Build_projectId_fkey";
826
+ columns: ["projectId"];
827
+ isOneToOne: false;
828
+ referencedRelation: "Project";
829
+ referencedColumns: ["id"];
830
+ },
831
+ ];
832
+ };
833
+ published_builds: {
834
+ Row: {
835
+ buildId: string | null;
836
+ createdAt: string | null;
837
+ domains: string | null;
838
+ projectId: string | null;
839
+ };
840
+ Insert: {
841
+ buildId?: string | null;
842
+ createdAt?: string | null;
843
+ domains?: never;
844
+ projectId?: string | null;
845
+ };
846
+ Update: {
847
+ buildId?: string | null;
848
+ createdAt?: string | null;
849
+ domains?: never;
850
+ projectId?: string | null;
851
+ };
852
+ Relationships: [
853
+ {
854
+ foreignKeyName: "Build_projectId_fkey";
855
+ columns: ["projectId"];
856
+ isOneToOne: false;
857
+ referencedRelation: "DashboardProject";
858
+ referencedColumns: ["id"];
859
+ },
860
+ {
861
+ foreignKeyName: "Build_projectId_fkey";
862
+ columns: ["projectId"];
863
+ isOneToOne: false;
864
+ referencedRelation: "Project";
865
+ referencedColumns: ["id"];
866
+ },
867
+ ];
868
+ };
869
+ user_publish_count: {
870
+ Row: {
871
+ count: number | null;
872
+ user_id: string | null;
873
+ };
874
+ Relationships: [
875
+ {
876
+ foreignKeyName: "Project_userId_fkey";
877
+ columns: ["user_id"];
878
+ isOneToOne: false;
879
+ referencedRelation: "User";
880
+ referencedColumns: ["id"];
881
+ },
882
+ ];
883
+ };
884
+ UserProduct: {
885
+ Row: {
886
+ customerEmail: string | null;
887
+ customerId: string | null;
888
+ productId: string | null;
889
+ subscriptionId: string | null;
890
+ userId: string | null;
891
+ };
892
+ Relationships: [];
893
+ };
894
+ };
895
+ Functions: {
896
+ clone_project: {
897
+ Args: {
898
+ domain: string;
899
+ project_id: string;
900
+ title: string;
901
+ user_id: string;
902
+ };
903
+ Returns: {
904
+ createdAt: string;
905
+ domain: string;
906
+ id: string;
907
+ isDeleted: boolean;
908
+ marketplaceApprovalStatus: Database["public"]["Enums"]["MarketplaceApprovalStatus"];
909
+ previewImageAssetId: string | null;
910
+ tags: string[] | null;
911
+ title: string;
912
+ userId: string | null;
913
+ };
914
+ SetofOptions: {
915
+ from: "*";
916
+ to: "Project";
917
+ isOneToOne: true;
918
+ isSetofReturn: false;
919
+ };
920
+ };
921
+ create_production_build: {
922
+ Args: { deployment: string; project_id: string };
923
+ Returns: string;
924
+ };
925
+ database_cleanup: {
926
+ Args: { from_date?: string; to_date?: string };
927
+ Returns: undefined;
928
+ };
929
+ domainsVirtual: {
930
+ Args: { "": Database["public"]["Tables"]["Project"]["Row"] };
931
+ Returns: {
932
+ cname: string;
933
+ createdAt: string;
934
+ domain: string;
935
+ domainId: string;
936
+ domainTxtRecord: string | null;
937
+ error: string | null;
938
+ expectedTxtRecord: string;
939
+ id: string;
940
+ projectId: string;
941
+ status: Database["public"]["Enums"]["DomainStatus"];
942
+ updatedAt: string;
943
+ verified: boolean;
944
+ }[];
945
+ SetofOptions: {
946
+ from: '"Project"';
947
+ to: "domainsVirtual";
948
+ isOneToOne: false;
949
+ isSetofReturn: true;
950
+ };
951
+ };
952
+ latestBuildVirtual:
953
+ | {
954
+ Args: { "": Database["public"]["Tables"]["domainsVirtual"]["Row"] };
955
+ Returns: {
956
+ buildId: string;
957
+ createdAt: string;
958
+ domain: string;
959
+ domainsVirtualId: string;
960
+ projectId: string;
961
+ publishStatus: Database["public"]["Enums"]["PublishStatus"];
962
+ updatedAt: string;
963
+ };
964
+ SetofOptions: {
965
+ from: '"domainsVirtual"';
966
+ to: "latestBuildVirtual";
967
+ isOneToOne: true;
968
+ isSetofReturn: true;
969
+ };
970
+ }
971
+ | {
972
+ Args: { "": Database["public"]["Tables"]["Project"]["Row"] };
973
+ Returns: {
974
+ buildId: string;
975
+ createdAt: string;
976
+ domain: string;
977
+ domainsVirtualId: string;
978
+ projectId: string;
979
+ publishStatus: Database["public"]["Enums"]["PublishStatus"];
980
+ updatedAt: string;
981
+ };
982
+ SetofOptions: {
983
+ from: '"Project"';
984
+ to: "latestBuildVirtual";
985
+ isOneToOne: true;
986
+ isSetofReturn: true;
987
+ };
988
+ };
989
+ latestProjectDomainBuildVirtual: {
990
+ Args: { "": Database["public"]["Tables"]["Project"]["Row"] };
991
+ Returns: {
992
+ buildId: string;
993
+ createdAt: string;
994
+ domain: string;
995
+ domainsVirtualId: string;
996
+ projectId: string;
997
+ publishStatus: Database["public"]["Enums"]["PublishStatus"];
998
+ updatedAt: string;
999
+ };
1000
+ SetofOptions: {
1001
+ from: '"Project"';
1002
+ to: "latestBuildVirtual";
1003
+ isOneToOne: true;
1004
+ isSetofReturn: true;
1005
+ };
1006
+ };
1007
+ restore_development_build: {
1008
+ Args: { from_build_id: string; project_id: string };
1009
+ Returns: string;
1010
+ };
1011
+ };
1012
+ Enums: {
1013
+ AuthorizationRelation:
1014
+ | "viewers"
1015
+ | "editors"
1016
+ | "builders"
1017
+ | "administrators";
1018
+ DomainStatus: "INITIALIZING" | "ACTIVE" | "ERROR" | "PENDING";
1019
+ MarketplaceApprovalStatus:
1020
+ | "UNLISTED"
1021
+ | "PENDING"
1022
+ | "APPROVED"
1023
+ | "REJECTED";
1024
+ PublishStatus: "PENDING" | "PUBLISHED" | "FAILED";
1025
+ UploadStatus: "UPLOADING" | "UPLOADED";
1026
+ };
1027
+ CompositeTypes: {
1028
+ [_ in never]: never;
1029
+ };
1030
+ };
1031
+ };
1032
+
1033
+ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
1034
+
1035
+ type DefaultSchema = DatabaseWithoutInternals[Extract<
1036
+ keyof Database,
1037
+ "public"
1038
+ >];
1039
+
1040
+ export type Tables<
1041
+ DefaultSchemaTableNameOrOptions extends
1042
+ | keyof (DefaultSchema["Tables"] & DefaultSchema["Views"])
1043
+ | { schema: keyof DatabaseWithoutInternals },
1044
+ TableName extends DefaultSchemaTableNameOrOptions extends {
1045
+ schema: keyof DatabaseWithoutInternals;
1046
+ }
1047
+ ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
1048
+ DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])
1049
+ : never = never,
1050
+ > = DefaultSchemaTableNameOrOptions extends {
1051
+ schema: keyof DatabaseWithoutInternals;
1052
+ }
1053
+ ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
1054
+ DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
1055
+ Row: infer R;
1056
+ }
1057
+ ? R
1058
+ : never
1059
+ : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] &
1060
+ DefaultSchema["Views"])
1061
+ ? (DefaultSchema["Tables"] &
1062
+ DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
1063
+ Row: infer R;
1064
+ }
1065
+ ? R
1066
+ : never
1067
+ : never;
1068
+
1069
+ export type TablesInsert<
1070
+ DefaultSchemaTableNameOrOptions extends
1071
+ | keyof DefaultSchema["Tables"]
1072
+ | { schema: keyof DatabaseWithoutInternals },
1073
+ TableName extends DefaultSchemaTableNameOrOptions extends {
1074
+ schema: keyof DatabaseWithoutInternals;
1075
+ }
1076
+ ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
1077
+ : never = never,
1078
+ > = DefaultSchemaTableNameOrOptions extends {
1079
+ schema: keyof DatabaseWithoutInternals;
1080
+ }
1081
+ ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1082
+ Insert: infer I;
1083
+ }
1084
+ ? I
1085
+ : never
1086
+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
1087
+ ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
1088
+ Insert: infer I;
1089
+ }
1090
+ ? I
1091
+ : never
1092
+ : never;
1093
+
1094
+ export type TablesUpdate<
1095
+ DefaultSchemaTableNameOrOptions extends
1096
+ | keyof DefaultSchema["Tables"]
1097
+ | { schema: keyof DatabaseWithoutInternals },
1098
+ TableName extends DefaultSchemaTableNameOrOptions extends {
1099
+ schema: keyof DatabaseWithoutInternals;
1100
+ }
1101
+ ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
1102
+ : never = never,
1103
+ > = DefaultSchemaTableNameOrOptions extends {
1104
+ schema: keyof DatabaseWithoutInternals;
1105
+ }
1106
+ ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1107
+ Update: infer U;
1108
+ }
1109
+ ? U
1110
+ : never
1111
+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
1112
+ ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
1113
+ Update: infer U;
1114
+ }
1115
+ ? U
1116
+ : never
1117
+ : never;
1118
+
1119
+ export type Enums<
1120
+ DefaultSchemaEnumNameOrOptions extends
1121
+ | keyof DefaultSchema["Enums"]
1122
+ | { schema: keyof DatabaseWithoutInternals },
1123
+ EnumName extends DefaultSchemaEnumNameOrOptions extends {
1124
+ schema: keyof DatabaseWithoutInternals;
1125
+ }
1126
+ ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"]
1127
+ : never = never,
1128
+ > = DefaultSchemaEnumNameOrOptions extends {
1129
+ schema: keyof DatabaseWithoutInternals;
1130
+ }
1131
+ ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName]
1132
+ : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"]
1133
+ ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions]
1134
+ : never;
1135
+
1136
+ export type CompositeTypes<
1137
+ PublicCompositeTypeNameOrOptions extends
1138
+ | keyof DefaultSchema["CompositeTypes"]
1139
+ | { schema: keyof DatabaseWithoutInternals },
1140
+ CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
1141
+ schema: keyof DatabaseWithoutInternals;
1142
+ }
1143
+ ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
1144
+ : never = never,
1145
+ > = PublicCompositeTypeNameOrOptions extends {
1146
+ schema: keyof DatabaseWithoutInternals;
1147
+ }
1148
+ ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
1149
+ : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"]
1150
+ ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
1151
+ : never;
1152
+
1153
+ export const Constants = {
1154
+ graphql_public: {
1155
+ Enums: {},
1156
+ },
1157
+ public: {
1158
+ Enums: {
1159
+ AuthorizationRelation: [
1160
+ "viewers",
1161
+ "editors",
1162
+ "builders",
1163
+ "administrators",
1164
+ ],
1165
+ DomainStatus: ["INITIALIZING", "ACTIVE", "ERROR", "PENDING"],
1166
+ MarketplaceApprovalStatus: [
1167
+ "UNLISTED",
1168
+ "PENDING",
1169
+ "APPROVED",
1170
+ "REJECTED",
1171
+ ],
1172
+ PublishStatus: ["PENDING", "PUBLISHED", "FAILED"],
1173
+ UploadStatus: ["UPLOADING", "UPLOADED"],
1174
+ },
1175
+ },
1176
+ } as const;