@opexa/portal-components 0.0.793 → 0.0.795
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/useCreateGCashWebpayDepositMutation.js +2 -2
- package/dist/client/hooks/useCreateMayaWebpayDepositMutation.d.ts +4 -0
- package/dist/client/hooks/useCreateMayaWebpayDepositMutation.js +76 -0
- package/dist/components/DepositWithdrawal/Deposit/Deposit.js +7 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaWebpayDeposit/MayaWebpayDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/MayaWebpayDeposit/MayaWebpayDeposit.js +166 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/PaymentMethods.js +5 -0
- package/dist/components/DepositWithdrawal/utils.d.ts +1 -1
- package/dist/components/DepositWithdrawal/utils.js +1 -0
- package/dist/components/KYC/KYCVerificationStatus.lazy.js +4 -7
- package/dist/components/TransactionRecords/TableFilters.js +1 -0
- package/dist/constants/EnvVar.d.ts +1 -1
- package/dist/services/queries.d.ts +3 -2
- package/dist/services/queries.js +55 -33
- package/dist/services/wallet.d.ts +13 -0
- package/dist/services/wallet.js +11 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/ui/Carousel/Carousel.d.ts +45 -45
- package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +306 -306
- package/dist/ui/Menu/menu.recipe.d.ts +17 -17
- package/dist/ui/Popover/Popover.d.ts +55 -55
- package/dist/ui/Popover/popover.recipe.d.ts +5 -5
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- package/dist/ui/QrCode/QrCode.d.ts +25 -25
- package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
- package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
- package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/table.anatomy.d.ts +1 -1
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/dist/utils/mutationKeys.d.ts +3 -1
- package/dist/utils/mutationKeys.js +56 -48
- package/package.json +1 -1
- package/dist/components/Banner/Banner.client.d.ts +0 -12
- package/dist/components/Banner/Banner.client.js +0 -49
- package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
- package/dist/components/DigitainLauncher/Loading.js +0 -5
- package/dist/components/KYC/BasicInformation.d.ts +0 -1
- package/dist/components/KYC/BasicInformation.js +0 -101
- package/dist/components/KYC/IdentityVerification.d.ts +0 -1
- package/dist/components/KYC/IdentityVerification.js +0 -120
- package/dist/components/KYC/Indicator.d.ts +0 -1
- package/dist/components/KYC/Indicator.js +0 -8
- package/dist/components/KYC/KYC.lazy.d.ts +0 -6
- package/dist/components/KYC/KYC.lazy.js +0 -45
- package/dist/components/KYC/KYCContext.d.ts +0 -6
- package/dist/components/KYC/KYCContext.js +0 -2
- package/dist/components/KYC/PersonalInformation.d.ts +0 -1
- package/dist/components/KYC/PersonalInformation.js +0 -122
- package/dist/components/KYC/useKYC.d.ts +0 -25
- package/dist/components/KYC/useKYC.js +0 -38
- package/dist/components/PortalProvider/AndroidOnlyComponents.d.ts +0 -1
- package/dist/components/PortalProvider/AndroidOnlyComponents.js +0 -12
- package/dist/components/PortalProvider/CXDTokenObserver.d.ts +0 -1
- package/dist/components/PortalProvider/CXDTokenObserver.js +0 -30
- package/dist/components/SignIn/utils.d.ts +0 -8
- package/dist/components/SignIn/utils.js +0 -26
- package/dist/constants/Branches.d.ts +0 -2
- package/dist/constants/Branches.js +0 -42
- package/dist/images/responsible-gaming-yellow.png +0 -0
- package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
- package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
- package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
- package/dist/third-parties/FacebookPixel/api.js +0 -1
- package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
- package/dist/third-parties/FacebookPixel/index.js +0 -1
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
- package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
- package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
- package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
- package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
- package/dist/third-parties/index.d.ts +0 -2
- package/dist/third-parties/index.js +0 -2
|
@@ -6,7 +6,7 @@ import { ObjectType } from '../../services/ObjectType.js';
|
|
|
6
6
|
import { createGCashWebpayDeposit, getDeposit, } from '../../services/wallet.js';
|
|
7
7
|
import { createPoll } from '../../utils/createPoll.js';
|
|
8
8
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
9
|
-
import {
|
|
9
|
+
import { getCreateGCashWebpayDepositMutationKey } from '../../utils/mutationKeys.js';
|
|
10
10
|
import { parseDecimal } from '../../utils/parseDecimal.js';
|
|
11
11
|
import { getAvailableQuestsQueryKey, getDepositsCountQueryKey, } from '../../utils/queryKeys.js';
|
|
12
12
|
import { getSession } from '../services/getSession.js';
|
|
@@ -14,7 +14,7 @@ export const useCreateGCashWebpayDepositMutation = (config) => {
|
|
|
14
14
|
const queryClient = getQueryClient();
|
|
15
15
|
const mutation = useMutation({
|
|
16
16
|
...config,
|
|
17
|
-
mutationKey:
|
|
17
|
+
mutationKey: getCreateGCashWebpayDepositMutationKey(),
|
|
18
18
|
mutationFn: async (input) => {
|
|
19
19
|
const id = input.id ?? ObjectId.generate(ObjectType.Deposit).toString();
|
|
20
20
|
const session = await getSession();
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SetOptional } from 'type-fest';
|
|
2
|
+
import { type CreateMayaWebpayDepositInput } from '../../services/wallet';
|
|
3
|
+
import type { Deposit, Mutation } from '../../types';
|
|
4
|
+
export declare const useCreateMayaWebpayDepositMutation: Mutation<Deposit, SetOptional<CreateMayaWebpayDepositInput, 'id'>>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { ObjectId } from '@opexa/object-id';
|
|
2
|
+
import { useMutation } from '@tanstack/react-query';
|
|
3
|
+
import { clamp } from 'lodash-es';
|
|
4
|
+
import invariant from 'tiny-invariant';
|
|
5
|
+
import { ObjectType } from '../../services/ObjectType.js';
|
|
6
|
+
import { createMayaWebpayDeposit, getDeposit, } from '../../services/wallet.js';
|
|
7
|
+
import { createPoll } from '../../utils/createPoll.js';
|
|
8
|
+
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
9
|
+
import { getCreateMayaWebpayDepositMutationKey } from '../../utils/mutationKeys.js';
|
|
10
|
+
import { parseDecimal } from '../../utils/parseDecimal.js';
|
|
11
|
+
import { getAvailableQuestsQueryKey, getDepositsCountQueryKey, } from '../../utils/queryKeys.js';
|
|
12
|
+
import { getSession } from '../services/getSession.js';
|
|
13
|
+
export const useCreateMayaWebpayDepositMutation = (config) => {
|
|
14
|
+
const queryClient = getQueryClient();
|
|
15
|
+
const mutation = useMutation({
|
|
16
|
+
...config,
|
|
17
|
+
mutationKey: getCreateMayaWebpayDepositMutationKey(),
|
|
18
|
+
mutationFn: async (input) => {
|
|
19
|
+
const id = input.id ?? ObjectId.generate(ObjectType.Deposit).toString();
|
|
20
|
+
const session = await getSession();
|
|
21
|
+
invariant(session.status === 'authenticated');
|
|
22
|
+
await createMayaWebpayDeposit({
|
|
23
|
+
...input,
|
|
24
|
+
id,
|
|
25
|
+
}, {
|
|
26
|
+
headers: {
|
|
27
|
+
Authorization: `Bearer ${session.token}`,
|
|
28
|
+
...(session.domain && {
|
|
29
|
+
Domain: session.domain,
|
|
30
|
+
}),
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
const poll = createPoll(async () => {
|
|
34
|
+
const session = await getSession();
|
|
35
|
+
invariant(session.status === 'authenticated');
|
|
36
|
+
return await getDeposit(id, {
|
|
37
|
+
headers: {
|
|
38
|
+
Authorization: `Bearer ${session.token}`,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
}, {
|
|
42
|
+
until(res) {
|
|
43
|
+
return (!!res?.checkoutUrl || !!res?.error || res?.status === 'FAILED');
|
|
44
|
+
},
|
|
45
|
+
interval: 1000,
|
|
46
|
+
maxAttempt: 20,
|
|
47
|
+
});
|
|
48
|
+
const res = await poll();
|
|
49
|
+
if (!res?.checkoutUrl) {
|
|
50
|
+
const error = new Error();
|
|
51
|
+
error.name = 'GCashDepositError';
|
|
52
|
+
error.message = 'Failed to process GCash deposit';
|
|
53
|
+
throw error;
|
|
54
|
+
}
|
|
55
|
+
const depositsCount = queryClient.getQueryData(getDepositsCountQueryKey()) ?? 0;
|
|
56
|
+
if (depositsCount <= 0) {
|
|
57
|
+
queryClient.setQueryData(getAvailableQuestsQueryKey(), (prev) => {
|
|
58
|
+
return prev?.map((quest) => {
|
|
59
|
+
const progressPercentage = clamp(parseDecimal(quest.progressPercentage, 0) + 50, 100);
|
|
60
|
+
if (quest.type === 'ONBOARDING') {
|
|
61
|
+
return {
|
|
62
|
+
...quest,
|
|
63
|
+
status: progressPercentage >= 100 ? 'COMPLETED' : quest.status,
|
|
64
|
+
progressPercentage: progressPercentage.toFixed(2),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
return quest;
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
queryClient.setQueryData(getDepositsCountQueryKey(), (prev) => prev ? prev + 1 : 1);
|
|
72
|
+
return res;
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
return mutation;
|
|
76
|
+
};
|
|
@@ -17,6 +17,7 @@ import { GCashWebpayDeposit } from './GCashWebpayDeposit/GCashWebpayDeposit.js';
|
|
|
17
17
|
import { LibanganDeposit } from './LibanganDeposit/LibanganDeposit.js';
|
|
18
18
|
import { MayaAppDeposit } from './MayaAppDeposit/MayaAppDeposit.js';
|
|
19
19
|
import { MayaDeposit } from './MayaDeposit/MayaDeposit.js';
|
|
20
|
+
import { MayaWebpayDeposit } from './MayaWebpayDeposit/MayaWebpayDeposit.js';
|
|
20
21
|
import { OnlineBankDeposit } from './OnlineBankDeposit/OnlineBankDeposit.js';
|
|
21
22
|
import { PisoPayDeposit } from './PisoPayDeposit/PisoPayDeposit.js';
|
|
22
23
|
import { QRPHDeposit } from './QRPHDeposit/QRPHDeposit.js';
|
|
@@ -79,6 +80,11 @@ export function Deposit() {
|
|
|
79
80
|
enabled: paymentSettings?.gcashWebpayDepositGatewaySettings?.[enabledKey] &&
|
|
80
81
|
featureFlag.enabled,
|
|
81
82
|
},
|
|
83
|
+
{
|
|
84
|
+
method: 'MAYA_WEBPAY',
|
|
85
|
+
enabled: paymentSettings?.mayaWebpayDepositGatewaySettings?.[enabledKey] &&
|
|
86
|
+
featureFlag.enabled,
|
|
87
|
+
},
|
|
82
88
|
];
|
|
83
89
|
paymentMethods.forEach((o) => {
|
|
84
90
|
if (o.enabled) {
|
|
@@ -104,7 +110,7 @@ export function Deposit() {
|
|
|
104
110
|
if (enabledPaymentMethods.length <= 0) {
|
|
105
111
|
return _jsx(NoAvailablePaymentMethods, {});
|
|
106
112
|
}
|
|
107
|
-
return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'QRPH' && _jsx(QRPHDeposit, {}), paymentMethod === 'GCASH' && _jsx(GCashDeposit, {}), paymentMethod === 'MAYA' && _jsx(MayaDeposit, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppDeposit, {}), paymentMethod === 'ONLINE_BANK' && _jsx(OnlineBankDeposit, {}), paymentMethod === 'LIBANGAN_PAY_IN' && _jsx(LibanganDeposit, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayDeposit, {}), paymentMethod === 'AIO_GCASH' && _jsx(AiOGCashDeposit, {}), paymentMethod === 'AIO_PAY_MAYA' && _jsx(AiOPayMayaDeposit, {}), paymentMethod === 'AIO_GRAB_PAY' && _jsx(AiOGrabPayDeposit, {}), paymentMethod === 'AIO_PALAWAN_PAY' && _jsx(AiOPalawanPayDeposit, {}), paymentMethod === 'GCASH_WEBPAY' && _jsx(GCashWebpayDeposit, {})] }));
|
|
113
|
+
return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'QRPH' && _jsx(QRPHDeposit, {}), paymentMethod === 'GCASH' && _jsx(GCashDeposit, {}), paymentMethod === 'MAYA' && _jsx(MayaDeposit, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppDeposit, {}), paymentMethod === 'ONLINE_BANK' && _jsx(OnlineBankDeposit, {}), paymentMethod === 'LIBANGAN_PAY_IN' && _jsx(LibanganDeposit, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayDeposit, {}), paymentMethod === 'AIO_GCASH' && _jsx(AiOGCashDeposit, {}), paymentMethod === 'AIO_PAY_MAYA' && _jsx(AiOPayMayaDeposit, {}), paymentMethod === 'AIO_GRAB_PAY' && _jsx(AiOGrabPayDeposit, {}), paymentMethod === 'AIO_PALAWAN_PAY' && _jsx(AiOPalawanPayDeposit, {}), paymentMethod === 'GCASH_WEBPAY' && _jsx(GCashWebpayDeposit, {}), paymentMethod === 'MAYA_WEBPAY' && _jsx(MayaWebpayDeposit, {})] }));
|
|
108
114
|
}
|
|
109
115
|
function MayaSessionSessionExpired() {
|
|
110
116
|
return (_jsxs("div", { className: "py-xl", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-warning-secondary", children: _jsx(AlertCircleIcon, { className: "size-6 text-text-featured-icon-light-warning" }) }), _jsx("h2", { className: "mt-lg text-center font-semibold text-lg", children: "Session Expired" }), _jsx("p", { className: "mx-auto mt-xs max-w-[25rem] text-center text-sm text-text-tertiary-600", children: "Your session has timed out. To continue with deposits or withdrawals, Please try reloading the app." })] }));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function MayaWebpayDeposit(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
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 invariant from 'tiny-invariant';
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import { useShallow } from 'zustand/shallow';
|
|
9
|
+
import { useAvailablePromosQuery } from '../../../../client/hooks/useAvailablePromosQuery.js';
|
|
10
|
+
import { useCreateMayaWebpayDepositMutation } from '../../../../client/hooks/useCreateMayaWebpayDepositMutation.js';
|
|
11
|
+
import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
|
|
12
|
+
import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
|
|
13
|
+
import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
|
|
14
|
+
import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
|
|
15
|
+
import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
|
|
16
|
+
import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
|
|
17
|
+
import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
|
|
18
|
+
import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.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 { Portal } from '../../../../ui/Portal/index.js';
|
|
26
|
+
import { parseDecimal } from '../../../../utils/parseDecimal.js';
|
|
27
|
+
import { AmountChoices } from '../../AmountChoices.js';
|
|
28
|
+
import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
|
|
29
|
+
import { AvailablePromos } from '../AvailablePromos.js';
|
|
30
|
+
export function MayaWebpayDeposit() {
|
|
31
|
+
const depositWithdrawalProps = useDepositWithdrawalPropsContext();
|
|
32
|
+
const disclosure = useDisclosure();
|
|
33
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
34
|
+
depositWithdrawal: ctx.depositWithdrawal,
|
|
35
|
+
kycVerificationStatus: ctx.kycVerificationStatus,
|
|
36
|
+
})));
|
|
37
|
+
const verificationQuery = useMemberVerificationQuery();
|
|
38
|
+
const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
|
|
39
|
+
const [status, setStatus] = useState('waiting');
|
|
40
|
+
const createDepositMutation = useCreateMayaWebpayDepositMutation({
|
|
41
|
+
onMutate() {
|
|
42
|
+
disclosure.setOpen(true);
|
|
43
|
+
setStatus('processing');
|
|
44
|
+
},
|
|
45
|
+
onSuccess(data) {
|
|
46
|
+
invariant(data.checkoutUrl);
|
|
47
|
+
window.open(data.checkoutUrl, '_blank', 'noopener,noreferrer');
|
|
48
|
+
setStatus('success');
|
|
49
|
+
},
|
|
50
|
+
onError() {
|
|
51
|
+
setStatus('failed');
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
const depositsCountQuery = useDepositsCountQuery();
|
|
55
|
+
const depositsCount = depositsCountQuery.data ?? 0;
|
|
56
|
+
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
57
|
+
const paymentSettings = paymentSettingsQuery.data;
|
|
58
|
+
const gatewaySettings = paymentSettings?.mayaWebpayDepositGatewaySettings;
|
|
59
|
+
const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
|
|
60
|
+
const minimumAmount = depositsCount <= 0
|
|
61
|
+
? parseDecimal(paymentSettingsQuery.data?.minimumFirstDepositAmount, 0)
|
|
62
|
+
: parseDecimal(gatewaySettings?.minimumAmount, 0);
|
|
63
|
+
const promosQuery = useAvailablePromosQuery();
|
|
64
|
+
const promos = promosQuery.data ?? [];
|
|
65
|
+
const definition = z
|
|
66
|
+
.object({
|
|
67
|
+
amount: z.string().superRefine((val, ctx) => {
|
|
68
|
+
const n = parseDecimal(val, 0);
|
|
69
|
+
if (n < minimumAmount) {
|
|
70
|
+
ctx.addIssue({
|
|
71
|
+
type: 'number',
|
|
72
|
+
code: z.ZodIssueCode.too_small,
|
|
73
|
+
inclusive: true,
|
|
74
|
+
minimum: minimumAmount,
|
|
75
|
+
message: `Minimum amount is ${minimumAmount.toLocaleString()}`,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (n > maximumAmount) {
|
|
79
|
+
ctx.addIssue({
|
|
80
|
+
type: 'number',
|
|
81
|
+
code: z.ZodIssueCode.too_big,
|
|
82
|
+
inclusive: true,
|
|
83
|
+
maximum: maximumAmount,
|
|
84
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}),
|
|
88
|
+
promo: z.string().optional().nullable(),
|
|
89
|
+
})
|
|
90
|
+
.superRefine((value, ctx) => {
|
|
91
|
+
const promo = promos.find((o) => o.id === value.promo);
|
|
92
|
+
const promoMinAmount = parseDecimal(promo?.minimumDepositAmount, 0);
|
|
93
|
+
const promoMaxAmount = parseDecimal(promo?.maximumDepositAmount, 0);
|
|
94
|
+
const amount = parseDecimal(value.amount, 0);
|
|
95
|
+
if (promo && amount < promoMinAmount) {
|
|
96
|
+
ctx.addIssue({
|
|
97
|
+
path: ['amount'],
|
|
98
|
+
code: z.ZodIssueCode.custom,
|
|
99
|
+
message: `Minimum amount for this promo is ${promoMinAmount.toLocaleString()}`,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
if (promo && amount > promoMaxAmount) {
|
|
103
|
+
ctx.addIssue({
|
|
104
|
+
path: ['amount'],
|
|
105
|
+
code: z.ZodIssueCode.custom,
|
|
106
|
+
message: `Maximum amount for this promo is ${promoMaxAmount}`,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
const form = useForm({
|
|
111
|
+
mode: 'all',
|
|
112
|
+
resolver: zodResolver(definition),
|
|
113
|
+
defaultValues: {
|
|
114
|
+
amount: '0',
|
|
115
|
+
promo: globalStore.depositWithdrawal.promo ?? null,
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
useEffect(() => {
|
|
119
|
+
if (minimumAmount) {
|
|
120
|
+
form.reset({
|
|
121
|
+
amount: minimumAmount.toString(),
|
|
122
|
+
promo: form.getValues('promo') ?? null,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}, [form, minimumAmount]);
|
|
126
|
+
return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
|
|
127
|
+
if (verificationStatus === 'PENDING' ||
|
|
128
|
+
verificationStatus === 'UNVERIFIED' ||
|
|
129
|
+
verificationStatus === 'REJECTED' ||
|
|
130
|
+
verificationStatus === 'CREATED') {
|
|
131
|
+
globalStore.kycVerificationStatus.setOpen(true);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
createDepositMutation.reset();
|
|
136
|
+
createDepositMutation.mutate({
|
|
137
|
+
amount: data.amount.toString(),
|
|
138
|
+
promo: data.promo ?? undefined,
|
|
139
|
+
redirectUrl: window.location.origin.includes('localhost')
|
|
140
|
+
? 'https://uat.powerplay.ph'
|
|
141
|
+
: window.location.origin,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
|
|
145
|
+
o.field.onChange(details.value);
|
|
146
|
+
}, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _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) => {
|
|
147
|
+
form.setValue('amount', value.toString(), {
|
|
148
|
+
shouldTouch: true,
|
|
149
|
+
shouldDirty: true,
|
|
150
|
+
shouldValidate: true,
|
|
151
|
+
});
|
|
152
|
+
}, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { value: o.field.value, onChange: (value) => {
|
|
153
|
+
o.field.onChange(value);
|
|
154
|
+
globalStore.depositWithdrawal.setPromo(null);
|
|
155
|
+
}, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["By depositing, 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: disclosure.open, onOpenChange: (details) => {
|
|
156
|
+
disclosure.setOpen(details.open);
|
|
157
|
+
if (!details.open) {
|
|
158
|
+
setStatus('waiting');
|
|
159
|
+
form.reset();
|
|
160
|
+
}
|
|
161
|
+
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, 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, { 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 Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
|
|
162
|
+
"We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
|
|
163
|
+
'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
|
|
164
|
+
api.setOpen(false);
|
|
165
|
+
}, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
|
|
166
|
+
}
|
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const OnlineBankDepositContext: (props: {
|
|
2
2
|
value: {
|
|
3
|
-
view: "
|
|
3
|
+
view: "vca" | "form";
|
|
4
4
|
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
5
5
|
verify: () => void;
|
|
6
6
|
reset: () => void;
|
|
@@ -13,7 +13,7 @@ export declare const OnlineBankDepositContext: (props: {
|
|
|
13
13
|
} & {
|
|
14
14
|
children?: import("react").ReactNode | undefined;
|
|
15
15
|
}) => React.ReactNode, useOnlineBankDepositContext: () => {
|
|
16
|
-
view: "
|
|
16
|
+
view: "vca" | "form";
|
|
17
17
|
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
18
18
|
verify: () => void;
|
|
19
19
|
reset: () => void;
|
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Deposit } from '../../../../types';
|
|
2
2
|
export type UseOnlineBankDepositReturn = ReturnType<typeof useOnlineBankDeposit>;
|
|
3
3
|
export declare function useOnlineBankDeposit(): {
|
|
4
|
-
view: "
|
|
4
|
+
view: "vca" | "form";
|
|
5
5
|
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
6
6
|
verify: () => void;
|
|
7
7
|
reset: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const QRPHDepositContext: (props: {
|
|
2
2
|
value: {
|
|
3
|
-
view: "
|
|
3
|
+
view: "qrCode" | "form";
|
|
4
4
|
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
5
5
|
verify: () => void;
|
|
6
6
|
reset: () => void;
|
|
@@ -13,7 +13,7 @@ export declare const QRPHDepositContext: (props: {
|
|
|
13
13
|
} & {
|
|
14
14
|
children?: import("react").ReactNode | undefined;
|
|
15
15
|
}) => React.ReactNode, useQRPHDepositContext: () => {
|
|
16
|
-
view: "
|
|
16
|
+
view: "qrCode" | "form";
|
|
17
17
|
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
18
18
|
verify: () => void;
|
|
19
19
|
reset: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Deposit } from '../../../../types';
|
|
2
2
|
export type UseQRPHDepositReturn = ReturnType<typeof useQRPHDeposit>;
|
|
3
3
|
export declare function useQRPHDeposit(): {
|
|
4
|
-
view: "
|
|
4
|
+
view: "qrCode" | "form";
|
|
5
5
|
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
6
6
|
verify: () => void;
|
|
7
7
|
reset: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { KnownDepositError, KnownWithdrawalError, WithdrawalError } from '../../types';
|
|
3
|
-
export declare const PaymentMethodDefinition: z.ZodEnum<["GCASH", "GCASH_STANDARD_CASH_IN", "MAYA_APP", "MAYA", "ONLINE_BANK", "QRPH", "INSTAPAY", "LIBANGAN_PAY_IN", "VENTAJA_DISBURSEMENT", "PISO_PAY", "AIO_GCASH", "AIO_PAY_MAYA", "AIO_GRAB_PAY", "AIO_PALAWAN_PAY", "GCASH_WEBPAY"]>;
|
|
3
|
+
export declare const PaymentMethodDefinition: z.ZodEnum<["GCASH", "GCASH_STANDARD_CASH_IN", "MAYA_APP", "MAYA", "ONLINE_BANK", "QRPH", "INSTAPAY", "LIBANGAN_PAY_IN", "VENTAJA_DISBURSEMENT", "PISO_PAY", "AIO_GCASH", "AIO_PAY_MAYA", "AIO_GRAB_PAY", "AIO_PALAWAN_PAY", "GCASH_WEBPAY", "MAYA_WEBPAY"]>;
|
|
4
4
|
export type PaymentMethod = z.infer<typeof PaymentMethodDefinition>;
|
|
5
5
|
export type DepositWithdrawalErrors = KnownDepositError | KnownWithdrawalError | WithdrawalError | string;
|
|
6
6
|
export declare function explainError(error?: DepositWithdrawalErrors): string;
|
|
@@ -15,6 +15,7 @@ export const PaymentMethodDefinition = z.enum([
|
|
|
15
15
|
'AIO_GRAB_PAY',
|
|
16
16
|
'AIO_PALAWAN_PAY',
|
|
17
17
|
'GCASH_WEBPAY',
|
|
18
|
+
'MAYA_WEBPAY',
|
|
18
19
|
]);
|
|
19
20
|
const errorMap = {
|
|
20
21
|
DAILY_PURCHASE_OR_DEPOSIT_LIMIT_EXCEEDED: 'You have exceeded your daily purchase or deposit limit. Please try again tomorrow.',
|
|
@@ -19,18 +19,15 @@ export function KYCVerificationStatus() {
|
|
|
19
19
|
const icons = status === 'PENDING' ? bellIcon : alertIcon;
|
|
20
20
|
return (_jsx(Dialog.Root, { open: globalStore.kycVerificationStatus.open, onOpenChange: (details) => {
|
|
21
21
|
globalStore.kycVerificationStatus.setOpen(details.open);
|
|
22
|
-
}, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsx(Dialog.Content, { className: "mx-auto h-fit w-[450px] overflow-y-auto rounded-lg bg-bg-primary", children: _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mb-3xl grid h-[200px] w-full place-items-center rounded-xl bg-radial from-40% from-button-primary-bg to-bg-brand-solid", children: _jsx(Image, { src: icons, alt: "icon", className: "w-60 object-contain", draggable: false, width: 120, height: 120 }) }), _jsxs("h1", { className: "font-semibold text-lg text-white", children: [status === 'PENDING' && 'Verification in Progress', status === 'REJECTED' && 'Verification Rejected', status === 'UNVERIFIED'
|
|
23
|
-
(status === 'CREATED' && 'Verification Required')] }), _jsxs("p", { className: "mb-4xl text-[#94969C] text-base", children: [status === 'PENDING' &&
|
|
22
|
+
}, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsx(Dialog.Content, { className: "mx-auto h-fit w-[450px] overflow-y-auto rounded-lg bg-bg-primary", children: _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mb-3xl grid h-[200px] w-full place-items-center rounded-xl bg-radial from-40% from-button-primary-bg to-bg-brand-solid", children: _jsx(Image, { src: icons, alt: "icon", className: "w-60 object-contain", draggable: false, width: 120, height: 120 }) }), _jsxs("h1", { className: "font-semibold text-lg text-white", children: [status === 'PENDING' && 'Verification in Progress', status === 'REJECTED' && 'Verification Rejected', status === 'UNVERIFIED' && 'Verification Required'] }), _jsxs("p", { className: "mb-4xl text-[#94969C] text-base", children: [status === 'PENDING' &&
|
|
24
23
|
`Your account verification is still under review. Please wait
|
|
25
24
|
until it's approved before you can continue playing or
|
|
26
25
|
depositing.`, status === 'REJECTED' &&
|
|
27
|
-
'Your account verification was not approved. Please resubmit your verification to regain full access.', status === 'UNVERIFIED'
|
|
28
|
-
(status === '
|
|
29
|
-
'Your account is not yet verified. Please complete the verification process to continue playing or depositing.')] }), _jsxs(Button, { variant: "solid", className: twMerge('mb-2 w-full', status === 'PENDING' && 'hidden'), onClick: () => {
|
|
26
|
+
'Your account verification was not approved. Please resubmit your verification to regain full access.', status === 'UNVERIFIED' &&
|
|
27
|
+
'Your account is not yet verified. Please complete the verification process to continue playing or depositing.'] }), _jsxs(Button, { variant: "solid", className: twMerge('mb-2 w-full', status === 'PENDING' && 'hidden'), onClick: () => {
|
|
30
28
|
globalStore.kycVerificationStatus.setOpen(false);
|
|
31
29
|
globalStore.kyc.setOpen(true);
|
|
32
|
-
}, children: [status === 'REJECTED' && 'Resubmit Verification', status === 'UNVERIFIED'
|
|
33
|
-
(status === 'CREATED' && 'Verify Now')] }), _jsx(Button, { type: "button", variant: "outline", onClick: () => {
|
|
30
|
+
}, children: [status === 'REJECTED' && 'Resubmit Verification', status === 'UNVERIFIED' && 'Verify Now'] }), _jsx(Button, { type: "button", variant: "outline", onClick: () => {
|
|
34
31
|
globalStore.kycVerificationStatus.setOpen(false);
|
|
35
32
|
}, children: "Close" })] }) }) })] }) }));
|
|
36
33
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const SITE_ID: string;
|
|
2
2
|
export declare const PLATFORM_ID: string;
|
|
3
3
|
export declare const PLATFORM_CODE: string;
|
|
4
|
-
export declare const ENVIRONMENT: "
|
|
4
|
+
export declare const ENVIRONMENT: "production" | "development";
|
|
5
5
|
export declare const INTERNALS__REPORT_WEB_VITALS: boolean;
|
|
@@ -38,12 +38,13 @@ export declare const CREATE_GCASH_WEBPAY_DEPOSIT = "\n mutation CreateGCashWebp
|
|
|
38
38
|
export declare const CREATE_LIBANGAN_DEPOSIT = "\n mutation CreateLibanganPayInDeposit(\n $input: CreateLibanganPayInDepositInput!\n ) {\n createLibanganPayInDeposit(input: $input) {\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on ExpiredSessionError {\n name: __typename\n message\n }\n }\n }\n";
|
|
39
39
|
export declare const CREATE_PISO_PAY_DEPOSIT = "\n mutation CreatePisoPayDeposit($input: CreatePisoPayCheckoutDepositInput!) {\n createPisoPayCheckoutDeposit(input: $input) {\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n }\n }\n";
|
|
40
40
|
export declare const CREATE_MAYA_DEPOSIT = "\n mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {\n createMayaDeposit(input: $input) {\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n }\n }\n";
|
|
41
|
+
export declare const CREATE_MAYA_WEBPAY_DEPOSIT = "\n mutation CreateMayaWebpayDeposit($input: CreateMayaWebpayDepositInput!) {\n createMayaWebpayDeposit(input: $input) {\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n }\n }\n";
|
|
41
42
|
export declare const CREATE_MAYA_APP_DEPOSIT = "\n mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {\n createMayaAppDeposit(input: $input) {\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n }\n }\n";
|
|
42
43
|
export declare const CREATE_AIO_QRPH_DEPOSIT = "\n mutation CreateAIOQRPHDeposit($input: CreateAIOQRPHDepositInput!) {\n createAIOQRPHDeposit(input: $input) {\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on ReCAPTCHAVerificationFailedError {\n name: __typename\n message\n }\n }\n }\n";
|
|
43
44
|
export declare const CREATE_AIO_ONLINE_BANK_DEPOSIT = "\n mutation CreateAIOOnlineBankDeposit(\n $input: CreateAIOOnlineBankDepositInput!\n ) {\n createAIOOnlineBankDeposit(input: $input) {\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n }\n }\n";
|
|
44
45
|
export declare const CREATE_MANUAL_BANK_DEPOSIT = "\n mutation CreateManualBankDeposit($input: CreateManualBankDepositInput!) {\n createManualBankDeposit(input: $input) {\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on FileDoesNotExistError {\n name: __typename\n message\n }\n ... on FileNotReadyError {\n name: __typename\n message\n }\n }\n }\n";
|
|
45
46
|
export declare const CREATE_MANUAL_UPI_DEPOSIT = "\n mutation CreateManualUPIDeposit($input: CreateManualUPIDepositInput!) {\n createManualUPIDeposit(input: $input) {\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on UPIReferenceNotAvailableError {\n name: __typename\n message\n }\n }\n }\n";
|
|
46
|
-
export declare const DEPOSIT = "\n query Deposit($id: ObjectId!) {\n node(id: $id) {\n ... on GCashDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on MayaDeposit {\n id\n type\n status\n checkoutUrl\n }\n ... on MayaAppDeposit {\n id\n type\n status\n error\n }\n ... on BankDeposit {\n id\n type\n status\n error\n }\n ... on ManualDeposit {\n id\n type\n status\n error\n }\n ... on QRPHDeposit {\n id\n type\n status\n qrCode\n error\n }\n ... on OnlineBankDeposit {\n id\n type\n status\n vca\n error\n }\n ... on GCashWebpayDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on LibanganPayInDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on PisoPayCheckoutDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on AiOGCashDeposit {\n id\n type\n status\n checkoutUrl\n error\n } \n ... on AiOGrabPayDeposit {\n id\n type\n status\n checkoutUrl\n error\n } \n ... on AiOPalawanPayDeposit {\n id\n type\n status\n checkoutUrl\n error\n } \n ... on AiOPayMayaDeposit {\n id\n type\n status\n checkoutUrl\n error\n } \n }\n }\n";
|
|
47
|
+
export declare const DEPOSIT = "\n query Deposit($id: ObjectId!) {\n node(id: $id) {\n ... on GCashDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on MayaDeposit {\n id\n type\n status\n checkoutUrl\n }\n ... on MayaAppDeposit {\n id\n type\n status\n error\n }\n ... on BankDeposit {\n id\n type\n status\n error\n }\n ... on ManualDeposit {\n id\n type\n status\n error\n }\n ... on QRPHDeposit {\n id\n type\n status\n qrCode\n error\n }\n ... on OnlineBankDeposit {\n id\n type\n status\n vca\n error\n }\n ... on GCashWebpayDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on LibanganPayInDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on PisoPayCheckoutDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on AiOGCashDeposit {\n id\n type\n status\n checkoutUrl\n error\n } \n ... on AiOGrabPayDeposit {\n id\n type\n status\n checkoutUrl\n error\n } \n ... on AiOPalawanPayDeposit {\n id\n type\n status\n checkoutUrl\n error\n } \n ... on AiOPayMayaDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on MayaWebpayDeposit {\n id\n type\n status\n checkoutUrl\n error\n } \n }\n }\n";
|
|
47
48
|
export declare const DEPOSITS_COUNT = "\n query DepositsCount {\n member {\n depositsCount\n }\n }\n";
|
|
48
49
|
export declare const TOUCH_GCASH_DEPOSIT = "\n mutation TouchGCashDeposit($input: TouchGCashDepositInput!) {\n touchGCashDeposit(input: $input)\n }\n";
|
|
49
50
|
export declare const TOUCH_QRPH_DEPOSIT = "\n mutation TouchQRPHDeposit($input: TouchQRPHDepositInput!) {\n touchQRPHDeposit(input: $input)\n }\n";
|
|
@@ -91,7 +92,7 @@ export declare const UPDATE_MEMBER_VERIFICATION__NEXT = "\n mutation UpdateMemb
|
|
|
91
92
|
export declare const PROFILE_COMPLETION = "\n query ProfileCompletion {\n profileCompletion {\n completionPercentage\n personalInformation\n accountVerification\n mobileNumberVerification\n transactionPassword\n accountPassword\n }\n }\n";
|
|
92
93
|
export declare const REGISTER_MEMBER_ACCOUNT_BY_MOBILE_NUMBER = "\n mutation RegisterMemberAccountByMobileNumber(\n $input: RegisterMemberAccountByMobileNumberInput!\n $mobileNumberVerificationCode: String!\n ) {\n registerMemberAccountByMobileNumber(\n input: $input\n mobileNumberVerificationCode: $mobileNumberVerificationCode\n ) {\n ... on MobileNumberNotAvailableError {\n name: __typename\n message\n }\n ... on InvalidSMSVerificationCodeError {\n name: __typename\n message\n }\n ... on InvalidPlatformError {\n name: __typename\n message\n }\n }\n }\n";
|
|
93
94
|
export declare const PLATFORM = "\n query Platform {\n timezone\n currency\n }\n";
|
|
94
|
-
export declare const PAYMENT_SETTINGS = "\n fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {\n minimumAmount\n maximumAmount\n webEnabled\n mobileWebEnabled\n androidEnabled\n iosEnabled\n bankAccountName\n bankAccountNumber\n bankIFSCCode\n upiId\n upiQRCode {\n id\n url\n }\n }\n\n fragment WithdrawalGatewaySettingsCoreData on WithdrawalGatewaySettings {\n minimumAmount\n maximumAmount\n webEnabled\n mobileWebEnabled\n androidEnabled\n iosEnabled\n }\n\n query PaymentSettings {\n minimumFirstDepositAmount\n restrictWithdrawalsToVerifiedMembers\n bankDepositGatewaySettings: depositGatewaySettings(gateway: BANK) {\n ...DepositGatewaySettingsCoreData\n }\n libanganDepositGatewaySettings: depositGatewaySettings(
|
|
95
|
+
export declare const PAYMENT_SETTINGS = "\n fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {\n minimumAmount\n maximumAmount\n webEnabled\n mobileWebEnabled\n androidEnabled\n iosEnabled\n bankAccountName\n bankAccountNumber\n bankIFSCCode\n upiId\n upiQRCode {\n id\n url\n }\n }\n\n fragment WithdrawalGatewaySettingsCoreData on WithdrawalGatewaySettings {\n minimumAmount\n maximumAmount\n webEnabled\n mobileWebEnabled\n androidEnabled\n iosEnabled\n }\n\n query PaymentSettings {\n minimumFirstDepositAmount\n restrictWithdrawalsToVerifiedMembers\n bankDepositGatewaySettings: depositGatewaySettings(gateway: BANK) {\n ...DepositGatewaySettingsCoreData\n }\n libanganDepositGatewaySettings: depositGatewaySettings(gateway: LIBANGAN_PAY_IN) {\n ...DepositGatewaySettingsCoreData\n }\n gcashDepositGatewaySettings: depositGatewaySettings(gateway: GCASH) {\n ...DepositGatewaySettingsCoreData\n }\n gcashWebpayDepositGatewaySettings: depositGatewaySettings(gateway: GCASH_WEBPAY) {\n ...DepositGatewaySettingsCoreData\n }\n aioGCashDepositGatewaySettings: depositGatewaySettings(gateway: AIO_GCASH) {\n ...DepositGatewaySettingsCoreData\n }\n aioPayMayaDepositGatewaySettings: depositGatewaySettings(gateway: AIO_PAY_MAYA) {\n ...DepositGatewaySettingsCoreData\n }\n aioGrabPayDepositGatewaySettings: depositGatewaySettings(gateway: AIO_GRAB_PAY) {\n ...DepositGatewaySettingsCoreData\n }\n aioPalawanPayDepositGatewaySettings: depositGatewaySettings(gateway: AIO_PALAWAN_PAY) {\n ...DepositGatewaySettingsCoreData\n }\n mayaDepositGatewaySettings: depositGatewaySettings(gateway: MAYA) {\n ...DepositGatewaySettingsCoreData\n }\n mayaAppDepositGatewaySettings: depositGatewaySettings(gateway: MAYA_APP) {\n ...DepositGatewaySettingsCoreData\n }\n mayaWebpayDepositGatewaySettings: depositGatewaySettings(gateway: MAYA_WEBPAY) {\n ...DepositGatewaySettingsCoreData\n }\n onlineBankDepositGatewaySettings: depositGatewaySettings(gateway: ONLINE_BANK) {\n ...DepositGatewaySettingsCoreData\n }\n qrphDepositGatewaySettings: depositGatewaySettings(gateway: QR_PH) {\n ...DepositGatewaySettingsCoreData\n }\n manualBankDepositGatewaySettings: depositGatewaySettings(gateway: MANUAL_BANK) {\n ...DepositGatewaySettingsCoreData\n }\n manualUPIDepositGatewaySettings: depositGatewaySettings(gateway: MANUAL_UPI) {\n ...DepositGatewaySettingsCoreData\n }\n pisoPayDepositGatewaySettings: depositGatewaySettings(gateway: PISO_PAY_CHECKOUT) {\n ...DepositGatewaySettingsCoreData\n }\n bankWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: BANK) {\n ...WithdrawalGatewaySettingsCoreData\n }\n gcashWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: GCASH) {\n ...WithdrawalGatewaySettingsCoreData\n }\n gcashStandardCashInWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: GCASH_STANDARD_CASH_IN) {\n ...WithdrawalGatewaySettingsCoreData\n }\n mayaWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: MAYA) {\n ...WithdrawalGatewaySettingsCoreData\n }\n mayaAppWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: MAYA_APP) {\n ...WithdrawalGatewaySettingsCoreData\n }\n instapayWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: INSTAPAY) {\n ...WithdrawalGatewaySettingsCoreData\n }\n manualBankWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: MANUAL_BANK) {\n ...WithdrawalGatewaySettingsCoreData\n }\n manualUPIWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: MANUAL_UPI) {\n ...WithdrawalGatewaySettingsCoreData\n }\n ventajaWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: VENTAJA_DISBURSEMENT) {\n ...WithdrawalGatewaySettingsCoreData\n }\n pisoPayWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: PISO_PAY_REMITTANCE) {\n ...WithdrawalGatewaySettingsCoreData\n }\n }\n";
|
|
95
96
|
export declare const MAYA_SESSION = "\n query MayaSession($id: ObjectId!) {\n mayaSession(id: $id) {\n id\n member\n dateTimeCreated\n }\n }\n";
|
|
96
97
|
export declare const VALIDATE_MAYA_SESSION = "\n mutation ValidateMayaSession {\n validateMayaSession: validMayaSession\n }\n";
|
|
97
98
|
export declare const ACTIVITY_RECORDS = "\n query ActivityRecords(\n $after: Cursor\n $first: Int\n $filter: ActivityRecordsFilterInput\n ) {\n member {\n activityRecords(after: $after, first: $first, filter: $filter) {\n edges {\n cursor\n node {\n ... on MemberActivity {\n id\n type\n amount\n details\n dateTimeCreated\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n";
|