@frequencyads/db 0.1.0

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,1388 @@
1
+ type Json = string | number | boolean | null | {
2
+ [key: string]: Json | undefined;
3
+ } | Json[];
4
+ type Database = {
5
+ graphql_public: {
6
+ Tables: {
7
+ [_ in never]: never;
8
+ };
9
+ Views: {
10
+ [_ in never]: never;
11
+ };
12
+ Functions: {
13
+ graphql: {
14
+ Args: {
15
+ extensions?: Json;
16
+ operationName?: string;
17
+ query?: string;
18
+ variables?: Json;
19
+ };
20
+ Returns: Json;
21
+ };
22
+ };
23
+ Enums: {
24
+ [_ in never]: never;
25
+ };
26
+ CompositeTypes: {
27
+ [_ in never]: never;
28
+ };
29
+ };
30
+ public: {
31
+ Tables: {
32
+ cata_chat_message: {
33
+ Row: {
34
+ approved: boolean | null;
35
+ content: string;
36
+ conversation_id: string;
37
+ created_at: string;
38
+ deleted_at: string | null;
39
+ id: string;
40
+ role: string;
41
+ tool_input: string | null;
42
+ tool_name: string | null;
43
+ tool_use_id: string | null;
44
+ updated_at: string;
45
+ };
46
+ Insert: {
47
+ approved?: boolean | null;
48
+ content: string;
49
+ conversation_id: string;
50
+ created_at?: string;
51
+ deleted_at?: string | null;
52
+ id?: string;
53
+ role: string;
54
+ tool_input?: string | null;
55
+ tool_name?: string | null;
56
+ tool_use_id?: string | null;
57
+ updated_at?: string;
58
+ };
59
+ Update: {
60
+ approved?: boolean | null;
61
+ content?: string;
62
+ conversation_id?: string;
63
+ created_at?: string;
64
+ deleted_at?: string | null;
65
+ id?: string;
66
+ role?: string;
67
+ tool_input?: string | null;
68
+ tool_name?: string | null;
69
+ tool_use_id?: string | null;
70
+ updated_at?: string;
71
+ };
72
+ Relationships: [];
73
+ };
74
+ cata_conversation: {
75
+ Row: {
76
+ created_at: string;
77
+ deleted_at: string | null;
78
+ id: string;
79
+ last_message_at: string | null;
80
+ organization_id: string;
81
+ title: string | null;
82
+ updated_at: string;
83
+ user_id: string;
84
+ };
85
+ Insert: {
86
+ created_at?: string;
87
+ deleted_at?: string | null;
88
+ id?: string;
89
+ last_message_at?: string | null;
90
+ organization_id: string;
91
+ title?: string | null;
92
+ updated_at?: string;
93
+ user_id: string;
94
+ };
95
+ Update: {
96
+ created_at?: string;
97
+ deleted_at?: string | null;
98
+ id?: string;
99
+ last_message_at?: string | null;
100
+ organization_id?: string;
101
+ title?: string | null;
102
+ updated_at?: string;
103
+ user_id?: string;
104
+ };
105
+ Relationships: [
106
+ {
107
+ foreignKeyName: 'fk_cata_conversation_organization_id';
108
+ columns: ['organization_id'];
109
+ isOneToOne: false;
110
+ referencedRelation: 'organization';
111
+ referencedColumns: ['id'];
112
+ }
113
+ ];
114
+ };
115
+ cata_dismissed_duplicate: {
116
+ Row: {
117
+ created_at: string;
118
+ deleted_at: string | null;
119
+ dismissed_by: string;
120
+ id: string;
121
+ organization_id: string;
122
+ record_a_fingerprint: string;
123
+ record_b_fingerprint: string;
124
+ updated_at: string;
125
+ };
126
+ Insert: {
127
+ created_at?: string;
128
+ deleted_at?: string | null;
129
+ dismissed_by: string;
130
+ id?: string;
131
+ organization_id: string;
132
+ record_a_fingerprint: string;
133
+ record_b_fingerprint: string;
134
+ updated_at?: string;
135
+ };
136
+ Update: {
137
+ created_at?: string;
138
+ deleted_at?: string | null;
139
+ dismissed_by?: string;
140
+ id?: string;
141
+ organization_id?: string;
142
+ record_a_fingerprint?: string;
143
+ record_b_fingerprint?: string;
144
+ updated_at?: string;
145
+ };
146
+ Relationships: [
147
+ {
148
+ foreignKeyName: 'fk_cata_dismissed_duplicate_dismissed_by';
149
+ columns: ['dismissed_by'];
150
+ isOneToOne: false;
151
+ referencedRelation: 'user';
152
+ referencedColumns: ['id'];
153
+ },
154
+ {
155
+ foreignKeyName: 'fk_cata_dismissed_duplicate_organization_id';
156
+ columns: ['organization_id'];
157
+ isOneToOne: false;
158
+ referencedRelation: 'organization';
159
+ referencedColumns: ['id'];
160
+ }
161
+ ];
162
+ };
163
+ category: {
164
+ Row: {
165
+ color: string | null;
166
+ created_at: string;
167
+ deleted_at: string | null;
168
+ id: string;
169
+ name: string;
170
+ slug: string | null;
171
+ updated_at: string;
172
+ };
173
+ Insert: {
174
+ color?: string | null;
175
+ created_at?: string;
176
+ deleted_at?: string | null;
177
+ id?: string;
178
+ name: string;
179
+ slug?: string | null;
180
+ updated_at?: string;
181
+ };
182
+ Update: {
183
+ color?: string | null;
184
+ created_at?: string;
185
+ deleted_at?: string | null;
186
+ id?: string;
187
+ name?: string;
188
+ slug?: string | null;
189
+ updated_at?: string;
190
+ };
191
+ Relationships: [];
192
+ };
193
+ collection: {
194
+ Row: {
195
+ color: string | null;
196
+ created_at: string;
197
+ created_by: string;
198
+ deleted_at: string | null;
199
+ description: string | null;
200
+ icon: string | null;
201
+ id: string;
202
+ last_edited_by: string | null;
203
+ name: string;
204
+ organization_id: string;
205
+ show_count: number | null;
206
+ slug: string;
207
+ updated_at: string;
208
+ };
209
+ Insert: {
210
+ color?: string | null;
211
+ created_at?: string;
212
+ created_by: string;
213
+ deleted_at?: string | null;
214
+ description?: string | null;
215
+ icon?: string | null;
216
+ id?: string;
217
+ last_edited_by?: string | null;
218
+ name: string;
219
+ organization_id: string;
220
+ show_count?: number | null;
221
+ slug: string;
222
+ updated_at?: string;
223
+ };
224
+ Update: {
225
+ color?: string | null;
226
+ created_at?: string;
227
+ created_by?: string;
228
+ deleted_at?: string | null;
229
+ description?: string | null;
230
+ icon?: string | null;
231
+ id?: string;
232
+ last_edited_by?: string | null;
233
+ name?: string;
234
+ organization_id?: string;
235
+ show_count?: number | null;
236
+ slug?: string;
237
+ updated_at?: string;
238
+ };
239
+ Relationships: [
240
+ {
241
+ foreignKeyName: 'fk_collection_organization_id';
242
+ columns: ['organization_id'];
243
+ isOneToOne: false;
244
+ referencedRelation: 'organization';
245
+ referencedColumns: ['id'];
246
+ }
247
+ ];
248
+ };
249
+ collection_show: {
250
+ Row: {
251
+ collection_id: string;
252
+ created_at: string;
253
+ deleted_at: string | null;
254
+ id: string;
255
+ organization_id: string;
256
+ position: number | null;
257
+ show_id: string;
258
+ updated_at: string;
259
+ };
260
+ Insert: {
261
+ collection_id: string;
262
+ created_at?: string;
263
+ deleted_at?: string | null;
264
+ id?: string;
265
+ organization_id: string;
266
+ position?: number | null;
267
+ show_id: string;
268
+ updated_at?: string;
269
+ };
270
+ Update: {
271
+ collection_id?: string;
272
+ created_at?: string;
273
+ deleted_at?: string | null;
274
+ id?: string;
275
+ organization_id?: string;
276
+ position?: number | null;
277
+ show_id?: string;
278
+ updated_at?: string;
279
+ };
280
+ Relationships: [
281
+ {
282
+ foreignKeyName: 'fk_collection_show_collection_id';
283
+ columns: ['collection_id'];
284
+ isOneToOne: false;
285
+ referencedRelation: 'collection';
286
+ referencedColumns: ['id'];
287
+ },
288
+ {
289
+ foreignKeyName: 'fk_collection_show_organization_id';
290
+ columns: ['organization_id'];
291
+ isOneToOne: false;
292
+ referencedRelation: 'organization';
293
+ referencedColumns: ['id'];
294
+ },
295
+ {
296
+ foreignKeyName: 'fk_collection_show_show_id';
297
+ columns: ['show_id'];
298
+ isOneToOne: false;
299
+ referencedRelation: 'show';
300
+ referencedColumns: ['id'];
301
+ }
302
+ ];
303
+ };
304
+ import_job: {
305
+ Row: {
306
+ completed_at: string | null;
307
+ created_at: string;
308
+ created_by: string;
309
+ deleted_at: string | null;
310
+ error_count: number | null;
311
+ file_name: string;
312
+ id: string;
313
+ imported_count: number | null;
314
+ organization_id: string;
315
+ row_count: number | null;
316
+ status: string;
317
+ updated_at: string;
318
+ warning_count: number | null;
319
+ };
320
+ Insert: {
321
+ completed_at?: string | null;
322
+ created_at?: string;
323
+ created_by: string;
324
+ deleted_at?: string | null;
325
+ error_count?: number | null;
326
+ file_name: string;
327
+ id?: string;
328
+ imported_count?: number | null;
329
+ organization_id: string;
330
+ row_count?: number | null;
331
+ status: string;
332
+ updated_at?: string;
333
+ warning_count?: number | null;
334
+ };
335
+ Update: {
336
+ completed_at?: string | null;
337
+ created_at?: string;
338
+ created_by?: string;
339
+ deleted_at?: string | null;
340
+ error_count?: number | null;
341
+ file_name?: string;
342
+ id?: string;
343
+ imported_count?: number | null;
344
+ organization_id?: string;
345
+ row_count?: number | null;
346
+ status?: string;
347
+ updated_at?: string;
348
+ warning_count?: number | null;
349
+ };
350
+ Relationships: [
351
+ {
352
+ foreignKeyName: 'fk_import_job_created_by';
353
+ columns: ['created_by'];
354
+ isOneToOne: false;
355
+ referencedRelation: 'user';
356
+ referencedColumns: ['id'];
357
+ },
358
+ {
359
+ foreignKeyName: 'fk_import_job_organization_id';
360
+ columns: ['organization_id'];
361
+ isOneToOne: false;
362
+ referencedRelation: 'organization';
363
+ referencedColumns: ['id'];
364
+ }
365
+ ];
366
+ };
367
+ network: {
368
+ Row: {
369
+ created_at: string;
370
+ deleted_at: string | null;
371
+ description: string | null;
372
+ id: string;
373
+ name: string;
374
+ organization_id: string;
375
+ slug: string | null;
376
+ updated_at: string;
377
+ website_url: string | null;
378
+ };
379
+ Insert: {
380
+ created_at?: string;
381
+ deleted_at?: string | null;
382
+ description?: string | null;
383
+ id?: string;
384
+ name: string;
385
+ organization_id: string;
386
+ slug?: string | null;
387
+ updated_at?: string;
388
+ website_url?: string | null;
389
+ };
390
+ Update: {
391
+ created_at?: string;
392
+ deleted_at?: string | null;
393
+ description?: string | null;
394
+ id?: string;
395
+ name?: string;
396
+ organization_id?: string;
397
+ slug?: string | null;
398
+ updated_at?: string;
399
+ website_url?: string | null;
400
+ };
401
+ Relationships: [
402
+ {
403
+ foreignKeyName: 'fk_network_organization_id';
404
+ columns: ['organization_id'];
405
+ isOneToOne: false;
406
+ referencedRelation: 'organization';
407
+ referencedColumns: ['id'];
408
+ }
409
+ ];
410
+ };
411
+ organization: {
412
+ Row: {
413
+ created_at: string | null;
414
+ deleted_at: string | null;
415
+ description: string | null;
416
+ id: string;
417
+ name: string;
418
+ slug: string | null;
419
+ updated_at: string | null;
420
+ };
421
+ Insert: {
422
+ created_at?: string | null;
423
+ deleted_at?: string | null;
424
+ description?: string | null;
425
+ id?: string;
426
+ name: string;
427
+ slug?: string | null;
428
+ updated_at?: string | null;
429
+ };
430
+ Update: {
431
+ created_at?: string | null;
432
+ deleted_at?: string | null;
433
+ description?: string | null;
434
+ id?: string;
435
+ name?: string;
436
+ slug?: string | null;
437
+ updated_at?: string | null;
438
+ };
439
+ Relationships: [];
440
+ };
441
+ perm_org_setting: {
442
+ Row: {
443
+ created_at: string;
444
+ deleted_at: string | null;
445
+ description: string | null;
446
+ id: string;
447
+ key: string;
448
+ org_id: string;
449
+ tenant_id: string;
450
+ updated_at: string;
451
+ value: Json;
452
+ };
453
+ Insert: {
454
+ created_at?: string;
455
+ deleted_at?: string | null;
456
+ description?: string | null;
457
+ id?: string;
458
+ key: string;
459
+ org_id: string;
460
+ tenant_id: string;
461
+ updated_at?: string;
462
+ value: Json;
463
+ };
464
+ Update: {
465
+ created_at?: string;
466
+ deleted_at?: string | null;
467
+ description?: string | null;
468
+ id?: string;
469
+ key?: string;
470
+ org_id?: string;
471
+ tenant_id?: string;
472
+ updated_at?: string;
473
+ value?: Json;
474
+ };
475
+ Relationships: [
476
+ {
477
+ foreignKeyName: 'fk_perm_org_setting_org_id';
478
+ columns: ['org_id'];
479
+ isOneToOne: false;
480
+ referencedRelation: 'organization';
481
+ referencedColumns: ['id'];
482
+ },
483
+ {
484
+ foreignKeyName: 'fk_perm_org_setting_tenant_id';
485
+ columns: ['tenant_id'];
486
+ isOneToOne: false;
487
+ referencedRelation: 'organization';
488
+ referencedColumns: ['id'];
489
+ }
490
+ ];
491
+ };
492
+ perm_organization_domain: {
493
+ Row: {
494
+ created_at: string;
495
+ default_role: string;
496
+ deleted_at: string | null;
497
+ domain: string;
498
+ grant_global_admin: boolean;
499
+ id: string;
500
+ organization_id: string;
501
+ updated_at: string;
502
+ };
503
+ Insert: {
504
+ created_at?: string;
505
+ default_role?: string;
506
+ deleted_at?: string | null;
507
+ domain: string;
508
+ grant_global_admin?: boolean;
509
+ id?: string;
510
+ organization_id: string;
511
+ updated_at?: string;
512
+ };
513
+ Update: {
514
+ created_at?: string;
515
+ default_role?: string;
516
+ deleted_at?: string | null;
517
+ domain?: string;
518
+ grant_global_admin?: boolean;
519
+ id?: string;
520
+ organization_id?: string;
521
+ updated_at?: string;
522
+ };
523
+ Relationships: [
524
+ {
525
+ foreignKeyName: 'organization_domain_organization_id_fkey';
526
+ columns: ['organization_id'];
527
+ isOneToOne: false;
528
+ referencedRelation: 'organization';
529
+ referencedColumns: ['id'];
530
+ }
531
+ ];
532
+ };
533
+ perm_organization_member: {
534
+ Row: {
535
+ created_at: string | null;
536
+ deleted_at: string | null;
537
+ id: string;
538
+ organization_id: string;
539
+ role: string;
540
+ status: string;
541
+ updated_at: string;
542
+ user_id: string;
543
+ };
544
+ Insert: {
545
+ created_at?: string | null;
546
+ deleted_at?: string | null;
547
+ id?: string;
548
+ organization_id: string;
549
+ role: string;
550
+ status?: string;
551
+ updated_at?: string;
552
+ user_id: string;
553
+ };
554
+ Update: {
555
+ created_at?: string | null;
556
+ deleted_at?: string | null;
557
+ id?: string;
558
+ organization_id?: string;
559
+ role?: string;
560
+ status?: string;
561
+ updated_at?: string;
562
+ user_id?: string;
563
+ };
564
+ Relationships: [
565
+ {
566
+ foreignKeyName: 'fk_perm_organization_member_user_id';
567
+ columns: ['user_id'];
568
+ isOneToOne: false;
569
+ referencedRelation: 'user';
570
+ referencedColumns: ['id'];
571
+ },
572
+ {
573
+ foreignKeyName: 'perm_organization_member_org_fk';
574
+ columns: ['organization_id'];
575
+ isOneToOne: false;
576
+ referencedRelation: 'organization';
577
+ referencedColumns: ['id'];
578
+ }
579
+ ];
580
+ };
581
+ perm_permission: {
582
+ Row: {
583
+ action: string;
584
+ conditions: Json | null;
585
+ created_at: string | null;
586
+ deleted_at: string | null;
587
+ entity: string;
588
+ id: string;
589
+ role_id: string;
590
+ scope: string;
591
+ updated_at: string;
592
+ };
593
+ Insert: {
594
+ action: string;
595
+ conditions?: Json | null;
596
+ created_at?: string | null;
597
+ deleted_at?: string | null;
598
+ entity: string;
599
+ id?: string;
600
+ role_id: string;
601
+ scope: string;
602
+ updated_at?: string;
603
+ };
604
+ Update: {
605
+ action?: string;
606
+ conditions?: Json | null;
607
+ created_at?: string | null;
608
+ deleted_at?: string | null;
609
+ entity?: string;
610
+ id?: string;
611
+ role_id?: string;
612
+ scope?: string;
613
+ updated_at?: string;
614
+ };
615
+ Relationships: [
616
+ {
617
+ foreignKeyName: 'fk_perm_permission_role_id';
618
+ columns: ['role_id'];
619
+ isOneToOne: false;
620
+ referencedRelation: 'perm_role';
621
+ referencedColumns: ['id'];
622
+ }
623
+ ];
624
+ };
625
+ perm_role: {
626
+ Row: {
627
+ created_at: string | null;
628
+ deleted_at: string | null;
629
+ description: string | null;
630
+ id: string;
631
+ name: string;
632
+ tenant_id: string;
633
+ updated_at: string;
634
+ };
635
+ Insert: {
636
+ created_at?: string | null;
637
+ deleted_at?: string | null;
638
+ description?: string | null;
639
+ id?: string;
640
+ name: string;
641
+ tenant_id: string;
642
+ updated_at?: string;
643
+ };
644
+ Update: {
645
+ created_at?: string | null;
646
+ deleted_at?: string | null;
647
+ description?: string | null;
648
+ id?: string;
649
+ name?: string;
650
+ tenant_id?: string;
651
+ updated_at?: string;
652
+ };
653
+ Relationships: [
654
+ {
655
+ foreignKeyName: 'fk_perm_role_tenant_id';
656
+ columns: ['tenant_id'];
657
+ isOneToOne: false;
658
+ referencedRelation: 'organization';
659
+ referencedColumns: ['id'];
660
+ }
661
+ ];
662
+ };
663
+ perm_show_manager: {
664
+ Row: {
665
+ created_at: string;
666
+ deleted_at: string | null;
667
+ id: string;
668
+ show_id: string;
669
+ updated_at: string;
670
+ user_id: string;
671
+ };
672
+ Insert: {
673
+ created_at?: string;
674
+ deleted_at?: string | null;
675
+ id?: string;
676
+ show_id: string;
677
+ updated_at?: string;
678
+ user_id: string;
679
+ };
680
+ Update: {
681
+ created_at?: string;
682
+ deleted_at?: string | null;
683
+ id?: string;
684
+ show_id?: string;
685
+ updated_at?: string;
686
+ user_id?: string;
687
+ };
688
+ Relationships: [
689
+ {
690
+ foreignKeyName: 'fk_perm_show_manager_show_id';
691
+ columns: ['show_id'];
692
+ isOneToOne: false;
693
+ referencedRelation: 'show';
694
+ referencedColumns: ['id'];
695
+ },
696
+ {
697
+ foreignKeyName: 'fk_perm_show_manager_user_id';
698
+ columns: ['user_id'];
699
+ isOneToOne: false;
700
+ referencedRelation: 'user';
701
+ referencedColumns: ['id'];
702
+ }
703
+ ];
704
+ };
705
+ perm_tenant_setting: {
706
+ Row: {
707
+ created_at: string;
708
+ deleted_at: string | null;
709
+ description: string | null;
710
+ id: string;
711
+ key: string;
712
+ tenant_id: string;
713
+ updated_at: string;
714
+ value: Json;
715
+ };
716
+ Insert: {
717
+ created_at?: string;
718
+ deleted_at?: string | null;
719
+ description?: string | null;
720
+ id?: string;
721
+ key: string;
722
+ tenant_id: string;
723
+ updated_at?: string;
724
+ value: Json;
725
+ };
726
+ Update: {
727
+ created_at?: string;
728
+ deleted_at?: string | null;
729
+ description?: string | null;
730
+ id?: string;
731
+ key?: string;
732
+ tenant_id?: string;
733
+ updated_at?: string;
734
+ value?: Json;
735
+ };
736
+ Relationships: [
737
+ {
738
+ foreignKeyName: 'fk_perm_tenant_setting_tenant_id';
739
+ columns: ['tenant_id'];
740
+ isOneToOne: false;
741
+ referencedRelation: 'organization';
742
+ referencedColumns: ['id'];
743
+ }
744
+ ];
745
+ };
746
+ perm_user_global_role: {
747
+ Row: {
748
+ created_at: string;
749
+ deleted_at: string | null;
750
+ id: string;
751
+ role: string;
752
+ updated_at: string;
753
+ user_id: string;
754
+ };
755
+ Insert: {
756
+ created_at?: string;
757
+ deleted_at?: string | null;
758
+ id?: string;
759
+ role: string;
760
+ updated_at?: string;
761
+ user_id: string;
762
+ };
763
+ Update: {
764
+ created_at?: string;
765
+ deleted_at?: string | null;
766
+ id?: string;
767
+ role?: string;
768
+ updated_at?: string;
769
+ user_id?: string;
770
+ };
771
+ Relationships: [
772
+ {
773
+ foreignKeyName: 'fk_perm_user_global_role_user_id';
774
+ columns: ['user_id'];
775
+ isOneToOne: true;
776
+ referencedRelation: 'user';
777
+ referencedColumns: ['id'];
778
+ }
779
+ ];
780
+ };
781
+ perm_user_role: {
782
+ Row: {
783
+ created_at: string | null;
784
+ deleted_at: string | null;
785
+ id: string;
786
+ org_id: string | null;
787
+ role_id: string;
788
+ tenant_id: string;
789
+ updated_at: string;
790
+ user_id: string;
791
+ };
792
+ Insert: {
793
+ created_at?: string | null;
794
+ deleted_at?: string | null;
795
+ id?: string;
796
+ org_id?: string | null;
797
+ role_id: string;
798
+ tenant_id: string;
799
+ updated_at?: string;
800
+ user_id: string;
801
+ };
802
+ Update: {
803
+ created_at?: string | null;
804
+ deleted_at?: string | null;
805
+ id?: string;
806
+ org_id?: string | null;
807
+ role_id?: string;
808
+ tenant_id?: string;
809
+ updated_at?: string;
810
+ user_id?: string;
811
+ };
812
+ Relationships: [
813
+ {
814
+ foreignKeyName: 'fk_perm_user_role_org_id';
815
+ columns: ['org_id'];
816
+ isOneToOne: false;
817
+ referencedRelation: 'organization';
818
+ referencedColumns: ['id'];
819
+ },
820
+ {
821
+ foreignKeyName: 'fk_perm_user_role_role_id';
822
+ columns: ['role_id'];
823
+ isOneToOne: false;
824
+ referencedRelation: 'perm_role';
825
+ referencedColumns: ['id'];
826
+ },
827
+ {
828
+ foreignKeyName: 'fk_perm_user_role_tenant_id';
829
+ columns: ['tenant_id'];
830
+ isOneToOne: false;
831
+ referencedRelation: 'organization';
832
+ referencedColumns: ['id'];
833
+ },
834
+ {
835
+ foreignKeyName: 'fk_perm_user_role_user_id';
836
+ columns: ['user_id'];
837
+ isOneToOne: false;
838
+ referencedRelation: 'user';
839
+ referencedColumns: ['id'];
840
+ }
841
+ ];
842
+ };
843
+ perm_visibility_setting: {
844
+ Row: {
845
+ created_at: string;
846
+ deleted_at: string | null;
847
+ entity: string;
848
+ id: string;
849
+ owner_org_id: string;
850
+ owner_user_id: string;
851
+ record_id: string;
852
+ tenant_id: string;
853
+ updated_at: string;
854
+ visibility: string;
855
+ };
856
+ Insert: {
857
+ created_at?: string;
858
+ deleted_at?: string | null;
859
+ entity: string;
860
+ id?: string;
861
+ owner_org_id: string;
862
+ owner_user_id: string;
863
+ record_id: string;
864
+ tenant_id: string;
865
+ updated_at?: string;
866
+ visibility: string;
867
+ };
868
+ Update: {
869
+ created_at?: string;
870
+ deleted_at?: string | null;
871
+ entity?: string;
872
+ id?: string;
873
+ owner_org_id?: string;
874
+ owner_user_id?: string;
875
+ record_id?: string;
876
+ tenant_id?: string;
877
+ updated_at?: string;
878
+ visibility?: string;
879
+ };
880
+ Relationships: [
881
+ {
882
+ foreignKeyName: 'fk_perm_visibility_setting_owner_org_id';
883
+ columns: ['owner_org_id'];
884
+ isOneToOne: false;
885
+ referencedRelation: 'organization';
886
+ referencedColumns: ['id'];
887
+ },
888
+ {
889
+ foreignKeyName: 'fk_perm_visibility_setting_owner_user_id';
890
+ columns: ['owner_user_id'];
891
+ isOneToOne: false;
892
+ referencedRelation: 'user';
893
+ referencedColumns: ['id'];
894
+ },
895
+ {
896
+ foreignKeyName: 'fk_perm_visibility_setting_tenant_id';
897
+ columns: ['tenant_id'];
898
+ isOneToOne: false;
899
+ referencedRelation: 'organization';
900
+ referencedColumns: ['id'];
901
+ }
902
+ ];
903
+ };
904
+ share: {
905
+ Row: {
906
+ collection_id: string;
907
+ created_at: string;
908
+ created_by: string;
909
+ deleted_at: string | null;
910
+ expires_at: string | null;
911
+ id: string;
912
+ last_accessed_at: string | null;
913
+ organization_id: string;
914
+ permission: string;
915
+ personal_message: string | null;
916
+ recipient_email: string;
917
+ revoked: boolean;
918
+ revoked_at: string | null;
919
+ token: string;
920
+ updated_at: string;
921
+ };
922
+ Insert: {
923
+ collection_id: string;
924
+ created_at?: string;
925
+ created_by: string;
926
+ deleted_at?: string | null;
927
+ expires_at?: string | null;
928
+ id?: string;
929
+ last_accessed_at?: string | null;
930
+ organization_id: string;
931
+ permission?: string;
932
+ personal_message?: string | null;
933
+ recipient_email: string;
934
+ revoked?: boolean;
935
+ revoked_at?: string | null;
936
+ token: string;
937
+ updated_at?: string;
938
+ };
939
+ Update: {
940
+ collection_id?: string;
941
+ created_at?: string;
942
+ created_by?: string;
943
+ deleted_at?: string | null;
944
+ expires_at?: string | null;
945
+ id?: string;
946
+ last_accessed_at?: string | null;
947
+ organization_id?: string;
948
+ permission?: string;
949
+ personal_message?: string | null;
950
+ recipient_email?: string;
951
+ revoked?: boolean;
952
+ revoked_at?: string | null;
953
+ token?: string;
954
+ updated_at?: string;
955
+ };
956
+ Relationships: [
957
+ {
958
+ foreignKeyName: 'fk_share_collection_id';
959
+ columns: ['collection_id'];
960
+ isOneToOne: false;
961
+ referencedRelation: 'collection';
962
+ referencedColumns: ['id'];
963
+ },
964
+ {
965
+ foreignKeyName: 'fk_share_organization_id';
966
+ columns: ['organization_id'];
967
+ isOneToOne: false;
968
+ referencedRelation: 'organization';
969
+ referencedColumns: ['id'];
970
+ }
971
+ ];
972
+ };
973
+ show: {
974
+ Row: {
975
+ artwork_url: string | null;
976
+ audio_downloads: number | null;
977
+ created_at: string;
978
+ deleted_at: string | null;
979
+ description: string | null;
980
+ embedded_impressions: number | null;
981
+ host_name: string[] | null;
982
+ id: string;
983
+ name: string;
984
+ organization_id: string;
985
+ rss_feed: string | null;
986
+ slug: string | null;
987
+ supports_audio: boolean | null;
988
+ supports_dai: boolean | null;
989
+ supports_embedded: boolean | null;
990
+ supports_video: boolean | null;
991
+ updated_at: string;
992
+ };
993
+ Insert: {
994
+ artwork_url?: string | null;
995
+ audio_downloads?: number | null;
996
+ created_at?: string;
997
+ deleted_at?: string | null;
998
+ description?: string | null;
999
+ embedded_impressions?: number | null;
1000
+ host_name?: string[] | null;
1001
+ id?: string;
1002
+ name: string;
1003
+ organization_id: string;
1004
+ rss_feed?: string | null;
1005
+ slug?: string | null;
1006
+ supports_audio?: boolean | null;
1007
+ supports_dai?: boolean | null;
1008
+ supports_embedded?: boolean | null;
1009
+ supports_video?: boolean | null;
1010
+ updated_at?: string;
1011
+ };
1012
+ Update: {
1013
+ artwork_url?: string | null;
1014
+ audio_downloads?: number | null;
1015
+ created_at?: string;
1016
+ deleted_at?: string | null;
1017
+ description?: string | null;
1018
+ embedded_impressions?: number | null;
1019
+ host_name?: string[] | null;
1020
+ id?: string;
1021
+ name?: string;
1022
+ organization_id?: string;
1023
+ rss_feed?: string | null;
1024
+ slug?: string | null;
1025
+ supports_audio?: boolean | null;
1026
+ supports_dai?: boolean | null;
1027
+ supports_embedded?: boolean | null;
1028
+ supports_video?: boolean | null;
1029
+ updated_at?: string;
1030
+ };
1031
+ Relationships: [
1032
+ {
1033
+ foreignKeyName: 'show_organization_id_fkey';
1034
+ columns: ['organization_id'];
1035
+ isOneToOne: false;
1036
+ referencedRelation: 'organization';
1037
+ referencedColumns: ['id'];
1038
+ }
1039
+ ];
1040
+ };
1041
+ show_category: {
1042
+ Row: {
1043
+ category_id: string;
1044
+ created_at: string;
1045
+ deleted_at: string | null;
1046
+ id: string;
1047
+ organization_id: string;
1048
+ show_id: string;
1049
+ updated_at: string;
1050
+ };
1051
+ Insert: {
1052
+ category_id: string;
1053
+ created_at?: string;
1054
+ deleted_at?: string | null;
1055
+ id?: string;
1056
+ organization_id: string;
1057
+ show_id: string;
1058
+ updated_at?: string;
1059
+ };
1060
+ Update: {
1061
+ category_id?: string;
1062
+ created_at?: string;
1063
+ deleted_at?: string | null;
1064
+ id?: string;
1065
+ organization_id?: string;
1066
+ show_id?: string;
1067
+ updated_at?: string;
1068
+ };
1069
+ Relationships: [
1070
+ {
1071
+ foreignKeyName: 'fk_show_category_category_id';
1072
+ columns: ['category_id'];
1073
+ isOneToOne: false;
1074
+ referencedRelation: 'category';
1075
+ referencedColumns: ['id'];
1076
+ },
1077
+ {
1078
+ foreignKeyName: 'fk_show_category_organization_id';
1079
+ columns: ['organization_id'];
1080
+ isOneToOne: false;
1081
+ referencedRelation: 'organization';
1082
+ referencedColumns: ['id'];
1083
+ },
1084
+ {
1085
+ foreignKeyName: 'fk_show_category_show_id';
1086
+ columns: ['show_id'];
1087
+ isOneToOne: false;
1088
+ referencedRelation: 'show';
1089
+ referencedColumns: ['id'];
1090
+ }
1091
+ ];
1092
+ };
1093
+ show_tag: {
1094
+ Row: {
1095
+ created_at: string;
1096
+ deleted_at: string | null;
1097
+ id: string;
1098
+ organization_id: string;
1099
+ show_id: string;
1100
+ tag_id: string;
1101
+ updated_at: string;
1102
+ };
1103
+ Insert: {
1104
+ created_at?: string;
1105
+ deleted_at?: string | null;
1106
+ id?: string;
1107
+ organization_id: string;
1108
+ show_id: string;
1109
+ tag_id: string;
1110
+ updated_at?: string;
1111
+ };
1112
+ Update: {
1113
+ created_at?: string;
1114
+ deleted_at?: string | null;
1115
+ id?: string;
1116
+ organization_id?: string;
1117
+ show_id?: string;
1118
+ tag_id?: string;
1119
+ updated_at?: string;
1120
+ };
1121
+ Relationships: [
1122
+ {
1123
+ foreignKeyName: 'fk_show_tag_organization_id';
1124
+ columns: ['organization_id'];
1125
+ isOneToOne: false;
1126
+ referencedRelation: 'organization';
1127
+ referencedColumns: ['id'];
1128
+ },
1129
+ {
1130
+ foreignKeyName: 'fk_show_tag_show_id';
1131
+ columns: ['show_id'];
1132
+ isOneToOne: false;
1133
+ referencedRelation: 'show';
1134
+ referencedColumns: ['id'];
1135
+ },
1136
+ {
1137
+ foreignKeyName: 'fk_show_tag_tag_id';
1138
+ columns: ['tag_id'];
1139
+ isOneToOne: false;
1140
+ referencedRelation: 'tag';
1141
+ referencedColumns: ['id'];
1142
+ }
1143
+ ];
1144
+ };
1145
+ tag: {
1146
+ Row: {
1147
+ color: string | null;
1148
+ created_at: string;
1149
+ deleted_at: string | null;
1150
+ entity_type: string;
1151
+ id: string;
1152
+ name: string;
1153
+ organization_id: string;
1154
+ slug: string | null;
1155
+ updated_at: string;
1156
+ };
1157
+ Insert: {
1158
+ color?: string | null;
1159
+ created_at?: string;
1160
+ deleted_at?: string | null;
1161
+ entity_type: string;
1162
+ id?: string;
1163
+ name: string;
1164
+ organization_id: string;
1165
+ slug?: string | null;
1166
+ updated_at?: string;
1167
+ };
1168
+ Update: {
1169
+ color?: string | null;
1170
+ created_at?: string;
1171
+ deleted_at?: string | null;
1172
+ entity_type?: string;
1173
+ id?: string;
1174
+ name?: string;
1175
+ organization_id?: string;
1176
+ slug?: string | null;
1177
+ updated_at?: string;
1178
+ };
1179
+ Relationships: [
1180
+ {
1181
+ foreignKeyName: 'fk_tag_organization_id';
1182
+ columns: ['organization_id'];
1183
+ isOneToOne: false;
1184
+ referencedRelation: 'organization';
1185
+ referencedColumns: ['id'];
1186
+ }
1187
+ ];
1188
+ };
1189
+ user: {
1190
+ Row: {
1191
+ avatar_url: string | null;
1192
+ created_at: string | null;
1193
+ deleted_at: string | null;
1194
+ display_name: string | null;
1195
+ email: string;
1196
+ id: string;
1197
+ updated_at: string | null;
1198
+ };
1199
+ Insert: {
1200
+ avatar_url?: string | null;
1201
+ created_at?: string | null;
1202
+ deleted_at?: string | null;
1203
+ display_name?: string | null;
1204
+ email: string;
1205
+ id: string;
1206
+ updated_at?: string | null;
1207
+ };
1208
+ Update: {
1209
+ avatar_url?: string | null;
1210
+ created_at?: string | null;
1211
+ deleted_at?: string | null;
1212
+ display_name?: string | null;
1213
+ email?: string;
1214
+ id?: string;
1215
+ updated_at?: string | null;
1216
+ };
1217
+ Relationships: [];
1218
+ };
1219
+ user_profile: {
1220
+ Row: {
1221
+ created_at: string;
1222
+ date_format: string;
1223
+ deleted_at: string | null;
1224
+ locale: string;
1225
+ notification_preferences: Json;
1226
+ timezone: string;
1227
+ updated_at: string;
1228
+ user_id: string;
1229
+ };
1230
+ Insert: {
1231
+ created_at?: string;
1232
+ date_format?: string;
1233
+ deleted_at?: string | null;
1234
+ locale?: string;
1235
+ notification_preferences?: Json;
1236
+ timezone?: string;
1237
+ updated_at?: string;
1238
+ user_id: string;
1239
+ };
1240
+ Update: {
1241
+ created_at?: string;
1242
+ date_format?: string;
1243
+ deleted_at?: string | null;
1244
+ locale?: string;
1245
+ notification_preferences?: Json;
1246
+ timezone?: string;
1247
+ updated_at?: string;
1248
+ user_id?: string;
1249
+ };
1250
+ Relationships: [
1251
+ {
1252
+ foreignKeyName: 'user_profile_user_id_fkey';
1253
+ columns: ['user_id'];
1254
+ isOneToOne: true;
1255
+ referencedRelation: 'user';
1256
+ referencedColumns: ['id'];
1257
+ }
1258
+ ];
1259
+ };
1260
+ };
1261
+ Views: {
1262
+ [_ in never]: never;
1263
+ };
1264
+ Functions: {
1265
+ before_user_created: {
1266
+ Args: {
1267
+ event: Json;
1268
+ };
1269
+ Returns: Json;
1270
+ };
1271
+ get_org_for_email: {
1272
+ Args: {
1273
+ p_email: string;
1274
+ };
1275
+ Returns: {
1276
+ default_role: string;
1277
+ organization_id: string;
1278
+ }[];
1279
+ };
1280
+ is_catalog_client: {
1281
+ Args: never;
1282
+ Returns: boolean;
1283
+ };
1284
+ is_own_org: {
1285
+ Args: {
1286
+ org_id: string;
1287
+ };
1288
+ Returns: boolean;
1289
+ };
1290
+ is_share_permitted: {
1291
+ Args: {
1292
+ p_collection_id: string;
1293
+ p_required_permission: string;
1294
+ };
1295
+ Returns: boolean;
1296
+ };
1297
+ is_superadmin: {
1298
+ Args: never;
1299
+ Returns: boolean;
1300
+ };
1301
+ shares_org_with_current_user: {
1302
+ Args: {
1303
+ target_user_id: string;
1304
+ };
1305
+ Returns: boolean;
1306
+ };
1307
+ };
1308
+ Enums: {
1309
+ import_job_status: 'pending' | 'processing' | 'complete' | 'failed';
1310
+ message_role: 'user' | 'assistant' | 'tool_use' | 'tool_result';
1311
+ perm_global_role: 'ADMIN' | 'EMPLOYEE' | 'GUEST' | 'CLIENT';
1312
+ perm_organization_member_status: 'pending' | 'active';
1313
+ perm_organization_role: 'NETWORK_ADMIN' | 'NETWORK_EDITOR';
1314
+ perm_scope_type: 'tenant' | 'org' | 'mine';
1315
+ perm_visibility_mode: 'private' | 'rollup' | 'published';
1316
+ };
1317
+ CompositeTypes: {
1318
+ [_ in never]: never;
1319
+ };
1320
+ };
1321
+ };
1322
+ type DatabaseWithoutInternals = Omit<Database, '__InternalSupabase'>;
1323
+ type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, 'public'>];
1324
+ type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema['Tables'] & DefaultSchema['Views']) | {
1325
+ schema: keyof DatabaseWithoutInternals;
1326
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
1327
+ schema: keyof DatabaseWithoutInternals;
1328
+ } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Views']) : never = never> = DefaultSchemaTableNameOrOptions extends {
1329
+ schema: keyof DatabaseWithoutInternals;
1330
+ } ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Views'])[TableName] extends {
1331
+ Row: infer R;
1332
+ } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema['Tables'] & DefaultSchema['Views']) ? (DefaultSchema['Tables'] & DefaultSchema['Views'])[DefaultSchemaTableNameOrOptions] extends {
1333
+ Row: infer R;
1334
+ } ? R : never : never;
1335
+ type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema['Tables'] | {
1336
+ schema: keyof DatabaseWithoutInternals;
1337
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
1338
+ schema: keyof DatabaseWithoutInternals;
1339
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'] : never = never> = DefaultSchemaTableNameOrOptions extends {
1340
+ schema: keyof DatabaseWithoutInternals;
1341
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'][TableName] extends {
1342
+ Insert: infer I;
1343
+ } ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema['Tables'] ? DefaultSchema['Tables'][DefaultSchemaTableNameOrOptions] extends {
1344
+ Insert: infer I;
1345
+ } ? I : never : never;
1346
+ type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema['Tables'] | {
1347
+ schema: keyof DatabaseWithoutInternals;
1348
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
1349
+ schema: keyof DatabaseWithoutInternals;
1350
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'] : never = never> = DefaultSchemaTableNameOrOptions extends {
1351
+ schema: keyof DatabaseWithoutInternals;
1352
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'][TableName] extends {
1353
+ Update: infer U;
1354
+ } ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema['Tables'] ? DefaultSchema['Tables'][DefaultSchemaTableNameOrOptions] extends {
1355
+ Update: infer U;
1356
+ } ? U : never : never;
1357
+ type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema['Enums'] | {
1358
+ schema: keyof DatabaseWithoutInternals;
1359
+ }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
1360
+ schema: keyof DatabaseWithoutInternals;
1361
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions['schema']]['Enums'] : never = never> = DefaultSchemaEnumNameOrOptions extends {
1362
+ schema: keyof DatabaseWithoutInternals;
1363
+ } ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions['schema']]['Enums'][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema['Enums'] ? DefaultSchema['Enums'][DefaultSchemaEnumNameOrOptions] : never;
1364
+ type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema['CompositeTypes'] | {
1365
+ schema: keyof DatabaseWithoutInternals;
1366
+ }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
1367
+ schema: keyof DatabaseWithoutInternals;
1368
+ } ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions['schema']]['CompositeTypes'] : never = never> = PublicCompositeTypeNameOrOptions extends {
1369
+ schema: keyof DatabaseWithoutInternals;
1370
+ } ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions['schema']]['CompositeTypes'][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema['CompositeTypes'] ? DefaultSchema['CompositeTypes'][PublicCompositeTypeNameOrOptions] : never;
1371
+ declare const Constants: {
1372
+ readonly graphql_public: {
1373
+ readonly Enums: {};
1374
+ };
1375
+ readonly public: {
1376
+ readonly Enums: {
1377
+ readonly import_job_status: readonly ["pending", "processing", "complete", "failed"];
1378
+ readonly message_role: readonly ["user", "assistant", "tool_use", "tool_result"];
1379
+ readonly perm_global_role: readonly ["ADMIN", "EMPLOYEE", "GUEST", "CLIENT"];
1380
+ readonly perm_organization_member_status: readonly ["pending", "active"];
1381
+ readonly perm_organization_role: readonly ["NETWORK_ADMIN", "NETWORK_EDITOR"];
1382
+ readonly perm_scope_type: readonly ["tenant", "org", "mine"];
1383
+ readonly perm_visibility_mode: readonly ["private", "rollup", "published"];
1384
+ };
1385
+ };
1386
+ };
1387
+
1388
+ export { type CompositeTypes, Constants, type Database, type Enums, type Json, type Tables, type TablesInsert, type TablesUpdate };