@spare-technologies/spare-link 0.1.0-beta.1 → 1.0.1

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 (568) hide show
  1. package/README.md +119 -63
  2. package/lib/commonjs/core/models/payment-return-params.js +245 -20
  3. package/lib/commonjs/core/models/payment-return-params.js.map +1 -1
  4. package/lib/commonjs/core/models/pending-session-record.js +2 -0
  5. package/lib/commonjs/core/models/pending-session-record.js.map +1 -0
  6. package/lib/commonjs/core/services/hosted-flow-controller.js +333 -0
  7. package/lib/commonjs/core/services/hosted-flow-controller.js.map +1 -0
  8. package/lib/commonjs/core/services/hosted-flow-state.js +96 -0
  9. package/lib/commonjs/core/services/hosted-flow-state.js.map +1 -0
  10. package/lib/commonjs/index.js +42 -164
  11. package/lib/commonjs/index.js.map +1 -1
  12. package/lib/commonjs/internal/bank-redirect.js +20 -9
  13. package/lib/commonjs/internal/bank-redirect.js.map +1 -1
  14. package/lib/commonjs/internal/hosted/bridge-message.js +107 -0
  15. package/lib/commonjs/internal/hosted/bridge-message.js.map +1 -0
  16. package/lib/commonjs/internal/hosted/hosted-url.js +41 -0
  17. package/lib/commonjs/internal/hosted/hosted-url.js.map +1 -0
  18. package/lib/commonjs/internal/index.js +0 -7
  19. package/lib/commonjs/internal/index.js.map +1 -1
  20. package/lib/commonjs/internal/redact-uri.js +59 -15
  21. package/lib/commonjs/internal/redact-uri.js.map +1 -1
  22. package/lib/commonjs/internal/secure-store-pending-session-store.js +20 -25
  23. package/lib/commonjs/internal/secure-store-pending-session-store.js.map +1 -1
  24. package/lib/commonjs/internal/url-parts.js +145 -0
  25. package/lib/commonjs/internal/url-parts.js.map +1 -0
  26. package/lib/commonjs/public/index.js +0 -37
  27. package/lib/commonjs/public/index.js.map +1 -1
  28. package/lib/commonjs/public/payment-result.js +16 -4
  29. package/lib/commonjs/public/payment-result.js.map +1 -1
  30. package/lib/commonjs/public/recovery-result.js +7 -18
  31. package/lib/commonjs/public/recovery-result.js.map +1 -1
  32. package/lib/commonjs/public/spare-link-config.js +41 -16
  33. package/lib/commonjs/public/spare-link-config.js.map +1 -1
  34. package/lib/commonjs/public/spare-link-event.js +27 -33
  35. package/lib/commonjs/public/spare-link-event.js.map +1 -1
  36. package/lib/commonjs/public/spare-link-instance.js +67 -77
  37. package/lib/commonjs/public/spare-link-instance.js.map +1 -1
  38. package/lib/commonjs/public/spare-link-session.js +2 -9
  39. package/lib/commonjs/public/spare-link-session.js.map +1 -1
  40. package/lib/commonjs/public/spare-link.js +0 -12
  41. package/lib/commonjs/public/spare-link.js.map +1 -1
  42. package/lib/commonjs/ui/hooks/{use-payment-flow-state.js → use-hosted-flow-state.js} +4 -4
  43. package/lib/commonjs/ui/hooks/use-hosted-flow-state.js.map +1 -0
  44. package/lib/commonjs/ui/hosted/hosted-payment-page.js +177 -0
  45. package/lib/commonjs/ui/hosted/hosted-payment-page.js.map +1 -0
  46. package/lib/commonjs/ui/hosted/hosted-payment-webview.js +168 -0
  47. package/lib/commonjs/ui/hosted/hosted-payment-webview.js.map +1 -0
  48. package/lib/commonjs/ui/screens/index.js +3 -17
  49. package/lib/commonjs/ui/screens/index.js.map +1 -1
  50. package/lib/commonjs/ui/screens/page-unavailable-screen.js +101 -0
  51. package/lib/commonjs/ui/screens/page-unavailable-screen.js.map +1 -0
  52. package/lib/commonjs/ui/spare-link-host.js +220 -234
  53. package/lib/commonjs/ui/spare-link-host.js.map +1 -1
  54. package/lib/commonjs/ui/widgets/index.js +3 -10
  55. package/lib/commonjs/ui/widgets/index.js.map +1 -1
  56. package/lib/commonjs/version.js +1 -1
  57. package/lib/commonjs/version.js.map +1 -1
  58. package/lib/module/core/models/payment-return-params.js +235 -20
  59. package/lib/module/core/models/payment-return-params.js.map +1 -1
  60. package/lib/module/core/models/pending-session-record.js +2 -0
  61. package/lib/module/core/models/pending-session-record.js.map +1 -0
  62. package/lib/module/core/services/hosted-flow-controller.js +328 -0
  63. package/lib/module/core/services/hosted-flow-controller.js.map +1 -0
  64. package/lib/module/core/services/hosted-flow-state.js +91 -0
  65. package/lib/module/core/services/hosted-flow-state.js.map +1 -0
  66. package/lib/module/index.js +8 -22
  67. package/lib/module/index.js.map +1 -1
  68. package/lib/module/internal/bank-redirect.js +20 -9
  69. package/lib/module/internal/bank-redirect.js.map +1 -1
  70. package/lib/module/internal/hosted/bridge-message.js +104 -0
  71. package/lib/module/internal/hosted/bridge-message.js.map +1 -0
  72. package/lib/module/internal/hosted/hosted-url.js +36 -0
  73. package/lib/module/internal/hosted/hosted-url.js.map +1 -0
  74. package/lib/module/internal/index.js +0 -1
  75. package/lib/module/internal/index.js.map +1 -1
  76. package/lib/module/internal/redact-uri.js +59 -15
  77. package/lib/module/internal/redact-uri.js.map +1 -1
  78. package/lib/module/internal/secure-store-pending-session-store.js +20 -25
  79. package/lib/module/internal/secure-store-pending-session-store.js.map +1 -1
  80. package/lib/module/internal/url-parts.js +139 -0
  81. package/lib/module/internal/url-parts.js.map +1 -0
  82. package/lib/module/public/index.js +2 -3
  83. package/lib/module/public/index.js.map +1 -1
  84. package/lib/module/public/payment-result.js +16 -4
  85. package/lib/module/public/payment-result.js.map +1 -1
  86. package/lib/module/public/recovery-result.js +7 -17
  87. package/lib/module/public/recovery-result.js.map +1 -1
  88. package/lib/module/public/spare-link-config.js +42 -15
  89. package/lib/module/public/spare-link-config.js.map +1 -1
  90. package/lib/module/public/spare-link-event.js +27 -33
  91. package/lib/module/public/spare-link-event.js.map +1 -1
  92. package/lib/module/public/spare-link-instance.js +68 -72
  93. package/lib/module/public/spare-link-instance.js.map +1 -1
  94. package/lib/module/public/spare-link-session.js +2 -9
  95. package/lib/module/public/spare-link-session.js.map +1 -1
  96. package/lib/module/public/spare-link.js +1 -1
  97. package/lib/module/public/spare-link.js.map +1 -1
  98. package/lib/module/ui/hooks/{use-payment-flow-state.js → use-hosted-flow-state.js} +3 -3
  99. package/lib/module/ui/hooks/use-hosted-flow-state.js.map +1 -0
  100. package/lib/module/ui/hosted/hosted-payment-page.js +175 -0
  101. package/lib/module/ui/hosted/hosted-payment-page.js.map +1 -0
  102. package/lib/module/ui/hosted/hosted-payment-webview.js +163 -0
  103. package/lib/module/ui/hosted/hosted-payment-webview.js.map +1 -0
  104. package/lib/module/ui/screens/index.js +1 -3
  105. package/lib/module/ui/screens/index.js.map +1 -1
  106. package/lib/module/ui/screens/page-unavailable-screen.js +97 -0
  107. package/lib/module/ui/screens/page-unavailable-screen.js.map +1 -0
  108. package/lib/module/ui/spare-link-host.js +221 -236
  109. package/lib/module/ui/spare-link-host.js.map +1 -1
  110. package/lib/module/ui/widgets/index.js +1 -2
  111. package/lib/module/ui/widgets/index.js.map +1 -1
  112. package/lib/module/version.js +1 -1
  113. package/lib/module/version.js.map +1 -1
  114. package/lib/typescript/commonjs/core/models/index.d.ts +1 -123
  115. package/lib/typescript/commonjs/core/models/index.d.ts.map +1 -1
  116. package/lib/typescript/commonjs/core/models/payment-return-params.d.ts +91 -8
  117. package/lib/typescript/commonjs/core/models/payment-return-params.d.ts.map +1 -1
  118. package/lib/typescript/commonjs/core/models/pending-session-record.d.ts +11 -0
  119. package/lib/typescript/commonjs/core/models/pending-session-record.d.ts.map +1 -0
  120. package/lib/typescript/commonjs/core/services/hosted-flow-controller.d.ts +119 -0
  121. package/lib/typescript/commonjs/core/services/hosted-flow-controller.d.ts.map +1 -0
  122. package/lib/typescript/commonjs/core/services/hosted-flow-state.d.ts +75 -0
  123. package/lib/typescript/commonjs/core/services/hosted-flow-state.d.ts.map +1 -0
  124. package/lib/typescript/commonjs/index.d.ts +5 -14
  125. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/internal/bank-redirect.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/internal/hosted/bridge-message.d.ts +44 -0
  128. package/lib/typescript/commonjs/internal/hosted/bridge-message.d.ts.map +1 -0
  129. package/lib/typescript/commonjs/internal/hosted/hosted-url.d.ts +30 -0
  130. package/lib/typescript/commonjs/internal/hosted/hosted-url.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/internal/index.d.ts +0 -1
  132. package/lib/typescript/commonjs/internal/index.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/internal/redact-uri.d.ts +21 -1
  134. package/lib/typescript/commonjs/internal/redact-uri.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/internal/secure-store-pending-session-store.d.ts +3 -2
  136. package/lib/typescript/commonjs/internal/secure-store-pending-session-store.d.ts.map +1 -1
  137. package/lib/typescript/commonjs/internal/url-parts.d.ts +46 -0
  138. package/lib/typescript/commonjs/internal/url-parts.d.ts.map +1 -0
  139. package/lib/typescript/commonjs/public/index.d.ts +4 -6
  140. package/lib/typescript/commonjs/public/index.d.ts.map +1 -1
  141. package/lib/typescript/commonjs/public/payment-result.d.ts +50 -12
  142. package/lib/typescript/commonjs/public/payment-result.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/public/recovery-result.d.ts +11 -20
  144. package/lib/typescript/commonjs/public/recovery-result.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/public/spare-link-config.d.ts +13 -31
  146. package/lib/typescript/commonjs/public/spare-link-config.d.ts.map +1 -1
  147. package/lib/typescript/commonjs/public/spare-link-event.d.ts +29 -31
  148. package/lib/typescript/commonjs/public/spare-link-event.d.ts.map +1 -1
  149. package/lib/typescript/commonjs/public/spare-link-host-api.d.ts +1 -12
  150. package/lib/typescript/commonjs/public/spare-link-host-api.d.ts.map +1 -1
  151. package/lib/typescript/commonjs/public/spare-link-instance.d.ts +26 -20
  152. package/lib/typescript/commonjs/public/spare-link-instance.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/public/spare-link-session.d.ts +3 -8
  154. package/lib/typescript/commonjs/public/spare-link-session.d.ts.map +1 -1
  155. package/lib/typescript/commonjs/public/spare-link.d.ts +1 -1
  156. package/lib/typescript/commonjs/public/spare-link.d.ts.map +1 -1
  157. package/lib/typescript/commonjs/ui/hooks/use-hosted-flow-state.d.ts +9 -0
  158. package/lib/typescript/commonjs/ui/hooks/use-hosted-flow-state.d.ts.map +1 -0
  159. package/lib/typescript/commonjs/ui/hosted/hosted-payment-page.d.ts +17 -0
  160. package/lib/typescript/commonjs/ui/hosted/hosted-payment-page.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/ui/hosted/hosted-payment-webview.d.ts +43 -0
  162. package/lib/typescript/commonjs/ui/hosted/hosted-payment-webview.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/ui/screens/index.d.ts +1 -3
  164. package/lib/typescript/commonjs/ui/screens/index.d.ts.map +1 -1
  165. package/lib/typescript/commonjs/ui/screens/page-unavailable-screen.d.ts +18 -0
  166. package/lib/typescript/commonjs/ui/screens/page-unavailable-screen.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/ui/spare-link-host.d.ts +4 -5
  168. package/lib/typescript/commonjs/ui/spare-link-host.d.ts.map +1 -1
  169. package/lib/typescript/commonjs/ui/widgets/index.d.ts +1 -2
  170. package/lib/typescript/commonjs/ui/widgets/index.d.ts.map +1 -1
  171. package/lib/typescript/commonjs/version.d.ts +1 -1
  172. package/lib/typescript/commonjs/version.d.ts.map +1 -1
  173. package/lib/typescript/module/core/models/index.d.ts +1 -123
  174. package/lib/typescript/module/core/models/index.d.ts.map +1 -1
  175. package/lib/typescript/module/core/models/payment-return-params.d.ts +91 -8
  176. package/lib/typescript/module/core/models/payment-return-params.d.ts.map +1 -1
  177. package/lib/typescript/module/core/models/pending-session-record.d.ts +11 -0
  178. package/lib/typescript/module/core/models/pending-session-record.d.ts.map +1 -0
  179. package/lib/typescript/module/core/services/hosted-flow-controller.d.ts +119 -0
  180. package/lib/typescript/module/core/services/hosted-flow-controller.d.ts.map +1 -0
  181. package/lib/typescript/module/core/services/hosted-flow-state.d.ts +75 -0
  182. package/lib/typescript/module/core/services/hosted-flow-state.d.ts.map +1 -0
  183. package/lib/typescript/module/index.d.ts +5 -14
  184. package/lib/typescript/module/index.d.ts.map +1 -1
  185. package/lib/typescript/module/internal/bank-redirect.d.ts.map +1 -1
  186. package/lib/typescript/module/internal/hosted/bridge-message.d.ts +44 -0
  187. package/lib/typescript/module/internal/hosted/bridge-message.d.ts.map +1 -0
  188. package/lib/typescript/module/internal/hosted/hosted-url.d.ts +30 -0
  189. package/lib/typescript/module/internal/hosted/hosted-url.d.ts.map +1 -0
  190. package/lib/typescript/module/internal/index.d.ts +0 -1
  191. package/lib/typescript/module/internal/index.d.ts.map +1 -1
  192. package/lib/typescript/module/internal/redact-uri.d.ts +21 -1
  193. package/lib/typescript/module/internal/redact-uri.d.ts.map +1 -1
  194. package/lib/typescript/module/internal/secure-store-pending-session-store.d.ts +3 -2
  195. package/lib/typescript/module/internal/secure-store-pending-session-store.d.ts.map +1 -1
  196. package/lib/typescript/module/internal/url-parts.d.ts +46 -0
  197. package/lib/typescript/module/internal/url-parts.d.ts.map +1 -0
  198. package/lib/typescript/module/public/index.d.ts +4 -6
  199. package/lib/typescript/module/public/index.d.ts.map +1 -1
  200. package/lib/typescript/module/public/payment-result.d.ts +50 -12
  201. package/lib/typescript/module/public/payment-result.d.ts.map +1 -1
  202. package/lib/typescript/module/public/recovery-result.d.ts +11 -20
  203. package/lib/typescript/module/public/recovery-result.d.ts.map +1 -1
  204. package/lib/typescript/module/public/spare-link-config.d.ts +13 -31
  205. package/lib/typescript/module/public/spare-link-config.d.ts.map +1 -1
  206. package/lib/typescript/module/public/spare-link-event.d.ts +29 -31
  207. package/lib/typescript/module/public/spare-link-event.d.ts.map +1 -1
  208. package/lib/typescript/module/public/spare-link-host-api.d.ts +1 -12
  209. package/lib/typescript/module/public/spare-link-host-api.d.ts.map +1 -1
  210. package/lib/typescript/module/public/spare-link-instance.d.ts +26 -20
  211. package/lib/typescript/module/public/spare-link-instance.d.ts.map +1 -1
  212. package/lib/typescript/module/public/spare-link-session.d.ts +3 -8
  213. package/lib/typescript/module/public/spare-link-session.d.ts.map +1 -1
  214. package/lib/typescript/module/public/spare-link.d.ts +1 -1
  215. package/lib/typescript/module/public/spare-link.d.ts.map +1 -1
  216. package/lib/typescript/module/ui/hooks/use-hosted-flow-state.d.ts +9 -0
  217. package/lib/typescript/module/ui/hooks/use-hosted-flow-state.d.ts.map +1 -0
  218. package/lib/typescript/module/ui/hosted/hosted-payment-page.d.ts +17 -0
  219. package/lib/typescript/module/ui/hosted/hosted-payment-page.d.ts.map +1 -0
  220. package/lib/typescript/module/ui/hosted/hosted-payment-webview.d.ts +43 -0
  221. package/lib/typescript/module/ui/hosted/hosted-payment-webview.d.ts.map +1 -0
  222. package/lib/typescript/module/ui/screens/index.d.ts +1 -3
  223. package/lib/typescript/module/ui/screens/index.d.ts.map +1 -1
  224. package/lib/typescript/module/ui/screens/page-unavailable-screen.d.ts +18 -0
  225. package/lib/typescript/module/ui/screens/page-unavailable-screen.d.ts.map +1 -0
  226. package/lib/typescript/module/ui/spare-link-host.d.ts +4 -5
  227. package/lib/typescript/module/ui/spare-link-host.d.ts.map +1 -1
  228. package/lib/typescript/module/ui/widgets/index.d.ts +1 -2
  229. package/lib/typescript/module/ui/widgets/index.d.ts.map +1 -1
  230. package/lib/typescript/module/version.d.ts +1 -1
  231. package/lib/typescript/module/version.d.ts.map +1 -1
  232. package/package.json +24 -22
  233. package/plugins/with-spare-link.js +6 -26
  234. package/src/core/models/index.ts +1 -139
  235. package/src/core/models/payment-return-params.ts +269 -21
  236. package/src/core/models/pending-session-record.ts +10 -0
  237. package/src/core/services/hosted-flow-controller.ts +374 -0
  238. package/src/core/services/hosted-flow-state.ts +123 -0
  239. package/src/index.ts +20 -89
  240. package/src/internal/bank-redirect.ts +23 -9
  241. package/src/internal/hosted/bridge-message.ts +106 -0
  242. package/src/internal/hosted/hosted-url.ts +33 -0
  243. package/src/internal/index.ts +0 -1
  244. package/src/internal/redact-uri.ts +69 -15
  245. package/src/internal/secure-store-pending-session-store.ts +28 -49
  246. package/src/internal/url-parts.ts +134 -0
  247. package/src/public/index.ts +2 -24
  248. package/src/public/payment-result.ts +50 -12
  249. package/src/public/recovery-result.ts +16 -25
  250. package/src/public/spare-link-config.ts +56 -43
  251. package/src/public/spare-link-event.ts +33 -42
  252. package/src/public/spare-link-host-api.ts +1 -14
  253. package/src/public/spare-link-instance.ts +57 -65
  254. package/src/public/spare-link-session.ts +4 -16
  255. package/src/public/spare-link.ts +1 -1
  256. package/src/ui/hooks/use-hosted-flow-state.ts +16 -0
  257. package/src/ui/hosted/hosted-payment-page.tsx +178 -0
  258. package/src/ui/hosted/hosted-payment-webview.tsx +164 -0
  259. package/src/ui/screens/index.ts +4 -6
  260. package/src/ui/screens/page-unavailable-screen.tsx +94 -0
  261. package/src/ui/spare-link-host.tsx +227 -247
  262. package/src/ui/widgets/index.ts +1 -2
  263. package/src/version.ts +1 -1
  264. package/CHANGELOG.md +0 -25
  265. package/lib/commonjs/core/client/link-api-client.js +0 -297
  266. package/lib/commonjs/core/client/link-api-client.js.map +0 -1
  267. package/lib/commonjs/core/errors/payment-api-error.js +0 -35
  268. package/lib/commonjs/core/errors/payment-api-error.js.map +0 -1
  269. package/lib/commonjs/core/models/link-session-status.js +0 -14
  270. package/lib/commonjs/core/models/link-session-status.js.map +0 -1
  271. package/lib/commonjs/core/models/payment-type.js +0 -45
  272. package/lib/commonjs/core/models/payment-type.js.map +0 -1
  273. package/lib/commonjs/core/models/wire-mappers.js +0 -277
  274. package/lib/commonjs/core/models/wire-mappers.js.map +0 -1
  275. package/lib/commonjs/core/services/consent-presenter.js +0 -150
  276. package/lib/commonjs/core/services/consent-presenter.js.map +0 -1
  277. package/lib/commonjs/core/services/execute-resume-if-needed.js +0 -216
  278. package/lib/commonjs/core/services/execute-resume-if-needed.js.map +0 -1
  279. package/lib/commonjs/core/services/multi-payment-rules-presenter.js +0 -151
  280. package/lib/commonjs/core/services/multi-payment-rules-presenter.js.map +0 -1
  281. package/lib/commonjs/core/services/payment-flow-controller.js +0 -547
  282. package/lib/commonjs/core/services/payment-flow-controller.js.map +0 -1
  283. package/lib/commonjs/core/services/payment-flow-state.js +0 -110
  284. package/lib/commonjs/core/services/payment-flow-state.js.map +0 -1
  285. package/lib/commonjs/core/services/payment-result-mapper.js +0 -49
  286. package/lib/commonjs/core/services/payment-result-mapper.js.map +0 -1
  287. package/lib/commonjs/core/services/presentation-utils.js +0 -11
  288. package/lib/commonjs/core/services/presentation-utils.js.map +0 -1
  289. package/lib/commonjs/core/services/redirect-buffer.js +0 -40
  290. package/lib/commonjs/core/services/redirect-buffer.js.map +0 -1
  291. package/lib/commonjs/core/services/user-friendly-messages.js +0 -46
  292. package/lib/commonjs/core/services/user-friendly-messages.js.map +0 -1
  293. package/lib/commonjs/internal/telemetry-collector.js +0 -80
  294. package/lib/commonjs/internal/telemetry-collector.js.map +0 -1
  295. package/lib/commonjs/public/constants.js +0 -21
  296. package/lib/commonjs/public/constants.js.map +0 -1
  297. package/lib/commonjs/public/spare-link-callbacks.js +0 -6
  298. package/lib/commonjs/public/spare-link-callbacks.js.map +0 -1
  299. package/lib/commonjs/ui/consent/charge-bearer-display.js +0 -99
  300. package/lib/commonjs/ui/consent/charge-bearer-display.js.map +0 -1
  301. package/lib/commonjs/ui/consent/consent-accordion.js +0 -94
  302. package/lib/commonjs/ui/consent/consent-accordion.js.map +0 -1
  303. package/lib/commonjs/ui/consent/consent-summary-section.js +0 -27
  304. package/lib/commonjs/ui/consent/consent-summary-section.js.map +0 -1
  305. package/lib/commonjs/ui/consent/cop-information.js +0 -168
  306. package/lib/commonjs/ui/consent/cop-information.js.map +0 -1
  307. package/lib/commonjs/ui/consent/international-payment-summary.js +0 -98
  308. package/lib/commonjs/ui/consent/international-payment-summary.js.map +0 -1
  309. package/lib/commonjs/ui/consent/label-value-rows.js +0 -59
  310. package/lib/commonjs/ui/consent/label-value-rows.js.map +0 -1
  311. package/lib/commonjs/ui/consent/multi-payment-rules-list.js +0 -130
  312. package/lib/commonjs/ui/consent/multi-payment-rules-list.js.map +0 -1
  313. package/lib/commonjs/ui/consent/multi-payment-summary.js +0 -99
  314. package/lib/commonjs/ui/consent/multi-payment-summary.js.map +0 -1
  315. package/lib/commonjs/ui/consent/single-payment-summary.js +0 -158
  316. package/lib/commonjs/ui/consent/single-payment-summary.js.map +0 -1
  317. package/lib/commonjs/ui/consent/terms-link.js +0 -35
  318. package/lib/commonjs/ui/consent/terms-link.js.map +0 -1
  319. package/lib/commonjs/ui/hooks/use-payment-flow-state.js.map +0 -1
  320. package/lib/commonjs/ui/payment-flow-page.js +0 -235
  321. package/lib/commonjs/ui/payment-flow-page.js.map +0 -1
  322. package/lib/commonjs/ui/screens/bank-selection-screen.js +0 -215
  323. package/lib/commonjs/ui/screens/bank-selection-screen.js.map +0 -1
  324. package/lib/commonjs/ui/screens/consent-details-screen.js +0 -124
  325. package/lib/commonjs/ui/screens/consent-details-screen.js.map +0 -1
  326. package/lib/commonjs/ui/screens/mandate-setup-success-screen.js +0 -79
  327. package/lib/commonjs/ui/screens/mandate-setup-success-screen.js.map +0 -1
  328. package/lib/commonjs/ui/widgets/layout-w-header.js +0 -106
  329. package/lib/commonjs/ui/widgets/layout-w-header.js.map +0 -1
  330. package/lib/commonjs/ui/widgets/stepper.js +0 -124
  331. package/lib/commonjs/ui/widgets/stepper.js.map +0 -1
  332. package/lib/module/core/client/link-api-client.js +0 -292
  333. package/lib/module/core/client/link-api-client.js.map +0 -1
  334. package/lib/module/core/errors/payment-api-error.js +0 -29
  335. package/lib/module/core/errors/payment-api-error.js.map +0 -1
  336. package/lib/module/core/models/link-session-status.js +0 -10
  337. package/lib/module/core/models/link-session-status.js.map +0 -1
  338. package/lib/module/core/models/payment-type.js +0 -36
  339. package/lib/module/core/models/payment-type.js.map +0 -1
  340. package/lib/module/core/models/wire-mappers.js +0 -263
  341. package/lib/module/core/models/wire-mappers.js.map +0 -1
  342. package/lib/module/core/services/consent-presenter.js +0 -140
  343. package/lib/module/core/services/consent-presenter.js.map +0 -1
  344. package/lib/module/core/services/execute-resume-if-needed.js +0 -211
  345. package/lib/module/core/services/execute-resume-if-needed.js.map +0 -1
  346. package/lib/module/core/services/multi-payment-rules-presenter.js +0 -146
  347. package/lib/module/core/services/multi-payment-rules-presenter.js.map +0 -1
  348. package/lib/module/core/services/payment-flow-controller.js +0 -544
  349. package/lib/module/core/services/payment-flow-controller.js.map +0 -1
  350. package/lib/module/core/services/payment-flow-state.js +0 -106
  351. package/lib/module/core/services/payment-flow-state.js.map +0 -1
  352. package/lib/module/core/services/payment-result-mapper.js +0 -45
  353. package/lib/module/core/services/payment-result-mapper.js.map +0 -1
  354. package/lib/module/core/services/presentation-utils.js +0 -7
  355. package/lib/module/core/services/presentation-utils.js.map +0 -1
  356. package/lib/module/core/services/redirect-buffer.js +0 -33
  357. package/lib/module/core/services/redirect-buffer.js.map +0 -1
  358. package/lib/module/core/services/user-friendly-messages.js +0 -42
  359. package/lib/module/core/services/user-friendly-messages.js.map +0 -1
  360. package/lib/module/internal/telemetry-collector.js +0 -75
  361. package/lib/module/internal/telemetry-collector.js.map +0 -1
  362. package/lib/module/public/constants.js +0 -17
  363. package/lib/module/public/constants.js.map +0 -1
  364. package/lib/module/public/spare-link-callbacks.js +0 -4
  365. package/lib/module/public/spare-link-callbacks.js.map +0 -1
  366. package/lib/module/ui/consent/charge-bearer-display.js +0 -95
  367. package/lib/module/ui/consent/charge-bearer-display.js.map +0 -1
  368. package/lib/module/ui/consent/consent-accordion.js +0 -90
  369. package/lib/module/ui/consent/consent-accordion.js.map +0 -1
  370. package/lib/module/ui/consent/consent-summary-section.js +0 -23
  371. package/lib/module/ui/consent/consent-summary-section.js.map +0 -1
  372. package/lib/module/ui/consent/cop-information.js +0 -165
  373. package/lib/module/ui/consent/cop-information.js.map +0 -1
  374. package/lib/module/ui/consent/international-payment-summary.js +0 -94
  375. package/lib/module/ui/consent/international-payment-summary.js.map +0 -1
  376. package/lib/module/ui/consent/label-value-rows.js +0 -55
  377. package/lib/module/ui/consent/label-value-rows.js.map +0 -1
  378. package/lib/module/ui/consent/multi-payment-rules-list.js +0 -125
  379. package/lib/module/ui/consent/multi-payment-rules-list.js.map +0 -1
  380. package/lib/module/ui/consent/multi-payment-summary.js +0 -95
  381. package/lib/module/ui/consent/multi-payment-summary.js.map +0 -1
  382. package/lib/module/ui/consent/single-payment-summary.js +0 -154
  383. package/lib/module/ui/consent/single-payment-summary.js.map +0 -1
  384. package/lib/module/ui/consent/terms-link.js +0 -31
  385. package/lib/module/ui/consent/terms-link.js.map +0 -1
  386. package/lib/module/ui/hooks/use-payment-flow-state.js.map +0 -1
  387. package/lib/module/ui/payment-flow-page.js +0 -232
  388. package/lib/module/ui/payment-flow-page.js.map +0 -1
  389. package/lib/module/ui/screens/bank-selection-screen.js +0 -211
  390. package/lib/module/ui/screens/bank-selection-screen.js.map +0 -1
  391. package/lib/module/ui/screens/consent-details-screen.js +0 -120
  392. package/lib/module/ui/screens/consent-details-screen.js.map +0 -1
  393. package/lib/module/ui/screens/mandate-setup-success-screen.js +0 -75
  394. package/lib/module/ui/screens/mandate-setup-success-screen.js.map +0 -1
  395. package/lib/module/ui/widgets/layout-w-header.js +0 -102
  396. package/lib/module/ui/widgets/layout-w-header.js.map +0 -1
  397. package/lib/module/ui/widgets/stepper.js +0 -120
  398. package/lib/module/ui/widgets/stepper.js.map +0 -1
  399. package/lib/typescript/commonjs/core/client/link-api-client.d.ts +0 -70
  400. package/lib/typescript/commonjs/core/client/link-api-client.d.ts.map +0 -1
  401. package/lib/typescript/commonjs/core/errors/payment-api-error.d.ts +0 -15
  402. package/lib/typescript/commonjs/core/errors/payment-api-error.d.ts.map +0 -1
  403. package/lib/typescript/commonjs/core/models/link-session-status.d.ts +0 -6
  404. package/lib/typescript/commonjs/core/models/link-session-status.d.ts.map +0 -1
  405. package/lib/typescript/commonjs/core/models/payment-type.d.ts +0 -18
  406. package/lib/typescript/commonjs/core/models/payment-type.d.ts.map +0 -1
  407. package/lib/typescript/commonjs/core/models/wire-mappers.d.ts +0 -19
  408. package/lib/typescript/commonjs/core/models/wire-mappers.d.ts.map +0 -1
  409. package/lib/typescript/commonjs/core/services/consent-presenter.d.ts +0 -67
  410. package/lib/typescript/commonjs/core/services/consent-presenter.d.ts.map +0 -1
  411. package/lib/typescript/commonjs/core/services/execute-resume-if-needed.d.ts +0 -32
  412. package/lib/typescript/commonjs/core/services/execute-resume-if-needed.d.ts.map +0 -1
  413. package/lib/typescript/commonjs/core/services/multi-payment-rules-presenter.d.ts +0 -9
  414. package/lib/typescript/commonjs/core/services/multi-payment-rules-presenter.d.ts.map +0 -1
  415. package/lib/typescript/commonjs/core/services/payment-flow-controller.d.ts +0 -146
  416. package/lib/typescript/commonjs/core/services/payment-flow-controller.d.ts.map +0 -1
  417. package/lib/typescript/commonjs/core/services/payment-flow-state.d.ts +0 -64
  418. package/lib/typescript/commonjs/core/services/payment-flow-state.d.ts.map +0 -1
  419. package/lib/typescript/commonjs/core/services/payment-result-mapper.d.ts +0 -5
  420. package/lib/typescript/commonjs/core/services/payment-result-mapper.d.ts.map +0 -1
  421. package/lib/typescript/commonjs/core/services/presentation-utils.d.ts +0 -5
  422. package/lib/typescript/commonjs/core/services/presentation-utils.d.ts.map +0 -1
  423. package/lib/typescript/commonjs/core/services/redirect-buffer.d.ts +0 -6
  424. package/lib/typescript/commonjs/core/services/redirect-buffer.d.ts.map +0 -1
  425. package/lib/typescript/commonjs/core/services/user-friendly-messages.d.ts +0 -6
  426. package/lib/typescript/commonjs/core/services/user-friendly-messages.d.ts.map +0 -1
  427. package/lib/typescript/commonjs/internal/telemetry-collector.d.ts +0 -2
  428. package/lib/typescript/commonjs/internal/telemetry-collector.d.ts.map +0 -1
  429. package/lib/typescript/commonjs/public/constants.d.ts +0 -12
  430. package/lib/typescript/commonjs/public/constants.d.ts.map +0 -1
  431. package/lib/typescript/commonjs/public/spare-link-callbacks.d.ts +0 -14
  432. package/lib/typescript/commonjs/public/spare-link-callbacks.d.ts.map +0 -1
  433. package/lib/typescript/commonjs/ui/consent/charge-bearer-display.d.ts +0 -5
  434. package/lib/typescript/commonjs/ui/consent/charge-bearer-display.d.ts.map +0 -1
  435. package/lib/typescript/commonjs/ui/consent/consent-accordion.d.ts +0 -10
  436. package/lib/typescript/commonjs/ui/consent/consent-accordion.d.ts.map +0 -1
  437. package/lib/typescript/commonjs/ui/consent/consent-summary-section.d.ts +0 -6
  438. package/lib/typescript/commonjs/ui/consent/consent-summary-section.d.ts.map +0 -1
  439. package/lib/typescript/commonjs/ui/consent/cop-information.d.ts +0 -6
  440. package/lib/typescript/commonjs/ui/consent/cop-information.d.ts.map +0 -1
  441. package/lib/typescript/commonjs/ui/consent/international-payment-summary.d.ts +0 -6
  442. package/lib/typescript/commonjs/ui/consent/international-payment-summary.d.ts.map +0 -1
  443. package/lib/typescript/commonjs/ui/consent/label-value-rows.d.ts +0 -10
  444. package/lib/typescript/commonjs/ui/consent/label-value-rows.d.ts.map +0 -1
  445. package/lib/typescript/commonjs/ui/consent/multi-payment-rules-list.d.ts +0 -15
  446. package/lib/typescript/commonjs/ui/consent/multi-payment-rules-list.d.ts.map +0 -1
  447. package/lib/typescript/commonjs/ui/consent/multi-payment-summary.d.ts +0 -6
  448. package/lib/typescript/commonjs/ui/consent/multi-payment-summary.d.ts.map +0 -1
  449. package/lib/typescript/commonjs/ui/consent/single-payment-summary.d.ts +0 -6
  450. package/lib/typescript/commonjs/ui/consent/single-payment-summary.d.ts.map +0 -1
  451. package/lib/typescript/commonjs/ui/consent/terms-link.d.ts +0 -2
  452. package/lib/typescript/commonjs/ui/consent/terms-link.d.ts.map +0 -1
  453. package/lib/typescript/commonjs/ui/hooks/use-payment-flow-state.d.ts +0 -9
  454. package/lib/typescript/commonjs/ui/hooks/use-payment-flow-state.d.ts.map +0 -1
  455. package/lib/typescript/commonjs/ui/payment-flow-page.d.ts +0 -20
  456. package/lib/typescript/commonjs/ui/payment-flow-page.d.ts.map +0 -1
  457. package/lib/typescript/commonjs/ui/screens/bank-selection-screen.d.ts +0 -15
  458. package/lib/typescript/commonjs/ui/screens/bank-selection-screen.d.ts.map +0 -1
  459. package/lib/typescript/commonjs/ui/screens/consent-details-screen.d.ts +0 -13
  460. package/lib/typescript/commonjs/ui/screens/consent-details-screen.d.ts.map +0 -1
  461. package/lib/typescript/commonjs/ui/screens/mandate-setup-success-screen.d.ts +0 -10
  462. package/lib/typescript/commonjs/ui/screens/mandate-setup-success-screen.d.ts.map +0 -1
  463. package/lib/typescript/commonjs/ui/widgets/layout-w-header.d.ts +0 -20
  464. package/lib/typescript/commonjs/ui/widgets/layout-w-header.d.ts.map +0 -1
  465. package/lib/typescript/commonjs/ui/widgets/stepper.d.ts +0 -15
  466. package/lib/typescript/commonjs/ui/widgets/stepper.d.ts.map +0 -1
  467. package/lib/typescript/module/core/client/link-api-client.d.ts +0 -70
  468. package/lib/typescript/module/core/client/link-api-client.d.ts.map +0 -1
  469. package/lib/typescript/module/core/errors/payment-api-error.d.ts +0 -15
  470. package/lib/typescript/module/core/errors/payment-api-error.d.ts.map +0 -1
  471. package/lib/typescript/module/core/models/link-session-status.d.ts +0 -6
  472. package/lib/typescript/module/core/models/link-session-status.d.ts.map +0 -1
  473. package/lib/typescript/module/core/models/payment-type.d.ts +0 -18
  474. package/lib/typescript/module/core/models/payment-type.d.ts.map +0 -1
  475. package/lib/typescript/module/core/models/wire-mappers.d.ts +0 -19
  476. package/lib/typescript/module/core/models/wire-mappers.d.ts.map +0 -1
  477. package/lib/typescript/module/core/services/consent-presenter.d.ts +0 -67
  478. package/lib/typescript/module/core/services/consent-presenter.d.ts.map +0 -1
  479. package/lib/typescript/module/core/services/execute-resume-if-needed.d.ts +0 -32
  480. package/lib/typescript/module/core/services/execute-resume-if-needed.d.ts.map +0 -1
  481. package/lib/typescript/module/core/services/multi-payment-rules-presenter.d.ts +0 -9
  482. package/lib/typescript/module/core/services/multi-payment-rules-presenter.d.ts.map +0 -1
  483. package/lib/typescript/module/core/services/payment-flow-controller.d.ts +0 -146
  484. package/lib/typescript/module/core/services/payment-flow-controller.d.ts.map +0 -1
  485. package/lib/typescript/module/core/services/payment-flow-state.d.ts +0 -64
  486. package/lib/typescript/module/core/services/payment-flow-state.d.ts.map +0 -1
  487. package/lib/typescript/module/core/services/payment-result-mapper.d.ts +0 -5
  488. package/lib/typescript/module/core/services/payment-result-mapper.d.ts.map +0 -1
  489. package/lib/typescript/module/core/services/presentation-utils.d.ts +0 -5
  490. package/lib/typescript/module/core/services/presentation-utils.d.ts.map +0 -1
  491. package/lib/typescript/module/core/services/redirect-buffer.d.ts +0 -6
  492. package/lib/typescript/module/core/services/redirect-buffer.d.ts.map +0 -1
  493. package/lib/typescript/module/core/services/user-friendly-messages.d.ts +0 -6
  494. package/lib/typescript/module/core/services/user-friendly-messages.d.ts.map +0 -1
  495. package/lib/typescript/module/internal/telemetry-collector.d.ts +0 -2
  496. package/lib/typescript/module/internal/telemetry-collector.d.ts.map +0 -1
  497. package/lib/typescript/module/public/constants.d.ts +0 -12
  498. package/lib/typescript/module/public/constants.d.ts.map +0 -1
  499. package/lib/typescript/module/public/spare-link-callbacks.d.ts +0 -14
  500. package/lib/typescript/module/public/spare-link-callbacks.d.ts.map +0 -1
  501. package/lib/typescript/module/ui/consent/charge-bearer-display.d.ts +0 -5
  502. package/lib/typescript/module/ui/consent/charge-bearer-display.d.ts.map +0 -1
  503. package/lib/typescript/module/ui/consent/consent-accordion.d.ts +0 -10
  504. package/lib/typescript/module/ui/consent/consent-accordion.d.ts.map +0 -1
  505. package/lib/typescript/module/ui/consent/consent-summary-section.d.ts +0 -6
  506. package/lib/typescript/module/ui/consent/consent-summary-section.d.ts.map +0 -1
  507. package/lib/typescript/module/ui/consent/cop-information.d.ts +0 -6
  508. package/lib/typescript/module/ui/consent/cop-information.d.ts.map +0 -1
  509. package/lib/typescript/module/ui/consent/international-payment-summary.d.ts +0 -6
  510. package/lib/typescript/module/ui/consent/international-payment-summary.d.ts.map +0 -1
  511. package/lib/typescript/module/ui/consent/label-value-rows.d.ts +0 -10
  512. package/lib/typescript/module/ui/consent/label-value-rows.d.ts.map +0 -1
  513. package/lib/typescript/module/ui/consent/multi-payment-rules-list.d.ts +0 -15
  514. package/lib/typescript/module/ui/consent/multi-payment-rules-list.d.ts.map +0 -1
  515. package/lib/typescript/module/ui/consent/multi-payment-summary.d.ts +0 -6
  516. package/lib/typescript/module/ui/consent/multi-payment-summary.d.ts.map +0 -1
  517. package/lib/typescript/module/ui/consent/single-payment-summary.d.ts +0 -6
  518. package/lib/typescript/module/ui/consent/single-payment-summary.d.ts.map +0 -1
  519. package/lib/typescript/module/ui/consent/terms-link.d.ts +0 -2
  520. package/lib/typescript/module/ui/consent/terms-link.d.ts.map +0 -1
  521. package/lib/typescript/module/ui/hooks/use-payment-flow-state.d.ts +0 -9
  522. package/lib/typescript/module/ui/hooks/use-payment-flow-state.d.ts.map +0 -1
  523. package/lib/typescript/module/ui/payment-flow-page.d.ts +0 -20
  524. package/lib/typescript/module/ui/payment-flow-page.d.ts.map +0 -1
  525. package/lib/typescript/module/ui/screens/bank-selection-screen.d.ts +0 -15
  526. package/lib/typescript/module/ui/screens/bank-selection-screen.d.ts.map +0 -1
  527. package/lib/typescript/module/ui/screens/consent-details-screen.d.ts +0 -13
  528. package/lib/typescript/module/ui/screens/consent-details-screen.d.ts.map +0 -1
  529. package/lib/typescript/module/ui/screens/mandate-setup-success-screen.d.ts +0 -10
  530. package/lib/typescript/module/ui/screens/mandate-setup-success-screen.d.ts.map +0 -1
  531. package/lib/typescript/module/ui/widgets/layout-w-header.d.ts +0 -20
  532. package/lib/typescript/module/ui/widgets/layout-w-header.d.ts.map +0 -1
  533. package/lib/typescript/module/ui/widgets/stepper.d.ts +0 -15
  534. package/lib/typescript/module/ui/widgets/stepper.d.ts.map +0 -1
  535. package/src/core/client/link-api-client.ts +0 -414
  536. package/src/core/errors/payment-api-error.ts +0 -35
  537. package/src/core/models/link-session-status.ts +0 -7
  538. package/src/core/models/payment-type.ts +0 -54
  539. package/src/core/models/wire-mappers.ts +0 -315
  540. package/src/core/services/consent-presenter.ts +0 -213
  541. package/src/core/services/execute-resume-if-needed.ts +0 -243
  542. package/src/core/services/multi-payment-rules-presenter.ts +0 -158
  543. package/src/core/services/payment-flow-controller.ts +0 -607
  544. package/src/core/services/payment-flow-state.ts +0 -124
  545. package/src/core/services/payment-result-mapper.ts +0 -41
  546. package/src/core/services/presentation-utils.ts +0 -4
  547. package/src/core/services/redirect-buffer.ts +0 -34
  548. package/src/core/services/user-friendly-messages.ts +0 -39
  549. package/src/internal/telemetry-collector.ts +0 -90
  550. package/src/public/constants.ts +0 -14
  551. package/src/public/spare-link-callbacks.ts +0 -20
  552. package/src/ui/consent/charge-bearer-display.tsx +0 -68
  553. package/src/ui/consent/consent-accordion.tsx +0 -89
  554. package/src/ui/consent/consent-summary-section.tsx +0 -19
  555. package/src/ui/consent/cop-information.tsx +0 -121
  556. package/src/ui/consent/international-payment-summary.tsx +0 -83
  557. package/src/ui/consent/label-value-rows.tsx +0 -50
  558. package/src/ui/consent/multi-payment-rules-list.tsx +0 -138
  559. package/src/ui/consent/multi-payment-summary.tsx +0 -82
  560. package/src/ui/consent/single-payment-summary.tsx +0 -123
  561. package/src/ui/consent/terms-link.tsx +0 -27
  562. package/src/ui/hooks/use-payment-flow-state.ts +0 -16
  563. package/src/ui/payment-flow-page.tsx +0 -254
  564. package/src/ui/screens/bank-selection-screen.tsx +0 -209
  565. package/src/ui/screens/consent-details-screen.tsx +0 -106
  566. package/src/ui/screens/mandate-setup-success-screen.tsx +0 -72
  567. package/src/ui/widgets/layout-w-header.tsx +0 -89
  568. package/src/ui/widgets/stepper.tsx +0 -126
@@ -2,55 +2,54 @@ import type { PaymentResult } from './payment-result.js';
2
2
  /**
3
3
  * Lifecycle events emitted on {@link SpareLink.events}.
4
4
  *
5
- * This is a discriminated union (TypeScript's equivalent to Dart sealed classes).
6
- * Use a switch on the `type` field for exhaustive handling:
5
+ * Analytics only — never required to drive the flow. This is a discriminated
6
+ * union (TypeScript's equivalent to Dart sealed classes); switch on `type` for
7
+ * exhaustive handling:
7
8
  *
8
9
  * ```ts
9
10
  * spareLink.events.subscribe((event) => {
10
11
  * switch (event.type) {
11
12
  * case 'initialized':
12
- * console.log('Started flow for', event.linkToken);
13
+ * console.log('Started flow for', event.reference);
13
14
  * break;
14
- * case 'sessionLoaded':
15
- * console.log('Session loaded', event.linkSessionId);
15
+ * case 'pageReady':
16
+ * console.log('Payer can act on the page');
16
17
  * break;
17
18
  * case 'succeeded':
18
- * console.log('Payment succeeded', event.result.exchangeCode);
19
+ * console.log('Reported success for', event.result.reference);
19
20
  * break;
20
21
  * // ...
21
22
  * }
22
23
  * });
23
24
  * ```
24
25
  */
25
- export type SpareLinkEvent = SpareLinkInitialized | SpareLinkSessionLoaded | SpareLinkConsentStarted | SpareLinkRedirectToBank | SpareLinkBankCallbackReceived | SpareLinkSucceeded | SpareLinkFailed | SpareLinkCancelled | SpareLinkAbandoned;
26
+ export type SpareLinkEvent = SpareLinkInitialized | SpareLinkPageReady | SpareLinkRedirectToBank | SpareLinkBankCallbackReceived | SpareLinkSucceeded | SpareLinkFailed | SpareLinkCancelled | SpareLinkAbandoned;
26
27
  /** The SDK has started a payment flow. */
27
28
  export interface SpareLinkInitialized {
28
29
  readonly type: 'initialized';
29
- readonly linkToken: string;
30
+ readonly reference: string;
30
31
  }
31
- /** The payment session was loaded from the server. */
32
- export interface SpareLinkSessionLoaded {
33
- readonly type: 'sessionLoaded';
34
- readonly linkToken: string;
35
- /** Server-assigned link session ID when available from the API. */
36
- readonly linkSessionId?: string;
37
- }
38
- /** The user confirmed consent and a consent request was submitted. */
39
- export interface SpareLinkConsentStarted {
40
- readonly type: 'consentStarted';
41
- readonly linkToken: string;
32
+ /**
33
+ * The hosted page is interactive and the payer has something to act on.
34
+ *
35
+ * The steps after this — choosing a bank, the payee check, reading the consent —
36
+ * happen inside the page, which does not report them.
37
+ */
38
+ export interface SpareLinkPageReady {
39
+ readonly type: 'pageReady';
40
+ readonly reference: string;
42
41
  }
43
- /** The user is being redirected to their bank's authorization page. */
42
+ /** The payer is being handed to their bank, outside the WebView. */
44
43
  export interface SpareLinkRedirectToBank {
45
44
  readonly type: 'redirectToBank';
46
- readonly linkToken: string;
45
+ readonly reference: string;
47
46
  }
48
47
  /** The bank has redirected back with a callback URI. */
49
48
  export interface SpareLinkBankCallbackReceived {
50
49
  readonly type: 'bankCallbackReceived';
51
- readonly linkToken: string;
50
+ readonly reference: string;
52
51
  }
53
- /** The payment completed successfully and the flow is about to resolve. */
52
+ /** The return reported a completed payment and the flow is about to resolve. */
54
53
  export interface SpareLinkSucceeded {
55
54
  readonly type: 'succeeded';
56
55
  readonly result: PaymentResult;
@@ -60,28 +59,27 @@ export interface SpareLinkFailed {
60
59
  readonly type: 'failed';
61
60
  readonly result: PaymentResult;
62
61
  }
63
- /** The user cancelled the payment and the flow is about to resolve. */
62
+ /** The payer cancelled the payment and the flow is about to resolve. */
64
63
  export interface SpareLinkCancelled {
65
64
  readonly type: 'cancelled';
66
65
  readonly result: PaymentResult;
67
66
  }
68
- /** The flow was abandoned without an explicit user action. */
67
+ /** The payer left before the flow resolved either way. */
69
68
  export interface SpareLinkAbandoned {
70
69
  readonly type: 'abandoned';
71
70
  readonly result: PaymentResult;
72
71
  }
73
72
  /** All possible event type strings for type narrowing. */
74
- export declare const SPARE_LINK_EVENT_TYPES: readonly ["initialized", "sessionLoaded", "consentStarted", "redirectToBank", "bankCallbackReceived", "succeeded", "failed", "cancelled", "abandoned"];
73
+ export declare const SPARE_LINK_EVENT_TYPES: readonly ["initialized", "pageReady", "redirectToBank", "bankCallbackReceived", "succeeded", "failed", "cancelled", "abandoned"];
75
74
  export type SpareLinkEventType = (typeof SPARE_LINK_EVENT_TYPES)[number];
76
75
  /** Type guard for SpareLinkEvent. */
77
76
  export declare function isSpareLinkEvent(value: unknown): value is SpareLinkEvent;
78
77
  /** Factory functions for creating events (internal use). */
79
78
  export declare const SpareLinkEvents: {
80
- readonly initialized: (linkToken: string) => SpareLinkInitialized;
81
- readonly sessionLoaded: (linkToken: string, linkSessionId?: string) => SpareLinkSessionLoaded;
82
- readonly consentStarted: (linkToken: string) => SpareLinkConsentStarted;
83
- readonly redirectToBank: (linkToken: string) => SpareLinkRedirectToBank;
84
- readonly bankCallbackReceived: (linkToken: string) => SpareLinkBankCallbackReceived;
79
+ readonly initialized: (reference: string) => SpareLinkInitialized;
80
+ readonly pageReady: (reference: string) => SpareLinkPageReady;
81
+ readonly redirectToBank: (reference: string) => SpareLinkRedirectToBank;
82
+ readonly bankCallbackReceived: (reference: string) => SpareLinkBankCallbackReceived;
85
83
  readonly succeeded: (result: PaymentResult) => SpareLinkSucceeded;
86
84
  readonly failed: (result: PaymentResult) => SpareLinkFailed;
87
85
  readonly cancelled: (result: PaymentResult) => SpareLinkCancelled;
@@ -1 +1 @@
1
- {"version":3,"file":"spare-link-event.d.ts","sourceRoot":"","sources":["../../../../src/public/spare-link-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAkB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,cAAc,GACtB,oBAAoB,GACpB,sBAAsB,GACtB,uBAAuB,GACvB,uBAAuB,GACvB,6BAA6B,GAC7B,kBAAkB,GAClB,eAAe,GACf,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB,0CAA0C;AAC1C,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,sDAAsD;AACtD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,sEAAsE;AACtE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM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AC;IACxB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;CAChC;AAED,wEAAwE;AACxE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;CAChC;AAED,0DAA0D;AAC1D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;CAChC;AAED,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,kIASzB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,qCAAqC;AACrC,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAIxE;AAED,4DAA4D;AAC5D,eAAO,MAAM,eAAe;sCACH,MAAM,KAAG,oBAAoB;oCAG/B,MAAM,KAAG,kBAAkB;yCAGtB,MAAM,KAAG,uBAAuB;+CAG1B,MAAM,KAAG,6BAA6B;iCAGpD,aAAa,KAAG,kBAAkB;8BAGrC,aAAa,KAAG,eAAe;iCAG5B,aAAa,KAAG,kBAAkB;iCAGlC,aAAa,KAAG,kBAAkB;CAG5C,CAAC"}
@@ -1,26 +1,15 @@
1
1
  import type { PaymentResult } from './payment-result.js';
2
2
  import type { RecoveryResult } from './recovery-result.js';
3
- import type { SpareLinkSession } from './spare-link-session.js';
4
3
  /**
5
4
  * Imperative API the {@link SpareLinkHost} mounts and wires to a
6
5
  * {@link SpareLink} instance.
7
6
  *
8
7
  * @internal
9
8
  */
10
- export interface SpareLinkHostApi {
11
- start(args: {
12
- linkToken: string;
13
- }): Promise<SpareLinkSession>;
14
- handleRedirect(uri: URL | string): Promise<boolean>;
15
- resumeIfNeeded(): Promise<RecoveryResult>;
16
- isFlowActive(): boolean;
17
- }
18
- /** @internal */
19
9
  export interface SpareLinkHostDelegate {
20
10
  startFlow(args: {
21
- linkToken: string;
11
+ reference: string;
22
12
  resolve: (result: PaymentResult) => void;
23
- onSessionLoaded?: (linkSessionId: string) => void;
24
13
  }): void;
25
14
  handleRedirect(uri: URL | string): Promise<boolean>;
26
15
  resumeIfNeeded(): Promise<RecoveryResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"spare-link-host-api.d.ts","sourceRoot":"","sources":["../../../../src/public/spare-link-host-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAsB,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC9D,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpD,cAAc,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC;IAC1C,YAAY,IAAI,OAAO,CAAC;CACzB;AAED,gBAAgB;AAChB,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,IAAI,EAAE;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;QACzC,eAAe,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;KACnD,GAAG,IAAI,CAAC;IACT,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpD,cAAc,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC;IAC1C,YAAY,IAAI,OAAO,CAAC;CACzB"}
1
+ {"version":3,"file":"spare-link-host-api.d.ts","sourceRoot":"","sources":["../../../../src/public/spare-link-host-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAmB,CAAC;AAExD;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IACvF,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpD,cAAc,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC;IAC1C,YAAY,IAAI,OAAO,CAAC;CACzB"}
@@ -1,7 +1,7 @@
1
1
  import type { PendingSessionStore } from '../core/services/pending-session-store.js';
2
2
  import { type EventEmitter } from '../internal/event-emitter.js';
3
3
  import { type PaymentResult } from './payment-result.js';
4
- import { type NoRecoveryReason, type RecoveryResult, isSessionRecovered } from './recovery-result.js';
4
+ import type { NoRecoveryReason, RecoveryResult } from './recovery-result.js';
5
5
  import { type PaymentEnvironment, type SpareApiTenant } from './spare-link-config.js';
6
6
  import { type SpareLinkEvent } from './spare-link-event.js';
7
7
  import type { SpareLinkHostDelegate } from './spare-link-host-api.js';
@@ -10,14 +10,15 @@ export interface SpareLinkOptions {
10
10
  environment: PaymentEnvironment;
11
11
  tenant: SpareApiTenant;
12
12
  baseUrl?: string;
13
- fetch?: typeof fetch;
14
- requestTimeoutMs?: number;
15
13
  /** Store for crash-safe recovery. Defaults to none — wire e.g. `SecureStorePendingSessionStore`. */
16
14
  pendingSessionStore?: PendingSessionStore;
17
15
  }
18
16
  /**
19
- * Entry point for the Spare Link payment SDK — aligned with Flutter's
20
- * instance-based {@link SpareLink} API.
17
+ * Entry point for the Spare Link payment SDK.
18
+ *
19
+ * Your backend creates the payment request — with `channel: 'sdk_react_native'`
20
+ * and the return URLs your app is registered for — and gives the app the
21
+ * reference it returns. That reference is all this SDK needs.
21
22
  *
22
23
  * Mount {@link SpareLinkHost} once near your app root and pass this instance:
23
24
  *
@@ -31,13 +32,15 @@ export interface SpareLinkOptions {
31
32
  * <App />
32
33
  * </SpareLinkHost>
33
34
  * ```
35
+ *
36
+ * The SDK makes no API calls of its own and holds no credentials. Every result
37
+ * it reports comes from a deep link that is interceptable by design, so confirm
38
+ * with your backend via `GET /payment-requests/{reference}` before acting on one.
34
39
  */
35
40
  export declare class SpareLink {
36
41
  readonly environment: PaymentEnvironment;
37
42
  readonly tenant: SpareApiTenant;
38
43
  readonly baseUrl: string | undefined;
39
- readonly fetch: typeof fetch | undefined;
40
- readonly requestTimeoutMs: number | undefined;
41
44
  readonly pendingSessionStore: PendingSessionStore | undefined;
42
45
  private readonly _events;
43
46
  private _host;
@@ -52,17 +55,25 @@ export declare class SpareLink {
52
55
  /** Returns `true` while a payment flow started via {@link start} is in progress. */
53
56
  get isFlowActive(): boolean;
54
57
  /**
55
- * Starts a new payment flow.
58
+ * Opens the hosted payment page for `reference` and resolves when the flow ends.
56
59
  *
57
- * Returns a {@link SpareLinkSession} immediately; await `session.result`
58
- * for the terminal outcome.
60
+ * Returns a {@link SpareLinkSession} immediately; await `session.result` for the
61
+ * terminal outcome. There is no session to load first: the page resolves the
62
+ * request itself, so the payer sees it without waiting on a round trip.
59
63
  */
60
64
  start(args: {
61
- linkToken: string;
65
+ reference: string;
62
66
  }): Promise<SpareLinkSession>;
63
- /** Processes a deep-link URI received from the bank. */
67
+ /** Processes a deep-link URI the payer returned through. */
64
68
  handleRedirect(uri: URL | string): Promise<boolean>;
65
- /** Checks for a pending session saved during a previous flow and recovers it. */
69
+ /**
70
+ * Reports a payment that was left in progress by a previous app session.
71
+ *
72
+ * If the return deep link arrived before the app had a flow to give it to, the
73
+ * outcome is resolved from it. Otherwise the SDK cannot say how the payment
74
+ * ended — it holds no credentials, so it has nothing to ask with — and reports
75
+ * `outcomeUnknown` with the reference for your backend to resolve.
76
+ */
66
77
  resumeIfNeeded(): Promise<RecoveryResult>;
67
78
  dispose(): void;
68
79
  /**
@@ -75,15 +86,10 @@ export declare class SpareLink {
75
86
  emitEvent(event: SpareLinkEvent): void;
76
87
  /** @internal */
77
88
  emitTerminal(result: PaymentResult): void;
89
+ private _resolveImmediately;
78
90
  private _emitTerminal;
79
91
  private _hostStart;
80
92
  private _drainPending;
81
93
  }
82
- /** Map legacy recovery helper outcomes to Flutter-aligned {@link RecoveryResult}. */
83
- export declare function mapHostRecovery(recovery: RecoveryResult | {
84
- kind: 'inProgress';
85
- linkToken: string;
86
- }): RecoveryResult;
87
- export declare function noRecovery(reason: NoRecoveryReason): RecoveryResult;
88
- export { isSessionRecovered };
94
+ export declare function noRecovery(reason: NoRecoveryReason, reference?: string): RecoveryResult;
89
95
  //# sourceMappingURL=spare-link-instance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spare-link-instance.d.ts","sourceRoot":"","sources":["../../../../src/public/spare-link-instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAAwC,CAAC;AAClF,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,8BAA2B,CAAC;AAClF,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,qBAAkB,CAAC;AACxE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,kBAAkB,EAAE,MAAM,sBAAmB,CAAC;AACnG,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EAEpB,MAAM,wBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,cAAc,EAAmB,MAAM,uBAAoB,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAAuB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAsB,CAAC;AAExD,MAAM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,qBAAqB,GAAG,MAAM,IAAI;IAQpD,gBAAgB;IAChB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;IAItC,gBAAgB;IAChB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAIzC,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,aAAa;YAiBP,UAAU;IAwBxB,OAAO,CAAC,aAAa;CAiBtB;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,gBAAgB,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,CAEvF"}
@@ -2,19 +2,14 @@ import type { PaymentResult } from './payment-result.js';
2
2
  /**
3
3
  * Handle for an in-flight or completed payment started via {@link SpareLink.start}.
4
4
  *
5
- * Mirrors Flutter's `SpareLinkSession` — `linkToken` is available immediately;
6
- * await `result` for the terminal outcome.
5
+ * `reference` is available immediately; await `result` for the terminal outcome.
7
6
  */
8
7
  export declare class SpareLinkSession {
9
- readonly linkToken: string;
10
- linkSessionId: string | undefined;
8
+ readonly reference: string;
11
9
  readonly result: Promise<PaymentResult>;
12
10
  constructor(args: {
13
- linkToken: string;
11
+ reference: string;
14
12
  result: Promise<PaymentResult>;
15
- linkSessionId?: string;
16
13
  });
17
- /** Called internally when the server provides {@link linkSessionId}. */
18
- updateLinkSessionId(value: string): void;
19
14
  }
20
15
  //# sourceMappingURL=spare-link-session.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spare-link-session.d.ts","sourceRoot":"","sources":["../../../../src/public/spare-link-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAkB,CAAC;AAEtD;;;;;GAKG;AACH,qBAAa,gBAAgB;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;gBAE5B,IAAI,EAAE;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;QAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB;IAMD,wEAAwE;IACxE,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAGzC"}
1
+ {"version":3,"file":"spare-link-session.d.ts","sourceRoot":"","sources":["../../../../src/public/spare-link-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAkB,CAAC;AAEtD;;;;GAIG;AACH,qBAAa,gBAAgB;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;gBAE5B,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;KAAE;CAIxE"}
@@ -1,3 +1,3 @@
1
- export { SpareLink, mapHostRecovery, noRecovery, isSessionRecovered } from './spare-link-instance.js';
1
+ export { SpareLink, noRecovery } from './spare-link-instance.js';
2
2
  export type { SpareLinkOptions } from './spare-link-instance.js';
3
3
  //# sourceMappingURL=spare-link.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spare-link.d.ts","sourceRoot":"","sources":["../../../../src/public/spare-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,0BAAuB,CAAC;AACnG,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAAuB,CAAC"}
1
+ {"version":3,"file":"spare-link.d.ts","sourceRoot":"","sources":["../../../../src/public/spare-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAAuB,CAAC;AAC9D,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAAuB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { HostedFlowController } from '../../core/services/hosted-flow-controller.js';
2
+ import type { HostedFlowState } from '../../core/services/hosted-flow-state.js';
3
+ /**
4
+ * React hook that bridges {@link HostedFlowController}'s observable to the
5
+ * component tree via `useSyncExternalStore`. Re-renders when the controller
6
+ * notifies a new state.
7
+ */
8
+ export declare function useHostedFlowState(controller: HostedFlowController): HostedFlowState;
9
+ //# sourceMappingURL=use-hosted-flow-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-hosted-flow-state.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/use-hosted-flow-state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA4C,CAAC;AACvF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAAuC,CAAC;AAE7E;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,oBAAoB,GAAG,eAAe,CAMpF"}
@@ -0,0 +1,17 @@
1
+ import type { HostedFlowController } from '../../core/services/hosted-flow-controller.js';
2
+ export interface HostedPaymentPageProps {
3
+ controller: HostedFlowController;
4
+ /** Resolved API base URL — the hosted page is served from the same host. */
5
+ baseUrl: string;
6
+ /** Called once the outcome has been shown and the flow should hand back. */
7
+ onResolved: () => void;
8
+ }
9
+ /**
10
+ * The screen a payer sees for the whole flow.
11
+ *
12
+ * Most of it is the hosted page. The native screens cover the moments the page
13
+ * cannot: while it loads, while the payer is away at their bank, and once there is
14
+ * an outcome to report.
15
+ */
16
+ export declare function HostedPaymentPage(props: HostedPaymentPageProps): JSX.Element;
17
+ //# sourceMappingURL=hosted-payment-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hosted-payment-page.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hosted/hosted-payment-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA4C,CAAC;AAavF,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,oBAAoB,CAAC;IACjC,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CAuI5E"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Whether a navigation the WebView is about to make should be allowed.
3
+ *
4
+ * Only the hosted origin may load in-frame. Bank authentication deliberately
5
+ * happens in a real browser, so a bank URL arriving here means the page's handoff
6
+ * did not reach us — following it would put the payer on a bank page with no
7
+ * address bar, which is the signal they rely on to tell a real one from a copy.
8
+ * Kept as a plain function because the WebView does not render under Jest, and
9
+ * this is the part worth testing.
10
+ */
11
+ export declare function shouldAllowHostedNavigation(args: {
12
+ baseUrl: string;
13
+ url: string;
14
+ }): boolean;
15
+ export interface HostedPaymentWebViewProps {
16
+ /** Resolved API base URL — the hosted page is served from the same host. */
17
+ baseUrl: string;
18
+ /** The payment request this flow is paying. */
19
+ reference: string;
20
+ /**
21
+ * Called with each raw message the page posts. Parsing belongs to the caller so
22
+ * this component stays a transport.
23
+ */
24
+ onBridgeMessage: (message: unknown) => void;
25
+ /** Called when the page itself could not be loaded. */
26
+ onLoadFailure?: () => void;
27
+ /**
28
+ * Called once this webview is on screen.
29
+ *
30
+ * Starts the clock the page has to become interactive, measured from here so
31
+ * that whatever the host did before rendering is not charged against it.
32
+ */
33
+ onMounted?: () => void;
34
+ }
35
+ /**
36
+ * Hosts the hosted payment page.
37
+ *
38
+ * The page owns bank selection, the payee check and the consent screen, so this
39
+ * component carries no payment logic of its own: it loads one URL, forwards what
40
+ * the page reports, and refuses to navigate anywhere else.
41
+ */
42
+ export declare function HostedPaymentWebView(props: HostedPaymentWebViewProps): JSX.Element;
43
+ //# sourceMappingURL=hosted-payment-webview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hosted-payment-webview.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hosted/hosted-payment-webview.tsx"],"names":[],"mappings":"AAsBA;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAE3F;AAED,MAAM,WAAW,yBAAyB;IACxC,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,GAAG,CAAC,OAAO,CA4FlF"}
@@ -1,7 +1,5 @@
1
- export { BankSelectionScreen, type BankSelectionScreenProps } from './bank-selection-screen.js';
2
- export { ConsentDetailsScreen, type ConsentDetailsScreenProps } from './consent-details-screen.js';
1
+ export { PageUnavailableScreen, type PageUnavailableScreenProps, } from './page-unavailable-screen.js';
3
2
  export { RedirectHandoffScreen } from './redirect-handoff-screen.js';
4
3
  export { ResumeProcessingScreen, type ResumeProcessingScreenProps, } from './resume-processing-screen.js';
5
4
  export { ResultScreen, type ResultScreenProps } from './result-screen.js';
6
- export { MandateSetupSuccessScreen, type MandateSetupSuccessScreenProps, } from './mandate-setup-success-screen.js';
7
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,4BAAyB,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,6BAA0B,CAAC;AAChG,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA2B,CAAC;AAClE,OAAO,EACL,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,+BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAiB,CAAC;AACvE,OAAO,EACL,yBAAyB,EACzB,KAAK,8BAA8B,GACpC,MAAM,mCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,KAAK,0BAA0B,GAChC,MAAM,8BAA2B,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA2B,CAAC;AAClE,OAAO,EACL,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,+BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAiB,CAAC"}
@@ -0,0 +1,18 @@
1
+ export interface PageUnavailableScreenProps {
2
+ /** Asks for the payment page again. */
3
+ onRetry: () => void;
4
+ /** Gives up and hands the outcome back to the caller. */
5
+ onCancel: () => void;
6
+ }
7
+ /**
8
+ * Shown when the payment page could not be loaded, or loaded and never became
9
+ * interactive.
10
+ *
11
+ * It deliberately does not say the payment failed. Nothing has been attempted at
12
+ * this point — no consent, no bank, no money — and telling a payer their payment
13
+ * failed when the app could not open the page is the one thing they must not be
14
+ * told. It says what is true, says nothing has been taken, and offers the page
15
+ * again, because an unreachable service is usually unreachable briefly.
16
+ */
17
+ export declare function PageUnavailableScreen(props: PageUnavailableScreenProps): JSX.Element;
18
+ //# sourceMappingURL=page-unavailable-screen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-unavailable-screen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/page-unavailable-screen.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,0BAA0B;IACzC,uCAAuC;IACvC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,yDAAyD;IACzD,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,GAAG,CAAC,OAAO,CA8BpF"}
@@ -1,3 +1,4 @@
1
+ import { type BankLauncher } from '../core/services/hosted-flow-controller.js';
1
2
  import type { PendingSessionStore } from '../core/services/pending-session-store.js';
2
3
  import { type SpareLink } from '../public/spare-link-instance.js';
3
4
  export interface SpareLinkHostProps {
@@ -8,16 +9,14 @@ export interface SpareLinkHostProps {
8
9
  * When omitted, uses `spareLink.pendingSessionStore`.
9
10
  */
10
11
  pendingSessionStore?: PendingSessionStore;
11
- launchBankRedirect?: (args: {
12
- authorizationUrl: string;
13
- mobileAppUrl?: string;
14
- }) => Promise<void>;
12
+ /** Override how a bank authorization URL is opened. Tests inject a fake. */
13
+ launchBankRedirect?: BankLauncher;
15
14
  showDismissButton?: boolean;
16
15
  children?: React.ReactNode;
17
16
  }
18
17
  /**
19
18
  * Host component that mounts the SDK modal and connects a {@link SpareLink}
20
- * instance — Flutter-aligned integration (one instance, one host).
19
+ * instance — one instance, one host.
21
20
  */
22
21
  export declare function SpareLinkHost(props: SpareLinkHostProps): JSX.Element;
23
22
  //# sourceMappingURL=spare-link-host.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spare-link-host.d.ts","sourceRoot":"","sources":["../../../../src/ui/spare-link-host.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAAwC,CAAC;AAgBlF,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,kCAA+B,CAAC;AAiB5F,MAAM,WAAW,kBAAkB;IACjC,mDAAmD;IACnD,SAAS,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,gBAAgB,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClG,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CA0UpE"}
1
+ {"version":3,"file":"spare-link-host.d.ts","sourceRoot":"","sources":["../../../../src/ui/spare-link-host.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,YAAY,EAAwB,MAAM,4CAAyC,CAAC;AAClG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAAwC,CAAC;AAYlF,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,kCAA+B,CAAC;AAgB3E,MAAM,WAAW,kBAAkB;IACjC,mDAAmD;IACnD,SAAS,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,YAAY,CAAC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAmSpE"}
@@ -1,6 +1,5 @@
1
- export { CustomStepper, type CustomStepperProps } from './stepper.js';
2
- export { LayoutWHeader, type LayoutWHeaderProps } from './layout-w-header.js';
3
1
  export { Footer, type FooterProps } from './footer.js';
4
2
  export { GradientSpinner, type GradientSpinnerProps } from './gradient-spinner.js';
5
3
  export { HandoffScreenLayout, type HandoffScreenLayoutProps } from './handoff-screen-layout.js';
4
+ export { ModalDismissButton, type ModalDismissButtonProps } from './modal-dismiss-button.js';
6
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAW,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,sBAAmB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,aAAU,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,uBAAoB,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,4BAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,aAAU,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,uBAAoB,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,4BAAyB,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,2BAAwB,CAAC"}
@@ -6,5 +6,5 @@
6
6
  * `changeset version`). The src/index.ts smoke test asserts this matches
7
7
  * package.json's version.
8
8
  */
9
- export declare const SDK_VERSION: "0.1.0-beta.1";
9
+ export declare const SDK_VERSION: "1.0.1";
10
10
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,EAAG,cAAuB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,EAAG,OAAgB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spare-technologies/spare-link",
3
- "version": "0.1.0-beta.1",
4
- "description": "React Native SDK for Spare Link — open banking payments via a native checkout sheet.",
3
+ "version": "1.0.1",
4
+ "description": "React Native SDK for Spare Link — open-banking payments for iOS and Android.",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "module": "./lib/module/index.js",
7
7
  "types": "./lib/typescript/module/index.d.ts",
@@ -28,7 +28,6 @@
28
28
  "plugins",
29
29
  "assets",
30
30
  "README.md",
31
- "CHANGELOG.md",
32
31
  "LICENSE",
33
32
  "!src/**/*.test.ts",
34
33
  "!src/**/*.test.tsx",
@@ -36,9 +35,9 @@
36
35
  "!src/**/*.spec.tsx"
37
36
  ],
38
37
  "scripts": {
39
- "test": "jest",
38
+ "test": "jest --forceExit",
40
39
  "test:watch": "jest --watch",
41
- "test:ci": "jest --ci --coverage",
40
+ "test:ci": "jest --ci --coverage --forceExit",
42
41
  "typecheck": "tsc --noEmit",
43
42
  "clean": "del-cli lib",
44
43
  "build": "bob build",
@@ -82,19 +81,23 @@
82
81
  "access": "public"
83
82
  },
84
83
  "peerDependencies": {
85
- "expo": ">=52.0.0",
86
- "expo-device": "*",
87
- "expo-font": "*",
88
- "expo-linear-gradient": "*",
89
- "expo-linking": "*",
90
- "expo-location": "*",
91
- "expo-secure-store": "*",
92
- "expo-web-browser": "*",
93
- "react": ">=18.3.0",
94
- "react-native": ">=0.76.0",
95
- "react-native-safe-area-context": "*",
96
- "react-native-screens": "*",
97
- "react-native-svg": "15.8.0"
84
+ "@expo/vector-icons": "~14.0.0",
85
+ "expo": ">=52.0.0 <53.0.0",
86
+ "expo-font": "~13.0.0",
87
+ "expo-linear-gradient": "~14.0.0",
88
+ "expo-secure-store": "~14.0.0",
89
+ "expo-web-browser": "~14.0.0",
90
+ "react": ">=18.3.0 <19.0.0",
91
+ "react-native": ">=0.76.0 <0.77.0",
92
+ "react-native-safe-area-context": "~4.12.0",
93
+ "react-native-webview": "~13.12.5",
94
+ "react-native-screens": "~4.4.0",
95
+ "react-native-svg": "^15.8.0"
96
+ },
97
+ "peerDependenciesMeta": {
98
+ "react-native-svg": {
99
+ "optional": true
100
+ }
98
101
  },
99
102
  "devDependencies": {
100
103
  "@testing-library/jest-native": "^5.4.3",
@@ -103,20 +106,19 @@
103
106
  "@types/react": "~18.3.0",
104
107
  "del-cli": "^7.0.0",
105
108
  "expo": "~52.0.0",
106
- "expo-device": "~7.0.0",
107
109
  "expo-font": "~13.0.0",
108
110
  "expo-linear-gradient": "~14.0.0",
109
111
  "expo-linking": "~7.0.0",
110
- "expo-location": "~18.0.0",
111
112
  "expo-secure-store": "~14.0.0",
112
113
  "expo-web-browser": "~14.0.0",
113
114
  "jest": "^29.7.0",
114
115
  "jest-expo": "~52.0.0",
115
116
  "react": "18.3.1",
116
- "react-native": "0.76.0",
117
+ "react-native": "0.76.9",
117
118
  "react-native-builder-bob": "^0.43.0",
118
119
  "react-native-safe-area-context": "~4.12.0",
119
- "react-native-screens": "~4.1.0",
120
+ "react-native-webview": "~13.12.5",
121
+ "react-native-screens": "~4.4.0",
120
122
  "react-test-renderer": "18.3.1",
121
123
  "typescript": "^5.6.2"
122
124
  }