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 sort_date: string
341 uri: string
342 }
343 Insert: {
344 data: Json
345 indexed_at?: string
346 uri: string
347 }
348 Update: {
349 data?: Json
350 indexed_at?: string
351 uri?: string
352 }
353 Relationships: []
354 }
355 documents_in_publications: {
356 Row: {
357 document: string
358 indexed_at: string
359 publication: string
360 }
361 Insert: {
362 document: string
363 indexed_at?: string
364 publication: string
365 }
366 Update: {
367 document?: string
368 indexed_at?: string
369 publication?: string
370 }
371 Relationships: [
372 {
373 foreignKeyName: "documents_in_publications_document_fkey"
374 columns: ["document"]
375 isOneToOne: false
376 referencedRelation: "documents"
377 referencedColumns: ["uri"]
378 },
379 {
380 foreignKeyName: "documents_in_publications_publication_fkey"
381 columns: ["publication"]
382 isOneToOne: false
383 referencedRelation: "publications"
384 referencedColumns: ["uri"]
385 },
386 ]
387 }
388 email_auth_tokens: {
389 Row: {
390 confirmation_code: string
391 confirmed: boolean
392 created_at: string
393 email: string | null
394 id: string
395 identity: string | null
396 }
397 Insert: {
398 confirmation_code: string
399 confirmed?: boolean
400 created_at?: string
401 email?: string | null
402 id?: string
403 identity?: string | null
404 }
405 Update: {
406 confirmation_code?: string
407 confirmed?: boolean
408 created_at?: string
409 email?: string | null
410 id?: string
411 identity?: string | null
412 }
413 Relationships: [
414 {
415 foreignKeyName: "email_auth_tokens_identity_fkey"
416 columns: ["identity"]
417 isOneToOne: false
418 referencedRelation: "identities"
419 referencedColumns: ["id"]
420 },
421 ]
422 }
423 email_subscriptions_to_entity: {
424 Row: {
425 confirmation_code: string
426 confirmed: boolean
427 created_at: string
428 email: string
429 entity: string
430 id: string
431 token: string
432 }
433 Insert: {
434 confirmation_code: string
435 confirmed?: boolean
436 created_at?: string
437 email: string
438 entity: string
439 id?: string
440 token: string
441 }
442 Update: {
443 confirmation_code?: string
444 confirmed?: boolean
445 created_at?: string
446 email?: string
447 entity?: string
448 id?: string
449 token?: string
450 }
451 Relationships: [
452 {
453 foreignKeyName: "email_subscriptions_to_entity_entity_fkey"
454 columns: ["entity"]
455 isOneToOne: false
456 referencedRelation: "entities"
457 referencedColumns: ["id"]
458 },
459 {
460 foreignKeyName: "email_subscriptions_to_entity_token_fkey"
461 columns: ["token"]
462 isOneToOne: false
463 referencedRelation: "permission_tokens"
464 referencedColumns: ["id"]
465 },
466 ]
467 }
468 entities: {
469 Row: {
470 created_at: string
471 id: string
472 set: string
473 }
474 Insert: {
475 created_at?: string
476 id: string
477 set: string
478 }
479 Update: {
480 created_at?: string
481 id?: string
482 set?: string
483 }
484 Relationships: [
485 {
486 foreignKeyName: "entities_set_fkey"
487 columns: ["set"]
488 isOneToOne: false
489 referencedRelation: "entity_sets"
490 referencedColumns: ["id"]
491 },
492 ]
493 }
494 entity_sets: {
495 Row: {
496 created_at: string
497 id: string
498 }
499 Insert: {
500 created_at?: string
501 id?: string
502 }
503 Update: {
504 created_at?: string
505 id?: string
506 }
507 Relationships: []
508 }
509 facts: {
510 Row: {
511 attribute: string
512 created_at: string
513 data: Json
514 entity: string
515 id: string
516 updated_at: string | null
517 version: number
518 }
519 Insert: {
520 attribute: string
521 created_at?: string
522 data: Json
523 entity: string
524 id: string
525 updated_at?: string | null
526 version?: number
527 }
528 Update: {
529 attribute?: string
530 created_at?: string
531 data?: Json
532 entity?: string
533 id?: string
534 updated_at?: string | null
535 version?: number
536 }
537 Relationships: [
538 {
539 foreignKeyName: "facts_entity_fkey"
540 columns: ["entity"]
541 isOneToOne: false
542 referencedRelation: "entities"
543 referencedColumns: ["id"]
544 },
545 ]
546 }
547 identities: {
548 Row: {
549 atp_did: string | null
550 created_at: string
551 email: string | null
552 home_page: string
553 id: string
554 interface_state: Json | null
555 metadata: Json | null
556 }
557 Insert: {
558 atp_did?: string | null
559 created_at?: string
560 email?: string | null
561 home_page?: string
562 id?: string
563 interface_state?: Json | null
564 metadata?: Json | null
565 }
566 Update: {
567 atp_did?: string | null
568 created_at?: string
569 email?: string | null
570 home_page?: string
571 id?: string
572 interface_state?: Json | null
573 metadata?: Json | null
574 }
575 Relationships: [
576 {
577 foreignKeyName: "identities_home_page_fkey"
578 columns: ["home_page"]
579 isOneToOne: false
580 referencedRelation: "permission_tokens"
581 referencedColumns: ["id"]
582 },
583 ]
584 }
585 leaflets_in_publications: {
586 Row: {
587 archived: boolean | null
588 cover_image: string | null
589 description: string
590 doc: string | null
591 leaflet: string
592 preferences: Json | null
593 publication: string
594 tags: string[] | null
595 title: string
596 }
597 Insert: {
598 archived?: boolean | null
599 cover_image?: string | null
600 description?: string
601 doc?: string | null
602 leaflet: string
603 preferences?: Json | null
604 publication: string
605 tags?: string[] | null
606 title?: string
607 }
608 Update: {
609 archived?: boolean | null
610 cover_image?: string | null
611 description?: string
612 doc?: string | null
613 leaflet?: string
614 preferences?: Json | null
615 publication?: string
616 tags?: string[] | null
617 title?: string
618 }
619 Relationships: [
620 {
621 foreignKeyName: "leaflets_in_publications_doc_fkey"
622 columns: ["doc"]
623 isOneToOne: false
624 referencedRelation: "documents"
625 referencedColumns: ["uri"]
626 },
627 {
628 foreignKeyName: "leaflets_in_publications_leaflet_fkey"
629 columns: ["leaflet"]
630 isOneToOne: false
631 referencedRelation: "permission_tokens"
632 referencedColumns: ["id"]
633 },
634 {
635 foreignKeyName: "leaflets_in_publications_publication_fkey"
636 columns: ["publication"]
637 isOneToOne: false
638 referencedRelation: "publications"
639 referencedColumns: ["uri"]
640 },
641 ]
642 }
643 leaflets_to_documents: {
644 Row: {
645 archived: boolean | null
646 cover_image: string | null
647 created_at: string
648 description: string
649 document: string
650 leaflet: string
651 preferences: Json | null
652 tags: string[] | null
653 title: string
654 }
655 Insert: {
656 archived?: boolean | null
657 cover_image?: string | null
658 created_at?: string
659 description?: string
660 document: string
661 leaflet: string
662 preferences?: Json | null
663 tags?: string[] | null
664 title?: string
665 }
666 Update: {
667 archived?: boolean | null
668 cover_image?: string | null
669 created_at?: string
670 description?: string
671 document?: string
672 leaflet?: string
673 preferences?: Json | null
674 tags?: string[] | null
675 title?: string
676 }
677 Relationships: [
678 {
679 foreignKeyName: "leaflets_to_documents_document_fkey"
680 columns: ["document"]
681 isOneToOne: false
682 referencedRelation: "documents"
683 referencedColumns: ["uri"]
684 },
685 {
686 foreignKeyName: "leaflets_to_documents_leaflet_fkey"
687 columns: ["leaflet"]
688 isOneToOne: false
689 referencedRelation: "permission_tokens"
690 referencedColumns: ["id"]
691 },
692 ]
693 }
694 notifications: {
695 Row: {
696 created_at: string
697 data: Json
698 id: string
699 read: boolean
700 recipient: string
701 }
702 Insert: {
703 created_at?: string
704 data: Json
705 id: string
706 read?: boolean
707 recipient: string
708 }
709 Update: {
710 created_at?: string
711 data?: Json
712 id?: string
713 read?: boolean
714 recipient?: string
715 }
716 Relationships: [
717 {
718 foreignKeyName: "notifications_recipient_fkey"
719 columns: ["recipient"]
720 isOneToOne: false
721 referencedRelation: "identities"
722 referencedColumns: ["atp_did"]
723 },
724 ]
725 }
726 oauth_session_store: {
727 Row: {
728 key: string
729 session: Json
730 }
731 Insert: {
732 key: string
733 session: Json
734 }
735 Update: {
736 key?: string
737 session?: Json
738 }
739 Relationships: []
740 }
741 oauth_state_store: {
742 Row: {
743 key: string
744 state: Json
745 }
746 Insert: {
747 key: string
748 state: Json
749 }
750 Update: {
751 key?: string
752 state?: Json
753 }
754 Relationships: []
755 }
756 permission_token_on_homepage: {
757 Row: {
758 archived: boolean | null
759 created_at: string
760 identity: string
761 token: string
762 }
763 Insert: {
764 archived?: boolean | null
765 created_at?: string
766 identity: string
767 token: string
768 }
769 Update: {
770 archived?: boolean | null
771 created_at?: string
772 identity?: string
773 token?: string
774 }
775 Relationships: [
776 {
777 foreignKeyName: "permission_token_creator_identity_fkey"
778 columns: ["identity"]
779 isOneToOne: false
780 referencedRelation: "identities"
781 referencedColumns: ["id"]
782 },
783 {
784 foreignKeyName: "permission_token_on_homepage_token_fkey"
785 columns: ["token"]
786 isOneToOne: false
787 referencedRelation: "permission_tokens"
788 referencedColumns: ["id"]
789 },
790 ]
791 }
792 permission_token_rights: {
793 Row: {
794 change_entity_set: boolean
795 create_token: boolean
796 created_at: string
797 entity_set: string
798 read: boolean
799 token: string
800 write: boolean
801 }
802 Insert: {
803 change_entity_set?: boolean
804 create_token?: boolean
805 created_at?: string
806 entity_set: string
807 read?: boolean
808 token: string
809 write?: boolean
810 }
811 Update: {
812 change_entity_set?: boolean
813 create_token?: boolean
814 created_at?: string
815 entity_set?: string
816 read?: boolean
817 token?: string
818 write?: boolean
819 }
820 Relationships: [
821 {
822 foreignKeyName: "permission_token_rights_entity_set_fkey"
823 columns: ["entity_set"]
824 isOneToOne: false
825 referencedRelation: "entity_sets"
826 referencedColumns: ["id"]
827 },
828 {
829 foreignKeyName: "permission_token_rights_token_fkey"
830 columns: ["token"]
831 isOneToOne: false
832 referencedRelation: "permission_tokens"
833 referencedColumns: ["id"]
834 },
835 ]
836 }
837 permission_tokens: {
838 Row: {
839 blocked_by_admin: boolean | null
840 id: string
841 root_entity: string
842 }
843 Insert: {
844 blocked_by_admin?: boolean | null
845 id?: string
846 root_entity: string
847 }
848 Update: {
849 blocked_by_admin?: boolean | null
850 id?: string
851 root_entity?: string
852 }
853 Relationships: [
854 {
855 foreignKeyName: "permission_tokens_root_entity_fkey"
856 columns: ["root_entity"]
857 isOneToOne: false
858 referencedRelation: "entities"
859 referencedColumns: ["id"]
860 },
861 ]
862 }
863 phone_number_auth_tokens: {
864 Row: {
865 confirmation_code: string
866 confirmed: boolean
867 country_code: string
868 created_at: string
869 id: string
870 phone_number: string
871 }
872 Insert: {
873 confirmation_code: string
874 confirmed?: boolean
875 country_code: string
876 created_at?: string
877 id?: string
878 phone_number: string
879 }
880 Update: {
881 confirmation_code?: string
882 confirmed?: boolean
883 country_code?: string
884 created_at?: string
885 id?: string
886 phone_number?: string
887 }
888 Relationships: []
889 }
890 phone_rsvps_to_entity: {
891 Row: {
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 Insert: {
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 Update: {
912 country_code?: string
913 created_at?: string
914 entity?: string
915 id?: string
916 name?: string
917 phone_number?: string
918 plus_ones?: number
919 status?: Database["public"]["Enums"]["rsvp_status"]
920 }
921 Relationships: [
922 {
923 foreignKeyName: "phone_rsvps_to_entity_entity_fkey"
924 columns: ["entity"]
925 isOneToOne: false
926 referencedRelation: "entities"
927 referencedColumns: ["id"]
928 },
929 ]
930 }
931 poll_votes_on_entity: {
932 Row: {
933 created_at: string
934 id: string
935 option_entity: string
936 poll_entity: string
937 voter_token: string
938 }
939 Insert: {
940 created_at?: string
941 id?: string
942 option_entity: string
943 poll_entity: string
944 voter_token: string
945 }
946 Update: {
947 created_at?: string
948 id?: string
949 option_entity?: string
950 poll_entity?: string
951 voter_token?: string
952 }
953 Relationships: [
954 {
955 foreignKeyName: "poll_votes_on_entity_option_entity_fkey"
956 columns: ["option_entity"]
957 isOneToOne: false
958 referencedRelation: "entities"
959 referencedColumns: ["id"]
960 },
961 {
962 foreignKeyName: "poll_votes_on_entity_poll_entity_fkey"
963 columns: ["poll_entity"]
964 isOneToOne: false
965 referencedRelation: "entities"
966 referencedColumns: ["id"]
967 },
968 ]
969 }
970 publication_domains: {
971 Row: {
972 created_at: string
973 domain: string
974 identity: string
975 publication: string
976 }
977 Insert: {
978 created_at?: string
979 domain: string
980 identity: string
981 publication: string
982 }
983 Update: {
984 created_at?: string
985 domain?: string
986 identity?: string
987 publication?: string
988 }
989 Relationships: [
990 {
991 foreignKeyName: "publication_domains_domain_fkey"
992 columns: ["domain"]
993 isOneToOne: false
994 referencedRelation: "custom_domains"
995 referencedColumns: ["domain"]
996 },
997 {
998 foreignKeyName: "publication_domains_identity_fkey"
999 columns: ["identity"]
1000 isOneToOne: false
1001 referencedRelation: "identities"
1002 referencedColumns: ["atp_did"]
1003 },
1004 {
1005 foreignKeyName: "publication_domains_publication_fkey"
1006 columns: ["publication"]
1007 isOneToOne: false
1008 referencedRelation: "publications"
1009 referencedColumns: ["uri"]
1010 },
1011 ]
1012 }
1013 publication_subscriptions: {
1014 Row: {
1015 created_at: string
1016 identity: string
1017 publication: string
1018 record: Json
1019 uri: string
1020 }
1021 Insert: {
1022 created_at?: string
1023 identity: string
1024 publication: string
1025 record: Json
1026 uri: string
1027 }
1028 Update: {
1029 created_at?: string
1030 identity?: string
1031 publication?: string
1032 record?: Json
1033 uri?: string
1034 }
1035 Relationships: [
1036 {
1037 foreignKeyName: "publication_subscriptions_identity_fkey"
1038 columns: ["identity"]
1039 isOneToOne: false
1040 referencedRelation: "identities"
1041 referencedColumns: ["atp_did"]
1042 },
1043 {
1044 foreignKeyName: "publication_subscriptions_publication_fkey"
1045 columns: ["publication"]
1046 isOneToOne: false
1047 referencedRelation: "publications"
1048 referencedColumns: ["uri"]
1049 },
1050 ]
1051 }
1052 publications: {
1053 Row: {
1054 identity_did: string
1055 indexed_at: string
1056 name: string
1057 record: Json | null
1058 uri: string
1059 }
1060 Insert: {
1061 identity_did: string
1062 indexed_at?: string
1063 name: string
1064 record?: Json | null
1065 uri: string
1066 }
1067 Update: {
1068 identity_did?: string
1069 indexed_at?: string
1070 name?: string
1071 record?: Json | null
1072 uri?: string
1073 }
1074 Relationships: [
1075 {
1076 foreignKeyName: "publications_identity_did_fkey"
1077 columns: ["identity_did"]
1078 isOneToOne: false
1079 referencedRelation: "identities"
1080 referencedColumns: ["atp_did"]
1081 },
1082 ]
1083 }
1084 recommends_on_documents: {
1085 Row: {
1086 document: string
1087 indexed_at: string
1088 recommender_did: string
1089 record: Json
1090 uri: string
1091 }
1092 Insert: {
1093 document: string
1094 indexed_at?: string
1095 recommender_did: string
1096 record: Json
1097 uri: string
1098 }
1099 Update: {
1100 document?: string
1101 indexed_at?: string
1102 recommender_did?: string
1103 record?: Json
1104 uri?: string
1105 }
1106 Relationships: [
1107 {
1108 foreignKeyName: "recommends_on_documents_document_fkey"
1109 columns: ["document"]
1110 isOneToOne: false
1111 referencedRelation: "documents"
1112 referencedColumns: ["uri"]
1113 },
1114 {
1115 foreignKeyName: "recommends_on_documents_recommender_did_fkey"
1116 columns: ["recommender_did"]
1117 isOneToOne: false
1118 referencedRelation: "identities"
1119 referencedColumns: ["atp_did"]
1120 },
1121 ]
1122 }
1123 replicache_clients: {
1124 Row: {
1125 client_group: string
1126 client_id: string
1127 last_mutation: number
1128 }
1129 Insert: {
1130 client_group: string
1131 client_id: string
1132 last_mutation: number
1133 }
1134 Update: {
1135 client_group?: string
1136 client_id?: string
1137 last_mutation?: number
1138 }
1139 Relationships: []
1140 }
1141 site_standard_documents: {
1142 Row: {
1143 data: Json
1144 identity_did: string
1145 indexed_at: string
1146 uri: string
1147 }
1148 Insert: {
1149 data: Json
1150 identity_did: string
1151 indexed_at?: string
1152 uri: string
1153 }
1154 Update: {
1155 data?: Json
1156 identity_did?: string
1157 indexed_at?: string
1158 uri?: string
1159 }
1160 Relationships: [
1161 {
1162 foreignKeyName: "site_standard_documents_identity_did_fkey"
1163 columns: ["identity_did"]
1164 isOneToOne: false
1165 referencedRelation: "identities"
1166 referencedColumns: ["atp_did"]
1167 },
1168 ]
1169 }
1170 site_standard_documents_in_publications: {
1171 Row: {
1172 document: string
1173 indexed_at: string
1174 publication: string
1175 }
1176 Insert: {
1177 document: string
1178 indexed_at?: string
1179 publication: string
1180 }
1181 Update: {
1182 document?: string
1183 indexed_at?: string
1184 publication?: string
1185 }
1186 Relationships: [
1187 {
1188 foreignKeyName: "site_standard_documents_in_publications_document_fkey"
1189 columns: ["document"]
1190 isOneToOne: false
1191 referencedRelation: "site_standard_documents"
1192 referencedColumns: ["uri"]
1193 },
1194 {
1195 foreignKeyName: "site_standard_documents_in_publications_publication_fkey"
1196 columns: ["publication"]
1197 isOneToOne: false
1198 referencedRelation: "site_standard_publications"
1199 referencedColumns: ["uri"]
1200 },
1201 ]
1202 }
1203 site_standard_publications: {
1204 Row: {
1205 data: Json
1206 identity_did: string
1207 indexed_at: string
1208 uri: string
1209 }
1210 Insert: {
1211 data: Json
1212 identity_did: string
1213 indexed_at?: string
1214 uri: string
1215 }
1216 Update: {
1217 data?: Json
1218 identity_did?: string
1219 indexed_at?: string
1220 uri?: string
1221 }
1222 Relationships: [
1223 {
1224 foreignKeyName: "site_standard_publications_identity_did_fkey"
1225 columns: ["identity_did"]
1226 isOneToOne: false
1227 referencedRelation: "identities"
1228 referencedColumns: ["atp_did"]
1229 },
1230 ]
1231 }
1232 site_standard_subscriptions: {
1233 Row: {
1234 created_at: string
1235 identity: string
1236 publication: string
1237 record: Json
1238 uri: string
1239 }
1240 Insert: {
1241 created_at?: string
1242 identity: string
1243 publication: string
1244 record: Json
1245 uri: string
1246 }
1247 Update: {
1248 created_at?: string
1249 identity?: string
1250 publication?: string
1251 record?: Json
1252 uri?: string
1253 }
1254 Relationships: [
1255 {
1256 foreignKeyName: "site_standard_subscriptions_identity_fkey"
1257 columns: ["identity"]
1258 isOneToOne: false
1259 referencedRelation: "identities"
1260 referencedColumns: ["atp_did"]
1261 },
1262 {
1263 foreignKeyName: "site_standard_subscriptions_publication_fkey"
1264 columns: ["publication"]
1265 isOneToOne: false
1266 referencedRelation: "site_standard_publications"
1267 referencedColumns: ["uri"]
1268 },
1269 ]
1270 }
1271 subscribers_to_publications: {
1272 Row: {
1273 created_at: string
1274 identity: string
1275 publication: string
1276 }
1277 Insert: {
1278 created_at?: string
1279 identity: string
1280 publication: string
1281 }
1282 Update: {
1283 created_at?: string
1284 identity?: string
1285 publication?: string
1286 }
1287 Relationships: [
1288 {
1289 foreignKeyName: "subscribers_to_publications_identity_fkey"
1290 columns: ["identity"]
1291 isOneToOne: false
1292 referencedRelation: "identities"
1293 referencedColumns: ["email"]
1294 },
1295 {
1296 foreignKeyName: "subscribers_to_publications_publication_fkey"
1297 columns: ["publication"]
1298 isOneToOne: false
1299 referencedRelation: "publications"
1300 referencedColumns: ["uri"]
1301 },
1302 ]
1303 }
1304 }
1305 Views: {
1306 [_ in never]: never
1307 }
1308 Functions: {
1309 create_identity_homepage: {
1310 Args: Record<PropertyKey, never>
1311 Returns: string
1312 }
1313 get_facts: {
1314 Args: {
1315 root: string
1316 }
1317 Returns: {
1318 attribute: string
1319 created_at: string
1320 data: Json
1321 entity: string
1322 id: string
1323 updated_at: string | null
1324 version: number
1325 }[]
1326 }
1327 get_facts_for_roots: {
1328 Args: {
1329 roots: string[]
1330 max_depth: number
1331 }
1332 Returns: {
1333 root_id: string
1334 id: string
1335 entity: string
1336 attribute: string
1337 data: Json
1338 created_at: string
1339 updated_at: string
1340 version: number
1341 }[]
1342 }
1343 get_facts_with_depth: {
1344 Args: {
1345 root: string
1346 max_depth: number
1347 }
1348 Returns: {
1349 like: unknown
1350 }[]
1351 }
1352 parse_iso_timestamp: {
1353 Args: {
1354 "": string
1355 }
1356 Returns: string
1357 }
1358 pull_data: {
1359 Args: {
1360 token_id: string
1361 client_group_id: string
1362 }
1363 Returns: Database["public"]["CompositeTypes"]["pull_result"]
1364 }
1365 search_tags: {
1366 Args: {
1367 search_query: string
1368 }
1369 Returns: {
1370 name: string
1371 document_count: number
1372 }[]
1373 }
1374 }
1375 Enums: {
1376 rsvp_status: "GOING" | "NOT_GOING" | "MAYBE"
1377 }
1378 CompositeTypes: {
1379 pull_result: {
1380 client_groups: Json | null
1381 facts: Json | null
1382 publications: Json | null
1383 }
1384 }
1385 }
1386 storage: {
1387 Tables: {
1388 buckets: {
1389 Row: {
1390 allowed_mime_types: string[] | null
1391 avif_autodetection: boolean | null
1392 created_at: string | null
1393 file_size_limit: number | null
1394 id: string
1395 name: string
1396 owner: string | null
1397 owner_id: string | null
1398 public: boolean | null
1399 updated_at: string | null
1400 }
1401 Insert: {
1402 allowed_mime_types?: string[] | null
1403 avif_autodetection?: boolean | null
1404 created_at?: string | null
1405 file_size_limit?: number | null
1406 id: string
1407 name: string
1408 owner?: string | null
1409 owner_id?: string | null
1410 public?: boolean | null
1411 updated_at?: string | null
1412 }
1413 Update: {
1414 allowed_mime_types?: string[] | null
1415 avif_autodetection?: boolean | null
1416 created_at?: string | null
1417 file_size_limit?: number | null
1418 id?: string
1419 name?: string
1420 owner?: string | null
1421 owner_id?: string | null
1422 public?: boolean | null
1423 updated_at?: string | null
1424 }
1425 Relationships: []
1426 }
1427 migrations: {
1428 Row: {
1429 executed_at: string | null
1430 hash: string
1431 id: number
1432 name: string
1433 }
1434 Insert: {
1435 executed_at?: string | null
1436 hash: string
1437 id: number
1438 name: string
1439 }
1440 Update: {
1441 executed_at?: string | null
1442 hash?: string
1443 id?: number
1444 name?: string
1445 }
1446 Relationships: []
1447 }
1448 objects: {
1449 Row: {
1450 bucket_id: string | null
1451 created_at: string | null
1452 id: string
1453 last_accessed_at: string | null
1454 metadata: Json | null
1455 name: string | null
1456 owner: string | null
1457 owner_id: string | null
1458 path_tokens: string[] | null
1459 updated_at: string | null
1460 version: string | null
1461 }
1462 Insert: {
1463 bucket_id?: string | null
1464 created_at?: string | null
1465 id?: string
1466 last_accessed_at?: string | null
1467 metadata?: Json | null
1468 name?: string | null
1469 owner?: string | null
1470 owner_id?: string | null
1471 path_tokens?: string[] | null
1472 updated_at?: string | null
1473 version?: string | null
1474 }
1475 Update: {
1476 bucket_id?: string | null
1477 created_at?: string | null
1478 id?: string
1479 last_accessed_at?: string | null
1480 metadata?: Json | null
1481 name?: string | null
1482 owner?: string | null
1483 owner_id?: string | null
1484 path_tokens?: string[] | null
1485 updated_at?: string | null
1486 version?: string | null
1487 }
1488 Relationships: [
1489 {
1490 foreignKeyName: "objects_bucketId_fkey"
1491 columns: ["bucket_id"]
1492 isOneToOne: false
1493 referencedRelation: "buckets"
1494 referencedColumns: ["id"]
1495 },
1496 ]
1497 }
1498 s3_multipart_uploads: {
1499 Row: {
1500 bucket_id: string
1501 created_at: string
1502 id: string
1503 in_progress_size: number
1504 key: string
1505 owner_id: string | null
1506 upload_signature: string
1507 version: string
1508 }
1509 Insert: {
1510 bucket_id: string
1511 created_at?: string
1512 id: string
1513 in_progress_size?: number
1514 key: string
1515 owner_id?: string | null
1516 upload_signature: string
1517 version: string
1518 }
1519 Update: {
1520 bucket_id?: string
1521 created_at?: string
1522 id?: string
1523 in_progress_size?: number
1524 key?: string
1525 owner_id?: string | null
1526 upload_signature?: string
1527 version?: string
1528 }
1529 Relationships: [
1530 {
1531 foreignKeyName: "s3_multipart_uploads_bucket_id_fkey"
1532 columns: ["bucket_id"]
1533 isOneToOne: false
1534 referencedRelation: "buckets"
1535 referencedColumns: ["id"]
1536 },
1537 ]
1538 }
1539 s3_multipart_uploads_parts: {
1540 Row: {
1541 bucket_id: string
1542 created_at: string
1543 etag: string
1544 id: string
1545 key: string
1546 owner_id: string | null
1547 part_number: number
1548 size: number
1549 upload_id: string
1550 version: string
1551 }
1552 Insert: {
1553 bucket_id: string
1554 created_at?: string
1555 etag: string
1556 id?: string
1557 key: string
1558 owner_id?: string | null
1559 part_number: number
1560 size?: number
1561 upload_id: string
1562 version: string
1563 }
1564 Update: {
1565 bucket_id?: string
1566 created_at?: string
1567 etag?: string
1568 id?: string
1569 key?: string
1570 owner_id?: string | null
1571 part_number?: number
1572 size?: number
1573 upload_id?: string
1574 version?: string
1575 }
1576 Relationships: [
1577 {
1578 foreignKeyName: "s3_multipart_uploads_parts_bucket_id_fkey"
1579 columns: ["bucket_id"]
1580 isOneToOne: false
1581 referencedRelation: "buckets"
1582 referencedColumns: ["id"]
1583 },
1584 {
1585 foreignKeyName: "s3_multipart_uploads_parts_upload_id_fkey"
1586 columns: ["upload_id"]
1587 isOneToOne: false
1588 referencedRelation: "s3_multipart_uploads"
1589 referencedColumns: ["id"]
1590 },
1591 ]
1592 }
1593 }
1594 Views: {
1595 [_ in never]: never
1596 }
1597 Functions: {
1598 can_insert_object: {
1599 Args: {
1600 bucketid: string
1601 name: string
1602 owner: string
1603 metadata: Json
1604 }
1605 Returns: undefined
1606 }
1607 extension: {
1608 Args: {
1609 name: string
1610 }
1611 Returns: string
1612 }
1613 filename: {
1614 Args: {
1615 name: string
1616 }
1617 Returns: string
1618 }
1619 foldername: {
1620 Args: {
1621 name: string
1622 }
1623 Returns: string[]
1624 }
1625 get_size_by_bucket: {
1626 Args: Record<PropertyKey, never>
1627 Returns: {
1628 size: number
1629 bucket_id: string
1630 }[]
1631 }
1632 list_multipart_uploads_with_delimiter: {
1633 Args: {
1634 bucket_id: string
1635 prefix_param: string
1636 delimiter_param: string
1637 max_keys?: number
1638 next_key_token?: string
1639 next_upload_token?: string
1640 }
1641 Returns: {
1642 key: string
1643 id: string
1644 created_at: string
1645 }[]
1646 }
1647 list_objects_with_delimiter: {
1648 Args: {
1649 bucket_id: string
1650 prefix_param: string
1651 delimiter_param: string
1652 max_keys?: number
1653 start_after?: string
1654 next_token?: string
1655 }
1656 Returns: {
1657 name: string
1658 id: string
1659 metadata: Json
1660 updated_at: string
1661 }[]
1662 }
1663 search: {
1664 Args: {
1665 prefix: string
1666 bucketname: string
1667 limits?: number
1668 levels?: number
1669 offsets?: number
1670 search?: string
1671 sortcolumn?: string
1672 sortorder?: string
1673 }
1674 Returns: {
1675 name: string
1676 id: string
1677 updated_at: string
1678 created_at: string
1679 last_accessed_at: string
1680 metadata: Json
1681 }[]
1682 }
1683 }
1684 Enums: {
1685 [_ in never]: never
1686 }
1687 CompositeTypes: {
1688 [_ in never]: never
1689 }
1690 }
1691}
1692
1693type PublicSchema = Database[Extract<keyof Database, "public">]
1694
1695export type Tables<
1696 PublicTableNameOrOptions extends
1697 | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
1698 | { schema: keyof Database },
1699 TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1700 ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
1701 Database[PublicTableNameOrOptions["schema"]]["Views"])
1702 : never = never,
1703> = PublicTableNameOrOptions extends { schema: keyof Database }
1704 ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
1705 Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
1706 Row: infer R
1707 }
1708 ? R
1709 : never
1710 : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
1711 PublicSchema["Views"])
1712 ? (PublicSchema["Tables"] &
1713 PublicSchema["Views"])[PublicTableNameOrOptions] extends {
1714 Row: infer R
1715 }
1716 ? R
1717 : never
1718 : never
1719
1720export type TablesInsert<
1721 PublicTableNameOrOptions extends
1722 | keyof PublicSchema["Tables"]
1723 | { schema: keyof Database },
1724 TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1725 ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
1726 : never = never,
1727> = PublicTableNameOrOptions extends { schema: keyof Database }
1728 ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1729 Insert: infer I
1730 }
1731 ? I
1732 : never
1733 : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
1734 ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
1735 Insert: infer I
1736 }
1737 ? I
1738 : never
1739 : never
1740
1741export type TablesUpdate<
1742 PublicTableNameOrOptions extends
1743 | keyof PublicSchema["Tables"]
1744 | { schema: keyof Database },
1745 TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1746 ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
1747 : never = never,
1748> = PublicTableNameOrOptions extends { schema: keyof Database }
1749 ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1750 Update: infer U
1751 }
1752 ? U
1753 : never
1754 : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
1755 ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
1756 Update: infer U
1757 }
1758 ? U
1759 : never
1760 : never
1761
1762export type Enums<
1763 PublicEnumNameOrOptions extends
1764 | keyof PublicSchema["Enums"]
1765 | { schema: keyof Database },
1766 EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
1767 ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
1768 : never = never,
1769> = PublicEnumNameOrOptions extends { schema: keyof Database }
1770 ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
1771 : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
1772 ? PublicSchema["Enums"][PublicEnumNameOrOptions]
1773 : never
1774