@payos-inc/payos-react 1.0.42 → 1.2.0-staging.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/LICENSE +96 -0
  2. package/README.md +160 -0
  3. package/dist/THIRD_PARTY_NOTICES.txt +549 -0
  4. package/dist/payos-react.cjs +50 -0
  5. package/dist/payos-react.css +1 -1
  6. package/dist/payos-react.esm.js +17 -11
  7. package/dist/payos-react.min.js +2 -1
  8. package/dist/payos-react.mjs +50 -0
  9. package/dist/types/index.d.ts +1 -57
  10. package/dist/types/payos-passkey-js/src/api/ApiClient.d.ts +48 -0
  11. package/dist/types/payos-passkey-js/src/core/PayOSPasskey.d.ts +114 -0
  12. package/dist/types/payos-passkey-js/src/core/types.d.ts +100 -0
  13. package/dist/types/payos-passkey-js/src/index.d.ts +9 -0
  14. package/dist/types/payos-passkey-js/src/services/mastercard/MastercardSDKService.d.ts +61 -0
  15. package/dist/types/payos-passkey-js/src/services/visa/VisaSDKService.d.ts +90 -0
  16. package/dist/types/payos-passkey-js/src/utils/diagnostics.d.ts +30 -0
  17. package/dist/types/payos-passkey-js/src/utils/logger.d.ts +36 -0
  18. package/dist/{components → types/payos-react/src/components}/payos/ActiveCardWidget.d.ts +0 -1
  19. package/dist/{components → types/payos-react/src/components}/payos/AgentRegistrationFlow.d.ts +1 -3
  20. package/dist/{components → types/payos-react/src/components}/payos/ConnectStripeLinkButton.d.ts +0 -1
  21. package/dist/types/{components → payos-react/src/components}/payos/IdentityVerificationFlow.d.ts +0 -1
  22. package/dist/{components → types/payos-react/src/components}/payos/LinkPaymentFlow.d.ts +0 -1
  23. package/dist/{components → types/payos-react/src/components}/payos/LinkSessionContent.d.ts +0 -1
  24. package/dist/types/{components → payos-react/src/components}/payos/PayOSFooter.d.ts +0 -1
  25. package/dist/types/{components → payos-react/src/components}/payos/PayWithLinkButton.d.ts +0 -1
  26. package/dist/{components → types/payos-react/src/components}/payos/PaymentMethodRow.d.ts +0 -1
  27. package/dist/{components → types/payos-react/src/components}/payos/PaymentSheet.d.ts +3 -4
  28. package/dist/types/{components → payos-react/src/components}/payos/PaymentSheetContent.d.ts +4 -3
  29. package/dist/types/{components → payos-react/src/components}/payos/PaymentSheetPaymentFlow.d.ts +4 -2
  30. package/dist/{components → types/payos-react/src/components}/payos/PaymentSheetShell.d.ts +0 -1
  31. package/dist/{components → types/payos-react/src/components}/payos/PaymentSheetStatusViews.d.ts +0 -1
  32. package/dist/types/{components → payos-react/src/components}/payos/PriceTag.d.ts +0 -1
  33. package/dist/types/{components → payos-react/src/components}/payos/ReceiptPanel.d.ts +0 -1
  34. package/dist/types/{components → payos-react/src/components}/payos/ViewHeader.d.ts +0 -1
  35. package/dist/types/{components → payos-react/src/components}/payos/drawer.d.ts +0 -2
  36. package/dist/{components → types/payos-react/src/components}/payos/order-summary.d.ts +0 -1
  37. package/dist/{components → types/payos-react/src/components}/payos/otp-input.d.ts +0 -1
  38. package/dist/types/{components → payos-react/src/components}/payos/phone-input.d.ts +0 -1
  39. package/dist/{components → types/payos-react/src/components}/payos/themeMode.d.ts +0 -1
  40. package/dist/types/{components → payos-react/src/components}/payos/usePaymentSheetDisplayData.d.ts +0 -1
  41. package/dist/types/{components → payos-react/src/components}/payos/usePaymentSheetLifecycle.d.ts +0 -1
  42. package/dist/{components → types/payos-react/src/components}/payos/usePaymentSheetSkipToAuth.d.ts +0 -1
  43. package/dist/{components → types/payos-react/src/components}/payos/usePaymentSheetSkipToLink.d.ts +0 -1
  44. package/dist/{components → types/payos-react/src/components}/payos/views/AgentRegistrationView.d.ts +0 -1
  45. package/dist/types/{components → payos-react/src/components}/payos/views/CardAddView.d.ts +1 -2
  46. package/dist/types/{components → payos-react/src/components}/payos/views/CheckoutView.d.ts +0 -1
  47. package/dist/types/{components → payos-react/src/components}/payos/views/IdentityView.d.ts +0 -1
  48. package/dist/{components → types/payos-react/src/components}/payos/views/LinkBrand.d.ts +0 -1
  49. package/dist/{components → types/payos-react/src/components}/payos/views/LinkCheckoutView.d.ts +0 -1
  50. package/dist/types/{components → payos-react/src/components}/payos/views/LinkConnectView.d.ts +0 -1
  51. package/dist/types/{components → payos-react/src/components}/payos/views/LinkDeniedView.d.ts +0 -1
  52. package/dist/{components → types/payos-react/src/components}/payos/views/LinkLoadingView.d.ts +0 -1
  53. package/dist/types/{components → payos-react/src/components}/payos/views/LinkSuccessView.d.ts +0 -1
  54. package/dist/{components → types/payos-react/src/components}/payos/views/ManageThirdPartyView.d.ts +0 -1
  55. package/dist/{components → types/payos-react/src/components}/payos/views/MethodListView.d.ts +8 -1
  56. package/dist/types/{components → payos-react/src/components}/payos/views/OTPView.d.ts +0 -1
  57. package/dist/types/payos-react/src/components/payos/views/ShareCardsView.d.ts +24 -0
  58. package/dist/types/{components → payos-react/src/components}/payos/views/SuccessView.d.ts +0 -1
  59. package/dist/{components → types/payos-react/src/components}/payos/views/VisaIframeView.d.ts +0 -1
  60. package/dist/types/{components → payos-react/src/components}/payos/views/VisaMethodView.d.ts +0 -1
  61. package/dist/{components → types/payos-react/src/components}/payos/views/VisaOtpView.d.ts +0 -1
  62. package/dist/{components → types/payos-react/src/components}/payos/views/WelcomeBackView.d.ts +0 -1
  63. package/dist/types/{components → payos-react/src/components}/ui/CardBrandIcon.d.ts +0 -1
  64. package/dist/types/{components → payos-react/src/components}/ui/ConfirmDialog.d.ts +0 -1
  65. package/dist/types/{components → payos-react/src/components}/ui/DigitalCard.d.ts +0 -1
  66. package/dist/types/{components → payos-react/src/components}/ui/button.d.ts +1 -2
  67. package/dist/types/{components → payos-react/src/components}/ui/card.d.ts +1 -2
  68. package/dist/types/{components → payos-react/src/components}/ui/input.d.ts +0 -1
  69. package/dist/types/{components → payos-react/src/components}/ui/label.d.ts +1 -2
  70. package/dist/types/{components → payos-react/src/components}/ui/separator.d.ts +0 -1
  71. package/dist/{hooks → types/payos-react/src/hooks}/useBiometricType.d.ts +0 -1
  72. package/dist/types/{hooks → payos-react/src/hooks}/useBodyScrollLock.d.ts +0 -1
  73. package/dist/types/{hooks → payos-react/src/hooks}/useCardElement.d.ts +1 -2
  74. package/dist/types/{hooks → payos-react/src/hooks}/useLinkAuth.d.ts +0 -1
  75. package/dist/types/{hooks → payos-react/src/hooks}/useLinkDeviceAuthPoll.d.ts +0 -1
  76. package/dist/types/{hooks → payos-react/src/hooks}/useLinkMethods.d.ts +0 -1
  77. package/dist/{hooks → types/payos-react/src/hooks}/useLinkSession.d.ts +0 -1
  78. package/dist/{hooks → types/payos-react/src/hooks}/useLinkSpendStatusPoll.d.ts +0 -1
  79. package/dist/types/{hooks → payos-react/src/hooks}/usePasskeySDK.d.ts +2 -4
  80. package/dist/{hooks → types/payos-react/src/hooks}/useSession.d.ts +8 -1
  81. package/dist/types/{hooks → payos-react/src/hooks}/useVisualViewport.d.ts +0 -1
  82. package/dist/{index.d.ts → types/payos-react/src/index.d.ts} +3 -4
  83. package/dist/{lib → types/payos-react/src/lib}/utils.d.ts +0 -1
  84. package/dist/{services → types/payos-react/src/services}/apiService.d.ts +10 -2
  85. package/dist/{services → types/payos-react/src/services}/linkTokenService.d.ts +0 -1
  86. package/dist/types/{cardElement.d.ts → payos-react/src/types/cardElement.d.ts} +2 -3
  87. package/dist/types/{drawer.d.ts → payos-react/src/types/drawer.d.ts} +0 -1
  88. package/dist/types/{types → payos-react/src/types}/index.d.ts +0 -1
  89. package/dist/types/{order.d.ts → payos-react/src/types/order.d.ts} +0 -1
  90. package/dist/types/{types → payos-react/src/types}/payment.d.ts +1 -2
  91. package/dist/types/{session.d.ts → payos-react/src/types/session.d.ts} +15 -1
  92. package/dist/types/{utils → payos-react/src/utils}/credentialStatus.d.ts +0 -1
  93. package/dist/{utils → types/payos-react/src/utils}/deviceFingerprint.d.ts +0 -1
  94. package/dist/types/{utils → payos-react/src/utils}/environment.d.ts +0 -1
  95. package/dist/{utils → types/payos-react/src/utils}/formatting.d.ts +0 -1
  96. package/dist/types/{utils → payos-react/src/utils}/linkPopup.d.ts +0 -1
  97. package/dist/types/{utils → payos-react/src/utils}/selectCard.d.ts +0 -1
  98. package/dist/types/{utils → payos-react/src/utils}/text.d.ts +0 -1
  99. package/dist/{utils → types/payos-react/src/utils}/validation.d.ts +0 -1
  100. package/package.json +38 -13
  101. package/dist/components/identity/IdentityBar.d.ts +0 -8
  102. package/dist/components/identity/IdentityBar.d.ts.map +0 -1
  103. package/dist/components/order/OrderSummaryAccordion.d.ts +0 -9
  104. package/dist/components/order/OrderSummaryAccordion.d.ts.map +0 -1
  105. package/dist/components/order/ShipmentCard.d.ts +0 -8
  106. package/dist/components/order/ShipmentCard.d.ts.map +0 -1
  107. package/dist/components/payos/ActiveCardWidget.d.ts.map +0 -1
  108. package/dist/components/payos/AgentRegistrationFlow.d.ts.map +0 -1
  109. package/dist/components/payos/ConnectStripeLinkButton.d.ts.map +0 -1
  110. package/dist/components/payos/IdentityVerificationFlow.d.ts +0 -26
  111. package/dist/components/payos/IdentityVerificationFlow.d.ts.map +0 -1
  112. package/dist/components/payos/LinkPaymentFlow.d.ts.map +0 -1
  113. package/dist/components/payos/LinkSessionContent.d.ts.map +0 -1
  114. package/dist/components/payos/PayOSFooter.d.ts +0 -25
  115. package/dist/components/payos/PayOSFooter.d.ts.map +0 -1
  116. package/dist/components/payos/PayWithLinkButton.d.ts +0 -74
  117. package/dist/components/payos/PayWithLinkButton.d.ts.map +0 -1
  118. package/dist/components/payos/PaymentMethodRow.d.ts.map +0 -1
  119. package/dist/components/payos/PaymentSheet.d.ts.map +0 -1
  120. package/dist/components/payos/PaymentSheetContent.d.ts +0 -80
  121. package/dist/components/payos/PaymentSheetContent.d.ts.map +0 -1
  122. package/dist/components/payos/PaymentSheetPaymentFlow.d.ts +0 -43
  123. package/dist/components/payos/PaymentSheetPaymentFlow.d.ts.map +0 -1
  124. package/dist/components/payos/PaymentSheetShell.d.ts.map +0 -1
  125. package/dist/components/payos/PaymentSheetStatusViews.d.ts.map +0 -1
  126. package/dist/components/payos/PriceTag.d.ts +0 -64
  127. package/dist/components/payos/PriceTag.d.ts.map +0 -1
  128. package/dist/components/payos/ReceiptPanel.d.ts +0 -67
  129. package/dist/components/payos/ReceiptPanel.d.ts.map +0 -1
  130. package/dist/components/payos/ViewHeader.d.ts +0 -9
  131. package/dist/components/payos/ViewHeader.d.ts.map +0 -1
  132. package/dist/components/payos/drawer.d.ts +0 -107
  133. package/dist/components/payos/drawer.d.ts.map +0 -1
  134. package/dist/components/payos/order-summary.d.ts.map +0 -1
  135. package/dist/components/payos/otp-input.d.ts.map +0 -1
  136. package/dist/components/payos/phone-input.d.ts +0 -30
  137. package/dist/components/payos/phone-input.d.ts.map +0 -1
  138. package/dist/components/payos/themeMode.d.ts.map +0 -1
  139. package/dist/components/payos/usePaymentSheetDebug.d.ts +0 -22
  140. package/dist/components/payos/usePaymentSheetDebug.d.ts.map +0 -1
  141. package/dist/components/payos/usePaymentSheetDisplayData.d.ts +0 -29
  142. package/dist/components/payos/usePaymentSheetDisplayData.d.ts.map +0 -1
  143. package/dist/components/payos/usePaymentSheetLifecycle.d.ts +0 -39
  144. package/dist/components/payos/usePaymentSheetLifecycle.d.ts.map +0 -1
  145. package/dist/components/payos/usePaymentSheetSkipToAuth.d.ts.map +0 -1
  146. package/dist/components/payos/usePaymentSheetSkipToLink.d.ts.map +0 -1
  147. package/dist/components/payos/views/AgentRegistrationView.d.ts.map +0 -1
  148. package/dist/components/payos/views/CardAddView.d.ts +0 -101
  149. package/dist/components/payos/views/CardAddView.d.ts.map +0 -1
  150. package/dist/components/payos/views/CheckoutView.d.ts +0 -95
  151. package/dist/components/payos/views/CheckoutView.d.ts.map +0 -1
  152. package/dist/components/payos/views/IdentityView.d.ts +0 -51
  153. package/dist/components/payos/views/IdentityView.d.ts.map +0 -1
  154. package/dist/components/payos/views/LinkBrand.d.ts.map +0 -1
  155. package/dist/components/payos/views/LinkCheckoutView.d.ts.map +0 -1
  156. package/dist/components/payos/views/LinkConnectView.d.ts +0 -18
  157. package/dist/components/payos/views/LinkConnectView.d.ts.map +0 -1
  158. package/dist/components/payos/views/LinkDeniedView.d.ts +0 -13
  159. package/dist/components/payos/views/LinkDeniedView.d.ts.map +0 -1
  160. package/dist/components/payos/views/LinkLoadingView.d.ts.map +0 -1
  161. package/dist/components/payos/views/LinkSuccessView.d.ts +0 -11
  162. package/dist/components/payos/views/LinkSuccessView.d.ts.map +0 -1
  163. package/dist/components/payos/views/ManageThirdPartyView.d.ts.map +0 -1
  164. package/dist/components/payos/views/MethodListView.d.ts.map +0 -1
  165. package/dist/components/payos/views/OTPView.d.ts +0 -69
  166. package/dist/components/payos/views/OTPView.d.ts.map +0 -1
  167. package/dist/components/payos/views/SuccessView.d.ts +0 -49
  168. package/dist/components/payos/views/SuccessView.d.ts.map +0 -1
  169. package/dist/components/payos/views/VisaIframeView.d.ts.map +0 -1
  170. package/dist/components/payos/views/VisaMethodView.d.ts +0 -23
  171. package/dist/components/payos/views/VisaMethodView.d.ts.map +0 -1
  172. package/dist/components/payos/views/VisaOtpView.d.ts.map +0 -1
  173. package/dist/components/payos/views/WelcomeBackView.d.ts.map +0 -1
  174. package/dist/components/ui/CardBrandIcon.d.ts +0 -10
  175. package/dist/components/ui/CardBrandIcon.d.ts.map +0 -1
  176. package/dist/components/ui/ConfirmDialog.d.ts +0 -25
  177. package/dist/components/ui/ConfirmDialog.d.ts.map +0 -1
  178. package/dist/components/ui/DigitalCard.d.ts +0 -13
  179. package/dist/components/ui/DigitalCard.d.ts.map +0 -1
  180. package/dist/components/ui/InfoTooltip.d.ts +0 -8
  181. package/dist/components/ui/InfoTooltip.d.ts.map +0 -1
  182. package/dist/components/ui/PinInput.d.ts +0 -12
  183. package/dist/components/ui/PinInput.d.ts.map +0 -1
  184. package/dist/components/ui/button.d.ts +0 -14
  185. package/dist/components/ui/button.d.ts.map +0 -1
  186. package/dist/components/ui/card.d.ts +0 -15
  187. package/dist/components/ui/card.d.ts.map +0 -1
  188. package/dist/components/ui/input.d.ts +0 -6
  189. package/dist/components/ui/input.d.ts.map +0 -1
  190. package/dist/components/ui/label.d.ts +0 -6
  191. package/dist/components/ui/label.d.ts.map +0 -1
  192. package/dist/components/ui/separator.d.ts +0 -5
  193. package/dist/components/ui/separator.d.ts.map +0 -1
  194. package/dist/hooks/index.d.ts +0 -8
  195. package/dist/hooks/index.d.ts.map +0 -1
  196. package/dist/hooks/useBiometricType.d.ts.map +0 -1
  197. package/dist/hooks/useBodyScrollLock.d.ts +0 -32
  198. package/dist/hooks/useBodyScrollLock.d.ts.map +0 -1
  199. package/dist/hooks/useCardElement.d.ts +0 -135
  200. package/dist/hooks/useCardElement.d.ts.map +0 -1
  201. package/dist/hooks/useCheckoutFlow.d.ts +0 -29
  202. package/dist/hooks/useCheckoutFlow.d.ts.map +0 -1
  203. package/dist/hooks/useDrawerState.d.ts +0 -4
  204. package/dist/hooks/useDrawerState.d.ts.map +0 -1
  205. package/dist/hooks/useLinkAuth.d.ts +0 -24
  206. package/dist/hooks/useLinkAuth.d.ts.map +0 -1
  207. package/dist/hooks/useLinkDeviceAuthPoll.d.ts +0 -29
  208. package/dist/hooks/useLinkDeviceAuthPoll.d.ts.map +0 -1
  209. package/dist/hooks/useLinkMethods.d.ts +0 -28
  210. package/dist/hooks/useLinkMethods.d.ts.map +0 -1
  211. package/dist/hooks/useLinkSession.d.ts.map +0 -1
  212. package/dist/hooks/useLinkSpendStatusPoll.d.ts.map +0 -1
  213. package/dist/hooks/usePasskeySDK.d.ts +0 -103
  214. package/dist/hooks/usePasskeySDK.d.ts.map +0 -1
  215. package/dist/hooks/useSession.d.ts.map +0 -1
  216. package/dist/hooks/useVisualViewport.d.ts +0 -15
  217. package/dist/hooks/useVisualViewport.d.ts.map +0 -1
  218. package/dist/index.d.ts.map +0 -1
  219. package/dist/lib/theme.d.ts +0 -53
  220. package/dist/lib/theme.d.ts.map +0 -1
  221. package/dist/lib/utils.d.ts.map +0 -1
  222. package/dist/mocks/index.d.ts +0 -3
  223. package/dist/mocks/index.d.ts.map +0 -1
  224. package/dist/mocks/mockCheckoutFlow.d.ts +0 -25
  225. package/dist/mocks/mockCheckoutFlow.d.ts.map +0 -1
  226. package/dist/mocks/mockData.d.ts +0 -6
  227. package/dist/mocks/mockData.d.ts.map +0 -1
  228. package/dist/mocks/mockSessionData.d.ts +0 -38
  229. package/dist/mocks/mockSessionData.d.ts.map +0 -1
  230. package/dist/services/apiService.d.ts.map +0 -1
  231. package/dist/services/linkTokenService.d.ts.map +0 -1
  232. package/dist/services/mockSessionService.d.ts +0 -65
  233. package/dist/services/mockSessionService.d.ts.map +0 -1
  234. package/dist/types/cardElement.d.ts.map +0 -1
  235. package/dist/types/components/identity/IdentityBar.d.ts +0 -8
  236. package/dist/types/components/identity/IdentityBar.d.ts.map +0 -1
  237. package/dist/types/components/order/OrderSummaryAccordion.d.ts +0 -9
  238. package/dist/types/components/order/OrderSummaryAccordion.d.ts.map +0 -1
  239. package/dist/types/components/order/ShipmentCard.d.ts +0 -8
  240. package/dist/types/components/order/ShipmentCard.d.ts.map +0 -1
  241. package/dist/types/components/payos/ActiveCardWidget.d.ts +0 -60
  242. package/dist/types/components/payos/ActiveCardWidget.d.ts.map +0 -1
  243. package/dist/types/components/payos/AgentRegistrationFlow.d.ts +0 -24
  244. package/dist/types/components/payos/AgentRegistrationFlow.d.ts.map +0 -1
  245. package/dist/types/components/payos/ConnectStripeLinkButton.d.ts +0 -41
  246. package/dist/types/components/payos/ConnectStripeLinkButton.d.ts.map +0 -1
  247. package/dist/types/components/payos/IdentityVerificationFlow.d.ts.map +0 -1
  248. package/dist/types/components/payos/LinkPaymentFlow.d.ts +0 -11
  249. package/dist/types/components/payos/LinkPaymentFlow.d.ts.map +0 -1
  250. package/dist/types/components/payos/LinkSessionContent.d.ts +0 -19
  251. package/dist/types/components/payos/LinkSessionContent.d.ts.map +0 -1
  252. package/dist/types/components/payos/PayOSFooter.d.ts.map +0 -1
  253. package/dist/types/components/payos/PayWithLinkButton.d.ts.map +0 -1
  254. package/dist/types/components/payos/PaymentMethodRow.d.ts +0 -53
  255. package/dist/types/components/payos/PaymentMethodRow.d.ts.map +0 -1
  256. package/dist/types/components/payos/PaymentSheet.d.ts +0 -121
  257. package/dist/types/components/payos/PaymentSheet.d.ts.map +0 -1
  258. package/dist/types/components/payos/PaymentSheetContent.d.ts.map +0 -1
  259. package/dist/types/components/payos/PaymentSheetPaymentFlow.d.ts.map +0 -1
  260. package/dist/types/components/payos/PaymentSheetShell.d.ts +0 -25
  261. package/dist/types/components/payos/PaymentSheetShell.d.ts.map +0 -1
  262. package/dist/types/components/payos/PaymentSheetStatusViews.d.ts +0 -28
  263. package/dist/types/components/payos/PaymentSheetStatusViews.d.ts.map +0 -1
  264. package/dist/types/components/payos/PriceTag.d.ts.map +0 -1
  265. package/dist/types/components/payos/ReceiptPanel.d.ts.map +0 -1
  266. package/dist/types/components/payos/ViewHeader.d.ts.map +0 -1
  267. package/dist/types/components/payos/drawer.d.ts.map +0 -1
  268. package/dist/types/components/payos/order-summary.d.ts +0 -44
  269. package/dist/types/components/payos/order-summary.d.ts.map +0 -1
  270. package/dist/types/components/payos/otp-input.d.ts +0 -45
  271. package/dist/types/components/payos/otp-input.d.ts.map +0 -1
  272. package/dist/types/components/payos/phone-input.d.ts.map +0 -1
  273. package/dist/types/components/payos/themeMode.d.ts +0 -6
  274. package/dist/types/components/payos/themeMode.d.ts.map +0 -1
  275. package/dist/types/components/payos/usePaymentSheetDebug.d.ts +0 -22
  276. package/dist/types/components/payos/usePaymentSheetDebug.d.ts.map +0 -1
  277. package/dist/types/components/payos/usePaymentSheetDisplayData.d.ts.map +0 -1
  278. package/dist/types/components/payos/usePaymentSheetLifecycle.d.ts.map +0 -1
  279. package/dist/types/components/payos/usePaymentSheetSkipToAuth.d.ts +0 -18
  280. package/dist/types/components/payos/usePaymentSheetSkipToAuth.d.ts.map +0 -1
  281. package/dist/types/components/payos/usePaymentSheetSkipToLink.d.ts +0 -14
  282. package/dist/types/components/payos/usePaymentSheetSkipToLink.d.ts.map +0 -1
  283. package/dist/types/components/payos/views/AgentRegistrationView.d.ts +0 -61
  284. package/dist/types/components/payos/views/AgentRegistrationView.d.ts.map +0 -1
  285. package/dist/types/components/payos/views/CardAddView.d.ts.map +0 -1
  286. package/dist/types/components/payos/views/CheckoutView.d.ts.map +0 -1
  287. package/dist/types/components/payos/views/IdentityView.d.ts.map +0 -1
  288. package/dist/types/components/payos/views/LinkBrand.d.ts +0 -13
  289. package/dist/types/components/payos/views/LinkBrand.d.ts.map +0 -1
  290. package/dist/types/components/payos/views/LinkCheckoutView.d.ts +0 -31
  291. package/dist/types/components/payos/views/LinkCheckoutView.d.ts.map +0 -1
  292. package/dist/types/components/payos/views/LinkConnectView.d.ts.map +0 -1
  293. package/dist/types/components/payos/views/LinkDeniedView.d.ts.map +0 -1
  294. package/dist/types/components/payos/views/LinkLoadingView.d.ts +0 -11
  295. package/dist/types/components/payos/views/LinkLoadingView.d.ts.map +0 -1
  296. package/dist/types/components/payos/views/LinkSuccessView.d.ts.map +0 -1
  297. package/dist/types/components/payos/views/ManageThirdPartyView.d.ts +0 -19
  298. package/dist/types/components/payos/views/ManageThirdPartyView.d.ts.map +0 -1
  299. package/dist/types/components/payos/views/MethodListView.d.ts +0 -116
  300. package/dist/types/components/payos/views/MethodListView.d.ts.map +0 -1
  301. package/dist/types/components/payos/views/OTPView.d.ts.map +0 -1
  302. package/dist/types/components/payos/views/SuccessView.d.ts.map +0 -1
  303. package/dist/types/components/payos/views/VisaIframeView.d.ts +0 -16
  304. package/dist/types/components/payos/views/VisaIframeView.d.ts.map +0 -1
  305. package/dist/types/components/payos/views/VisaMethodView.d.ts.map +0 -1
  306. package/dist/types/components/payos/views/VisaOtpView.d.ts +0 -45
  307. package/dist/types/components/payos/views/VisaOtpView.d.ts.map +0 -1
  308. package/dist/types/components/payos/views/WelcomeBackView.d.ts +0 -34
  309. package/dist/types/components/payos/views/WelcomeBackView.d.ts.map +0 -1
  310. package/dist/types/components/ui/CardBrandIcon.d.ts.map +0 -1
  311. package/dist/types/components/ui/ConfirmDialog.d.ts.map +0 -1
  312. package/dist/types/components/ui/DigitalCard.d.ts.map +0 -1
  313. package/dist/types/components/ui/InfoTooltip.d.ts +0 -8
  314. package/dist/types/components/ui/InfoTooltip.d.ts.map +0 -1
  315. package/dist/types/components/ui/PinInput.d.ts +0 -12
  316. package/dist/types/components/ui/PinInput.d.ts.map +0 -1
  317. package/dist/types/components/ui/button.d.ts.map +0 -1
  318. package/dist/types/components/ui/card.d.ts.map +0 -1
  319. package/dist/types/components/ui/input.d.ts.map +0 -1
  320. package/dist/types/components/ui/label.d.ts.map +0 -1
  321. package/dist/types/components/ui/separator.d.ts.map +0 -1
  322. package/dist/types/drawer.d.ts.map +0 -1
  323. package/dist/types/hooks/index.d.ts +0 -8
  324. package/dist/types/hooks/index.d.ts.map +0 -1
  325. package/dist/types/hooks/useBiometricType.d.ts +0 -21
  326. package/dist/types/hooks/useBiometricType.d.ts.map +0 -1
  327. package/dist/types/hooks/useBodyScrollLock.d.ts.map +0 -1
  328. package/dist/types/hooks/useCardElement.d.ts.map +0 -1
  329. package/dist/types/hooks/useCheckoutFlow.d.ts +0 -29
  330. package/dist/types/hooks/useCheckoutFlow.d.ts.map +0 -1
  331. package/dist/types/hooks/useDrawerState.d.ts +0 -4
  332. package/dist/types/hooks/useDrawerState.d.ts.map +0 -1
  333. package/dist/types/hooks/useLinkAuth.d.ts.map +0 -1
  334. package/dist/types/hooks/useLinkDeviceAuthPoll.d.ts.map +0 -1
  335. package/dist/types/hooks/useLinkMethods.d.ts.map +0 -1
  336. package/dist/types/hooks/useLinkSession.d.ts +0 -81
  337. package/dist/types/hooks/useLinkSession.d.ts.map +0 -1
  338. package/dist/types/hooks/useLinkSpendStatusPoll.d.ts +0 -28
  339. package/dist/types/hooks/useLinkSpendStatusPoll.d.ts.map +0 -1
  340. package/dist/types/hooks/usePasskeySDK.d.ts.map +0 -1
  341. package/dist/types/hooks/useSession.d.ts +0 -87
  342. package/dist/types/hooks/useSession.d.ts.map +0 -1
  343. package/dist/types/hooks/useVisualViewport.d.ts.map +0 -1
  344. package/dist/types/index.d.ts.map +0 -1
  345. package/dist/types/lib/theme.d.ts +0 -53
  346. package/dist/types/lib/theme.d.ts.map +0 -1
  347. package/dist/types/lib/utils.d.ts +0 -3
  348. package/dist/types/lib/utils.d.ts.map +0 -1
  349. package/dist/types/mocks/index.d.ts +0 -3
  350. package/dist/types/mocks/index.d.ts.map +0 -1
  351. package/dist/types/mocks/mockCheckoutFlow.d.ts +0 -25
  352. package/dist/types/mocks/mockCheckoutFlow.d.ts.map +0 -1
  353. package/dist/types/mocks/mockData.d.ts +0 -6
  354. package/dist/types/mocks/mockData.d.ts.map +0 -1
  355. package/dist/types/mocks/mockSessionData.d.ts +0 -38
  356. package/dist/types/mocks/mockSessionData.d.ts.map +0 -1
  357. package/dist/types/order.d.ts.map +0 -1
  358. package/dist/types/payment.d.ts +0 -55
  359. package/dist/types/payment.d.ts.map +0 -1
  360. package/dist/types/services/apiService.d.ts +0 -406
  361. package/dist/types/services/apiService.d.ts.map +0 -1
  362. package/dist/types/services/linkTokenService.d.ts +0 -7
  363. package/dist/types/services/linkTokenService.d.ts.map +0 -1
  364. package/dist/types/services/mockSessionService.d.ts +0 -65
  365. package/dist/types/services/mockSessionService.d.ts.map +0 -1
  366. package/dist/types/session.d.ts.map +0 -1
  367. package/dist/types/types/cardElement.d.ts +0 -157
  368. package/dist/types/types/cardElement.d.ts.map +0 -1
  369. package/dist/types/types/drawer.d.ts +0 -33
  370. package/dist/types/types/drawer.d.ts.map +0 -1
  371. package/dist/types/types/index.d.ts.map +0 -1
  372. package/dist/types/types/order.d.ts +0 -25
  373. package/dist/types/types/order.d.ts.map +0 -1
  374. package/dist/types/types/payment.d.ts.map +0 -1
  375. package/dist/types/types/session.d.ts +0 -165
  376. package/dist/types/types/session.d.ts.map +0 -1
  377. package/dist/types/utils/credentialStatus.d.ts.map +0 -1
  378. package/dist/types/utils/deviceFingerprint.d.ts +0 -27
  379. package/dist/types/utils/deviceFingerprint.d.ts.map +0 -1
  380. package/dist/types/utils/environment.d.ts.map +0 -1
  381. package/dist/types/utils/formatting.d.ts +0 -41
  382. package/dist/types/utils/formatting.d.ts.map +0 -1
  383. package/dist/types/utils/index.d.ts +0 -4
  384. package/dist/types/utils/index.d.ts.map +0 -1
  385. package/dist/types/utils/linkFormat.d.ts +0 -17
  386. package/dist/types/utils/linkFormat.d.ts.map +0 -1
  387. package/dist/types/utils/linkPopup.d.ts.map +0 -1
  388. package/dist/types/utils/selectCard.d.ts.map +0 -1
  389. package/dist/types/utils/text.d.ts.map +0 -1
  390. package/dist/types/utils/validation.d.ts +0 -90
  391. package/dist/types/utils/validation.d.ts.map +0 -1
  392. package/dist/utils/credentialStatus.d.ts +0 -8
  393. package/dist/utils/credentialStatus.d.ts.map +0 -1
  394. package/dist/utils/deviceFingerprint.d.ts.map +0 -1
  395. package/dist/utils/environment.d.ts +0 -22
  396. package/dist/utils/environment.d.ts.map +0 -1
  397. package/dist/utils/formatting.d.ts.map +0 -1
  398. package/dist/utils/index.d.ts +0 -4
  399. package/dist/utils/index.d.ts.map +0 -1
  400. package/dist/utils/linkFormat.d.ts +0 -17
  401. package/dist/utils/linkFormat.d.ts.map +0 -1
  402. package/dist/utils/linkPopup.d.ts +0 -19
  403. package/dist/utils/linkPopup.d.ts.map +0 -1
  404. package/dist/utils/selectCard.d.ts +0 -18
  405. package/dist/utils/selectCard.d.ts.map +0 -1
  406. package/dist/utils/text.d.ts +0 -12
  407. package/dist/utils/text.d.ts.map +0 -1
  408. package/dist/utils/validation.d.ts.map +0 -1
@@ -1,29 +0,0 @@
1
- import type { CheckoutState, CardData, BillingAddress, SavedCard, PaymentView } from '../types';
2
- interface UseCheckoutFlowProps {
3
- mode: 'standard' | 'agent';
4
- amount: number;
5
- savedCards?: SavedCard[];
6
- onSuccess?: (result: any) => void;
7
- onError?: (error: any) => void;
8
- }
9
- export declare function useCheckoutFlow({ mode, amount, savedCards, onSuccess, onError }: UseCheckoutFlowProps): {
10
- state: CheckoutState;
11
- selectedCardId: string | null;
12
- paymentView: PaymentView;
13
- cvc: string;
14
- setCvc: import("react").Dispatch<import("react").SetStateAction<string>>;
15
- submitPhone: (phone: string) => Promise<void>;
16
- verifyOTP: (otp: string) => Promise<void>;
17
- submitPayment: (email: string, cardData: CardData, billingAddress: BillingAddress | null) => Promise<void>;
18
- selectCard: (cardId: string) => void;
19
- addCard: (cardData: CardData) => Promise<void>;
20
- logout: () => void;
21
- setError: (error: string | null) => void;
22
- showMethodList: () => void;
23
- showAddCard: () => void;
24
- returnToCheckout: () => void;
25
- skipToPayment: () => void;
26
- completeAgentRegistration: () => void;
27
- };
28
- export {};
29
- //# sourceMappingURL=useCheckoutFlow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCheckoutFlow.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCheckoutFlow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGhG,UAAU,oBAAoB;IAC5B,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CAChC;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,oBAAoB;;;;;;yBAkCtD,MAAM;qBAmBV,MAAM;2BAmCvC,MAAM,YACH,QAAQ,kBACF,cAAc,GAAG,IAAI;yBAuCC,MAAM;wBAOD,QAAQ;;sBA/GhB,MAAM,GAAG,IAAI;;;;;;EAuOnD"}
@@ -1,4 +0,0 @@
1
- export declare function useDrawerState(open: boolean, onClose: () => void): {
2
- isMobile: boolean;
3
- };
4
- //# sourceMappingURL=useDrawerState.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDrawerState.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDrawerState.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI;;EA6ChE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLinkAuth.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLinkAuth.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAkB,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExE,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,iEAAiE;IACjE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,iBAAiB;IACzB,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,iBAAiB,CA8BpE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLinkDeviceAuthPoll.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLinkDeviceAuthPoll.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAgB,gBAAgB,EAAkB,MAAM,wBAAwB,CAAC;AAExF,UAAU,yBAAyB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,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}
@@ -1,81 +0,0 @@
1
- /**
2
- * useLinkSession — orchestrates the Stripe Link flow for PaymentSheet.
3
- *
4
- * Owns Link-specific state (auth status, current spend request, device-auth
5
- * context, error reasons) and exposes actions the views can call without
6
- * touching apiService or popup management directly. Wraps the focused
7
- * Link workflow hooks (useLinkAuth, useLinkMethods, useLinkDeviceAuthPoll,
8
- * useLinkSpendStatusPoll).
9
- *
10
- * Lives outside useSession on purpose: useSession is already large and
11
- * Link is a self-contained alternative payment rail. PaymentSheet composes
12
- * the two.
13
- */
14
- import { LinkAuthStatus, LinkSpendCreateBody, LinkSpendResponse } from '../services/apiService';
15
- import type { SavedCard } from '../types/session';
16
- export type LinkPhase = 'idle' | 'connect' | 'loading' | 'checkout' | 'denied' | 'success' | 'manage';
17
- export interface DeviceAuthContext {
18
- passphrase: string;
19
- verificationUrl: string;
20
- verificationUrlComplete: string;
21
- expiresAt: number;
22
- }
23
- export interface UseLinkSessionArgs {
24
- baseUrl: string;
25
- token: string;
26
- walletUserId: string | null;
27
- organizationId?: string;
28
- /** Idle by default; PaymentSheet flips this when entering a Link phase. */
29
- enabled?: boolean;
30
- /** When true, spend requests run as test transactions (no money moves). */
31
- testMode?: boolean;
32
- /**
33
- * Merchant-supplied description shown to the user in Stripe's spend
34
- * approval popup. Stripe requires min 100 characters. If shorter or
35
- * omitted, backend generates a default.
36
- */
37
- spendContext?: string;
38
- /**
39
- * Called after Stripe Link approves the spend. Caller is expected to
40
- * trigger credential generation (e.g., session.complete()). Hook then
41
- * waits for spend status='consumed' before transitioning to 'success'.
42
- */
43
- onSpendApproved?: (spend: LinkSpendResponse | null) => Promise<void> | void;
44
- }
45
- export interface UseLinkSessionReturn {
46
- phase: LinkPhase;
47
- authStatus: LinkAuthStatus | null;
48
- authLoading: boolean;
49
- authError: Error | null;
50
- linkCards: SavedCard[];
51
- payosCards: SavedCard[];
52
- allCards: SavedCard[];
53
- linkSyncStatus: string | null;
54
- methodsLoading: boolean;
55
- methodsError: Error | null;
56
- selectedLinkMethodId: string | null;
57
- setSelectedLinkMethodId: (id: string | null) => void;
58
- /** Inline error from a failed spend/create call (rate limit, validation, etc.). */
59
- spendError: string | null;
60
- clearSpendError: () => void;
61
- currentSpend: LinkSpendResponse | null;
62
- deviceAuthContext: DeviceAuthContext | null;
63
- deniedReason: string | null;
64
- startLinkConnect: () => Promise<void>;
65
- cancelLinkConnect: () => void;
66
- approveLinkSpend: (body: LinkSpendCreateBody) => Promise<void>;
67
- reopenLinkSpendApproval: () => void;
68
- cancelLinkSpend: () => void;
69
- retryApprovedSpend: () => Promise<void>;
70
- retryDenied: () => Promise<void>;
71
- signOutLink: () => Promise<void>;
72
- goToManage: () => void;
73
- goToCheckout: () => void;
74
- exitManage: () => void;
75
- exitSuccess: () => void;
76
- reset: () => void;
77
- refreshAuth: () => Promise<void>;
78
- refreshMethods: () => Promise<void>;
79
- }
80
- export declare function useLinkSession(args: UseLinkSessionArgs): UseLinkSessionReturn;
81
- //# sourceMappingURL=useLinkSession.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLinkSession.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLinkSession.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH,OAAO,EAIL,cAAc,EAEd,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAKhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,SAAS,GACT,SAAS,GACT,UAAU,GACV,QAAQ,GACR,SAAS,GACT,QAAQ,CAAC;AAEb,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM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AAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,uBAAuB,EAAE,MAAM,IAAI,CAAC;IACpC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,kBAAkB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,IAAI,CAAC;IAGlB,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACrC;AAQD,wBAAgB,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,oBAAoB,CA6U7E"}
@@ -1,28 +0,0 @@
1
- /**
2
- * useLinkSpendStatusPoll — poll /spend/:id/poll until approved or terminal.
3
- *
4
- * Drives the LinkCheckoutView's "approval popup is open" → "approved" UX.
5
- * Same shape as useLinkDeviceAuthPoll but the terminal-set is different
6
- * because Link spend state machines have one extra (`consumed`).
7
- */
8
- import { LinkSpendPollResponse } from '../services/apiService';
9
- interface UseLinkSpendStatusPollArgs {
10
- baseUrl: string;
11
- token: string;
12
- walletUserId: string | null;
13
- spendRowId: string | null;
14
- /** Start polling when true; stops on false (e.g. user closes the popup). */
15
- enabled: boolean;
16
- intervalMs?: number;
17
- onApproved?: () => void;
18
- onDenied?: (error?: string) => void;
19
- onExpired?: (error?: string) => void;
20
- onFailed?: (error?: string) => void;
21
- /** Approved → consumed when the credential is generated. Usually the
22
- * parent stops polling on `approved` and lets credential generation run. */
23
- onConsumed?: () => void;
24
- onTick?: (resp: LinkSpendPollResponse) => void;
25
- }
26
- export declare function useLinkSpendStatusPoll(args: UseLinkSpendStatusPollArgs): void;
27
- export {};
28
- //# sourceMappingURL=useLinkSpendStatusPoll.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLinkSpendStatusPoll.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLinkSpendStatusPoll.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAEL,qBAAqB,EAEtB,MAAM,wBAAwB,CAAC;AAEhC,UAAU,0BAA0B;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,4EAA4E;IAC5E,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC;iFAC6E;IAC7E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAChD;AAWD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,0BAA0B,GAAG,IAAI,CA2E7E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePasskeySDK.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePasskeySDK.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,aAAa,EACb,eAAe,EAChB,MAAM,6BAA6B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AC;IACtE,wFAAwF;IACxF,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;IACvD,oEAAoE;IACpE,wBAAwB,EAAE,CAAC,mBAAmB,EAAE,GAAG,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;IAC/E,+EAA+E;IAC/E,4BAA4B,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,qBAAqB,EAAE,GAAG,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;IAE3G,6BAA6B;IAC7B,YAAY,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;IAEtF,0BAA0B;IAC1B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,yCAAyC;IACzC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,4BAA4B;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAYD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CAgWhF"}
@@ -1,87 +0,0 @@
1
- import { CheckoutSession, VerificationResult, CompletionResult, SavedCard, PaymentSheetError } from '../types/session';
2
- import { PaymentView } from '../types/payment';
3
- export type SessionPhase = 'LOADING' | 'ERROR' | 'IDENTITY' | 'OTP_VERIFY' | 'PAYMENT' | 'AGENT_REGISTRATION' | 'PROCESSING' | 'SUCCESS' | 'EXPIRED';
4
- /**
5
- * Sub-phases for passkey registration flow (within AGENT_REGISTRATION)
6
- * - 'initial': Show AgentRegistrationView with "Create Passkey" button
7
- * - 'visa_method_select': Show VisaMethodView to select OTP method
8
- * - 'visa_otp_entry': Show VisaOtpView to enter OTP code
9
- * - 'visa_iframe': Show VisaIframeView with SDK iframe after OTP validates
10
- * - 'visa_vic_auth': Authenticate with existing passkey to complete VIC enrollment
11
- */
12
- export type RegistrationSubPhase = 'initial' | 'visa_method_select' | 'visa_otp_entry' | 'visa_iframe' | 'visa_vic_auth';
13
- export type { PaymentView } from '../types/payment';
14
- export interface UseSessionReturn {
15
- session: CheckoutSession | null;
16
- setSession: React.Dispatch<React.SetStateAction<CheckoutSession | null>>;
17
- phase: SessionPhase;
18
- loading: boolean;
19
- error: PaymentSheetError | null;
20
- completionResult: CompletionResult | null;
21
- isAgentMode: boolean;
22
- isSetupMode: boolean;
23
- hasSelectedCard: boolean;
24
- hasSavedCards: boolean;
25
- paymentView: PaymentView;
26
- cvc: string;
27
- setCvc: (cvc: string) => void;
28
- showMethodList: () => void;
29
- showAddCard: () => void;
30
- returnToCheckout: () => void;
31
- submitIdentity: (contact: {
32
- email?: string;
33
- phone?: string;
34
- countryCode?: string;
35
- }) => Promise<boolean>;
36
- goBackToIdentity: () => void;
37
- submitOTP: (code: string) => Promise<VerificationResult>;
38
- resendCode: () => Promise<boolean>;
39
- selectPaymentCard: (cardId: string) => Promise<boolean>;
40
- addPaymentCard: (tokenizedCard: {
41
- cardId: string;
42
- last4: string;
43
- brand: string;
44
- network: string;
45
- expiryMonth?: string;
46
- expiryYear?: string;
47
- expMonth?: number;
48
- expYear?: number;
49
- cardholderName?: string;
50
- cardArtUrl?: string;
51
- }) => Promise<{
52
- success: boolean;
53
- card?: SavedCard;
54
- }>;
55
- deletePaymentCard: (cardId: string) => Promise<boolean>;
56
- clearCard: () => Promise<void>;
57
- registrationSubPhase: RegistrationSubPhase;
58
- setRegistrationSubPhase: (subPhase: RegistrationSubPhase) => void;
59
- skipRegistration: () => void;
60
- completeAgentRegistration: () => void;
61
- setPhase: (phase: SessionPhase) => void;
62
- setPaymentView: (view: PaymentView) => void;
63
- setDefaultCard: (cardId: string) => Promise<boolean>;
64
- completeSetup: () => Promise<CompletionResult>;
65
- complete: (options?: {
66
- passkeyAuthenticated?: boolean;
67
- }) => Promise<CompletionResult>;
68
- abandon: () => Promise<void>;
69
- clearError: () => void;
70
- refresh: () => Promise<void>;
71
- }
72
- export interface UseSessionOptions {
73
- /** API base URL for credential generation and other API calls */
74
- apiBaseUrl: string;
75
- /** Exit immediately after card is added (no card list). Only applies to setup/onboard sessions. */
76
- exitOnCardAdd?: boolean;
77
- /** Skip automatic credential generation after passkey auth. Merchant calls Generate/Retrieve later. */
78
- skipCredentialGeneration?: boolean;
79
- /** Pre-select a specific card by ID. Must be one of the wallet user's saved cards. */
80
- cardId?: string;
81
- /** Auto-trigger passkey on entry when the user already has a default card. */
82
- skipToAuth?: boolean;
83
- /** Start checkout sessions on the method list so optional payment rails are visible. */
84
- preferMethodList?: boolean;
85
- }
86
- export declare function useSession(sessionSecret: string, options: UseSessionOptions): UseSessionReturn;
87
- //# sourceMappingURL=useSession.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSession.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSession.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EAOlB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAwB/C,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,OAAO,GACP,UAAU,GACV,YAAY,GACZ,SAAS,GACT,oBAAoB,GACpB,YAAY,GACZ,SAAS,GACT,SAAS,CAAC;AAEd;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,oBAAoB,GAAG,gBAAgB,GAAG,aAAa,GAAG,eAAe,CAAC;AAGzH,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,WAAW,gBAAgB;IAE/B,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC,CAAC;IAC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sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wFAAwF;IACxF,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,UAAU,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,CA6kC9F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useVisualViewport.d.ts","sourceRoot":"","sources":["../../../src/hooks/useVisualViewport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA+B/B,wBAAgB,iBAAiB,IAAI,MAAM,CAoD1C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,IAAI,KAAK,CAAC,aAAa,CAS5D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B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AG1F,YAAY,EACV,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,SAAS,IAAI,gBAAgB,EAC7B,WAAW,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC"}
@@ -1,53 +0,0 @@
1
- /**
2
- * PayOS Elements Theming System
3
- *
4
- * Provides CSS variable-based theming with support for:
5
- * - Primary color customization
6
- * - Font family
7
- * - Border radius
8
- * - Dark mode
9
- */
10
- export interface PayOSTheme {
11
- /**
12
- * Primary brand color (hex format)
13
- * @default "#0f172a" (slate-900)
14
- */
15
- colorPrimary?: string;
16
- /**
17
- * Font family stack
18
- * @default "system-ui, -apple-system, sans-serif"
19
- */
20
- fontFamily?: string;
21
- /**
22
- * Border radius for components
23
- * @default "0.75rem" (12px)
24
- */
25
- borderRadius?: string;
26
- }
27
- declare const DEFAULT_THEME: Required<PayOSTheme>;
28
- /**
29
- * Applies theme CSS variables to a target element
30
- */
31
- export declare function applyTheme(element: HTMLElement, theme?: PayOSTheme): void;
32
- /**
33
- * Removes theme CSS variables from a target element
34
- */
35
- export declare function clearTheme(element: HTMLElement): void;
36
- /**
37
- * Hook to apply theme to a ref element
38
- * @example
39
- * ```tsx
40
- * const ref = useTheme({ colorPrimary: '#4f46e5' });
41
- * return <div ref={ref}>...</div>
42
- * ```
43
- */
44
- export declare function useTheme(theme?: PayOSTheme): React.RefObject<HTMLDivElement>;
45
- export { DEFAULT_THEME };
46
- export declare function isValidHexColor(color: string): boolean;
47
- export declare function hexToRgb(hex: string): {
48
- r: number;
49
- g: number;
50
- b: number;
51
- } | null;
52
- import * as React from 'react';
53
- //# sourceMappingURL=theme.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/lib/theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,QAAA,MAAM,aAAa,EAAE,QAAQ,CAAC,UAAU,CAIvC,CAAC;AAEF;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,GAAE,UAAe,GAAG,IAAI,CAM7E;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAIrD;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,GAAE,UAAe,mCAgB9C;AAGD,OAAO,EAAE,aAAa,EAAE,CAAC;AAGzB,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEtD;AAGD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAOhF;AAGD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC"}
@@ -1,3 +0,0 @@
1
- import { type ClassValue } from "clsx";
2
- export declare function cn(...inputs: ClassValue[]): string;
3
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
@@ -1,3 +0,0 @@
1
- export * from './mockData';
2
- export * from './mockCheckoutFlow';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC"}
@@ -1,25 +0,0 @@
1
- import type { CardData, PaymentResult } from '../types';
2
- /**
3
- * Mock: Send OTP to phone number
4
- */
5
- export declare const mockSendOTP: (phone: string) => Promise<void>;
6
- /**
7
- * Mock: Verify OTP code
8
- * Test OTP: "123456" or any 6-digit code
9
- */
10
- export declare const mockVerifyOTP: (otp: string) => Promise<boolean>;
11
- /**
12
- * Mock: Process payment
13
- */
14
- export declare const mockProcessPayment: (data: {
15
- phoneNumber: string;
16
- email: string;
17
- cardData: CardData;
18
- amount: number;
19
- mode: "standard" | "agent";
20
- }) => Promise<PaymentResult>;
21
- /**
22
- * Mock: Resend OTP
23
- */
24
- export declare const mockResendOTP: (phone: string) => Promise<void>;
25
- //# sourceMappingURL=mockCheckoutFlow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mockCheckoutFlow.d.ts","sourceRoot":"","sources":["../../../src/mocks/mockCheckoutFlow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIxD;;GAEG;AACH,eAAO,MAAM,WAAW,GAAU,OAAO,MAAM,KAAG,OAAO,CAAC,IAAI,CAI7D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAU,KAAK,MAAM,KAAG,OAAO,CAAC,OAAO,CAShE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAU,MAAM;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC;CAC5B,KAAG,OAAO,CAAC,aAAa,CAiBxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAU,OAAO,MAAM,KAAG,OAAO,CAAC,IAAI,CAI/D,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { OrderItem, OrderData } from '../types';
2
- export declare const SAMPLE_PRODUCT: OrderItem;
3
- export declare const SAMPLE_ORDER: OrderData;
4
- export declare const SAMPLE_ORDER_WITH_SHIPMENTS: OrderData;
5
- export declare const GRADIENT_OPTIONS: string[];
6
- //# sourceMappingURL=mockData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mockData.d.ts","sourceRoot":"","sources":["../../../src/mocks/mockData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErD,eAAO,MAAM,cAAc,EAAE,SAO5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,SAO1B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,SAczC,CAAC;AAGF,eAAO,MAAM,gBAAgB,UAO5B,CAAC"}
@@ -1,38 +0,0 @@
1
- import { CheckoutSession, MultiPaymentIntent, WalletUser, SavedCard, SessionStatus, PaymentIntentType } from '../types/session';
2
- export declare const MOCK_CARDS: SavedCard[];
3
- export declare const MOCK_WALLET_USER: WalletUser;
4
- export declare const MOCK_ONLINE_PAYMENT_INTENT: MultiPaymentIntent;
5
- export declare const MOCK_AGENT_PAYMENT_INTENT: MultiPaymentIntent;
6
- export declare const MOCK_MULTI_PAYMENT_INTENT: MultiPaymentIntent;
7
- export declare const MOCK_SMALL_PAYMENT_INTENT: MultiPaymentIntent;
8
- export declare const MOCK_SESSION_NEW_USER: CheckoutSession;
9
- export declare const MOCK_SESSION_RETURNING_USER: CheckoutSession;
10
- export declare const MOCK_SESSION_AGENT_MODE: CheckoutSession;
11
- export declare const MOCK_SESSION_AGENT_RETURNING: CheckoutSession;
12
- export declare const MOCK_SESSION_MULTI_PAYMENT: CheckoutSession;
13
- export declare const MOCK_SESSION_MULTI_RETURNING: CheckoutSession;
14
- export declare const MOCK_SESSION_OTP_PENDING: CheckoutSession;
15
- export declare const MOCK_SESSION_PAYMENT_PENDING: CheckoutSession;
16
- export interface CreateMockSessionOptions {
17
- type?: PaymentIntentType;
18
- status?: SessionStatus;
19
- hasWalletUser?: boolean;
20
- hasSavedCards?: boolean;
21
- deviceVerified?: boolean;
22
- amount?: number;
23
- subtotal?: number;
24
- tax?: number;
25
- shipping?: number;
26
- merchantName?: string;
27
- payments?: Array<{
28
- merchantName: string;
29
- amount: number;
30
- subtotal: number;
31
- tax?: number;
32
- shipping?: number;
33
- description?: string;
34
- }>;
35
- }
36
- export declare function createMockSession(options?: CreateMockSessionOptions): CheckoutSession;
37
- export declare const PRESET_SESSIONS: Record<string, CheckoutSession>;
38
- //# sourceMappingURL=mockSessionData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mockSessionData.d.ts","sourceRoot":"","sources":["../../../src/mocks/mockSessionData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,kBAAkB,EAElB,UAAU,EACV,SAAS,EACT,aAAa,EACb,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAK1B,eAAO,MAAM,UAAU,EAAE,SAAS,EAqCjC,CAAC;AAKF,eAAO,MAAM,gBAAgB,EAAE,UAO9B,CAAC;AAsFF,eAAO,MAAM,0BAA0B,EAAE,kBAcvC,CAAC;AAGH,eAAO,MAAM,yBAAyB,EAAE,kBAmBtC,CAAC;AAGH,eAAO,MAAM,yBAAyB,EAAE,kBAsCtC,CAAC;AAGH,eAAO,MAAM,yBAAyB,EAAE,kBAatC,CAAC;AAOH,eAAO,MAAM,qBAAqB,EAAE,eAWnC,CAAC;AAGF,eAAO,MAAM,2BAA2B,EAAE,eAYzC,CAAC;AAGF,eAAO,MAAM,uBAAuB,EAAE,eAWrC,CAAC;AAGF,eAAO,MAAM,4BAA4B,EAAE,eAY1C,C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C,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -1,55 +0,0 @@
1
- export type CheckoutPhase = 'PHONE_INPUT' | 'OTP_VERIFY' | 'PAYMENT' | 'PAYMENT_CONFIRMATION' | 'AGENT_REGISTRATION' | 'PROCESSING' | 'SUCCESS';
2
- /**
3
- * PaymentView - Sub-view state within PAYMENT phase
4
- *
5
- * Used for iOS-style push navigation between payment-related screens.
6
- * This implements the Card Stack Architecture pattern.
7
- *
8
- * Flow: checkout (root) <-> methods (list) <-> add (form) -> checkout
9
- */
10
- export type PaymentView = 'checkout' | 'methods' | 'add' | 'link-connect' | 'link-loading' | 'link-checkout' | 'link-denied' | 'link-success' | 'manage-third-party';
11
- export interface CheckoutState {
12
- phase: CheckoutPhase;
13
- phoneNumber: string;
14
- email: string;
15
- cardData: CardData | null;
16
- billingAddress: BillingAddress | null;
17
- error: string | null;
18
- isLoading: boolean;
19
- }
20
- export interface CardData {
21
- number: string;
22
- expiry: string;
23
- cvc: string;
24
- cardholderName: string;
25
- brand?: CardBrand;
26
- last4?: string;
27
- cardArtUrl?: string;
28
- cardId?: string;
29
- expMonth?: number;
30
- expYear?: number;
31
- }
32
- export type CardBrand = 'visa' | 'mastercard' | 'amex' | 'discover' | 'unknown';
33
- export interface BillingAddress {
34
- line1: string;
35
- line2?: string;
36
- city: string;
37
- state: string;
38
- zip: string;
39
- country?: string;
40
- }
41
- export interface SavedCard {
42
- id: string;
43
- last4: string;
44
- brand: CardBrand;
45
- expiryMonth: string;
46
- expiryYear: string;
47
- cardholderName?: string;
48
- isDefault: boolean;
49
- network?: CardBrand;
50
- provider?: 'payos_card' | 'stripe_link';
51
- passkeyEnrolled?: boolean;
52
- cardArtUrl?: string;
53
- issuerName?: string;
54
- }
55
- //# sourceMappingURL=payment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../src/types/payment.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACrB,aAAa,GACb,YAAY,GACZ,SAAS,GACT,sBAAsB,GACtB,oBAAoB,GACpB,YAAY,GACZ,SAAS,CAAC;AAEd;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GACnB,UAAU,GACV,SAAS,GACT,KAAK,GACL,cAAc,GACd,cAAc,GACd,eAAe,GACf,aAAa,GACb,cAAc,GACd,oBAAoB,CAAC;AAEzB,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,aAAa,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IAC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