forked from
leaflet.pub/leaflet
a tool for shared writing and social publishing
1export type Json =
2 | string
3 | number
4 | boolean
5 | null
6 | { [key: string]: Json | undefined }
7 | Json[]
8
9export type Database = {
10 graphql_public: {
11 Tables: {
12 [_ in never]: never
13 }
14 Views: {
15 [_ in never]: never
16 }
17 Functions: {
18 graphql: {
19 Args: {
20 operationName?: string
21 query?: string
22 variables?: Json
23 extensions?: Json
24 }
25 Returns: Json
26 }
27 }
28 Enums: {
29 [_ in never]: never
30 }
31 CompositeTypes: {
32 [_ in never]: never
33 }
34 }
35 public: {
36 Tables: {
37 atp_poll_records: {
38 Row: {
39 cid: string
40 created_at: string
41 record: Json
42 uri: string
43 }
44 Insert: {
45 cid: string
46 created_at?: string
47 record: Json
48 uri: string
49 }
50 Update: {
51 cid?: string
52 created_at?: string
53 record?: Json
54 uri?: string
55 }
56 Relationships: []
57 }
58 atp_poll_votes: {
59 Row: {
60 indexed_at: string
61 poll_cid: string
62 poll_uri: string
63 record: Json
64 uri: string
65 voter_did: string
66 }
67 Insert: {
68 indexed_at?: string
69 poll_cid: string
70 poll_uri: string
71 record: Json
72 uri: string
73 voter_did: string
74 }
75 Update: {
76 indexed_at?: string
77 poll_cid?: string
78 poll_uri?: string
79 record?: Json
80 uri?: string
81 voter_did?: string
82 }
83 Relationships: [
84 {
85 foreignKeyName: "atp_poll_votes_poll_uri_fkey"
86 columns: ["poll_uri"]
87 isOneToOne: false
88 referencedRelation: "atp_poll_records"
89 referencedColumns: ["uri"]
90 },
91 ]
92 }
93 bsky_follows: {
94 Row: {
95 follows: string
96 identity: string
97 }
98 Insert: {
99 follows: string
100 identity?: string
101 }
102 Update: {
103 follows?: string
104 identity?: string
105 }
106 Relationships: [
107 {
108 foreignKeyName: "bsky_follows_follows_fkey"
109 columns: ["follows"]
110 isOneToOne: false
111 referencedRelation: "identities"
112 referencedColumns: ["atp_did"]
113 },
114 {
115 foreignKeyName: "bsky_follows_identity_fkey"
116 columns: ["identity"]
117 isOneToOne: false
118 referencedRelation: "identities"
119 referencedColumns: ["atp_did"]
120 },
121 ]
122 }
123 bsky_posts: {
124 Row: {
125 cid: string
126 indexed_at: string
127 post_view: Json
128 uri: string
129 }
130 Insert: {
131 cid: string
132 indexed_at?: string
133 post_view: Json
134 uri: string
135 }
136 Update: {
137 cid?: string
138 indexed_at?: string
139 post_view?: Json
140 uri?: string
141 }
142 Relationships: []
143 }
144 bsky_profiles: {
145 Row: {
146 did: string
147 handle: string | null
148 indexed_at: string
149 record: Json
150 }
151 Insert: {
152 did: string
153 handle?: string | null
154 indexed_at?: string
155 record: Json
156 }
157 Update: {
158 did?: string
159 handle?: string | null
160 indexed_at?: string
161 record?: Json
162 }
163 Relationships: [
164 {
165 foreignKeyName: "bsky_profiles_did_fkey"
166 columns: ["did"]
167 isOneToOne: true
168 referencedRelation: "identities"
169 referencedColumns: ["atp_did"]
170 },
171 ]
172 }
173 comments_on_documents: {
174 Row: {
175 document: string | null
176 indexed_at: string
177 profile: string | null
178 record: Json
179 uri: string
180 }
181 Insert: {
182 document?: string | null
183 indexed_at?: string
184 profile?: string | null
185 record: Json
186 uri: string
187 }
188 Update: {
189 document?: string | null
190 indexed_at?: string
191 profile?: string | null
192 record?: Json
193 uri?: string
194 }
195 Relationships: [
196 {
197 foreignKeyName: "comments_on_documents_document_fkey"
198 columns: ["document"]
199 isOneToOne: false
200 referencedRelation: "documents"
201 referencedColumns: ["uri"]
202 },
203 {
204 foreignKeyName: "comments_on_documents_profile_fkey"
205 columns: ["profile"]
206 isOneToOne: false
207 referencedRelation: "bsky_profiles"
208 referencedColumns: ["did"]
209 },
210 ]
211 }
212 custom_domain_routes: {
213 Row: {
214 created_at: string
215 domain: string
216 edit_permission_token: string
217 id: string
218 route: string
219 view_permission_token: string
220 }
221 Insert: {
222 created_at?: string
223 domain: string
224 edit_permission_token: string
225 id?: string
226 route: string
227 view_permission_token: string
228 }
229 Update: {
230 created_at?: string
231 domain?: string
232 edit_permission_token?: string
233 id?: string
234 route?: string
235 view_permission_token?: string
236 }
237 Relationships: [
238 {
239 foreignKeyName: "custom_domain_routes_domain_fkey"
240 columns: ["domain"]
241 isOneToOne: false
242 referencedRelation: "custom_domains"
243 referencedColumns: ["domain"]
244 },
245 {
246 foreignKeyName: "custom_domain_routes_edit_permission_token_fkey"
247 columns: ["edit_permission_token"]
248 isOneToOne: false
249 referencedRelation: "permission_tokens"
250 referencedColumns: ["id"]
251 },
252 {
253 foreignKeyName: "custom_domain_routes_view_permission_token_fkey"
254 columns: ["view_permission_token"]
255 isOneToOne: false
256 referencedRelation: "permission_tokens"
257 referencedColumns: ["id"]
258 },
259 ]
260 }
261 custom_domains: {
262 Row: {
263 confirmed: boolean
264 created_at: string
265 domain: string
266 identity: string | null
267 identity_id: string | null
268 }
269 Insert: {
270 confirmed: boolean
271 created_at?: string
272 domain: string
273 identity?: string | null
274 identity_id?: string | null
275 }
276 Update: {
277 confirmed?: boolean
278 created_at?: string
279 domain?: string
280 identity?: string | null
281 identity_id?: string | null
282 }
283 Relationships: [
284 {
285 foreignKeyName: "custom_domains_identity_fkey"
286 columns: ["identity"]
287 isOneToOne: false
288 referencedRelation: "identities"
289 referencedColumns: ["email"]
290 },
291 {
292 foreignKeyName: "custom_domains_identity_id_fkey"
293 columns: ["identity_id"]
294 isOneToOne: false
295 referencedRelation: "identities"
296 referencedColumns: ["id"]
297 },
298 ]
299 }
300 document_mentions_in_bsky: {
301 Row: {
302 document: string
303 indexed_at: string
304 link: string
305 uri: string
306 }
307 Insert: {
308 document: string
309 indexed_at?: string
310 link: string
311 uri: string
312 }
313 Update: {
314 document?: string
315 indexed_at?: string
316 link?: string
317 uri?: string
318 }
319 Relationships: [
320 {
321 foreignKeyName: "document_mentions_in_bsky_document_fkey"
322 columns: ["document"]
323 isOneToOne: false
324 referencedRelation: "documents"
325 referencedColumns: ["uri"]
326 },
327 {
328 foreignKeyName: "document_mentions_in_bsky_uri_fkey"
329 columns: ["uri"]
330 isOneToOne: false
331 referencedRelation: "bsky_posts"
332 referencedColumns: ["uri"]
333 },
334 ]
335 }
336 documents: {
337 Row: {
338 data: Json
339 indexed_at: string
340 uri: string
341 }
342 Insert: {
343 data: Json
344 indexed_at?: string
345 uri: string
346 }
347 Update: {
348 data?: Json
349 indexed_at?: string
350 uri?: string
351 }
352 Relationships: []
353 }
354 documents_in_publications: {
355 Row: {
356 document: string
357 indexed_at: string
358 publication: string
359 }
360 Insert: {
361 document: string
362 indexed_at?: string
363 publication: string
364 }
365 Update: {
366 document?: string
367 indexed_at?: string
368 publication?: string
369 }
370 Relationships: [
371 {
372 foreignKeyName: "documents_in_publications_document_fkey"
373 columns: ["document"]
374 isOneToOne: false
375 referencedRelation: "documents"
376 referencedColumns: ["uri"]
377 },
378 {
379 foreignKeyName: "documents_in_publications_publication_fkey"
380 columns: ["publication"]
381 isOneToOne: false
382 referencedRelation: "publications"
383 referencedColumns: ["uri"]
384 },
385 ]
386 }
387 email_auth_tokens: {
388 Row: {
389 confirmation_code: string
390 confirmed: boolean
391 created_at: string
392 email: string | null
393 id: string
394 identity: string | null
395 }
396 Insert: {
397 confirmation_code: string
398 confirmed?: boolean
399 created_at?: string
400 email?: string | null
401 id?: string
402 identity?: string | null
403 }
404 Update: {
405 confirmation_code?: string
406 confirmed?: boolean
407 created_at?: string
408 email?: string | null
409 id?: string
410 identity?: string | null
411 }
412 Relationships: [
413 {
414 foreignKeyName: "email_auth_tokens_identity_fkey"
415 columns: ["identity"]
416 isOneToOne: false
417 referencedRelation: "identities"
418 referencedColumns: ["id"]
419 },
420 ]
421 }
422 email_subscriptions_to_entity: {
423 Row: {
424 confirmation_code: string
425 confirmed: boolean
426 created_at: string
427 email: string
428 entity: string
429 id: string
430 token: string
431 }
432 Insert: {
433 confirmation_code: string
434 confirmed?: boolean
435 created_at?: string
436 email: string
437 entity: string
438 id?: string
439 token: string
440 }
441 Update: {
442 confirmation_code?: string
443 confirmed?: boolean
444 created_at?: string
445 email?: string
446 entity?: string
447 id?: string
448 token?: string
449 }
450 Relationships: [
451 {
452 foreignKeyName: "email_subscriptions_to_entity_entity_fkey"
453 columns: ["entity"]
454 isOneToOne: false
455 referencedRelation: "entities"
456 referencedColumns: ["id"]
457 },
458 {
459 foreignKeyName: "email_subscriptions_to_entity_token_fkey"
460 columns: ["token"]
461 isOneToOne: false
462 referencedRelation: "permission_tokens"
463 referencedColumns: ["id"]
464 },
465 ]
466 }
467 entities: {
468 Row: {
469 created_at: string
470 id: string
471 set: string
472 }
473 Insert: {
474 created_at?: string
475 id: string
476 set: string
477 }
478 Update: {
479 created_at?: string
480 id?: string
481 set?: string
482 }
483 Relationships: [
484 {
485 foreignKeyName: "entities_set_fkey"
486 columns: ["set"]
487 isOneToOne: false
488 referencedRelation: "entity_sets"
489 referencedColumns: ["id"]
490 },
491 ]
492 }
493 entity_sets: {
494 Row: {
495 created_at: string
496 id: string
497 }
498 Insert: {
499 created_at?: string
500 id?: string
501 }
502 Update: {
503 created_at?: string
504 id?: string
505 }
506 Relationships: []
507 }
508 facts: {
509 Row: {
510 attribute: string
511 created_at: string
512 data: Json
513 entity: string
514 id: string
515 updated_at: string | null
516 version: number
517 }
518 Insert: {
519 attribute: string
520 created_at?: string
521 data: Json
522 entity: string
523 id: string
524 updated_at?: string | null
525 version?: number
526 }
527 Update: {
528 attribute?: string
529 created_at?: string
530 data?: Json
531 entity?: string
532 id?: string
533 updated_at?: string | null
534 version?: number
535 }
536 Relationships: [
537 {
538 foreignKeyName: "facts_entity_fkey"
539 columns: ["entity"]
540 isOneToOne: false
541 referencedRelation: "entities"
542 referencedColumns: ["id"]
543 },
544 ]
545 }
546 identities: {
547 Row: {
548 atp_did: string | null
549 created_at: string
550 email: string | null
551 home_page: string
552 id: string
553 interface_state: Json | null
554 }
555 Insert: {
556 atp_did?: string | null
557 created_at?: string
558 email?: string | null
559 home_page: string
560 id?: string
561 interface_state?: Json | null
562 }
563 Update: {
564 atp_did?: string | null
565 created_at?: string
566 email?: string | null
567 home_page?: string
568 id?: string
569 interface_state?: Json | null
570 }
571 Relationships: [
572 {
573 foreignKeyName: "identities_home_page_fkey"
574 columns: ["home_page"]
575 isOneToOne: false
576 referencedRelation: "permission_tokens"
577 referencedColumns: ["id"]
578 },
579 ]
580 }
581 leaflets_in_publications: {
582 Row: {
583 archived: boolean | null
584 description: string
585 doc: string | null
586 leaflet: string
587 publication: string
588 title: string
589 }
590 Insert: {
591 archived?: boolean | null
592 description?: string
593 doc?: string | null
594 leaflet: string
595 publication: string
596 title?: string
597 }
598 Update: {
599 archived?: boolean | null
600 description?: string
601 doc?: string | null
602 leaflet?: string
603 publication?: string
604 title?: string
605 }
606 Relationships: [
607 {
608 foreignKeyName: "leaflets_in_publications_doc_fkey"
609 columns: ["doc"]
610 isOneToOne: false
611 referencedRelation: "documents"
612 referencedColumns: ["uri"]
613 },
614 {
615 foreignKeyName: "leaflets_in_publications_leaflet_fkey"
616 columns: ["leaflet"]
617 isOneToOne: false
618 referencedRelation: "permission_tokens"
619 referencedColumns: ["id"]
620 },
621 {
622 foreignKeyName: "leaflets_in_publications_publication_fkey"
623 columns: ["publication"]
624 isOneToOne: false
625 referencedRelation: "publications"
626 referencedColumns: ["uri"]
627 },
628 ]
629 }
630 leaflets_to_documents: {
631 Row: {
632 created_at: string
633 description: string
634 document: string
635 leaflet: string
636 title: string
637 }
638 Insert: {
639 created_at?: string
640 description?: string
641 document: string
642 leaflet: string
643 title?: string
644 }
645 Update: {
646 created_at?: string
647 description?: string
648 document?: string
649 leaflet?: string
650 title?: string
651 }
652 Relationships: [
653 {
654 foreignKeyName: "leaflets_to_documents_document_fkey"
655 columns: ["document"]
656 isOneToOne: false
657 referencedRelation: "documents"
658 referencedColumns: ["uri"]
659 },
660 {
661 foreignKeyName: "leaflets_to_documents_leaflet_fkey"
662 columns: ["leaflet"]
663 isOneToOne: false
664 referencedRelation: "permission_tokens"
665 referencedColumns: ["id"]
666 },
667 ]
668 }
669 notifications: {
670 Row: {
671 created_at: string
672 data: Json
673 id: string
674 read: boolean
675 recipient: string
676 }
677 Insert: {
678 created_at?: string
679 data: Json
680 id: string
681 read?: boolean
682 recipient: string
683 }
684 Update: {
685 created_at?: string
686 data?: Json
687 id?: string
688 read?: boolean
689 recipient?: string
690 }
691 Relationships: [
692 {
693 foreignKeyName: "notifications_recipient_fkey"
694 columns: ["recipient"]
695 isOneToOne: false
696 referencedRelation: "identities"
697 referencedColumns: ["atp_did"]
698 },
699 ]
700 }
701 oauth_session_store: {
702 Row: {
703 key: string
704 session: Json
705 }
706 Insert: {
707 key: string
708 session: Json
709 }
710 Update: {
711 key?: string
712 session?: Json
713 }
714 Relationships: []
715 }
716 oauth_state_store: {
717 Row: {
718 key: string
719 state: Json
720 }
721 Insert: {
722 key: string
723 state: Json
724 }
725 Update: {
726 key?: string
727 state?: Json
728 }
729 Relationships: []
730 }
731 permission_token_on_homepage: {
732 Row: {
733 archived: boolean | null
734 created_at: string
735 identity: string
736 token: string
737 }
738 Insert: {
739 archived?: boolean | null
740 created_at?: string
741 identity: string
742 token: string
743 }
744 Update: {
745 archived?: boolean | null
746 created_at?: string
747 identity?: string
748 token?: string
749 }
750 Relationships: [
751 {
752 foreignKeyName: "permission_token_creator_identity_fkey"
753 columns: ["identity"]
754 isOneToOne: false
755 referencedRelation: "identities"
756 referencedColumns: ["id"]
757 },
758 {
759 foreignKeyName: "permission_token_creator_token_fkey"
760 columns: ["token"]
761 isOneToOne: false
762 referencedRelation: "permission_tokens"
763 referencedColumns: ["id"]
764 },
765 ]
766 }
767 permission_token_rights: {
768 Row: {
769 change_entity_set: boolean
770 create_token: boolean
771 created_at: string
772 entity_set: string
773 read: boolean
774 token: string
775 write: boolean
776 }
777 Insert: {
778 change_entity_set?: boolean
779 create_token?: boolean
780 created_at?: string
781 entity_set: string
782 read?: boolean
783 token: string
784 write?: boolean
785 }
786 Update: {
787 change_entity_set?: boolean
788 create_token?: boolean
789 created_at?: string
790 entity_set?: string
791 read?: boolean
792 token?: string
793 write?: boolean
794 }
795 Relationships: [
796 {
797 foreignKeyName: "permission_token_rights_entity_set_fkey"
798 columns: ["entity_set"]
799 isOneToOne: false
800 referencedRelation: "entity_sets"
801 referencedColumns: ["id"]
802 },
803 {
804 foreignKeyName: "permission_token_rights_token_fkey"
805 columns: ["token"]
806 isOneToOne: false
807 referencedRelation: "permission_tokens"
808 referencedColumns: ["id"]
809 },
810 ]
811 }
812 permission_tokens: {
813 Row: {
814 blocked_by_admin: boolean | null
815 id: string
816 root_entity: string
817 }
818 Insert: {
819 blocked_by_admin?: boolean | null
820 id?: string
821 root_entity: string
822 }
823 Update: {
824 blocked_by_admin?: boolean | null
825 id?: string
826 root_entity?: string
827 }
828 Relationships: [
829 {
830 foreignKeyName: "permission_tokens_root_entity_fkey"
831 columns: ["root_entity"]
832 isOneToOne: false
833 referencedRelation: "entities"
834 referencedColumns: ["id"]
835 },
836 ]
837 }
838 phone_number_auth_tokens: {
839 Row: {
840 confirmation_code: string
841 confirmed: boolean
842 country_code: string
843 created_at: string
844 id: string
845 phone_number: string
846 }
847 Insert: {
848 confirmation_code: string
849 confirmed?: boolean
850 country_code: string
851 created_at?: string
852 id?: string
853 phone_number: string
854 }
855 Update: {
856 confirmation_code?: string
857 confirmed?: boolean
858 country_code?: string
859 created_at?: string
860 id?: string
861 phone_number?: string
862 }
863 Relationships: []
864 }
865 phone_rsvps_to_entity: {
866 Row: {
867 country_code: string
868 created_at: string
869 entity: string
870 id: string
871 name: string
872 phone_number: string
873 plus_ones: number
874 status: Database["public"]["Enums"]["rsvp_status"]
875 }
876 Insert: {
877 country_code: string
878 created_at?: string
879 entity: string
880 id?: string
881 name?: string
882 phone_number: string
883 plus_ones?: number
884 status: Database["public"]["Enums"]["rsvp_status"]
885 }
886 Update: {
887 country_code?: string
888 created_at?: string
889 entity?: string
890 id?: string
891 name?: string
892 phone_number?: string
893 plus_ones?: number
894 status?: Database["public"]["Enums"]["rsvp_status"]
895 }
896 Relationships: [
897 {
898 foreignKeyName: "phone_rsvps_to_entity_entity_fkey"
899 columns: ["entity"]
900 isOneToOne: false
901 referencedRelation: "entities"
902 referencedColumns: ["id"]
903 },
904 ]
905 }
906 poll_votes_on_entity: {
907 Row: {
908 created_at: string
909 id: string
910 option_entity: string
911 poll_entity: string
912 voter_token: string
913 }
914 Insert: {
915 created_at?: string
916 id?: string
917 option_entity: string
918 poll_entity: string
919 voter_token: string
920 }
921 Update: {
922 created_at?: string
923 id?: string
924 option_entity?: string
925 poll_entity?: string
926 voter_token?: string
927 }
928 Relationships: [
929 {
930 foreignKeyName: "poll_votes_on_entity_option_entity_fkey"
931 columns: ["option_entity"]
932 isOneToOne: false
933 referencedRelation: "entities"
934 referencedColumns: ["id"]
935 },
936 {
937 foreignKeyName: "poll_votes_on_entity_poll_entity_fkey"
938 columns: ["poll_entity"]
939 isOneToOne: false
940 referencedRelation: "entities"
941 referencedColumns: ["id"]
942 },
943 ]
944 }
945 publication_domains: {
946 Row: {
947 created_at: string
948 domain: string
949 identity: string
950 publication: string
951 }
952 Insert: {
953 created_at?: string
954 domain: string
955 identity: string
956 publication: string
957 }
958 Update: {
959 created_at?: string
960 domain?: string
961 identity?: string
962 publication?: string
963 }
964 Relationships: [
965 {
966 foreignKeyName: "publication_domains_domain_fkey"
967 columns: ["domain"]
968 isOneToOne: false
969 referencedRelation: "custom_domains"
970 referencedColumns: ["domain"]
971 },
972 {
973 foreignKeyName: "publication_domains_identity_fkey"
974 columns: ["identity"]
975 isOneToOne: false
976 referencedRelation: "identities"
977 referencedColumns: ["atp_did"]
978 },
979 {
980 foreignKeyName: "publication_domains_publication_fkey"
981 columns: ["publication"]
982 isOneToOne: false
983 referencedRelation: "publications"
984 referencedColumns: ["uri"]
985 },
986 ]
987 }
988 publication_subscriptions: {
989 Row: {
990 created_at: string
991 identity: string
992 publication: string
993 record: Json
994 uri: string
995 }
996 Insert: {
997 created_at?: string
998 identity: string
999 publication: string
1000 record: Json
1001 uri: string
1002 }
1003 Update: {
1004 created_at?: string
1005 identity?: string
1006 publication?: string
1007 record?: Json
1008 uri?: string
1009 }
1010 Relationships: [
1011 {
1012 foreignKeyName: "publication_subscriptions_identity_fkey"
1013 columns: ["identity"]
1014 isOneToOne: false
1015 referencedRelation: "identities"
1016 referencedColumns: ["atp_did"]
1017 },
1018 {
1019 foreignKeyName: "publication_subscriptions_publication_fkey"
1020 columns: ["publication"]
1021 isOneToOne: false
1022 referencedRelation: "publications"
1023 referencedColumns: ["uri"]
1024 },
1025 ]
1026 }
1027 publications: {
1028 Row: {
1029 identity_did: string
1030 indexed_at: string
1031 name: string
1032 record: Json | null
1033 uri: string
1034 }
1035 Insert: {
1036 identity_did: string
1037 indexed_at?: string
1038 name: string
1039 record?: Json | null
1040 uri: string
1041 }
1042 Update: {
1043 identity_did?: string
1044 indexed_at?: string
1045 name?: string
1046 record?: Json | null
1047 uri?: string
1048 }
1049 Relationships: [
1050 {
1051 foreignKeyName: "publications_identity_did_fkey"
1052 columns: ["identity_did"]
1053 isOneToOne: false
1054 referencedRelation: "identities"
1055 referencedColumns: ["atp_did"]
1056 },
1057 ]
1058 }
1059 replicache_clients: {
1060 Row: {
1061 client_group: string
1062 client_id: string
1063 last_mutation: number
1064 }
1065 Insert: {
1066 client_group: string
1067 client_id: string
1068 last_mutation: number
1069 }
1070 Update: {
1071 client_group?: string
1072 client_id?: string
1073 last_mutation?: number
1074 }
1075 Relationships: []
1076 }
1077 subscribers_to_publications: {
1078 Row: {
1079 created_at: string
1080 identity: string
1081 publication: string
1082 }
1083 Insert: {
1084 created_at?: string
1085 identity: string
1086 publication: string
1087 }
1088 Update: {
1089 created_at?: string
1090 identity?: string
1091 publication?: string
1092 }
1093 Relationships: [
1094 {
1095 foreignKeyName: "subscribers_to_publications_identity_fkey"
1096 columns: ["identity"]
1097 isOneToOne: false
1098 referencedRelation: "identities"
1099 referencedColumns: ["email"]
1100 },
1101 {
1102 foreignKeyName: "subscribers_to_publications_publication_fkey"
1103 columns: ["publication"]
1104 isOneToOne: false
1105 referencedRelation: "publications"
1106 referencedColumns: ["uri"]
1107 },
1108 ]
1109 }
1110 }
1111 Views: {
1112 [_ in never]: never
1113 }
1114 Functions: {
1115 get_facts: {
1116 Args: {
1117 root: string
1118 }
1119 Returns: {
1120 attribute: string
1121 created_at: string
1122 data: Json
1123 entity: string
1124 id: string
1125 updated_at: string | null
1126 version: number
1127 }[]
1128 }
1129 get_facts_for_roots: {
1130 Args: {
1131 roots: string[]
1132 max_depth: number
1133 }
1134 Returns: {
1135 root_id: string
1136 id: string
1137 entity: string
1138 attribute: string
1139 data: Json
1140 created_at: string
1141 updated_at: string
1142 version: number
1143 }[]
1144 }
1145 get_facts_with_depth: {
1146 Args: {
1147 root: string
1148 max_depth: number
1149 }
1150 Returns: {
1151 like: unknown
1152 }[]
1153 }
1154 pull_data: {
1155 Args: {
1156 token_id: string
1157 client_group_id: string
1158 }
1159 Returns: Database["public"]["CompositeTypes"]["pull_result"]
1160 }
1161 }
1162 Enums: {
1163 rsvp_status: "GOING" | "NOT_GOING" | "MAYBE"
1164 }
1165 CompositeTypes: {
1166 pull_result: {
1167 client_groups: Json | null
1168 facts: Json | null
1169 publications: Json | null
1170 }
1171 }
1172 }
1173 storage: {
1174 Tables: {
1175 buckets: {
1176 Row: {
1177 allowed_mime_types: string[] | null
1178 avif_autodetection: boolean | null
1179 created_at: string | null
1180 file_size_limit: number | null
1181 id: string
1182 name: string
1183 owner: string | null
1184 owner_id: string | null
1185 public: boolean | null
1186 updated_at: string | null
1187 }
1188 Insert: {
1189 allowed_mime_types?: string[] | null
1190 avif_autodetection?: boolean | null
1191 created_at?: string | null
1192 file_size_limit?: number | null
1193 id: string
1194 name: string
1195 owner?: string | null
1196 owner_id?: string | null
1197 public?: boolean | null
1198 updated_at?: string | null
1199 }
1200 Update: {
1201 allowed_mime_types?: string[] | null
1202 avif_autodetection?: boolean | null
1203 created_at?: string | null
1204 file_size_limit?: number | null
1205 id?: string
1206 name?: string
1207 owner?: string | null
1208 owner_id?: string | null
1209 public?: boolean | null
1210 updated_at?: string | null
1211 }
1212 Relationships: []
1213 }
1214 migrations: {
1215 Row: {
1216 executed_at: string | null
1217 hash: string
1218 id: number
1219 name: string
1220 }
1221 Insert: {
1222 executed_at?: string | null
1223 hash: string
1224 id: number
1225 name: string
1226 }
1227 Update: {
1228 executed_at?: string | null
1229 hash?: string
1230 id?: number
1231 name?: string
1232 }
1233 Relationships: []
1234 }
1235 objects: {
1236 Row: {
1237 bucket_id: string | null
1238 created_at: string | null
1239 id: string
1240 last_accessed_at: string | null
1241 metadata: Json | null
1242 name: string | null
1243 owner: string | null
1244 owner_id: string | null
1245 path_tokens: string[] | null
1246 updated_at: string | null
1247 version: string | null
1248 }
1249 Insert: {
1250 bucket_id?: string | null
1251 created_at?: string | null
1252 id?: string
1253 last_accessed_at?: string | null
1254 metadata?: Json | null
1255 name?: string | null
1256 owner?: string | null
1257 owner_id?: string | null
1258 path_tokens?: string[] | null
1259 updated_at?: string | null
1260 version?: string | null
1261 }
1262 Update: {
1263 bucket_id?: string | null
1264 created_at?: string | null
1265 id?: string
1266 last_accessed_at?: string | null
1267 metadata?: Json | null
1268 name?: string | null
1269 owner?: string | null
1270 owner_id?: string | null
1271 path_tokens?: string[] | null
1272 updated_at?: string | null
1273 version?: string | null
1274 }
1275 Relationships: [
1276 {
1277 foreignKeyName: "objects_bucketId_fkey"
1278 columns: ["bucket_id"]
1279 isOneToOne: false
1280 referencedRelation: "buckets"
1281 referencedColumns: ["id"]
1282 },
1283 ]
1284 }
1285 s3_multipart_uploads: {
1286 Row: {
1287 bucket_id: string
1288 created_at: string
1289 id: string
1290 in_progress_size: number
1291 key: string
1292 owner_id: string | null
1293 upload_signature: string
1294 version: string
1295 }
1296 Insert: {
1297 bucket_id: string
1298 created_at?: string
1299 id: string
1300 in_progress_size?: number
1301 key: string
1302 owner_id?: string | null
1303 upload_signature: string
1304 version: string
1305 }
1306 Update: {
1307 bucket_id?: string
1308 created_at?: string
1309 id?: string
1310 in_progress_size?: number
1311 key?: string
1312 owner_id?: string | null
1313 upload_signature?: string
1314 version?: string
1315 }
1316 Relationships: [
1317 {
1318 foreignKeyName: "s3_multipart_uploads_bucket_id_fkey"
1319 columns: ["bucket_id"]
1320 isOneToOne: false
1321 referencedRelation: "buckets"
1322 referencedColumns: ["id"]
1323 },
1324 ]
1325 }
1326 s3_multipart_uploads_parts: {
1327 Row: {
1328 bucket_id: string
1329 created_at: string
1330 etag: string
1331 id: string
1332 key: string
1333 owner_id: string | null
1334 part_number: number
1335 size: number
1336 upload_id: string
1337 version: string
1338 }
1339 Insert: {
1340 bucket_id: string
1341 created_at?: string
1342 etag: string
1343 id?: string
1344 key: string
1345 owner_id?: string | null
1346 part_number: number
1347 size?: number
1348 upload_id: string
1349 version: string
1350 }
1351 Update: {
1352 bucket_id?: string
1353 created_at?: string
1354 etag?: string
1355 id?: string
1356 key?: string
1357 owner_id?: string | null
1358 part_number?: number
1359 size?: number
1360 upload_id?: string
1361 version?: string
1362 }
1363 Relationships: [
1364 {
1365 foreignKeyName: "s3_multipart_uploads_parts_bucket_id_fkey"
1366 columns: ["bucket_id"]
1367 isOneToOne: false
1368 referencedRelation: "buckets"
1369 referencedColumns: ["id"]
1370 },
1371 {
1372 foreignKeyName: "s3_multipart_uploads_parts_upload_id_fkey"
1373 columns: ["upload_id"]
1374 isOneToOne: false
1375 referencedRelation: "s3_multipart_uploads"
1376 referencedColumns: ["id"]
1377 },
1378 ]
1379 }
1380 }
1381 Views: {
1382 [_ in never]: never
1383 }
1384 Functions: {
1385 can_insert_object: {
1386 Args: {
1387 bucketid: string
1388 name: string
1389 owner: string
1390 metadata: Json
1391 }
1392 Returns: undefined
1393 }
1394 extension: {
1395 Args: {
1396 name: string
1397 }
1398 Returns: string
1399 }
1400 filename: {
1401 Args: {
1402 name: string
1403 }
1404 Returns: string
1405 }
1406 foldername: {
1407 Args: {
1408 name: string
1409 }
1410 Returns: string[]
1411 }
1412 get_size_by_bucket: {
1413 Args: Record<PropertyKey, never>
1414 Returns: {
1415 size: number
1416 bucket_id: string
1417 }[]
1418 }
1419 list_multipart_uploads_with_delimiter: {
1420 Args: {
1421 bucket_id: string
1422 prefix_param: string
1423 delimiter_param: string
1424 max_keys?: number
1425 next_key_token?: string
1426 next_upload_token?: string
1427 }
1428 Returns: {
1429 key: string
1430 id: string
1431 created_at: string
1432 }[]
1433 }
1434 list_objects_with_delimiter: {
1435 Args: {
1436 bucket_id: string
1437 prefix_param: string
1438 delimiter_param: string
1439 max_keys?: number
1440 start_after?: string
1441 next_token?: string
1442 }
1443 Returns: {
1444 name: string
1445 id: string
1446 metadata: Json
1447 updated_at: string
1448 }[]
1449 }
1450 search: {
1451 Args: {
1452 prefix: string
1453 bucketname: string
1454 limits?: number
1455 levels?: number
1456 offsets?: number
1457 search?: string
1458 sortcolumn?: string
1459 sortorder?: string
1460 }
1461 Returns: {
1462 name: string
1463 id: string
1464 updated_at: string
1465 created_at: string
1466 last_accessed_at: string
1467 metadata: Json
1468 }[]
1469 }
1470 }
1471 Enums: {
1472 [_ in never]: never
1473 }
1474 CompositeTypes: {
1475 [_ in never]: never
1476 }
1477 }
1478}
1479
1480type PublicSchema = Database[Extract<keyof Database, "public">]
1481
1482export type Tables<
1483 PublicTableNameOrOptions extends
1484 | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
1485 | { schema: keyof Database },
1486 TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1487 ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
1488 Database[PublicTableNameOrOptions["schema"]]["Views"])
1489 : never = never,
1490> = PublicTableNameOrOptions extends { schema: keyof Database }
1491 ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
1492 Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
1493 Row: infer R
1494 }
1495 ? R
1496 : never
1497 : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
1498 PublicSchema["Views"])
1499 ? (PublicSchema["Tables"] &
1500 PublicSchema["Views"])[PublicTableNameOrOptions] extends {
1501 Row: infer R
1502 }
1503 ? R
1504 : never
1505 : never
1506
1507export type TablesInsert<
1508 PublicTableNameOrOptions extends
1509 | keyof PublicSchema["Tables"]
1510 | { schema: keyof Database },
1511 TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1512 ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
1513 : never = never,
1514> = PublicTableNameOrOptions extends { schema: keyof Database }
1515 ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1516 Insert: infer I
1517 }
1518 ? I
1519 : never
1520 : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
1521 ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
1522 Insert: infer I
1523 }
1524 ? I
1525 : never
1526 : never
1527
1528export type TablesUpdate<
1529 PublicTableNameOrOptions extends
1530 | keyof PublicSchema["Tables"]
1531 | { schema: keyof Database },
1532 TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1533 ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
1534 : never = never,
1535> = PublicTableNameOrOptions extends { schema: keyof Database }
1536 ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1537 Update: infer U
1538 }
1539 ? U
1540 : never
1541 : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
1542 ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
1543 Update: infer U
1544 }
1545 ? U
1546 : never
1547 : never
1548
1549export type Enums<
1550 PublicEnumNameOrOptions extends
1551 | keyof PublicSchema["Enums"]
1552 | { schema: keyof Database },
1553 EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
1554 ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
1555 : never = never,
1556> = PublicEnumNameOrOptions extends { schema: keyof Database }
1557 ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
1558 : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
1559 ? PublicSchema["Enums"][PublicEnumNameOrOptions]
1560 : never
1561