@hobenakicoffee/libraries 1.22.0 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hobenakicoffee/libraries",
3
- "version": "1.22.0",
3
+ "version": "1.23.0",
4
4
  "type": "module",
5
5
  "types": "src/index.ts",
6
6
  "exports": {
@@ -337,6 +337,62 @@ export type Database = {
337
337
  };
338
338
  Relationships: [];
339
339
  };
340
+ membership_plans: {
341
+ Row: {
342
+ access_config: Json;
343
+ billing_cycle: Database["public"]["Enums"]["membership_billing_cycle_enum"];
344
+ created_at: string;
345
+ description: string | null;
346
+ id: string;
347
+ is_active: boolean;
348
+ is_featured: boolean;
349
+ name: string;
350
+ owner_profile_id: string;
351
+ price: number;
352
+ service_type: string;
353
+ sort_order: number;
354
+ updated_at: string;
355
+ };
356
+ Insert: {
357
+ access_config?: Json;
358
+ billing_cycle: Database["public"]["Enums"]["membership_billing_cycle_enum"];
359
+ created_at?: string;
360
+ description?: string | null;
361
+ id?: string;
362
+ is_active?: boolean;
363
+ is_featured?: boolean;
364
+ name: string;
365
+ owner_profile_id: string;
366
+ price: number;
367
+ service_type: string;
368
+ sort_order?: number;
369
+ updated_at?: string;
370
+ };
371
+ Update: {
372
+ access_config?: Json;
373
+ billing_cycle?: Database["public"]["Enums"]["membership_billing_cycle_enum"];
374
+ created_at?: string;
375
+ description?: string | null;
376
+ id?: string;
377
+ is_active?: boolean;
378
+ is_featured?: boolean;
379
+ name?: string;
380
+ owner_profile_id?: string;
381
+ price?: number;
382
+ service_type?: string;
383
+ sort_order?: number;
384
+ updated_at?: string;
385
+ };
386
+ Relationships: [
387
+ {
388
+ foreignKeyName: "membership_plans_owner_profile_id_fkey";
389
+ columns: ["owner_profile_id"];
390
+ isOneToOne: false;
391
+ referencedRelation: "profiles";
392
+ referencedColumns: ["id"];
393
+ },
394
+ ];
395
+ };
340
396
  messages: {
341
397
  Row: {
342
398
  content: string;
@@ -472,6 +528,289 @@ export type Database = {
472
528
  };
473
529
  Relationships: [];
474
530
  };
531
+ newsletter_post_analytics_daily: {
532
+ Row: {
533
+ clicks: number;
534
+ created_at: string;
535
+ date: string;
536
+ id: string;
537
+ post_id: string;
538
+ purchases: number;
539
+ revenue: number;
540
+ updated_at: string;
541
+ views: number;
542
+ };
543
+ Insert: {
544
+ clicks?: number;
545
+ created_at?: string;
546
+ date: string;
547
+ id?: string;
548
+ post_id: string;
549
+ purchases?: number;
550
+ revenue?: number;
551
+ updated_at?: string;
552
+ views?: number;
553
+ };
554
+ Update: {
555
+ clicks?: number;
556
+ created_at?: string;
557
+ date?: string;
558
+ id?: string;
559
+ post_id?: string;
560
+ purchases?: number;
561
+ revenue?: number;
562
+ updated_at?: string;
563
+ views?: number;
564
+ };
565
+ Relationships: [
566
+ {
567
+ foreignKeyName: "newsletter_post_analytics_daily_post_id_fkey";
568
+ columns: ["post_id"];
569
+ isOneToOne: false;
570
+ referencedRelation: "newsletter_posts";
571
+ referencedColumns: ["id"];
572
+ },
573
+ ];
574
+ };
575
+ newsletter_post_likes: {
576
+ Row: {
577
+ created_at: string;
578
+ id: string;
579
+ post_id: string;
580
+ profile_id: string;
581
+ };
582
+ Insert: {
583
+ created_at?: string;
584
+ id?: string;
585
+ post_id: string;
586
+ profile_id: string;
587
+ };
588
+ Update: {
589
+ created_at?: string;
590
+ id?: string;
591
+ post_id?: string;
592
+ profile_id?: string;
593
+ };
594
+ Relationships: [
595
+ {
596
+ foreignKeyName: "newsletter_post_likes_post_id_fkey";
597
+ columns: ["post_id"];
598
+ isOneToOne: false;
599
+ referencedRelation: "newsletter_posts";
600
+ referencedColumns: ["id"];
601
+ },
602
+ {
603
+ foreignKeyName: "newsletter_post_likes_profile_id_fkey";
604
+ columns: ["profile_id"];
605
+ isOneToOne: false;
606
+ referencedRelation: "profiles";
607
+ referencedColumns: ["id"];
608
+ },
609
+ ];
610
+ };
611
+ newsletter_post_versions: {
612
+ Row: {
613
+ ai_summary: string | null;
614
+ content: string | null;
615
+ created_at: string;
616
+ id: string;
617
+ post_id: string;
618
+ source: Database["public"]["Enums"]["post_version_source_enum"];
619
+ title: string | null;
620
+ version_number: number;
621
+ };
622
+ Insert: {
623
+ ai_summary?: string | null;
624
+ content?: string | null;
625
+ created_at?: string;
626
+ id?: string;
627
+ post_id: string;
628
+ source: Database["public"]["Enums"]["post_version_source_enum"];
629
+ title?: string | null;
630
+ version_number: number;
631
+ };
632
+ Update: {
633
+ ai_summary?: string | null;
634
+ content?: string | null;
635
+ created_at?: string;
636
+ id?: string;
637
+ post_id?: string;
638
+ source?: Database["public"]["Enums"]["post_version_source_enum"];
639
+ title?: string | null;
640
+ version_number?: number;
641
+ };
642
+ Relationships: [
643
+ {
644
+ foreignKeyName: "newsletter_post_versions_post_id_fkey";
645
+ columns: ["post_id"];
646
+ isOneToOne: false;
647
+ referencedRelation: "newsletter_posts";
648
+ referencedColumns: ["id"];
649
+ },
650
+ ];
651
+ };
652
+ newsletter_posts: {
653
+ Row: {
654
+ click_count: number;
655
+ content: string | null;
656
+ cover_image_url: string | null;
657
+ created_at: string;
658
+ excerpt: string | null;
659
+ id: string;
660
+ is_members_only: boolean;
661
+ is_pay_per_post: boolean;
662
+ like_count: number;
663
+ price: number | null;
664
+ profile_id: string;
665
+ published_at: string | null;
666
+ purchase_count: number;
667
+ reading_time_minutes: number | null;
668
+ revenue_total: number;
669
+ slug: string | null;
670
+ status: Database["public"]["Enums"]["post_status_enum"];
671
+ subtitle: string | null;
672
+ tags: string[];
673
+ title: string;
674
+ updated_at: string;
675
+ view_count: number;
676
+ visibility: Database["public"]["Enums"]["visibility_enum"];
677
+ };
678
+ Insert: {
679
+ click_count?: number;
680
+ content?: string | null;
681
+ cover_image_url?: string | null;
682
+ created_at?: string;
683
+ excerpt?: string | null;
684
+ id?: string;
685
+ is_members_only?: boolean;
686
+ is_pay_per_post?: boolean;
687
+ like_count?: number;
688
+ price?: number | null;
689
+ profile_id: string;
690
+ published_at?: string | null;
691
+ purchase_count?: number;
692
+ reading_time_minutes?: number | null;
693
+ revenue_total?: number;
694
+ slug?: string | null;
695
+ status?: Database["public"]["Enums"]["post_status_enum"];
696
+ subtitle?: string | null;
697
+ tags?: string[];
698
+ title: string;
699
+ updated_at?: string;
700
+ view_count?: number;
701
+ visibility?: Database["public"]["Enums"]["visibility_enum"];
702
+ };
703
+ Update: {
704
+ click_count?: number;
705
+ content?: string | null;
706
+ cover_image_url?: string | null;
707
+ created_at?: string;
708
+ excerpt?: string | null;
709
+ id?: string;
710
+ is_members_only?: boolean;
711
+ is_pay_per_post?: boolean;
712
+ like_count?: number;
713
+ price?: number | null;
714
+ profile_id?: string;
715
+ published_at?: string | null;
716
+ purchase_count?: number;
717
+ reading_time_minutes?: number | null;
718
+ revenue_total?: number;
719
+ slug?: string | null;
720
+ status?: Database["public"]["Enums"]["post_status_enum"];
721
+ subtitle?: string | null;
722
+ tags?: string[];
723
+ title?: string;
724
+ updated_at?: string;
725
+ view_count?: number;
726
+ visibility?: Database["public"]["Enums"]["visibility_enum"];
727
+ };
728
+ Relationships: [
729
+ {
730
+ foreignKeyName: "newsletter_posts_profile_id_fkey";
731
+ columns: ["profile_id"];
732
+ isOneToOne: false;
733
+ referencedRelation: "profiles";
734
+ referencedColumns: ["id"];
735
+ },
736
+ ];
737
+ };
738
+ newsletter_settings: {
739
+ Row: {
740
+ annual_plan_id: string | null;
741
+ annual_price: number | null;
742
+ created_at: string;
743
+ free_tier_label: string;
744
+ gifting_enabled: boolean;
745
+ id: string;
746
+ member_label: string;
747
+ memberships_enabled: boolean;
748
+ monthly_plan_id: string | null;
749
+ monthly_price: number | null;
750
+ newsletter_description: string | null;
751
+ newsletter_title: string | null;
752
+ profile_id: string;
753
+ updated_at: string;
754
+ welcome_message: string | null;
755
+ };
756
+ Insert: {
757
+ annual_plan_id?: string | null;
758
+ annual_price?: number | null;
759
+ created_at?: string;
760
+ free_tier_label?: string;
761
+ gifting_enabled?: boolean;
762
+ id?: string;
763
+ member_label?: string;
764
+ memberships_enabled?: boolean;
765
+ monthly_plan_id?: string | null;
766
+ monthly_price?: number | null;
767
+ newsletter_description?: string | null;
768
+ newsletter_title?: string | null;
769
+ profile_id: string;
770
+ updated_at?: string;
771
+ welcome_message?: string | null;
772
+ };
773
+ Update: {
774
+ annual_plan_id?: string | null;
775
+ annual_price?: number | null;
776
+ created_at?: string;
777
+ free_tier_label?: string;
778
+ gifting_enabled?: boolean;
779
+ id?: string;
780
+ member_label?: string;
781
+ memberships_enabled?: boolean;
782
+ monthly_plan_id?: string | null;
783
+ monthly_price?: number | null;
784
+ newsletter_description?: string | null;
785
+ newsletter_title?: string | null;
786
+ profile_id?: string;
787
+ updated_at?: string;
788
+ welcome_message?: string | null;
789
+ };
790
+ Relationships: [
791
+ {
792
+ foreignKeyName: "newsletter_settings_annual_plan_id_fkey";
793
+ columns: ["annual_plan_id"];
794
+ isOneToOne: false;
795
+ referencedRelation: "membership_plans";
796
+ referencedColumns: ["id"];
797
+ },
798
+ {
799
+ foreignKeyName: "newsletter_settings_monthly_plan_id_fkey";
800
+ columns: ["monthly_plan_id"];
801
+ isOneToOne: false;
802
+ referencedRelation: "membership_plans";
803
+ referencedColumns: ["id"];
804
+ },
805
+ {
806
+ foreignKeyName: "newsletter_settings_profile_id_fkey";
807
+ columns: ["profile_id"];
808
+ isOneToOne: true;
809
+ referencedRelation: "profiles";
810
+ referencedColumns: ["id"];
811
+ },
812
+ ];
813
+ };
475
814
  payout_methods: {
476
815
  Row: {
477
816
  created_at: string;
@@ -513,6 +852,163 @@ export type Database = {
513
852
  },
514
853
  ];
515
854
  };
855
+ post_access_grants: {
856
+ Row: {
857
+ created_at: string;
858
+ expires_at: string | null;
859
+ gift_message: string | null;
860
+ grant_type: Database["public"]["Enums"]["access_grant_type_enum"];
861
+ granted_by_profile_id: string | null;
862
+ grantee_profile_id: string;
863
+ id: string;
864
+ is_redeemed: boolean;
865
+ post_id: string;
866
+ redeemed_at: string | null;
867
+ transaction_reference_id: string | null;
868
+ updated_at: string;
869
+ };
870
+ Insert: {
871
+ created_at?: string;
872
+ expires_at?: string | null;
873
+ gift_message?: string | null;
874
+ grant_type: Database["public"]["Enums"]["access_grant_type_enum"];
875
+ granted_by_profile_id?: string | null;
876
+ grantee_profile_id: string;
877
+ id?: string;
878
+ is_redeemed?: boolean;
879
+ post_id: string;
880
+ redeemed_at?: string | null;
881
+ transaction_reference_id?: string | null;
882
+ updated_at?: string;
883
+ };
884
+ Update: {
885
+ created_at?: string;
886
+ expires_at?: string | null;
887
+ gift_message?: string | null;
888
+ grant_type?: Database["public"]["Enums"]["access_grant_type_enum"];
889
+ granted_by_profile_id?: string | null;
890
+ grantee_profile_id?: string;
891
+ id?: string;
892
+ is_redeemed?: boolean;
893
+ post_id?: string;
894
+ redeemed_at?: string | null;
895
+ transaction_reference_id?: string | null;
896
+ updated_at?: string;
897
+ };
898
+ Relationships: [
899
+ {
900
+ foreignKeyName: "post_access_grants_granted_by_profile_id_fkey";
901
+ columns: ["granted_by_profile_id"];
902
+ isOneToOne: false;
903
+ referencedRelation: "profiles";
904
+ referencedColumns: ["id"];
905
+ },
906
+ {
907
+ foreignKeyName: "post_access_grants_grantee_profile_id_fkey";
908
+ columns: ["grantee_profile_id"];
909
+ isOneToOne: false;
910
+ referencedRelation: "profiles";
911
+ referencedColumns: ["id"];
912
+ },
913
+ {
914
+ foreignKeyName: "post_access_grants_post_id_fkey";
915
+ columns: ["post_id"];
916
+ isOneToOne: false;
917
+ referencedRelation: "newsletter_posts";
918
+ referencedColumns: ["id"];
919
+ },
920
+ {
921
+ foreignKeyName: "post_access_grants_transaction_reference_id_fkey";
922
+ columns: ["transaction_reference_id"];
923
+ isOneToOne: false;
924
+ referencedRelation: "transactions";
925
+ referencedColumns: ["reference_id"];
926
+ },
927
+ ];
928
+ };
929
+ profile_memberships: {
930
+ Row: {
931
+ auto_renew: boolean;
932
+ cancelled_at: string | null;
933
+ created_at: string;
934
+ id: string;
935
+ member_profile_id: string;
936
+ owner_profile_id: string;
937
+ period_end: string | null;
938
+ period_start: string;
939
+ plan_id: string;
940
+ price_at_purchase: number;
941
+ renewed_at: string | null;
942
+ service_type: string;
943
+ status: Database["public"]["Enums"]["membership_status_enum"];
944
+ transaction_id: string | null;
945
+ updated_at: string;
946
+ };
947
+ Insert: {
948
+ auto_renew?: boolean;
949
+ cancelled_at?: string | null;
950
+ created_at?: string;
951
+ id?: string;
952
+ member_profile_id: string;
953
+ owner_profile_id: string;
954
+ period_end?: string | null;
955
+ period_start?: string;
956
+ plan_id: string;
957
+ price_at_purchase: number;
958
+ renewed_at?: string | null;
959
+ service_type: string;
960
+ status?: Database["public"]["Enums"]["membership_status_enum"];
961
+ transaction_id?: string | null;
962
+ updated_at?: string;
963
+ };
964
+ Update: {
965
+ auto_renew?: boolean;
966
+ cancelled_at?: string | null;
967
+ created_at?: string;
968
+ id?: string;
969
+ member_profile_id?: string;
970
+ owner_profile_id?: string;
971
+ period_end?: string | null;
972
+ period_start?: string;
973
+ plan_id?: string;
974
+ price_at_purchase?: number;
975
+ renewed_at?: string | null;
976
+ service_type?: string;
977
+ status?: Database["public"]["Enums"]["membership_status_enum"];
978
+ transaction_id?: string | null;
979
+ updated_at?: string;
980
+ };
981
+ Relationships: [
982
+ {
983
+ foreignKeyName: "profile_memberships_member_profile_id_fkey";
984
+ columns: ["member_profile_id"];
985
+ isOneToOne: false;
986
+ referencedRelation: "profiles";
987
+ referencedColumns: ["id"];
988
+ },
989
+ {
990
+ foreignKeyName: "profile_memberships_owner_profile_id_fkey";
991
+ columns: ["owner_profile_id"];
992
+ isOneToOne: false;
993
+ referencedRelation: "profiles";
994
+ referencedColumns: ["id"];
995
+ },
996
+ {
997
+ foreignKeyName: "profile_memberships_plan_id_fkey";
998
+ columns: ["plan_id"];
999
+ isOneToOne: false;
1000
+ referencedRelation: "membership_plans";
1001
+ referencedColumns: ["id"];
1002
+ },
1003
+ {
1004
+ foreignKeyName: "profile_memberships_transaction_id_fkey";
1005
+ columns: ["transaction_id"];
1006
+ isOneToOne: false;
1007
+ referencedRelation: "transactions";
1008
+ referencedColumns: ["id"];
1009
+ },
1010
+ ];
1011
+ };
516
1012
  profiles: {
517
1013
  Row: {
518
1014
  allow_gifting: boolean | null;
@@ -994,6 +1490,13 @@ export type Database = {
994
1490
  };
995
1491
  Returns: boolean;
996
1492
  };
1493
+ check_newsletter_post_access: {
1494
+ Args: { p_post_id: string };
1495
+ Returns: {
1496
+ access_reason: string;
1497
+ has_access: boolean;
1498
+ }[];
1499
+ };
997
1500
  create_manager: {
998
1501
  Args: {
999
1502
  manager_department?: string;
@@ -1054,6 +1557,14 @@ export type Database = {
1054
1557
  sender_username: string;
1055
1558
  }[];
1056
1559
  };
1560
+ get_newsletter_stats: {
1561
+ Args: { p_from?: string; p_profile_id: string; p_to?: string };
1562
+ Returns: {
1563
+ newsletter_subs: number;
1564
+ post_sales_revenue: number;
1565
+ total_post_views: number;
1566
+ }[];
1567
+ };
1057
1568
  get_or_create_direct_conversation: {
1058
1569
  Args: { p_recipient_id: string };
1059
1570
  Returns: string;
@@ -1066,6 +1577,83 @@ export type Database = {
1066
1577
  total_amount: number;
1067
1578
  }[];
1068
1579
  };
1580
+ get_post_analytics: {
1581
+ Args: { p_from?: string; p_post_id: string; p_to?: string };
1582
+ Returns: {
1583
+ chart_date: string;
1584
+ conv_rate: number;
1585
+ day_clicks: number;
1586
+ day_purchases: number;
1587
+ day_revenue: number;
1588
+ day_views: number;
1589
+ total_clicks: number;
1590
+ total_sales: number;
1591
+ total_views: number;
1592
+ }[];
1593
+ };
1594
+ get_posts_page: {
1595
+ Args: {
1596
+ p_cursor?: string;
1597
+ p_from?: string;
1598
+ p_limit?: number;
1599
+ p_profile_id: string;
1600
+ p_status: Database["public"]["Enums"]["post_status_enum"];
1601
+ p_to?: string;
1602
+ };
1603
+ Returns: {
1604
+ click_count: number;
1605
+ cover_image_url: string;
1606
+ created_at: string;
1607
+ draft_count: number;
1608
+ excerpt: string;
1609
+ id: string;
1610
+ is_members_only: boolean;
1611
+ is_pay_per_post: boolean;
1612
+ like_count: number;
1613
+ price: number;
1614
+ published_at: string;
1615
+ purchase_count: number;
1616
+ revenue_total: number;
1617
+ slug: string;
1618
+ tags: string[];
1619
+ title: string;
1620
+ updated_at: string;
1621
+ view_count: number;
1622
+ }[];
1623
+ };
1624
+ get_reader_feed: {
1625
+ Args: {
1626
+ p_cursor?: string;
1627
+ p_filter?: string;
1628
+ p_from?: string;
1629
+ p_limit?: number;
1630
+ p_search?: string;
1631
+ p_to?: string;
1632
+ };
1633
+ Returns: {
1634
+ access_badge: string;
1635
+ author_avatar_url: string;
1636
+ author_display_name: string;
1637
+ author_username: string;
1638
+ cover_image_url: string;
1639
+ excerpt: string;
1640
+ has_access: boolean;
1641
+ is_liked: boolean;
1642
+ is_members_only: boolean;
1643
+ is_pay_per_post: boolean;
1644
+ like_count: number;
1645
+ post_id: string;
1646
+ price: number;
1647
+ profile_id: string;
1648
+ published_at: string;
1649
+ reading_time_minutes: number;
1650
+ slug: string;
1651
+ subtitle: string;
1652
+ tags: string[];
1653
+ title: string;
1654
+ view_count: number;
1655
+ }[];
1656
+ };
1069
1657
  get_supporter_coffee_gifts_stats: {
1070
1658
  Args: {
1071
1659
  p_from_date: string;
@@ -1082,6 +1670,16 @@ export type Database = {
1082
1670
  Args: { p_creator_id: string; p_from_date: string; p_to_date: string };
1083
1671
  Returns: number;
1084
1672
  };
1673
+ gift_newsletter_post: {
1674
+ Args: {
1675
+ p_expires_at?: string;
1676
+ p_gift_message?: string;
1677
+ p_grantee_profile_id: string;
1678
+ p_post_id: string;
1679
+ p_transaction_reference_id?: string;
1680
+ };
1681
+ Returns: string;
1682
+ };
1085
1683
  handle_successful_payment: {
1086
1684
  Args: {
1087
1685
  p_amount: number;
@@ -1097,6 +1695,14 @@ export type Database = {
1097
1695
  };
1098
1696
  Returns: Json;
1099
1697
  };
1698
+ has_active_membership: {
1699
+ Args: {
1700
+ p_member_profile_id: string;
1701
+ p_owner_profile_id: string;
1702
+ p_service_type: string;
1703
+ };
1704
+ Returns: boolean;
1705
+ };
1100
1706
  is_admin: { Args: never; Returns: boolean };
1101
1707
  is_following: { Args: { target_user_id: string }; Returns: boolean };
1102
1708
  is_manager: { Args: { user_email: string }; Returns: boolean };
@@ -1104,6 +1710,10 @@ export type Database = {
1104
1710
  Args: { p_conversation_id: string };
1105
1711
  Returns: undefined;
1106
1712
  };
1713
+ record_newsletter_post_click: {
1714
+ Args: { p_post_id: string };
1715
+ Returns: undefined;
1716
+ };
1107
1717
  request_withdrawal: {
1108
1718
  Args: { p_amount: number; p_payout_method_id: string };
1109
1719
  Returns: string;
@@ -1118,10 +1728,13 @@ export type Database = {
1118
1728
  sender_id: string;
1119
1729
  }[];
1120
1730
  };
1121
- show_limit: { Args: never; Returns: number };
1122
- show_trgm: { Args: { "": string }; Returns: string[] };
1123
1731
  toggle_follow: { Args: { target_user_id: string }; Returns: boolean };
1732
+ toggle_newsletter_post_like: {
1733
+ Args: { p_post_id: string };
1734
+ Returns: Json;
1735
+ };
1124
1736
  unfollow_user: { Args: { target_user_id: string }; Returns: undefined };
1737
+ unpublish_newsletter_post: { Args: { p_post_id: string }; Returns: Json };
1125
1738
  upsert_supporter: {
1126
1739
  Args: {
1127
1740
  p_amount?: number;
@@ -1137,6 +1750,7 @@ export type Database = {
1137
1750
  };
1138
1751
  };
1139
1752
  Enums: {
1753
+ access_grant_type_enum: "purchase" | "gift";
1140
1754
  manager_permission:
1141
1755
  | "managers.create"
1142
1756
  | "managers.view"
@@ -1173,6 +1787,13 @@ export type Database = {
1173
1787
  | "finance_manager"
1174
1788
  | "developer_manager";
1175
1789
  manager_status: "ACTIVE" | "INACTIVE" | "SUSPENDED";
1790
+ membership_billing_cycle_enum: "monthly" | "annual" | "lifetime";
1791
+ membership_status_enum:
1792
+ | "active"
1793
+ | "cancelled"
1794
+ | "expired"
1795
+ | "paused"
1796
+ | "past_due";
1176
1797
  payment_status_enum:
1177
1798
  | "pending"
1178
1799
  | "processing"
@@ -1183,6 +1804,12 @@ export type Database = {
1183
1804
  | "refunded"
1184
1805
  | "reviewing";
1185
1806
  payout_provider: "bkash" | "nagad" | "rocket" | "bank";
1807
+ post_status_enum: "draft" | "published" | "archived";
1808
+ post_version_source_enum:
1809
+ | "autosave"
1810
+ | "ai_polish"
1811
+ | "manual_save"
1812
+ | "pre_publish";
1186
1813
  provider_enum:
1187
1814
  | "HobeNakiCoffee"
1188
1815
  | "Bkash"
@@ -1369,6 +1996,7 @@ export type CompositeTypes<
1369
1996
  export const Constants = {
1370
1997
  public: {
1371
1998
  Enums: {
1999
+ access_grant_type_enum: ["purchase", "gift"],
1372
2000
  manager_permission: [
1373
2001
  "managers.create",
1374
2002
  "managers.view",
@@ -1407,6 +2035,14 @@ export const Constants = {
1407
2035
  "developer_manager",
1408
2036
  ],
1409
2037
  manager_status: ["ACTIVE", "INACTIVE", "SUSPENDED"],
2038
+ membership_billing_cycle_enum: ["monthly", "annual", "lifetime"],
2039
+ membership_status_enum: [
2040
+ "active",
2041
+ "cancelled",
2042
+ "expired",
2043
+ "paused",
2044
+ "past_due",
2045
+ ],
1410
2046
  payment_status_enum: [
1411
2047
  "pending",
1412
2048
  "processing",
@@ -1418,6 +2054,13 @@ export const Constants = {
1418
2054
  "reviewing",
1419
2055
  ],
1420
2056
  payout_provider: ["bkash", "nagad", "rocket", "bank"],
2057
+ post_status_enum: ["draft", "published", "archived"],
2058
+ post_version_source_enum: [
2059
+ "autosave",
2060
+ "ai_polish",
2061
+ "manual_save",
2062
+ "pre_publish",
2063
+ ],
1421
2064
  provider_enum: [
1422
2065
  "HobeNakiCoffee",
1423
2066
  "Bkash",