@opexa/portal-components 0.0.1005 → 0.0.1007

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.
@@ -1,6 +1,6 @@
1
1
  export declare const OnlineBankDepositContext: (props: {
2
2
  value: {
3
- view: "form" | "vca";
3
+ view: "vca" | "form";
4
4
  status: "waiting" | "failed" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
5
5
  verify: () => void;
6
6
  reset: () => void;
@@ -13,7 +13,7 @@ export declare const OnlineBankDepositContext: (props: {
13
13
  } & {
14
14
  children?: import("react").ReactNode | undefined;
15
15
  }) => React.ReactNode, useOnlineBankDepositContext: () => {
16
- view: "form" | "vca";
16
+ view: "vca" | "form";
17
17
  status: "waiting" | "failed" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
18
18
  verify: () => void;
19
19
  reset: () => void;
@@ -1,7 +1,7 @@
1
1
  import type { Deposit } from '../../../../types';
2
2
  export type UseOnlineBankDepositReturn = ReturnType<typeof useOnlineBankDeposit>;
3
3
  export declare function useOnlineBankDeposit(): {
4
- view: "form" | "vca";
4
+ view: "vca" | "form";
5
5
  status: "waiting" | "failed" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
6
6
  verify: () => void;
7
7
  reset: () => void;
@@ -114,7 +114,7 @@ export function MayaWithdrawal() {
114
114
  }
115
115
  createWithdrawalMutation.mutate({
116
116
  amount: data.amount,
117
- recipientMobileNumber: mobileNumberParser.format(data.mobileNumber),
117
+ accountNumber: mobileNumberParser.format(data.mobileNumber),
118
118
  transactionPassword: data.password,
119
119
  });
120
120
  });
@@ -20,9 +20,9 @@ function KYCAccountVerificationRequired_lazy() {
20
20
  const isOpen = globalStore.kycVerificationRequired.open &&
21
21
  !globalStore.disclaimer.open &&
22
22
  !globalStore.termsOfUse.open;
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: {
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:" }), rejectionMessage?.title && rejectionMessage?.content ? (_jsxs("span", { children: [_jsxs("b", { children: [rejectionMessage?.title, ":"] }), _jsx("span", { className: "text-text-tertiary-600", dangerouslySetInnerHTML: {
24
24
  __html: rejectionMessage?.content ?? '',
25
- } })] })] }), _jsx(Button, { type: "button", className: "mt-lg", onClick: () => {
25
+ } })] })) : (_jsxs("div", { className: "flex flex-col gap-4 text-center text-text-tertiary-600", children: [_jsx("span", { children: "Missing Documents: Some required documents were not uploaded. Please ensure you provide all necessary files as outlined in our guidelines." }), _jsx("span", { children: "Unclear Images: The documents uploaded were blurry or not legible. Please re-upload clear, high-quality images where all text and details are visible." }), _jsx("span", { children: "To resolve this, double-check the document requirements and re-submit. If you're unsure about the guidelines or need further clarification, feel free to contact our support team for assistance. We're here to help!" })] }))] }), _jsx(Button, { type: "button", className: "mt-lg", onClick: () => {
26
26
  globalStore.kycVerificationRequired.setOpen(false);
27
27
  globalStore.kycReminder.setOpen(true);
28
28
  }, children: "Ok" })] }) }) })] }));
@@ -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!) {\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 ... 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(\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";
@@ -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($input: CreateMayaWithdrawalInput!) {
539
- createMayaWithdrawal(input: $input) {
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
- ... on FirstDepositRequiredError {
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
- transactionPassword: string;
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;
@@ -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
- ...input,
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.1005",
3
+ "version": "0.0.1007",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",