@hobenakicoffee/libraries 2.0.0 → 2.1.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": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "type": "module",
5
5
  "types": "src/index.ts",
6
6
  "exports": {
@@ -1 +1,54 @@
1
+ import type { ServiceType } from "../constants";
2
+
3
+ export type TransactionMetadata = {
4
+ supporter_name?: string;
5
+ supporter_platform?: string;
6
+ is_monthly?: boolean;
7
+ message?: string;
8
+ count?: number;
9
+ };
10
+
11
+ export type ActivityMetadata = {
12
+ type?: string;
13
+ amount?: number;
14
+ net_amount?: number;
15
+ platform_fee?: number;
16
+ price_at_purchase?: number;
17
+ message?: string;
18
+ tier_name?: string;
19
+ item_name?: string;
20
+ buyer_name?: string;
21
+ buyer_platform?: string;
22
+ commission_type?: string;
23
+ requester_name?: string;
24
+ coffee_count?: number;
25
+ is_monthly?: boolean;
26
+ supporter_id?: string;
27
+ supporter_name?: string;
28
+ supporter_platform?: string;
29
+ supporter_anonymous?: boolean;
30
+ identity_hash?: string;
31
+ follower_name?: string;
32
+ follower_username?: string;
33
+ action?: "follow" | "unfollow";
34
+ source?: string;
35
+ post_id?: string;
36
+ post_slug?: string;
37
+ post_title?: string;
38
+ };
39
+
40
+ export type SupportersMetadata = {
41
+ type?: ServiceType;
42
+ amount?: number;
43
+ message?: string;
44
+ coffee_count?: number;
45
+ is_monthly?: boolean;
46
+ supporter_name?: string;
47
+ supporter_platform?: string;
48
+ supporter_anonymous?: boolean;
49
+ follower_name?: string;
50
+ follower_username?: string;
51
+ action?: "follow" | "unfollow";
52
+ };
53
+
1
54
  export * from "./supabase";
@@ -1748,6 +1748,39 @@ export type Database = {
1748
1748
  Args: { p_conversation_id: string };
1749
1749
  Returns: undefined;
1750
1750
  };
1751
+ process_service_payment: {
1752
+ Args: {
1753
+ p_amount: number;
1754
+ p_creator_profile_id: string;
1755
+ p_identity_hash: string;
1756
+ p_metadata?: Json;
1757
+ p_platform_fee: number;
1758
+ p_provider: Database["public"]["Enums"]["provider_enum"];
1759
+ p_provider_transaction_id: string;
1760
+ p_reference_type: Database["public"]["Enums"]["reference_type_enum"];
1761
+ p_service_type: string;
1762
+ p_supporter_name: string;
1763
+ p_supporter_platform?: Database["public"]["Enums"]["supporter_platform_enum"];
1764
+ p_supporter_profile_id: string;
1765
+ };
1766
+ Returns: Json;
1767
+ };
1768
+ purchase_newsletter_post: {
1769
+ Args: {
1770
+ p_amount: number;
1771
+ p_buyer_name: string;
1772
+ p_buyer_platform?: Database["public"]["Enums"]["supporter_platform_enum"];
1773
+ p_buyer_profile_id: string;
1774
+ p_identity_hash: string;
1775
+ p_message?: string;
1776
+ p_platform_fee: number;
1777
+ p_post_id: string;
1778
+ p_provider: Database["public"]["Enums"]["provider_enum"];
1779
+ p_provider_transaction_id: string;
1780
+ p_source?: string;
1781
+ };
1782
+ Returns: Json;
1783
+ };
1751
1784
  record_newsletter_post_click: {
1752
1785
  Args: { p_post_id: string };
1753
1786
  Returns: undefined;