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