tf-checkout-react 1.7.31 → 2.0.0-beta.0

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 (453) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +141 -1033
  3. package/dist/checkout.css +17 -0
  4. package/dist/index.d.mts +3930 -0
  5. package/dist/index.d.ts +3930 -30
  6. package/dist/index.esm.js +9123 -0
  7. package/dist/index.esm.js.map +1 -0
  8. package/dist/index.js +9277 -6
  9. package/dist/index.js.map +1 -0
  10. package/dist/styles/addons.css +75 -0
  11. package/dist/styles/auth.css +294 -0
  12. package/dist/styles/billing.css +98 -0
  13. package/dist/styles/confirmation.css +51 -0
  14. package/dist/styles/foundation.css +146 -0
  15. package/dist/styles/payment.css +179 -0
  16. package/dist/styles/primitives.css +356 -0
  17. package/dist/styles/seat-map.css +46 -0
  18. package/dist/styles/tickets.css +285 -0
  19. package/dist/styles/verification-confirmation.css +258 -0
  20. package/package.json +93 -78
  21. package/src/.d.ts +1 -1
  22. package/src/CardInput.tsx +374 -0
  23. package/src/EmbeddedCheckout.tsx +400 -0
  24. package/src/ResumedCheckout.tsx +132 -0
  25. package/src/auth/AuthModal.tsx +231 -0
  26. package/src/auth/ForgotPasswordForm.tsx +93 -0
  27. package/src/auth/LoginForm.tsx +104 -0
  28. package/src/auth/PasswordInput.tsx +33 -0
  29. package/src/auth/RegisterForm.tsx +333 -0
  30. package/src/auth/ResetPasswordForm.tsx +112 -0
  31. package/src/auth/index.ts +5 -0
  32. package/src/checkout.css +17 -0
  33. package/src/configure.ts +29 -0
  34. package/src/confirmer.ts +439 -0
  35. package/src/index.ts +41 -30
  36. package/src/instance.ts +21 -0
  37. package/src/sections/AddOns.tsx +241 -0
  38. package/src/sections/BillingInfo.tsx +743 -0
  39. package/src/sections/Confirmation.tsx +146 -0
  40. package/src/sections/IDVerification.tsx +76 -0
  41. package/src/sections/OrderConfirmation.tsx +277 -0
  42. package/src/sections/OrderIDVerification.tsx +117 -0
  43. package/src/sections/OrderSummary.tsx +84 -0
  44. package/src/sections/Payment.tsx +541 -0
  45. package/src/sections/SeatMap.tsx +512 -0
  46. package/src/sections/Tickets.tsx +573 -0
  47. package/src/sections/billing/BillingAddressFields.tsx +138 -0
  48. package/src/sections/billing/BuyerField.tsx +75 -0
  49. package/src/sections/billing/TicketHoldersCard.tsx +119 -0
  50. package/src/sections/billing/types.ts +10 -0
  51. package/src/sections/index.ts +15 -0
  52. package/src/sections/seatMap.utils.ts +105 -0
  53. package/src/styles/addons.css +75 -0
  54. package/src/styles/auth.css +294 -0
  55. package/src/styles/billing.css +98 -0
  56. package/src/styles/confirmation.css +51 -0
  57. package/src/styles/foundation.css +146 -0
  58. package/src/styles/payment.css +179 -0
  59. package/src/styles/primitives.css +356 -0
  60. package/src/styles/seat-map.css +46 -0
  61. package/src/styles/tickets.css +285 -0
  62. package/src/styles/verification-confirmation.css +258 -0
  63. package/src/typings.d.ts +2 -2
  64. package/src/ui/Button.tsx +38 -0
  65. package/src/ui/Card.tsx +54 -0
  66. package/src/ui/CheckoutProvider.tsx +172 -0
  67. package/src/ui/CustomFields.tsx +195 -0
  68. package/src/ui/Field.tsx +114 -0
  69. package/src/ui/I18nProvider.tsx +36 -0
  70. package/src/ui/InstallmentPicker.tsx +69 -0
  71. package/src/ui/Loader.tsx +12 -0
  72. package/src/ui/PaymentMethods.tsx +133 -0
  73. package/src/ui/PriceLine.tsx +24 -0
  74. package/src/ui/QuantitySelect.tsx +50 -0
  75. package/src/ui/Stepper.tsx +36 -0
  76. package/src/ui/Timer.tsx +34 -0
  77. package/src/ui/TimerBanner.tsx +55 -0
  78. package/src/ui/cx.ts +3 -0
  79. package/src/ui/index.ts +54 -0
  80. package/src/ui/theme.ts +83 -0
  81. package/src/useCheckout.ts +35 -0
  82. package/src/xendit.ts +438 -0
  83. package/dist/adapters/customFields.d.ts +0 -12
  84. package/dist/adapters/index.d.ts +0 -1
  85. package/dist/api/auth.d.ts +0 -27
  86. package/dist/api/cart.d.ts +0 -2
  87. package/dist/api/checkout.d.ts +0 -3
  88. package/dist/api/common.d.ts +0 -11
  89. package/dist/api/guestTicketDelegation.d.ts +0 -47
  90. package/dist/api/index.d.ts +0 -82
  91. package/dist/api/interceptors.d.ts +0 -1
  92. package/dist/api/orders.d.ts +0 -2
  93. package/dist/api/payment.d.ts +0 -5
  94. package/dist/api/preRegistrationComplete.d.ts +0 -3
  95. package/dist/api/publicRequest.d.ts +0 -9
  96. package/dist/api/resale.d.ts +0 -5
  97. package/dist/components/account-settings/index.d.ts +0 -3
  98. package/dist/components/addonsContainer/AddonComponent.d.ts +0 -18
  99. package/dist/components/addonsContainer/SimpleAddonsContainer.d.ts +0 -20
  100. package/dist/components/addonsContainer/adapters/index.d.ts +0 -12
  101. package/dist/components/addonsContainer/index.d.ts +0 -22
  102. package/dist/components/addonsContainer/normalizers/index.d.ts +0 -1
  103. package/dist/components/addonsContainer/useAddons.d.ts +0 -23
  104. package/dist/components/addonsContainer/utils/index.d.ts +0 -16
  105. package/dist/components/billing-info-container/hooks/index.d.ts +0 -3
  106. package/dist/components/billing-info-container/hooks/usePaymentContext.d.ts +0 -5
  107. package/dist/components/billing-info-container/hooks/usePaymentRedirect.d.ts +0 -14
  108. package/dist/components/billing-info-container/hooks/useStripePayment.d.ts +0 -18
  109. package/dist/components/billing-info-container/index.d.ts +0 -69
  110. package/dist/components/billing-info-container/utils.d.ts +0 -59
  111. package/dist/components/common/Checkbox.d.ts +0 -11
  112. package/dist/components/common/CheckboxField/index.d.ts +0 -9
  113. package/dist/components/common/CopyField.d.ts +0 -12
  114. package/dist/components/common/CopyMessageModal.d.ts +0 -7
  115. package/dist/components/common/CustomField.d.ts +0 -26
  116. package/dist/components/common/DatePickerField.d.ts +0 -20
  117. package/dist/components/common/FieldSection/index.d.ts +0 -19
  118. package/dist/components/common/FieldSection/utils/index.d.ts +0 -8
  119. package/dist/components/common/FormikPhoneNumberField.d.ts +0 -11
  120. package/dist/components/common/Loader.d.ts +0 -2
  121. package/dist/components/common/ModalComponent/index.d.ts +0 -16
  122. package/dist/components/common/NativeSelectFeild/index.d.ts +0 -21
  123. package/dist/components/common/PhoneNumberField.d.ts +0 -14
  124. package/dist/components/common/PoweredBy.d.ts +0 -2
  125. package/dist/components/common/RadioField.d.ts +0 -11
  126. package/dist/components/common/RadioGroupField/index.d.ts +0 -17
  127. package/dist/components/common/RedirectModal.d.ts +0 -7
  128. package/dist/components/common/SelectField/index.d.ts +0 -19
  129. package/dist/components/common/SnackbarAlert.d.ts +0 -13
  130. package/dist/components/common/index.d.ts +0 -11
  131. package/dist/components/common/socials.d.ts +0 -10
  132. package/dist/components/confirmModal/index.d.ts +0 -10
  133. package/dist/components/confirmationContainer/config.d.ts +0 -1
  134. package/dist/components/confirmationContainer/index.d.ts +0 -46
  135. package/dist/components/confirmationContainer/social-buttons.d.ts +0 -16
  136. package/dist/components/countdown/index.d.ts +0 -14
  137. package/dist/components/delegationsContainer/IssueComponent.d.ts +0 -10
  138. package/dist/components/delegationsContainer/IssueTicketForm.d.ts +0 -9
  139. package/dist/components/delegationsContainer/TicketsAssignedTable.d.ts +0 -11
  140. package/dist/components/delegationsContainer/TicketsAvailableTable.d.ts +0 -11
  141. package/dist/components/delegationsContainer/index.d.ts +0 -10
  142. package/dist/components/forgotPasswordModal/index.d.ts +0 -12
  143. package/dist/components/idVerificationContainer/VerificationPendingModal.d.ts +0 -10
  144. package/dist/components/idVerificationContainer/constants.d.ts +0 -21
  145. package/dist/components/idVerificationContainer/index.d.ts +0 -16
  146. package/dist/components/index.d.ts +0 -12
  147. package/dist/components/loginForm/index.d.ts +0 -31
  148. package/dist/components/loginModal/SignUpForm.d.ts +0 -10
  149. package/dist/components/loginModal/constants.d.ts +0 -39
  150. package/dist/components/loginModal/index.d.ts +0 -22
  151. package/dist/components/myTicketsContainer/index.d.ts +0 -16
  152. package/dist/components/myTicketsContainer/row.d.ts +0 -3
  153. package/dist/components/myTicketsContainer/tableConfig.d.ts +0 -5
  154. package/dist/components/orderDetailsContainer/CustomFieldsForm.d.ts +0 -12
  155. package/dist/components/orderDetailsContainer/TicketHolderCustomFields.d.ts +0 -10
  156. package/dist/components/orderDetailsContainer/index.d.ts +0 -66
  157. package/dist/components/orderDetailsContainer/ticketsTable.d.ts +0 -46
  158. package/dist/components/orderDetailsContainer/utils/index.d.ts +0 -6
  159. package/dist/components/paymentContainer/OrderDetails.d.ts +0 -9
  160. package/dist/components/paymentContainer/PaymentPlanSection.d.ts +0 -10
  161. package/dist/components/paymentContainer/handlePayment.d.ts +0 -15
  162. package/dist/components/paymentContainer/index.d.ts +0 -39
  163. package/dist/components/preRegistration/FieldsSection.d.ts +0 -19
  164. package/dist/components/preRegistration/Influancers.d.ts +0 -2
  165. package/dist/components/preRegistration/PreRegistrationComplete.d.ts +0 -13
  166. package/dist/components/preRegistration/PreRegistrationInformations.d.ts +0 -2
  167. package/dist/components/preRegistration/Prewards.d.ts +0 -2
  168. package/dist/components/preRegistration/ShareOptions.d.ts +0 -2
  169. package/dist/components/preRegistration/constants.d.ts +0 -2
  170. package/dist/components/preRegistration/index.d.ts +0 -23
  171. package/dist/components/preRegistration/utils.d.ts +0 -12
  172. package/dist/components/registerForm/adapters/index.d.ts +0 -4
  173. package/dist/components/registerForm/constants.d.ts +0 -1
  174. package/dist/components/registerForm/index.d.ts +0 -16
  175. package/dist/components/registerModal/index.d.ts +0 -12
  176. package/dist/components/resetPasswordContainer/index.d.ts +0 -10
  177. package/dist/components/rsvpContainer/index.d.ts +0 -7
  178. package/dist/components/seatMapContainer/SeatMapComponent.d.ts +0 -8
  179. package/dist/components/seatMapContainer/TicketsSection.d.ts +0 -9
  180. package/dist/components/seatMapContainer/addToCart.d.ts +0 -14
  181. package/dist/components/seatMapContainer/index.d.ts +0 -2
  182. package/dist/components/seatMapContainer/utils.d.ts +0 -6
  183. package/dist/components/signupModal/index.d.ts +0 -12
  184. package/dist/components/ticketResale/index.d.ts +0 -12
  185. package/dist/components/ticketResaleModal/index.d.ts +0 -19
  186. package/dist/components/ticketsContainer/AccessCodeSection.d.ts +0 -7
  187. package/dist/components/ticketsContainer/InfoIcon.d.ts +0 -5
  188. package/dist/components/ticketsContainer/PromoCodeSection.d.ts +0 -15
  189. package/dist/components/ticketsContainer/ReferralLogic.d.ts +0 -5
  190. package/dist/components/ticketsContainer/TicketRow.d.ts +0 -13
  191. package/dist/components/ticketsContainer/TicketsSection.d.ts +0 -20
  192. package/dist/components/ticketsContainer/TimeSlotTicketRow.d.ts +0 -19
  193. package/dist/components/ticketsContainer/TimeSlotsSection.d.ts +0 -25
  194. package/dist/components/ticketsContainer/index.d.ts +0 -93
  195. package/dist/components/ticketsContainer/utils.d.ts +0 -13
  196. package/dist/components/timerWidget/index.d.ts +0 -16
  197. package/dist/components/waitingList/index.d.ts +0 -9
  198. package/dist/constants/index.d.ts +0 -7
  199. package/dist/env.d.ts +0 -16
  200. package/dist/hoc/CustomFields/index.d.ts +0 -3
  201. package/dist/hoc/index.d.ts +0 -1
  202. package/dist/hooks/index.d.ts +0 -1
  203. package/dist/hooks/useCookieListener.d.ts +0 -1
  204. package/dist/hooks/useEventListener.d.ts +0 -1
  205. package/dist/hooks/useLocalStorageListener.d.ts +0 -1
  206. package/dist/hooks/useOnline.d.ts +0 -1
  207. package/dist/hooks/usePixel.d.ts +0 -6
  208. package/dist/images/Polygon.png +0 -0
  209. package/dist/images/cross.svg +0 -44
  210. package/dist/images/done.svg +0 -3
  211. package/dist/images/edit.svg +0 -10
  212. package/dist/images/email.svg +0 -1
  213. package/dist/images/instagram.svg +0 -5
  214. package/dist/images/logo-ttf.png +0 -0
  215. package/dist/images/spotify.svg +0 -6
  216. package/dist/images/user.svg +0 -1
  217. package/dist/images/xmark.svg +0 -92
  218. package/dist/normalizers/index.d.ts +0 -4
  219. package/dist/tf-checkout-react.cjs.development.js +0 -16149
  220. package/dist/tf-checkout-react.cjs.development.js.map +0 -1
  221. package/dist/tf-checkout-react.cjs.production.min.js +0 -2
  222. package/dist/tf-checkout-react.cjs.production.min.js.map +0 -1
  223. package/dist/tf-checkout-react.esm.js +0 -16116
  224. package/dist/tf-checkout-react.esm.js.map +0 -1
  225. package/dist/tf-checkout-styles.css +0 -1
  226. package/dist/types/add_on.d.ts +0 -8
  227. package/dist/types/billing-info-data.d.ts +0 -27
  228. package/dist/types/checkoutPageConfigs.d.ts +0 -13
  229. package/dist/types/index.d.ts +0 -6
  230. package/dist/types/order-data.d.ts +0 -15
  231. package/dist/types/payment-field.d.ts +0 -6
  232. package/dist/types/payment-plan-configuration.d.ts +0 -18
  233. package/dist/types/referral-promotion.d.ts +0 -6
  234. package/dist/types/verification.d.ts +0 -12
  235. package/dist/utils/adaptStripeErrors.d.ts +0 -8
  236. package/dist/utils/auth.d.ts +0 -21
  237. package/dist/utils/cookies.d.ts +0 -3
  238. package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +0 -23
  239. package/dist/utils/createMarkup.d.ts +0 -3
  240. package/dist/utils/customFields.d.ts +0 -35
  241. package/dist/utils/downloadPDF.d.ts +0 -1
  242. package/dist/utils/form.d.ts +0 -3
  243. package/dist/utils/formikErrorFocus.d.ts +0 -2
  244. package/dist/utils/getDomain.d.ts +0 -1
  245. package/dist/utils/getImage.d.ts +0 -1
  246. package/dist/utils/getQueryVariable.d.ts +0 -1
  247. package/dist/utils/htmlNodeFromString.d.ts +0 -1
  248. package/dist/utils/index.d.ts +0 -15
  249. package/dist/utils/isBrowser.d.ts +0 -1
  250. package/dist/utils/isValidNumber.d.ts +0 -1
  251. package/dist/utils/jsonUtils.d.ts +0 -1
  252. package/dist/utils/replaceVarInString.d.ts +0 -1
  253. package/dist/utils/setConfigs.d.ts +0 -11
  254. package/dist/utils/showZero.d.ts +0 -1
  255. package/dist/validators/index.d.ts +0 -8
  256. package/src/adapters/customFields.ts +0 -85
  257. package/src/adapters/index.ts +0 -1
  258. package/src/api/auth.ts +0 -88
  259. package/src/api/cart.ts +0 -28
  260. package/src/api/checkout.ts +0 -28
  261. package/src/api/common.ts +0 -190
  262. package/src/api/guestTicketDelegation.ts +0 -79
  263. package/src/api/index.ts +0 -346
  264. package/src/api/interceptors.ts +0 -77
  265. package/src/api/orders.ts +0 -30
  266. package/src/api/payment.ts +0 -77
  267. package/src/api/preRegistrationComplete.ts +0 -37
  268. package/src/api/publicRequest.ts +0 -47
  269. package/src/api/resale.ts +0 -28
  270. package/src/assets/images/Polygon.png +0 -0
  271. package/src/assets/images/cross.svg +0 -44
  272. package/src/assets/images/done.svg +0 -3
  273. package/src/assets/images/edit.svg +0 -10
  274. package/src/assets/images/email.svg +0 -1
  275. package/src/assets/images/instagram.svg +0 -5
  276. package/src/assets/images/logo-ttf.png +0 -0
  277. package/src/assets/images/spotify.svg +0 -6
  278. package/src/assets/images/user.svg +0 -1
  279. package/src/assets/images/xmark.svg +0 -92
  280. package/src/components/account-settings/index.tsx +0 -161
  281. package/src/components/account-settings/style.css +0 -200
  282. package/src/components/addonsContainer/AddonComponent.tsx +0 -204
  283. package/src/components/addonsContainer/SimpleAddonsContainer.tsx +0 -459
  284. package/src/components/addonsContainer/adapters/index.tsx +0 -62
  285. package/src/components/addonsContainer/index.tsx +0 -353
  286. package/src/components/addonsContainer/normalizers/index.ts +0 -5
  287. package/src/components/addonsContainer/useAddons.ts +0 -248
  288. package/src/components/addonsContainer/utils/index.tsx +0 -231
  289. package/src/components/billing-info-container/hooks/index.ts +0 -3
  290. package/src/components/billing-info-container/hooks/usePaymentContext.ts +0 -22
  291. package/src/components/billing-info-container/hooks/usePaymentRedirect.ts +0 -145
  292. package/src/components/billing-info-container/hooks/useStripePayment.ts +0 -119
  293. package/src/components/billing-info-container/index.tsx +0 -1695
  294. package/src/components/billing-info-container/style.css +0 -150
  295. package/src/components/billing-info-container/utils.tsx +0 -413
  296. package/src/components/common/Checkbox.tsx +0 -51
  297. package/src/components/common/CheckboxField/index.tsx +0 -41
  298. package/src/components/common/CopyField.tsx +0 -53
  299. package/src/components/common/CopyMessageModal.tsx +0 -34
  300. package/src/components/common/CustomField.tsx +0 -168
  301. package/src/components/common/DatePickerField.tsx +0 -126
  302. package/src/components/common/FieldSection/index.tsx +0 -141
  303. package/src/components/common/FieldSection/utils/index.tsx +0 -92
  304. package/src/components/common/FormikPhoneNumberField.tsx +0 -51
  305. package/src/components/common/Loader.tsx +0 -8
  306. package/src/components/common/ModalComponent/index.tsx +0 -68
  307. package/src/components/common/NativeSelectFeild/index.tsx +0 -86
  308. package/src/components/common/PhoneNumberField.tsx +0 -117
  309. package/src/components/common/PoweredBy.tsx +0 -15
  310. package/src/components/common/RadioField.tsx +0 -36
  311. package/src/components/common/RadioGroupField/index.tsx +0 -76
  312. package/src/components/common/RedirectModal.tsx +0 -43
  313. package/src/components/common/SelectField/index.tsx +0 -104
  314. package/src/components/common/SnackbarAlert.tsx +0 -52
  315. package/src/components/common/index.tsx +0 -11
  316. package/src/components/common/socials.tsx +0 -33
  317. package/src/components/confirmModal/index.tsx +0 -60
  318. package/src/components/confirmationContainer/config.ts +0 -79
  319. package/src/components/confirmationContainer/index.tsx +0 -349
  320. package/src/components/confirmationContainer/social-buttons.tsx +0 -149
  321. package/src/components/confirmationContainer/style.css +0 -206
  322. package/src/components/countdown/index.tsx +0 -100
  323. package/src/components/countdown/style.css +0 -10
  324. package/src/components/delegationsContainer/IssueComponent.tsx +0 -156
  325. package/src/components/delegationsContainer/IssueTicketForm.tsx +0 -109
  326. package/src/components/delegationsContainer/TicketsAssignedTable.tsx +0 -55
  327. package/src/components/delegationsContainer/TicketsAvailableTable.tsx +0 -54
  328. package/src/components/delegationsContainer/index.tsx +0 -83
  329. package/src/components/forgotPasswordModal/index.tsx +0 -138
  330. package/src/components/forgotPasswordModal/style.css +0 -47
  331. package/src/components/idVerificationContainer/VerificationPendingModal.tsx +0 -47
  332. package/src/components/idVerificationContainer/constants.ts +0 -27
  333. package/src/components/idVerificationContainer/index.tsx +0 -323
  334. package/src/components/index.ts +0 -12
  335. package/src/components/loginForm/index.tsx +0 -202
  336. package/src/components/loginModal/SignUpForm.tsx +0 -329
  337. package/src/components/loginModal/constants.ts +0 -46
  338. package/src/components/loginModal/index.tsx +0 -263
  339. package/src/components/loginModal/style.css +0 -116
  340. package/src/components/myTicketsContainer/index.tsx +0 -228
  341. package/src/components/myTicketsContainer/row.tsx +0 -46
  342. package/src/components/myTicketsContainer/style.css +0 -40
  343. package/src/components/myTicketsContainer/tableConfig.tsx +0 -80
  344. package/src/components/myTicketsContainer/types.d.ts +0 -41
  345. package/src/components/orderDetailsContainer/CustomFieldsForm.tsx +0 -75
  346. package/src/components/orderDetailsContainer/TicketHolderCustomFields.tsx +0 -100
  347. package/src/components/orderDetailsContainer/index.tsx +0 -586
  348. package/src/components/orderDetailsContainer/style.css +0 -77
  349. package/src/components/orderDetailsContainer/ticketsTable.tsx +0 -246
  350. package/src/components/orderDetailsContainer/utils/index.tsx +0 -55
  351. package/src/components/paymentContainer/OrderDetails.tsx +0 -277
  352. package/src/components/paymentContainer/PaymentPlanSection.tsx +0 -169
  353. package/src/components/paymentContainer/handlePayment.ts +0 -86
  354. package/src/components/paymentContainer/index.tsx +0 -643
  355. package/src/components/paymentContainer/style.css +0 -196
  356. package/src/components/preRegistration/FieldsSection.tsx +0 -150
  357. package/src/components/preRegistration/Influancers.tsx +0 -34
  358. package/src/components/preRegistration/PreRegistrationComplete.tsx +0 -186
  359. package/src/components/preRegistration/PreRegistrationInformations.tsx +0 -60
  360. package/src/components/preRegistration/Prewards.tsx +0 -41
  361. package/src/components/preRegistration/ShareOptions.tsx +0 -77
  362. package/src/components/preRegistration/constants.tsx +0 -169
  363. package/src/components/preRegistration/index.tsx +0 -330
  364. package/src/components/preRegistration/style.css +0 -3
  365. package/src/components/preRegistration/utils.ts +0 -163
  366. package/src/components/registerForm/adapters/index.tsx +0 -10
  367. package/src/components/registerForm/constants.tsx +0 -98
  368. package/src/components/registerForm/index.tsx +0 -188
  369. package/src/components/registerModal/index.tsx +0 -154
  370. package/src/components/registerModal/style.css +0 -18
  371. package/src/components/resetPasswordContainer/index.tsx +0 -102
  372. package/src/components/resetPasswordContainer/style.css +0 -36
  373. package/src/components/rsvpContainer/index.tsx +0 -126
  374. package/src/components/seatMapContainer/SeatMapComponent.tsx +0 -77
  375. package/src/components/seatMapContainer/TicketsSection.tsx +0 -286
  376. package/src/components/seatMapContainer/addToCart.ts +0 -66
  377. package/src/components/seatMapContainer/index.tsx +0 -443
  378. package/src/components/seatMapContainer/utils.ts +0 -133
  379. package/src/components/signupModal/index.tsx +0 -178
  380. package/src/components/signupModal/style.css +0 -58
  381. package/src/components/ticketResale/index.tsx +0 -86
  382. package/src/components/ticketResaleModal/index.tsx +0 -224
  383. package/src/components/ticketResaleModal/style.css +0 -28
  384. package/src/components/ticketsContainer/AccessCodeSection.tsx +0 -50
  385. package/src/components/ticketsContainer/InfoIcon.tsx +0 -35
  386. package/src/components/ticketsContainer/PromoCodeSection.tsx +0 -116
  387. package/src/components/ticketsContainer/ReferralLogic.tsx +0 -33
  388. package/src/components/ticketsContainer/TicketRow.tsx +0 -107
  389. package/src/components/ticketsContainer/TicketsSection.tsx +0 -350
  390. package/src/components/ticketsContainer/TimeSlotTicketRow.tsx +0 -243
  391. package/src/components/ticketsContainer/TimeSlotsSection.tsx +0 -194
  392. package/src/components/ticketsContainer/index.tsx +0 -986
  393. package/src/components/ticketsContainer/style.css +0 -178
  394. package/src/components/ticketsContainer/utils.ts +0 -35
  395. package/src/components/timerWidget/index.tsx +0 -97
  396. package/src/components/timerWidget/style.css +0 -35
  397. package/src/components/waitingList/index.tsx +0 -190
  398. package/src/components/waitingList/style.css +0 -27
  399. package/src/constants/index.ts +0 -3
  400. package/src/env.ts +0 -29
  401. package/src/hoc/CustomFields/index.tsx +0 -85
  402. package/src/hoc/index.ts +0 -1
  403. package/src/hooks/index.ts +0 -1
  404. package/src/hooks/useCookieListener.ts +0 -32
  405. package/src/hooks/useEventListener.ts +0 -32
  406. package/src/hooks/useLocalStorageListener.ts +0 -32
  407. package/src/hooks/useOnline.ts +0 -21
  408. package/src/hooks/usePixel.ts +0 -88
  409. package/src/normalizers/index.ts +0 -49
  410. package/src/types/add_on.ts +0 -8
  411. package/src/types/api/auth.d.ts +0 -63
  412. package/src/types/api/axiosResponse.d.ts +0 -6
  413. package/src/types/api/cart.d.ts +0 -73
  414. package/src/types/api/checkout.d.ts +0 -92
  415. package/src/types/api/common.d.ts +0 -153
  416. package/src/types/api/guestTicketDelegation.d.ts +0 -18
  417. package/src/types/api/orders.d.ts +0 -116
  418. package/src/types/api/payment.d.ts +0 -180
  419. package/src/types/api/preRegistration.d.ts +0 -11
  420. package/src/types/api/preRegistrationComplete.d.ts +0 -95
  421. package/src/types/api/ticketResale.d.ts +0 -13
  422. package/src/types/billing-info-data.ts +0 -37
  423. package/src/types/checkoutPageConfigs.ts +0 -13
  424. package/src/types/formFields.d.ts +0 -29
  425. package/src/types/index.ts +0 -6
  426. package/src/types/order-data.ts +0 -16
  427. package/src/types/payment-field.ts +0 -7
  428. package/src/types/payment-plan-configuration.ts +0 -19
  429. package/src/types/pre-registration-complete.d.ts +0 -47
  430. package/src/types/referral-promotion.ts +0 -7
  431. package/src/types/seatMap.d.ts +0 -159
  432. package/src/types/verification.ts +0 -12
  433. package/src/utils/adaptStripeErrors.ts +0 -26
  434. package/src/utils/auth.ts +0 -45
  435. package/src/utils/cookies.ts +0 -73
  436. package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +0 -81
  437. package/src/utils/createMarkup.ts +0 -1
  438. package/src/utils/customFields.ts +0 -80
  439. package/src/utils/downloadPDF.tsx +0 -42
  440. package/src/utils/form.ts +0 -34
  441. package/src/utils/formikErrorFocus.ts +0 -24
  442. package/src/utils/getDomain.ts +0 -21
  443. package/src/utils/getImage.ts +0 -14
  444. package/src/utils/getQueryVariable.ts +0 -13
  445. package/src/utils/htmlNodeFromString.ts +0 -6
  446. package/src/utils/index.ts +0 -15
  447. package/src/utils/isBrowser.ts +0 -2
  448. package/src/utils/isValidNumber.ts +0 -8
  449. package/src/utils/jsonUtils.ts +0 -8
  450. package/src/utils/replaceVarInString.ts +0 -9
  451. package/src/utils/setConfigs.ts +0 -24
  452. package/src/utils/showZero.tsx +0 -10
  453. package/src/validators/index.ts +0 -61
@@ -0,0 +1,3930 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
2
+ import { UseMutationOptions, UseQueryOptions } from '@tanstack/react-query';
3
+ import React, { FC, CSSProperties, ReactNode, HTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
4
+ import { StripeCardElementOptions, StripePaymentElementOptions, StripeCardElement, StripeElements, Stripe } from '@stripe/stripe-js';
5
+
6
+ /**
7
+ * The one platform seam the SDK's transport needs: somewhere to keep tokens.
8
+ *
9
+ * Web passes a `localStorage`-backed adapter, React Native an MMKV-backed one.
10
+ * If a consumer configures nothing, we fall back to an in-memory map so the SDK
11
+ * still works in tests and SSR (tokens just don't survive a reload).
12
+ *
13
+ * Deliberately synchronous — web `localStorage` and RN MMKV are both sync, and
14
+ * a sync contract keeps the axios interceptors trivial. If you only have an
15
+ * async store (AsyncStorage), wrap it with a small sync mirror.
16
+ */
17
+ interface StorageAdapter {
18
+ getItem(key: string): string | null | undefined;
19
+ setItem(key: string, value: string): void;
20
+ removeItem(key: string): void;
21
+ }
22
+ /** Process-lifetime fallback store. Not persisted — good enough for tests/SSR. */
23
+ declare const createMemoryStorage: () => StorageAdapter;
24
+
25
+ /**
26
+ * One-time setup for the SDK. Call `configure()` at app start, before any
27
+ * `ttf.*` call or hook runs. Everything downstream (transport, session, api)
28
+ * reads this single record — there is no other global state.
29
+ */
30
+
31
+ type TtfEnv = 'PROD' | 'STAG' | 'DEV';
32
+ /**
33
+ * Extra auth material the consumer hands us — called on EVERY request; whatever
34
+ * headers it returns are merged in last (they win over the SDK's own). Pass a
35
+ * bearer token, a session cookie, an API key — anything. This is the flexible
36
+ * "bring your own auth" seam. Return `undefined` to add nothing this request.
37
+ */
38
+ type AuthProvider = () => Record<string, string> | undefined;
39
+ interface TtfConfig {
40
+ /** Host origin, e.g. `https://www.ticketfairy.com` — the `/api` path is
41
+ * appended internally. `''` = same-origin. Omit to use `env`. */
42
+ baseUrl?: string;
43
+ /** Picks the TicketFairy host when `baseUrl` is omitted. Defaults to PROD. */
44
+ env?: TtfEnv;
45
+ /** OAuth client id issued to your brand. */
46
+ clientId: string;
47
+ /** OAuth client secret issued to your brand. */
48
+ clientSecret: string;
49
+ /** Value for the `X-Source-Origin` header (your domain). Optional. */
50
+ sourceOrigin?: string;
51
+ /** Where tokens live. Defaults to an in-memory store (not persisted). */
52
+ storage?: StorageAdapter;
53
+ /** Bring-your-own auth: return headers to attach to every request (token,
54
+ * cookie, custom). Merged last, so it overrides the SDK's own headers. */
55
+ auth?: AuthProvider;
56
+ /** Cookie-based session auth: forward the `X-TF-ECOMMERCE` login ticket (+
57
+ * browser cookies where they exist) as headers, and capture the rotating
58
+ * ones back from responses. Sign-in rides the legacy `/auth` session flow —
59
+ * no bearer is minted, so the backend session that holds a reserved cart
60
+ * survives a mid-checkout login. Enable when the app shares a session cookie
61
+ * with TicketFairy (same-domain / SSO), runs anonymous cookie carts, or is a
62
+ * native app (React Native persists the ticket via the storage adapter —
63
+ * the RN `configureCheckout` turns this on by default). */
64
+ cookieAuth?: boolean;
65
+ }
66
+ /** Fully-resolved config — `storage`, `host`, and `apiBaseUrl` always present. */
67
+ interface ResolvedTtfConfig extends TtfConfig {
68
+ storage: StorageAdapter;
69
+ /** Host origin, no `/api` (e.g. `https://www.ticketfairy.com`). '' = same-origin. */
70
+ host: string;
71
+ /** The transport base: `<host>/api`. */
72
+ apiBaseUrl: string;
73
+ }
74
+ /** Wire the SDK. Idempotent — the last call wins. */
75
+ declare const configure: (config: TtfConfig) => void;
76
+ /** True once `configure()` has run. Lets callers branch without catching. */
77
+ declare const isConfigured: () => boolean;
78
+
79
+ declare class TtfError extends Error {
80
+ /** HTTP status, or 0 for network/transport failures. */
81
+ readonly status: number;
82
+ /** Backend error code when present (e.g. `INVALID_CREDENTIALS`). */
83
+ readonly code?: string;
84
+ /** The raw payload, for callers that need more than the message. */
85
+ readonly data?: unknown;
86
+ constructor(message: string, status: number, code?: string, data?: unknown);
87
+ }
88
+
89
+ declare const getAccessToken: () => string | null;
90
+ declare const getGuestToken: () => string | null;
91
+ declare const clearSession: () => void;
92
+ /**
93
+ * True when a signed-in access token is present. Cookie-enabled web consumers
94
+ * also recognize an existing legacy storefront session during migration.
95
+ */
96
+ declare const isAuthenticated: () => boolean;
97
+
98
+ /**
99
+ * Public types shared across api domains. Domain-specific request/response
100
+ * shapes live next to their api function; this file holds only what more than
101
+ * one domain needs (the backend envelopes, the profile record, geo).
102
+ */
103
+ /** The envelope the platform wraps single-object responses in. */
104
+ interface TfEnvelope<T> {
105
+ data: T;
106
+ success?: boolean;
107
+ message?: string;
108
+ status?: number;
109
+ error?: boolean;
110
+ }
111
+ /** The envelope list endpoints use: rows nested under `data.attributes`. */
112
+ interface TfListEnvelope<T> {
113
+ data: {
114
+ attributes: T[];
115
+ id?: string;
116
+ type?: string;
117
+ };
118
+ meta?: {
119
+ total?: number;
120
+ page?: number;
121
+ limit?: number;
122
+ [key: string]: unknown;
123
+ };
124
+ }
125
+ interface TfTicketHolder {
126
+ firstName: string | null;
127
+ lastName: string | null;
128
+ phone: string | null;
129
+ email: string | null;
130
+ }
131
+ /** The signed-in user's profile (mirrors the platform `IProfileData`). */
132
+ interface TfProfile {
133
+ id: number | string;
134
+ firstName: string;
135
+ lastName: string;
136
+ email: string;
137
+ phone?: string;
138
+ streetAddress?: string;
139
+ zipCode?: string | number;
140
+ countryId: string | number;
141
+ company: string | null;
142
+ stateId?: string | number;
143
+ city?: string;
144
+ username: string;
145
+ screenName: string | null;
146
+ bio: string | null;
147
+ shortBio: string | null;
148
+ region: string | null;
149
+ image: string | null;
150
+ recommendedEvents: unknown[];
151
+ rnRoles: string[];
152
+ hasDashboardAccess: boolean;
153
+ ticketHolders: TfTicketHolder[];
154
+ linkedCryptoWallets: string[];
155
+ }
156
+ interface TfCountry {
157
+ id: string | number;
158
+ name: string;
159
+ code?: string;
160
+ }
161
+ interface TfState {
162
+ id: string | number;
163
+ name: string;
164
+ code?: string;
165
+ }
166
+
167
+ type Id = string | number;
168
+
169
+ /**
170
+ * THE endpoint registry — every path the SDK calls, in one place, grouped by
171
+ * domain to mirror `api/`, `dtos/`, and the `ttf` facade. No api function spells
172
+ * a URL inline; they all read from here.
173
+ *
174
+ * Conventions:
175
+ * - Paths are relative to the transport base (`<host>/api`) — see `client/http`.
176
+ * A few legacy endpoints live off `/api` (`event/:id/time-slot-by-date`,
177
+ * `event/:id/reservation/refresh/`); those omit the `v1/` prefix on purpose.
178
+ * - `auth.contactEmail` is origin-rooted (NOT under `/api`) — it's joined with
179
+ * `getOriginUrl()` at the call site.
180
+ * - Static resources are string constants; parameterized ones are builder
181
+ * functions that take the id/hash. Dynamic query params (pagination, filters)
182
+ * are appended by the api function — only canonical flags that ARE the
183
+ * endpoint (`?payment_config=1`) are baked in here.
184
+ */
185
+
186
+ declare const ENDPOINTS: {
187
+ /** OAuth login, registration, password recovery, and identity verification. */
188
+ readonly auth: {
189
+ /** OAuth step 1 — exchange email+password for an authorization code. */
190
+ readonly authorizeRn: (clientId: Id) => string;
191
+ /** OAuth step 2 — exchange the code for an access token. */
192
+ readonly accessToken: "v1/oauth/access_token";
193
+ /** Create an account (multipart form data). */
194
+ readonly registerRn: "v1/oauth/register-rn";
195
+ /** Cookie session — `DELETE` to sign out. */
196
+ readonly session: "/auth";
197
+ /** Request a "forgot password" email (web). */
198
+ readonly restorePassword: "/auth/restore-password";
199
+ /** Request a "forgot password" email (React Native variant). */
200
+ readonly restorePasswordRn: "v1/oauth/restore-password-rn";
201
+ /** Complete a password reset with the token from the email. */
202
+ readonly resetPassword: "/auth/reset-password";
203
+ /** Existing-account lookup — ORIGIN-rooted + form-encoded, NOT under /api.
204
+ * Joined with `getOriginUrl()` at the call site. */
205
+ readonly contactEmail: "ajax/contact-email/";
206
+ /** Read the signed-in user's identity-verification status (Netverify). */
207
+ readonly verificationInfo: "v1/authenticate/get-verification-info";
208
+ /** `GET` mints the hosted verification URL; `PATCH` marks it PENDING. */
209
+ readonly verify: "v1/authenticate/verify";
210
+ };
211
+ /** The signed-in user's profile. */
212
+ readonly profile: {
213
+ readonly get: "/customer/profile/";
214
+ };
215
+ /** Billing-select geography. */
216
+ readonly geo: {
217
+ /** All selectable countries. */
218
+ readonly countries: "/countries/list";
219
+ /** States/provinces for a country (id→name map). */
220
+ readonly states: (countryId: Id) => string;
221
+ };
222
+ /** Event catalog + engagement — everything keyed by an event id. */
223
+ readonly events: {
224
+ /** `GET v1/event/:id` — event details (seated detection, slug, name). */
225
+ readonly info: (eventId: Id) => string;
226
+ /** Purchasable ticket types (+ promo/waiting-list metadata). */
227
+ readonly tickets: (eventId: Id) => string;
228
+ /** Ticket types for one date of a time-slot event (legacy, off /api). */
229
+ readonly timeSlotByDate: (eventId: Id) => string;
230
+ /** Event add-ons. */
231
+ readonly addOns: (eventId: Id) => string;
232
+ /** Custom-field groups (order / ticket / add-on scopes). */
233
+ readonly customFields: (eventId: Id) => string;
234
+ /** Terms/conditions the buyer may need to accept. */
235
+ readonly conditions: (eventId: Id) => string;
236
+ /** Apply a promo/access code to the session. */
237
+ readonly promo: (eventId: Id) => string;
238
+ /** Session currency preference (multi-currency events). */
239
+ readonly currency: (eventId: Id) => string;
240
+ /** Unlock a password-protected event. */
241
+ readonly authenticate: (eventId: Id) => string;
242
+ /** Tracking pixel (page view / order attribution). */
243
+ readonly track: (eventId: Id) => string;
244
+ /** Write ORDER-level custom-field values after the order exists. */
245
+ readonly orderDataCapture: (eventId: Id) => string;
246
+ /** Write TICKET-level (per-holder) custom-field values. */
247
+ readonly ticketDataCapture: (eventId: Id) => string;
248
+ /** Attribute the session to a referrer/promoter. */
249
+ readonly referrer: (eventId: Id) => string;
250
+ /** Join the sold-out waiting list. */
251
+ readonly waitingList: (eventId: Id) => string;
252
+ /** Submit RSVP details. */
253
+ readonly rsvp: (eventId: Id) => string;
254
+ };
255
+ /** Cart + pricing session. */
256
+ readonly cart: {
257
+ /** Read the cart back (pins the event's payment method into the session). */
258
+ readonly get: "v1/cart/";
259
+ /** Cart + pre-order payment config (identifies the gateway pre-order). */
260
+ readonly withPaymentConfig: "v1/cart?payment_config=1";
261
+ /** Cart + display-ready server price breakdown; optional add-on query. */
262
+ readonly withPriceBreakdown: (addOnsQuery?: string) => string;
263
+ /** Replace the whole cart with the current ticket selection. */
264
+ readonly addToCart: (eventId: Id) => string;
265
+ /** Price the cart (+ add-ons). */
266
+ readonly checkout: "v1/checkout";
267
+ /** Checkout gates for the current session (names_required, field gates). */
268
+ readonly checkoutConfigs: "v1/checkout-configs";
269
+ /** Payment-plan charge by explicit payment method (saved-card shortcut). */
270
+ readonly paymentPlan: (orderHash: string) => string;
271
+ };
272
+ /** Order lifecycle — create, review, finalize. */
273
+ readonly order: {
274
+ /** Create the order from buyer + holders + add-ons (the on-checkout body). */
275
+ readonly create: "v1/on-checkout/";
276
+ /** Post-order review — gateway identity + Stripe/plan secrets + totals. */
277
+ readonly review: (orderHash: string) => string;
278
+ /** Finalize a paid/pending order (emails receipt/voucher, defers webhook). */
279
+ readonly success: (orderHash: string) => string;
280
+ /** Complete a free (zero-total) registration. */
281
+ readonly completeFreeRegistration: (orderHash: string) => string;
282
+ /** Guard: does the signed-in user own this order hash. */
283
+ readonly verifyCustomer: (orderHash: string) => string;
284
+ /** ID-verification round trip (`?url=1` mints the provider session URL). */
285
+ readonly idVerification: (orderHash: string, mintUrl?: boolean) => string;
286
+ /** Confirmation-page payload for a completed order. */
287
+ readonly confirmation: (orderHash: string) => string;
288
+ };
289
+ /** Payment rails — the per-gateway wire after the order exists. */
290
+ readonly payment: {
291
+ /** Xendit charges (e-wallets AND cards) — form-encoded, not JSON:API. */
292
+ readonly submitPayment: (orderHash: string) => string;
293
+ /** OXXO: move the order to the pending-voucher state before the confirm. */
294
+ readonly prepareOxxo: (orderHash: string) => string;
295
+ /** Per-payment-method-type fee re-price (re-fetch the review after). */
296
+ readonly methodType: (orderHash: string) => string;
297
+ /** MSI installment offers (between PM creation and the confirm). */
298
+ readonly installmentOffers: (orderHash: string) => string;
299
+ /** MSI confirm (server-side; follow with handleNextAction only). */
300
+ readonly confirmInstallments: (orderHash: string) => string;
301
+ /** PayPal Standard step 1 — switch the placed order's method. */
302
+ readonly changeMethod: "v1/change-payment-method";
303
+ /** PayPal Standard step 2 — the {action_url, fields} to top-level POST. */
304
+ readonly paypalForm: (orderHash: string) => string;
305
+ /** Server-side confirm for redirect-based Stripe methods. */
306
+ readonly confirmRedirect: (orderHash: string) => string;
307
+ /** Schedule a payment plan against a new card's PaymentMethod. */
308
+ readonly paymentPlanCreate: (orderHash: string) => string;
309
+ };
310
+ /** Account — the buyer's own orders and tickets. */
311
+ readonly account: {
312
+ /** Order history (server-paginated; caller appends page/limit/filter query). */
313
+ readonly orders: "v1/account/orders/";
314
+ /** One order's full detail. */
315
+ readonly order: (orderId: Id) => string;
316
+ /** The buyer's tickets/wallet (caller appends the query). */
317
+ readonly tickets: "v1/account/tickets/";
318
+ /** Twilio-backed phone validation. */
319
+ readonly validatePhone: (phone: string) => string;
320
+ };
321
+ /** Ticket resale. */
322
+ readonly resale: {
323
+ readonly sell: (ticketId: Id) => string;
324
+ readonly process: (ticketId: Id) => string;
325
+ readonly decline: (ticketId: Id) => string;
326
+ };
327
+ /** Pre-registration ("register interest, then share"). */
328
+ readonly preRegistration: {
329
+ /** Confirm pre-registration for an event. */
330
+ readonly confirm: (eventId: Id) => string;
331
+ /** Influencers/promoters available to share to. */
332
+ readonly influencers: (eventId: Id) => string;
333
+ /** The post-confirm share page (options + current standing). */
334
+ readonly confirmationPage: (hash: string) => string;
335
+ /** Record a share action (a referral phase step). */
336
+ readonly submitAction: (hash: string) => string;
337
+ };
338
+ /** Guest ticket delegation (claim a ticket via an access link). */
339
+ readonly delegation: {
340
+ /** Whether the recipient already has an account. */
341
+ readonly customerExists: (accessHash: string) => string;
342
+ /** The claim page (event + ticket context). */
343
+ readonly consumerPageInfo: (accessHash: string) => string;
344
+ /** Issue (claim) the delegated ticket. */
345
+ readonly issueTicket: (accessHash: string) => string;
346
+ };
347
+ /** Seated events — the seat picker's wire. */
348
+ readonly seatmap: {
349
+ /** The venue seat map. */
350
+ readonly data: (eventId: Id) => string;
351
+ /** Live seat statuses (poll during selection). */
352
+ readonly statuses: (eventId: Id) => string;
353
+ /** Reserve a seat selection. */
354
+ readonly reserve: (eventId: Id) => string;
355
+ /** Release a held reservation. */
356
+ readonly deleteReserved: (eventId: Id) => string;
357
+ /** Extend a reservation's TTL (legacy, off /api). */
358
+ readonly refreshReservation: (eventId: Id) => string;
359
+ };
360
+ };
361
+ /** The `ENDPOINTS` shape, for callers that want to type against it. */
362
+ type Endpoints = typeof ENDPOINTS;
363
+
364
+ /**
365
+ * Gateway-level constant sets: which Stripe payment-method types re-price the
366
+ * order, and the Xendit processor rules. Pure data — the logic that reads them
367
+ * lives in `logic/`.
368
+ */
369
+ /** Non-single-charge Stripe payment modes: every type here re-prices the order
370
+ * before the client confirm. Card and wallet payments stay single_charge and
371
+ * skip the call. */
372
+ declare const FEE_MODE_PAYMENT_METHOD_TYPES: ReadonlySet<string>;
373
+ /** Xendit wallet keys that need one extra buyer-typed field before charging. */
374
+ declare const XENDIT_EWALLET_EXTRA_FIELD: Readonly<Record<string, string>>;
375
+ /** Xendit selector rows that are NOT one-tap e-wallet charges (cards tokenize
376
+ * client-side, bank transfers issue virtual accounts) — filter these out when
377
+ * offering the wallet buttons. */
378
+ declare const XENDIT_NON_EWALLET_PROCESSORS: ReadonlySet<string>;
379
+
380
+ /**
381
+ * Redirect-based Stripe payment methods (Klarna/Afterpay/Affirm/iDEAL-class)
382
+ * the WebView/popup round trip supports, keyed by the server's
383
+ * payment_method_types spelling.
384
+ */
385
+ declare const SUPPORTED_REDIRECT_METHODS: ReadonlySet<string>;
386
+ /** Filters a server `paymentMethodTypes` list to the redirect methods the flow
387
+ * supports (order preserved, unknown types dropped). */
388
+ declare const listRedirectMethods: (paymentMethodTypes?: string[] | null) => string[];
389
+
390
+ /**
391
+ * Event catalog shapes — tickets, add-ons, conditions, custom fields, buyer
392
+ * gates, currency. What the `events` api returns and the checkout UI renders.
393
+ */
394
+ /** A purchasable ticket type, normalized from the tickets endpoint. */
395
+ interface TicketType {
396
+ /** Encrypted ticket id — opaque; pass back verbatim in a TicketSelection. */
397
+ id: string;
398
+ name: string;
399
+ /** Optional catalog grouping shown as a heading above adjacent ticket types. */
400
+ groupName?: string | null;
401
+ /** Option key (e.g. "ticket_type") the cart payload needs. */
402
+ optionName: string;
403
+ price: number;
404
+ /** Price WITH booking fees added (the wire's `basePrice`) — shown as the
405
+ * "(… with fees)" sub-line. Equals `price` when the event has no fees. */
406
+ priceWithFees: number;
407
+ /** Display currency symbol from the wire (e.g. "₹", "US$"). Prefer this over
408
+ * the ISO `currency` code for rendering money the way the old checkout did. */
409
+ priceSymbol: string;
410
+ currency: string;
411
+ feeIncluded: boolean;
412
+ /** Deposit percentage for a table/deposit ticket (e.g. 50, 100), else null —
413
+ * rendered as "50% DEPOSIT". */
414
+ depositPercent: number | null;
415
+ soldOut: boolean;
416
+ /** Sales window has OPENED. `false` → "Sales not started"; combined with
417
+ * `salesEnded` it distinguishes not-yet-on-sale from closed. */
418
+ salesStarted: boolean;
419
+ salesEnded: boolean;
420
+ minQuantity: number;
421
+ maxQuantity: number;
422
+ /** Step between selectable quantities (the old checkout's `multiplier`) — the
423
+ * cart sells this type in blocks of N, so options run min, min+step, … Almost
424
+ * always 1. */
425
+ multiplier: number;
426
+ /** This type is a table: the quantity control picks the number of GUESTS at
427
+ * the table (bounded by `minGuests`/`maxGuests`), not a count of tickets. The
428
+ * chosen guest count is what the cart quantity carries. */
429
+ isTable: boolean;
430
+ /** Table only — the fewest guests the table may be booked for (its real floor;
431
+ * e.g. a "full table" forces the minimum). Ignore for non-tables. */
432
+ minGuests?: number;
433
+ /** Table only — the most guests the table seats. Ignore for non-tables. */
434
+ maxGuests?: number;
435
+ /** On a SEATED event, this type can still be bought directly (a quantity
436
+ * dropdown) instead of going through the seat map. When false on a seated
437
+ * event, the type is picked on the map — the ticket screen shows it read-only
438
+ * and routes to "Select seats". Meaningless for non-seated events. */
439
+ allowDirectPurchase: boolean;
440
+ /** This sold-out type accepts waiting-list sign-ups — offer a "join the
441
+ * waiting list" affordance and call `joinWaitingList` with this id. */
442
+ waitingListEnabled?: boolean;
443
+ waitingListMaxQuantity?: number;
444
+ /** Raw rich-text description (may contain HTML). */
445
+ descriptionRich: string | null;
446
+ /** Present for time-slot tickets: the session this id belongs to (display
447
+ * metadata only — the id already encodes the session). */
448
+ timeSlot?: {
449
+ date: string;
450
+ time: string;
451
+ };
452
+ }
453
+ /** What the user picked on the tickets screen. */
454
+ interface TicketSelection {
455
+ id: string;
456
+ name: string;
457
+ optionName: string;
458
+ price: number;
459
+ quantity: number;
460
+ currency: string;
461
+ }
462
+ /**
463
+ * One reserved seat resolved to a cart line — the seat-map analogue of
464
+ * `TicketSelection`. Built by `<SeatMap/>` from the reserved seat + the buyer's
465
+ * chosen ticket type (and, for table/group tiers, the guest count), then fed to
466
+ * `checkout.setSeats(eventId, lines)`. Mirrors the fields the legacy
467
+ * `seatMapContainer` used to POST a seated add-to-cart.
468
+ */
469
+ interface SeatLine {
470
+ /** `"rowId:seatIndex"` — the reservation key that holds this seat server-side. */
471
+ seatId: string;
472
+ /** The seat's tier id (from `getTierIdBasedOnSeatId`). */
473
+ tierId: string;
474
+ /** Chosen ticket type id (`TicketTypeTierRelationsData.ticket_type_id`). */
475
+ ticketTypeId: string;
476
+ /** The type's option-matrix key (`ticket_type_option`) — the `product_options` key. */
477
+ optionName: string;
478
+ /** Unit price (`ticket_type_price`). */
479
+ price: number;
480
+ /** Guest count, present ONLY for guest-capable (table/group) types. */
481
+ guests?: number;
482
+ }
483
+ /** A waiting-list sign-up for a sold-out event or ticket type. */
484
+ interface WaitingListEntry {
485
+ firstName: string;
486
+ lastName: string;
487
+ email: string;
488
+ /** Restrict to one sold-out ticket type (its `TicketType.id`). */
489
+ ticketTypeId?: string;
490
+ quantity?: number;
491
+ }
492
+ /**
493
+ * An event terms/conditions block the buyer may need to accept. CLIENT-SIDE
494
+ * gate only (nothing is sent — the server already knows the conditions): the
495
+ * pre-flight blocks placement until every `isRequired` block is accepted.
496
+ */
497
+ interface EventCondition {
498
+ id: string;
499
+ name: string;
500
+ /** The condition text (may contain HTML). */
501
+ content: string;
502
+ isRequired: boolean;
503
+ }
504
+ interface EventAddon {
505
+ /** Raw numeric add-on id (string) — the key in the add-ons map. */
506
+ id: string;
507
+ name: string;
508
+ /** May contain HTML. */
509
+ description: string | null;
510
+ /** Price in currency units (the wire sends cents; converted here). */
511
+ price: number;
512
+ currency: string;
513
+ feeIncluded: boolean;
514
+ imageUrl: string | null;
515
+ /**
516
+ * Public reads send only a SOLD-OUT SIGNAL, never a count: `0` = sold out,
517
+ * `null` = available (see AddOnService::public_stock_signal). Never treat it
518
+ * as a quantity cap — the remaining stock is already folded into
519
+ * `maxQuantity` server-side.
520
+ */
521
+ stock: number | null;
522
+ /** Per-order cap, already min'd with available stock. null = unset. */
523
+ maxQuantity: number | null;
524
+ /** Cap the quantity to the number of tickets in the cart. */
525
+ flagLimitToTicketQuantity: boolean;
526
+ /** Per-ticket cap — the bound is `limitPerTicket × ticketQuantity`. null = unset. */
527
+ limitPerTicket: number | null;
528
+ /** A yes/no add-on: the quantity is 0 or 1, rendered as a checkbox. */
529
+ isCheckbox: boolean;
530
+ /** What the add-on attaches to — `'ticket'` or `'order'`. */
531
+ level: string | null;
532
+ /** Group heading shown on the web (e.g. "Do you need transportation?"). */
533
+ groupName: string | null;
534
+ /** Backend "required" flag: an in-stock required add-on must be selected
535
+ * before placing the order (sold-out required add-ons are exempt). */
536
+ required: boolean;
537
+ /** Raw ticket-type ids this add-on applies to. Empty/null = any ticket. */
538
+ prerequisiteTicketTypeIds: string[] | null;
539
+ }
540
+ /** `{ [rawAddOnId]: quantity }` */
541
+ type AddonSelection = Record<string, number>;
542
+ /** A required-add-on shape the pre-flight checks (the api's `EventAddon`
543
+ * satisfies this; sold-out required add-ons are exempt). */
544
+ interface RequiredAddOnLike {
545
+ id: string | number;
546
+ name?: string;
547
+ required?: boolean;
548
+ /** null/undefined = untracked (never sold out); explicit 0 = sold out. */
549
+ stock?: number | null;
550
+ active?: boolean;
551
+ }
552
+ type CustomFieldType = 'text' | 'textarea' | 'phone' | 'email' | 'radio' | 'select' | 'select_multi' | 'checkbox' | 'image';
553
+ interface CustomFieldOption {
554
+ id: string;
555
+ /** Display label. */
556
+ name: string;
557
+ /** The value the backend expects submitted. */
558
+ value: string;
559
+ }
560
+ /** One event custom field (order- or ticket-scoped). */
561
+ interface EventCustomField {
562
+ id: string;
563
+ /** Wire key for the captured value (`data_capture[name]`). */
564
+ name: string;
565
+ label: string;
566
+ type: CustomFieldType;
567
+ required: boolean;
568
+ description: string | null;
569
+ /** Normalized default: checkbox → '1'|null; select_multi → string[]; else
570
+ * string. */
571
+ defaultValue: string | string[] | null;
572
+ options: CustomFieldOption[];
573
+ /** Ticket-type scoping: a TICKET field applies only to holders whose
574
+ * ticketTypeId is in this list. Null = all ticket types. */
575
+ ticketTypeIds: string[] | null;
576
+ }
577
+ interface EventCustomFieldGroup {
578
+ id: string;
579
+ label: string | null;
580
+ /** 'order' fields ride data_capture; 'ticket' fields ride each holder's
581
+ * ticket_data_capture; 'add-on' fields ride add_on_data_capture keyed by
582
+ * this group's id (the add-on id). */
583
+ scope: 'order' | 'ticket' | 'add-on';
584
+ fields: EventCustomField[];
585
+ }
586
+ /** Captured values: `{ [field.name]: value }` (string, or string[] for
587
+ * select_multi). */
588
+ type CustomFieldValues = Record<string, string | string[]>;
589
+ /** Raw gate flags off `GET v1/checkout-configs` (next_page_info). */
590
+ interface FieldGates {
591
+ show_nationality_field?: boolean;
592
+ nationality_field_required?: boolean;
593
+ show_gender_field?: boolean;
594
+ gender_field_required?: boolean;
595
+ require_instagram?: boolean;
596
+ /** Phone number: shown unless hidden; required when `phone_required`. */
597
+ phone_required?: boolean;
598
+ hide_phone_field?: boolean;
599
+ /** Date of birth / age verification. */
600
+ age_required?: boolean;
601
+ minimum_age?: number | string | null;
602
+ /** Free tickets skip the address block. */
603
+ free_ticket?: boolean;
604
+ }
605
+ /** Evaluated buyer-field visibility (render gated fields when shown). */
606
+ interface BuyerFieldVisibility {
607
+ showNationality: boolean;
608
+ nationalityRequired: boolean;
609
+ showGender: boolean;
610
+ genderRequired: boolean;
611
+ requireInstagram: boolean;
612
+ /** Phone number field. */
613
+ showPhone: boolean;
614
+ phoneRequired: boolean;
615
+ /** Date of birth (age verification); `minimumAge` when the event sets one. */
616
+ showDob: boolean;
617
+ dobRequired: boolean;
618
+ minimumAge?: number;
619
+ /** Postal address block (street/city/state/country/zip) — paid events only. */
620
+ showAddress: boolean;
621
+ }
622
+ interface CurrencyOption {
623
+ code: string;
624
+ name: string;
625
+ }
626
+ interface CurrencyState {
627
+ currency: string;
628
+ symbol: string;
629
+ default: string;
630
+ available: CurrencyOption[];
631
+ }
632
+ interface CurrencySync {
633
+ state: CurrencyState;
634
+ /** True after an explicit switch: refetch the catalog and reset any ticket
635
+ * selection (a currency change is a full reprice). */
636
+ requiresCatalogRefresh: boolean;
637
+ }
638
+ interface CurrencySyncOptions {
639
+ /** Replay a carried-over currency as a default: fills an empty preference,
640
+ * never overwrites the buyer's own switch. */
641
+ seed?: boolean;
642
+ }
643
+ type CurrencyTransport = (eventId: string | number, code?: string, options?: CurrencySyncOptions) => Promise<CurrencyState>;
644
+
645
+ /**
646
+ * Pricing shapes — the server-priced breakdown, Stripe config, payment-plan
647
+ * availability, wallet availability, and the display-ready price-breakdown rows.
648
+ */
649
+ interface BreakdownLine {
650
+ name: string;
651
+ quantity: number;
652
+ unit: string;
653
+ total: number;
654
+ /** NUMERIC decrypted ticket-type id for this line — pass to each holder as
655
+ * `CheckoutHolder.ticketTypeId`. */
656
+ ticketTypeId: string;
657
+ }
658
+ /** Server-priced cart breakdown (authoritative totals incl. fees). */
659
+ interface CheckoutBreakdown {
660
+ total: number;
661
+ totalAddOns: number;
662
+ currencyCode: string;
663
+ currencySymbol: string;
664
+ tickets: BreakdownLine[];
665
+ }
666
+ interface StripeConfig {
667
+ publishableKey: string;
668
+ accountId: string | null;
669
+ }
670
+ /**
671
+ * Pre-order installment preview (display-only). Every field optional since
672
+ * older backends omit the block.
673
+ *
674
+ * This mirrors the FULL `payment_plan_configuration` the backend already sends
675
+ * (Checkout.php `$stripe_payment_plan_configuration`). The admin-fee and
676
+ * non-refundable fields are financial disclosures, not decoration — the hosted
677
+ * terms block states what a buyer forfeits on default, so anything that renders
678
+ * a plan must be able to say the same. See `paymentPlanTerms`.
679
+ */
680
+ interface CheckoutPaymentPlanPreview {
681
+ interval?: number;
682
+ totalInstallments?: number;
683
+ pricePerInstallment?: number;
684
+ total?: number;
685
+ downPaymentEnabled?: boolean;
686
+ downPaymentAmount?: number | null;
687
+ currency?: string;
688
+ currencySymbol?: string;
689
+ customMessage?: string | null;
690
+ /** Brand's word for the plan ("Payment Plan", "Layaway", …). Drives copy. */
691
+ terminology?: string;
692
+ manufacturerName?: string;
693
+ /** Equal installments with no separate down payment — changes the wording. */
694
+ isAutoEqual?: boolean;
695
+ /** A per-installment admin fee applies. */
696
+ hasAdminFee?: boolean;
697
+ /** The per-installment admin fee amount. */
698
+ adminFee?: number | null;
699
+ /** How the non-refundable amount is expressed on default. */
700
+ nonRefundableType?: 'fixed' | 'percent' | null;
701
+ /** The percent (when `percent`) or the amount (when `fixed`). */
702
+ nonRefundableAmount?: number | null;
703
+ /** The resolved cash amount the buyer forfeits on default. */
704
+ totalNonRefundableAmount?: number | null;
705
+ /** Suppress the "and an admin fee of X for each installment" clause. */
706
+ hideNonRefundableAdminFeeText?: boolean;
707
+ /** Balance is charged on an absolute date, not "in {interval} days". */
708
+ isEventAnchored?: boolean;
709
+ /** The absolute final charge date, when event-anchored. */
710
+ finalChargeDate?: string | null;
711
+ /** Down-payment breakdown (the hosted templates' richer secondary lines). */
712
+ downPaymentMode?: string | null;
713
+ downPaymentScope?: string | null;
714
+ downPaymentPercent?: number | null;
715
+ downPaymentPerTicketAmount?: number | null;
716
+ downPaymentTicketCount?: number | null;
717
+ }
718
+ /** Payment-plan (installments) availability for a priced cart. */
719
+ interface CheckoutPaymentPlan {
720
+ available: boolean;
721
+ /** Last 4 of the reusable saved card the plan can charge directly. */
722
+ savedCardLast4?: string;
723
+ /** The installment preview to render the plan option. */
724
+ configuration?: CheckoutPaymentPlanPreview;
725
+ }
726
+ /** Native-wallet availability from the pricing response. Combine with the
727
+ * platform's own device-support check. Payment-plan mode suppresses both. */
728
+ interface CheckoutWalletAvailability {
729
+ applePay: boolean;
730
+ googlePay: boolean;
731
+ }
732
+ /** Raw `stripe_wallets` block off the pricing response. */
733
+ interface StripeWallets {
734
+ applePay?: boolean | string;
735
+ googlePay?: boolean | string;
736
+ }
737
+ /** Payment Element wallets option (`'auto'` shows, `'never'` hides). */
738
+ interface WalletsOption {
739
+ applePay: 'auto' | 'never';
740
+ googlePay: 'auto' | 'never';
741
+ }
742
+ interface PriceBreakdownFeeRow {
743
+ name: string;
744
+ amount: string;
745
+ }
746
+ interface PriceBreakdownTicketRow {
747
+ name: string;
748
+ quantity: number;
749
+ is_table: boolean;
750
+ guest_count: number;
751
+ guests_label: string | null;
752
+ unit_price: string;
753
+ original_price: string | null;
754
+ line_total: string;
755
+ fee_label: string | null;
756
+ fees_rows: PriceBreakdownFeeRow[];
757
+ discount: string | null;
758
+ description: string | null;
759
+ }
760
+ interface PriceBreakdownAddOnRow {
761
+ name: string;
762
+ quantity: number;
763
+ show_price: boolean;
764
+ unit_price: string;
765
+ line_total: string;
766
+ }
767
+ interface PriceBreakdown {
768
+ currency: string;
769
+ tickets: PriceBreakdownTicketRow[];
770
+ add_ons: PriceBreakdownAddOnRow[];
771
+ add_ons_title: string;
772
+ add_on_fee_label: string | null;
773
+ tax: PriceBreakdownFeeRow | null;
774
+ insurance: string | null;
775
+ debt: {
776
+ pay_now: string;
777
+ at_check_in: string;
778
+ } | null;
779
+ total: string;
780
+ }
781
+
782
+ /**
783
+ * Payment shapes — gateway identity, per-rail request/response bodies, and the
784
+ * interpreted outcomes the `payment` api and `logic/payment` produce.
785
+ */
786
+ /** Post-order gateway, from the review's payment_method block. */
787
+ type Gateway = 'stripe' | 'razorpay' | 'xendit' | 'unsupported';
788
+ /** Pre-order gateway, from the cart payment-config block. */
789
+ type PreOrderGateway = 'stripe_payment_intents' | 'xendit' | 'razorpay';
790
+ interface XenditProcessor {
791
+ key: string;
792
+ label: string;
793
+ icon?: string;
794
+ }
795
+ interface XenditPreOrderConfig {
796
+ publishableKey: string;
797
+ onBehalfOf: string | null;
798
+ processors: XenditProcessor[];
799
+ failureReasons: Record<string, string>;
800
+ ui: Record<string, string>;
801
+ }
802
+ interface PayPalTabConfig {
803
+ payment_method_id: number;
804
+ payment_method_hash: string;
805
+ title: string;
806
+ indication_text: string;
807
+ }
808
+ /** Pre-order deferred Stripe Elements config (single-page card mount). */
809
+ interface PreOrderPaymentConfig {
810
+ gateway: string;
811
+ basic_config: {
812
+ apiKey: string;
813
+ [key: string]: unknown;
814
+ };
815
+ elements_config: Record<string, unknown>;
816
+ additional_config?: Record<string, unknown> | null;
817
+ stripe_wallets?: Record<string, unknown> | null;
818
+ payment_plan_available: boolean;
819
+ payment_plan_configuration?: Record<string, unknown> | null;
820
+ setup_elements_config?: Record<string, unknown> | null;
821
+ }
822
+ interface PaymentMethodTypeInput {
823
+ paymentMethodType: string;
824
+ orderId: number | string;
825
+ orderHash: string;
826
+ /** pi_… — the intent id, or derive it from the review's client secret. */
827
+ stripeIntentId: string;
828
+ }
829
+ interface PaymentMethodTypeRequest {
830
+ payment_method_type: string;
831
+ order_id: number;
832
+ order_hash: string;
833
+ stripe_intent_id: string;
834
+ }
835
+ interface RedirectConfirmRequest {
836
+ payment_method_id: string;
837
+ return_url: string;
838
+ }
839
+ interface RedirectConfirmResponse {
840
+ status: string;
841
+ requires_action: boolean;
842
+ next_action_type?: string | null;
843
+ redirect_url?: string | null;
844
+ client_secret?: string;
845
+ }
846
+ type RedirectOutcome = {
847
+ kind: 'redirect';
848
+ url: string;
849
+ } | {
850
+ kind: 'settled';
851
+ status: string;
852
+ } | {
853
+ kind: 'inline_action';
854
+ clientSecret: string;
855
+ nextActionType: string;
856
+ }
857
+ /** requires_action without a redirect URL or client secret — never treat as
858
+ * settled. */
859
+ | {
860
+ kind: 'unresolved_action';
861
+ status: string;
862
+ };
863
+ interface OxxoVoucher {
864
+ voucherUrl: string;
865
+ voucherNumber: string | null;
866
+ /** Unix seconds when the voucher expires, when surfaced. */
867
+ expiresAt: number | null;
868
+ }
869
+ interface ChangePaymentMethodInput {
870
+ paymentMethodId: number;
871
+ paymentMethodHash: string;
872
+ orderId: number | string;
873
+ orderHash: string;
874
+ }
875
+ interface PayPalForm {
876
+ action_url: string;
877
+ fields: Record<string, string>;
878
+ }
879
+ interface SavedPlanCard {
880
+ last4: string;
881
+ paymentMethodId: string;
882
+ }
883
+ interface InstallmentOffer {
884
+ count: number;
885
+ interval: string;
886
+ type: string;
887
+ total?: number;
888
+ per_installment?: number;
889
+ total_formatted?: string;
890
+ per_installment_formatted?: string;
891
+ diff_from_original_formatted?: string;
892
+ currency?: string;
893
+ currency_symbol?: string;
894
+ [key: string]: unknown;
895
+ }
896
+ interface InstallmentOffers {
897
+ installments: InstallmentOffer[];
898
+ installmentsSupported: boolean;
899
+ original: {
900
+ total?: number;
901
+ total_formatted?: string;
902
+ has_table?: boolean;
903
+ };
904
+ }
905
+ interface XenditEWalletChargeInput {
906
+ orderId: number | string;
907
+ orderHash: string;
908
+ /** payment_processors row key: jenius_pay, ovo, dana, linkaja, gcash… */
909
+ paymentType: string;
910
+ /** Jenius Pay's $cashtag. */
911
+ cashtag?: string;
912
+ /** OVO's mobile number. */
913
+ phoneNumber?: string;
914
+ }
915
+ type XenditChargeOutcome = {
916
+ kind: 'redirect';
917
+ url: string;
918
+ notice: string | null;
919
+ } | {
920
+ kind: 'failed';
921
+ reason: string;
922
+ };
923
+ /**
924
+ * A gateway-agnostic descriptor the payment UI maps back to a `PaymentRequest`.
925
+ * This is the UI-facing projection of the engine's request union — same rails,
926
+ * without the per-rail parameters the engine fills in. Keeping the two unions
927
+ * in one file is what makes drift between them visible.
928
+ */
929
+ type PaymentMethodId = {
930
+ kind: 'card';
931
+ } | {
932
+ kind: 'xenditCard';
933
+ } | {
934
+ kind: 'applePay';
935
+ } | {
936
+ kind: 'googlePay';
937
+ } | {
938
+ kind: 'redirect';
939
+ methodType: string;
940
+ } | {
941
+ kind: 'oxxo';
942
+ } | {
943
+ kind: 'xenditEWallet';
944
+ walletKey: string;
945
+ } | {
946
+ kind: 'paypal';
947
+ } | {
948
+ kind: 'razorpay';
949
+ } | {
950
+ kind: 'paymentPlan';
951
+ };
952
+ /** One selectable row in the payment-method list. */
953
+ interface PaymentMethodOption {
954
+ id: PaymentMethodId;
955
+ /** Stable key for the list + the radio group's value. */
956
+ value: string;
957
+ label: string;
958
+ /** Icon URL (Xendit e-wallet rows carry one). */
959
+ iconUrl?: string;
960
+ /** The extra field this method needs before it can charge. */
961
+ extra?: 'cashtag' | 'phoneNumber' | null;
962
+ }
963
+
964
+ /**
965
+ * Order-form shapes — what the buyer fills in (billing, holders, consent) and
966
+ * the on-checkout request body those compose into.
967
+ */
968
+
969
+ interface CheckoutBilling {
970
+ firstName: string;
971
+ lastName: string;
972
+ email: string;
973
+ /** UI-only confirmation value. It is never sent separately; the order API
974
+ * still submits `confirm_email` from the authoritative `email` field. */
975
+ confirmEmail?: string;
976
+ phone?: string;
977
+ streetAddress?: string;
978
+ city?: string;
979
+ zip?: string;
980
+ /** Numeric backend country id (from the countries endpoint). */
981
+ countryId?: string;
982
+ /** Numeric backend state id (from the states endpoint). */
983
+ stateId?: string;
984
+ /** ISO-2 country code for payment billing_details (Stripe wants ISO, not the
985
+ * backend's numeric id) — set when known; confirmers include it. */
986
+ countryCode?: string;
987
+ /** State/region code for payment billing_details — set when known. */
988
+ stateCode?: string;
989
+ /** UI/preflight hint: the selected country returned at least one state or
990
+ * county option, so one must be chosen. Never sent as an order field. */
991
+ stateRequired?: boolean;
992
+ dobDay?: number;
993
+ dobMonth?: number;
994
+ dobYear?: number;
995
+ /** Nationality country id (from the countries endpoint's `nationality`
996
+ * label). Collected when the `show_nationality_field` gate is on. */
997
+ nationality?: string;
998
+ /** 'M' | 'F'. Collected when the `show_gender_field` gate is on. */
999
+ gender?: string;
1000
+ /** Bare handle or profile URL (server normalises). Collected when the
1001
+ * `require_instagram` gate is on. */
1002
+ instagramHandle?: string;
1003
+ /** ORDER-level custom field values (`data_capture`). */
1004
+ dataCapture?: CustomFieldValues;
1005
+ }
1006
+ interface CheckoutHolder {
1007
+ firstName: string;
1008
+ lastName: string;
1009
+ email: string;
1010
+ phone?: string;
1011
+ /** NUMERIC decrypted ticket-type id this holder's ticket belongs to (from
1012
+ * the pricing breakdown lines) — drives the server's ticket-type-scoped
1013
+ * required-field validation. */
1014
+ ticketTypeId?: string;
1015
+ /** TICKET-level custom field values for this holder (`ticket_data_capture`). */
1016
+ ticketDataCapture?: CustomFieldValues;
1017
+ }
1018
+ interface CheckoutConsent {
1019
+ ttfOptIn: boolean;
1020
+ brandOptIn: boolean;
1021
+ }
1022
+ interface TicketHolderInput {
1023
+ firstName?: string;
1024
+ lastName?: string;
1025
+ email?: string;
1026
+ phone?: string;
1027
+ /** NUMERIC option-matrix ticket-type id (the GET v1/cart line `id`). Drives
1028
+ * the validator's ticket-type-scoped REQUIRED-field checks. */
1029
+ ticketTypeId?: string | number;
1030
+ /** Per-ticket custom fields: { [fieldName]: value } */
1031
+ ticketDataCapture?: Record<string, unknown>;
1032
+ }
1033
+ interface BuyerFieldsInput {
1034
+ /** Country id (each countries row carries a `nationality` label). Gate:
1035
+ * show_nationality_field. */
1036
+ nationality?: string | number;
1037
+ /** 'M' | 'F'. Gate: show_gender_field. */
1038
+ gender?: string;
1039
+ /** Bare handle or profile URL — the server normalises. Gate: require_instagram. */
1040
+ instagramHandle?: string;
1041
+ }
1042
+ interface OnCheckoutInput {
1043
+ buyerFields?: BuyerFieldsInput;
1044
+ /** Order-level custom fields: { [fieldName]: value } */
1045
+ dataCapture?: Record<string, unknown>;
1046
+ ticketHolders?: TicketHolderInput[];
1047
+ /** Add-on selections: { [addOnId]: quantity } */
1048
+ addOns?: Record<string, number>;
1049
+ /** Add-on custom fields: { [addOnId]: { [fieldName]: value } } */
1050
+ addOnDataCapture?: Record<string, Record<string, unknown>>;
1051
+ }
1052
+ interface OnCheckoutAttributes {
1053
+ nationality?: string | number;
1054
+ gender?: string;
1055
+ instagram_handle?: string;
1056
+ data_capture?: Record<string, unknown>;
1057
+ ticket_holders?: Array<Record<string, unknown>>;
1058
+ /** Top-level per-ticket-number mirror of ticket_holders[n].ticket_data_capture. */
1059
+ ticket_data_capture?: Array<Record<string, unknown>>;
1060
+ add_ons?: Record<string, number>;
1061
+ add_on_data_capture?: Record<string, Record<string, unknown>>;
1062
+ }
1063
+ type CheckoutStatus = 'idle' | 'priming' | 'ready' | 'repricing' | 'placing' | 'succeeded' | 'expired' | 'error';
1064
+ /** The outcome of `placeOrder`. */
1065
+ interface PlaceOrderResult {
1066
+ orderHash: string;
1067
+ free: boolean;
1068
+ needIdVerification: boolean;
1069
+ /** Order currency code (e.g. 'USD') — set when known. */
1070
+ currency?: string;
1071
+ /** The settled Stripe PaymentIntent id — card / native-wallet paths only. */
1072
+ paymentIntentId?: string;
1073
+ /** True when the server reported this checkout as already paid (duplicate
1074
+ * submission) — nothing was charged this run. */
1075
+ alreadyPaid?: boolean;
1076
+ /** The payment settles asynchronously (OXXO cash voucher, PayPal IPN) — show
1077
+ * a "payment pending" state, never a paid receipt. */
1078
+ pending?: boolean;
1079
+ /** OXXO: the hosted voucher URL (also emailed to the buyer). */
1080
+ pendingVoucherUrl?: string;
1081
+ }
1082
+ /**
1083
+ * The complete checkout state the store holds. `useCheckout()` returns this
1084
+ * (plus the actions); a non-React app reads it via `store.getState()`.
1085
+ */
1086
+ interface CheckoutSnapshot {
1087
+ status: CheckoutStatus;
1088
+ eventId?: string;
1089
+ selections: TicketSelection[];
1090
+ /** DECRYPTED ticket type ids for the cart — drives add-on filtering. */
1091
+ ticketTypeIds: string[];
1092
+ /** The event's custom-field groups (order + ticket + add-on scopes). */
1093
+ customFields: EventCustomFieldGroup[];
1094
+ /** Add-on custom-field VALUES, keyed by add-on id. */
1095
+ addOnDataCapture?: Record<string, CustomFieldValues>;
1096
+ /** Event terms/conditions (client-side gate) — placement blocks until every
1097
+ * required block is in `acceptedConditions`. */
1098
+ conditions?: EventCondition[];
1099
+ /** Which condition ids the buyer has accepted (`{ [id]: true }`). */
1100
+ acceptedConditions?: Record<string, boolean>;
1101
+ /** Email the buyer typed that already has an account (prompt sign-in). Null
1102
+ * when the last checked email has none; undefined before any check. */
1103
+ existingAccountEmail?: string | null;
1104
+ /** collect_names = 'yes': every holder must carry first + last name. */
1105
+ holderNamesRequired: boolean;
1106
+ /** Buyer-field gates (nationality/gender/Instagram) from checkout-configs. */
1107
+ fieldGates: BuyerFieldVisibility;
1108
+ /** Required add-ons the pre-flight blocks placement on (sold-out exempt). */
1109
+ requiredAddOns?: RequiredAddOnLike[];
1110
+ /** Server-priced display-ready summary (render verbatim). Null when unserved. */
1111
+ priceBreakdown?: PriceBreakdown | null;
1112
+ /** The event's payment gateway, identified at prime time. Drives which card
1113
+ * widget and method rows `<Payment/>` shows — read it synchronously instead
1114
+ * of re-probing. Undefined until primed (or when the backend didn't say). */
1115
+ gateway?: PreOrderGateway;
1116
+ /** Session currency state (multi-currency events). */
1117
+ currency?: CurrencyState;
1118
+ /** Authoritative totals (incl. fees). */
1119
+ breakdown?: CheckoutBreakdown;
1120
+ stripe?: StripeConfig;
1121
+ /** Payment-plan (installments) availability for this cart. */
1122
+ paymentPlan?: CheckoutPaymentPlan;
1123
+ /** Redirect-based Stripe methods this order supports (discovery list). */
1124
+ redirectPaymentMethods?: string[];
1125
+ /** Native-wallet availability (Apple/Google Pay). */
1126
+ walletAvailability?: CheckoutWalletAvailability;
1127
+ /** Server deferred-mode Stripe Elements config (mode/amount/currency) for the
1128
+ * wallet-capable Payment Element mount — the old checkout's `elements_config`. */
1129
+ stripeElementsConfig?: Record<string, unknown>;
1130
+ addOns: AddonSelection;
1131
+ billing?: CheckoutBilling;
1132
+ holders: CheckoutHolder[];
1133
+ consent: CheckoutConsent;
1134
+ order?: PlaceOrderResult;
1135
+ error?: string;
1136
+ /** Epoch ms at which the cart reservation expires (absolute, background-safe). */
1137
+ expiresAt?: number;
1138
+ }
1139
+ /**
1140
+ * Engine options beyond the client config — the wallet/redirect settings the
1141
+ * pay rails need. Passed to the engine at creation; separate from `TtfConfig`
1142
+ * (which configures the transport).
1143
+ */
1144
+ interface CheckoutOptions {
1145
+ /** Stripe publishable key override. Usually unnecessary — the review carries
1146
+ * the right key + connected account per event. */
1147
+ stripePublishableKey?: string;
1148
+ /** Apple Pay merchant id (e.g. "merchant.com.ticketfairy.app"). */
1149
+ merchantIdentifier?: string;
1150
+ /** Merchant ISO country for the Apple/Google Pay sheet. Defaults to "US". */
1151
+ merchantCountryCode?: string;
1152
+ /** Business name on the "Pay …" line. Defaults to "Ticket Fairy". */
1153
+ merchantName?: string;
1154
+ /** Run Google Pay against the TEST environment (no real charge). */
1155
+ googlePayTestEnv?: boolean;
1156
+ /** Return URL for redirect-based Stripe methods. Defaults to the origin. */
1157
+ redirectReturnUrl?: string;
1158
+ /** App deep-link scheme (React Native) — redirect methods return through it. */
1159
+ urlScheme?: string;
1160
+ }
1161
+
1162
+ /**
1163
+ * Account/identity shapes — existing-account lookup and the ID-verification
1164
+ * poller contract.
1165
+ */
1166
+ interface ContactEmailResponse {
1167
+ error: 0 | 1;
1168
+ message: string;
1169
+ exists: 0 | 1 | null;
1170
+ verified?: boolean;
1171
+ }
1172
+ interface ExistingAccount {
1173
+ exists: boolean;
1174
+ /** Only present when the lookup asked for verification status and the account
1175
+ * exists. */
1176
+ verified: boolean | null;
1177
+ }
1178
+ /** The views every platform auth UI can render. Web uses a modal today; React
1179
+ * Native can map the same state/actions to screens or a native sheet later. */
1180
+ type AuthFlowView = 'login' | 'register' | 'forgot-password';
1181
+ interface AuthLoginInput {
1182
+ email: string;
1183
+ password: string;
1184
+ }
1185
+ /** Platform-neutral registration values. The API adapter owns the legacy
1186
+ * snake_case/FormData mapping; UI components should never construct it. */
1187
+ interface AuthRegistrationInput {
1188
+ firstName: string;
1189
+ lastName: string;
1190
+ email: string;
1191
+ password: string;
1192
+ passwordConfirmation: string;
1193
+ phone?: string;
1194
+ streetAddress?: string;
1195
+ city?: string;
1196
+ zip?: string;
1197
+ countryId?: string;
1198
+ stateId?: string;
1199
+ /** Advanced backend registration context (e.g. delegation access). */
1200
+ registrationFields?: Record<string, string>;
1201
+ }
1202
+ type AuthFieldName = keyof AuthLoginInput | keyof AuthRegistrationInput;
1203
+ type AuthFieldErrors = Partial<Record<AuthFieldName, string>>;
1204
+ interface AuthValidationResult {
1205
+ valid: boolean;
1206
+ errors: AuthFieldErrors;
1207
+ }
1208
+ interface IdVerificationStatus {
1209
+ required: boolean;
1210
+ verified: boolean;
1211
+ provider?: string | null;
1212
+ verification_url?: string | null;
1213
+ }
1214
+ type IdVerificationPhase = 'idle' | 'polling' | 'verified' | 'timeout' | 'error';
1215
+ interface IdVerificationCallbacks {
1216
+ fetchStatus: () => Promise<IdVerificationStatus>;
1217
+ onPhase: (phase: IdVerificationPhase, status?: IdVerificationStatus) => void;
1218
+ /** Injected clock — setTimeout-compatible. */
1219
+ schedule?: (fn: () => void, ms: number) => unknown;
1220
+ }
1221
+ interface IdVerificationPoller {
1222
+ start: () => void;
1223
+ stop: () => void;
1224
+ }
1225
+
1226
+ /**
1227
+ * Shapes the checkout FORMS work in, as opposed to the wire shapes the API
1228
+ * exchanges. A draft is what a half-filled form holds (every field present,
1229
+ * plus display-only extras); the engine's `CheckoutBilling` / `CheckoutHolder`
1230
+ * are what finally gets sent.
1231
+ *
1232
+ * These live here because web and native render different controls over the
1233
+ * SAME form model — keeping one copy is what stops the two checkouts drifting.
1234
+ */
1235
+
1236
+ /** The subset of billing owned by the billing-details UI. */
1237
+ type BillingDraft = Pick<CheckoutBilling, 'firstName' | 'lastName' | 'email' | 'confirmEmail' | 'nationality' | 'gender' | 'instagramHandle' | 'phone' | 'streetAddress' | 'city' | 'zip' | 'countryId' | 'stateId' | 'countryCode' | 'stateCode'>;
1238
+ /**
1239
+ * One attendee slot, carrying the ticket type that determines custom fields.
1240
+ * Deliberately NOT `CheckoutHolder`: here `phone` is always present (a form
1241
+ * field is '' rather than absent) and `ticketName` exists only to label the
1242
+ * slot on screen.
1243
+ */
1244
+ interface HolderDraft {
1245
+ firstName: string;
1246
+ lastName: string;
1247
+ email: string;
1248
+ phone: string;
1249
+ ticketTypeId?: string;
1250
+ ticketName?: string;
1251
+ ticketDataCapture: CustomFieldValues;
1252
+ }
1253
+ /** A country or state as the pickers consume it. */
1254
+ interface LocationOption {
1255
+ id: string | number;
1256
+ name: string;
1257
+ code?: string;
1258
+ }
1259
+ /** Looks up the message for a field key, or undefined when it's valid. */
1260
+ type BillingFieldError = (key: string, message?: string) => string | undefined;
1261
+
1262
+ /**
1263
+ * Gateway identity — which processor an event/order pays through, read the same
1264
+ * way the hosted embed keys on it. Post-order (`detectGateway`, off the review's
1265
+ * payment_method) and pre-order (`identifyPreOrderGateway` + the Xendit/PayPal
1266
+ * config, off the cart payment block).
1267
+ */
1268
+
1269
+ /** Post-order gateway from the review's payment_method block. */
1270
+ declare const detectGateway: (paymentMethod: Record<string, unknown> | null | undefined) => Gateway;
1271
+ /** Pre-order gateway from the cart payment-config block. Null when unrecognised. */
1272
+ declare const identifyPreOrderGateway: (cartAttributes: Record<string, unknown> | null | undefined) => PreOrderGateway | null;
1273
+ /** Xendit pre-order config (publishable key, processors, UI). Null when the
1274
+ * event isn't Xendit or the key is missing. */
1275
+ declare const xenditPreOrderConfig: (cartAttributes: Record<string, unknown> | null | undefined) => XenditPreOrderConfig | null;
1276
+ /** PayPal Standard tab config off the cart payment block. Null when absent. */
1277
+ declare const paypalTabConfig: (cartAttributes: Record<string, unknown> | null | undefined) => PayPalTabConfig | null;
1278
+ /** Pre-order deferred Stripe Elements config (single-page card mount). Null in
1279
+ * every fallback case (no config, non-Stripe, free cart). */
1280
+ declare const resolvePaymentConfig: (cartAttributes: Record<string, unknown> | null | undefined) => PreOrderPaymentConfig | null;
1281
+
1282
+ /**
1283
+ * Pricing logic — resolve the display-ready server breakdown, build the
1284
+ * display-only add-on query, and map `stripe_wallets` to the Payment Element
1285
+ * wallets option (payment-plan mode forces both wallets off — they can't
1286
+ * authorize future installments).
1287
+ */
1288
+
1289
+ /** Query-string form of the display-only add-on map: `add_ons[<id>]=<qty>`.
1290
+ * The server caps at 50 entries / qty 100 and drops anything not in the cart. */
1291
+ declare const priceBreakdownAddOnsQuery: (addOns: Record<string | number, number> | null | undefined) => string;
1292
+ /** Pull the `price_breakdown` block off cart attributes. Null when the backend
1293
+ * doesn't serve it (older backends) — callers keep their own rendering. */
1294
+ declare const resolvePriceBreakdown: (cartAttributes: Record<string, unknown> | null | undefined) => PriceBreakdown | null;
1295
+ declare const walletsOption: (stripeWallets: StripeWallets | null | undefined, paymentPlanMode?: boolean) => WalletsOption;
1296
+
1297
+ /**
1298
+ * Checkout logic — compose the on-checkout body (in-body per-ticket capture,
1299
+ * order data_capture, buyer fields), evaluate buyer-field gates, find missing
1300
+ * required add-ons, and detect seated events.
1301
+ *
1302
+ * `buildOnCheckoutBody` matters: on_checkout is the SAME engine the hosted
1303
+ * checkout runs, and REQUIRED custom fields are validated AT PLACEMENT — events
1304
+ * with required fields can only be placed when the capture rides this body.
1305
+ */
1306
+
1307
+ /** True when a custom-field answer has been provided (array = at least one). */
1308
+ declare const hasValue: (value: string | string[] | undefined) => boolean;
1309
+ /** The checkout's single email rule — UIs must not re-derive their own. */
1310
+ declare const isEmail: (value: string | undefined) => boolean;
1311
+ /** The checkout's single phone rule: 7–15 digits, punctuation ignored. */
1312
+ declare const isPhone: (value: string | undefined) => boolean;
1313
+ /**
1314
+ * Does a ticket-scoped custom field apply to this ticket type? A field with no
1315
+ * `ticketTypeIds` applies to every ticket. This is the single owner of the rule
1316
+ * — the UIs previously each carried their own copy.
1317
+ */
1318
+ declare const fieldAppliesToTicketType: (field: Pick<EventCustomField, "ticketTypeIds">, ticketTypeId?: string | number) => boolean;
1319
+ /** The ticket-scoped fields that apply to a given ticket type. */
1320
+ declare const ticketFieldsFor: <T extends Pick<EventCustomField, "ticketTypeIds">>(fields: T[], ticketTypeId?: string | number) => T[];
1321
+ /**
1322
+ * Are every required field in `fields` answered? Mirrors the engine's own
1323
+ * preflight, including its rule that `image` fields are server-authoritative
1324
+ * and never block the client.
1325
+ */
1326
+ declare const customFieldsComplete: (fields: EventCustomField[], values: CustomFieldValues) => boolean;
1327
+ interface CheckoutDetailsState {
1328
+ billing?: CheckoutBilling;
1329
+ holders: CheckoutHolder[];
1330
+ selections: TicketSelection[];
1331
+ breakdown?: CheckoutBreakdown;
1332
+ holderNamesRequired: boolean;
1333
+ fieldGates: BuyerFieldVisibility;
1334
+ customFields: EventCustomFieldGroup[];
1335
+ }
1336
+ interface CheckoutDetailsValidationOptions {
1337
+ /** Embedded guest checkout asks the buyer to type their email twice. */
1338
+ requireEmailConfirmation?: boolean;
1339
+ /** Always collect one named holder per selected ticket. The hosted event
1340
+ * checkout normally follows the backend holder-name/custom-field gates;
1341
+ * tf-sports' embedded flow opts into this stricter policy. */
1342
+ collectTicketHolders?: boolean;
1343
+ /** Storefront parity: collect email and phone for every ticket holder. */
1344
+ requireHolderContact?: boolean;
1345
+ /** Injectable clock keeps minimum-age checks deterministic in tests. */
1346
+ now?: Date;
1347
+ }
1348
+ /**
1349
+ * One source of truth for every buyer/holder field that must be completed
1350
+ * before payment. UI sections use the returned labels for gating and the
1351
+ * framework-agnostic engine calls the same function during preflight.
1352
+ */
1353
+ declare const missingCheckoutDetails: (state: CheckoutDetailsState, options?: CheckoutDetailsValidationOptions) => string[];
1354
+ /** Merge the parity fields into an existing attributes `base` object. */
1355
+ declare const buildOnCheckoutBody: (input: OnCheckoutInput, base?: Record<string, unknown>) => OnCheckoutAttributes & Record<string, unknown>;
1356
+ /** Evaluate the buyer-field gates off `GET v1/checkout-configs` (next_page_info). */
1357
+ declare const evaluateFieldGates: (gates: FieldGates | null | undefined) => BuyerFieldVisibility;
1358
+ /**
1359
+ * The required add-ons the selection is still missing. Empty means the
1360
+ * requirement is satisfied. A sold-out required add-on (stock exactly 0) is
1361
+ * exempt — it never blocks placement (the hosted rule).
1362
+ */
1363
+ declare const missingRequiredAddOns: <T extends RequiredAddOnLike>(addOns: T[] | null | undefined, selectedQuantities: Record<string | number, number> | null | undefined) => T[];
1364
+ /** The hosted cap when nothing else bounds an add-on (embed-checkout-app.js). */
1365
+ declare const ADD_ON_DEFAULT_MAX_QUANTITY = 10;
1366
+ /**
1367
+ * The selectable quantity cap for ONE add-on — the minimum of every bound that
1368
+ * applies, mirroring the hosted `order_add_on` partial exactly:
1369
+ *
1370
+ * - `flagLimitToTicketQuantity` → the number of tickets in the cart
1371
+ * - `limitPerTicket` → `limitPerTicket × ticketQuantity`
1372
+ * - `maxQuantity` → itself (already min'd with available stock
1373
+ * server-side on public reads)
1374
+ * - nothing set → the hosted default of 10
1375
+ * - `isCheckbox` → a yes/no choice, so at most 1
1376
+ *
1377
+ * This is NOT cosmetic: the server hard-rejects quantities above these
1378
+ * (`add_on_max_quantity`), so an over-generous picker builds an order that
1379
+ * fails at placement. `stock` is deliberately not a candidate — on public
1380
+ * reads it is only a sold-out signal (0 or null), never a count.
1381
+ */
1382
+ declare const addOnMaxQuantity: (addOn: Pick<EventAddon, "flagLimitToTicketQuantity" | "limitPerTicket" | "maxQuantity" | "isCheckbox">, ticketQuantity: number) => number;
1383
+ /**
1384
+ * The selectable quantity bounds for a ticket type's dropdown: `{ min, max,
1385
+ * step }`. Tables are the subtlety — their quantity is a GUEST count (bounded by
1386
+ * `minGuests`/`maxGuests`), not a count of tickets, so a "full table of 8" must
1387
+ * offer 8…maxGuests and never a smaller number; the generic `min/maxQuantity`
1388
+ * stay 1/10 on the wire and would wrongly let the buyer pick fewer. `step` is the
1389
+ * `multiplier` (the cart sells in blocks of N). Mirrors the old checkout's
1390
+ * `getTicketSelectOptions(maxCount, minCount, multiplier)` with
1391
+ * `maxCount = isTable ? maxGuests : maxQuantity`.
1392
+ */
1393
+ declare const ticketQuantityRange: (ticket: Pick<TicketType, "isTable" | "minQuantity" | "maxQuantity" | "minGuests" | "maxGuests" | "multiplier">) => {
1394
+ min: number;
1395
+ max: number;
1396
+ step: number;
1397
+ };
1398
+ /**
1399
+ * Reserved-seating detection. A seated event sells through a seat-map picker, so
1400
+ * a surface without one hands the buyer off to the event page. Accepts event
1401
+ * details, the cart/payment payload, or raw event attributes.
1402
+ */
1403
+ declare const isSeatedEvent: (event: object | null | undefined) => boolean;
1404
+
1405
+ declare const interpretRedirectConfirm: (response: RedirectConfirmResponse) => RedirectOutcome;
1406
+ /** Read the voucher off a confirmed PaymentIntent's next action — tolerant of
1407
+ * both the web (oxxo_display_details) and RN (voucherURL) shapes. */
1408
+ declare const oxxoVoucherFromNextAction: (nextAction: Record<string, unknown> | null | undefined) => OxxoVoucher | null;
1409
+ declare const buildChangePaymentMethodAttributes: (input: ChangePaymentMethodInput) => Record<string, unknown>;
1410
+ declare const resolvePayPalForm: (attributes: Record<string, unknown> | null | undefined) => PayPalForm | null;
1411
+ /** The saved-card shortcut off the review's payment_method — null unless the
1412
+ * plan configuration carries a reusable card. */
1413
+ declare const savedPlanCard: (paymentMethod: Record<string, unknown> | null | undefined) => SavedPlanCard | null;
1414
+ declare const requiresFeeReprice: (type: string | null | undefined) => boolean;
1415
+ declare const buildPaymentMethodTypeAttributes: (input: PaymentMethodTypeInput) => PaymentMethodTypeRequest;
1416
+ /** A PaymentIntent client secret is `pi_<id>_secret_<nonce>` — the review
1417
+ * carries the secret, the re-price endpoint wants the id. Null for setup-intent
1418
+ * secrets (seti_…) and anything else. */
1419
+ declare const paymentIntentIdFromClientSecret: (clientSecret: string | null | undefined) => string | null;
1420
+ declare const buildInstallmentOffersFields: (input: {
1421
+ paymentIntentId: string;
1422
+ paymentMethodId: string;
1423
+ }) => Record<string, string>;
1424
+ declare const resolveInstallmentOffers: (raw: Record<string, unknown> | null | undefined) => InstallmentOffers;
1425
+ declare const buildConfirmInstallmentsFields: (input: {
1426
+ paymentIntentId: string;
1427
+ offer: InstallmentOffer;
1428
+ }) => Record<string, string>;
1429
+ declare const confirmInstallmentsHasNextAction: (raw: Record<string, unknown> | null | undefined) => boolean;
1430
+ /** The flat form-field map (PHP bracket notation) the charge endpoint reads —
1431
+ * send it form-encoded, never as JSON. */
1432
+ declare const buildXenditEWalletChargeFields: (input: XenditEWalletChargeInput) => Record<string, string>;
1433
+ declare const interpretXenditChargeResponse: (raw: Record<string, unknown> | null | undefined) => XenditChargeOutcome;
1434
+
1435
+ /**
1436
+ * Payment-plan terms — the buyer-facing disclosure block.
1437
+ *
1438
+ * A faithful port of the hosted checkout's `renderPaymentPlanSelector`
1439
+ * (embed-checkout-app.js), which composes these paragraphs from the same
1440
+ * `payment_plan_configuration` the backend already sends us. Everything here is
1441
+ * pure string composition over the preview DTO, so web and native render the
1442
+ * identical wording and one set of tests covers both.
1443
+ *
1444
+ * This is not cosmetic copy. The admin-fee line states a real per-installment
1445
+ * charge, and the non-refundable line states what the buyer forfeits if they
1446
+ * default. A plan UI that omits them is understating the cost of the purchase.
1447
+ *
1448
+ * Wording is the hosted DEFAULT for each i18n key. Consumers that already
1449
+ * localize can map over the returned parts by `id`.
1450
+ */
1451
+
1452
+ /** The default word for a plan when the brand hasn't renamed it. */
1453
+ declare const DEFAULT_PLAN_TERMINOLOGY = "Payment Plan";
1454
+ /** The brand's word for the plan — "Payment Plan", "Layaway", … */
1455
+ declare const planTerminology: (plan?: CheckoutPaymentPlanPreview | null) => string;
1456
+ /** `currency_symbol` + 2dp, matching the hosted `money()` helper exactly. */
1457
+ declare const formatPlanMoney: (plan: CheckoutPaymentPlanPreview | null | undefined, value: number | null | undefined) => string;
1458
+ /** "Click to pay in 3 payments with a Payment Plan" — the opt-in label. */
1459
+ declare const planCheckboxLabel: (plan: CheckoutPaymentPlanPreview) => string;
1460
+ /** The plan's submit CTA — "Confirm Payment Plan". */
1461
+ declare const planConfirmLabel: (plan?: CheckoutPaymentPlanPreview | null) => string;
1462
+ /** "CN Brand TTF Payment Plan Terms" — the terms heading. */
1463
+ declare const planTermsTitle: (plan: CheckoutPaymentPlanPreview) => string;
1464
+ /** One paragraph of the terms block. `id` is stable for localization/testing. */
1465
+ interface PlanTermsParagraph {
1466
+ id: 'schedule' | 'adminFee' | 'nonRefundable' | 'custom' | 'note';
1467
+ text: string;
1468
+ }
1469
+ /**
1470
+ * The full terms block, in render order. Empty when there is nothing to state
1471
+ * (no installment shape), so callers can render unconditionally.
1472
+ */
1473
+ declare const paymentPlanTerms: (plan: CheckoutPaymentPlanPreview | null | undefined) => PlanTermsParagraph[];
1474
+
1475
+ /**
1476
+ * Account/session logic — interpret the existing-account lookup and drive the
1477
+ * multi-currency preference sync.
1478
+ */
1479
+
1480
+ /** Normalize the `/ajax/contact-email` response to a boolean existence flag. */
1481
+ declare const interpretContactEmail: (raw: Partial<ContactEmailResponse> | null | undefined) => ExistingAccount;
1482
+ /** True when the event offers more than one currency (render a switcher only
1483
+ * then — currency selection exists solely for multi-currency events). */
1484
+ declare const isMultiCurrency: (state: CurrencyState | null | undefined) => boolean;
1485
+ /**
1486
+ * Run a currency sync through the injected transport. A bare sync (no code)
1487
+ * geo-seeds and reports state; a code switches it (requiresCatalogRefresh — a
1488
+ * currency change is a full reprice, so refetch the catalog and reset selection).
1489
+ */
1490
+ declare const syncCurrency: (transport: CurrencyTransport, eventId: string | number, code?: string, options?: CurrencySyncOptions) => Promise<CurrencySync>;
1491
+
1492
+ /**
1493
+ * Authentication rules shared by web and React Native. This module is pure:
1494
+ * no React, browser APIs, FormData, or transport. Platform UI owns only field
1495
+ * rendering while the API layer owns the final multipart encoding.
1496
+ */
1497
+
1498
+ declare const normalizeAuthEmail: (email: string) => string;
1499
+ declare const validateLoginInput: (input: AuthLoginInput) => AuthValidationResult;
1500
+ declare const validatePasswordResetEmail: (email: string) => AuthValidationResult;
1501
+ declare const validateRegistrationInput: (input: AuthRegistrationInput, options?: {
1502
+ requireAddress?: boolean;
1503
+ requireState?: boolean;
1504
+ }) => AuthValidationResult;
1505
+ /** Map the platform-neutral shape to the backend's registration contract. */
1506
+ declare const buildRegistrationFields: (input: AuthRegistrationInput) => Record<string, string>;
1507
+
1508
+ /**
1509
+ * ID-verification poller — a NEED_ID_VERIFICATION order signals
1510
+ * `needIdVerification`; the buyer completes the provider check in a new
1511
+ * tab/window while this polls `GET v1/order/:hash/id-verification` until
1512
+ * verified. Pure state machine — fetch and clock are injected, so it runs
1513
+ * identically in React, React Native, and tests (5s ticks, capped).
1514
+ */
1515
+
1516
+ declare const ID_VERIFICATION_POLL_MS = 5000;
1517
+ declare const ID_VERIFICATION_MAX_TICKS = 60;
1518
+ declare const ID_VERIFICATION_MAX_CONSECUTIVE_FAILURES = 3;
1519
+ declare const createIdVerificationPoller: (callbacks: IdVerificationCallbacks) => IdVerificationPoller;
1520
+
1521
+ /**
1522
+ * The checkout store — a tiny framework-agnostic observable over the
1523
+ * `CheckoutSnapshot`. The engine writes to it; `useCheckout()` (or a plain
1524
+ * `subscribe()` in a non-React app) reads from it. No React, no globals: the
1525
+ * same store instance drives web, React Native, Node, and tests.
1526
+ *
1527
+ * State updates are immutable (a new snapshot object each change) so
1528
+ * `useSyncExternalStore` and shallow-equality consumers re-render correctly.
1529
+ *
1530
+ * `progress` is separate on purpose: it holds the retry-safety bookkeeping
1531
+ * (which order exists, whether it's been charged) that must NEVER be part of
1532
+ * the reactive snapshot — it's how retries avoid creating a second order or
1533
+ * charging twice.
1534
+ */
1535
+
1536
+ type CheckoutListener = (snapshot: CheckoutSnapshot) => void;
1537
+ /** Retry-safety bookkeeping — mutated directly by the engine, never rendered. */
1538
+ interface OrderProgress {
1539
+ /** The created order's hash — a retry reuses it instead of minting a second. */
1540
+ orderHash?: string;
1541
+ /** True once the charge landed — a retry then only replays finalization. */
1542
+ paymentConfirmed?: boolean;
1543
+ }
1544
+ interface CheckoutStore {
1545
+ /** The current snapshot (stable reference until the next change). */
1546
+ getState: () => CheckoutSnapshot;
1547
+ /** Merge a partial snapshot (or a function of the current one) and notify. */
1548
+ setState: (patch: Partial<CheckoutSnapshot> | ((prev: CheckoutSnapshot) => Partial<CheckoutSnapshot>)) => void;
1549
+ /** Subscribe to changes; returns an unsubscribe function. */
1550
+ subscribe: (listener: CheckoutListener) => () => void;
1551
+ /** Reset to the initial idle snapshot (and clear progress) and notify. */
1552
+ reset: () => void;
1553
+ /** Retry-safety state (order hash + charged flag). Not reactive. */
1554
+ progress: OrderProgress;
1555
+ /** Drop any half-created order — the cart contents changed, so a previously
1556
+ * created order is stale and must not be reused. */
1557
+ invalidateOrderProgress: () => void;
1558
+ /** Move to the terminal 'expired' state and clear progress. */
1559
+ expireCart: () => void;
1560
+ }
1561
+ /** The empty checkout — what every store starts at and `reset()` returns to. */
1562
+ declare const initialSnapshot: () => CheckoutSnapshot;
1563
+ declare const createCheckoutStore: (initial?: CheckoutSnapshot) => CheckoutStore;
1564
+
1565
+ /**
1566
+ * The payment-confirmation port — the hexagonal seam that keeps the engine
1567
+ * framework- AND payment-SDK-agnostic. The orchestration is pure TS EXCEPT for
1568
+ * the calls that talk to a Stripe SDK (init, read intent status, confirm card /
1569
+ * wallet). Those live behind this interface: React Native binds it with
1570
+ * @stripe/stripe-react-native, web with stripe-js, tests with a fake.
1571
+ *
1572
+ * Status vocabulary: confirmers return Stripe PaymentIntent statuses in the RN
1573
+ * SDK's PascalCase form ('Succeeded' | 'RequiresCapture' | 'Processing' | …).
1574
+ * Adapters over SDKs with other spellings (stripe-js is lowercase) normalize.
1575
+ */
1576
+
1577
+ interface PaymentConfirmer {
1578
+ /** Initialize the underlying SDK for the given keys. */
1579
+ init(options: {
1580
+ publishableKey: string;
1581
+ /** Stripe connected-account id (already cleaned — never ''). */
1582
+ accountId?: string;
1583
+ /** Apple Pay merchant id, when the platform supports it. */
1584
+ merchantIdentifier?: string;
1585
+ /** App deep-link scheme (React Native) — redirect methods return through it. */
1586
+ urlScheme?: string;
1587
+ }): Promise<void>;
1588
+ /** Status of the PaymentIntent behind `clientSecret`, or undefined when it
1589
+ * can't be retrieved. Used to skip re-charging on retries. */
1590
+ getIntentStatus(clientSecret: string): Promise<string | undefined>;
1591
+ /** Confirm a card payment. Returns the resulting intent status or throws. */
1592
+ confirmCard(clientSecret: string, billing: CheckoutBilling): Promise<string | undefined>;
1593
+ /** Present the platform-pay sheet (Apple Pay on iOS). Returns the resulting
1594
+ * intent status or throws — a user-cancelled sheet is an error. */
1595
+ confirmApplePay(clientSecret: string, total: string, currencyCode: string, merchant: {
1596
+ merchantCountryCode?: string;
1597
+ merchantName?: string;
1598
+ }): Promise<string | undefined>;
1599
+ /** Present the Google Pay sheet (Android). Optional — only platforms with a
1600
+ * native Google Pay SDK bind it; unbound, the engine throws UNSUPPORTED_GATEWAY. */
1601
+ confirmGooglePay?(clientSecret: string, total: string, currencyCode: string, merchant: {
1602
+ merchantCountryCode?: string;
1603
+ merchantName?: string;
1604
+ /** Use Google Pay's TEST environment (no real charge). */
1605
+ testEnv?: boolean;
1606
+ }): Promise<string | undefined>;
1607
+ }
1608
+ /**
1609
+ * A payment is confirmed enough to finalize in any of these states: Succeeded
1610
+ * (auto-capture), RequiresCapture (manual-capture authorizes now, captures
1611
+ * later — NOT a failure), or Processing (settling asynchronously).
1612
+ */
1613
+ declare const CONFIRMED_INTENT_STATUSES: string[];
1614
+ /**
1615
+ * A Stripe connected-account id, or undefined when there is none. The backend
1616
+ * returns '' for platform-account events; passing '' sets an empty
1617
+ * `Stripe-Account` header, which Stripe rejects — coerce empties to undefined.
1618
+ */
1619
+ declare const cleanAccountId: (id?: string | null) => string | undefined;
1620
+ /**
1621
+ * Optional confirmer capabilities the alternative rails need. A platform that
1622
+ * doesn't implement one simply can't run that rail — the engine throws a typed
1623
+ * UNSUPPORTED_GATEWAY error instead of failing mid-payment.
1624
+ */
1625
+ interface PaymentConfirmerExtras {
1626
+ /** Create a card PaymentMethod (MSI offer lookup runs between creation and
1627
+ * the confirm). Returns the PaymentMethod id. */
1628
+ createCardPaymentMethod?(billing: CheckoutBilling): Promise<string>;
1629
+ /** Create a redirect-method PaymentMethod (Klarna/Afterpay/iDEAL-class).
1630
+ * Returns the id, or null when the platform can't express the type. */
1631
+ createRedirectPaymentMethod?(methodType: string, billing: CheckoutBilling): Promise<string | null>;
1632
+ /** Run the pending next action of a SERVER-confirmed intent (MSI). Throws on
1633
+ * failure; never confirms a second time. */
1634
+ handleNextAction?(clientSecret: string): Promise<void>;
1635
+ /** Confirm an OXXO voucher intent. Returns the raw nextAction payload (engine
1636
+ * extracts the voucher) plus any error — Stripe can report an error while
1637
+ * still issuing the voucher. */
1638
+ confirmOxxo?(clientSecret: string, billing: CheckoutBilling): Promise<{
1639
+ error?: string;
1640
+ nextAction?: unknown;
1641
+ }>;
1642
+ /** Payment plan (new card): confirm the review's SetupIntent to SAVE the card
1643
+ * — NOTHING is charged; the plan schedules server-side. Returns the saved
1644
+ * PaymentMethod id, or throws. */
1645
+ confirmPaymentPlanSetup?(clientSecret: string, billing: CheckoutBilling): Promise<string>;
1646
+ /** Payment plan (saved-card shortcut): confirm an on-session card payment
1647
+ * against an EXISTING PaymentMethod — the 3DS step runs only when the plan
1648
+ * charge comes back requires_action. Throws on failure. */
1649
+ confirmSavedCardPayment?(clientSecret: string, paymentMethodId: string): Promise<void>;
1650
+ }
1651
+ /** What a provider page run should load: a URL, or an inline HTML document
1652
+ * (PayPal's auto-submitting top-level form). */
1653
+ interface ProviderPageRequest {
1654
+ uri?: string;
1655
+ html?: string;
1656
+ /** Base URL for an inline document (relative return-leg resolution). */
1657
+ baseUrl?: string;
1658
+ /** Navigating to a URL with this prefix ends the run as 'success'. */
1659
+ returnUrlPrefix: string;
1660
+ }
1661
+ interface ProviderPageOutcome {
1662
+ event: 'success' | 'dismiss' | 'failed';
1663
+ /** The intercepted return URL (carries e.g. `redirect_status`). */
1664
+ returnUrl?: string;
1665
+ /** Payload posted by data-driven sheets (Razorpay's `razorpay_payment_id`,
1666
+ * Xendit card tokenization's `token`) — the platform's plumbing delivers it. */
1667
+ data?: Record<string, unknown>;
1668
+ description?: string;
1669
+ }
1670
+ /**
1671
+ * The full port set the pay rails run on. `confirmer` is required (card/Apple
1672
+ * Pay); the rest are optional platform capabilities:
1673
+ * - providerPage: run a provider's page and resolve on the return leg (a
1674
+ * WebView sheet on RN, a redirect/popup on web).
1675
+ * - openUrl: open an external URL (OXXO voucher, ID-verification).
1676
+ * - onInstallmentOffers: offer MSI plans; resolve the chosen one, or null to
1677
+ * decline and fall through to a normal single charge.
1678
+ * - tokenizeXenditCard: tokenize a Xendit card inline (web); when absent the
1679
+ * engine runs the Xendit card document through `providerPage`.
1680
+ */
1681
+ interface CheckoutPorts extends PaymentConfirmerExtras {
1682
+ confirmer: PaymentConfirmer;
1683
+ providerPage?: (request: ProviderPageRequest) => Promise<ProviderPageOutcome>;
1684
+ openUrl?: (url: string) => void | Promise<void>;
1685
+ onInstallmentOffers?: (offers: InstallmentOffer[]) => Promise<InstallmentOffer | null>;
1686
+ tokenizeXenditCard?: (params: {
1687
+ publishableKey: string;
1688
+ amount: string | number;
1689
+ billing: CheckoutBilling;
1690
+ onBehalfOf?: string | null;
1691
+ }) => Promise<Record<string, unknown>>;
1692
+ }
1693
+ /** A typed "this platform can't run this rail" error — consumers branch on
1694
+ * `code` to hand off to the event page. */
1695
+ declare const unsupportedGatewayError: (message?: string) => Error & {
1696
+ code: string;
1697
+ };
1698
+ /**
1699
+ * PayPal Standard runs as a TOP-LEVEL form POST (PayPal refuses framing) — an
1700
+ * auto-submitting form document is all the provider page needs to load.
1701
+ */
1702
+ declare const buildAutoSubmitFormHtml: (form: PayPalForm) => string;
1703
+
1704
+ /**
1705
+ * Gateway sheet documents (Razorpay web checkout, Xendit card tokenization) —
1706
+ * pure HTML string builders the `providerPage` port loads (a WebView on RN, a
1707
+ * popup on web). No runtime deps: these just build a document; the raw card
1708
+ * details never leave the page — only the resulting token/payment id is posted
1709
+ * back through the provider-page outcome.
1710
+ */
1711
+ interface RazorpayCheckoutHtmlOptions {
1712
+ keyId: string;
1713
+ /** Charge amount in minor units (paise) — the server's pay_now × 100. */
1714
+ amountMinor: number;
1715
+ description?: string;
1716
+ buyerName?: string;
1717
+ buyerEmail?: string;
1718
+ orderHash: string;
1719
+ }
1720
+ /**
1721
+ * Razorpay hosted checkout inside a WebView. Reports back via
1722
+ * `window.ReactNativeWebView.postMessage` with `{event:'success',
1723
+ * razorpay_payment_id}` / `{event:'dismiss'}` / `{event:'failed', description}`.
1724
+ * `notes.order_hash` ties the charge to the order server-side.
1725
+ */
1726
+ declare const buildRazorpayCheckoutHtml: (options: RazorpayCheckoutHtmlOptions) => string;
1727
+ interface XenditCheckoutHtmlOptions {
1728
+ publishableKey: string;
1729
+ /** Tokenization amount — the server-returned pay-now figure verbatim. The
1730
+ * CHARGE amount stays server-side in submit-payment. */
1731
+ amount: number | string;
1732
+ buyerFirstName?: string;
1733
+ buyerLastName?: string;
1734
+ buyerEmail?: string;
1735
+ buyerPhone?: string;
1736
+ onBehalfOf?: string | null;
1737
+ }
1738
+ /**
1739
+ * Xendit card tokenization inside a WebView: card entry, `Xendit.card.createToken`
1740
+ * with 3DS (the challenge iframe re-invokes the handler when it resolves),
1741
+ * reporting `{event:'success', token}` / `{event:'failed', description}`.
1742
+ */
1743
+ declare const buildXenditCheckoutHtml: (options: XenditCheckoutHtmlOptions) => string;
1744
+
1745
+ /** The friendliest message for a failed call (the backend's own, else generic). */
1746
+ declare const errorMessage: (error: unknown) => string;
1747
+ /**
1748
+ * True when a failed request is the backend rejecting an expired cart/checkout
1749
+ * session (422 + an "…expired" message). Lets the flow show a "restart"
1750
+ * recovery instead of a raw error; ordinary 422 validation errors stay generic.
1751
+ */
1752
+ declare const isCartExpiredError: (error: unknown) => boolean;
1753
+
1754
+ /** How the shopper pays. Apple/Google Pay show the native wallet sheet; card
1755
+ * confirms the card field the consumer rendered. */
1756
+ type PaymentMethod = 'card' | 'applePay' | 'googlePay';
1757
+ /** A full payment request — the alternative rails carry parameters. The plain
1758
+ * `PaymentMethod` strings remain valid ('card' ≡ `{ method: 'card' }`). */
1759
+ type PaymentRequest = {
1760
+ method: 'card';
1761
+ }
1762
+ /** Pay with the ORDER'S OWN gateway (the prebuilt "just pay" button):
1763
+ * razorpay → the Razorpay sheet, xendit → the Xendit card rail,
1764
+ * stripe/unknown → the card path (incl. MSI). */
1765
+ | {
1766
+ method: 'auto';
1767
+ description?: string;
1768
+ } | {
1769
+ method: 'applePay';
1770
+ } | {
1771
+ method: 'googlePay';
1772
+ }
1773
+ /** Redirect-based Stripe methods (Klarna/Afterpay/Affirm/iDEAL-class). Needs
1774
+ * ports.providerPage + ports.createRedirectPaymentMethod. */
1775
+ | {
1776
+ method: 'redirect';
1777
+ methodType: string;
1778
+ }
1779
+ /** OXXO cash voucher (Mexico). Needs ports.confirmOxxo; result is
1780
+ * `pending: true` + `pendingVoucherUrl`. */
1781
+ | {
1782
+ method: 'oxxo';
1783
+ }
1784
+ /** Xendit e-wallet (walletKey from the pre-order processors, e.g. 'dana';
1785
+ * Jenius Pay wants extra.cashtag, OVO extra.phoneNumber). Needs providerPage. */
1786
+ | {
1787
+ method: 'xenditEWallet';
1788
+ walletKey: string;
1789
+ extra?: {
1790
+ cashtag?: string;
1791
+ phoneNumber?: string;
1792
+ };
1793
+ }
1794
+ /** PayPal Standard (top-level form; settles via IPN — may return pending). */
1795
+ | {
1796
+ method: 'paypal';
1797
+ }
1798
+ /** Razorpay web checkout (posts razorpay_payment_id → settle token on /success). */
1799
+ | {
1800
+ method: 'razorpay';
1801
+ description?: string;
1802
+ }
1803
+ /** Xendit CARD: the sheet tokenizes (3DS) and posts `token`; charge server-side. */
1804
+ | {
1805
+ method: 'xenditCard';
1806
+ }
1807
+ /** Payment plan (installments, Stripe): the card is SAVED via the review's
1808
+ * SetupIntent (nothing charged now), the plan schedules server-side; a
1809
+ * reusable saved card is charged directly (opt out with useSavedCard:false). */
1810
+ | {
1811
+ method: 'paymentPlan';
1812
+ useSavedCard?: boolean;
1813
+ };
1814
+ /** The platform capabilities + wallet/redirect options the rails run on. */
1815
+ interface EngineContext {
1816
+ ports: CheckoutPorts;
1817
+ options: CheckoutOptions;
1818
+ }
1819
+ /** Builds the server cart for a ticket selection and prices it. Idempotent per
1820
+ * selection (the server replaces the cart; the store resets for the new run). */
1821
+ declare const primeWith: (store: CheckoutStore, ctx: EngineContext, eventId: string, selections: TicketSelection[]) => Promise<void>;
1822
+ /** Builds the server cart for RESERVED SEATS and prices it — the seat-map
1823
+ * analogue of `primeWith`. Reservations were already placed on seat click
1824
+ * (`ttf.seatmap.reserve`); this turns them into cart lines + prices the order,
1825
+ * reusing the exact same session-prime / gateway-guard / pricing pipeline. */
1826
+ declare const primeSeatsWith: (store: CheckoutStore, ctx: EngineContext, eventId: string, lines: SeatLine[]) => Promise<void>;
1827
+ /**
1828
+ * Attach the engine to a cart that another supported flow already created
1829
+ * (currently resale and compatibility links). Unlike `prime`, this does not
1830
+ * add or replace ticket lines.
1831
+ */
1832
+ declare const resumeCartWith: (store: CheckoutStore, ctx: EngineContext, eventId: string, options?: {
1833
+ isFromResale?: boolean;
1834
+ }) => Promise<void>;
1835
+ /** Stores the add-on selection and re-prices the cart with it. */
1836
+ declare const repriceWith: (store: CheckoutStore, addOns: AddonSelection) => Promise<void>;
1837
+ declare const placeOrderWith: (store: CheckoutStore, ctx: EngineContext, method?: PaymentMethod | PaymentRequest) => Promise<PlaceOrderResult>;
1838
+ interface OrderPaymentSession {
1839
+ /** The order to pay (from your own on-checkout call). */
1840
+ orderHash: string;
1841
+ /** Buyer details for the payment legs (billing_details, wallet sheets…). */
1842
+ billing: CheckoutBilling;
1843
+ /** Engine progress store — created on first payOrder call. Carry the session
1844
+ * object so a retry after a CONFIRMED charge only replays finalization. */
1845
+ store?: CheckoutStore;
1846
+ }
1847
+ /** Pays an ALREADY-CREATED order through the engine's rails — same duplicate-
1848
+ * charge guards, same rails, same UNSUPPORTED_GATEWAY. Order creation and its
1849
+ * pre-flights are the caller's; the engine seeds a session store with the hash. */
1850
+ declare const payOrderWith: (ctx: EngineContext, session: OrderPaymentSession, method?: PaymentMethod | PaymentRequest) => Promise<PlaceOrderResult>;
1851
+ /** Syncs the session currency. A bare call geo-seeds; a `code` switches it —
1852
+ * after which the catalog reprices, so the engine resets the checkout (billing/
1853
+ * holders preserved) and the consumer re-runs prime with re-fetched tickets. */
1854
+ declare const syncCurrencyWith: (store: CheckoutStore, eventId: string, code?: string, options?: CurrencySyncOptions) => Promise<CurrencySync>;
1855
+ interface RunIdVerificationOptions {
1856
+ /** Opens the provider verification URL. Omit to leave opening to the consumer. */
1857
+ openUrl?: (url: string) => void | Promise<void>;
1858
+ /** Called once the check is confirmed required. Return true to TAKE OVER (the
1859
+ * engine stops — no open, no poll). */
1860
+ onRequired?: (info: {
1861
+ orderHash: string;
1862
+ verificationUrl: string | null;
1863
+ }) => boolean | void;
1864
+ onPhase?: IdVerificationCallbacks['onPhase'];
1865
+ schedule?: IdVerificationCallbacks['schedule'];
1866
+ /** Fires `recheck` when the provider hand-off might have completed (e.g. the
1867
+ * app returns to the foreground). Return an unsubscribe. */
1868
+ registerForegroundListener?: (recheck: () => void) => () => void;
1869
+ }
1870
+ /** Standalone poller for a NEED_ID_VERIFICATION order (mint + open the URL
1871
+ * first via `getIdVerificationStatus(hash, true)`, then start this). */
1872
+ declare const createIdVerificationPollerFor: (orderHash: string, onPhase: IdVerificationCallbacks["onPhase"], schedule?: IdVerificationCallbacks["schedule"]) => IdVerificationPoller;
1873
+ /**
1874
+ * Runs ID verification end-to-end for a NEED_ID_VERIFICATION order: mint the
1875
+ * provider URL, open it, poll to completion. Already-verified → resolves now;
1876
+ * `onRequired` returns true → resolves undefined (consumer took over); verified
1877
+ * → resolves the status; timeout/error → REJECTS with a reassuring message (the
1878
+ * payment already settled — treat a rejection as a verification stall, never a
1879
+ * payment failure).
1880
+ */
1881
+ declare const runIdVerificationWith: (orderHash: string, options?: RunIdVerificationOptions) => Promise<IdVerificationStatus | undefined>;
1882
+ interface EngineConfig {
1883
+ /** Platform capabilities — confirmer (required) + optional rails. */
1884
+ ports: CheckoutPorts;
1885
+ /** Wallet/redirect options (merchant identity, redirect URL, url scheme). */
1886
+ options?: CheckoutOptions;
1887
+ /** Reuse an existing store; one is created otherwise. */
1888
+ store?: CheckoutStore;
1889
+ }
1890
+ interface CheckoutEngine {
1891
+ /** The underlying store — subscribe/getState for non-React consumers. */
1892
+ store: CheckoutStore;
1893
+ getSnapshot: () => CheckoutSnapshot;
1894
+ subscribe: (listener: (s: CheckoutSnapshot) => void) => () => void;
1895
+ /** Build + price the cart for a ticket selection. */
1896
+ prime: (eventId: string, selections: TicketSelection[]) => Promise<void>;
1897
+ /** Build + price the cart for reserved SEATS (seat-map events). */
1898
+ primeSeats: (eventId: string, lines: SeatLine[]) => Promise<void>;
1899
+ /** Resume an existing server-side cart without replacing its ticket lines. */
1900
+ resumeCart: (eventId: string, options?: {
1901
+ isFromResale?: boolean;
1902
+ }) => Promise<void>;
1903
+ /** Set the add-on selection and re-price. */
1904
+ setAddons: (addOns: AddonSelection) => Promise<void>;
1905
+ setBilling: (billing: CheckoutBilling) => void;
1906
+ setHolders: (holders: CheckoutHolder[]) => void;
1907
+ setConsent: (consent: CheckoutConsent) => void;
1908
+ setAcceptedConditions: (accepted: Record<string, boolean>) => void;
1909
+ setAddonDataCapture: (capture: Record<string, CustomFieldValues>) => void;
1910
+ /** Debounced existing-account check; sets `existingAccountEmail` on the snapshot. */
1911
+ checkBuyerEmail: (email: string) => Promise<void>;
1912
+ /** Create the order and pay (or register free). */
1913
+ placeOrder: (method?: PaymentMethod | PaymentRequest) => Promise<PlaceOrderResult>;
1914
+ /** Switch/seed the session currency. */
1915
+ syncCurrency: (eventId: string, code?: string, options?: CurrencySyncOptions) => Promise<CurrencySync>;
1916
+ /** Run ID verification for a NEED_ID_VERIFICATION order. */
1917
+ runIdVerification: (orderHash: string, options?: RunIdVerificationOptions) => Promise<IdVerificationStatus | undefined>;
1918
+ reset: () => void;
1919
+ }
1920
+ /**
1921
+ * Binds the orchestration to a store + a platform's ports. In React, wrap this
1922
+ * with `useCheckout()`; in any other JS runtime, use it directly.
1923
+ */
1924
+ declare const createEngine: (config: EngineConfig) => CheckoutEngine;
1925
+
1926
+ /**
1927
+ * Adds ALL selected ticket types to the server cart in ONE call. The endpoint
1928
+ * REPLACES the entire cart every call, so per-type calls would keep only the
1929
+ * last. The `{ data: { attributes } }` envelope is mandatory (the backend
1930
+ * copies data.attributes into $_POST and 422s without it).
1931
+ */
1932
+ declare const addTicketsToCart: (eventId: string, selections: TicketSelection[]) => Promise<{
1933
+ holderNamesRequired: boolean;
1934
+ }>;
1935
+ /**
1936
+ * Adds RESERVED SEATS to the server cart — the seat-map analogue of
1937
+ * `addTicketsToCart`, a faithful port of the legacy `getAddToCartRequestData`
1938
+ * (`seatMapContainer/utils.ts`). Kept separate because a seated order's body
1939
+ * differs from a plain-ticket one in two ways `addTicketsToCart` can't express:
1940
+ *
1941
+ * - `product_cart_quantity` is the TOTAL number of reserved seats (not the
1942
+ * first line's quantity), and
1943
+ * - when ANY line carries a guest count (tables / group tickets) the
1944
+ * `ticket_types` map is keyed by INDEX with `quantity = guests` (one line per
1945
+ * seat); otherwise it's keyed by ticket-type id with quantities aggregated.
1946
+ *
1947
+ * Seat ids never appear in the body — the server binds cart lines to seats
1948
+ * through the live reservation (held by `ttf.seatmap.reserve`).
1949
+ */
1950
+ declare const addSeatsToCart: (eventId: string, lines: SeatLine[]) => Promise<{
1951
+ holderNamesRequired: boolean;
1952
+ }>;
1953
+ /**
1954
+ * Reads the cart back. MANDATORY between add-to-cart and updateCheckout: this
1955
+ * call writes the event's payment method into the PHP session, which
1956
+ * POST v1/checkout reads. Returns reservation seconds remaining plus the raw
1957
+ * pre-order gateway string (preserved verbatim so an unknown/future gateway
1958
+ * stays fail-closed at the engine's Stripe-only guard).
1959
+ */
1960
+ declare const getCart: () => Promise<{
1961
+ expiresInSeconds: number;
1962
+ preOrderGateway: string | null;
1963
+ }>;
1964
+ /**
1965
+ * Checkout gates for the CURRENT cart session (`GET v1/checkout-configs`).
1966
+ * Session-scoped: call only after the cart exists. The reliable source for the
1967
+ * collect_names gate (staging's add-to-cart returns empty attributes).
1968
+ */
1969
+ declare const getCheckoutConfigs: () => Promise<{
1970
+ holderNamesRequired: boolean;
1971
+ fieldGates: BuyerFieldVisibility;
1972
+ }>;
1973
+ interface CheckoutPricing {
1974
+ /** DECRYPTED ticket type ids (the tickets endpoint only has encrypted ones). */
1975
+ ticketTypeIds: string[];
1976
+ breakdown?: CheckoutBreakdown;
1977
+ stripe?: StripeConfig;
1978
+ paymentPlan?: CheckoutPaymentPlan;
1979
+ redirectPaymentMethods?: string[];
1980
+ walletAvailability?: CheckoutWalletAvailability;
1981
+ /** Server deferred-mode Stripe Elements config (mode/amount/currency) — mounts
1982
+ * the wallet-capable Payment Element exactly as the old checkout did. */
1983
+ stripeElementsConfig?: Record<string, unknown>;
1984
+ }
1985
+ /**
1986
+ * Prices the cart (+ chosen add-ons); returns the decrypted ticket type ids and
1987
+ * the Stripe config. Re-run whenever the add-on selection changes.
1988
+ *
1989
+ * paymentOption MUST be 'single_charge' — any other value makes the backend
1990
+ * reprice with a method-specific fee structure and silently drop booking fees
1991
+ * (undercharge vs. the price shown on the event page).
1992
+ */
1993
+ declare const updateCheckout: (eventId: string, addOns: AddonSelection, options?: {
1994
+ isFromResale?: boolean;
1995
+ }) => Promise<CheckoutPricing>;
1996
+ /**
1997
+ * Server-priced order summary (display-ready, server-formatted strings — render
1998
+ * verbatim, never recompute). Null when the backend doesn't serve the block.
1999
+ */
2000
+ declare const getPriceBreakdown: (addOns?: AddonSelection) => Promise<PriceBreakdown | null>;
2001
+ /** Raw pre-order payment-config attributes (GET v1/cart?payment_config=1) — feed
2002
+ * to core's paypalTabConfig / xenditPreOrderConfig / walletsOption. */
2003
+ declare const getPaymentConfigAttributes: () => Promise<Record<string, unknown>>;
2004
+ interface PreOrderPaymentMethods {
2005
+ gateway: PreOrderGateway | null;
2006
+ xenditEWallets: XenditProcessor[];
2007
+ xenditCard: boolean;
2008
+ paypal: boolean;
2009
+ }
2010
+ /**
2011
+ * What this event's checkout can pay with BEFORE the order exists — read from
2012
+ * the pre-order payment config exactly as the hosted selector does.
2013
+ */
2014
+ declare const getPreOrderPaymentMethods: () => Promise<PreOrderPaymentMethods>;
2015
+ /**
2016
+ * Existing-account detection (the hosted `init_email_check`): reports whether a
2017
+ * live account owns the email so returning buyers get a sign-in prompt. Never a
2018
+ * gate — debounce it, keep typing unblocked. Origin-rooted and form-encoded.
2019
+ */
2020
+ declare const checkBuyerEmail: (email: string) => Promise<ExistingAccount>;
2021
+
2022
+ /**
2023
+ * Attribute the buyer's session to a referrer/promoter (the numeric customer id
2024
+ * from a share/tracking link). The server credits it when the order completes;
2025
+ * pass `null` to clear. The endpoint always answers success, so ids can't be
2026
+ * probed.
2027
+ */
2028
+ declare const attributeReferrer: (eventId: string, referrer: string | number | null) => Promise<void>;
2029
+ /** Join the waiting list for a sold-out event (or one sold-out ticket type). */
2030
+ declare const joinWaitingList: (eventId: string, entry: WaitingListEntry) => Promise<void>;
2031
+ /** Submit RSVP details for an RSVP-style event. */
2032
+ declare const sendRsvp: (eventId: string, data: Record<string, unknown>) => Promise<unknown>;
2033
+ /** Validate a phone number (Twilio-backed) before letting the buyer proceed. */
2034
+ declare const validatePhone: (phone: string) => Promise<{
2035
+ valid: boolean;
2036
+ [key: string]: unknown;
2037
+ }>;
2038
+
2039
+ /** Purchasable ticket types for an event. */
2040
+ declare const getEventTickets: (eventId: string) => Promise<TicketType[]>;
2041
+ interface EventSeatingInfo {
2042
+ /** The event uses reserved seating — the buyer picks on a seat map instead of
2043
+ * choosing quantities. Render seat-map ticket types read-only and route to
2044
+ * "Select seats". */
2045
+ isSeatedEvent: boolean;
2046
+ /** The seat map is a TABLE map (its CTA reads "Select on map" vs "Select
2047
+ * seats"). Only meaningful when `isSeatedEvent`. */
2048
+ tableMapEnabled: boolean;
2049
+ /** The event sells per date/time session — pick a date, then time-slot tickets.
2050
+ * (Attribute names inferred defensively; pass dates via a prop if your page
2051
+ * data already has them.) */
2052
+ isTimeSlotEvent: boolean;
2053
+ /** Selectable session dates (ISO `yyyy-mm-dd`) for a time-slot event. */
2054
+ availableDates: string[];
2055
+ /** The event lets a buyer combine MORE THAN ONE ticket type in a single order.
2056
+ * When false (the default), selecting a new type replaces the previous one —
2057
+ * the ticket screen enforces one type at a time. Tables and regular tickets
2058
+ * are mutually exclusive regardless. */
2059
+ allowMultipleTicketTypePurchases: boolean;
2060
+ slug: string | null;
2061
+ name: string | null;
2062
+ /** ISO country code used to seed billing/phone inputs like the storefront. */
2063
+ countryCode: string | null;
2064
+ }
2065
+ /**
2066
+ * `GET v1/event/:id` — returns what the seated-event handoff needs:
2067
+ * `isSeatedEvent` (core's helper over the event attributes), plus slug/name for
2068
+ * the event-page link. `pk` is the optional preview key for unpublished events.
2069
+ */
2070
+ declare const getEventInfo: (eventId: string, pk?: string) => Promise<EventSeatingInfo>;
2071
+ /**
2072
+ * Event terms/conditions (client-side gate — nothing is submitted, the server
2073
+ * already knows them). LIVE contract: `attributes` is an ARRAY OF STRINGS, each
2074
+ * a MANDATORY acknowledgement; null when none. The object form
2075
+ * `{ conditions: [{id,name,content,is_required}] }` is tolerated defensively.
2076
+ */
2077
+ declare const getEventConditions: (eventId: string) => Promise<EventCondition[]>;
2078
+ /**
2079
+ * Ticket types for one DATE of a time-slot (session/calendar) event. Each
2080
+ * returned `id` (matrix_record_id) is specific to the chosen date/session — how
2081
+ * the server knows the date; no date field exists in the add-to-cart body.
2082
+ * @param date "YYYY-MM-DD"
2083
+ * @param options.groupIds restrict to specific slot groups; omit for all.
2084
+ */
2085
+ declare const getEventTimeSlotTickets: (eventId: string, date: string, options?: {
2086
+ groupIds?: number[];
2087
+ }) => Promise<TicketType[]>;
2088
+ /** The event's custom-field groups (order / ticket / add-on scopes). [] when
2089
+ * the event has none. */
2090
+ declare const getEventCustomFields: (eventId: string) => Promise<EventCustomFieldGroup[]>;
2091
+ /** Labels of REQUIRED order/ticket custom fields. Fails OPEN ([]) on error. */
2092
+ declare const getRequiredCustomFieldLabels: (eventId: string) => Promise<string[]>;
2093
+ /** Event add-ons (active only), prices converted from wire cents to units. */
2094
+ declare const getEventAddons: (eventId: string) => Promise<EventAddon[]>;
2095
+ /**
2096
+ * The web checkout's add-on visibility rule: an add-on applies iff it has no
2097
+ * prerequisite ticket types, or they intersect the cart's DECRYPTED ids. With
2098
+ * no ids yet (cart not primed), returns the list unchanged. Pure — no request.
2099
+ */
2100
+ declare const filterAddonsForTickets: (addons: EventAddon[], ticketTypeIds: string[]) => EventAddon[];
2101
+ interface TicketCatalogPromoMeta {
2102
+ isPromotionsEnabled: boolean;
2103
+ isAccessCodeEnabled: boolean;
2104
+ promoCodeValid?: boolean;
2105
+ promoCodeMessage?: string;
2106
+ }
2107
+ /** Tickets plus the catalog-level promo/access metadata the same response
2108
+ * carries — the read-back half of the promo-code loop. */
2109
+ declare const getEventTicketsWithMeta: (eventId: string) => Promise<{
2110
+ tickets: TicketType[];
2111
+ promo: TicketCatalogPromoMeta;
2112
+ showWaitingList: boolean;
2113
+ }>;
2114
+ /**
2115
+ * Applies a promo/access code to the session (empty string removes it). The
2116
+ * endpoint ALWAYS answers success (anti-brute-force) — read the outcome from a
2117
+ * fresh `getEventTicketsWithMeta` (`promo.promoCodeValid`).
2118
+ */
2119
+ declare const submitPromoCode: (eventId: string, promo: string) => Promise<void>;
2120
+ /**
2121
+ * Session currency preference (multi-currency events). A bare call geo-seeds and
2122
+ * reports the resolved state; passing a code switches it (every later read
2123
+ * reprices — restart ticket selection after a switch). `{ seed: true }` replays
2124
+ * a carried-over currency without overwriting the buyer's own choice.
2125
+ */
2126
+ declare const setEventCurrency: (eventId: string, code?: string, options?: CurrencySyncOptions) => Promise<CurrencyState>;
2127
+ /** Unlock a password-protected event. Throws `TtfError` on the wrong password. */
2128
+ declare const authenticateEvent: (eventId: string, password: string) => Promise<unknown>;
2129
+ /** Fire the event's tracking pixel (page view / order attribution). */
2130
+ declare const trackEvent: (eventId: string, options: {
2131
+ pageUrl?: string;
2132
+ page?: string;
2133
+ orderHash?: string;
2134
+ }) => Promise<unknown>;
2135
+ /** Write ORDER-level custom-field values after the order exists. */
2136
+ declare const updateOrderDataCapture: (eventId: string, orderId: string, dataCapture: Record<string, unknown>) => Promise<unknown>;
2137
+ /** Write TICKET-level (per-holder) custom-field values for one ticket hash. */
2138
+ declare const updateTicketDataCapture: (eventId: string, ticketHash: string, values: Record<string, unknown>) => Promise<unknown>;
2139
+
2140
+ interface CreatedOrder {
2141
+ hash: string;
2142
+ total: string;
2143
+ payNow: string;
2144
+ status: string;
2145
+ /** Duplicate-charge guard: true when the server answered with an
2146
+ * ALREADY-COMPLETED paid order (payment landed out-of-band). Go straight to
2147
+ * confirmation — never charge again. */
2148
+ alreadyPaid: boolean;
2149
+ }
2150
+ declare const createOrder: (input: {
2151
+ billing: CheckoutBilling;
2152
+ holders: CheckoutHolder[];
2153
+ addOns: AddonSelection;
2154
+ consent: CheckoutConsent;
2155
+ /** Add-on custom-field values keyed by add-on id → add_on_data_capture. */
2156
+ addOnDataCapture?: Record<string, CustomFieldValues>;
2157
+ }) => Promise<CreatedOrder>;
2158
+ interface OrderReview {
2159
+ total: string;
2160
+ clientSecret: string | null;
2161
+ publishableKey: string | null;
2162
+ connectedAccount: string | null;
2163
+ expiresInSeconds?: number;
2164
+ paymentAlreadyProcessed: boolean;
2165
+ gateway: ReturnType<typeof detectGateway>;
2166
+ orderId?: string;
2167
+ currency?: string;
2168
+ stripeIntentId?: string;
2169
+ payNow?: string;
2170
+ razorpayKeyId?: string;
2171
+ xenditPublishableKey?: string;
2172
+ xenditOnBehalfOf?: string | null;
2173
+ paymentPlanSetupSecret?: string;
2174
+ paymentPlanSavedCard: SavedPlanCard | null;
2175
+ }
2176
+ declare const getOrderReview: (orderHash: string) => Promise<OrderReview>;
2177
+ /**
2178
+ * Maps a signed-in user's profile into a `CheckoutBilling` to prefill the
2179
+ * billing form. Merge over your own edits:
2180
+ * `setBilling({ ...mapProfileToBilling(profile), ...edits })`.
2181
+ */
2182
+ declare const mapProfileToBilling: (profile: TfProfile) => CheckoutBilling;
2183
+ declare const completeFreeRegistration: (orderHash: string) => Promise<void>;
2184
+ declare const confirmOrderSuccess: (orderHash: string, options?: {
2185
+ /** Razorpay settle token (`razorpay_payment_id`) — the server fetches +
2186
+ * captures the charge with it. */
2187
+ token?: string;
2188
+ }) => Promise<{
2189
+ needIdVerification: boolean;
2190
+ }>;
2191
+ /**
2192
+ * ID-verification status for a NEED_ID_VERIFICATION order. Pass `mintUrl: true`
2193
+ * on the call that OPENS the provider session (the server mints
2194
+ * `verification_url` on that call only); poll the plain form afterwards.
2195
+ */
2196
+ declare const getIdVerificationStatus: (orderHash: string, mintUrl?: boolean) => Promise<IdVerificationStatus>;
2197
+ /** Whether the signed-in user owns this order (guards the confirmation page
2198
+ * against someone opening another buyer's order hash). */
2199
+ declare const verifyCustomerOrder: (orderHash: string) => Promise<unknown>;
2200
+
2201
+ /** A row in the order history. Fields the platform is known to return are typed;
2202
+ * the index signature keeps forward-compatible extras accessible. */
2203
+ interface TfOrderSummary {
2204
+ id?: string | number;
2205
+ hash?: string;
2206
+ status?: string;
2207
+ total?: string | number;
2208
+ currency?: string;
2209
+ eventName?: string;
2210
+ createdAt?: string;
2211
+ [key: string]: unknown;
2212
+ }
2213
+ /** A single order's full detail (tickets, buyer, totals). */
2214
+ interface TfOrderDetails extends TfOrderSummary {
2215
+ tickets?: unknown[];
2216
+ }
2217
+ interface OrdersQuery {
2218
+ page?: number;
2219
+ limit?: number;
2220
+ /** Restrict to one event by slug. */
2221
+ eventSlug?: string;
2222
+ /** Restrict to a brand (and its subbrands). */
2223
+ brandSlug?: string;
2224
+ }
2225
+ /** List the signed-in user's orders, newest first (server-paginated). */
2226
+ declare const getOrders: (query?: OrdersQuery) => Promise<TfListEnvelope<TfOrderSummary>>;
2227
+ /** The authenticated account endpoint accepts the numeric order id. Public
2228
+ * order hashes belong to the confirmation endpoint and must be resolved first. */
2229
+ declare const getOrder: (orderId: string) => Promise<TfEnvelope<TfOrderDetails>>;
2230
+ /** The signed-in user's tickets (wallet), server-paginated + filterable. */
2231
+ declare const getMyTickets: (query?: OrdersQuery & {
2232
+ from?: string;
2233
+ }) => Promise<TfListEnvelope<Record<string, unknown>>>;
2234
+ /** Update the order-level data-capture answers shown on the order detail page. */
2235
+ declare const updateOrderCustomFields: (eventId: string, orderId: string, values: Record<string, unknown>) => Promise<unknown>;
2236
+ /** Update data-capture answers for one issued ticket. */
2237
+ declare const updateTicketHolderCustomFields: (eventId: string, ticketHash: string, values: Record<string, unknown>) => Promise<unknown>;
2238
+
2239
+ declare const ttf: {
2240
+ readonly auth: {
2241
+ readonly login: (email: string, password: string) => Promise<TfProfile>;
2242
+ readonly register: (fields: Record<string, string | Blob>) => Promise<TfProfile>;
2243
+ readonly registerAccount: (input: AuthRegistrationInput) => Promise<TfProfile>;
2244
+ readonly logout: () => Promise<void>;
2245
+ readonly restorePassword: (email: string) => Promise<void>;
2246
+ readonly restorePasswordRn: (email: string) => Promise<void>;
2247
+ readonly resetPassword: (input: {
2248
+ token: string;
2249
+ password: string;
2250
+ passwordConfirmation?: string;
2251
+ }) => Promise<void>;
2252
+ readonly checkEmailExists: (email: string) => Promise<{
2253
+ exists: boolean;
2254
+ error?: string;
2255
+ }>;
2256
+ readonly mintVerificationUrl: () => Promise<unknown>;
2257
+ readonly getVerificationInfo: () => Promise<unknown>;
2258
+ readonly updateVerificationStatus: () => Promise<unknown>;
2259
+ };
2260
+ readonly profile: {
2261
+ readonly get: () => Promise<TfProfile>;
2262
+ };
2263
+ readonly geo: {
2264
+ readonly countries: () => Promise<TfCountry[]>;
2265
+ readonly states: (countryId: string | number) => Promise<TfState[]>;
2266
+ };
2267
+ readonly events: {
2268
+ readonly tickets: (eventId: string) => Promise<TicketType[]>;
2269
+ readonly ticketsWithMeta: (eventId: string) => Promise<{
2270
+ tickets: TicketType[];
2271
+ promo: TicketCatalogPromoMeta;
2272
+ showWaitingList: boolean;
2273
+ }>;
2274
+ readonly info: (eventId: string, pk?: string) => Promise<EventSeatingInfo>;
2275
+ readonly conditions: (eventId: string) => Promise<EventCondition[]>;
2276
+ readonly timeSlotTickets: (eventId: string, date: string, options?: {
2277
+ groupIds?: number[];
2278
+ }) => Promise<TicketType[]>;
2279
+ readonly customFields: (eventId: string) => Promise<EventCustomFieldGroup[]>;
2280
+ readonly requiredCustomFieldLabels: (eventId: string) => Promise<string[]>;
2281
+ readonly addons: (eventId: string) => Promise<EventAddon[]>;
2282
+ readonly filterAddonsForTickets: (addons: EventAddon[], ticketTypeIds: string[]) => EventAddon[];
2283
+ readonly submitPromoCode: (eventId: string, promo: string) => Promise<void>;
2284
+ readonly setCurrency: (eventId: string, code?: string, options?: CurrencySyncOptions) => Promise<CurrencyState>;
2285
+ readonly authenticate: (eventId: string, password: string) => Promise<unknown>;
2286
+ readonly track: (eventId: string, options: {
2287
+ pageUrl?: string;
2288
+ page?: string;
2289
+ orderHash?: string;
2290
+ }) => Promise<unknown>;
2291
+ readonly updateOrderDataCapture: (eventId: string, orderId: string, dataCapture: Record<string, unknown>) => Promise<unknown>;
2292
+ readonly updateTicketDataCapture: (eventId: string, ticketHash: string, values: Record<string, unknown>) => Promise<unknown>;
2293
+ };
2294
+ readonly cart: {
2295
+ readonly add: (eventId: string, selections: TicketSelection[]) => Promise<{
2296
+ holderNamesRequired: boolean;
2297
+ }>;
2298
+ readonly addSeats: (eventId: string, lines: SeatLine[]) => Promise<{
2299
+ holderNamesRequired: boolean;
2300
+ }>;
2301
+ readonly get: () => Promise<{
2302
+ expiresInSeconds: number;
2303
+ preOrderGateway: string | null;
2304
+ }>;
2305
+ readonly checkoutConfigs: () => Promise<{
2306
+ holderNamesRequired: boolean;
2307
+ fieldGates: BuyerFieldVisibility;
2308
+ }>;
2309
+ readonly price: (eventId: string, addOns: AddonSelection, options?: {
2310
+ isFromResale?: boolean;
2311
+ }) => Promise<CheckoutPricing>;
2312
+ readonly priceBreakdown: (addOns?: AddonSelection) => Promise<PriceBreakdown | null>;
2313
+ readonly paymentConfig: () => Promise<Record<string, unknown>>;
2314
+ readonly preOrderMethods: () => Promise<PreOrderPaymentMethods>;
2315
+ readonly checkBuyerEmail: (email: string) => Promise<ExistingAccount>;
2316
+ };
2317
+ readonly order: {
2318
+ readonly create: (input: {
2319
+ billing: CheckoutBilling;
2320
+ holders: CheckoutHolder[];
2321
+ addOns: AddonSelection;
2322
+ consent: CheckoutConsent;
2323
+ addOnDataCapture?: Record<string, CustomFieldValues>;
2324
+ }) => Promise<CreatedOrder>;
2325
+ readonly review: (orderHash: string) => Promise<OrderReview>;
2326
+ readonly mapProfileToBilling: (profile: TfProfile) => CheckoutBilling;
2327
+ readonly completeFreeRegistration: (orderHash: string) => Promise<void>;
2328
+ readonly confirmSuccess: (orderHash: string, options?: {
2329
+ token?: string;
2330
+ }) => Promise<{
2331
+ needIdVerification: boolean;
2332
+ }>;
2333
+ readonly idVerificationStatus: (orderHash: string, mintUrl?: boolean) => Promise<IdVerificationStatus>;
2334
+ readonly verifyCustomer: (orderHash: string) => Promise<unknown>;
2335
+ };
2336
+ readonly payment: {
2337
+ readonly changeMethodType: (orderHash: string, input: PaymentMethodTypeInput) => Promise<void>;
2338
+ readonly confirmRedirect: (orderHash: string, request: RedirectConfirmRequest) => Promise<RedirectOutcome>;
2339
+ readonly prepareOxxo: (orderHash: string) => Promise<void>;
2340
+ readonly xenditEWalletCharge: (fields: Record<string, string>) => Promise<Record<string, unknown>>;
2341
+ readonly xenditCardCharge: (orderId: string, orderHash: string, token: Record<string, unknown>) => Promise<Record<string, unknown>>;
2342
+ readonly installmentOffers: (orderHash: string, fields: Record<string, string>) => Promise<Record<string, unknown>>;
2343
+ readonly confirmInstallments: (orderHash: string, fields: Record<string, string>) => Promise<Record<string, unknown>>;
2344
+ readonly createPaymentPlan: (orderHash: string, stripePaymentMethodId: string) => Promise<{
2345
+ needIdVerification: boolean;
2346
+ }>;
2347
+ readonly chargeSavedCardPlan: (orderHash: string, paymentMethodId: string) => Promise<{
2348
+ requiresAction: boolean;
2349
+ clientSecret?: string;
2350
+ }>;
2351
+ readonly changeMethod: (attributes: Record<string, unknown>) => Promise<void>;
2352
+ readonly paypalForm: (orderHash: string) => Promise<PayPalForm | null>;
2353
+ };
2354
+ readonly orders: {
2355
+ readonly list: (query?: OrdersQuery) => Promise<TfListEnvelope<TfOrderSummary>>;
2356
+ readonly get: (orderId: string) => Promise<TfEnvelope<TfOrderDetails>>;
2357
+ readonly myTickets: (query?: OrdersQuery & {
2358
+ from?: string;
2359
+ }) => Promise<TfListEnvelope<Record<string, unknown>>>;
2360
+ readonly updateOrderCustomFields: (eventId: string, orderId: string, values: Record<string, unknown>) => Promise<unknown>;
2361
+ readonly updateTicketHolderCustomFields: (eventId: string, ticketHash: string, values: Record<string, unknown>) => Promise<unknown>;
2362
+ };
2363
+ readonly engagement: {
2364
+ readonly attributeReferrer: (eventId: string, referrer: string | number | null) => Promise<void>;
2365
+ readonly joinWaitingList: (eventId: string, entry: WaitingListEntry) => Promise<void>;
2366
+ readonly sendRsvp: (eventId: string, data: Record<string, unknown>) => Promise<unknown>;
2367
+ readonly validatePhone: (phone: string) => Promise<{
2368
+ valid: boolean;
2369
+ [key: string]: unknown;
2370
+ }>;
2371
+ };
2372
+ readonly resale: {
2373
+ readonly sell: (ticketId: string, payload?: Record<string, unknown>) => Promise<unknown>;
2374
+ readonly remove: (ticketId: string) => Promise<unknown>;
2375
+ readonly process: (ticketId: string, payload?: Record<string, unknown>) => Promise<unknown>;
2376
+ readonly decline: (ticketId: string) => Promise<unknown>;
2377
+ };
2378
+ readonly confirmation: {
2379
+ readonly get: (orderHash: string) => Promise<Record<string, unknown>>;
2380
+ };
2381
+ readonly preRegistration: {
2382
+ readonly confirm: (eventId: string, attributes: Record<string, unknown>) => Promise<unknown>;
2383
+ readonly influencers: (eventId: string) => Promise<unknown>;
2384
+ readonly confirmationPage: (hash: string) => Promise<unknown>;
2385
+ readonly submitShareAction: (hash: string, input: {
2386
+ eventActionId: number | string;
2387
+ accessToken?: string;
2388
+ shareActionToken?: string;
2389
+ tokenShuffleMethod?: string;
2390
+ phase?: string;
2391
+ }) => Promise<unknown>;
2392
+ };
2393
+ readonly delegation: {
2394
+ readonly checkCustomerExists: (accessHash: string) => Promise<Record<string, unknown>>;
2395
+ readonly consumerPageInfo: (accessHash: string) => Promise<unknown>;
2396
+ readonly issueTicket: (accessHash: string, data: Record<string, unknown>) => Promise<unknown>;
2397
+ };
2398
+ readonly seatmap: {
2399
+ readonly data: (eventId: string, params?: Record<string, unknown>) => Promise<unknown>;
2400
+ readonly statuses: (eventId: string) => Promise<unknown>;
2401
+ readonly reserve: (eventId: string, reservation: Record<string, unknown>) => Promise<unknown>;
2402
+ readonly removeReserved: (eventId: string, tierId: string, seatIds: string[]) => Promise<unknown>;
2403
+ readonly refreshReservation: (eventId: string, orderId: string) => Promise<unknown>;
2404
+ };
2405
+ };
2406
+ type Ttf = typeof ttf;
2407
+
2408
+ /**
2409
+ * Sign in with email + password. Runs the OAuth chain, stores the tokens, and
2410
+ * resolves to the freshly-loaded profile. Throws `TtfError` on bad credentials.
2411
+ */
2412
+ declare const login: (email: string, password: string) => Promise<TfProfile>;
2413
+ /**
2414
+ * Create an account. Pass the registration fields as a flat record — the
2415
+ * backend endpoint (`v1/oauth/register-rn`) takes multipart form data, so field
2416
+ * names are forwarded verbatim (`email`, `password`, `first_name`, …).
2417
+ */
2418
+ declare const register: (fields: Record<string, string | Blob>) => Promise<TfProfile>;
2419
+ /** Typed registration used by platform auth flows. */
2420
+ declare const registerAccount: (input: AuthRegistrationInput) => Promise<TfProfile>;
2421
+ /** Kick off the "forgot password" email for an address. */
2422
+ declare const restorePassword: (email: string) => Promise<void>;
2423
+ /** Complete a password reset with the token from the email. */
2424
+ declare const resetPassword: (input: {
2425
+ token: string;
2426
+ password: string;
2427
+ passwordConfirmation?: string;
2428
+ }) => Promise<void>;
2429
+ /** React Native "forgot password" variant (`v1/oauth/restore-password-rn`). */
2430
+ declare const restorePasswordRn: (email: string) => Promise<void>;
2431
+ /** Mint (or read) the hosted identity-verification URL for the signed-in user. */
2432
+ declare const mintVerificationUrl: () => Promise<unknown>;
2433
+ /** Read the signed-in user's current identity-verification status. */
2434
+ declare const getVerificationInfo: () => Promise<unknown>;
2435
+ /** Mark identity verification as PENDING after the buyer starts the provider flow. */
2436
+ declare const updateVerificationStatus: () => Promise<unknown>;
2437
+ /** Sign out: tell the backend, then drop local tokens regardless of the result. */
2438
+ declare const logout: () => Promise<void>;
2439
+ /**
2440
+ * Whether an email already has an account. Normalizes the legacy
2441
+ * `/ajax/contact-email` response (`exists: 0|1`) to a boolean; never throws —
2442
+ * returns `{ exists: false }` on failure so callers can treat it as advisory.
2443
+ */
2444
+ declare const checkEmailExists: (email: string) => Promise<{
2445
+ exists: boolean;
2446
+ error?: string;
2447
+ }>;
2448
+
2449
+ /** Fetch the signed-in user's profile. Throws `TtfError` if unauthenticated. */
2450
+ declare const getProfile: () => Promise<TfProfile>;
2451
+
2452
+ /** All selectable countries (billing `countryId` values). */
2453
+ declare const getCountries: () => Promise<TfCountry[]>;
2454
+ /** States/provinces for a country, normalized from the backend's id→name map. */
2455
+ declare const getStates: (countryId: string | number) => Promise<TfState[]>;
2456
+
2457
+ /** Put a ticket up for resale. `payload` carries price/recipient per the event's
2458
+ * resale rules; forwarded verbatim. */
2459
+ declare const sellTicket: (ticketId: string, payload?: Record<string, unknown>) => Promise<unknown>;
2460
+ /** Remove a ticket that is currently listed for resale. */
2461
+ declare const removeTicketFromResale: (ticketId: string) => Promise<unknown>;
2462
+ /** Process (accept/complete) a pending resale for a ticket. */
2463
+ declare const processResale: (ticketId: string, payload?: Record<string, unknown>) => Promise<unknown>;
2464
+ /** Decline a pending resale for a ticket. */
2465
+ declare const declineResale: (ticketId: string) => Promise<unknown>;
2466
+
2467
+ /** Fetch the confirmation-page payload for a completed order. */
2468
+ declare const getConfirmation: (orderHash: string) => Promise<Record<string, unknown>>;
2469
+
2470
+ /** Decode the backend's lightweight pre-registration share-action token. */
2471
+ declare const decodeShareActionToken: (value: string, method?: string) => string;
2472
+ /** Confirm pre-registration for an event. `attributes` carries the buyer's
2473
+ * answers; forwarded under the JSON:API `{ data: { attributes } }` envelope. */
2474
+ declare const confirmPreRegistration: (eventId: string, attributes: Record<string, unknown>) => Promise<unknown>;
2475
+ /** Influencers/promoters available to share to for an event's pre-reg phase. */
2476
+ declare const getInfluencers: (eventId: string) => Promise<unknown>;
2477
+ /** The post-confirmation share page (options + the buyer's current standing). */
2478
+ declare const getConfirmationPage: (hash: string) => Promise<unknown>;
2479
+ /** Record a share action (a referral phase step) against a pre-reg hash. */
2480
+ declare const submitShareAction: (hash: string, input: {
2481
+ eventActionId: number | string;
2482
+ accessToken?: string;
2483
+ shareActionToken?: string;
2484
+ tokenShuffleMethod?: string;
2485
+ phase?: string;
2486
+ }) => Promise<unknown>;
2487
+
2488
+ /** Whether the delegated recipient already has an account. */
2489
+ declare const checkCustomerExists: (accessHash: string) => Promise<Record<string, unknown>>;
2490
+ /** The claim page for a delegation access link (event + ticket context). */
2491
+ declare const getConsumerPageInfo: (accessHash: string) => Promise<unknown>;
2492
+ /** Issue (claim) the delegated ticket. `data` carries the recipient details;
2493
+ * forwarded under the JSON:API `{ data: { attributes } }` envelope. */
2494
+ declare const issueTicket: (accessHash: string, data: Record<string, unknown>) => Promise<unknown>;
2495
+
2496
+ /** The venue seat map for an event (optionally scoped via `params`). */
2497
+ declare const getSeatMapData: (eventId: string, params?: Record<string, unknown>) => Promise<unknown>;
2498
+ /** Live availability/status for the event's seats (poll during selection). */
2499
+ declare const getSeatStatuses: (eventId: string) => Promise<unknown>;
2500
+ /** Reserve a seat selection, e.g. `{ tierId, seatId, ttl: 10 }` — forwarded
2501
+ * under the backend's `{ data: … }` envelope. */
2502
+ declare const reserveSeats: (eventId: string, reservation: Record<string, unknown>) => Promise<unknown>;
2503
+ /** Release a held reservation (DELETE with a body). */
2504
+ declare const removeReservedSeats: (eventId: string, tierId: string, seatIds: string[]) => Promise<unknown>;
2505
+ /** Extend a seat reservation's TTL for an in-flight order. */
2506
+ declare const refreshReservation: (eventId: string, orderId: string) => Promise<unknown>;
2507
+
2508
+ /**
2509
+ * Per-payment-method-type fee re-price (Klarna/Afterpay-class types carry their
2510
+ * own fee structures). Run BEFORE confirming a fee-mode type, then re-fetch the
2511
+ * review — charging the pre-reprice amount would undercharge.
2512
+ */
2513
+ declare const changePaymentMethodType: (orderHash: string, input: PaymentMethodTypeInput) => Promise<void>;
2514
+ /** Server-side confirm for redirect-based Stripe methods — returns the provider
2515
+ * hand-off (or 'settled' when no redirect is needed). */
2516
+ declare const confirmRedirect: (orderHash: string, request: RedirectConfirmRequest) => Promise<RedirectOutcome>;
2517
+ /** OXXO: move the order (and its goods) to the pending-voucher state BEFORE the
2518
+ * client confirm. Empty body; needs the registered session. */
2519
+ declare const prepareForOxxo: (orderHash: string) => Promise<void>;
2520
+ /** Xendit e-wallet charge — multipart fields from core's
2521
+ * `buildXenditEWalletChargeFields`; interpret with `interpretXenditChargeResponse`. */
2522
+ declare const submitXenditEWalletCharge: (fields: Record<string, string>) => Promise<Record<string, unknown>>;
2523
+ /** MSI offers — between payment-method creation and the confirm; the server
2524
+ * gates to MXN carts. Fields from `buildInstallmentOffersFields`. */
2525
+ declare const getInstallmentOffers: (orderHash: string, fields: Record<string, string>) => Promise<Record<string, unknown>>;
2526
+ /** MSI confirm: the intent confirms SERVER-SIDE — when has_next_action comes
2527
+ * back, run only handleNextAction, never a second confirmPayment. */
2528
+ declare const confirmInstallments: (orderHash: string, fields: Record<string, string>) => Promise<Record<string, unknown>>;
2529
+ /**
2530
+ * Payment plan (installments) with a NEW card: the card is saved via the
2531
+ * review's SetupIntent (confirmed on the confirmer, nothing charged), then this
2532
+ * schedules the plan server-side against the resulting PaymentMethod.
2533
+ */
2534
+ declare const createPaymentPlan: (orderHash: string, stripePaymentMethodId: string) => Promise<{
2535
+ needIdVerification: boolean;
2536
+ }>;
2537
+ /**
2538
+ * Payment-plan saved-card shortcut: charge the plan directly to the reusable
2539
+ * card the review carries, skipping the SetupIntent round trip. The server may
2540
+ * answer `requires_action` with a client secret — run 3DS, then settle.
2541
+ */
2542
+ declare const chargeSavedCardPlan: (orderHash: string, paymentMethodId: string) => Promise<{
2543
+ requiresAction: boolean;
2544
+ clientSecret?: string;
2545
+ }>;
2546
+ /** PayPal Standard step 1: switch the placed order's payment method (attributes
2547
+ * from core's `buildChangePaymentMethodAttributes`). */
2548
+ declare const changePaymentMethod: (attributes: Record<string, unknown>) => Promise<void>;
2549
+ /** PayPal Standard step 2: the `{action_url, fields}` document the provider page
2550
+ * auto-submits (PayPal refuses framing — top-level POST only). */
2551
+ declare const getPayPalForm: (orderHash: string) => Promise<PayPalForm | null>;
2552
+ /**
2553
+ * Xendit CARD charge: the sheet tokenized the card (with 3DS) client-side; the
2554
+ * token is charged server-side (the amount is resolved from the order, the
2555
+ * token only proves the card). Success responses may still carry error:true;
2556
+ * that throws here.
2557
+ */
2558
+ declare const submitXenditCardCharge: (orderId: string, orderHash: string, token: Record<string, unknown>) => Promise<Record<string, unknown>>;
2559
+
2560
+ /**
2561
+ * The raw api surface — one function per endpoint, each "just does the call"
2562
+ * and returns typed data (or throws `TtfError`). The `ttf` facade in
2563
+ * `services.ts` is a thin, domain-grouped convenience over exactly these.
2564
+ * Power users can import them directly.
2565
+ */
2566
+
2567
+ type index$1_CheckoutPricing = CheckoutPricing;
2568
+ type index$1_CreatedOrder = CreatedOrder;
2569
+ type index$1_EventSeatingInfo = EventSeatingInfo;
2570
+ type index$1_OrderReview = OrderReview;
2571
+ type index$1_OrdersQuery = OrdersQuery;
2572
+ type index$1_PreOrderPaymentMethods = PreOrderPaymentMethods;
2573
+ type index$1_TfOrderDetails = TfOrderDetails;
2574
+ type index$1_TfOrderSummary = TfOrderSummary;
2575
+ type index$1_TicketCatalogPromoMeta = TicketCatalogPromoMeta;
2576
+ type index$1_WaitingListEntry = WaitingListEntry;
2577
+ declare const index$1_addSeatsToCart: typeof addSeatsToCart;
2578
+ declare const index$1_addTicketsToCart: typeof addTicketsToCart;
2579
+ declare const index$1_attributeReferrer: typeof attributeReferrer;
2580
+ declare const index$1_authenticateEvent: typeof authenticateEvent;
2581
+ declare const index$1_changePaymentMethod: typeof changePaymentMethod;
2582
+ declare const index$1_changePaymentMethodType: typeof changePaymentMethodType;
2583
+ declare const index$1_chargeSavedCardPlan: typeof chargeSavedCardPlan;
2584
+ declare const index$1_checkBuyerEmail: typeof checkBuyerEmail;
2585
+ declare const index$1_checkCustomerExists: typeof checkCustomerExists;
2586
+ declare const index$1_checkEmailExists: typeof checkEmailExists;
2587
+ declare const index$1_completeFreeRegistration: typeof completeFreeRegistration;
2588
+ declare const index$1_confirmInstallments: typeof confirmInstallments;
2589
+ declare const index$1_confirmOrderSuccess: typeof confirmOrderSuccess;
2590
+ declare const index$1_confirmPreRegistration: typeof confirmPreRegistration;
2591
+ declare const index$1_confirmRedirect: typeof confirmRedirect;
2592
+ declare const index$1_createOrder: typeof createOrder;
2593
+ declare const index$1_createPaymentPlan: typeof createPaymentPlan;
2594
+ declare const index$1_declineResale: typeof declineResale;
2595
+ declare const index$1_decodeShareActionToken: typeof decodeShareActionToken;
2596
+ declare const index$1_filterAddonsForTickets: typeof filterAddonsForTickets;
2597
+ declare const index$1_getCart: typeof getCart;
2598
+ declare const index$1_getCheckoutConfigs: typeof getCheckoutConfigs;
2599
+ declare const index$1_getConfirmation: typeof getConfirmation;
2600
+ declare const index$1_getConfirmationPage: typeof getConfirmationPage;
2601
+ declare const index$1_getConsumerPageInfo: typeof getConsumerPageInfo;
2602
+ declare const index$1_getCountries: typeof getCountries;
2603
+ declare const index$1_getEventAddons: typeof getEventAddons;
2604
+ declare const index$1_getEventConditions: typeof getEventConditions;
2605
+ declare const index$1_getEventCustomFields: typeof getEventCustomFields;
2606
+ declare const index$1_getEventInfo: typeof getEventInfo;
2607
+ declare const index$1_getEventTickets: typeof getEventTickets;
2608
+ declare const index$1_getEventTicketsWithMeta: typeof getEventTicketsWithMeta;
2609
+ declare const index$1_getEventTimeSlotTickets: typeof getEventTimeSlotTickets;
2610
+ declare const index$1_getIdVerificationStatus: typeof getIdVerificationStatus;
2611
+ declare const index$1_getInfluencers: typeof getInfluencers;
2612
+ declare const index$1_getInstallmentOffers: typeof getInstallmentOffers;
2613
+ declare const index$1_getMyTickets: typeof getMyTickets;
2614
+ declare const index$1_getOrder: typeof getOrder;
2615
+ declare const index$1_getOrderReview: typeof getOrderReview;
2616
+ declare const index$1_getOrders: typeof getOrders;
2617
+ declare const index$1_getPayPalForm: typeof getPayPalForm;
2618
+ declare const index$1_getPaymentConfigAttributes: typeof getPaymentConfigAttributes;
2619
+ declare const index$1_getPreOrderPaymentMethods: typeof getPreOrderPaymentMethods;
2620
+ declare const index$1_getPriceBreakdown: typeof getPriceBreakdown;
2621
+ declare const index$1_getProfile: typeof getProfile;
2622
+ declare const index$1_getRequiredCustomFieldLabels: typeof getRequiredCustomFieldLabels;
2623
+ declare const index$1_getSeatMapData: typeof getSeatMapData;
2624
+ declare const index$1_getSeatStatuses: typeof getSeatStatuses;
2625
+ declare const index$1_getStates: typeof getStates;
2626
+ declare const index$1_getVerificationInfo: typeof getVerificationInfo;
2627
+ declare const index$1_issueTicket: typeof issueTicket;
2628
+ declare const index$1_joinWaitingList: typeof joinWaitingList;
2629
+ declare const index$1_login: typeof login;
2630
+ declare const index$1_logout: typeof logout;
2631
+ declare const index$1_mapProfileToBilling: typeof mapProfileToBilling;
2632
+ declare const index$1_mintVerificationUrl: typeof mintVerificationUrl;
2633
+ declare const index$1_prepareForOxxo: typeof prepareForOxxo;
2634
+ declare const index$1_processResale: typeof processResale;
2635
+ declare const index$1_refreshReservation: typeof refreshReservation;
2636
+ declare const index$1_register: typeof register;
2637
+ declare const index$1_registerAccount: typeof registerAccount;
2638
+ declare const index$1_removeReservedSeats: typeof removeReservedSeats;
2639
+ declare const index$1_removeTicketFromResale: typeof removeTicketFromResale;
2640
+ declare const index$1_reserveSeats: typeof reserveSeats;
2641
+ declare const index$1_resetPassword: typeof resetPassword;
2642
+ declare const index$1_restorePassword: typeof restorePassword;
2643
+ declare const index$1_restorePasswordRn: typeof restorePasswordRn;
2644
+ declare const index$1_sellTicket: typeof sellTicket;
2645
+ declare const index$1_sendRsvp: typeof sendRsvp;
2646
+ declare const index$1_setEventCurrency: typeof setEventCurrency;
2647
+ declare const index$1_submitPromoCode: typeof submitPromoCode;
2648
+ declare const index$1_submitShareAction: typeof submitShareAction;
2649
+ declare const index$1_submitXenditCardCharge: typeof submitXenditCardCharge;
2650
+ declare const index$1_submitXenditEWalletCharge: typeof submitXenditEWalletCharge;
2651
+ declare const index$1_trackEvent: typeof trackEvent;
2652
+ declare const index$1_updateCheckout: typeof updateCheckout;
2653
+ declare const index$1_updateOrderCustomFields: typeof updateOrderCustomFields;
2654
+ declare const index$1_updateOrderDataCapture: typeof updateOrderDataCapture;
2655
+ declare const index$1_updateTicketDataCapture: typeof updateTicketDataCapture;
2656
+ declare const index$1_updateTicketHolderCustomFields: typeof updateTicketHolderCustomFields;
2657
+ declare const index$1_updateVerificationStatus: typeof updateVerificationStatus;
2658
+ declare const index$1_validatePhone: typeof validatePhone;
2659
+ declare const index$1_verifyCustomerOrder: typeof verifyCustomerOrder;
2660
+ declare namespace index$1 {
2661
+ export { type index$1_CheckoutPricing as CheckoutPricing, type index$1_CreatedOrder as CreatedOrder, type index$1_EventSeatingInfo as EventSeatingInfo, type index$1_OrderReview as OrderReview, type index$1_OrdersQuery as OrdersQuery, type index$1_PreOrderPaymentMethods as PreOrderPaymentMethods, type index$1_TfOrderDetails as TfOrderDetails, type index$1_TfOrderSummary as TfOrderSummary, type index$1_TicketCatalogPromoMeta as TicketCatalogPromoMeta, type index$1_WaitingListEntry as WaitingListEntry, index$1_addSeatsToCart as addSeatsToCart, index$1_addTicketsToCart as addTicketsToCart, index$1_attributeReferrer as attributeReferrer, index$1_authenticateEvent as authenticateEvent, index$1_changePaymentMethod as changePaymentMethod, index$1_changePaymentMethodType as changePaymentMethodType, index$1_chargeSavedCardPlan as chargeSavedCardPlan, index$1_checkBuyerEmail as checkBuyerEmail, index$1_checkCustomerExists as checkCustomerExists, index$1_checkEmailExists as checkEmailExists, index$1_completeFreeRegistration as completeFreeRegistration, index$1_confirmInstallments as confirmInstallments, index$1_confirmOrderSuccess as confirmOrderSuccess, index$1_confirmPreRegistration as confirmPreRegistration, index$1_confirmRedirect as confirmRedirect, index$1_createOrder as createOrder, index$1_createPaymentPlan as createPaymentPlan, index$1_declineResale as declineResale, index$1_decodeShareActionToken as decodeShareActionToken, index$1_filterAddonsForTickets as filterAddonsForTickets, index$1_getCart as getCart, index$1_getCheckoutConfigs as getCheckoutConfigs, index$1_getConfirmation as getConfirmation, index$1_getConfirmationPage as getConfirmationPage, index$1_getConsumerPageInfo as getConsumerPageInfo, index$1_getCountries as getCountries, index$1_getEventAddons as getEventAddons, index$1_getEventConditions as getEventConditions, index$1_getEventCustomFields as getEventCustomFields, index$1_getEventInfo as getEventInfo, index$1_getEventTickets as getEventTickets, index$1_getEventTicketsWithMeta as getEventTicketsWithMeta, index$1_getEventTimeSlotTickets as getEventTimeSlotTickets, index$1_getIdVerificationStatus as getIdVerificationStatus, index$1_getInfluencers as getInfluencers, index$1_getInstallmentOffers as getInstallmentOffers, index$1_getMyTickets as getMyTickets, index$1_getOrder as getOrder, index$1_getOrderReview as getOrderReview, index$1_getOrders as getOrders, index$1_getPayPalForm as getPayPalForm, index$1_getPaymentConfigAttributes as getPaymentConfigAttributes, index$1_getPreOrderPaymentMethods as getPreOrderPaymentMethods, index$1_getPriceBreakdown as getPriceBreakdown, index$1_getProfile as getProfile, index$1_getRequiredCustomFieldLabels as getRequiredCustomFieldLabels, index$1_getSeatMapData as getSeatMapData, index$1_getSeatStatuses as getSeatStatuses, index$1_getStates as getStates, index$1_getVerificationInfo as getVerificationInfo, index$1_issueTicket as issueTicket, index$1_joinWaitingList as joinWaitingList, index$1_login as login, index$1_logout as logout, index$1_mapProfileToBilling as mapProfileToBilling, index$1_mintVerificationUrl as mintVerificationUrl, index$1_prepareForOxxo as prepareForOxxo, index$1_processResale as processResale, index$1_refreshReservation as refreshReservation, index$1_register as register, index$1_registerAccount as registerAccount, index$1_removeReservedSeats as removeReservedSeats, index$1_removeTicketFromResale as removeTicketFromResale, index$1_reserveSeats as reserveSeats, index$1_resetPassword as resetPassword, index$1_restorePassword as restorePassword, index$1_restorePasswordRn as restorePasswordRn, index$1_sellTicket as sellTicket, index$1_sendRsvp as sendRsvp, index$1_setEventCurrency as setEventCurrency, index$1_submitPromoCode as submitPromoCode, index$1_submitShareAction as submitShareAction, index$1_submitXenditCardCharge as submitXenditCardCharge, index$1_submitXenditEWalletCharge as submitXenditEWalletCharge, index$1_trackEvent as trackEvent, index$1_updateCheckout as updateCheckout, index$1_updateOrderCustomFields as updateOrderCustomFields, index$1_updateOrderDataCapture as updateOrderDataCapture, index$1_updateTicketDataCapture as updateTicketDataCapture, index$1_updateTicketHolderCustomFields as updateTicketHolderCustomFields, index$1_updateVerificationStatus as updateVerificationStatus, index$1_validatePhone as validatePhone, index$1_verifyCustomerOrder as verifyCustomerOrder };
2662
+ }
2663
+
2664
+ /**
2665
+ * Shared option shapes so every hook takes the same `options` passthrough
2666
+ * (onSuccess, enabled, staleTime, …) without re-spelling the generics.
2667
+ */
2668
+
2669
+ /** Query options minus the parts the hook owns (`queryKey`, `queryFn`). */
2670
+ type QueryOpts<TData> = Omit<UseQueryOptions<TData, TtfError, TData>, 'queryKey' | 'queryFn'>;
2671
+ /** Mutation options minus the part the hook owns (`mutationFn`). */
2672
+ type MutationOpts<TData, TVars> = Omit<UseMutationOptions<TData, TtfError, TVars>, 'mutationFn'>;
2673
+
2674
+ declare const useLogin: (options?: MutationOpts<TfProfile, {
2675
+ email: string;
2676
+ password: string;
2677
+ }>) => _tanstack_react_query.UseMutationResult<TfProfile, TtfError, {
2678
+ email: string;
2679
+ password: string;
2680
+ }, unknown>;
2681
+ declare const useRegister: (options?: MutationOpts<TfProfile, Record<string, string | Blob>>) => _tanstack_react_query.UseMutationResult<TfProfile, TtfError, Record<string, string | Blob>, unknown>;
2682
+ declare const useRegisterAccount: (options?: MutationOpts<TfProfile, AuthRegistrationInput>) => _tanstack_react_query.UseMutationResult<TfProfile, TtfError, AuthRegistrationInput, unknown>;
2683
+ declare const useRestorePassword: (options?: MutationOpts<void, string>) => _tanstack_react_query.UseMutationResult<void, TtfError, string, unknown>;
2684
+ declare const useRestorePasswordRn: (options?: MutationOpts<void, string>) => _tanstack_react_query.UseMutationResult<void, TtfError, string, unknown>;
2685
+ declare const useResetPassword: (options?: MutationOpts<void, {
2686
+ token: string;
2687
+ password: string;
2688
+ passwordConfirmation?: string;
2689
+ }>) => _tanstack_react_query.UseMutationResult<void, TtfError, {
2690
+ token: string;
2691
+ password: string;
2692
+ passwordConfirmation?: string;
2693
+ }, unknown>;
2694
+ declare const useLogout: (options?: MutationOpts<void, void>) => _tanstack_react_query.UseMutationResult<void, TtfError, void, unknown>;
2695
+ declare const useCheckEmailExists: (options?: MutationOpts<{
2696
+ exists: boolean;
2697
+ error?: string;
2698
+ }, string>) => _tanstack_react_query.UseMutationResult<{
2699
+ exists: boolean;
2700
+ error?: string;
2701
+ }, TtfError, string, unknown>;
2702
+
2703
+ interface UseAuthFlowOptions {
2704
+ initialView?: AuthFlowView;
2705
+ initialEmail?: string;
2706
+ /** Match the legacy modal's full account form by default. */
2707
+ requireRegistrationAddress?: boolean;
2708
+ /** Web and native use different restore-password routes on the legacy API. */
2709
+ passwordResetTransport?: 'web' | 'native';
2710
+ /** Extra backend fields for specialized registration links. */
2711
+ registrationFields?: Record<string, string>;
2712
+ onAuthenticated?: (profile: TfProfile) => void;
2713
+ onLoggedOut?: () => void;
2714
+ }
2715
+ interface RegistrationSubmitOptions {
2716
+ /** Require state only when the selected country actually exposes states. */
2717
+ requireState?: boolean;
2718
+ }
2719
+ declare const useAuthFlow: (options?: UseAuthFlowOptions) => {
2720
+ view: AuthFlowView;
2721
+ suggestedEmail: string;
2722
+ fieldErrors: Partial<Record<AuthFieldName, string>>;
2723
+ error: string;
2724
+ successMessage: string;
2725
+ isAuthenticated: boolean;
2726
+ isSubmitting: boolean;
2727
+ showLogin: (email?: string) => void;
2728
+ showRegister: (email?: string) => void;
2729
+ showForgotPassword: (email?: string) => void;
2730
+ clearFeedback: () => void;
2731
+ clearFieldError: (field: AuthFieldName) => void;
2732
+ submitLogin: (input: AuthLoginInput) => Promise<TfProfile | null>;
2733
+ submitRegistration: (input: AuthRegistrationInput, submitOptions?: RegistrationSubmitOptions) => Promise<TfProfile | null>;
2734
+ submitPasswordReset: (email: string) => Promise<boolean>;
2735
+ logout: () => Promise<boolean>;
2736
+ mutations: {
2737
+ login: _tanstack_react_query.UseMutationResult<TfProfile, TtfError, {
2738
+ email: string;
2739
+ password: string;
2740
+ }, unknown>;
2741
+ register: _tanstack_react_query.UseMutationResult<TfProfile, TtfError, AuthRegistrationInput, unknown>;
2742
+ restorePassword: _tanstack_react_query.UseMutationResult<void, TtfError, string, unknown>;
2743
+ restorePasswordNative: _tanstack_react_query.UseMutationResult<void, TtfError, string, unknown>;
2744
+ logout: _tanstack_react_query.UseMutationResult<void, TtfError, void, unknown>;
2745
+ };
2746
+ };
2747
+ type UseAuthFlow = ReturnType<typeof useAuthFlow>;
2748
+
2749
+ declare const useAuthSession: () => {
2750
+ isAuthenticated: boolean;
2751
+ };
2752
+
2753
+ declare const useProfile: (options?: QueryOpts<TfProfile>) => _tanstack_react_query.UseQueryResult<TfProfile, TtfError>;
2754
+
2755
+ declare const useCountries: (options?: QueryOpts<TfCountry[]>) => _tanstack_react_query.UseQueryResult<TfCountry[], TtfError>;
2756
+ declare const useStates: (countryId: string | number | undefined, options?: QueryOpts<TfState[]>) => _tanstack_react_query.UseQueryResult<TfState[], TtfError>;
2757
+
2758
+ /** Event details (seated detection, slug, name). Gated on a chosen event id. */
2759
+ declare const useEvent: (eventId: string | undefined, options?: QueryOpts<Awaited<ReturnType<typeof ttf.events.info>>>) => _tanstack_react_query.UseQueryResult<EventSeatingInfo, TtfError>;
2760
+ /** Purchasable ticket types for an event. Gated on a chosen event id. */
2761
+ declare const useTickets: (eventId: string | undefined, options?: QueryOpts<TicketType[]>) => _tanstack_react_query.UseQueryResult<TicketType[], TtfError>;
2762
+ /** Tickets PLUS the catalog-level promo/access-code metadata and waiting-list
2763
+ * flag the same response carries. Use this (over `useTickets`) when the ticket
2764
+ * screen needs promo codes, access codes, or waiting lists. `refetch()` after
2765
+ * applying a code to pick up updated prices / newly-unlocked tickets. */
2766
+ declare const useTicketsWithMeta: (eventId: string | undefined, options?: QueryOpts<Awaited<ReturnType<typeof ttf.events.ticketsWithMeta>>>) => _tanstack_react_query.UseQueryResult<{
2767
+ tickets: TicketType[];
2768
+ promo: TicketCatalogPromoMeta;
2769
+ showWaitingList: boolean;
2770
+ }, TtfError>;
2771
+ /** Purchasable ticket types for ONE date of a time-slot / calendar event. Each
2772
+ * ticket carries its `timeSlot: { date, time }`. Gated on event id + date. */
2773
+ declare const useTimeSlotTickets: (eventId: string | undefined, date: string | undefined, options?: QueryOpts<TicketType[]>) => _tanstack_react_query.UseQueryResult<TicketType[], TtfError>;
2774
+ /** The event's add-on catalog (upsells). Gated on a chosen event id. Filter it
2775
+ * to the primed cart with `ttf.events.filterAddonsForTickets(list, ids)`. */
2776
+ declare const useEventAddons: (eventId: string | undefined, options?: QueryOpts<EventAddon[]>) => _tanstack_react_query.UseQueryResult<EventAddon[], TtfError>;
2777
+
2778
+ declare const useOrders: (query?: OrdersQuery, options?: QueryOpts<TfListEnvelope<TfOrderSummary>>) => _tanstack_react_query.UseQueryResult<TfListEnvelope<TfOrderSummary>, TtfError>;
2779
+ declare const useOrder: (orderId: string | undefined, options?: QueryOpts<TfEnvelope<TfOrderDetails>>) => _tanstack_react_query.UseQueryResult<TfEnvelope<TfOrderDetails>, TtfError>;
2780
+
2781
+ declare const useValidatePhone: (options?: MutationOpts<{
2782
+ valid: boolean;
2783
+ [key: string]: unknown;
2784
+ }, string>) => _tanstack_react_query.UseMutationResult<{
2785
+ [key: string]: unknown;
2786
+ valid: boolean;
2787
+ }, TtfError, string, unknown>;
2788
+ declare const useJoinWaitingList: (eventId: string, options?: MutationOpts<void, WaitingListEntry>) => _tanstack_react_query.UseMutationResult<void, TtfError, WaitingListEntry, unknown>;
2789
+ declare const useAttributeReferrer: (eventId: string, options?: MutationOpts<void, string | number | null>) => _tanstack_react_query.UseMutationResult<void, TtfError, string | number | null, unknown>;
2790
+ declare const useSendRsvp: (eventId: string, options?: MutationOpts<unknown, Record<string, unknown>>) => _tanstack_react_query.UseMutationResult<unknown, TtfError, Record<string, unknown>, unknown>;
2791
+
2792
+ interface PlaceOrderHookOptions {
2793
+ /** After a successful order needing ID verification, run it automatically
2794
+ * (mint + open + poll). The rejection is swallowed — payment already
2795
+ * settled — so it never surfaces as a payment failure. Uses the engine's
2796
+ * `openUrl` port to open the provider URL. */
2797
+ autoRunIdVerification?: boolean;
2798
+ idVerification?: RunIdVerificationOptions;
2799
+ }
2800
+ /**
2801
+ * A gated buyer field this event asks for BEYOND name/email — surfaced from the
2802
+ * server's checkout-configs so consumers render exactly what's needed instead of
2803
+ * guessing. Write the captured value straight to `billing[key]` (e.g.
2804
+ * `setBilling({ ...billing, instagramHandle })`); the engine forwards it in the
2805
+ * order body. `nationality` expects a country id (see `ttf.geo.countries()` /
2806
+ * `useCountries()`); `gender` expects `'M'` | `'F'`.
2807
+ */
2808
+ interface BuyerFieldSpec {
2809
+ key: 'nationality' | 'gender' | 'instagramHandle';
2810
+ label: string;
2811
+ required: boolean;
2812
+ /** How to render it: a country picker, an M/F choice, or a handle text box. */
2813
+ kind: 'nationality' | 'gender' | 'instagram';
2814
+ }
2815
+ interface UseCheckout extends CheckoutSnapshot {
2816
+ /** The whole snapshot object (the fields above are spread from it). */
2817
+ snapshot: CheckoutSnapshot;
2818
+ /** True while a cart/order operation is in flight. */
2819
+ isBusy: boolean;
2820
+ /** Whole-seconds countdown for the cart reservation (undefined when none).
2821
+ * Raw on purpose — format it however your UI wants. */
2822
+ secondsLeft?: number;
2823
+ /** Required add-on names still missing (same rule the pre-flight enforces). */
2824
+ missingRequiredAddonNames: string[];
2825
+ /** Gated buyer fields this event needs beyond name/email (Instagram /
2826
+ * nationality / gender), each with its required flag — render these from
2827
+ * data. Empty when the event gates none. Pairs with `customFields` (the
2828
+ * order/ticket capture groups) for the full "what must I collect" picture. */
2829
+ buyerFields: BuyerFieldSpec[];
2830
+ /** Whether a signed-in access token is present. */
2831
+ isLoggedIn: boolean;
2832
+ /** Build + price the cart for a ticket selection (alias for `prime`). */
2833
+ setTickets: (eventId: string, selections: TicketSelection[]) => Promise<void>;
2834
+ /** Build + price the cart for reserved SEATS (alias for `primeSeats`). */
2835
+ setSeats: (eventId: string, lines: SeatLine[]) => Promise<void>;
2836
+ /** Attach to an existing server-side cart (e.g. accepted resale invitation). */
2837
+ resumeCart: CheckoutEngine['resumeCart'];
2838
+ setAddons: CheckoutEngine['setAddons'];
2839
+ setBilling: CheckoutEngine['setBilling'];
2840
+ setHolders: CheckoutEngine['setHolders'];
2841
+ setConsent: CheckoutEngine['setConsent'];
2842
+ setAcceptedConditions: CheckoutEngine['setAcceptedConditions'];
2843
+ /** Accept/unaccept one condition block (merges into the map). */
2844
+ acceptCondition: (id: string, accepted: boolean) => void;
2845
+ setAddonDataCapture: CheckoutEngine['setAddonDataCapture'];
2846
+ checkBuyerEmail: CheckoutEngine['checkBuyerEmail'];
2847
+ placeOrder: (method?: PaymentMethod | PaymentRequest, options?: PlaceOrderHookOptions) => Promise<PlaceOrderResult>;
2848
+ runIdVerification: CheckoutEngine['runIdVerification'];
2849
+ syncCurrency: CheckoutEngine['syncCurrency'];
2850
+ reset: CheckoutEngine['reset'];
2851
+ applyPromoCode: (eventId: string, promo: string) => Promise<void>;
2852
+ attributeReferrer: (eventId: string, referrer: string | number | null) => Promise<void>;
2853
+ joinWaitingList: (eventId: string, entry: WaitingListEntry) => Promise<void>;
2854
+ }
2855
+ declare const useCheckout$1: (config: EngineConfig) => UseCheckout;
2856
+
2857
+ /** React Query cache keys for the SDK, all namespaced under `ttf`. */
2858
+
2859
+ declare const ttfKeys: {
2860
+ profile: readonly ["ttf", "profile"];
2861
+ countries: readonly ["ttf", "countries"];
2862
+ states: (countryId: string | number) => readonly ["ttf", "states", string | number];
2863
+ event: (eventId: string) => readonly ["ttf", "event", string];
2864
+ tickets: (eventId: string) => readonly ["ttf", "tickets", string];
2865
+ addons: (eventId: string) => readonly ["ttf", "addons", string];
2866
+ orders: (query: OrdersQuery) => readonly ["ttf", "orders", OrdersQuery];
2867
+ order: (orderId: string) => readonly ["ttf", "order", string];
2868
+ };
2869
+
2870
+ /**
2871
+ * React hooks over the `ttf` facade — one authored copy, imported unchanged by
2872
+ * both platform packages. React and @tanstack/react-query are peer deps, so a
2873
+ * consumer supplies its own QueryClientProvider.
2874
+ */
2875
+
2876
+ type index_BuyerFieldSpec = BuyerFieldSpec;
2877
+ type index_MutationOpts<TData, TVars> = MutationOpts<TData, TVars>;
2878
+ type index_PlaceOrderHookOptions = PlaceOrderHookOptions;
2879
+ type index_QueryOpts<TData> = QueryOpts<TData>;
2880
+ type index_RegistrationSubmitOptions = RegistrationSubmitOptions;
2881
+ type index_UseAuthFlow = UseAuthFlow;
2882
+ type index_UseAuthFlowOptions = UseAuthFlowOptions;
2883
+ type index_UseCheckout = UseCheckout;
2884
+ declare const index_ttfKeys: typeof ttfKeys;
2885
+ declare const index_useAttributeReferrer: typeof useAttributeReferrer;
2886
+ declare const index_useAuthFlow: typeof useAuthFlow;
2887
+ declare const index_useAuthSession: typeof useAuthSession;
2888
+ declare const index_useCheckEmailExists: typeof useCheckEmailExists;
2889
+ declare const index_useCountries: typeof useCountries;
2890
+ declare const index_useEvent: typeof useEvent;
2891
+ declare const index_useEventAddons: typeof useEventAddons;
2892
+ declare const index_useJoinWaitingList: typeof useJoinWaitingList;
2893
+ declare const index_useLogin: typeof useLogin;
2894
+ declare const index_useLogout: typeof useLogout;
2895
+ declare const index_useOrder: typeof useOrder;
2896
+ declare const index_useOrders: typeof useOrders;
2897
+ declare const index_useProfile: typeof useProfile;
2898
+ declare const index_useRegister: typeof useRegister;
2899
+ declare const index_useRegisterAccount: typeof useRegisterAccount;
2900
+ declare const index_useResetPassword: typeof useResetPassword;
2901
+ declare const index_useRestorePassword: typeof useRestorePassword;
2902
+ declare const index_useRestorePasswordRn: typeof useRestorePasswordRn;
2903
+ declare const index_useSendRsvp: typeof useSendRsvp;
2904
+ declare const index_useStates: typeof useStates;
2905
+ declare const index_useTickets: typeof useTickets;
2906
+ declare const index_useTicketsWithMeta: typeof useTicketsWithMeta;
2907
+ declare const index_useTimeSlotTickets: typeof useTimeSlotTickets;
2908
+ declare const index_useValidatePhone: typeof useValidatePhone;
2909
+ declare namespace index {
2910
+ export { type index_BuyerFieldSpec as BuyerFieldSpec, type index_MutationOpts as MutationOpts, type index_PlaceOrderHookOptions as PlaceOrderHookOptions, type index_QueryOpts as QueryOpts, type index_RegistrationSubmitOptions as RegistrationSubmitOptions, type index_UseAuthFlow as UseAuthFlow, type index_UseAuthFlowOptions as UseAuthFlowOptions, type index_UseCheckout as UseCheckout, index_ttfKeys as ttfKeys, index_useAttributeReferrer as useAttributeReferrer, index_useAuthFlow as useAuthFlow, index_useAuthSession as useAuthSession, index_useCheckEmailExists as useCheckEmailExists, useCheckout$1 as useCheckout, index_useCountries as useCountries, index_useEvent as useEvent, index_useEventAddons as useEventAddons, index_useJoinWaitingList as useJoinWaitingList, index_useLogin as useLogin, index_useLogout as useLogout, index_useOrder as useOrder, index_useOrders as useOrders, index_useProfile as useProfile, index_useRegister as useRegister, index_useRegisterAccount as useRegisterAccount, index_useResetPassword as useResetPassword, index_useRestorePassword as useRestorePassword, index_useRestorePasswordRn as useRestorePasswordRn, index_useSendRsvp as useSendRsvp, index_useStates as useStates, index_useTickets as useTickets, index_useTicketsWithMeta as useTicketsWithMeta, index_useTimeSlotTickets as useTimeSlotTickets, index_useValidatePhone as useValidatePhone };
2911
+ }
2912
+
2913
+ /**
2914
+ * Localization types for the checkout SDK.
2915
+ *
2916
+ * Lives in the shared core, not the web layer, so that web and native resolve
2917
+ * strings the same way — the same argument as validation and gating rules.
2918
+ *
2919
+ * Deliberately NOT built on i18next: this package ships with `axios` as its
2920
+ * only dependency and is bundled into React Native, where pulling in a full
2921
+ * i18n runtime would be a tax on every consumer. The resolver in ./resolve.ts
2922
+ * is ~40 lines and covers what checkout copy actually needs (lookup, fallback,
2923
+ * {{var}} interpolation).
2924
+ */
2925
+ /** Locale codes the SDK ships, matching the dashboard and the storefront. */
2926
+ type LocaleCode = 'en-GB' | 'en-US' | 'es-MX' | 'fr' | 'de' | 'ru' | 'id';
2927
+ /**
2928
+ * A flat, dot-notation message catalogue.
2929
+ *
2930
+ * Flat rather than nested so a host can override a single string without
2931
+ * reproducing the surrounding object, and so the key set is trivially
2932
+ * diffable between locales.
2933
+ */
2934
+ type Messages = Record<string, string>;
2935
+ /** Values interpolated into `{{placeholders}}`. */
2936
+ type TranslateVars = Record<string, string | number>;
2937
+ /**
2938
+ * Resolves a key to display text. Always returns a string: an unknown key
2939
+ * falls back through the locale chain to English, and finally to the key
2940
+ * itself, so a missing translation can never render blank.
2941
+ */
2942
+ type Translate = (key: string, vars?: TranslateVars) => string;
2943
+ interface TranslatorOptions {
2944
+ /** Defaults to `en-GB`. */
2945
+ locale?: LocaleCode;
2946
+ /**
2947
+ * Host-supplied overrides, merged over the resolved locale. Lets a brand
2948
+ * reword individual strings ("Tickets" -> "Passes") without forking the SDK
2949
+ * or shipping a whole catalogue.
2950
+ */
2951
+ messages?: Partial<Messages>;
2952
+ }
2953
+
2954
+ /**
2955
+ * English (UK) — the source of truth.
2956
+ *
2957
+ * Every key the SDK renders exists here, so a translator's job is to copy this
2958
+ * file and translate values; nothing else needs discovering. Other locales may
2959
+ * be partial and resolve missing keys through the chain in ../resolve.ts.
2960
+ *
2961
+ * Keys are namespaced by surface (`auth.`, `billing.`, `tickets.`, …) so a host
2962
+ * overriding one area does not have to know the whole catalogue. Values are the
2963
+ * strings the components previously hard-coded, moved verbatim — this file is a
2964
+ * relocation, not a rewrite, so behaviour is unchanged for anyone who never
2965
+ * sets a locale.
2966
+ */
2967
+ declare const en: Messages;
2968
+
2969
+ /**
2970
+ * Spanish (Mexico).
2971
+ *
2972
+ * Partial catalogues are legal — anything absent resolves through en-GB — but
2973
+ * this one is complete against ./en.ts so the checkout reads fully Spanish for
2974
+ * the storefronts that need it today.
2975
+ */
2976
+ declare const esMX: Messages;
2977
+
2978
+ /** Register a locale bundle. Used by ./locales/index to avoid a load cycle. */
2979
+ declare const registerCatalogue: (locale: LocaleCode, messages: Messages) => void;
2980
+ declare const DEFAULT_LOCALE: LocaleCode;
2981
+ /** Map a raw device/browser language onto a locale we ship. */
2982
+ declare const resolveLocale: (raw?: string | null) => LocaleCode;
2983
+ /**
2984
+ * Build a translator.
2985
+ *
2986
+ * Resolution order: host overrides -> requested locale -> its fallback chain
2987
+ * -> English -> the key itself. The last step means a missing string surfaces
2988
+ * as a visible key rather than an empty element, which is far easier to spot
2989
+ * in review than a silent blank.
2990
+ */
2991
+ declare const createTranslator: (options?: TranslatorOptions) => Translate;
2992
+
2993
+ /**
2994
+ * Web `useCheckout` — a thin injector: the SDK's `useCheckout` with the web
2995
+ * platform ports pre-wired (Stripe confirmer, popup provider page, inline
2996
+ * Xendit). ALL the DX (countdown, isBusy, promo/referrer/waiting-list, auto ID
2997
+ * verification, the flat snapshot) lives in the SDK's hook, so web and React
2998
+ * Native share it — this file only supplies what's browser-specific.
2999
+ *
3000
+ * configureCheckout({ env: 'PROD', clientId, clientSecret }) // once, at app start
3001
+ * const checkout = useCheckout()
3002
+ * await checkout.setTickets(eventId, selections)
3003
+ * checkout.setBilling(b)
3004
+ * await checkout.placeOrder('card') // <CardInput/> rendered
3005
+ */
3006
+
3007
+ interface UseCheckoutOptions {
3008
+ /** Extra platform ports merged over the web defaults — e.g. MSI's
3009
+ * `onInstallmentOffers` picker. Read once, at first render. */
3010
+ ports?: Omit<CheckoutPorts, 'confirmer'>;
3011
+ /** Wallet/redirect engine options (merchant identity, redirect URL). */
3012
+ options?: CheckoutOptions;
3013
+ }
3014
+ declare const useCheckout: (opts?: UseCheckoutOptions) => UseCheckout;
3015
+
3016
+ /**
3017
+ * One-time SDK setup for the web. Wraps the shared `configure()` and defaults
3018
+ * the storage adapter to `localStorage` (SSR-safe — no-ops on the server). Call
3019
+ * once at app start, before any `useCheckout`/`ttf` call:
3020
+ *
3021
+ * configureCheckout({ env: 'PROD', clientId, clientSecret })
3022
+ */
3023
+
3024
+ /** localStorage-backed token storage. No-ops on the server (SSR). */
3025
+ declare const localStorageAdapter: StorageAdapter;
3026
+ declare const configureCheckout: (config: TtfConfig) => void;
3027
+
3028
+ /**
3029
+ * The card fields. `<CardInput/>` mounts a Stripe Element as soon as the engine
3030
+ * has initialized Stripe (via the confirmer's `whenReady()` — no races, renders
3031
+ * before or after init) and registers it with the confirmer. `<XenditCardInput/>`
3032
+ * is the inline, formatted equivalent for Xendit events.
3033
+ */
3034
+
3035
+ /**
3036
+ * The Stripe card field. Mounts against the engine's Stripe instance and
3037
+ * registers itself with the confirmer; unregisters on unmount.
3038
+ *
3039
+ * Stripe Elements live in a cross-origin iframe and DON'T inherit page CSS, so
3040
+ * by default they render black text — invisible on a dark surface. We read the
3041
+ * host element's computed color/font and feed them to the Element so it matches
3042
+ * whatever theme the consumer uses, no config needed. Pass `style` to override.
3043
+ */
3044
+ declare const CardInput: FC<{
3045
+ className?: string;
3046
+ /** Stripe base-style overrides, merged onto the inherited color/font. */
3047
+ style?: StripeCardElementOptions['style'];
3048
+ }>;
3049
+ /**
3050
+ * The wallet-capable card widget — a Stripe **Payment Element** in DEFERRED mode,
3051
+ * exactly how the OLD checkout rendered payment. It shows the card fields AND,
3052
+ * when the event's `stripe_wallets` gate is on, the Apple Pay / Google Pay
3053
+ * buttons that the buyer picks *inside* the widget. There is no separate "Apple
3054
+ * Pay" method row — wallets are a property of the card widget, as in old.
3055
+ *
3056
+ * Confirmation rides the same `placeOrder({ method: 'card' })` rail: this mounts
3057
+ * the Elements group and registers it with the confirmer, whose `confirmCard`
3058
+ * then runs `elements.submit()` + `stripe.confirmPayment` (old
3059
+ * `useStripePayment.processPayment`). Mount this instead of `<CardInput/>` for a
3060
+ * Stripe event with wallets available — see `<Payment/>`. It needs the server's
3061
+ * deferred Elements config (`checkout.stripeElementsConfig`: mode/amount/currency).
3062
+ */
3063
+ declare const StripePaymentElement: FC<{
3064
+ className?: string;
3065
+ /** Server deferred Elements config from `checkout.stripeElementsConfig`. */
3066
+ elementsConfig?: Record<string, unknown>;
3067
+ /** Wallet gate from `checkout.walletAvailability`. */
3068
+ wallets?: {
3069
+ applePay?: boolean;
3070
+ googlePay?: boolean;
3071
+ };
3072
+ /** Extra Payment Element options, merged over the wallet gate. */
3073
+ options?: StripePaymentElementOptions;
3074
+ }>;
3075
+ /**
3076
+ * Inline card field for a Xendit event — the formatted, no-popup equivalent of
3077
+ * `<CardInput/>`. Render it when the gateway is Xendit and the buyer picks card,
3078
+ * then `placeOrder({ method: 'xenditCard' })`: the engine tokenizes these fields
3079
+ * with xendit.js (3DS inline) and charges server-side.
3080
+ */
3081
+ declare const XenditCardInput: FC<{
3082
+ className?: string;
3083
+ inputClassName?: string;
3084
+ /**
3085
+ * Reports the current field-level problem (or null when the fields are fine).
3086
+ * The message is deliberately NOT rendered here: this component is mounted
3087
+ * inside the consumer's bordered card box, and an error printed in there sits
3088
+ * inside the border instead of beneath it. The consumer places it — see
3089
+ * `<Payment/>`, which renders it under the box like every other field error.
3090
+ */
3091
+ onValidationChange?: (message: string | null) => void;
3092
+ }>;
3093
+
3094
+ /**
3095
+ * The checkout theme — a structured, documented token set. Pass any subset to
3096
+ * `<CheckoutProvider theme={…}>`; each token maps to a `--tf-checkout-*` CSS
3097
+ * custom property that `checkout.css` (and every component) reads. Anything you
3098
+ * omit falls back to the stylesheet default.
3099
+ */
3100
+
3101
+ interface CheckoutTheme {
3102
+ /** `'dark'` adds the `tf-checkout--dark` class (dark default palette). */
3103
+ colorScheme?: 'light' | 'dark';
3104
+ /** Primary color — buttons, step badges, focus ring, links. */
3105
+ accent?: string;
3106
+ /** Hover state for `accent` (defaults near `accent`). */
3107
+ accentHover?: string;
3108
+ /** Text/icon color on top of `accent`. */
3109
+ accentContrast?: string;
3110
+ /** Card background. */
3111
+ surface?: string;
3112
+ /** Subtle fill (summary rows, muted pills). */
3113
+ surfaceMuted?: string;
3114
+ /** Primary text. */
3115
+ text?: string;
3116
+ /** Secondary text (labels, "incl. fees", hints). */
3117
+ muted?: string;
3118
+ /** Borders + dividers. */
3119
+ border?: string;
3120
+ /** Error text + invalid field borders. */
3121
+ error?: string;
3122
+ /** Success (confirmation check). */
3123
+ success?: string;
3124
+ /** Corner radius for cards. */
3125
+ radiusCard?: string;
3126
+ /** Corner radius for inputs / buttons. */
3127
+ radiusControl?: string;
3128
+ /** Card shadow. */
3129
+ shadow?: string;
3130
+ /** Font family for the whole component tree. */
3131
+ font?: string;
3132
+ /** Base font size (e.g. `15px`). */
3133
+ fontSize?: string;
3134
+ /** Max width of the checkout column. */
3135
+ maxWidth?: string;
3136
+ }
3137
+ /** Turn a theme into inline `--tf-checkout-*` custom properties for the root. */
3138
+ declare const themeToVars: (theme?: CheckoutTheme) => CSSProperties;
3139
+
3140
+ /**
3141
+ * `<CheckoutProvider>` — wrap your checkout UI once. It:
3142
+ * - provides the checkout to every section via context — so `<Tickets/>`,
3143
+ * `<Payment/>`, … just read it, no prop-drilling. By default it runs
3144
+ * `useCheckout()` for you (the web-wired engine: Stripe/Xendit + shared
3145
+ * store); pass your own instance as `value` to bring your own;
3146
+ * - applies the `theme` as `--tf-checkout-*` CSS variables on its root and
3147
+ * scopes all styles under `.tf-checkout`.
3148
+ *
3149
+ * This is the single styling + context boundary shared by all three usage
3150
+ * tiers: the batteries-included `<EmbeddedCheckout/>`, à-la-carte sections, and (via
3151
+ * `value`) a consumer who already holds a `useCheckout()` of their own.
3152
+ *
3153
+ * Styles load automatically from the package entry point.
3154
+ */
3155
+
3156
+ interface CheckoutProviderProps {
3157
+ /**
3158
+ * Bring your own checkout instance (from a top-level `useCheckout()`). Omit
3159
+ * and the provider runs `useCheckout()` itself. Either way the sections read
3160
+ * the same shared cart (the engine store is a module singleton).
3161
+ */
3162
+ value?: UseCheckout;
3163
+ /** Retheme via design tokens. */
3164
+ theme?: CheckoutTheme;
3165
+ /**
3166
+ * Language for the checkout's own copy. Defaults to `en-GB`, so omitting it
3167
+ * leaves every existing consumer's rendering byte-for-byte unchanged.
3168
+ */
3169
+ locale?: LocaleCode;
3170
+ /**
3171
+ * Per-key overrides merged over the locale, for brands that need to reword
3172
+ * individual strings without shipping a whole catalogue.
3173
+ */
3174
+ messages?: Partial<Messages>;
3175
+ /** Extra class on the `.tf-checkout` root. */
3176
+ className?: string;
3177
+ children: ReactNode;
3178
+ }
3179
+ declare const CheckoutProvider: FC<CheckoutProviderProps>;
3180
+ /** Read the shared checkout inside any component under `<CheckoutProvider>`. */
3181
+ declare const useCheckoutContext: () => UseCheckout;
3182
+ /** Coordinate submit-attempt validation across separately composed sections. */
3183
+ declare const useCheckoutValidation: () => {
3184
+ attempt: number;
3185
+ requestValidation: () => void;
3186
+ };
3187
+
3188
+ /** Join truthy class names (tiny, dependency-free). */
3189
+ declare const cx: (...parts: Array<string | false | null | undefined>) => string;
3190
+
3191
+ /**
3192
+ * `Card` + `SectionHeader` — the shell every checkout section shares: a rounded
3193
+ * surface with a numbered step badge, a title, and optional right-aligned pills
3194
+ * (totals, a countdown, a loading chip). Keeps all sections visually identical
3195
+ * without each re-authoring the header markup.
3196
+ */
3197
+
3198
+ interface CardProps extends HTMLAttributes<HTMLDivElement> {
3199
+ className?: string;
3200
+ }
3201
+ /** A themed surface (`.tf-checkout-card`). Spreads through any div props. */
3202
+ declare const Card: FC<CardProps>;
3203
+ interface SectionHeaderProps {
3204
+ /** Badge content — a step number, an icon, `✓`. Omit for no badge. */
3205
+ step?: ReactNode;
3206
+ title: ReactNode;
3207
+ /** Right-aligned chips (total, timer, "loading…"). */
3208
+ pills?: ReactNode;
3209
+ className?: string;
3210
+ }
3211
+ declare const SectionHeader: FC<SectionHeaderProps>;
3212
+ /** A single right-aligned chip for a `SectionHeader`'s `pills`. */
3213
+ declare const Pill: FC<{
3214
+ muted?: boolean;
3215
+ children: ReactNode;
3216
+ }>;
3217
+
3218
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3219
+ /** Visual weight. */
3220
+ variant?: 'primary' | 'secondary' | 'ghost';
3221
+ /** Stretch to full width. */
3222
+ block?: boolean;
3223
+ /** Show a spinner and disable. */
3224
+ loading?: boolean;
3225
+ }
3226
+ /** The one shared button — token-driven variants, loading state, `className`. */
3227
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
3228
+
3229
+ /** Labeled wrapper — owns the label + error row so controls stay consistent. */
3230
+ declare const Field: FC<{
3231
+ label?: ReactNode;
3232
+ error?: ReactNode;
3233
+ invalid?: boolean;
3234
+ className?: string;
3235
+ children: ReactNode;
3236
+ }>;
3237
+ /** Lay out two fields side by side. */
3238
+ declare const FieldRow: FC<{
3239
+ className?: string;
3240
+ children: ReactNode;
3241
+ }>;
3242
+ interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
3243
+ invalid?: boolean;
3244
+ }
3245
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
3246
+ interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
3247
+ invalid?: boolean;
3248
+ }
3249
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
3250
+ interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
3251
+ invalid?: boolean;
3252
+ }
3253
+ declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
3254
+ interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
3255
+ label?: ReactNode;
3256
+ }
3257
+ /** A checkbox is its own label — don't wrap it in `<Field>`. */
3258
+ declare const Checkbox: FC<CheckboxProps>;
3259
+
3260
+ /**
3261
+ * Data-driven custom fields. The event describes what to collect
3262
+ * (`EventCustomField[]`, order- / ticket- / add-on-scoped); these render it —
3263
+ * text, textarea, phone, email, select, radio, checkbox, multi-select — and
3264
+ * report values back. No per-brand form code: pass the group, hold the values.
3265
+ *
3266
+ * const [vals, setVals] = useState<CustomFieldValues>({})
3267
+ * <CustomFieldGroupFields group={group} values={vals}
3268
+ * onChange={(name, v) => setVals(s => ({ ...s, [name]: v }))} />
3269
+ */
3270
+
3271
+ type FieldValue = string | string[];
3272
+ interface CustomFieldInputProps {
3273
+ field: EventCustomField;
3274
+ value: FieldValue | undefined;
3275
+ onChange: (value: FieldValue) => void;
3276
+ error?: ReactNode;
3277
+ }
3278
+ /** Render one custom field by its declared `type`. */
3279
+ declare const CustomFieldInput: FC<CustomFieldInputProps>;
3280
+ interface CustomFieldGroupFieldsProps {
3281
+ group: EventCustomFieldGroup;
3282
+ values: CustomFieldValues;
3283
+ onChange: (name: string, value: FieldValue) => void;
3284
+ /** Restrict to fields scoped to this holder's ticket type (ticket groups). */
3285
+ ticketTypeId?: string;
3286
+ }
3287
+ /** Render every field in a group, wired to a values map. */
3288
+ declare const CustomFieldGroupFields: FC<CustomFieldGroupFieldsProps>;
3289
+
3290
+ /**
3291
+ * `<PaymentMethods>` — a controlled radio-list of payment methods (icon + label
3292
+ * per row), matching the hosted checkout's iconed selector. Presentational only:
3293
+ * it renders the choices + the selected row's extra input (and hosts a card
3294
+ * field in the card row via `children`/`inputSlotFor`). It does NOT own the Pay
3295
+ * button or `placeOrder` — `<Payment/>` builds the options and maps a selection
3296
+ * back to a `placeOrder` request.
3297
+ */
3298
+
3299
+ interface PaymentMethodsProps {
3300
+ options: PaymentMethodOption[];
3301
+ /** Selected `option.value` (controlled). */
3302
+ selected: string;
3303
+ onSelect: (value: string) => void;
3304
+ /** Extra-field values keyed by `option.value`. */
3305
+ extraValues: Record<string, {
3306
+ cashtag?: string;
3307
+ phoneNumber?: string;
3308
+ }>;
3309
+ onExtraChange: (value: string, patch: {
3310
+ cashtag?: string;
3311
+ phoneNumber?: string;
3312
+ }) => void;
3313
+ /** Reveal required extra-field errors after the buyer attempts payment. */
3314
+ showValidation?: boolean;
3315
+ /** Rendered inside the row whose `value === inputSlotFor` (e.g. `<CardInput/>`). */
3316
+ children?: ReactNode;
3317
+ inputSlotFor?: string;
3318
+ className?: string;
3319
+ }
3320
+ declare const PaymentMethods: FC<PaymentMethodsProps>;
3321
+
3322
+ /** Quantity ± control (ticket / add-on quantities). */
3323
+ declare const Stepper: FC<{
3324
+ value: number;
3325
+ onChange: (value: number) => void;
3326
+ min?: number;
3327
+ max?: number;
3328
+ step?: number;
3329
+ disabled?: boolean;
3330
+ className?: string;
3331
+ }>;
3332
+
3333
+ /**
3334
+ * `<QuantitySelect>` — a compact quantity dropdown (0…max), the control the old
3335
+ * checkout used for tickets and add-ons (not a +/- stepper).
3336
+ */
3337
+
3338
+ interface QuantitySelectProps {
3339
+ value: number;
3340
+ onChange: (value: number) => void;
3341
+ /** Minimum purchasable quantity when buying (0 = none is always allowed). */
3342
+ min?: number;
3343
+ max?: number;
3344
+ /** Step between options (the old checkout's `multiplier`). */
3345
+ step?: number;
3346
+ disabled?: boolean;
3347
+ className?: string;
3348
+ }
3349
+ declare const QuantitySelect: FC<QuantitySelectProps>;
3350
+
3351
+ /** A price with optional struck-through original + a fees/deposit note. */
3352
+ declare const PriceLine: FC<{
3353
+ currency?: string;
3354
+ amount: number | string;
3355
+ /** Struck-through pre-discount price. */
3356
+ original?: number | string;
3357
+ /** e.g. "incl. fees" or "50% deposit". */
3358
+ note?: ReactNode;
3359
+ className?: string;
3360
+ }>;
3361
+
3362
+ /** Reservation countdown. Pass `checkout.secondsLeft`. */
3363
+ declare const Timer: FC<{
3364
+ seconds: number;
3365
+ /** Below this many seconds it turns urgent (default 60). */
3366
+ urgentAt?: number;
3367
+ /** Text before the clock, e.g. "Reserved for". */
3368
+ label?: ReactNode;
3369
+ className?: string;
3370
+ }>;
3371
+
3372
+ /**
3373
+ * `<TimerBanner>` — the reservation countdown banner the old checkout showed at
3374
+ * the top of the add-ons / billing / payment steps: "Please complete your
3375
+ * purchase before the timer reaches zero." + mm:ss, with a dismiss X. Feed it
3376
+ * `checkout.secondsLeft`. Renders nothing when there's no live reservation.
3377
+ */
3378
+
3379
+ interface TimerBannerProps {
3380
+ seconds?: number;
3381
+ /** Show red styling at/under this many seconds. Default 60. */
3382
+ urgentAt?: number;
3383
+ message?: string;
3384
+ className?: string;
3385
+ }
3386
+ declare const TimerBanner: FC<TimerBannerProps>;
3387
+
3388
+ /** A spinner that inherits `currentColor` (so it works inside buttons/text). */
3389
+ declare const Loader: FC<{
3390
+ className?: string;
3391
+ }>;
3392
+
3393
+ /**
3394
+ * MSI (meses sin intereses) picker. Mexican card payments can be split into
3395
+ * interest-free installments: mid-payment the engine calls `onInstallmentOffers`
3396
+ * with the available plans and waits for the buyer's choice. This hook bridges
3397
+ * that callback to an overlay — `<CheckoutProvider>` wires it by default, so
3398
+ * `<EmbeddedCheckout/>` gets MSI for free. Returns the port + the overlay to render.
3399
+ */
3400
+
3401
+ declare const useInstallmentPicker: () => {
3402
+ onInstallmentOffers: (offers: InstallmentOffer[]) => Promise<InstallmentOffer | null>;
3403
+ picker: React.JSX.Element | null;
3404
+ };
3405
+
3406
+ interface I18nProviderProps {
3407
+ locale?: LocaleCode;
3408
+ /** Per-key overrides, merged over the locale. */
3409
+ messages?: Partial<Messages>;
3410
+ children?: ReactNode;
3411
+ }
3412
+ declare const I18nProvider: FC<I18nProviderProps>;
3413
+ /** Returns the active translator. Safe to call anywhere in the SDK tree. */
3414
+ declare const useT: () => Translate;
3415
+
3416
+ interface AuthModalProps {
3417
+ open: boolean;
3418
+ onClose: () => void;
3419
+ initialView?: AuthFlowView;
3420
+ initialEmail?: string;
3421
+ /** Optional context shown above the active form. */
3422
+ message?: string;
3423
+ allowRegistration?: boolean;
3424
+ allowPasswordReset?: boolean;
3425
+ requireRegistrationAddress?: boolean;
3426
+ /** Extra backend fields for specialized registrations such as delegations. */
3427
+ registrationFields?: Record<string, string>;
3428
+ logoUrl?: string;
3429
+ onAuthenticated?: (profile: TfProfile) => void;
3430
+ className?: string;
3431
+ }
3432
+ /** Accessible web presentation over `hooks.useAuthFlow()`. Render it inside
3433
+ * `<CheckoutProvider>` so it inherits the checkout theme tokens. */
3434
+ declare const AuthModal: FC<AuthModalProps>;
3435
+
3436
+ interface LoginFormProps {
3437
+ initialEmail?: string;
3438
+ errors?: AuthFieldErrors;
3439
+ error?: string;
3440
+ loading?: boolean;
3441
+ allowPasswordReset?: boolean;
3442
+ onSubmit: (input: AuthLoginInput) => void | Promise<unknown>;
3443
+ onForgotPassword?: (email: string) => void;
3444
+ onFieldChange?: (field: keyof AuthLoginInput) => void;
3445
+ }
3446
+ /** Pure web form: it renders fields and delegates all auth work to its caller. */
3447
+ declare const LoginForm: FC<LoginFormProps>;
3448
+
3449
+ interface RegisterFormProps {
3450
+ initialEmail?: string;
3451
+ errors?: AuthFieldErrors;
3452
+ error?: string;
3453
+ loading?: boolean;
3454
+ requireAddress?: boolean;
3455
+ onSubmit: (input: AuthRegistrationInput, options: {
3456
+ requireState: boolean;
3457
+ }) => void | Promise<unknown>;
3458
+ onFieldChange?: (field: AuthFieldName) => void;
3459
+ }
3460
+ /** Legacy-compatible account fields with no API or validation logic inside. */
3461
+ declare const RegisterForm: FC<RegisterFormProps>;
3462
+
3463
+ interface ForgotPasswordFormProps {
3464
+ initialEmail?: string;
3465
+ errors?: AuthFieldErrors;
3466
+ error?: string;
3467
+ successMessage?: string;
3468
+ loading?: boolean;
3469
+ onSubmit: (email: string) => void | Promise<unknown>;
3470
+ onBackToLogin: (email: string) => void;
3471
+ onFieldChange?: () => void;
3472
+ }
3473
+ /** Password-recovery presentation over the shared auth-flow controller. */
3474
+ declare const ForgotPasswordForm: FC<ForgotPasswordFormProps>;
3475
+
3476
+ interface ResetPasswordFormProps {
3477
+ /** Token from the password-reset email. */
3478
+ token: string;
3479
+ onSuccess?: () => void;
3480
+ onBackToLogin?: () => void;
3481
+ }
3482
+ /** Complete the password-reset flow started by `<ForgotPasswordForm/>`. */
3483
+ declare const ResetPasswordForm: FC<ResetPasswordFormProps>;
3484
+
3485
+ /**
3486
+ * `<Tickets/>` — ticket selection. Lists the event's ticket types with a
3487
+ * quantity dropdown, applies promo / access codes (re-pricing + unlocking
3488
+ * tickets), offers a waiting-list sign-up on sold-out types, and primes the
3489
+ * cart. Matches the old checkout: no running total, a `GET TICKETS` CTA.
3490
+ */
3491
+
3492
+ interface TicketsProps {
3493
+ eventId: string;
3494
+ /** Optional heading above the catalog. The legacy storefront does not show
3495
+ * one, so the default is intentionally hidden. */
3496
+ title?: ReactNode | false;
3497
+ /** Fired once the cart is primed (tickets added) — e.g. reveal `<AddOns/>`. */
3498
+ onContinue?: () => void;
3499
+ /** CTA label. Old storefront uses "Get tickets". */
3500
+ buttonLabel?: string;
3501
+ /** Force time-slot mode + supply the selectable session dates (ISO yyyy-mm-dd).
3502
+ * Omit to auto-detect from the event (`isTimeSlotEvent` / `availableDates`). */
3503
+ timeSlotDates?: string[];
3504
+ /** Optional numbered badge (old checkout shows none — omitted by default). */
3505
+ step?: ReactNode;
3506
+ /** SEATED events: fired when the buyer clicks "Select seats". Wire this to
3507
+ * reveal `<SeatMap/>`. Without it the seat CTA is hidden (the seat-map ticket
3508
+ * types then have no way to be bought — provide it for seated events). */
3509
+ onSelectSeats?: () => void;
3510
+ /** Apply this code once when the ticket catalog mounts. */
3511
+ initialPromoCode?: string;
3512
+ /** Attribute this visit once. URL values use `ttf_r` / `referrer_id`. */
3513
+ referrer?: string | number;
3514
+ /** Also read promo/referral values from the current URL. Defaults true. */
3515
+ readAttributionFromUrl?: boolean;
3516
+ className?: string;
3517
+ }
3518
+ declare const Tickets: FC<TicketsProps>;
3519
+
3520
+ /**
3521
+ * `<SeatMap/>` — the venue seat picker for seated events, rebuilt to match the
3522
+ * legacy `seatMapContainer` exactly (the REAL seat wire, not the earlier
3523
+ * inferred mapping):
3524
+ *
3525
+ * 1. Fetch the chart (`seat-map-data`) → `seatData`, `ticketTypeTierRelations`,
3526
+ * `eventSeats`, `seatReservationTime`, `seatMapType`, `tierPrices`,
3527
+ * `predefinedSeats`. Poll `seats/status` every 3s and derive the seats this
3528
+ * buyer owns (status `'OR'`).
3529
+ * 2. Clicking a seat reserves it (`ttf.seatmap.reserve`, one seat per call);
3530
+ * clicking a held seat releases it (`ttf.seatmap.removeReserved`). Blocked /
3531
+ * reserved-by-others seats and the 10-seat cap are enforced like legacy.
3532
+ * 3. Each held seat gets a ticket-type dropdown (auto-selected when its tier
3533
+ * offers only one) and, for table/group types, a guest-count dropdown.
3534
+ * 4. "Get tickets" turns the held seats into `SeatLine`s and calls
3535
+ * `checkout.setSeats(eventId, lines)` → the seat-aware add-to-cart + price.
3536
+ *
3537
+ * Boundaries (documented, not hidden):
3538
+ * - `tf-seat-map-view` is an OPTIONAL peer dependency. Install it and import its
3539
+ * CSS (`import 'tf-seat-map-view/dist/index.css'`) to use this section; it is
3540
+ * lazy-loaded + externalized, so it never weighs on the base SDK.
3541
+ * - Guest-count → cart shape follows the spec's model: a `SeatLine` carries
3542
+ * `guests` ONLY for guest-capable (table) types, so plain seated events post
3543
+ * aggregated per-type quantities and table events post one indexed line per
3544
+ * seat with `quantity = guests`. Validate against a real table-map event.
3545
+ */
3546
+
3547
+ interface SeatMapProps {
3548
+ eventId: string;
3549
+ /** Fired once seats are added to the cart + priced — e.g. reveal billing. */
3550
+ onContinue?: () => void;
3551
+ /** Badge content. Defaults to a seat glyph. */
3552
+ step?: ReactNode;
3553
+ className?: string;
3554
+ }
3555
+ declare const SeatMap: FC<SeatMapProps>;
3556
+
3557
+ /**
3558
+ * `<AddOns/>` — optional upsells for the primed cart. Lists the event's add-ons
3559
+ * (filtered to the tickets in the cart), lets the buyer pick quantities, and
3560
+ * captures any per-add-on custom fields. On continue it writes the selection
3561
+ * (`setAddons`, which reprices) and the captured fields (`setAddonDataCapture`).
3562
+ *
3563
+ * Renders nothing when the event has no applicable add-ons, so it's safe to
3564
+ * always place between `<Tickets/>` and `<BillingInfo/>`.
3565
+ */
3566
+
3567
+ interface AddOnsProps {
3568
+ eventId: string;
3569
+ /** Fired once add-ons are saved to the cart — e.g. reveal `<BillingInfo/>`. */
3570
+ onContinue?: () => void;
3571
+ /** Fired when the buyer skips add-ons. Hidden when a required add-on exists. */
3572
+ onSkip?: () => void;
3573
+ /** CTA label. Old checkout uses "CONFIRM SELECTION". */
3574
+ buttonLabel?: string;
3575
+ /** Eyebrow above the title. Old checkout uses "Get Your Tickets". */
3576
+ eyebrow?: string;
3577
+ /** Section heading. Old checkout uses "UPGRADES & ADD-ONS". */
3578
+ heading?: string;
3579
+ className?: string;
3580
+ }
3581
+ declare const AddOns: FC<AddOnsProps>;
3582
+
3583
+ /**
3584
+ * `<BillingInfo/>` — the buyer + attendee details step. Collects: the buyer's
3585
+ * name/email + event-gated buyer fields (Instagram/nationality/gender), any
3586
+ * ORDER-level custom fields, PER-HOLDER name + ticket-level custom fields (when
3587
+ * the event requires holder names or has ticket-scoped fields), and marketing
3588
+ * opt-ins. Writes it all into the engine (`setBilling` with `dataCapture`,
3589
+ * `setHolders` with `ticketDataCapture`, `setConsent`) so `<Payment/>`'s
3590
+ * pre-flight passes. Use it alongside `<Payment/>`, or set those yourself.
3591
+ */
3592
+
3593
+ interface BillingInfoProps {
3594
+ /** Event context is used to default the country and phone dial code. */
3595
+ eventId?: string;
3596
+ /** Fired once billing is saved to the engine — e.g. reveal `<Payment/>`. */
3597
+ onContinue?: () => void;
3598
+ /** Section heading. Old checkout uses "Billing Information". */
3599
+ heading?: string;
3600
+ /** CTA label. */
3601
+ buttonLabel?: string;
3602
+ /** When provided and the buyer isn't signed in, shows a "Login & skip ahead"
3603
+ * row. The current email is passed when login follows an account match. */
3604
+ onLogin?: (email?: string) => void;
3605
+ /** Hide this card only after a signed-in profile satisfies every ordinary
3606
+ * billing requirement and the event needs no extra buyer/holder answers. */
3607
+ skipWhenProfileComplete?: boolean;
3608
+ /** Ask guests to repeat their email and require an exact match. */
3609
+ requireEmailConfirmation?: boolean;
3610
+ /** Always collect one named holder per selected ticket. EmbeddedCheckout uses
3611
+ * this to match tf-sports; standalone sections default to backend gates. */
3612
+ collectTicketHolders?: boolean;
3613
+ /** When holder details are enabled, also collect each holder's email and phone. */
3614
+ collectHolderContact?: boolean;
3615
+ /** Marketing opt-in labels. Render a checkbox for each provided (unchecked). */
3616
+ ttfOptInLabel?: string;
3617
+ brandOptInLabel?: string;
3618
+ /** Required host privacy acknowledgement. The URL is supplied by the consumer. */
3619
+ privacyPolicy?: CheckoutPrivacyPolicy;
3620
+ /** Show the legacy inline "Required" error after a failed payment attempt. */
3621
+ showPrivacyError?: boolean;
3622
+ /** Optional numbered badge (old checkout shows none — omitted by default). */
3623
+ step?: ReactNode;
3624
+ className?: string;
3625
+ }
3626
+ interface CheckoutPrivacyPolicy {
3627
+ url: string;
3628
+ brandName: string;
3629
+ linkLabel?: string;
3630
+ }
3631
+ declare const BillingInfo: FC<BillingInfoProps>;
3632
+
3633
+ /**
3634
+ * `<Payment/>` — order review + payment-method selection + T&C, then place the
3635
+ * order. Buyer details come from `<BillingInfo/>` (read back off the shared
3636
+ * checkout). The method list is built from the event's gateway + `preOrderMethods()`
3637
+ * + the priced snapshot, and each selection maps to the right `placeOrder` rail
3638
+ * (Stripe card, Xendit card/e-wallet, PayPal, redirect rails, payment plan).
3639
+ */
3640
+
3641
+ interface PaymentProps {
3642
+ onComplete?: (order: PlaceOrderResult) => void;
3643
+ /** Optional event context adds the event name to the order review. */
3644
+ eventId?: string;
3645
+ /** Must match the policy used by the paired `<BillingInfo/>`. */
3646
+ requireEmailConfirmation?: boolean;
3647
+ /** Must match the holder policy used by the paired `<BillingInfo/>`. */
3648
+ collectTicketHolders?: boolean;
3649
+ /** Must match the holder-contact policy used by the paired `<BillingInfo/>`. */
3650
+ requireHolderContact?: boolean;
3651
+ /** Host-owned acknowledgements such as a brand privacy policy. */
3652
+ additionalConditions?: EventCondition[];
3653
+ /** Require the privacy checkbox managed by BillingInfo before payment. */
3654
+ requirePrivacyPolicy?: boolean;
3655
+ /** Called when payment is attempted before required privacy consent. */
3656
+ onPrivacyRequired?: () => void;
3657
+ /** Test card copy is useful in examples, but should never appear by default. */
3658
+ showTestCardHint?: boolean;
3659
+ className?: string;
3660
+ }
3661
+ declare const Payment: FC<PaymentProps>;
3662
+
3663
+ interface OrderSummaryProps {
3664
+ eventId?: string;
3665
+ className?: string;
3666
+ }
3667
+ /** Storefront-compatible order summary shown after the checkout controls. */
3668
+ declare const OrderSummary: FC<OrderSummaryProps>;
3669
+
3670
+ /**
3671
+ * `<IDVerification/>` — shown after an order that needs identity verification
3672
+ * (`order.needIdVerification`). Kicks off the engine's verify flow: mint the
3673
+ * provider URL, open it, and poll to completion, reflecting each phase. The
3674
+ * order is already paid — a stall here never means a failed payment.
3675
+ *
3676
+ * If you place your order with `placeOrder(method, { autoRunIdVerification:true })`
3677
+ * the engine runs this for you; this section is the manual, visible counterpart.
3678
+ */
3679
+
3680
+ interface IDVerificationProps {
3681
+ className?: string;
3682
+ }
3683
+ declare const IDVerification: FC<IDVerificationProps>;
3684
+
3685
+ /**
3686
+ * `<Confirmation/>` — the order-placed receipt + a referral/share growth block
3687
+ * (invite friends → cheaper/free tickets). Reads the settled order off the
3688
+ * shared checkout; returns null until an order exists.
3689
+ *
3690
+ * Fire purchase tracking (Meta Pixel / GTM) from the `onComplete(order)` callback
3691
+ * you already pass to `<Payment/>` / `<EmbeddedCheckout/>` — the SDK stays analytics-
3692
+ * agnostic. The referral REWARD ladder ("how much cheaper") needs the order
3693
+ * confirmation payload, which is left to the consumer (pass `children`); the
3694
+ * share affordances below need no backend data.
3695
+ */
3696
+
3697
+ interface ConfirmationProps {
3698
+ /** URL friends land on (referral/event page). Defaults to the current page. */
3699
+ shareUrl?: string;
3700
+ /** Message prefilled into social shares. */
3701
+ shareMessage?: string;
3702
+ /** Link to the buyer's tickets/order — renders a "View my tickets" button. */
3703
+ viewOrderUrl?: string;
3704
+ /** Extra content (e.g. your own referral-reward ladder from the order payload). */
3705
+ children?: ReactNode;
3706
+ className?: string;
3707
+ }
3708
+ declare const Confirmation: FC<ConfirmationProps>;
3709
+
3710
+ type ConfirmationData = Record<string, any>;
3711
+ interface OrderConfirmationProps {
3712
+ orderHash: string;
3713
+ title?: ReactNode;
3714
+ message?: ReactNode;
3715
+ helper?: ReactNode;
3716
+ eventTitle?: ReactNode;
3717
+ eventDate?: ReactNode;
3718
+ eventLocation?: ReactNode;
3719
+ viewOrderUrl?: string | ((data: ConfirmationData) => string);
3720
+ showReferral?: boolean;
3721
+ showShareButtons?: boolean;
3722
+ onLoaded?: (data: ConfirmationData) => void;
3723
+ onError?: (error: unknown) => void;
3724
+ className?: string;
3725
+ }
3726
+ /**
3727
+ * Reloadable post-purchase confirmation. Its markup intentionally preserves
3728
+ * the proven legacy checkout class contract so existing white-label themes do
3729
+ * not lose their confirmation-page UX when they adopt Checkout Kit.
3730
+ */
3731
+ declare const OrderConfirmation: FC<OrderConfirmationProps>;
3732
+
3733
+ interface OrderIDVerificationProps {
3734
+ orderHash: string;
3735
+ onVerified?: () => void;
3736
+ className?: string;
3737
+ }
3738
+ /** Routed ID-verification UI that survives a full page navigation. */
3739
+ declare const OrderIDVerification: FC<OrderIDVerificationProps>;
3740
+
3741
+ /**
3742
+ * `<EmbeddedCheckout eventId="…" />` — the batteries-included checkout. It
3743
+ * follows the legacy storefront UX: ticket selection and checkout are separate
3744
+ * views, with a compact selection summary + Edit action once the cart is
3745
+ * reserved. Want a different layout? Compose the sections yourself — they all
3746
+ * read the same `useCheckout()` from the provider.
3747
+ */
3748
+
3749
+ interface EmbeddedCheckoutProps {
3750
+ /** The event whose tickets to sell. */
3751
+ eventId: string;
3752
+ /** Called with the placed order once payment settles. */
3753
+ onComplete?: (order: PlaceOrderResult) => void;
3754
+ /**
3755
+ * `inline` renders verification/confirmation inside the checkout. `redirect`
3756
+ * leaves completion routing to `onComplete` and shows a short transition
3757
+ * state while the host navigates. Defaults to `inline`.
3758
+ */
3759
+ confirmationMode?: 'inline' | 'redirect';
3760
+ /** Initial checkout screen. Useful for preserving an existing `/seat-map` route. */
3761
+ initialView?: 'tickets' | 'seats';
3762
+ /** Reports the visible flow view so host storefronts can coordinate mobile UI. */
3763
+ onViewChange?: (view: CheckoutView) => void;
3764
+ /** Smooth-scroll to buyer details after tickets/seats are reserved. Default true. */
3765
+ autoScroll?: boolean;
3766
+ /** Require guests to repeat their email. Defaults to storefront-compatible true. */
3767
+ requireEmailConfirmation?: boolean;
3768
+ /** Collect one named holder per ticket. Defaults true to match tf-sports. */
3769
+ collectTicketHolders?: boolean;
3770
+ /** Collect email/phone when ticket-holder details are required. Defaults true. */
3771
+ collectHolderContact?: boolean;
3772
+ /** Open the host application's login UI instead of the built-in modal. The
3773
+ * current buyer email is passed when an existing account was detected. */
3774
+ onLogin?: (email?: string) => void;
3775
+ /** Configure the built-in login/create-account/password-reset modal, or set
3776
+ * false to remove auth UI. Ignored when `onLogin` is provided. */
3777
+ auth?: false | EmbeddedCheckoutAuthOptions;
3778
+ /** Legacy skip-billing equivalent for complete signed-in profiles. Payment is
3779
+ * never skipped. Defaults false; incompatible holder/custom fields prevent it. */
3780
+ skipBillingWhenProfileComplete?: boolean;
3781
+ /** Optional marketing copy controlled by the embedding brand. */
3782
+ ttfOptInLabel?: string;
3783
+ brandOptInLabel?: string;
3784
+ /** Consumer-owned privacy policy link and brand name. Required when provided. */
3785
+ privacyPolicy?: CheckoutPrivacyPolicy;
3786
+ /** Host-owned required/optional acknowledgements, e.g. a privacy policy. */
3787
+ additionalConditions?: EventCondition[];
3788
+ /** Apply/attribute hosted links without requiring a custom Tickets section. */
3789
+ initialPromoCode?: string;
3790
+ referrer?: string | number;
3791
+ readAttributionFromUrl?: boolean;
3792
+ /** Opt into sandbox card copy in demos. Defaults false. */
3793
+ showTestCardHint?: boolean;
3794
+ /** Recolor via design tokens. */
3795
+ theme?: CheckoutTheme;
3796
+ /**
3797
+ * Language for the checkout's own copy. Defaults to `en-GB`, so existing
3798
+ * consumers that never set it render exactly as before.
3799
+ */
3800
+ locale?: LocaleCode;
3801
+ /** Per-key copy overrides, merged over the locale. */
3802
+ messages?: Partial<Messages>;
3803
+ className?: string;
3804
+ }
3805
+ interface EmbeddedCheckoutAuthOptions {
3806
+ allowRegistration?: boolean;
3807
+ allowPasswordReset?: boolean;
3808
+ requireRegistrationAddress?: boolean;
3809
+ logoUrl?: string;
3810
+ onAuthenticated?: (profile: TfProfile) => void;
3811
+ }
3812
+ type SelectionView = 'tickets' | 'seats';
3813
+ type CheckoutView = SelectionView | 'checkout';
3814
+ declare const EmbeddedCheckout: FC<EmbeddedCheckoutProps>;
3815
+
3816
+ interface ResumedCheckoutProps {
3817
+ eventId: string;
3818
+ isFromResale?: boolean;
3819
+ onComplete?: (order: PlaceOrderResult) => void;
3820
+ confirmationMode?: 'inline' | 'redirect';
3821
+ requireEmailConfirmation?: boolean;
3822
+ collectTicketHolders?: boolean;
3823
+ collectHolderContact?: boolean;
3824
+ privacyPolicy?: CheckoutPrivacyPolicy;
3825
+ brandOptInLabel?: string;
3826
+ additionalConditions?: EventCondition[];
3827
+ theme?: CheckoutTheme;
3828
+ className?: string;
3829
+ }
3830
+ /** Checkout UI for a cart created by a preceding server flow, such as resale. */
3831
+ declare const ResumedCheckout: FC<ResumedCheckoutProps>;
3832
+
3833
+ /** Raw card field values, read at tokenize time (never held in JS state). */
3834
+ interface XenditCardFields {
3835
+ number: string;
3836
+ /** "MM" */
3837
+ expMonth: string;
3838
+ /** "YY" or "YYYY" — 2-digit is expanded to 20YY. */
3839
+ expYear: string;
3840
+ cvn: string;
3841
+ }
3842
+ interface WebXenditTokenizer {
3843
+ /** `<XenditCardInput/>` registers a getter for its live field values (or
3844
+ * null on unmount). */
3845
+ registerFields(getFields: (() => XenditCardFields) | null): void;
3846
+ /** Tokenizes the registered card (running inline 3DS when the bank asks) and
3847
+ * resolves with the token the engine charges. Rejects on validation error,
3848
+ * decline, or a failed 3DS challenge. */
3849
+ tokenize(params: {
3850
+ publishableKey: string;
3851
+ amount: string | number;
3852
+ billing: {
3853
+ firstName: string;
3854
+ lastName: string;
3855
+ email: string;
3856
+ phone?: string;
3857
+ };
3858
+ onBehalfOf?: string | null;
3859
+ }): Promise<Record<string, unknown>>;
3860
+ }
3861
+ declare const createWebXenditTokenizer: () => WebXenditTokenizer;
3862
+
3863
+ /**
3864
+ * Web (stripe-js) adapter of the SDK's PaymentConfirmer port — the proof that
3865
+ * the engine in `tf-checkout-shared` is genuinely platform-free. Bind it via
3866
+ * `useCheckout({ ports: { confirmer: webConfirmer, ...webPorts } })` to run the
3867
+ * exact same cart → order → charge → finalize sequence React Native runs (same
3868
+ * retry-safety invariants, same duplicate-charge guards, same tests).
3869
+ *
3870
+ * Card payments on the web confirm against a Stripe Element the consumer
3871
+ * renders: register it via `confirmer.registerCardElement(element)` before
3872
+ * placing the order. Apple Pay is not bound on web yet (the web equivalent is
3873
+ * the Payment Request button, a different integration) — `confirmApplePay`
3874
+ * throws with a clear message.
3875
+ */
3876
+
3877
+ interface WebStripeConfirmer extends PaymentConfirmer {
3878
+ /** The card Element the consumer rendered — required before confirmCard. */
3879
+ registerCardElement(element: StripeCardElement | null): void;
3880
+ /** The currently registered card Element (null before registration) —
3881
+ * the MSI port creates its PaymentMethod from it. */
3882
+ getCardElement(): StripeCardElement | null;
3883
+ /**
3884
+ * The Elements GROUP backing a `<StripePaymentElement/>` (deferred mode).
3885
+ * This is how the old checkout did wallets: when a Payment Element is
3886
+ * registered, `confirmCard` confirms card + Apple Pay + Google Pay through it
3887
+ * (`elements.submit()` + `stripe.confirmPayment`), exactly as the old
3888
+ * `useStripePayment.processPayment` did. Null when only a bare card is rendered.
3889
+ */
3890
+ registerPaymentElement(elements: StripeElements | null): void;
3891
+ getPaymentElement(): StripeElements | null;
3892
+ /**
3893
+ * The live Stripe instance (null before the flow calls init). Elements MUST
3894
+ * be created from this instance — stripe-js rejects confirming with an
3895
+ * Element born from a different one:
3896
+ * `confirmer.getStripe()!.elements().create('card')`.
3897
+ */
3898
+ getStripe(): Stripe | null;
3899
+ /** Resolves with the Stripe instance as soon as init() has run — mount UI
3900
+ * against this instead of polling getStripe(). */
3901
+ whenReady(): Promise<Stripe>;
3902
+ }
3903
+ declare const createWebStripeConfirmer: () => WebStripeConfirmer;
3904
+ /**
3905
+ * The web half of the engine's `CheckoutPorts`:
3906
+ *
3907
+ * - `providerPage` runs the provider in a POPUP and resolves when navigation
3908
+ * lands back on `returnUrlPrefix` (same-origin, so the URL is readable);
3909
+ * a closed popup resolves as 'dismiss'. Call `placeOrder` from a click
3910
+ * handler, or the browser's popup blocker will refuse the window.
3911
+ * - `confirmOxxo` / `createCardPaymentMethod` / `createRedirectPaymentMethod`
3912
+ * / `handleNextAction` bind the same Stripe legs the RN ports bind.
3913
+ *
3914
+ * MSI's `onInstallmentOffers` picker stays consumer-supplied (pass it via
3915
+ * `placeOrder(request, ports)`).
3916
+ */
3917
+ declare const createWebPorts: (confirmer: WebStripeConfirmer,
3918
+ /** The Xendit card tokenizer `<XenditCardInput/>` binds to. When given, the
3919
+ * engine tokenizes Xendit cards inline instead of in a popup. */
3920
+ xenditTokenizer?: WebXenditTokenizer) => Omit<CheckoutPorts, "confirmer">;
3921
+
3922
+ /** The confirmer every `useCheckout`/`<CardInput/>` binds to. */
3923
+ declare const webConfirmer: WebStripeConfirmer;
3924
+ /** The Xendit card tokenizer `<XenditCardInput/>` binds to. */
3925
+ declare const webXenditTokenizer: WebXenditTokenizer;
3926
+ /** The web ports the alternative rails run on: the popup provider page, OXXO /
3927
+ * MSI Stripe legs, and inline Xendit tokenization. */
3928
+ declare const webPorts: Omit<CheckoutPorts, "confirmer">;
3929
+
3930
+ export { ADD_ON_DEFAULT_MAX_QUANTITY, AddOns, type AddOnsProps, type AddonSelection, type AuthFieldErrors, type AuthFieldName, type AuthFlowView, type AuthLoginInput, AuthModal, type AuthModalProps, type AuthProvider, type AuthRegistrationInput, type AuthValidationResult, type BillingDraft, type BillingFieldError, BillingInfo, type BillingInfoProps, type BreakdownLine, Button, type ButtonProps, type BuyerFieldSpec, type BuyerFieldVisibility, type BuyerFieldsInput, CONFIRMED_INTENT_STATUSES, Card, CardInput, type CardProps, type ChangePaymentMethodInput, Checkbox, type CheckboxProps, type CheckoutBilling, type CheckoutBreakdown, type CheckoutConsent, type CheckoutDetailsState, type CheckoutDetailsValidationOptions, type CheckoutEngine, type CheckoutHolder, type CheckoutListener, type CheckoutOptions, type CheckoutPaymentPlan, type CheckoutPaymentPlanPreview, type CheckoutPorts, type CheckoutPrivacyPolicy, CheckoutProvider, type CheckoutProviderProps, type CheckoutSnapshot, type CheckoutStatus, type CheckoutStore, type CheckoutTheme, type CheckoutWalletAvailability, Confirmation, type ConfirmationProps, type ContactEmailResponse, type CurrencyOption, type CurrencyState, type CurrencySync, type CurrencySyncOptions, type CurrencyTransport, CustomFieldGroupFields, type CustomFieldGroupFieldsProps, CustomFieldInput, type CustomFieldInputProps, type CustomFieldOption, type CustomFieldType, type CustomFieldValues, DEFAULT_LOCALE, DEFAULT_PLAN_TERMINOLOGY, ENDPOINTS, EmbeddedCheckout, type EmbeddedCheckoutAuthOptions, type EmbeddedCheckoutProps, type Endpoints, type EngineConfig, type EngineContext, type EventAddon, type EventCondition, type EventCustomField, type EventCustomFieldGroup, type ExistingAccount, FEE_MODE_PAYMENT_METHOD_TYPES, Field, type FieldGates, FieldRow, ForgotPasswordForm, type ForgotPasswordFormProps, type Gateway, type HolderDraft, I18nProvider, type I18nProviderProps, IDVerification, type IDVerificationProps, ID_VERIFICATION_MAX_CONSECUTIVE_FAILURES, ID_VERIFICATION_MAX_TICKS, ID_VERIFICATION_POLL_MS, type IdVerificationCallbacks, type IdVerificationPhase, type IdVerificationPoller, type IdVerificationStatus, Input, type InputProps, type InstallmentOffer, type InstallmentOffers, Loader, type LocaleCode, type LocationOption, LoginForm, type LoginFormProps, type Messages, type OnCheckoutAttributes, type OnCheckoutInput, OrderConfirmation, type OrderConfirmationProps, OrderIDVerification, type OrderIDVerificationProps, type OrderPaymentSession, type OrderProgress, OrderSummary, type OrderSummaryProps, type OxxoVoucher, type PayPalForm, type PayPalTabConfig, Payment, type PaymentConfirmer, type PaymentConfirmerExtras, type PaymentMethod, type PaymentMethodId, type PaymentMethodOption, type PaymentMethodTypeInput, type PaymentMethodTypeRequest, PaymentMethods, type PaymentMethodsProps, type PaymentProps, type PaymentRequest, Pill, type PlaceOrderHookOptions, type PlaceOrderResult, type PlanTermsParagraph, type PreOrderGateway, type PreOrderPaymentConfig, type PriceBreakdown, type PriceBreakdownAddOnRow, type PriceBreakdownFeeRow, type PriceBreakdownTicketRow, PriceLine, type ProviderPageOutcome, type ProviderPageRequest, QuantitySelect, type QuantitySelectProps, type RazorpayCheckoutHtmlOptions, type RedirectConfirmRequest, type RedirectConfirmResponse, type RedirectOutcome, RegisterForm, type RegisterFormProps, type RequiredAddOnLike, ResetPasswordForm, type ResetPasswordFormProps, type ResolvedTtfConfig, ResumedCheckout, type ResumedCheckoutProps, type RunIdVerificationOptions, SUPPORTED_REDIRECT_METHODS, type SavedPlanCard, type SeatLine, SeatMap, type SeatMapProps, SectionHeader, type SectionHeaderProps, Select, type SelectProps, Stepper, type StorageAdapter, type StripeConfig, StripePaymentElement, type StripeWallets, Textarea, type TextareaProps, type TfCountry, type TfEnvelope, type TfListEnvelope, type TfProfile, type TfState, type TfTicketHolder, type TicketHolderInput, type TicketSelection, type TicketType, Tickets, type TicketsProps, Timer, TimerBanner, type TimerBannerProps, type Translate, type TranslateVars, type TranslatorOptions, type Ttf, type TtfConfig, TtfError, type UseCheckout, type UseCheckoutOptions, type WaitingListEntry, type WalletsOption, type WebStripeConfirmer, type WebXenditTokenizer, XENDIT_EWALLET_EXTRA_FIELD, XENDIT_NON_EWALLET_PROCESSORS, type XenditCardFields, XenditCardInput, type XenditChargeOutcome, type XenditCheckoutHtmlOptions, type XenditEWalletChargeInput, type XenditPreOrderConfig, type XenditProcessor, addOnMaxQuantity, index$1 as api, buildAutoSubmitFormHtml, buildChangePaymentMethodAttributes, buildConfirmInstallmentsFields, buildInstallmentOffersFields, buildOnCheckoutBody, buildPaymentMethodTypeAttributes, buildRazorpayCheckoutHtml, buildRegistrationFields, buildXenditCheckoutHtml, buildXenditEWalletChargeFields, cleanAccountId, clearSession, configure, configureCheckout, confirmInstallmentsHasNextAction, createCheckoutStore, createEngine, createIdVerificationPoller, createIdVerificationPollerFor, createMemoryStorage, createTranslator, createWebPorts, createWebStripeConfirmer, createWebXenditTokenizer, customFieldsComplete, cx, detectGateway, en, errorMessage, esMX, evaluateFieldGates, fieldAppliesToTicketType, formatPlanMoney, getAccessToken, getGuestToken, hasValue, index as hooks, identifyPreOrderGateway, initialSnapshot, interpretContactEmail, interpretRedirectConfirm, interpretXenditChargeResponse, isAuthenticated, isCartExpiredError, isConfigured, isEmail, isMultiCurrency, isPhone, isSeatedEvent, listRedirectMethods, localStorageAdapter, mapProfileToBilling, missingCheckoutDetails, missingRequiredAddOns, normalizeAuthEmail, oxxoVoucherFromNextAction, payOrderWith, paymentIntentIdFromClientSecret, paymentPlanTerms, paypalTabConfig, placeOrderWith, planCheckboxLabel, planConfirmLabel, planTerminology, planTermsTitle, priceBreakdownAddOnsQuery, primeSeatsWith, primeWith, registerCatalogue, repriceWith, requiresFeeReprice, resolveInstallmentOffers, resolveLocale, resolvePayPalForm, resolvePaymentConfig, resolvePriceBreakdown, resumeCartWith, runIdVerificationWith, savedPlanCard, syncCurrency, syncCurrencyWith, themeToVars, ticketFieldsFor, ticketQuantityRange, ttf, unsupportedGatewayError, useCheckout, useCheckoutContext, useCheckoutValidation, useInstallmentPicker, useT, validateLoginInput, validatePasswordResetEmail, validateRegistrationInput, walletsOption, webConfirmer, webPorts, webXenditTokenizer, xenditPreOrderConfig };