@payos-inc/payos-react 1.0.42-staging.83 → 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,406 +0,0 @@
1
- /**
2
- * PayOS Elements API Service
3
- *
4
- * Centralized API service for all backend calls.
5
- * All requests are authenticated via link token (Bearer token).
6
- * Adapted from apps/payos-link/src/api/index.ts
7
- */
8
- import { SavedCard } from '../types/session';
9
- export interface ApiResponse<T> {
10
- error: boolean;
11
- message?: string;
12
- data?: T;
13
- environment?: string;
14
- }
15
- export interface OTPStatus {
16
- status: 'pending' | 'approved' | 'expired' | 'canceled';
17
- phone: string;
18
- createdAt: string;
19
- expiresAt: string;
20
- verifiedAt?: string;
21
- channel: string;
22
- }
23
- export interface WalletUserResult {
24
- walletUserId: string;
25
- isNewUser: boolean;
26
- isNewRelationship: boolean;
27
- hasExistingCards: boolean;
28
- savedCards: SavedCard[];
29
- linkedCardIds?: string[];
30
- }
31
- export declare class ApiError extends Error {
32
- status: number;
33
- details?: string;
34
- constructor(message: string, status: number, details?: string);
35
- }
36
- /**
37
- * Send OTP verification code to a phone number
38
- * @param baseUrl API base URL
39
- * @param token Link token for authentication
40
- * @param phone Phone number in E.164 format
41
- * @param countryCode Optional ISO country code (e.g., 'US', 'GB')
42
- * @returns Reference ID for the verification
43
- */
44
- export declare function sendOTP(baseUrl: string, token: string, phone: string, countryCode?: string): Promise<string>;
45
- /**
46
- * Verify OTP code
47
- * @param baseUrl API base URL
48
- * @param token Link token for authentication
49
- * @param reference Verification reference from sendOTP
50
- * @param code 6-digit OTP code
51
- * @returns Verified phone number and reference
52
- */
53
- export declare function verifyOTP(baseUrl: string, token: string, reference: string, code: string): Promise<{
54
- phone: string;
55
- reference: string;
56
- }>;
57
- /**
58
- * Get OTP verification status
59
- * @param baseUrl API base URL
60
- * @param token Link token for authentication
61
- * @param reference Verification reference
62
- * @returns Verification status details
63
- */
64
- export declare function getOTPStatus(baseUrl: string, token: string, reference: string): Promise<OTPStatus>;
65
- /**
66
- * Resend OTP verification code
67
- * Checks existing status first to enforce rate limiting (30 second minimum)
68
- * @param baseUrl API base URL
69
- * @param token Link token for authentication
70
- * @param previousReference Previous verification reference
71
- * @param phone Phone number
72
- * @returns New reference or existing reference with wait time
73
- */
74
- export declare function resendOTP(baseUrl: string, token: string, previousReference: string, phone: string, countryCode?: string): Promise<{
75
- reference: string;
76
- waitTimeRemaining?: number;
77
- }>;
78
- /**
79
- * Process a verified wallet user after OTP verification
80
- * Creates wallet user if doesn't exist, returns walletUserId and saved cards
81
- * @param baseUrl API base URL
82
- * @param token Link token for authentication
83
- * @param phone Verified phone number
84
- * @param verificationId OTP verification reference
85
- * @param countryCode Optional ISO country code (e.g., 'US', 'GB')
86
- * @returns Wallet user details including walletUserId and saved cards
87
- */
88
- export declare function processVerifiedWalletUser(baseUrl: string, token: string, phone: string, verificationId: string, countryCode?: string): Promise<WalletUserResult>;
89
- /**
90
- * Get saved cards for a wallet user
91
- * @param baseUrl API base URL
92
- * @param token Link token for authentication
93
- * @param walletUserId Wallet user ID
94
- * @returns Array of saved cards
95
- */
96
- export declare function getWalletUserCards(baseUrl: string, token: string, walletUserId: string): Promise<SavedCard[]>;
97
- /**
98
- * Variant of getWalletUserCards that opts into Stripe Link methods sync.
99
- * Returns the cards plus linkSyncStatus for the caller to surface
100
- * "Link is in a degraded state" UX without parsing /web/link/auth/status.
101
- */
102
- export declare function getWalletUserCardsWithLink(baseUrl: string, token: string, walletUserId: string): Promise<{
103
- cards: SavedCard[];
104
- linkSyncStatus: string | null;
105
- }>;
106
- export interface LinkAuthStatus {
107
- authenticated: boolean;
108
- expiresAt: string | null;
109
- authState?: string;
110
- }
111
- export type LinkInitiateResponse = {
112
- alreadyAuthenticated: true;
113
- } | {
114
- alreadyAuthenticated?: false;
115
- verificationUrl: string;
116
- verificationUrlComplete: string;
117
- userCode: string;
118
- passphrase: string;
119
- expiresIn: number;
120
- interval: number;
121
- };
122
- export type LinkPollStatus = 'pending' | 'approved' | 'denied' | 'expired' | 'error' | 'revoked';
123
- export interface LinkPollResponse {
124
- status: LinkPollStatus;
125
- error?: string;
126
- }
127
- export interface LinkSpendCreateBody {
128
- paymentIntentId: string;
129
- paymentId: string;
130
- cardId: string;
131
- amount: number;
132
- currency?: string;
133
- credentialType: 'card' | 'shared_payment_token';
134
- networkId?: string;
135
- merchantName?: string;
136
- merchantUrl?: string;
137
- context?: string;
138
- test?: boolean;
139
- }
140
- export interface LinkSpendResponse {
141
- id: string;
142
- stripeSpendRequestId: string | null;
143
- status: 'pending_approval' | 'approved' | 'denied' | 'expired' | 'failed' | 'consumed';
144
- approvalUrl?: string | null;
145
- credentialType: 'card' | 'shared_payment_token';
146
- /** ISO timestamp when Stripe will auto-expire the approval. */
147
- expiresAt?: string | null;
148
- createdAt: string;
149
- }
150
- export type LinkSpendPollStatus = 'pending' | 'approved' | 'consumed' | 'denied' | 'expired' | 'failed';
151
- export interface LinkSpendPollResponse {
152
- status: LinkSpendPollStatus;
153
- error?: string;
154
- }
155
- export declare function linkAuthStatus(baseUrl: string, token: string, walletUserId: string): Promise<LinkAuthStatus>;
156
- export declare function linkInitiateAuth(baseUrl: string, token: string, walletUserId: string, options?: {
157
- organizationId?: string;
158
- }): Promise<LinkInitiateResponse>;
159
- export declare function linkPollAuth(baseUrl: string, token: string, walletUserId: string): Promise<LinkPollResponse>;
160
- export declare function linkLogout(baseUrl: string, token: string, walletUserId: string): Promise<{
161
- revoked: boolean;
162
- }>;
163
- /**
164
- * Create a Link spend approval request. Generates an Idempotency-Key
165
- * automatically per call — caller can pass a fixed one to retry safely.
166
- */
167
- export declare function linkCreateSpendRequest(baseUrl: string, token: string, walletUserId: string, body: LinkSpendCreateBody, options?: {
168
- idempotencyKey?: string;
169
- }): Promise<LinkSpendResponse>;
170
- export declare function linkPollSpendStatus(baseUrl: string, token: string, walletUserId: string, spendRowId: string): Promise<LinkSpendPollResponse>;
171
- export interface LinkPendingSpend {
172
- id: string;
173
- stripeSpendRequestId: string | null;
174
- status: 'pending_approval' | 'approved';
175
- amount: number;
176
- currency: string;
177
- credentialType: 'card' | 'shared_payment_token';
178
- merchantName: string | null;
179
- approvalUrl: string | null;
180
- expiresAt: string | null;
181
- createdAt: string;
182
- }
183
- export declare function linkListPendingSpends(baseUrl: string, token: string, walletUserId: string): Promise<LinkPendingSpend[]>;
184
- export declare function linkGetSpendRequest(baseUrl: string, token: string, walletUserId: string, spendRowId: string, options?: {
185
- include?: 'card' | 'shared_payment_token';
186
- }): Promise<LinkSpendResponse & {
187
- stripe?: unknown;
188
- }>;
189
- export interface CreatePaymentIntentRequest {
190
- walletUserId?: string;
191
- externalUserId?: string;
192
- currency?: string;
193
- type?: 'pay_on_behalf' | 'agentic_multi' | 'online_checkout';
194
- consumerPrompt?: string;
195
- payments: Array<{
196
- merchantName: string;
197
- merchantUrl?: string;
198
- merchantCategory?: string;
199
- merchantCategoryCode?: string;
200
- amount: number;
201
- description?: string;
202
- quantity?: number;
203
- }>;
204
- credentialType?: 'network_token_short' | 'network_token_long' | 'virtual_card' | 'bank_account' | 'pci_vault_token';
205
- }
206
- export interface PaymentIntentResponse {
207
- id: string;
208
- type: string;
209
- currency: string;
210
- walletUserId?: string;
211
- organizationId: string;
212
- status: string;
213
- payments: Array<{
214
- id: string;
215
- merchantName: string;
216
- merchantUrl?: string;
217
- merchantCategory?: string;
218
- merchantCategoryCode?: string;
219
- amount: number;
220
- subtotal?: number;
221
- tax?: number;
222
- shipping?: number;
223
- description?: string;
224
- quantity: number;
225
- selectedCardId?: string;
226
- credentialId?: string;
227
- credentialStatus: string;
228
- status: string;
229
- createdAt: string;
230
- updatedAt: string;
231
- }>;
232
- totalAmount: number;
233
- totalSubtotal?: number;
234
- totalTax?: number;
235
- totalShipping?: number;
236
- consumerPrompt?: string;
237
- intentType: string;
238
- selectedCardId?: string;
239
- requireHitl: boolean;
240
- hitlAttemptCount?: number;
241
- hitlApproved?: boolean;
242
- networkAuthRequired?: boolean;
243
- networkAuthCompleted?: boolean;
244
- authValid?: boolean;
245
- credentialType: string;
246
- createdAt: string;
247
- updatedAt: string;
248
- }
249
- /**
250
- * Create a new payment intent via the API
251
- * @param baseUrl API base URL
252
- * @param token Link token for authentication
253
- * @param request Payment intent configuration
254
- * @returns Created payment intent
255
- */
256
- export declare function createPaymentIntent(baseUrl: string, token: string, request: CreatePaymentIntentRequest): Promise<PaymentIntentResponse>;
257
- /**
258
- * Get payment intent by ID
259
- * @param baseUrl API base URL
260
- * @param token Link token for authentication
261
- * @param paymentIntentId Payment intent ID
262
- * @returns Payment intent details
263
- */
264
- export declare function getPaymentIntent(baseUrl: string, token: string, paymentIntentId: string): Promise<PaymentIntentResponse>;
265
- /**
266
- * Update payment intent (e.g., assign selectedCardId)
267
- * @param baseUrl API base URL
268
- * @param token Link token for authentication
269
- * @param paymentIntentId Payment intent ID
270
- * @param updates Fields to update
271
- * @returns Updated payment intent
272
- */
273
- export declare function updatePaymentIntent(baseUrl: string, token: string, paymentIntentId: string, updates: {
274
- selectedCardId?: string;
275
- }): Promise<PaymentIntentResponse>;
276
- export interface SessionResponse {
277
- id: string;
278
- type: string;
279
- status: string;
280
- organizationId: string;
281
- paymentIntentId: string;
282
- locale: string;
283
- metadata: Record<string, any>;
284
- expiresAt: string;
285
- startedAt?: string;
286
- completedAt?: string;
287
- abandonedAt?: string;
288
- createdAt: string;
289
- updatedAt: string;
290
- }
291
- export interface GetCurrentSessionResponse {
292
- session: SessionResponse;
293
- paymentIntent: PaymentIntentResponse | null;
294
- sessionType?: string;
295
- validCardBrandAcceptance?: string[] | null;
296
- /** True when the wallet user's identity was pre-verified via token (skip OTP) */
297
- identityPreVerified?: boolean;
298
- /** Wallet user ID embedded in token metadata (pre-verified wallet consumer flow) */
299
- walletUserId?: string;
300
- }
301
- /**
302
- * Get current session for SDK initialization
303
- * Uses the sessionSecret (JWT) to authenticate and get session + payment intent
304
- * @param baseUrl API base URL
305
- * @param sessionSecret Session secret (JWT token) from POST /api/sessions/checkout
306
- * @returns Session with payment intent data
307
- */
308
- export declare function getCurrentSession(baseUrl: string, sessionSecret: string): Promise<GetCurrentSessionResponse>;
309
- /**
310
- * Mark session as started (when PaymentSheet opens)
311
- * @param baseUrl API base URL
312
- * @param sessionSecret Session secret (JWT token)
313
- * @returns Updated session
314
- */
315
- export declare function startSession(baseUrl: string, sessionSecret: string): Promise<SessionResponse>;
316
- /**
317
- * Complete session
318
- * @param baseUrl API base URL
319
- * @param sessionSecret Session secret (JWT token)
320
- * @returns Completed session
321
- */
322
- export declare function completeCheckoutSession(baseUrl: string, sessionSecret: string): Promise<SessionResponse>;
323
- /**
324
- * Abandon session (user closed PaymentSheet)
325
- * @param baseUrl API base URL
326
- * @param sessionSecret Session secret (JWT token)
327
- * @returns Abandoned session
328
- */
329
- export declare function abandonCheckoutSession(baseUrl: string, sessionSecret: string): Promise<SessionResponse>;
330
- /**
331
- * Update the session's linked payment intent (e.g., select card)
332
- * Uses the session context to determine which payment intent to update
333
- * @param baseUrl API base URL
334
- * @param sessionSecret Session secret (JWT token)
335
- * @param updates Fields to update on payment intent (e.g., selectedCardId)
336
- * @returns Updated payment intent
337
- */
338
- export declare function updateSessionPaymentIntent(baseUrl: string, sessionSecret: string, updates: {
339
- selectedCardId?: string;
340
- walletUserId?: string;
341
- }): Promise<PaymentIntentResponse>;
342
- export interface GenerateCredentialResponse {
343
- status: string;
344
- message?: string;
345
- retrievalToken?: string;
346
- approvalId?: string;
347
- }
348
- /**
349
- * Generate payment credentials for a payment intent
350
- * Called after successful passkey authentication in agent mode
351
- * @param apiBaseUrl API base URL (from environment config)
352
- * @param linkToken Link token (session secret) for authentication
353
- * @param paymentIntentId Payment intent ID to generate credentials for
354
- * @returns Credential generation result with status
355
- */
356
- export declare function generateCredential(apiBaseUrl: string, linkToken: string, paymentIntentId: string): Promise<GenerateCredentialResponse>;
357
- /**
358
- * Set a card as the default for a wallet user
359
- * @param baseUrl API base URL
360
- * @param token Link token for authentication
361
- * @param walletUserId Wallet user ID
362
- * @param cardId Card ID to set as default
363
- * @returns Updated card data
364
- */
365
- export declare function setDefaultCard(baseUrl: string, token: string, walletUserId: string, cardId: string): Promise<SavedCard>;
366
- /**
367
- * Delete a saved card from wallet user
368
- * Uses soft delete (marks card as inactive, doesn't permanently delete)
369
- * @param baseUrl API base URL
370
- * @param token Link token for authentication
371
- * @param walletUserId Wallet user ID who owns the card
372
- * @param cardId Card ID to delete
373
- * @returns Success status
374
- */
375
- export declare function deleteCard(baseUrl: string, token: string, walletUserId: string, cardId: string): Promise<{
376
- success: boolean;
377
- }>;
378
- export interface DeviceTrustResult {
379
- /** Whether this device is trusted for the wallet user */
380
- isTrusted: boolean;
381
- /** When the trust expires (if trusted) */
382
- expiresAt?: string;
383
- /** Wallet user ID if device was previously verified */
384
- walletUserId?: string;
385
- }
386
- /**
387
- * Check if a device is trusted for a wallet user (90-day verification)
388
- * @param baseUrl API base URL
389
- * @param token Link token for authentication
390
- * @param deviceId Device fingerprint
391
- * @param walletUserId Wallet user ID (from PaymentIntent)
392
- * @returns Device trust status
393
- */
394
- export declare function checkDeviceTrust(baseUrl: string, token: string, deviceId: string, walletUserId?: string): Promise<DeviceTrustResult>;
395
- /**
396
- * Register a device as trusted after successful OTP verification
397
- * @param baseUrl API base URL
398
- * @param token Link token for authentication
399
- * @param deviceId Device fingerprint
400
- * @param walletUserId Wallet user ID
401
- * @returns Success status
402
- */
403
- export declare function registerTrustedDevice(baseUrl: string, token: string, deviceId: string, walletUserId: string): Promise<{
404
- success: boolean;
405
- }>;
406
- //# sourceMappingURL=apiService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apiService.d.ts","sourceRoot":"","sources":["../../../src/services/apiService.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAiB7C,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,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AC9B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAgB/B;AAMD,MAAM,WAAW,iBAAiB;IAChC,yDAAyD;IACzD,SAAS,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,iBAAiB,CAAC,CAsB5B;AAED;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAgB/B"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Default URL for the CardElement iframe (PayOS Link UI).
3
- * This is where the secure card capture form is hosted.
4
- * Can be overridden via the `cardElementUrl` prop on PaymentSheet.
5
- */
6
- export declare const DEFAULT_CARD_ELEMENT_URL = "https://wallet-onboard.payos.ai";
7
- //# sourceMappingURL=linkTokenService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"linkTokenService.d.ts","sourceRoot":"","sources":["../../../src/services/linkTokenService.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,oCAAoC,CAAC"}
@@ -1,65 +0,0 @@
1
- import { CheckoutSession, MultiPaymentIntent, VerificationInitResult, VerificationResult, CompletionResult, SavedCard } from '../types/session';
2
- import { CreateMockSessionOptions } from '../mocks/mockSessionData';
3
- export declare function loadSession(sessionId: string): Promise<CheckoutSession>;
4
- export declare function updateSession(sessionId: string, updates: Partial<CheckoutSession>): Promise<CheckoutSession>;
5
- export declare function initiateVerification(sessionId: string, contact: {
6
- email?: string;
7
- phone?: string;
8
- }): Promise<VerificationInitResult>;
9
- export declare function confirmVerification(sessionId: string, code: string): Promise<VerificationResult>;
10
- export declare function resendOTP(sessionId: string): Promise<VerificationInitResult>;
11
- /**
12
- * Mock API: Update payment intent with selected card
13
- * Simulates: PATCH /payment-intents/{paymentIntentId}
14
- * Body: { selectedCardId: string }
15
- */
16
- export declare function updatePaymentIntentCard(paymentIntentId: string, cardId: string): Promise<{
17
- success: boolean;
18
- paymentIntent: MultiPaymentIntent;
19
- }>;
20
- export declare function selectCard(sessionId: string, cardId: string): Promise<CheckoutSession>;
21
- export declare function addCard(sessionId: string, tokenizedCard: {
22
- cardId: string;
23
- last4: string;
24
- brand: string;
25
- network: string;
26
- expiryMonth?: string;
27
- expiryYear?: string;
28
- cardholderName?: string;
29
- cardArtUrl?: string;
30
- }): Promise<{
31
- session: CheckoutSession;
32
- card: SavedCard;
33
- }>;
34
- export declare function clearSelectedCard(sessionId: string): Promise<CheckoutSession>;
35
- export declare function completeSession(sessionId: string, options?: {
36
- passkeyAuthenticated?: boolean;
37
- }): Promise<CompletionResult>;
38
- export declare function abandonSession(sessionId: string): Promise<CheckoutSession>;
39
- export declare function createTestSession(options?: CreateMockSessionOptions): string;
40
- export declare function resetSession(sessionId: string): void;
41
- export declare function resetAllSessions(): void;
42
- export declare function getSessionState(sessionId: string): CheckoutSession | undefined;
43
- export declare function listAllSessions(): string[];
44
- export interface WalletUserCardsResponse {
45
- walletUserId: string;
46
- cards: SavedCard[];
47
- defaultCardId?: string;
48
- }
49
- /**
50
- * Mock implementation of GET /wallet-users/{wallet_user_id}/cards
51
- * Returns all saved cards for a wallet user with card art URLs
52
- */
53
- export declare function getWalletUserCards(walletUserId: string): Promise<WalletUserCardsResponse>;
54
- /**
55
- * @deprecated This function has been removed.
56
- *
57
- * To create a checkout session with a real payment intent:
58
- * 1. Your backend calls POST /api/auth/payos-link/tokens/link to get a clientSecret
59
- * 2. Your backend creates a payment intent via the PayOS API
60
- * 3. Pass the clientSecret to <PaymentSheet clientSecret={...} />
61
- *
62
- * The SDK should never create payment intents directly - that's the backend's job.
63
- */
64
- export declare function createTestSessionWithRealIntent(): Promise<string>;
65
- //# sourceMappingURL=mockSessionService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mockSessionService.d.ts","sourceRoot":"","sources":["../../../src/services/mockSessionService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EAEV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAKL,wBAAwB,EACzB,MAAM,0BAA0B,CAAC;AAsClC,wBAAsB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAiB7E;AAED,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,GAChC,OAAO,CAAC,eAAe,CAAC,CAiB1B;AAMD,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAC1C,OAAO,CAAC,sBAAsB,CAAC,CA0CjC;AAED,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,kBAAkB,CAAC,CAgF7B;AAED,wBAAsB,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC,CA2DlF;AAMD;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,GACb,OA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AS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IAEnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,gBAAgB,GAAG,aAAa,GAAG,eAAe,GAAG,SAAS,CAAC;IACrE,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -1,157 +0,0 @@
1
- /**
2
- * CardElement Types
3
- *
4
- * Types for the PayOS CardElement iframe integration.
5
- * These mirror the types from @payos-inc/payos-js for local use.
6
- */
7
- /**
8
- * Card element styling configuration
9
- */
10
- export interface CardElementStyles {
11
- layout?: {
12
- padding?: string;
13
- maxWidth?: string;
14
- backgroundColor?: string;
15
- gap?: string;
16
- direction?: 'row' | 'column';
17
- labelPlacement?: 'above' | 'inline' | 'floating';
18
- showLabels?: boolean;
19
- showErrorMessages?: boolean;
20
- showLoadingState?: boolean;
21
- preset?: 'single-row' | 'two-row' | 'compact' | 'stacked' | 'block';
22
- };
23
- container?: {
24
- borderRadius?: string;
25
- boxShadow?: string;
26
- border?: string;
27
- padding?: string;
28
- margin?: string;
29
- };
30
- base?: Record<string, unknown>;
31
- cardNumber?: Record<string, unknown>;
32
- expiry?: Record<string, unknown>;
33
- cvc?: Record<string, unknown>;
34
- theme?: 'default' | 'minimal' | 'dark' | 'material';
35
- }
36
- export interface CardElementBinWarningRule {
37
- /** BIN/IIN value to match against secure field BIN metadata. */
38
- bin: string;
39
- /** Optional message returned with the warning. A default message is used when omitted. */
40
- message?: string;
41
- }
42
- export interface CardElementBinWarningEvent {
43
- event: 'binWarning';
44
- /** The configured BIN/IIN value that matched. */
45
- bin: string;
46
- /** Message to show to the user or route through a custom UI. */
47
- message: string;
48
- }
49
- export interface CardElementOptions {
50
- token: string;
51
- environment?: 'sandbox' | 'production';
52
- styles?: CardElementStyles;
53
- height?: string;
54
- customBaseUrl?: string;
55
- customParams?: Record<string, string>;
56
- binsWarning?: CardElementBinWarningRule[];
57
- onReady?: () => void;
58
- onTokenized?: (event: CardElementTokenizedEvent) => void;
59
- onChange?: (event: CardElementChangeEvent) => void;
60
- onBinWarning?: (event: CardElementBinWarningEvent | null) => void;
61
- onCancel?: () => void;
62
- onError?: (error: Error) => void;
63
- }
64
- export interface CardElementTokenizedEvent {
65
- event: 'cardTokenized';
66
- card?: {
67
- id?: string;
68
- brand?: string;
69
- last4?: string;
70
- expMonth?: number;
71
- expYear?: number;
72
- cardholderName?: string;
73
- isDefault?: boolean;
74
- artwork?: string;
75
- bankName?: string;
76
- cardType?: string;
77
- [key: string]: unknown;
78
- };
79
- billingAddress?: {
80
- street?: string;
81
- street2?: string;
82
- city?: string;
83
- state?: string;
84
- postalCode?: string;
85
- country?: string;
86
- [key: string]: unknown;
87
- };
88
- cardholderName?: string;
89
- visaEnrollment?: Record<string, unknown> | null;
90
- mastercardEnrollment?: Record<string, unknown> | null;
91
- walletUserId?: string;
92
- organizationId?: string;
93
- [key: string]: unknown;
94
- }
95
- export interface CardElementChangeEvent {
96
- event: 'change';
97
- complete: boolean;
98
- empty: boolean;
99
- error?: string;
100
- binWarning?: CardElementBinWarningEvent | null;
101
- }
102
- export interface CardElementAddress {
103
- line1?: string;
104
- line2?: string;
105
- city?: string;
106
- state?: string;
107
- postalCode?: string;
108
- country?: string;
109
- }
110
- export interface CardElementConfiguration {
111
- walletUserId?: string;
112
- cardholderName?: string;
113
- billingAddress?: CardElementAddress;
114
- binsWarning?: CardElementBinWarningRule[];
115
- /** Shipping address - CardElement can use for "Same as shipping" feature */
116
- shippingAddress?: CardElementAddress;
117
- /** Whether to use shipping as billing (for "Same as shipping" toggle) */
118
- useShippingAsBilling?: boolean;
119
- }
120
- export interface CardElementInstance {
121
- mount: () => void;
122
- unmount: () => void;
123
- destroy: () => void;
124
- configure: (config: CardElementConfiguration) => void;
125
- submit: () => void;
126
- updateStyles?: (styles: CardElementStyles) => void;
127
- }
128
- /**
129
- * CardElementClient - Creates and manages a secure card capture iframe
130
- *
131
- * This is a local implementation that mirrors the @payos-inc/payos-js CardElementClient
132
- * to avoid build dependency issues in the monorepo.
133
- */
134
- export declare class CardElementClient {
135
- private container;
136
- private iframe;
137
- private options;
138
- private messageListener;
139
- private iframeOrigin;
140
- private pendingStyles;
141
- private pendingConfiguration;
142
- constructor(container: string | HTMLElement, options: CardElementOptions);
143
- mount(): void;
144
- unmount(): void;
145
- destroy(): void;
146
- configure(config: CardElementConfiguration): void;
147
- submit(): void;
148
- updateStyles(styles: CardElementStyles): void;
149
- private sendStyles;
150
- private handleMessage;
151
- private isAllowedOrigin;
152
- private buildIframeUrl;
153
- private getBaseUrl;
154
- private getAllowedOrigins;
155
- private validateOptions;
156
- }
157
- //# sourceMappingURL=cardElement.d.ts.map