@opexa/portal-components 0.0.660 → 0.0.662
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/components/Messages/Messages.lazy.js +14 -4
- package/dist/components/Messages/MessagesPopup.js +13 -1
- package/dist/components/PortalProvider/AndroidOnlyComponents.d.ts +1 -0
- package/dist/components/PortalProvider/AndroidOnlyComponents.js +12 -0
- package/dist/components/Quests/WageringQuest.js +1 -1
- package/dist/services/queries.d.ts +2 -2
- package/dist/services/queries.js +5 -5
- package/dist/services/wallet.d.ts +5 -5
- package/dist/services/wallet.js +7 -7
- 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 +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/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.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/Popover/Popover.d.ts +55 -55
- package/dist/ui/Popover/popover.recipe.d.ts +5 -5
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/package.json +1 -1
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +0 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +0 -184
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +0 -1
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +0 -29
- package/dist/components/SessionWatcher/SessionWatcher.d.ts +0 -1
- package/dist/components/SessionWatcher/SessionWatcher.js +0 -20
- package/dist/components/SessionWatcher/index.d.ts +0 -1
- package/dist/components/SessionWatcher/index.js +0 -1
|
@@ -53,7 +53,7 @@ export function Messages(props) {
|
|
|
53
53
|
return (_jsxs(_Fragment, { children: [_jsx(Drawer.Root, { open: globalStore.messages.open, onOpenChange: ({ open }) => globalStore.messages.setOpen(open), lazyMount: true, unmountOnExit: true, children: _jsx(Portal, { children: _jsx(Drawer.Positioner, { children: _jsx(Drawer.Content, { className: twMerge('flex', 'flex-col', 'border-border-secondary', 'top-[var(--offset-top-mobile)]', 'h-[calc(100%-var(--offset-top-mobile))]', 'lg:border-l', 'lg:top-[var(--offset-top-desktop)]', 'lg:h-[calc(100%-var(--offset-top-desktop))]'), style: {
|
|
54
54
|
['--offset-top-mobile']: mobileOffsetTop,
|
|
55
55
|
['--offset-top-desktop']: desktopOffsetTop,
|
|
56
|
-
}, children: _jsxs("div", { className: "flex h-full flex-col", children: [_jsxs("div", { className:
|
|
56
|
+
}, children: _jsxs("div", { className: "flex h-full flex-col", children: [_jsxs("div", { className: "flex items-center justify-between bg-bg-primary p-xl", children: [_jsxs("div", { className: "flex items-center gap-md", children: [_jsx(Drawer.CloseTrigger, { className: "grid size-8 place-items-center rounded-lg border border-border-secondary", "aria-label": "Back", children: _jsx(NotifExitIcon, { className: "size-4" }) }), _jsx("p", { className: "font-semibold text-lg text-text-primary-brand", children: "Notifications" })] }), _jsx("button", { className: "font-semibold text-brand-400 hover:opacity-90 disabled:opacity-50", type: "button", disabled: markAllMessagesAsReadMutation.isPending ||
|
|
57
57
|
!unreadMessagesCount, onClick: () => markAllMessagesAsReadMutation.mutate(), children: "Mark all as read" })] }), _jsxs(Tabs.Root, { value: globalStore.messages.tab, onValueChange: (details) => globalStore.messages.setTab(z.enum(TABS).parse(details.value)), lazyMount: true, unmountOnExit: true, className: "flex grow flex-col overflow-y-auto", children: [_jsx("div", { className: "p-xl pt-0", children: _jsxs(Tabs.List, { className: "w-full", children: [_jsx(Tabs.Trigger, { value: "ALL", className: "w-full", children: "All" }), _jsxs(Tabs.Trigger, { value: "UNREAD", className: "w-full", children: ["Unread", !!unreadMessagesCount && (_jsx("span", { className: "ml-md rounded-full border border-border-primary bg-bg-secondary px-2 py-0.5", children: unreadMessagesCount }))] }), _jsx(Tabs.Indicator, {})] }) }), TABS.map((tab) => (_jsxs(Tabs.Content, { value: tab, className: "scrollbar:w-2 grow overflow-y-auto scrollbar-thumb:rounded-full scrollbar-track:rounded-full border-border-secondary border-t scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-bg-primary-alt p-xl", children: [messages.length > 0 && (_jsx("div", { className: "flex flex-col space-y-3", children: messages.map((message) => (_jsx(MessageProvider, { value: message, children: _jsx(Message, {}) }, message.id))) })), _jsx(InfiniteScroll, { loader: _jsx(SpinnerIcon, { className: "mx-auto size-5" }), hasMore: !!messagesQuery.hasNextPage, loadMore: async () => {
|
|
58
58
|
await messagesQuery.fetchNextPage();
|
|
59
59
|
}, className: "mt-4" })] }, tab)))] })] }) }) }) }) }), _jsx(MessageDetails, {})] }));
|
|
@@ -94,11 +94,21 @@ export function MessageDetails() {
|
|
|
94
94
|
message: ctx.message,
|
|
95
95
|
})));
|
|
96
96
|
const message = globalStore.message.data;
|
|
97
|
+
const transformContent = (content) => {
|
|
98
|
+
const QUOTE_REGEX = /["\u201C]([^"\u201D]+)["\u201D]/g;
|
|
99
|
+
const defaultContentFormat = 'Your journey continues with . Complete this quest to earn exclusive rewards and advance your progress.';
|
|
100
|
+
const isDefaultContent = content.replace(/“.*?”/, '').includes(defaultContentFormat) ?? false;
|
|
101
|
+
const match = QUOTE_REGEX.exec(content ?? '');
|
|
102
|
+
if (match && isDefaultContent) {
|
|
103
|
+
return `<p class="text-center">${content?.replace(QUOTE_REGEX, `<span class="!text-brand-500 !w-fit">“${match[1]}”</span>`)}</p>`;
|
|
104
|
+
}
|
|
105
|
+
return content;
|
|
106
|
+
};
|
|
97
107
|
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: globalStore.message.open, onOpenChange: (details) => {
|
|
98
108
|
globalStore.message.setOpen(details.open);
|
|
99
|
-
}, 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 max-h-[80vh] min-w-[21.438rem] max-w-[21.438rem] overflow-y-auto rounded-xl p-3xl lg:min-w-[25rem] lg:max-w-[25rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(MessageIcon, { type: message?.icon ?? 'INFO', className: "size-6" }) }), _jsx(Dialog.Title, { className: "mt-lg text-center font-semibold text-lg lg:mt-xl", children: message?.title }), message?.content && (_jsx(Dialog.Description, { className: "mt-xs
|
|
100
|
-
__html: message?.content,
|
|
101
|
-
} })), message?.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message?.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message?.actions.length ? (_jsx("div", { className: "mt-
|
|
109
|
+
}, 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 max-h-[80vh] min-w-[21.438rem] max-w-[21.438rem] overflow-y-auto rounded-xl p-3xl lg:min-w-[25rem] lg:max-w-[25rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(MessageIcon, { type: message?.icon ?? 'INFO', className: "size-6" }) }), _jsx(Dialog.Title, { className: "mt-lg text-center font-semibold text-lg lg:mt-xl", children: message?.title }), message?.content && (_jsx(Dialog.Description, { className: "mt-xs text-center text-sm text-text-secondary-700 [&_li]:mb-1 [&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:text-left [&_ul]:list-disc [&_ul]:pl-5 [&_ul]:text-left", dangerouslySetInnerHTML: {
|
|
110
|
+
__html: transformContent(message?.content),
|
|
111
|
+
} })), message?.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message?.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message?.actions.length ? (_jsx("div", { className: "mt-2xl flex flex-col gap-2 text-center lg:mt-2xl", children: message?.actions.map((action, index) => (_jsx(Button, { asChild: true, children: _jsx(Link, { href: normalizeActionUrl(action.url, {
|
|
102
112
|
transactionsPageUrl,
|
|
103
113
|
questsPageUrl,
|
|
104
114
|
}), onClick: (e) => {
|
|
@@ -98,6 +98,16 @@ export function MessagesPopup() {
|
|
|
98
98
|
if (messages.length > numbefOfUnreadMessages && paused) {
|
|
99
99
|
setPaused(false);
|
|
100
100
|
}
|
|
101
|
+
const transformContent = (content) => {
|
|
102
|
+
const QUOTE_REGEX = /["\u201C]([^"\u201D]+)["\u201D]/g;
|
|
103
|
+
const defaultContentFormat = 'Your journey continues with . Complete this quest to earn exclusive rewards and advance your progress.';
|
|
104
|
+
const isDefaultContent = content.replace(/“.*?”/, '').includes(defaultContentFormat) ?? false;
|
|
105
|
+
const match = QUOTE_REGEX.exec(content ?? '');
|
|
106
|
+
if (match && isDefaultContent) {
|
|
107
|
+
return `<p class="text-center">${content?.replace(QUOTE_REGEX, `<span class="!text-brand-500 !w-fit">“${match[1]}”</span>`)}</p>`;
|
|
108
|
+
}
|
|
109
|
+
return content;
|
|
110
|
+
};
|
|
101
111
|
return (_jsx(Dialog.Root, { open: disclosure.open &&
|
|
102
112
|
!paused &&
|
|
103
113
|
!globalStore.kyc.open &&
|
|
@@ -105,7 +115,9 @@ export function MessagesPopup() {
|
|
|
105
115
|
disclosure.setOpen(details.open);
|
|
106
116
|
}, 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: _jsxs(Dialog.Content, { className: "mx-auto max-h-[80vh] min-w-[21.438rem] max-w-[21.438rem] overflow-y-auto rounded-xl p-3xl lg:min-w-[25rem] lg:max-w-[25rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(Carousel.Root, { page: index, onPageChange: (details) => {
|
|
107
117
|
setIndex(details.page);
|
|
108
|
-
}, slideCount: messages.length, allowMouseDrag: true, autoplay: false, children: [_jsx(Carousel.ItemGroup, { children: messages.map((message, index) => (_jsxs(Carousel.Item, { index: index, className: "select-none", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(MessageIcon, { type: message.icon, className: "size-6" }) }), _jsx("h2", { className: "mt-lg text-center font-semibold text-lg xl:mt-xl", children: message.title }), message.content && (_jsx("div", { dangerouslySetInnerHTML: {
|
|
118
|
+
}, slideCount: messages.length, allowMouseDrag: true, autoplay: false, children: [_jsx(Carousel.ItemGroup, { children: messages.map((message, index) => (_jsxs(Carousel.Item, { index: index, className: "select-none", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(MessageIcon, { type: message.icon, className: "size-6" }) }), _jsx("h2", { className: "mt-lg text-center font-semibold text-lg xl:mt-xl", children: message.title }), message.content && (_jsx("div", { dangerouslySetInnerHTML: {
|
|
119
|
+
__html: transformContent(message.content),
|
|
120
|
+
}, className: "mt-xs pb-5 text-left text-sm text-text-secondary-700 [&_li>ol]:list-decimal [&_li>ol]:pl-5 [&_li>ul]:list-disc [&_li>ul]:pl-5 [&_li]:mb-1 [&_ol]:list-decimal [&_ol]:pl-5 [&_ul]:list-disc [&_ul]:pl-5" })), message.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message.actions.length ? (_jsx("div", { className: "mt-2xl flex flex-col gap-2 text-center lg:mt-2xl", children: message.actions.map((action, index) => (_jsx(Button, { asChild: true, children: _jsx(Link, { href: normalizeActionUrl(action.url, {
|
|
109
121
|
questsPageUrl,
|
|
110
122
|
transactionsPageUrl,
|
|
111
123
|
}), onClick: () => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AndroidOnlyComponents(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Capacitor } from '@capacitor/core';
|
|
4
|
+
import { AndroidRoutingHandler } from './AndroidRoutingHandler.js';
|
|
5
|
+
import PushNotification from './PushNotifications.js';
|
|
6
|
+
export function AndroidOnlyComponents() {
|
|
7
|
+
const platform = Capacitor.getPlatform();
|
|
8
|
+
const isNative = platform === 'android' || platform === 'ios';
|
|
9
|
+
if (!isNative)
|
|
10
|
+
return null;
|
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsx(PushNotification, {}), _jsx(AndroidRoutingHandler, {})] }));
|
|
12
|
+
}
|
|
@@ -39,7 +39,7 @@ export function WageringQuest(props) {
|
|
|
39
39
|
const numericValue = parseFloat(value);
|
|
40
40
|
return Math.floor(numericValue).toString();
|
|
41
41
|
};
|
|
42
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: twMerge('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', classNames?.root), children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start justify-between", children: [_jsx(RemainingTime, {}), _jsx("button", { type: "button", className: "flex size-9 cursor-pointer items-center justify-center rounded-md border border-border-secondary bg-bg-primary", onClick: () => disclosure.setOpen(true), "aria-label": "View Rules", children: _jsx(InfoCircleIcon, { className: "size-5 text-text-disabled" }) })] }), _jsx("p", { className: "font-semibold text-xl", children: name }), _jsx(Prose, { className: "text-wrap font-normal text-sm text-text-secondary-700", dangerouslySetInnerHTML: { __html: description } })] }), _jsxs("div", { className: "flex w-full flex-col space-y-2", children: [_jsxs("div", { className: "group flex items-center justify-between text-text-primary-brand", children: [_jsxs("p", { children: ["Progress ", parseDecimal(progressPercentage, 0).toFixed(
|
|
42
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: twMerge('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', classNames?.root), children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start justify-between", children: [_jsx(RemainingTime, {}), _jsx("button", { type: "button", className: "flex size-9 cursor-pointer items-center justify-center rounded-md border border-border-secondary bg-bg-primary", onClick: () => disclosure.setOpen(true), "aria-label": "View Rules", children: _jsx(InfoCircleIcon, { className: "size-5 text-text-disabled" }) })] }), _jsx("p", { className: "font-semibold text-xl", children: name }), _jsx(Prose, { className: "text-wrap font-normal text-sm text-text-secondary-700", dangerouslySetInnerHTML: { __html: description } })] }), _jsxs("div", { className: "flex w-full flex-col space-y-2", children: [_jsxs("div", { className: "group flex items-center justify-between text-text-primary-brand", children: [_jsxs("p", { children: ["Progress ", parseDecimal(progressPercentage, 0).toFixed(0), "%"] }), _jsxs("p", { children: [formatTurnover(turnover), _jsxs("span", { className: "text-text-quarterary-brand", children: ["/", targetTurnover, " ", localeInfo.currency.code] })] })] }), _jsx("div", { className: twMerge('h-2 w-full overflow-hidden rounded-full bg-bg-primary', classNames?.progressBarContainer), children: _jsx("div", { className: twMerge('h-full rounded-full bg-utility-brand-600 transition-all duration-300', classNames?.progressBar), style: { width: `${progressPercentage}%` } }) })] }), _jsx("div", { className: "flex h-full items-end", children: _jsx("div", { className: twMerge('w-full rounded-md border border-bg-primary-hover bg-button-secondary-bg px-3.5 py-2.5 text-center', classNames?.bonusContainer), children: status === 'COMPLETED' && customComplete ? (_jsx("div", { className: twMerge(classNames?.bonusText), children: customComplete })) : (_jsxs("p", { className: twMerge((remainingTime.expired ||
|
|
43
43
|
status === 'COMPLETED' ||
|
|
44
44
|
status === 'FAILED') &&
|
|
45
45
|
'opacity-50 grayscale', classNames?.bonusText), children: ["Complete to get", ' ', _jsxs("span", { className: twMerge('text-brand-400', classNames?.bonusAmount), children: ["\u20B1", bonus] }), ' ', "bonus!"] })) }) })] }), _jsx(Rules, { open: disclosure.open, onOpenChange: disclosure.setOpen, gameProviderCarousel: props.gameProviderCarousel, gameProviders: Object.entries(quest.turnoverRequirementContributionPercentagePerGameProvider ?? [])
|
|
@@ -30,7 +30,7 @@ export declare const INSTAPAY_BANK_LIST = "\n query InstapayBankList {\n ins
|
|
|
30
30
|
export declare const REMAINING_DAILY_WITHDRAWALS_COUNT = "\n query RemainingDailyWithdrawalsCount {\n remainingDailyWithdrawalsCount\n }\n";
|
|
31
31
|
export declare const DEPOSIT_RECORDS = "\n query DepositRecords(\n $after: Cursor\n $first: Int\n $filter: DepositRecordFilterInput\n ) {\n member {\n depositRecords(after: $after, first: $first, filter: $filter) {\n edges {\n cursor\n node {\n ... on DepositRecord {\n id\n type\n amount\n netAmount\n fee\n status\n deposit\n reference\n depositNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n";
|
|
32
32
|
export declare const CREATE_GCASH_DEPOSIT = "\n mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {\n createGCashDeposit(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";
|
|
33
|
-
export declare const
|
|
33
|
+
export declare const CREATE_GCASH_WEBPAY_DEPOSIT = "\n mutation CreateGCashWebpayDeposit(\n $input: CreateGCashWebpayDepositInput!\n ) {\n createGCashWebpayDeposit(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";
|
|
34
34
|
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";
|
|
35
35
|
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";
|
|
36
36
|
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";
|
|
@@ -39,7 +39,7 @@ export declare const CREATE_AIO_QRPH_DEPOSIT = "\n mutation CreateAIOQRPHDeposi
|
|
|
39
39
|
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";
|
|
40
40
|
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";
|
|
41
41
|
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";
|
|
42
|
-
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
|
|
42
|
+
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 }\n }\n";
|
|
43
43
|
export declare const DEPOSITS_COUNT = "\n query DepositsCount {\n member {\n depositsCount\n }\n }\n";
|
|
44
44
|
export declare const TOUCH_GCASH_DEPOSIT = "\n mutation TouchGCashDeposit($input: TouchGCashDepositInput!) {\n touchGCashDeposit(input: $input)\n }\n";
|
|
45
45
|
export declare const TOUCH_QRPH_DEPOSIT = "\n mutation TouchQRPHDeposit($input: TouchQRPHDepositInput!) {\n touchQRPHDeposit(input: $input)\n }\n";
|
package/dist/services/queries.js
CHANGED
|
@@ -878,11 +878,11 @@ export const CREATE_GCASH_DEPOSIT = /* GraphQL */ `
|
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
880
|
`;
|
|
881
|
-
export const
|
|
882
|
-
mutation
|
|
883
|
-
$input:
|
|
881
|
+
export const CREATE_GCASH_WEBPAY_DEPOSIT = /* GraphQL */ `
|
|
882
|
+
mutation CreateGCashWebpayDeposit(
|
|
883
|
+
$input: CreateGCashWebpayDepositInput!
|
|
884
884
|
) {
|
|
885
|
-
|
|
885
|
+
createGCashWebpayDeposit(input: $input) {
|
|
886
886
|
... on DepositPromoMaximumAmountExceededError {
|
|
887
887
|
name: __typename
|
|
888
888
|
message
|
|
@@ -1258,7 +1258,7 @@ export const DEPOSIT = /* GraphQL */ `
|
|
|
1258
1258
|
vca
|
|
1259
1259
|
error
|
|
1260
1260
|
}
|
|
1261
|
-
... on
|
|
1261
|
+
... on GCashWebpayDeposit {
|
|
1262
1262
|
id
|
|
1263
1263
|
type
|
|
1264
1264
|
status
|
|
@@ -176,18 +176,18 @@ export interface CreatePisoPayDepositMutationVariables {
|
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
178
|
export declare const createPisoPayDeposit: (input: CreatePisoPayDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
179
|
-
export interface
|
|
180
|
-
|
|
179
|
+
export interface CreateGCashWebpayDepositMutation {
|
|
180
|
+
createGCashWebpayDeposit?: null | CreateDepositError;
|
|
181
181
|
}
|
|
182
|
-
export interface
|
|
182
|
+
export interface CreateGCashWebpayDepositMutationVariables {
|
|
183
183
|
input: {
|
|
184
184
|
id: string;
|
|
185
185
|
amount: string;
|
|
186
186
|
promo?: string;
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
|
-
export type
|
|
190
|
-
export declare const
|
|
189
|
+
export type CreateGCashWebpayDepositInput = Simplify<CreateGCashWebpayDepositMutationVariables['input']>;
|
|
190
|
+
export declare const createGCashWebpayDeposit: (input: CreateGCashWebpayDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
191
191
|
export interface CreateMayaDepositMutation {
|
|
192
192
|
createMayaDeposit?: null | CreateDepositError;
|
|
193
193
|
}
|
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_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, CREATE_GCASH_WEBPAY_DEPOSIT, CREATE_GCASH_STANDARD_CASH_IN_WITHDRAWAL, 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, {
|
|
@@ -134,14 +134,14 @@ export const createPisoPayDeposit = async (input, options) => {
|
|
|
134
134
|
throw error;
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
|
-
export const
|
|
138
|
-
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT,
|
|
139
|
-
if (res.
|
|
137
|
+
export const createGCashWebpayDeposit = async (input, options) => {
|
|
138
|
+
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, CREATE_GCASH_WEBPAY_DEPOSIT, { input }, options);
|
|
139
|
+
if (res.createGCashWebpayDeposit) {
|
|
140
140
|
const error = new Error();
|
|
141
|
-
error.name = res.
|
|
141
|
+
error.name = res.createGCashWebpayDeposit.name;
|
|
142
142
|
error.message =
|
|
143
|
-
ERROR_CODES_MESSAGE_MAP[res.
|
|
144
|
-
Error.captureStackTrace?.(error,
|
|
143
|
+
ERROR_CODES_MESSAGE_MAP[res.createGCashWebpayDeposit.name];
|
|
144
|
+
Error.captureStackTrace?.(error, createGCashWebpayDeposit);
|
|
145
145
|
throw error;
|
|
146
146
|
}
|
|
147
147
|
};
|