@opexa/portal-components 0.0.697 → 0.0.699
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.d.ts +4 -0
- package/dist/client/hooks/useCreateGCashWebpayDepositMutation.js +73 -0
- package/dist/components/AccountInfo/GoogleDisconnect.d.ts +7 -0
- package/dist/components/AccountInfo/GoogleDisconnect.js +11 -0
- package/dist/components/DepositWithdrawal/Deposit/Deposit.js +24 -16
- package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit /GCashWebpayDeposit .d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit /GCashWebpayDeposit .js +191 -0
- package/dist/components/DepositWithdrawal/PaymentMethods.js +7 -2
- package/dist/components/DepositWithdrawal/utils.d.ts +1 -1
- package/dist/components/DepositWithdrawal/utils.js +1 -0
- package/dist/components/DigitainLauncher/Loading.d.ts +1 -0
- package/dist/components/DigitainLauncher/Loading.js +5 -0
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarousel.d.ts +23 -0
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarousel.js +1 -1
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.d.ts +24 -1
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.js +41 -9
- package/dist/components/Jackpots/JackpotsList/JackpotsList.d.ts +22 -0
- package/dist/components/Jackpots/JackpotsList/JackpotsList.js +1 -1
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.d.ts +24 -1
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.js +32 -10
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemMobile.d.ts +24 -1
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemMobile.js +32 -10
- package/dist/components/Jackpots/JackpotsList/useJackpotsListItemData.d.ts +1 -0
- package/dist/components/Jackpots/JackpotsList/useJackpotsListItemData.js +11 -0
- package/dist/components/KYC/BasicInformation.d.ts +1 -0
- package/dist/components/KYC/BasicInformation.js +101 -0
- package/dist/components/KYC/IdentityVerification.d.ts +1 -0
- package/dist/components/KYC/IdentityVerification.js +120 -0
- package/dist/components/KYC/Indicator.d.ts +1 -0
- package/dist/components/KYC/Indicator.js +8 -0
- package/dist/components/KYC/KYC.lazy.d.ts +6 -0
- package/dist/components/KYC/KYC.lazy.js +45 -0
- package/dist/components/KYC/KYCContext.d.ts +6 -0
- package/dist/components/KYC/KYCContext.js +2 -0
- package/dist/components/KYC/PersonalInformation.d.ts +1 -0
- package/dist/components/KYC/PersonalInformation.js +122 -0
- package/dist/components/KYC/useKYC.d.ts +25 -0
- package/dist/components/KYC/useKYC.js +38 -0
- package/dist/components/PortalProvider/CXDTokenObserver.d.ts +1 -0
- package/dist/components/PortalProvider/CXDTokenObserver.js +30 -0
- package/dist/icons/LinkBrokenIcon.d.ts +2 -0
- package/dist/icons/LinkBrokenIcon.js +4 -0
- package/dist/images/responsible-gaming-yellow.png +0 -0
- package/dist/services/queries.d.ts +1 -1
- package/dist/services/queries.js +3 -0
- package/dist/services/wallet.d.ts +2 -0
- package/dist/services/wallet.js +4 -4
- package/dist/types/index.d.ts +1 -0
- package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +5 -5
- package/dist/ui/Carousel/Carousel.d.ts +72 -72
- package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
- 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/Dialog/Dialog.d.ts +33 -33
- package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +252 -252
- package/dist/ui/Menu/menu.recipe.d.ts +14 -14
- 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/package.json +1 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { zodResolver } from '@hookform/resolvers/zod';
|
|
3
|
+
import { useForm } from 'react-hook-form';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { useShallow } from 'zustand/shallow';
|
|
6
|
+
import { useApproveMemberVerification } from '../../client/hooks/useApproveMemberVerification.js';
|
|
7
|
+
import { useCreateMemberVerificationMutation } from '../../client/hooks/useCreateMemberVerificationMutation.js';
|
|
8
|
+
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
9
|
+
import { useMemberVerificationQuery } from '../../client/hooks/useMemberVerificationQuery.js';
|
|
10
|
+
import { useUpdateMemberVerificationMutation } from '../../client/hooks/useUpdateMemberVerificationMutation.js';
|
|
11
|
+
import { toaster } from '../../client/utils/toaster.js';
|
|
12
|
+
import { CheckIcon } from '../../icons/CheckIcon.js';
|
|
13
|
+
import { Button } from '../../ui/Button/index.js';
|
|
14
|
+
import { Checkbox } from '../../ui/Checkbox/index.js';
|
|
15
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
16
|
+
import { Field } from '../../ui/Field/index.js';
|
|
17
|
+
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
18
|
+
import { getMemberVerificationQueryKey } from '../../utils/queryKeys.js';
|
|
19
|
+
import { useKYCContext } from './KYCContext.js';
|
|
20
|
+
const definition = z.object({
|
|
21
|
+
address: z.string().trim().min(1, 'Current address is required'),
|
|
22
|
+
permanentAddress: z.string().trim().min(1, 'Permanent address is required'),
|
|
23
|
+
sourceOfIncome: z.string().trim().min(1, 'Source of Income is required'),
|
|
24
|
+
natureOfWork: z.string().trim().min(1, 'Nature of Work is required'),
|
|
25
|
+
placeOfBirth: z.string().trim().min(1, 'Place of Birth is required'),
|
|
26
|
+
nationality: z.string().trim().min(1, 'Nationality is required'),
|
|
27
|
+
});
|
|
28
|
+
export function PersonalInformation() {
|
|
29
|
+
const kyc = useKYCContext();
|
|
30
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
31
|
+
kyc: ctx.kyc,
|
|
32
|
+
})));
|
|
33
|
+
const memberVerificationQuery = useMemberVerificationQuery();
|
|
34
|
+
const memberVerificationId = memberVerificationQuery.data?.id;
|
|
35
|
+
const approveMemberVerificationMutation = useApproveMemberVerification();
|
|
36
|
+
const updateMemberVerificationMutation = useUpdateMemberVerificationMutation({
|
|
37
|
+
onError(error) {
|
|
38
|
+
toaster.error({
|
|
39
|
+
description: error.message,
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
onSuccess() {
|
|
43
|
+
const queryClient = getQueryClient();
|
|
44
|
+
queryClient.setQueryData(getMemberVerificationQueryKey(), (prev) => {
|
|
45
|
+
if (!prev)
|
|
46
|
+
return prev;
|
|
47
|
+
return {
|
|
48
|
+
...prev,
|
|
49
|
+
status: 'PENDING',
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
kyc.setDone(true);
|
|
53
|
+
globalStore.kyc.setOpen(false);
|
|
54
|
+
toaster.success({
|
|
55
|
+
title: 'Success',
|
|
56
|
+
description: 'Personal information has been set successfully.',
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
const createMemberVerificationMutation = useCreateMemberVerificationMutation({
|
|
61
|
+
onError(error) {
|
|
62
|
+
toaster.error({
|
|
63
|
+
description: error.message,
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
onSuccess() {
|
|
67
|
+
kyc.setDone(true);
|
|
68
|
+
globalStore.kyc.setOpen(false);
|
|
69
|
+
toaster.success({
|
|
70
|
+
title: 'Success',
|
|
71
|
+
description: 'Personal information has been set successfully.',
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
const form = useForm({
|
|
76
|
+
resolver: zodResolver(definition),
|
|
77
|
+
defaultValues: {
|
|
78
|
+
address: '',
|
|
79
|
+
nationality: '',
|
|
80
|
+
natureOfWork: '',
|
|
81
|
+
placeOfBirth: '',
|
|
82
|
+
permanentAddress: '',
|
|
83
|
+
},
|
|
84
|
+
mode: 'all',
|
|
85
|
+
});
|
|
86
|
+
async function onSubmit(values) {
|
|
87
|
+
if (!memberVerificationId) {
|
|
88
|
+
createMemberVerificationMutation.mutate({
|
|
89
|
+
...values,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
await updateMemberVerificationMutation.mutateAsync({
|
|
94
|
+
id: memberVerificationId,
|
|
95
|
+
data: {
|
|
96
|
+
...values,
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
//approve status of member to be pending
|
|
100
|
+
await approveMemberVerificationMutation.mutateAsync({
|
|
101
|
+
id: memberVerificationId,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
const address = form.watch('address');
|
|
106
|
+
const permanentAddress = form.watch('permanentAddress');
|
|
107
|
+
return (_jsxs("div", { children: [_jsx(Dialog.Title, { className: "text-center font-semibold text-lg", children: "Personal Information" }), _jsx(Dialog.Description, { className: "mt-xs text-center text-sm text-text-secondary-700", children: "Provide your basic details and work info." }), _jsxs("form", { className: "mt-7", onSubmit: form.handleSubmit(onSubmit), children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.permanentAddress, children: [_jsx(Field.Label, { children: "Permanent address" }), _jsx(Field.Input, { placeholder: "Enter your permanent address", ...form.register('permanentAddress') }), _jsx(Field.ErrorText, { children: form.formState.errors.permanentAddress?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.address, children: [_jsx(Field.Label, { children: "Current address" }), _jsx(Field.Input, { placeholder: "Enter your current address", ...form.register('address') }), _jsx(Field.ErrorText, { children: form.formState.errors.address?.message })] }), _jsxs(Checkbox.Root, { className: "mt-md", checked: address !== '' &&
|
|
108
|
+
permanentAddress !== '' &&
|
|
109
|
+
address === permanentAddress, onCheckedChange: (details) => {
|
|
110
|
+
if (details.checked === true) {
|
|
111
|
+
form.setValue('address', form.getValues('permanentAddress'), {
|
|
112
|
+
shouldDirty: true,
|
|
113
|
+
shouldTouch: true,
|
|
114
|
+
shouldValidate: true,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}, disabled: !permanentAddress, children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { children: "Use permanent address as current address" }), _jsx(Checkbox.HiddenInput, {})] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.sourceOfIncome, children: [_jsx(Field.Label, { children: "Source of income" }), _jsx(Field.Input, { placeholder: "Enter your source of income", ...form.register('sourceOfIncome') }), _jsx(Field.ErrorText, { children: form.formState.errors.sourceOfIncome?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.natureOfWork, children: [_jsx(Field.Label, { children: "Work Description" }), _jsx(Field.Input, { placeholder: "Enter your work description", ...form.register('natureOfWork') }), _jsx(Field.ErrorText, { children: form.formState.errors.natureOfWork?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.placeOfBirth, children: [_jsx(Field.Label, { children: "Place of birth" }), _jsx(Field.Input, { placeholder: "Enter your place of birth", ...form.register('placeOfBirth') }), _jsx(Field.ErrorText, { children: form.formState.errors.placeOfBirth?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.nationality, children: [_jsx(Field.Label, { children: "Nationality" }), _jsx(Field.Input, { placeholder: "Enter your nationality", ...form.register('nationality') }), _jsx(Field.ErrorText, { children: form.formState.errors.nationality?.message })] }), _jsx(Button, { type: "submit", className: "mt-4xl", disabled: updateMemberVerificationMutation.isPending ||
|
|
118
|
+
createMemberVerificationMutation.isPending, children: "Continue" }), _jsx(Button, { variant: "outline", colorScheme: "gray", className: "mt-lg", onClick: () => {
|
|
119
|
+
globalStore.kyc.setOpen(false);
|
|
120
|
+
}, disabled: updateMemberVerificationMutation.isPending ||
|
|
121
|
+
createMemberVerificationMutation.isPending, children: "Skip for now" })] })] }));
|
|
122
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type EventDetail = {
|
|
2
|
+
type: 'SELFIE_CAPTURED';
|
|
3
|
+
data: string;
|
|
4
|
+
} | {
|
|
5
|
+
type: 'ID_DOCUMENT_CAPTURED';
|
|
6
|
+
data: string;
|
|
7
|
+
};
|
|
8
|
+
type UnsubscribeFn = () => void;
|
|
9
|
+
type Subscriber = (detail: EventDetail) => UnsubscribeFn;
|
|
10
|
+
export type CaptureSubject = 'SELFIE' | 'ID_DOCUMENT';
|
|
11
|
+
export interface UseKYCReturn {
|
|
12
|
+
step: number;
|
|
13
|
+
setStep: (step: number) => void;
|
|
14
|
+
done: boolean;
|
|
15
|
+
setDone: (done: boolean) => void;
|
|
16
|
+
subscribe: (subscriber: Subscriber) => UnsubscribeFn;
|
|
17
|
+
triggerEvent: (detail: EventDetail) => void;
|
|
18
|
+
idFrontImageId: string | null;
|
|
19
|
+
setFrontImageId: (id: string | null) => void;
|
|
20
|
+
selfieImageId: string | null;
|
|
21
|
+
setSelfieImageId: (id: string | null) => void;
|
|
22
|
+
reset: () => void;
|
|
23
|
+
}
|
|
24
|
+
export declare function useKYC(): UseKYCReturn;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useRef, useState } from 'react';
|
|
2
|
+
export function useKYC() {
|
|
3
|
+
const [step, setStep] = useState(2);
|
|
4
|
+
const [done, setDone] = useState(false);
|
|
5
|
+
const [idFrontImageId, setFrontImageId] = useState(null);
|
|
6
|
+
const [selfieImageId, setSelfieImageId] = useState(null);
|
|
7
|
+
const subscribers = useRef([]);
|
|
8
|
+
const subscribe = (subscriber) => {
|
|
9
|
+
subscribers.current.push(subscriber);
|
|
10
|
+
return () => {
|
|
11
|
+
subscribers.current = subscribers.current.filter((item) => item !== subscriber);
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
const triggerEvent = (detail) => {
|
|
15
|
+
subscribers.current.forEach((subscriber) => {
|
|
16
|
+
subscriber(detail);
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const reset = () => {
|
|
20
|
+
setStep(1);
|
|
21
|
+
setDone(false);
|
|
22
|
+
setFrontImageId(null);
|
|
23
|
+
setSelfieImageId(null);
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
step,
|
|
27
|
+
setStep,
|
|
28
|
+
done,
|
|
29
|
+
setDone,
|
|
30
|
+
idFrontImageId,
|
|
31
|
+
setFrontImageId,
|
|
32
|
+
selfieImageId,
|
|
33
|
+
setSelfieImageId,
|
|
34
|
+
subscribe,
|
|
35
|
+
triggerEvent,
|
|
36
|
+
reset,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CXDTokenObserver(): null;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { addHours } from 'date-fns';
|
|
3
|
+
import { clamp } from 'lodash-es';
|
|
4
|
+
import { useSearchParams } from 'next/navigation';
|
|
5
|
+
import { useLocalStorage, useTimeout } from 'usehooks-ts';
|
|
6
|
+
import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
|
|
7
|
+
export function CXDTokenObserver() {
|
|
8
|
+
const searchParams = useSearchParams();
|
|
9
|
+
const cxdToken = searchParams.get('cxd');
|
|
10
|
+
const accountQuery = useAccountQuery();
|
|
11
|
+
const account = accountQuery.data;
|
|
12
|
+
const [cxd, setCxd, removeCxd] = useLocalStorage('WebPortalCellxpertCxd', null);
|
|
13
|
+
const now = new Date();
|
|
14
|
+
const shouldTimeoutRun = cxdToken && account;
|
|
15
|
+
const removeCxdUntilInMs = cxd?.timestamp
|
|
16
|
+
? clamp(cxd.timestamp - now.getTime(), 0, Infinity)
|
|
17
|
+
: 0;
|
|
18
|
+
useTimeout(() => {
|
|
19
|
+
const isSame = cxd?.cxd === cxdToken;
|
|
20
|
+
if (!isSame) {
|
|
21
|
+
const extendedTimestamp = addHours(new Date(), 6).getTime();
|
|
22
|
+
setCxd({
|
|
23
|
+
cxd: cxdToken,
|
|
24
|
+
timestamp: extendedTimestamp,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}, shouldTimeoutRun ? 100 : null);
|
|
28
|
+
useTimeout(() => removeCxd(), shouldTimeoutRun ? removeCxdUntilInMs : null);
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function LinkBrokenIcon(props) {
|
|
3
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", ...props, children: _jsx("path", { d: "M8.5 15.5L15.5 8.49998M9 4V2M15 20V22M4 9H2M20 15H22M4.91421 4.91421L3.5 3.5M19.0858 19.0857L20.5 20.4999M12 17.6568L9.87871 19.7781C8.31662 21.3402 5.78396 21.3402 4.22186 19.7781C2.65976 18.216 2.65976 15.6833 4.22186 14.1212L6.34318 11.9999M17.6569 11.9999L19.7782 9.87859C21.3403 8.31649 21.3403 5.78383 19.7782 4.22174C18.2161 2.65964 15.6835 2.65964 14.1214 4.22174L12 6.34306", stroke: "#FEDF89", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
|
|
4
|
+
}
|
|
Binary file
|
|
@@ -91,7 +91,7 @@ export declare const UPDATE_MEMBER_VERIFICATION__NEXT = "\n mutation UpdateMemb
|
|
|
91
91
|
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
92
|
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
93
|
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(\n gateway: LIBANGAN_PAY_IN\n ) {\n ...DepositGatewaySettingsCoreData\n }\n gcashDepositGatewaySettings: depositGatewaySettings(gateway: GCASH) {\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 onlineBankDepositGatewaySettings: depositGatewaySettings(\n gateway: ONLINE_BANK\n ) {\n ...DepositGatewaySettingsCoreData\n }\n qrphDepositGatewaySettings: depositGatewaySettings(gateway: QR_PH) {\n ...DepositGatewaySettingsCoreData\n }\n manualBankDepositGatewaySettings: depositGatewaySettings(\n gateway: MANUAL_BANK\n ) {\n ...DepositGatewaySettingsCoreData\n }\n manualUPIDepositGatewaySettings: depositGatewaySettings(\n gateway: MANUAL_UPI\n ) {\n ...DepositGatewaySettingsCoreData\n }\n pisoPayDepositGatewaySettings: depositGatewaySettings(\n gateway: PISO_PAY_CHECKOUT\n ) {\n ...DepositGatewaySettingsCoreData\n }\n bankWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: BANK) {\n ...WithdrawalGatewaySettingsCoreData\n }\n gcashWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: GCASH) {\n ...WithdrawalGatewaySettingsCoreData\n }\n mayaWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: MAYA) {\n ...WithdrawalGatewaySettingsCoreData\n }\n mayaAppWithdrawalGatewaySettings: withdrawalGatewaySettings(\n gateway: MAYA_APP\n ) {\n ...WithdrawalGatewaySettingsCoreData\n }\n instapayWithdrawalGatewaySettings: withdrawalGatewaySettings(\n gateway: INSTAPAY\n ) {\n ...WithdrawalGatewaySettingsCoreData\n }\n manualBankWithdrawalGatewaySettings: withdrawalGatewaySettings(\n gateway: MANUAL_BANK\n ) {\n ...WithdrawalGatewaySettingsCoreData\n }\n manualUPIWithdrawalGatewaySettings: withdrawalGatewaySettings(\n gateway: MANUAL_UPI\n ) {\n ...WithdrawalGatewaySettingsCoreData\n }\n ventajaWithdrawalGatewaySettings: withdrawalGatewaySettings(\n gateway: VENTAJA_DISBURSEMENT\n ) {\n ...WithdrawalGatewaySettingsCoreData\n }\n pisoPayWithdrawalGatewaySettings: withdrawalGatewaySettings(\n gateway: PISO_PAY_REMITTANCE\n ) {\n ...WithdrawalGatewaySettingsCoreData\n }\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(\n gateway: LIBANGAN_PAY_IN\n ) {\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 onlineBankDepositGatewaySettings: depositGatewaySettings(\n gateway: ONLINE_BANK\n ) {\n ...DepositGatewaySettingsCoreData\n }\n qrphDepositGatewaySettings: depositGatewaySettings(gateway: QR_PH) {\n ...DepositGatewaySettingsCoreData\n }\n manualBankDepositGatewaySettings: depositGatewaySettings(\n gateway: MANUAL_BANK\n ) {\n ...DepositGatewaySettingsCoreData\n }\n manualUPIDepositGatewaySettings: depositGatewaySettings(\n gateway: MANUAL_UPI\n ) {\n ...DepositGatewaySettingsCoreData\n }\n pisoPayDepositGatewaySettings: depositGatewaySettings(\n gateway: PISO_PAY_CHECKOUT\n ) {\n ...DepositGatewaySettingsCoreData\n }\n bankWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: BANK) {\n ...WithdrawalGatewaySettingsCoreData\n }\n gcashWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: GCASH) {\n ...WithdrawalGatewaySettingsCoreData\n }\n mayaWithdrawalGatewaySettings: withdrawalGatewaySettings(gateway: MAYA) {\n ...WithdrawalGatewaySettingsCoreData\n }\n mayaAppWithdrawalGatewaySettings: withdrawalGatewaySettings(\n gateway: MAYA_APP\n ) {\n ...WithdrawalGatewaySettingsCoreData\n }\n instapayWithdrawalGatewaySettings: withdrawalGatewaySettings(\n gateway: INSTAPAY\n ) {\n ...WithdrawalGatewaySettingsCoreData\n }\n manualBankWithdrawalGatewaySettings: withdrawalGatewaySettings(\n gateway: MANUAL_BANK\n ) {\n ...WithdrawalGatewaySettingsCoreData\n }\n manualUPIWithdrawalGatewaySettings: withdrawalGatewaySettings(\n gateway: MANUAL_UPI\n ) {\n ...WithdrawalGatewaySettingsCoreData\n }\n ventajaWithdrawalGatewaySettings: withdrawalGatewaySettings(\n gateway: VENTAJA_DISBURSEMENT\n ) {\n ...WithdrawalGatewaySettingsCoreData\n }\n pisoPayWithdrawalGatewaySettings: withdrawalGatewaySettings(\n gateway: PISO_PAY_REMITTANCE\n ) {\n ...WithdrawalGatewaySettingsCoreData\n }\n }\n";
|
|
95
95
|
export declare const MAYA_SESSION = "\n query MayaSession($id: ObjectId!) {\n mayaSession(id: $id) {\n id\n member\n dateTimeCreated\n }\n }\n";
|
|
96
96
|
export declare const VALIDATE_MAYA_SESSION = "\n mutation ValidateMayaSession {\n validateMayaSession: validMayaSession\n }\n";
|
|
97
97
|
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";
|
package/dist/services/queries.js
CHANGED
|
@@ -2277,6 +2277,9 @@ export const PAYMENT_SETTINGS = /* GraphQL */ `
|
|
|
2277
2277
|
gcashDepositGatewaySettings: depositGatewaySettings(gateway: GCASH) {
|
|
2278
2278
|
...DepositGatewaySettingsCoreData
|
|
2279
2279
|
}
|
|
2280
|
+
gcashWebpayDepositGatewaySettings: depositGatewaySettings(gateway: GCASH_WEBPAY) {
|
|
2281
|
+
...DepositGatewaySettingsCoreData
|
|
2282
|
+
}
|
|
2280
2283
|
aioGCashDepositGatewaySettings: depositGatewaySettings(gateway: AIO_GCASH) {
|
|
2281
2284
|
...DepositGatewaySettingsCoreData
|
|
2282
2285
|
}
|
|
@@ -236,6 +236,8 @@ export interface CreateGCashWebpayDepositMutationVariables {
|
|
|
236
236
|
id: string;
|
|
237
237
|
amount: string;
|
|
238
238
|
promo?: string;
|
|
239
|
+
successRedirectionUrl: string;
|
|
240
|
+
cancelRedirectionUrl: string;
|
|
239
241
|
};
|
|
240
242
|
}
|
|
241
243
|
export type CreateGCashWebpayDepositInput = Simplify<CreateGCashWebpayDepositMutationVariables['input']>;
|
package/dist/services/wallet.js
CHANGED
|
@@ -2,7 +2,7 @@ import { cache } from 'react';
|
|
|
2
2
|
import { WALLET_GRAPHQL_ENDPOINT } from '../constants/index.js';
|
|
3
3
|
import { parseDecimal } from '../utils/parseDecimal.js';
|
|
4
4
|
import { graphqlRequest } from './graphqlRequest.js';
|
|
5
|
-
import { AVAILABLE_PROMOS, BONUS, BONUS_BALANCES, BONUS_IDS, BONUSES, CASHBACK, CASHBACK_BONUS, CASHBACK_BONUS_IDS, CASHBACK_BONUSES, CASHBACKS, CLAIM_CASHBACK_BONUS, CLAIM_SPOT_BONUS, CREATE_AIO_INSTAPAY_WITHDRAWAL, CREATE_AIO_INSTAPAY_WITHDRAWAL_NEXT, CREATE_AIO_ONLINE_BANK_DEPOSIT, CREATE_AIO_QRPH_DEPOSIT, CREATE_BANK_WITHDRAWAL, CREATE_GAME_SESSION, CREATE_GCASH_DEPOSIT,
|
|
5
|
+
import { AVAILABLE_PROMOS, BONUS, BONUS_BALANCES, BONUS_IDS, BONUSES, CASHBACK, CASHBACK_BONUS, CASHBACK_BONUS_IDS, CASHBACK_BONUSES, CASHBACKS, CLAIM_CASHBACK_BONUS, CLAIM_SPOT_BONUS, CREATE_AIO_GCASH_DEPOSIT, CREATE_AIO_GRAB_PAY_DEPOSIT, CREATE_AIO_INSTAPAY_WITHDRAWAL, CREATE_AIO_INSTAPAY_WITHDRAWAL_NEXT, CREATE_AIO_ONLINE_BANK_DEPOSIT, CREATE_AIO_PALAWAN_PAY_DEPOSIT, CREATE_AIO_PAY_MAYA_DEPOSIT, CREATE_AIO_QRPH_DEPOSIT, CREATE_BANK_WITHDRAWAL, CREATE_GAME_SESSION, CREATE_GCASH_DEPOSIT, CREATE_GCASH_STANDARD_CASH_IN_WITHDRAWAL, CREATE_GCASH_WEBPAY_DEPOSIT, CREATE_GCASH_WITHDRAWAL, CREATE_LIBANGAN_DEPOSIT, CREATE_MANUAL_BANK_DEPOSIT, CREATE_MANUAL_BANK_WITHDRAWAL, CREATE_MANUAL_UPI_DEPOSIT, CREATE_MANUAL_UPI_WITHDRAWAL, CREATE_MAYA_APP_DEPOSIT, CREATE_MAYA_APP_WITHDRAWAL, CREATE_MAYA_DEPOSIT, CREATE_MAYA_WITHDRAWAL, CREATE_PISO_PAY_DEPOSIT, CREATE_PISO_PAY_WITHDRAWAL, CREATE_VENTAJA_WITHDRAWAL, DEPOSIT, END_GAME_SESSION, FAVORITE_GAMES, GAME_SESSION, INSTAPAY_BANK_LIST, MARK_GAME_AS_FAVORITE, MAYA_SESSION, POINTS_WALLET, PROMO, PROMOS, REDEEM_POINTS_TO_CASH, REMAINING_DAILY_WITHDRAWALS_COUNT, TOUCH_GCASH_DEPOSIT, TOUCH_QRPH_DEPOSIT, UNMARK_GAME_AS_FAVORITE, VALIDATE_MAYA_SESSION, WALLET, } from './queries.js';
|
|
6
6
|
import { sha256 } from './sha256.js';
|
|
7
7
|
export const getPromos = cache(async (options) => {
|
|
8
8
|
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, PROMOS, undefined, {
|
|
@@ -138,7 +138,8 @@ export const createAiOPalawanPayDeposit = async (input, options) => {
|
|
|
138
138
|
if (res.createAiOPalawanPayDeposit) {
|
|
139
139
|
const error = new Error();
|
|
140
140
|
error.name = res.createAiOPalawanPayDeposit.name;
|
|
141
|
-
error.message =
|
|
141
|
+
error.message =
|
|
142
|
+
ERROR_CODES_MESSAGE_MAP[res.createAiOPalawanPayDeposit.name];
|
|
142
143
|
Error.captureStackTrace?.(error, createAiOGrabPayDeposit);
|
|
143
144
|
throw error;
|
|
144
145
|
}
|
|
@@ -179,8 +180,7 @@ export const createGCashWebpayDeposit = async (input, options) => {
|
|
|
179
180
|
if (res.createGCashWebpayDeposit) {
|
|
180
181
|
const error = new Error();
|
|
181
182
|
error.name = res.createGCashWebpayDeposit.name;
|
|
182
|
-
error.message =
|
|
183
|
-
ERROR_CODES_MESSAGE_MAP[res.createGCashWebpayDeposit.name];
|
|
183
|
+
error.message = ERROR_CODES_MESSAGE_MAP[res.createGCashWebpayDeposit.name];
|
|
184
184
|
Error.captureStackTrace?.(error, createGCashWebpayDeposit);
|
|
185
185
|
throw error;
|
|
186
186
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -528,6 +528,7 @@ export interface PaymentSettings {
|
|
|
528
528
|
minimumFirstDepositAmount: string;
|
|
529
529
|
bankDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
530
530
|
gcashDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
531
|
+
gcashWebpayDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
531
532
|
aioGCashDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
532
533
|
aioPayMayaDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
533
534
|
aioGrabPayDepositGatewaySettings?: DepositGatewaySettings | null;
|