@voyantjs/finance 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3603 @@
1
+ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
2
+ type Env = {
3
+ Variables: {
4
+ db: PostgresJsDatabase;
5
+ userId?: string;
6
+ };
7
+ };
8
+ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
9
+ "/payment-sessions": {
10
+ $get: {
11
+ input: {};
12
+ output: {
13
+ data: {
14
+ id: string;
15
+ targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
16
+ targetId: string | null;
17
+ bookingId: string | null;
18
+ orderId: string | null;
19
+ invoiceId: string | null;
20
+ bookingPaymentScheduleId: string | null;
21
+ bookingGuaranteeId: string | null;
22
+ paymentInstrumentId: string | null;
23
+ paymentAuthorizationId: string | null;
24
+ paymentCaptureId: string | null;
25
+ paymentId: string | null;
26
+ status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired";
27
+ provider: string | null;
28
+ providerSessionId: string | null;
29
+ providerPaymentId: string | null;
30
+ externalReference: string | null;
31
+ idempotencyKey: string | null;
32
+ clientReference: string | null;
33
+ currency: string;
34
+ amountCents: number;
35
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other" | null;
36
+ payerPersonId: string | null;
37
+ payerOrganizationId: string | null;
38
+ payerEmail: string | null;
39
+ payerName: string | null;
40
+ redirectUrl: string | null;
41
+ returnUrl: string | null;
42
+ cancelUrl: string | null;
43
+ callbackUrl: string | null;
44
+ expiresAt: string | null;
45
+ completedAt: string | null;
46
+ failedAt: string | null;
47
+ cancelledAt: string | null;
48
+ expiredAt: string | null;
49
+ failureCode: string | null;
50
+ failureMessage: string | null;
51
+ notes: string | null;
52
+ providerPayload: {
53
+ [x: string]: import("hono/utils/types").JSONValue;
54
+ } | null;
55
+ metadata: {
56
+ [x: string]: import("hono/utils/types").JSONValue;
57
+ } | null;
58
+ createdAt: string;
59
+ updatedAt: string;
60
+ }[];
61
+ total: number;
62
+ limit: number;
63
+ offset: number;
64
+ };
65
+ outputFormat: "json";
66
+ status: import("hono/utils/http-status").ContentfulStatusCode;
67
+ };
68
+ };
69
+ } & {
70
+ "/payment-sessions": {
71
+ $post: {
72
+ input: {};
73
+ output: {
74
+ data: {
75
+ id: string;
76
+ status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired";
77
+ provider: string | null;
78
+ notes: string | null;
79
+ metadata: {
80
+ [x: string]: import("hono/utils/types").JSONValue;
81
+ } | null;
82
+ createdAt: string;
83
+ updatedAt: string;
84
+ targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
85
+ targetId: string | null;
86
+ bookingId: string | null;
87
+ orderId: string | null;
88
+ currency: string;
89
+ invoiceId: string | null;
90
+ amountCents: number;
91
+ bookingPaymentScheduleId: string | null;
92
+ paymentInstrumentId: string | null;
93
+ bookingGuaranteeId: string | null;
94
+ expiresAt: string | null;
95
+ paymentAuthorizationId: string | null;
96
+ paymentCaptureId: string | null;
97
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other" | null;
98
+ paymentId: string | null;
99
+ providerSessionId: string | null;
100
+ providerPaymentId: string | null;
101
+ externalReference: string | null;
102
+ idempotencyKey: string | null;
103
+ clientReference: string | null;
104
+ payerPersonId: string | null;
105
+ payerOrganizationId: string | null;
106
+ payerEmail: string | null;
107
+ payerName: string | null;
108
+ redirectUrl: string | null;
109
+ returnUrl: string | null;
110
+ cancelUrl: string | null;
111
+ callbackUrl: string | null;
112
+ completedAt: string | null;
113
+ failedAt: string | null;
114
+ cancelledAt: string | null;
115
+ expiredAt: string | null;
116
+ failureCode: string | null;
117
+ failureMessage: string | null;
118
+ providerPayload: {
119
+ [x: string]: import("hono/utils/types").JSONValue;
120
+ } | null;
121
+ } | null;
122
+ };
123
+ outputFormat: "json";
124
+ status: 201;
125
+ };
126
+ };
127
+ } & {
128
+ "/payment-sessions/:id": {
129
+ $get: {
130
+ input: {
131
+ param: {
132
+ id: string;
133
+ };
134
+ };
135
+ output: {
136
+ error: string;
137
+ };
138
+ outputFormat: "json";
139
+ status: 404;
140
+ } | {
141
+ input: {
142
+ param: {
143
+ id: string;
144
+ };
145
+ };
146
+ output: {
147
+ data: {
148
+ id: string;
149
+ targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
150
+ targetId: string | null;
151
+ bookingId: string | null;
152
+ orderId: string | null;
153
+ invoiceId: string | null;
154
+ bookingPaymentScheduleId: string | null;
155
+ bookingGuaranteeId: string | null;
156
+ paymentInstrumentId: string | null;
157
+ paymentAuthorizationId: string | null;
158
+ paymentCaptureId: string | null;
159
+ paymentId: string | null;
160
+ status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired";
161
+ provider: string | null;
162
+ providerSessionId: string | null;
163
+ providerPaymentId: string | null;
164
+ externalReference: string | null;
165
+ idempotencyKey: string | null;
166
+ clientReference: string | null;
167
+ currency: string;
168
+ amountCents: number;
169
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other" | null;
170
+ payerPersonId: string | null;
171
+ payerOrganizationId: string | null;
172
+ payerEmail: string | null;
173
+ payerName: string | null;
174
+ redirectUrl: string | null;
175
+ returnUrl: string | null;
176
+ cancelUrl: string | null;
177
+ callbackUrl: string | null;
178
+ expiresAt: string | null;
179
+ completedAt: string | null;
180
+ failedAt: string | null;
181
+ cancelledAt: string | null;
182
+ expiredAt: string | null;
183
+ failureCode: string | null;
184
+ failureMessage: string | null;
185
+ notes: string | null;
186
+ providerPayload: {
187
+ [x: string]: import("hono/utils/types").JSONValue;
188
+ } | null;
189
+ metadata: {
190
+ [x: string]: import("hono/utils/types").JSONValue;
191
+ } | null;
192
+ createdAt: string;
193
+ updatedAt: string;
194
+ };
195
+ };
196
+ outputFormat: "json";
197
+ status: import("hono/utils/http-status").ContentfulStatusCode;
198
+ };
199
+ };
200
+ } & {
201
+ "/payment-sessions/:id": {
202
+ $patch: {
203
+ input: {
204
+ param: {
205
+ id: string;
206
+ };
207
+ };
208
+ output: {
209
+ error: string;
210
+ };
211
+ outputFormat: "json";
212
+ status: 404;
213
+ } | {
214
+ input: {
215
+ param: {
216
+ id: string;
217
+ };
218
+ };
219
+ output: {
220
+ data: {
221
+ id: string;
222
+ targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
223
+ targetId: string | null;
224
+ bookingId: string | null;
225
+ orderId: string | null;
226
+ invoiceId: string | null;
227
+ bookingPaymentScheduleId: string | null;
228
+ bookingGuaranteeId: string | null;
229
+ paymentInstrumentId: string | null;
230
+ paymentAuthorizationId: string | null;
231
+ paymentCaptureId: string | null;
232
+ paymentId: string | null;
233
+ status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired";
234
+ provider: string | null;
235
+ providerSessionId: string | null;
236
+ providerPaymentId: string | null;
237
+ externalReference: string | null;
238
+ idempotencyKey: string | null;
239
+ clientReference: string | null;
240
+ currency: string;
241
+ amountCents: number;
242
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other" | null;
243
+ payerPersonId: string | null;
244
+ payerOrganizationId: string | null;
245
+ payerEmail: string | null;
246
+ payerName: string | null;
247
+ redirectUrl: string | null;
248
+ returnUrl: string | null;
249
+ cancelUrl: string | null;
250
+ callbackUrl: string | null;
251
+ expiresAt: string | null;
252
+ completedAt: string | null;
253
+ failedAt: string | null;
254
+ cancelledAt: string | null;
255
+ expiredAt: string | null;
256
+ failureCode: string | null;
257
+ failureMessage: string | null;
258
+ notes: string | null;
259
+ providerPayload: {
260
+ [x: string]: import("hono/utils/types").JSONValue;
261
+ } | null;
262
+ metadata: {
263
+ [x: string]: import("hono/utils/types").JSONValue;
264
+ } | null;
265
+ createdAt: string;
266
+ updatedAt: string;
267
+ };
268
+ };
269
+ outputFormat: "json";
270
+ status: import("hono/utils/http-status").ContentfulStatusCode;
271
+ };
272
+ };
273
+ } & {
274
+ "/payment-sessions/:id/requires-redirect": {
275
+ $post: {
276
+ input: {
277
+ param: {
278
+ id: string;
279
+ };
280
+ };
281
+ output: {
282
+ error: string;
283
+ };
284
+ outputFormat: "json";
285
+ status: 404;
286
+ } | {
287
+ input: {
288
+ param: {
289
+ id: string;
290
+ };
291
+ };
292
+ output: {
293
+ data: {
294
+ id: string;
295
+ targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
296
+ targetId: string | null;
297
+ bookingId: string | null;
298
+ orderId: string | null;
299
+ invoiceId: string | null;
300
+ bookingPaymentScheduleId: string | null;
301
+ bookingGuaranteeId: string | null;
302
+ paymentInstrumentId: string | null;
303
+ paymentAuthorizationId: string | null;
304
+ paymentCaptureId: string | null;
305
+ paymentId: string | null;
306
+ status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired";
307
+ provider: string | null;
308
+ providerSessionId: string | null;
309
+ providerPaymentId: string | null;
310
+ externalReference: string | null;
311
+ idempotencyKey: string | null;
312
+ clientReference: string | null;
313
+ currency: string;
314
+ amountCents: number;
315
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other" | null;
316
+ payerPersonId: string | null;
317
+ payerOrganizationId: string | null;
318
+ payerEmail: string | null;
319
+ payerName: string | null;
320
+ redirectUrl: string | null;
321
+ returnUrl: string | null;
322
+ cancelUrl: string | null;
323
+ callbackUrl: string | null;
324
+ expiresAt: string | null;
325
+ completedAt: string | null;
326
+ failedAt: string | null;
327
+ cancelledAt: string | null;
328
+ expiredAt: string | null;
329
+ failureCode: string | null;
330
+ failureMessage: string | null;
331
+ notes: string | null;
332
+ providerPayload: {
333
+ [x: string]: import("hono/utils/types").JSONValue;
334
+ } | null;
335
+ metadata: {
336
+ [x: string]: import("hono/utils/types").JSONValue;
337
+ } | null;
338
+ createdAt: string;
339
+ updatedAt: string;
340
+ };
341
+ };
342
+ outputFormat: "json";
343
+ status: import("hono/utils/http-status").ContentfulStatusCode;
344
+ };
345
+ };
346
+ } & {
347
+ "/payment-sessions/:id/complete": {
348
+ $post: {
349
+ input: {
350
+ param: {
351
+ id: string;
352
+ };
353
+ };
354
+ output: {
355
+ error: string;
356
+ };
357
+ outputFormat: "json";
358
+ status: 404;
359
+ } | {
360
+ input: {
361
+ param: {
362
+ id: string;
363
+ };
364
+ };
365
+ output: {
366
+ data: {
367
+ id: string;
368
+ targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
369
+ targetId: string | null;
370
+ bookingId: string | null;
371
+ orderId: string | null;
372
+ invoiceId: string | null;
373
+ bookingPaymentScheduleId: string | null;
374
+ bookingGuaranteeId: string | null;
375
+ paymentInstrumentId: string | null;
376
+ paymentAuthorizationId: string | null;
377
+ paymentCaptureId: string | null;
378
+ paymentId: string | null;
379
+ status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired";
380
+ provider: string | null;
381
+ providerSessionId: string | null;
382
+ providerPaymentId: string | null;
383
+ externalReference: string | null;
384
+ idempotencyKey: string | null;
385
+ clientReference: string | null;
386
+ currency: string;
387
+ amountCents: number;
388
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other" | null;
389
+ payerPersonId: string | null;
390
+ payerOrganizationId: string | null;
391
+ payerEmail: string | null;
392
+ payerName: string | null;
393
+ redirectUrl: string | null;
394
+ returnUrl: string | null;
395
+ cancelUrl: string | null;
396
+ callbackUrl: string | null;
397
+ expiresAt: string | null;
398
+ completedAt: string | null;
399
+ failedAt: string | null;
400
+ cancelledAt: string | null;
401
+ expiredAt: string | null;
402
+ failureCode: string | null;
403
+ failureMessage: string | null;
404
+ notes: string | null;
405
+ providerPayload: {
406
+ [x: string]: import("hono/utils/types").JSONValue;
407
+ } | null;
408
+ metadata: {
409
+ [x: string]: import("hono/utils/types").JSONValue;
410
+ } | null;
411
+ createdAt: string;
412
+ updatedAt: string;
413
+ };
414
+ };
415
+ outputFormat: "json";
416
+ status: import("hono/utils/http-status").ContentfulStatusCode;
417
+ };
418
+ };
419
+ } & {
420
+ "/payment-sessions/:id/fail": {
421
+ $post: {
422
+ input: {
423
+ param: {
424
+ id: string;
425
+ };
426
+ };
427
+ output: {
428
+ error: string;
429
+ };
430
+ outputFormat: "json";
431
+ status: 404;
432
+ } | {
433
+ input: {
434
+ param: {
435
+ id: string;
436
+ };
437
+ };
438
+ output: {
439
+ data: {
440
+ id: string;
441
+ targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
442
+ targetId: string | null;
443
+ bookingId: string | null;
444
+ orderId: string | null;
445
+ invoiceId: string | null;
446
+ bookingPaymentScheduleId: string | null;
447
+ bookingGuaranteeId: string | null;
448
+ paymentInstrumentId: string | null;
449
+ paymentAuthorizationId: string | null;
450
+ paymentCaptureId: string | null;
451
+ paymentId: string | null;
452
+ status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired";
453
+ provider: string | null;
454
+ providerSessionId: string | null;
455
+ providerPaymentId: string | null;
456
+ externalReference: string | null;
457
+ idempotencyKey: string | null;
458
+ clientReference: string | null;
459
+ currency: string;
460
+ amountCents: number;
461
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other" | null;
462
+ payerPersonId: string | null;
463
+ payerOrganizationId: string | null;
464
+ payerEmail: string | null;
465
+ payerName: string | null;
466
+ redirectUrl: string | null;
467
+ returnUrl: string | null;
468
+ cancelUrl: string | null;
469
+ callbackUrl: string | null;
470
+ expiresAt: string | null;
471
+ completedAt: string | null;
472
+ failedAt: string | null;
473
+ cancelledAt: string | null;
474
+ expiredAt: string | null;
475
+ failureCode: string | null;
476
+ failureMessage: string | null;
477
+ notes: string | null;
478
+ providerPayload: {
479
+ [x: string]: import("hono/utils/types").JSONValue;
480
+ } | null;
481
+ metadata: {
482
+ [x: string]: import("hono/utils/types").JSONValue;
483
+ } | null;
484
+ createdAt: string;
485
+ updatedAt: string;
486
+ };
487
+ };
488
+ outputFormat: "json";
489
+ status: import("hono/utils/http-status").ContentfulStatusCode;
490
+ };
491
+ };
492
+ } & {
493
+ "/payment-sessions/:id/cancel": {
494
+ $post: {
495
+ input: {
496
+ param: {
497
+ id: string;
498
+ };
499
+ };
500
+ output: {
501
+ error: string;
502
+ };
503
+ outputFormat: "json";
504
+ status: 404;
505
+ } | {
506
+ input: {
507
+ param: {
508
+ id: string;
509
+ };
510
+ };
511
+ output: {
512
+ data: {
513
+ id: string;
514
+ targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
515
+ targetId: string | null;
516
+ bookingId: string | null;
517
+ orderId: string | null;
518
+ invoiceId: string | null;
519
+ bookingPaymentScheduleId: string | null;
520
+ bookingGuaranteeId: string | null;
521
+ paymentInstrumentId: string | null;
522
+ paymentAuthorizationId: string | null;
523
+ paymentCaptureId: string | null;
524
+ paymentId: string | null;
525
+ status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired";
526
+ provider: string | null;
527
+ providerSessionId: string | null;
528
+ providerPaymentId: string | null;
529
+ externalReference: string | null;
530
+ idempotencyKey: string | null;
531
+ clientReference: string | null;
532
+ currency: string;
533
+ amountCents: number;
534
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other" | null;
535
+ payerPersonId: string | null;
536
+ payerOrganizationId: string | null;
537
+ payerEmail: string | null;
538
+ payerName: string | null;
539
+ redirectUrl: string | null;
540
+ returnUrl: string | null;
541
+ cancelUrl: string | null;
542
+ callbackUrl: string | null;
543
+ expiresAt: string | null;
544
+ completedAt: string | null;
545
+ failedAt: string | null;
546
+ cancelledAt: string | null;
547
+ expiredAt: string | null;
548
+ failureCode: string | null;
549
+ failureMessage: string | null;
550
+ notes: string | null;
551
+ providerPayload: {
552
+ [x: string]: import("hono/utils/types").JSONValue;
553
+ } | null;
554
+ metadata: {
555
+ [x: string]: import("hono/utils/types").JSONValue;
556
+ } | null;
557
+ createdAt: string;
558
+ updatedAt: string;
559
+ };
560
+ };
561
+ outputFormat: "json";
562
+ status: import("hono/utils/http-status").ContentfulStatusCode;
563
+ };
564
+ };
565
+ } & {
566
+ "/payment-sessions/:id/expire": {
567
+ $post: {
568
+ input: {
569
+ param: {
570
+ id: string;
571
+ };
572
+ };
573
+ output: {
574
+ error: string;
575
+ };
576
+ outputFormat: "json";
577
+ status: 404;
578
+ } | {
579
+ input: {
580
+ param: {
581
+ id: string;
582
+ };
583
+ };
584
+ output: {
585
+ data: {
586
+ id: string;
587
+ targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
588
+ targetId: string | null;
589
+ bookingId: string | null;
590
+ orderId: string | null;
591
+ invoiceId: string | null;
592
+ bookingPaymentScheduleId: string | null;
593
+ bookingGuaranteeId: string | null;
594
+ paymentInstrumentId: string | null;
595
+ paymentAuthorizationId: string | null;
596
+ paymentCaptureId: string | null;
597
+ paymentId: string | null;
598
+ status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired";
599
+ provider: string | null;
600
+ providerSessionId: string | null;
601
+ providerPaymentId: string | null;
602
+ externalReference: string | null;
603
+ idempotencyKey: string | null;
604
+ clientReference: string | null;
605
+ currency: string;
606
+ amountCents: number;
607
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other" | null;
608
+ payerPersonId: string | null;
609
+ payerOrganizationId: string | null;
610
+ payerEmail: string | null;
611
+ payerName: string | null;
612
+ redirectUrl: string | null;
613
+ returnUrl: string | null;
614
+ cancelUrl: string | null;
615
+ callbackUrl: string | null;
616
+ expiresAt: string | null;
617
+ completedAt: string | null;
618
+ failedAt: string | null;
619
+ cancelledAt: string | null;
620
+ expiredAt: string | null;
621
+ failureCode: string | null;
622
+ failureMessage: string | null;
623
+ notes: string | null;
624
+ providerPayload: {
625
+ [x: string]: import("hono/utils/types").JSONValue;
626
+ } | null;
627
+ metadata: {
628
+ [x: string]: import("hono/utils/types").JSONValue;
629
+ } | null;
630
+ createdAt: string;
631
+ updatedAt: string;
632
+ };
633
+ };
634
+ outputFormat: "json";
635
+ status: import("hono/utils/http-status").ContentfulStatusCode;
636
+ };
637
+ };
638
+ } & {
639
+ "/payment-instruments": {
640
+ $get: {
641
+ input: {};
642
+ output: {
643
+ data: {
644
+ id: string;
645
+ ownerType: "internal" | "supplier" | "other" | "client" | "channel" | "agency";
646
+ personId: string | null;
647
+ organizationId: string | null;
648
+ supplierId: string | null;
649
+ channelId: string | null;
650
+ instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "voucher" | "other" | "bank_account";
651
+ status: "expired" | "active" | "inactive" | "revoked" | "failed_verification";
652
+ label: string;
653
+ provider: string | null;
654
+ brand: string | null;
655
+ last4: string | null;
656
+ holderName: string | null;
657
+ expiryMonth: number | null;
658
+ expiryYear: number | null;
659
+ externalToken: string | null;
660
+ externalCustomerId: string | null;
661
+ billingEmail: string | null;
662
+ billingAddress: string | null;
663
+ directBillReference: string | null;
664
+ notes: string | null;
665
+ metadata: import("hono/utils/types").JSONValue;
666
+ createdAt: string;
667
+ updatedAt: string;
668
+ }[];
669
+ total: number;
670
+ limit: number;
671
+ offset: number;
672
+ };
673
+ outputFormat: "json";
674
+ status: import("hono/utils/http-status").ContentfulStatusCode;
675
+ };
676
+ };
677
+ } & {
678
+ "/payment-instruments": {
679
+ $post: {
680
+ input: {};
681
+ output: {
682
+ data: {
683
+ id: string;
684
+ brand: string | null;
685
+ ownerType: "internal" | "supplier" | "other" | "client" | "channel" | "agency";
686
+ personId: string | null;
687
+ organizationId: string | null;
688
+ supplierId: string | null;
689
+ channelId: string | null;
690
+ instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "voucher" | "other" | "bank_account";
691
+ status: "expired" | "active" | "inactive" | "revoked" | "failed_verification";
692
+ label: string;
693
+ provider: string | null;
694
+ last4: string | null;
695
+ holderName: string | null;
696
+ expiryMonth: number | null;
697
+ expiryYear: number | null;
698
+ externalToken: string | null;
699
+ externalCustomerId: string | null;
700
+ billingEmail: string | null;
701
+ billingAddress: string | null;
702
+ directBillReference: string | null;
703
+ notes: string | null;
704
+ metadata: import("hono/utils/types").JSONValue;
705
+ createdAt: string;
706
+ updatedAt: string;
707
+ } | null;
708
+ };
709
+ outputFormat: "json";
710
+ status: 201;
711
+ };
712
+ };
713
+ } & {
714
+ "/payment-instruments/:id": {
715
+ $get: {
716
+ input: {
717
+ param: {
718
+ id: string;
719
+ };
720
+ };
721
+ output: {
722
+ error: string;
723
+ };
724
+ outputFormat: "json";
725
+ status: 404;
726
+ } | {
727
+ input: {
728
+ param: {
729
+ id: string;
730
+ };
731
+ };
732
+ output: {
733
+ data: {
734
+ id: string;
735
+ ownerType: "internal" | "supplier" | "other" | "client" | "channel" | "agency";
736
+ personId: string | null;
737
+ organizationId: string | null;
738
+ supplierId: string | null;
739
+ channelId: string | null;
740
+ instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "voucher" | "other" | "bank_account";
741
+ status: "expired" | "active" | "inactive" | "revoked" | "failed_verification";
742
+ label: string;
743
+ provider: string | null;
744
+ brand: string | null;
745
+ last4: string | null;
746
+ holderName: string | null;
747
+ expiryMonth: number | null;
748
+ expiryYear: number | null;
749
+ externalToken: string | null;
750
+ externalCustomerId: string | null;
751
+ billingEmail: string | null;
752
+ billingAddress: string | null;
753
+ directBillReference: string | null;
754
+ notes: string | null;
755
+ metadata: import("hono/utils/types").JSONValue;
756
+ createdAt: string;
757
+ updatedAt: string;
758
+ };
759
+ };
760
+ outputFormat: "json";
761
+ status: import("hono/utils/http-status").ContentfulStatusCode;
762
+ };
763
+ };
764
+ } & {
765
+ "/payment-instruments/:id": {
766
+ $patch: {
767
+ input: {
768
+ param: {
769
+ id: string;
770
+ };
771
+ };
772
+ output: {
773
+ error: string;
774
+ };
775
+ outputFormat: "json";
776
+ status: 404;
777
+ } | {
778
+ input: {
779
+ param: {
780
+ id: string;
781
+ };
782
+ };
783
+ output: {
784
+ data: {
785
+ id: string;
786
+ ownerType: "internal" | "supplier" | "other" | "client" | "channel" | "agency";
787
+ personId: string | null;
788
+ organizationId: string | null;
789
+ supplierId: string | null;
790
+ channelId: string | null;
791
+ instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "voucher" | "other" | "bank_account";
792
+ status: "expired" | "active" | "inactive" | "revoked" | "failed_verification";
793
+ label: string;
794
+ provider: string | null;
795
+ brand: string | null;
796
+ last4: string | null;
797
+ holderName: string | null;
798
+ expiryMonth: number | null;
799
+ expiryYear: number | null;
800
+ externalToken: string | null;
801
+ externalCustomerId: string | null;
802
+ billingEmail: string | null;
803
+ billingAddress: string | null;
804
+ directBillReference: string | null;
805
+ notes: string | null;
806
+ metadata: import("hono/utils/types").JSONValue;
807
+ createdAt: string;
808
+ updatedAt: string;
809
+ };
810
+ };
811
+ outputFormat: "json";
812
+ status: import("hono/utils/http-status").ContentfulStatusCode;
813
+ };
814
+ };
815
+ } & {
816
+ "/payment-instruments/:id": {
817
+ $delete: {
818
+ input: {
819
+ param: {
820
+ id: string;
821
+ };
822
+ };
823
+ output: {
824
+ error: string;
825
+ };
826
+ outputFormat: "json";
827
+ status: 404;
828
+ } | {
829
+ input: {
830
+ param: {
831
+ id: string;
832
+ };
833
+ };
834
+ output: {
835
+ success: true;
836
+ };
837
+ outputFormat: "json";
838
+ status: import("hono/utils/http-status").ContentfulStatusCode;
839
+ };
840
+ };
841
+ } & {
842
+ "/payment-authorizations": {
843
+ $get: {
844
+ input: {};
845
+ output: {
846
+ data: {
847
+ id: string;
848
+ bookingId: string | null;
849
+ orderId: string | null;
850
+ invoiceId: string | null;
851
+ bookingGuaranteeId: string | null;
852
+ paymentInstrumentId: string | null;
853
+ status: "pending" | "failed" | "authorized" | "expired" | "partially_captured" | "captured" | "voided";
854
+ captureMode: "automatic" | "manual";
855
+ currency: string;
856
+ amountCents: number;
857
+ provider: string | null;
858
+ externalAuthorizationId: string | null;
859
+ approvalCode: string | null;
860
+ authorizedAt: string | null;
861
+ expiresAt: string | null;
862
+ voidedAt: string | null;
863
+ notes: string | null;
864
+ createdAt: string;
865
+ updatedAt: string;
866
+ }[];
867
+ total: number;
868
+ limit: number;
869
+ offset: number;
870
+ };
871
+ outputFormat: "json";
872
+ status: import("hono/utils/http-status").ContentfulStatusCode;
873
+ };
874
+ };
875
+ } & {
876
+ "/payment-authorizations": {
877
+ $post: {
878
+ input: {};
879
+ output: {
880
+ data: {
881
+ id: string;
882
+ status: "pending" | "failed" | "authorized" | "expired" | "partially_captured" | "captured" | "voided";
883
+ provider: string | null;
884
+ notes: string | null;
885
+ createdAt: string;
886
+ updatedAt: string;
887
+ bookingId: string | null;
888
+ orderId: string | null;
889
+ currency: string;
890
+ invoiceId: string | null;
891
+ amountCents: number;
892
+ paymentInstrumentId: string | null;
893
+ bookingGuaranteeId: string | null;
894
+ captureMode: "automatic" | "manual";
895
+ externalAuthorizationId: string | null;
896
+ approvalCode: string | null;
897
+ authorizedAt: string | null;
898
+ expiresAt: string | null;
899
+ voidedAt: string | null;
900
+ } | null;
901
+ };
902
+ outputFormat: "json";
903
+ status: 201;
904
+ };
905
+ };
906
+ } & {
907
+ "/payment-authorizations/:id": {
908
+ $get: {
909
+ input: {
910
+ param: {
911
+ id: string;
912
+ };
913
+ };
914
+ output: {
915
+ error: string;
916
+ };
917
+ outputFormat: "json";
918
+ status: 404;
919
+ } | {
920
+ input: {
921
+ param: {
922
+ id: string;
923
+ };
924
+ };
925
+ output: {
926
+ data: {
927
+ id: string;
928
+ bookingId: string | null;
929
+ orderId: string | null;
930
+ invoiceId: string | null;
931
+ bookingGuaranteeId: string | null;
932
+ paymentInstrumentId: string | null;
933
+ status: "pending" | "failed" | "authorized" | "expired" | "partially_captured" | "captured" | "voided";
934
+ captureMode: "automatic" | "manual";
935
+ currency: string;
936
+ amountCents: number;
937
+ provider: string | null;
938
+ externalAuthorizationId: string | null;
939
+ approvalCode: string | null;
940
+ authorizedAt: string | null;
941
+ expiresAt: string | null;
942
+ voidedAt: string | null;
943
+ notes: string | null;
944
+ createdAt: string;
945
+ updatedAt: string;
946
+ };
947
+ };
948
+ outputFormat: "json";
949
+ status: import("hono/utils/http-status").ContentfulStatusCode;
950
+ };
951
+ };
952
+ } & {
953
+ "/payment-authorizations/:id": {
954
+ $patch: {
955
+ input: {
956
+ param: {
957
+ id: string;
958
+ };
959
+ };
960
+ output: {
961
+ error: string;
962
+ };
963
+ outputFormat: "json";
964
+ status: 404;
965
+ } | {
966
+ input: {
967
+ param: {
968
+ id: string;
969
+ };
970
+ };
971
+ output: {
972
+ data: {
973
+ id: string;
974
+ bookingId: string | null;
975
+ orderId: string | null;
976
+ invoiceId: string | null;
977
+ bookingGuaranteeId: string | null;
978
+ paymentInstrumentId: string | null;
979
+ status: "pending" | "failed" | "authorized" | "expired" | "partially_captured" | "captured" | "voided";
980
+ captureMode: "automatic" | "manual";
981
+ currency: string;
982
+ amountCents: number;
983
+ provider: string | null;
984
+ externalAuthorizationId: string | null;
985
+ approvalCode: string | null;
986
+ authorizedAt: string | null;
987
+ expiresAt: string | null;
988
+ voidedAt: string | null;
989
+ notes: string | null;
990
+ createdAt: string;
991
+ updatedAt: string;
992
+ };
993
+ };
994
+ outputFormat: "json";
995
+ status: import("hono/utils/http-status").ContentfulStatusCode;
996
+ };
997
+ };
998
+ } & {
999
+ "/payment-authorizations/:id": {
1000
+ $delete: {
1001
+ input: {
1002
+ param: {
1003
+ id: string;
1004
+ };
1005
+ };
1006
+ output: {
1007
+ error: string;
1008
+ };
1009
+ outputFormat: "json";
1010
+ status: 404;
1011
+ } | {
1012
+ input: {
1013
+ param: {
1014
+ id: string;
1015
+ };
1016
+ };
1017
+ output: {
1018
+ success: true;
1019
+ };
1020
+ outputFormat: "json";
1021
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1022
+ };
1023
+ };
1024
+ } & {
1025
+ "/payment-captures": {
1026
+ $get: {
1027
+ input: {};
1028
+ output: {
1029
+ data: {
1030
+ id: string;
1031
+ paymentAuthorizationId: string | null;
1032
+ invoiceId: string | null;
1033
+ status: "pending" | "completed" | "failed" | "refunded" | "voided";
1034
+ currency: string;
1035
+ amountCents: number;
1036
+ provider: string | null;
1037
+ externalCaptureId: string | null;
1038
+ capturedAt: string | null;
1039
+ settledAt: string | null;
1040
+ notes: string | null;
1041
+ createdAt: string;
1042
+ updatedAt: string;
1043
+ }[];
1044
+ total: number;
1045
+ limit: number;
1046
+ offset: number;
1047
+ };
1048
+ outputFormat: "json";
1049
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1050
+ };
1051
+ };
1052
+ } & {
1053
+ "/payment-captures": {
1054
+ $post: {
1055
+ input: {};
1056
+ output: {
1057
+ data: {
1058
+ id: string;
1059
+ status: "pending" | "completed" | "failed" | "refunded" | "voided";
1060
+ provider: string | null;
1061
+ notes: string | null;
1062
+ createdAt: string;
1063
+ updatedAt: string;
1064
+ currency: string;
1065
+ invoiceId: string | null;
1066
+ amountCents: number;
1067
+ paymentAuthorizationId: string | null;
1068
+ externalCaptureId: string | null;
1069
+ capturedAt: string | null;
1070
+ settledAt: string | null;
1071
+ } | null;
1072
+ };
1073
+ outputFormat: "json";
1074
+ status: 201;
1075
+ };
1076
+ };
1077
+ } & {
1078
+ "/payment-captures/:id": {
1079
+ $get: {
1080
+ input: {
1081
+ param: {
1082
+ id: string;
1083
+ };
1084
+ };
1085
+ output: {
1086
+ error: string;
1087
+ };
1088
+ outputFormat: "json";
1089
+ status: 404;
1090
+ } | {
1091
+ input: {
1092
+ param: {
1093
+ id: string;
1094
+ };
1095
+ };
1096
+ output: {
1097
+ data: {
1098
+ id: string;
1099
+ paymentAuthorizationId: string | null;
1100
+ invoiceId: string | null;
1101
+ status: "pending" | "completed" | "failed" | "refunded" | "voided";
1102
+ currency: string;
1103
+ amountCents: number;
1104
+ provider: string | null;
1105
+ externalCaptureId: string | null;
1106
+ capturedAt: string | null;
1107
+ settledAt: string | null;
1108
+ notes: string | null;
1109
+ createdAt: string;
1110
+ updatedAt: string;
1111
+ };
1112
+ };
1113
+ outputFormat: "json";
1114
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1115
+ };
1116
+ };
1117
+ } & {
1118
+ "/payment-captures/:id": {
1119
+ $patch: {
1120
+ input: {
1121
+ param: {
1122
+ id: string;
1123
+ };
1124
+ };
1125
+ output: {
1126
+ error: string;
1127
+ };
1128
+ outputFormat: "json";
1129
+ status: 404;
1130
+ } | {
1131
+ input: {
1132
+ param: {
1133
+ id: string;
1134
+ };
1135
+ };
1136
+ output: {
1137
+ data: {
1138
+ id: string;
1139
+ paymentAuthorizationId: string | null;
1140
+ invoiceId: string | null;
1141
+ status: "pending" | "completed" | "failed" | "refunded" | "voided";
1142
+ currency: string;
1143
+ amountCents: number;
1144
+ provider: string | null;
1145
+ externalCaptureId: string | null;
1146
+ capturedAt: string | null;
1147
+ settledAt: string | null;
1148
+ notes: string | null;
1149
+ createdAt: string;
1150
+ updatedAt: string;
1151
+ };
1152
+ };
1153
+ outputFormat: "json";
1154
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1155
+ };
1156
+ };
1157
+ } & {
1158
+ "/payment-captures/:id": {
1159
+ $delete: {
1160
+ input: {
1161
+ param: {
1162
+ id: string;
1163
+ };
1164
+ };
1165
+ output: {
1166
+ error: string;
1167
+ };
1168
+ outputFormat: "json";
1169
+ status: 404;
1170
+ } | {
1171
+ input: {
1172
+ param: {
1173
+ id: string;
1174
+ };
1175
+ };
1176
+ output: {
1177
+ success: true;
1178
+ };
1179
+ outputFormat: "json";
1180
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1181
+ };
1182
+ };
1183
+ } & {
1184
+ "/reports/revenue": {
1185
+ $get: {
1186
+ input: {};
1187
+ output: {
1188
+ data: {
1189
+ month: string;
1190
+ totalCents: number;
1191
+ count: number;
1192
+ }[];
1193
+ };
1194
+ outputFormat: "json";
1195
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1196
+ };
1197
+ };
1198
+ } & {
1199
+ "/reports/aging": {
1200
+ $get: {
1201
+ input: {};
1202
+ output: {
1203
+ data: {
1204
+ bucket: string;
1205
+ totalCents: number;
1206
+ count: number;
1207
+ }[];
1208
+ };
1209
+ outputFormat: "json";
1210
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1211
+ };
1212
+ };
1213
+ } & {
1214
+ "/reports/profitability": {
1215
+ $get: {
1216
+ input: {};
1217
+ output: {
1218
+ data: {
1219
+ bookingId: string;
1220
+ bookingNumber: string;
1221
+ sellAmountCents: number | null;
1222
+ costAmountCents: number | null;
1223
+ marginPercent: number | null;
1224
+ }[];
1225
+ };
1226
+ outputFormat: "json";
1227
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1228
+ };
1229
+ };
1230
+ } & {
1231
+ "/bookings/:bookingId/payment-schedules": {
1232
+ $get: {
1233
+ input: {
1234
+ param: {
1235
+ bookingId: string;
1236
+ };
1237
+ };
1238
+ output: {
1239
+ data: {
1240
+ id: string;
1241
+ bookingId: string;
1242
+ bookingItemId: string | null;
1243
+ scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
1244
+ status: "paid" | "pending" | "cancelled" | "expired" | "due" | "waived";
1245
+ dueDate: string;
1246
+ currency: string;
1247
+ amountCents: number;
1248
+ notes: string | null;
1249
+ createdAt: string;
1250
+ updatedAt: string;
1251
+ }[];
1252
+ };
1253
+ outputFormat: "json";
1254
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1255
+ };
1256
+ };
1257
+ } & {
1258
+ "/bookings/:bookingId/payment-schedules": {
1259
+ $post: {
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
+ id: string;
1279
+ status: "paid" | "pending" | "cancelled" | "expired" | "due" | "waived";
1280
+ notes: string | null;
1281
+ createdAt: string;
1282
+ updatedAt: string;
1283
+ bookingId: string;
1284
+ currency: string;
1285
+ dueDate: string;
1286
+ bookingItemId: string | null;
1287
+ scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
1288
+ amountCents: number;
1289
+ };
1290
+ };
1291
+ outputFormat: "json";
1292
+ status: 201;
1293
+ };
1294
+ };
1295
+ } & {
1296
+ "/bookings/:bookingId/payment-schedules/default-plan": {
1297
+ $post: {
1298
+ input: {
1299
+ param: {
1300
+ bookingId: string;
1301
+ };
1302
+ };
1303
+ output: {
1304
+ error: string;
1305
+ };
1306
+ outputFormat: "json";
1307
+ status: 404;
1308
+ } | {
1309
+ input: {
1310
+ param: {
1311
+ bookingId: string;
1312
+ };
1313
+ };
1314
+ output: {
1315
+ data: {
1316
+ id: string;
1317
+ status: "paid" | "pending" | "cancelled" | "expired" | "due" | "waived";
1318
+ notes: string | null;
1319
+ createdAt: string;
1320
+ updatedAt: string;
1321
+ bookingId: string;
1322
+ currency: string;
1323
+ dueDate: string;
1324
+ bookingItemId: string | null;
1325
+ scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
1326
+ amountCents: number;
1327
+ }[];
1328
+ };
1329
+ outputFormat: "json";
1330
+ status: 201;
1331
+ };
1332
+ };
1333
+ } & {
1334
+ "/bookings/:bookingId/payment-schedules/:scheduleId": {
1335
+ $patch: {
1336
+ input: {
1337
+ param: {
1338
+ bookingId: string;
1339
+ } & {
1340
+ scheduleId: string;
1341
+ };
1342
+ };
1343
+ output: {
1344
+ error: string;
1345
+ };
1346
+ outputFormat: "json";
1347
+ status: 404;
1348
+ } | {
1349
+ input: {
1350
+ param: {
1351
+ bookingId: string;
1352
+ } & {
1353
+ scheduleId: string;
1354
+ };
1355
+ };
1356
+ output: {
1357
+ data: {
1358
+ id: string;
1359
+ bookingId: string;
1360
+ bookingItemId: string | null;
1361
+ scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
1362
+ status: "paid" | "pending" | "cancelled" | "expired" | "due" | "waived";
1363
+ dueDate: string;
1364
+ currency: string;
1365
+ amountCents: number;
1366
+ notes: string | null;
1367
+ createdAt: string;
1368
+ updatedAt: string;
1369
+ };
1370
+ };
1371
+ outputFormat: "json";
1372
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1373
+ };
1374
+ };
1375
+ } & {
1376
+ "/bookings/:bookingId/payment-schedules/:scheduleId/payment-session": {
1377
+ $post: {
1378
+ input: {
1379
+ param: {
1380
+ bookingId: string;
1381
+ } & {
1382
+ scheduleId: string;
1383
+ };
1384
+ };
1385
+ output: {
1386
+ error: string;
1387
+ };
1388
+ outputFormat: "json";
1389
+ status: 404;
1390
+ } | {
1391
+ input: {
1392
+ param: {
1393
+ bookingId: string;
1394
+ } & {
1395
+ scheduleId: string;
1396
+ };
1397
+ };
1398
+ output: {
1399
+ data: {
1400
+ id: string;
1401
+ status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired";
1402
+ provider: string | null;
1403
+ notes: string | null;
1404
+ metadata: {
1405
+ [x: string]: import("hono/utils/types").JSONValue;
1406
+ } | null;
1407
+ createdAt: string;
1408
+ updatedAt: string;
1409
+ targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
1410
+ targetId: string | null;
1411
+ bookingId: string | null;
1412
+ orderId: string | null;
1413
+ currency: string;
1414
+ invoiceId: string | null;
1415
+ amountCents: number;
1416
+ bookingPaymentScheduleId: string | null;
1417
+ paymentInstrumentId: string | null;
1418
+ bookingGuaranteeId: string | null;
1419
+ expiresAt: string | null;
1420
+ paymentAuthorizationId: string | null;
1421
+ paymentCaptureId: string | null;
1422
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other" | null;
1423
+ paymentId: string | null;
1424
+ providerSessionId: string | null;
1425
+ providerPaymentId: string | null;
1426
+ externalReference: string | null;
1427
+ idempotencyKey: string | null;
1428
+ clientReference: string | null;
1429
+ payerPersonId: string | null;
1430
+ payerOrganizationId: string | null;
1431
+ payerEmail: string | null;
1432
+ payerName: string | null;
1433
+ redirectUrl: string | null;
1434
+ returnUrl: string | null;
1435
+ cancelUrl: string | null;
1436
+ callbackUrl: string | null;
1437
+ completedAt: string | null;
1438
+ failedAt: string | null;
1439
+ cancelledAt: string | null;
1440
+ expiredAt: string | null;
1441
+ failureCode: string | null;
1442
+ failureMessage: string | null;
1443
+ providerPayload: {
1444
+ [x: string]: import("hono/utils/types").JSONValue;
1445
+ } | null;
1446
+ };
1447
+ };
1448
+ outputFormat: "json";
1449
+ status: 201;
1450
+ } | {
1451
+ input: {
1452
+ param: {
1453
+ bookingId: string;
1454
+ } & {
1455
+ scheduleId: string;
1456
+ };
1457
+ };
1458
+ output: {
1459
+ error: string;
1460
+ };
1461
+ outputFormat: "json";
1462
+ status: 409;
1463
+ };
1464
+ };
1465
+ } & {
1466
+ "/bookings/:bookingId/payment-schedules/:scheduleId": {
1467
+ $delete: {
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
+ success: true;
1490
+ };
1491
+ outputFormat: "json";
1492
+ status: 200;
1493
+ };
1494
+ };
1495
+ } & {
1496
+ "/bookings/:bookingId/guarantees": {
1497
+ $get: {
1498
+ input: {
1499
+ param: {
1500
+ bookingId: string;
1501
+ };
1502
+ };
1503
+ output: {
1504
+ data: {
1505
+ id: string;
1506
+ bookingId: string;
1507
+ bookingPaymentScheduleId: string | null;
1508
+ bookingItemId: string | null;
1509
+ guaranteeType: "bank_transfer" | "credit_card" | "voucher" | "other" | "deposit" | "preauth" | "card_on_file" | "agency_letter";
1510
+ status: "pending" | "failed" | "cancelled" | "expired" | "active" | "released";
1511
+ paymentInstrumentId: string | null;
1512
+ paymentAuthorizationId: string | null;
1513
+ currency: string | null;
1514
+ amountCents: number | null;
1515
+ provider: string | null;
1516
+ referenceNumber: string | null;
1517
+ guaranteedAt: string | null;
1518
+ expiresAt: string | null;
1519
+ releasedAt: string | null;
1520
+ notes: string | null;
1521
+ createdAt: string;
1522
+ updatedAt: string;
1523
+ }[];
1524
+ };
1525
+ outputFormat: "json";
1526
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1527
+ };
1528
+ };
1529
+ } & {
1530
+ "/bookings/:bookingId/guarantees": {
1531
+ $post: {
1532
+ input: {
1533
+ param: {
1534
+ bookingId: string;
1535
+ };
1536
+ };
1537
+ output: {
1538
+ error: string;
1539
+ };
1540
+ outputFormat: "json";
1541
+ status: 404;
1542
+ } | {
1543
+ input: {
1544
+ param: {
1545
+ bookingId: string;
1546
+ };
1547
+ };
1548
+ output: {
1549
+ data: {
1550
+ id: string;
1551
+ status: "pending" | "failed" | "cancelled" | "expired" | "active" | "released";
1552
+ provider: string | null;
1553
+ notes: string | null;
1554
+ createdAt: string;
1555
+ updatedAt: string;
1556
+ bookingId: string;
1557
+ currency: string | null;
1558
+ bookingItemId: string | null;
1559
+ amountCents: number | null;
1560
+ bookingPaymentScheduleId: string | null;
1561
+ guaranteeType: "bank_transfer" | "credit_card" | "voucher" | "other" | "deposit" | "preauth" | "card_on_file" | "agency_letter";
1562
+ paymentInstrumentId: string | null;
1563
+ expiresAt: string | null;
1564
+ paymentAuthorizationId: string | null;
1565
+ referenceNumber: string | null;
1566
+ guaranteedAt: string | null;
1567
+ releasedAt: string | null;
1568
+ };
1569
+ };
1570
+ outputFormat: "json";
1571
+ status: 201;
1572
+ };
1573
+ };
1574
+ } & {
1575
+ "/bookings/:bookingId/guarantees/:guaranteeId/payment-session": {
1576
+ $post: {
1577
+ input: {
1578
+ param: {
1579
+ bookingId: string;
1580
+ } & {
1581
+ guaranteeId: string;
1582
+ };
1583
+ };
1584
+ output: {
1585
+ error: string;
1586
+ };
1587
+ outputFormat: "json";
1588
+ status: 404;
1589
+ } | {
1590
+ input: {
1591
+ param: {
1592
+ bookingId: string;
1593
+ } & {
1594
+ guaranteeId: string;
1595
+ };
1596
+ };
1597
+ output: {
1598
+ data: {
1599
+ id: string;
1600
+ status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired";
1601
+ provider: string | null;
1602
+ notes: string | null;
1603
+ metadata: {
1604
+ [x: string]: import("hono/utils/types").JSONValue;
1605
+ } | null;
1606
+ createdAt: string;
1607
+ updatedAt: string;
1608
+ targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
1609
+ targetId: string | null;
1610
+ bookingId: string | null;
1611
+ orderId: string | null;
1612
+ currency: string;
1613
+ invoiceId: string | null;
1614
+ amountCents: number;
1615
+ bookingPaymentScheduleId: string | null;
1616
+ paymentInstrumentId: string | null;
1617
+ bookingGuaranteeId: string | null;
1618
+ expiresAt: string | null;
1619
+ paymentAuthorizationId: string | null;
1620
+ paymentCaptureId: string | null;
1621
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other" | null;
1622
+ paymentId: string | null;
1623
+ providerSessionId: string | null;
1624
+ providerPaymentId: string | null;
1625
+ externalReference: string | null;
1626
+ idempotencyKey: string | null;
1627
+ clientReference: string | null;
1628
+ payerPersonId: string | null;
1629
+ payerOrganizationId: string | null;
1630
+ payerEmail: string | null;
1631
+ payerName: string | null;
1632
+ redirectUrl: string | null;
1633
+ returnUrl: string | null;
1634
+ cancelUrl: string | null;
1635
+ callbackUrl: string | null;
1636
+ completedAt: string | null;
1637
+ failedAt: string | null;
1638
+ cancelledAt: string | null;
1639
+ expiredAt: string | null;
1640
+ failureCode: string | null;
1641
+ failureMessage: string | null;
1642
+ providerPayload: {
1643
+ [x: string]: import("hono/utils/types").JSONValue;
1644
+ } | null;
1645
+ };
1646
+ };
1647
+ outputFormat: "json";
1648
+ status: 201;
1649
+ } | {
1650
+ input: {
1651
+ param: {
1652
+ bookingId: string;
1653
+ } & {
1654
+ guaranteeId: string;
1655
+ };
1656
+ };
1657
+ output: {
1658
+ error: string;
1659
+ };
1660
+ outputFormat: "json";
1661
+ status: 409;
1662
+ };
1663
+ };
1664
+ } & {
1665
+ "/bookings/:bookingId/guarantees/:guaranteeId": {
1666
+ $patch: {
1667
+ input: {
1668
+ param: {
1669
+ bookingId: string;
1670
+ } & {
1671
+ guaranteeId: string;
1672
+ };
1673
+ };
1674
+ output: {
1675
+ error: string;
1676
+ };
1677
+ outputFormat: "json";
1678
+ status: 404;
1679
+ } | {
1680
+ input: {
1681
+ param: {
1682
+ bookingId: string;
1683
+ } & {
1684
+ guaranteeId: string;
1685
+ };
1686
+ };
1687
+ output: {
1688
+ data: {
1689
+ id: string;
1690
+ bookingId: string;
1691
+ bookingPaymentScheduleId: string | null;
1692
+ bookingItemId: string | null;
1693
+ guaranteeType: "bank_transfer" | "credit_card" | "voucher" | "other" | "deposit" | "preauth" | "card_on_file" | "agency_letter";
1694
+ status: "pending" | "failed" | "cancelled" | "expired" | "active" | "released";
1695
+ paymentInstrumentId: string | null;
1696
+ paymentAuthorizationId: string | null;
1697
+ currency: string | null;
1698
+ amountCents: number | null;
1699
+ provider: string | null;
1700
+ referenceNumber: string | null;
1701
+ guaranteedAt: string | null;
1702
+ expiresAt: string | null;
1703
+ releasedAt: string | null;
1704
+ notes: string | null;
1705
+ createdAt: string;
1706
+ updatedAt: string;
1707
+ };
1708
+ };
1709
+ outputFormat: "json";
1710
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1711
+ };
1712
+ };
1713
+ } & {
1714
+ "/bookings/:bookingId/guarantees/:guaranteeId": {
1715
+ $delete: {
1716
+ input: {
1717
+ param: {
1718
+ bookingId: string;
1719
+ } & {
1720
+ guaranteeId: string;
1721
+ };
1722
+ };
1723
+ output: {
1724
+ error: string;
1725
+ };
1726
+ outputFormat: "json";
1727
+ status: 404;
1728
+ } | {
1729
+ input: {
1730
+ param: {
1731
+ bookingId: string;
1732
+ } & {
1733
+ guaranteeId: string;
1734
+ };
1735
+ };
1736
+ output: {
1737
+ success: true;
1738
+ };
1739
+ outputFormat: "json";
1740
+ status: 200;
1741
+ };
1742
+ };
1743
+ } & {
1744
+ "/booking-items/:bookingItemId/tax-lines": {
1745
+ $get: {
1746
+ input: {
1747
+ param: {
1748
+ bookingItemId: string;
1749
+ };
1750
+ };
1751
+ output: {
1752
+ data: {
1753
+ id: string;
1754
+ bookingItemId: string;
1755
+ code: string | null;
1756
+ name: string;
1757
+ jurisdiction: string | null;
1758
+ scope: "included" | "excluded" | "withheld";
1759
+ currency: string;
1760
+ amountCents: number;
1761
+ rateBasisPoints: number | null;
1762
+ includedInPrice: boolean;
1763
+ remittanceParty: string | null;
1764
+ sortOrder: number;
1765
+ createdAt: string;
1766
+ updatedAt: string;
1767
+ }[];
1768
+ };
1769
+ outputFormat: "json";
1770
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1771
+ };
1772
+ };
1773
+ } & {
1774
+ "/booking-items/:bookingItemId/tax-lines": {
1775
+ $post: {
1776
+ input: {
1777
+ param: {
1778
+ bookingItemId: string;
1779
+ };
1780
+ };
1781
+ output: {
1782
+ error: string;
1783
+ };
1784
+ outputFormat: "json";
1785
+ status: 404;
1786
+ } | {
1787
+ input: {
1788
+ param: {
1789
+ bookingItemId: string;
1790
+ };
1791
+ };
1792
+ output: {
1793
+ data: {
1794
+ id: string;
1795
+ name: string;
1796
+ createdAt: string;
1797
+ updatedAt: string;
1798
+ currency: string;
1799
+ bookingItemId: string;
1800
+ amountCents: number;
1801
+ code: string | null;
1802
+ jurisdiction: string | null;
1803
+ scope: "included" | "excluded" | "withheld";
1804
+ rateBasisPoints: number | null;
1805
+ includedInPrice: boolean;
1806
+ remittanceParty: string | null;
1807
+ sortOrder: number;
1808
+ };
1809
+ };
1810
+ outputFormat: "json";
1811
+ status: 201;
1812
+ };
1813
+ };
1814
+ } & {
1815
+ "/booking-items/:bookingItemId/tax-lines/:taxLineId": {
1816
+ $patch: {
1817
+ input: {
1818
+ param: {
1819
+ bookingItemId: string;
1820
+ } & {
1821
+ taxLineId: string;
1822
+ };
1823
+ };
1824
+ output: {
1825
+ error: string;
1826
+ };
1827
+ outputFormat: "json";
1828
+ status: 404;
1829
+ } | {
1830
+ input: {
1831
+ param: {
1832
+ bookingItemId: string;
1833
+ } & {
1834
+ taxLineId: string;
1835
+ };
1836
+ };
1837
+ output: {
1838
+ data: {
1839
+ id: string;
1840
+ bookingItemId: string;
1841
+ code: string | null;
1842
+ name: string;
1843
+ jurisdiction: string | null;
1844
+ scope: "included" | "excluded" | "withheld";
1845
+ currency: string;
1846
+ amountCents: number;
1847
+ rateBasisPoints: number | null;
1848
+ includedInPrice: boolean;
1849
+ remittanceParty: string | null;
1850
+ sortOrder: number;
1851
+ createdAt: string;
1852
+ updatedAt: string;
1853
+ };
1854
+ };
1855
+ outputFormat: "json";
1856
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1857
+ };
1858
+ };
1859
+ } & {
1860
+ "/booking-items/:bookingItemId/tax-lines/:taxLineId": {
1861
+ $delete: {
1862
+ input: {
1863
+ param: {
1864
+ bookingItemId: string;
1865
+ } & {
1866
+ taxLineId: string;
1867
+ };
1868
+ };
1869
+ output: {
1870
+ error: string;
1871
+ };
1872
+ outputFormat: "json";
1873
+ status: 404;
1874
+ } | {
1875
+ input: {
1876
+ param: {
1877
+ bookingItemId: string;
1878
+ } & {
1879
+ taxLineId: string;
1880
+ };
1881
+ };
1882
+ output: {
1883
+ success: true;
1884
+ };
1885
+ outputFormat: "json";
1886
+ status: 200;
1887
+ };
1888
+ };
1889
+ } & {
1890
+ "/booking-items/:bookingItemId/commissions": {
1891
+ $get: {
1892
+ input: {
1893
+ param: {
1894
+ bookingItemId: string;
1895
+ };
1896
+ };
1897
+ output: {
1898
+ data: {
1899
+ id: string;
1900
+ bookingItemId: string;
1901
+ channelId: string | null;
1902
+ recipientType: "internal" | "supplier" | "other" | "channel" | "agency" | "affiliate" | "agent";
1903
+ commissionModel: "fixed" | "percentage" | "markup" | "net";
1904
+ currency: string | null;
1905
+ amountCents: number | null;
1906
+ rateBasisPoints: number | null;
1907
+ status: "paid" | "void" | "pending" | "accrued" | "payable";
1908
+ payableAt: string | null;
1909
+ paidAt: string | null;
1910
+ notes: string | null;
1911
+ createdAt: string;
1912
+ updatedAt: string;
1913
+ }[];
1914
+ };
1915
+ outputFormat: "json";
1916
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1917
+ };
1918
+ };
1919
+ } & {
1920
+ "/booking-items/:bookingItemId/commissions": {
1921
+ $post: {
1922
+ input: {
1923
+ param: {
1924
+ bookingItemId: string;
1925
+ };
1926
+ };
1927
+ output: {
1928
+ error: string;
1929
+ };
1930
+ outputFormat: "json";
1931
+ status: 404;
1932
+ } | {
1933
+ input: {
1934
+ param: {
1935
+ bookingItemId: string;
1936
+ };
1937
+ };
1938
+ output: {
1939
+ data: {
1940
+ id: string;
1941
+ channelId: string | null;
1942
+ status: "paid" | "void" | "pending" | "accrued" | "payable";
1943
+ notes: string | null;
1944
+ createdAt: string;
1945
+ updatedAt: string;
1946
+ currency: string | null;
1947
+ bookingItemId: string;
1948
+ amountCents: number | null;
1949
+ rateBasisPoints: number | null;
1950
+ recipientType: "internal" | "supplier" | "other" | "channel" | "agency" | "affiliate" | "agent";
1951
+ commissionModel: "fixed" | "percentage" | "markup" | "net";
1952
+ payableAt: string | null;
1953
+ paidAt: string | null;
1954
+ };
1955
+ };
1956
+ outputFormat: "json";
1957
+ status: 201;
1958
+ };
1959
+ };
1960
+ } & {
1961
+ "/booking-items/:bookingItemId/commissions/:commissionId": {
1962
+ $patch: {
1963
+ input: {
1964
+ param: {
1965
+ bookingItemId: string;
1966
+ } & {
1967
+ commissionId: string;
1968
+ };
1969
+ };
1970
+ output: {
1971
+ error: string;
1972
+ };
1973
+ outputFormat: "json";
1974
+ status: 404;
1975
+ } | {
1976
+ input: {
1977
+ param: {
1978
+ bookingItemId: string;
1979
+ } & {
1980
+ commissionId: string;
1981
+ };
1982
+ };
1983
+ output: {
1984
+ data: {
1985
+ id: string;
1986
+ bookingItemId: string;
1987
+ channelId: string | null;
1988
+ recipientType: "internal" | "supplier" | "other" | "channel" | "agency" | "affiliate" | "agent";
1989
+ commissionModel: "fixed" | "percentage" | "markup" | "net";
1990
+ currency: string | null;
1991
+ amountCents: number | null;
1992
+ rateBasisPoints: number | null;
1993
+ status: "paid" | "void" | "pending" | "accrued" | "payable";
1994
+ payableAt: string | null;
1995
+ paidAt: string | null;
1996
+ notes: string | null;
1997
+ createdAt: string;
1998
+ updatedAt: string;
1999
+ };
2000
+ };
2001
+ outputFormat: "json";
2002
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2003
+ };
2004
+ };
2005
+ } & {
2006
+ "/booking-items/:bookingItemId/commissions/:commissionId": {
2007
+ $delete: {
2008
+ input: {
2009
+ param: {
2010
+ bookingItemId: string;
2011
+ } & {
2012
+ commissionId: string;
2013
+ };
2014
+ };
2015
+ output: {
2016
+ error: string;
2017
+ };
2018
+ outputFormat: "json";
2019
+ status: 404;
2020
+ } | {
2021
+ input: {
2022
+ param: {
2023
+ bookingItemId: string;
2024
+ } & {
2025
+ commissionId: string;
2026
+ };
2027
+ };
2028
+ output: {
2029
+ success: true;
2030
+ };
2031
+ outputFormat: "json";
2032
+ status: 200;
2033
+ };
2034
+ };
2035
+ } & {
2036
+ "/supplier-payments": {
2037
+ $get: {
2038
+ input: {};
2039
+ output: {
2040
+ data: {
2041
+ id: string;
2042
+ bookingId: string;
2043
+ supplierId: string | null;
2044
+ bookingSupplierStatusId: string | null;
2045
+ amountCents: number;
2046
+ currency: string;
2047
+ baseCurrency: string | null;
2048
+ baseAmountCents: number | null;
2049
+ fxRateSetId: string | null;
2050
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other";
2051
+ paymentInstrumentId: string | null;
2052
+ status: "pending" | "completed" | "failed" | "refunded";
2053
+ referenceNumber: string | null;
2054
+ paymentDate: string;
2055
+ notes: string | null;
2056
+ createdAt: string;
2057
+ updatedAt: string;
2058
+ }[];
2059
+ total: number;
2060
+ limit: number;
2061
+ offset: number;
2062
+ };
2063
+ outputFormat: "json";
2064
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2065
+ };
2066
+ };
2067
+ } & {
2068
+ "/supplier-payments": {
2069
+ $post: {
2070
+ input: {};
2071
+ output: {
2072
+ data: {
2073
+ id: string;
2074
+ supplierId: string | null;
2075
+ status: "pending" | "completed" | "failed" | "refunded";
2076
+ notes: string | null;
2077
+ createdAt: string;
2078
+ updatedAt: string;
2079
+ bookingId: string;
2080
+ currency: string;
2081
+ baseCurrency: string | null;
2082
+ fxRateSetId: string | null;
2083
+ amountCents: number;
2084
+ paymentInstrumentId: string | null;
2085
+ referenceNumber: string | null;
2086
+ baseAmountCents: number | null;
2087
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other";
2088
+ paymentDate: string;
2089
+ bookingSupplierStatusId: string | null;
2090
+ } | undefined;
2091
+ };
2092
+ outputFormat: "json";
2093
+ status: 201;
2094
+ };
2095
+ };
2096
+ } & {
2097
+ "/supplier-payments/:id": {
2098
+ $patch: {
2099
+ input: {
2100
+ param: {
2101
+ id: string;
2102
+ };
2103
+ };
2104
+ output: {
2105
+ error: string;
2106
+ };
2107
+ outputFormat: "json";
2108
+ status: 404;
2109
+ } | {
2110
+ input: {
2111
+ param: {
2112
+ id: string;
2113
+ };
2114
+ };
2115
+ output: {
2116
+ data: {
2117
+ id: string;
2118
+ bookingId: string;
2119
+ supplierId: string | null;
2120
+ bookingSupplierStatusId: string | null;
2121
+ amountCents: number;
2122
+ currency: string;
2123
+ baseCurrency: string | null;
2124
+ baseAmountCents: number | null;
2125
+ fxRateSetId: string | null;
2126
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other";
2127
+ paymentInstrumentId: string | null;
2128
+ status: "pending" | "completed" | "failed" | "refunded";
2129
+ referenceNumber: string | null;
2130
+ paymentDate: string;
2131
+ notes: string | null;
2132
+ createdAt: string;
2133
+ updatedAt: string;
2134
+ };
2135
+ };
2136
+ outputFormat: "json";
2137
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2138
+ };
2139
+ };
2140
+ } & {
2141
+ "/invoices": {
2142
+ $get: {
2143
+ input: {};
2144
+ output: {
2145
+ data: {
2146
+ id: string;
2147
+ invoiceNumber: string;
2148
+ invoiceType: "invoice" | "proforma" | "credit_note";
2149
+ seriesId: string | null;
2150
+ sequence: number | null;
2151
+ templateId: string | null;
2152
+ taxRegimeId: string | null;
2153
+ language: string | null;
2154
+ bookingId: string;
2155
+ personId: string | null;
2156
+ organizationId: string | null;
2157
+ status: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
2158
+ currency: string;
2159
+ baseCurrency: string | null;
2160
+ fxRateSetId: string | null;
2161
+ subtotalCents: number;
2162
+ baseSubtotalCents: number | null;
2163
+ taxCents: number;
2164
+ baseTaxCents: number | null;
2165
+ totalCents: number;
2166
+ baseTotalCents: number | null;
2167
+ paidCents: number;
2168
+ basePaidCents: number | null;
2169
+ balanceDueCents: number;
2170
+ baseBalanceDueCents: number | null;
2171
+ commissionPercent: number | null;
2172
+ commissionAmountCents: number | null;
2173
+ issueDate: string;
2174
+ dueDate: string;
2175
+ notes: string | null;
2176
+ createdAt: string;
2177
+ updatedAt: string;
2178
+ }[];
2179
+ total: number;
2180
+ limit: number;
2181
+ offset: number;
2182
+ };
2183
+ outputFormat: "json";
2184
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2185
+ };
2186
+ };
2187
+ } & {
2188
+ "/invoices": {
2189
+ $post: {
2190
+ input: {};
2191
+ output: {
2192
+ data: {
2193
+ id: string;
2194
+ personId: string | null;
2195
+ organizationId: string | null;
2196
+ status: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
2197
+ notes: string | null;
2198
+ createdAt: string;
2199
+ updatedAt: string;
2200
+ bookingId: string;
2201
+ invoiceNumber: string;
2202
+ invoiceType: "invoice" | "proforma" | "credit_note";
2203
+ seriesId: string | null;
2204
+ sequence: number | null;
2205
+ templateId: string | null;
2206
+ taxRegimeId: string | null;
2207
+ language: string | null;
2208
+ currency: string;
2209
+ baseCurrency: string | null;
2210
+ fxRateSetId: string | null;
2211
+ subtotalCents: number;
2212
+ baseSubtotalCents: number | null;
2213
+ taxCents: number;
2214
+ baseTaxCents: number | null;
2215
+ totalCents: number;
2216
+ baseTotalCents: number | null;
2217
+ paidCents: number;
2218
+ basePaidCents: number | null;
2219
+ balanceDueCents: number;
2220
+ baseBalanceDueCents: number | null;
2221
+ commissionPercent: number | null;
2222
+ commissionAmountCents: number | null;
2223
+ issueDate: string;
2224
+ dueDate: string;
2225
+ } | undefined;
2226
+ };
2227
+ outputFormat: "json";
2228
+ status: 201;
2229
+ };
2230
+ };
2231
+ } & {
2232
+ "/invoices/:id": {
2233
+ $get: {
2234
+ input: {
2235
+ param: {
2236
+ id: string;
2237
+ };
2238
+ };
2239
+ output: {
2240
+ error: string;
2241
+ };
2242
+ outputFormat: "json";
2243
+ status: 404;
2244
+ } | {
2245
+ input: {
2246
+ param: {
2247
+ id: string;
2248
+ };
2249
+ };
2250
+ output: {
2251
+ data: {
2252
+ id: string;
2253
+ invoiceNumber: string;
2254
+ invoiceType: "invoice" | "proforma" | "credit_note";
2255
+ seriesId: string | null;
2256
+ sequence: number | null;
2257
+ templateId: string | null;
2258
+ taxRegimeId: string | null;
2259
+ language: string | null;
2260
+ bookingId: string;
2261
+ personId: string | null;
2262
+ organizationId: string | null;
2263
+ status: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
2264
+ currency: string;
2265
+ baseCurrency: string | null;
2266
+ fxRateSetId: string | null;
2267
+ subtotalCents: number;
2268
+ baseSubtotalCents: number | null;
2269
+ taxCents: number;
2270
+ baseTaxCents: number | null;
2271
+ totalCents: number;
2272
+ baseTotalCents: number | null;
2273
+ paidCents: number;
2274
+ basePaidCents: number | null;
2275
+ balanceDueCents: number;
2276
+ baseBalanceDueCents: number | null;
2277
+ commissionPercent: number | null;
2278
+ commissionAmountCents: number | null;
2279
+ issueDate: string;
2280
+ dueDate: string;
2281
+ notes: string | null;
2282
+ createdAt: string;
2283
+ updatedAt: string;
2284
+ };
2285
+ };
2286
+ outputFormat: "json";
2287
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2288
+ };
2289
+ };
2290
+ } & {
2291
+ "/invoices/:id": {
2292
+ $patch: {
2293
+ input: {
2294
+ param: {
2295
+ id: string;
2296
+ };
2297
+ };
2298
+ output: {
2299
+ error: string;
2300
+ };
2301
+ outputFormat: "json";
2302
+ status: 404;
2303
+ } | {
2304
+ input: {
2305
+ param: {
2306
+ id: string;
2307
+ };
2308
+ };
2309
+ output: {
2310
+ data: {
2311
+ id: string;
2312
+ invoiceNumber: string;
2313
+ invoiceType: "invoice" | "proforma" | "credit_note";
2314
+ seriesId: string | null;
2315
+ sequence: number | null;
2316
+ templateId: string | null;
2317
+ taxRegimeId: string | null;
2318
+ language: string | null;
2319
+ bookingId: string;
2320
+ personId: string | null;
2321
+ organizationId: string | null;
2322
+ status: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
2323
+ currency: string;
2324
+ baseCurrency: string | null;
2325
+ fxRateSetId: string | null;
2326
+ subtotalCents: number;
2327
+ baseSubtotalCents: number | null;
2328
+ taxCents: number;
2329
+ baseTaxCents: number | null;
2330
+ totalCents: number;
2331
+ baseTotalCents: number | null;
2332
+ paidCents: number;
2333
+ basePaidCents: number | null;
2334
+ balanceDueCents: number;
2335
+ baseBalanceDueCents: number | null;
2336
+ commissionPercent: number | null;
2337
+ commissionAmountCents: number | null;
2338
+ issueDate: string;
2339
+ dueDate: string;
2340
+ notes: string | null;
2341
+ createdAt: string;
2342
+ updatedAt: string;
2343
+ };
2344
+ };
2345
+ outputFormat: "json";
2346
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2347
+ };
2348
+ };
2349
+ } & {
2350
+ "/invoices/:id": {
2351
+ $delete: {
2352
+ input: {
2353
+ param: {
2354
+ id: string;
2355
+ };
2356
+ };
2357
+ output: {
2358
+ error: string;
2359
+ };
2360
+ outputFormat: "json";
2361
+ status: 404;
2362
+ } | {
2363
+ input: {
2364
+ param: {
2365
+ id: string;
2366
+ };
2367
+ };
2368
+ output: {
2369
+ error: string;
2370
+ };
2371
+ outputFormat: "json";
2372
+ status: 400;
2373
+ } | {
2374
+ input: {
2375
+ param: {
2376
+ id: string;
2377
+ };
2378
+ };
2379
+ output: {
2380
+ success: true;
2381
+ };
2382
+ outputFormat: "json";
2383
+ status: 200;
2384
+ };
2385
+ };
2386
+ } & {
2387
+ "/invoices/:id/payment-session": {
2388
+ $post: {
2389
+ input: {
2390
+ param: {
2391
+ id: string;
2392
+ };
2393
+ };
2394
+ output: {
2395
+ error: string;
2396
+ };
2397
+ outputFormat: "json";
2398
+ status: 404;
2399
+ } | {
2400
+ input: {
2401
+ param: {
2402
+ id: string;
2403
+ };
2404
+ };
2405
+ output: {
2406
+ data: {
2407
+ id: string;
2408
+ status: "paid" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "cancelled" | "expired";
2409
+ provider: string | null;
2410
+ notes: string | null;
2411
+ metadata: {
2412
+ [x: string]: import("hono/utils/types").JSONValue;
2413
+ } | null;
2414
+ createdAt: string;
2415
+ updatedAt: string;
2416
+ targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
2417
+ targetId: string | null;
2418
+ bookingId: string | null;
2419
+ orderId: string | null;
2420
+ currency: string;
2421
+ invoiceId: string | null;
2422
+ amountCents: number;
2423
+ bookingPaymentScheduleId: string | null;
2424
+ paymentInstrumentId: string | null;
2425
+ bookingGuaranteeId: string | null;
2426
+ expiresAt: string | null;
2427
+ paymentAuthorizationId: string | null;
2428
+ paymentCaptureId: string | null;
2429
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other" | null;
2430
+ paymentId: string | null;
2431
+ providerSessionId: string | null;
2432
+ providerPaymentId: string | null;
2433
+ externalReference: string | null;
2434
+ idempotencyKey: string | null;
2435
+ clientReference: string | null;
2436
+ payerPersonId: string | null;
2437
+ payerOrganizationId: string | null;
2438
+ payerEmail: string | null;
2439
+ payerName: string | null;
2440
+ redirectUrl: string | null;
2441
+ returnUrl: string | null;
2442
+ cancelUrl: string | null;
2443
+ callbackUrl: string | null;
2444
+ completedAt: string | null;
2445
+ failedAt: string | null;
2446
+ cancelledAt: string | null;
2447
+ expiredAt: string | null;
2448
+ failureCode: string | null;
2449
+ failureMessage: string | null;
2450
+ providerPayload: {
2451
+ [x: string]: import("hono/utils/types").JSONValue;
2452
+ } | null;
2453
+ };
2454
+ };
2455
+ outputFormat: "json";
2456
+ status: 201;
2457
+ } | {
2458
+ input: {
2459
+ param: {
2460
+ id: string;
2461
+ };
2462
+ };
2463
+ output: {
2464
+ error: string;
2465
+ };
2466
+ outputFormat: "json";
2467
+ status: 409;
2468
+ };
2469
+ };
2470
+ } & {
2471
+ "/invoices/:id/line-items": {
2472
+ $get: {
2473
+ input: {
2474
+ param: {
2475
+ id: string;
2476
+ };
2477
+ };
2478
+ output: {
2479
+ data: {
2480
+ id: string;
2481
+ invoiceId: string;
2482
+ bookingItemId: string | null;
2483
+ description: string;
2484
+ quantity: number;
2485
+ unitPriceCents: number;
2486
+ totalCents: number;
2487
+ taxRate: number | null;
2488
+ sortOrder: number;
2489
+ createdAt: string;
2490
+ }[];
2491
+ };
2492
+ outputFormat: "json";
2493
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2494
+ };
2495
+ };
2496
+ } & {
2497
+ "/invoices/:id/line-items": {
2498
+ $post: {
2499
+ input: {
2500
+ param: {
2501
+ id: string;
2502
+ };
2503
+ };
2504
+ output: {
2505
+ error: string;
2506
+ };
2507
+ outputFormat: "json";
2508
+ status: 404;
2509
+ } | {
2510
+ input: {
2511
+ param: {
2512
+ id: string;
2513
+ };
2514
+ };
2515
+ output: {
2516
+ data: {
2517
+ id: string;
2518
+ createdAt: string;
2519
+ totalCents: number;
2520
+ invoiceId: string;
2521
+ bookingItemId: string | null;
2522
+ sortOrder: number;
2523
+ description: string;
2524
+ quantity: number;
2525
+ unitPriceCents: number;
2526
+ taxRate: number | null;
2527
+ };
2528
+ };
2529
+ outputFormat: "json";
2530
+ status: 201;
2531
+ };
2532
+ };
2533
+ } & {
2534
+ "/invoices/:id/line-items/:lineId": {
2535
+ $patch: {
2536
+ input: {
2537
+ param: {
2538
+ id: string;
2539
+ } & {
2540
+ lineId: string;
2541
+ };
2542
+ };
2543
+ output: {
2544
+ error: string;
2545
+ };
2546
+ outputFormat: "json";
2547
+ status: 404;
2548
+ } | {
2549
+ input: {
2550
+ param: {
2551
+ id: string;
2552
+ } & {
2553
+ lineId: string;
2554
+ };
2555
+ };
2556
+ output: {
2557
+ data: {
2558
+ id: string;
2559
+ invoiceId: string;
2560
+ bookingItemId: string | null;
2561
+ description: string;
2562
+ quantity: number;
2563
+ unitPriceCents: number;
2564
+ totalCents: number;
2565
+ taxRate: number | null;
2566
+ sortOrder: number;
2567
+ createdAt: string;
2568
+ };
2569
+ };
2570
+ outputFormat: "json";
2571
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2572
+ };
2573
+ };
2574
+ } & {
2575
+ "/invoices/:id/line-items/:lineId": {
2576
+ $delete: {
2577
+ input: {
2578
+ param: {
2579
+ id: string;
2580
+ } & {
2581
+ lineId: string;
2582
+ };
2583
+ };
2584
+ output: {
2585
+ error: string;
2586
+ };
2587
+ outputFormat: "json";
2588
+ status: 404;
2589
+ } | {
2590
+ input: {
2591
+ param: {
2592
+ id: string;
2593
+ } & {
2594
+ lineId: string;
2595
+ };
2596
+ };
2597
+ output: {
2598
+ success: true;
2599
+ };
2600
+ outputFormat: "json";
2601
+ status: 200;
2602
+ };
2603
+ };
2604
+ } & {
2605
+ "/invoices/:id/payments": {
2606
+ $get: {
2607
+ input: {
2608
+ param: {
2609
+ id: string;
2610
+ };
2611
+ };
2612
+ output: {
2613
+ data: {
2614
+ id: string;
2615
+ invoiceId: string;
2616
+ amountCents: number;
2617
+ currency: string;
2618
+ baseCurrency: string | null;
2619
+ baseAmountCents: number | null;
2620
+ fxRateSetId: string | null;
2621
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other";
2622
+ paymentInstrumentId: string | null;
2623
+ paymentAuthorizationId: string | null;
2624
+ paymentCaptureId: string | null;
2625
+ status: "pending" | "completed" | "failed" | "refunded";
2626
+ referenceNumber: string | null;
2627
+ paymentDate: string;
2628
+ notes: string | null;
2629
+ createdAt: string;
2630
+ updatedAt: string;
2631
+ }[];
2632
+ };
2633
+ outputFormat: "json";
2634
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2635
+ };
2636
+ };
2637
+ } & {
2638
+ "/invoices/:id/payments": {
2639
+ $post: {
2640
+ input: {
2641
+ param: {
2642
+ id: string;
2643
+ };
2644
+ };
2645
+ output: {
2646
+ error: string;
2647
+ };
2648
+ outputFormat: "json";
2649
+ status: 404;
2650
+ } | {
2651
+ input: {
2652
+ param: {
2653
+ id: string;
2654
+ };
2655
+ };
2656
+ output: {
2657
+ data: {
2658
+ id: string;
2659
+ status: "pending" | "completed" | "failed" | "refunded";
2660
+ notes: string | null;
2661
+ createdAt: string;
2662
+ updatedAt: string;
2663
+ currency: string;
2664
+ baseCurrency: string | null;
2665
+ fxRateSetId: string | null;
2666
+ invoiceId: string;
2667
+ amountCents: number;
2668
+ paymentInstrumentId: string | null;
2669
+ paymentAuthorizationId: string | null;
2670
+ referenceNumber: string | null;
2671
+ paymentCaptureId: string | null;
2672
+ baseAmountCents: number | null;
2673
+ paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other";
2674
+ paymentDate: string;
2675
+ };
2676
+ };
2677
+ outputFormat: "json";
2678
+ status: 201;
2679
+ };
2680
+ };
2681
+ } & {
2682
+ "/invoices/:id/credit-notes": {
2683
+ $get: {
2684
+ input: {
2685
+ param: {
2686
+ id: string;
2687
+ };
2688
+ };
2689
+ output: {
2690
+ data: {
2691
+ id: string;
2692
+ creditNoteNumber: string;
2693
+ invoiceId: string;
2694
+ status: "draft" | "issued" | "applied";
2695
+ amountCents: number;
2696
+ currency: string;
2697
+ baseCurrency: string | null;
2698
+ baseAmountCents: number | null;
2699
+ fxRateSetId: string | null;
2700
+ reason: string;
2701
+ notes: string | null;
2702
+ createdAt: string;
2703
+ updatedAt: string;
2704
+ }[];
2705
+ };
2706
+ outputFormat: "json";
2707
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2708
+ };
2709
+ };
2710
+ } & {
2711
+ "/invoices/:id/credit-notes": {
2712
+ $post: {
2713
+ input: {
2714
+ param: {
2715
+ id: string;
2716
+ };
2717
+ };
2718
+ output: {
2719
+ error: string;
2720
+ };
2721
+ outputFormat: "json";
2722
+ status: 404;
2723
+ } | {
2724
+ input: {
2725
+ param: {
2726
+ id: string;
2727
+ };
2728
+ };
2729
+ output: {
2730
+ data: {
2731
+ id: string;
2732
+ status: "draft" | "issued" | "applied";
2733
+ notes: string | null;
2734
+ createdAt: string;
2735
+ updatedAt: string;
2736
+ currency: string;
2737
+ baseCurrency: string | null;
2738
+ fxRateSetId: string | null;
2739
+ invoiceId: string;
2740
+ amountCents: number;
2741
+ baseAmountCents: number | null;
2742
+ creditNoteNumber: string;
2743
+ reason: string;
2744
+ };
2745
+ };
2746
+ outputFormat: "json";
2747
+ status: 201;
2748
+ };
2749
+ };
2750
+ } & {
2751
+ "/invoices/:id/credit-notes/:creditNoteId": {
2752
+ $patch: {
2753
+ input: {
2754
+ param: {
2755
+ id: string;
2756
+ } & {
2757
+ creditNoteId: string;
2758
+ };
2759
+ };
2760
+ output: {
2761
+ error: string;
2762
+ };
2763
+ outputFormat: "json";
2764
+ status: 404;
2765
+ } | {
2766
+ input: {
2767
+ param: {
2768
+ id: string;
2769
+ } & {
2770
+ creditNoteId: string;
2771
+ };
2772
+ };
2773
+ output: {
2774
+ data: {
2775
+ id: string;
2776
+ creditNoteNumber: string;
2777
+ invoiceId: string;
2778
+ status: "draft" | "issued" | "applied";
2779
+ amountCents: number;
2780
+ currency: string;
2781
+ baseCurrency: string | null;
2782
+ baseAmountCents: number | null;
2783
+ fxRateSetId: string | null;
2784
+ reason: string;
2785
+ notes: string | null;
2786
+ createdAt: string;
2787
+ updatedAt: string;
2788
+ };
2789
+ };
2790
+ outputFormat: "json";
2791
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2792
+ };
2793
+ };
2794
+ } & {
2795
+ "/invoices/:id/credit-notes/:creditNoteId/line-items": {
2796
+ $get: {
2797
+ input: {
2798
+ param: {
2799
+ id: string;
2800
+ } & {
2801
+ creditNoteId: string;
2802
+ };
2803
+ };
2804
+ output: {
2805
+ data: {
2806
+ id: string;
2807
+ creditNoteId: string;
2808
+ description: string;
2809
+ quantity: number;
2810
+ unitPriceCents: number;
2811
+ totalCents: number;
2812
+ sortOrder: number;
2813
+ createdAt: string;
2814
+ }[];
2815
+ };
2816
+ outputFormat: "json";
2817
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2818
+ };
2819
+ };
2820
+ } & {
2821
+ "/invoices/:id/credit-notes/:creditNoteId/line-items": {
2822
+ $post: {
2823
+ input: {
2824
+ param: {
2825
+ id: string;
2826
+ } & {
2827
+ creditNoteId: string;
2828
+ };
2829
+ };
2830
+ output: {
2831
+ error: string;
2832
+ };
2833
+ outputFormat: "json";
2834
+ status: 404;
2835
+ } | {
2836
+ input: {
2837
+ param: {
2838
+ id: string;
2839
+ } & {
2840
+ creditNoteId: string;
2841
+ };
2842
+ };
2843
+ output: {
2844
+ data: {
2845
+ id: string;
2846
+ createdAt: string;
2847
+ totalCents: number;
2848
+ sortOrder: number;
2849
+ description: string;
2850
+ quantity: number;
2851
+ unitPriceCents: number;
2852
+ creditNoteId: string;
2853
+ };
2854
+ };
2855
+ outputFormat: "json";
2856
+ status: 201;
2857
+ };
2858
+ };
2859
+ } & {
2860
+ "/invoices/:id/notes": {
2861
+ $get: {
2862
+ input: {
2863
+ param: {
2864
+ id: string;
2865
+ };
2866
+ };
2867
+ output: {
2868
+ data: {
2869
+ id: string;
2870
+ invoiceId: string;
2871
+ authorId: string;
2872
+ content: string;
2873
+ createdAt: string;
2874
+ }[];
2875
+ };
2876
+ outputFormat: "json";
2877
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2878
+ };
2879
+ };
2880
+ } & {
2881
+ "/invoices/:id/notes": {
2882
+ $post: {
2883
+ input: {
2884
+ param: {
2885
+ id: string;
2886
+ };
2887
+ };
2888
+ output: {
2889
+ error: string;
2890
+ };
2891
+ outputFormat: "json";
2892
+ status: 400;
2893
+ } | {
2894
+ input: {
2895
+ param: {
2896
+ id: string;
2897
+ };
2898
+ };
2899
+ output: {
2900
+ error: string;
2901
+ };
2902
+ outputFormat: "json";
2903
+ status: 404;
2904
+ } | {
2905
+ input: {
2906
+ param: {
2907
+ id: string;
2908
+ };
2909
+ };
2910
+ output: {
2911
+ data: {
2912
+ id: string;
2913
+ createdAt: string;
2914
+ invoiceId: string;
2915
+ authorId: string;
2916
+ content: string;
2917
+ };
2918
+ };
2919
+ outputFormat: "json";
2920
+ status: 201;
2921
+ };
2922
+ };
2923
+ } & {
2924
+ "/invoice-number-series": {
2925
+ $get: {
2926
+ input: {};
2927
+ output: {
2928
+ data: {
2929
+ id: string;
2930
+ code: string;
2931
+ name: string;
2932
+ prefix: string;
2933
+ separator: string;
2934
+ padLength: number;
2935
+ currentSequence: number;
2936
+ resetStrategy: "never" | "annual" | "monthly";
2937
+ resetAt: string | null;
2938
+ scope: "invoice" | "proforma" | "credit_note";
2939
+ active: boolean;
2940
+ createdAt: string;
2941
+ updatedAt: string;
2942
+ }[];
2943
+ total: number;
2944
+ limit: number;
2945
+ offset: number;
2946
+ };
2947
+ outputFormat: "json";
2948
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2949
+ };
2950
+ };
2951
+ } & {
2952
+ "/invoice-number-series": {
2953
+ $post: {
2954
+ input: {};
2955
+ output: {
2956
+ data: {
2957
+ id: string;
2958
+ name: string;
2959
+ active: boolean;
2960
+ createdAt: string;
2961
+ updatedAt: string;
2962
+ code: string;
2963
+ scope: "invoice" | "proforma" | "credit_note";
2964
+ prefix: string;
2965
+ separator: string;
2966
+ padLength: number;
2967
+ currentSequence: number;
2968
+ resetStrategy: "never" | "annual" | "monthly";
2969
+ resetAt: string | null;
2970
+ } | null;
2971
+ };
2972
+ outputFormat: "json";
2973
+ status: 201;
2974
+ };
2975
+ };
2976
+ } & {
2977
+ "/invoice-number-series/:id": {
2978
+ $get: {
2979
+ input: {
2980
+ param: {
2981
+ id: string;
2982
+ };
2983
+ };
2984
+ output: {
2985
+ error: string;
2986
+ };
2987
+ outputFormat: "json";
2988
+ status: 404;
2989
+ } | {
2990
+ input: {
2991
+ param: {
2992
+ id: string;
2993
+ };
2994
+ };
2995
+ output: {
2996
+ data: {
2997
+ id: string;
2998
+ code: string;
2999
+ name: string;
3000
+ prefix: string;
3001
+ separator: string;
3002
+ padLength: number;
3003
+ currentSequence: number;
3004
+ resetStrategy: "never" | "annual" | "monthly";
3005
+ resetAt: string | null;
3006
+ scope: "invoice" | "proforma" | "credit_note";
3007
+ active: boolean;
3008
+ createdAt: string;
3009
+ updatedAt: string;
3010
+ };
3011
+ };
3012
+ outputFormat: "json";
3013
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3014
+ };
3015
+ };
3016
+ } & {
3017
+ "/invoice-number-series/:id": {
3018
+ $patch: {
3019
+ input: {
3020
+ param: {
3021
+ id: string;
3022
+ };
3023
+ };
3024
+ output: {
3025
+ error: string;
3026
+ };
3027
+ outputFormat: "json";
3028
+ status: 404;
3029
+ } | {
3030
+ input: {
3031
+ param: {
3032
+ id: string;
3033
+ };
3034
+ };
3035
+ output: {
3036
+ data: {
3037
+ id: string;
3038
+ code: string;
3039
+ name: string;
3040
+ prefix: string;
3041
+ separator: string;
3042
+ padLength: number;
3043
+ currentSequence: number;
3044
+ resetStrategy: "never" | "annual" | "monthly";
3045
+ resetAt: string | null;
3046
+ scope: "invoice" | "proforma" | "credit_note";
3047
+ active: boolean;
3048
+ createdAt: string;
3049
+ updatedAt: string;
3050
+ };
3051
+ };
3052
+ outputFormat: "json";
3053
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3054
+ };
3055
+ };
3056
+ } & {
3057
+ "/invoice-number-series/:id": {
3058
+ $delete: {
3059
+ input: {
3060
+ param: {
3061
+ id: string;
3062
+ };
3063
+ };
3064
+ output: {
3065
+ error: string;
3066
+ };
3067
+ outputFormat: "json";
3068
+ status: 404;
3069
+ } | {
3070
+ input: {
3071
+ param: {
3072
+ id: string;
3073
+ };
3074
+ };
3075
+ output: {
3076
+ success: true;
3077
+ };
3078
+ outputFormat: "json";
3079
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3080
+ };
3081
+ };
3082
+ } & {
3083
+ "/invoice-number-series/:id/allocate": {
3084
+ $post: {
3085
+ input: {
3086
+ param: {
3087
+ id: string;
3088
+ };
3089
+ };
3090
+ output: {
3091
+ error: string;
3092
+ };
3093
+ outputFormat: "json";
3094
+ status: 404;
3095
+ } | {
3096
+ input: {
3097
+ param: {
3098
+ id: string;
3099
+ };
3100
+ };
3101
+ output: {
3102
+ error: string;
3103
+ };
3104
+ outputFormat: "json";
3105
+ status: 409;
3106
+ } | {
3107
+ input: {
3108
+ param: {
3109
+ id: string;
3110
+ };
3111
+ };
3112
+ output: {
3113
+ data: {
3114
+ sequence: number;
3115
+ formattedNumber: string;
3116
+ };
3117
+ };
3118
+ outputFormat: "json";
3119
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3120
+ };
3121
+ };
3122
+ } & {
3123
+ "/invoice-templates": {
3124
+ $get: {
3125
+ input: {};
3126
+ output: {
3127
+ data: {
3128
+ id: string;
3129
+ name: string;
3130
+ slug: string;
3131
+ language: string;
3132
+ jurisdiction: string | null;
3133
+ bodyFormat: "html" | "markdown" | "lexical_json";
3134
+ body: string;
3135
+ cssStyles: string | null;
3136
+ isDefault: boolean;
3137
+ active: boolean;
3138
+ metadata: import("hono/utils/types").JSONValue;
3139
+ createdAt: string;
3140
+ updatedAt: string;
3141
+ }[];
3142
+ total: number;
3143
+ limit: number;
3144
+ offset: number;
3145
+ };
3146
+ outputFormat: "json";
3147
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3148
+ };
3149
+ };
3150
+ } & {
3151
+ "/invoice-templates": {
3152
+ $post: {
3153
+ input: {};
3154
+ output: {
3155
+ data: {
3156
+ id: string;
3157
+ name: string;
3158
+ active: boolean;
3159
+ metadata: import("hono/utils/types").JSONValue;
3160
+ createdAt: string;
3161
+ updatedAt: string;
3162
+ language: string;
3163
+ jurisdiction: string | null;
3164
+ slug: string;
3165
+ bodyFormat: "html" | "markdown" | "lexical_json";
3166
+ body: string;
3167
+ cssStyles: string | null;
3168
+ isDefault: boolean;
3169
+ } | null;
3170
+ };
3171
+ outputFormat: "json";
3172
+ status: 201;
3173
+ };
3174
+ };
3175
+ } & {
3176
+ "/invoice-templates/:id": {
3177
+ $get: {
3178
+ input: {
3179
+ param: {
3180
+ id: string;
3181
+ };
3182
+ };
3183
+ output: {
3184
+ error: string;
3185
+ };
3186
+ outputFormat: "json";
3187
+ status: 404;
3188
+ } | {
3189
+ input: {
3190
+ param: {
3191
+ id: string;
3192
+ };
3193
+ };
3194
+ output: {
3195
+ data: {
3196
+ id: string;
3197
+ name: string;
3198
+ slug: string;
3199
+ language: string;
3200
+ jurisdiction: string | null;
3201
+ bodyFormat: "html" | "markdown" | "lexical_json";
3202
+ body: string;
3203
+ cssStyles: string | null;
3204
+ isDefault: boolean;
3205
+ active: boolean;
3206
+ metadata: import("hono/utils/types").JSONValue;
3207
+ createdAt: string;
3208
+ updatedAt: string;
3209
+ };
3210
+ };
3211
+ outputFormat: "json";
3212
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3213
+ };
3214
+ };
3215
+ } & {
3216
+ "/invoice-templates/:id": {
3217
+ $patch: {
3218
+ input: {
3219
+ param: {
3220
+ id: string;
3221
+ };
3222
+ };
3223
+ output: {
3224
+ error: string;
3225
+ };
3226
+ outputFormat: "json";
3227
+ status: 404;
3228
+ } | {
3229
+ input: {
3230
+ param: {
3231
+ id: string;
3232
+ };
3233
+ };
3234
+ output: {
3235
+ data: {
3236
+ id: string;
3237
+ name: string;
3238
+ slug: string;
3239
+ language: string;
3240
+ jurisdiction: string | null;
3241
+ bodyFormat: "html" | "markdown" | "lexical_json";
3242
+ body: string;
3243
+ cssStyles: string | null;
3244
+ isDefault: boolean;
3245
+ active: boolean;
3246
+ metadata: import("hono/utils/types").JSONValue;
3247
+ createdAt: string;
3248
+ updatedAt: string;
3249
+ };
3250
+ };
3251
+ outputFormat: "json";
3252
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3253
+ };
3254
+ };
3255
+ } & {
3256
+ "/invoice-templates/:id": {
3257
+ $delete: {
3258
+ input: {
3259
+ param: {
3260
+ id: string;
3261
+ };
3262
+ };
3263
+ output: {
3264
+ error: string;
3265
+ };
3266
+ outputFormat: "json";
3267
+ status: 404;
3268
+ } | {
3269
+ input: {
3270
+ param: {
3271
+ id: string;
3272
+ };
3273
+ };
3274
+ output: {
3275
+ success: true;
3276
+ };
3277
+ outputFormat: "json";
3278
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3279
+ };
3280
+ };
3281
+ } & {
3282
+ "/tax-regimes": {
3283
+ $get: {
3284
+ input: {};
3285
+ output: {
3286
+ data: {
3287
+ id: string;
3288
+ code: "other" | "standard" | "reduced" | "exempt" | "reverse_charge" | "margin_scheme_art311" | "zero_rated" | "out_of_scope";
3289
+ name: string;
3290
+ jurisdiction: string | null;
3291
+ ratePercent: number | null;
3292
+ description: string | null;
3293
+ legalReference: string | null;
3294
+ active: boolean;
3295
+ metadata: import("hono/utils/types").JSONValue;
3296
+ createdAt: string;
3297
+ updatedAt: string;
3298
+ }[];
3299
+ total: number;
3300
+ limit: number;
3301
+ offset: number;
3302
+ };
3303
+ outputFormat: "json";
3304
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3305
+ };
3306
+ };
3307
+ } & {
3308
+ "/tax-regimes": {
3309
+ $post: {
3310
+ input: {};
3311
+ output: {
3312
+ data: {
3313
+ id: string;
3314
+ name: string;
3315
+ active: boolean;
3316
+ metadata: import("hono/utils/types").JSONValue;
3317
+ createdAt: string;
3318
+ updatedAt: string;
3319
+ code: "other" | "standard" | "reduced" | "exempt" | "reverse_charge" | "margin_scheme_art311" | "zero_rated" | "out_of_scope";
3320
+ jurisdiction: string | null;
3321
+ description: string | null;
3322
+ ratePercent: number | null;
3323
+ legalReference: string | null;
3324
+ } | null;
3325
+ };
3326
+ outputFormat: "json";
3327
+ status: 201;
3328
+ };
3329
+ };
3330
+ } & {
3331
+ "/tax-regimes/:id": {
3332
+ $get: {
3333
+ input: {
3334
+ param: {
3335
+ id: string;
3336
+ };
3337
+ };
3338
+ output: {
3339
+ error: string;
3340
+ };
3341
+ outputFormat: "json";
3342
+ status: 404;
3343
+ } | {
3344
+ input: {
3345
+ param: {
3346
+ id: string;
3347
+ };
3348
+ };
3349
+ output: {
3350
+ data: {
3351
+ id: string;
3352
+ code: "other" | "standard" | "reduced" | "exempt" | "reverse_charge" | "margin_scheme_art311" | "zero_rated" | "out_of_scope";
3353
+ name: string;
3354
+ jurisdiction: string | null;
3355
+ ratePercent: number | null;
3356
+ description: string | null;
3357
+ legalReference: string | null;
3358
+ active: boolean;
3359
+ metadata: import("hono/utils/types").JSONValue;
3360
+ createdAt: string;
3361
+ updatedAt: string;
3362
+ };
3363
+ };
3364
+ outputFormat: "json";
3365
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3366
+ };
3367
+ };
3368
+ } & {
3369
+ "/tax-regimes/:id": {
3370
+ $patch: {
3371
+ input: {
3372
+ param: {
3373
+ id: string;
3374
+ };
3375
+ };
3376
+ output: {
3377
+ error: string;
3378
+ };
3379
+ outputFormat: "json";
3380
+ status: 404;
3381
+ } | {
3382
+ input: {
3383
+ param: {
3384
+ id: string;
3385
+ };
3386
+ };
3387
+ output: {
3388
+ data: {
3389
+ id: string;
3390
+ code: "other" | "standard" | "reduced" | "exempt" | "reverse_charge" | "margin_scheme_art311" | "zero_rated" | "out_of_scope";
3391
+ name: string;
3392
+ jurisdiction: string | null;
3393
+ ratePercent: number | null;
3394
+ description: string | null;
3395
+ legalReference: string | null;
3396
+ active: boolean;
3397
+ metadata: import("hono/utils/types").JSONValue;
3398
+ createdAt: string;
3399
+ updatedAt: string;
3400
+ };
3401
+ };
3402
+ outputFormat: "json";
3403
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3404
+ };
3405
+ };
3406
+ } & {
3407
+ "/tax-regimes/:id": {
3408
+ $delete: {
3409
+ input: {
3410
+ param: {
3411
+ id: string;
3412
+ };
3413
+ };
3414
+ output: {
3415
+ error: string;
3416
+ };
3417
+ outputFormat: "json";
3418
+ status: 404;
3419
+ } | {
3420
+ input: {
3421
+ param: {
3422
+ id: string;
3423
+ };
3424
+ };
3425
+ output: {
3426
+ success: true;
3427
+ };
3428
+ outputFormat: "json";
3429
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3430
+ };
3431
+ };
3432
+ } & {
3433
+ "/invoices/:id/renditions": {
3434
+ $get: {
3435
+ input: {
3436
+ param: {
3437
+ id: string;
3438
+ };
3439
+ };
3440
+ output: {
3441
+ data: {
3442
+ id: string;
3443
+ invoiceId: string;
3444
+ templateId: string | null;
3445
+ format: "html" | "pdf" | "xml" | "json";
3446
+ status: "pending" | "failed" | "ready" | "stale";
3447
+ storageKey: string | null;
3448
+ fileSize: number | null;
3449
+ checksum: string | null;
3450
+ language: string | null;
3451
+ errorMessage: string | null;
3452
+ generatedAt: string | null;
3453
+ metadata: import("hono/utils/types").JSONValue;
3454
+ createdAt: string;
3455
+ updatedAt: string;
3456
+ }[];
3457
+ };
3458
+ outputFormat: "json";
3459
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3460
+ };
3461
+ };
3462
+ } & {
3463
+ "/invoices/:id/render": {
3464
+ $post: {
3465
+ input: {
3466
+ param: {
3467
+ id: string;
3468
+ };
3469
+ };
3470
+ output: {
3471
+ error: string;
3472
+ };
3473
+ outputFormat: "json";
3474
+ status: 404;
3475
+ } | {
3476
+ input: {
3477
+ param: {
3478
+ id: string;
3479
+ };
3480
+ };
3481
+ output: {
3482
+ data: {
3483
+ format: "html" | "pdf" | "xml" | "json";
3484
+ id: string;
3485
+ status: "pending" | "failed" | "ready" | "stale";
3486
+ metadata: import("hono/utils/types").JSONValue;
3487
+ createdAt: string;
3488
+ updatedAt: string;
3489
+ templateId: string | null;
3490
+ language: string | null;
3491
+ invoiceId: string;
3492
+ storageKey: string | null;
3493
+ fileSize: number | null;
3494
+ checksum: string | null;
3495
+ errorMessage: string | null;
3496
+ generatedAt: string | null;
3497
+ } | null;
3498
+ };
3499
+ outputFormat: "json";
3500
+ status: 201;
3501
+ };
3502
+ };
3503
+ } & {
3504
+ "/invoices/:id/external-refs": {
3505
+ $get: {
3506
+ input: {
3507
+ param: {
3508
+ id: string;
3509
+ };
3510
+ };
3511
+ output: {
3512
+ data: {
3513
+ id: string;
3514
+ invoiceId: string;
3515
+ provider: string;
3516
+ externalId: string | null;
3517
+ externalNumber: string | null;
3518
+ externalUrl: string | null;
3519
+ status: string | null;
3520
+ metadata: import("hono/utils/types").JSONValue;
3521
+ syncedAt: string | null;
3522
+ syncError: string | null;
3523
+ createdAt: string;
3524
+ updatedAt: string;
3525
+ }[];
3526
+ };
3527
+ outputFormat: "json";
3528
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3529
+ };
3530
+ };
3531
+ } & {
3532
+ "/invoices/:id/external-refs": {
3533
+ $post: {
3534
+ input: {
3535
+ param: {
3536
+ id: string;
3537
+ };
3538
+ };
3539
+ output: {
3540
+ error: string;
3541
+ };
3542
+ outputFormat: "json";
3543
+ status: 404;
3544
+ } | {
3545
+ input: {
3546
+ param: {
3547
+ id: string;
3548
+ };
3549
+ };
3550
+ output: {
3551
+ data: {
3552
+ id: string;
3553
+ status: string | null;
3554
+ provider: string;
3555
+ metadata: import("hono/utils/types").JSONValue;
3556
+ createdAt: string;
3557
+ updatedAt: string;
3558
+ invoiceId: string;
3559
+ externalId: string | null;
3560
+ externalNumber: string | null;
3561
+ externalUrl: string | null;
3562
+ syncedAt: string | null;
3563
+ syncError: string | null;
3564
+ };
3565
+ };
3566
+ outputFormat: "json";
3567
+ status: 201;
3568
+ };
3569
+ };
3570
+ } & {
3571
+ "/invoices/:id/external-refs/:refId": {
3572
+ $delete: {
3573
+ input: {
3574
+ param: {
3575
+ id: string;
3576
+ } & {
3577
+ refId: string;
3578
+ };
3579
+ };
3580
+ output: {
3581
+ error: string;
3582
+ };
3583
+ outputFormat: "json";
3584
+ status: 404;
3585
+ } | {
3586
+ input: {
3587
+ param: {
3588
+ id: string;
3589
+ } & {
3590
+ refId: string;
3591
+ };
3592
+ };
3593
+ output: {
3594
+ success: true;
3595
+ };
3596
+ outputFormat: "json";
3597
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3598
+ };
3599
+ };
3600
+ }, "/", "/invoices/:id/external-refs/:refId">;
3601
+ export type FinanceRoutes = typeof financeRoutes;
3602
+ export {};
3603
+ //# sourceMappingURL=routes.d.ts.map