a tool for shared writing and social publishing
1export type Json =
2 | string
3 | number
4 | boolean
5 | null
6 | { [key: string]: Json | undefined }
7 | Json[]
8
9export type Database = {
10 graphql_public: {
11 Tables: {
12 [_ in never]: never
13 }
14 Views: {
15 [_ in never]: never
16 }
17 Functions: {
18 graphql: {
19 Args: {
20 operationName?: string
21 query?: string
22 variables?: Json
23 extensions?: Json
24 }
25 Returns: Json
26 }
27 }
28 Enums: {
29 [_ in never]: never
30 }
31 CompositeTypes: {
32 [_ in never]: never
33 }
34 }
35 public: {
36 Tables: {
37 atp_poll_records: {
38 Row: {
39 cid: string
40 created_at: string
41 record: Json
42 uri: string
43 }
44 Insert: {
45 cid: string
46 created_at?: string
47 record: Json
48 uri: string
49 }
50 Update: {
51 cid?: string
52 created_at?: string
53 record?: Json
54 uri?: string
55 }
56 Relationships: []
57 }
58 atp_poll_votes: {
59 Row: {
60 indexed_at: string
61 poll_cid: string
62 poll_uri: string
63 record: Json
64 uri: string
65 voter_did: string
66 }
67 Insert: {
68 indexed_at?: string
69 poll_cid: string
70 poll_uri: string
71 record: Json
72 uri: string
73 voter_did: string
74 }
75 Update: {
76 indexed_at?: string
77 poll_cid?: string
78 poll_uri?: string
79 record?: Json
80 uri?: string
81 voter_did?: string
82 }
83 Relationships: [
84 {
85 foreignKeyName: "atp_poll_votes_poll_uri_fkey"
86 columns: ["poll_uri"]
87 isOneToOne: false
88 referencedRelation: "atp_poll_records"
89 referencedColumns: ["uri"]
90 },
91 ]
92 }
93 bsky_follows: {
94 Row: {
95 follows: string
96 identity: string
97 }
98 Insert: {
99 follows: string
100 identity?: string
101 }
102 Update: {
103 follows?: string
104 identity?: string
105 }
106 Relationships: [
107 {
108 foreignKeyName: "bsky_follows_follows_fkey"
109 columns: ["follows"]
110 isOneToOne: false
111 referencedRelation: "identities"
112 referencedColumns: ["atp_did"]
113 },
114 {
115 foreignKeyName: "bsky_follows_identity_fkey"
116 columns: ["identity"]
117 isOneToOne: false
118 referencedRelation: "identities"
119 referencedColumns: ["atp_did"]
120 },
121 ]
122 }
123 bsky_posts: {
124 Row: {
125 cid: string
126 indexed_at: string
127 post_view: Json
128 uri: string
129 }
130 Insert: {
131 cid: string
132 indexed_at?: string
133 post_view: Json
134 uri: string
135 }
136 Update: {
137 cid?: string
138 indexed_at?: string
139 post_view?: Json
140 uri?: string
141 }
142 Relationships: []
143 }
144 bsky_profiles: {
145 Row: {
146 did: string
147 handle: string | null
148 indexed_at: string
149 record: Json
150 }
151 Insert: {
152 did: string
153 handle?: string | null
154 indexed_at?: string
155 record: Json
156 }
157 Update: {
158 did?: string
159 handle?: string | null
160 indexed_at?: string
161 record?: Json
162 }
163 Relationships: [
164 {
165 foreignKeyName: "bsky_profiles_did_fkey"
166 columns: ["did"]
167 isOneToOne: true
168 referencedRelation: "identities"
169 referencedColumns: ["atp_did"]
170 },
171 ]
172 }
173 comments_on_documents: {
174 Row: {
175 document: string | null
176 indexed_at: string
177 profile: string | null
178 record: Json
179 uri: string
180 }
181 Insert: {
182 document?: string | null
183 indexed_at?: string
184 profile?: string | null
185 record: Json
186 uri: string
187 }
188 Update: {
189 document?: string | null
190 indexed_at?: string
191 profile?: string | null
192 record?: Json
193 uri?: string
194 }
195 Relationships: [
196 {
197 foreignKeyName: "comments_on_documents_document_fkey"
198 columns: ["document"]
199 isOneToOne: false
200 referencedRelation: "documents"
201 referencedColumns: ["uri"]
202 },
203 {
204 foreignKeyName: "comments_on_documents_profile_fkey"
205 columns: ["profile"]
206 isOneToOne: false
207 referencedRelation: "bsky_profiles"
208 referencedColumns: ["did"]
209 },
210 ]
211 }
212 custom_domain_routes: {
213 Row: {
214 created_at: string
215 domain: string
216 edit_permission_token: string
217 id: string
218 route: string
219 view_permission_token: string
220 }
221 Insert: {
222 created_at?: string
223 domain: string
224 edit_permission_token: string
225 id?: string
226 route: string
227 view_permission_token: string
228 }
229 Update: {
230 created_at?: string
231 domain?: string
232 edit_permission_token?: string
233 id?: string
234 route?: string
235 view_permission_token?: string
236 }
237 Relationships: [
238 {
239 foreignKeyName: "custom_domain_routes_domain_fkey"
240 columns: ["domain"]
241 isOneToOne: false
242 referencedRelation: "custom_domains"
243 referencedColumns: ["domain"]
244 },
245 {
246 foreignKeyName: "custom_domain_routes_edit_permission_token_fkey"
247 columns: ["edit_permission_token"]
248 isOneToOne: false
249 referencedRelation: "permission_tokens"
250 referencedColumns: ["id"]
251 },
252 {
253 foreignKeyName: "custom_domain_routes_view_permission_token_fkey"
254 columns: ["view_permission_token"]
255 isOneToOne: false
256 referencedRelation: "permission_tokens"
257 referencedColumns: ["id"]
258 },
259 ]
260 }
261 custom_domains: {
262 Row: {
263 confirmed: boolean
264 created_at: string
265 domain: string
266 identity: string | null
267 identity_id: string | null
268 }
269 Insert: {
270 confirmed: boolean
271 created_at?: string
272 domain: string
273 identity?: string | null
274 identity_id?: string | null
275 }
276 Update: {
277 confirmed?: boolean
278 created_at?: string
279 domain?: string
280 identity?: string | null
281 identity_id?: string | null
282 }
283 Relationships: [
284 {
285 foreignKeyName: "custom_domains_identity_fkey"
286 columns: ["identity"]
287 isOneToOne: false
288 referencedRelation: "identities"
289 referencedColumns: ["email"]
290 },
291 {
292 foreignKeyName: "custom_domains_identity_id_fkey"
293 columns: ["identity_id"]
294 isOneToOne: false
295 referencedRelation: "identities"
296 referencedColumns: ["id"]
297 },
298 ]
299 }
300 document_mentions_in_bsky: {
301 Row: {
302 document: string
303 indexed_at: string
304 link: string
305 uri: string
306 }
307 Insert: {
308 document: string
309 indexed_at?: string
310 link: string
311 uri: string
312 }
313 Update: {
314 document?: string
315 indexed_at?: string
316 link?: string
317 uri?: string
318 }
319 Relationships: [
320 {
321 foreignKeyName: "document_mentions_in_bsky_document_fkey"
322 columns: ["document"]
323 isOneToOne: false
324 referencedRelation: "documents"
325 referencedColumns: ["uri"]
326 },
327 {
328 foreignKeyName: "document_mentions_in_bsky_uri_fkey"
329 columns: ["uri"]
330 isOneToOne: false
331 referencedRelation: "bsky_posts"
332 referencedColumns: ["uri"]
333 },
334 ]
335 }
336 documents: {
337 Row: {
338 data: Json
339 indexed_at: string
340 uri: string
341 }
342 Insert: {
343 data: Json
344 indexed_at?: string
345 uri: string
346 }
347 Update: {
348 data?: Json
349 indexed_at?: string
350 uri?: string
351 }
352 Relationships: []
353 }
354 documents_in_publications: {
355 Row: {
356 document: string
357 indexed_at: string
358 publication: string
359 }
360 Insert: {
361 document: string
362 indexed_at?: string
363 publication: string
364 }
365 Update: {
366 document?: string
367 indexed_at?: string
368 publication?: string
369 }
370 Relationships: [
371 {
372 foreignKeyName: "documents_in_publications_document_fkey"
373 columns: ["document"]
374 isOneToOne: false
375 referencedRelation: "documents"
376 referencedColumns: ["uri"]
377 },
378 {
379 foreignKeyName: "documents_in_publications_publication_fkey"
380 columns: ["publication"]
381 isOneToOne: false
382 referencedRelation: "publications"
383 referencedColumns: ["uri"]
384 },
385 ]
386 }
387 email_auth_tokens: {
388 Row: {
389 confirmation_code: string
390 confirmed: boolean
391 created_at: string
392 email: string | null
393 id: string
394 identity: string | null
395 }
396 Insert: {
397 confirmation_code: string
398 confirmed?: boolean
399 created_at?: string
400 email?: string | null
401 id?: string
402 identity?: string | null
403 }
404 Update: {
405 confirmation_code?: string
406 confirmed?: boolean
407 created_at?: string
408 email?: string | null
409 id?: string
410 identity?: string | null
411 }
412 Relationships: [
413 {
414 foreignKeyName: "email_auth_tokens_identity_fkey"
415 columns: ["identity"]
416 isOneToOne: false
417 referencedRelation: "identities"
418 referencedColumns: ["id"]
419 },
420 ]
421 }
422 email_subscriptions_to_entity: {
423 Row: {
424 confirmation_code: string
425 confirmed: boolean
426 created_at: string
427 email: string
428 entity: string
429 id: string
430 token: string
431 }
432 Insert: {
433 confirmation_code: string
434 confirmed?: boolean
435 created_at?: string
436 email: string
437 entity: string
438 id?: string
439 token: string
440 }
441 Update: {
442 confirmation_code?: string
443 confirmed?: boolean
444 created_at?: string
445 email?: string
446 entity?: string
447 id?: string
448 token?: string
449 }
450 Relationships: [
451 {
452 foreignKeyName: "email_subscriptions_to_entity_entity_fkey"
453 columns: ["entity"]
454 isOneToOne: false
455 referencedRelation: "entities"
456 referencedColumns: ["id"]
457 },
458 {
459 foreignKeyName: "email_subscriptions_to_entity_token_fkey"
460 columns: ["token"]
461 isOneToOne: false
462 referencedRelation: "permission_tokens"
463 referencedColumns: ["id"]
464 },
465 ]
466 }
467 entities: {
468 Row: {
469 created_at: string
470 id: string
471 set: string
472 }
473 Insert: {
474 created_at?: string
475 id: string
476 set: string
477 }
478 Update: {
479 created_at?: string
480 id?: string
481 set?: string
482 }
483 Relationships: [
484 {
485 foreignKeyName: "entities_set_fkey"
486 columns: ["set"]
487 isOneToOne: false
488 referencedRelation: "entity_sets"
489 referencedColumns: ["id"]
490 },
491 ]
492 }
493 entity_sets: {
494 Row: {
495 created_at: string
496 id: string
497 }
498 Insert: {
499 created_at?: string
500 id?: string
501 }
502 Update: {
503 created_at?: string
504 id?: string
505 }
506 Relationships: []
507 }
508 facts: {
509 Row: {
510 attribute: string
511 created_at: string
512 data: Json
513 entity: string
514 id: string
515 updated_at: string | null
516 version: number
517 }
518 Insert: {
519 attribute: string
520 created_at?: string
521 data: Json
522 entity: string
523 id: string
524 updated_at?: string | null
525 version?: number
526 }
527 Update: {
528 attribute?: string
529 created_at?: string
530 data?: Json
531 entity?: string
532 id?: string
533 updated_at?: string | null
534 version?: number
535 }
536 Relationships: [
537 {
538 foreignKeyName: "facts_entity_fkey"
539 columns: ["entity"]
540 isOneToOne: false
541 referencedRelation: "entities"
542 referencedColumns: ["id"]
543 },
544 ]
545 }
546 identities: {
547 Row: {
548 atp_did: string | null
549 created_at: string
550 email: string | null
551 home_page: string
552 id: string
553 interface_state: Json | null
554 }
555 Insert: {
556 atp_did?: string | null
557 created_at?: string
558 email?: string | null
559 home_page: string
560 id?: string
561 interface_state?: Json | null
562 }
563 Update: {
564 atp_did?: string | null
565 created_at?: string
566 email?: string | null
567 home_page?: string
568 id?: string
569 interface_state?: Json | null
570 }
571 Relationships: [
572 {
573 foreignKeyName: "identities_home_page_fkey"
574 columns: ["home_page"]
575 isOneToOne: false
576 referencedRelation: "permission_tokens"
577 referencedColumns: ["id"]
578 },
579 ]
580 }
581 leaflets_in_publications: {
582 Row: {
583 description: string
584 doc: string | null
585 leaflet: string
586 publication: string
587 title: string
588 }
589 Insert: {
590 description?: string
591 doc?: string | null
592 leaflet: string
593 publication: string
594 title?: string
595 }
596 Update: {
597 description?: string
598 doc?: string | null
599 leaflet?: string
600 publication?: string
601 title?: string
602 }
603 Relationships: [
604 {
605 foreignKeyName: "leaflets_in_publications_doc_fkey"
606 columns: ["doc"]
607 isOneToOne: false
608 referencedRelation: "documents"
609 referencedColumns: ["uri"]
610 },
611 {
612 foreignKeyName: "leaflets_in_publications_leaflet_fkey"
613 columns: ["leaflet"]
614 isOneToOne: false
615 referencedRelation: "permission_tokens"
616 referencedColumns: ["id"]
617 },
618 {
619 foreignKeyName: "leaflets_in_publications_publication_fkey"
620 columns: ["publication"]
621 isOneToOne: false
622 referencedRelation: "publications"
623 referencedColumns: ["uri"]
624 },
625 ]
626 }
627 oauth_session_store: {
628 Row: {
629 key: string
630 session: Json
631 }
632 Insert: {
633 key: string
634 session: Json
635 }
636 Update: {
637 key?: string
638 session?: Json
639 }
640 Relationships: []
641 }
642 oauth_state_store: {
643 Row: {
644 key: string
645 state: Json
646 }
647 Insert: {
648 key: string
649 state: Json
650 }
651 Update: {
652 key?: string
653 state?: Json
654 }
655 Relationships: []
656 }
657 permission_token_on_homepage: {
658 Row: {
659 created_at: string
660 identity: string
661 token: string
662 }
663 Insert: {
664 created_at?: string
665 identity: string
666 token: string
667 }
668 Update: {
669 created_at?: string
670 identity?: string
671 token?: string
672 }
673 Relationships: [
674 {
675 foreignKeyName: "permission_token_creator_identity_fkey"
676 columns: ["identity"]
677 isOneToOne: false
678 referencedRelation: "identities"
679 referencedColumns: ["id"]
680 },
681 {
682 foreignKeyName: "permission_token_creator_token_fkey"
683 columns: ["token"]
684 isOneToOne: false
685 referencedRelation: "permission_tokens"
686 referencedColumns: ["id"]
687 },
688 ]
689 }
690 permission_token_rights: {
691 Row: {
692 change_entity_set: boolean
693 create_token: boolean
694 created_at: string
695 entity_set: string
696 read: boolean
697 token: string
698 write: boolean
699 }
700 Insert: {
701 change_entity_set?: boolean
702 create_token?: boolean
703 created_at?: string
704 entity_set: string
705 read?: boolean
706 token: string
707 write?: boolean
708 }
709 Update: {
710 change_entity_set?: boolean
711 create_token?: boolean
712 created_at?: string
713 entity_set?: string
714 read?: boolean
715 token?: string
716 write?: boolean
717 }
718 Relationships: [
719 {
720 foreignKeyName: "permission_token_rights_entity_set_fkey"
721 columns: ["entity_set"]
722 isOneToOne: false
723 referencedRelation: "entity_sets"
724 referencedColumns: ["id"]
725 },
726 {
727 foreignKeyName: "permission_token_rights_token_fkey"
728 columns: ["token"]
729 isOneToOne: false
730 referencedRelation: "permission_tokens"
731 referencedColumns: ["id"]
732 },
733 ]
734 }
735 permission_tokens: {
736 Row: {
737 blocked_by_admin: boolean | null
738 id: string
739 root_entity: string
740 }
741 Insert: {
742 blocked_by_admin?: boolean | null
743 id?: string
744 root_entity: string
745 }
746 Update: {
747 blocked_by_admin?: boolean | null
748 id?: string
749 root_entity?: string
750 }
751 Relationships: [
752 {
753 foreignKeyName: "permission_tokens_root_entity_fkey"
754 columns: ["root_entity"]
755 isOneToOne: false
756 referencedRelation: "entities"
757 referencedColumns: ["id"]
758 },
759 ]
760 }
761 phone_number_auth_tokens: {
762 Row: {
763 confirmation_code: string
764 confirmed: boolean
765 country_code: string
766 created_at: string
767 id: string
768 phone_number: string
769 }
770 Insert: {
771 confirmation_code: string
772 confirmed?: boolean
773 country_code: string
774 created_at?: string
775 id?: string
776 phone_number: string
777 }
778 Update: {
779 confirmation_code?: string
780 confirmed?: boolean
781 country_code?: string
782 created_at?: string
783 id?: string
784 phone_number?: string
785 }
786 Relationships: []
787 }
788 phone_rsvps_to_entity: {
789 Row: {
790 country_code: string
791 created_at: string
792 entity: string
793 id: string
794 name: string
795 phone_number: string
796 plus_ones: number
797 status: Database["public"]["Enums"]["rsvp_status"]
798 }
799 Insert: {
800 country_code: string
801 created_at?: string
802 entity: string
803 id?: string
804 name?: string
805 phone_number: string
806 plus_ones?: number
807 status: Database["public"]["Enums"]["rsvp_status"]
808 }
809 Update: {
810 country_code?: string
811 created_at?: string
812 entity?: string
813 id?: string
814 name?: string
815 phone_number?: string
816 plus_ones?: number
817 status?: Database["public"]["Enums"]["rsvp_status"]
818 }
819 Relationships: [
820 {
821 foreignKeyName: "phone_rsvps_to_entity_entity_fkey"
822 columns: ["entity"]
823 isOneToOne: false
824 referencedRelation: "entities"
825 referencedColumns: ["id"]
826 },
827 ]
828 }
829 poll_votes_on_entity: {
830 Row: {
831 created_at: string
832 id: string
833 option_entity: string
834 poll_entity: string
835 voter_token: string
836 }
837 Insert: {
838 created_at?: string
839 id?: string
840 option_entity: string
841 poll_entity: string
842 voter_token: string
843 }
844 Update: {
845 created_at?: string
846 id?: string
847 option_entity?: string
848 poll_entity?: string
849 voter_token?: string
850 }
851 Relationships: [
852 {
853 foreignKeyName: "poll_votes_on_entity_option_entity_fkey"
854 columns: ["option_entity"]
855 isOneToOne: false
856 referencedRelation: "entities"
857 referencedColumns: ["id"]
858 },
859 {
860 foreignKeyName: "poll_votes_on_entity_poll_entity_fkey"
861 columns: ["poll_entity"]
862 isOneToOne: false
863 referencedRelation: "entities"
864 referencedColumns: ["id"]
865 },
866 ]
867 }
868 publication_domains: {
869 Row: {
870 created_at: string
871 domain: string
872 identity: string
873 publication: string
874 }
875 Insert: {
876 created_at?: string
877 domain: string
878 identity: string
879 publication: string
880 }
881 Update: {
882 created_at?: string
883 domain?: string
884 identity?: string
885 publication?: string
886 }
887 Relationships: [
888 {
889 foreignKeyName: "publication_domains_domain_fkey"
890 columns: ["domain"]
891 isOneToOne: false
892 referencedRelation: "custom_domains"
893 referencedColumns: ["domain"]
894 },
895 {
896 foreignKeyName: "publication_domains_identity_fkey"
897 columns: ["identity"]
898 isOneToOne: false
899 referencedRelation: "identities"
900 referencedColumns: ["atp_did"]
901 },
902 {
903 foreignKeyName: "publication_domains_publication_fkey"
904 columns: ["publication"]
905 isOneToOne: false
906 referencedRelation: "publications"
907 referencedColumns: ["uri"]
908 },
909 ]
910 }
911 publication_subscriptions: {
912 Row: {
913 created_at: string
914 identity: string
915 publication: string
916 record: Json
917 uri: string
918 }
919 Insert: {
920 created_at?: string
921 identity: string
922 publication: string
923 record: Json
924 uri: string
925 }
926 Update: {
927 created_at?: string
928 identity?: string
929 publication?: string
930 record?: Json
931 uri?: string
932 }
933 Relationships: [
934 {
935 foreignKeyName: "publication_subscriptions_identity_fkey"
936 columns: ["identity"]
937 isOneToOne: false
938 referencedRelation: "identities"
939 referencedColumns: ["atp_did"]
940 },
941 {
942 foreignKeyName: "publication_subscriptions_publication_fkey"
943 columns: ["publication"]
944 isOneToOne: false
945 referencedRelation: "publications"
946 referencedColumns: ["uri"]
947 },
948 ]
949 }
950 publications: {
951 Row: {
952 identity_did: string
953 indexed_at: string
954 name: string
955 record: Json | null
956 uri: string
957 }
958 Insert: {
959 identity_did: string
960 indexed_at?: string
961 name: string
962 record?: Json | null
963 uri: string
964 }
965 Update: {
966 identity_did?: string
967 indexed_at?: string
968 name?: string
969 record?: Json | null
970 uri?: string
971 }
972 Relationships: [
973 {
974 foreignKeyName: "publications_identity_did_fkey"
975 columns: ["identity_did"]
976 isOneToOne: false
977 referencedRelation: "identities"
978 referencedColumns: ["atp_did"]
979 },
980 ]
981 }
982 replicache_clients: {
983 Row: {
984 client_group: string
985 client_id: string
986 last_mutation: number
987 }
988 Insert: {
989 client_group: string
990 client_id: string
991 last_mutation: number
992 }
993 Update: {
994 client_group?: string
995 client_id?: string
996 last_mutation?: number
997 }
998 Relationships: []
999 }
1000 subscribers_to_publications: {
1001 Row: {
1002 created_at: string
1003 identity: string
1004 publication: string
1005 }
1006 Insert: {
1007 created_at?: string
1008 identity: string
1009 publication: string
1010 }
1011 Update: {
1012 created_at?: string
1013 identity?: string
1014 publication?: string
1015 }
1016 Relationships: [
1017 {
1018 foreignKeyName: "subscribers_to_publications_identity_fkey"
1019 columns: ["identity"]
1020 isOneToOne: false
1021 referencedRelation: "identities"
1022 referencedColumns: ["email"]
1023 },
1024 {
1025 foreignKeyName: "subscribers_to_publications_publication_fkey"
1026 columns: ["publication"]
1027 isOneToOne: false
1028 referencedRelation: "publications"
1029 referencedColumns: ["uri"]
1030 },
1031 ]
1032 }
1033 }
1034 Views: {
1035 [_ in never]: never
1036 }
1037 Functions: {
1038 get_facts: {
1039 Args: {
1040 root: string
1041 }
1042 Returns: {
1043 attribute: string
1044 created_at: string
1045 data: Json
1046 entity: string
1047 id: string
1048 updated_at: string | null
1049 version: number
1050 }[]
1051 }
1052 get_facts_for_roots: {
1053 Args: {
1054 roots: string[]
1055 max_depth: number
1056 }
1057 Returns: {
1058 root_id: string
1059 id: string
1060 entity: string
1061 attribute: string
1062 data: Json
1063 created_at: string
1064 updated_at: string
1065 version: number
1066 }[]
1067 }
1068 get_facts_with_depth: {
1069 Args: {
1070 root: string
1071 max_depth: number
1072 }
1073 Returns: {
1074 like: unknown
1075 }[]
1076 }
1077 pull_data: {
1078 Args: {
1079 token_id: string
1080 client_group_id: string
1081 }
1082 Returns: Database["public"]["CompositeTypes"]["pull_result"]
1083 }
1084 }
1085 Enums: {
1086 rsvp_status: "GOING" | "NOT_GOING" | "MAYBE"
1087 }
1088 CompositeTypes: {
1089 pull_result: {
1090 client_groups: Json | null
1091 facts: Json | null
1092 publications: Json | null
1093 }
1094 }
1095 }
1096 storage: {
1097 Tables: {
1098 buckets: {
1099 Row: {
1100 allowed_mime_types: string[] | null
1101 avif_autodetection: boolean | null
1102 created_at: string | null
1103 file_size_limit: number | null
1104 id: string
1105 name: string
1106 owner: string | null
1107 owner_id: string | null
1108 public: boolean | null
1109 updated_at: string | null
1110 }
1111 Insert: {
1112 allowed_mime_types?: string[] | null
1113 avif_autodetection?: boolean | null
1114 created_at?: string | null
1115 file_size_limit?: number | null
1116 id: string
1117 name: string
1118 owner?: string | null
1119 owner_id?: string | null
1120 public?: boolean | null
1121 updated_at?: string | null
1122 }
1123 Update: {
1124 allowed_mime_types?: string[] | null
1125 avif_autodetection?: boolean | null
1126 created_at?: string | null
1127 file_size_limit?: number | null
1128 id?: string
1129 name?: string
1130 owner?: string | null
1131 owner_id?: string | null
1132 public?: boolean | null
1133 updated_at?: string | null
1134 }
1135 Relationships: []
1136 }
1137 migrations: {
1138 Row: {
1139 executed_at: string | null
1140 hash: string
1141 id: number
1142 name: string
1143 }
1144 Insert: {
1145 executed_at?: string | null
1146 hash: string
1147 id: number
1148 name: string
1149 }
1150 Update: {
1151 executed_at?: string | null
1152 hash?: string
1153 id?: number
1154 name?: string
1155 }
1156 Relationships: []
1157 }
1158 objects: {
1159 Row: {
1160 bucket_id: string | null
1161 created_at: string | null
1162 id: string
1163 last_accessed_at: string | null
1164 metadata: Json | null
1165 name: string | null
1166 owner: string | null
1167 owner_id: string | null
1168 path_tokens: string[] | null
1169 updated_at: string | null
1170 version: string | null
1171 }
1172 Insert: {
1173 bucket_id?: string | null
1174 created_at?: string | null
1175 id?: string
1176 last_accessed_at?: string | null
1177 metadata?: Json | null
1178 name?: string | null
1179 owner?: string | null
1180 owner_id?: string | null
1181 path_tokens?: string[] | null
1182 updated_at?: string | null
1183 version?: string | null
1184 }
1185 Update: {
1186 bucket_id?: string | null
1187 created_at?: string | null
1188 id?: string
1189 last_accessed_at?: string | null
1190 metadata?: Json | null
1191 name?: string | null
1192 owner?: string | null
1193 owner_id?: string | null
1194 path_tokens?: string[] | null
1195 updated_at?: string | null
1196 version?: string | null
1197 }
1198 Relationships: [
1199 {
1200 foreignKeyName: "objects_bucketId_fkey"
1201 columns: ["bucket_id"]
1202 isOneToOne: false
1203 referencedRelation: "buckets"
1204 referencedColumns: ["id"]
1205 },
1206 ]
1207 }
1208 s3_multipart_uploads: {
1209 Row: {
1210 bucket_id: string
1211 created_at: string
1212 id: string
1213 in_progress_size: number
1214 key: string
1215 owner_id: string | null
1216 upload_signature: string
1217 version: string
1218 }
1219 Insert: {
1220 bucket_id: string
1221 created_at?: string
1222 id: string
1223 in_progress_size?: number
1224 key: string
1225 owner_id?: string | null
1226 upload_signature: string
1227 version: string
1228 }
1229 Update: {
1230 bucket_id?: string
1231 created_at?: string
1232 id?: string
1233 in_progress_size?: number
1234 key?: string
1235 owner_id?: string | null
1236 upload_signature?: string
1237 version?: string
1238 }
1239 Relationships: [
1240 {
1241 foreignKeyName: "s3_multipart_uploads_bucket_id_fkey"
1242 columns: ["bucket_id"]
1243 isOneToOne: false
1244 referencedRelation: "buckets"
1245 referencedColumns: ["id"]
1246 },
1247 ]
1248 }
1249 s3_multipart_uploads_parts: {
1250 Row: {
1251 bucket_id: string
1252 created_at: string
1253 etag: string
1254 id: string
1255 key: string
1256 owner_id: string | null
1257 part_number: number
1258 size: number
1259 upload_id: string
1260 version: string
1261 }
1262 Insert: {
1263 bucket_id: string
1264 created_at?: string
1265 etag: string
1266 id?: string
1267 key: string
1268 owner_id?: string | null
1269 part_number: number
1270 size?: number
1271 upload_id: string
1272 version: string
1273 }
1274 Update: {
1275 bucket_id?: string
1276 created_at?: string
1277 etag?: string
1278 id?: string
1279 key?: string
1280 owner_id?: string | null
1281 part_number?: number
1282 size?: number
1283 upload_id?: string
1284 version?: string
1285 }
1286 Relationships: [
1287 {
1288 foreignKeyName: "s3_multipart_uploads_parts_bucket_id_fkey"
1289 columns: ["bucket_id"]
1290 isOneToOne: false
1291 referencedRelation: "buckets"
1292 referencedColumns: ["id"]
1293 },
1294 {
1295 foreignKeyName: "s3_multipart_uploads_parts_upload_id_fkey"
1296 columns: ["upload_id"]
1297 isOneToOne: false
1298 referencedRelation: "s3_multipart_uploads"
1299 referencedColumns: ["id"]
1300 },
1301 ]
1302 }
1303 }
1304 Views: {
1305 [_ in never]: never
1306 }
1307 Functions: {
1308 can_insert_object: {
1309 Args: {
1310 bucketid: string
1311 name: string
1312 owner: string
1313 metadata: Json
1314 }
1315 Returns: undefined
1316 }
1317 extension: {
1318 Args: {
1319 name: string
1320 }
1321 Returns: string
1322 }
1323 filename: {
1324 Args: {
1325 name: string
1326 }
1327 Returns: string
1328 }
1329 foldername: {
1330 Args: {
1331 name: string
1332 }
1333 Returns: string[]
1334 }
1335 get_size_by_bucket: {
1336 Args: Record<PropertyKey, never>
1337 Returns: {
1338 size: number
1339 bucket_id: string
1340 }[]
1341 }
1342 list_multipart_uploads_with_delimiter: {
1343 Args: {
1344 bucket_id: string
1345 prefix_param: string
1346 delimiter_param: string
1347 max_keys?: number
1348 next_key_token?: string
1349 next_upload_token?: string
1350 }
1351 Returns: {
1352 key: string
1353 id: string
1354 created_at: string
1355 }[]
1356 }
1357 list_objects_with_delimiter: {
1358 Args: {
1359 bucket_id: string
1360 prefix_param: string
1361 delimiter_param: string
1362 max_keys?: number
1363 start_after?: string
1364 next_token?: string
1365 }
1366 Returns: {
1367 name: string
1368 id: string
1369 metadata: Json
1370 updated_at: string
1371 }[]
1372 }
1373 search: {
1374 Args: {
1375 prefix: string
1376 bucketname: string
1377 limits?: number
1378 levels?: number
1379 offsets?: number
1380 search?: string
1381 sortcolumn?: string
1382 sortorder?: string
1383 }
1384 Returns: {
1385 name: string
1386 id: string
1387 updated_at: string
1388 created_at: string
1389 last_accessed_at: string
1390 metadata: Json
1391 }[]
1392 }
1393 }
1394 Enums: {
1395 [_ in never]: never
1396 }
1397 CompositeTypes: {
1398 [_ in never]: never
1399 }
1400 }
1401}
1402
1403type PublicSchema = Database[Extract<keyof Database, "public">]
1404
1405export type Tables<
1406 PublicTableNameOrOptions extends
1407 | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
1408 | { schema: keyof Database },
1409 TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1410 ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
1411 Database[PublicTableNameOrOptions["schema"]]["Views"])
1412 : never = never,
1413> = PublicTableNameOrOptions extends { schema: keyof Database }
1414 ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
1415 Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
1416 Row: infer R
1417 }
1418 ? R
1419 : never
1420 : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
1421 PublicSchema["Views"])
1422 ? (PublicSchema["Tables"] &
1423 PublicSchema["Views"])[PublicTableNameOrOptions] extends {
1424 Row: infer R
1425 }
1426 ? R
1427 : never
1428 : never
1429
1430export type TablesInsert<
1431 PublicTableNameOrOptions extends
1432 | keyof PublicSchema["Tables"]
1433 | { schema: keyof Database },
1434 TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1435 ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
1436 : never = never,
1437> = PublicTableNameOrOptions extends { schema: keyof Database }
1438 ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1439 Insert: infer I
1440 }
1441 ? I
1442 : never
1443 : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
1444 ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
1445 Insert: infer I
1446 }
1447 ? I
1448 : never
1449 : never
1450
1451export type TablesUpdate<
1452 PublicTableNameOrOptions extends
1453 | keyof PublicSchema["Tables"]
1454 | { schema: keyof Database },
1455 TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1456 ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
1457 : never = never,
1458> = PublicTableNameOrOptions extends { schema: keyof Database }
1459 ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1460 Update: infer U
1461 }
1462 ? U
1463 : never
1464 : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
1465 ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
1466 Update: infer U
1467 }
1468 ? U
1469 : never
1470 : never
1471
1472export type Enums<
1473 PublicEnumNameOrOptions extends
1474 | keyof PublicSchema["Enums"]
1475 | { schema: keyof Database },
1476 EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
1477 ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
1478 : never = never,
1479> = PublicEnumNameOrOptions extends { schema: keyof Database }
1480 ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
1481 : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
1482 ? PublicSchema["Enums"][PublicEnumNameOrOptions]
1483 : never
1484