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 cover_image: string | null
585 description: string
586 doc: string | null
587 leaflet: string
588 publication: string
589 title: string
590 }
591 Insert: {
592 archived?: boolean | null
593 cover_image?: string | null
594 description?: string
595 doc?: string | null
596 leaflet: string
597 publication: string
598 title?: string
599 }
600 Update: {
601 archived?: boolean | null
602 cover_image?: string | null
603 description?: string
604 doc?: string | null
605 leaflet?: string
606 publication?: string
607 title?: string
608 }
609 Relationships: [
610 {
611 foreignKeyName: "leaflets_in_publications_doc_fkey"
612 columns: ["doc"]
613 isOneToOne: false
614 referencedRelation: "documents"
615 referencedColumns: ["uri"]
616 },
617 {
618 foreignKeyName: "leaflets_in_publications_leaflet_fkey"
619 columns: ["leaflet"]
620 isOneToOne: false
621 referencedRelation: "permission_tokens"
622 referencedColumns: ["id"]
623 },
624 {
625 foreignKeyName: "leaflets_in_publications_publication_fkey"
626 columns: ["publication"]
627 isOneToOne: false
628 referencedRelation: "publications"
629 referencedColumns: ["uri"]
630 },
631 ]
632 }
633 leaflets_to_documents: {
634 Row: {
635 cover_image: string | null
636 created_at: string
637 description: string
638 document: string
639 leaflet: string
640 title: string
641 }
642 Insert: {
643 cover_image?: string | null
644 created_at?: string
645 description?: string
646 document: string
647 leaflet: string
648 title?: string
649 }
650 Update: {
651 cover_image?: string | null
652 created_at?: string
653 description?: string
654 document?: string
655 leaflet?: string
656 title?: string
657 }
658 Relationships: [
659 {
660 foreignKeyName: "leaflets_to_documents_document_fkey"
661 columns: ["document"]
662 isOneToOne: false
663 referencedRelation: "documents"
664 referencedColumns: ["uri"]
665 },
666 {
667 foreignKeyName: "leaflets_to_documents_leaflet_fkey"
668 columns: ["leaflet"]
669 isOneToOne: false
670 referencedRelation: "permission_tokens"
671 referencedColumns: ["id"]
672 },
673 ]
674 }
675 notifications: {
676 Row: {
677 created_at: string
678 data: Json
679 id: string
680 read: boolean
681 recipient: string
682 }
683 Insert: {
684 created_at?: string
685 data: Json
686 id: string
687 read?: boolean
688 recipient: string
689 }
690 Update: {
691 created_at?: string
692 data?: Json
693 id?: string
694 read?: boolean
695 recipient?: string
696 }
697 Relationships: [
698 {
699 foreignKeyName: "notifications_recipient_fkey"
700 columns: ["recipient"]
701 isOneToOne: false
702 referencedRelation: "identities"
703 referencedColumns: ["atp_did"]
704 },
705 ]
706 }
707 oauth_session_store: {
708 Row: {
709 key: string
710 session: Json
711 }
712 Insert: {
713 key: string
714 session: Json
715 }
716 Update: {
717 key?: string
718 session?: Json
719 }
720 Relationships: []
721 }
722 oauth_state_store: {
723 Row: {
724 key: string
725 state: Json
726 }
727 Insert: {
728 key: string
729 state: Json
730 }
731 Update: {
732 key?: string
733 state?: Json
734 }
735 Relationships: []
736 }
737 permission_token_on_homepage: {
738 Row: {
739 archived: boolean | null
740 created_at: string
741 identity: string
742 token: string
743 }
744 Insert: {
745 archived?: boolean | null
746 created_at?: string
747 identity: string
748 token: string
749 }
750 Update: {
751 archived?: boolean | null
752 created_at?: string
753 identity?: string
754 token?: string
755 }
756 Relationships: [
757 {
758 foreignKeyName: "permission_token_creator_identity_fkey"
759 columns: ["identity"]
760 isOneToOne: false
761 referencedRelation: "identities"
762 referencedColumns: ["id"]
763 },
764 {
765 foreignKeyName: "permission_token_creator_token_fkey"
766 columns: ["token"]
767 isOneToOne: false
768 referencedRelation: "permission_tokens"
769 referencedColumns: ["id"]
770 },
771 ]
772 }
773 permission_token_rights: {
774 Row: {
775 change_entity_set: boolean
776 create_token: boolean
777 created_at: string
778 entity_set: string
779 read: boolean
780 token: string
781 write: boolean
782 }
783 Insert: {
784 change_entity_set?: boolean
785 create_token?: boolean
786 created_at?: string
787 entity_set: string
788 read?: boolean
789 token: string
790 write?: boolean
791 }
792 Update: {
793 change_entity_set?: boolean
794 create_token?: boolean
795 created_at?: string
796 entity_set?: string
797 read?: boolean
798 token?: string
799 write?: boolean
800 }
801 Relationships: [
802 {
803 foreignKeyName: "permission_token_rights_entity_set_fkey"
804 columns: ["entity_set"]
805 isOneToOne: false
806 referencedRelation: "entity_sets"
807 referencedColumns: ["id"]
808 },
809 {
810 foreignKeyName: "permission_token_rights_token_fkey"
811 columns: ["token"]
812 isOneToOne: false
813 referencedRelation: "permission_tokens"
814 referencedColumns: ["id"]
815 },
816 ]
817 }
818 permission_tokens: {
819 Row: {
820 blocked_by_admin: boolean | null
821 id: string
822 root_entity: string
823 }
824 Insert: {
825 blocked_by_admin?: boolean | null
826 id?: string
827 root_entity: string
828 }
829 Update: {
830 blocked_by_admin?: boolean | null
831 id?: string
832 root_entity?: string
833 }
834 Relationships: [
835 {
836 foreignKeyName: "permission_tokens_root_entity_fkey"
837 columns: ["root_entity"]
838 isOneToOne: false
839 referencedRelation: "entities"
840 referencedColumns: ["id"]
841 },
842 ]
843 }
844 phone_number_auth_tokens: {
845 Row: {
846 confirmation_code: string
847 confirmed: boolean
848 country_code: string
849 created_at: string
850 id: string
851 phone_number: string
852 }
853 Insert: {
854 confirmation_code: string
855 confirmed?: boolean
856 country_code: string
857 created_at?: string
858 id?: string
859 phone_number: string
860 }
861 Update: {
862 confirmation_code?: string
863 confirmed?: boolean
864 country_code?: string
865 created_at?: string
866 id?: string
867 phone_number?: string
868 }
869 Relationships: []
870 }
871 phone_rsvps_to_entity: {
872 Row: {
873 country_code: string
874 created_at: string
875 entity: string
876 id: string
877 name: string
878 phone_number: string
879 plus_ones: number
880 status: Database["public"]["Enums"]["rsvp_status"]
881 }
882 Insert: {
883 country_code: string
884 created_at?: string
885 entity: string
886 id?: string
887 name?: string
888 phone_number: string
889 plus_ones?: number
890 status: Database["public"]["Enums"]["rsvp_status"]
891 }
892 Update: {
893 country_code?: string
894 created_at?: string
895 entity?: string
896 id?: string
897 name?: string
898 phone_number?: string
899 plus_ones?: number
900 status?: Database["public"]["Enums"]["rsvp_status"]
901 }
902 Relationships: [
903 {
904 foreignKeyName: "phone_rsvps_to_entity_entity_fkey"
905 columns: ["entity"]
906 isOneToOne: false
907 referencedRelation: "entities"
908 referencedColumns: ["id"]
909 },
910 ]
911 }
912 poll_votes_on_entity: {
913 Row: {
914 created_at: string
915 id: string
916 option_entity: string
917 poll_entity: string
918 voter_token: string
919 }
920 Insert: {
921 created_at?: string
922 id?: string
923 option_entity: string
924 poll_entity: string
925 voter_token: string
926 }
927 Update: {
928 created_at?: string
929 id?: string
930 option_entity?: string
931 poll_entity?: string
932 voter_token?: string
933 }
934 Relationships: [
935 {
936 foreignKeyName: "poll_votes_on_entity_option_entity_fkey"
937 columns: ["option_entity"]
938 isOneToOne: false
939 referencedRelation: "entities"
940 referencedColumns: ["id"]
941 },
942 {
943 foreignKeyName: "poll_votes_on_entity_poll_entity_fkey"
944 columns: ["poll_entity"]
945 isOneToOne: false
946 referencedRelation: "entities"
947 referencedColumns: ["id"]
948 },
949 ]
950 }
951 publication_domains: {
952 Row: {
953 created_at: string
954 domain: string
955 identity: string
956 publication: string
957 }
958 Insert: {
959 created_at?: string
960 domain: string
961 identity: string
962 publication: string
963 }
964 Update: {
965 created_at?: string
966 domain?: string
967 identity?: string
968 publication?: string
969 }
970 Relationships: [
971 {
972 foreignKeyName: "publication_domains_domain_fkey"
973 columns: ["domain"]
974 isOneToOne: false
975 referencedRelation: "custom_domains"
976 referencedColumns: ["domain"]
977 },
978 {
979 foreignKeyName: "publication_domains_identity_fkey"
980 columns: ["identity"]
981 isOneToOne: false
982 referencedRelation: "identities"
983 referencedColumns: ["atp_did"]
984 },
985 {
986 foreignKeyName: "publication_domains_publication_fkey"
987 columns: ["publication"]
988 isOneToOne: false
989 referencedRelation: "publications"
990 referencedColumns: ["uri"]
991 },
992 ]
993 }
994 publication_subscriptions: {
995 Row: {
996 created_at: string
997 identity: string
998 publication: string
999 record: Json
1000 uri: string
1001 }
1002 Insert: {
1003 created_at?: string
1004 identity: string
1005 publication: string
1006 record: Json
1007 uri: string
1008 }
1009 Update: {
1010 created_at?: string
1011 identity?: string
1012 publication?: string
1013 record?: Json
1014 uri?: string
1015 }
1016 Relationships: [
1017 {
1018 foreignKeyName: "publication_subscriptions_identity_fkey"
1019 columns: ["identity"]
1020 isOneToOne: false
1021 referencedRelation: "identities"
1022 referencedColumns: ["atp_did"]
1023 },
1024 {
1025 foreignKeyName: "publication_subscriptions_publication_fkey"
1026 columns: ["publication"]
1027 isOneToOne: false
1028 referencedRelation: "publications"
1029 referencedColumns: ["uri"]
1030 },
1031 ]
1032 }
1033 publications: {
1034 Row: {
1035 identity_did: string
1036 indexed_at: string
1037 name: string
1038 record: Json | null
1039 uri: string
1040 }
1041 Insert: {
1042 identity_did: string
1043 indexed_at?: string
1044 name: string
1045 record?: Json | null
1046 uri: string
1047 }
1048 Update: {
1049 identity_did?: string
1050 indexed_at?: string
1051 name?: string
1052 record?: Json | null
1053 uri?: string
1054 }
1055 Relationships: [
1056 {
1057 foreignKeyName: "publications_identity_did_fkey"
1058 columns: ["identity_did"]
1059 isOneToOne: false
1060 referencedRelation: "identities"
1061 referencedColumns: ["atp_did"]
1062 },
1063 ]
1064 }
1065 replicache_clients: {
1066 Row: {
1067 client_group: string
1068 client_id: string
1069 last_mutation: number
1070 }
1071 Insert: {
1072 client_group: string
1073 client_id: string
1074 last_mutation: number
1075 }
1076 Update: {
1077 client_group?: string
1078 client_id?: string
1079 last_mutation?: number
1080 }
1081 Relationships: []
1082 }
1083 subscribers_to_publications: {
1084 Row: {
1085 created_at: string
1086 identity: string
1087 publication: string
1088 }
1089 Insert: {
1090 created_at?: string
1091 identity: string
1092 publication: string
1093 }
1094 Update: {
1095 created_at?: string
1096 identity?: string
1097 publication?: string
1098 }
1099 Relationships: [
1100 {
1101 foreignKeyName: "subscribers_to_publications_identity_fkey"
1102 columns: ["identity"]
1103 isOneToOne: false
1104 referencedRelation: "identities"
1105 referencedColumns: ["email"]
1106 },
1107 {
1108 foreignKeyName: "subscribers_to_publications_publication_fkey"
1109 columns: ["publication"]
1110 isOneToOne: false
1111 referencedRelation: "publications"
1112 referencedColumns: ["uri"]
1113 },
1114 ]
1115 }
1116 }
1117 Views: {
1118 [_ in never]: never
1119 }
1120 Functions: {
1121 create_identity_homepage: {
1122 Args: Record<PropertyKey, never>
1123 Returns: string
1124 }
1125 get_facts: {
1126 Args: {
1127 root: string
1128 }
1129 Returns: {
1130 attribute: string
1131 created_at: string
1132 data: Json
1133 entity: string
1134 id: string
1135 updated_at: string | null
1136 version: number
1137 }[]
1138 }
1139 get_facts_for_roots: {
1140 Args: {
1141 roots: string[]
1142 max_depth: number
1143 }
1144 Returns: {
1145 root_id: string
1146 id: string
1147 entity: string
1148 attribute: string
1149 data: Json
1150 created_at: string
1151 updated_at: string
1152 version: number
1153 }[]
1154 }
1155 get_facts_with_depth: {
1156 Args: {
1157 root: string
1158 max_depth: number
1159 }
1160 Returns: {
1161 like: unknown
1162 }[]
1163 }
1164 pull_data: {
1165 Args: {
1166 token_id: string
1167 client_group_id: string
1168 }
1169 Returns: Database["public"]["CompositeTypes"]["pull_result"]
1170 }
1171 search_tags: {
1172 Args: {
1173 search_query: string
1174 }
1175 Returns: {
1176 name: string
1177 document_count: number
1178 }[]
1179 }
1180 }
1181 Enums: {
1182 rsvp_status: "GOING" | "NOT_GOING" | "MAYBE"
1183 }
1184 CompositeTypes: {
1185 pull_result: {
1186 client_groups: Json | null
1187 facts: Json | null
1188 publications: Json | null
1189 }
1190 }
1191 }
1192 storage: {
1193 Tables: {
1194 buckets: {
1195 Row: {
1196 allowed_mime_types: string[] | null
1197 avif_autodetection: boolean | null
1198 created_at: string | null
1199 file_size_limit: number | null
1200 id: string
1201 name: string
1202 owner: string | null
1203 owner_id: string | null
1204 public: boolean | null
1205 updated_at: string | null
1206 }
1207 Insert: {
1208 allowed_mime_types?: string[] | null
1209 avif_autodetection?: boolean | null
1210 created_at?: string | null
1211 file_size_limit?: number | null
1212 id: string
1213 name: string
1214 owner?: string | null
1215 owner_id?: string | null
1216 public?: boolean | null
1217 updated_at?: string | null
1218 }
1219 Update: {
1220 allowed_mime_types?: string[] | null
1221 avif_autodetection?: boolean | null
1222 created_at?: string | null
1223 file_size_limit?: number | null
1224 id?: string
1225 name?: string
1226 owner?: string | null
1227 owner_id?: string | null
1228 public?: boolean | null
1229 updated_at?: string | null
1230 }
1231 Relationships: []
1232 }
1233 migrations: {
1234 Row: {
1235 executed_at: string | null
1236 hash: string
1237 id: number
1238 name: string
1239 }
1240 Insert: {
1241 executed_at?: string | null
1242 hash: string
1243 id: number
1244 name: string
1245 }
1246 Update: {
1247 executed_at?: string | null
1248 hash?: string
1249 id?: number
1250 name?: string
1251 }
1252 Relationships: []
1253 }
1254 objects: {
1255 Row: {
1256 bucket_id: string | null
1257 created_at: string | null
1258 id: string
1259 last_accessed_at: string | null
1260 metadata: Json | null
1261 name: string | null
1262 owner: string | null
1263 owner_id: string | null
1264 path_tokens: string[] | null
1265 updated_at: string | null
1266 version: string | null
1267 }
1268 Insert: {
1269 bucket_id?: string | null
1270 created_at?: string | null
1271 id?: string
1272 last_accessed_at?: string | null
1273 metadata?: Json | null
1274 name?: string | null
1275 owner?: string | null
1276 owner_id?: string | null
1277 path_tokens?: string[] | null
1278 updated_at?: string | null
1279 version?: string | null
1280 }
1281 Update: {
1282 bucket_id?: string | null
1283 created_at?: string | null
1284 id?: string
1285 last_accessed_at?: string | null
1286 metadata?: Json | null
1287 name?: string | null
1288 owner?: string | null
1289 owner_id?: string | null
1290 path_tokens?: string[] | null
1291 updated_at?: string | null
1292 version?: string | null
1293 }
1294 Relationships: [
1295 {
1296 foreignKeyName: "objects_bucketId_fkey"
1297 columns: ["bucket_id"]
1298 isOneToOne: false
1299 referencedRelation: "buckets"
1300 referencedColumns: ["id"]
1301 },
1302 ]
1303 }
1304 s3_multipart_uploads: {
1305 Row: {
1306 bucket_id: string
1307 created_at: string
1308 id: string
1309 in_progress_size: number
1310 key: string
1311 owner_id: string | null
1312 upload_signature: string
1313 version: string
1314 }
1315 Insert: {
1316 bucket_id: string
1317 created_at?: string
1318 id: string
1319 in_progress_size?: number
1320 key: string
1321 owner_id?: string | null
1322 upload_signature: string
1323 version: string
1324 }
1325 Update: {
1326 bucket_id?: string
1327 created_at?: string
1328 id?: string
1329 in_progress_size?: number
1330 key?: string
1331 owner_id?: string | null
1332 upload_signature?: string
1333 version?: string
1334 }
1335 Relationships: [
1336 {
1337 foreignKeyName: "s3_multipart_uploads_bucket_id_fkey"
1338 columns: ["bucket_id"]
1339 isOneToOne: false
1340 referencedRelation: "buckets"
1341 referencedColumns: ["id"]
1342 },
1343 ]
1344 }
1345 s3_multipart_uploads_parts: {
1346 Row: {
1347 bucket_id: string
1348 created_at: string
1349 etag: string
1350 id: string
1351 key: string
1352 owner_id: string | null
1353 part_number: number
1354 size: number
1355 upload_id: string
1356 version: string
1357 }
1358 Insert: {
1359 bucket_id: string
1360 created_at?: string
1361 etag: string
1362 id?: string
1363 key: string
1364 owner_id?: string | null
1365 part_number: number
1366 size?: number
1367 upload_id: string
1368 version: string
1369 }
1370 Update: {
1371 bucket_id?: string
1372 created_at?: string
1373 etag?: string
1374 id?: string
1375 key?: string
1376 owner_id?: string | null
1377 part_number?: number
1378 size?: number
1379 upload_id?: string
1380 version?: string
1381 }
1382 Relationships: [
1383 {
1384 foreignKeyName: "s3_multipart_uploads_parts_bucket_id_fkey"
1385 columns: ["bucket_id"]
1386 isOneToOne: false
1387 referencedRelation: "buckets"
1388 referencedColumns: ["id"]
1389 },
1390 {
1391 foreignKeyName: "s3_multipart_uploads_parts_upload_id_fkey"
1392 columns: ["upload_id"]
1393 isOneToOne: false
1394 referencedRelation: "s3_multipart_uploads"
1395 referencedColumns: ["id"]
1396 },
1397 ]
1398 }
1399 }
1400 Views: {
1401 [_ in never]: never
1402 }
1403 Functions: {
1404 can_insert_object: {
1405 Args: {
1406 bucketid: string
1407 name: string
1408 owner: string
1409 metadata: Json
1410 }
1411 Returns: undefined
1412 }
1413 extension: {
1414 Args: {
1415 name: string
1416 }
1417 Returns: string
1418 }
1419 filename: {
1420 Args: {
1421 name: string
1422 }
1423 Returns: string
1424 }
1425 foldername: {
1426 Args: {
1427 name: string
1428 }
1429 Returns: string[]
1430 }
1431 get_size_by_bucket: {
1432 Args: Record<PropertyKey, never>
1433 Returns: {
1434 size: number
1435 bucket_id: string
1436 }[]
1437 }
1438 list_multipart_uploads_with_delimiter: {
1439 Args: {
1440 bucket_id: string
1441 prefix_param: string
1442 delimiter_param: string
1443 max_keys?: number
1444 next_key_token?: string
1445 next_upload_token?: string
1446 }
1447 Returns: {
1448 key: string
1449 id: string
1450 created_at: string
1451 }[]
1452 }
1453 list_objects_with_delimiter: {
1454 Args: {
1455 bucket_id: string
1456 prefix_param: string
1457 delimiter_param: string
1458 max_keys?: number
1459 start_after?: string
1460 next_token?: string
1461 }
1462 Returns: {
1463 name: string
1464 id: string
1465 metadata: Json
1466 updated_at: string
1467 }[]
1468 }
1469 search: {
1470 Args: {
1471 prefix: string
1472 bucketname: string
1473 limits?: number
1474 levels?: number
1475 offsets?: number
1476 search?: string
1477 sortcolumn?: string
1478 sortorder?: string
1479 }
1480 Returns: {
1481 name: string
1482 id: string
1483 updated_at: string
1484 created_at: string
1485 last_accessed_at: string
1486 metadata: Json
1487 }[]
1488 }
1489 }
1490 Enums: {
1491 [_ in never]: never
1492 }
1493 CompositeTypes: {
1494 [_ in never]: never
1495 }
1496 }
1497}
1498
1499type PublicSchema = Database[Extract<keyof Database, "public">]
1500
1501export type Tables<
1502 PublicTableNameOrOptions extends
1503 | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
1504 | { schema: keyof Database },
1505 TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1506 ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
1507 Database[PublicTableNameOrOptions["schema"]]["Views"])
1508 : never = never,
1509> = PublicTableNameOrOptions extends { schema: keyof Database }
1510 ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
1511 Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
1512 Row: infer R
1513 }
1514 ? R
1515 : never
1516 : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
1517 PublicSchema["Views"])
1518 ? (PublicSchema["Tables"] &
1519 PublicSchema["Views"])[PublicTableNameOrOptions] extends {
1520 Row: infer R
1521 }
1522 ? R
1523 : never
1524 : never
1525
1526export type TablesInsert<
1527 PublicTableNameOrOptions extends
1528 | keyof PublicSchema["Tables"]
1529 | { schema: keyof Database },
1530 TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1531 ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
1532 : never = never,
1533> = PublicTableNameOrOptions extends { schema: keyof Database }
1534 ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1535 Insert: infer I
1536 }
1537 ? I
1538 : never
1539 : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
1540 ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
1541 Insert: infer I
1542 }
1543 ? I
1544 : never
1545 : never
1546
1547export type TablesUpdate<
1548 PublicTableNameOrOptions extends
1549 | keyof PublicSchema["Tables"]
1550 | { schema: keyof Database },
1551 TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1552 ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
1553 : never = never,
1554> = PublicTableNameOrOptions extends { schema: keyof Database }
1555 ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1556 Update: infer U
1557 }
1558 ? U
1559 : never
1560 : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
1561 ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
1562 Update: infer U
1563 }
1564 ? U
1565 : never
1566 : never
1567
1568export type Enums<
1569 PublicEnumNameOrOptions extends
1570 | keyof PublicSchema["Enums"]
1571 | { schema: keyof Database },
1572 EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
1573 ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
1574 : never = never,
1575> = PublicEnumNameOrOptions extends { schema: keyof Database }
1576 ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
1577 : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
1578 ? PublicSchema["Enums"][PublicEnumNameOrOptions]
1579 : never
1580