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