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