@nextblock-cms/db 0.9.70 → 0.9.91

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,2332 @@
1
+ export type Json = string | number | boolean | null | {
2
+ [key: string]: Json | undefined;
3
+ } | Json[];
4
+ export type Database = {
5
+ __InternalSupabase: {
6
+ PostgrestVersion: "14.1";
7
+ };
8
+ public: {
9
+ Tables: {
10
+ blocks: {
11
+ Row: {
12
+ block_type: string;
13
+ content: Json | null;
14
+ created_at: string;
15
+ id: number;
16
+ language_id: number;
17
+ order: number;
18
+ page_id: number | null;
19
+ post_id: number | null;
20
+ product_id: string | null;
21
+ updated_at: string;
22
+ };
23
+ Insert: {
24
+ block_type: string;
25
+ content?: Json | null;
26
+ created_at?: string;
27
+ id?: number;
28
+ language_id: number;
29
+ order?: number;
30
+ page_id?: number | null;
31
+ post_id?: number | null;
32
+ product_id?: string | null;
33
+ updated_at?: string;
34
+ };
35
+ Update: {
36
+ block_type?: string;
37
+ content?: Json | null;
38
+ created_at?: string;
39
+ id?: number;
40
+ language_id?: number;
41
+ order?: number;
42
+ page_id?: number | null;
43
+ post_id?: number | null;
44
+ product_id?: string | null;
45
+ updated_at?: string;
46
+ };
47
+ Relationships: [
48
+ {
49
+ foreignKeyName: "blocks_language_id_fkey";
50
+ columns: ["language_id"];
51
+ isOneToOne: false;
52
+ referencedRelation: "languages";
53
+ referencedColumns: ["id"];
54
+ },
55
+ {
56
+ foreignKeyName: "blocks_page_id_fkey";
57
+ columns: ["page_id"];
58
+ isOneToOne: false;
59
+ referencedRelation: "pages";
60
+ referencedColumns: ["id"];
61
+ },
62
+ {
63
+ foreignKeyName: "blocks_post_id_fkey";
64
+ columns: ["post_id"];
65
+ isOneToOne: false;
66
+ referencedRelation: "posts";
67
+ referencedColumns: ["id"];
68
+ },
69
+ {
70
+ foreignKeyName: "blocks_product_id_fkey";
71
+ columns: ["product_id"];
72
+ isOneToOne: false;
73
+ referencedRelation: "products";
74
+ referencedColumns: ["id"];
75
+ }
76
+ ];
77
+ };
78
+ categories: {
79
+ Row: {
80
+ created_at: string;
81
+ description: string | null;
82
+ description_translations: Json;
83
+ id: string;
84
+ name: string;
85
+ name_translations: Json;
86
+ slug: string;
87
+ };
88
+ Insert: {
89
+ created_at?: string;
90
+ description?: string | null;
91
+ description_translations?: Json;
92
+ id?: string;
93
+ name: string;
94
+ name_translations?: Json;
95
+ slug: string;
96
+ };
97
+ Update: {
98
+ created_at?: string;
99
+ description?: string | null;
100
+ description_translations?: Json;
101
+ id?: string;
102
+ name?: string;
103
+ name_translations?: Json;
104
+ slug?: string;
105
+ };
106
+ Relationships: [];
107
+ };
108
+ content_drafts: {
109
+ Row: {
110
+ author_id: string | null;
111
+ base_version: number;
112
+ blocks: Json;
113
+ created_at: string;
114
+ id: number;
115
+ meta: Json;
116
+ parent_id: number;
117
+ parent_type: string;
118
+ updated_at: string;
119
+ };
120
+ Insert: {
121
+ author_id?: string | null;
122
+ base_version?: number;
123
+ blocks?: Json;
124
+ created_at?: string;
125
+ id?: number;
126
+ meta?: Json;
127
+ parent_id: number;
128
+ parent_type: string;
129
+ updated_at?: string;
130
+ };
131
+ Update: {
132
+ author_id?: string | null;
133
+ base_version?: number;
134
+ blocks?: Json;
135
+ created_at?: string;
136
+ id?: number;
137
+ meta?: Json;
138
+ parent_id?: number;
139
+ parent_type?: string;
140
+ updated_at?: string;
141
+ };
142
+ Relationships: [
143
+ {
144
+ foreignKeyName: "content_drafts_author_id_fkey";
145
+ columns: ["author_id"];
146
+ isOneToOne: false;
147
+ referencedRelation: "profiles";
148
+ referencedColumns: ["id"];
149
+ }
150
+ ];
151
+ };
152
+ cortex_ai_db_mutation_audit: {
153
+ Row: {
154
+ action_name: string;
155
+ actor_user_id: string | null;
156
+ created_at: string;
157
+ error_message: string | null;
158
+ id: string;
159
+ operation_summary: string;
160
+ payload: Json;
161
+ payload_hash: string;
162
+ preview: Json;
163
+ status: string;
164
+ target_tables: string[];
165
+ tool_name: string;
166
+ };
167
+ Insert: {
168
+ action_name: string;
169
+ actor_user_id?: string | null;
170
+ created_at?: string;
171
+ error_message?: string | null;
172
+ id?: string;
173
+ operation_summary: string;
174
+ payload?: Json;
175
+ payload_hash: string;
176
+ preview?: Json;
177
+ status: string;
178
+ target_tables?: string[];
179
+ tool_name: string;
180
+ };
181
+ Update: {
182
+ action_name?: string;
183
+ actor_user_id?: string | null;
184
+ created_at?: string;
185
+ error_message?: string | null;
186
+ id?: string;
187
+ operation_summary?: string;
188
+ payload?: Json;
189
+ payload_hash?: string;
190
+ preview?: Json;
191
+ status?: string;
192
+ target_tables?: string[];
193
+ tool_name?: string;
194
+ };
195
+ Relationships: [
196
+ {
197
+ foreignKeyName: "cortex_ai_db_mutation_audit_actor_user_id_fkey";
198
+ columns: ["actor_user_id"];
199
+ isOneToOne: false;
200
+ referencedRelation: "profiles";
201
+ referencedColumns: ["id"];
202
+ }
203
+ ];
204
+ };
205
+ coupon_freemius_mappings: {
206
+ Row: {
207
+ coupon_id: string;
208
+ created_at: string;
209
+ freemius_coupon_code: string;
210
+ freemius_coupon_id: string | null;
211
+ freemius_product_id: string;
212
+ id: string;
213
+ last_synced_at: string | null;
214
+ product_id: string | null;
215
+ remote_payload: Json | null;
216
+ sync_error: string | null;
217
+ sync_status: string;
218
+ updated_at: string;
219
+ };
220
+ Insert: {
221
+ coupon_id: string;
222
+ created_at?: string;
223
+ freemius_coupon_code: string;
224
+ freemius_coupon_id?: string | null;
225
+ freemius_product_id: string;
226
+ id?: string;
227
+ last_synced_at?: string | null;
228
+ product_id?: string | null;
229
+ remote_payload?: Json | null;
230
+ sync_error?: string | null;
231
+ sync_status?: string;
232
+ updated_at?: string;
233
+ };
234
+ Update: {
235
+ coupon_id?: string;
236
+ created_at?: string;
237
+ freemius_coupon_code?: string;
238
+ freemius_coupon_id?: string | null;
239
+ freemius_product_id?: string;
240
+ id?: string;
241
+ last_synced_at?: string | null;
242
+ product_id?: string | null;
243
+ remote_payload?: Json | null;
244
+ sync_error?: string | null;
245
+ sync_status?: string;
246
+ updated_at?: string;
247
+ };
248
+ Relationships: [
249
+ {
250
+ foreignKeyName: "coupon_freemius_mappings_coupon_id_fkey";
251
+ columns: ["coupon_id"];
252
+ isOneToOne: false;
253
+ referencedRelation: "coupons";
254
+ referencedColumns: ["id"];
255
+ },
256
+ {
257
+ foreignKeyName: "coupon_freemius_mappings_product_id_fkey";
258
+ columns: ["product_id"];
259
+ isOneToOne: false;
260
+ referencedRelation: "products";
261
+ referencedColumns: ["id"];
262
+ }
263
+ ];
264
+ };
265
+ coupon_products: {
266
+ Row: {
267
+ coupon_id: string;
268
+ created_at: string;
269
+ product_id: string;
270
+ };
271
+ Insert: {
272
+ coupon_id: string;
273
+ created_at?: string;
274
+ product_id: string;
275
+ };
276
+ Update: {
277
+ coupon_id?: string;
278
+ created_at?: string;
279
+ product_id?: string;
280
+ };
281
+ Relationships: [
282
+ {
283
+ foreignKeyName: "coupon_products_coupon_id_fkey";
284
+ columns: ["coupon_id"];
285
+ isOneToOne: false;
286
+ referencedRelation: "coupons";
287
+ referencedColumns: ["id"];
288
+ },
289
+ {
290
+ foreignKeyName: "coupon_products_product_id_fkey";
291
+ columns: ["product_id"];
292
+ isOneToOne: false;
293
+ referencedRelation: "products";
294
+ referencedColumns: ["id"];
295
+ }
296
+ ];
297
+ };
298
+ coupon_redemptions: {
299
+ Row: {
300
+ coupon_code: string;
301
+ coupon_id: string | null;
302
+ customer_email: string | null;
303
+ discount_total: number;
304
+ id: string;
305
+ metadata: Json;
306
+ order_id: string | null;
307
+ provider: string;
308
+ redeemed_at: string;
309
+ user_id: string | null;
310
+ };
311
+ Insert: {
312
+ coupon_code: string;
313
+ coupon_id?: string | null;
314
+ customer_email?: string | null;
315
+ discount_total?: number;
316
+ id?: string;
317
+ metadata?: Json;
318
+ order_id?: string | null;
319
+ provider: string;
320
+ redeemed_at?: string;
321
+ user_id?: string | null;
322
+ };
323
+ Update: {
324
+ coupon_code?: string;
325
+ coupon_id?: string | null;
326
+ customer_email?: string | null;
327
+ discount_total?: number;
328
+ id?: string;
329
+ metadata?: Json;
330
+ order_id?: string | null;
331
+ provider?: string;
332
+ redeemed_at?: string;
333
+ user_id?: string | null;
334
+ };
335
+ Relationships: [
336
+ {
337
+ foreignKeyName: "coupon_redemptions_coupon_id_fkey";
338
+ columns: ["coupon_id"];
339
+ isOneToOne: false;
340
+ referencedRelation: "coupons";
341
+ referencedColumns: ["id"];
342
+ },
343
+ {
344
+ foreignKeyName: "coupon_redemptions_order_id_fkey";
345
+ columns: ["order_id"];
346
+ isOneToOne: false;
347
+ referencedRelation: "orders";
348
+ referencedColumns: ["id"];
349
+ }
350
+ ];
351
+ };
352
+ coupons: {
353
+ Row: {
354
+ code: string;
355
+ created_at: string;
356
+ discount_amount: number;
357
+ discount_type: string;
358
+ ends_at: string | null;
359
+ freemius_sync_error: string | null;
360
+ freemius_sync_status: string;
361
+ id: string;
362
+ internal_note: string | null;
363
+ is_active: boolean;
364
+ name: string;
365
+ provider_scope: string;
366
+ redemption_limit: number | null;
367
+ redemptions_count: number;
368
+ starts_at: string | null;
369
+ updated_at: string;
370
+ };
371
+ Insert: {
372
+ code: string;
373
+ created_at?: string;
374
+ discount_amount: number;
375
+ discount_type: string;
376
+ ends_at?: string | null;
377
+ freemius_sync_error?: string | null;
378
+ freemius_sync_status?: string;
379
+ id?: string;
380
+ internal_note?: string | null;
381
+ is_active?: boolean;
382
+ name: string;
383
+ provider_scope?: string;
384
+ redemption_limit?: number | null;
385
+ redemptions_count?: number;
386
+ starts_at?: string | null;
387
+ updated_at?: string;
388
+ };
389
+ Update: {
390
+ code?: string;
391
+ created_at?: string;
392
+ discount_amount?: number;
393
+ discount_type?: string;
394
+ ends_at?: string | null;
395
+ freemius_sync_error?: string | null;
396
+ freemius_sync_status?: string;
397
+ id?: string;
398
+ internal_note?: string | null;
399
+ is_active?: boolean;
400
+ name?: string;
401
+ provider_scope?: string;
402
+ redemption_limit?: number | null;
403
+ redemptions_count?: number;
404
+ starts_at?: string | null;
405
+ updated_at?: string;
406
+ };
407
+ Relationships: [];
408
+ };
409
+ currencies: {
410
+ Row: {
411
+ auto_sync_product_prices: boolean;
412
+ auto_update_exchange_rate: boolean;
413
+ code: string;
414
+ created_at: string;
415
+ exchange_rate: number;
416
+ exchange_rate_source: string | null;
417
+ exchange_rate_updated_at: string | null;
418
+ id: string;
419
+ is_active: boolean;
420
+ is_default: boolean;
421
+ rounding_charm_amount: number | null;
422
+ rounding_increment: number;
423
+ rounding_mode: string;
424
+ symbol: string;
425
+ updated_at: string;
426
+ };
427
+ Insert: {
428
+ auto_sync_product_prices?: boolean;
429
+ auto_update_exchange_rate?: boolean;
430
+ code: string;
431
+ created_at?: string;
432
+ exchange_rate: number;
433
+ exchange_rate_source?: string | null;
434
+ exchange_rate_updated_at?: string | null;
435
+ id?: string;
436
+ is_active?: boolean;
437
+ is_default?: boolean;
438
+ rounding_charm_amount?: number | null;
439
+ rounding_increment?: number;
440
+ rounding_mode?: string;
441
+ symbol: string;
442
+ updated_at?: string;
443
+ };
444
+ Update: {
445
+ auto_sync_product_prices?: boolean;
446
+ auto_update_exchange_rate?: boolean;
447
+ code?: string;
448
+ created_at?: string;
449
+ exchange_rate?: number;
450
+ exchange_rate_source?: string | null;
451
+ exchange_rate_updated_at?: string | null;
452
+ id?: string;
453
+ is_active?: boolean;
454
+ is_default?: boolean;
455
+ rounding_charm_amount?: number | null;
456
+ rounding_increment?: number;
457
+ rounding_mode?: string;
458
+ symbol?: string;
459
+ updated_at?: string;
460
+ };
461
+ Relationships: [];
462
+ };
463
+ custom_block_definitions: {
464
+ Row: {
465
+ description: string;
466
+ fields: Json;
467
+ id: string;
468
+ is_original: boolean;
469
+ layout_schema: Json;
470
+ name: string;
471
+ slug: string;
472
+ };
473
+ Insert: {
474
+ description?: string;
475
+ fields?: Json;
476
+ id?: string;
477
+ is_original?: boolean;
478
+ layout_schema: Json;
479
+ name: string;
480
+ slug: string;
481
+ };
482
+ Update: {
483
+ description?: string;
484
+ fields?: Json;
485
+ id?: string;
486
+ is_original?: boolean;
487
+ layout_schema?: Json;
488
+ name?: string;
489
+ slug?: string;
490
+ };
491
+ Relationships: [];
492
+ };
493
+ email_2fa_challenges: {
494
+ Row: {
495
+ consumed_at: string | null;
496
+ created_at: string;
497
+ expires_at: string;
498
+ id: string;
499
+ token_hash: string;
500
+ user_id: string;
501
+ };
502
+ Insert: {
503
+ consumed_at?: string | null;
504
+ created_at?: string;
505
+ expires_at: string;
506
+ id?: string;
507
+ token_hash: string;
508
+ user_id: string;
509
+ };
510
+ Update: {
511
+ consumed_at?: string | null;
512
+ created_at?: string;
513
+ expires_at?: string;
514
+ id?: string;
515
+ token_hash?: string;
516
+ user_id?: string;
517
+ };
518
+ Relationships: [];
519
+ };
520
+ freemius_plans: {
521
+ Row: {
522
+ created_at: string;
523
+ id: string;
524
+ name: string;
525
+ product_id: string;
526
+ title: string | null;
527
+ updated_at: string;
528
+ };
529
+ Insert: {
530
+ created_at?: string;
531
+ id?: string;
532
+ name: string;
533
+ product_id: string;
534
+ title?: string | null;
535
+ updated_at?: string;
536
+ };
537
+ Update: {
538
+ created_at?: string;
539
+ id?: string;
540
+ name?: string;
541
+ product_id?: string;
542
+ title?: string | null;
543
+ updated_at?: string;
544
+ };
545
+ Relationships: [
546
+ {
547
+ foreignKeyName: "freemius_plans_product_id_fkey";
548
+ columns: ["product_id"];
549
+ isOneToOne: false;
550
+ referencedRelation: "products";
551
+ referencedColumns: ["id"];
552
+ }
553
+ ];
554
+ };
555
+ freemius_pricing: {
556
+ Row: {
557
+ api_annual_price: number | null;
558
+ api_lifetime_price: number | null;
559
+ api_monthly_price: number | null;
560
+ created_at: string;
561
+ id: string;
562
+ is_active: boolean;
563
+ license_quota: number | null;
564
+ override_annual_price: number | null;
565
+ override_lifetime_price: number | null;
566
+ override_monthly_price: number | null;
567
+ plan_id: string;
568
+ updated_at: string;
569
+ };
570
+ Insert: {
571
+ api_annual_price?: number | null;
572
+ api_lifetime_price?: number | null;
573
+ api_monthly_price?: number | null;
574
+ created_at?: string;
575
+ id?: string;
576
+ is_active?: boolean;
577
+ license_quota?: number | null;
578
+ override_annual_price?: number | null;
579
+ override_lifetime_price?: number | null;
580
+ override_monthly_price?: number | null;
581
+ plan_id: string;
582
+ updated_at?: string;
583
+ };
584
+ Update: {
585
+ api_annual_price?: number | null;
586
+ api_lifetime_price?: number | null;
587
+ api_monthly_price?: number | null;
588
+ created_at?: string;
589
+ id?: string;
590
+ is_active?: boolean;
591
+ license_quota?: number | null;
592
+ override_annual_price?: number | null;
593
+ override_lifetime_price?: number | null;
594
+ override_monthly_price?: number | null;
595
+ plan_id?: string;
596
+ updated_at?: string;
597
+ };
598
+ Relationships: [
599
+ {
600
+ foreignKeyName: "freemius_pricing_plan_id_fkey";
601
+ columns: ["plan_id"];
602
+ isOneToOne: false;
603
+ referencedRelation: "freemius_plans";
604
+ referencedColumns: ["id"];
605
+ }
606
+ ];
607
+ };
608
+ inventory_items: {
609
+ Row: {
610
+ created_at: string;
611
+ quantity: number;
612
+ sku: string;
613
+ updated_at: string;
614
+ };
615
+ Insert: {
616
+ created_at?: string;
617
+ quantity?: number;
618
+ sku: string;
619
+ updated_at?: string;
620
+ };
621
+ Update: {
622
+ created_at?: string;
623
+ quantity?: number;
624
+ sku?: string;
625
+ updated_at?: string;
626
+ };
627
+ Relationships: [];
628
+ };
629
+ languages: {
630
+ Row: {
631
+ code: string;
632
+ created_at: string;
633
+ id: number;
634
+ is_active: boolean | null;
635
+ is_default: boolean;
636
+ name: string;
637
+ updated_at: string;
638
+ };
639
+ Insert: {
640
+ code: string;
641
+ created_at?: string;
642
+ id?: number;
643
+ is_active?: boolean | null;
644
+ is_default?: boolean;
645
+ name: string;
646
+ updated_at?: string;
647
+ };
648
+ Update: {
649
+ code?: string;
650
+ created_at?: string;
651
+ id?: number;
652
+ is_active?: boolean | null;
653
+ is_default?: boolean;
654
+ name?: string;
655
+ updated_at?: string;
656
+ };
657
+ Relationships: [];
658
+ };
659
+ logos: {
660
+ Row: {
661
+ created_at: string;
662
+ id: string;
663
+ media_id: string | null;
664
+ name: string;
665
+ };
666
+ Insert: {
667
+ created_at?: string;
668
+ id?: string;
669
+ media_id?: string | null;
670
+ name: string;
671
+ };
672
+ Update: {
673
+ created_at?: string;
674
+ id?: string;
675
+ media_id?: string | null;
676
+ name?: string;
677
+ };
678
+ Relationships: [
679
+ {
680
+ foreignKeyName: "logos_media_id_fkey";
681
+ columns: ["media_id"];
682
+ isOneToOne: false;
683
+ referencedRelation: "media";
684
+ referencedColumns: ["id"];
685
+ }
686
+ ];
687
+ };
688
+ media: {
689
+ Row: {
690
+ blur_data_url: string | null;
691
+ created_at: string;
692
+ description: string | null;
693
+ file_name: string;
694
+ file_path: string | null;
695
+ file_type: string | null;
696
+ folder: string | null;
697
+ height: number | null;
698
+ id: string;
699
+ object_key: string;
700
+ size_bytes: number | null;
701
+ updated_at: string;
702
+ uploader_id: string | null;
703
+ variants: Json | null;
704
+ width: number | null;
705
+ };
706
+ Insert: {
707
+ blur_data_url?: string | null;
708
+ created_at?: string;
709
+ description?: string | null;
710
+ file_name: string;
711
+ file_path?: string | null;
712
+ file_type?: string | null;
713
+ folder?: string | null;
714
+ height?: number | null;
715
+ id?: string;
716
+ object_key: string;
717
+ size_bytes?: number | null;
718
+ updated_at?: string;
719
+ uploader_id?: string | null;
720
+ variants?: Json | null;
721
+ width?: number | null;
722
+ };
723
+ Update: {
724
+ blur_data_url?: string | null;
725
+ created_at?: string;
726
+ description?: string | null;
727
+ file_name?: string;
728
+ file_path?: string | null;
729
+ file_type?: string | null;
730
+ folder?: string | null;
731
+ height?: number | null;
732
+ id?: string;
733
+ object_key?: string;
734
+ size_bytes?: number | null;
735
+ updated_at?: string;
736
+ uploader_id?: string | null;
737
+ variants?: Json | null;
738
+ width?: number | null;
739
+ };
740
+ Relationships: [
741
+ {
742
+ foreignKeyName: "media_uploader_id_fkey";
743
+ columns: ["uploader_id"];
744
+ isOneToOne: false;
745
+ referencedRelation: "profiles";
746
+ referencedColumns: ["id"];
747
+ }
748
+ ];
749
+ };
750
+ navigation_items: {
751
+ Row: {
752
+ created_at: string;
753
+ id: number;
754
+ label: string;
755
+ language_id: number;
756
+ menu_key: Database["public"]["Enums"]["menu_location"];
757
+ order: number;
758
+ page_id: number | null;
759
+ parent_id: number | null;
760
+ translation_group_id: string;
761
+ updated_at: string;
762
+ url: string;
763
+ };
764
+ Insert: {
765
+ created_at?: string;
766
+ id?: number;
767
+ label: string;
768
+ language_id: number;
769
+ menu_key: Database["public"]["Enums"]["menu_location"];
770
+ order?: number;
771
+ page_id?: number | null;
772
+ parent_id?: number | null;
773
+ translation_group_id?: string;
774
+ updated_at?: string;
775
+ url: string;
776
+ };
777
+ Update: {
778
+ created_at?: string;
779
+ id?: number;
780
+ label?: string;
781
+ language_id?: number;
782
+ menu_key?: Database["public"]["Enums"]["menu_location"];
783
+ order?: number;
784
+ page_id?: number | null;
785
+ parent_id?: number | null;
786
+ translation_group_id?: string;
787
+ updated_at?: string;
788
+ url?: string;
789
+ };
790
+ Relationships: [
791
+ {
792
+ foreignKeyName: "navigation_items_language_id_fkey";
793
+ columns: ["language_id"];
794
+ isOneToOne: false;
795
+ referencedRelation: "languages";
796
+ referencedColumns: ["id"];
797
+ },
798
+ {
799
+ foreignKeyName: "navigation_items_page_id_fkey";
800
+ columns: ["page_id"];
801
+ isOneToOne: false;
802
+ referencedRelation: "pages";
803
+ referencedColumns: ["id"];
804
+ },
805
+ {
806
+ foreignKeyName: "navigation_items_parent_id_fkey";
807
+ columns: ["parent_id"];
808
+ isOneToOne: false;
809
+ referencedRelation: "navigation_items";
810
+ referencedColumns: ["id"];
811
+ }
812
+ ];
813
+ };
814
+ order_items: {
815
+ Row: {
816
+ id: string;
817
+ order_id: string;
818
+ price_at_purchase: number;
819
+ product_id: string | null;
820
+ quantity: number;
821
+ variant_id: string | null;
822
+ };
823
+ Insert: {
824
+ id?: string;
825
+ order_id: string;
826
+ price_at_purchase: number;
827
+ product_id?: string | null;
828
+ quantity: number;
829
+ variant_id?: string | null;
830
+ };
831
+ Update: {
832
+ id?: string;
833
+ order_id?: string;
834
+ price_at_purchase?: number;
835
+ product_id?: string | null;
836
+ quantity?: number;
837
+ variant_id?: string | null;
838
+ };
839
+ Relationships: [
840
+ {
841
+ foreignKeyName: "order_items_order_id_fkey";
842
+ columns: ["order_id"];
843
+ isOneToOne: false;
844
+ referencedRelation: "orders";
845
+ referencedColumns: ["id"];
846
+ },
847
+ {
848
+ foreignKeyName: "order_items_product_id_fkey";
849
+ columns: ["product_id"];
850
+ isOneToOne: false;
851
+ referencedRelation: "products";
852
+ referencedColumns: ["id"];
853
+ },
854
+ {
855
+ foreignKeyName: "order_items_variant_id_fkey";
856
+ columns: ["variant_id"];
857
+ isOneToOne: false;
858
+ referencedRelation: "product_variants";
859
+ referencedColumns: ["id"];
860
+ }
861
+ ];
862
+ };
863
+ orders: {
864
+ Row: {
865
+ coupon_code: string | null;
866
+ coupon_id: string | null;
867
+ created_at: string | null;
868
+ currency: string;
869
+ customer_details: Json | null;
870
+ discount_details: Json | null;
871
+ discount_total: number;
872
+ exchange_rate_at_purchase: number;
873
+ freemius_last_event_type: string | null;
874
+ freemius_last_synced_at: string | null;
875
+ freemius_license_id: string | null;
876
+ freemius_plan_id: string | null;
877
+ freemius_product_id: string | null;
878
+ freemius_subscription_id: string | null;
879
+ freemius_trial_ends_at: string | null;
880
+ freemius_trial_id: string | null;
881
+ freemius_user_id: string | null;
882
+ id: string;
883
+ inventory_deducted_at: string | null;
884
+ invoice_number: string | null;
885
+ paid_at: string | null;
886
+ payment_intent_id: string | null;
887
+ provider: string | null;
888
+ shipping_total: number | null;
889
+ status: string;
890
+ stripe_session_id: string | null;
891
+ subtotal: number | null;
892
+ tax_details: Json | null;
893
+ tax_total: number;
894
+ total: number;
895
+ user_id: string | null;
896
+ };
897
+ Insert: {
898
+ coupon_code?: string | null;
899
+ coupon_id?: string | null;
900
+ created_at?: string | null;
901
+ currency?: string;
902
+ customer_details?: Json | null;
903
+ discount_details?: Json | null;
904
+ discount_total?: number;
905
+ exchange_rate_at_purchase?: number;
906
+ freemius_last_event_type?: string | null;
907
+ freemius_last_synced_at?: string | null;
908
+ freemius_license_id?: string | null;
909
+ freemius_plan_id?: string | null;
910
+ freemius_product_id?: string | null;
911
+ freemius_subscription_id?: string | null;
912
+ freemius_trial_ends_at?: string | null;
913
+ freemius_trial_id?: string | null;
914
+ freemius_user_id?: string | null;
915
+ id?: string;
916
+ inventory_deducted_at?: string | null;
917
+ invoice_number?: string | null;
918
+ paid_at?: string | null;
919
+ payment_intent_id?: string | null;
920
+ provider?: string | null;
921
+ shipping_total?: number | null;
922
+ status?: string;
923
+ stripe_session_id?: string | null;
924
+ subtotal?: number | null;
925
+ tax_details?: Json | null;
926
+ tax_total?: number;
927
+ total: number;
928
+ user_id?: string | null;
929
+ };
930
+ Update: {
931
+ coupon_code?: string | null;
932
+ coupon_id?: string | null;
933
+ created_at?: string | null;
934
+ currency?: string;
935
+ customer_details?: Json | null;
936
+ discount_details?: Json | null;
937
+ discount_total?: number;
938
+ exchange_rate_at_purchase?: number;
939
+ freemius_last_event_type?: string | null;
940
+ freemius_last_synced_at?: string | null;
941
+ freemius_license_id?: string | null;
942
+ freemius_plan_id?: string | null;
943
+ freemius_product_id?: string | null;
944
+ freemius_subscription_id?: string | null;
945
+ freemius_trial_ends_at?: string | null;
946
+ freemius_trial_id?: string | null;
947
+ freemius_user_id?: string | null;
948
+ id?: string;
949
+ inventory_deducted_at?: string | null;
950
+ invoice_number?: string | null;
951
+ paid_at?: string | null;
952
+ payment_intent_id?: string | null;
953
+ provider?: string | null;
954
+ shipping_total?: number | null;
955
+ status?: string;
956
+ stripe_session_id?: string | null;
957
+ subtotal?: number | null;
958
+ tax_details?: Json | null;
959
+ tax_total?: number;
960
+ total?: number;
961
+ user_id?: string | null;
962
+ };
963
+ Relationships: [
964
+ {
965
+ foreignKeyName: "orders_coupon_id_fkey";
966
+ columns: ["coupon_id"];
967
+ isOneToOne: false;
968
+ referencedRelation: "coupons";
969
+ referencedColumns: ["id"];
970
+ }
971
+ ];
972
+ };
973
+ package_activations: {
974
+ Row: {
975
+ created_at: string | null;
976
+ id: string;
977
+ instance_name: string;
978
+ last_validated_at: string | null;
979
+ license_key: string;
980
+ meta: Json | null;
981
+ package_id: string;
982
+ status: string;
983
+ };
984
+ Insert: {
985
+ created_at?: string | null;
986
+ id?: string;
987
+ instance_name: string;
988
+ last_validated_at?: string | null;
989
+ license_key: string;
990
+ meta?: Json | null;
991
+ package_id: string;
992
+ status?: string;
993
+ };
994
+ Update: {
995
+ created_at?: string | null;
996
+ id?: string;
997
+ instance_name?: string;
998
+ last_validated_at?: string | null;
999
+ license_key?: string;
1000
+ meta?: Json | null;
1001
+ package_id?: string;
1002
+ status?: string;
1003
+ };
1004
+ Relationships: [];
1005
+ };
1006
+ page_revisions: {
1007
+ Row: {
1008
+ author_id: string | null;
1009
+ content: Json;
1010
+ created_at: string;
1011
+ id: number;
1012
+ page_id: number;
1013
+ revision_type: Database["public"]["Enums"]["revision_type"];
1014
+ version: number;
1015
+ };
1016
+ Insert: {
1017
+ author_id?: string | null;
1018
+ content: Json;
1019
+ created_at?: string;
1020
+ id?: number;
1021
+ page_id: number;
1022
+ revision_type: Database["public"]["Enums"]["revision_type"];
1023
+ version: number;
1024
+ };
1025
+ Update: {
1026
+ author_id?: string | null;
1027
+ content?: Json;
1028
+ created_at?: string;
1029
+ id?: number;
1030
+ page_id?: number;
1031
+ revision_type?: Database["public"]["Enums"]["revision_type"];
1032
+ version?: number;
1033
+ };
1034
+ Relationships: [
1035
+ {
1036
+ foreignKeyName: "page_revisions_author_id_fkey";
1037
+ columns: ["author_id"];
1038
+ isOneToOne: false;
1039
+ referencedRelation: "profiles";
1040
+ referencedColumns: ["id"];
1041
+ },
1042
+ {
1043
+ foreignKeyName: "page_revisions_page_id_fkey";
1044
+ columns: ["page_id"];
1045
+ isOneToOne: false;
1046
+ referencedRelation: "pages";
1047
+ referencedColumns: ["id"];
1048
+ }
1049
+ ];
1050
+ };
1051
+ pages: {
1052
+ Row: {
1053
+ author_id: string | null;
1054
+ created_at: string;
1055
+ feature_image_id: string | null;
1056
+ id: number;
1057
+ language_id: number;
1058
+ meta_description: string | null;
1059
+ meta_title: string | null;
1060
+ slug: string;
1061
+ status: Database["public"]["Enums"]["page_status"];
1062
+ title: string;
1063
+ translation_group_id: string;
1064
+ updated_at: string;
1065
+ version: number;
1066
+ };
1067
+ Insert: {
1068
+ author_id?: string | null;
1069
+ created_at?: string;
1070
+ feature_image_id?: string | null;
1071
+ id?: number;
1072
+ language_id: number;
1073
+ meta_description?: string | null;
1074
+ meta_title?: string | null;
1075
+ slug: string;
1076
+ status?: Database["public"]["Enums"]["page_status"];
1077
+ title: string;
1078
+ translation_group_id?: string;
1079
+ updated_at?: string;
1080
+ version?: number;
1081
+ };
1082
+ Update: {
1083
+ author_id?: string | null;
1084
+ created_at?: string;
1085
+ feature_image_id?: string | null;
1086
+ id?: number;
1087
+ language_id?: number;
1088
+ meta_description?: string | null;
1089
+ meta_title?: string | null;
1090
+ slug?: string;
1091
+ status?: Database["public"]["Enums"]["page_status"];
1092
+ title?: string;
1093
+ translation_group_id?: string;
1094
+ updated_at?: string;
1095
+ version?: number;
1096
+ };
1097
+ Relationships: [
1098
+ {
1099
+ foreignKeyName: "pages_author_id_fkey";
1100
+ columns: ["author_id"];
1101
+ isOneToOne: false;
1102
+ referencedRelation: "profiles";
1103
+ referencedColumns: ["id"];
1104
+ },
1105
+ {
1106
+ foreignKeyName: "pages_feature_image_id_fkey";
1107
+ columns: ["feature_image_id"];
1108
+ isOneToOne: false;
1109
+ referencedRelation: "media";
1110
+ referencedColumns: ["id"];
1111
+ },
1112
+ {
1113
+ foreignKeyName: "pages_language_id_fkey";
1114
+ columns: ["language_id"];
1115
+ isOneToOne: false;
1116
+ referencedRelation: "languages";
1117
+ referencedColumns: ["id"];
1118
+ }
1119
+ ];
1120
+ };
1121
+ post_revisions: {
1122
+ Row: {
1123
+ author_id: string | null;
1124
+ content: Json;
1125
+ created_at: string;
1126
+ id: number;
1127
+ post_id: number;
1128
+ revision_type: Database["public"]["Enums"]["revision_type"];
1129
+ version: number;
1130
+ };
1131
+ Insert: {
1132
+ author_id?: string | null;
1133
+ content: Json;
1134
+ created_at?: string;
1135
+ id?: number;
1136
+ post_id: number;
1137
+ revision_type: Database["public"]["Enums"]["revision_type"];
1138
+ version: number;
1139
+ };
1140
+ Update: {
1141
+ author_id?: string | null;
1142
+ content?: Json;
1143
+ created_at?: string;
1144
+ id?: number;
1145
+ post_id?: number;
1146
+ revision_type?: Database["public"]["Enums"]["revision_type"];
1147
+ version?: number;
1148
+ };
1149
+ Relationships: [
1150
+ {
1151
+ foreignKeyName: "post_revisions_author_id_fkey";
1152
+ columns: ["author_id"];
1153
+ isOneToOne: false;
1154
+ referencedRelation: "profiles";
1155
+ referencedColumns: ["id"];
1156
+ },
1157
+ {
1158
+ foreignKeyName: "post_revisions_post_id_fkey";
1159
+ columns: ["post_id"];
1160
+ isOneToOne: false;
1161
+ referencedRelation: "posts";
1162
+ referencedColumns: ["id"];
1163
+ }
1164
+ ];
1165
+ };
1166
+ posts: {
1167
+ Row: {
1168
+ author_id: string | null;
1169
+ created_at: string;
1170
+ excerpt: string | null;
1171
+ feature_image_id: string | null;
1172
+ id: number;
1173
+ label: string | null;
1174
+ language_id: number;
1175
+ meta_description: string | null;
1176
+ meta_title: string | null;
1177
+ published_at: string | null;
1178
+ slug: string;
1179
+ status: Database["public"]["Enums"]["page_status"];
1180
+ subtitle: string | null;
1181
+ title: string;
1182
+ translation_group_id: string;
1183
+ updated_at: string;
1184
+ version: number;
1185
+ };
1186
+ Insert: {
1187
+ author_id?: string | null;
1188
+ created_at?: string;
1189
+ excerpt?: string | null;
1190
+ feature_image_id?: string | null;
1191
+ id?: number;
1192
+ label?: string | null;
1193
+ language_id: number;
1194
+ meta_description?: string | null;
1195
+ meta_title?: string | null;
1196
+ published_at?: string | null;
1197
+ slug: string;
1198
+ status?: Database["public"]["Enums"]["page_status"];
1199
+ subtitle?: string | null;
1200
+ title: string;
1201
+ translation_group_id?: string;
1202
+ updated_at?: string;
1203
+ version?: number;
1204
+ };
1205
+ Update: {
1206
+ author_id?: string | null;
1207
+ created_at?: string;
1208
+ excerpt?: string | null;
1209
+ feature_image_id?: string | null;
1210
+ id?: number;
1211
+ label?: string | null;
1212
+ language_id?: number;
1213
+ meta_description?: string | null;
1214
+ meta_title?: string | null;
1215
+ published_at?: string | null;
1216
+ slug?: string;
1217
+ status?: Database["public"]["Enums"]["page_status"];
1218
+ subtitle?: string | null;
1219
+ title?: string;
1220
+ translation_group_id?: string;
1221
+ updated_at?: string;
1222
+ version?: number;
1223
+ };
1224
+ Relationships: [
1225
+ {
1226
+ foreignKeyName: "posts_author_id_fkey";
1227
+ columns: ["author_id"];
1228
+ isOneToOne: false;
1229
+ referencedRelation: "profiles";
1230
+ referencedColumns: ["id"];
1231
+ },
1232
+ {
1233
+ foreignKeyName: "posts_feature_image_id_fkey";
1234
+ columns: ["feature_image_id"];
1235
+ isOneToOne: false;
1236
+ referencedRelation: "media";
1237
+ referencedColumns: ["id"];
1238
+ },
1239
+ {
1240
+ foreignKeyName: "posts_language_id_fkey";
1241
+ columns: ["language_id"];
1242
+ isOneToOne: false;
1243
+ referencedRelation: "languages";
1244
+ referencedColumns: ["id"];
1245
+ }
1246
+ ];
1247
+ };
1248
+ privacy_consent_logs: {
1249
+ Row: {
1250
+ categories: Json;
1251
+ consent_token: string;
1252
+ created_at: string;
1253
+ id: string;
1254
+ ip_masked: string | null;
1255
+ user_agent: string | null;
1256
+ };
1257
+ Insert: {
1258
+ categories?: Json;
1259
+ consent_token: string;
1260
+ created_at?: string;
1261
+ id?: string;
1262
+ ip_masked?: string | null;
1263
+ user_agent?: string | null;
1264
+ };
1265
+ Update: {
1266
+ categories?: Json;
1267
+ consent_token?: string;
1268
+ created_at?: string;
1269
+ id?: string;
1270
+ ip_masked?: string | null;
1271
+ user_agent?: string | null;
1272
+ };
1273
+ Relationships: [];
1274
+ };
1275
+ product_attribute_terms: {
1276
+ Row: {
1277
+ attribute_id: string;
1278
+ created_at: string | null;
1279
+ id: string;
1280
+ slug: string;
1281
+ sort_order: number;
1282
+ updated_at: string | null;
1283
+ value: string;
1284
+ value_translations: Json;
1285
+ };
1286
+ Insert: {
1287
+ attribute_id: string;
1288
+ created_at?: string | null;
1289
+ id?: string;
1290
+ slug: string;
1291
+ sort_order?: number;
1292
+ updated_at?: string | null;
1293
+ value: string;
1294
+ value_translations?: Json;
1295
+ };
1296
+ Update: {
1297
+ attribute_id?: string;
1298
+ created_at?: string | null;
1299
+ id?: string;
1300
+ slug?: string;
1301
+ sort_order?: number;
1302
+ updated_at?: string | null;
1303
+ value?: string;
1304
+ value_translations?: Json;
1305
+ };
1306
+ Relationships: [
1307
+ {
1308
+ foreignKeyName: "product_attribute_terms_attribute_id_fkey";
1309
+ columns: ["attribute_id"];
1310
+ isOneToOne: false;
1311
+ referencedRelation: "product_attributes";
1312
+ referencedColumns: ["id"];
1313
+ }
1314
+ ];
1315
+ };
1316
+ product_attributes: {
1317
+ Row: {
1318
+ created_at: string | null;
1319
+ id: string;
1320
+ name: string;
1321
+ name_translations: Json;
1322
+ slug: string;
1323
+ updated_at: string | null;
1324
+ };
1325
+ Insert: {
1326
+ created_at?: string | null;
1327
+ id?: string;
1328
+ name: string;
1329
+ name_translations?: Json;
1330
+ slug: string;
1331
+ updated_at?: string | null;
1332
+ };
1333
+ Update: {
1334
+ created_at?: string | null;
1335
+ id?: string;
1336
+ name?: string;
1337
+ name_translations?: Json;
1338
+ slug?: string;
1339
+ updated_at?: string | null;
1340
+ };
1341
+ Relationships: [];
1342
+ };
1343
+ product_categories: {
1344
+ Row: {
1345
+ category_id: string;
1346
+ product_id: string;
1347
+ };
1348
+ Insert: {
1349
+ category_id: string;
1350
+ product_id: string;
1351
+ };
1352
+ Update: {
1353
+ category_id?: string;
1354
+ product_id?: string;
1355
+ };
1356
+ Relationships: [
1357
+ {
1358
+ foreignKeyName: "product_categories_category_id_fkey";
1359
+ columns: ["category_id"];
1360
+ isOneToOne: false;
1361
+ referencedRelation: "categories";
1362
+ referencedColumns: ["id"];
1363
+ },
1364
+ {
1365
+ foreignKeyName: "product_categories_product_id_fkey";
1366
+ columns: ["product_id"];
1367
+ isOneToOne: false;
1368
+ referencedRelation: "products";
1369
+ referencedColumns: ["id"];
1370
+ }
1371
+ ];
1372
+ };
1373
+ product_drafts: {
1374
+ Row: {
1375
+ author_id: string | null;
1376
+ blocks: Json;
1377
+ created_at: string;
1378
+ id: number;
1379
+ meta: Json;
1380
+ product_id: string;
1381
+ updated_at: string;
1382
+ };
1383
+ Insert: {
1384
+ author_id?: string | null;
1385
+ blocks?: Json;
1386
+ created_at?: string;
1387
+ id?: number;
1388
+ meta?: Json;
1389
+ product_id: string;
1390
+ updated_at?: string;
1391
+ };
1392
+ Update: {
1393
+ author_id?: string | null;
1394
+ blocks?: Json;
1395
+ created_at?: string;
1396
+ id?: number;
1397
+ meta?: Json;
1398
+ product_id?: string;
1399
+ updated_at?: string;
1400
+ };
1401
+ Relationships: [
1402
+ {
1403
+ foreignKeyName: "product_drafts_author_id_fkey";
1404
+ columns: ["author_id"];
1405
+ isOneToOne: false;
1406
+ referencedRelation: "profiles";
1407
+ referencedColumns: ["id"];
1408
+ },
1409
+ {
1410
+ foreignKeyName: "product_drafts_product_id_fkey";
1411
+ columns: ["product_id"];
1412
+ isOneToOne: true;
1413
+ referencedRelation: "products";
1414
+ referencedColumns: ["id"];
1415
+ }
1416
+ ];
1417
+ };
1418
+ product_freemius_sale_coupons: {
1419
+ Row: {
1420
+ created_at: string;
1421
+ discount_percent: number | null;
1422
+ ends_at: string | null;
1423
+ freemius_coupon_code: string;
1424
+ freemius_coupon_id: string | null;
1425
+ freemius_plan_id: string | null;
1426
+ freemius_product_id: string;
1427
+ id: string;
1428
+ is_active: boolean;
1429
+ last_synced_at: string | null;
1430
+ product_id: string;
1431
+ remote_payload: Json | null;
1432
+ starts_at: string | null;
1433
+ sync_error: string | null;
1434
+ sync_status: string;
1435
+ updated_at: string;
1436
+ };
1437
+ Insert: {
1438
+ created_at?: string;
1439
+ discount_percent?: number | null;
1440
+ ends_at?: string | null;
1441
+ freemius_coupon_code: string;
1442
+ freemius_coupon_id?: string | null;
1443
+ freemius_plan_id?: string | null;
1444
+ freemius_product_id: string;
1445
+ id?: string;
1446
+ is_active?: boolean;
1447
+ last_synced_at?: string | null;
1448
+ product_id: string;
1449
+ remote_payload?: Json | null;
1450
+ starts_at?: string | null;
1451
+ sync_error?: string | null;
1452
+ sync_status?: string;
1453
+ updated_at?: string;
1454
+ };
1455
+ Update: {
1456
+ created_at?: string;
1457
+ discount_percent?: number | null;
1458
+ ends_at?: string | null;
1459
+ freemius_coupon_code?: string;
1460
+ freemius_coupon_id?: string | null;
1461
+ freemius_plan_id?: string | null;
1462
+ freemius_product_id?: string;
1463
+ id?: string;
1464
+ is_active?: boolean;
1465
+ last_synced_at?: string | null;
1466
+ product_id?: string;
1467
+ remote_payload?: Json | null;
1468
+ starts_at?: string | null;
1469
+ sync_error?: string | null;
1470
+ sync_status?: string;
1471
+ updated_at?: string;
1472
+ };
1473
+ Relationships: [
1474
+ {
1475
+ foreignKeyName: "product_freemius_sale_coupons_product_id_fkey";
1476
+ columns: ["product_id"];
1477
+ isOneToOne: true;
1478
+ referencedRelation: "products";
1479
+ referencedColumns: ["id"];
1480
+ }
1481
+ ];
1482
+ };
1483
+ product_media: {
1484
+ Row: {
1485
+ media_id: string;
1486
+ product_id: string;
1487
+ sort_order: number | null;
1488
+ };
1489
+ Insert: {
1490
+ media_id: string;
1491
+ product_id: string;
1492
+ sort_order?: number | null;
1493
+ };
1494
+ Update: {
1495
+ media_id?: string;
1496
+ product_id?: string;
1497
+ sort_order?: number | null;
1498
+ };
1499
+ Relationships: [
1500
+ {
1501
+ foreignKeyName: "product_media_media_id_fkey";
1502
+ columns: ["media_id"];
1503
+ isOneToOne: false;
1504
+ referencedRelation: "media";
1505
+ referencedColumns: ["id"];
1506
+ },
1507
+ {
1508
+ foreignKeyName: "product_media_product_id_fkey";
1509
+ columns: ["product_id"];
1510
+ isOneToOne: false;
1511
+ referencedRelation: "products";
1512
+ referencedColumns: ["id"];
1513
+ }
1514
+ ];
1515
+ };
1516
+ product_variants: {
1517
+ Row: {
1518
+ created_at: string | null;
1519
+ id: string;
1520
+ main_media_id: string | null;
1521
+ price: number;
1522
+ price_adjustment: number;
1523
+ prices: Json;
1524
+ product_id: string;
1525
+ sale_end_at: string | null;
1526
+ sale_price: number | null;
1527
+ sale_prices: Json | null;
1528
+ sale_start_at: string | null;
1529
+ scheduled_price: number | null;
1530
+ scheduled_price_at: string | null;
1531
+ scheduled_prices: Json | null;
1532
+ sku: string;
1533
+ stock_quantity: number;
1534
+ upc: string | null;
1535
+ updated_at: string | null;
1536
+ };
1537
+ Insert: {
1538
+ created_at?: string | null;
1539
+ id?: string;
1540
+ main_media_id?: string | null;
1541
+ price?: number;
1542
+ price_adjustment?: number;
1543
+ prices?: Json;
1544
+ product_id: string;
1545
+ sale_end_at?: string | null;
1546
+ sale_price?: number | null;
1547
+ sale_prices?: Json | null;
1548
+ sale_start_at?: string | null;
1549
+ scheduled_price?: number | null;
1550
+ scheduled_price_at?: string | null;
1551
+ scheduled_prices?: Json | null;
1552
+ sku: string;
1553
+ stock_quantity?: number;
1554
+ upc?: string | null;
1555
+ updated_at?: string | null;
1556
+ };
1557
+ Update: {
1558
+ created_at?: string | null;
1559
+ id?: string;
1560
+ main_media_id?: string | null;
1561
+ price?: number;
1562
+ price_adjustment?: number;
1563
+ prices?: Json;
1564
+ product_id?: string;
1565
+ sale_end_at?: string | null;
1566
+ sale_price?: number | null;
1567
+ sale_prices?: Json | null;
1568
+ sale_start_at?: string | null;
1569
+ scheduled_price?: number | null;
1570
+ scheduled_price_at?: string | null;
1571
+ scheduled_prices?: Json | null;
1572
+ sku?: string;
1573
+ stock_quantity?: number;
1574
+ upc?: string | null;
1575
+ updated_at?: string | null;
1576
+ };
1577
+ Relationships: [
1578
+ {
1579
+ foreignKeyName: "product_variants_main_media_id_fkey";
1580
+ columns: ["main_media_id"];
1581
+ isOneToOne: false;
1582
+ referencedRelation: "media";
1583
+ referencedColumns: ["id"];
1584
+ },
1585
+ {
1586
+ foreignKeyName: "product_variants_product_id_fkey";
1587
+ columns: ["product_id"];
1588
+ isOneToOne: false;
1589
+ referencedRelation: "products";
1590
+ referencedColumns: ["id"];
1591
+ }
1592
+ ];
1593
+ };
1594
+ products: {
1595
+ Row: {
1596
+ created_at: string | null;
1597
+ description_json: Json | null;
1598
+ freemius_plan_id: string | null;
1599
+ freemius_product_id: string | null;
1600
+ id: string;
1601
+ is_taxable: boolean;
1602
+ language_id: number;
1603
+ meta_description: string | null;
1604
+ meta_title: string | null;
1605
+ metadata: Json | null;
1606
+ payment_provider: string;
1607
+ price: number;
1608
+ prices: Json;
1609
+ product_type: string;
1610
+ sale_end_at: string | null;
1611
+ sale_price: number | null;
1612
+ sale_prices: Json | null;
1613
+ sale_start_at: string | null;
1614
+ scheduled_price: number | null;
1615
+ scheduled_price_at: string | null;
1616
+ scheduled_prices: Json | null;
1617
+ short_description: string | null;
1618
+ sku: string;
1619
+ slug: string;
1620
+ status: string;
1621
+ stock: number | null;
1622
+ title: string;
1623
+ translation_group_id: string;
1624
+ trial_period_days: number;
1625
+ trial_requires_payment_method: boolean;
1626
+ upc: string | null;
1627
+ updated_at: string | null;
1628
+ };
1629
+ Insert: {
1630
+ created_at?: string | null;
1631
+ description_json?: Json | null;
1632
+ freemius_plan_id?: string | null;
1633
+ freemius_product_id?: string | null;
1634
+ id?: string;
1635
+ is_taxable?: boolean;
1636
+ language_id: number;
1637
+ meta_description?: string | null;
1638
+ meta_title?: string | null;
1639
+ metadata?: Json | null;
1640
+ payment_provider: string;
1641
+ price: number;
1642
+ prices?: Json;
1643
+ product_type: string;
1644
+ sale_end_at?: string | null;
1645
+ sale_price?: number | null;
1646
+ sale_prices?: Json | null;
1647
+ sale_start_at?: string | null;
1648
+ scheduled_price?: number | null;
1649
+ scheduled_price_at?: string | null;
1650
+ scheduled_prices?: Json | null;
1651
+ short_description?: string | null;
1652
+ sku: string;
1653
+ slug: string;
1654
+ status?: string;
1655
+ stock?: number | null;
1656
+ title: string;
1657
+ translation_group_id?: string;
1658
+ trial_period_days?: number;
1659
+ trial_requires_payment_method?: boolean;
1660
+ upc?: string | null;
1661
+ updated_at?: string | null;
1662
+ };
1663
+ Update: {
1664
+ created_at?: string | null;
1665
+ description_json?: Json | null;
1666
+ freemius_plan_id?: string | null;
1667
+ freemius_product_id?: string | null;
1668
+ id?: string;
1669
+ is_taxable?: boolean;
1670
+ language_id?: number;
1671
+ meta_description?: string | null;
1672
+ meta_title?: string | null;
1673
+ metadata?: Json | null;
1674
+ payment_provider?: string;
1675
+ price?: number;
1676
+ prices?: Json;
1677
+ product_type?: string;
1678
+ sale_end_at?: string | null;
1679
+ sale_price?: number | null;
1680
+ sale_prices?: Json | null;
1681
+ sale_start_at?: string | null;
1682
+ scheduled_price?: number | null;
1683
+ scheduled_price_at?: string | null;
1684
+ scheduled_prices?: Json | null;
1685
+ short_description?: string | null;
1686
+ sku?: string;
1687
+ slug?: string;
1688
+ status?: string;
1689
+ stock?: number | null;
1690
+ title?: string;
1691
+ translation_group_id?: string;
1692
+ trial_period_days?: number;
1693
+ trial_requires_payment_method?: boolean;
1694
+ upc?: string | null;
1695
+ updated_at?: string | null;
1696
+ };
1697
+ Relationships: [
1698
+ {
1699
+ foreignKeyName: "products_language_id_fkey";
1700
+ columns: ["language_id"];
1701
+ isOneToOne: false;
1702
+ referencedRelation: "languages";
1703
+ referencedColumns: ["id"];
1704
+ }
1705
+ ];
1706
+ };
1707
+ profiles: {
1708
+ Row: {
1709
+ avatar_url: string | null;
1710
+ full_name: string | null;
1711
+ github_username: string | null;
1712
+ id: string;
1713
+ phone: string | null;
1714
+ role: Database["public"]["Enums"]["user_role"];
1715
+ updated_at: string | null;
1716
+ website: string | null;
1717
+ };
1718
+ Insert: {
1719
+ avatar_url?: string | null;
1720
+ full_name?: string | null;
1721
+ github_username?: string | null;
1722
+ id: string;
1723
+ phone?: string | null;
1724
+ role?: Database["public"]["Enums"]["user_role"];
1725
+ updated_at?: string | null;
1726
+ website?: string | null;
1727
+ };
1728
+ Update: {
1729
+ avatar_url?: string | null;
1730
+ full_name?: string | null;
1731
+ github_username?: string | null;
1732
+ id?: string;
1733
+ phone?: string | null;
1734
+ role?: Database["public"]["Enums"]["user_role"];
1735
+ updated_at?: string | null;
1736
+ website?: string | null;
1737
+ };
1738
+ Relationships: [];
1739
+ };
1740
+ shipping_zone_locations: {
1741
+ Row: {
1742
+ country_code: string;
1743
+ created_at: string | null;
1744
+ id: string;
1745
+ postal_code: string | null;
1746
+ state_code: string | null;
1747
+ zone_id: string;
1748
+ };
1749
+ Insert: {
1750
+ country_code: string;
1751
+ created_at?: string | null;
1752
+ id?: string;
1753
+ postal_code?: string | null;
1754
+ state_code?: string | null;
1755
+ zone_id: string;
1756
+ };
1757
+ Update: {
1758
+ country_code?: string;
1759
+ created_at?: string | null;
1760
+ id?: string;
1761
+ postal_code?: string | null;
1762
+ state_code?: string | null;
1763
+ zone_id?: string;
1764
+ };
1765
+ Relationships: [
1766
+ {
1767
+ foreignKeyName: "shipping_zone_locations_zone_id_fkey";
1768
+ columns: ["zone_id"];
1769
+ isOneToOne: false;
1770
+ referencedRelation: "shipping_zones";
1771
+ referencedColumns: ["id"];
1772
+ }
1773
+ ];
1774
+ };
1775
+ shipping_zone_methods: {
1776
+ Row: {
1777
+ cost_amount: number;
1778
+ cost_amounts: Json;
1779
+ cost_currency: string;
1780
+ created_at: string | null;
1781
+ currency_pricing_mode: string;
1782
+ id: string;
1783
+ method_type: string;
1784
+ min_order_amount: number;
1785
+ min_order_amounts: Json;
1786
+ name: string;
1787
+ name_translations: Json;
1788
+ updated_at: string | null;
1789
+ zone_id: string;
1790
+ };
1791
+ Insert: {
1792
+ cost_amount?: number;
1793
+ cost_amounts?: Json;
1794
+ cost_currency?: string;
1795
+ created_at?: string | null;
1796
+ currency_pricing_mode?: string;
1797
+ id?: string;
1798
+ method_type: string;
1799
+ min_order_amount?: number;
1800
+ min_order_amounts?: Json;
1801
+ name: string;
1802
+ name_translations?: Json;
1803
+ updated_at?: string | null;
1804
+ zone_id: string;
1805
+ };
1806
+ Update: {
1807
+ cost_amount?: number;
1808
+ cost_amounts?: Json;
1809
+ cost_currency?: string;
1810
+ created_at?: string | null;
1811
+ currency_pricing_mode?: string;
1812
+ id?: string;
1813
+ method_type?: string;
1814
+ min_order_amount?: number;
1815
+ min_order_amounts?: Json;
1816
+ name?: string;
1817
+ name_translations?: Json;
1818
+ updated_at?: string | null;
1819
+ zone_id?: string;
1820
+ };
1821
+ Relationships: [
1822
+ {
1823
+ foreignKeyName: "shipping_zone_methods_zone_id_fkey";
1824
+ columns: ["zone_id"];
1825
+ isOneToOne: false;
1826
+ referencedRelation: "shipping_zones";
1827
+ referencedColumns: ["id"];
1828
+ }
1829
+ ];
1830
+ };
1831
+ shipping_zones: {
1832
+ Row: {
1833
+ created_at: string | null;
1834
+ id: string;
1835
+ name: string;
1836
+ priority_order: number;
1837
+ updated_at: string | null;
1838
+ };
1839
+ Insert: {
1840
+ created_at?: string | null;
1841
+ id?: string;
1842
+ name: string;
1843
+ priority_order?: number;
1844
+ updated_at?: string | null;
1845
+ };
1846
+ Update: {
1847
+ created_at?: string | null;
1848
+ id?: string;
1849
+ name?: string;
1850
+ priority_order?: number;
1851
+ updated_at?: string | null;
1852
+ };
1853
+ Relationships: [];
1854
+ };
1855
+ site_settings: {
1856
+ Row: {
1857
+ key: string;
1858
+ value: Json | null;
1859
+ };
1860
+ Insert: {
1861
+ key: string;
1862
+ value?: Json | null;
1863
+ };
1864
+ Update: {
1865
+ key?: string;
1866
+ value?: Json | null;
1867
+ };
1868
+ Relationships: [];
1869
+ };
1870
+ system_configuration: {
1871
+ Row: {
1872
+ auto_accept_signups: boolean;
1873
+ id: number;
1874
+ settings: Json;
1875
+ updated_at: string;
1876
+ };
1877
+ Insert: {
1878
+ auto_accept_signups?: boolean;
1879
+ id?: number;
1880
+ settings?: Json;
1881
+ updated_at?: string;
1882
+ };
1883
+ Update: {
1884
+ auto_accept_signups?: boolean;
1885
+ id?: number;
1886
+ settings?: Json;
1887
+ updated_at?: string;
1888
+ };
1889
+ Relationships: [];
1890
+ };
1891
+ tax_rates: {
1892
+ Row: {
1893
+ country_code: string;
1894
+ created_at: string;
1895
+ id: string;
1896
+ state_code: string | null;
1897
+ tax_name: string;
1898
+ tax_rate: number;
1899
+ updated_at: string;
1900
+ };
1901
+ Insert: {
1902
+ country_code: string;
1903
+ created_at?: string;
1904
+ id?: string;
1905
+ state_code?: string | null;
1906
+ tax_name: string;
1907
+ tax_rate: number;
1908
+ updated_at?: string;
1909
+ };
1910
+ Update: {
1911
+ country_code?: string;
1912
+ created_at?: string;
1913
+ id?: string;
1914
+ state_code?: string | null;
1915
+ tax_name?: string;
1916
+ tax_rate?: number;
1917
+ updated_at?: string;
1918
+ };
1919
+ Relationships: [];
1920
+ };
1921
+ translations: {
1922
+ Row: {
1923
+ created_at: string;
1924
+ key: string;
1925
+ translations: Json;
1926
+ updated_at: string;
1927
+ };
1928
+ Insert: {
1929
+ created_at?: string;
1930
+ key: string;
1931
+ translations: Json;
1932
+ updated_at?: string;
1933
+ };
1934
+ Update: {
1935
+ created_at?: string;
1936
+ key?: string;
1937
+ translations?: Json;
1938
+ updated_at?: string;
1939
+ };
1940
+ Relationships: [];
1941
+ };
1942
+ ucp_cart_sessions: {
1943
+ Row: {
1944
+ attribution: Json;
1945
+ buyer_identity: Json;
1946
+ checkout_url: string | null;
1947
+ context: Json;
1948
+ created_at: string;
1949
+ currency: string;
1950
+ expires_at: string;
1951
+ id: string;
1952
+ line_items: Json;
1953
+ locale: string | null;
1954
+ metadata: Json;
1955
+ signals: Json;
1956
+ status: string;
1957
+ totals: Json;
1958
+ updated_at: string;
1959
+ };
1960
+ Insert: {
1961
+ attribution?: Json;
1962
+ buyer_identity?: Json;
1963
+ checkout_url?: string | null;
1964
+ context?: Json;
1965
+ created_at?: string;
1966
+ currency?: string;
1967
+ expires_at?: string;
1968
+ id?: string;
1969
+ line_items?: Json;
1970
+ locale?: string | null;
1971
+ metadata?: Json;
1972
+ signals?: Json;
1973
+ status?: string;
1974
+ totals?: Json;
1975
+ updated_at?: string;
1976
+ };
1977
+ Update: {
1978
+ attribution?: Json;
1979
+ buyer_identity?: Json;
1980
+ checkout_url?: string | null;
1981
+ context?: Json;
1982
+ created_at?: string;
1983
+ currency?: string;
1984
+ expires_at?: string;
1985
+ id?: string;
1986
+ line_items?: Json;
1987
+ locale?: string | null;
1988
+ metadata?: Json;
1989
+ signals?: Json;
1990
+ status?: string;
1991
+ totals?: Json;
1992
+ updated_at?: string;
1993
+ };
1994
+ Relationships: [];
1995
+ };
1996
+ user_addresses: {
1997
+ Row: {
1998
+ address_type: string;
1999
+ city: string | null;
2000
+ company_name: string | null;
2001
+ country_code: string | null;
2002
+ created_at: string;
2003
+ id: string;
2004
+ is_default: boolean;
2005
+ line1: string | null;
2006
+ line2: string | null;
2007
+ postal_code: string | null;
2008
+ recipient_name: string | null;
2009
+ state: string | null;
2010
+ updated_at: string;
2011
+ user_id: string;
2012
+ };
2013
+ Insert: {
2014
+ address_type: string;
2015
+ city?: string | null;
2016
+ company_name?: string | null;
2017
+ country_code?: string | null;
2018
+ created_at?: string;
2019
+ id?: string;
2020
+ is_default?: boolean;
2021
+ line1?: string | null;
2022
+ line2?: string | null;
2023
+ postal_code?: string | null;
2024
+ recipient_name?: string | null;
2025
+ state?: string | null;
2026
+ updated_at?: string;
2027
+ user_id: string;
2028
+ };
2029
+ Update: {
2030
+ address_type?: string;
2031
+ city?: string | null;
2032
+ company_name?: string | null;
2033
+ country_code?: string | null;
2034
+ created_at?: string;
2035
+ id?: string;
2036
+ is_default?: boolean;
2037
+ line1?: string | null;
2038
+ line2?: string | null;
2039
+ postal_code?: string | null;
2040
+ recipient_name?: string | null;
2041
+ state?: string | null;
2042
+ updated_at?: string;
2043
+ user_id?: string;
2044
+ };
2045
+ Relationships: [
2046
+ {
2047
+ foreignKeyName: "user_addresses_user_id_fkey";
2048
+ columns: ["user_id"];
2049
+ isOneToOne: false;
2050
+ referencedRelation: "profiles";
2051
+ referencedColumns: ["id"];
2052
+ }
2053
+ ];
2054
+ };
2055
+ user_security_settings: {
2056
+ Row: {
2057
+ mfa_enabled: boolean;
2058
+ mfa_type: string | null;
2059
+ updated_at: string;
2060
+ user_id: string;
2061
+ };
2062
+ Insert: {
2063
+ mfa_enabled?: boolean;
2064
+ mfa_type?: string | null;
2065
+ updated_at?: string;
2066
+ user_id: string;
2067
+ };
2068
+ Update: {
2069
+ mfa_enabled?: boolean;
2070
+ mfa_type?: string | null;
2071
+ updated_at?: string;
2072
+ user_id?: string;
2073
+ };
2074
+ Relationships: [];
2075
+ };
2076
+ user_trusted_devices: {
2077
+ Row: {
2078
+ browser_metadata: string | null;
2079
+ created_at: string;
2080
+ device_hash: string;
2081
+ expires_at: string;
2082
+ id: string;
2083
+ user_id: string;
2084
+ };
2085
+ Insert: {
2086
+ browser_metadata?: string | null;
2087
+ created_at?: string;
2088
+ device_hash: string;
2089
+ expires_at: string;
2090
+ id?: string;
2091
+ user_id: string;
2092
+ };
2093
+ Update: {
2094
+ browser_metadata?: string | null;
2095
+ created_at?: string;
2096
+ device_hash?: string;
2097
+ expires_at?: string;
2098
+ id?: string;
2099
+ user_id?: string;
2100
+ };
2101
+ Relationships: [];
2102
+ };
2103
+ variant_attribute_mapping: {
2104
+ Row: {
2105
+ attribute_term_id: string;
2106
+ variant_id: string;
2107
+ };
2108
+ Insert: {
2109
+ attribute_term_id: string;
2110
+ variant_id: string;
2111
+ };
2112
+ Update: {
2113
+ attribute_term_id?: string;
2114
+ variant_id?: string;
2115
+ };
2116
+ Relationships: [
2117
+ {
2118
+ foreignKeyName: "variant_attribute_mapping_attribute_term_id_fkey";
2119
+ columns: ["attribute_term_id"];
2120
+ isOneToOne: false;
2121
+ referencedRelation: "product_attribute_terms";
2122
+ referencedColumns: ["id"];
2123
+ },
2124
+ {
2125
+ foreignKeyName: "variant_attribute_mapping_variant_id_fkey";
2126
+ columns: ["variant_id"];
2127
+ isOneToOne: false;
2128
+ referencedRelation: "product_variants";
2129
+ referencedColumns: ["id"];
2130
+ }
2131
+ ];
2132
+ };
2133
+ };
2134
+ Views: {
2135
+ [_ in never]: never;
2136
+ };
2137
+ Functions: {
2138
+ apply_order_inventory_deduction: {
2139
+ Args: {
2140
+ p_order_id: string;
2141
+ };
2142
+ Returns: undefined;
2143
+ };
2144
+ assign_order_invoice_metadata: {
2145
+ Args: {
2146
+ p_order_id: string;
2147
+ p_paid_at?: string;
2148
+ };
2149
+ Returns: {
2150
+ invoice_number: string;
2151
+ paid_at: string;
2152
+ }[];
2153
+ };
2154
+ clear_currency_price_overrides: {
2155
+ Args: {
2156
+ target_currency: string;
2157
+ };
2158
+ Returns: undefined;
2159
+ };
2160
+ duplicate_block_definition: {
2161
+ Args: {
2162
+ target_id: string;
2163
+ };
2164
+ Returns: {
2165
+ description: string;
2166
+ fields: Json;
2167
+ id: string;
2168
+ is_original: boolean;
2169
+ layout_schema: Json;
2170
+ name: string;
2171
+ slug: string;
2172
+ };
2173
+ SetofOptions: {
2174
+ from: "*";
2175
+ to: "custom_block_definitions";
2176
+ isOneToOne: true;
2177
+ isSetofReturn: false;
2178
+ };
2179
+ };
2180
+ format_order_invoice_number: {
2181
+ Args: {
2182
+ p_value: number;
2183
+ };
2184
+ Returns: string;
2185
+ };
2186
+ generate_order_invoice_number: {
2187
+ Args: never;
2188
+ Returns: string;
2189
+ };
2190
+ get_current_user_role: {
2191
+ Args: never;
2192
+ Returns: Database["public"]["Enums"]["user_role"];
2193
+ };
2194
+ get_default_currency_code: {
2195
+ Args: never;
2196
+ Returns: string;
2197
+ };
2198
+ get_ecommerce_track_quantities: {
2199
+ Args: never;
2200
+ Returns: boolean;
2201
+ };
2202
+ get_my_claim: {
2203
+ Args: {
2204
+ claim: string;
2205
+ };
2206
+ Returns: Json;
2207
+ };
2208
+ is_admin: {
2209
+ Args: never;
2210
+ Returns: boolean;
2211
+ };
2212
+ is_valid_currency_amount_map: {
2213
+ Args: {
2214
+ amounts: Json;
2215
+ };
2216
+ Returns: boolean;
2217
+ };
2218
+ is_valid_custom_block_fields: {
2219
+ Args: {
2220
+ candidate: Json;
2221
+ };
2222
+ Returns: boolean;
2223
+ };
2224
+ is_valid_custom_block_layout_schema: {
2225
+ Args: {
2226
+ candidate: Json;
2227
+ };
2228
+ Returns: boolean;
2229
+ };
2230
+ is_valid_sale_price_map: {
2231
+ Args: {
2232
+ prices: Json;
2233
+ sale_prices: Json;
2234
+ };
2235
+ Returns: boolean;
2236
+ };
2237
+ normalize_currency_amount_map: {
2238
+ Args: {
2239
+ amounts: Json;
2240
+ };
2241
+ Returns: Json;
2242
+ };
2243
+ sync_inventory_cache_for_sku: {
2244
+ Args: {
2245
+ p_sku: string;
2246
+ };
2247
+ Returns: undefined;
2248
+ };
2249
+ sync_legacy_price_columns_for_currency: {
2250
+ Args: {
2251
+ target_currency: string;
2252
+ };
2253
+ Returns: undefined;
2254
+ };
2255
+ upsert_product_with_variants: {
2256
+ Args: {
2257
+ product_payload: Json;
2258
+ };
2259
+ Returns: string;
2260
+ };
2261
+ };
2262
+ Enums: {
2263
+ menu_location: "HEADER" | "FOOTER" | "SIDEBAR";
2264
+ page_status: "draft" | "published" | "archived";
2265
+ revision_type: "snapshot" | "diff";
2266
+ user_role: "ADMIN" | "WRITER" | "USER";
2267
+ };
2268
+ CompositeTypes: {
2269
+ [_ in never]: never;
2270
+ };
2271
+ };
2272
+ };
2273
+ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
2274
+ type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
2275
+ export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
2276
+ schema: keyof DatabaseWithoutInternals;
2277
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
2278
+ schema: keyof DatabaseWithoutInternals;
2279
+ } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
2280
+ schema: keyof DatabaseWithoutInternals;
2281
+ } ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
2282
+ Row: infer R;
2283
+ } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
2284
+ Row: infer R;
2285
+ } ? R : never : never;
2286
+ export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
2287
+ schema: keyof DatabaseWithoutInternals;
2288
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
2289
+ schema: keyof DatabaseWithoutInternals;
2290
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
2291
+ schema: keyof DatabaseWithoutInternals;
2292
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
2293
+ Insert: infer I;
2294
+ } ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
2295
+ Insert: infer I;
2296
+ } ? I : never : never;
2297
+ export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
2298
+ schema: keyof DatabaseWithoutInternals;
2299
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
2300
+ schema: keyof DatabaseWithoutInternals;
2301
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
2302
+ schema: keyof DatabaseWithoutInternals;
2303
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
2304
+ Update: infer U;
2305
+ } ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
2306
+ Update: infer U;
2307
+ } ? U : never : never;
2308
+ export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
2309
+ schema: keyof DatabaseWithoutInternals;
2310
+ }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
2311
+ schema: keyof DatabaseWithoutInternals;
2312
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
2313
+ schema: keyof DatabaseWithoutInternals;
2314
+ } ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
2315
+ export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
2316
+ schema: keyof DatabaseWithoutInternals;
2317
+ }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
2318
+ schema: keyof DatabaseWithoutInternals;
2319
+ } ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
2320
+ schema: keyof DatabaseWithoutInternals;
2321
+ } ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
2322
+ export declare const Constants: {
2323
+ readonly public: {
2324
+ readonly Enums: {
2325
+ readonly menu_location: readonly ["HEADER", "FOOTER", "SIDEBAR"];
2326
+ readonly page_status: readonly ["draft", "published", "archived"];
2327
+ readonly revision_type: readonly ["snapshot", "diff"];
2328
+ readonly user_role: readonly ["ADMIN", "WRITER", "USER"];
2329
+ };
2330
+ };
2331
+ };
2332
+ export {};