@payos-inc/payos-react 1.0.42 → 1.2.0-staging.91
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/LICENSE +96 -0
- package/README.md +160 -0
- package/dist/THIRD_PARTY_NOTICES.txt +549 -0
- package/dist/payos-react.cjs +50 -0
- package/dist/payos-react.css +1 -1
- package/dist/payos-react.esm.js +17 -11
- package/dist/payos-react.min.js +2 -1
- package/dist/payos-react.mjs +50 -0
- package/dist/types/index.d.ts +1 -57
- package/dist/types/payos-passkey-js/src/api/ApiClient.d.ts +48 -0
- package/dist/types/payos-passkey-js/src/core/PayOSPasskey.d.ts +114 -0
- package/dist/types/payos-passkey-js/src/core/types.d.ts +100 -0
- package/dist/types/payos-passkey-js/src/index.d.ts +9 -0
- package/dist/types/payos-passkey-js/src/services/mastercard/MastercardSDKService.d.ts +61 -0
- package/dist/types/payos-passkey-js/src/services/visa/VisaSDKService.d.ts +90 -0
- package/dist/types/payos-passkey-js/src/utils/diagnostics.d.ts +30 -0
- package/dist/types/payos-passkey-js/src/utils/logger.d.ts +36 -0
- package/dist/{components → types/payos-react/src/components}/payos/ActiveCardWidget.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/AgentRegistrationFlow.d.ts +1 -3
- package/dist/{components → types/payos-react/src/components}/payos/ConnectStripeLinkButton.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/IdentityVerificationFlow.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/LinkPaymentFlow.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/LinkSessionContent.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/PayOSFooter.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/PayWithLinkButton.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/PaymentMethodRow.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/PaymentSheet.d.ts +3 -4
- package/dist/types/{components → payos-react/src/components}/payos/PaymentSheetContent.d.ts +6 -4
- package/dist/types/{components → payos-react/src/components}/payos/PaymentSheetPaymentFlow.d.ts +4 -2
- package/dist/{components → types/payos-react/src/components}/payos/PaymentSheetShell.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/PaymentSheetStatusViews.d.ts +3 -2
- package/dist/types/{components → payos-react/src/components}/payos/PriceTag.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/ReceiptPanel.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/ViewHeader.d.ts +2 -1
- package/dist/types/{components → payos-react/src/components}/payos/drawer.d.ts +5 -2
- package/dist/{components → types/payos-react/src/components}/payos/order-summary.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/otp-input.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/phone-input.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/themeMode.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/usePaymentSheetDisplayData.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/usePaymentSheetLifecycle.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/usePaymentSheetSkipToAuth.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/usePaymentSheetSkipToLink.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/AgentRegistrationView.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/views/CardAddView.d.ts +1 -2
- package/dist/types/{components → payos-react/src/components}/payos/views/CheckoutView.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/views/IdentityView.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/LinkBrand.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/LinkCheckoutView.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/views/LinkConnectView.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/views/LinkDeniedView.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/LinkLoadingView.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/views/LinkSuccessView.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/ManageThirdPartyView.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/MethodListView.d.ts +8 -1
- package/dist/types/{components → payos-react/src/components}/payos/views/OTPView.d.ts +0 -1
- package/dist/types/payos-react/src/components/payos/views/ShareCardsView.d.ts +28 -0
- package/dist/types/{components → payos-react/src/components}/payos/views/SuccessView.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/VisaIframeView.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/views/VisaMethodView.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/VisaOtpView.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/WelcomeBackView.d.ts +0 -1
- package/dist/types/payos-react/src/components/ui/CardArt.d.ts +22 -0
- package/dist/types/{components → payos-react/src/components}/ui/CardBrandIcon.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/ui/ConfirmDialog.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/ui/DigitalCard.d.ts +0 -1
- package/dist/types/payos-react/src/components/ui/HelpPopover.d.ts +17 -0
- package/dist/types/{components → payos-react/src/components}/ui/button.d.ts +1 -2
- package/dist/types/{components → payos-react/src/components}/ui/card.d.ts +1 -2
- package/dist/types/{components → payos-react/src/components}/ui/input.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/ui/label.d.ts +1 -2
- package/dist/types/{components → payos-react/src/components}/ui/separator.d.ts +0 -1
- package/dist/{hooks → types/payos-react/src/hooks}/useBiometricType.d.ts +0 -1
- package/dist/types/{hooks → payos-react/src/hooks}/useBodyScrollLock.d.ts +0 -1
- package/dist/types/{hooks → payos-react/src/hooks}/useCardElement.d.ts +1 -2
- package/dist/types/{hooks → payos-react/src/hooks}/useLinkAuth.d.ts +0 -1
- package/dist/types/{hooks → payos-react/src/hooks}/useLinkDeviceAuthPoll.d.ts +0 -1
- package/dist/types/{hooks → payos-react/src/hooks}/useLinkMethods.d.ts +0 -1
- package/dist/{hooks → types/payos-react/src/hooks}/useLinkSession.d.ts +0 -1
- package/dist/{hooks → types/payos-react/src/hooks}/useLinkSpendStatusPoll.d.ts +0 -1
- package/dist/types/{hooks → payos-react/src/hooks}/usePasskeySDK.d.ts +2 -4
- package/dist/{hooks → types/payos-react/src/hooks}/useSession.d.ts +14 -1
- package/dist/types/{hooks → payos-react/src/hooks}/useVisualViewport.d.ts +0 -1
- package/dist/{index.d.ts → types/payos-react/src/index.d.ts} +3 -4
- package/dist/{lib → types/payos-react/src/lib}/utils.d.ts +0 -1
- package/dist/{services → types/payos-react/src/services}/apiService.d.ts +12 -2
- package/dist/{services → types/payos-react/src/services}/linkTokenService.d.ts +0 -1
- package/dist/types/{cardElement.d.ts → payos-react/src/types/cardElement.d.ts} +2 -3
- package/dist/types/{drawer.d.ts → payos-react/src/types/drawer.d.ts} +0 -1
- package/dist/types/{types → payos-react/src/types}/index.d.ts +0 -1
- package/dist/types/{order.d.ts → payos-react/src/types/order.d.ts} +0 -1
- package/dist/types/{types → payos-react/src/types}/payment.d.ts +1 -2
- package/dist/types/{session.d.ts → payos-react/src/types/session.d.ts} +17 -1
- package/dist/types/{utils → payos-react/src/utils}/credentialStatus.d.ts +0 -1
- package/dist/{utils → types/payos-react/src/utils}/deviceFingerprint.d.ts +0 -1
- package/dist/types/{utils → payos-react/src/utils}/environment.d.ts +0 -1
- package/dist/{utils → types/payos-react/src/utils}/formatting.d.ts +0 -1
- package/dist/types/{utils → payos-react/src/utils}/linkPopup.d.ts +0 -1
- package/dist/types/payos-react/src/utils/organizationName.d.ts +8 -0
- package/dist/types/{utils → payos-react/src/utils}/selectCard.d.ts +0 -1
- package/dist/types/{utils → payos-react/src/utils}/text.d.ts +0 -1
- package/dist/{utils → types/payos-react/src/utils}/validation.d.ts +0 -1
- package/package.json +38 -13
- package/dist/components/identity/IdentityBar.d.ts +0 -8
- package/dist/components/identity/IdentityBar.d.ts.map +0 -1
- package/dist/components/order/OrderSummaryAccordion.d.ts +0 -9
- package/dist/components/order/OrderSummaryAccordion.d.ts.map +0 -1
- package/dist/components/order/ShipmentCard.d.ts +0 -8
- package/dist/components/order/ShipmentCard.d.ts.map +0 -1
- package/dist/components/payos/ActiveCardWidget.d.ts.map +0 -1
- package/dist/components/payos/AgentRegistrationFlow.d.ts.map +0 -1
- package/dist/components/payos/ConnectStripeLinkButton.d.ts.map +0 -1
- package/dist/components/payos/IdentityVerificationFlow.d.ts +0 -26
- package/dist/components/payos/IdentityVerificationFlow.d.ts.map +0 -1
- package/dist/components/payos/LinkPaymentFlow.d.ts.map +0 -1
- package/dist/components/payos/LinkSessionContent.d.ts.map +0 -1
- package/dist/components/payos/PayOSFooter.d.ts +0 -25
- package/dist/components/payos/PayOSFooter.d.ts.map +0 -1
- package/dist/components/payos/PayWithLinkButton.d.ts +0 -74
- package/dist/components/payos/PayWithLinkButton.d.ts.map +0 -1
- package/dist/components/payos/PaymentMethodRow.d.ts.map +0 -1
- package/dist/components/payos/PaymentSheet.d.ts.map +0 -1
- package/dist/components/payos/PaymentSheetContent.d.ts +0 -80
- package/dist/components/payos/PaymentSheetContent.d.ts.map +0 -1
- package/dist/components/payos/PaymentSheetPaymentFlow.d.ts +0 -43
- package/dist/components/payos/PaymentSheetPaymentFlow.d.ts.map +0 -1
- package/dist/components/payos/PaymentSheetShell.d.ts.map +0 -1
- package/dist/components/payos/PaymentSheetStatusViews.d.ts +0 -28
- package/dist/components/payos/PaymentSheetStatusViews.d.ts.map +0 -1
- package/dist/components/payos/PriceTag.d.ts +0 -64
- package/dist/components/payos/PriceTag.d.ts.map +0 -1
- package/dist/components/payos/ReceiptPanel.d.ts +0 -67
- package/dist/components/payos/ReceiptPanel.d.ts.map +0 -1
- package/dist/components/payos/ViewHeader.d.ts +0 -9
- package/dist/components/payos/ViewHeader.d.ts.map +0 -1
- package/dist/components/payos/drawer.d.ts +0 -107
- package/dist/components/payos/drawer.d.ts.map +0 -1
- package/dist/components/payos/order-summary.d.ts.map +0 -1
- package/dist/components/payos/otp-input.d.ts.map +0 -1
- package/dist/components/payos/phone-input.d.ts +0 -30
- package/dist/components/payos/phone-input.d.ts.map +0 -1
- package/dist/components/payos/themeMode.d.ts.map +0 -1
- package/dist/components/payos/usePaymentSheetDebug.d.ts +0 -22
- package/dist/components/payos/usePaymentSheetDebug.d.ts.map +0 -1
- package/dist/components/payos/usePaymentSheetDisplayData.d.ts +0 -29
- package/dist/components/payos/usePaymentSheetDisplayData.d.ts.map +0 -1
- package/dist/components/payos/usePaymentSheetLifecycle.d.ts +0 -39
- package/dist/components/payos/usePaymentSheetLifecycle.d.ts.map +0 -1
- package/dist/components/payos/usePaymentSheetSkipToAuth.d.ts.map +0 -1
- package/dist/components/payos/usePaymentSheetSkipToLink.d.ts.map +0 -1
- package/dist/components/payos/views/AgentRegistrationView.d.ts.map +0 -1
- package/dist/components/payos/views/CardAddView.d.ts +0 -101
- package/dist/components/payos/views/CardAddView.d.ts.map +0 -1
- package/dist/components/payos/views/CheckoutView.d.ts +0 -95
- package/dist/components/payos/views/CheckoutView.d.ts.map +0 -1
- package/dist/components/payos/views/IdentityView.d.ts +0 -51
- package/dist/components/payos/views/IdentityView.d.ts.map +0 -1
- package/dist/components/payos/views/LinkBrand.d.ts.map +0 -1
- package/dist/components/payos/views/LinkCheckoutView.d.ts.map +0 -1
- package/dist/components/payos/views/LinkConnectView.d.ts +0 -18
- package/dist/components/payos/views/LinkConnectView.d.ts.map +0 -1
- package/dist/components/payos/views/LinkDeniedView.d.ts +0 -13
- package/dist/components/payos/views/LinkDeniedView.d.ts.map +0 -1
- package/dist/components/payos/views/LinkLoadingView.d.ts.map +0 -1
- package/dist/components/payos/views/LinkSuccessView.d.ts +0 -11
- package/dist/components/payos/views/LinkSuccessView.d.ts.map +0 -1
- package/dist/components/payos/views/ManageThirdPartyView.d.ts.map +0 -1
- package/dist/components/payos/views/MethodListView.d.ts.map +0 -1
- package/dist/components/payos/views/OTPView.d.ts +0 -69
- package/dist/components/payos/views/OTPView.d.ts.map +0 -1
- package/dist/components/payos/views/SuccessView.d.ts +0 -49
- package/dist/components/payos/views/SuccessView.d.ts.map +0 -1
- package/dist/components/payos/views/VisaIframeView.d.ts.map +0 -1
- package/dist/components/payos/views/VisaMethodView.d.ts +0 -23
- package/dist/components/payos/views/VisaMethodView.d.ts.map +0 -1
- package/dist/components/payos/views/VisaOtpView.d.ts.map +0 -1
- package/dist/components/payos/views/WelcomeBackView.d.ts.map +0 -1
- package/dist/components/ui/CardBrandIcon.d.ts +0 -10
- package/dist/components/ui/CardBrandIcon.d.ts.map +0 -1
- package/dist/components/ui/ConfirmDialog.d.ts +0 -25
- package/dist/components/ui/ConfirmDialog.d.ts.map +0 -1
- package/dist/components/ui/DigitalCard.d.ts +0 -13
- package/dist/components/ui/DigitalCard.d.ts.map +0 -1
- package/dist/components/ui/InfoTooltip.d.ts +0 -8
- package/dist/components/ui/InfoTooltip.d.ts.map +0 -1
- package/dist/components/ui/PinInput.d.ts +0 -12
- package/dist/components/ui/PinInput.d.ts.map +0 -1
- package/dist/components/ui/button.d.ts +0 -14
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/card.d.ts +0 -15
- package/dist/components/ui/card.d.ts.map +0 -1
- package/dist/components/ui/input.d.ts +0 -6
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/label.d.ts +0 -6
- package/dist/components/ui/label.d.ts.map +0 -1
- package/dist/components/ui/separator.d.ts +0 -5
- package/dist/components/ui/separator.d.ts.map +0 -1
- package/dist/hooks/index.d.ts +0 -8
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/useBiometricType.d.ts.map +0 -1
- package/dist/hooks/useBodyScrollLock.d.ts +0 -32
- package/dist/hooks/useBodyScrollLock.d.ts.map +0 -1
- package/dist/hooks/useCardElement.d.ts +0 -135
- package/dist/hooks/useCardElement.d.ts.map +0 -1
- package/dist/hooks/useCheckoutFlow.d.ts +0 -29
- package/dist/hooks/useCheckoutFlow.d.ts.map +0 -1
- package/dist/hooks/useDrawerState.d.ts +0 -4
- package/dist/hooks/useDrawerState.d.ts.map +0 -1
- package/dist/hooks/useLinkAuth.d.ts +0 -24
- package/dist/hooks/useLinkAuth.d.ts.map +0 -1
- package/dist/hooks/useLinkDeviceAuthPoll.d.ts +0 -29
- package/dist/hooks/useLinkDeviceAuthPoll.d.ts.map +0 -1
- package/dist/hooks/useLinkMethods.d.ts +0 -28
- package/dist/hooks/useLinkMethods.d.ts.map +0 -1
- package/dist/hooks/useLinkSession.d.ts.map +0 -1
- package/dist/hooks/useLinkSpendStatusPoll.d.ts.map +0 -1
- package/dist/hooks/usePasskeySDK.d.ts +0 -103
- package/dist/hooks/usePasskeySDK.d.ts.map +0 -1
- package/dist/hooks/useSession.d.ts.map +0 -1
- package/dist/hooks/useVisualViewport.d.ts +0 -15
- package/dist/hooks/useVisualViewport.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/theme.d.ts +0 -53
- package/dist/lib/theme.d.ts.map +0 -1
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/mocks/index.d.ts +0 -3
- package/dist/mocks/index.d.ts.map +0 -1
- package/dist/mocks/mockCheckoutFlow.d.ts +0 -25
- package/dist/mocks/mockCheckoutFlow.d.ts.map +0 -1
- package/dist/mocks/mockData.d.ts +0 -6
- package/dist/mocks/mockData.d.ts.map +0 -1
- package/dist/mocks/mockSessionData.d.ts +0 -38
- package/dist/mocks/mockSessionData.d.ts.map +0 -1
- package/dist/services/apiService.d.ts.map +0 -1
- package/dist/services/linkTokenService.d.ts.map +0 -1
- package/dist/services/mockSessionService.d.ts +0 -65
- package/dist/services/mockSessionService.d.ts.map +0 -1
- package/dist/types/cardElement.d.ts.map +0 -1
- package/dist/types/components/identity/IdentityBar.d.ts +0 -8
- package/dist/types/components/identity/IdentityBar.d.ts.map +0 -1
- package/dist/types/components/order/OrderSummaryAccordion.d.ts +0 -9
- package/dist/types/components/order/OrderSummaryAccordion.d.ts.map +0 -1
- package/dist/types/components/order/ShipmentCard.d.ts +0 -8
- package/dist/types/components/order/ShipmentCard.d.ts.map +0 -1
- package/dist/types/components/payos/ActiveCardWidget.d.ts +0 -60
- package/dist/types/components/payos/ActiveCardWidget.d.ts.map +0 -1
- package/dist/types/components/payos/AgentRegistrationFlow.d.ts +0 -24
- package/dist/types/components/payos/AgentRegistrationFlow.d.ts.map +0 -1
- package/dist/types/components/payos/ConnectStripeLinkButton.d.ts +0 -41
- package/dist/types/components/payos/ConnectStripeLinkButton.d.ts.map +0 -1
- package/dist/types/components/payos/IdentityVerificationFlow.d.ts.map +0 -1
- package/dist/types/components/payos/LinkPaymentFlow.d.ts +0 -11
- package/dist/types/components/payos/LinkPaymentFlow.d.ts.map +0 -1
- package/dist/types/components/payos/LinkSessionContent.d.ts +0 -19
- package/dist/types/components/payos/LinkSessionContent.d.ts.map +0 -1
- package/dist/types/components/payos/PayOSFooter.d.ts.map +0 -1
- package/dist/types/components/payos/PayWithLinkButton.d.ts.map +0 -1
- package/dist/types/components/payos/PaymentMethodRow.d.ts +0 -53
- package/dist/types/components/payos/PaymentMethodRow.d.ts.map +0 -1
- package/dist/types/components/payos/PaymentSheet.d.ts +0 -121
- package/dist/types/components/payos/PaymentSheet.d.ts.map +0 -1
- package/dist/types/components/payos/PaymentSheetContent.d.ts.map +0 -1
- package/dist/types/components/payos/PaymentSheetPaymentFlow.d.ts.map +0 -1
- package/dist/types/components/payos/PaymentSheetShell.d.ts +0 -25
- package/dist/types/components/payos/PaymentSheetShell.d.ts.map +0 -1
- package/dist/types/components/payos/PaymentSheetStatusViews.d.ts.map +0 -1
- package/dist/types/components/payos/PriceTag.d.ts.map +0 -1
- package/dist/types/components/payos/ReceiptPanel.d.ts.map +0 -1
- package/dist/types/components/payos/ViewHeader.d.ts.map +0 -1
- package/dist/types/components/payos/drawer.d.ts.map +0 -1
- package/dist/types/components/payos/order-summary.d.ts +0 -44
- package/dist/types/components/payos/order-summary.d.ts.map +0 -1
- package/dist/types/components/payos/otp-input.d.ts +0 -45
- package/dist/types/components/payos/otp-input.d.ts.map +0 -1
- package/dist/types/components/payos/phone-input.d.ts.map +0 -1
- package/dist/types/components/payos/themeMode.d.ts +0 -6
- package/dist/types/components/payos/themeMode.d.ts.map +0 -1
- package/dist/types/components/payos/usePaymentSheetDebug.d.ts +0 -22
- package/dist/types/components/payos/usePaymentSheetDebug.d.ts.map +0 -1
- package/dist/types/components/payos/usePaymentSheetDisplayData.d.ts.map +0 -1
- package/dist/types/components/payos/usePaymentSheetLifecycle.d.ts.map +0 -1
- package/dist/types/components/payos/usePaymentSheetSkipToAuth.d.ts +0 -18
- package/dist/types/components/payos/usePaymentSheetSkipToAuth.d.ts.map +0 -1
- package/dist/types/components/payos/usePaymentSheetSkipToLink.d.ts +0 -14
- package/dist/types/components/payos/usePaymentSheetSkipToLink.d.ts.map +0 -1
- package/dist/types/components/payos/views/AgentRegistrationView.d.ts +0 -61
- package/dist/types/components/payos/views/AgentRegistrationView.d.ts.map +0 -1
- package/dist/types/components/payos/views/CardAddView.d.ts.map +0 -1
- package/dist/types/components/payos/views/CheckoutView.d.ts.map +0 -1
- package/dist/types/components/payos/views/IdentityView.d.ts.map +0 -1
- package/dist/types/components/payos/views/LinkBrand.d.ts +0 -13
- package/dist/types/components/payos/views/LinkBrand.d.ts.map +0 -1
- package/dist/types/components/payos/views/LinkCheckoutView.d.ts +0 -31
- package/dist/types/components/payos/views/LinkCheckoutView.d.ts.map +0 -1
- package/dist/types/components/payos/views/LinkConnectView.d.ts.map +0 -1
- package/dist/types/components/payos/views/LinkDeniedView.d.ts.map +0 -1
- package/dist/types/components/payos/views/LinkLoadingView.d.ts +0 -11
- package/dist/types/components/payos/views/LinkLoadingView.d.ts.map +0 -1
- package/dist/types/components/payos/views/LinkSuccessView.d.ts.map +0 -1
- package/dist/types/components/payos/views/ManageThirdPartyView.d.ts +0 -19
- package/dist/types/components/payos/views/ManageThirdPartyView.d.ts.map +0 -1
- package/dist/types/components/payos/views/MethodListView.d.ts +0 -116
- package/dist/types/components/payos/views/MethodListView.d.ts.map +0 -1
- package/dist/types/components/payos/views/OTPView.d.ts.map +0 -1
- package/dist/types/components/payos/views/SuccessView.d.ts.map +0 -1
- package/dist/types/components/payos/views/VisaIframeView.d.ts +0 -16
- package/dist/types/components/payos/views/VisaIframeView.d.ts.map +0 -1
- package/dist/types/components/payos/views/VisaMethodView.d.ts.map +0 -1
- package/dist/types/components/payos/views/VisaOtpView.d.ts +0 -45
- package/dist/types/components/payos/views/VisaOtpView.d.ts.map +0 -1
- package/dist/types/components/payos/views/WelcomeBackView.d.ts +0 -34
- package/dist/types/components/payos/views/WelcomeBackView.d.ts.map +0 -1
- package/dist/types/components/ui/CardBrandIcon.d.ts.map +0 -1
- package/dist/types/components/ui/ConfirmDialog.d.ts.map +0 -1
- package/dist/types/components/ui/DigitalCard.d.ts.map +0 -1
- package/dist/types/components/ui/InfoTooltip.d.ts +0 -8
- package/dist/types/components/ui/InfoTooltip.d.ts.map +0 -1
- package/dist/types/components/ui/PinInput.d.ts +0 -12
- package/dist/types/components/ui/PinInput.d.ts.map +0 -1
- package/dist/types/components/ui/button.d.ts.map +0 -1
- package/dist/types/components/ui/card.d.ts.map +0 -1
- package/dist/types/components/ui/input.d.ts.map +0 -1
- package/dist/types/components/ui/label.d.ts.map +0 -1
- package/dist/types/components/ui/separator.d.ts.map +0 -1
- package/dist/types/drawer.d.ts.map +0 -1
- package/dist/types/hooks/index.d.ts +0 -8
- package/dist/types/hooks/index.d.ts.map +0 -1
- package/dist/types/hooks/useBiometricType.d.ts +0 -21
- package/dist/types/hooks/useBiometricType.d.ts.map +0 -1
- package/dist/types/hooks/useBodyScrollLock.d.ts.map +0 -1
- package/dist/types/hooks/useCardElement.d.ts.map +0 -1
- package/dist/types/hooks/useCheckoutFlow.d.ts +0 -29
- package/dist/types/hooks/useCheckoutFlow.d.ts.map +0 -1
- package/dist/types/hooks/useDrawerState.d.ts +0 -4
- package/dist/types/hooks/useDrawerState.d.ts.map +0 -1
- package/dist/types/hooks/useLinkAuth.d.ts.map +0 -1
- package/dist/types/hooks/useLinkDeviceAuthPoll.d.ts.map +0 -1
- package/dist/types/hooks/useLinkMethods.d.ts.map +0 -1
- package/dist/types/hooks/useLinkSession.d.ts +0 -81
- package/dist/types/hooks/useLinkSession.d.ts.map +0 -1
- package/dist/types/hooks/useLinkSpendStatusPoll.d.ts +0 -28
- package/dist/types/hooks/useLinkSpendStatusPoll.d.ts.map +0 -1
- package/dist/types/hooks/usePasskeySDK.d.ts.map +0 -1
- package/dist/types/hooks/useSession.d.ts +0 -87
- package/dist/types/hooks/useSession.d.ts.map +0 -1
- package/dist/types/hooks/useVisualViewport.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/lib/theme.d.ts +0 -53
- package/dist/types/lib/theme.d.ts.map +0 -1
- package/dist/types/lib/utils.d.ts +0 -3
- package/dist/types/lib/utils.d.ts.map +0 -1
- package/dist/types/mocks/index.d.ts +0 -3
- package/dist/types/mocks/index.d.ts.map +0 -1
- package/dist/types/mocks/mockCheckoutFlow.d.ts +0 -25
- package/dist/types/mocks/mockCheckoutFlow.d.ts.map +0 -1
- package/dist/types/mocks/mockData.d.ts +0 -6
- package/dist/types/mocks/mockData.d.ts.map +0 -1
- package/dist/types/mocks/mockSessionData.d.ts +0 -38
- package/dist/types/mocks/mockSessionData.d.ts.map +0 -1
- package/dist/types/order.d.ts.map +0 -1
- package/dist/types/payment.d.ts +0 -55
- package/dist/types/payment.d.ts.map +0 -1
- package/dist/types/services/apiService.d.ts +0 -406
- package/dist/types/services/apiService.d.ts.map +0 -1
- package/dist/types/services/linkTokenService.d.ts +0 -7
- package/dist/types/services/linkTokenService.d.ts.map +0 -1
- package/dist/types/services/mockSessionService.d.ts +0 -65
- package/dist/types/services/mockSessionService.d.ts.map +0 -1
- package/dist/types/session.d.ts.map +0 -1
- package/dist/types/types/cardElement.d.ts +0 -157
- package/dist/types/types/cardElement.d.ts.map +0 -1
- package/dist/types/types/drawer.d.ts +0 -33
- package/dist/types/types/drawer.d.ts.map +0 -1
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/types/types/order.d.ts +0 -25
- package/dist/types/types/order.d.ts.map +0 -1
- package/dist/types/types/payment.d.ts.map +0 -1
- package/dist/types/types/session.d.ts +0 -165
- package/dist/types/types/session.d.ts.map +0 -1
- package/dist/types/utils/credentialStatus.d.ts.map +0 -1
- package/dist/types/utils/deviceFingerprint.d.ts +0 -27
- package/dist/types/utils/deviceFingerprint.d.ts.map +0 -1
- package/dist/types/utils/environment.d.ts.map +0 -1
- package/dist/types/utils/formatting.d.ts +0 -41
- package/dist/types/utils/formatting.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -4
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/types/utils/linkFormat.d.ts +0 -17
- package/dist/types/utils/linkFormat.d.ts.map +0 -1
- package/dist/types/utils/linkPopup.d.ts.map +0 -1
- package/dist/types/utils/selectCard.d.ts.map +0 -1
- package/dist/types/utils/text.d.ts.map +0 -1
- package/dist/types/utils/validation.d.ts +0 -90
- package/dist/types/utils/validation.d.ts.map +0 -1
- package/dist/utils/credentialStatus.d.ts +0 -8
- package/dist/utils/credentialStatus.d.ts.map +0 -1
- package/dist/utils/deviceFingerprint.d.ts.map +0 -1
- package/dist/utils/environment.d.ts +0 -22
- package/dist/utils/environment.d.ts.map +0 -1
- package/dist/utils/formatting.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/linkFormat.d.ts +0 -17
- package/dist/utils/linkFormat.d.ts.map +0 -1
- package/dist/utils/linkPopup.d.ts +0 -19
- package/dist/utils/linkPopup.d.ts.map +0 -1
- package/dist/utils/selectCard.d.ts +0 -18
- package/dist/utils/selectCard.d.ts.map +0 -1
- package/dist/utils/text.d.ts +0 -12
- package/dist/utils/text.d.ts.map +0 -1
- package/dist/utils/validation.d.ts.map +0 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -1,57 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { Input } from './components/ui/input';
|
|
3
|
-
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from './components/ui/card';
|
|
4
|
-
export { Label } from './components/ui/label';
|
|
5
|
-
export { Separator } from './components/ui/separator';
|
|
6
|
-
export { PhoneInput, COUNTRIES } from './components/payos/phone-input';
|
|
7
|
-
export { OTPInput } from './components/payos/otp-input';
|
|
8
|
-
export { PayOSDrawer } from './components/payos/drawer';
|
|
9
|
-
export { PaymentMethodRow } from './components/payos/PaymentMethodRow';
|
|
10
|
-
export { ActiveCardWidget } from './components/payos/ActiveCardWidget';
|
|
11
|
-
export { ViewHeader } from './components/payos/ViewHeader';
|
|
12
|
-
export { OrderSummary } from './components/payos/order-summary';
|
|
13
|
-
export { PriceTag } from './components/payos/PriceTag';
|
|
14
|
-
export { ReceiptPanel } from './components/payos/ReceiptPanel';
|
|
15
|
-
export type { OrderItem } from './components/payos/ReceiptPanel';
|
|
16
|
-
export { PayOSFooter } from './components/payos/PayOSFooter';
|
|
17
|
-
export { IdentityView } from './components/payos/views/IdentityView';
|
|
18
|
-
export { WelcomeBackView } from './components/payos/views/WelcomeBackView';
|
|
19
|
-
export { OTPView } from './components/payos/views/OTPView';
|
|
20
|
-
export { CheckoutView } from './components/payos/views/CheckoutView';
|
|
21
|
-
export { MethodListView } from './components/payos/views/MethodListView';
|
|
22
|
-
export { CardAddView } from './components/payos/views/CardAddView';
|
|
23
|
-
export { SuccessView } from './components/payos/views/SuccessView';
|
|
24
|
-
export type { SuccessViewProps } from './components/payos/views/SuccessView';
|
|
25
|
-
export { VisaMethodView } from './components/payos/views/VisaMethodView';
|
|
26
|
-
export type { VisaMethodViewProps, VisaVerificationMethod } from './components/payos/views/VisaMethodView';
|
|
27
|
-
export { VisaOtpView } from './components/payos/views/VisaOtpView';
|
|
28
|
-
export type { VisaOtpViewProps } from './components/payos/views/VisaOtpView';
|
|
29
|
-
export { AgentRegistrationView } from './components/payos/views/AgentRegistrationView';
|
|
30
|
-
export type { AgentRegistrationViewProps } from './components/payos/views/AgentRegistrationView';
|
|
31
|
-
export { PaymentSheet } from './components/payos/PaymentSheet';
|
|
32
|
-
export type { PaymentSheetPaymentMethods, PaymentSheetProps, StripeLinkPaymentMethodConfig, } from './components/payos/PaymentSheet';
|
|
33
|
-
export { ConnectStripeLinkButton } from './components/payos/ConnectStripeLinkButton';
|
|
34
|
-
export type { ConnectStripeLinkButtonProps, ConnectStripeLinkResult, } from './components/payos/ConnectStripeLinkButton';
|
|
35
|
-
export { PayWithLinkButton } from './components/payos/PayWithLinkButton';
|
|
36
|
-
export type { PayWithLinkButtonProps } from './components/payos/PayWithLinkButton';
|
|
37
|
-
export { LinkConnectView } from './components/payos/views/LinkConnectView';
|
|
38
|
-
export { LinkCheckoutView } from './components/payos/views/LinkCheckoutView';
|
|
39
|
-
export { LinkSuccessView } from './components/payos/views/LinkSuccessView';
|
|
40
|
-
export { LinkDeniedView } from './components/payos/views/LinkDeniedView';
|
|
41
|
-
export { LinkLoadingView } from './components/payos/views/LinkLoadingView';
|
|
42
|
-
export { ManageThirdPartyView } from './components/payos/views/ManageThirdPartyView';
|
|
43
|
-
export { useLinkSession } from './hooks/useLinkSession';
|
|
44
|
-
export type { LinkPhase, UseLinkSessionReturn } from './hooks/useLinkSession';
|
|
45
|
-
export { useLinkAuth } from './hooks/useLinkAuth';
|
|
46
|
-
export { useLinkMethods } from './hooks/useLinkMethods';
|
|
47
|
-
export { useCheckoutFlow } from './hooks/useCheckoutFlow';
|
|
48
|
-
export { useSession } from './hooks/useSession';
|
|
49
|
-
export type { UseSessionReturn, SessionPhase, PaymentView as SessionPaymentView } from './hooks/useSession';
|
|
50
|
-
export { useCardElement } from './hooks/useCardElement';
|
|
51
|
-
export type { CardElementBinWarningEvent, CardElementBinWarningRule, UseCardElementOptions, UseCardElementReturn, } from './hooks/useCardElement';
|
|
52
|
-
export { useBodyScrollLock } from './hooks/useBodyScrollLock';
|
|
53
|
-
export { useVisualViewport, useVisualViewportStyle } from './hooks/useVisualViewport';
|
|
54
|
-
export type { PaymentView, CheckoutPhase, SavedCard, CardData, CardBrand } from './types';
|
|
55
|
-
export type { SessionType, SessionStatus, PaymentIntentType, MultiPaymentIntent, PaymentIntentStatus, WalletUser, SavedCard as SessionSavedCard, CardNetwork, CheckoutSession, SessionError, SessionErrorCode, VerificationInitResult, VerificationResult, CompletionResult, PaymentSheetResult, PaymentSheetError, } from './types/session';
|
|
56
|
-
export { cn } from './lib/utils';
|
|
57
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './payos-react/src/index';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Client for PayOS backend communication
|
|
3
|
+
*/
|
|
4
|
+
export declare class ApiClient {
|
|
5
|
+
private linkToken;
|
|
6
|
+
private baseUrl;
|
|
7
|
+
constructor(linkToken: string, sandbox?: boolean, apiBaseUrl?: string);
|
|
8
|
+
/**
|
|
9
|
+
* Make a GET request
|
|
10
|
+
*/
|
|
11
|
+
get<T = any>(path: string): Promise<T>;
|
|
12
|
+
/**
|
|
13
|
+
* Make a POST request
|
|
14
|
+
*/
|
|
15
|
+
post<T = any>(path: string, body?: any): Promise<T>;
|
|
16
|
+
/**
|
|
17
|
+
* Make a PUT request
|
|
18
|
+
*/
|
|
19
|
+
put<T = any>(path: string, body?: any): Promise<T>;
|
|
20
|
+
/**
|
|
21
|
+
* Make a DELETE request
|
|
22
|
+
*/
|
|
23
|
+
delete<T = any>(path: string): Promise<T>;
|
|
24
|
+
/**
|
|
25
|
+
* Generic request method
|
|
26
|
+
*/
|
|
27
|
+
private request;
|
|
28
|
+
/**
|
|
29
|
+
* Parse response body
|
|
30
|
+
*/
|
|
31
|
+
private parseResponse;
|
|
32
|
+
/**
|
|
33
|
+
* Update base URL
|
|
34
|
+
*/
|
|
35
|
+
setBaseUrl(url: string): void;
|
|
36
|
+
/**
|
|
37
|
+
* Update link token
|
|
38
|
+
*/
|
|
39
|
+
setLinkToken(token: string): void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* API Error class
|
|
43
|
+
*/
|
|
44
|
+
export declare class ApiError extends Error {
|
|
45
|
+
status: number;
|
|
46
|
+
data?: any | undefined;
|
|
47
|
+
constructor(status: number, message: string, data?: any | undefined);
|
|
48
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { PasskeyResult, RegisterResult, OTPSubmitResult } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Main PayOS Passkey SDK class
|
|
4
|
+
* Provides simple methods for passkey authentication and registration
|
|
5
|
+
*/
|
|
6
|
+
export declare class PayOSPasskey {
|
|
7
|
+
private apiClient;
|
|
8
|
+
private visaService;
|
|
9
|
+
private mastercardService;
|
|
10
|
+
private logger;
|
|
11
|
+
private sdkConfig;
|
|
12
|
+
private isInitialized;
|
|
13
|
+
private initPromise;
|
|
14
|
+
private instanceId;
|
|
15
|
+
constructor(linkToken: string, options?: {
|
|
16
|
+
sandbox?: boolean;
|
|
17
|
+
apiBaseUrl?: string;
|
|
18
|
+
debug?: boolean;
|
|
19
|
+
visaContainerId?: string;
|
|
20
|
+
mastercardPopupDimensions?: {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Initialize SDK - fetch config and load SDKs
|
|
27
|
+
* Called automatically in constructor
|
|
28
|
+
*/
|
|
29
|
+
private initialize;
|
|
30
|
+
private performInitialization;
|
|
31
|
+
/**
|
|
32
|
+
* Authenticate a payment using passkeys - handles complete flow internally
|
|
33
|
+
*/
|
|
34
|
+
authenticate(paymentIntentId: string, paymentId?: string): Promise<PasskeyResult>;
|
|
35
|
+
/**
|
|
36
|
+
* Register a card for passkey authentication
|
|
37
|
+
* Returns unified RegisterResult for both networks
|
|
38
|
+
*/
|
|
39
|
+
register(cardId: string): Promise<RegisterResult>;
|
|
40
|
+
/**
|
|
41
|
+
* Complete VIC enrollment using assurance data from passkey authentication
|
|
42
|
+
* Called when passkey exists but VIC enrollment was not completed
|
|
43
|
+
*/
|
|
44
|
+
completeVicEnrollment(enrollmentId: string, assuranceData: any): Promise<PasskeyResult>;
|
|
45
|
+
/**
|
|
46
|
+
* Authenticate using existing passkey and complete VIC enrollment
|
|
47
|
+
* Used when passkey exists but VIC enrollment was not completed
|
|
48
|
+
* @param enrollmentId - The enrollment ID from the registration flow
|
|
49
|
+
* @param authenticationContext - The authentication context from Visa for passkey assertion
|
|
50
|
+
*/
|
|
51
|
+
authenticateForVicEnrollment(enrollmentId: string, authenticationContext: any): Promise<PasskeyResult>;
|
|
52
|
+
/**
|
|
53
|
+
* Submit step-up method selection for Visa registration
|
|
54
|
+
*/
|
|
55
|
+
submitStepUpMethod(enrollmentId: string, methodIndex: number): Promise<OTPSubmitResult>;
|
|
56
|
+
/**
|
|
57
|
+
* Validate OTP for step-up authentication
|
|
58
|
+
* Returns registrationContext for the caller to trigger SDK registration
|
|
59
|
+
* (This allows React to render the iframe container first)
|
|
60
|
+
*/
|
|
61
|
+
validateStepUpOTP(enrollmentId: string, otpValue: string): Promise<PasskeyResult>;
|
|
62
|
+
/**
|
|
63
|
+
* Complete Visa passkey registration after OTP validation
|
|
64
|
+
* Call this AFTER the iframe container has been rendered
|
|
65
|
+
*/
|
|
66
|
+
completeVisaRegistration(enrollmentId: string, registrationContext: any): Promise<PasskeyResult>;
|
|
67
|
+
private getMastercardStatusFailure;
|
|
68
|
+
/**
|
|
69
|
+
* Internal method to complete authentication
|
|
70
|
+
* Called automatically after SDK interaction
|
|
71
|
+
*/
|
|
72
|
+
private completeAuthenticationInternal;
|
|
73
|
+
/**
|
|
74
|
+
* Show Visa iframe in specified container
|
|
75
|
+
* @param containerId - ID of the HTML element where iframe should be placed
|
|
76
|
+
*/
|
|
77
|
+
showVisaIframe(containerId?: string): void;
|
|
78
|
+
/**
|
|
79
|
+
* Hide Visa iframe
|
|
80
|
+
*/
|
|
81
|
+
hideVisaIframe(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Remove Visa iframe from DOM while preserving session data
|
|
84
|
+
* Use this when navigating away but want to retain session for retry
|
|
85
|
+
*/
|
|
86
|
+
removeVisaIframeOnly(): void;
|
|
87
|
+
/**
|
|
88
|
+
* Get direct reference to Visa iframe element
|
|
89
|
+
* Gives developers full control over iframe styling and placement
|
|
90
|
+
*/
|
|
91
|
+
getVisaIframe(): HTMLIFrameElement | null;
|
|
92
|
+
/**
|
|
93
|
+
* Set custom Mastercard popup window dimensions
|
|
94
|
+
* @param width - Popup width (default: 550)
|
|
95
|
+
* @param height - Popup height (default: 760)
|
|
96
|
+
*/
|
|
97
|
+
setMastercardPopupDimensions(width: number, height: number): void;
|
|
98
|
+
/**
|
|
99
|
+
* Close Mastercard authentication window if open
|
|
100
|
+
*/
|
|
101
|
+
closeMastercardWindow(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Get reference to Mastercard authentication window (if open)
|
|
104
|
+
*/
|
|
105
|
+
getMastercardWindow(): Window | null;
|
|
106
|
+
/**
|
|
107
|
+
* Check if SDK is loaded for a specific network
|
|
108
|
+
*/
|
|
109
|
+
isSDKLoaded(network: "visa" | "mastercard"): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Clean up SDK resources
|
|
112
|
+
*/
|
|
113
|
+
cleanup(): void;
|
|
114
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PayOS Passkey SDK Types
|
|
3
|
+
*/
|
|
4
|
+
export interface PasskeyAuthResponse {
|
|
5
|
+
paymentIntentId?: string;
|
|
6
|
+
enrollmentId: string;
|
|
7
|
+
enrollmentStatus: 'enrolled' | 'pending' | 'failed';
|
|
8
|
+
cardBrand: string;
|
|
9
|
+
network: 'visa' | 'mastercard';
|
|
10
|
+
flowType: 'registration' | 'transaction_authentication';
|
|
11
|
+
passkeyAction?: 'REGISTER' | 'AUTHENTICATE' | 'WAIVED';
|
|
12
|
+
vProvisionedTokenID?: string;
|
|
13
|
+
srcDigitalCardId?: string;
|
|
14
|
+
vicEnrolled?: boolean;
|
|
15
|
+
orgConfig?: any;
|
|
16
|
+
passkeyFlow?: any;
|
|
17
|
+
paymentAmount?: number;
|
|
18
|
+
paymentCurrency?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface SDKConfig {
|
|
21
|
+
visa: {
|
|
22
|
+
sdkUrl: string;
|
|
23
|
+
};
|
|
24
|
+
mastercard: {
|
|
25
|
+
sdkUrl: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface SDKSessionData {
|
|
29
|
+
/** SDK session context */
|
|
30
|
+
sessionContext: any;
|
|
31
|
+
/** Browser data */
|
|
32
|
+
browserData: any;
|
|
33
|
+
}
|
|
34
|
+
export interface PasskeyResult {
|
|
35
|
+
/** Success status */
|
|
36
|
+
success: boolean;
|
|
37
|
+
/** Network type */
|
|
38
|
+
network?: 'visa' | 'mastercard';
|
|
39
|
+
/** Optional message */
|
|
40
|
+
message?: string;
|
|
41
|
+
/** Whether OTP was valid (for step-up flow) */
|
|
42
|
+
otpValid?: boolean;
|
|
43
|
+
/** Registration context to pass to completeVisaRegistration (for step-up flow) */
|
|
44
|
+
registrationContext?: any;
|
|
45
|
+
/** Whether user can retry (for OTP validation failures) */
|
|
46
|
+
canRetry?: boolean;
|
|
47
|
+
/** Number of attempts remaining (for OTP validation) */
|
|
48
|
+
attemptsRemaining?: number;
|
|
49
|
+
/** Device needs passkey registration before authentication (Visa new device) */
|
|
50
|
+
requiresRegistration?: boolean;
|
|
51
|
+
/** Passkey waived for this organization */
|
|
52
|
+
passkeyWaived?: boolean;
|
|
53
|
+
/** Step-up methods available for registration */
|
|
54
|
+
stepUpMethods?: any[];
|
|
55
|
+
/** Enrollment ID for registration flow */
|
|
56
|
+
enrollmentId?: string;
|
|
57
|
+
/** Optional error details */
|
|
58
|
+
error?: {
|
|
59
|
+
code: string;
|
|
60
|
+
message: string;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export interface RegisterResult {
|
|
64
|
+
/** Success status - true if registration complete, false if step-up needed or failed */
|
|
65
|
+
success: boolean;
|
|
66
|
+
/** Network type */
|
|
67
|
+
network?: 'visa' | 'mastercard';
|
|
68
|
+
/** Step-up required (Visa only) */
|
|
69
|
+
requiresStepUp?: boolean;
|
|
70
|
+
/** VIC enrollment required (Visa only - passkey exists but VIC not enrolled) */
|
|
71
|
+
requiresVicEnrollment?: boolean;
|
|
72
|
+
/** Already registered (passkey already exists) */
|
|
73
|
+
alreadyRegistered?: boolean;
|
|
74
|
+
/** Passkey waived for this organization */
|
|
75
|
+
passkeyWaived?: boolean;
|
|
76
|
+
/** Enrollment ID for step-up flow */
|
|
77
|
+
enrollmentId?: string;
|
|
78
|
+
/** Step-up methods available */
|
|
79
|
+
stepUpMethods?: any[];
|
|
80
|
+
/** Authentication context for VIC enrollment flow */
|
|
81
|
+
authenticationContext?: any;
|
|
82
|
+
/** Message */
|
|
83
|
+
message?: string;
|
|
84
|
+
/** Error details if failed */
|
|
85
|
+
error?: {
|
|
86
|
+
code: string;
|
|
87
|
+
message: string;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export interface OTPSubmitResult {
|
|
91
|
+
success: boolean;
|
|
92
|
+
requiresRetry?: boolean;
|
|
93
|
+
attemptsRemaining?: number;
|
|
94
|
+
}
|
|
95
|
+
export type PasskeyErrorCode = 'INVALID_SESSION' | 'SESSION_EXPIRED' | 'NETWORK_ERROR' | 'SDK_LOAD_FAILED' | 'AUTH_FAILED' | 'INVALID_PARAMS' | 'API_ERROR' | 'DEVICE_NOT_REGISTERED';
|
|
96
|
+
export declare class PasskeyError extends Error {
|
|
97
|
+
code: PasskeyErrorCode;
|
|
98
|
+
details?: any | undefined;
|
|
99
|
+
constructor(code: PasskeyErrorCode, message: string, details?: any | undefined);
|
|
100
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PayOS Passkey JS SDK
|
|
3
|
+
* Browser SDK for passkey authentication operations
|
|
4
|
+
*/
|
|
5
|
+
export { PayOSPasskey } from './core/PayOSPasskey';
|
|
6
|
+
export type { PasskeyAuthResponse, SDKConfig, PasskeyResult, RegisterResult, SDKSessionData, OTPSubmitResult, PasskeyErrorCode, } from './core/types';
|
|
7
|
+
export { PasskeyError } from './core/types';
|
|
8
|
+
import { PayOSPasskey } from './core/PayOSPasskey';
|
|
9
|
+
export default PayOSPasskey;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mastercard SDK Service - Simplified wrapper
|
|
3
|
+
* Handles loading and interacting with Mastercard SRC SDK
|
|
4
|
+
*/
|
|
5
|
+
declare global {
|
|
6
|
+
interface Window {
|
|
7
|
+
AUTHSDK_MASTERCARD?: {
|
|
8
|
+
authenticate: (config: any) => Promise<any>;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export declare class MastercardSDKService {
|
|
13
|
+
private sdkLoaded;
|
|
14
|
+
private sdkLoadPromise;
|
|
15
|
+
private sdkUrl;
|
|
16
|
+
private authWindow;
|
|
17
|
+
private popupWidth;
|
|
18
|
+
private popupHeight;
|
|
19
|
+
private instanceId;
|
|
20
|
+
/**
|
|
21
|
+
* Set SDK URL from backend config
|
|
22
|
+
*/
|
|
23
|
+
setSDKUrl(url: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* Load Mastercard SDK
|
|
26
|
+
*/
|
|
27
|
+
loadSDK(sdkUrl?: string): Promise<void>;
|
|
28
|
+
private loadSDKInternal;
|
|
29
|
+
/**
|
|
30
|
+
* Set custom popup window dimensions
|
|
31
|
+
* @param width - Popup width (default: 550)
|
|
32
|
+
* @param height - Popup height (default: 760)
|
|
33
|
+
*/
|
|
34
|
+
setPopupDimensions(width: number, height: number): void;
|
|
35
|
+
/**
|
|
36
|
+
* Authenticate using Mastercard SDK
|
|
37
|
+
* Opens a popup window and performs authentication
|
|
38
|
+
* @param authRequest - Authentication request from backend
|
|
39
|
+
* @param popupOptions - Optional popup dimensions
|
|
40
|
+
*/
|
|
41
|
+
authenticate(authRequest: any, popupOptions?: {
|
|
42
|
+
width?: number;
|
|
43
|
+
height?: number;
|
|
44
|
+
}): Promise<any>;
|
|
45
|
+
/**
|
|
46
|
+
* Get reference to the authentication window (if open)
|
|
47
|
+
*/
|
|
48
|
+
getAuthWindow(): Window | null;
|
|
49
|
+
/**
|
|
50
|
+
* Close authentication window if open
|
|
51
|
+
*/
|
|
52
|
+
closeAuthWindow(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Check if SDK is loaded
|
|
55
|
+
*/
|
|
56
|
+
isLoaded(): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Clean up SDK
|
|
59
|
+
*/
|
|
60
|
+
cleanup(): void;
|
|
61
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Visa SDK Service - VTS SDK integration via iframe and postMessage
|
|
3
|
+
* Based on working passkey-core implementation
|
|
4
|
+
*/
|
|
5
|
+
export interface VTSSessionData {
|
|
6
|
+
sessionContext: any;
|
|
7
|
+
browserData: any;
|
|
8
|
+
requestID: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class VisaSDKService {
|
|
11
|
+
private initialized;
|
|
12
|
+
private initPromise;
|
|
13
|
+
private sessionData;
|
|
14
|
+
private sdkUrl;
|
|
15
|
+
private sdkOrigin;
|
|
16
|
+
private iframe;
|
|
17
|
+
private containerId;
|
|
18
|
+
private vtsRequestId;
|
|
19
|
+
private messageHandlers;
|
|
20
|
+
private messageListener;
|
|
21
|
+
private instanceId;
|
|
22
|
+
constructor();
|
|
23
|
+
/**
|
|
24
|
+
* Set SDK URL from backend config
|
|
25
|
+
*/
|
|
26
|
+
setSDKUrl(url: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* Set container ID for iframe placement
|
|
29
|
+
* @param containerId - ID of the HTML element where iframe should be placed
|
|
30
|
+
*/
|
|
31
|
+
setContainerId(containerId: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* Initialize VTS SDK by creating iframe and establishing session
|
|
34
|
+
*/
|
|
35
|
+
loadSDK(sdkUrl?: string): Promise<void>;
|
|
36
|
+
private initializeSDK;
|
|
37
|
+
/**
|
|
38
|
+
* Create hidden iframe for VTS SDK
|
|
39
|
+
*/
|
|
40
|
+
private createIframe;
|
|
41
|
+
/**
|
|
42
|
+
* Handle messages from VTS SDK iframe
|
|
43
|
+
*/
|
|
44
|
+
private handleMessage;
|
|
45
|
+
/**
|
|
46
|
+
* Send CREATE_AUTH_SESSION command to VTS SDK
|
|
47
|
+
*/
|
|
48
|
+
private sendCreateAuthSession;
|
|
49
|
+
/**
|
|
50
|
+
* Get session context needed for Visa operations
|
|
51
|
+
*/
|
|
52
|
+
getSessionContext(): Promise<{
|
|
53
|
+
sessionContext: any;
|
|
54
|
+
browserData: any;
|
|
55
|
+
}>;
|
|
56
|
+
/**
|
|
57
|
+
* Send AUTHENTICATE command for passkey operations
|
|
58
|
+
* Note: This is for advanced use cases - normally backend handles this
|
|
59
|
+
*/
|
|
60
|
+
authenticate(authenticationContext: any): Promise<any>;
|
|
61
|
+
/**
|
|
62
|
+
* Check if SDK is loaded and initialized
|
|
63
|
+
*/
|
|
64
|
+
isLoaded(): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Show VTS SDK iframe positioned over specified container
|
|
67
|
+
* NOTE: We position the iframe over the container instead of moving it into the container.
|
|
68
|
+
* Moving an iframe to a new DOM parent causes it to reload, which destroys the VTS session.
|
|
69
|
+
* @param containerId - ID of the HTML element to position iframe over
|
|
70
|
+
*/
|
|
71
|
+
showIframe(containerId?: string): void;
|
|
72
|
+
/**
|
|
73
|
+
* Hide VTS SDK iframe
|
|
74
|
+
* Moves iframe off-screen but maintains the VTS session
|
|
75
|
+
*/
|
|
76
|
+
hideIframe(): void;
|
|
77
|
+
/**
|
|
78
|
+
* Get reference to the VTS iframe element
|
|
79
|
+
*/
|
|
80
|
+
getIframe(): HTMLIFrameElement | null;
|
|
81
|
+
/**
|
|
82
|
+
* Remove iframe from DOM while preserving session data
|
|
83
|
+
* Use this when navigating away but want to retain session for retry
|
|
84
|
+
*/
|
|
85
|
+
removeIframeOnly(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Clean up SDK
|
|
88
|
+
*/
|
|
89
|
+
cleanup(): void;
|
|
90
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type DiagnosticLevel = "log" | "warn" | "error";
|
|
2
|
+
export interface DiagnosticEntry {
|
|
3
|
+
source: "payos-passkey-js";
|
|
4
|
+
event: string;
|
|
5
|
+
level: DiagnosticLevel;
|
|
6
|
+
timestamp: string;
|
|
7
|
+
elapsedMs?: number;
|
|
8
|
+
data?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
interface DiagnosticReportingConfig {
|
|
11
|
+
endpointUrl: string;
|
|
12
|
+
linkToken: string;
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare global {
|
|
16
|
+
interface Window {
|
|
17
|
+
__PAYOS_PASSKEY_DIAGNOSTICS__?: (entry: DiagnosticEntry) => void;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export declare function nowMs(): number;
|
|
21
|
+
export declare function elapsedMs(startedAt: number): number;
|
|
22
|
+
export declare function createDiagnosticId(prefix: string): string;
|
|
23
|
+
export declare function configureDiagnosticReporting(config: DiagnosticReportingConfig): void;
|
|
24
|
+
export declare function summarizeError(error: unknown): Record<string, unknown>;
|
|
25
|
+
export declare function sanitizeDiagnosticData(value: unknown): Record<string, unknown>;
|
|
26
|
+
export declare function diagnosticLog(event: string, data?: Record<string, unknown>, options?: {
|
|
27
|
+
level?: DiagnosticLevel;
|
|
28
|
+
elapsedMs?: number;
|
|
29
|
+
}): void;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple logger for SDK debugging
|
|
3
|
+
*/
|
|
4
|
+
export declare class Logger {
|
|
5
|
+
private enabled;
|
|
6
|
+
private prefix;
|
|
7
|
+
constructor(enabled?: boolean);
|
|
8
|
+
/**
|
|
9
|
+
* Log a message
|
|
10
|
+
*/
|
|
11
|
+
log(message: string, _data?: unknown): void;
|
|
12
|
+
/**
|
|
13
|
+
* Log a warning
|
|
14
|
+
*/
|
|
15
|
+
warn(message: string, _data?: unknown): void;
|
|
16
|
+
/**
|
|
17
|
+
* Log an error
|
|
18
|
+
*/
|
|
19
|
+
error(message: string, _error?: unknown): void;
|
|
20
|
+
/**
|
|
21
|
+
* Log debug information
|
|
22
|
+
*/
|
|
23
|
+
debug(message: string, _data?: unknown): void;
|
|
24
|
+
/**
|
|
25
|
+
* Enable logging
|
|
26
|
+
*/
|
|
27
|
+
enable(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Disable logging
|
|
30
|
+
*/
|
|
31
|
+
disable(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Check if logging is enabled
|
|
34
|
+
*/
|
|
35
|
+
isEnabled(): boolean;
|
|
36
|
+
}
|
package/dist/{components → types/payos-react/src/components}/payos/AgentRegistrationFlow.d.ts
RENAMED
|
@@ -6,7 +6,6 @@ interface AgentRegistrationFlowProps {
|
|
|
6
6
|
session: CheckoutSession;
|
|
7
7
|
registrationSubPhase: RegistrationSubPhase;
|
|
8
8
|
passkey: UsePasskeySDKReturn;
|
|
9
|
-
debug: boolean;
|
|
10
9
|
localError: string | null;
|
|
11
10
|
visaOtp: string;
|
|
12
11
|
setVisaOtp: React.Dispatch<React.SetStateAction<string>>;
|
|
@@ -19,6 +18,5 @@ interface AgentRegistrationFlowProps {
|
|
|
19
18
|
onVisaIframeCancel: () => void;
|
|
20
19
|
onBackToCheckout: () => void;
|
|
21
20
|
}
|
|
22
|
-
export declare function AgentRegistrationFlow({ session, registrationSubPhase, passkey,
|
|
21
|
+
export declare function AgentRegistrationFlow({ session, registrationSubPhase, passkey, localError, visaOtp, setVisaOtp, setLocalError, setRegistrationSubPhase, onCreatePasskey, onSkipRegistration, onVisaMethodSelect, onVisaOtpVerify, onVisaIframeCancel, onBackToCheckout, }: AgentRegistrationFlowProps): import("react/jsx-runtime").JSX.Element | null;
|
|
23
22
|
export {};
|
|
24
|
-
//# sourceMappingURL=AgentRegistrationFlow.d.ts.map
|
package/dist/{components → types/payos-react/src/components}/payos/ConnectStripeLinkButton.d.ts
RENAMED
|
@@ -38,4 +38,3 @@ export interface ConnectStripeLinkButtonProps {
|
|
|
38
38
|
}
|
|
39
39
|
export declare function ConnectStripeLinkButton(props: ConnectStripeLinkButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
export default ConnectStripeLinkButton;
|
|
41
|
-
//# sourceMappingURL=ConnectStripeLinkButton.d.ts.map
|
package/dist/types/{components → payos-react/src/components}/payos/IdentityVerificationFlow.d.ts
RENAMED
|
@@ -23,4 +23,3 @@ interface IdentityVerificationFlowProps {
|
|
|
23
23
|
}
|
|
24
24
|
export declare function IdentityVerificationFlow({ mode, phoneNumber, setPhoneNumber, selectedCountry, setSelectedCountry, otp, setOTP, displayError, isSetupMode, loading, isResending, resendCooldown, retryCount, clearLocalError, clearSessionError, onPhoneSubmit, onOTPSubmit, onEditPhone, onOTPResend, }: IdentityVerificationFlowProps): import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
export {};
|
|
26
|
-
//# sourceMappingURL=IdentityVerificationFlow.d.ts.map
|
|
@@ -16,4 +16,3 @@ interface LinkSessionContentProps {
|
|
|
16
16
|
}
|
|
17
17
|
export declare function LinkSessionContent({ linkSession, approvalDeadline, buildSpendBody, onCancelConnect, onCancelSpend, onDeniedDismiss, onManageClose, onDisconnect, approvedSubState, approvedErrorSubState, showSpendErrors, }: LinkSessionContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
18
18
|
export {};
|
|
19
|
-
//# sourceMappingURL=LinkSessionContent.d.ts.map
|
|
@@ -29,11 +29,11 @@ export interface PaymentSheetProps {
|
|
|
29
29
|
environment?: 'sandbox' | 'production';
|
|
30
30
|
/** Override API URL for local development - used for direct SDK calls like passkey, credential gen (e.g., 'http://localhost:3000') */
|
|
31
31
|
developmentApiUrl?: string;
|
|
32
|
-
/** Backend API URL for
|
|
32
|
+
/** Backend API URL override for the hosted CardElement. */
|
|
33
33
|
cardElementApiUrl?: string;
|
|
34
|
-
/** PayOS Link UI URL for CardElement iframe
|
|
34
|
+
/** PayOS Link UI URL override for the CardElement iframe. */
|
|
35
35
|
cardElementUrl?: string;
|
|
36
|
-
/**
|
|
36
|
+
/** @deprecated Accepted for compatibility; diagnostic state controls and logging are disabled. */
|
|
37
37
|
debug?: boolean;
|
|
38
38
|
/** Exit immediately after card is added (no card list). Only applies to setup/onboard sessions. */
|
|
39
39
|
exitOnCardAdd?: boolean;
|
|
@@ -118,4 +118,3 @@ export interface PaymentSheetPaymentMethods {
|
|
|
118
118
|
}
|
|
119
119
|
export declare const PaymentSheet: React.FC<PaymentSheetProps>;
|
|
120
120
|
export default PaymentSheet;
|
|
121
|
-
//# sourceMappingURL=PaymentSheet.d.ts.map
|