a tool for shared writing and social publishing
at feature/footnotes 1823 lines 48 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 get_profile_posts: { 1364 Args: { 1365 p_did: string 1366 p_cursor_sort_date?: string | null 1367 p_cursor_uri?: string | null 1368 p_limit?: number 1369 } 1370 Returns: { 1371 uri: string 1372 data: Json 1373 sort_date: string 1374 comments_count: number 1375 mentions_count: number 1376 recommends_count: number 1377 publication_uri: string 1378 publication_record: Json 1379 publication_name: string 1380 }[] 1381 } 1382 get_reader_feed: { 1383 Args: { 1384 p_identity: string 1385 p_cursor_timestamp?: string 1386 p_cursor_uri?: string 1387 p_limit?: number 1388 } 1389 Returns: { 1390 uri: string 1391 data: Json 1392 sort_date: string 1393 comments_count: number 1394 mentions_count: number 1395 recommends_count: number 1396 publication_uri: string 1397 publication_record: Json 1398 publication_name: string 1399 }[] 1400 } 1401 parse_iso_timestamp: { 1402 Args: { 1403 "": string 1404 } 1405 Returns: string 1406 } 1407 pull_data: { 1408 Args: { 1409 token_id: string 1410 client_group_id: string 1411 } 1412 Returns: Database["public"]["CompositeTypes"]["pull_result"] 1413 } 1414 search_tags: { 1415 Args: { 1416 search_query: string 1417 } 1418 Returns: { 1419 name: string 1420 document_count: number 1421 }[] 1422 } 1423 } 1424 Enums: { 1425 rsvp_status: "GOING" | "NOT_GOING" | "MAYBE" 1426 } 1427 CompositeTypes: { 1428 pull_result: { 1429 client_groups: Json | null 1430 facts: Json | null 1431 publications: Json | null 1432 } 1433 } 1434 } 1435 storage: { 1436 Tables: { 1437 buckets: { 1438 Row: { 1439 allowed_mime_types: string[] | null 1440 avif_autodetection: boolean | null 1441 created_at: string | null 1442 file_size_limit: number | null 1443 id: string 1444 name: string 1445 owner: string | null 1446 owner_id: string | null 1447 public: boolean | null 1448 updated_at: string | null 1449 } 1450 Insert: { 1451 allowed_mime_types?: string[] | null 1452 avif_autodetection?: boolean | null 1453 created_at?: string | null 1454 file_size_limit?: number | null 1455 id: string 1456 name: string 1457 owner?: string | null 1458 owner_id?: string | null 1459 public?: boolean | null 1460 updated_at?: string | null 1461 } 1462 Update: { 1463 allowed_mime_types?: string[] | null 1464 avif_autodetection?: boolean | null 1465 created_at?: string | null 1466 file_size_limit?: number | null 1467 id?: string 1468 name?: string 1469 owner?: string | null 1470 owner_id?: string | null 1471 public?: boolean | null 1472 updated_at?: string | null 1473 } 1474 Relationships: [] 1475 } 1476 migrations: { 1477 Row: { 1478 executed_at: string | null 1479 hash: string 1480 id: number 1481 name: string 1482 } 1483 Insert: { 1484 executed_at?: string | null 1485 hash: string 1486 id: number 1487 name: string 1488 } 1489 Update: { 1490 executed_at?: string | null 1491 hash?: string 1492 id?: number 1493 name?: string 1494 } 1495 Relationships: [] 1496 } 1497 objects: { 1498 Row: { 1499 bucket_id: string | null 1500 created_at: string | null 1501 id: string 1502 last_accessed_at: string | null 1503 metadata: Json | null 1504 name: string | null 1505 owner: string | null 1506 owner_id: string | null 1507 path_tokens: string[] | null 1508 updated_at: string | null 1509 version: string | null 1510 } 1511 Insert: { 1512 bucket_id?: string | null 1513 created_at?: string | null 1514 id?: string 1515 last_accessed_at?: string | null 1516 metadata?: Json | null 1517 name?: string | null 1518 owner?: string | null 1519 owner_id?: string | null 1520 path_tokens?: string[] | null 1521 updated_at?: string | null 1522 version?: string | null 1523 } 1524 Update: { 1525 bucket_id?: string | null 1526 created_at?: string | null 1527 id?: string 1528 last_accessed_at?: string | null 1529 metadata?: Json | null 1530 name?: string | null 1531 owner?: string | null 1532 owner_id?: string | null 1533 path_tokens?: string[] | null 1534 updated_at?: string | null 1535 version?: string | null 1536 } 1537 Relationships: [ 1538 { 1539 foreignKeyName: "objects_bucketId_fkey" 1540 columns: ["bucket_id"] 1541 isOneToOne: false 1542 referencedRelation: "buckets" 1543 referencedColumns: ["id"] 1544 }, 1545 ] 1546 } 1547 s3_multipart_uploads: { 1548 Row: { 1549 bucket_id: string 1550 created_at: string 1551 id: string 1552 in_progress_size: number 1553 key: string 1554 owner_id: string | null 1555 upload_signature: string 1556 version: string 1557 } 1558 Insert: { 1559 bucket_id: string 1560 created_at?: string 1561 id: string 1562 in_progress_size?: number 1563 key: string 1564 owner_id?: string | null 1565 upload_signature: string 1566 version: string 1567 } 1568 Update: { 1569 bucket_id?: string 1570 created_at?: string 1571 id?: string 1572 in_progress_size?: number 1573 key?: string 1574 owner_id?: string | null 1575 upload_signature?: string 1576 version?: string 1577 } 1578 Relationships: [ 1579 { 1580 foreignKeyName: "s3_multipart_uploads_bucket_id_fkey" 1581 columns: ["bucket_id"] 1582 isOneToOne: false 1583 referencedRelation: "buckets" 1584 referencedColumns: ["id"] 1585 }, 1586 ] 1587 } 1588 s3_multipart_uploads_parts: { 1589 Row: { 1590 bucket_id: string 1591 created_at: string 1592 etag: string 1593 id: string 1594 key: string 1595 owner_id: string | null 1596 part_number: number 1597 size: number 1598 upload_id: string 1599 version: string 1600 } 1601 Insert: { 1602 bucket_id: string 1603 created_at?: string 1604 etag: string 1605 id?: string 1606 key: string 1607 owner_id?: string | null 1608 part_number: number 1609 size?: number 1610 upload_id: string 1611 version: string 1612 } 1613 Update: { 1614 bucket_id?: string 1615 created_at?: string 1616 etag?: string 1617 id?: string 1618 key?: string 1619 owner_id?: string | null 1620 part_number?: number 1621 size?: number 1622 upload_id?: string 1623 version?: string 1624 } 1625 Relationships: [ 1626 { 1627 foreignKeyName: "s3_multipart_uploads_parts_bucket_id_fkey" 1628 columns: ["bucket_id"] 1629 isOneToOne: false 1630 referencedRelation: "buckets" 1631 referencedColumns: ["id"] 1632 }, 1633 { 1634 foreignKeyName: "s3_multipart_uploads_parts_upload_id_fkey" 1635 columns: ["upload_id"] 1636 isOneToOne: false 1637 referencedRelation: "s3_multipart_uploads" 1638 referencedColumns: ["id"] 1639 }, 1640 ] 1641 } 1642 } 1643 Views: { 1644 [_ in never]: never 1645 } 1646 Functions: { 1647 can_insert_object: { 1648 Args: { 1649 bucketid: string 1650 name: string 1651 owner: string 1652 metadata: Json 1653 } 1654 Returns: undefined 1655 } 1656 extension: { 1657 Args: { 1658 name: string 1659 } 1660 Returns: string 1661 } 1662 filename: { 1663 Args: { 1664 name: string 1665 } 1666 Returns: string 1667 } 1668 foldername: { 1669 Args: { 1670 name: string 1671 } 1672 Returns: string[] 1673 } 1674 get_size_by_bucket: { 1675 Args: Record<PropertyKey, never> 1676 Returns: { 1677 size: number 1678 bucket_id: string 1679 }[] 1680 } 1681 list_multipart_uploads_with_delimiter: { 1682 Args: { 1683 bucket_id: string 1684 prefix_param: string 1685 delimiter_param: string 1686 max_keys?: number 1687 next_key_token?: string 1688 next_upload_token?: string 1689 } 1690 Returns: { 1691 key: string 1692 id: string 1693 created_at: string 1694 }[] 1695 } 1696 list_objects_with_delimiter: { 1697 Args: { 1698 bucket_id: string 1699 prefix_param: string 1700 delimiter_param: string 1701 max_keys?: number 1702 start_after?: string 1703 next_token?: string 1704 } 1705 Returns: { 1706 name: string 1707 id: string 1708 metadata: Json 1709 updated_at: string 1710 }[] 1711 } 1712 search: { 1713 Args: { 1714 prefix: string 1715 bucketname: string 1716 limits?: number 1717 levels?: number 1718 offsets?: number 1719 search?: string 1720 sortcolumn?: string 1721 sortorder?: string 1722 } 1723 Returns: { 1724 name: string 1725 id: string 1726 updated_at: string 1727 created_at: string 1728 last_accessed_at: string 1729 metadata: Json 1730 }[] 1731 } 1732 } 1733 Enums: { 1734 [_ in never]: never 1735 } 1736 CompositeTypes: { 1737 [_ in never]: never 1738 } 1739 } 1740} 1741 1742type PublicSchema = Database[Extract<keyof Database, "public">] 1743 1744export type Tables< 1745 PublicTableNameOrOptions extends 1746 | keyof (PublicSchema["Tables"] & PublicSchema["Views"]) 1747 | { schema: keyof Database }, 1748 TableName extends PublicTableNameOrOptions extends { schema: keyof Database } 1749 ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] & 1750 Database[PublicTableNameOrOptions["schema"]]["Views"]) 1751 : never = never, 1752> = PublicTableNameOrOptions extends { schema: keyof Database } 1753 ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] & 1754 Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends { 1755 Row: infer R 1756 } 1757 ? R 1758 : never 1759 : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] & 1760 PublicSchema["Views"]) 1761 ? (PublicSchema["Tables"] & 1762 PublicSchema["Views"])[PublicTableNameOrOptions] extends { 1763 Row: infer R 1764 } 1765 ? R 1766 : never 1767 : never 1768 1769export type TablesInsert< 1770 PublicTableNameOrOptions extends 1771 | keyof PublicSchema["Tables"] 1772 | { schema: keyof Database }, 1773 TableName extends PublicTableNameOrOptions extends { schema: keyof Database } 1774 ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"] 1775 : never = never, 1776> = PublicTableNameOrOptions extends { schema: keyof Database } 1777 ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends { 1778 Insert: infer I 1779 } 1780 ? I 1781 : never 1782 : PublicTableNameOrOptions extends keyof PublicSchema["Tables"] 1783 ? PublicSchema["Tables"][PublicTableNameOrOptions] extends { 1784 Insert: infer I 1785 } 1786 ? I 1787 : never 1788 : never 1789 1790export type TablesUpdate< 1791 PublicTableNameOrOptions extends 1792 | keyof PublicSchema["Tables"] 1793 | { schema: keyof Database }, 1794 TableName extends PublicTableNameOrOptions extends { schema: keyof Database } 1795 ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"] 1796 : never = never, 1797> = PublicTableNameOrOptions extends { schema: keyof Database } 1798 ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends { 1799 Update: infer U 1800 } 1801 ? U 1802 : never 1803 : PublicTableNameOrOptions extends keyof PublicSchema["Tables"] 1804 ? PublicSchema["Tables"][PublicTableNameOrOptions] extends { 1805 Update: infer U 1806 } 1807 ? U 1808 : never 1809 : never 1810 1811export type Enums< 1812 PublicEnumNameOrOptions extends 1813 | keyof PublicSchema["Enums"] 1814 | { schema: keyof Database }, 1815 EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database } 1816 ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"] 1817 : never = never, 1818> = PublicEnumNameOrOptions extends { schema: keyof Database } 1819 ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName] 1820 : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"] 1821 ? PublicSchema["Enums"][PublicEnumNameOrOptions] 1822 : never 1823