@opexa/portal-components 0.0.449 → 0.0.450
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/client/hooks/useCreateGCashStandardCashInWithdrawal.d.ts +4 -0
- package/dist/client/hooks/useCreateGCashStandardCashInWithdrawal.js +28 -0
- package/dist/client/hooks/useCreateGCashWithdrawalMutation.d.ts +4 -4
- package/dist/client/hooks/useCreateGCashWithdrawalMutation.js +8 -8
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +79 -63
- package/dist/utils/mutationKeys.d.ts +2 -1
- package/dist/utils/mutationKeys.js +44 -43
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SetOptional } from "type-fest";
|
|
2
|
+
import { type CreateGCashWithdrawalInput } from "../../services/wallet";
|
|
3
|
+
import type { Mutation } from "../../types";
|
|
4
|
+
export declare const useCreateGCashStandardCashInWithdrawalMutation: Mutation<string, SetOptional<CreateGCashWithdrawalInput, "id">>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ObjectId } from "@opexa/object-id";
|
|
2
|
+
import { useMutation } from "@tanstack/react-query";
|
|
3
|
+
import invariant from "tiny-invariant";
|
|
4
|
+
import { ObjectType } from "../../services/ObjectType.js";
|
|
5
|
+
import { createGCashWithdrawal, } from "../../services/wallet.js";
|
|
6
|
+
import { getCreateGCashStandardCashInWithdrawalMutationKey } from "../../utils/mutationKeys.js";
|
|
7
|
+
import { getSession } from "../services/getSession.js";
|
|
8
|
+
export const useCreateGCashStandardCashInWithdrawalMutation = (config) => {
|
|
9
|
+
const mutation = useMutation({
|
|
10
|
+
...config,
|
|
11
|
+
mutationKey: getCreateGCashStandardCashInWithdrawalMutationKey(),
|
|
12
|
+
mutationFn: async (input) => {
|
|
13
|
+
const id = input.id ?? ObjectId.generate(ObjectType.Withdrawal).toString();
|
|
14
|
+
const session = await getSession();
|
|
15
|
+
invariant(session.status === "authenticated");
|
|
16
|
+
await createGCashWithdrawal({ ...input, id }, {
|
|
17
|
+
headers: {
|
|
18
|
+
Authorization: `Bearer ${session.token}`,
|
|
19
|
+
...(session.domain && {
|
|
20
|
+
Domain: session.domain,
|
|
21
|
+
}),
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
return id;
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
return mutation;
|
|
28
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SetOptional } from
|
|
2
|
-
import { type CreateGCashWithdrawalInput } from
|
|
3
|
-
import type { Mutation } from
|
|
4
|
-
export declare const useCreateGCashWithdrawalMutation: Mutation<string, SetOptional<CreateGCashWithdrawalInput,
|
|
1
|
+
import type { SetOptional } from "type-fest";
|
|
2
|
+
import { type CreateGCashWithdrawalInput } from "../../services/wallet";
|
|
3
|
+
import type { Mutation } from "../../types";
|
|
4
|
+
export declare const useCreateGCashWithdrawalMutation: Mutation<string, SetOptional<CreateGCashWithdrawalInput, "id">>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ObjectId } from
|
|
2
|
-
import { useMutation } from
|
|
3
|
-
import invariant from
|
|
4
|
-
import { ObjectType } from
|
|
5
|
-
import { createGCashWithdrawal, } from
|
|
6
|
-
import { getCreateGCashWithdrawalMutationKey } from
|
|
7
|
-
import { getSession } from
|
|
1
|
+
import { ObjectId } from "@opexa/object-id";
|
|
2
|
+
import { useMutation } from "@tanstack/react-query";
|
|
3
|
+
import invariant from "tiny-invariant";
|
|
4
|
+
import { ObjectType } from "../../services/ObjectType.js";
|
|
5
|
+
import { createGCashWithdrawal, } from "../../services/wallet.js";
|
|
6
|
+
import { getCreateGCashWithdrawalMutationKey } from "../../utils/mutationKeys.js";
|
|
7
|
+
import { getSession } from "../services/getSession.js";
|
|
8
8
|
export const useCreateGCashWithdrawalMutation = (config) => {
|
|
9
9
|
const mutation = useMutation({
|
|
10
10
|
...config,
|
|
@@ -12,7 +12,7 @@ export const useCreateGCashWithdrawalMutation = (config) => {
|
|
|
12
12
|
mutationFn: async (input) => {
|
|
13
13
|
const id = input.id ?? ObjectId.generate(ObjectType.Withdrawal).toString();
|
|
14
14
|
const session = await getSession();
|
|
15
|
-
invariant(session.status ===
|
|
15
|
+
invariant(session.status === "authenticated");
|
|
16
16
|
await createGCashWithdrawal({ ...input, id }, {
|
|
17
17
|
headers: {
|
|
18
18
|
Authorization: `Bearer ${session.token}`,
|
|
@@ -1,54 +1,70 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { zodResolver } from
|
|
3
|
-
import Link from
|
|
4
|
-
import { useEffect, useState } from
|
|
5
|
-
import { Controller, useForm } from
|
|
6
|
-
import { z } from
|
|
7
|
-
import { useShallow } from
|
|
8
|
-
import { useCreateGCashWithdrawalMutation } from
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
2
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
|
+
import { Controller, useForm } from "react-hook-form";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { useShallow } from "zustand/shallow";
|
|
8
|
+
import { useCreateGCashWithdrawalMutation } from "../../../../client/hooks/useCreateGCashWithdrawalMutation.js";
|
|
9
|
+
import { useCreateGCashStandardCashInWithdrawalMutation } from "../../../../client/hooks/useCreateGCashStandardCashInWithdrawal.js";
|
|
10
|
+
import { useGlobalStore } from "../../../../client/hooks/useGlobalStore.js";
|
|
11
|
+
import { useLocaleInfo } from "../../../../client/hooks/useLocaleInfo.js";
|
|
12
|
+
import { useMobileNumberParser } from "../../../../client/hooks/useMobileNumberParser.js";
|
|
13
|
+
import { usePaymentSettingsQuery } from "../../../../client/hooks/usePaymentSettingsQuery.js";
|
|
14
|
+
import { AlertCircleIcon } from "../../../../icons/AlertCircleIcon.js";
|
|
15
|
+
import { ChevronDownIcon } from "../../../../icons/ChevronDownIcon.js";
|
|
16
|
+
import { ChevronUpIcon } from "../../../../icons/ChevronUpIcon.js";
|
|
17
|
+
import { EyeIcon } from "../../../../icons/EyeIcon.js";
|
|
18
|
+
import { EyeOffIcon } from "../../../../icons/EyeOffIcon.js";
|
|
19
|
+
import { SpinnerIcon } from "../../../../icons/SpinnerIcon.js";
|
|
20
|
+
import { XIcon } from "../../../../icons/XIcon.js";
|
|
21
|
+
import { AlertDialog } from "../../../../ui/AlertDialog/index.js";
|
|
22
|
+
import { Button } from "../../../../ui/Button/index.js";
|
|
23
|
+
import { Field } from "../../../../ui/Field/index.js";
|
|
24
|
+
import { NumberInput } from "../../../../ui/NumberInput/index.js";
|
|
25
|
+
import { PasswordInput } from "../../../../ui/PasswordInput/index.js";
|
|
26
|
+
import { Portal } from "../../../../ui/Portal/index.js";
|
|
27
|
+
import { parseDecimal } from "../../../../utils/parseDecimal.js";
|
|
28
|
+
import { AmountChoices } from "../../AmountChoices.js";
|
|
29
|
+
import { useDepositWithdrawalPropsContext } from "../../DepositWithdrawalContext.js";
|
|
30
|
+
import { explainError } from "../../utils.js";
|
|
31
|
+
import { TransactionPasswordNotSet } from "../TransactionPasswordNotSet.js";
|
|
32
|
+
import { useFeatureFlag } from "../../../../client/hooks/useFeatureFlag.js";
|
|
31
33
|
export function GCashWithdrawal() {
|
|
32
34
|
const depositWithdrawalProps = useDepositWithdrawalPropsContext();
|
|
35
|
+
const featureFlag = useFeatureFlag();
|
|
33
36
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
34
37
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
35
38
|
hasPendingBonus: ctx.pendingBonus,
|
|
36
39
|
})));
|
|
37
|
-
const [status, setStatus] = useState(
|
|
40
|
+
const [status, setStatus] = useState("waiting");
|
|
38
41
|
const localeInfo = useLocaleInfo();
|
|
39
42
|
const mobileNumberParser = useMobileNumberParser();
|
|
40
|
-
const createWithdrawalMutation =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
const createWithdrawalMutation = featureFlag.enabled
|
|
44
|
+
? useCreateGCashStandardCashInWithdrawalMutation({
|
|
45
|
+
onMutate() {
|
|
46
|
+
setStatus("processing");
|
|
47
|
+
},
|
|
48
|
+
onSuccess() {
|
|
49
|
+
setStatus("success");
|
|
50
|
+
form.reset();
|
|
51
|
+
},
|
|
52
|
+
onError() {
|
|
53
|
+
setStatus("failed");
|
|
54
|
+
},
|
|
55
|
+
})
|
|
56
|
+
: useCreateGCashWithdrawalMutation({
|
|
57
|
+
onMutate() {
|
|
58
|
+
setStatus("processing");
|
|
59
|
+
},
|
|
60
|
+
onSuccess() {
|
|
61
|
+
setStatus("success");
|
|
62
|
+
form.reset();
|
|
63
|
+
},
|
|
64
|
+
onError() {
|
|
65
|
+
setStatus("failed");
|
|
66
|
+
},
|
|
67
|
+
});
|
|
52
68
|
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
53
69
|
const paymentSettings = paymentSettingsQuery.data;
|
|
54
70
|
const gatewaySettings = paymentSettings?.gcashWithdrawalGatewaySettings;
|
|
@@ -59,7 +75,7 @@ export function GCashWithdrawal() {
|
|
|
59
75
|
const n = parseDecimal(val, 0);
|
|
60
76
|
if (n < minimumAmount) {
|
|
61
77
|
ctx.addIssue({
|
|
62
|
-
type:
|
|
78
|
+
type: "number",
|
|
63
79
|
code: z.ZodIssueCode.too_small,
|
|
64
80
|
inclusive: true,
|
|
65
81
|
minimum: minimumAmount,
|
|
@@ -68,7 +84,7 @@ export function GCashWithdrawal() {
|
|
|
68
84
|
}
|
|
69
85
|
if (n > maximumAmount) {
|
|
70
86
|
ctx.addIssue({
|
|
71
|
-
type:
|
|
87
|
+
type: "number",
|
|
72
88
|
code: z.ZodIssueCode.too_big,
|
|
73
89
|
inclusive: true,
|
|
74
90
|
maximum: maximumAmount,
|
|
@@ -78,27 +94,27 @@ export function GCashWithdrawal() {
|
|
|
78
94
|
}),
|
|
79
95
|
password: z
|
|
80
96
|
.string()
|
|
81
|
-
.min(8,
|
|
82
|
-
.max(64,
|
|
97
|
+
.min(8, "Password must be 8 or more characters")
|
|
98
|
+
.max(64, "Password must be not be more than 64 characters"),
|
|
83
99
|
mobileNumber: z
|
|
84
100
|
.string()
|
|
85
|
-
.regex(localeInfo.mobileNumber.pattern,
|
|
101
|
+
.regex(localeInfo.mobileNumber.pattern, "Invalid mobile number"),
|
|
86
102
|
});
|
|
87
103
|
const form = useForm({
|
|
88
|
-
mode:
|
|
104
|
+
mode: "all",
|
|
89
105
|
resolver: zodResolver(definition),
|
|
90
106
|
defaultValues: {
|
|
91
|
-
amount:
|
|
92
|
-
password:
|
|
93
|
-
mobileNumber:
|
|
107
|
+
amount: "0",
|
|
108
|
+
password: "",
|
|
109
|
+
mobileNumber: "",
|
|
94
110
|
},
|
|
95
111
|
});
|
|
96
112
|
useEffect(() => {
|
|
97
113
|
if (minimumAmount) {
|
|
98
114
|
form.reset({
|
|
99
115
|
amount: minimumAmount.toString(),
|
|
100
|
-
password:
|
|
101
|
-
mobileNumber:
|
|
116
|
+
password: "",
|
|
117
|
+
mobileNumber: "",
|
|
102
118
|
});
|
|
103
119
|
}
|
|
104
120
|
}, [form, minimumAmount]);
|
|
@@ -113,25 +129,25 @@ export function GCashWithdrawal() {
|
|
|
113
129
|
transactionPassword: data.password,
|
|
114
130
|
});
|
|
115
131
|
});
|
|
116
|
-
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.mobileNumber, children: [_jsx(Field.Label, { children: "Mobile Number" }), _jsxs("div", { className: "relative", children: [_jsx(localeInfo.country.flag, { className: "-translate-y-1/2 pointer-events-none absolute top-1/2 left-3.5 size-5" }), _jsx(Field.Input, { className: "pl-10.5", ...form.register(
|
|
132
|
+
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.mobileNumber, children: [_jsx(Field.Label, { children: "Mobile Number" }), _jsxs("div", { className: "relative", children: [_jsx(localeInfo.country.flag, { className: "-translate-y-1/2 pointer-events-none absolute top-1/2 left-3.5 size-5" }), _jsx(Field.Input, { className: "pl-10.5", ...form.register("mobileNumber") })] }), _jsx(Field.ErrorText, { children: form.formState.errors.mobileNumber?.message })] }), _jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
|
|
117
133
|
o.field.onChange(details.value);
|
|
118
134
|
}, formatOptions: {
|
|
119
135
|
maximumFractionDigits: 2,
|
|
120
136
|
minimumFractionDigits: 0,
|
|
121
|
-
}, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to withdraw" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch(
|
|
122
|
-
form.setValue(
|
|
137
|
+
}, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to withdraw" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch("amount"), 0), onChange: (value) => {
|
|
138
|
+
form.setValue("amount", value.toString(), {
|
|
123
139
|
shouldTouch: true,
|
|
124
140
|
shouldDirty: true,
|
|
125
141
|
shouldValidate: true,
|
|
126
142
|
});
|
|
127
|
-
}, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register(
|
|
143
|
+
}, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register("password") }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", " ", _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? "/terms-of-use", onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), " ", "and", " ", _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? "/privacy-policy", onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== "waiting", onOpenChange: (details) => {
|
|
128
144
|
if (!details.open) {
|
|
129
|
-
setStatus(
|
|
145
|
+
setStatus("waiting");
|
|
130
146
|
}
|
|
131
|
-
}, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { disabled: status ===
|
|
132
|
-
"We're verifying your account and amount. Please hold a moment.", status ===
|
|
133
|
-
|
|
134
|
-
explainError(createWithdrawalMutation.error?.name)] })] }), (status ===
|
|
147
|
+
}, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { disabled: status === "processing", children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === "processing" && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === "success" && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === "failed" && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === "processing" && "Processing Withdraw", status === "success" && "Withdrawal Submitted", status === "failed" && "Withdraw Failed"] }), _jsxs(AlertDialog.Description, { children: [status === "processing" &&
|
|
148
|
+
"We're verifying your account and amount. Please hold a moment.", status === "success" &&
|
|
149
|
+
"Your withdrawal request has been submitted successfully and is awaiting confirmation. You won’t have to wait long — once approved, the funds will be credited to your account.", status === "failed" &&
|
|
150
|
+
explainError(createWithdrawalMutation.error?.name)] })] }), (status === "failed" || status === "success") && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
|
|
135
151
|
api.setOpen(false);
|
|
136
|
-
}, children: status ===
|
|
152
|
+
}, children: status === "failed" ? "Try Again" : "Ok" })) }) }))] }) })] }) })] }));
|
|
137
153
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MutationKey } from
|
|
1
|
+
import type { MutationKey } from "@tanstack/react-query";
|
|
2
2
|
export declare const getAuthenticateMutationKey: () => MutationKey;
|
|
3
3
|
export declare const getCheckInDailyQuestMutationKey: () => MutationKey;
|
|
4
4
|
export declare const getClaimCashbackBonusMutationKey: () => MutationKey;
|
|
@@ -13,6 +13,7 @@ export declare const getCreateQRPHDepositMutationKey: () => MutationKey;
|
|
|
13
13
|
export declare const getCreateLibanganDepositMutationKey: () => MutationKey;
|
|
14
14
|
export declare const getCreatePisoPayDepositMutationKey: () => MutationKey;
|
|
15
15
|
export declare const getCreateGCashWithdrawalMutationKey: () => MutationKey;
|
|
16
|
+
export declare const getCreateGCashStandardCashInWithdrawalMutationKey: () => MutationKey;
|
|
16
17
|
export declare const getCreateMayaWithdrawalMutationKey: () => MutationKey;
|
|
17
18
|
export declare const getCreateMayaAppWithdrawalMutationKey: () => MutationKey;
|
|
18
19
|
export declare const getCreateInstapayWithdrawalMutationKey: () => MutationKey;
|
|
@@ -1,154 +1,155 @@
|
|
|
1
|
-
const PARENT_KEY =
|
|
1
|
+
const PARENT_KEY = "mutations";
|
|
2
2
|
export const getAuthenticateMutationKey = () => [
|
|
3
3
|
PARENT_KEY,
|
|
4
|
-
|
|
4
|
+
"authenticate",
|
|
5
5
|
];
|
|
6
6
|
export const getCheckInDailyQuestMutationKey = () => [
|
|
7
7
|
PARENT_KEY,
|
|
8
|
-
|
|
8
|
+
"checkInDailyQuest",
|
|
9
9
|
];
|
|
10
10
|
export const getClaimCashbackBonusMutationKey = () => [
|
|
11
11
|
PARENT_KEY,
|
|
12
|
-
|
|
12
|
+
"claimCashbackBonus",
|
|
13
13
|
];
|
|
14
14
|
export const getClaimSpotBonusMutationKey = () => [
|
|
15
15
|
PARENT_KEY,
|
|
16
|
-
|
|
16
|
+
"claimSpotBonus",
|
|
17
17
|
];
|
|
18
18
|
export const getCreateDigitainGameSessionMutationKey = () => [
|
|
19
19
|
PARENT_KEY,
|
|
20
|
-
|
|
20
|
+
"createDigitainGameSession",
|
|
21
21
|
];
|
|
22
22
|
export const getCreateGameSessionMutationKey = () => [
|
|
23
23
|
PARENT_KEY,
|
|
24
|
-
|
|
24
|
+
"createGameSession",
|
|
25
25
|
];
|
|
26
26
|
export const getCreateGCashDepositMutationKey = () => [
|
|
27
27
|
PARENT_KEY,
|
|
28
|
-
|
|
28
|
+
"createGCashDeposit",
|
|
29
29
|
];
|
|
30
30
|
export const getCreateMayaAppDepositMutationKey = () => [
|
|
31
31
|
PARENT_KEY,
|
|
32
|
-
|
|
32
|
+
"createMayaAppDeposit",
|
|
33
33
|
];
|
|
34
34
|
export const getCreateMayaDepositMutationKey = () => [
|
|
35
35
|
PARENT_KEY,
|
|
36
|
-
|
|
36
|
+
"createMayaDeposit",
|
|
37
37
|
];
|
|
38
38
|
export const getCreateOnlineBankDepositMutationKey = () => [
|
|
39
39
|
PARENT_KEY,
|
|
40
|
-
|
|
40
|
+
"createOnlineBankDeposit",
|
|
41
41
|
];
|
|
42
42
|
export const getCreateQRPHDepositMutationKey = () => [
|
|
43
43
|
PARENT_KEY,
|
|
44
|
-
|
|
44
|
+
"createQRPHDeposit",
|
|
45
45
|
];
|
|
46
46
|
export const getCreateLibanganDepositMutationKey = () => [
|
|
47
47
|
PARENT_KEY,
|
|
48
|
-
|
|
48
|
+
"createLibanganDeposit",
|
|
49
49
|
];
|
|
50
50
|
export const getCreatePisoPayDepositMutationKey = () => [
|
|
51
51
|
PARENT_KEY,
|
|
52
|
-
|
|
52
|
+
"createPisoPayDeposit",
|
|
53
53
|
];
|
|
54
54
|
export const getCreateGCashWithdrawalMutationKey = () => [
|
|
55
55
|
PARENT_KEY,
|
|
56
|
-
|
|
56
|
+
"createGCashWithdrawal",
|
|
57
57
|
];
|
|
58
|
+
export const getCreateGCashStandardCashInWithdrawalMutationKey = () => [PARENT_KEY, "createGCashStandardCashInWithdrawal"];
|
|
58
59
|
export const getCreateMayaWithdrawalMutationKey = () => [
|
|
59
60
|
PARENT_KEY,
|
|
60
|
-
|
|
61
|
+
"createMayaWithdrawal",
|
|
61
62
|
];
|
|
62
63
|
export const getCreateMayaAppWithdrawalMutationKey = () => [
|
|
63
64
|
PARENT_KEY,
|
|
64
|
-
|
|
65
|
+
"createMayaAppWithdrawal",
|
|
65
66
|
];
|
|
66
67
|
export const getCreateInstapayWithdrawalMutationKey = () => [
|
|
67
68
|
PARENT_KEY,
|
|
68
|
-
|
|
69
|
+
"createInstapayWithdrawal",
|
|
69
70
|
];
|
|
70
71
|
export const getCreateInstapayWithdrawalNextMutationKey = () => [
|
|
71
72
|
PARENT_KEY,
|
|
72
|
-
|
|
73
|
+
"createInstapayWithdrawalNext",
|
|
73
74
|
];
|
|
74
|
-
export const getCreateVentajaDisbursementWithdrawalMutationKey = () => [PARENT_KEY,
|
|
75
|
+
export const getCreateVentajaDisbursementWithdrawalMutationKey = () => [PARENT_KEY, "createVentajaDisbursementWithdrawal"];
|
|
75
76
|
export const getCreatePisoPayWithdrawalMutationKey = () => [
|
|
76
77
|
PARENT_KEY,
|
|
77
|
-
|
|
78
|
+
"createPisopayWithdrawal",
|
|
78
79
|
];
|
|
79
80
|
export const getMarkMessageAsReadMutationKey = () => [
|
|
80
81
|
PARENT_KEY,
|
|
81
|
-
|
|
82
|
+
"markMessageAsRead",
|
|
82
83
|
];
|
|
83
84
|
export const getCreateMemberVerificationQueryKey = () => [
|
|
84
85
|
PARENT_KEY,
|
|
85
|
-
|
|
86
|
+
"createMemberVerification",
|
|
86
87
|
];
|
|
87
88
|
export const getApproveMemberVerificationQueryKey = () => [
|
|
88
89
|
PARENT_KEY,
|
|
89
|
-
|
|
90
|
+
"approveMemberVerification",
|
|
90
91
|
];
|
|
91
92
|
export const getEndGameSessionMutationKey = () => [
|
|
92
93
|
PARENT_KEY,
|
|
93
|
-
|
|
94
|
+
"endGameSession",
|
|
94
95
|
];
|
|
95
96
|
export const getMarkGameAsFavoriteMutationKey = () => [
|
|
96
97
|
PARENT_KEY,
|
|
97
|
-
|
|
98
|
+
"markGameAsFavorite",
|
|
98
99
|
];
|
|
99
100
|
export const getUnmarkGameAsFavoriteMutationKey = () => [
|
|
100
101
|
PARENT_KEY,
|
|
101
|
-
|
|
102
|
+
"unmarkGameAsFavorite",
|
|
102
103
|
];
|
|
103
104
|
export const getUpdateAccountMutationKey = () => [
|
|
104
105
|
PARENT_KEY,
|
|
105
|
-
|
|
106
|
+
"updateAccount",
|
|
106
107
|
];
|
|
107
108
|
export const getUpdateMemberVerificationQueryKey = () => [
|
|
108
109
|
PARENT_KEY,
|
|
109
|
-
|
|
110
|
+
"updateMemberVerification",
|
|
110
111
|
];
|
|
111
112
|
export const getSendVerificationCodeMutationKey = () => [
|
|
112
113
|
PARENT_KEY,
|
|
113
|
-
|
|
114
|
+
"sendVerificationCode",
|
|
114
115
|
];
|
|
115
|
-
export const getSignInMutationKey = () => [PARENT_KEY,
|
|
116
|
-
export const getSignOutMutationKey = () => [PARENT_KEY,
|
|
117
|
-
export const getSignUpMutationKey = () => [PARENT_KEY,
|
|
116
|
+
export const getSignInMutationKey = () => [PARENT_KEY, "signIn"];
|
|
117
|
+
export const getSignOutMutationKey = () => [PARENT_KEY, "signOut"];
|
|
118
|
+
export const getSignUpMutationKey = () => [PARENT_KEY, "signUp"];
|
|
118
119
|
export const getCompleteOnboardingMutationKey = () => [
|
|
119
120
|
PARENT_KEY,
|
|
120
|
-
|
|
121
|
+
"completeOnboarding",
|
|
121
122
|
];
|
|
122
123
|
export const getSkipOnboardingMutationKey = () => [
|
|
123
124
|
PARENT_KEY,
|
|
124
|
-
|
|
125
|
+
"skipOnboarding",
|
|
125
126
|
];
|
|
126
127
|
export const getUploadFileMutationKey = () => [
|
|
127
128
|
PARENT_KEY,
|
|
128
|
-
|
|
129
|
+
"uploadFile",
|
|
129
130
|
];
|
|
130
131
|
export const getUploadImageFileMutationKey = () => [
|
|
131
132
|
PARENT_KEY,
|
|
132
|
-
|
|
133
|
+
"uploadImageFile",
|
|
133
134
|
];
|
|
134
135
|
export const getUploadPrivateImageFileMutationKey = () => [
|
|
135
136
|
PARENT_KEY,
|
|
136
|
-
|
|
137
|
+
"uploadPrivateImageFile",
|
|
137
138
|
];
|
|
138
139
|
export const getResetPasswordMutationKey = () => [
|
|
139
140
|
PARENT_KEY,
|
|
140
|
-
|
|
141
|
+
"resetPassword",
|
|
141
142
|
];
|
|
142
143
|
export const getUpdateSessionMutationKey = () => [
|
|
143
144
|
PARENT_KEY,
|
|
144
|
-
|
|
145
|
+
"updateSession",
|
|
145
146
|
];
|
|
146
147
|
export const getUnlinkGoogleMutationKey = () => [
|
|
147
148
|
PARENT_KEY,
|
|
148
|
-
|
|
149
|
+
"unlinkGoogle",
|
|
149
150
|
];
|
|
150
|
-
export const getGenerateSumsubVerificationTokenMutationKey = () => [PARENT_KEY,
|
|
151
|
+
export const getGenerateSumsubVerificationTokenMutationKey = () => [PARENT_KEY, "generateSumsubVerificationToken"];
|
|
151
152
|
export const getUnlinkFacebookMutationKey = () => [
|
|
152
153
|
PARENT_KEY,
|
|
153
|
-
|
|
154
|
+
"unlinkFacebook",
|
|
154
155
|
];
|