@voyant-travel/finance 0.119.5

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 (294) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +192 -0
  3. package/dist/action-ledger-drift.d.ts +29 -0
  4. package/dist/action-ledger-drift.d.ts.map +1 -0
  5. package/dist/action-ledger-drift.js +166 -0
  6. package/dist/booking-tax.d.ts +124 -0
  7. package/dist/booking-tax.d.ts.map +1 -0
  8. package/dist/booking-tax.js +264 -0
  9. package/dist/checkout-routes.d.ts +1154 -0
  10. package/dist/checkout-routes.d.ts.map +1 -0
  11. package/dist/checkout-routes.js +116 -0
  12. package/dist/checkout-service-plan.d.ts +137 -0
  13. package/dist/checkout-service-plan.d.ts.map +1 -0
  14. package/dist/checkout-service-plan.js +119 -0
  15. package/dist/checkout-service.d.ts +9 -0
  16. package/dist/checkout-service.d.ts.map +1 -0
  17. package/dist/checkout-service.js +324 -0
  18. package/dist/checkout-validation.d.ts +1682 -0
  19. package/dist/checkout-validation.d.ts.map +1 -0
  20. package/dist/checkout-validation.js +228 -0
  21. package/dist/document-download.d.ts +3 -0
  22. package/dist/document-download.d.ts.map +1 -0
  23. package/dist/document-download.js +1 -0
  24. package/dist/fx-money.d.ts +17 -0
  25. package/dist/fx-money.d.ts.map +1 -0
  26. package/dist/fx-money.js +194 -0
  27. package/dist/index.d.ts +65 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +108 -0
  30. package/dist/invoice-fx.d.ts +134 -0
  31. package/dist/invoice-fx.d.ts.map +1 -0
  32. package/dist/invoice-fx.js +240 -0
  33. package/dist/invoice-number-errors.d.ts +2 -0
  34. package/dist/invoice-number-errors.d.ts.map +1 -0
  35. package/dist/invoice-number-errors.js +58 -0
  36. package/dist/markets-ref.d.ts +149 -0
  37. package/dist/markets-ref.d.ts.map +1 -0
  38. package/dist/markets-ref.js +17 -0
  39. package/dist/payment-link.d.ts +23 -0
  40. package/dist/payment-link.d.ts.map +1 -0
  41. package/dist/payment-link.js +30 -0
  42. package/dist/payment-policy.d.ts +113 -0
  43. package/dist/payment-policy.d.ts.map +1 -0
  44. package/dist/payment-policy.js +193 -0
  45. package/dist/route-runtime.d.ts +22 -0
  46. package/dist/route-runtime.d.ts.map +1 -0
  47. package/dist/route-runtime.js +18 -0
  48. package/dist/routes-action-ledger.d.ts +181 -0
  49. package/dist/routes-action-ledger.d.ts.map +1 -0
  50. package/dist/routes-action-ledger.js +142 -0
  51. package/dist/routes-booking-billing.d.ts +852 -0
  52. package/dist/routes-booking-billing.d.ts.map +1 -0
  53. package/dist/routes-booking-billing.js +223 -0
  54. package/dist/routes-booking-create.d.ts +3 -0
  55. package/dist/routes-booking-create.d.ts.map +1 -0
  56. package/dist/routes-booking-create.js +194 -0
  57. package/dist/routes-booking-reads.d.ts +46 -0
  58. package/dist/routes-booking-reads.d.ts.map +1 -0
  59. package/dist/routes-booking-reads.js +20 -0
  60. package/dist/routes-documents.d.ts +195 -0
  61. package/dist/routes-documents.d.ts.map +1 -0
  62. package/dist/routes-documents.js +93 -0
  63. package/dist/routes-invoice-core.d.ts +794 -0
  64. package/dist/routes-invoice-core.d.ts.map +1 -0
  65. package/dist/routes-invoice-core.js +238 -0
  66. package/dist/routes-invoice-documents.d.ts +401 -0
  67. package/dist/routes-invoice-documents.d.ts.map +1 -0
  68. package/dist/routes-invoice-documents.js +91 -0
  69. package/dist/routes-invoice-issue.d.ts +384 -0
  70. package/dist/routes-invoice-issue.d.ts.map +1 -0
  71. package/dist/routes-invoice-issue.js +208 -0
  72. package/dist/routes-payment-processing.d.ts +1193 -0
  73. package/dist/routes-payment-processing.d.ts.map +1 -0
  74. package/dist/routes-payment-processing.js +238 -0
  75. package/dist/routes-payments.d.ts +309 -0
  76. package/dist/routes-payments.d.ts.map +1 -0
  77. package/dist/routes-payments.js +94 -0
  78. package/dist/routes-public.d.ts +1948 -0
  79. package/dist/routes-public.d.ts.map +1 -0
  80. package/dist/routes-public.js +275 -0
  81. package/dist/routes-reference-data.d.ts +977 -0
  82. package/dist/routes-reference-data.d.ts.map +1 -0
  83. package/dist/routes-reference-data.js +191 -0
  84. package/dist/routes-reports.d.ts +344 -0
  85. package/dist/routes-reports.d.ts.map +1 -0
  86. package/dist/routes-reports.js +93 -0
  87. package/dist/routes-runtime.d.ts +71 -0
  88. package/dist/routes-runtime.d.ts.map +1 -0
  89. package/dist/routes-runtime.js +59 -0
  90. package/dist/routes-settlement.d.ts +67 -0
  91. package/dist/routes-settlement.d.ts.map +1 -0
  92. package/dist/routes-settlement.js +23 -0
  93. package/dist/routes-shared.d.ts +35 -0
  94. package/dist/routes-shared.d.ts.map +1 -0
  95. package/dist/routes-shared.js +10 -0
  96. package/dist/routes-supplier-invoices.d.ts +778 -0
  97. package/dist/routes-supplier-invoices.d.ts.map +1 -0
  98. package/dist/routes-supplier-invoices.js +159 -0
  99. package/dist/routes-vouchers.d.ts +228 -0
  100. package/dist/routes-vouchers.d.ts.map +1 -0
  101. package/dist/routes-vouchers.js +54 -0
  102. package/dist/routes.d.ts +5577 -0
  103. package/dist/routes.d.ts.map +1 -0
  104. package/dist/routes.js +44 -0
  105. package/dist/schema/booking-billing.d.ts +1006 -0
  106. package/dist/schema/booking-billing.d.ts.map +1 -0
  107. package/dist/schema/booking-billing.js +106 -0
  108. package/dist/schema/enums.d.ts +48 -0
  109. package/dist/schema/enums.d.ts.map +1 -0
  110. package/dist/schema/enums.js +237 -0
  111. package/dist/schema/invoice-documents.d.ts +1245 -0
  112. package/dist/schema/invoice-documents.d.ts.map +1 -0
  113. package/dist/schema/invoice-documents.js +140 -0
  114. package/dist/schema/payment-instruments.d.ts +418 -0
  115. package/dist/schema/payment-instruments.d.ts.map +1 -0
  116. package/dist/schema/payment-instruments.js +45 -0
  117. package/dist/schema/payment-processing.d.ts +563 -0
  118. package/dist/schema/payment-processing.d.ts.map +1 -0
  119. package/dist/schema/payment-processing.js +65 -0
  120. package/dist/schema/payment-sessions.d.ts +728 -0
  121. package/dist/schema/payment-sessions.d.ts.map +1 -0
  122. package/dist/schema/payment-sessions.js +79 -0
  123. package/dist/schema/receivables.d.ts +1474 -0
  124. package/dist/schema/receivables.d.ts.map +1 -0
  125. package/dist/schema/receivables.js +179 -0
  126. package/dist/schema/relations.d.ts +82 -0
  127. package/dist/schema/relations.d.ts.map +1 -0
  128. package/dist/schema/relations.js +144 -0
  129. package/dist/schema/supplier-invoices.d.ts +1619 -0
  130. package/dist/schema/supplier-invoices.d.ts.map +1 -0
  131. package/dist/schema/supplier-invoices.js +228 -0
  132. package/dist/schema/tax.d.ts +712 -0
  133. package/dist/schema/tax.d.ts.map +1 -0
  134. package/dist/schema/tax.js +98 -0
  135. package/dist/schema/vouchers.d.ts +444 -0
  136. package/dist/schema/vouchers.d.ts.map +1 -0
  137. package/dist/schema/vouchers.js +64 -0
  138. package/dist/schema.d.ts +12 -0
  139. package/dist/schema.d.ts.map +1 -0
  140. package/dist/schema.js +11 -0
  141. package/dist/service-accountant-shares.d.ts +106 -0
  142. package/dist/service-accountant-shares.d.ts.map +1 -0
  143. package/dist/service-accountant-shares.js +331 -0
  144. package/dist/service-action-ledger-accounting.d.ts +104 -0
  145. package/dist/service-action-ledger-accounting.d.ts.map +1 -0
  146. package/dist/service-action-ledger-accounting.js +386 -0
  147. package/dist/service-action-ledger-booking-payments.d.ts +48 -0
  148. package/dist/service-action-ledger-booking-payments.d.ts.map +1 -0
  149. package/dist/service-action-ledger-booking-payments.js +178 -0
  150. package/dist/service-action-ledger-bookings.d.ts +44 -0
  151. package/dist/service-action-ledger-bookings.d.ts.map +1 -0
  152. package/dist/service-action-ledger-bookings.js +81 -0
  153. package/dist/service-action-ledger-payment-authorizations.d.ts +48 -0
  154. package/dist/service-action-ledger-payment-authorizations.d.ts.map +1 -0
  155. package/dist/service-action-ledger-payment-authorizations.js +209 -0
  156. package/dist/service-action-ledger-payment-sessions.d.ts +83 -0
  157. package/dist/service-action-ledger-payment-sessions.d.ts.map +1 -0
  158. package/dist/service-action-ledger-payment-sessions.js +294 -0
  159. package/dist/service-action-ledger-supplier-invoices.d.ts +27 -0
  160. package/dist/service-action-ledger-supplier-invoices.d.ts.map +1 -0
  161. package/dist/service-action-ledger-supplier-invoices.js +111 -0
  162. package/dist/service-action-ledger-supplier-payments.d.ts +21 -0
  163. package/dist/service-action-ledger-supplier-payments.d.ts.map +1 -0
  164. package/dist/service-action-ledger-supplier-payments.js +97 -0
  165. package/dist/service-action-ledger.d.ts +7 -0
  166. package/dist/service-action-ledger.d.ts.map +1 -0
  167. package/dist/service-action-ledger.js +6 -0
  168. package/dist/service-aggregates.d.ts +96 -0
  169. package/dist/service-aggregates.d.ts.map +1 -0
  170. package/dist/service-aggregates.js +294 -0
  171. package/dist/service-booking-billing.d.ts +2322 -0
  172. package/dist/service-booking-billing.d.ts.map +1 -0
  173. package/dist/service-booking-billing.js +8 -0
  174. package/dist/service-booking-create.d.ts +410 -0
  175. package/dist/service-booking-create.d.ts.map +1 -0
  176. package/dist/service-booking-create.js +1256 -0
  177. package/dist/service-booking-guarantees.d.ts +725 -0
  178. package/dist/service-booking-guarantees.d.ts.map +1 -0
  179. package/dist/service-booking-guarantees.js +153 -0
  180. package/dist/service-booking-item-billing.d.ts +1062 -0
  181. package/dist/service-booking-item-billing.d.ts.map +1 -0
  182. package/dist/service-booking-item-billing.js +77 -0
  183. package/dist/service-booking-payment-schedules.d.ts +557 -0
  184. package/dist/service-booking-payment-schedules.d.ts.map +1 -0
  185. package/dist/service-booking-payment-schedules.js +372 -0
  186. package/dist/service-bookings-dual-create.d.ts +308 -0
  187. package/dist/service-bookings-dual-create.d.ts.map +1 -0
  188. package/dist/service-bookings-dual-create.js +131 -0
  189. package/dist/service-boundary-sql.d.ts +6 -0
  190. package/dist/service-boundary-sql.d.ts.map +1 -0
  191. package/dist/service-boundary-sql.js +15 -0
  192. package/dist/service-cost-categories.d.ts +26 -0
  193. package/dist/service-cost-categories.d.ts.map +1 -0
  194. package/dist/service-cost-categories.js +76 -0
  195. package/dist/service-documents.d.ts +80 -0
  196. package/dist/service-documents.d.ts.map +1 -0
  197. package/dist/service-documents.js +228 -0
  198. package/dist/service-invoice-artifacts.d.ts +246 -0
  199. package/dist/service-invoice-artifacts.d.ts.map +1 -0
  200. package/dist/service-invoice-artifacts.js +277 -0
  201. package/dist/service-invoice-core.d.ts +405 -0
  202. package/dist/service-invoice-core.d.ts.map +1 -0
  203. package/dist/service-invoice-core.js +290 -0
  204. package/dist/service-invoice-credit-notes.d.ts +973 -0
  205. package/dist/service-invoice-credit-notes.d.ts.map +1 -0
  206. package/dist/service-invoice-credit-notes.js +142 -0
  207. package/dist/service-invoice-from-booking.d.ts +41 -0
  208. package/dist/service-invoice-from-booking.d.ts.map +1 -0
  209. package/dist/service-invoice-from-booking.js +267 -0
  210. package/dist/service-invoice-line-items.d.ts +432 -0
  211. package/dist/service-invoice-line-items.d.ts.map +1 -0
  212. package/dist/service-invoice-line-items.js +102 -0
  213. package/dist/service-invoice-numbering.d.ts +227 -0
  214. package/dist/service-invoice-numbering.d.ts.map +1 -0
  215. package/dist/service-invoice-numbering.js +260 -0
  216. package/dist/service-invoice-payments.d.ts +673 -0
  217. package/dist/service-invoice-payments.d.ts.map +1 -0
  218. package/dist/service-invoice-payments.js +398 -0
  219. package/dist/service-invoices.d.ts +2501 -0
  220. package/dist/service-invoices.d.ts.map +1 -0
  221. package/dist/service-invoices.js +12 -0
  222. package/dist/service-issue.d.ts +207 -0
  223. package/dist/service-issue.d.ts.map +1 -0
  224. package/dist/service-issue.js +431 -0
  225. package/dist/service-payment-authorizations.d.ts +164 -0
  226. package/dist/service-payment-authorizations.d.ts.map +1 -0
  227. package/dist/service-payment-authorizations.js +227 -0
  228. package/dist/service-payment-instruments.d.ts +116 -0
  229. package/dist/service-payment-instruments.d.ts.map +1 -0
  230. package/dist/service-payment-instruments.js +99 -0
  231. package/dist/service-payment-processing.d.ts +676 -0
  232. package/dist/service-payment-processing.d.ts.map +1 -0
  233. package/dist/service-payment-processing.js +10 -0
  234. package/dist/service-payment-session-completion.d.ts +48 -0
  235. package/dist/service-payment-session-completion.d.ts.map +1 -0
  236. package/dist/service-payment-session-completion.js +238 -0
  237. package/dist/service-payment-sessions.d.ts +361 -0
  238. package/dist/service-payment-sessions.d.ts.map +1 -0
  239. package/dist/service-payment-sessions.js +280 -0
  240. package/dist/service-profitability.d.ts +114 -0
  241. package/dist/service-profitability.d.ts.map +1 -0
  242. package/dist/service-profitability.js +794 -0
  243. package/dist/service-public.d.ts +553 -0
  244. package/dist/service-public.d.ts.map +1 -0
  245. package/dist/service-public.js +583 -0
  246. package/dist/service-reference-data.d.ts +272 -0
  247. package/dist/service-reference-data.d.ts.map +1 -0
  248. package/dist/service-reference-data.js +280 -0
  249. package/dist/service-rendition-wait.d.ts +38 -0
  250. package/dist/service-rendition-wait.d.ts.map +1 -0
  251. package/dist/service-rendition-wait.js +67 -0
  252. package/dist/service-reports.d.ts +37 -0
  253. package/dist/service-reports.d.ts.map +1 -0
  254. package/dist/service-reports.js +62 -0
  255. package/dist/service-settlement.d.ts +46 -0
  256. package/dist/service-settlement.d.ts.map +1 -0
  257. package/dist/service-settlement.js +185 -0
  258. package/dist/service-shared.d.ts +541 -0
  259. package/dist/service-shared.d.ts.map +1 -0
  260. package/dist/service-shared.js +764 -0
  261. package/dist/service-supplier-invoices.d.ts +871 -0
  262. package/dist/service-supplier-invoices.d.ts.map +1 -0
  263. package/dist/service-supplier-invoices.js +744 -0
  264. package/dist/service-supplier-payments.d.ts +69 -0
  265. package/dist/service-supplier-payments.d.ts.map +1 -0
  266. package/dist/service-supplier-payments.js +136 -0
  267. package/dist/service-vouchers-migration.d.ts +44 -0
  268. package/dist/service-vouchers-migration.d.ts.map +1 -0
  269. package/dist/service-vouchers-migration.js +148 -0
  270. package/dist/service-vouchers.d.ts +157 -0
  271. package/dist/service-vouchers.d.ts.map +1 -0
  272. package/dist/service-vouchers.js +191 -0
  273. package/dist/service.d.ts +6490 -0
  274. package/dist/service.d.ts.map +1 -0
  275. package/dist/service.js +29 -0
  276. package/dist/validation-billing.d.ts +2 -0
  277. package/dist/validation-billing.d.ts.map +1 -0
  278. package/dist/validation-billing.js +1 -0
  279. package/dist/validation-payments.d.ts +2 -0
  280. package/dist/validation-payments.d.ts.map +1 -0
  281. package/dist/validation-payments.js +1 -0
  282. package/dist/validation-public.d.ts +2 -0
  283. package/dist/validation-public.d.ts.map +1 -0
  284. package/dist/validation-public.js +1 -0
  285. package/dist/validation-shared.d.ts +2 -0
  286. package/dist/validation-shared.d.ts.map +1 -0
  287. package/dist/validation-shared.js +1 -0
  288. package/dist/validation-vouchers.d.ts +2 -0
  289. package/dist/validation-vouchers.d.ts.map +1 -0
  290. package/dist/validation-vouchers.js +1 -0
  291. package/dist/validation.d.ts +2 -0
  292. package/dist/validation.d.ts.map +1 -0
  293. package/dist/validation.js +1 -0
  294. package/package.json +121 -0
@@ -0,0 +1,1154 @@
1
+ import type { ModuleContainer } from "@voyant-travel/core";
2
+ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
3
+ import { type CheckoutBankTransferDetails, type CheckoutNotificationDispatcher, type CheckoutPaymentStarter, type CheckoutPolicyOptions } from "./checkout-service.js";
4
+ import { type CheckoutReminderRunListQuery, type CheckoutReminderRunRecord } from "./checkout-validation.js";
5
+ type Env = {
6
+ Bindings: Record<string, unknown>;
7
+ Variables: {
8
+ container: ModuleContainer;
9
+ db: PostgresJsDatabase;
10
+ userId?: string;
11
+ };
12
+ };
13
+ export type CheckoutRoutesOptions = {
14
+ policy?: CheckoutPolicyOptions;
15
+ notificationDispatcher?: CheckoutNotificationDispatcher | null;
16
+ resolveNotificationDispatcher?: (bindings: Record<string, unknown>) => CheckoutNotificationDispatcher | null;
17
+ paymentStarters?: Record<string, CheckoutPaymentStarter>;
18
+ resolvePaymentStarters?: (bindings: Record<string, unknown>) => Record<string, CheckoutPaymentStarter>;
19
+ bankTransferDetails?: CheckoutBankTransferDetails | null;
20
+ resolveBankTransferDetails?: (bindings: Record<string, unknown>) => CheckoutBankTransferDetails | null;
21
+ publicCheckoutBaseUrl?: string | null;
22
+ resolvePublicCheckoutBaseUrl?: (bindings: Record<string, unknown>) => string | null | undefined;
23
+ listBookingReminderRuns?: (db: PostgresJsDatabase, bookingId: string, query: CheckoutReminderRunListQuery) => Promise<CheckoutReminderRunList>;
24
+ };
25
+ export interface CheckoutReminderRunList {
26
+ data: CheckoutReminderRunRecord[];
27
+ total: number;
28
+ limit: number;
29
+ offset: number;
30
+ }
31
+ export type CheckoutRouteRuntime = {
32
+ bindings: Record<string, unknown>;
33
+ notificationDispatcher: CheckoutNotificationDispatcher | null;
34
+ paymentStarters: Record<string, CheckoutPaymentStarter>;
35
+ bankTransferDetails: CheckoutBankTransferDetails | null;
36
+ publicCheckoutBaseUrl?: string | null;
37
+ listBookingReminderRuns?: CheckoutRoutesOptions["listBookingReminderRuns"];
38
+ };
39
+ export declare const CHECKOUT_ROUTE_RUNTIME_CONTAINER_KEY = "providers.finance.checkout.runtime";
40
+ export declare function createCheckoutRoutes(options?: CheckoutRoutesOptions): import("hono/hono-base").HonoBase<Env, {
41
+ "/bookings/:bookingId/collection-plan": {
42
+ $post: {
43
+ input: {
44
+ param: {
45
+ bookingId: string;
46
+ };
47
+ };
48
+ output: {
49
+ error: string;
50
+ };
51
+ outputFormat: "json";
52
+ status: 404;
53
+ } | {
54
+ input: {
55
+ param: {
56
+ bookingId: string;
57
+ };
58
+ };
59
+ output: {
60
+ data: {
61
+ bookingId: string;
62
+ method: "card" | "bank_transfer";
63
+ stage: "initial" | "reminder" | "manual";
64
+ paymentSessionTarget: "schedule" | "invoice" | null;
65
+ documentType: "proforma" | "invoice" | null;
66
+ willCreateDefaultPaymentPlan: boolean;
67
+ selectedSchedule: {
68
+ currency: string;
69
+ id: string;
70
+ createdAt: string;
71
+ updatedAt: string;
72
+ status: "pending" | "cancelled" | "due" | "paid" | "waived" | "expired";
73
+ bookingId: string;
74
+ amountCents: number;
75
+ notes: string | null;
76
+ bookingItemId: string | null;
77
+ scheduleType: "other" | "deposit" | "balance" | "installment" | "hold";
78
+ dueDate: string;
79
+ } | null;
80
+ selectedInvoice: {
81
+ subtotalCents: number;
82
+ currency: string;
83
+ id: string;
84
+ createdAt: string;
85
+ updatedAt: string;
86
+ taxRegimeId: string | null;
87
+ taxCents: number;
88
+ totalCents: number;
89
+ status: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
90
+ bookingId: string;
91
+ notes: string | null;
92
+ templateId: string | null;
93
+ dueDate: string;
94
+ invoiceNumber: string;
95
+ invoiceType: "invoice" | "proforma" | "credit_note";
96
+ convertedFromInvoiceId: string | null;
97
+ seriesId: string | null;
98
+ sequence: number | null;
99
+ language: string | null;
100
+ personId: string | null;
101
+ organizationId: string | null;
102
+ baseCurrency: string | null;
103
+ fxRateSetId: string | null;
104
+ baseSubtotalCents: number | null;
105
+ baseTaxCents: number | null;
106
+ baseTotalCents: number | null;
107
+ paidCents: number;
108
+ basePaidCents: number | null;
109
+ balanceDueCents: number;
110
+ baseBalanceDueCents: number | null;
111
+ commissionPercent: number | null;
112
+ commissionAmountCents: number | null;
113
+ issueDate: string;
114
+ voidedAt: string | null;
115
+ voidReason: string | null;
116
+ } | null;
117
+ amountCents: number;
118
+ currency: string;
119
+ recommendedAction: "create_bank_transfer_document" | "create_payment_session" | "create_invoice_then_payment_session" | "none";
120
+ };
121
+ };
122
+ outputFormat: "json";
123
+ status: import("hono/utils/http-status").ContentfulStatusCode;
124
+ } | {
125
+ input: {
126
+ param: {
127
+ bookingId: string;
128
+ };
129
+ };
130
+ output: {
131
+ error: string;
132
+ };
133
+ outputFormat: "json";
134
+ status: 400;
135
+ };
136
+ };
137
+ } & {
138
+ "/bookings/:bookingId/initiate-collection": {
139
+ $post: {
140
+ input: {
141
+ param: {
142
+ bookingId: string;
143
+ };
144
+ };
145
+ output: {
146
+ error: string;
147
+ };
148
+ outputFormat: "json";
149
+ status: 404;
150
+ } | {
151
+ input: {
152
+ param: {
153
+ bookingId: string;
154
+ };
155
+ };
156
+ output: {
157
+ data: {
158
+ plan: {
159
+ bookingId: string;
160
+ method: "card" | "bank_transfer";
161
+ stage: "initial" | "reminder" | "manual";
162
+ paymentSessionTarget: "schedule" | "invoice" | null;
163
+ documentType: "proforma" | "invoice" | null;
164
+ willCreateDefaultPaymentPlan: boolean;
165
+ selectedSchedule: {
166
+ currency: string;
167
+ id: string;
168
+ createdAt: string;
169
+ updatedAt: string;
170
+ status: "pending" | "cancelled" | "due" | "paid" | "waived" | "expired";
171
+ bookingId: string;
172
+ amountCents: number;
173
+ notes: string | null;
174
+ bookingItemId: string | null;
175
+ scheduleType: "other" | "deposit" | "balance" | "installment" | "hold";
176
+ dueDate: string;
177
+ } | null;
178
+ selectedInvoice: {
179
+ subtotalCents: number;
180
+ currency: string;
181
+ id: string;
182
+ createdAt: string;
183
+ updatedAt: string;
184
+ taxRegimeId: string | null;
185
+ taxCents: number;
186
+ totalCents: number;
187
+ status: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
188
+ bookingId: string;
189
+ notes: string | null;
190
+ templateId: string | null;
191
+ dueDate: string;
192
+ invoiceNumber: string;
193
+ invoiceType: "invoice" | "proforma" | "credit_note";
194
+ convertedFromInvoiceId: string | null;
195
+ seriesId: string | null;
196
+ sequence: number | null;
197
+ language: string | null;
198
+ personId: string | null;
199
+ organizationId: string | null;
200
+ baseCurrency: string | null;
201
+ fxRateSetId: string | null;
202
+ baseSubtotalCents: number | null;
203
+ baseTaxCents: number | null;
204
+ baseTotalCents: number | null;
205
+ paidCents: number;
206
+ basePaidCents: number | null;
207
+ balanceDueCents: number;
208
+ baseBalanceDueCents: number | null;
209
+ commissionPercent: number | null;
210
+ commissionAmountCents: number | null;
211
+ issueDate: string;
212
+ voidedAt: string | null;
213
+ voidReason: string | null;
214
+ } | null;
215
+ amountCents: number;
216
+ currency: string;
217
+ recommendedAction: "create_bank_transfer_document" | "create_payment_session" | "create_invoice_then_payment_session" | "none";
218
+ };
219
+ invoice: {
220
+ subtotalCents: number;
221
+ currency: string;
222
+ id: string;
223
+ createdAt: string;
224
+ updatedAt: string;
225
+ taxRegimeId: string | null;
226
+ taxCents: number;
227
+ totalCents: number;
228
+ status: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
229
+ bookingId: string;
230
+ notes: string | null;
231
+ templateId: string | null;
232
+ dueDate: string;
233
+ invoiceNumber: string;
234
+ invoiceType: "invoice" | "proforma" | "credit_note";
235
+ convertedFromInvoiceId: string | null;
236
+ seriesId: string | null;
237
+ sequence: number | null;
238
+ language: string | null;
239
+ personId: string | null;
240
+ organizationId: string | null;
241
+ baseCurrency: string | null;
242
+ fxRateSetId: string | null;
243
+ baseSubtotalCents: number | null;
244
+ baseTaxCents: number | null;
245
+ baseTotalCents: number | null;
246
+ paidCents: number;
247
+ basePaidCents: number | null;
248
+ balanceDueCents: number;
249
+ baseBalanceDueCents: number | null;
250
+ commissionPercent: number | null;
251
+ commissionAmountCents: number | null;
252
+ issueDate: string;
253
+ voidedAt: string | null;
254
+ voidReason: string | null;
255
+ } | null;
256
+ paymentSession: {
257
+ currency: string;
258
+ id: string;
259
+ createdAt: string;
260
+ updatedAt: string;
261
+ metadata: {
262
+ [x: string]: import("hono/utils/types").JSONValue;
263
+ } | null;
264
+ idempotencyKey: string | null;
265
+ status: "processing" | "failed" | "pending" | "cancelled" | "paid" | "expired" | "authorized" | "requires_redirect";
266
+ targetType: "other" | "booking_payment_schedule" | "invoice" | "booking" | "booking_guarantee" | "flight_order" | "order";
267
+ targetId: string | null;
268
+ bookingId: string | null;
269
+ provider: string | null;
270
+ invoiceId: string | null;
271
+ amountCents: number;
272
+ notes: string | null;
273
+ bookingPaymentScheduleId: string | null;
274
+ bookingGuaranteeId: string | null;
275
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | null;
276
+ payerPersonId: string | null;
277
+ payerOrganizationId: string | null;
278
+ payerEmail: string | null;
279
+ payerName: string | null;
280
+ externalReference: string | null;
281
+ clientReference: string | null;
282
+ returnUrl: string | null;
283
+ cancelUrl: string | null;
284
+ callbackUrl: string | null;
285
+ expiresAt: string | null;
286
+ providerPayload: {
287
+ [x: string]: import("hono/utils/types").JSONValue;
288
+ } | null;
289
+ orderId: string | null;
290
+ paymentInstrumentId: string | null;
291
+ paymentAuthorizationId: string | null;
292
+ paymentCaptureId: string | null;
293
+ paymentId: string | null;
294
+ providerSessionId: string | null;
295
+ providerPaymentId: string | null;
296
+ redirectUrl: string | null;
297
+ completedAt: string | null;
298
+ failedAt: string | null;
299
+ cancelledAt: string | null;
300
+ expiredAt: string | null;
301
+ failureCode: string | null;
302
+ failureMessage: string | null;
303
+ } | null;
304
+ invoiceNotification: {
305
+ id: string;
306
+ templateSlug: string | null;
307
+ channel: "email" | "sms";
308
+ provider: string;
309
+ status: "pending" | "sent" | "failed" | "cancelled";
310
+ toAddress: string;
311
+ subject: string | null;
312
+ sentAt: string | null;
313
+ failedAt: string | null;
314
+ errorMessage: string | null;
315
+ } | null;
316
+ paymentSessionNotification: {
317
+ id: string;
318
+ templateSlug: string | null;
319
+ channel: "email" | "sms";
320
+ provider: string;
321
+ status: "pending" | "sent" | "failed" | "cancelled";
322
+ toAddress: string;
323
+ subject: string | null;
324
+ sentAt: string | null;
325
+ failedAt: string | null;
326
+ errorMessage: string | null;
327
+ } | null;
328
+ bankTransferInstructions: {
329
+ provider: string | null;
330
+ invoiceId: string;
331
+ invoiceNumber: string;
332
+ documentType: "invoice" | "proforma";
333
+ amountCents: number;
334
+ currency: string;
335
+ dueDate: string | null;
336
+ beneficiary: string;
337
+ iban: string;
338
+ bankName: string | null;
339
+ notes: string | null;
340
+ } | null;
341
+ providerStart: {
342
+ provider: string;
343
+ paymentSessionId: string;
344
+ redirectUrl: string | null;
345
+ externalReference: string | null;
346
+ providerSessionId: string | null;
347
+ providerPaymentId: string | null;
348
+ response: {
349
+ [x: string]: import("hono/utils/types").JSONValue;
350
+ } | null;
351
+ } | null;
352
+ };
353
+ };
354
+ outputFormat: "json";
355
+ status: 201;
356
+ } | {
357
+ input: {
358
+ param: {
359
+ bookingId: string;
360
+ };
361
+ };
362
+ output: {
363
+ error: string;
364
+ };
365
+ outputFormat: "json";
366
+ status: 409;
367
+ };
368
+ };
369
+ } & {
370
+ "/collections/bootstrap": {
371
+ $post: {
372
+ input: {};
373
+ output: {
374
+ error: string;
375
+ };
376
+ outputFormat: "json";
377
+ status: 404;
378
+ } | {
379
+ input: {};
380
+ output: {
381
+ data: {
382
+ bookingId: string;
383
+ sessionId: string;
384
+ sourceType: "booking" | "session";
385
+ intent: "deposit" | "balance" | "custom";
386
+ plan: {
387
+ bookingId: string;
388
+ method: "card" | "bank_transfer";
389
+ stage: "initial" | "reminder" | "manual";
390
+ paymentSessionTarget: "schedule" | "invoice" | null;
391
+ documentType: "proforma" | "invoice" | null;
392
+ willCreateDefaultPaymentPlan: boolean;
393
+ selectedSchedule: {
394
+ currency: string;
395
+ id: string;
396
+ createdAt: string;
397
+ updatedAt: string;
398
+ status: "pending" | "cancelled" | "due" | "paid" | "waived" | "expired";
399
+ bookingId: string;
400
+ amountCents: number;
401
+ notes: string | null;
402
+ bookingItemId: string | null;
403
+ scheduleType: "other" | "deposit" | "balance" | "installment" | "hold";
404
+ dueDate: string;
405
+ } | null;
406
+ selectedInvoice: {
407
+ subtotalCents: number;
408
+ currency: string;
409
+ id: string;
410
+ createdAt: string;
411
+ updatedAt: string;
412
+ taxRegimeId: string | null;
413
+ taxCents: number;
414
+ totalCents: number;
415
+ status: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
416
+ bookingId: string;
417
+ notes: string | null;
418
+ templateId: string | null;
419
+ dueDate: string;
420
+ invoiceNumber: string;
421
+ invoiceType: "invoice" | "proforma" | "credit_note";
422
+ convertedFromInvoiceId: string | null;
423
+ seriesId: string | null;
424
+ sequence: number | null;
425
+ language: string | null;
426
+ personId: string | null;
427
+ organizationId: string | null;
428
+ baseCurrency: string | null;
429
+ fxRateSetId: string | null;
430
+ baseSubtotalCents: number | null;
431
+ baseTaxCents: number | null;
432
+ baseTotalCents: number | null;
433
+ paidCents: number;
434
+ basePaidCents: number | null;
435
+ balanceDueCents: number;
436
+ baseBalanceDueCents: number | null;
437
+ commissionPercent: number | null;
438
+ commissionAmountCents: number | null;
439
+ issueDate: string;
440
+ voidedAt: string | null;
441
+ voidReason: string | null;
442
+ } | null;
443
+ amountCents: number;
444
+ currency: string;
445
+ recommendedAction: "create_bank_transfer_document" | "create_payment_session" | "create_invoice_then_payment_session" | "none";
446
+ };
447
+ invoice: {
448
+ subtotalCents: number;
449
+ currency: string;
450
+ id: string;
451
+ createdAt: string;
452
+ updatedAt: string;
453
+ taxRegimeId: string | null;
454
+ taxCents: number;
455
+ totalCents: number;
456
+ status: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
457
+ bookingId: string;
458
+ notes: string | null;
459
+ templateId: string | null;
460
+ dueDate: string;
461
+ invoiceNumber: string;
462
+ invoiceType: "invoice" | "proforma" | "credit_note";
463
+ convertedFromInvoiceId: string | null;
464
+ seriesId: string | null;
465
+ sequence: number | null;
466
+ language: string | null;
467
+ personId: string | null;
468
+ organizationId: string | null;
469
+ baseCurrency: string | null;
470
+ fxRateSetId: string | null;
471
+ baseSubtotalCents: number | null;
472
+ baseTaxCents: number | null;
473
+ baseTotalCents: number | null;
474
+ paidCents: number;
475
+ basePaidCents: number | null;
476
+ balanceDueCents: number;
477
+ baseBalanceDueCents: number | null;
478
+ commissionPercent: number | null;
479
+ commissionAmountCents: number | null;
480
+ issueDate: string;
481
+ voidedAt: string | null;
482
+ voidReason: string | null;
483
+ } | null;
484
+ paymentSession: {
485
+ currency: string;
486
+ id: string;
487
+ createdAt: string;
488
+ updatedAt: string;
489
+ metadata: {
490
+ [x: string]: import("hono/utils/types").JSONValue;
491
+ } | null;
492
+ idempotencyKey: string | null;
493
+ status: "processing" | "failed" | "pending" | "cancelled" | "paid" | "expired" | "authorized" | "requires_redirect";
494
+ targetType: "other" | "booking_payment_schedule" | "invoice" | "booking" | "booking_guarantee" | "flight_order" | "order";
495
+ targetId: string | null;
496
+ bookingId: string | null;
497
+ provider: string | null;
498
+ invoiceId: string | null;
499
+ amountCents: number;
500
+ notes: string | null;
501
+ bookingPaymentScheduleId: string | null;
502
+ bookingGuaranteeId: string | null;
503
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | null;
504
+ payerPersonId: string | null;
505
+ payerOrganizationId: string | null;
506
+ payerEmail: string | null;
507
+ payerName: string | null;
508
+ externalReference: string | null;
509
+ clientReference: string | null;
510
+ returnUrl: string | null;
511
+ cancelUrl: string | null;
512
+ callbackUrl: string | null;
513
+ expiresAt: string | null;
514
+ providerPayload: {
515
+ [x: string]: import("hono/utils/types").JSONValue;
516
+ } | null;
517
+ orderId: string | null;
518
+ paymentInstrumentId: string | null;
519
+ paymentAuthorizationId: string | null;
520
+ paymentCaptureId: string | null;
521
+ paymentId: string | null;
522
+ providerSessionId: string | null;
523
+ providerPaymentId: string | null;
524
+ redirectUrl: string | null;
525
+ completedAt: string | null;
526
+ failedAt: string | null;
527
+ cancelledAt: string | null;
528
+ expiredAt: string | null;
529
+ failureCode: string | null;
530
+ failureMessage: string | null;
531
+ } | null;
532
+ invoiceNotification: {
533
+ id: string;
534
+ templateSlug: string | null;
535
+ channel: "email" | "sms";
536
+ provider: string;
537
+ status: "pending" | "sent" | "failed" | "cancelled";
538
+ toAddress: string;
539
+ subject: string | null;
540
+ sentAt: string | null;
541
+ failedAt: string | null;
542
+ errorMessage: string | null;
543
+ } | null;
544
+ paymentSessionNotification: {
545
+ id: string;
546
+ templateSlug: string | null;
547
+ channel: "email" | "sms";
548
+ provider: string;
549
+ status: "pending" | "sent" | "failed" | "cancelled";
550
+ toAddress: string;
551
+ subject: string | null;
552
+ sentAt: string | null;
553
+ failedAt: string | null;
554
+ errorMessage: string | null;
555
+ } | null;
556
+ bankTransferInstructions: {
557
+ provider: string | null;
558
+ invoiceId: string;
559
+ invoiceNumber: string;
560
+ documentType: "invoice" | "proforma";
561
+ amountCents: number;
562
+ currency: string;
563
+ dueDate: string | null;
564
+ beneficiary: string;
565
+ iban: string;
566
+ bankName: string | null;
567
+ notes: string | null;
568
+ } | null;
569
+ providerStart: {
570
+ provider: string;
571
+ paymentSessionId: string;
572
+ redirectUrl: string | null;
573
+ externalReference: string | null;
574
+ providerSessionId: string | null;
575
+ providerPaymentId: string | null;
576
+ response: {
577
+ [x: string]: import("hono/utils/types").JSONValue;
578
+ } | null;
579
+ } | null;
580
+ };
581
+ };
582
+ outputFormat: "json";
583
+ status: 201;
584
+ } | {
585
+ input: {};
586
+ output: {
587
+ error: string;
588
+ };
589
+ outputFormat: "json";
590
+ status: 409;
591
+ };
592
+ };
593
+ }, "/", "/collections/bootstrap">;
594
+ export declare function createCheckoutAdminRoutes(options?: CheckoutRoutesOptions): import("hono/hono-base").HonoBase<Env, {
595
+ "/bookings/:bookingId/collection-plan": {
596
+ $post: {
597
+ input: {
598
+ param: {
599
+ bookingId: string;
600
+ };
601
+ };
602
+ output: {
603
+ error: string;
604
+ };
605
+ outputFormat: "json";
606
+ status: 404;
607
+ } | {
608
+ input: {
609
+ param: {
610
+ bookingId: string;
611
+ };
612
+ };
613
+ output: {
614
+ data: {
615
+ bookingId: string;
616
+ method: "card" | "bank_transfer";
617
+ stage: "initial" | "reminder" | "manual";
618
+ paymentSessionTarget: "schedule" | "invoice" | null;
619
+ documentType: "proforma" | "invoice" | null;
620
+ willCreateDefaultPaymentPlan: boolean;
621
+ selectedSchedule: {
622
+ currency: string;
623
+ id: string;
624
+ createdAt: string;
625
+ updatedAt: string;
626
+ status: "pending" | "cancelled" | "due" | "paid" | "waived" | "expired";
627
+ bookingId: string;
628
+ amountCents: number;
629
+ notes: string | null;
630
+ bookingItemId: string | null;
631
+ scheduleType: "other" | "deposit" | "balance" | "installment" | "hold";
632
+ dueDate: string;
633
+ } | null;
634
+ selectedInvoice: {
635
+ subtotalCents: number;
636
+ currency: string;
637
+ id: string;
638
+ createdAt: string;
639
+ updatedAt: string;
640
+ taxRegimeId: string | null;
641
+ taxCents: number;
642
+ totalCents: number;
643
+ status: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
644
+ bookingId: string;
645
+ notes: string | null;
646
+ templateId: string | null;
647
+ dueDate: string;
648
+ invoiceNumber: string;
649
+ invoiceType: "invoice" | "proforma" | "credit_note";
650
+ convertedFromInvoiceId: string | null;
651
+ seriesId: string | null;
652
+ sequence: number | null;
653
+ language: string | null;
654
+ personId: string | null;
655
+ organizationId: string | null;
656
+ baseCurrency: string | null;
657
+ fxRateSetId: string | null;
658
+ baseSubtotalCents: number | null;
659
+ baseTaxCents: number | null;
660
+ baseTotalCents: number | null;
661
+ paidCents: number;
662
+ basePaidCents: number | null;
663
+ balanceDueCents: number;
664
+ baseBalanceDueCents: number | null;
665
+ commissionPercent: number | null;
666
+ commissionAmountCents: number | null;
667
+ issueDate: string;
668
+ voidedAt: string | null;
669
+ voidReason: string | null;
670
+ } | null;
671
+ amountCents: number;
672
+ currency: string;
673
+ recommendedAction: "create_bank_transfer_document" | "create_payment_session" | "create_invoice_then_payment_session" | "none";
674
+ };
675
+ };
676
+ outputFormat: "json";
677
+ status: import("hono/utils/http-status").ContentfulStatusCode;
678
+ } | {
679
+ input: {
680
+ param: {
681
+ bookingId: string;
682
+ };
683
+ };
684
+ output: {
685
+ error: string;
686
+ };
687
+ outputFormat: "json";
688
+ status: 400;
689
+ };
690
+ };
691
+ } & {
692
+ "/bookings/:bookingId/initiate-collection": {
693
+ $post: {
694
+ input: {
695
+ param: {
696
+ bookingId: string;
697
+ };
698
+ };
699
+ output: {
700
+ error: string;
701
+ };
702
+ outputFormat: "json";
703
+ status: 404;
704
+ } | {
705
+ input: {
706
+ param: {
707
+ bookingId: string;
708
+ };
709
+ };
710
+ output: {
711
+ data: {
712
+ plan: {
713
+ bookingId: string;
714
+ method: "card" | "bank_transfer";
715
+ stage: "initial" | "reminder" | "manual";
716
+ paymentSessionTarget: "schedule" | "invoice" | null;
717
+ documentType: "proforma" | "invoice" | null;
718
+ willCreateDefaultPaymentPlan: boolean;
719
+ selectedSchedule: {
720
+ currency: string;
721
+ id: string;
722
+ createdAt: string;
723
+ updatedAt: string;
724
+ status: "pending" | "cancelled" | "due" | "paid" | "waived" | "expired";
725
+ bookingId: string;
726
+ amountCents: number;
727
+ notes: string | null;
728
+ bookingItemId: string | null;
729
+ scheduleType: "other" | "deposit" | "balance" | "installment" | "hold";
730
+ dueDate: string;
731
+ } | null;
732
+ selectedInvoice: {
733
+ subtotalCents: number;
734
+ currency: string;
735
+ id: string;
736
+ createdAt: string;
737
+ updatedAt: string;
738
+ taxRegimeId: string | null;
739
+ taxCents: number;
740
+ totalCents: number;
741
+ status: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
742
+ bookingId: string;
743
+ notes: string | null;
744
+ templateId: string | null;
745
+ dueDate: string;
746
+ invoiceNumber: string;
747
+ invoiceType: "invoice" | "proforma" | "credit_note";
748
+ convertedFromInvoiceId: string | null;
749
+ seriesId: string | null;
750
+ sequence: number | null;
751
+ language: string | null;
752
+ personId: string | null;
753
+ organizationId: string | null;
754
+ baseCurrency: string | null;
755
+ fxRateSetId: string | null;
756
+ baseSubtotalCents: number | null;
757
+ baseTaxCents: number | null;
758
+ baseTotalCents: number | null;
759
+ paidCents: number;
760
+ basePaidCents: number | null;
761
+ balanceDueCents: number;
762
+ baseBalanceDueCents: number | null;
763
+ commissionPercent: number | null;
764
+ commissionAmountCents: number | null;
765
+ issueDate: string;
766
+ voidedAt: string | null;
767
+ voidReason: string | null;
768
+ } | null;
769
+ amountCents: number;
770
+ currency: string;
771
+ recommendedAction: "create_bank_transfer_document" | "create_payment_session" | "create_invoice_then_payment_session" | "none";
772
+ };
773
+ invoice: {
774
+ subtotalCents: number;
775
+ currency: string;
776
+ id: string;
777
+ createdAt: string;
778
+ updatedAt: string;
779
+ taxRegimeId: string | null;
780
+ taxCents: number;
781
+ totalCents: number;
782
+ status: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
783
+ bookingId: string;
784
+ notes: string | null;
785
+ templateId: string | null;
786
+ dueDate: string;
787
+ invoiceNumber: string;
788
+ invoiceType: "invoice" | "proforma" | "credit_note";
789
+ convertedFromInvoiceId: string | null;
790
+ seriesId: string | null;
791
+ sequence: number | null;
792
+ language: string | null;
793
+ personId: string | null;
794
+ organizationId: string | null;
795
+ baseCurrency: string | null;
796
+ fxRateSetId: string | null;
797
+ baseSubtotalCents: number | null;
798
+ baseTaxCents: number | null;
799
+ baseTotalCents: number | null;
800
+ paidCents: number;
801
+ basePaidCents: number | null;
802
+ balanceDueCents: number;
803
+ baseBalanceDueCents: number | null;
804
+ commissionPercent: number | null;
805
+ commissionAmountCents: number | null;
806
+ issueDate: string;
807
+ voidedAt: string | null;
808
+ voidReason: string | null;
809
+ } | null;
810
+ paymentSession: {
811
+ currency: string;
812
+ id: string;
813
+ createdAt: string;
814
+ updatedAt: string;
815
+ metadata: {
816
+ [x: string]: import("hono/utils/types").JSONValue;
817
+ } | null;
818
+ idempotencyKey: string | null;
819
+ status: "processing" | "failed" | "pending" | "cancelled" | "paid" | "expired" | "authorized" | "requires_redirect";
820
+ targetType: "other" | "booking_payment_schedule" | "invoice" | "booking" | "booking_guarantee" | "flight_order" | "order";
821
+ targetId: string | null;
822
+ bookingId: string | null;
823
+ provider: string | null;
824
+ invoiceId: string | null;
825
+ amountCents: number;
826
+ notes: string | null;
827
+ bookingPaymentScheduleId: string | null;
828
+ bookingGuaranteeId: string | null;
829
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | null;
830
+ payerPersonId: string | null;
831
+ payerOrganizationId: string | null;
832
+ payerEmail: string | null;
833
+ payerName: string | null;
834
+ externalReference: string | null;
835
+ clientReference: string | null;
836
+ returnUrl: string | null;
837
+ cancelUrl: string | null;
838
+ callbackUrl: string | null;
839
+ expiresAt: string | null;
840
+ providerPayload: {
841
+ [x: string]: import("hono/utils/types").JSONValue;
842
+ } | null;
843
+ orderId: string | null;
844
+ paymentInstrumentId: string | null;
845
+ paymentAuthorizationId: string | null;
846
+ paymentCaptureId: string | null;
847
+ paymentId: string | null;
848
+ providerSessionId: string | null;
849
+ providerPaymentId: string | null;
850
+ redirectUrl: string | null;
851
+ completedAt: string | null;
852
+ failedAt: string | null;
853
+ cancelledAt: string | null;
854
+ expiredAt: string | null;
855
+ failureCode: string | null;
856
+ failureMessage: string | null;
857
+ } | null;
858
+ invoiceNotification: {
859
+ id: string;
860
+ templateSlug: string | null;
861
+ channel: "email" | "sms";
862
+ provider: string;
863
+ status: "pending" | "sent" | "failed" | "cancelled";
864
+ toAddress: string;
865
+ subject: string | null;
866
+ sentAt: string | null;
867
+ failedAt: string | null;
868
+ errorMessage: string | null;
869
+ } | null;
870
+ paymentSessionNotification: {
871
+ id: string;
872
+ templateSlug: string | null;
873
+ channel: "email" | "sms";
874
+ provider: string;
875
+ status: "pending" | "sent" | "failed" | "cancelled";
876
+ toAddress: string;
877
+ subject: string | null;
878
+ sentAt: string | null;
879
+ failedAt: string | null;
880
+ errorMessage: string | null;
881
+ } | null;
882
+ bankTransferInstructions: {
883
+ provider: string | null;
884
+ invoiceId: string;
885
+ invoiceNumber: string;
886
+ documentType: "invoice" | "proforma";
887
+ amountCents: number;
888
+ currency: string;
889
+ dueDate: string | null;
890
+ beneficiary: string;
891
+ iban: string;
892
+ bankName: string | null;
893
+ notes: string | null;
894
+ } | null;
895
+ providerStart: {
896
+ provider: string;
897
+ paymentSessionId: string;
898
+ redirectUrl: string | null;
899
+ externalReference: string | null;
900
+ providerSessionId: string | null;
901
+ providerPaymentId: string | null;
902
+ response: {
903
+ [x: string]: import("hono/utils/types").JSONValue;
904
+ } | null;
905
+ } | null;
906
+ };
907
+ };
908
+ outputFormat: "json";
909
+ status: 201;
910
+ } | {
911
+ input: {
912
+ param: {
913
+ bookingId: string;
914
+ };
915
+ };
916
+ output: {
917
+ error: string;
918
+ };
919
+ outputFormat: "json";
920
+ status: 409;
921
+ };
922
+ };
923
+ } & {
924
+ "/collections/bootstrap": {
925
+ $post: {
926
+ input: {};
927
+ output: {
928
+ error: string;
929
+ };
930
+ outputFormat: "json";
931
+ status: 404;
932
+ } | {
933
+ input: {};
934
+ output: {
935
+ data: {
936
+ bookingId: string;
937
+ sessionId: string;
938
+ sourceType: "booking" | "session";
939
+ intent: "deposit" | "balance" | "custom";
940
+ plan: {
941
+ bookingId: string;
942
+ method: "card" | "bank_transfer";
943
+ stage: "initial" | "reminder" | "manual";
944
+ paymentSessionTarget: "schedule" | "invoice" | null;
945
+ documentType: "proforma" | "invoice" | null;
946
+ willCreateDefaultPaymentPlan: boolean;
947
+ selectedSchedule: {
948
+ currency: string;
949
+ id: string;
950
+ createdAt: string;
951
+ updatedAt: string;
952
+ status: "pending" | "cancelled" | "due" | "paid" | "waived" | "expired";
953
+ bookingId: string;
954
+ amountCents: number;
955
+ notes: string | null;
956
+ bookingItemId: string | null;
957
+ scheduleType: "other" | "deposit" | "balance" | "installment" | "hold";
958
+ dueDate: string;
959
+ } | null;
960
+ selectedInvoice: {
961
+ subtotalCents: number;
962
+ currency: string;
963
+ id: string;
964
+ createdAt: string;
965
+ updatedAt: string;
966
+ taxRegimeId: string | null;
967
+ taxCents: number;
968
+ totalCents: number;
969
+ status: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
970
+ bookingId: string;
971
+ notes: string | null;
972
+ templateId: string | null;
973
+ dueDate: string;
974
+ invoiceNumber: string;
975
+ invoiceType: "invoice" | "proforma" | "credit_note";
976
+ convertedFromInvoiceId: string | null;
977
+ seriesId: string | null;
978
+ sequence: number | null;
979
+ language: string | null;
980
+ personId: string | null;
981
+ organizationId: string | null;
982
+ baseCurrency: string | null;
983
+ fxRateSetId: string | null;
984
+ baseSubtotalCents: number | null;
985
+ baseTaxCents: number | null;
986
+ baseTotalCents: number | null;
987
+ paidCents: number;
988
+ basePaidCents: number | null;
989
+ balanceDueCents: number;
990
+ baseBalanceDueCents: number | null;
991
+ commissionPercent: number | null;
992
+ commissionAmountCents: number | null;
993
+ issueDate: string;
994
+ voidedAt: string | null;
995
+ voidReason: string | null;
996
+ } | null;
997
+ amountCents: number;
998
+ currency: string;
999
+ recommendedAction: "create_bank_transfer_document" | "create_payment_session" | "create_invoice_then_payment_session" | "none";
1000
+ };
1001
+ invoice: {
1002
+ subtotalCents: number;
1003
+ currency: string;
1004
+ id: string;
1005
+ createdAt: string;
1006
+ updatedAt: string;
1007
+ taxRegimeId: string | null;
1008
+ taxCents: number;
1009
+ totalCents: number;
1010
+ status: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
1011
+ bookingId: string;
1012
+ notes: string | null;
1013
+ templateId: string | null;
1014
+ dueDate: string;
1015
+ invoiceNumber: string;
1016
+ invoiceType: "invoice" | "proforma" | "credit_note";
1017
+ convertedFromInvoiceId: string | null;
1018
+ seriesId: string | null;
1019
+ sequence: number | null;
1020
+ language: string | null;
1021
+ personId: string | null;
1022
+ organizationId: string | null;
1023
+ baseCurrency: string | null;
1024
+ fxRateSetId: string | null;
1025
+ baseSubtotalCents: number | null;
1026
+ baseTaxCents: number | null;
1027
+ baseTotalCents: number | null;
1028
+ paidCents: number;
1029
+ basePaidCents: number | null;
1030
+ balanceDueCents: number;
1031
+ baseBalanceDueCents: number | null;
1032
+ commissionPercent: number | null;
1033
+ commissionAmountCents: number | null;
1034
+ issueDate: string;
1035
+ voidedAt: string | null;
1036
+ voidReason: string | null;
1037
+ } | null;
1038
+ paymentSession: {
1039
+ currency: string;
1040
+ id: string;
1041
+ createdAt: string;
1042
+ updatedAt: string;
1043
+ metadata: {
1044
+ [x: string]: import("hono/utils/types").JSONValue;
1045
+ } | null;
1046
+ idempotencyKey: string | null;
1047
+ status: "processing" | "failed" | "pending" | "cancelled" | "paid" | "expired" | "authorized" | "requires_redirect";
1048
+ targetType: "other" | "booking_payment_schedule" | "invoice" | "booking" | "booking_guarantee" | "flight_order" | "order";
1049
+ targetId: string | null;
1050
+ bookingId: string | null;
1051
+ provider: string | null;
1052
+ invoiceId: string | null;
1053
+ amountCents: number;
1054
+ notes: string | null;
1055
+ bookingPaymentScheduleId: string | null;
1056
+ bookingGuaranteeId: string | null;
1057
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | null;
1058
+ payerPersonId: string | null;
1059
+ payerOrganizationId: string | null;
1060
+ payerEmail: string | null;
1061
+ payerName: string | null;
1062
+ externalReference: string | null;
1063
+ clientReference: string | null;
1064
+ returnUrl: string | null;
1065
+ cancelUrl: string | null;
1066
+ callbackUrl: string | null;
1067
+ expiresAt: string | null;
1068
+ providerPayload: {
1069
+ [x: string]: import("hono/utils/types").JSONValue;
1070
+ } | null;
1071
+ orderId: string | null;
1072
+ paymentInstrumentId: string | null;
1073
+ paymentAuthorizationId: string | null;
1074
+ paymentCaptureId: string | null;
1075
+ paymentId: string | null;
1076
+ providerSessionId: string | null;
1077
+ providerPaymentId: string | null;
1078
+ redirectUrl: string | null;
1079
+ completedAt: string | null;
1080
+ failedAt: string | null;
1081
+ cancelledAt: string | null;
1082
+ expiredAt: string | null;
1083
+ failureCode: string | null;
1084
+ failureMessage: string | null;
1085
+ } | null;
1086
+ invoiceNotification: {
1087
+ id: string;
1088
+ templateSlug: string | null;
1089
+ channel: "email" | "sms";
1090
+ provider: string;
1091
+ status: "pending" | "sent" | "failed" | "cancelled";
1092
+ toAddress: string;
1093
+ subject: string | null;
1094
+ sentAt: string | null;
1095
+ failedAt: string | null;
1096
+ errorMessage: string | null;
1097
+ } | null;
1098
+ paymentSessionNotification: {
1099
+ id: string;
1100
+ templateSlug: string | null;
1101
+ channel: "email" | "sms";
1102
+ provider: string;
1103
+ status: "pending" | "sent" | "failed" | "cancelled";
1104
+ toAddress: string;
1105
+ subject: string | null;
1106
+ sentAt: string | null;
1107
+ failedAt: string | null;
1108
+ errorMessage: string | null;
1109
+ } | null;
1110
+ bankTransferInstructions: {
1111
+ provider: string | null;
1112
+ invoiceId: string;
1113
+ invoiceNumber: string;
1114
+ documentType: "invoice" | "proforma";
1115
+ amountCents: number;
1116
+ currency: string;
1117
+ dueDate: string | null;
1118
+ beneficiary: string;
1119
+ iban: string;
1120
+ bankName: string | null;
1121
+ notes: string | null;
1122
+ } | null;
1123
+ providerStart: {
1124
+ provider: string;
1125
+ paymentSessionId: string;
1126
+ redirectUrl: string | null;
1127
+ externalReference: string | null;
1128
+ providerSessionId: string | null;
1129
+ providerPaymentId: string | null;
1130
+ response: {
1131
+ [x: string]: import("hono/utils/types").JSONValue;
1132
+ } | null;
1133
+ } | null;
1134
+ };
1135
+ };
1136
+ outputFormat: "json";
1137
+ status: 201;
1138
+ } | {
1139
+ input: {};
1140
+ output: {
1141
+ error: string;
1142
+ };
1143
+ outputFormat: "json";
1144
+ status: 409;
1145
+ };
1146
+ };
1147
+ }, "/", "/collections/bootstrap">;
1148
+ export declare function buildCheckoutRouteRuntime(bindings: Record<string, unknown>, options?: CheckoutRoutesOptions): CheckoutRouteRuntime;
1149
+ export declare const createFinanceCheckoutRoutes: typeof createCheckoutRoutes;
1150
+ export declare const createFinanceCheckoutAdminRoutes: typeof createCheckoutAdminRoutes;
1151
+ export declare const buildFinanceCheckoutRouteRuntime: typeof buildCheckoutRouteRuntime;
1152
+ export declare const FINANCE_CHECKOUT_ROUTE_RUNTIME_CONTAINER_KEY = "providers.finance.checkout.runtime";
1153
+ export {};
1154
+ //# sourceMappingURL=checkout-routes.d.ts.map