@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,1948 @@
1
+ import { type Env } from "./routes-shared.js";
2
+ export interface PublicFinanceRouteOptions {
3
+ resolveDocumentDownloadUrl?: (bindings: unknown, storageKey: string) => Promise<string | null> | string | null;
4
+ }
5
+ export declare function createPublicFinanceRoutes(options?: PublicFinanceRouteOptions): import("hono/hono-base").HonoBase<Env, {
6
+ "/vouchers/validate": {
7
+ $post: {
8
+ input: {};
9
+ output: {
10
+ data: {
11
+ valid: false;
12
+ reason: "inactive";
13
+ voucher: {
14
+ id: string;
15
+ code: string;
16
+ label: string | null;
17
+ provider: string | null;
18
+ currency: string | null;
19
+ amountCents: number | null;
20
+ remainingAmountCents: number | null;
21
+ expiresAt: string | null;
22
+ };
23
+ } | {
24
+ valid: false;
25
+ reason: "not_started";
26
+ voucher: {
27
+ id: string;
28
+ code: string;
29
+ label: string | null;
30
+ provider: string | null;
31
+ currency: string | null;
32
+ amountCents: number | null;
33
+ remainingAmountCents: number | null;
34
+ expiresAt: string | null;
35
+ };
36
+ } | {
37
+ valid: false;
38
+ reason: "expired";
39
+ voucher: {
40
+ id: string;
41
+ code: string;
42
+ label: string | null;
43
+ provider: string | null;
44
+ currency: string | null;
45
+ amountCents: number | null;
46
+ remainingAmountCents: number | null;
47
+ expiresAt: string | null;
48
+ };
49
+ } | {
50
+ valid: false;
51
+ reason: "booking_mismatch";
52
+ voucher: {
53
+ id: string;
54
+ code: string;
55
+ label: string | null;
56
+ provider: string | null;
57
+ currency: string | null;
58
+ amountCents: number | null;
59
+ remainingAmountCents: number | null;
60
+ expiresAt: string | null;
61
+ };
62
+ } | {
63
+ valid: false;
64
+ reason: "currency_mismatch";
65
+ voucher: {
66
+ id: string;
67
+ code: string;
68
+ label: string | null;
69
+ provider: string | null;
70
+ currency: string | null;
71
+ amountCents: number | null;
72
+ remainingAmountCents: number | null;
73
+ expiresAt: string | null;
74
+ };
75
+ } | {
76
+ valid: false;
77
+ reason: "insufficient_balance";
78
+ voucher: {
79
+ id: string;
80
+ code: string;
81
+ label: string | null;
82
+ provider: string | null;
83
+ currency: string | null;
84
+ amountCents: number | null;
85
+ remainingAmountCents: number | null;
86
+ expiresAt: string | null;
87
+ };
88
+ } | {
89
+ valid: true;
90
+ reason: null;
91
+ voucher: {
92
+ id: string;
93
+ code: string;
94
+ label: string | null;
95
+ provider: string | null;
96
+ currency: string | null;
97
+ amountCents: number | null;
98
+ remainingAmountCents: number | null;
99
+ expiresAt: string | null;
100
+ };
101
+ } | {
102
+ valid: false;
103
+ reason: "not_found";
104
+ voucher: null;
105
+ };
106
+ };
107
+ outputFormat: "json";
108
+ status: import("hono/utils/http-status").ContentfulStatusCode;
109
+ };
110
+ };
111
+ } & {
112
+ "/documents/by-reference": {
113
+ $get: {
114
+ input: {};
115
+ output: {
116
+ data: {
117
+ invoiceId: string;
118
+ invoiceNumber: string;
119
+ invoiceType: "invoice" | "proforma" | "credit_note";
120
+ invoiceStatus: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
121
+ currency: string;
122
+ totalCents: number;
123
+ paidCents: number;
124
+ balanceDueCents: number;
125
+ issueDate: string;
126
+ dueDate: string;
127
+ renditionId: string | null;
128
+ documentStatus: "failed" | "pending" | "ready" | "stale" | "missing";
129
+ format: "json" | "html" | "pdf" | "xml" | null;
130
+ language: string | null;
131
+ generatedAt: string | null;
132
+ fileSize: number | null;
133
+ checksum: string | null;
134
+ downloadUrl: string | null;
135
+ bookingId: string;
136
+ };
137
+ };
138
+ outputFormat: "json";
139
+ status: import("hono/utils/http-status").ContentfulStatusCode;
140
+ } | {
141
+ input: {};
142
+ output: {
143
+ error: string;
144
+ };
145
+ outputFormat: "json";
146
+ status: 404;
147
+ };
148
+ };
149
+ } & {
150
+ "/bookings/:bookingId/documents": {
151
+ $get: {
152
+ input: {
153
+ param: {
154
+ bookingId: string;
155
+ };
156
+ };
157
+ output: {
158
+ error: string;
159
+ };
160
+ outputFormat: "json";
161
+ status: 404;
162
+ } | {
163
+ input: {
164
+ param: {
165
+ bookingId: string;
166
+ };
167
+ };
168
+ output: {
169
+ data: {
170
+ bookingId: string;
171
+ documents: {
172
+ invoiceId: string;
173
+ invoiceNumber: string;
174
+ invoiceType: "invoice" | "proforma" | "credit_note";
175
+ invoiceStatus: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
176
+ currency: string;
177
+ totalCents: number;
178
+ paidCents: number;
179
+ balanceDueCents: number;
180
+ issueDate: string;
181
+ dueDate: string;
182
+ renditionId: string | null;
183
+ documentStatus: "failed" | "pending" | "ready" | "stale" | "missing";
184
+ format: "json" | "html" | "pdf" | "xml" | null;
185
+ language: string | null;
186
+ generatedAt: string | null;
187
+ fileSize: number | null;
188
+ checksum: string | null;
189
+ downloadUrl: string | null;
190
+ }[];
191
+ };
192
+ };
193
+ outputFormat: "json";
194
+ status: import("hono/utils/http-status").ContentfulStatusCode;
195
+ };
196
+ };
197
+ } & {
198
+ "/bookings/:bookingId/documents/by-reference": {
199
+ $get: {
200
+ input: {
201
+ param: {
202
+ bookingId: string;
203
+ };
204
+ };
205
+ output: {
206
+ error: string;
207
+ };
208
+ outputFormat: "json";
209
+ status: 404;
210
+ } | {
211
+ input: {
212
+ param: {
213
+ bookingId: string;
214
+ };
215
+ };
216
+ output: {
217
+ data: {
218
+ invoiceId: string;
219
+ invoiceNumber: string;
220
+ invoiceType: "invoice" | "proforma" | "credit_note";
221
+ invoiceStatus: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
222
+ currency: string;
223
+ totalCents: number;
224
+ paidCents: number;
225
+ balanceDueCents: number;
226
+ issueDate: string;
227
+ dueDate: string;
228
+ renditionId: string | null;
229
+ documentStatus: "failed" | "pending" | "ready" | "stale" | "missing";
230
+ format: "json" | "html" | "pdf" | "xml" | null;
231
+ language: string | null;
232
+ generatedAt: string | null;
233
+ fileSize: number | null;
234
+ checksum: string | null;
235
+ downloadUrl: string | null;
236
+ bookingId: string;
237
+ };
238
+ };
239
+ outputFormat: "json";
240
+ status: import("hono/utils/http-status").ContentfulStatusCode;
241
+ };
242
+ };
243
+ } & {
244
+ "/bookings/:bookingId/payments": {
245
+ $get: {
246
+ input: {
247
+ param: {
248
+ bookingId: string;
249
+ };
250
+ };
251
+ output: {
252
+ error: string;
253
+ };
254
+ outputFormat: "json";
255
+ status: 404;
256
+ } | {
257
+ input: {
258
+ param: {
259
+ bookingId: string;
260
+ };
261
+ };
262
+ output: {
263
+ data: {
264
+ bookingId: string;
265
+ payments: {
266
+ id: string;
267
+ invoiceId: string;
268
+ invoiceNumber: string;
269
+ invoiceType: "invoice" | "proforma" | "credit_note";
270
+ status: "failed" | "pending" | "completed" | "refunded";
271
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill";
272
+ amountCents: number;
273
+ currency: string;
274
+ baseCurrency: string | null;
275
+ baseAmountCents: number | null;
276
+ paymentDate: string;
277
+ referenceNumber: string | null;
278
+ notes: string | null;
279
+ }[];
280
+ };
281
+ };
282
+ outputFormat: "json";
283
+ status: import("hono/utils/http-status").ContentfulStatusCode;
284
+ };
285
+ };
286
+ } & {
287
+ "/bookings/:bookingId/payment-options": {
288
+ $get: {
289
+ input: {
290
+ param: {
291
+ bookingId: string;
292
+ };
293
+ };
294
+ output: {
295
+ error: string;
296
+ };
297
+ outputFormat: "json";
298
+ status: 404;
299
+ } | {
300
+ input: {
301
+ param: {
302
+ bookingId: string;
303
+ };
304
+ };
305
+ output: {
306
+ data: {
307
+ bookingId: string;
308
+ accounts: {
309
+ id: string;
310
+ label: string;
311
+ provider: string | null;
312
+ instrumentType: "other" | "credit_card" | "voucher" | "debit_card" | "cash" | "wallet" | "direct_bill" | "bank_account";
313
+ status: "active" | "expired" | "inactive" | "revoked" | "failed_verification";
314
+ brand: string | null;
315
+ last4: string | null;
316
+ expiryMonth: number | null;
317
+ expiryYear: number | null;
318
+ isDefault: boolean;
319
+ }[];
320
+ schedules: {
321
+ id: string;
322
+ scheduleType: "other" | "deposit" | "balance" | "installment" | "hold";
323
+ status: "pending" | "cancelled" | "due" | "paid" | "waived" | "expired";
324
+ dueDate: string;
325
+ currency: string;
326
+ amountCents: number;
327
+ notes: string | null;
328
+ }[];
329
+ guarantees: {
330
+ id: string;
331
+ bookingPaymentScheduleId: string | null;
332
+ guaranteeType: "other" | "bank_transfer" | "deposit" | "credit_card" | "preauth" | "card_on_file" | "voucher" | "agency_letter";
333
+ status: "active" | "failed" | "pending" | "cancelled" | "expired" | "released";
334
+ currency: string | null;
335
+ amountCents: number | null;
336
+ provider: string | null;
337
+ referenceNumber: string | null;
338
+ expiresAt: string | null;
339
+ notes: string | null;
340
+ }[];
341
+ recommendedTarget: {
342
+ targetType: "booking_payment_schedule" | "booking_guarantee";
343
+ targetId: string | null;
344
+ } | null;
345
+ };
346
+ };
347
+ outputFormat: "json";
348
+ status: import("hono/utils/http-status").ContentfulStatusCode;
349
+ };
350
+ };
351
+ } & {
352
+ "/payment-sessions/:sessionId": {
353
+ $get: {
354
+ input: {
355
+ param: {
356
+ sessionId: string;
357
+ };
358
+ };
359
+ output: {
360
+ error: string;
361
+ };
362
+ outputFormat: "json";
363
+ status: 404;
364
+ } | {
365
+ input: {
366
+ param: {
367
+ sessionId: string;
368
+ };
369
+ };
370
+ output: {
371
+ data: {
372
+ id: string;
373
+ target: {
374
+ type: "booking_payment_schedule";
375
+ bookingPaymentScheduleId: string;
376
+ } | {
377
+ type: "booking_guarantee";
378
+ bookingGuaranteeId: string;
379
+ } | {
380
+ type: "invoice";
381
+ invoiceId: string;
382
+ } | {
383
+ type: "flight_order";
384
+ flightOrderId: string;
385
+ } | {
386
+ type: "booking";
387
+ bookingId: string;
388
+ } | {
389
+ type: "legacy_order";
390
+ legacyOrderId: string;
391
+ } | {
392
+ type: "provider_reference";
393
+ provider: string;
394
+ reference: string;
395
+ } | null;
396
+ provenance: null;
397
+ targetType: "other" | "booking_payment_schedule" | "invoice" | "booking" | "booking_guarantee" | "flight_order" | "order";
398
+ targetId: string | null;
399
+ bookingId: string | null;
400
+ legacyOrderId: string | null;
401
+ invoiceId: string | null;
402
+ bookingPaymentScheduleId: string | null;
403
+ bookingGuaranteeId: string | null;
404
+ status: "processing" | "failed" | "pending" | "cancelled" | "paid" | "expired" | "authorized" | "requires_redirect";
405
+ provider: string | null;
406
+ providerSessionId: string | null;
407
+ providerPaymentId: string | null;
408
+ externalReference: string | null;
409
+ clientReference: string | null;
410
+ currency: string;
411
+ amountCents: number;
412
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | null;
413
+ payerEmail: string | null;
414
+ payerName: string | null;
415
+ redirectUrl: string | null;
416
+ returnUrl: string | null;
417
+ cancelUrl: string | null;
418
+ expiresAt: string | null;
419
+ completedAt: string | null;
420
+ failureCode: string | null;
421
+ failureMessage: string | null;
422
+ notes: string | null;
423
+ };
424
+ };
425
+ outputFormat: "json";
426
+ status: import("hono/utils/http-status").ContentfulStatusCode;
427
+ };
428
+ };
429
+ } & {
430
+ "/bookings/:bookingId/payment-schedules/:scheduleId/payment-session": {
431
+ $post: {
432
+ input: {
433
+ param: {
434
+ bookingId: string;
435
+ } & {
436
+ scheduleId: string;
437
+ };
438
+ };
439
+ output: {
440
+ data: {
441
+ id: string;
442
+ target: {
443
+ type: "booking_payment_schedule";
444
+ bookingPaymentScheduleId: string;
445
+ } | {
446
+ type: "booking_guarantee";
447
+ bookingGuaranteeId: string;
448
+ } | {
449
+ type: "invoice";
450
+ invoiceId: string;
451
+ } | {
452
+ type: "flight_order";
453
+ flightOrderId: string;
454
+ } | {
455
+ type: "booking";
456
+ bookingId: string;
457
+ } | {
458
+ type: "legacy_order";
459
+ legacyOrderId: string;
460
+ } | {
461
+ type: "provider_reference";
462
+ provider: string;
463
+ reference: string;
464
+ } | null;
465
+ provenance: null;
466
+ targetType: "other" | "booking_payment_schedule" | "invoice" | "booking" | "booking_guarantee" | "flight_order" | "order";
467
+ targetId: string | null;
468
+ bookingId: string | null;
469
+ legacyOrderId: string | null;
470
+ invoiceId: string | null;
471
+ bookingPaymentScheduleId: string | null;
472
+ bookingGuaranteeId: string | null;
473
+ status: "processing" | "failed" | "pending" | "cancelled" | "paid" | "expired" | "authorized" | "requires_redirect";
474
+ provider: string | null;
475
+ providerSessionId: string | null;
476
+ providerPaymentId: string | null;
477
+ externalReference: string | null;
478
+ clientReference: string | null;
479
+ currency: string;
480
+ amountCents: number;
481
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | null;
482
+ payerEmail: string | null;
483
+ payerName: string | null;
484
+ redirectUrl: string | null;
485
+ returnUrl: string | null;
486
+ cancelUrl: string | null;
487
+ expiresAt: string | null;
488
+ completedAt: string | null;
489
+ failureCode: string | null;
490
+ failureMessage: string | null;
491
+ notes: string | null;
492
+ };
493
+ };
494
+ outputFormat: "json";
495
+ status: 201;
496
+ } | {
497
+ input: {
498
+ param: {
499
+ bookingId: string;
500
+ } & {
501
+ scheduleId: string;
502
+ };
503
+ };
504
+ output: {
505
+ error: string;
506
+ };
507
+ outputFormat: "json";
508
+ status: 404;
509
+ } | {
510
+ input: {
511
+ param: {
512
+ bookingId: string;
513
+ } & {
514
+ scheduleId: string;
515
+ };
516
+ };
517
+ output: {
518
+ error: string;
519
+ };
520
+ outputFormat: "json";
521
+ status: 409;
522
+ };
523
+ };
524
+ } & {
525
+ "/bookings/:bookingId/guarantees/:guaranteeId/payment-session": {
526
+ $post: {
527
+ input: {
528
+ param: {
529
+ bookingId: string;
530
+ } & {
531
+ guaranteeId: string;
532
+ };
533
+ };
534
+ output: {
535
+ error: string;
536
+ };
537
+ outputFormat: "json";
538
+ status: 404;
539
+ } | {
540
+ input: {
541
+ param: {
542
+ bookingId: string;
543
+ } & {
544
+ guaranteeId: string;
545
+ };
546
+ };
547
+ output: {
548
+ data: {
549
+ id: string;
550
+ target: {
551
+ type: "booking_payment_schedule";
552
+ bookingPaymentScheduleId: string;
553
+ } | {
554
+ type: "booking_guarantee";
555
+ bookingGuaranteeId: string;
556
+ } | {
557
+ type: "invoice";
558
+ invoiceId: string;
559
+ } | {
560
+ type: "flight_order";
561
+ flightOrderId: string;
562
+ } | {
563
+ type: "booking";
564
+ bookingId: string;
565
+ } | {
566
+ type: "legacy_order";
567
+ legacyOrderId: string;
568
+ } | {
569
+ type: "provider_reference";
570
+ provider: string;
571
+ reference: string;
572
+ } | null;
573
+ provenance: null;
574
+ targetType: "other" | "booking_payment_schedule" | "invoice" | "booking" | "booking_guarantee" | "flight_order" | "order";
575
+ targetId: string | null;
576
+ bookingId: string | null;
577
+ legacyOrderId: string | null;
578
+ invoiceId: string | null;
579
+ bookingPaymentScheduleId: string | null;
580
+ bookingGuaranteeId: string | null;
581
+ status: "processing" | "failed" | "pending" | "cancelled" | "paid" | "expired" | "authorized" | "requires_redirect";
582
+ provider: string | null;
583
+ providerSessionId: string | null;
584
+ providerPaymentId: string | null;
585
+ externalReference: string | null;
586
+ clientReference: string | null;
587
+ currency: string;
588
+ amountCents: number;
589
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | null;
590
+ payerEmail: string | null;
591
+ payerName: string | null;
592
+ redirectUrl: string | null;
593
+ returnUrl: string | null;
594
+ cancelUrl: string | null;
595
+ expiresAt: string | null;
596
+ completedAt: string | null;
597
+ failureCode: string | null;
598
+ failureMessage: string | null;
599
+ notes: string | null;
600
+ };
601
+ };
602
+ outputFormat: "json";
603
+ status: 201;
604
+ } | {
605
+ input: {
606
+ param: {
607
+ bookingId: string;
608
+ } & {
609
+ guaranteeId: string;
610
+ };
611
+ };
612
+ output: {
613
+ error: string;
614
+ };
615
+ outputFormat: "json";
616
+ status: 409;
617
+ };
618
+ };
619
+ } & {
620
+ "/invoices/:invoiceId/payment-session": {
621
+ $post: {
622
+ input: {
623
+ param: {
624
+ invoiceId: string;
625
+ };
626
+ };
627
+ output: {
628
+ error: string;
629
+ };
630
+ outputFormat: "json";
631
+ status: 404;
632
+ } | {
633
+ input: {
634
+ param: {
635
+ invoiceId: string;
636
+ };
637
+ };
638
+ output: {
639
+ data: {
640
+ id: string;
641
+ target: {
642
+ type: "booking_payment_schedule";
643
+ bookingPaymentScheduleId: string;
644
+ } | {
645
+ type: "booking_guarantee";
646
+ bookingGuaranteeId: string;
647
+ } | {
648
+ type: "invoice";
649
+ invoiceId: string;
650
+ } | {
651
+ type: "flight_order";
652
+ flightOrderId: string;
653
+ } | {
654
+ type: "booking";
655
+ bookingId: string;
656
+ } | {
657
+ type: "legacy_order";
658
+ legacyOrderId: string;
659
+ } | {
660
+ type: "provider_reference";
661
+ provider: string;
662
+ reference: string;
663
+ } | null;
664
+ provenance: null;
665
+ targetType: "other" | "booking_payment_schedule" | "invoice" | "booking" | "booking_guarantee" | "flight_order" | "order";
666
+ targetId: string | null;
667
+ bookingId: string | null;
668
+ legacyOrderId: string | null;
669
+ invoiceId: string | null;
670
+ bookingPaymentScheduleId: string | null;
671
+ bookingGuaranteeId: string | null;
672
+ status: "processing" | "failed" | "pending" | "cancelled" | "paid" | "expired" | "authorized" | "requires_redirect";
673
+ provider: string | null;
674
+ providerSessionId: string | null;
675
+ providerPaymentId: string | null;
676
+ externalReference: string | null;
677
+ clientReference: string | null;
678
+ currency: string;
679
+ amountCents: number;
680
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | null;
681
+ payerEmail: string | null;
682
+ payerName: string | null;
683
+ redirectUrl: string | null;
684
+ returnUrl: string | null;
685
+ cancelUrl: string | null;
686
+ expiresAt: string | null;
687
+ completedAt: string | null;
688
+ failureCode: string | null;
689
+ failureMessage: string | null;
690
+ notes: string | null;
691
+ };
692
+ };
693
+ outputFormat: "json";
694
+ status: 201;
695
+ } | {
696
+ input: {
697
+ param: {
698
+ invoiceId: string;
699
+ };
700
+ };
701
+ output: {
702
+ error: string;
703
+ };
704
+ outputFormat: "json";
705
+ status: 409;
706
+ };
707
+ };
708
+ } & {
709
+ "/accountant/:token/summary": {
710
+ $get: {
711
+ input: {
712
+ param: {
713
+ token: string;
714
+ };
715
+ };
716
+ output: {
717
+ error: string;
718
+ };
719
+ outputFormat: "json";
720
+ status: 404;
721
+ } | {
722
+ input: {
723
+ param: {
724
+ token: string;
725
+ };
726
+ };
727
+ output: {
728
+ error: string;
729
+ };
730
+ outputFormat: "json";
731
+ status: 410;
732
+ } | {
733
+ input: {
734
+ param: {
735
+ token: string;
736
+ };
737
+ };
738
+ output: {
739
+ data: {
740
+ scope: {
741
+ from: string | null;
742
+ to: string | null;
743
+ baseCurrency: string | null;
744
+ };
745
+ departures: {
746
+ rows: {
747
+ departureId: string;
748
+ departureLabel: string | null;
749
+ productId: string | null;
750
+ productName: string | null;
751
+ departureDate: string | null;
752
+ currency: string;
753
+ revenueCents: number;
754
+ actualCostCents: number;
755
+ plannedCostCents: number;
756
+ profitCents: number;
757
+ marginPercent: number | null;
758
+ varianceCents: number;
759
+ }[];
760
+ costByServiceType: {
761
+ serviceType: string;
762
+ currency: string;
763
+ amountCents: number;
764
+ }[];
765
+ unattributed: {
766
+ currency: string;
767
+ amountCents: number;
768
+ }[];
769
+ base?: {
770
+ currency: string;
771
+ rows: {
772
+ departureId: string;
773
+ departureLabel: string | null;
774
+ productId: string | null;
775
+ productName: string | null;
776
+ departureDate: string | null;
777
+ currency: string;
778
+ revenueCents: number;
779
+ actualCostCents: number;
780
+ plannedCostCents: number;
781
+ profitCents: number;
782
+ marginPercent: number | null;
783
+ varianceCents: number;
784
+ }[];
785
+ costByServiceType: {
786
+ serviceType: string;
787
+ currency: string;
788
+ amountCents: number;
789
+ }[];
790
+ unattributedCents: number;
791
+ unconvertibleCurrencies: string[];
792
+ } | undefined;
793
+ };
794
+ products: {
795
+ rows: {
796
+ productId: string;
797
+ productName: string | null;
798
+ currency: string;
799
+ departureCount: number;
800
+ revenueCents: number;
801
+ actualCostCents: number;
802
+ plannedCostCents: number;
803
+ profitCents: number;
804
+ marginPercent: number | null;
805
+ varianceCents: number;
806
+ }[];
807
+ costByServiceType: {
808
+ serviceType: string;
809
+ currency: string;
810
+ amountCents: number;
811
+ }[];
812
+ unattributed: {
813
+ currency: string;
814
+ amountCents: number;
815
+ }[];
816
+ base?: {
817
+ currency: string;
818
+ rows: {
819
+ productId: string;
820
+ productName: string | null;
821
+ currency: string;
822
+ departureCount: number;
823
+ revenueCents: number;
824
+ actualCostCents: number;
825
+ plannedCostCents: number;
826
+ profitCents: number;
827
+ marginPercent: number | null;
828
+ varianceCents: number;
829
+ }[];
830
+ costByServiceType: {
831
+ serviceType: string;
832
+ currency: string;
833
+ amountCents: number;
834
+ }[];
835
+ unattributedCents: number;
836
+ unconvertibleCurrencies: string[];
837
+ } | undefined;
838
+ };
839
+ };
840
+ };
841
+ outputFormat: "json";
842
+ status: import("hono/utils/http-status").ContentfulStatusCode;
843
+ };
844
+ };
845
+ } & {
846
+ "/accountant/:token/invoices": {
847
+ $get: {
848
+ input: {
849
+ param: {
850
+ token: string;
851
+ };
852
+ };
853
+ output: {
854
+ error: string;
855
+ };
856
+ outputFormat: "json";
857
+ status: 404;
858
+ } | {
859
+ input: {
860
+ param: {
861
+ token: string;
862
+ };
863
+ };
864
+ output: {
865
+ error: string;
866
+ };
867
+ outputFormat: "json";
868
+ status: 410;
869
+ } | {
870
+ input: {
871
+ param: {
872
+ token: string;
873
+ };
874
+ };
875
+ output: {
876
+ data: {
877
+ id: string;
878
+ kind: import("./service-accountant-shares.js").AccountantInvoiceKind;
879
+ invoiceNumber: string;
880
+ status: string;
881
+ currency: string;
882
+ totalCents: number;
883
+ paidCents: number;
884
+ balanceDueCents: number;
885
+ issueDate: string;
886
+ dueDate: string | null;
887
+ attachments: {
888
+ id: string;
889
+ name: string;
890
+ mimeType: string | null;
891
+ fileSize: number | null;
892
+ hasFile: boolean;
893
+ }[];
894
+ }[];
895
+ };
896
+ outputFormat: "json";
897
+ status: import("hono/utils/http-status").ContentfulStatusCode;
898
+ };
899
+ };
900
+ } & {
901
+ "/accountant/:token/invoices/:invoiceId/attachments/:attachmentId/download": {
902
+ $get: {
903
+ input: {
904
+ param: {
905
+ attachmentId: string;
906
+ } & {
907
+ invoiceId: string;
908
+ } & {
909
+ token: string;
910
+ };
911
+ };
912
+ output: undefined;
913
+ outputFormat: "redirect";
914
+ status: 302;
915
+ } | {
916
+ input: {
917
+ param: {
918
+ attachmentId: string;
919
+ } & {
920
+ invoiceId: string;
921
+ } & {
922
+ token: string;
923
+ };
924
+ };
925
+ output: {
926
+ error: string;
927
+ };
928
+ outputFormat: "json";
929
+ status: 404;
930
+ } | {
931
+ input: {
932
+ param: {
933
+ attachmentId: string;
934
+ } & {
935
+ invoiceId: string;
936
+ } & {
937
+ token: string;
938
+ };
939
+ };
940
+ output: {
941
+ error: string;
942
+ };
943
+ outputFormat: "json";
944
+ status: 410;
945
+ };
946
+ };
947
+ } & {
948
+ "/accountant/:token/invoices/download-all": {
949
+ $get: {
950
+ input: {
951
+ param: {
952
+ token: string;
953
+ };
954
+ };
955
+ output: {};
956
+ outputFormat: string;
957
+ status: import("hono/utils/http-status").StatusCode;
958
+ };
959
+ };
960
+ } & {
961
+ "/accountant/:token/export/:report": {
962
+ $get: {
963
+ input: {
964
+ param: {
965
+ token: string;
966
+ } & {
967
+ report: string;
968
+ };
969
+ };
970
+ output: {};
971
+ outputFormat: string;
972
+ status: import("hono/utils/http-status").StatusCode;
973
+ };
974
+ };
975
+ }, "/", "/accountant/:token/export/:report">;
976
+ export declare const publicFinanceRoutes: import("hono/hono-base").HonoBase<Env, {
977
+ "/vouchers/validate": {
978
+ $post: {
979
+ input: {};
980
+ output: {
981
+ data: {
982
+ valid: false;
983
+ reason: "inactive";
984
+ voucher: {
985
+ id: string;
986
+ code: string;
987
+ label: string | null;
988
+ provider: string | null;
989
+ currency: string | null;
990
+ amountCents: number | null;
991
+ remainingAmountCents: number | null;
992
+ expiresAt: string | null;
993
+ };
994
+ } | {
995
+ valid: false;
996
+ reason: "not_started";
997
+ voucher: {
998
+ id: string;
999
+ code: string;
1000
+ label: string | null;
1001
+ provider: string | null;
1002
+ currency: string | null;
1003
+ amountCents: number | null;
1004
+ remainingAmountCents: number | null;
1005
+ expiresAt: string | null;
1006
+ };
1007
+ } | {
1008
+ valid: false;
1009
+ reason: "expired";
1010
+ voucher: {
1011
+ id: string;
1012
+ code: string;
1013
+ label: string | null;
1014
+ provider: string | null;
1015
+ currency: string | null;
1016
+ amountCents: number | null;
1017
+ remainingAmountCents: number | null;
1018
+ expiresAt: string | null;
1019
+ };
1020
+ } | {
1021
+ valid: false;
1022
+ reason: "booking_mismatch";
1023
+ voucher: {
1024
+ id: string;
1025
+ code: string;
1026
+ label: string | null;
1027
+ provider: string | null;
1028
+ currency: string | null;
1029
+ amountCents: number | null;
1030
+ remainingAmountCents: number | null;
1031
+ expiresAt: string | null;
1032
+ };
1033
+ } | {
1034
+ valid: false;
1035
+ reason: "currency_mismatch";
1036
+ voucher: {
1037
+ id: string;
1038
+ code: string;
1039
+ label: string | null;
1040
+ provider: string | null;
1041
+ currency: string | null;
1042
+ amountCents: number | null;
1043
+ remainingAmountCents: number | null;
1044
+ expiresAt: string | null;
1045
+ };
1046
+ } | {
1047
+ valid: false;
1048
+ reason: "insufficient_balance";
1049
+ voucher: {
1050
+ id: string;
1051
+ code: string;
1052
+ label: string | null;
1053
+ provider: string | null;
1054
+ currency: string | null;
1055
+ amountCents: number | null;
1056
+ remainingAmountCents: number | null;
1057
+ expiresAt: string | null;
1058
+ };
1059
+ } | {
1060
+ valid: true;
1061
+ reason: null;
1062
+ voucher: {
1063
+ id: string;
1064
+ code: string;
1065
+ label: string | null;
1066
+ provider: string | null;
1067
+ currency: string | null;
1068
+ amountCents: number | null;
1069
+ remainingAmountCents: number | null;
1070
+ expiresAt: string | null;
1071
+ };
1072
+ } | {
1073
+ valid: false;
1074
+ reason: "not_found";
1075
+ voucher: null;
1076
+ };
1077
+ };
1078
+ outputFormat: "json";
1079
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1080
+ };
1081
+ };
1082
+ } & {
1083
+ "/documents/by-reference": {
1084
+ $get: {
1085
+ input: {};
1086
+ output: {
1087
+ data: {
1088
+ invoiceId: string;
1089
+ invoiceNumber: string;
1090
+ invoiceType: "invoice" | "proforma" | "credit_note";
1091
+ invoiceStatus: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
1092
+ currency: string;
1093
+ totalCents: number;
1094
+ paidCents: number;
1095
+ balanceDueCents: number;
1096
+ issueDate: string;
1097
+ dueDate: string;
1098
+ renditionId: string | null;
1099
+ documentStatus: "failed" | "pending" | "ready" | "stale" | "missing";
1100
+ format: "json" | "html" | "pdf" | "xml" | null;
1101
+ language: string | null;
1102
+ generatedAt: string | null;
1103
+ fileSize: number | null;
1104
+ checksum: string | null;
1105
+ downloadUrl: string | null;
1106
+ bookingId: string;
1107
+ };
1108
+ };
1109
+ outputFormat: "json";
1110
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1111
+ } | {
1112
+ input: {};
1113
+ output: {
1114
+ error: string;
1115
+ };
1116
+ outputFormat: "json";
1117
+ status: 404;
1118
+ };
1119
+ };
1120
+ } & {
1121
+ "/bookings/:bookingId/documents": {
1122
+ $get: {
1123
+ input: {
1124
+ param: {
1125
+ bookingId: string;
1126
+ };
1127
+ };
1128
+ output: {
1129
+ error: string;
1130
+ };
1131
+ outputFormat: "json";
1132
+ status: 404;
1133
+ } | {
1134
+ input: {
1135
+ param: {
1136
+ bookingId: string;
1137
+ };
1138
+ };
1139
+ output: {
1140
+ data: {
1141
+ bookingId: string;
1142
+ documents: {
1143
+ invoiceId: string;
1144
+ invoiceNumber: string;
1145
+ invoiceType: "invoice" | "proforma" | "credit_note";
1146
+ invoiceStatus: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
1147
+ currency: string;
1148
+ totalCents: number;
1149
+ paidCents: number;
1150
+ balanceDueCents: number;
1151
+ issueDate: string;
1152
+ dueDate: string;
1153
+ renditionId: string | null;
1154
+ documentStatus: "failed" | "pending" | "ready" | "stale" | "missing";
1155
+ format: "json" | "html" | "pdf" | "xml" | null;
1156
+ language: string | null;
1157
+ generatedAt: string | null;
1158
+ fileSize: number | null;
1159
+ checksum: string | null;
1160
+ downloadUrl: string | null;
1161
+ }[];
1162
+ };
1163
+ };
1164
+ outputFormat: "json";
1165
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1166
+ };
1167
+ };
1168
+ } & {
1169
+ "/bookings/:bookingId/documents/by-reference": {
1170
+ $get: {
1171
+ input: {
1172
+ param: {
1173
+ bookingId: string;
1174
+ };
1175
+ };
1176
+ output: {
1177
+ error: string;
1178
+ };
1179
+ outputFormat: "json";
1180
+ status: 404;
1181
+ } | {
1182
+ input: {
1183
+ param: {
1184
+ bookingId: string;
1185
+ };
1186
+ };
1187
+ output: {
1188
+ data: {
1189
+ invoiceId: string;
1190
+ invoiceNumber: string;
1191
+ invoiceType: "invoice" | "proforma" | "credit_note";
1192
+ invoiceStatus: "void" | "paid" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "overdue";
1193
+ currency: string;
1194
+ totalCents: number;
1195
+ paidCents: number;
1196
+ balanceDueCents: number;
1197
+ issueDate: string;
1198
+ dueDate: string;
1199
+ renditionId: string | null;
1200
+ documentStatus: "failed" | "pending" | "ready" | "stale" | "missing";
1201
+ format: "json" | "html" | "pdf" | "xml" | null;
1202
+ language: string | null;
1203
+ generatedAt: string | null;
1204
+ fileSize: number | null;
1205
+ checksum: string | null;
1206
+ downloadUrl: string | null;
1207
+ bookingId: string;
1208
+ };
1209
+ };
1210
+ outputFormat: "json";
1211
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1212
+ };
1213
+ };
1214
+ } & {
1215
+ "/bookings/:bookingId/payments": {
1216
+ $get: {
1217
+ input: {
1218
+ param: {
1219
+ bookingId: string;
1220
+ };
1221
+ };
1222
+ output: {
1223
+ error: string;
1224
+ };
1225
+ outputFormat: "json";
1226
+ status: 404;
1227
+ } | {
1228
+ input: {
1229
+ param: {
1230
+ bookingId: string;
1231
+ };
1232
+ };
1233
+ output: {
1234
+ data: {
1235
+ bookingId: string;
1236
+ payments: {
1237
+ id: string;
1238
+ invoiceId: string;
1239
+ invoiceNumber: string;
1240
+ invoiceType: "invoice" | "proforma" | "credit_note";
1241
+ status: "failed" | "pending" | "completed" | "refunded";
1242
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill";
1243
+ amountCents: number;
1244
+ currency: string;
1245
+ baseCurrency: string | null;
1246
+ baseAmountCents: number | null;
1247
+ paymentDate: string;
1248
+ referenceNumber: string | null;
1249
+ notes: string | null;
1250
+ }[];
1251
+ };
1252
+ };
1253
+ outputFormat: "json";
1254
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1255
+ };
1256
+ };
1257
+ } & {
1258
+ "/bookings/:bookingId/payment-options": {
1259
+ $get: {
1260
+ input: {
1261
+ param: {
1262
+ bookingId: string;
1263
+ };
1264
+ };
1265
+ output: {
1266
+ error: string;
1267
+ };
1268
+ outputFormat: "json";
1269
+ status: 404;
1270
+ } | {
1271
+ input: {
1272
+ param: {
1273
+ bookingId: string;
1274
+ };
1275
+ };
1276
+ output: {
1277
+ data: {
1278
+ bookingId: string;
1279
+ accounts: {
1280
+ id: string;
1281
+ label: string;
1282
+ provider: string | null;
1283
+ instrumentType: "other" | "credit_card" | "voucher" | "debit_card" | "cash" | "wallet" | "direct_bill" | "bank_account";
1284
+ status: "active" | "expired" | "inactive" | "revoked" | "failed_verification";
1285
+ brand: string | null;
1286
+ last4: string | null;
1287
+ expiryMonth: number | null;
1288
+ expiryYear: number | null;
1289
+ isDefault: boolean;
1290
+ }[];
1291
+ schedules: {
1292
+ id: string;
1293
+ scheduleType: "other" | "deposit" | "balance" | "installment" | "hold";
1294
+ status: "pending" | "cancelled" | "due" | "paid" | "waived" | "expired";
1295
+ dueDate: string;
1296
+ currency: string;
1297
+ amountCents: number;
1298
+ notes: string | null;
1299
+ }[];
1300
+ guarantees: {
1301
+ id: string;
1302
+ bookingPaymentScheduleId: string | null;
1303
+ guaranteeType: "other" | "bank_transfer" | "deposit" | "credit_card" | "preauth" | "card_on_file" | "voucher" | "agency_letter";
1304
+ status: "active" | "failed" | "pending" | "cancelled" | "expired" | "released";
1305
+ currency: string | null;
1306
+ amountCents: number | null;
1307
+ provider: string | null;
1308
+ referenceNumber: string | null;
1309
+ expiresAt: string | null;
1310
+ notes: string | null;
1311
+ }[];
1312
+ recommendedTarget: {
1313
+ targetType: "booking_payment_schedule" | "booking_guarantee";
1314
+ targetId: string | null;
1315
+ } | null;
1316
+ };
1317
+ };
1318
+ outputFormat: "json";
1319
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1320
+ };
1321
+ };
1322
+ } & {
1323
+ "/payment-sessions/:sessionId": {
1324
+ $get: {
1325
+ input: {
1326
+ param: {
1327
+ sessionId: string;
1328
+ };
1329
+ };
1330
+ output: {
1331
+ error: string;
1332
+ };
1333
+ outputFormat: "json";
1334
+ status: 404;
1335
+ } | {
1336
+ input: {
1337
+ param: {
1338
+ sessionId: string;
1339
+ };
1340
+ };
1341
+ output: {
1342
+ data: {
1343
+ id: string;
1344
+ target: {
1345
+ type: "booking_payment_schedule";
1346
+ bookingPaymentScheduleId: string;
1347
+ } | {
1348
+ type: "booking_guarantee";
1349
+ bookingGuaranteeId: string;
1350
+ } | {
1351
+ type: "invoice";
1352
+ invoiceId: string;
1353
+ } | {
1354
+ type: "flight_order";
1355
+ flightOrderId: string;
1356
+ } | {
1357
+ type: "booking";
1358
+ bookingId: string;
1359
+ } | {
1360
+ type: "legacy_order";
1361
+ legacyOrderId: string;
1362
+ } | {
1363
+ type: "provider_reference";
1364
+ provider: string;
1365
+ reference: string;
1366
+ } | null;
1367
+ provenance: null;
1368
+ targetType: "other" | "booking_payment_schedule" | "invoice" | "booking" | "booking_guarantee" | "flight_order" | "order";
1369
+ targetId: string | null;
1370
+ bookingId: string | null;
1371
+ legacyOrderId: string | null;
1372
+ invoiceId: string | null;
1373
+ bookingPaymentScheduleId: string | null;
1374
+ bookingGuaranteeId: string | null;
1375
+ status: "processing" | "failed" | "pending" | "cancelled" | "paid" | "expired" | "authorized" | "requires_redirect";
1376
+ provider: string | null;
1377
+ providerSessionId: string | null;
1378
+ providerPaymentId: string | null;
1379
+ externalReference: string | null;
1380
+ clientReference: string | null;
1381
+ currency: string;
1382
+ amountCents: number;
1383
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | null;
1384
+ payerEmail: string | null;
1385
+ payerName: string | null;
1386
+ redirectUrl: string | null;
1387
+ returnUrl: string | null;
1388
+ cancelUrl: string | null;
1389
+ expiresAt: string | null;
1390
+ completedAt: string | null;
1391
+ failureCode: string | null;
1392
+ failureMessage: string | null;
1393
+ notes: string | null;
1394
+ };
1395
+ };
1396
+ outputFormat: "json";
1397
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1398
+ };
1399
+ };
1400
+ } & {
1401
+ "/bookings/:bookingId/payment-schedules/:scheduleId/payment-session": {
1402
+ $post: {
1403
+ input: {
1404
+ param: {
1405
+ bookingId: string;
1406
+ } & {
1407
+ scheduleId: string;
1408
+ };
1409
+ };
1410
+ output: {
1411
+ data: {
1412
+ id: string;
1413
+ target: {
1414
+ type: "booking_payment_schedule";
1415
+ bookingPaymentScheduleId: string;
1416
+ } | {
1417
+ type: "booking_guarantee";
1418
+ bookingGuaranteeId: string;
1419
+ } | {
1420
+ type: "invoice";
1421
+ invoiceId: string;
1422
+ } | {
1423
+ type: "flight_order";
1424
+ flightOrderId: string;
1425
+ } | {
1426
+ type: "booking";
1427
+ bookingId: string;
1428
+ } | {
1429
+ type: "legacy_order";
1430
+ legacyOrderId: string;
1431
+ } | {
1432
+ type: "provider_reference";
1433
+ provider: string;
1434
+ reference: string;
1435
+ } | null;
1436
+ provenance: null;
1437
+ targetType: "other" | "booking_payment_schedule" | "invoice" | "booking" | "booking_guarantee" | "flight_order" | "order";
1438
+ targetId: string | null;
1439
+ bookingId: string | null;
1440
+ legacyOrderId: string | null;
1441
+ invoiceId: string | null;
1442
+ bookingPaymentScheduleId: string | null;
1443
+ bookingGuaranteeId: string | null;
1444
+ status: "processing" | "failed" | "pending" | "cancelled" | "paid" | "expired" | "authorized" | "requires_redirect";
1445
+ provider: string | null;
1446
+ providerSessionId: string | null;
1447
+ providerPaymentId: string | null;
1448
+ externalReference: string | null;
1449
+ clientReference: string | null;
1450
+ currency: string;
1451
+ amountCents: number;
1452
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | null;
1453
+ payerEmail: string | null;
1454
+ payerName: string | null;
1455
+ redirectUrl: string | null;
1456
+ returnUrl: string | null;
1457
+ cancelUrl: string | null;
1458
+ expiresAt: string | null;
1459
+ completedAt: string | null;
1460
+ failureCode: string | null;
1461
+ failureMessage: string | null;
1462
+ notes: string | null;
1463
+ };
1464
+ };
1465
+ outputFormat: "json";
1466
+ status: 201;
1467
+ } | {
1468
+ input: {
1469
+ param: {
1470
+ bookingId: string;
1471
+ } & {
1472
+ scheduleId: string;
1473
+ };
1474
+ };
1475
+ output: {
1476
+ error: string;
1477
+ };
1478
+ outputFormat: "json";
1479
+ status: 404;
1480
+ } | {
1481
+ input: {
1482
+ param: {
1483
+ bookingId: string;
1484
+ } & {
1485
+ scheduleId: string;
1486
+ };
1487
+ };
1488
+ output: {
1489
+ error: string;
1490
+ };
1491
+ outputFormat: "json";
1492
+ status: 409;
1493
+ };
1494
+ };
1495
+ } & {
1496
+ "/bookings/:bookingId/guarantees/:guaranteeId/payment-session": {
1497
+ $post: {
1498
+ input: {
1499
+ param: {
1500
+ bookingId: string;
1501
+ } & {
1502
+ guaranteeId: string;
1503
+ };
1504
+ };
1505
+ output: {
1506
+ error: string;
1507
+ };
1508
+ outputFormat: "json";
1509
+ status: 404;
1510
+ } | {
1511
+ input: {
1512
+ param: {
1513
+ bookingId: string;
1514
+ } & {
1515
+ guaranteeId: string;
1516
+ };
1517
+ };
1518
+ output: {
1519
+ data: {
1520
+ id: string;
1521
+ target: {
1522
+ type: "booking_payment_schedule";
1523
+ bookingPaymentScheduleId: string;
1524
+ } | {
1525
+ type: "booking_guarantee";
1526
+ bookingGuaranteeId: string;
1527
+ } | {
1528
+ type: "invoice";
1529
+ invoiceId: string;
1530
+ } | {
1531
+ type: "flight_order";
1532
+ flightOrderId: string;
1533
+ } | {
1534
+ type: "booking";
1535
+ bookingId: string;
1536
+ } | {
1537
+ type: "legacy_order";
1538
+ legacyOrderId: string;
1539
+ } | {
1540
+ type: "provider_reference";
1541
+ provider: string;
1542
+ reference: string;
1543
+ } | null;
1544
+ provenance: null;
1545
+ targetType: "other" | "booking_payment_schedule" | "invoice" | "booking" | "booking_guarantee" | "flight_order" | "order";
1546
+ targetId: string | null;
1547
+ bookingId: string | null;
1548
+ legacyOrderId: string | null;
1549
+ invoiceId: string | null;
1550
+ bookingPaymentScheduleId: string | null;
1551
+ bookingGuaranteeId: string | null;
1552
+ status: "processing" | "failed" | "pending" | "cancelled" | "paid" | "expired" | "authorized" | "requires_redirect";
1553
+ provider: string | null;
1554
+ providerSessionId: string | null;
1555
+ providerPaymentId: string | null;
1556
+ externalReference: string | null;
1557
+ clientReference: string | null;
1558
+ currency: string;
1559
+ amountCents: number;
1560
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | null;
1561
+ payerEmail: string | null;
1562
+ payerName: string | null;
1563
+ redirectUrl: string | null;
1564
+ returnUrl: string | null;
1565
+ cancelUrl: string | null;
1566
+ expiresAt: string | null;
1567
+ completedAt: string | null;
1568
+ failureCode: string | null;
1569
+ failureMessage: string | null;
1570
+ notes: string | null;
1571
+ };
1572
+ };
1573
+ outputFormat: "json";
1574
+ status: 201;
1575
+ } | {
1576
+ input: {
1577
+ param: {
1578
+ bookingId: string;
1579
+ } & {
1580
+ guaranteeId: string;
1581
+ };
1582
+ };
1583
+ output: {
1584
+ error: string;
1585
+ };
1586
+ outputFormat: "json";
1587
+ status: 409;
1588
+ };
1589
+ };
1590
+ } & {
1591
+ "/invoices/:invoiceId/payment-session": {
1592
+ $post: {
1593
+ input: {
1594
+ param: {
1595
+ invoiceId: string;
1596
+ };
1597
+ };
1598
+ output: {
1599
+ error: string;
1600
+ };
1601
+ outputFormat: "json";
1602
+ status: 404;
1603
+ } | {
1604
+ input: {
1605
+ param: {
1606
+ invoiceId: string;
1607
+ };
1608
+ };
1609
+ output: {
1610
+ data: {
1611
+ id: string;
1612
+ target: {
1613
+ type: "booking_payment_schedule";
1614
+ bookingPaymentScheduleId: string;
1615
+ } | {
1616
+ type: "booking_guarantee";
1617
+ bookingGuaranteeId: string;
1618
+ } | {
1619
+ type: "invoice";
1620
+ invoiceId: string;
1621
+ } | {
1622
+ type: "flight_order";
1623
+ flightOrderId: string;
1624
+ } | {
1625
+ type: "booking";
1626
+ bookingId: string;
1627
+ } | {
1628
+ type: "legacy_order";
1629
+ legacyOrderId: string;
1630
+ } | {
1631
+ type: "provider_reference";
1632
+ provider: string;
1633
+ reference: string;
1634
+ } | null;
1635
+ provenance: null;
1636
+ targetType: "other" | "booking_payment_schedule" | "invoice" | "booking" | "booking_guarantee" | "flight_order" | "order";
1637
+ targetId: string | null;
1638
+ bookingId: string | null;
1639
+ legacyOrderId: string | null;
1640
+ invoiceId: string | null;
1641
+ bookingPaymentScheduleId: string | null;
1642
+ bookingGuaranteeId: string | null;
1643
+ status: "processing" | "failed" | "pending" | "cancelled" | "paid" | "expired" | "authorized" | "requires_redirect";
1644
+ provider: string | null;
1645
+ providerSessionId: string | null;
1646
+ providerPaymentId: string | null;
1647
+ externalReference: string | null;
1648
+ clientReference: string | null;
1649
+ currency: string;
1650
+ amountCents: number;
1651
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | null;
1652
+ payerEmail: string | null;
1653
+ payerName: string | null;
1654
+ redirectUrl: string | null;
1655
+ returnUrl: string | null;
1656
+ cancelUrl: string | null;
1657
+ expiresAt: string | null;
1658
+ completedAt: string | null;
1659
+ failureCode: string | null;
1660
+ failureMessage: string | null;
1661
+ notes: string | null;
1662
+ };
1663
+ };
1664
+ outputFormat: "json";
1665
+ status: 201;
1666
+ } | {
1667
+ input: {
1668
+ param: {
1669
+ invoiceId: string;
1670
+ };
1671
+ };
1672
+ output: {
1673
+ error: string;
1674
+ };
1675
+ outputFormat: "json";
1676
+ status: 409;
1677
+ };
1678
+ };
1679
+ } & {
1680
+ "/accountant/:token/summary": {
1681
+ $get: {
1682
+ input: {
1683
+ param: {
1684
+ token: string;
1685
+ };
1686
+ };
1687
+ output: {
1688
+ error: string;
1689
+ };
1690
+ outputFormat: "json";
1691
+ status: 404;
1692
+ } | {
1693
+ input: {
1694
+ param: {
1695
+ token: string;
1696
+ };
1697
+ };
1698
+ output: {
1699
+ error: string;
1700
+ };
1701
+ outputFormat: "json";
1702
+ status: 410;
1703
+ } | {
1704
+ input: {
1705
+ param: {
1706
+ token: string;
1707
+ };
1708
+ };
1709
+ output: {
1710
+ data: {
1711
+ scope: {
1712
+ from: string | null;
1713
+ to: string | null;
1714
+ baseCurrency: string | null;
1715
+ };
1716
+ departures: {
1717
+ rows: {
1718
+ departureId: string;
1719
+ departureLabel: string | null;
1720
+ productId: string | null;
1721
+ productName: string | null;
1722
+ departureDate: string | null;
1723
+ currency: string;
1724
+ revenueCents: number;
1725
+ actualCostCents: number;
1726
+ plannedCostCents: number;
1727
+ profitCents: number;
1728
+ marginPercent: number | null;
1729
+ varianceCents: number;
1730
+ }[];
1731
+ costByServiceType: {
1732
+ serviceType: string;
1733
+ currency: string;
1734
+ amountCents: number;
1735
+ }[];
1736
+ unattributed: {
1737
+ currency: string;
1738
+ amountCents: number;
1739
+ }[];
1740
+ base?: {
1741
+ currency: string;
1742
+ rows: {
1743
+ departureId: string;
1744
+ departureLabel: string | null;
1745
+ productId: string | null;
1746
+ productName: string | null;
1747
+ departureDate: string | null;
1748
+ currency: string;
1749
+ revenueCents: number;
1750
+ actualCostCents: number;
1751
+ plannedCostCents: number;
1752
+ profitCents: number;
1753
+ marginPercent: number | null;
1754
+ varianceCents: number;
1755
+ }[];
1756
+ costByServiceType: {
1757
+ serviceType: string;
1758
+ currency: string;
1759
+ amountCents: number;
1760
+ }[];
1761
+ unattributedCents: number;
1762
+ unconvertibleCurrencies: string[];
1763
+ } | undefined;
1764
+ };
1765
+ products: {
1766
+ rows: {
1767
+ productId: string;
1768
+ productName: string | null;
1769
+ currency: string;
1770
+ departureCount: number;
1771
+ revenueCents: number;
1772
+ actualCostCents: number;
1773
+ plannedCostCents: number;
1774
+ profitCents: number;
1775
+ marginPercent: number | null;
1776
+ varianceCents: number;
1777
+ }[];
1778
+ costByServiceType: {
1779
+ serviceType: string;
1780
+ currency: string;
1781
+ amountCents: number;
1782
+ }[];
1783
+ unattributed: {
1784
+ currency: string;
1785
+ amountCents: number;
1786
+ }[];
1787
+ base?: {
1788
+ currency: string;
1789
+ rows: {
1790
+ productId: string;
1791
+ productName: string | null;
1792
+ currency: string;
1793
+ departureCount: number;
1794
+ revenueCents: number;
1795
+ actualCostCents: number;
1796
+ plannedCostCents: number;
1797
+ profitCents: number;
1798
+ marginPercent: number | null;
1799
+ varianceCents: number;
1800
+ }[];
1801
+ costByServiceType: {
1802
+ serviceType: string;
1803
+ currency: string;
1804
+ amountCents: number;
1805
+ }[];
1806
+ unattributedCents: number;
1807
+ unconvertibleCurrencies: string[];
1808
+ } | undefined;
1809
+ };
1810
+ };
1811
+ };
1812
+ outputFormat: "json";
1813
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1814
+ };
1815
+ };
1816
+ } & {
1817
+ "/accountant/:token/invoices": {
1818
+ $get: {
1819
+ input: {
1820
+ param: {
1821
+ token: string;
1822
+ };
1823
+ };
1824
+ output: {
1825
+ error: string;
1826
+ };
1827
+ outputFormat: "json";
1828
+ status: 404;
1829
+ } | {
1830
+ input: {
1831
+ param: {
1832
+ token: string;
1833
+ };
1834
+ };
1835
+ output: {
1836
+ error: string;
1837
+ };
1838
+ outputFormat: "json";
1839
+ status: 410;
1840
+ } | {
1841
+ input: {
1842
+ param: {
1843
+ token: string;
1844
+ };
1845
+ };
1846
+ output: {
1847
+ data: {
1848
+ id: string;
1849
+ kind: import("./service-accountant-shares.js").AccountantInvoiceKind;
1850
+ invoiceNumber: string;
1851
+ status: string;
1852
+ currency: string;
1853
+ totalCents: number;
1854
+ paidCents: number;
1855
+ balanceDueCents: number;
1856
+ issueDate: string;
1857
+ dueDate: string | null;
1858
+ attachments: {
1859
+ id: string;
1860
+ name: string;
1861
+ mimeType: string | null;
1862
+ fileSize: number | null;
1863
+ hasFile: boolean;
1864
+ }[];
1865
+ }[];
1866
+ };
1867
+ outputFormat: "json";
1868
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1869
+ };
1870
+ };
1871
+ } & {
1872
+ "/accountant/:token/invoices/:invoiceId/attachments/:attachmentId/download": {
1873
+ $get: {
1874
+ input: {
1875
+ param: {
1876
+ attachmentId: string;
1877
+ } & {
1878
+ invoiceId: string;
1879
+ } & {
1880
+ token: string;
1881
+ };
1882
+ };
1883
+ output: undefined;
1884
+ outputFormat: "redirect";
1885
+ status: 302;
1886
+ } | {
1887
+ input: {
1888
+ param: {
1889
+ attachmentId: string;
1890
+ } & {
1891
+ invoiceId: string;
1892
+ } & {
1893
+ token: string;
1894
+ };
1895
+ };
1896
+ output: {
1897
+ error: string;
1898
+ };
1899
+ outputFormat: "json";
1900
+ status: 404;
1901
+ } | {
1902
+ input: {
1903
+ param: {
1904
+ attachmentId: string;
1905
+ } & {
1906
+ invoiceId: string;
1907
+ } & {
1908
+ token: string;
1909
+ };
1910
+ };
1911
+ output: {
1912
+ error: string;
1913
+ };
1914
+ outputFormat: "json";
1915
+ status: 410;
1916
+ };
1917
+ };
1918
+ } & {
1919
+ "/accountant/:token/invoices/download-all": {
1920
+ $get: {
1921
+ input: {
1922
+ param: {
1923
+ token: string;
1924
+ };
1925
+ };
1926
+ output: {};
1927
+ outputFormat: string;
1928
+ status: import("hono/utils/http-status").StatusCode;
1929
+ };
1930
+ };
1931
+ } & {
1932
+ "/accountant/:token/export/:report": {
1933
+ $get: {
1934
+ input: {
1935
+ param: {
1936
+ token: string;
1937
+ } & {
1938
+ report: string;
1939
+ };
1940
+ };
1941
+ output: {};
1942
+ outputFormat: string;
1943
+ status: import("hono/utils/http-status").StatusCode;
1944
+ };
1945
+ };
1946
+ }, "/", "/accountant/:token/export/:report">;
1947
+ export type PublicFinanceRoutes = typeof publicFinanceRoutes;
1948
+ //# sourceMappingURL=routes-public.d.ts.map