@opexa/portal-components 0.0.205 → 0.0.206

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.
Files changed (85) hide show
  1. package/dist/client/hooks/useCreatePisoPayDepositMutation.d.ts +4 -0
  2. package/dist/client/hooks/useCreatePisoPayDepositMutation.js +73 -0
  3. package/dist/client/hooks/useCreatePisoPayWithdrawalMutation.d.ts +4 -0
  4. package/dist/client/hooks/useCreatePisoPayWithdrawalMutation.js +28 -0
  5. package/dist/client/hooks/useGlobalStore.d.ts +2 -7
  6. package/dist/client/hooks/useGlobalStore.js +8 -11
  7. package/dist/components/DepositWithdrawal/Deposit/Deposit.js +8 -1
  8. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
  9. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
  10. package/dist/components/DepositWithdrawal/Deposit/PisoPayDeposit/PisoPayDeposit.d.ts +1 -0
  11. package/dist/components/DepositWithdrawal/Deposit/PisoPayDeposit/PisoPayDeposit.js +182 -0
  12. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
  13. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
  14. package/dist/components/DepositWithdrawal/PaymentMethods.js +6 -0
  15. package/dist/components/DepositWithdrawal/Withdrawal/PisoPayWithdrawal/PisoPayWithdrawal.d.ts +1 -0
  16. package/dist/components/DepositWithdrawal/Withdrawal/PisoPayWithdrawal/PisoPayWithdrawal.js +151 -0
  17. package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +8 -1
  18. package/dist/components/DepositWithdrawal/utils.d.ts +1 -1
  19. package/dist/components/DepositWithdrawal/utils.js +1 -0
  20. package/dist/components/KYC/BasicInformation.js +16 -12
  21. package/dist/components/KYC/IdentityVerification.js +2 -2
  22. package/dist/components/KYC/Indicator.js +3 -6
  23. package/dist/components/KYC/KYC.js +1 -3
  24. package/dist/components/KYC/KYC.lazy.d.ts +2 -1
  25. package/dist/components/KYC/KYC.lazy.js +16 -11
  26. package/dist/components/KYC/KYCReminder.d.ts +2 -5
  27. package/dist/components/KYC/KYCReminder.js +11 -20
  28. package/dist/components/KYC/KYCReminder.lazy.d.ts +4 -0
  29. package/dist/components/KYC/KYCReminder.lazy.js +30 -0
  30. package/dist/components/KYC/index.d.ts +1 -0
  31. package/dist/components/KYC/index.js +1 -0
  32. package/dist/components/Messages/MessagesPopup.js +1 -1
  33. package/dist/components/SignIn/MobileNumberSignIn.js +6 -5
  34. package/dist/components/SignIn/NameAndPasswordSignIn.js +2 -0
  35. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +11 -8
  36. package/dist/constants/PisoPayBanks.d.ts +4 -0
  37. package/dist/constants/PisoPayBanks.js +45 -0
  38. package/dist/constants/StorageKey.d.ts +0 -1
  39. package/dist/constants/StorageKey.js +0 -1
  40. package/dist/images/piso-pay.png +0 -0
  41. package/dist/services/queries.d.ts +2 -0
  42. package/dist/services/queries.js +68 -0
  43. package/dist/services/wallet.d.ts +27 -0
  44. package/dist/services/wallet.js +26 -1
  45. package/dist/types/index.d.ts +2 -0
  46. package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
  47. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
  48. package/dist/ui/Badge/Badge.d.ts +12 -12
  49. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  50. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  51. package/dist/ui/Carousel/Carousel.d.ts +45 -45
  52. package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
  53. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  54. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  55. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  56. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  57. package/dist/ui/Collapsible/Collapsible.d.ts +32 -32
  58. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  59. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  60. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  61. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  62. package/dist/ui/Dialog/Dialog.d.ts +88 -88
  63. package/dist/ui/Dialog/dialog.recipe.d.ts +8 -8
  64. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  65. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  66. package/dist/ui/Menu/Menu.d.ts +144 -144
  67. package/dist/ui/Menu/menu.recipe.d.ts +5 -5
  68. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  69. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  70. package/dist/ui/Popover/Popover.d.ts +55 -55
  71. package/dist/ui/Progress/Progress.d.ts +27 -27
  72. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  73. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  74. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  75. package/dist/ui/Select/Select.d.ts +45 -45
  76. package/dist/ui/Select/select.recipe.d.ts +3 -3
  77. package/dist/ui/Table/Table.d.ts +21 -21
  78. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  79. package/dist/ui/Table/table.recipe.d.ts +3 -3
  80. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  81. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  82. package/dist/ui/Tooltip/tooltip.recipe.d.ts +5 -5
  83. package/dist/utils/mutationKeys.d.ts +2 -0
  84. package/dist/utils/mutationKeys.js +8 -0
  85. package/package.json +1 -1
@@ -490,6 +490,40 @@ export const CREATE_VENTAJA_WITHDRAWAL = /* GraphQL */ `
490
490
  }
491
491
  }
492
492
  `;
493
+ export const CREATE_PISO_PAY_WITHDRAWAL = /* GraphQL */ `
494
+ mutation CreatePisopayWithdrawal($input: CreatePisopayWithdrawalInput!) {
495
+ createPisopayWithdrawal(input: $input) {
496
+ ... on AccountNotVerifiedError {
497
+ name: __typename
498
+ message
499
+ }
500
+ ... on InvalidWithdrawalAmountError {
501
+ name: __typename
502
+ message
503
+ }
504
+ ... on WithdrawalDailyLimitExceededError {
505
+ name: __typename
506
+ message
507
+ }
508
+ ... on InvalidTransactionPasswordError {
509
+ name: __typename
510
+ message
511
+ }
512
+ ... on NotEnoughBalanceError {
513
+ name: __typename
514
+ message
515
+ }
516
+ ... on WalletDoesNotExistError {
517
+ name: __typename
518
+ message
519
+ }
520
+ ... on TransactionPasswordNotSetError {
521
+ name: __typename
522
+ message
523
+ }
524
+ }
525
+ }
526
+ `;
493
527
  export const CREATE_MANUAL_UPI_WITHDRAWAL = /* GraphQL */ `
494
528
  mutation CreateManualUPIWithdrawal($input: CreateManualUPIWithdrawalInput!) {
495
529
  createManualUPIWithdrawal(input: $input) {
@@ -701,6 +735,40 @@ export const CREATE_LIBANGAN_DEPOSIT = /* GraphQL */ `
701
735
  }
702
736
  }
703
737
  `;
738
+ export const CREATE_PISO_PAY_DEPOSIT = /* GraphQL */ `
739
+ mutation CreatePisoPayDeposit($input: CreatePisoPayDepositInput!) {
740
+ createPisoPayDeposit(input: $input) {
741
+ ... on WalletDoesNotExistError {
742
+ name: __typename
743
+ message
744
+ }
745
+ ... on DepositPromoMinimumAmountNotMetError {
746
+ name: __typename
747
+ message
748
+ }
749
+ ... on DepositPromoMaximumAmountExceededError {
750
+ name: __typename
751
+ message
752
+ }
753
+ ... on MinimumFirstDepositAmountNotMetError {
754
+ name: __typename
755
+ message
756
+ }
757
+ ... on MinimumDepositAmountNotMetError {
758
+ name: __typename
759
+ message
760
+ }
761
+ ... on MaximumDepositAmountExceededError {
762
+ name: __typename
763
+ message
764
+ }
765
+ ... on PromoNotEnabledError {
766
+ name: __typename
767
+ message
768
+ }
769
+ }
770
+ }
771
+ `;
704
772
  export const CREATE_MAYA_DEPOSIT = /* GraphQL */ `
705
773
  mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
706
774
  createMayaDeposit(input: $input) {
@@ -153,6 +153,19 @@ export interface CreateLibanganDepositMutationVariables {
153
153
  };
154
154
  }
155
155
  export declare const createLibanganDeposit: (input: CreateGCashDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
156
+ export type CreatePisoPayDepositInput = Simplify<CreatePisoPayDepositMutationVariables['input']>;
157
+ export interface CreatePisoPayDepositMutation {
158
+ createPisoPayDeposit?: null | CreateDepositError;
159
+ }
160
+ export interface CreatePisoPayDepositMutationVariables {
161
+ input: {
162
+ id: string;
163
+ amount: string;
164
+ promo?: string;
165
+ redirectionUrl: string;
166
+ };
167
+ }
168
+ export declare const createPisoPayDeposit: (input: CreatePisoPayDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
156
169
  export interface CreateGCashDirectWebpayDepositMutation {
157
170
  createGCashDirectWebpayDeposit?: null | CreateDepositError;
158
171
  }
@@ -278,6 +291,20 @@ export interface CreateGCashWithdrawalMutationVariables {
278
291
  }
279
292
  export type CreateGCashWithdrawalInput = Simplify<CreateGCashWithdrawalMutationVariables['input']>;
280
293
  export declare const createGCashWithdrawal: (input: CreateGCashWithdrawalInput, options?: GraphQLRequestOptions) => Promise<void>;
294
+ export interface CreatePisoPayWithdrawalMutation {
295
+ createPisopayWithdrawal?: null | CreateWithdrawalError;
296
+ }
297
+ export interface CreatePisoPayWithdrawalMutationVariables {
298
+ input: {
299
+ id: string;
300
+ amount: string;
301
+ bankCode: string;
302
+ accountNumber: string;
303
+ transactionPassword: string;
304
+ };
305
+ }
306
+ export type CreatePisoPayWithdrawalInput = Simplify<CreatePisoPayWithdrawalMutationVariables['input']>;
307
+ export declare const createPisoPayWithdrawal: (input: CreatePisoPayWithdrawalInput, options?: GraphQLRequestOptions) => Promise<void>;
281
308
  export interface CreateMayaWithdrawalMutation {
282
309
  createMayaWithdrawal?: null | CreateWithdrawalError;
283
310
  }
@@ -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_ONLINE_BANK_DEPOSIT, CREATE_AIO_QRPH_DEPOSIT, CREATE_BANK_WITHDRAWAL, CREATE_GAME_SESSION, CREATE_GCASH_DEPOSIT, CREATE_GCASH_DIRECT_WEBPAY_DEPOSIT, CREATE_GCASH_WITHDRAWAL, CREATE_LIBANGAN_DEPOSIT, CREATE_MANUAL_BANK_DEPOSIT, CREATE_MANUAL_BANK_WITHDRAWAL, CREATE_MANUAL_UPI_DEPOSIT, CREATE_MANUAL_UPI_WITHDRAWAL, CREATE_MAYA_APP_DEPOSIT, CREATE_MAYA_APP_WITHDRAWAL, CREATE_MAYA_DEPOSIT, CREATE_MAYA_WITHDRAWAL, CREATE_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';
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_ONLINE_BANK_DEPOSIT, CREATE_AIO_QRPH_DEPOSIT, CREATE_BANK_WITHDRAWAL, CREATE_GAME_SESSION, CREATE_GCASH_DEPOSIT, CREATE_GCASH_DIRECT_WEBPAY_DEPOSIT, CREATE_GCASH_WITHDRAWAL, CREATE_LIBANGAN_DEPOSIT, CREATE_MANUAL_BANK_DEPOSIT, CREATE_MANUAL_BANK_WITHDRAWAL, CREATE_MANUAL_UPI_DEPOSIT, CREATE_MANUAL_UPI_WITHDRAWAL, CREATE_MAYA_APP_DEPOSIT, CREATE_MAYA_APP_WITHDRAWAL, CREATE_MAYA_DEPOSIT, CREATE_MAYA_WITHDRAWAL, CREATE_PISO_PAY_DEPOSIT, CREATE_PISO_PAY_WITHDRAWAL, CREATE_VENTAJA_WITHDRAWAL, DEPOSIT, END_GAME_SESSION, FAVORITE_GAMES, GAME_SESSION, INSTAPAY_BANK_LIST, MARK_GAME_AS_FAVORITE, MAYA_SESSION, POINTS_WALLET, PROMO, PROMOS, REDEEM_POINTS_TO_CASH, REMAINING_DAILY_WITHDRAWALS_COUNT, TOUCH_GCASH_DEPOSIT, TOUCH_QRPH_DEPOSIT, UNMARK_GAME_AS_FAVORITE, VALIDATE_MAYA_SESSION, WALLET, } from './queries.js';
6
6
  import { sha256 } from './sha256.js';
7
7
  export const getPromos = cache(async (options) => {
8
8
  const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, PROMOS, undefined, {
@@ -104,6 +104,16 @@ export const createLibanganDeposit = async (input, options) => {
104
104
  throw error;
105
105
  }
106
106
  };
107
+ export const createPisoPayDeposit = async (input, options) => {
108
+ const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, CREATE_PISO_PAY_DEPOSIT, { input }, options);
109
+ if (res.createPisoPayDeposit) {
110
+ const error = new Error();
111
+ error.name = res.createPisoPayDeposit.name;
112
+ error.message = ERROR_CODES_MESSAGE_MAP[res.createPisoPayDeposit.name];
113
+ Error.captureStackTrace?.(error, createPisoPayDeposit);
114
+ throw error;
115
+ }
116
+ };
107
117
  export const createGCashDirectWebpayDeposit = async (input, options) => {
108
118
  const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, CREATE_GCASH_DIRECT_WEBPAY_DEPOSIT, { input }, options);
109
119
  if (res.createGCashDirectWebpayDeposit) {
@@ -191,6 +201,21 @@ export const createGCashWithdrawal = async (input, options) => {
191
201
  throw error;
192
202
  }
193
203
  };
204
+ export const createPisoPayWithdrawal = async (input, options) => {
205
+ const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, CREATE_PISO_PAY_WITHDRAWAL, {
206
+ input: {
207
+ ...input,
208
+ transactionPassword: await sha256(input.transactionPassword),
209
+ },
210
+ }, options);
211
+ if (res.createPisopayWithdrawal) {
212
+ const error = new Error();
213
+ error.name = res.createPisopayWithdrawal.name;
214
+ error.message = ERROR_CODES_MESSAGE_MAP[res.createPisopayWithdrawal.name];
215
+ Error.captureStackTrace?.(error, createGCashWithdrawal);
216
+ throw error;
217
+ }
218
+ };
194
219
  export const createMayaWithdrawal = async (input, options) => {
195
220
  const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, CREATE_MAYA_WITHDRAWAL, {
196
221
  input: {
@@ -508,6 +508,7 @@ export interface PaymentSettings {
508
508
  mayaAppDepositGatewaySettings?: DepositGatewaySettings | null;
509
509
  onlineBankDepositGatewaySettings?: DepositGatewaySettings | null;
510
510
  libanganDepositGatewaySettings?: DepositGatewaySettings | null;
511
+ pisoPayDepositGatewaySettings?: DepositGatewaySettings | null;
511
512
  qrphDepositGatewaySettings?: DepositGatewaySettings | null;
512
513
  manualBankDepositGatewaySettings: DepositGatewaySettings | null;
513
514
  manualUPIDepositGatewaySettings: DepositGatewaySettings | null;
@@ -519,6 +520,7 @@ export interface PaymentSettings {
519
520
  manualBankWithdrawalGatewaySettings?: WithdrawalGatewaySettings | null;
520
521
  manualUPIWithdrawalGatewaySettings?: WithdrawalGatewaySettings | null;
521
522
  ventajaWithdrawalGatewaySettings?: WithdrawalGatewaySettings | null;
523
+ pisoPayWithdrawalGatewaySettings?: WithdrawalGatewaySettings | null;
522
524
  }
523
525
  export interface MayaSession {
524
526
  id: string;