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