@hobenakicoffee/libraries 5.2.2 → 5.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.
- package/package.json +1 -1
- package/src/types/index.ts +4 -1
- package/src/types/supabase.ts +180 -20
package/package.json
CHANGED
package/src/types/index.ts
CHANGED
|
@@ -16,7 +16,9 @@ export type ActivityType =
|
|
|
16
16
|
| "post_gifted"
|
|
17
17
|
| "post_gift_sent"
|
|
18
18
|
| "post_approved"
|
|
19
|
-
| "post_rejected"
|
|
19
|
+
| "post_rejected"
|
|
20
|
+
| "kyc_approved"
|
|
21
|
+
| "kyc_resubmit_requested";
|
|
20
22
|
|
|
21
23
|
export type ActivityMetadata = {
|
|
22
24
|
type?: string;
|
|
@@ -56,6 +58,7 @@ export type ActivityMetadata = {
|
|
|
56
58
|
gift_message?: string;
|
|
57
59
|
product_id?: string;
|
|
58
60
|
product_title?: string;
|
|
61
|
+
submission_id?: string;
|
|
59
62
|
action?: "follow" | "unfollow";
|
|
60
63
|
};
|
|
61
64
|
|
package/src/types/supabase.ts
CHANGED
|
@@ -335,6 +335,116 @@ export type Database = {
|
|
|
335
335
|
},
|
|
336
336
|
];
|
|
337
337
|
};
|
|
338
|
+
kyc_sessions: {
|
|
339
|
+
Row: {
|
|
340
|
+
created_at: string;
|
|
341
|
+
expires_at: string;
|
|
342
|
+
id: number;
|
|
343
|
+
profile_id: string;
|
|
344
|
+
status: Database["public"]["Enums"]["kyc_session_status_enum"];
|
|
345
|
+
token: string;
|
|
346
|
+
updated_at: string;
|
|
347
|
+
};
|
|
348
|
+
Insert: {
|
|
349
|
+
created_at?: string;
|
|
350
|
+
expires_at?: string;
|
|
351
|
+
id?: never;
|
|
352
|
+
profile_id: string;
|
|
353
|
+
status?: Database["public"]["Enums"]["kyc_session_status_enum"];
|
|
354
|
+
token?: string;
|
|
355
|
+
updated_at?: string;
|
|
356
|
+
};
|
|
357
|
+
Update: {
|
|
358
|
+
created_at?: string;
|
|
359
|
+
expires_at?: string;
|
|
360
|
+
id?: never;
|
|
361
|
+
profile_id?: string;
|
|
362
|
+
status?: Database["public"]["Enums"]["kyc_session_status_enum"];
|
|
363
|
+
token?: string;
|
|
364
|
+
updated_at?: string;
|
|
365
|
+
};
|
|
366
|
+
Relationships: [
|
|
367
|
+
{
|
|
368
|
+
foreignKeyName: "kyc_sessions_profile_id_fkey";
|
|
369
|
+
columns: ["profile_id"];
|
|
370
|
+
isOneToOne: false;
|
|
371
|
+
referencedRelation: "profiles";
|
|
372
|
+
referencedColumns: ["id"];
|
|
373
|
+
},
|
|
374
|
+
];
|
|
375
|
+
};
|
|
376
|
+
kyc_submissions: {
|
|
377
|
+
Row: {
|
|
378
|
+
admin_notes: string | null;
|
|
379
|
+
attempt_number: number;
|
|
380
|
+
consent_given_at: string;
|
|
381
|
+
consent_ip: unknown;
|
|
382
|
+
created_at: string;
|
|
383
|
+
id: number;
|
|
384
|
+
nid_back_path: string;
|
|
385
|
+
nid_front_path: string;
|
|
386
|
+
nid_number: string;
|
|
387
|
+
profile_id: string;
|
|
388
|
+
rejection_reason: string | null;
|
|
389
|
+
reviewed_at: string | null;
|
|
390
|
+
reviewed_by: string | null;
|
|
391
|
+
selfie_path: string;
|
|
392
|
+
status: Database["public"]["Enums"]["kyc_status_enum"];
|
|
393
|
+
updated_at: string;
|
|
394
|
+
};
|
|
395
|
+
Insert: {
|
|
396
|
+
admin_notes?: string | null;
|
|
397
|
+
attempt_number?: number;
|
|
398
|
+
consent_given_at?: string;
|
|
399
|
+
consent_ip?: unknown;
|
|
400
|
+
created_at?: string;
|
|
401
|
+
id?: never;
|
|
402
|
+
nid_back_path: string;
|
|
403
|
+
nid_front_path: string;
|
|
404
|
+
nid_number: string;
|
|
405
|
+
profile_id: string;
|
|
406
|
+
rejection_reason?: string | null;
|
|
407
|
+
reviewed_at?: string | null;
|
|
408
|
+
reviewed_by?: string | null;
|
|
409
|
+
selfie_path: string;
|
|
410
|
+
status?: Database["public"]["Enums"]["kyc_status_enum"];
|
|
411
|
+
updated_at?: string;
|
|
412
|
+
};
|
|
413
|
+
Update: {
|
|
414
|
+
admin_notes?: string | null;
|
|
415
|
+
attempt_number?: number;
|
|
416
|
+
consent_given_at?: string;
|
|
417
|
+
consent_ip?: unknown;
|
|
418
|
+
created_at?: string;
|
|
419
|
+
id?: never;
|
|
420
|
+
nid_back_path?: string;
|
|
421
|
+
nid_front_path?: string;
|
|
422
|
+
nid_number?: string;
|
|
423
|
+
profile_id?: string;
|
|
424
|
+
rejection_reason?: string | null;
|
|
425
|
+
reviewed_at?: string | null;
|
|
426
|
+
reviewed_by?: string | null;
|
|
427
|
+
selfie_path?: string;
|
|
428
|
+
status?: Database["public"]["Enums"]["kyc_status_enum"];
|
|
429
|
+
updated_at?: string;
|
|
430
|
+
};
|
|
431
|
+
Relationships: [
|
|
432
|
+
{
|
|
433
|
+
foreignKeyName: "kyc_submissions_profile_id_fkey";
|
|
434
|
+
columns: ["profile_id"];
|
|
435
|
+
isOneToOne: false;
|
|
436
|
+
referencedRelation: "profiles";
|
|
437
|
+
referencedColumns: ["id"];
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
foreignKeyName: "kyc_submissions_reviewed_by_fkey";
|
|
441
|
+
columns: ["reviewed_by"];
|
|
442
|
+
isOneToOne: false;
|
|
443
|
+
referencedRelation: "profiles";
|
|
444
|
+
referencedColumns: ["id"];
|
|
445
|
+
},
|
|
446
|
+
];
|
|
447
|
+
};
|
|
338
448
|
manager_role_permissions: {
|
|
339
449
|
Row: {
|
|
340
450
|
id: number;
|
|
@@ -1207,7 +1317,10 @@ export type Database = {
|
|
|
1207
1317
|
has_first_service: boolean | null;
|
|
1208
1318
|
has_wallet_balance: boolean | null;
|
|
1209
1319
|
id: string;
|
|
1320
|
+
is_kyc_verified: boolean;
|
|
1210
1321
|
is_page_active: boolean | null;
|
|
1322
|
+
is_verified: boolean;
|
|
1323
|
+
kyc_verified_at: string | null;
|
|
1211
1324
|
layout: Json | null;
|
|
1212
1325
|
onboarding_completed_at: string | null;
|
|
1213
1326
|
onboarding_step: number | null;
|
|
@@ -1234,7 +1347,10 @@ export type Database = {
|
|
|
1234
1347
|
has_first_service?: boolean | null;
|
|
1235
1348
|
has_wallet_balance?: boolean | null;
|
|
1236
1349
|
id: string;
|
|
1350
|
+
is_kyc_verified?: boolean;
|
|
1237
1351
|
is_page_active?: boolean | null;
|
|
1352
|
+
is_verified?: boolean;
|
|
1353
|
+
kyc_verified_at?: string | null;
|
|
1238
1354
|
layout?: Json | null;
|
|
1239
1355
|
onboarding_completed_at?: string | null;
|
|
1240
1356
|
onboarding_step?: number | null;
|
|
@@ -1261,7 +1377,10 @@ export type Database = {
|
|
|
1261
1377
|
has_first_service?: boolean | null;
|
|
1262
1378
|
has_wallet_balance?: boolean | null;
|
|
1263
1379
|
id?: string;
|
|
1380
|
+
is_kyc_verified?: boolean;
|
|
1264
1381
|
is_page_active?: boolean | null;
|
|
1382
|
+
is_verified?: boolean;
|
|
1383
|
+
kyc_verified_at?: string | null;
|
|
1265
1384
|
layout?: Json | null;
|
|
1266
1385
|
onboarding_completed_at?: string | null;
|
|
1267
1386
|
onboarding_step?: number | null;
|
|
@@ -2561,10 +2680,28 @@ export type Database = {
|
|
|
2561
2680
|
};
|
|
2562
2681
|
Returns: Json;
|
|
2563
2682
|
};
|
|
2683
|
+
admin_approve_kyc: {
|
|
2684
|
+
Args: {
|
|
2685
|
+
p_admin_notes?: string;
|
|
2686
|
+
p_reviewed_by: string;
|
|
2687
|
+
p_submission_id: number;
|
|
2688
|
+
};
|
|
2689
|
+
Returns: undefined;
|
|
2690
|
+
};
|
|
2564
2691
|
admin_grant_creator_subscription: {
|
|
2565
2692
|
Args: { p_months?: number; p_plan_id: number; p_profile_id: string };
|
|
2566
2693
|
Returns: Json;
|
|
2567
2694
|
};
|
|
2695
|
+
admin_reject_kyc: {
|
|
2696
|
+
Args: {
|
|
2697
|
+
p_admin_notes?: string;
|
|
2698
|
+
p_rejection_reason: string;
|
|
2699
|
+
p_request_resubmit?: boolean;
|
|
2700
|
+
p_reviewed_by: string;
|
|
2701
|
+
p_submission_id: number;
|
|
2702
|
+
};
|
|
2703
|
+
Returns: undefined;
|
|
2704
|
+
};
|
|
2568
2705
|
approve_newsletter_post: { Args: { p_post_id: string }; Returns: Json };
|
|
2569
2706
|
approve_shop_category: { Args: { p_category_id: string }; Returns: Json };
|
|
2570
2707
|
approve_shop_product: { Args: { p_product_id: string }; Returns: Json };
|
|
@@ -2594,6 +2731,7 @@ export type Database = {
|
|
|
2594
2731
|
Args: { p_profile_id: string };
|
|
2595
2732
|
Returns: Json;
|
|
2596
2733
|
};
|
|
2734
|
+
cleanup_orphaned_kyc_documents: { Args: never; Returns: undefined };
|
|
2597
2735
|
cleanup_orphaned_post_images: { Args: never; Returns: undefined };
|
|
2598
2736
|
confirm_cod_cash_received: {
|
|
2599
2737
|
Args: { p_order_item_id: string };
|
|
@@ -2671,6 +2809,23 @@ export type Database = {
|
|
|
2671
2809
|
};
|
|
2672
2810
|
get_followers: { Args: { target_user_id: string }; Returns: string[] };
|
|
2673
2811
|
get_following: { Args: { target_user_id: string }; Returns: string[] };
|
|
2812
|
+
get_kyc_queue: {
|
|
2813
|
+
Args: {
|
|
2814
|
+
p_cursor?: string;
|
|
2815
|
+
p_limit?: number;
|
|
2816
|
+
p_status?: Database["public"]["Enums"]["kyc_status_enum"];
|
|
2817
|
+
};
|
|
2818
|
+
Returns: {
|
|
2819
|
+
attempt_number: number;
|
|
2820
|
+
created_at: string;
|
|
2821
|
+
display_name: string;
|
|
2822
|
+
nid_number: string;
|
|
2823
|
+
profile_id: string;
|
|
2824
|
+
status: Database["public"]["Enums"]["kyc_status_enum"];
|
|
2825
|
+
submission_id: number;
|
|
2826
|
+
username: string;
|
|
2827
|
+
}[];
|
|
2828
|
+
};
|
|
2674
2829
|
get_messages: {
|
|
2675
2830
|
Args: {
|
|
2676
2831
|
p_conversation_id: string;
|
|
@@ -3029,26 +3184,16 @@ export type Database = {
|
|
|
3029
3184
|
};
|
|
3030
3185
|
Returns: Json;
|
|
3031
3186
|
};
|
|
3032
|
-
process_withdrawal:
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
| {
|
|
3043
|
-
Args: {
|
|
3044
|
-
p_admin_note?: string;
|
|
3045
|
-
p_failure_reason?: string;
|
|
3046
|
-
p_fee?: number;
|
|
3047
|
-
p_new_status: Database["public"]["Enums"]["withdrawal_status"];
|
|
3048
|
-
p_withdrawal_id: string;
|
|
3049
|
-
};
|
|
3050
|
-
Returns: Json;
|
|
3051
|
-
};
|
|
3187
|
+
process_withdrawal: {
|
|
3188
|
+
Args: {
|
|
3189
|
+
p_admin_note?: string;
|
|
3190
|
+
p_failure_reason?: string;
|
|
3191
|
+
p_fee?: number;
|
|
3192
|
+
p_new_status: Database["public"]["Enums"]["withdrawal_status"];
|
|
3193
|
+
p_withdrawal_id: string;
|
|
3194
|
+
};
|
|
3195
|
+
Returns: Json;
|
|
3196
|
+
};
|
|
3052
3197
|
purchase_newsletter_membership: {
|
|
3053
3198
|
Args: {
|
|
3054
3199
|
p_buyer_name: string;
|
|
@@ -3267,6 +3412,13 @@ export type Database = {
|
|
|
3267
3412
|
};
|
|
3268
3413
|
Enums: {
|
|
3269
3414
|
access_grant_type_enum: "purchase" | "gift";
|
|
3415
|
+
kyc_session_status_enum: "pending" | "opened" | "submitted" | "expired";
|
|
3416
|
+
kyc_status_enum:
|
|
3417
|
+
| "pending"
|
|
3418
|
+
| "under_review"
|
|
3419
|
+
| "approved"
|
|
3420
|
+
| "rejected"
|
|
3421
|
+
| "resubmit_requested";
|
|
3270
3422
|
manager_permission:
|
|
3271
3423
|
| "managers.create"
|
|
3272
3424
|
| "managers.view"
|
|
@@ -3538,6 +3690,14 @@ export const Constants = {
|
|
|
3538
3690
|
public: {
|
|
3539
3691
|
Enums: {
|
|
3540
3692
|
access_grant_type_enum: ["purchase", "gift"],
|
|
3693
|
+
kyc_session_status_enum: ["pending", "opened", "submitted", "expired"],
|
|
3694
|
+
kyc_status_enum: [
|
|
3695
|
+
"pending",
|
|
3696
|
+
"under_review",
|
|
3697
|
+
"approved",
|
|
3698
|
+
"rejected",
|
|
3699
|
+
"resubmit_requested",
|
|
3700
|
+
],
|
|
3541
3701
|
manager_permission: [
|
|
3542
3702
|
"managers.create",
|
|
3543
3703
|
"managers.view",
|