@opexa/portal-components 0.0.450 → 0.0.452
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 +2 -2
- package/dist/client/hooks/useCreateGCashStandardCashInWithdrawal.js +2 -2
- package/dist/components/AccountInfo/GoogleDisconnect.d.ts +7 -0
- package/dist/components/AccountInfo/GoogleDisconnect.js +11 -0
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +91 -83
- package/dist/components/DigitainLauncher/Loading.d.ts +1 -0
- package/dist/components/DigitainLauncher/Loading.js +5 -0
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -0
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -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.js +11 -11
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +1 -0
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +29 -0
- package/dist/components/Quests/JourneyQuest.js +9 -8
- package/dist/components/Quests/MultiWageringQuest.d.ts +1 -0
- package/dist/components/Quests/MultiWageringQuest.js +91 -0
- package/dist/components/Quests/Quests.client.js +7 -1
- package/dist/components/SessionWatcher/SessionWatcher.d.ts +1 -0
- package/dist/components/SessionWatcher/SessionWatcher.js +20 -0
- package/dist/components/SessionWatcher/index.d.ts +1 -0
- package/dist/components/SessionWatcher/index.js +1 -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 +4 -3
- package/dist/services/queries.js +52 -1
- package/dist/services/wallet.d.ts +64 -51
- package/dist/services/wallet.js +72 -56
- package/dist/styles/theme.css +3 -0
- package/dist/types/index.d.ts +9 -1
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
- package/dist/ui/Badge/badge.recipe.d.ts +3 -3
- package/dist/ui/Carousel/Carousel.d.ts +99 -99
- package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- 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 +90 -90
- package/dist/ui/Menu/menu.recipe.d.ts +5 -5
- package/dist/ui/Popover/Popover.d.ts +55 -55
- package/dist/ui/Popover/popover.recipe.d.ts +5 -5
- 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/package.json +1 -1
|
@@ -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
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { addHours } from 'date-fns';
|
|
3
3
|
import { clamp } from 'lodash-es';
|
|
4
|
+
import { useSearchParams } from 'next/navigation';
|
|
4
5
|
import { useLocalStorage, useTimeout } from 'usehooks-ts';
|
|
5
6
|
import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
|
|
6
7
|
export function CXDTokenObserver() {
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const [cxd, setCxd, removeCxd] = useLocalStorage('
|
|
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);
|
|
12
13
|
const now = new Date();
|
|
14
|
+
const shouldTimeoutRun = cxdToken && account;
|
|
13
15
|
const removeCxdUntilInMs = cxd?.timestamp
|
|
14
16
|
? clamp(cxd.timestamp - now.getTime(), 0, Infinity)
|
|
15
17
|
: 0;
|
|
16
18
|
useTimeout(() => {
|
|
17
|
-
const isSame = cxd?.cxd ===
|
|
19
|
+
const isSame = cxd?.cxd === cxdToken;
|
|
18
20
|
if (!isSame) {
|
|
19
21
|
const extendedTimestamp = addHours(new Date(), 6).getTime();
|
|
20
22
|
setCxd({
|
|
21
|
-
cxd:
|
|
23
|
+
cxd: cxdToken,
|
|
22
24
|
timestamp: extendedTimestamp,
|
|
23
25
|
});
|
|
24
26
|
}
|
|
25
|
-
},
|
|
26
|
-
useTimeout(() =>
|
|
27
|
-
removeCxd();
|
|
28
|
-
}, account ? removeCxdUntilInMs : null);
|
|
27
|
+
}, shouldTimeoutRun ? 100 : null);
|
|
28
|
+
useTimeout(() => removeCxd(), shouldTimeoutRun ? removeCxdUntilInMs : null);
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function LinkGoogleAccountObserver(): null;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useSearchParams } from 'next/navigation';
|
|
3
|
+
import { useTimeout } from 'usehooks-ts';
|
|
4
|
+
import { toaster } from '../../client/utils/toaster.js';
|
|
5
|
+
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
6
|
+
import { getSessionQueryKey } from '../../utils/queryKeys.js';
|
|
7
|
+
export function LinkGoogleAccountObserver() {
|
|
8
|
+
const searchParams = useSearchParams();
|
|
9
|
+
const code = searchParams.get('message') ?? searchParams.get('status');
|
|
10
|
+
const queryClient = getQueryClient();
|
|
11
|
+
useTimeout(() => {
|
|
12
|
+
if (code === 'duplicate') {
|
|
13
|
+
return toaster.error({
|
|
14
|
+
title: 'Duplicate Account',
|
|
15
|
+
description: 'An account with this email already exists. Please try signing in instead.',
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
if (code === 'linked') {
|
|
19
|
+
queryClient.invalidateQueries({
|
|
20
|
+
queryKey: getSessionQueryKey(),
|
|
21
|
+
});
|
|
22
|
+
return toaster.success({
|
|
23
|
+
title: 'Google Account Linked Successfully',
|
|
24
|
+
description: 'Your Google account has been successfully connected.',
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}, code ? 100 : null);
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import dynamic from 'next/dynamic';
|
|
2
3
|
import { useCallback, useMemo } from 'react';
|
|
3
4
|
import { useShallow } from 'zustand/react/shallow';
|
|
4
5
|
import { useControllableState } from '../../client/hooks/useControllableState.js';
|
|
5
6
|
import { useDisclosure } from '../../client/hooks/useDisclosure.js';
|
|
7
|
+
import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
|
|
6
8
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
7
9
|
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
8
10
|
import { CheckIcon } from '../../icons/CheckIcon.js';
|
|
@@ -18,11 +20,9 @@ import { Progress } from '../../ui/Progress/index.js';
|
|
|
18
20
|
import { Prose } from '../../ui/Prose/index.js';
|
|
19
21
|
import { formatNumber } from '../../utils/formatNumber.js';
|
|
20
22
|
import { getPercentage } from '../../utils/getPercentage.js';
|
|
23
|
+
import { FacebookSignInTrigger } from '../SignIn/FacebookSignInTrigger.js';
|
|
21
24
|
import { useQuestContext } from './QuestsContext.js';
|
|
22
25
|
import { RemainingTime } from './RemainingTime.js';
|
|
23
|
-
import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
|
|
24
|
-
import { FacebookSignInTrigger } from '../SignIn/FacebookSignInTrigger.js';
|
|
25
|
-
import dynamic from 'next/dynamic';
|
|
26
26
|
const GoogleSignInButton = dynamic(() => import('../SignIn/GoogleSignInTrigger.js').then((m) => m.GoogleSignInTrigger), {
|
|
27
27
|
ssr: false,
|
|
28
28
|
loading: () => null,
|
|
@@ -42,7 +42,8 @@ export function JourneyQuest() {
|
|
|
42
42
|
}
|
|
43
43
|
const filteredMilestones = quest.milestones.filter((milestone) => {
|
|
44
44
|
if (!featureFlag.enabled) {
|
|
45
|
-
return milestone.type !== 'LINK_FACEBOOK_ACCOUNT' &&
|
|
45
|
+
return (milestone.type !== 'LINK_FACEBOOK_ACCOUNT' &&
|
|
46
|
+
milestone.type !== 'LINK_GOOGLE_ACCOUNT');
|
|
46
47
|
}
|
|
47
48
|
return true;
|
|
48
49
|
});
|
|
@@ -66,7 +67,7 @@ export function JourneyQuest() {
|
|
|
66
67
|
? parseFloat(quest.progressPercentage)
|
|
67
68
|
: getPercentage(completedCount, total),
|
|
68
69
|
};
|
|
69
|
-
}, [quest]);
|
|
70
|
+
}, [quest, featureFlag]);
|
|
70
71
|
const progressValue = useMemo(() => {
|
|
71
72
|
return (progressPercentage || getPercentage(currentMilestone, totalMilestones));
|
|
72
73
|
}, [progressPercentage, currentMilestone, totalMilestones]);
|
|
@@ -99,7 +100,7 @@ function Rules(props) {
|
|
|
99
100
|
return false;
|
|
100
101
|
return milestones.every((milestone) => milestone.isCompleted);
|
|
101
102
|
}, [milestones]);
|
|
102
|
-
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.open), closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto min-h-auto min-w-[21.438rem] max-w-[400px] overflow-y-auto rounded-xl px-4 py-5
|
|
103
|
+
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.open), closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto mt-40 min-h-auto min-w-[21.438rem] max-w-[400px] overflow-y-auto rounded-xl px-4 py-5", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "group flex flex-col space-y-5 text-sm text-text-quarterary-brand", children: [_jsx("h2", { className: "font-semibold text-lg text-text-primary-900", children: quest?.name || 'Quest' }), _jsx("p", { children: quest?.description ||
|
|
103
104
|
'Ready for a challenge? Complete them all and get amazing rewards!' }), milestones.map((milestone) => (_jsxs("div", { className: "flex flex-col space-y-2.5 rounded-xl bg-bg-tertiary p-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("p", { className: "font-medium text-base text-white", children: milestone.label }), milestone.isCompleted && (_jsx("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: "Complete" }))] }), milestone.description ? (_jsx(Prose, { dangerouslySetInnerHTML: {
|
|
104
105
|
__html: milestone.description,
|
|
105
106
|
} })) : milestone.bonus ? (_jsxs("p", { className: "ml-1", children: [milestone.key === 'REGISTRATION' &&
|
|
@@ -122,8 +123,8 @@ function Rules(props) {
|
|
|
122
123
|
}, "aria-label": `Complete ${milestone.label}`, children: [milestone.key === 'ACCOUNT_VERIFICATION' ? (_jsx(FileCheck02Icon, { className: "size-5" })) : (_jsx(CoinsHandIcon, { className: "size-5" })), milestone.key === 'FIRST_DEPOSIT'
|
|
123
124
|
? 'Deposit'
|
|
124
125
|
: 'Verify Account'] })), !milestone.isCompleted &&
|
|
125
|
-
milestone.key === 'LINK_FACEBOOK_ACCOUNT' && (_jsx(FacebookSignInTrigger, { text:
|
|
126
|
-
milestone.key === 'LINK_GOOGLE_ACCOUNT' && (_jsx(GoogleSignInButton, { text:
|
|
126
|
+
milestone.key === 'LINK_FACEBOOK_ACCOUNT' && (_jsx(FacebookSignInTrigger, { text: "Link Facebook Account", className: "flex h-10 w-full items-center justify-center gap-md rounded-md bg-button-primary-bg px-3 font-semibold text-button-primary-fg text-sm shadow-xs disabled:opacity-60 disabled:shadow-none aria-disabled:cursor-not-allowed aria-disabled:opacity-60 aria-disabled:shadow-none" })), !milestone.isCompleted &&
|
|
127
|
+
milestone.key === 'LINK_GOOGLE_ACCOUNT' && (_jsx(GoogleSignInButton, { text: "Link Google Account", className: "flex h-10 w-full items-center justify-center gap-md rounded-md bg-button-primary-bg px-3 font-semibold text-button-primary-fg text-sm shadow-xs disabled:opacity-60 disabled:shadow-none aria-disabled:cursor-not-allowed aria-disabled:opacity-60 aria-disabled:shadow-none" }))] }, milestone.key))), quest?.bonus && (_jsx("div", { className: "flex h-full items-end", children: allMilestonesCompleted ? (_jsx(Button, { size: "sm", onClick: () => setOpen(false), "aria-label": "Close", className: "w-full", children: "Close" })) : (_jsx("div", { className: "w-full rounded-md border border-bg-primary-hover bg-button-secondary-bg px-3.5 py-2.5 text-center text-white", children: _jsxs("p", { children: ["Complete target to", ' ', _jsxs("span", { className: "text-brand-400", children: ["\u20B1", quest?.bonus] }), ' ', "bonus!"] }) })) }))] })] }) })] }) }));
|
|
127
128
|
}
|
|
128
129
|
function QuestMilestone({ label, bonus, isCompleted = false, }) {
|
|
129
130
|
const localeInfo = useLocaleInfo();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function MultiWageringQuest(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
|
+
import { useControllableState } from '../../client/hooks/useControllableState.js';
|
|
4
|
+
import { useDisclosure } from '../../client/hooks/useDisclosure.js';
|
|
5
|
+
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
6
|
+
import { Lock01Icon } from '../../icons/Lock01Icon.js';
|
|
7
|
+
import { XIcon } from '../../icons/XIcon.js';
|
|
8
|
+
import { Badge } from '../../ui/Badge/index.js';
|
|
9
|
+
import { Button } from '../../ui/Button/index.js';
|
|
10
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
11
|
+
import { Portal } from '../../ui/Portal/index.js';
|
|
12
|
+
import { Progress } from '../../ui/Progress/index.js';
|
|
13
|
+
import { formatNumber } from '../../utils/formatNumber.js';
|
|
14
|
+
import { useQuestContext } from './QuestsContext.js';
|
|
15
|
+
import { RemainingTime } from './RemainingTime.js';
|
|
16
|
+
export function MultiWageringQuest() {
|
|
17
|
+
const disclosure = useDisclosure();
|
|
18
|
+
const quest = useQuestContext();
|
|
19
|
+
const { stages, totalStage, currentStage, progressPercentage } = useMemo(() => {
|
|
20
|
+
const currentStage = quest.stages.filter((m) => m.cleared).length;
|
|
21
|
+
if (!quest?.stages) {
|
|
22
|
+
return {
|
|
23
|
+
stages: [],
|
|
24
|
+
totalStage: 0,
|
|
25
|
+
currentStage: 0,
|
|
26
|
+
progressPercentage: 0,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const transformedStages = quest.stages.map((stage) => ({
|
|
30
|
+
bonusAmount: stage.bonusAmount,
|
|
31
|
+
bonusTurnoverRequirementMultiplier: stage.bonusTurnoverRequirementMultiplier,
|
|
32
|
+
cleared: stage.cleared,
|
|
33
|
+
dateTimeCleared: stage.dateTimeCleared,
|
|
34
|
+
targetTurnover: stage.targetTurnover,
|
|
35
|
+
}));
|
|
36
|
+
const total = quest.stages.length;
|
|
37
|
+
return {
|
|
38
|
+
stages: transformedStages,
|
|
39
|
+
totalStage: total,
|
|
40
|
+
currentStage: currentStage === 0 ? 1 : currentStage,
|
|
41
|
+
progressPercentage: +quest.progressPercentage,
|
|
42
|
+
};
|
|
43
|
+
}, [quest]);
|
|
44
|
+
const handleViewDetails = useCallback(() => {
|
|
45
|
+
disclosure.setOpen(true);
|
|
46
|
+
}, [disclosure]);
|
|
47
|
+
const localeInfo = useLocaleInfo();
|
|
48
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex h-full w-full flex-col space-y-6 rounded-2xl border border-border-primary bg-bg-tertiary px-4 pt-5 pb-6", children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-center justify-between", children: [_jsx(RemainingTime, { endOfDay: true }), quest.status === 'COMPLETED' && (_jsx(Badge.Root, { colorScheme: "success", size: "lg", round: false, children: _jsxs(Badge.Label, { children: ["Final Bonus:", ' ', formatNumber(quest.bonus, {
|
|
49
|
+
currency: localeInfo.currency.code,
|
|
50
|
+
})] }) }))] }), _jsx("p", { className: "font-semibold text-xl", children: quest?.name || 'Journey Quest' }), _jsx("div", { className: "text-sm", dangerouslySetInnerHTML: {
|
|
51
|
+
__html: quest?.description ||
|
|
52
|
+
'Ready for a challenge? Complete them all and get amazing rewards!',
|
|
53
|
+
} }), _jsxs("div", { className: "flex items-center justify-between pt-5", children: [_jsxs("p", { className: "text-sm", children: ["Progress: ", quest.progressPercentage, "%"] }), _jsxs("p", { className: "text-sm", children: [quest.turnover, _jsxs("span", { className: "text-[#667085]", children: ["/", quest.targetTurnover, " PHP"] })] })] }), _jsx(Progress.Root, { max: 100, className: "h-2 rounded-full bg-bg-primary", value: progressPercentage, children: _jsx(Progress.Track, { children: _jsx(Progress.Range, { className: "bg-utility-brand-600" }) }) }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("p", { className: "text-sm text-text-quarterary-brand", children: ["Stage ", currentStage, " of ", totalStage] }), _jsx(Badge.Root, { size: "lg", colorScheme: "brand", round: false, children: _jsxs(Badge.Label, { className: "flex items-center justify-center text-xs", children: [_jsx("p", { className: "flex h-[10px] items-center justify-center", children: "+" }), ' ', formatNumber(quest.stages?.reduce((curr, prev) => {
|
|
54
|
+
return curr + Number(prev.bonusAmount || 0);
|
|
55
|
+
}, 0), {
|
|
56
|
+
currency: localeInfo.currency.code,
|
|
57
|
+
maxDecimalPlaces: 0,
|
|
58
|
+
minDecimalPlaces: 0,
|
|
59
|
+
}), ' ', "Bonus"] }) })] })] }), _jsx("div", { className: "flex h-full items-end", children: _jsx(Button, { size: "sm", onClick: handleViewDetails, "aria-label": "View Details", disabled: false, className: "disabled:bg-bg-primary disabled:text-text-disabled", children: "View Details" }) })] }), _jsx(Stages, { open: disclosure.open, onOpenChange: disclosure.setOpen, quest: quest, stages: stages })] }));
|
|
60
|
+
}
|
|
61
|
+
function Stages(props) {
|
|
62
|
+
const [open, setOpen] = useControllableState({
|
|
63
|
+
value: props.open,
|
|
64
|
+
defaultValue: props.defaultOpen ?? false,
|
|
65
|
+
onChange: props.onOpenChange,
|
|
66
|
+
});
|
|
67
|
+
const currentStage = useMemo(() => {
|
|
68
|
+
const stage = props?.stages?.findLastIndex((stage) => stage.cleared) ?? 0;
|
|
69
|
+
return stage !== -1 ? stage + 1 : 1;
|
|
70
|
+
}, [props.stages]);
|
|
71
|
+
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.open), closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto mt-40 min-h-auto min-w-[23rem] max-w-[25rem] overflow-y-auto rounded-xl px-4 py-5", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "group flex flex-col space-y-5 text-sm text-text-quarterary-brand", children: [_jsx("h2", { className: "font-semibold text-lg text-text-primary-900", children: props.quest?.name || 'Quest' }), _jsx("div", { dangerouslySetInnerHTML: {
|
|
72
|
+
__html: props.quest?.description ||
|
|
73
|
+
'Ready for a challenge? Complete them all and get amazing rewards!',
|
|
74
|
+
} }), _jsx("div", { className: "flex w-full flex-col space-y-3", children: props.stages.map((stage, idx) => {
|
|
75
|
+
if (currentStage >= idx + 1) {
|
|
76
|
+
return (_jsx(QuestWageringStageUnlocked, { data: stage, bonus: stage.bonusAmount, stage: idx, isCompleted: stage.cleared }, idx));
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
return _jsx(QuestWageringStageLocked, { stage: idx }, idx);
|
|
80
|
+
}
|
|
81
|
+
}) }), _jsx(Button, { size: "sm", onClick: () => setOpen(false), "aria-label": "Close", className: "w-full", children: "Close" })] })] }) })] }) }));
|
|
82
|
+
}
|
|
83
|
+
function QuestWageringStageUnlocked({ bonus, stage, data, isCompleted = false, }) {
|
|
84
|
+
const localeInfo = useLocaleInfo();
|
|
85
|
+
return (_jsxs("div", { className: "mb-4 flex flex-col justify-between rounded-xl bg-bg-secondary p-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("p", { className: "font-medium", children: ["Stage ", stage + 1] }), _jsx(Badge.Root, { colorScheme: isCompleted ? 'success' : 'blue', size: "md", round: true, children: _jsx(Badge.Label, { children: data.cleared ? 'Completed' : 'Ongoing' }) })] }), _jsxs("div", { className: "mt-2.5 flex items-center justify-between", children: [_jsxs("p", { children: ["Progress ", data.cleared ? 100 : 0, "%"] }), _jsx("div", { className: "rounded-[6px] border border-border-secondary bg-bg-secondary-alt px-1.5 py-0.5", children: _jsxs("p", { className: "font-medium text-xs leading-tight", children: ["+", formatNumber(bonus, {
|
|
86
|
+
currency: localeInfo.currency.code,
|
|
87
|
+
}), ' ', "Bonus"] }) })] }), _jsx(Progress.Root, { max: 100, className: "mt-2 h-2 rounded-full bg-bg-primary", value: data.cleared ? 100 : 0, children: _jsx(Progress.Track, { children: _jsx(Progress.Range, { className: "bg-utility-brand-600" }) }) })] }));
|
|
88
|
+
}
|
|
89
|
+
function QuestWageringStageLocked({ stage }) {
|
|
90
|
+
return (_jsxs("div", { className: "mb-4 flex items-center justify-between rounded-xl bg-bg-secondary p-3", children: [_jsxs("p", { className: "font-medium", children: ["Stage ", stage + 1] }), _jsx("div", { className: "flex items-center justify-center rounded-full border border-border-lock bg-bg-lock p-1", children: _jsx(Lock01Icon, { className: "size-3 stroke-3 font-medium text-text-lock" }) })] }));
|
|
91
|
+
}
|
|
@@ -6,11 +6,13 @@ import { useState, } from 'react';
|
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
import { useAvailableQuestsQuery } from '../../client/hooks/useAvailableQuestsQuery.js';
|
|
9
|
+
import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
|
|
9
10
|
import { SpinnerIcon } from '../../icons/SpinnerIcon.js';
|
|
10
11
|
import closeChest from '../../images/close-chest.png';
|
|
11
12
|
import { SegmentGroup } from '../../ui/SegmentGroup/index.js';
|
|
12
13
|
import { DailyCheckInQuest, } from './DailyCheckInQuest.js';
|
|
13
14
|
import { JourneyQuest } from './JourneyQuest.js';
|
|
15
|
+
import { MultiWageringQuest } from './MultiWageringQuest.js';
|
|
14
16
|
import { OnboardingQuest } from './OnboardingQuest.js';
|
|
15
17
|
import { QuestContext } from './QuestsContext.js';
|
|
16
18
|
import { WageringQuest, } from './WageringQuest.js';
|
|
@@ -19,12 +21,14 @@ const QUEST_COMPONENT_MAP = {
|
|
|
19
21
|
ONBOARDING: OnboardingQuest,
|
|
20
22
|
WAGERING: WageringQuest,
|
|
21
23
|
JOURNEY: JourneyQuest,
|
|
24
|
+
MULTI_WAGERING: MultiWageringQuest,
|
|
22
25
|
};
|
|
23
26
|
const TabDefinition = z.enum(['AVAILABLE', 'COMPLETED', 'FAILED']);
|
|
24
27
|
export function Quests__client(props) {
|
|
25
28
|
const { className, style, heading } = props;
|
|
26
29
|
const classNames = isString(className) ? { root: className } : className;
|
|
27
30
|
const [tab, setTab] = useState('AVAILABLE');
|
|
31
|
+
const featureFlag = useFeatureFlag();
|
|
28
32
|
const questsQuery = useAvailableQuestsQuery({
|
|
29
33
|
refetchInterval: 7500,
|
|
30
34
|
});
|
|
@@ -51,7 +55,9 @@ export function Quests__client(props) {
|
|
|
51
55
|
return (_jsxs("div", { style: style, className: twMerge(classNames?.root), children: [_jsx("h2", { className: "font-semibold text-lg", children: heading ?? 'Quests' }), _jsxs(SegmentGroup.Root, { value: tab, onValueChange: (details) => {
|
|
52
56
|
setTab(TabDefinition.catch('AVAILABLE').parse(details.value));
|
|
53
57
|
}, className: "mt-3 w-full overflow-x-auto lg:mt-4.5 lg:w-fit", children: [_jsxs(SegmentGroup.Item, { value: "AVAILABLE", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Available" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "COMPLETED", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Completed" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "FAILED", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Failed" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsx(SegmentGroup.Indicator, {})] }), _jsx("div", { className: "mt-3xl grid gap-3xl lg:mt-lg lg:grid-cols-3", children: quests.map((quest) => {
|
|
54
|
-
const Quest =
|
|
58
|
+
const Quest = quest.stages?.length && featureFlag.enabled
|
|
59
|
+
? QUEST_COMPONENT_MAP['MULTI_WAGERING']
|
|
60
|
+
: QUEST_COMPONENT_MAP[quest.type];
|
|
55
61
|
return (_jsx(QuestContext, { value: quest, children: _jsx(Quest, { className: quest.type === 'WAGERING'
|
|
56
62
|
? classNames?.wageringQuest
|
|
57
63
|
: quest.type === 'DAILY_CHECKIN'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SessionWatcher(): null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useRouter } from 'next/navigation';
|
|
3
|
+
import { useCallback, useEffect } from 'react';
|
|
4
|
+
import { useSessionHealthQuery } from '../../client/hooks/useSessionHealthQuery.js';
|
|
5
|
+
import { useSignOutMutation } from '../../client/hooks/useSignOutMutation.js';
|
|
6
|
+
export function SessionWatcher() {
|
|
7
|
+
const router = useRouter();
|
|
8
|
+
const query = useSessionHealthQuery({ refetchInterval: 1000 * 5 });
|
|
9
|
+
const healthy = query.data ?? true;
|
|
10
|
+
const mutation = useSignOutMutation();
|
|
11
|
+
const signOut = useCallback(async () => {
|
|
12
|
+
await mutation.mutateAsync();
|
|
13
|
+
router.refresh();
|
|
14
|
+
}, [mutation, router]);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (!healthy)
|
|
17
|
+
signOut();
|
|
18
|
+
}, [healthy, signOut]);
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SessionWatcher';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SessionWatcher.js';
|
|
@@ -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
|
|
@@ -16,6 +16,7 @@ export declare const RECOMMENDED_GAMES = "\n query RecommendedGames {\n reco
|
|
|
16
16
|
export declare const ANNOUNCEMENTS = "\n query Announcements(\n $first: Int\n $after: Cursor\n $filter: AnnouncementFilterInput\n ) {\n announcements(first: $first, after: $after, filter: $filter) {\n edges {\n cursor\n node {\n ... on Announcement {\n id\n type\n title\n status\n message\n activationStartDateTime\n activationEndDateTime\n dateTimeCreated\n dateTimeLastUpdated\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n";
|
|
17
17
|
export declare const WITHDRAWAL_RECORDS = "\n query WithdrawalRecords(\n $first: Int\n $after: Cursor\n $filter: WithdrawalRecordFilterInput\n ) {\n member {\n withdrawalRecords(first: $first, after: $after, filter: $filter) {\n edges {\n cursor\n node {\n ... on BankWithdrawalRecord {\n id\n type\n bank\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on GCashWithdrawalRecord {\n id\n type\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n recipientMobileNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on ManualWithdrawalRecord {\n id\n type\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on MayaAppWithdrawalRecord {\n id\n type\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on InstapayWithdrawalRecord {\n id\n type\n fee\n netAmount\n bankName\n reference\n accountName\n amount\n status\n error\n withdrawalNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on ManualUPIWithdrawalRecord {\n id\n type\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on ManualBankWithdrawalRecord {\n id\n type\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on VentajaDisbursementWithdrawalRecord {\n id\n type\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on PisoPayRemittanceWithdrawalRecord {\n id\n type\n fee\n accountName\n accountNumber\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n";
|
|
18
18
|
export declare const CREATE_GCASH_WITHDRAWAL = "\n mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {\n createGCashWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on MobileNumberNotVerifiedError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on ReCAPTCHAVerificationFailedError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n }\n }\n";
|
|
19
|
+
export declare const CREATE_GCASH_STANDARD_CASH_IN_WITHDRAWAL = "\n mutation CreateGCashStandardCashInWithdrawal(\n $input: CreateGCashStandardCashInWithdrawalInput!\n ) {\n createGCashStandardCashInWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on MobileNumberNotVerifiedError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on ReCAPTCHAVerificationFailedError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n }\n }\n";
|
|
19
20
|
export declare const CREATE_MAYA_WITHDRAWAL = "\n mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {\n createMayaWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on MobileNumberNotVerifiedError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n }\n }\n";
|
|
20
21
|
export declare const CREATE_MAYA_APP_WITHDRAWAL = "\n mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {\n createMayaAppWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n }\n }\n";
|
|
21
22
|
export declare const CREATE_BANK_WITHDRAWAL = "\n mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {\n createBankWithdrawal(input: $input) {\n ... on MobileNumberNotVerifiedError {\n name: __typename\n message\n }\n }\n }\n";
|
|
@@ -67,7 +68,7 @@ export declare const MEMBER = "\n query Member {\n member {\n dateTimeL
|
|
|
67
68
|
/**
|
|
68
69
|
* _aka_ `Query.self`
|
|
69
70
|
*/
|
|
70
|
-
export declare const MEMBER_ACCOUNT = "\n query MemberAccount {\n memberAccount: self {\n ... on MemberAccount {\n id\n name\n status\n realName\n emailAddress\n mobileNumber\n birthDay\n verified\n verificationStatus\n nickName\n validId\n mobileNumberVerified\n mobileNumberVerificationRequired\n transactionPassword\n secretAnswerSubmitted\n dateTimeCreated\n dateTimeLastUpdated\n googleId\n facebookId\n cellxpertDetails {\n cxd\n dateTimeLastUpdated
|
|
71
|
+
export declare const MEMBER_ACCOUNT = "\n query MemberAccount {\n memberAccount: self {\n ... on MemberAccount {\n id\n name\n status\n realName\n emailAddress\n mobileNumber\n birthDay\n verified\n verificationStatus\n nickName\n validId\n mobileNumberVerified\n mobileNumberVerificationRequired\n transactionPassword\n secretAnswerSubmitted\n dateTimeCreated\n dateTimeLastUpdated\n googleId\n facebookId\n cellxpertDetails {\n cxd\n dateTimeLastUpdated\n }\n }\n }\n }\n";
|
|
71
72
|
export declare const MEMBER_VERIFICATION = "\n \n fragment FileFragment on File {\n id\n url\n status\n }\n\n\n query MemberVerification {\n memberAccount: self {\n ... on MemberAccount {\n verification {\n id\n status\n address\n permanentAddress\n sourceOfIncome\n natureOfWork\n nationality\n placeOfBirth\n idFrontImage {\n ...FileFragment\n }\n selfieImage {\n ...FileFragment\n }\n }\n }\n }\n }\n";
|
|
72
73
|
export declare const REGISTER_MEMBER_ACCOUNT = "\n mutation RegisterMemberAccount(\n $input: RegisterMemberAccountInput!\n $referralCode: String\n $verificationCode: String\n $reCAPTCHAResponse: String\n ) {\n registerMemberAccount(\n input: $input\n referralCode: $referralCode\n verificationCode: $verificationCode\n reCAPTCHAResponse: $reCAPTCHAResponse\n ) {\n ... on AccountNameNotAvailableError {\n name: __typename\n message\n }\n ... on InvalidPlatformError {\n name: __typename\n message\n }\n ... on InvalidPlatformError {\n name: __typename\n message\n }\n ... on InvalidReCAPTCHAResponseError {\n name: __typename\n message\n }\n ... on InvalidSMSVerificationCodeError {\n name: __typename\n message\n }\n ... on MinimumAgeRequirementError {\n name: __typename\n message\n }\n ... on MobileNumberNotAvailableError {\n name: __typename\n message\n }\n ... on ReCAPTCHAVerificationFailedError {\n name: __typename\n message\n }\n }\n }\n";
|
|
73
74
|
export declare const REGISTER_MEMBER_ACCOUNT_BY_NAME = "\n mutation RegisterMemberAccountByName(\n $input: RegisterMemberAccountByNameInput!\n $reCAPTCHAResponse: String!\n ) {\n registerMemberAccountByName(\n input: $input\n reCAPTCHAResponse: $reCAPTCHAResponse\n ) {\n ... on AccountNameNotAvailableError {\n name: __typename\n message\n }\n ... on InvalidPlatformError {\n name: __typename\n message\n }\n ... on InvalidReCAPTCHAResponseError {\n name: __typename\n message\n }\n }\n }\n";
|
|
@@ -109,10 +110,10 @@ export declare const COMPLETE_ONBOARDING = "\n mutation CompleteOnboarding($inp
|
|
|
109
110
|
export declare const SKIP_ONBOARDING = "\n mutation SkipOnboarding {\n skipOnboarding\n }\n";
|
|
110
111
|
export declare const QUEST_PROGRAM_FRAGMENT = "\n fragment QuestProgramFragment on QuestProgram {\n status\n type\n name\n description\n }\n";
|
|
111
112
|
export declare const DAILY_CHECKIN_FRAGMENT = "\n \n fragment QuestProgramFragment on QuestProgram {\n status\n type\n name\n description\n }\n\n fragment DailyCheckinQuestFragment on DailyCheckInQuest {\n id\n name\n description\n type\n program {\n ...QuestProgramFragment\n }\n\n status\n progressPercentage\n turnover\n endDateTime\n dateTimeCreated\n lastCheckInDate\n startDateTime\n checkInStreak\n\n thirdDayBonusAmount\n seventhDayBonusAmount\n sixthDayBonusAmount\n }\n";
|
|
112
|
-
export declare const WAGERING_FRAGMENT = "\n fragment WageringQuestFragment on WageringQuest {\n bonus\n id\n name\n type\n description\n program {\n ...QuestProgramFragment\n }\n\n status\n progressPercentage\n turnover\n targetTurnover\n endDateTime\n dateTimeCreated\n }\n";
|
|
113
|
+
export declare const WAGERING_FRAGMENT = "\n fragment WageringQuestFragment on WageringQuest {\n bonus\n id\n name\n type\n description\n program {\n ...QuestProgramFragment\n }\n\n status\n progressPercentage\n turnover\n targetTurnover\n endDateTime\n dateTimeCreated\n stages{\n targetTurnover\n bonusTurnoverRequirementMultiplier\n bonusAmount\n cleared\n dateTimeCleared\n }\n }\n";
|
|
113
114
|
export declare const JOURNEY_FRAGMENT = "\n fragment JourneyQuestFragment on JourneyQuest {\n id\n name\n description\n program {\n ...QuestProgramFragment\n }\n status\n type\n progressPercentage\n bonus\n bonusAwarded\n dateTimeCreated\n endDateTime\n milestones {\n id\n type\n name\n bonusAmount\n cleared\n description\n }\n }\n";
|
|
114
115
|
export declare const ONBOARDING_QUEST_FRAGMENT = "\n fragment OnboardingQuestFragment on OnboardingQuest {\n id\n name\n description\n program {\n ...QuestProgramFragment\n }\n\n status\n type\n progressPercentage\n bonus\n endDateTime\n dateTimeCreated\n firstDepositCompleted\n accountVerificationCompleted\n }\n";
|
|
115
|
-
export declare const AVAILABLE_QUESTS = "\n \n fragment WageringQuestFragment on WageringQuest {\n bonus\n id\n name\n type\n description\n program {\n ...QuestProgramFragment\n }\n\n status\n progressPercentage\n turnover\n targetTurnover\n endDateTime\n dateTimeCreated\n }\n\n \n \n fragment QuestProgramFragment on QuestProgram {\n status\n type\n name\n description\n }\n\n fragment DailyCheckinQuestFragment on DailyCheckInQuest {\n id\n name\n description\n type\n program {\n ...QuestProgramFragment\n }\n\n status\n progressPercentage\n turnover\n endDateTime\n dateTimeCreated\n lastCheckInDate\n startDateTime\n checkInStreak\n\n thirdDayBonusAmount\n seventhDayBonusAmount\n sixthDayBonusAmount\n }\n\n \n fragment OnboardingQuestFragment on OnboardingQuest {\n id\n name\n description\n program {\n ...QuestProgramFragment\n }\n\n status\n type\n progressPercentage\n bonus\n endDateTime\n dateTimeCreated\n firstDepositCompleted\n accountVerificationCompleted\n }\n\n \n fragment JourneyQuestFragment on JourneyQuest {\n id\n name\n description\n program {\n ...QuestProgramFragment\n }\n status\n type\n progressPercentage\n bonus\n bonusAwarded\n dateTimeCreated\n endDateTime\n milestones {\n id\n type\n name\n bonusAmount\n cleared\n description\n }\n }\n\n\n query AvailableQuests {\n availableQuests {\n ... on Quest {\n ... on WageringQuest {\n ...WageringQuestFragment\n }\n ... on DailyCheckInQuest {\n ...DailyCheckinQuestFragment\n }\n ... on OnboardingQuest {\n ...OnboardingQuestFragment\n }\n ... on JourneyQuest {\n ...JourneyQuestFragment\n }\n }\n }\n }\n";
|
|
116
|
+
export declare const AVAILABLE_QUESTS = "\n \n fragment WageringQuestFragment on WageringQuest {\n bonus\n id\n name\n type\n description\n program {\n ...QuestProgramFragment\n }\n\n status\n progressPercentage\n turnover\n targetTurnover\n endDateTime\n dateTimeCreated\n stages{\n targetTurnover\n bonusTurnoverRequirementMultiplier\n bonusAmount\n cleared\n dateTimeCleared\n }\n }\n\n \n \n fragment QuestProgramFragment on QuestProgram {\n status\n type\n name\n description\n }\n\n fragment DailyCheckinQuestFragment on DailyCheckInQuest {\n id\n name\n description\n type\n program {\n ...QuestProgramFragment\n }\n\n status\n progressPercentage\n turnover\n endDateTime\n dateTimeCreated\n lastCheckInDate\n startDateTime\n checkInStreak\n\n thirdDayBonusAmount\n seventhDayBonusAmount\n sixthDayBonusAmount\n }\n\n \n fragment OnboardingQuestFragment on OnboardingQuest {\n id\n name\n description\n program {\n ...QuestProgramFragment\n }\n\n status\n type\n progressPercentage\n bonus\n endDateTime\n dateTimeCreated\n firstDepositCompleted\n accountVerificationCompleted\n }\n\n \n fragment JourneyQuestFragment on JourneyQuest {\n id\n name\n description\n program {\n ...QuestProgramFragment\n }\n status\n type\n progressPercentage\n bonus\n bonusAwarded\n dateTimeCreated\n endDateTime\n milestones {\n id\n type\n name\n bonusAmount\n cleared\n description\n }\n }\n\n\n query AvailableQuests {\n availableQuests {\n ... on Quest {\n ... on WageringQuest {\n ...WageringQuestFragment\n }\n ... on DailyCheckInQuest {\n ...DailyCheckinQuestFragment\n }\n ... on OnboardingQuest {\n ...OnboardingQuestFragment\n }\n ... on JourneyQuest {\n ...JourneyQuestFragment\n }\n }\n }\n }\n";
|
|
116
117
|
export declare const AVAILABLE_QUEST_IDS = "\n query AvailableQuestIds {\n availableQuests {\n ... on Node {\n id\n }\n }\n }\n";
|
|
117
118
|
export declare const CHECK_IN_DAILY_QUEST = "\n mutation checkInDailyCheckInQuest($input: CheckInDailyCheckInQuestInput!) {\n checkInDailyCheckInQuest(input: $input)\n }\n";
|
|
118
119
|
export declare const TOP_WINS = "\n query TopWins($first: Int) {\n topWins(first: $first) {\n id\n game {\n id\n name\n type\n provider\n }\n member {\n id\n name\n }\n multiplier\n payout\n }\n }\n";
|
package/dist/services/queries.js
CHANGED
|
@@ -420,6 +420,50 @@ export const CREATE_GCASH_WITHDRAWAL = /* GraphQL */ `
|
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
`;
|
|
423
|
+
export const CREATE_GCASH_STANDARD_CASH_IN_WITHDRAWAL = /* GraphQL */ `
|
|
424
|
+
mutation CreateGCashStandardCashInWithdrawal(
|
|
425
|
+
$input: CreateGCashStandardCashInWithdrawalInput!
|
|
426
|
+
) {
|
|
427
|
+
createGCashStandardCashInWithdrawal(input: $input) {
|
|
428
|
+
... on AccountNotVerifiedError {
|
|
429
|
+
name: __typename
|
|
430
|
+
message
|
|
431
|
+
}
|
|
432
|
+
... on InvalidTransactionPasswordError {
|
|
433
|
+
name: __typename
|
|
434
|
+
message
|
|
435
|
+
}
|
|
436
|
+
... on InvalidWithdrawalAmountError {
|
|
437
|
+
name: __typename
|
|
438
|
+
message
|
|
439
|
+
}
|
|
440
|
+
... on MobileNumberNotVerifiedError {
|
|
441
|
+
name: __typename
|
|
442
|
+
message
|
|
443
|
+
}
|
|
444
|
+
... on NotEnoughBalanceError {
|
|
445
|
+
name: __typename
|
|
446
|
+
message
|
|
447
|
+
}
|
|
448
|
+
... on WithdrawalDailyLimitExceededError {
|
|
449
|
+
name: __typename
|
|
450
|
+
message
|
|
451
|
+
}
|
|
452
|
+
... on ReCAPTCHAVerificationFailedError {
|
|
453
|
+
name: __typename
|
|
454
|
+
message
|
|
455
|
+
}
|
|
456
|
+
... on WalletDoesNotExistError {
|
|
457
|
+
name: __typename
|
|
458
|
+
message
|
|
459
|
+
}
|
|
460
|
+
... on TransactionPasswordNotSetError {
|
|
461
|
+
name: __typename
|
|
462
|
+
message
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
`;
|
|
423
467
|
export const CREATE_MAYA_WITHDRAWAL = /* GraphQL */ `
|
|
424
468
|
mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
|
|
425
469
|
createMayaWithdrawal(input: $input) {
|
|
@@ -1570,7 +1614,7 @@ export const MEMBER_ACCOUNT = /* GraphQL */ `
|
|
|
1570
1614
|
facebookId
|
|
1571
1615
|
cellxpertDetails {
|
|
1572
1616
|
cxd
|
|
1573
|
-
dateTimeLastUpdated
|
|
1617
|
+
dateTimeLastUpdated
|
|
1574
1618
|
}
|
|
1575
1619
|
}
|
|
1576
1620
|
}
|
|
@@ -2378,6 +2422,13 @@ export const WAGERING_FRAGMENT = /* GraphQL */ `
|
|
|
2378
2422
|
targetTurnover
|
|
2379
2423
|
endDateTime
|
|
2380
2424
|
dateTimeCreated
|
|
2425
|
+
stages{
|
|
2426
|
+
targetTurnover
|
|
2427
|
+
bonusTurnoverRequirementMultiplier
|
|
2428
|
+
bonusAmount
|
|
2429
|
+
cleared
|
|
2430
|
+
dateTimeCleared
|
|
2431
|
+
}
|
|
2381
2432
|
}
|
|
2382
2433
|
`;
|
|
2383
2434
|
export const JOURNEY_FRAGMENT = /* GraphQL */ `
|