@hobenakicoffee/libraries 1.11.0 → 1.13.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.
Files changed (76) hide show
  1. package/README.md +25 -4
  2. package/package.json +84 -9
  3. package/src/App.tsx +28 -0
  4. package/src/components/turnstile-captcha.tsx +47 -0
  5. package/src/components/ui/alert-dialog.tsx +196 -0
  6. package/src/components/ui/alert.tsx +76 -0
  7. package/src/components/ui/avatar.tsx +110 -0
  8. package/src/components/ui/badge.tsx +49 -0
  9. package/src/components/ui/breadcrumb.tsx +122 -0
  10. package/src/components/ui/button-group.tsx +82 -0
  11. package/src/components/ui/button.tsx +77 -0
  12. package/src/components/ui/calendar.tsx +235 -0
  13. package/src/components/ui/card.tsx +100 -0
  14. package/src/components/ui/chart.tsx +364 -0
  15. package/src/components/ui/checkbox.tsx +30 -0
  16. package/src/components/ui/dialog.tsx +162 -0
  17. package/src/components/ui/drawer.tsx +126 -0
  18. package/src/components/ui/dropdown-menu.tsx +267 -0
  19. package/src/components/ui/empty-minimal.tsx +20 -0
  20. package/src/components/ui/empty.tsx +101 -0
  21. package/src/components/ui/field.tsx +235 -0
  22. package/src/components/ui/input-group.tsx +170 -0
  23. package/src/components/ui/input-otp.tsx +84 -0
  24. package/src/components/ui/input.tsx +37 -0
  25. package/src/components/ui/item.tsx +196 -0
  26. package/src/components/ui/label.tsx +19 -0
  27. package/src/components/ui/popover.tsx +87 -0
  28. package/src/components/ui/radio-group.tsx +47 -0
  29. package/src/components/ui/select.tsx +205 -0
  30. package/src/components/ui/separator.tsx +26 -0
  31. package/src/components/ui/sheet.tsx +141 -0
  32. package/src/components/ui/sidebar.tsx +699 -0
  33. package/src/components/ui/skeleton.tsx +13 -0
  34. package/src/components/ui/sonner.tsx +74 -0
  35. package/src/components/ui/spinner.tsx +18 -0
  36. package/src/components/ui/table.tsx +114 -0
  37. package/src/components/ui/tabs.tsx +88 -0
  38. package/src/components/ui/textarea.tsx +35 -0
  39. package/src/components/ui/toggle-group.tsx +91 -0
  40. package/src/components/ui/toggle.tsx +44 -0
  41. package/src/components/ui/tooltip.tsx +59 -0
  42. package/src/constants/common.test.ts +1 -1
  43. package/src/constants/legal.test.ts +1 -1
  44. package/src/constants/payment.test.ts +9 -9
  45. package/src/constants/platforms.test.ts +1 -1
  46. package/src/constants/services.test.ts +1 -1
  47. package/src/hooks/use-mobile.ts +19 -0
  48. package/src/index.css +135 -0
  49. package/src/lib/utils.ts +6 -0
  50. package/src/main.tsx +16 -0
  51. package/src/moderation/datasets/bn.ts +708 -708
  52. package/src/moderation/normalizer.test.ts +1 -1
  53. package/src/moderation/normalizer.ts +16 -16
  54. package/src/moderation/profanity-service.test.ts +3 -3
  55. package/src/providers/theme-provider.tsx +73 -0
  56. package/src/types/supabase.ts +751 -647
  57. package/src/utils/check-moderation.test.ts +12 -12
  58. package/src/utils/format-number.test.ts +1 -1
  59. package/src/utils/format-plain-text.test.ts +1 -1
  60. package/src/utils/get-social-handle.test.ts +3 -3
  61. package/src/utils/get-social-link.test.ts +9 -9
  62. package/src/utils/get-social-link.ts +5 -3
  63. package/src/utils/get-user-name-initials.test.ts +1 -1
  64. package/src/utils/get-user-name-initials.ts +4 -4
  65. package/src/utils/get-user-page-link.ts +1 -1
  66. package/src/utils/index.ts +5 -5
  67. package/src/utils/open-to-new-window.ts +3 -1
  68. package/src/utils/post-to-facebook.test.ts +1 -1
  69. package/src/utils/post-to-facebook.ts +9 -3
  70. package/src/utils/post-to-instagram.test.ts +1 -1
  71. package/src/utils/post-to-linkedin.test.ts +1 -1
  72. package/src/utils/post-to-linkedin.ts +9 -3
  73. package/src/utils/post-to-x.test.ts +1 -1
  74. package/src/utils/post-to-x.ts +12 -4
  75. package/src/utils/to-human-readable.ts +6 -2
  76. package/src/utils/validate-phone-number.test.ts +1 -1
@@ -4,731 +4,833 @@ export type Json =
4
4
  | boolean
5
5
  | null
6
6
  | { [key: string]: Json | undefined }
7
- | Json[]
7
+ | Json[];
8
8
 
9
9
  export type Database = {
10
10
  public: {
11
11
  Tables: {
12
12
  activities: {
13
13
  Row: {
14
- counterparty_profile_id: string | null
15
- created_at: string
16
- id: string
17
- metadata: Json
18
- reference_id: string
19
- role: string
20
- service_type: string
21
- transaction_id: string | null
22
- updated_at: string
23
- user_profile_id: string
24
- visibility: Database["public"]["Enums"]["visibility_enum"]
25
- }
14
+ counterparty_profile_id: string | null;
15
+ created_at: string;
16
+ id: string;
17
+ metadata: Json;
18
+ reference_id: string;
19
+ role: string;
20
+ service_type: string;
21
+ transaction_id: string | null;
22
+ updated_at: string;
23
+ user_profile_id: string;
24
+ visibility: Database["public"]["Enums"]["visibility_enum"];
25
+ };
26
26
  Insert: {
27
- counterparty_profile_id?: string | null
28
- created_at?: string
29
- id?: string
30
- metadata?: Json
31
- reference_id: string
32
- role: string
33
- service_type?: string
34
- transaction_id?: string | null
35
- updated_at?: string
36
- user_profile_id: string
37
- visibility?: Database["public"]["Enums"]["visibility_enum"]
38
- }
27
+ counterparty_profile_id?: string | null;
28
+ created_at?: string;
29
+ id?: string;
30
+ metadata?: Json;
31
+ reference_id: string;
32
+ role: string;
33
+ service_type?: string;
34
+ transaction_id?: string | null;
35
+ updated_at?: string;
36
+ user_profile_id: string;
37
+ visibility?: Database["public"]["Enums"]["visibility_enum"];
38
+ };
39
39
  Update: {
40
- counterparty_profile_id?: string | null
41
- created_at?: string
42
- id?: string
43
- metadata?: Json
44
- reference_id?: string
45
- role?: string
46
- service_type?: string
47
- transaction_id?: string | null
48
- updated_at?: string
49
- user_profile_id?: string
50
- visibility?: Database["public"]["Enums"]["visibility_enum"]
51
- }
40
+ counterparty_profile_id?: string | null;
41
+ created_at?: string;
42
+ id?: string;
43
+ metadata?: Json;
44
+ reference_id?: string;
45
+ role?: string;
46
+ service_type?: string;
47
+ transaction_id?: string | null;
48
+ updated_at?: string;
49
+ user_profile_id?: string;
50
+ visibility?: Database["public"]["Enums"]["visibility_enum"];
51
+ };
52
52
  Relationships: [
53
53
  {
54
- foreignKeyName: "activities_counterparty_profile_id_fkey"
55
- columns: ["counterparty_profile_id"]
56
- isOneToOne: false
57
- referencedRelation: "profiles"
58
- referencedColumns: ["id"]
54
+ foreignKeyName: "activities_counterparty_profile_id_fkey";
55
+ columns: ["counterparty_profile_id"];
56
+ isOneToOne: false;
57
+ referencedRelation: "profiles";
58
+ referencedColumns: ["id"];
59
59
  },
60
60
  {
61
- foreignKeyName: "activities_transaction_id_fkey"
62
- columns: ["transaction_id"]
63
- isOneToOne: false
64
- referencedRelation: "transactions"
65
- referencedColumns: ["id"]
61
+ foreignKeyName: "activities_transaction_id_fkey";
62
+ columns: ["transaction_id"];
63
+ isOneToOne: false;
64
+ referencedRelation: "transactions";
65
+ referencedColumns: ["id"];
66
66
  },
67
67
  {
68
- foreignKeyName: "activities_user_profile_id_fkey"
69
- columns: ["user_profile_id"]
70
- isOneToOne: false
71
- referencedRelation: "profiles"
72
- referencedColumns: ["id"]
68
+ foreignKeyName: "activities_user_profile_id_fkey";
69
+ columns: ["user_profile_id"];
70
+ isOneToOne: false;
71
+ referencedRelation: "profiles";
72
+ referencedColumns: ["id"];
73
73
  },
74
- ]
75
- }
74
+ ];
75
+ };
76
76
  coffee_gifts: {
77
77
  Row: {
78
- coffee_count: number
79
- created_at: string
80
- creator_profile_id: string
81
- id: string
82
- is_monthly: boolean
83
- message: string | null
84
- supporter_name: string | null
85
- supporter_platform: string | null
86
- supporter_profile_id: string | null
87
- transaction_reference_id: string
88
- updated_at: string
89
- }
78
+ coffee_count: number;
79
+ created_at: string;
80
+ creator_profile_id: string;
81
+ id: string;
82
+ is_monthly: boolean;
83
+ message: string | null;
84
+ supporter_name: string | null;
85
+ supporter_platform: string | null;
86
+ supporter_profile_id: string | null;
87
+ transaction_reference_id: string;
88
+ updated_at: string;
89
+ };
90
90
  Insert: {
91
- coffee_count: number
92
- created_at?: string
93
- creator_profile_id: string
94
- id?: string
95
- is_monthly?: boolean
96
- message?: string | null
97
- supporter_name?: string | null
98
- supporter_platform?: string | null
99
- supporter_profile_id?: string | null
100
- transaction_reference_id: string
101
- updated_at?: string
102
- }
91
+ coffee_count: number;
92
+ created_at?: string;
93
+ creator_profile_id: string;
94
+ id?: string;
95
+ is_monthly?: boolean;
96
+ message?: string | null;
97
+ supporter_name?: string | null;
98
+ supporter_platform?: string | null;
99
+ supporter_profile_id?: string | null;
100
+ transaction_reference_id: string;
101
+ updated_at?: string;
102
+ };
103
103
  Update: {
104
- coffee_count?: number
105
- created_at?: string
106
- creator_profile_id?: string
107
- id?: string
108
- is_monthly?: boolean
109
- message?: string | null
110
- supporter_name?: string | null
111
- supporter_platform?: string | null
112
- supporter_profile_id?: string | null
113
- transaction_reference_id?: string
114
- updated_at?: string
115
- }
104
+ coffee_count?: number;
105
+ created_at?: string;
106
+ creator_profile_id?: string;
107
+ id?: string;
108
+ is_monthly?: boolean;
109
+ message?: string | null;
110
+ supporter_name?: string | null;
111
+ supporter_platform?: string | null;
112
+ supporter_profile_id?: string | null;
113
+ transaction_reference_id?: string;
114
+ updated_at?: string;
115
+ };
116
116
  Relationships: [
117
117
  {
118
- foreignKeyName: "coffee_gifts_creator_profile_id_fkey"
119
- columns: ["creator_profile_id"]
120
- isOneToOne: false
121
- referencedRelation: "profiles"
122
- referencedColumns: ["id"]
118
+ foreignKeyName: "coffee_gifts_creator_profile_id_fkey";
119
+ columns: ["creator_profile_id"];
120
+ isOneToOne: false;
121
+ referencedRelation: "profiles";
122
+ referencedColumns: ["id"];
123
123
  },
124
124
  {
125
- foreignKeyName: "coffee_gifts_supporter_profile_id_fkey"
126
- columns: ["supporter_profile_id"]
127
- isOneToOne: false
128
- referencedRelation: "profiles"
129
- referencedColumns: ["id"]
125
+ foreignKeyName: "coffee_gifts_supporter_profile_id_fkey";
126
+ columns: ["supporter_profile_id"];
127
+ isOneToOne: false;
128
+ referencedRelation: "profiles";
129
+ referencedColumns: ["id"];
130
130
  },
131
131
  {
132
- foreignKeyName: "coffee_gifts_transaction_reference_id_fkey"
133
- columns: ["transaction_reference_id"]
134
- isOneToOne: false
135
- referencedRelation: "transactions"
136
- referencedColumns: ["reference_id"]
132
+ foreignKeyName: "coffee_gifts_transaction_reference_id_fkey";
133
+ columns: ["transaction_reference_id"];
134
+ isOneToOne: false;
135
+ referencedRelation: "transactions";
136
+ referencedColumns: ["reference_id"];
137
137
  },
138
- ]
139
- }
138
+ ];
139
+ };
140
+ conversation_participants: {
141
+ Row: {
142
+ conversation_id: string;
143
+ joined_at: string;
144
+ last_read_at: string | null;
145
+ profile_id: string;
146
+ };
147
+ Insert: {
148
+ conversation_id: string;
149
+ joined_at?: string;
150
+ last_read_at?: string | null;
151
+ profile_id: string;
152
+ };
153
+ Update: {
154
+ conversation_id?: string;
155
+ joined_at?: string;
156
+ last_read_at?: string | null;
157
+ profile_id?: string;
158
+ };
159
+ Relationships: [
160
+ {
161
+ foreignKeyName: "conversation_participants_conversation_id_fkey";
162
+ columns: ["conversation_id"];
163
+ isOneToOne: false;
164
+ referencedRelation: "conversations";
165
+ referencedColumns: ["id"];
166
+ },
167
+ {
168
+ foreignKeyName: "conversation_participants_profile_id_fkey";
169
+ columns: ["profile_id"];
170
+ isOneToOne: false;
171
+ referencedRelation: "profiles";
172
+ referencedColumns: ["id"];
173
+ },
174
+ ];
175
+ };
176
+ conversations: {
177
+ Row: {
178
+ created_at: string;
179
+ id: string;
180
+ last_message_at: string | null;
181
+ last_message_preview: string | null;
182
+ name: string | null;
183
+ type: string;
184
+ };
185
+ Insert: {
186
+ created_at?: string;
187
+ id?: string;
188
+ last_message_at?: string | null;
189
+ last_message_preview?: string | null;
190
+ name?: string | null;
191
+ type?: string;
192
+ };
193
+ Update: {
194
+ created_at?: string;
195
+ id?: string;
196
+ last_message_at?: string | null;
197
+ last_message_preview?: string | null;
198
+ name?: string | null;
199
+ type?: string;
200
+ };
201
+ Relationships: [];
202
+ };
140
203
  follows: {
141
204
  Row: {
142
- created_at: string | null
143
- follower_id: string
144
- following_id: string
145
- id: number
146
- }
205
+ created_at: string | null;
206
+ follower_id: string;
207
+ following_id: string;
208
+ id: number;
209
+ };
147
210
  Insert: {
148
- created_at?: string | null
149
- follower_id: string
150
- following_id: string
151
- id?: never
152
- }
211
+ created_at?: string | null;
212
+ follower_id: string;
213
+ following_id: string;
214
+ id?: never;
215
+ };
153
216
  Update: {
154
- created_at?: string | null
155
- follower_id?: string
156
- following_id?: string
157
- id?: never
158
- }
217
+ created_at?: string | null;
218
+ follower_id?: string;
219
+ following_id?: string;
220
+ id?: never;
221
+ };
159
222
  Relationships: [
160
223
  {
161
- foreignKeyName: "follows_follower_id_fkey"
162
- columns: ["follower_id"]
163
- isOneToOne: false
164
- referencedRelation: "profiles"
165
- referencedColumns: ["id"]
224
+ foreignKeyName: "follows_follower_id_fkey";
225
+ columns: ["follower_id"];
226
+ isOneToOne: false;
227
+ referencedRelation: "profiles";
228
+ referencedColumns: ["id"];
166
229
  },
167
230
  {
168
- foreignKeyName: "follows_following_id_fkey"
169
- columns: ["following_id"]
170
- isOneToOne: false
171
- referencedRelation: "profiles"
172
- referencedColumns: ["id"]
231
+ foreignKeyName: "follows_following_id_fkey";
232
+ columns: ["following_id"];
233
+ isOneToOne: false;
234
+ referencedRelation: "profiles";
235
+ referencedColumns: ["id"];
173
236
  },
174
- ]
175
- }
237
+ ];
238
+ };
176
239
  manager_role_permissions: {
177
240
  Row: {
178
- id: number
179
- permission: Database["public"]["Enums"]["manager_permission"]
180
- role: Database["public"]["Enums"]["manager_role"]
181
- }
241
+ id: number;
242
+ permission: Database["public"]["Enums"]["manager_permission"];
243
+ role: Database["public"]["Enums"]["manager_role"];
244
+ };
182
245
  Insert: {
183
- id?: number
184
- permission: Database["public"]["Enums"]["manager_permission"]
185
- role: Database["public"]["Enums"]["manager_role"]
186
- }
246
+ id?: number;
247
+ permission: Database["public"]["Enums"]["manager_permission"];
248
+ role: Database["public"]["Enums"]["manager_role"];
249
+ };
187
250
  Update: {
188
- id?: number
189
- permission?: Database["public"]["Enums"]["manager_permission"]
190
- role?: Database["public"]["Enums"]["manager_role"]
191
- }
192
- Relationships: []
193
- }
251
+ id?: number;
252
+ permission?: Database["public"]["Enums"]["manager_permission"];
253
+ role?: Database["public"]["Enums"]["manager_role"];
254
+ };
255
+ Relationships: [];
256
+ };
194
257
  manager_user_roles: {
195
258
  Row: {
196
- assigned_at: string
197
- assigned_by: string | null
198
- id: number
199
- role: Database["public"]["Enums"]["manager_role"]
200
- user_id: string
201
- }
259
+ assigned_at: string;
260
+ assigned_by: string | null;
261
+ id: number;
262
+ role: Database["public"]["Enums"]["manager_role"];
263
+ user_id: string;
264
+ };
202
265
  Insert: {
203
- assigned_at?: string
204
- assigned_by?: string | null
205
- id?: number
206
- role: Database["public"]["Enums"]["manager_role"]
207
- user_id: string
208
- }
266
+ assigned_at?: string;
267
+ assigned_by?: string | null;
268
+ id?: number;
269
+ role: Database["public"]["Enums"]["manager_role"];
270
+ user_id: string;
271
+ };
209
272
  Update: {
210
- assigned_at?: string
211
- assigned_by?: string | null
212
- id?: number
213
- role?: Database["public"]["Enums"]["manager_role"]
214
- user_id?: string
215
- }
273
+ assigned_at?: string;
274
+ assigned_by?: string | null;
275
+ id?: number;
276
+ role?: Database["public"]["Enums"]["manager_role"];
277
+ user_id?: string;
278
+ };
216
279
  Relationships: [
217
280
  {
218
- foreignKeyName: "manager_user_roles_user_id_fkey"
219
- columns: ["user_id"]
220
- isOneToOne: false
221
- referencedRelation: "managers"
222
- referencedColumns: ["id"]
281
+ foreignKeyName: "manager_user_roles_user_id_fkey";
282
+ columns: ["user_id"];
283
+ isOneToOne: false;
284
+ referencedRelation: "managers";
285
+ referencedColumns: ["id"];
223
286
  },
224
- ]
225
- }
287
+ ];
288
+ };
226
289
  managers: {
227
290
  Row: {
228
- avatar_url: string | null
229
- bio: string | null
230
- created_at: string
231
- created_by: string | null
232
- department: string | null
233
- email: string
234
- full_name: string | null
235
- id: string
236
- last_login_at: string | null
237
- phone: string | null
238
- status: Database["public"]["Enums"]["manager_status"] | null
239
- updated_at: string
240
- }
291
+ avatar_url: string | null;
292
+ bio: string | null;
293
+ created_at: string;
294
+ created_by: string | null;
295
+ department: string | null;
296
+ email: string;
297
+ full_name: string | null;
298
+ id: string;
299
+ last_login_at: string | null;
300
+ phone: string | null;
301
+ status: Database["public"]["Enums"]["manager_status"] | null;
302
+ updated_at: string;
303
+ };
241
304
  Insert: {
242
- avatar_url?: string | null
243
- bio?: string | null
244
- created_at?: string
245
- created_by?: string | null
246
- department?: string | null
247
- email: string
248
- full_name?: string | null
249
- id: string
250
- last_login_at?: string | null
251
- phone?: string | null
252
- status?: Database["public"]["Enums"]["manager_status"] | null
253
- updated_at?: string
254
- }
305
+ avatar_url?: string | null;
306
+ bio?: string | null;
307
+ created_at?: string;
308
+ created_by?: string | null;
309
+ department?: string | null;
310
+ email: string;
311
+ full_name?: string | null;
312
+ id: string;
313
+ last_login_at?: string | null;
314
+ phone?: string | null;
315
+ status?: Database["public"]["Enums"]["manager_status"] | null;
316
+ updated_at?: string;
317
+ };
255
318
  Update: {
256
- avatar_url?: string | null
257
- bio?: string | null
258
- created_at?: string
259
- created_by?: string | null
260
- department?: string | null
261
- email?: string
262
- full_name?: string | null
263
- id?: string
264
- last_login_at?: string | null
265
- phone?: string | null
266
- status?: Database["public"]["Enums"]["manager_status"] | null
267
- updated_at?: string
268
- }
269
- Relationships: []
270
- }
319
+ avatar_url?: string | null;
320
+ bio?: string | null;
321
+ created_at?: string;
322
+ created_by?: string | null;
323
+ department?: string | null;
324
+ email?: string;
325
+ full_name?: string | null;
326
+ id?: string;
327
+ last_login_at?: string | null;
328
+ phone?: string | null;
329
+ status?: Database["public"]["Enums"]["manager_status"] | null;
330
+ updated_at?: string;
331
+ };
332
+ Relationships: [];
333
+ };
334
+ messages: {
335
+ Row: {
336
+ content: string;
337
+ conversation_id: string;
338
+ created_at: string;
339
+ id: number;
340
+ sender_id: string;
341
+ };
342
+ Insert: {
343
+ content: string;
344
+ conversation_id: string;
345
+ created_at?: string;
346
+ id?: number;
347
+ sender_id: string;
348
+ };
349
+ Update: {
350
+ content?: string;
351
+ conversation_id?: string;
352
+ created_at?: string;
353
+ id?: number;
354
+ sender_id?: string;
355
+ };
356
+ Relationships: [
357
+ {
358
+ foreignKeyName: "messages_conversation_id_fkey";
359
+ columns: ["conversation_id"];
360
+ isOneToOne: false;
361
+ referencedRelation: "conversations";
362
+ referencedColumns: ["id"];
363
+ },
364
+ {
365
+ foreignKeyName: "messages_sender_id_fkey";
366
+ columns: ["sender_id"];
367
+ isOneToOne: false;
368
+ referencedRelation: "profiles";
369
+ referencedColumns: ["id"];
370
+ },
371
+ ];
372
+ };
271
373
  payout_methods: {
272
374
  Row: {
273
- created_at: string
274
- details: Json
275
- id: string
276
- is_active: boolean
277
- is_default: boolean
278
- profile_id: string
279
- provider: Database["public"]["Enums"]["payout_provider"]
280
- updated_at: string
281
- }
375
+ created_at: string;
376
+ details: Json;
377
+ id: string;
378
+ is_active: boolean;
379
+ is_default: boolean;
380
+ profile_id: string;
381
+ provider: Database["public"]["Enums"]["payout_provider"];
382
+ updated_at: string;
383
+ };
282
384
  Insert: {
283
- created_at?: string
284
- details?: Json
285
- id?: string
286
- is_active?: boolean
287
- is_default?: boolean
288
- profile_id: string
289
- provider: Database["public"]["Enums"]["payout_provider"]
290
- updated_at?: string
291
- }
385
+ created_at?: string;
386
+ details?: Json;
387
+ id?: string;
388
+ is_active?: boolean;
389
+ is_default?: boolean;
390
+ profile_id: string;
391
+ provider: Database["public"]["Enums"]["payout_provider"];
392
+ updated_at?: string;
393
+ };
292
394
  Update: {
293
- created_at?: string
294
- details?: Json
295
- id?: string
296
- is_active?: boolean
297
- is_default?: boolean
298
- profile_id?: string
299
- provider?: Database["public"]["Enums"]["payout_provider"]
300
- updated_at?: string
301
- }
395
+ created_at?: string;
396
+ details?: Json;
397
+ id?: string;
398
+ is_active?: boolean;
399
+ is_default?: boolean;
400
+ profile_id?: string;
401
+ provider?: Database["public"]["Enums"]["payout_provider"];
402
+ updated_at?: string;
403
+ };
302
404
  Relationships: [
303
405
  {
304
- foreignKeyName: "payout_methods_profile_id_fkey"
305
- columns: ["profile_id"]
306
- isOneToOne: false
307
- referencedRelation: "profiles"
308
- referencedColumns: ["id"]
406
+ foreignKeyName: "payout_methods_profile_id_fkey";
407
+ columns: ["profile_id"];
408
+ isOneToOne: false;
409
+ referencedRelation: "profiles";
410
+ referencedColumns: ["id"];
309
411
  },
310
- ]
311
- }
412
+ ];
413
+ };
312
414
  profiles: {
313
415
  Row: {
314
- allow_gifting: boolean | null
315
- allow_subscriptions: boolean | null
316
- avatar_url: string | null
317
- banner_url: string | null
318
- bio: string | null
319
- created_at: string | null
320
- display_name: string | null
321
- follower_count: number | null
322
- following_count: number | null
323
- full_name: string | null
324
- has_wallet_balance: boolean | null
325
- id: string
326
- is_page_active: boolean | null
327
- layout: Json | null
328
- page_slug: string
329
- role: Database["public"]["Enums"]["user_role"]
330
- social_links: Json | null
331
- thank_you_items: Json | null
332
- theme: Json | null
333
- updated_at: string | null
334
- username: string
335
- }
416
+ allow_gifting: boolean | null;
417
+ allow_subscriptions: boolean | null;
418
+ avatar_url: string | null;
419
+ banner_url: string | null;
420
+ bio: string | null;
421
+ created_at: string | null;
422
+ display_name: string | null;
423
+ follower_count: number | null;
424
+ following_count: number | null;
425
+ full_name: string | null;
426
+ has_wallet_balance: boolean | null;
427
+ id: string;
428
+ is_page_active: boolean | null;
429
+ layout: Json | null;
430
+ page_slug: string;
431
+ role: Database["public"]["Enums"]["user_role"];
432
+ social_links: Json | null;
433
+ thank_you_items: Json | null;
434
+ theme: Json | null;
435
+ updated_at: string | null;
436
+ username: string;
437
+ };
336
438
  Insert: {
337
- allow_gifting?: boolean | null
338
- allow_subscriptions?: boolean | null
339
- avatar_url?: string | null
340
- banner_url?: string | null
341
- bio?: string | null
342
- created_at?: string | null
343
- display_name?: string | null
344
- follower_count?: number | null
345
- following_count?: number | null
346
- full_name?: string | null
347
- has_wallet_balance?: boolean | null
348
- id: string
349
- is_page_active?: boolean | null
350
- layout?: Json | null
351
- page_slug: string
352
- role?: Database["public"]["Enums"]["user_role"]
353
- social_links?: Json | null
354
- thank_you_items?: Json | null
355
- theme?: Json | null
356
- updated_at?: string | null
357
- username: string
358
- }
439
+ allow_gifting?: boolean | null;
440
+ allow_subscriptions?: boolean | null;
441
+ avatar_url?: string | null;
442
+ banner_url?: string | null;
443
+ bio?: string | null;
444
+ created_at?: string | null;
445
+ display_name?: string | null;
446
+ follower_count?: number | null;
447
+ following_count?: number | null;
448
+ full_name?: string | null;
449
+ has_wallet_balance?: boolean | null;
450
+ id: string;
451
+ is_page_active?: boolean | null;
452
+ layout?: Json | null;
453
+ page_slug: string;
454
+ role?: Database["public"]["Enums"]["user_role"];
455
+ social_links?: Json | null;
456
+ thank_you_items?: Json | null;
457
+ theme?: Json | null;
458
+ updated_at?: string | null;
459
+ username: string;
460
+ };
359
461
  Update: {
360
- allow_gifting?: boolean | null
361
- allow_subscriptions?: boolean | null
362
- avatar_url?: string | null
363
- banner_url?: string | null
364
- bio?: string | null
365
- created_at?: string | null
366
- display_name?: string | null
367
- follower_count?: number | null
368
- following_count?: number | null
369
- full_name?: string | null
370
- has_wallet_balance?: boolean | null
371
- id?: string
372
- is_page_active?: boolean | null
373
- layout?: Json | null
374
- page_slug?: string
375
- role?: Database["public"]["Enums"]["user_role"]
376
- social_links?: Json | null
377
- thank_you_items?: Json | null
378
- theme?: Json | null
379
- updated_at?: string | null
380
- username?: string
381
- }
382
- Relationships: []
383
- }
462
+ allow_gifting?: boolean | null;
463
+ allow_subscriptions?: boolean | null;
464
+ avatar_url?: string | null;
465
+ banner_url?: string | null;
466
+ bio?: string | null;
467
+ created_at?: string | null;
468
+ display_name?: string | null;
469
+ follower_count?: number | null;
470
+ following_count?: number | null;
471
+ full_name?: string | null;
472
+ has_wallet_balance?: boolean | null;
473
+ id?: string;
474
+ is_page_active?: boolean | null;
475
+ layout?: Json | null;
476
+ page_slug?: string;
477
+ role?: Database["public"]["Enums"]["user_role"];
478
+ social_links?: Json | null;
479
+ thank_you_items?: Json | null;
480
+ theme?: Json | null;
481
+ updated_at?: string | null;
482
+ username?: string;
483
+ };
484
+ Relationships: [];
485
+ };
384
486
  supporters: {
385
487
  Row: {
386
- created_at: string
387
- creator_id: string
388
- first_supported_at: string | null
389
- id: string
390
- identity_hash: string
391
- last_supported_at: string | null
392
- last_supported_service: string | null
393
- name: string
488
+ created_at: string;
489
+ creator_id: string;
490
+ first_supported_at: string | null;
491
+ id: string;
492
+ identity_hash: string;
493
+ last_supported_at: string | null;
494
+ last_supported_service: string | null;
495
+ name: string;
394
496
  social_platform:
395
497
  | Database["public"]["Enums"]["supporter_platform_enum"]
396
- | null
397
- support_count: number
398
- total_amount: number
399
- updated_at: string
400
- user_profile_id: string | null
401
- }
498
+ | null;
499
+ support_count: number;
500
+ total_amount: number;
501
+ updated_at: string;
502
+ user_profile_id: string | null;
503
+ };
402
504
  Insert: {
403
- created_at?: string
404
- creator_id: string
405
- first_supported_at?: string | null
406
- id?: string
407
- identity_hash: string
408
- last_supported_at?: string | null
409
- last_supported_service?: string | null
410
- name: string
505
+ created_at?: string;
506
+ creator_id: string;
507
+ first_supported_at?: string | null;
508
+ id?: string;
509
+ identity_hash: string;
510
+ last_supported_at?: string | null;
511
+ last_supported_service?: string | null;
512
+ name: string;
411
513
  social_platform?:
412
514
  | Database["public"]["Enums"]["supporter_platform_enum"]
413
- | null
414
- support_count?: number
415
- total_amount?: number
416
- updated_at?: string
417
- user_profile_id?: string | null
418
- }
515
+ | null;
516
+ support_count?: number;
517
+ total_amount?: number;
518
+ updated_at?: string;
519
+ user_profile_id?: string | null;
520
+ };
419
521
  Update: {
420
- created_at?: string
421
- creator_id?: string
422
- first_supported_at?: string | null
423
- id?: string
424
- identity_hash?: string
425
- last_supported_at?: string | null
426
- last_supported_service?: string | null
427
- name?: string
522
+ created_at?: string;
523
+ creator_id?: string;
524
+ first_supported_at?: string | null;
525
+ id?: string;
526
+ identity_hash?: string;
527
+ last_supported_at?: string | null;
528
+ last_supported_service?: string | null;
529
+ name?: string;
428
530
  social_platform?:
429
531
  | Database["public"]["Enums"]["supporter_platform_enum"]
430
- | null
431
- support_count?: number
432
- total_amount?: number
433
- updated_at?: string
434
- user_profile_id?: string | null
435
- }
532
+ | null;
533
+ support_count?: number;
534
+ total_amount?: number;
535
+ updated_at?: string;
536
+ user_profile_id?: string | null;
537
+ };
436
538
  Relationships: [
437
539
  {
438
- foreignKeyName: "supporters_creator_id_fkey"
439
- columns: ["creator_id"]
440
- isOneToOne: false
441
- referencedRelation: "profiles"
442
- referencedColumns: ["id"]
540
+ foreignKeyName: "supporters_creator_id_fkey";
541
+ columns: ["creator_id"];
542
+ isOneToOne: false;
543
+ referencedRelation: "profiles";
544
+ referencedColumns: ["id"];
443
545
  },
444
546
  {
445
- foreignKeyName: "supporters_user_profile_id_fkey"
446
- columns: ["user_profile_id"]
447
- isOneToOne: false
448
- referencedRelation: "profiles"
449
- referencedColumns: ["id"]
547
+ foreignKeyName: "supporters_user_profile_id_fkey";
548
+ columns: ["user_profile_id"];
549
+ isOneToOne: false;
550
+ referencedRelation: "profiles";
551
+ referencedColumns: ["id"];
450
552
  },
451
- ]
452
- }
553
+ ];
554
+ };
453
555
  transactions: {
454
556
  Row: {
455
- amount: number
456
- balance_after: number
457
- counterparty_profile_id: string | null
458
- created_at: string
459
- creator_profile_id: string | null
460
- direction: Database["public"]["Enums"]["transaction_direction_enum"]
461
- id: string
462
- metadata: Json
463
- net_amount: number
464
- platform_fee: number
465
- provider: Database["public"]["Enums"]["provider_enum"] | null
466
- provider_transaction_id: string | null
467
- reference_id: string | null
468
- reference_type: Database["public"]["Enums"]["reference_type_enum"]
469
- service_type: string
470
- status: Database["public"]["Enums"]["payment_status_enum"]
471
- supporter_id: string | null
472
- updated_at: string
473
- user_profile_id: string
474
- wallet_id: string | null
475
- }
557
+ amount: number;
558
+ balance_after: number;
559
+ counterparty_profile_id: string | null;
560
+ created_at: string;
561
+ creator_profile_id: string | null;
562
+ direction: Database["public"]["Enums"]["transaction_direction_enum"];
563
+ id: string;
564
+ metadata: Json;
565
+ net_amount: number;
566
+ platform_fee: number;
567
+ provider: Database["public"]["Enums"]["provider_enum"] | null;
568
+ provider_transaction_id: string | null;
569
+ reference_id: string | null;
570
+ reference_type: Database["public"]["Enums"]["reference_type_enum"];
571
+ service_type: string;
572
+ status: Database["public"]["Enums"]["payment_status_enum"];
573
+ supporter_id: string | null;
574
+ updated_at: string;
575
+ user_profile_id: string;
576
+ wallet_id: string | null;
577
+ };
476
578
  Insert: {
477
- amount: number
478
- balance_after: number
479
- counterparty_profile_id?: string | null
480
- created_at?: string
481
- creator_profile_id?: string | null
482
- direction: Database["public"]["Enums"]["transaction_direction_enum"]
483
- id?: string
484
- metadata?: Json
485
- net_amount: number
486
- platform_fee?: number
487
- provider?: Database["public"]["Enums"]["provider_enum"] | null
488
- provider_transaction_id?: string | null
489
- reference_id?: string | null
490
- reference_type: Database["public"]["Enums"]["reference_type_enum"]
491
- service_type?: string
492
- status: Database["public"]["Enums"]["payment_status_enum"]
493
- supporter_id?: string | null
494
- updated_at?: string
495
- user_profile_id: string
496
- wallet_id?: string | null
497
- }
579
+ amount: number;
580
+ balance_after: number;
581
+ counterparty_profile_id?: string | null;
582
+ created_at?: string;
583
+ creator_profile_id?: string | null;
584
+ direction: Database["public"]["Enums"]["transaction_direction_enum"];
585
+ id?: string;
586
+ metadata?: Json;
587
+ net_amount: number;
588
+ platform_fee?: number;
589
+ provider?: Database["public"]["Enums"]["provider_enum"] | null;
590
+ provider_transaction_id?: string | null;
591
+ reference_id?: string | null;
592
+ reference_type: Database["public"]["Enums"]["reference_type_enum"];
593
+ service_type?: string;
594
+ status: Database["public"]["Enums"]["payment_status_enum"];
595
+ supporter_id?: string | null;
596
+ updated_at?: string;
597
+ user_profile_id: string;
598
+ wallet_id?: string | null;
599
+ };
498
600
  Update: {
499
- amount?: number
500
- balance_after?: number
501
- counterparty_profile_id?: string | null
502
- created_at?: string
503
- creator_profile_id?: string | null
504
- direction?: Database["public"]["Enums"]["transaction_direction_enum"]
505
- id?: string
506
- metadata?: Json
507
- net_amount?: number
508
- platform_fee?: number
509
- provider?: Database["public"]["Enums"]["provider_enum"] | null
510
- provider_transaction_id?: string | null
511
- reference_id?: string | null
512
- reference_type?: Database["public"]["Enums"]["reference_type_enum"]
513
- service_type?: string
514
- status?: Database["public"]["Enums"]["payment_status_enum"]
515
- supporter_id?: string | null
516
- updated_at?: string
517
- user_profile_id?: string
518
- wallet_id?: string | null
519
- }
601
+ amount?: number;
602
+ balance_after?: number;
603
+ counterparty_profile_id?: string | null;
604
+ created_at?: string;
605
+ creator_profile_id?: string | null;
606
+ direction?: Database["public"]["Enums"]["transaction_direction_enum"];
607
+ id?: string;
608
+ metadata?: Json;
609
+ net_amount?: number;
610
+ platform_fee?: number;
611
+ provider?: Database["public"]["Enums"]["provider_enum"] | null;
612
+ provider_transaction_id?: string | null;
613
+ reference_id?: string | null;
614
+ reference_type?: Database["public"]["Enums"]["reference_type_enum"];
615
+ service_type?: string;
616
+ status?: Database["public"]["Enums"]["payment_status_enum"];
617
+ supporter_id?: string | null;
618
+ updated_at?: string;
619
+ user_profile_id?: string;
620
+ wallet_id?: string | null;
621
+ };
520
622
  Relationships: [
521
623
  {
522
- foreignKeyName: "transactions_counterparty_profile_id_fkey"
523
- columns: ["counterparty_profile_id"]
524
- isOneToOne: false
525
- referencedRelation: "profiles"
526
- referencedColumns: ["id"]
624
+ foreignKeyName: "transactions_counterparty_profile_id_fkey";
625
+ columns: ["counterparty_profile_id"];
626
+ isOneToOne: false;
627
+ referencedRelation: "profiles";
628
+ referencedColumns: ["id"];
527
629
  },
528
630
  {
529
- foreignKeyName: "transactions_creator_profile_id_fkey"
530
- columns: ["creator_profile_id"]
531
- isOneToOne: false
532
- referencedRelation: "profiles"
533
- referencedColumns: ["id"]
631
+ foreignKeyName: "transactions_creator_profile_id_fkey";
632
+ columns: ["creator_profile_id"];
633
+ isOneToOne: false;
634
+ referencedRelation: "profiles";
635
+ referencedColumns: ["id"];
534
636
  },
535
637
  {
536
- foreignKeyName: "transactions_supporter_id_fkey"
537
- columns: ["supporter_id"]
538
- isOneToOne: false
539
- referencedRelation: "supporters"
540
- referencedColumns: ["id"]
638
+ foreignKeyName: "transactions_supporter_id_fkey";
639
+ columns: ["supporter_id"];
640
+ isOneToOne: false;
641
+ referencedRelation: "supporters";
642
+ referencedColumns: ["id"];
541
643
  },
542
644
  {
543
- foreignKeyName: "transactions_user_profile_id_fkey"
544
- columns: ["user_profile_id"]
545
- isOneToOne: false
546
- referencedRelation: "profiles"
547
- referencedColumns: ["id"]
645
+ foreignKeyName: "transactions_user_profile_id_fkey";
646
+ columns: ["user_profile_id"];
647
+ isOneToOne: false;
648
+ referencedRelation: "profiles";
649
+ referencedColumns: ["id"];
548
650
  },
549
651
  {
550
- foreignKeyName: "transactions_wallet_id_fkey"
551
- columns: ["wallet_id"]
552
- isOneToOne: false
553
- referencedRelation: "wallets"
554
- referencedColumns: ["id"]
652
+ foreignKeyName: "transactions_wallet_id_fkey";
653
+ columns: ["wallet_id"];
654
+ isOneToOne: false;
655
+ referencedRelation: "wallets";
656
+ referencedColumns: ["id"];
555
657
  },
556
- ]
557
- }
658
+ ];
659
+ };
558
660
  wallets: {
559
661
  Row: {
560
- balance: number
561
- created_at: string
562
- currency: string
563
- id: string
564
- locked_balance: number
565
- profile_id: string
566
- updated_at: string
567
- }
662
+ balance: number;
663
+ created_at: string;
664
+ currency: string;
665
+ id: string;
666
+ locked_balance: number;
667
+ profile_id: string;
668
+ updated_at: string;
669
+ };
568
670
  Insert: {
569
- balance?: number
570
- created_at?: string
571
- currency?: string
572
- id?: string
573
- locked_balance?: number
574
- profile_id: string
575
- updated_at?: string
576
- }
671
+ balance?: number;
672
+ created_at?: string;
673
+ currency?: string;
674
+ id?: string;
675
+ locked_balance?: number;
676
+ profile_id: string;
677
+ updated_at?: string;
678
+ };
577
679
  Update: {
578
- balance?: number
579
- created_at?: string
580
- currency?: string
581
- id?: string
582
- locked_balance?: number
583
- profile_id?: string
584
- updated_at?: string
585
- }
680
+ balance?: number;
681
+ created_at?: string;
682
+ currency?: string;
683
+ id?: string;
684
+ locked_balance?: number;
685
+ profile_id?: string;
686
+ updated_at?: string;
687
+ };
586
688
  Relationships: [
587
689
  {
588
- foreignKeyName: "wallets_profile_id_fkey"
589
- columns: ["profile_id"]
590
- isOneToOne: true
591
- referencedRelation: "profiles"
592
- referencedColumns: ["id"]
690
+ foreignKeyName: "wallets_profile_id_fkey";
691
+ columns: ["profile_id"];
692
+ isOneToOne: true;
693
+ referencedRelation: "profiles";
694
+ referencedColumns: ["id"];
593
695
  },
594
- ]
595
- }
696
+ ];
697
+ };
596
698
  withdrawal_requests: {
597
699
  Row: {
598
- admin_note: string | null
599
- amount: number
600
- completed_at: string | null
601
- failure_reason: string | null
602
- fee: number
603
- id: string
604
- net_amount: number
605
- payout_method_id: string
606
- payout_snapshot: Json | null
607
- processed_at: string | null
608
- profile_id: string
609
- requested_at: string
610
- status: Database["public"]["Enums"]["withdrawal_status"]
611
- wallet_id: string
612
- }
700
+ admin_note: string | null;
701
+ amount: number;
702
+ completed_at: string | null;
703
+ failure_reason: string | null;
704
+ fee: number;
705
+ id: string;
706
+ net_amount: number;
707
+ payout_method_id: string;
708
+ payout_snapshot: Json | null;
709
+ processed_at: string | null;
710
+ profile_id: string;
711
+ requested_at: string;
712
+ status: Database["public"]["Enums"]["withdrawal_status"];
713
+ wallet_id: string;
714
+ };
613
715
  Insert: {
614
- admin_note?: string | null
615
- amount: number
616
- completed_at?: string | null
617
- failure_reason?: string | null
618
- fee?: number
619
- id?: string
620
- net_amount: number
621
- payout_method_id: string
622
- payout_snapshot?: Json | null
623
- processed_at?: string | null
624
- profile_id: string
625
- requested_at?: string
626
- status?: Database["public"]["Enums"]["withdrawal_status"]
627
- wallet_id: string
628
- }
716
+ admin_note?: string | null;
717
+ amount: number;
718
+ completed_at?: string | null;
719
+ failure_reason?: string | null;
720
+ fee?: number;
721
+ id?: string;
722
+ net_amount: number;
723
+ payout_method_id: string;
724
+ payout_snapshot?: Json | null;
725
+ processed_at?: string | null;
726
+ profile_id: string;
727
+ requested_at?: string;
728
+ status?: Database["public"]["Enums"]["withdrawal_status"];
729
+ wallet_id: string;
730
+ };
629
731
  Update: {
630
- admin_note?: string | null
631
- amount?: number
632
- completed_at?: string | null
633
- failure_reason?: string | null
634
- fee?: number
635
- id?: string
636
- net_amount?: number
637
- payout_method_id?: string
638
- payout_snapshot?: Json | null
639
- processed_at?: string | null
640
- profile_id?: string
641
- requested_at?: string
642
- status?: Database["public"]["Enums"]["withdrawal_status"]
643
- wallet_id?: string
644
- }
732
+ admin_note?: string | null;
733
+ amount?: number;
734
+ completed_at?: string | null;
735
+ failure_reason?: string | null;
736
+ fee?: number;
737
+ id?: string;
738
+ net_amount?: number;
739
+ payout_method_id?: string;
740
+ payout_snapshot?: Json | null;
741
+ processed_at?: string | null;
742
+ profile_id?: string;
743
+ requested_at?: string;
744
+ status?: Database["public"]["Enums"]["withdrawal_status"];
745
+ wallet_id?: string;
746
+ };
645
747
  Relationships: [
646
748
  {
647
- foreignKeyName: "withdrawal_requests_payout_method_id_fkey"
648
- columns: ["payout_method_id"]
649
- isOneToOne: false
650
- referencedRelation: "payout_methods"
651
- referencedColumns: ["id"]
749
+ foreignKeyName: "withdrawal_requests_payout_method_id_fkey";
750
+ columns: ["payout_method_id"];
751
+ isOneToOne: false;
752
+ referencedRelation: "payout_methods";
753
+ referencedColumns: ["id"];
652
754
  },
653
755
  {
654
- foreignKeyName: "withdrawal_requests_profile_id_fkey"
655
- columns: ["profile_id"]
656
- isOneToOne: false
657
- referencedRelation: "profiles"
658
- referencedColumns: ["id"]
756
+ foreignKeyName: "withdrawal_requests_profile_id_fkey";
757
+ columns: ["profile_id"];
758
+ isOneToOne: false;
759
+ referencedRelation: "profiles";
760
+ referencedColumns: ["id"];
659
761
  },
660
762
  {
661
- foreignKeyName: "withdrawal_requests_wallet_id_fkey"
662
- columns: ["wallet_id"]
663
- isOneToOne: false
664
- referencedRelation: "wallets"
665
- referencedColumns: ["id"]
763
+ foreignKeyName: "withdrawal_requests_wallet_id_fkey";
764
+ columns: ["wallet_id"];
765
+ isOneToOne: false;
766
+ referencedRelation: "wallets";
767
+ referencedColumns: ["id"];
666
768
  },
667
- ]
668
- }
669
- }
769
+ ];
770
+ };
771
+ };
670
772
  Views: {
671
- [_ in never]: never
672
- }
773
+ [_ in never]: never;
774
+ };
673
775
  Functions: {
674
776
  authorize_manager: {
675
777
  Args: {
676
- requested_permission: Database["public"]["Enums"]["manager_permission"]
677
- }
678
- Returns: boolean
679
- }
778
+ requested_permission: Database["public"]["Enums"]["manager_permission"];
779
+ };
780
+ Returns: boolean;
781
+ };
680
782
  create_manager: {
681
783
  Args: {
682
- manager_department?: string
683
- manager_email: string
684
- manager_full_name: string
685
- manager_role: Database["public"]["Enums"]["manager_role"]
686
- }
687
- Returns: string
688
- }
689
- custom_access_token_hook: { Args: { event: Json }; Returns: Json }
690
- follow_user: { Args: { target_user_id: string }; Returns: undefined }
691
- get_followers: { Args: { target_user_id: string }; Returns: string[] }
692
- get_following: { Args: { target_user_id: string }; Returns: string[] }
784
+ manager_department?: string;
785
+ manager_email: string;
786
+ manager_full_name: string;
787
+ manager_role: Database["public"]["Enums"]["manager_role"];
788
+ };
789
+ Returns: string;
790
+ };
791
+ custom_access_token_hook: { Args: { event: Json }; Returns: Json };
792
+ follow_user: { Args: { target_user_id: string }; Returns: undefined };
793
+ get_followers: { Args: { target_user_id: string }; Returns: string[] };
794
+ get_following: { Args: { target_user_id: string }; Returns: string[] };
693
795
  handle_successful_payment: {
694
796
  Args: {
695
- p_amount: number
696
- p_creator_profile_id: string
697
- p_metadata?: Json
698
- p_platform_fee: number
699
- p_provider: Database["public"]["Enums"]["provider_enum"]
700
- p_provider_transaction_id: string
701
- p_reference_type: Database["public"]["Enums"]["reference_type_enum"]
702
- p_service_type?: string
703
- p_supporter_id: string
704
- p_supporter_profile_id?: string
705
- }
706
- Returns: Json
707
- }
708
- is_admin: { Args: never; Returns: boolean }
709
- is_following: { Args: { target_user_id: string }; Returns: boolean }
710
- is_manager: { Args: { user_email: string }; Returns: boolean }
797
+ p_amount: number;
798
+ p_creator_profile_id: string;
799
+ p_metadata?: Json;
800
+ p_platform_fee: number;
801
+ p_provider: Database["public"]["Enums"]["provider_enum"];
802
+ p_provider_transaction_id: string;
803
+ p_reference_type: Database["public"]["Enums"]["reference_type_enum"];
804
+ p_service_type?: string;
805
+ p_supporter_id: string;
806
+ p_supporter_profile_id?: string;
807
+ };
808
+ Returns: Json;
809
+ };
810
+ is_admin: { Args: never; Returns: boolean };
811
+ is_following: { Args: { target_user_id: string }; Returns: boolean };
812
+ is_manager: { Args: { user_email: string }; Returns: boolean };
711
813
  request_withdrawal: {
712
- Args: { p_amount: number; p_payout_method_id: string }
713
- Returns: string
714
- }
715
- show_limit: { Args: never; Returns: number }
716
- show_trgm: { Args: { "": string }; Returns: string[] }
717
- toggle_follow: { Args: { target_user_id: string }; Returns: boolean }
718
- unfollow_user: { Args: { target_user_id: string }; Returns: undefined }
814
+ Args: { p_amount: number; p_payout_method_id: string };
815
+ Returns: string;
816
+ };
817
+ show_limit: { Args: never; Returns: number };
818
+ show_trgm: { Args: { "": string }; Returns: string[] };
819
+ toggle_follow: { Args: { target_user_id: string }; Returns: boolean };
820
+ unfollow_user: { Args: { target_user_id: string }; Returns: undefined };
719
821
  upsert_supporter: {
720
822
  Args: {
721
- p_amount?: number
722
- p_creator_id: string
723
- p_identity_hash: string
724
- p_name: string
725
- p_service_type?: string
726
- p_social_platform?: Database["public"]["Enums"]["supporter_platform_enum"]
727
- p_user_profile_id?: string
728
- }
729
- Returns: string
730
- }
731
- }
823
+ p_amount?: number;
824
+ p_creator_id: string;
825
+ p_identity_hash: string;
826
+ p_name: string;
827
+ p_service_type?: string;
828
+ p_social_platform?: Database["public"]["Enums"]["supporter_platform_enum"];
829
+ p_user_profile_id?: string;
830
+ };
831
+ Returns: string;
832
+ };
833
+ };
732
834
  Enums: {
733
835
  manager_permission:
734
836
  | "managers.create"
@@ -754,14 +856,14 @@ export type Database = {
754
856
  | "developers.create"
755
857
  | "developers.view"
756
858
  | "developers.update"
757
- | "developers.delete"
859
+ | "developers.delete";
758
860
  manager_role:
759
861
  | "super_admin"
760
862
  | "content_manager"
761
863
  | "support_manager"
762
864
  | "finance_manager"
763
- | "developer_manager"
764
- manager_status: "ACTIVE" | "INACTIVE" | "SUSPENDED"
865
+ | "developer_manager";
866
+ manager_status: "ACTIVE" | "INACTIVE" | "SUSPENDED";
765
867
  payment_status_enum:
766
868
  | "pending"
767
869
  | "processing"
@@ -770,8 +872,8 @@ export type Database = {
770
872
  | "reversed"
771
873
  | "cancelled"
772
874
  | "refunded"
773
- | "reviewing"
774
- payout_provider: "bkash" | "nagad" | "rocket" | "bank"
875
+ | "reviewing";
876
+ payout_provider: "bkash" | "nagad" | "rocket" | "bank";
775
877
  provider_enum:
776
878
  | "HobeNakiCoffee"
777
879
  | "Bkash"
@@ -782,7 +884,7 @@ export type Database = {
782
884
  | "Aamarpay"
783
885
  | "Portwallet"
784
886
  | "Tap"
785
- | "Other"
887
+ | "Other";
786
888
  reference_type_enum:
787
889
  | "subscription"
788
890
  | "one-time"
@@ -790,7 +892,7 @@ export type Database = {
790
892
  | "withdraw_lock"
791
893
  | "withdraw_release"
792
894
  | "withdraw_complete"
793
- | "manual_adjustment"
895
+ | "manual_adjustment";
794
896
  supporter_platform_enum:
795
897
  | "facebook"
796
898
  | "x"
@@ -809,44 +911,47 @@ export type Database = {
809
911
  | "medium"
810
912
  | "devto"
811
913
  | "behance"
812
- | "dribbble"
813
- transaction_direction_enum: "debit" | "credit"
814
- user_role: "user" | "admin"
815
- visibility_enum: "public" | "private"
914
+ | "dribbble";
915
+ transaction_direction_enum: "debit" | "credit";
916
+ user_role: "user" | "admin";
917
+ visibility_enum: "public" | "private";
816
918
  withdrawal_status:
817
919
  | "requested"
818
920
  | "approved"
819
921
  | "processing"
820
922
  | "paid"
821
923
  | "rejected"
822
- | "failed"
823
- }
924
+ | "failed";
925
+ };
824
926
  CompositeTypes: {
825
- [_ in never]: never
826
- }
827
- }
828
- }
927
+ [_ in never]: never;
928
+ };
929
+ };
930
+ };
829
931
 
830
- type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">
932
+ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
831
933
 
832
- type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">]
934
+ type DefaultSchema = DatabaseWithoutInternals[Extract<
935
+ keyof Database,
936
+ "public"
937
+ >];
833
938
 
834
939
  export type Tables<
835
940
  DefaultSchemaTableNameOrOptions extends
836
941
  | keyof (DefaultSchema["Tables"] & DefaultSchema["Views"])
837
942
  | { schema: keyof DatabaseWithoutInternals },
838
943
  TableName extends DefaultSchemaTableNameOrOptions extends {
839
- schema: keyof DatabaseWithoutInternals
944
+ schema: keyof DatabaseWithoutInternals;
840
945
  }
841
946
  ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
842
947
  DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])
843
948
  : never = never,
844
949
  > = DefaultSchemaTableNameOrOptions extends {
845
- schema: keyof DatabaseWithoutInternals
950
+ schema: keyof DatabaseWithoutInternals;
846
951
  }
847
952
  ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
848
953
  DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
849
- Row: infer R
954
+ Row: infer R;
850
955
  }
851
956
  ? R
852
957
  : never
@@ -854,95 +959,95 @@ export type Tables<
854
959
  DefaultSchema["Views"])
855
960
  ? (DefaultSchema["Tables"] &
856
961
  DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
857
- Row: infer R
962
+ Row: infer R;
858
963
  }
859
964
  ? R
860
965
  : never
861
- : never
966
+ : never;
862
967
 
863
968
  export type TablesInsert<
864
969
  DefaultSchemaTableNameOrOptions extends
865
970
  | keyof DefaultSchema["Tables"]
866
971
  | { schema: keyof DatabaseWithoutInternals },
867
972
  TableName extends DefaultSchemaTableNameOrOptions extends {
868
- schema: keyof DatabaseWithoutInternals
973
+ schema: keyof DatabaseWithoutInternals;
869
974
  }
870
975
  ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
871
976
  : never = never,
872
977
  > = DefaultSchemaTableNameOrOptions extends {
873
- schema: keyof DatabaseWithoutInternals
978
+ schema: keyof DatabaseWithoutInternals;
874
979
  }
875
980
  ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
876
- Insert: infer I
981
+ Insert: infer I;
877
982
  }
878
983
  ? I
879
984
  : never
880
985
  : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
881
986
  ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
882
- Insert: infer I
987
+ Insert: infer I;
883
988
  }
884
989
  ? I
885
990
  : never
886
- : never
991
+ : never;
887
992
 
888
993
  export type TablesUpdate<
889
994
  DefaultSchemaTableNameOrOptions extends
890
995
  | keyof DefaultSchema["Tables"]
891
996
  | { schema: keyof DatabaseWithoutInternals },
892
997
  TableName extends DefaultSchemaTableNameOrOptions extends {
893
- schema: keyof DatabaseWithoutInternals
998
+ schema: keyof DatabaseWithoutInternals;
894
999
  }
895
1000
  ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
896
1001
  : never = never,
897
1002
  > = DefaultSchemaTableNameOrOptions extends {
898
- schema: keyof DatabaseWithoutInternals
1003
+ schema: keyof DatabaseWithoutInternals;
899
1004
  }
900
1005
  ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
901
- Update: infer U
1006
+ Update: infer U;
902
1007
  }
903
1008
  ? U
904
1009
  : never
905
1010
  : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
906
1011
  ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
907
- Update: infer U
1012
+ Update: infer U;
908
1013
  }
909
1014
  ? U
910
1015
  : never
911
- : never
1016
+ : never;
912
1017
 
913
1018
  export type Enums<
914
1019
  DefaultSchemaEnumNameOrOptions extends
915
1020
  | keyof DefaultSchema["Enums"]
916
1021
  | { schema: keyof DatabaseWithoutInternals },
917
1022
  EnumName extends DefaultSchemaEnumNameOrOptions extends {
918
- schema: keyof DatabaseWithoutInternals
1023
+ schema: keyof DatabaseWithoutInternals;
919
1024
  }
920
1025
  ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"]
921
1026
  : never = never,
922
1027
  > = DefaultSchemaEnumNameOrOptions extends {
923
- schema: keyof DatabaseWithoutInternals
1028
+ schema: keyof DatabaseWithoutInternals;
924
1029
  }
925
1030
  ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName]
926
1031
  : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"]
927
1032
  ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions]
928
- : never
1033
+ : never;
929
1034
 
930
1035
  export type CompositeTypes<
931
1036
  PublicCompositeTypeNameOrOptions extends
932
1037
  | keyof DefaultSchema["CompositeTypes"]
933
1038
  | { schema: keyof DatabaseWithoutInternals },
934
1039
  CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
935
- schema: keyof DatabaseWithoutInternals
1040
+ schema: keyof DatabaseWithoutInternals;
936
1041
  }
937
1042
  ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
938
1043
  : never = never,
939
1044
  > = PublicCompositeTypeNameOrOptions extends {
940
- schema: keyof DatabaseWithoutInternals
1045
+ schema: keyof DatabaseWithoutInternals;
941
1046
  }
942
1047
  ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
943
1048
  : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"]
944
1049
  ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
945
- : never
1050
+ : never;
946
1051
 
947
1052
  export const Constants = {
948
1053
  public: {
@@ -1046,5 +1151,4 @@ export const Constants = {
1046
1151
  ],
1047
1152
  },
1048
1153
  },
1049
- } as const
1050
-
1154
+ } as const;