@opexa/portal-components 0.0.12 → 0.0.13
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/{hooks → client/hooks}/useAccountQuery.d.ts +1 -1
- package/dist/client/hooks/useAccountQuery.js +1 -0
- package/dist/client/hooks/useAccountQuery.mjs +38 -0
- package/dist/{hooks → client/hooks}/useAuthenticateMutation.d.ts +1 -1
- package/dist/client/hooks/useAuthenticateMutation.js +1 -0
- package/dist/client/hooks/useAuthenticateMutation.mjs +24 -0
- package/dist/{hooks → client/hooks}/useAvailablePromosQuery.d.ts +1 -1
- package/dist/client/hooks/useAvailablePromosQuery.js +1 -0
- package/dist/client/hooks/useAvailablePromosQuery.mjs +38 -0
- package/dist/{hooks → client/hooks}/useBetRecordsQuery.d.ts +1 -1
- package/dist/client/hooks/useBetRecordsQuery.js +1 -0
- package/dist/client/hooks/useBetRecordsQuery.mjs +47 -0
- package/dist/{hooks → client/hooks}/useCashbacksQuery.d.ts +1 -1
- package/dist/client/hooks/useCashbacksQuery.js +1 -0
- package/dist/client/hooks/useCashbacksQuery.mjs +23 -0
- package/dist/{hooks → client/hooks}/useCreateGCashDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateGCashDepositMutation.js +1 -0
- package/dist/{hooks → client/hooks}/useCreateGCashDepositMutation.mjs +15 -18
- package/dist/{hooks → client/hooks}/useCreateGameSessionMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateGameSessionMutation.js +1 -0
- package/dist/{hooks → client/hooks}/useCreateGameSessionMutation.mjs +20 -23
- package/dist/{hooks → client/hooks}/useCreateMayaAppDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateMayaAppDepositMutation.js +1 -0
- package/dist/client/hooks/useCreateMayaAppDepositMutation.mjs +66 -0
- package/dist/{hooks → client/hooks}/useCreateMayaDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateMayaDepositMutation.js +1 -0
- package/dist/{hooks → client/hooks}/useCreateMayaDepositMutation.mjs +24 -27
- package/dist/{hooks → client/hooks}/useCreateOnlineBankDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateOnlineBankDepositMutation.js +1 -0
- package/dist/{hooks → client/hooks}/useCreateOnlineBankDepositMutation.mjs +14 -17
- package/dist/{hooks → client/hooks}/useCreateQRPHDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateQRPHDepositMutation.js +1 -0
- package/dist/{hooks → client/hooks}/useCreateQRPHDepositMutation.mjs +14 -17
- package/dist/{hooks → client/hooks}/useDepositQuery.d.ts +1 -1
- package/dist/client/hooks/useDepositQuery.js +1 -0
- package/dist/client/hooks/useDepositQuery.mjs +39 -0
- package/dist/{hooks → client/hooks}/useDepositRecordsQuery.d.ts +1 -1
- package/dist/client/hooks/useDepositRecordsQuery.js +1 -0
- package/dist/client/hooks/useDepositRecordsQuery.mjs +47 -0
- package/dist/{hooks → client/hooks}/useDepositsCountQuery.d.ts +1 -1
- package/dist/client/hooks/useDepositsCountQuery.js +1 -0
- package/dist/client/hooks/useDepositsCountQuery.mjs +38 -0
- package/dist/{hooks → client/hooks}/useEndGameSessionMutation.d.ts +1 -1
- package/dist/client/hooks/useEndGameSessionMutation.js +1 -0
- package/dist/{hooks → client/hooks}/useEndGameSessionMutation.mjs +12 -15
- package/dist/{hooks → client/hooks}/useGamesQuery.d.ts +1 -1
- package/dist/client/hooks/useGamesQuery.js +1 -0
- package/dist/client/hooks/useGamesQuery.mjs +39 -0
- package/dist/{hooks → client/hooks}/useInfiniteQueryHelper.d.ts +1 -1
- package/dist/{hooks → client/hooks}/useInstapayBankListQuery.d.ts +1 -1
- package/dist/client/hooks/useInstapayBankListQuery.js +1 -0
- package/dist/client/hooks/useInstapayBankListQuery.mjs +38 -0
- package/dist/{hooks → client/hooks}/useIsMayaSessionValidQuery.d.ts +1 -1
- package/dist/client/hooks/useIsMayaSessionValidQuery.js +1 -0
- package/dist/client/hooks/useIsMayaSessionValidQuery.mjs +48 -0
- package/dist/{hooks → client/hooks}/useJackpotsQuery.d.ts +1 -1
- package/dist/client/hooks/useJackpotsQuery.js +1 -0
- package/dist/client/hooks/useJackpotsQuery.mjs +31 -0
- package/dist/client/hooks/useLocaleInfo.d.ts +1 -0
- package/dist/client/hooks/useLocaleInfo.js +1 -0
- package/dist/client/hooks/useLocaleInfo.mjs +15 -0
- package/dist/{hooks → client/hooks}/useMemberVerificationQuery.d.ts +1 -1
- package/dist/client/hooks/useMemberVerificationQuery.js +1 -0
- package/dist/client/hooks/useMemberVerificationQuery.mjs +38 -0
- package/dist/{hooks → client/hooks}/usePaymentSettingsQuery.d.ts +1 -1
- package/dist/client/hooks/usePaymentSettingsQuery.js +1 -0
- package/dist/client/hooks/usePaymentSettingsQuery.mjs +38 -0
- package/dist/{hooks → client/hooks}/usePlatformQuery.d.ts +1 -1
- package/dist/client/hooks/usePlatformQuery.js +1 -0
- package/dist/client/hooks/usePlatformQuery.mjs +21 -0
- package/dist/{hooks → client/hooks}/usePromoQuery.d.ts +1 -1
- package/dist/client/hooks/usePromoQuery.js +1 -0
- package/dist/client/hooks/usePromoQuery.mjs +24 -0
- package/dist/{hooks → client/hooks}/usePromosQuery.d.ts +1 -1
- package/dist/client/hooks/usePromosQuery.js +1 -0
- package/dist/client/hooks/usePromosQuery.mjs +23 -0
- package/dist/{hooks → client/hooks}/useSendVerificationCodeMutation.d.ts +1 -1
- package/dist/client/hooks/useSendVerificationCodeMutation.js +1 -0
- package/dist/client/hooks/useSendVerificationCodeMutation.mjs +24 -0
- package/dist/{hooks → client/hooks}/useSessionQuery.d.ts +1 -1
- package/dist/client/hooks/useSessionQuery.js +1 -0
- package/dist/client/hooks/useSessionQuery.mjs +19 -0
- package/dist/{hooks → client/hooks}/useSignInMutation.d.ts +1 -1
- package/dist/client/hooks/useSignInMutation.js +1 -0
- package/dist/client/hooks/useSignInMutation.mjs +25 -0
- package/dist/{hooks → client/hooks}/useSignOutMutation.d.ts +1 -1
- package/dist/client/hooks/useSignOutMutation.js +1 -0
- package/dist/client/hooks/useSignOutMutation.mjs +22 -0
- package/dist/{hooks → client/hooks}/useSignUpMutation.d.ts +1 -1
- package/dist/client/hooks/useSignUpMutation.js +1 -0
- package/dist/client/hooks/useSignUpMutation.mjs +25 -0
- package/dist/{hooks → client/hooks}/useSiteQuery.d.ts +1 -1
- package/dist/client/hooks/useSiteQuery.js +1 -0
- package/dist/client/hooks/useSiteQuery.mjs +23 -0
- package/dist/{hooks → client/hooks}/useTopWinsQuery.d.ts +1 -1
- package/dist/client/hooks/useTopWinsQuery.js +1 -0
- package/dist/client/hooks/useTopWinsQuery.mjs +22 -0
- package/dist/{hooks → client/hooks}/useTournamentsQuery.d.ts +1 -1
- package/dist/client/hooks/useTournamentsQuery.js +1 -0
- package/dist/client/hooks/useTournamentsQuery.mjs +32 -0
- package/dist/{hooks → client/hooks}/useTransactionRecordsQuery.d.ts +1 -1
- package/dist/client/hooks/useTransactionRecordsQuery.js +1 -0
- package/dist/{hooks → client/hooks}/useTransactionRecordsQuery.mjs +17 -20
- package/dist/{hooks → client/hooks}/useWalletQuery.d.ts +1 -1
- package/dist/client/hooks/useWalletQuery.js +1 -0
- package/dist/client/hooks/useWalletQuery.mjs +38 -0
- package/dist/{hooks → client/hooks}/useWithdrawalRecordsQuery.d.ts +1 -1
- package/dist/client/hooks/useWithdrawalRecordsQuery.js +1 -0
- package/dist/client/hooks/useWithdrawalRecordsQuery.mjs +47 -0
- package/dist/client/services/authenticate.js +1 -0
- package/dist/{services → client/services}/authenticate.mjs +1 -1
- package/dist/{services → client/services}/getSession.d.ts +1 -1
- package/dist/client/services/signIn.js +1 -0
- package/dist/{services → client/services}/signIn.mjs +1 -1
- package/dist/client/utils/createRecipeContext.js +1 -0
- package/dist/client/utils/createRecipeContext.mjs +55 -0
- package/dist/client/utils/index.d.ts +2 -0
- package/dist/client-hooks.d.ts +2 -0
- package/dist/client-hooks.js +1 -0
- package/dist/client-hooks.mjs +88 -0
- package/dist/client-services.d.ts +2 -0
- package/dist/client-services.js +1 -0
- package/dist/client-services.mjs +10 -0
- package/dist/client-utils.d.ts +2 -0
- package/dist/client-utils.js +1 -0
- package/dist/client-utils.mjs +6 -0
- package/dist/components/Account/Account.js +1 -1
- package/dist/components/Account/Account.mjs +16 -17
- package/dist/components/Banner/Banner.js +1 -1
- package/dist/components/Banner/Banner.mjs +16 -17
- package/dist/components/BetRecords/BetRecords.js +1 -1
- package/dist/components/BetRecords/BetRecords.mjs +6 -7
- package/dist/components/DepositWithdrawal/AmountChoices.js +1 -1
- package/dist/components/DepositWithdrawal/AmountChoices.mjs +10 -11
- package/dist/components/DepositWithdrawal/AvailablePromos.js +1 -1
- package/dist/components/DepositWithdrawal/AvailablePromos.mjs +7 -8
- package/dist/components/DepositWithdrawal/Deposit/Deposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/Deposit.mjs +30 -54
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.mjs +12 -12
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.mjs +9 -9
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.mjs +12 -12
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.mjs +9 -10
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.mjs +6 -8
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.mjs +9 -9
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.mjs +8 -9
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.mjs +6 -8
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.mjs +6 -8
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.mjs +9 -9
- package/dist/components/DepositWithdrawal/DepositWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawal.mjs +7 -8
- package/dist/components/DepositWithdrawal/PaymentMethods.js +1 -1
- package/dist/components/DepositWithdrawal/PaymentMethods.mjs +10 -11
- package/dist/components/Disclaimer/Disclaimer.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.mjs +2 -3
- package/dist/components/Disclaimer/useDisclaimer.js +1 -1
- package/dist/components/Disclaimer/useDisclaimer.mjs +2 -2
- package/dist/components/GameLaunch/GameLaunch.js +1 -1
- package/dist/components/GameLaunch/GameLaunch.mjs +15 -16
- package/dist/components/GameLaunch/GameLaunchTrigger.js +1 -1
- package/dist/components/GameLaunch/GameLaunchTrigger.mjs +8 -8
- package/dist/components/Games/Games.client.d.ts +2 -0
- package/dist/components/Games/Games.client.js +1 -0
- package/dist/components/Games/Games.client.mjs +150 -0
- package/dist/components/Games/Games.d.ts +1 -1
- package/dist/components/Games/Games.js +1 -1
- package/dist/components/Games/Games.mjs +11 -141
- package/dist/components/JackpotCounter/JackpotCounter.js +1 -1
- package/dist/components/JackpotCounter/JackpotCounter.mjs +5 -6
- package/dist/components/JackpotCounter/JackpotCounterItem.js +1 -1
- package/dist/components/JackpotCounter/JackpotCounterItem.mjs +14 -15
- package/dist/components/PortalProvider/PortalProvider.d.ts +1 -1
- package/dist/components/PortalProvider/PortalProvider.js +1 -1
- package/dist/components/PortalProvider/PortalProvider.mjs +18 -58
- package/dist/components/PortalProvider/Providers.d.ts +2 -0
- package/dist/components/PortalProvider/Providers.js +1 -0
- package/dist/components/PortalProvider/Providers.mjs +65 -0
- package/dist/components/Promo/PromoContent.js +1 -1
- package/dist/components/Promo/PromoContent.mjs +6 -7
- package/dist/components/Promos/PromoCarousel.js +1 -1
- package/dist/components/Promos/PromoCarousel.mjs +16 -17
- package/dist/components/Promos/PromoGrid.js +1 -1
- package/dist/components/Promos/PromoGrid.mjs +10 -11
- package/dist/components/Promos/PromoItem.js +1 -1
- package/dist/components/Promos/PromoItem.mjs +2 -4
- package/dist/components/Protected/Protected.js +1 -1
- package/dist/components/Protected/Protected.mjs +6 -8
- package/dist/components/SignIn/SignIn.js +1 -1
- package/dist/components/SignIn/SignIn.mjs +5 -6
- package/dist/components/SignIn/SignInForm.js +1 -1
- package/dist/components/SignIn/SignInForm.mjs +8 -8
- package/dist/components/SignUp/SignUp.js +1 -1
- package/dist/components/SignUp/SignUp.mjs +25 -26
- package/dist/components/SignUp/SignUpForm.js +1 -1
- package/dist/components/SignUp/SignUpForm.mjs +9 -9
- package/dist/components/TopWins/TopWins.client.d.ts +2 -0
- package/dist/components/TopWins/TopWins.client.js +1 -0
- package/dist/components/TopWins/TopWins.client.mjs +64 -0
- package/dist/components/TopWins/TopWins.d.ts +1 -1
- package/dist/components/TopWins/TopWins.js +1 -1
- package/dist/components/TopWins/TopWins.mjs +12 -61
- package/dist/components/TournamentCounter/TournamentCounter.js +1 -1
- package/dist/components/TournamentCounter/TournamentCounter.mjs +5 -6
- package/dist/components/TournamentCounter/TournamentCounterItem.js +1 -1
- package/dist/components/TournamentCounter/TournamentCounterItem.mjs +5 -6
- package/dist/components/TransactionRecords/DepositRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/DepositRecordsTable.mjs +6 -7
- package/dist/components/TransactionRecords/TableFilters.js +1 -1
- package/dist/components/TransactionRecords/TableFilters.mjs +5 -6
- package/dist/components/TransactionRecords/TransactionRecords.js +1 -1
- package/dist/components/TransactionRecords/TransactionRecords.mjs +4 -6
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/TransactionRecordsTable.mjs +6 -7
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.mjs +6 -7
- package/dist/components/index.d.ts +0 -1
- package/dist/components.js +1 -1
- package/dist/components.mjs +34 -39
- package/dist/dist/constants/index.js +1 -0
- package/dist/dist/constants/index.mjs +27 -0
- package/dist/dist/server/utils/prefetchTopWinsQuery.js +1 -0
- package/dist/dist/server/utils/prefetchTopWinsQuery.mjs +22 -0
- package/dist/dist/utils/getLocaleInfo.js +1 -0
- package/dist/dist/utils/getLocaleInfo.mjs +397 -0
- package/dist/dist/utils/getQueryClient.js +1 -0
- package/dist/dist/utils/getQueryClient.mjs +23 -0
- package/dist/dist/utils/isMobile.js +1 -0
- package/dist/dist/utils/isMobile.mjs +7 -0
- package/dist/dist/utils/parseDecimal.js +1 -0
- package/dist/dist/utils/parseDecimal.mjs +8 -0
- package/dist/dist/utils/queryKeys.js +1 -0
- package/dist/dist/utils/queryKeys.mjs +4 -0
- package/dist/server/utils/prefetchAccountQuery.js +1 -1
- package/dist/server/utils/prefetchAccountQuery.mjs +9 -12
- package/dist/server/utils/prefetchAvailablePromosQuery.js +1 -1
- package/dist/server/utils/prefetchAvailablePromosQuery.mjs +10 -13
- package/dist/server/utils/prefetchBetRecordsQuery.js +1 -1
- package/dist/server/utils/prefetchBetRecordsQuery.mjs +8 -11
- package/dist/server/utils/prefetchCashbacksQuery.js +1 -1
- package/dist/server/utils/prefetchCashbacksQuery.mjs +10 -13
- package/dist/server/utils/prefetchDepositQuery.js +1 -1
- package/dist/server/utils/prefetchDepositQuery.mjs +13 -16
- package/dist/server/utils/prefetchDepositRecordsQuery.js +1 -1
- package/dist/server/utils/prefetchDepositRecordsQuery.mjs +13 -16
- package/dist/server/utils/prefetchGamesQuery.js +1 -1
- package/dist/server/utils/prefetchGamesQuery.mjs +9 -12
- package/dist/server/utils/prefetchInstapayBankListQuery.js +1 -1
- package/dist/server/utils/prefetchInstapayBankListQuery.mjs +8 -11
- package/dist/server/utils/prefetchIsMayaSessionValidQuery.js +1 -1
- package/dist/server/utils/prefetchIsMayaSessionValidQuery.mjs +12 -15
- package/dist/server/utils/prefetchJackpotsQuery.js +1 -1
- package/dist/server/utils/prefetchJackpotsQuery.mjs +9 -12
- package/dist/server/utils/prefetchMemberVerificationQuery.js +1 -1
- package/dist/server/utils/prefetchMemberVerificationQuery.mjs +8 -11
- package/dist/server/utils/prefetchPaymentSettingsQuery.js +1 -1
- package/dist/server/utils/prefetchPaymentSettingsQuery.mjs +2 -5
- package/dist/server/utils/prefetchPlatformQuery.js +1 -1
- package/dist/server/utils/prefetchPlatformQuery.mjs +2 -5
- package/dist/server/utils/prefetchPromoQuery.js +1 -1
- package/dist/server/utils/prefetchPromoQuery.mjs +7 -10
- package/dist/server/utils/prefetchPromosQuery.js +1 -1
- package/dist/server/utils/prefetchPromosQuery.mjs +7 -10
- package/dist/server/utils/prefetchSessionQuery.js +1 -1
- package/dist/server/utils/prefetchSessionQuery.mjs +2 -5
- package/dist/server/utils/prefetchSiteQuery.js +1 -1
- package/dist/server/utils/prefetchSiteQuery.mjs +6 -9
- package/dist/server/utils/prefetchTopWinsQuery.js +1 -1
- package/dist/server/utils/prefetchTopWinsQuery.mjs +6 -9
- package/dist/server/utils/prefetchTournamentsQuery.js +1 -1
- package/dist/server/utils/prefetchTournamentsQuery.mjs +2 -5
- package/dist/server/utils/prefetchTransactionRecordsQuery.js +1 -1
- package/dist/server/utils/prefetchTransactionRecordsQuery.mjs +6 -9
- package/dist/server/utils/prefetchWalletQuery.js +1 -1
- package/dist/server/utils/prefetchWalletQuery.mjs +11 -14
- package/dist/server/utils/prefetchWithdrawalRecordsQuery.js +1 -1
- package/dist/server/utils/prefetchWithdrawalRecordsQuery.mjs +2 -5
- package/dist/ui/AlertDialog/AlertDialog.js +1 -1
- package/dist/ui/AlertDialog/AlertDialog.mjs +15 -21
- package/dist/ui/AlertDialog/alertDialog.recipe.js +1 -1
- package/dist/ui/AlertDialog/alertDialog.recipe.mjs +2 -5
- package/dist/ui/Avatar/Avatar.js +1 -1
- package/dist/ui/Avatar/Avatar.mjs +8 -14
- package/dist/ui/Avatar/avatar.recipe.js +1 -1
- package/dist/ui/Avatar/avatar.recipe.mjs +5 -8
- package/dist/ui/Badge/Badge.js +1 -1
- package/dist/ui/Badge/Badge.mjs +10 -16
- package/dist/ui/Badge/badge.recipe.js +1 -1
- package/dist/ui/Badge/badge.recipe.mjs +2 -5
- package/dist/ui/Button/Button.js +1 -1
- package/dist/ui/Button/Button.mjs +2 -4
- package/dist/ui/Checkbox/Checkbox.js +1 -1
- package/dist/ui/Checkbox/Checkbox.mjs +12 -18
- package/dist/ui/Checkbox/checkbox.recipe.js +1 -1
- package/dist/ui/Checkbox/checkbox.recipe.mjs +5 -8
- package/dist/ui/Clipboard/Clipboard.js +1 -1
- package/dist/ui/Clipboard/Clipboard.mjs +11 -17
- package/dist/ui/Clipboard/clipboard.recipe.js +1 -1
- package/dist/ui/Clipboard/clipboard.recipe.mjs +2 -5
- package/dist/ui/DatePicker/DatePicker.js +1 -1
- package/dist/ui/DatePicker/DatePicker.mjs +31 -37
- package/dist/ui/DatePicker/datePicker.recipe.js +1 -1
- package/dist/ui/DatePicker/datePicker.recipe.mjs +2 -5
- package/dist/ui/Dialog/Dialog.js +1 -1
- package/dist/ui/Dialog/Dialog.mjs +15 -21
- package/dist/ui/Dialog/dialog.recipe.js +1 -1
- package/dist/ui/Dialog/dialog.recipe.mjs +2 -5
- package/dist/ui/Drawer/Drawer.js +1 -1
- package/dist/ui/Drawer/Drawer.mjs +15 -21
- package/dist/ui/Drawer/drawer.recipe.js +1 -1
- package/dist/ui/Drawer/drawer.recipe.mjs +5 -8
- package/dist/ui/Field/Field.js +1 -1
- package/dist/ui/Field/Field.mjs +11 -17
- package/dist/ui/Field/field.recipe.js +1 -1
- package/dist/ui/Field/field.recipe.mjs +2 -5
- package/dist/ui/IconButton/IconButton.js +1 -1
- package/dist/ui/IconButton/IconButton.mjs +2 -4
- package/dist/ui/NumberInput/NumberInput.js +1 -1
- package/dist/ui/NumberInput/NumberInput.mjs +17 -23
- package/dist/ui/NumberInput/numberInput.recipe.js +1 -1
- package/dist/ui/NumberInput/numberInput.recipe.mjs +2 -5
- package/dist/ui/PinInput/PinInput.js +1 -1
- package/dist/ui/PinInput/PinInput.mjs +10 -16
- package/dist/ui/PinInput/pinInput.recipe.js +1 -1
- package/dist/ui/PinInput/pinInput.recipe.mjs +2 -5
- package/dist/ui/Popover/Popover.js +1 -1
- package/dist/ui/Popover/Popover.mjs +15 -21
- package/dist/ui/Popover/popover.recipe.js +1 -1
- package/dist/ui/Popover/popover.recipe.mjs +5 -8
- package/dist/ui/Presence.js +1 -1
- package/dist/ui/Presence.mjs +7 -6
- package/dist/ui/SegmentGroup/SegmentGroup.js +1 -1
- package/dist/ui/SegmentGroup/SegmentGroup.mjs +12 -18
- package/dist/ui/SegmentGroup/segmentGroup.recipe.js +1 -1
- package/dist/ui/SegmentGroup/segmentGroup.recipe.mjs +4 -7
- package/dist/ui/Select/Select.js +1 -1
- package/dist/ui/Select/Select.mjs +23 -29
- package/dist/ui/Select/select.recipe.js +1 -1
- package/dist/ui/Select/select.recipe.mjs +5 -8
- package/dist/ui/Table/Table.js +1 -1
- package/dist/ui/Table/Table.mjs +10 -16
- package/dist/ui/Table/table.recipe.js +1 -1
- package/dist/ui/Table/table.recipe.mjs +2 -5
- package/dist/ui/Tabs/Tabs.js +1 -1
- package/dist/ui/Tabs/Tabs.mjs +10 -16
- package/dist/ui/Tabs/tabs.recipe.js +1 -1
- package/dist/ui/Tabs/tabs.recipe.mjs +4 -7
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +54 -58
- package/package.json +143 -128
- package/dist/components/FeatureFlagProvider/FeatureFlagContext.d.ts +0 -6
- package/dist/components/FeatureFlagProvider/FeatureFlagContext.js +0 -1
- package/dist/components/FeatureFlagProvider/FeatureFlagContext.mjs +0 -13
- package/dist/components/FeatureFlagProvider/FeatureFlagProvider.d.ts +0 -6
- package/dist/components/FeatureFlagProvider/FeatureFlagProvider.js +0 -1
- package/dist/components/FeatureFlagProvider/FeatureFlagProvider.mjs +0 -64
- package/dist/components/FeatureFlagProvider/index.d.ts +0 -2
- package/dist/components/FeatureFlagProvider/useFeatureFlag.d.ts +0 -8
- package/dist/components/FeatureFlagProvider/useFeatureFlag.js +0 -1
- package/dist/components/FeatureFlagProvider/useFeatureFlag.mjs +0 -22
- package/dist/hooks/useAccountQuery.js +0 -1
- package/dist/hooks/useAccountQuery.mjs +0 -41
- package/dist/hooks/useAuthenticateMutation.js +0 -1
- package/dist/hooks/useAuthenticateMutation.mjs +0 -27
- package/dist/hooks/useAvailablePromosQuery.js +0 -1
- package/dist/hooks/useAvailablePromosQuery.mjs +0 -41
- package/dist/hooks/useBetRecordsQuery.js +0 -1
- package/dist/hooks/useBetRecordsQuery.mjs +0 -50
- package/dist/hooks/useCashbacksQuery.js +0 -1
- package/dist/hooks/useCashbacksQuery.mjs +0 -26
- package/dist/hooks/useCreateGCashDepositMutation.js +0 -1
- package/dist/hooks/useCreateGameSessionMutation.js +0 -1
- package/dist/hooks/useCreateMayaAppDepositMutation.js +0 -1
- package/dist/hooks/useCreateMayaAppDepositMutation.mjs +0 -69
- package/dist/hooks/useCreateMayaDepositMutation.js +0 -1
- package/dist/hooks/useCreateOnlineBankDepositMutation.js +0 -1
- package/dist/hooks/useCreateQRPHDepositMutation.js +0 -1
- package/dist/hooks/useDepositQuery.js +0 -1
- package/dist/hooks/useDepositQuery.mjs +0 -42
- package/dist/hooks/useDepositRecordsQuery.js +0 -1
- package/dist/hooks/useDepositRecordsQuery.mjs +0 -50
- package/dist/hooks/useDepositsCountQuery.js +0 -1
- package/dist/hooks/useDepositsCountQuery.mjs +0 -41
- package/dist/hooks/useEndGameSessionMutation.js +0 -1
- package/dist/hooks/useGamesQuery.js +0 -1
- package/dist/hooks/useGamesQuery.mjs +0 -42
- package/dist/hooks/useInstapayBankListQuery.js +0 -1
- package/dist/hooks/useInstapayBankListQuery.mjs +0 -41
- package/dist/hooks/useIsMayaSessionValidQuery.js +0 -1
- package/dist/hooks/useIsMayaSessionValidQuery.mjs +0 -51
- package/dist/hooks/useJackpotsQuery.js +0 -1
- package/dist/hooks/useJackpotsQuery.mjs +0 -34
- package/dist/hooks/useLocaleInfo.d.ts +0 -1
- package/dist/hooks/useLocaleInfo.js +0 -1
- package/dist/hooks/useLocaleInfo.mjs +0 -18
- package/dist/hooks/useMemberVerificationQuery.js +0 -1
- package/dist/hooks/useMemberVerificationQuery.mjs +0 -41
- package/dist/hooks/usePaymentSettingsQuery.js +0 -1
- package/dist/hooks/usePaymentSettingsQuery.mjs +0 -41
- package/dist/hooks/usePlatformQuery.js +0 -1
- package/dist/hooks/usePlatformQuery.mjs +0 -24
- package/dist/hooks/usePromoQuery.js +0 -1
- package/dist/hooks/usePromoQuery.mjs +0 -27
- package/dist/hooks/usePromosQuery.js +0 -1
- package/dist/hooks/usePromosQuery.mjs +0 -26
- package/dist/hooks/useSendVerificationCodeMutation.js +0 -1
- package/dist/hooks/useSendVerificationCodeMutation.mjs +0 -27
- package/dist/hooks/useSessionQuery.js +0 -1
- package/dist/hooks/useSessionQuery.mjs +0 -22
- package/dist/hooks/useSignInMutation.js +0 -1
- package/dist/hooks/useSignInMutation.mjs +0 -28
- package/dist/hooks/useSignOutMutation.js +0 -1
- package/dist/hooks/useSignOutMutation.mjs +0 -25
- package/dist/hooks/useSignUpMutation.js +0 -1
- package/dist/hooks/useSignUpMutation.mjs +0 -28
- package/dist/hooks/useSiteQuery.js +0 -1
- package/dist/hooks/useSiteQuery.mjs +0 -26
- package/dist/hooks/useTopWinsQuery.js +0 -1
- package/dist/hooks/useTopWinsQuery.mjs +0 -25
- package/dist/hooks/useTournamentsQuery.js +0 -1
- package/dist/hooks/useTournamentsQuery.mjs +0 -35
- package/dist/hooks/useTransactionRecordsQuery.js +0 -1
- package/dist/hooks/useWalletQuery.js +0 -1
- package/dist/hooks/useWalletQuery.mjs +0 -41
- package/dist/hooks/useWithdrawalRecordsQuery.js +0 -1
- package/dist/hooks/useWithdrawalRecordsQuery.mjs +0 -50
- package/dist/hooks.d.ts +0 -2
- package/dist/hooks.js +0 -1
- package/dist/hooks.mjs +0 -88
- package/dist/services/authenticate.js +0 -1
- package/dist/services/signIn.js +0 -1
- package/dist/services.d.ts +0 -2
- package/dist/services.js +0 -1
- package/dist/services.mjs +0 -10
- package/dist/utils/createRecipeContext.js +0 -1
- package/dist/utils/createRecipeContext.mjs +0 -49
- /package/dist/{hooks → client/hooks}/index.d.ts +0 -0
- /package/dist/{hooks → client/hooks}/useControllableState.d.ts +0 -0
- /package/dist/{hooks → client/hooks}/useControllableState.js +0 -0
- /package/dist/{hooks → client/hooks}/useControllableState.mjs +0 -0
- /package/dist/{hooks → client/hooks}/useCooldown.d.ts +0 -0
- /package/dist/{hooks → client/hooks}/useCooldown.js +0 -0
- /package/dist/{hooks → client/hooks}/useCooldown.mjs +0 -0
- /package/dist/{hooks → client/hooks}/useDisclosure.d.ts +0 -0
- /package/dist/{hooks → client/hooks}/useDisclosure.js +0 -0
- /package/dist/{hooks → client/hooks}/useDisclosure.mjs +0 -0
- /package/dist/{hooks → client/hooks}/useGlobalStore.d.ts +0 -0
- /package/dist/{hooks → client/hooks}/useGlobalStore.js +0 -0
- /package/dist/{hooks → client/hooks}/useGlobalStore.mjs +0 -0
- /package/dist/{hooks → client/hooks}/useInfiniteQueryHelper.js +0 -0
- /package/dist/{hooks → client/hooks}/useInfiniteQueryHelper.mjs +0 -0
- /package/dist/{hooks → client/hooks}/useMobileNumberParser.d.ts +0 -0
- /package/dist/{hooks → client/hooks}/useMobileNumberParser.js +0 -0
- /package/dist/{hooks → client/hooks}/useMobileNumberParser.mjs +0 -0
- /package/dist/{hooks → client/hooks}/useOnMMA.d.ts +0 -0
- /package/dist/{hooks → client/hooks}/useOnMMA.js +0 -0
- /package/dist/{hooks → client/hooks}/useOnMMA.mjs +0 -0
- /package/dist/{services → client/services}/authenticate.d.ts +0 -0
- /package/dist/{services → client/services}/getSession.js +0 -0
- /package/dist/{services → client/services}/getSession.mjs +0 -0
- /package/dist/{services → client/services}/index.d.ts +0 -0
- /package/dist/{services → client/services}/signIn.d.ts +0 -0
- /package/dist/{services → client/services}/signOut.d.ts +0 -0
- /package/dist/{services → client/services}/signOut.js +0 -0
- /package/dist/{services → client/services}/signOut.mjs +0 -0
- /package/dist/{utils → client/utils}/createRecipeContext.d.ts +0 -0
- /package/dist/{utils → client/utils}/toaster.d.ts +0 -0
- /package/dist/{utils → client/utils}/toaster.js +0 -0
- /package/dist/{utils → client/utils}/toaster.mjs +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("@opexa/portal-sdk-core"),a=require("@tanstack/react-query"),c=require("tiny-invariant"),u=require("../../constants/index.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const q=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const s=require("../../utils/queryKeys.js"),l=require("../services/getSession.js"),Q=require("./useSessionQuery.js"),d=e=>{var r;const n=q.getQueryClient(),o=Q.useSessionQuery();return a.useQuery({...e,enabled:(e==null?void 0:e.enabled)===!1?!1:((r=o.data)==null?void 0:r.status)==="authenticated",queryKey:s.getAccountQueryKey(),queryFn:async({signal:i})=>{const t=await n.fetchQuery({queryKey:s.getSessionQueryKey(),queryFn:()=>l.getSession()});return c(t.status==="authenticated"),await y.getMemberAccount({signal:i,environment:u.ENVIRONMENT,headers:{"Platform-Code":u.PLATFORM_CODE,Authorization:`Bearer ${t.token}`}})}})};exports.useAccountQuery=d;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getMemberAccount as n } from "@opexa/portal-sdk-core";
|
|
2
|
+
import { useQuery as a } from "@tanstack/react-query";
|
|
3
|
+
import i from "tiny-invariant";
|
|
4
|
+
import { PLATFORM_CODE as m, ENVIRONMENT as y } from "../../constants/index.mjs";
|
|
5
|
+
import "../../utils/capitalize.mjs";
|
|
6
|
+
import "../../utils/parseDecimal.mjs";
|
|
7
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
8
|
+
import { getQueryClient as p } from "../../utils/getQueryClient.mjs";
|
|
9
|
+
import "../../utils/isMobile.mjs";
|
|
10
|
+
import { getAccountQueryKey as c, getSessionQueryKey as Q } from "../../utils/queryKeys.mjs";
|
|
11
|
+
import { getSession as d } from "../services/getSession.mjs";
|
|
12
|
+
import { useSessionQuery as f } from "./useSessionQuery.mjs";
|
|
13
|
+
const v = (e) => {
|
|
14
|
+
var t;
|
|
15
|
+
const o = p(), s = f();
|
|
16
|
+
return a({
|
|
17
|
+
...e,
|
|
18
|
+
enabled: (e == null ? void 0 : e.enabled) === !1 ? !1 : ((t = s.data) == null ? void 0 : t.status) === "authenticated",
|
|
19
|
+
queryKey: c(),
|
|
20
|
+
queryFn: async ({ signal: u }) => {
|
|
21
|
+
const r = await o.fetchQuery({
|
|
22
|
+
queryKey: Q(),
|
|
23
|
+
queryFn: () => d()
|
|
24
|
+
});
|
|
25
|
+
return i(r.status === "authenticated"), await n({
|
|
26
|
+
signal: u,
|
|
27
|
+
environment: y,
|
|
28
|
+
headers: {
|
|
29
|
+
"Platform-Code": m,
|
|
30
|
+
Authorization: `Bearer ${r.token}`
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
v as useAccountQuery
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@tanstack/react-query");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../constants/index.js");require("../../utils/getLocaleInfo.js");const n=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const e=require("../../utils/queryKeys.js"),a=require("../services/authenticate.js"),o=t=>{const u=n.getQueryClient();return i.useMutation({...t,mutationKey:e.getAuthenticateMutationKey(),mutationFn:async r=>{await a.authenticate(r),await u.invalidateQueries({queryKey:e.getSessionQueryKey()})}})};exports.useAuthenticateMutation=o;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useMutation as o } from "@tanstack/react-query";
|
|
2
|
+
import "../../utils/capitalize.mjs";
|
|
3
|
+
import "../../utils/parseDecimal.mjs";
|
|
4
|
+
import "../../constants/index.mjs";
|
|
5
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
6
|
+
import { getQueryClient as r } from "../../utils/getQueryClient.mjs";
|
|
7
|
+
import "../../utils/isMobile.mjs";
|
|
8
|
+
import { getAuthenticateMutationKey as n, getSessionQueryKey as a } from "../../utils/queryKeys.mjs";
|
|
9
|
+
import { authenticate as u } from "../services/authenticate.mjs";
|
|
10
|
+
const l = (t) => {
|
|
11
|
+
const e = r();
|
|
12
|
+
return o({
|
|
13
|
+
...t,
|
|
14
|
+
mutationKey: n(),
|
|
15
|
+
mutationFn: async (i) => {
|
|
16
|
+
await u(i), await e.invalidateQueries({
|
|
17
|
+
queryKey: a()
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
l as useAuthenticateMutation
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("@opexa/portal-sdk-core"),l=require("@tanstack/react-query"),q=require("tiny-invariant"),u=require("../../constants/index.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const c=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const n=require("../../utils/queryKeys.js"),Q=require("../services/getSession.js"),d=require("./useSessionQuery.js"),b=(r,e)=>{var t;const a=c.getQueryClient(),o=d.useSessionQuery();return l.useQuery({...e,enabled:(e==null?void 0:e.enabled)===!1?!1:((t=o.data)==null?void 0:t.status)==="authenticated",queryKey:n.getAvailablePromosQueryKey(r),queryFn:async({signal:i})=>{const s=await a.fetchQuery({queryKey:n.getSessionQueryKey(),queryFn:()=>Q.getSession()});return q(s.status==="authenticated"),await y.getAvailablePromos(r,{signal:i,environment:u.ENVIRONMENT,headers:{"Platform-Code":u.PLATFORM_CODE,Authorization:`Bearer ${s.token}`}})}})};exports.useAvailablePromosQuery=b;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getAvailablePromos as m } from "@opexa/portal-sdk-core";
|
|
2
|
+
import { useQuery as u } from "@tanstack/react-query";
|
|
3
|
+
import n from "tiny-invariant";
|
|
4
|
+
import { PLATFORM_CODE as y, ENVIRONMENT as l } from "../../constants/index.mjs";
|
|
5
|
+
import "../../utils/capitalize.mjs";
|
|
6
|
+
import "../../utils/parseDecimal.mjs";
|
|
7
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
8
|
+
import { getQueryClient as p } from "../../utils/getQueryClient.mjs";
|
|
9
|
+
import "../../utils/isMobile.mjs";
|
|
10
|
+
import { getAvailablePromosQueryKey as Q, getSessionQueryKey as d } from "../../utils/queryKeys.mjs";
|
|
11
|
+
import { getSession as f } from "../services/getSession.mjs";
|
|
12
|
+
import { useSessionQuery as q } from "./useSessionQuery.mjs";
|
|
13
|
+
const w = (r, e) => {
|
|
14
|
+
var t;
|
|
15
|
+
const s = p(), a = q();
|
|
16
|
+
return u({
|
|
17
|
+
...e,
|
|
18
|
+
enabled: (e == null ? void 0 : e.enabled) === !1 ? !1 : ((t = a.data) == null ? void 0 : t.status) === "authenticated",
|
|
19
|
+
queryKey: Q(r),
|
|
20
|
+
queryFn: async ({ signal: i }) => {
|
|
21
|
+
const o = await s.fetchQuery({
|
|
22
|
+
queryKey: d(),
|
|
23
|
+
queryFn: () => f()
|
|
24
|
+
});
|
|
25
|
+
return n(o.status === "authenticated"), await m(r, {
|
|
26
|
+
signal: i,
|
|
27
|
+
environment: l,
|
|
28
|
+
headers: {
|
|
29
|
+
"Platform-Code": y,
|
|
30
|
+
Authorization: `Bearer ${o.token}`
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
w as useAvailablePromosQuery
|
|
38
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BetRecord, BetRecordsInput, PaginatedQueryResult } from '@opexa/portal-sdk-core';
|
|
2
|
-
import { InfiniteQuery } from '
|
|
2
|
+
import { InfiniteQuery } from '../../types';
|
|
3
3
|
export declare const useBetRecordsQuery: InfiniteQuery<PaginatedQueryResult<BetRecord>, BetRecordsInput>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("@opexa/portal-sdk-core"),a=require("@tanstack/react-query"),d=require("tiny-invariant"),i=require("../../constants/index.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const Q=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const o=require("../../utils/queryKeys.js"),f=require("../services/getSession.js"),S=require("./useSessionQuery.js"),C=(u,s)=>{var n;const y=Q.getQueryClient(),c=S.useSessionQuery();return a.useInfiniteQuery({enabled:((n=c.data)==null?void 0:n.status)==="authenticated",...s,queryKey:o.getBetRecordsQueryKey(u),queryFn:async({pageParam:e,signal:t})=>{const r=await y.fetchQuery({queryKey:o.getSessionQueryKey(),queryFn:()=>f.getSession()});return d(r.status==="authenticated"),await q.getBetRecords({...u,after:e},{signal:t,environment:i.ENVIRONMENT,headers:{"Platform-Code":i.PLATFORM_CODE,Authorization:`Bearer ${r.token}`}})},initialPageParam:void 0,getNextPageParam(e){var t,r;if((t=e==null?void 0:e.pageInfo)!=null&&t.hasNextPage)return(r=e==null?void 0:e.pageInfo)==null?void 0:r.endCursor}})};exports.useBetRecordsQuery=C;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getBetRecords as s } from "@opexa/portal-sdk-core";
|
|
2
|
+
import { useInfiniteQuery as y } from "@tanstack/react-query";
|
|
3
|
+
import f from "tiny-invariant";
|
|
4
|
+
import { PLATFORM_CODE as a, ENVIRONMENT as p } from "../../constants/index.mjs";
|
|
5
|
+
import "../../utils/capitalize.mjs";
|
|
6
|
+
import "../../utils/parseDecimal.mjs";
|
|
7
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
8
|
+
import { getQueryClient as c } from "../../utils/getQueryClient.mjs";
|
|
9
|
+
import "../../utils/isMobile.mjs";
|
|
10
|
+
import { getBetRecordsQueryKey as d, getSessionQueryKey as Q } from "../../utils/queryKeys.mjs";
|
|
11
|
+
import { getSession as q } from "../services/getSession.mjs";
|
|
12
|
+
import { useSessionQuery as h } from "./useSessionQuery.mjs";
|
|
13
|
+
const w = (o, n) => {
|
|
14
|
+
var i;
|
|
15
|
+
const u = c(), m = h();
|
|
16
|
+
return y({
|
|
17
|
+
enabled: ((i = m.data) == null ? void 0 : i.status) === "authenticated",
|
|
18
|
+
...n,
|
|
19
|
+
queryKey: d(o),
|
|
20
|
+
queryFn: async ({ pageParam: e, signal: t }) => {
|
|
21
|
+
const r = await u.fetchQuery({
|
|
22
|
+
queryKey: Q(),
|
|
23
|
+
queryFn: () => q()
|
|
24
|
+
});
|
|
25
|
+
return f(r.status === "authenticated"), await s(
|
|
26
|
+
{ ...o, after: e },
|
|
27
|
+
{
|
|
28
|
+
signal: t,
|
|
29
|
+
environment: p,
|
|
30
|
+
headers: {
|
|
31
|
+
"Platform-Code": a,
|
|
32
|
+
Authorization: `Bearer ${r.token}`
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
},
|
|
37
|
+
initialPageParam: void 0,
|
|
38
|
+
getNextPageParam(e) {
|
|
39
|
+
var t, r;
|
|
40
|
+
if ((t = e == null ? void 0 : e.pageInfo) != null && t.hasNextPage)
|
|
41
|
+
return (r = e == null ? void 0 : e.pageInfo) == null ? void 0 : r.endCursor;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
w as useBetRecordsQuery
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@opexa/portal-sdk-core"),t=require("@tanstack/react-query"),e=require("../../constants/index.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const a=require("../../utils/queryKeys.js"),i=r=>t.useQuery({...r,queryKey:a.getCashbacksQueryKey(),queryFn:async({signal:u})=>await s.getCashbacks({signal:u,environment:e.ENVIRONMENT,headers:{"Platform-Code":e.PLATFORM_CODE}})});exports.useCashbacksQuery=i;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getCashbacks as o } from "@opexa/portal-sdk-core";
|
|
2
|
+
import { useQuery as t } from "@tanstack/react-query";
|
|
3
|
+
import { PLATFORM_CODE as m, ENVIRONMENT as a } from "../../constants/index.mjs";
|
|
4
|
+
import "../../utils/capitalize.mjs";
|
|
5
|
+
import "../../utils/parseDecimal.mjs";
|
|
6
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
7
|
+
import "../../utils/getQueryClient.mjs";
|
|
8
|
+
import "../../utils/isMobile.mjs";
|
|
9
|
+
import { getCashbacksQueryKey as i } from "../../utils/queryKeys.mjs";
|
|
10
|
+
const b = (r) => t({
|
|
11
|
+
...r,
|
|
12
|
+
queryKey: i(),
|
|
13
|
+
queryFn: async ({ signal: e }) => await o({
|
|
14
|
+
signal: e,
|
|
15
|
+
environment: a,
|
|
16
|
+
headers: {
|
|
17
|
+
"Platform-Code": m
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
b as useCashbacksQuery
|
|
23
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CreateGCashDepositInput, Deposit } from '@opexa/portal-sdk-core';
|
|
2
2
|
import { SetOptional } from 'type-fest';
|
|
3
|
-
import { Mutation } from '
|
|
3
|
+
import { Mutation } from '../../types';
|
|
4
4
|
export declare const useCreateGCashDepositMutation: Mutation<Deposit, SetOptional<CreateGCashDepositInput, 'id'>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@opexa/portal-sdk-core"),c=require("@opexa/portal-sdk-core/object-id"),h=require("@tanstack/react-query"),y=require("tiny-invariant"),r=require("../../constants/index.js");require("../../utils/capitalize.js");const C=require("../../utils/createPoll.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const d=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const o=require("../../utils/queryKeys.js"),l=require("../services/getSession.js"),g=q=>{const n=d.getQueryClient();return h.useMutation({...q,mutationKey:o.getCreateGCashDepositMutationKey(),mutationFn:async i=>{const s=i.id??c.ObjectId.generate(c.ObjectType.Deposit).toString(),a=await n.fetchQuery({queryKey:o.getSessionQueryKey(),queryFn:()=>l.getSession()});y(a.status==="authenticated"),await u.createGCashDeposit({...i,id:s},{environment:r.ENVIRONMENT,headers:{"Platform-Code":r.PLATFORM_CODE,Authorization:`Bearer ${a.token}`}});const t=await C.createPoll(async()=>{const e=await n.fetchQuery({queryKey:o.getSessionQueryKey(),queryFn:()=>l.getSession()});return y(e.status==="authenticated"),await u.getDeposit(s,{environment:r.ENVIRONMENT,headers:{"Platform-Code":r.PLATFORM_CODE,Authorization:`Bearer ${e.token}`}})},{until(e){return!!(e!=null&&e.checkoutUrl)},interval:1e3,maxAttempt:5})();if(!(t!=null&&t.checkoutUrl)){const e=new Error;throw e.name="GCashDepositError",e.message="Failed to process GCash deposit",e}return t}})};exports.useCreateGCashDepositMutation=g;
|
|
@@ -2,27 +2,24 @@ import { createGCashDeposit as y, getDeposit as h } from "@opexa/portal-sdk-core
|
|
|
2
2
|
import { ObjectId as l, ObjectType as f } from "@opexa/portal-sdk-core/object-id";
|
|
3
3
|
import { useMutation as C } from "@tanstack/react-query";
|
|
4
4
|
import n from "tiny-invariant";
|
|
5
|
-
import { PLATFORM_CODE as s, ENVIRONMENT as m } from "
|
|
6
|
-
import
|
|
7
|
-
import "
|
|
8
|
-
import
|
|
9
|
-
import "
|
|
10
|
-
import "
|
|
11
|
-
import "
|
|
12
|
-
import "
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import { getCreateGCashDepositMutationKey as w, getSessionQueryKey as p } from "../utils/queryKeys.mjs";
|
|
16
|
-
import "../utils/toaster.mjs";
|
|
17
|
-
const x = (c) => {
|
|
5
|
+
import { PLATFORM_CODE as s, ENVIRONMENT as m } from "../../constants/index.mjs";
|
|
6
|
+
import "../../utils/capitalize.mjs";
|
|
7
|
+
import { createPoll as d } from "../../utils/createPoll.mjs";
|
|
8
|
+
import "../../utils/parseDecimal.mjs";
|
|
9
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
10
|
+
import { getQueryClient as g } from "../../utils/getQueryClient.mjs";
|
|
11
|
+
import "../../utils/isMobile.mjs";
|
|
12
|
+
import { getCreateGCashDepositMutationKey as w, getSessionQueryKey as u } from "../../utils/queryKeys.mjs";
|
|
13
|
+
import { getSession as p } from "../services/getSession.mjs";
|
|
14
|
+
const T = (c) => {
|
|
18
15
|
const o = g();
|
|
19
16
|
return C({
|
|
20
17
|
...c,
|
|
21
18
|
mutationKey: w(),
|
|
22
19
|
mutationFn: async (r) => {
|
|
23
20
|
const i = r.id ?? l.generate(f.Deposit).toString(), a = await o.fetchQuery({
|
|
24
|
-
queryKey:
|
|
25
|
-
queryFn: () =>
|
|
21
|
+
queryKey: u(),
|
|
22
|
+
queryFn: () => p()
|
|
26
23
|
});
|
|
27
24
|
n(a.status === "authenticated"), await y(
|
|
28
25
|
{ ...r, id: i },
|
|
@@ -37,8 +34,8 @@ const x = (c) => {
|
|
|
37
34
|
const e = await d(
|
|
38
35
|
async () => {
|
|
39
36
|
const t = await o.fetchQuery({
|
|
40
|
-
queryKey:
|
|
41
|
-
queryFn: () =>
|
|
37
|
+
queryKey: u(),
|
|
38
|
+
queryFn: () => p()
|
|
42
39
|
});
|
|
43
40
|
return n(t.status === "authenticated"), await h(i, {
|
|
44
41
|
environment: m,
|
|
@@ -65,5 +62,5 @@ const x = (c) => {
|
|
|
65
62
|
});
|
|
66
63
|
};
|
|
67
64
|
export {
|
|
68
|
-
|
|
65
|
+
T as useCreateGCashDepositMutation
|
|
69
66
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@opexa/portal-sdk-core"),y=require("@opexa/portal-sdk-core/object-id"),h=require("@tanstack/react-query"),c=require("tiny-invariant"),r=require("../../constants/index.js");require("../../utils/capitalize.js");const m=require("../../utils/createPoll.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const S=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const o=require("../../utils/queryKeys.js"),l=require("../services/getSession.js"),q=g=>{const s=S.getQueryClient();return h.useMutation({...g,mutationKey:o.getCreateGameSessionMutationKey(),mutationFn:async i=>{const n=y.ObjectId.generate(y.ObjectType.GameSession).toString(),u=await s.fetchQuery({queryKey:o.getSessionQueryKey(),queryFn:()=>l.getSession()});if(c(u.status==="authenticated"),r.LEGACY_GAME_PROVIDERS.includes(i.provider)){await a.createGameSession__legacy({id:n,game:i.reference},{environment:r.ENVIRONMENT,headers:{"Platform-Code":r.PLATFORM_CODE,Authorization:`Bearer ${u.token}`}});const t=await m.createPoll(async()=>{const e=await s.fetchQuery({queryKey:o.getSessionQueryKey(),queryFn:()=>l.getSession()});return c(e.status==="authenticated"),await a.getGameSession__legacy(n,{environment:r.ENVIRONMENT,headers:{"Platform-Code":r.PLATFORM_CODE,Authorization:`Bearer ${e.token}`}})},{until:e=>!!(e!=null&&e.launchUrl),interval:1e3,maxAttempt:5})();if(!(t!=null&&t.launchUrl)){const e=new Error;throw e.name="GameSessionError",e.message="Failed to launch game",e}return t}else{await a.createGameSession({id:n,game:i.reference},{environment:r.ENVIRONMENT,headers:{"Platform-Code":r.PLATFORM_CODE,Authorization:`Bearer ${u.token}`}});const t=await m.createPoll(async()=>{const e=await s.fetchQuery({queryKey:o.getSessionQueryKey(),queryFn:()=>l.getSession()});return c(e.status==="authenticated"),await a.getGameSession(n,{environment:r.ENVIRONMENT,headers:{"Platform-Code":r.PLATFORM_CODE,Authorization:`Bearer ${e.token}`}})},{until:e=>!!(e!=null&&e.launchUrl),interval:1e3,maxAttempt:5})();if(!(t!=null&&t.launchUrl)){const e=new Error;throw e.name="GameSessionError",e.message="Failed to launch game",e}return t}}})};exports.useCreateGameSessionMutation=q;
|
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
import { createGameSession__legacy as h,
|
|
1
|
+
import { createGameSession__legacy as h, getGameSession__legacy as f, createGameSession as p, getGameSession as d } from "@opexa/portal-sdk-core";
|
|
2
2
|
import { ObjectId as g, ObjectType as w } from "@opexa/portal-sdk-core/object-id";
|
|
3
3
|
import { useMutation as S } from "@tanstack/react-query";
|
|
4
4
|
import m from "tiny-invariant";
|
|
5
|
-
import { LEGACY_GAME_PROVIDERS as G, PLATFORM_CODE as o, ENVIRONMENT as n } from "
|
|
6
|
-
import
|
|
7
|
-
import "
|
|
8
|
-
import
|
|
9
|
-
import "
|
|
10
|
-
import "
|
|
11
|
-
import "
|
|
12
|
-
import "
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import { getCreateGameSessionMutationKey as E, getSessionQueryKey as c } from "../utils/queryKeys.mjs";
|
|
16
|
-
import "../utils/toaster.mjs";
|
|
17
|
-
const x = (y) => {
|
|
5
|
+
import { LEGACY_GAME_PROVIDERS as G, PLATFORM_CODE as o, ENVIRONMENT as n } from "../../constants/index.mjs";
|
|
6
|
+
import "../../utils/capitalize.mjs";
|
|
7
|
+
import { createPoll as l } from "../../utils/createPoll.mjs";
|
|
8
|
+
import "../../utils/parseDecimal.mjs";
|
|
9
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
10
|
+
import { getQueryClient as C } from "../../utils/getQueryClient.mjs";
|
|
11
|
+
import "../../utils/isMobile.mjs";
|
|
12
|
+
import { getCreateGameSessionMutationKey as E, getSessionQueryKey as u } from "../../utils/queryKeys.mjs";
|
|
13
|
+
import { getSession as c } from "../services/getSession.mjs";
|
|
14
|
+
const R = (y) => {
|
|
18
15
|
const a = C();
|
|
19
16
|
return S({
|
|
20
17
|
...y,
|
|
21
18
|
mutationKey: E(),
|
|
22
19
|
mutationFn: async (i) => {
|
|
23
20
|
const r = g.generate(w.GameSession).toString(), s = await a.fetchQuery({
|
|
24
|
-
queryKey:
|
|
25
|
-
queryFn: () =>
|
|
21
|
+
queryKey: u(),
|
|
22
|
+
queryFn: () => c()
|
|
26
23
|
});
|
|
27
24
|
if (m(s.status === "authenticated"), G.includes(i.provider)) {
|
|
28
25
|
await h(
|
|
@@ -41,10 +38,10 @@ const x = (y) => {
|
|
|
41
38
|
const t = await l(
|
|
42
39
|
async () => {
|
|
43
40
|
const e = await a.fetchQuery({
|
|
44
|
-
queryKey:
|
|
45
|
-
queryFn: () =>
|
|
41
|
+
queryKey: u(),
|
|
42
|
+
queryFn: () => c()
|
|
46
43
|
});
|
|
47
|
-
return m(e.status === "authenticated"), await
|
|
44
|
+
return m(e.status === "authenticated"), await f(r, {
|
|
48
45
|
environment: n,
|
|
49
46
|
headers: {
|
|
50
47
|
"Platform-Code": o,
|
|
@@ -64,7 +61,7 @@ const x = (y) => {
|
|
|
64
61
|
}
|
|
65
62
|
return t;
|
|
66
63
|
} else {
|
|
67
|
-
await
|
|
64
|
+
await p(
|
|
68
65
|
{
|
|
69
66
|
id: r,
|
|
70
67
|
game: i.reference
|
|
@@ -80,8 +77,8 @@ const x = (y) => {
|
|
|
80
77
|
const t = await l(
|
|
81
78
|
async () => {
|
|
82
79
|
const e = await a.fetchQuery({
|
|
83
|
-
queryKey:
|
|
84
|
-
queryFn: () =>
|
|
80
|
+
queryKey: u(),
|
|
81
|
+
queryFn: () => c()
|
|
85
82
|
});
|
|
86
83
|
return m(e.status === "authenticated"), await d(r, {
|
|
87
84
|
environment: n,
|
|
@@ -107,5 +104,5 @@ const x = (y) => {
|
|
|
107
104
|
});
|
|
108
105
|
};
|
|
109
106
|
export {
|
|
110
|
-
|
|
107
|
+
R as useCreateGameSessionMutation
|
|
111
108
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CreateMayaAppDepositInput, Deposit } from '@opexa/portal-sdk-core';
|
|
2
2
|
import { SetOptional } from 'type-fest';
|
|
3
|
-
import { Mutation } from '
|
|
3
|
+
import { Mutation } from '../../types';
|
|
4
4
|
export declare const useCreateMayaAppDepositMutation: Mutation<Deposit, SetOptional<CreateMayaAppDepositInput, 'id'>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@opexa/portal-sdk-core"),c=require("@opexa/portal-sdk-core/object-id"),q=require("@tanstack/react-query"),y=require("tiny-invariant"),r=require("../../constants/index.js");require("../../utils/capitalize.js");const M=require("../../utils/createPoll.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const d=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const o=require("../../utils/queryKeys.js"),p=require("../services/getSession.js"),g=l=>{const a=d.getQueryClient();return q.useMutation({...l,mutationKey:o.getCreateMayaAppDepositMutationKey(),mutationFn:async n=>{const i=n.id??c.ObjectId.generate(c.ObjectType.Deposit).toString(),s=await a.fetchQuery({queryKey:o.getSessionQueryKey(),queryFn:()=>p.getSession()});y(s.status==="authenticated"),await u.createMayaAppDeposit({...n,id:i},{environment:r.ENVIRONMENT,headers:{"Platform-Code":r.PLATFORM_CODE,Authorization:`Bearer ${s.token}`}});const t=await M.createPoll(async()=>{const e=await a.fetchQuery({queryKey:o.getSessionQueryKey(),queryFn:()=>p.getSession()});return y(e.status==="authenticated"),await u.getDeposit(i,{environment:r.ENVIRONMENT,headers:{"Platform-Code":r.PLATFORM_CODE,Authorization:`Bearer ${e.token}`}})},{until(e){return(e==null?void 0:e.status)==="APPROVED"||(e==null?void 0:e.status)==="CONFIRMED"},interval:1e3,maxAttempt:5})();if((t==null?void 0:t.status)!=="APPROVED"&&(t==null?void 0:t.status)!=="CONFIRMED"){const e=new Error;throw e.name="MayaAppDepositError",e.message="Failed to process Maya deposit",e}return t}})};exports.useCreateMayaAppDepositMutation=g;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { createMayaAppDeposit as c, getDeposit as f } from "@opexa/portal-sdk-core";
|
|
2
|
+
import { ObjectId as l, ObjectType as M } from "@opexa/portal-sdk-core/object-id";
|
|
3
|
+
import { useMutation as d } from "@tanstack/react-query";
|
|
4
|
+
import n from "tiny-invariant";
|
|
5
|
+
import { PLATFORM_CODE as s, ENVIRONMENT as m } from "../../constants/index.mjs";
|
|
6
|
+
import "../../utils/capitalize.mjs";
|
|
7
|
+
import { createPoll as D } from "../../utils/createPoll.mjs";
|
|
8
|
+
import "../../utils/parseDecimal.mjs";
|
|
9
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
10
|
+
import { getQueryClient as A } from "../../utils/getQueryClient.mjs";
|
|
11
|
+
import "../../utils/isMobile.mjs";
|
|
12
|
+
import { getCreateMayaAppDepositMutationKey as h, getSessionQueryKey as p } from "../../utils/queryKeys.mjs";
|
|
13
|
+
import { getSession as u } from "../services/getSession.mjs";
|
|
14
|
+
const T = (y) => {
|
|
15
|
+
const o = A();
|
|
16
|
+
return d({
|
|
17
|
+
...y,
|
|
18
|
+
mutationKey: h(),
|
|
19
|
+
mutationFn: async (a) => {
|
|
20
|
+
const r = a.id ?? l.generate(M.Deposit).toString(), i = await o.fetchQuery({
|
|
21
|
+
queryKey: p(),
|
|
22
|
+
queryFn: () => u()
|
|
23
|
+
});
|
|
24
|
+
n(i.status === "authenticated"), await c(
|
|
25
|
+
{ ...a, id: r },
|
|
26
|
+
{
|
|
27
|
+
environment: m,
|
|
28
|
+
headers: {
|
|
29
|
+
"Platform-Code": s,
|
|
30
|
+
Authorization: `Bearer ${i.token}`
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
const e = await D(
|
|
35
|
+
async () => {
|
|
36
|
+
const t = await o.fetchQuery({
|
|
37
|
+
queryKey: p(),
|
|
38
|
+
queryFn: () => u()
|
|
39
|
+
});
|
|
40
|
+
return n(t.status === "authenticated"), await f(r, {
|
|
41
|
+
environment: m,
|
|
42
|
+
headers: {
|
|
43
|
+
"Platform-Code": s,
|
|
44
|
+
Authorization: `Bearer ${t.token}`
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
until(t) {
|
|
50
|
+
return (t == null ? void 0 : t.status) === "APPROVED" || (t == null ? void 0 : t.status) === "CONFIRMED";
|
|
51
|
+
},
|
|
52
|
+
interval: 1e3,
|
|
53
|
+
maxAttempt: 5
|
|
54
|
+
}
|
|
55
|
+
)();
|
|
56
|
+
if ((e == null ? void 0 : e.status) !== "APPROVED" && (e == null ? void 0 : e.status) !== "CONFIRMED") {
|
|
57
|
+
const t = new Error();
|
|
58
|
+
throw t.name = "MayaAppDepositError", t.message = "Failed to process Maya deposit", t;
|
|
59
|
+
}
|
|
60
|
+
return e;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
T as useCreateMayaAppDepositMutation
|
|
66
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CreateMayaDepositInput, Deposit } from '@opexa/portal-sdk-core';
|
|
2
2
|
import { SetOptional } from 'type-fest';
|
|
3
|
-
import { Mutation } from '
|
|
3
|
+
import { Mutation } from '../../types';
|
|
4
4
|
export declare const useCreateMayaDepositMutation: Mutation<Deposit, SetOptional<CreateMayaDepositInput, 'id'>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@opexa/portal-sdk-core"),c=require("@opexa/portal-sdk-core/object-id"),d=require("@tanstack/react-query"),y=require("tiny-invariant"),r=require("../../constants/index.js");require("../../utils/capitalize.js");const M=require("../../utils/createPoll.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const g=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const o=require("../../utils/queryKeys.js"),l=require("../services/getSession.js"),p=q=>{const n=g.getQueryClient();return d.useMutation({...q,mutationKey:o.getCreateMayaDepositMutationKey(),mutationFn:async a=>{const i=a.id??c.ObjectId.generate(c.ObjectType.Deposit).toString(),s=await n.fetchQuery({queryKey:o.getSessionQueryKey(),queryFn:()=>l.getSession()});y(s.status==="authenticated"),await u.createMayaDeposit({...a,id:i},{environment:r.ENVIRONMENT,headers:{"Platform-Code":r.PLATFORM_CODE,Authorization:`Bearer ${s.token}`}});const t=await M.createPoll(async()=>{const e=await n.fetchQuery({queryKey:o.getSessionQueryKey(),queryFn:()=>l.getSession()});return y(e.status==="authenticated"),await u.getDeposit(i,{environment:r.ENVIRONMENT,headers:{"Platform-Code":r.PLATFORM_CODE,Authorization:`Bearer ${e.token}`}})},{until(e){return!!(e!=null&&e.checkoutUrl)},interval:1e3,maxAttempt:5})();if(!(t!=null&&t.checkoutUrl)){const e=new Error;throw e.name="MayaDepositError",e.message="Failed to process Maya deposit",e}return t}})};exports.useCreateMayaDepositMutation=p;
|
|
@@ -2,48 +2,45 @@ import { createMayaDeposit as y, getDeposit as l } from "@opexa/portal-sdk-core"
|
|
|
2
2
|
import { ObjectId as f, ObjectType as d } from "@opexa/portal-sdk-core/object-id";
|
|
3
3
|
import { useMutation as h } from "@tanstack/react-query";
|
|
4
4
|
import n from "tiny-invariant";
|
|
5
|
-
import { PLATFORM_CODE as
|
|
6
|
-
import
|
|
7
|
-
import "
|
|
8
|
-
import
|
|
9
|
-
import "
|
|
10
|
-
import "
|
|
11
|
-
import "
|
|
12
|
-
import "
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import { getCreateMayaDepositMutationKey as w, getSessionQueryKey as p } from "../utils/queryKeys.mjs";
|
|
16
|
-
import "../utils/toaster.mjs";
|
|
17
|
-
const z = (c) => {
|
|
5
|
+
import { PLATFORM_CODE as s, ENVIRONMENT as m } from "../../constants/index.mjs";
|
|
6
|
+
import "../../utils/capitalize.mjs";
|
|
7
|
+
import { createPoll as M } from "../../utils/createPoll.mjs";
|
|
8
|
+
import "../../utils/parseDecimal.mjs";
|
|
9
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
10
|
+
import { getQueryClient as g } from "../../utils/getQueryClient.mjs";
|
|
11
|
+
import "../../utils/isMobile.mjs";
|
|
12
|
+
import { getCreateMayaDepositMutationKey as w, getSessionQueryKey as u } from "../../utils/queryKeys.mjs";
|
|
13
|
+
import { getSession as p } from "../services/getSession.mjs";
|
|
14
|
+
const b = (c) => {
|
|
18
15
|
const o = g();
|
|
19
16
|
return h({
|
|
20
17
|
...c,
|
|
21
18
|
mutationKey: w(),
|
|
22
19
|
mutationFn: async (r) => {
|
|
23
|
-
const
|
|
24
|
-
queryKey:
|
|
25
|
-
queryFn: () =>
|
|
20
|
+
const a = r.id ?? f.generate(d.Deposit).toString(), i = await o.fetchQuery({
|
|
21
|
+
queryKey: u(),
|
|
22
|
+
queryFn: () => p()
|
|
26
23
|
});
|
|
27
|
-
n(
|
|
28
|
-
{ ...r, id:
|
|
24
|
+
n(i.status === "authenticated"), await y(
|
|
25
|
+
{ ...r, id: a },
|
|
29
26
|
{
|
|
30
|
-
environment:
|
|
27
|
+
environment: m,
|
|
31
28
|
headers: {
|
|
32
|
-
"Platform-Code":
|
|
33
|
-
Authorization: `Bearer ${
|
|
29
|
+
"Platform-Code": s,
|
|
30
|
+
Authorization: `Bearer ${i.token}`
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
33
|
);
|
|
37
34
|
const e = await M(
|
|
38
35
|
async () => {
|
|
39
36
|
const t = await o.fetchQuery({
|
|
40
|
-
queryKey:
|
|
41
|
-
queryFn: () =>
|
|
37
|
+
queryKey: u(),
|
|
38
|
+
queryFn: () => p()
|
|
42
39
|
});
|
|
43
|
-
return n(t.status === "authenticated"), await l(
|
|
44
|
-
environment:
|
|
40
|
+
return n(t.status === "authenticated"), await l(a, {
|
|
41
|
+
environment: m,
|
|
45
42
|
headers: {
|
|
46
|
-
"Platform-Code":
|
|
43
|
+
"Platform-Code": s,
|
|
47
44
|
Authorization: `Bearer ${t.token}`
|
|
48
45
|
}
|
|
49
46
|
});
|
|
@@ -65,5 +62,5 @@ const z = (c) => {
|
|
|
65
62
|
});
|
|
66
63
|
};
|
|
67
64
|
export {
|
|
68
|
-
|
|
65
|
+
b as useCreateMayaDepositMutation
|
|
69
66
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CreateAIOOnlineBankDepositInput, Deposit } from '@opexa/portal-sdk-core';
|
|
2
2
|
import { SetOptional } from 'type-fest';
|
|
3
|
-
import { Mutation } from '
|
|
3
|
+
import { Mutation } from '../../types';
|
|
4
4
|
export declare const useCreateOnlineBankDepositMutation: Mutation<Deposit, SetOptional<CreateAIOOnlineBankDepositInput, 'id'>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@opexa/portal-sdk-core"),c=require("@opexa/portal-sdk-core/object-id"),d=require("@tanstack/react-query"),l=require("tiny-invariant"),n=require("../../constants/index.js");require("../../utils/capitalize.js");const O=require("../../utils/createPoll.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const g=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const r=require("../../utils/queryKeys.js"),y=require("../services/getSession.js"),p=q=>{const o=g.getQueryClient();return d.useMutation({...q,mutationKey:r.getCreateOnlineBankDepositMutationKey(),mutationFn:async i=>{const a=i.id??c.ObjectId.generate(c.ObjectType.Deposit).toString(),s=await o.fetchQuery({queryKey:r.getSessionQueryKey(),queryFn:()=>y.getSession()});l(s.status==="authenticated"),await u.createAIOOnlineBankDeposit({...i,id:a},{environment:n.ENVIRONMENT,headers:{"Platform-Code":n.PLATFORM_CODE,Authorization:`Bearer ${s.token}`}});const t=await O.createPoll(async()=>{const e=await o.fetchQuery({queryKey:r.getSessionQueryKey(),queryFn:()=>y.getSession()});return l(e.status==="authenticated"),await u.getDeposit(a,{environment:n.ENVIRONMENT,headers:{"Platform-Code":n.PLATFORM_CODE,Authorization:`Bearer ${e.token}`}})},{until(e){return!!(e!=null&&e.vca)},interval:1e3,maxAttempt:5})();if(!(t!=null&&t.vca)){const e=new Error;throw e.name="OnlineBankDepositError",e.message="Failed to process online bank deposit",e}return t}})};exports.useCreateOnlineBankDepositMutation=p;
|