@hobenakicoffee/libraries 8.2.0 → 8.3.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/types/supabase.ts +121 -25
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hobenakicoffee/libraries",
3
- "version": "8.2.0",
3
+ "version": "8.3.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "types": "src/index.ts",
@@ -1333,30 +1333,6 @@ export type Database = {
1333
1333
  },
1334
1334
  ];
1335
1335
  };
1336
- messages_2026_05: {
1337
- Row: {
1338
- content: string;
1339
- conversation_id: string;
1340
- created_at: string;
1341
- id: number;
1342
- sender_id: string;
1343
- };
1344
- Insert: {
1345
- content: string;
1346
- conversation_id: string;
1347
- created_at?: string;
1348
- id?: number;
1349
- sender_id: string;
1350
- };
1351
- Update: {
1352
- content?: string;
1353
- conversation_id?: string;
1354
- created_at?: string;
1355
- id?: number;
1356
- sender_id?: string;
1357
- };
1358
- Relationships: [];
1359
- };
1360
1336
  messages_2026_06: {
1361
1337
  Row: {
1362
1338
  content: string;
@@ -1842,6 +1818,95 @@ export type Database = {
1842
1818
  },
1843
1819
  ];
1844
1820
  };
1821
+ payment_sessions: {
1822
+ Row: {
1823
+ amount: number;
1824
+ bank_tran_id: string | null;
1825
+ created_at: string;
1826
+ creator_profile_id: string | null;
1827
+ currency: string;
1828
+ error: string | null;
1829
+ expires_at: string;
1830
+ gateway_response: Json | null;
1831
+ id: string;
1832
+ payload: Json;
1833
+ rpc_result: Json | null;
1834
+ service_type: string;
1835
+ status: Database["public"]["Enums"]["payment_session_status_enum"];
1836
+ supporter_profile_id: string | null;
1837
+ tran_id: string;
1838
+ updated_at: string;
1839
+ val_id: string | null;
1840
+ };
1841
+ Insert: {
1842
+ amount: number;
1843
+ bank_tran_id?: string | null;
1844
+ created_at?: string;
1845
+ creator_profile_id?: string | null;
1846
+ currency?: string;
1847
+ error?: string | null;
1848
+ expires_at?: string;
1849
+ gateway_response?: Json | null;
1850
+ id?: string;
1851
+ payload: Json;
1852
+ rpc_result?: Json | null;
1853
+ service_type: string;
1854
+ status?: Database["public"]["Enums"]["payment_session_status_enum"];
1855
+ supporter_profile_id?: string | null;
1856
+ tran_id: string;
1857
+ updated_at?: string;
1858
+ val_id?: string | null;
1859
+ };
1860
+ Update: {
1861
+ amount?: number;
1862
+ bank_tran_id?: string | null;
1863
+ created_at?: string;
1864
+ creator_profile_id?: string | null;
1865
+ currency?: string;
1866
+ error?: string | null;
1867
+ expires_at?: string;
1868
+ gateway_response?: Json | null;
1869
+ id?: string;
1870
+ payload?: Json;
1871
+ rpc_result?: Json | null;
1872
+ service_type?: string;
1873
+ status?: Database["public"]["Enums"]["payment_session_status_enum"];
1874
+ supporter_profile_id?: string | null;
1875
+ tran_id?: string;
1876
+ updated_at?: string;
1877
+ val_id?: string | null;
1878
+ };
1879
+ Relationships: [
1880
+ {
1881
+ foreignKeyName: "payment_sessions_creator_profile_id_fkey";
1882
+ columns: ["creator_profile_id"];
1883
+ isOneToOne: false;
1884
+ referencedRelation: "profiles";
1885
+ referencedColumns: ["id"];
1886
+ },
1887
+ {
1888
+ foreignKeyName: "payment_sessions_creator_profile_id_fkey";
1889
+ columns: ["creator_profile_id"];
1890
+ isOneToOne: false;
1891
+ referencedRelation: "public_profiles";
1892
+ referencedColumns: ["id"];
1893
+ },
1894
+ {
1895
+ foreignKeyName: "payment_sessions_supporter_profile_id_fkey";
1896
+ columns: ["supporter_profile_id"];
1897
+ isOneToOne: false;
1898
+ referencedRelation: "profiles";
1899
+ referencedColumns: ["id"];
1900
+ },
1901
+ {
1902
+ foreignKeyName: "payment_sessions_supporter_profile_id_fkey";
1903
+ columns: ["supporter_profile_id"];
1904
+ isOneToOne: false;
1905
+ referencedRelation: "public_profiles";
1906
+ referencedColumns: ["id"];
1907
+ },
1908
+ ];
1909
+ };
1845
1910
  payout_methods: {
1846
1911
  Row: {
1847
1912
  created_at: string;
@@ -4208,6 +4273,7 @@ export type Database = {
4208
4273
  dismiss_all_activities: { Args: never; Returns: undefined };
4209
4274
  dispatch_pending_email_notifications: { Args: never; Returns: undefined };
4210
4275
  drop_old_partitions: { Args: never; Returns: undefined };
4276
+ expire_stale_payment_sessions: { Args: never; Returns: number };
4211
4277
  flag_transaction_disputed: {
4212
4278
  Args: { p_is_disputed?: boolean; p_transaction_id: string };
4213
4279
  Returns: Json;
@@ -4442,6 +4508,15 @@ export type Database = {
4442
4508
  Args: never;
4443
4509
  Returns: Database["public"]["Enums"]["user_role"];
4444
4510
  };
4511
+ get_payment_session_status: {
4512
+ Args: { p_tran_id: string };
4513
+ Returns: {
4514
+ amount: number;
4515
+ error: string;
4516
+ service_type: string;
4517
+ status: Database["public"]["Enums"]["payment_session_status_enum"];
4518
+ }[];
4519
+ };
4445
4520
  get_platform_setting: { Args: { p_key: string }; Returns: number };
4446
4521
  get_platform_setting_jsonb: { Args: { p_key: string }; Returns: Json };
4447
4522
  get_popular_content: {
@@ -4586,6 +4661,10 @@ export type Database = {
4586
4661
  Args: { p_featured_limit?: number; p_username: string };
4587
4662
  Returns: Json;
4588
4663
  };
4664
+ get_shop_order_for_payment: {
4665
+ Args: { p_order_id: string };
4666
+ Returns: Json;
4667
+ };
4589
4668
  get_shop_overview: { Args: never; Returns: Json };
4590
4669
  get_shop_policies: { Args: { p_username: string }; Returns: Json };
4591
4670
  get_shop_products: {
@@ -4752,7 +4831,11 @@ export type Database = {
4752
4831
  Returns: string;
4753
4832
  };
4754
4833
  handle_shop_payment_success: {
4755
- Args: { p_order_id: string; p_transaction_reference_id: string };
4834
+ Args: {
4835
+ p_amount: number;
4836
+ p_order_id: string;
4837
+ p_transaction_reference_id: string;
4838
+ };
4756
4839
  Returns: Json;
4757
4840
  };
4758
4841
  handle_successful_payment: {
@@ -5242,6 +5325,12 @@ export type Database = {
5242
5325
  | "expired"
5243
5326
  | "paused"
5244
5327
  | "past_due";
5328
+ payment_session_status_enum:
5329
+ | "pending"
5330
+ | "completed"
5331
+ | "failed"
5332
+ | "cancelled"
5333
+ | "expired";
5245
5334
  payment_status_enum:
5246
5335
  | "pending"
5247
5336
  | "processing"
@@ -5536,6 +5625,13 @@ export const Constants = {
5536
5625
  "paused",
5537
5626
  "past_due",
5538
5627
  ],
5628
+ payment_session_status_enum: [
5629
+ "pending",
5630
+ "completed",
5631
+ "failed",
5632
+ "cancelled",
5633
+ "expired",
5634
+ ],
5539
5635
  payment_status_enum: [
5540
5636
  "pending",
5541
5637
  "processing",