@fctc/interface-logic 4.4.2 → 4.4.4
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/dist/hooks.js +231 -210
- package/dist/hooks.mjs +181 -160
- package/dist/provider.js +384 -363
- package/dist/provider.mjs +212 -191
- package/dist/services.d.mts +21 -0
- package/dist/services.d.ts +21 -0
- package/dist/services.js +126 -105
- package/dist/services.mjs +101 -80
- package/package.json +1 -1
package/dist/services.mjs
CHANGED
|
@@ -2909,65 +2909,68 @@ import { useMutation as useMutation5 } from "@tanstack/react-query";
|
|
|
2909
2909
|
// src/hooks/auth/use-login-socical.ts
|
|
2910
2910
|
import { useMutation as useMutation6 } from "@tanstack/react-query";
|
|
2911
2911
|
|
|
2912
|
-
// src/hooks/auth/use-
|
|
2912
|
+
// src/hooks/auth/use-login-supa.tsx
|
|
2913
2913
|
import { useMutation as useMutation7 } from "@tanstack/react-query";
|
|
2914
2914
|
|
|
2915
|
-
// src/hooks/auth/use-reset-password
|
|
2915
|
+
// src/hooks/auth/use-reset-password.ts
|
|
2916
2916
|
import { useMutation as useMutation8 } from "@tanstack/react-query";
|
|
2917
2917
|
|
|
2918
|
-
// src/hooks/auth/use-
|
|
2918
|
+
// src/hooks/auth/use-reset-password-sso.ts
|
|
2919
2919
|
import { useMutation as useMutation9 } from "@tanstack/react-query";
|
|
2920
2920
|
|
|
2921
|
-
// src/hooks/auth/use-
|
|
2921
|
+
// src/hooks/auth/use-update-password.ts
|
|
2922
2922
|
import { useMutation as useMutation10 } from "@tanstack/react-query";
|
|
2923
2923
|
|
|
2924
|
-
// src/hooks/auth/use-
|
|
2924
|
+
// src/hooks/auth/use-logout.ts
|
|
2925
2925
|
import { useMutation as useMutation11 } from "@tanstack/react-query";
|
|
2926
2926
|
|
|
2927
|
-
// src/hooks/auth/use-
|
|
2927
|
+
// src/hooks/auth/use-get-access-by-code.ts
|
|
2928
2928
|
import { useMutation as useMutation12 } from "@tanstack/react-query";
|
|
2929
2929
|
|
|
2930
|
-
// src/hooks/auth/use-
|
|
2930
|
+
// src/hooks/auth/use-validate-action-token.ts
|
|
2931
2931
|
import { useMutation as useMutation13 } from "@tanstack/react-query";
|
|
2932
2932
|
|
|
2933
|
-
// src/hooks/auth/use-get-
|
|
2933
|
+
// src/hooks/auth/use-get-tenant-mapping.ts
|
|
2934
2934
|
import { useMutation as useMutation14 } from "@tanstack/react-query";
|
|
2935
2935
|
|
|
2936
|
-
// src/hooks/
|
|
2936
|
+
// src/hooks/auth/use-get-token.ts
|
|
2937
2937
|
import { useMutation as useMutation15 } from "@tanstack/react-query";
|
|
2938
2938
|
|
|
2939
|
-
// src/hooks/company/use-get-
|
|
2939
|
+
// src/hooks/company/use-get-company-info.ts
|
|
2940
2940
|
import { useMutation as useMutation16 } from "@tanstack/react-query";
|
|
2941
2941
|
|
|
2942
|
+
// src/hooks/company/use-get-current-company.ts
|
|
2943
|
+
import { useMutation as useMutation17 } from "@tanstack/react-query";
|
|
2944
|
+
|
|
2942
2945
|
// src/hooks/company/use-get-list-company.ts
|
|
2943
2946
|
import { useQuery } from "@tanstack/react-query";
|
|
2944
2947
|
|
|
2945
2948
|
// src/hooks/excel/use-export-excel.ts
|
|
2946
|
-
import { useMutation as
|
|
2949
|
+
import { useMutation as useMutation18 } from "@tanstack/react-query";
|
|
2947
2950
|
|
|
2948
2951
|
// src/hooks/excel/use-get-field-export.ts
|
|
2949
|
-
import { useMutation as
|
|
2952
|
+
import { useMutation as useMutation19 } from "@tanstack/react-query";
|
|
2950
2953
|
|
|
2951
2954
|
// src/hooks/excel/use-get-file-excel.ts
|
|
2952
2955
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
2953
2956
|
|
|
2954
2957
|
// src/hooks/excel/use-parse-preview.ts
|
|
2955
|
-
import { useMutation as
|
|
2958
|
+
import { useMutation as useMutation20 } from "@tanstack/react-query";
|
|
2956
2959
|
|
|
2957
2960
|
// src/hooks/excel/use-upload-file-excel.ts
|
|
2958
|
-
import { useMutation as
|
|
2961
|
+
import { useMutation as useMutation21 } from "@tanstack/react-query";
|
|
2959
2962
|
|
|
2960
2963
|
// src/hooks/excel/use-upload-id-file.ts
|
|
2961
|
-
import { useMutation as
|
|
2964
|
+
import { useMutation as useMutation22 } from "@tanstack/react-query";
|
|
2962
2965
|
|
|
2963
2966
|
// src/hooks/excel/uss-execute-import.ts
|
|
2964
|
-
import { useMutation as
|
|
2967
|
+
import { useMutation as useMutation23 } from "@tanstack/react-query";
|
|
2965
2968
|
|
|
2966
2969
|
// src/hooks/form/use-change-status.ts
|
|
2967
|
-
import { useMutation as
|
|
2970
|
+
import { useMutation as useMutation24 } from "@tanstack/react-query";
|
|
2968
2971
|
|
|
2969
2972
|
// src/hooks/form/use-delete-comment.ts
|
|
2970
|
-
import { useMutation as
|
|
2973
|
+
import { useMutation as useMutation25 } from "@tanstack/react-query";
|
|
2971
2974
|
|
|
2972
2975
|
// src/hooks/form/use-get-comment.ts
|
|
2973
2976
|
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
@@ -2979,13 +2982,13 @@ import { useQuery as useQuery4 } from "@tanstack/react-query";
|
|
|
2979
2982
|
import { useQuery as useQuery5 } from "@tanstack/react-query";
|
|
2980
2983
|
|
|
2981
2984
|
// src/hooks/form/use-send-comment.ts
|
|
2982
|
-
import { useMutation as
|
|
2985
|
+
import { useMutation as useMutation26 } from "@tanstack/react-query";
|
|
2983
2986
|
|
|
2984
2987
|
// src/hooks/form/use-upload-image.ts
|
|
2985
|
-
import { useMutation as
|
|
2988
|
+
import { useMutation as useMutation27 } from "@tanstack/react-query";
|
|
2986
2989
|
|
|
2987
2990
|
// src/hooks/form/use-upload-file.ts
|
|
2988
|
-
import { useMutation as
|
|
2991
|
+
import { useMutation as useMutation28 } from "@tanstack/react-query";
|
|
2989
2992
|
|
|
2990
2993
|
// src/hooks/form/use-get-thread-data.ts
|
|
2991
2994
|
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
|
@@ -2997,7 +3000,7 @@ import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
|
2997
3000
|
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
|
2998
3001
|
|
|
2999
3002
|
// src/hooks/model/use-delete.ts
|
|
3000
|
-
import { useMutation as
|
|
3003
|
+
import { useMutation as useMutation29 } from "@tanstack/react-query";
|
|
3001
3004
|
|
|
3002
3005
|
// src/hooks/model/use-get-all.ts
|
|
3003
3006
|
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
@@ -3009,7 +3012,7 @@ import { useQuery as useQuery10 } from "@tanstack/react-query";
|
|
|
3009
3012
|
import { useQuery as useQuery11 } from "@tanstack/react-query";
|
|
3010
3013
|
|
|
3011
3014
|
// src/hooks/model/use-get-detail.ts
|
|
3012
|
-
import { useMutation as
|
|
3015
|
+
import { useMutation as useMutation30 } from "@tanstack/react-query";
|
|
3013
3016
|
|
|
3014
3017
|
// src/hooks/model/use-get-field-onchange.ts
|
|
3015
3018
|
import { useQuery as useQuery12 } from "@tanstack/react-query";
|
|
@@ -3021,25 +3024,25 @@ import { useQuery as useQuery13 } from "@tanstack/react-query";
|
|
|
3021
3024
|
import { useCallback as useCallback2 } from "react";
|
|
3022
3025
|
|
|
3023
3026
|
// src/hooks/model/use-onchange-form.ts
|
|
3024
|
-
import { useMutation as
|
|
3027
|
+
import { useMutation as useMutation31 } from "@tanstack/react-query";
|
|
3025
3028
|
|
|
3026
3029
|
// src/hooks/model/use-save.ts
|
|
3027
|
-
import { useMutation as
|
|
3030
|
+
import { useMutation as useMutation32 } from "@tanstack/react-query";
|
|
3028
3031
|
|
|
3029
3032
|
// src/hooks/user/use-get-profile.ts
|
|
3030
|
-
import { useMutation as
|
|
3033
|
+
import { useMutation as useMutation33 } from "@tanstack/react-query";
|
|
3031
3034
|
|
|
3032
3035
|
// src/hooks/user/use-get-user.ts
|
|
3033
|
-
import { useMutation as
|
|
3036
|
+
import { useMutation as useMutation34 } from "@tanstack/react-query";
|
|
3034
3037
|
|
|
3035
3038
|
// src/hooks/user/use-switch-locale.ts
|
|
3036
|
-
import { useMutation as
|
|
3039
|
+
import { useMutation as useMutation35 } from "@tanstack/react-query";
|
|
3037
3040
|
|
|
3038
3041
|
// src/hooks/view/use-button.ts
|
|
3039
|
-
import { useMutation as
|
|
3042
|
+
import { useMutation as useMutation36 } from "@tanstack/react-query";
|
|
3040
3043
|
|
|
3041
3044
|
// src/hooks/view/use-duplicate-record.ts
|
|
3042
|
-
import { useMutation as
|
|
3045
|
+
import { useMutation as useMutation37 } from "@tanstack/react-query";
|
|
3043
3046
|
|
|
3044
3047
|
// src/hooks/view/use-get-action-detail.ts
|
|
3045
3048
|
import { useQuery as useQuery14 } from "@tanstack/react-query";
|
|
@@ -3057,7 +3060,7 @@ import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
|
3057
3060
|
import { useQuery as useQuery18 } from "@tanstack/react-query";
|
|
3058
3061
|
|
|
3059
3062
|
// src/hooks/view/use-get-print-report.ts
|
|
3060
|
-
import { useMutation as
|
|
3063
|
+
import { useMutation as useMutation38 } from "@tanstack/react-query";
|
|
3061
3064
|
|
|
3062
3065
|
// src/hooks/view/use-get-progress-bar.ts
|
|
3063
3066
|
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
@@ -3069,67 +3072,67 @@ import { useQuery as useQuery20 } from "@tanstack/react-query";
|
|
|
3069
3072
|
import { useQuery as useQuery21 } from "@tanstack/react-query";
|
|
3070
3073
|
|
|
3071
3074
|
// src/hooks/view/use-load-action.ts
|
|
3072
|
-
import { useMutation as
|
|
3075
|
+
import { useMutation as useMutation39 } from "@tanstack/react-query";
|
|
3073
3076
|
|
|
3074
3077
|
// src/hooks/view/use-load-message.ts
|
|
3075
3078
|
import { useQuery as useQuery22 } from "@tanstack/react-query";
|
|
3076
3079
|
|
|
3077
3080
|
// src/hooks/view/use-print.ts
|
|
3078
|
-
import { useMutation as
|
|
3081
|
+
import { useMutation as useMutation40 } from "@tanstack/react-query";
|
|
3079
3082
|
|
|
3080
3083
|
// src/hooks/view/use-remove-row.ts
|
|
3081
|
-
import { useMutation as
|
|
3084
|
+
import { useMutation as useMutation41 } from "@tanstack/react-query";
|
|
3082
3085
|
|
|
3083
3086
|
// src/hooks/view/use-resequence.ts
|
|
3084
|
-
import { useMutation as
|
|
3087
|
+
import { useMutation as useMutation42 } from "@tanstack/react-query";
|
|
3085
3088
|
|
|
3086
3089
|
// src/hooks/view/use-run-action.ts
|
|
3087
|
-
import { useMutation as
|
|
3090
|
+
import { useMutation as useMutation43 } from "@tanstack/react-query";
|
|
3088
3091
|
|
|
3089
3092
|
// src/hooks/view/use-signin-sso.ts
|
|
3090
|
-
import { useMutation as
|
|
3093
|
+
import { useMutation as useMutation44 } from "@tanstack/react-query";
|
|
3091
3094
|
|
|
3092
3095
|
// src/hooks/view/use-verify-2FA.ts
|
|
3093
|
-
import { useMutation as
|
|
3096
|
+
import { useMutation as useMutation45 } from "@tanstack/react-query";
|
|
3094
3097
|
|
|
3095
3098
|
// src/hooks/view/uset-get-2FA-method.ts
|
|
3096
|
-
import { useMutation as
|
|
3099
|
+
import { useMutation as useMutation46 } from "@tanstack/react-query";
|
|
3097
3100
|
|
|
3098
3101
|
// src/hooks/view/use-grant-access.ts
|
|
3099
|
-
import { useMutation as
|
|
3102
|
+
import { useMutation as useMutation47 } from "@tanstack/react-query";
|
|
3100
3103
|
|
|
3101
3104
|
// src/hooks/view/use-remove-totp-setup.ts
|
|
3102
|
-
import { useMutation as
|
|
3105
|
+
import { useMutation as useMutation48 } from "@tanstack/react-query";
|
|
3103
3106
|
|
|
3104
3107
|
// src/hooks/view/use-request-setup-totp.ts
|
|
3105
|
-
import { useMutation as
|
|
3108
|
+
import { useMutation as useMutation49 } from "@tanstack/react-query";
|
|
3106
3109
|
|
|
3107
3110
|
// src/hooks/view/use-settings-web-read-2fa.ts
|
|
3108
|
-
import { useMutation as
|
|
3111
|
+
import { useMutation as useMutation50 } from "@tanstack/react-query";
|
|
3109
3112
|
|
|
3110
3113
|
// src/hooks/view/use-verify-totp.ts
|
|
3111
|
-
import { useMutation as
|
|
3114
|
+
import { useMutation as useMutation51 } from "@tanstack/react-query";
|
|
3112
3115
|
|
|
3113
3116
|
// src/hooks/view/use-gen-serial-number.ts
|
|
3114
|
-
import { useMutation as
|
|
3117
|
+
import { useMutation as useMutation52 } from "@tanstack/react-query";
|
|
3115
3118
|
|
|
3116
3119
|
// src/hooks/view/use-get-notifications.ts
|
|
3117
3120
|
import { useQuery as useQuery23 } from "@tanstack/react-query";
|
|
3118
3121
|
|
|
3119
3122
|
// src/hooks/view/use-get-version.ts
|
|
3120
|
-
import { useMutation as
|
|
3123
|
+
import { useMutation as useMutation53 } from "@tanstack/react-query";
|
|
3121
3124
|
|
|
3122
3125
|
// src/hooks/view/use-get-ward.ts
|
|
3123
|
-
import { useMutation as
|
|
3126
|
+
import { useMutation as useMutation54 } from "@tanstack/react-query";
|
|
3124
3127
|
|
|
3125
3128
|
// src/hooks/view/use-get-city.ts
|
|
3126
|
-
import { useMutation as
|
|
3129
|
+
import { useMutation as useMutation55 } from "@tanstack/react-query";
|
|
3127
3130
|
|
|
3128
3131
|
// src/hooks/view/use-get-country.ts
|
|
3129
|
-
import { useMutation as
|
|
3132
|
+
import { useMutation as useMutation56 } from "@tanstack/react-query";
|
|
3130
3133
|
|
|
3131
3134
|
// src/hooks/view/use-get-partner-title.ts
|
|
3132
|
-
import { useMutation as
|
|
3135
|
+
import { useMutation as useMutation57 } from "@tanstack/react-query";
|
|
3133
3136
|
|
|
3134
3137
|
// src/hooks/chart/use-read-group.ts
|
|
3135
3138
|
import { useQuery as useQuery24 } from "@tanstack/react-query";
|
|
@@ -3138,7 +3141,7 @@ import { useQuery as useQuery24 } from "@tanstack/react-query";
|
|
|
3138
3141
|
import { useQuery as useQuery25 } from "@tanstack/react-query";
|
|
3139
3142
|
|
|
3140
3143
|
// src/hooks/pos/use-add-entity.ts
|
|
3141
|
-
import { useMutation as
|
|
3144
|
+
import { useMutation as useMutation58 } from "@tanstack/react-query";
|
|
3142
3145
|
|
|
3143
3146
|
// src/services/pos-service/get-a-session.ts
|
|
3144
3147
|
import { useCallback as useCallback3 } from "react";
|
|
@@ -4412,91 +4415,91 @@ var usePosService = () => {
|
|
|
4412
4415
|
};
|
|
4413
4416
|
|
|
4414
4417
|
// src/hooks/pos/use-get-a-session.ts
|
|
4415
|
-
import { useMutation as
|
|
4418
|
+
import { useMutation as useMutation59 } from "@tanstack/react-query";
|
|
4416
4419
|
|
|
4417
4420
|
// src/hooks/pos/use-change-order-preparation-state.ts
|
|
4418
|
-
import { useMutation as
|
|
4421
|
+
import { useMutation as useMutation60 } from "@tanstack/react-query";
|
|
4419
4422
|
|
|
4420
4423
|
// src/hooks/pos/use-check-payment.ts
|
|
4421
|
-
import { useMutation as
|
|
4424
|
+
import { useMutation as useMutation61 } from "@tanstack/react-query";
|
|
4422
4425
|
|
|
4423
4426
|
// src/hooks/pos/use-create-e-invoice.ts
|
|
4424
|
-
import { useMutation as
|
|
4427
|
+
import { useMutation as useMutation62 } from "@tanstack/react-query";
|
|
4425
4428
|
|
|
4426
4429
|
// src/hooks/pos/use-create-entity.ts
|
|
4427
|
-
import { useMutation as
|
|
4430
|
+
import { useMutation as useMutation63 } from "@tanstack/react-query";
|
|
4428
4431
|
|
|
4429
4432
|
// src/hooks/pos/use-create-pos-config.ts
|
|
4430
|
-
import { useMutation as
|
|
4433
|
+
import { useMutation as useMutation64 } from "@tanstack/react-query";
|
|
4431
4434
|
|
|
4432
4435
|
// src/hooks/pos/use-create-session.ts
|
|
4433
|
-
import { useMutation as
|
|
4436
|
+
import { useMutation as useMutation65 } from "@tanstack/react-query";
|
|
4434
4437
|
|
|
4435
4438
|
// src/hooks/pos/use-delete-entity.ts
|
|
4436
|
-
import { useMutation as
|
|
4439
|
+
import { useMutation as useMutation66 } from "@tanstack/react-query";
|
|
4437
4440
|
|
|
4438
4441
|
// src/hooks/pos/use-generate-payment-qr-info.ts
|
|
4439
|
-
import { useMutation as
|
|
4442
|
+
import { useMutation as useMutation67 } from "@tanstack/react-query";
|
|
4440
4443
|
|
|
4441
4444
|
// src/hooks/pos/use-get-current-user.ts
|
|
4442
|
-
import { useMutation as
|
|
4445
|
+
import { useMutation as useMutation68 } from "@tanstack/react-query";
|
|
4443
4446
|
|
|
4444
4447
|
// src/hooks/pos/use-get-list.ts
|
|
4445
|
-
import { useMutation as
|
|
4448
|
+
import { useMutation as useMutation69 } from "@tanstack/react-query";
|
|
4446
4449
|
|
|
4447
4450
|
// src/hooks/pos/use-get-order-line.ts
|
|
4448
|
-
import { useMutation as
|
|
4451
|
+
import { useMutation as useMutation70 } from "@tanstack/react-query";
|
|
4449
4452
|
|
|
4450
4453
|
// src/hooks/pos/use-get-pin-code.ts
|
|
4451
|
-
import { useMutation as
|
|
4454
|
+
import { useMutation as useMutation71 } from "@tanstack/react-query";
|
|
4452
4455
|
|
|
4453
4456
|
// src/hooks/pos/use-get-pos.ts
|
|
4454
|
-
import { useMutation as
|
|
4457
|
+
import { useMutation as useMutation72 } from "@tanstack/react-query";
|
|
4455
4458
|
|
|
4456
4459
|
// src/hooks/pos/use-get-preparation-display-data.ts
|
|
4457
|
-
import { useMutation as
|
|
4460
|
+
import { useMutation as useMutation73 } from "@tanstack/react-query";
|
|
4458
4461
|
|
|
4459
4462
|
// src/hooks/pos/use-get-product-image.ts
|
|
4460
|
-
import { useMutation as
|
|
4463
|
+
import { useMutation as useMutation74 } from "@tanstack/react-query";
|
|
4461
4464
|
|
|
4462
4465
|
// src/hooks/pos/use-handle-close-session.ts
|
|
4463
|
-
import { useMutation as
|
|
4466
|
+
import { useMutation as useMutation75 } from "@tanstack/react-query";
|
|
4464
4467
|
|
|
4465
4468
|
// src/hooks/pos/use-handle-closing-detail-session.ts
|
|
4466
|
-
import { useMutation as
|
|
4469
|
+
import { useMutation as useMutation76 } from "@tanstack/react-query";
|
|
4467
4470
|
|
|
4468
4471
|
// src/hooks/pos/use-handle-closing-session.ts
|
|
4469
|
-
import { useMutation as
|
|
4472
|
+
import { useMutation as useMutation77 } from "@tanstack/react-query";
|
|
4470
4473
|
|
|
4471
4474
|
// src/hooks/pos/use-load-data-pos-session.ts
|
|
4472
|
-
import { useMutation as
|
|
4475
|
+
import { useMutation as useMutation78 } from "@tanstack/react-query";
|
|
4473
4476
|
|
|
4474
4477
|
// src/hooks/pos/use-manage-onchange.ts
|
|
4475
|
-
import { useMutation as
|
|
4478
|
+
import { useMutation as useMutation79 } from "@tanstack/react-query";
|
|
4476
4479
|
|
|
4477
4480
|
// src/hooks/pos/use-manage-session.ts
|
|
4478
|
-
import { useMutation as
|
|
4481
|
+
import { useMutation as useMutation80 } from "@tanstack/react-query";
|
|
4479
4482
|
|
|
4480
4483
|
// src/hooks/pos/use-process-order.ts
|
|
4481
|
-
import { useMutation as
|
|
4484
|
+
import { useMutation as useMutation81 } from "@tanstack/react-query";
|
|
4482
4485
|
|
|
4483
4486
|
// src/hooks/pos/use-save-pin-code.ts
|
|
4484
|
-
import { useMutation as
|
|
4487
|
+
import { useMutation as useMutation82 } from "@tanstack/react-query";
|
|
4485
4488
|
|
|
4486
4489
|
// src/hooks/pos/use-search-journal.ts
|
|
4487
|
-
import { useMutation as
|
|
4490
|
+
import { useMutation as useMutation83 } from "@tanstack/react-query";
|
|
4488
4491
|
|
|
4489
4492
|
// src/hooks/pos/use-update-closed-session.ts
|
|
4490
|
-
import { useMutation as
|
|
4493
|
+
import { useMutation as useMutation84 } from "@tanstack/react-query";
|
|
4491
4494
|
|
|
4492
4495
|
// src/hooks/pos/use-update-entity.ts
|
|
4493
|
-
import { useMutation as
|
|
4496
|
+
import { useMutation as useMutation85 } from "@tanstack/react-query";
|
|
4494
4497
|
|
|
4495
4498
|
// src/hooks/pos/use-update-order-status.ts
|
|
4496
|
-
import { useMutation as
|
|
4499
|
+
import { useMutation as useMutation86 } from "@tanstack/react-query";
|
|
4497
4500
|
|
|
4498
4501
|
// src/hooks/pos/use-complete-current-stage.ts
|
|
4499
|
-
import { useMutation as
|
|
4502
|
+
import { useMutation as useMutation87 } from "@tanstack/react-query";
|
|
4500
4503
|
|
|
4501
4504
|
// src/provider/service-provider.tsx
|
|
4502
4505
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
@@ -4723,6 +4726,7 @@ function useActionService() {
|
|
|
4723
4726
|
import { useCallback as useCallback34 } from "react";
|
|
4724
4727
|
function useAuthService() {
|
|
4725
4728
|
const { env } = useEnv();
|
|
4729
|
+
const supabase = useSupabaseOptional();
|
|
4726
4730
|
const login = useCallback34(
|
|
4727
4731
|
async (body) => {
|
|
4728
4732
|
const payload = Object.fromEntries(
|
|
@@ -4748,6 +4752,22 @@ function useAuthService() {
|
|
|
4748
4752
|
},
|
|
4749
4753
|
[env]
|
|
4750
4754
|
);
|
|
4755
|
+
const loginSupabase = useCallback34(
|
|
4756
|
+
async (body) => {
|
|
4757
|
+
if (!supabase) {
|
|
4758
|
+
return {
|
|
4759
|
+
data: null,
|
|
4760
|
+
error: { message: "Supabase client is not initialized" }
|
|
4761
|
+
};
|
|
4762
|
+
}
|
|
4763
|
+
const { data, error } = await supabase.auth.signInWithPassword({
|
|
4764
|
+
email: body.email,
|
|
4765
|
+
password: body.password
|
|
4766
|
+
});
|
|
4767
|
+
return { data, error };
|
|
4768
|
+
},
|
|
4769
|
+
[supabase]
|
|
4770
|
+
);
|
|
4751
4771
|
const forgotPassword = useCallback34(
|
|
4752
4772
|
async (email) => {
|
|
4753
4773
|
const bodyData = {
|
|
@@ -4970,6 +4990,7 @@ function useAuthService() {
|
|
|
4970
4990
|
);
|
|
4971
4991
|
return {
|
|
4972
4992
|
login,
|
|
4993
|
+
loginSupabase,
|
|
4973
4994
|
forgotPassword,
|
|
4974
4995
|
forgotPasswordSSO,
|
|
4975
4996
|
resetPassword,
|