@opexa/portal-components 0.0.1004 → 0.0.1006
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/AccountInfo/AccountInfo.js +11 -5
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +4 -4
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +1 -1
- package/dist/components/KYC/KYCAccountVerificationRequired.lazy.js +9 -1
- package/dist/schemas/forgotPasswordSchema.d.ts +8 -8
- package/dist/services/queries.d.ts +1 -1
- package/dist/services/queries.js +9 -3
- package/dist/services/wallet.d.ts +5 -3
- package/dist/services/wallet.js +3 -4
- package/dist/types/index.d.ts +1 -1
- 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/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/Field/Field.d.ts +21 -21
- package/dist/ui/Field/field.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 +88 -88
- package/dist/ui/Popover/popover.recipe.d.ts +8 -8
- 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/utils/countries/getLocaleInfo.d.ts +2 -0
- package/dist/utils/countries/getLocaleInfo.js +1153 -1149
- package/package.json +1 -1
|
@@ -12,9 +12,10 @@ import { twMerge } from 'tailwind-merge';
|
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
|
|
14
14
|
import { useDisclosure } from '../../client/hooks/useDisclosure.js';
|
|
15
|
+
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
16
|
+
import { getLocale, extractPhoneCode } from '../../utils/countries/getLocaleInfo.js';
|
|
15
17
|
import { useFacebookClientQuery } from '../../client/hooks/useFacebookClientQuery.js';
|
|
16
18
|
import { useGoogleClientIdQuery } from '../../client/hooks/useGoogleClientIdQuery.js';
|
|
17
|
-
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
18
19
|
import { useMemberVerificationQuery } from '../../client/hooks/useMemberVerificationQuery.js';
|
|
19
20
|
import { useMobileNumberParser } from '../../client/hooks/useMobileNumberParser.js';
|
|
20
21
|
import { useProfileCompletionQuery } from '../../client/hooks/useProfileCompletionQuery.js';
|
|
@@ -39,7 +40,6 @@ import { IconButton } from '../../ui/IconButton/index.js';
|
|
|
39
40
|
import { Portal } from '../../ui/Portal/index.js';
|
|
40
41
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
41
42
|
import { getAccountQueryKey, getProfileCompletionQueryKey, } from '../../utils/queryKeys.js';
|
|
42
|
-
import PhoneIcon from './icons/PhoneIcon.js';
|
|
43
43
|
const accountSchema = z.object({
|
|
44
44
|
name: z
|
|
45
45
|
.string()
|
|
@@ -161,11 +161,17 @@ function PersonalInfo(props) {
|
|
|
161
161
|
}), children: [_jsxs("div", { className: "px-4 py-5 lg:px-3xl lg:py-5", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.realName, readOnly: !!account?.realName, children: [_jsx(Field.Label, { children: "Full name" }), _jsx(Field.Input, { ...form.register('realName') }), _jsx(Field.ErrorText, { children: form.formState.errors.realName?.message })] }), _jsxs(Field.Root, { className: "mt-6", invalid: !!form.formState.errors.birthDay, readOnly: !!account?.birthDay, children: [_jsx(Field.Label, { children: "Date of birth" }), _jsx(Field.Input, { type: "date", ...form.register('birthDay'), className: twMerge('h-full py-2.5', account?.birthDay && 'pointer-events-none') }), _jsx(Field.ErrorText, { children: form.formState.errors.birthDay?.message })] }), props.shouldShowBranchCode && (_jsxs(Field.Root, { className: "mt-6", readOnly: true, children: [_jsx(Field.Label, { children: "Branch Code" }), _jsx(Field.Input, { type: "text", disabled: true, value: displayBranchName ?? account?.branchCode ?? '' })] })), _jsxs(Field.Root, { className: "mt-6", readOnly: true, children: [_jsx(Field.Label, { children: "Address" }), _jsx(Field.Input, { type: "text", readOnly: true, value: verification?.address ?? '' })] }), _jsxs(Field.Root, { className: "mt-6", readOnly: true, children: [_jsx(Field.Label, { children: "Nature of Work" }), _jsx(Field.Input, { type: "text", readOnly: true, value: verification?.natureOfWork ?? '' })] })] }), form.formState.isDirty && (_jsxs("div", { className: "flex justify-end gap-lg border-border-secondary border-t px-xl py-lg lg:px-3xl lg:py-xl", children: [_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, disabled: updateAccountMutation.isPending, onClick: () => form.reset(), children: "Cancel" }), _jsx(Button, { type: "submit", size: "sm", fullWidth: false, disabled: !form.formState.isValid || updateAccountMutation.isPending, children: "Save Changes" })] }))] })] }));
|
|
162
162
|
}
|
|
163
163
|
function ContactInfo({ variant }) {
|
|
164
|
-
const
|
|
164
|
+
const defaultLocaleInfo = useLocaleInfo();
|
|
165
165
|
const accountQuery = useAccountQuery();
|
|
166
|
+
const account = accountQuery.data;
|
|
167
|
+
const phoneCode = account?.mobileNumber
|
|
168
|
+
? extractPhoneCode(account.mobileNumber)
|
|
169
|
+
: undefined;
|
|
170
|
+
const localeInfo = variant === 'ofwin'
|
|
171
|
+
? getLocale(Intl.DateTimeFormat().resolvedOptions().timeZone, phoneCode || '+63')
|
|
172
|
+
: defaultLocaleInfo;
|
|
166
173
|
const profileCompletionQuery = useProfileCompletionQuery();
|
|
167
174
|
const profileCompletion = profileCompletionQuery.data;
|
|
168
|
-
const account = accountQuery.data;
|
|
169
175
|
const { parse, format, equals } = useMobileNumberParser();
|
|
170
176
|
const updateAccountMutation = useUpdateAccountMutation({
|
|
171
177
|
onSuccess() {
|
|
@@ -218,7 +224,7 @@ function ContactInfo({ variant }) {
|
|
|
218
224
|
? format(data.mobileNumber)
|
|
219
225
|
: undefined,
|
|
220
226
|
});
|
|
221
|
-
}), children: [_jsxs("div", { className: "px-xl py-5 lg:px-3xl lg:py-5", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.mobileNumber, children: [_jsx(Field.Label, { children: "Mobile Number" }), _jsxs("div", { className: "relative", children: [
|
|
227
|
+
}), children: [_jsxs("div", { className: "px-xl py-5 lg:px-3xl lg:py-5", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.mobileNumber, children: [_jsx(Field.Label, { children: "Mobile Number" }), _jsxs("div", { className: "relative", children: [_jsx(localeInfo.country.flag, { className: "-translate-y-1/2 pointer-events-none absolute top-1/2 left-3.5 size-5" }), _jsx(Field.Input, { className: "pl-10.5", readOnly: account?.mobileNumber != null, ...form.register('mobileNumber') })] }), _jsx(Field.ErrorText, { children: form.formState.errors.mobileNumber?.message })] }), _jsxs(Field.Root, { className: "mt-6", invalid: !!form.formState.errors.emailAddress, children: [_jsx(Field.Label, { children: "Email address" }), _jsx(Field.Input, { ...form.register('emailAddress') }), _jsx(Field.ErrorText, { children: form.formState.errors.emailAddress?.message })] })] }), form.formState.isDirty && (_jsxs("div", { className: "flex justify-end gap-lg border-border-secondary border-t px-xl py-lg lg:px-3xl lg:py-xl", children: [_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, disabled: updateAccountMutation.isPending, onClick: () => form.reset(), children: "Cancel" }), _jsx(Button, { type: "submit", size: "sm", fullWidth: false, disabled: updateAccountMutation.isPending || !form.formState.isValid, children: "Save Changes" })] }))] })] }));
|
|
222
228
|
}
|
|
223
229
|
function SSO({ google, facebook }) {
|
|
224
230
|
const googleClientIdQuery = useGoogleClientIdQuery({ enabled: !!google });
|
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const OnlineBankDepositContext: (props: {
|
|
2
2
|
value: {
|
|
3
|
-
view: "
|
|
4
|
-
status: "
|
|
3
|
+
view: "vca" | "form";
|
|
4
|
+
status: "waiting" | "failed" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
5
5
|
verify: () => void;
|
|
6
6
|
reset: () => void;
|
|
7
7
|
deposit: import("../../../../types").Deposit | null;
|
|
@@ -13,8 +13,8 @@ export declare const OnlineBankDepositContext: (props: {
|
|
|
13
13
|
} & {
|
|
14
14
|
children?: import("react").ReactNode | undefined;
|
|
15
15
|
}) => React.ReactNode, useOnlineBankDepositContext: () => {
|
|
16
|
-
view: "
|
|
17
|
-
status: "
|
|
16
|
+
view: "vca" | "form";
|
|
17
|
+
status: "waiting" | "failed" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
18
18
|
verify: () => void;
|
|
19
19
|
reset: () => void;
|
|
20
20
|
deposit: import("../../../../types").Deposit | null;
|
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Deposit } from '../../../../types';
|
|
2
2
|
export type UseOnlineBankDepositReturn = ReturnType<typeof useOnlineBankDeposit>;
|
|
3
3
|
export declare function useOnlineBankDeposit(): {
|
|
4
|
-
view: "
|
|
5
|
-
status: "
|
|
4
|
+
view: "vca" | "form";
|
|
5
|
+
status: "waiting" | "failed" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
6
6
|
verify: () => void;
|
|
7
7
|
reset: () => void;
|
|
8
8
|
deposit: Deposit | null;
|
|
@@ -114,7 +114,7 @@ export function MayaWithdrawal() {
|
|
|
114
114
|
}
|
|
115
115
|
createWithdrawalMutation.mutate({
|
|
116
116
|
amount: data.amount,
|
|
117
|
-
|
|
117
|
+
accountNumber: mobileNumberParser.format(data.mobileNumber),
|
|
118
118
|
transactionPassword: data.password,
|
|
119
119
|
});
|
|
120
120
|
});
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useShallow } from 'zustand/shallow';
|
|
3
3
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
4
|
+
import { useMessagesQuery } from '../../client/hooks/useMessagesQuery.js';
|
|
4
5
|
import { FileX02Icon } from '../../icons/FileX02Icon.js';
|
|
5
6
|
import { Button } from '../../ui/Button/index.js';
|
|
6
7
|
import { Dialog } from '../../ui/Dialog/index.js';
|
|
7
8
|
function KYCAccountVerificationRequired_lazy() {
|
|
9
|
+
const messagesQuery = useMessagesQuery();
|
|
10
|
+
const messages = messagesQuery.data?.pages;
|
|
11
|
+
const rejectionMessage = messages
|
|
12
|
+
?.flatMap((page) => page.edges)
|
|
13
|
+
.find((edge) => edge.node.type === 'MEMBER_VERIFICATION_REJECTION')?.node;
|
|
8
14
|
const globalStore = useGlobalStore(useShallow((s) => ({
|
|
9
15
|
kycVerificationRequired: s.kycAccountVerificationRequired,
|
|
10
16
|
disclaimer: s.disclaimer,
|
|
@@ -14,7 +20,9 @@ function KYCAccountVerificationRequired_lazy() {
|
|
|
14
20
|
const isOpen = globalStore.kycVerificationRequired.open &&
|
|
15
21
|
!globalStore.disclaimer.open &&
|
|
16
22
|
!globalStore.termsOfUse.open;
|
|
17
|
-
return (_jsxs(Dialog.Root, { open: isOpen, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: [_jsx(Dialog.Backdrop, { className: "z-[999]" }), _jsx(Dialog.Positioner, { className: "z-[999] flex items-center justify-center", children: _jsx(Dialog.Content, { className: "mx-auto h-fit max-w-[calc(100dvw-1rem)] overflow-y-auto rounded-lg bg-bg-primary lg:max-w-[400px]", children: _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto w-fit rounded-full bg-bg-brand-secondary p-2", children: _jsx(FileX02Icon, { className: "text-shadow-text-brand" }) }), _jsx("h2", { className: "mt-4 font-semibold text-lg", children: "Account Verification Rejected!" }), _jsxs("p", { className: "mt-xs flex flex-col gap-4 text-sm
|
|
23
|
+
return (_jsxs(Dialog.Root, { open: isOpen, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: [_jsx(Dialog.Backdrop, { className: "z-[999]" }), _jsx(Dialog.Positioner, { className: "z-[999] flex items-center justify-center", children: _jsx(Dialog.Content, { className: "mx-auto h-fit max-w-[calc(100dvw-1rem)] overflow-y-auto rounded-lg bg-bg-primary lg:max-w-[400px]", children: _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto w-fit rounded-full bg-bg-brand-secondary p-2", children: _jsx(FileX02Icon, { className: "text-shadow-text-brand" }) }), _jsx("h2", { className: "mt-4 font-semibold text-lg", children: "Account Verification Rejected!" }), _jsxs("p", { className: "mt-xs flex flex-col gap-4 text-sm", children: [_jsx("span", { className: "text-text-tertiary-600", children: "We're sorry, but your verification was rejected for the following reasons:" }), _jsxs("span", { children: [_jsxs("b", { children: [rejectionMessage?.title, ":"] }), _jsx("span", { className: "text-text-tertiary-600", dangerouslySetInnerHTML: {
|
|
24
|
+
__html: rejectionMessage?.content ?? '',
|
|
25
|
+
} })] })] }), _jsx(Button, { type: "button", className: "mt-lg", onClick: () => {
|
|
18
26
|
globalStore.kycVerificationRequired.setOpen(false);
|
|
19
27
|
globalStore.kycReminder.setOpen(true);
|
|
20
28
|
}, children: "Ok" })] }) }) })] }));
|
|
@@ -8,24 +8,24 @@ export declare const createForgotPasswordSchema: (mobileNumberParser: MobileNumb
|
|
|
8
8
|
mobileNumber: z.ZodEffects<z.ZodString, string, string>;
|
|
9
9
|
verificationCode: z.ZodEffects<z.ZodString, string, string>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
mobileNumber: string;
|
|
12
|
-
verificationCode: string;
|
|
13
11
|
password: string;
|
|
12
|
+
verificationCode: string;
|
|
13
|
+
mobileNumber: string;
|
|
14
14
|
confirmPassword: string;
|
|
15
15
|
}, {
|
|
16
|
-
mobileNumber: string;
|
|
17
|
-
verificationCode: string;
|
|
18
16
|
password: string;
|
|
17
|
+
verificationCode: string;
|
|
18
|
+
mobileNumber: string;
|
|
19
19
|
confirmPassword: string;
|
|
20
20
|
}>, {
|
|
21
|
-
mobileNumber: string;
|
|
22
|
-
verificationCode: string;
|
|
23
21
|
password: string;
|
|
22
|
+
verificationCode: string;
|
|
23
|
+
mobileNumber: string;
|
|
24
24
|
confirmPassword: string;
|
|
25
25
|
}, {
|
|
26
|
-
mobileNumber: string;
|
|
27
|
-
verificationCode: string;
|
|
28
26
|
password: string;
|
|
27
|
+
verificationCode: string;
|
|
28
|
+
mobileNumber: string;
|
|
29
29
|
confirmPassword: string;
|
|
30
30
|
}>;
|
|
31
31
|
export type ForgotPasswordSchema = z.infer<ReturnType<typeof createForgotPasswordSchema>>;
|
|
@@ -18,7 +18,7 @@ export declare const ANNOUNCEMENTS = "\n query Announcements(\n $first: Int\
|
|
|
18
18
|
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 serialCode\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 serialCode\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 serialCode\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 serialCode\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 serialCode\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 serialCode\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 serialCode\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on VentajaDisbursementWithdrawalRecord {\n bankName\n id\n type\n fee\n accountName\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n serialCode\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on PisoPayRemittanceWithdrawalRecord {\n bankName\n id\n type\n fee\n accountName\n accountNumber\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n serialCode\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on GCashStandardCashInWithdrawalRecord {\n id\n type\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n serialCode\n recipientMobileNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n";
|
|
19
19
|
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 ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
|
|
20
20
|
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 ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
|
|
21
|
-
export declare const CREATE_MAYA_WITHDRAWAL = "\n mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput
|
|
21
|
+
export declare const CREATE_MAYA_WITHDRAWAL = "\n mutation CreateMayaWithdrawal(\n $input: CreateMayaWithdrawalInput!\n $transactionPassword: String!\n ) {\n createMayaWithdrawal(\n input: $input\n transactionPassword: $transactionPassword\n ) {\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 TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
|
|
22
22
|
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 ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
|
|
23
23
|
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 ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
|
|
24
24
|
export declare const CREATE_AIO_INSTAPAY_WITHDRAWAL = "\n mutation CreateAIOInstapayWithdrawal(\n $input: CreateAIOInstapayWithdrawalInput!\n ) {\n createAIOInstapayWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\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 ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n \n }\n }\n";
|
package/dist/services/queries.js
CHANGED
|
@@ -535,8 +535,14 @@ export const CREATE_GCASH_STANDARD_CASH_IN_WITHDRAWAL = /* GraphQL */ `
|
|
|
535
535
|
}
|
|
536
536
|
`;
|
|
537
537
|
export const CREATE_MAYA_WITHDRAWAL = /* GraphQL */ `
|
|
538
|
-
mutation CreateMayaWithdrawal(
|
|
539
|
-
|
|
538
|
+
mutation CreateMayaWithdrawal(
|
|
539
|
+
$input: CreateMayaWithdrawalInput!
|
|
540
|
+
$transactionPassword: String!
|
|
541
|
+
) {
|
|
542
|
+
createMayaWithdrawal(
|
|
543
|
+
input: $input
|
|
544
|
+
transactionPassword: $transactionPassword
|
|
545
|
+
) {
|
|
540
546
|
... on AccountNotVerifiedError {
|
|
541
547
|
name: __typename
|
|
542
548
|
message
|
|
@@ -565,7 +571,7 @@ export const CREATE_MAYA_WITHDRAWAL = /* GraphQL */ `
|
|
|
565
571
|
name: __typename
|
|
566
572
|
message
|
|
567
573
|
}
|
|
568
|
-
|
|
574
|
+
... on FirstDepositRequiredError {
|
|
569
575
|
name: __typename
|
|
570
576
|
message
|
|
571
577
|
}
|
|
@@ -465,11 +465,13 @@ export interface CreateMayaWithdrawalMutationVariables {
|
|
|
465
465
|
input: {
|
|
466
466
|
id: string;
|
|
467
467
|
amount: string;
|
|
468
|
-
|
|
469
|
-
recipientMobileNumber: string;
|
|
468
|
+
accountNumber: string;
|
|
470
469
|
};
|
|
470
|
+
transactionPassword: string;
|
|
471
471
|
}
|
|
472
|
-
export type CreateMayaWithdrawalInput = Simplify<CreateMayaWithdrawalMutationVariables['input']
|
|
472
|
+
export type CreateMayaWithdrawalInput = Simplify<CreateMayaWithdrawalMutationVariables['input'] & {
|
|
473
|
+
transactionPassword: string;
|
|
474
|
+
}>;
|
|
473
475
|
export declare const createMayaWithdrawal: (input: CreateMayaWithdrawalInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
474
476
|
export interface CreateMayaAppWithdrawalMutation {
|
|
475
477
|
createMayaAppWithdrawal?: null | CreateWithdrawalError;
|
package/dist/services/wallet.js
CHANGED
|
@@ -346,11 +346,10 @@ export const createPisoPayWithdrawal = async (input, options) => {
|
|
|
346
346
|
}
|
|
347
347
|
};
|
|
348
348
|
export const createMayaWithdrawal = async (input, options) => {
|
|
349
|
+
const { transactionPassword, ...withdrawalInput } = input;
|
|
349
350
|
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, CREATE_MAYA_WITHDRAWAL, {
|
|
350
|
-
input:
|
|
351
|
-
|
|
352
|
-
transactionPassword: await sha256(input.transactionPassword),
|
|
353
|
-
},
|
|
351
|
+
input: withdrawalInput,
|
|
352
|
+
transactionPassword: await sha256(transactionPassword),
|
|
354
353
|
}, options);
|
|
355
354
|
if (res.createMayaWithdrawal) {
|
|
356
355
|
const error = new Error();
|
package/dist/types/index.d.ts
CHANGED
|
@@ -690,7 +690,7 @@ export interface MessageAction {
|
|
|
690
690
|
url: string;
|
|
691
691
|
}
|
|
692
692
|
export type MessageIcon = 'MESSAGE' | 'CHECK' | 'CELEBRATE' | 'ALERT' | 'INFO' | 'CONGRATS';
|
|
693
|
-
export type MessageType = 'TOURNAMENT_PAYOUT' | 'IMAGE' | 'TEXT' | '
|
|
693
|
+
export type MessageType = 'TOURNAMENT_PAYOUT' | 'IMAGE' | 'TEXT' | 'MEMBER_VERIFICATION_REJECTION';
|
|
694
694
|
export interface Message {
|
|
695
695
|
id: string;
|
|
696
696
|
icon: MessageIcon;
|