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