@voyant-travel/notifications 0.111.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +179 -0
  3. package/dist/index.d.ts +61 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +196 -0
  6. package/dist/liquid.d.ts +5 -0
  7. package/dist/liquid.d.ts.map +1 -0
  8. package/dist/liquid.js +156 -0
  9. package/dist/providers/local.d.ts +22 -0
  10. package/dist/providers/local.d.ts.map +1 -0
  11. package/dist/providers/local.js +23 -0
  12. package/dist/providers/voyant-cloud-email.d.ts +27 -0
  13. package/dist/providers/voyant-cloud-email.d.ts.map +1 -0
  14. package/dist/providers/voyant-cloud-email.js +73 -0
  15. package/dist/providers/voyant-cloud-sms.d.ts +26 -0
  16. package/dist/providers/voyant-cloud-sms.d.ts.map +1 -0
  17. package/dist/providers/voyant-cloud-sms.js +24 -0
  18. package/dist/routes.d.ts +1546 -0
  19. package/dist/routes.d.ts.map +1 -0
  20. package/dist/routes.js +337 -0
  21. package/dist/schema.d.ts +2119 -0
  22. package/dist/schema.d.ts.map +1 -0
  23. package/dist/schema.js +356 -0
  24. package/dist/service-booking-document-lifecycle.d.ts +99 -0
  25. package/dist/service-booking-document-lifecycle.d.ts.map +1 -0
  26. package/dist/service-booking-document-lifecycle.js +259 -0
  27. package/dist/service-booking-documents.d.ts +256 -0
  28. package/dist/service-booking-documents.d.ts.map +1 -0
  29. package/dist/service-booking-documents.js +323 -0
  30. package/dist/service-deliveries.d.ts +183 -0
  31. package/dist/service-deliveries.d.ts.map +1 -0
  32. package/dist/service-deliveries.js +413 -0
  33. package/dist/service-delivery-metadata.d.ts +42 -0
  34. package/dist/service-delivery-metadata.d.ts.map +1 -0
  35. package/dist/service-delivery-metadata.js +114 -0
  36. package/dist/service-reminder-authoring.d.ts +33 -0
  37. package/dist/service-reminder-authoring.d.ts.map +1 -0
  38. package/dist/service-reminder-authoring.js +247 -0
  39. package/dist/service-reminder-booking-context.d.ts +94 -0
  40. package/dist/service-reminder-booking-context.d.ts.map +1 -0
  41. package/dist/service-reminder-booking-context.js +164 -0
  42. package/dist/service-reminder-events.d.ts +33 -0
  43. package/dist/service-reminder-events.d.ts.map +1 -0
  44. package/dist/service-reminder-events.js +178 -0
  45. package/dist/service-reminder-run-state.d.ts +114 -0
  46. package/dist/service-reminder-run-state.d.ts.map +1 -0
  47. package/dist/service-reminder-run-state.js +100 -0
  48. package/dist/service-reminder-stage-runs.d.ts +6 -0
  49. package/dist/service-reminder-stage-runs.d.ts.map +1 -0
  50. package/dist/service-reminder-stage-runs.js +310 -0
  51. package/dist/service-reminders.d.ts +30 -0
  52. package/dist/service-reminders.d.ts.map +1 -0
  53. package/dist/service-reminders.js +189 -0
  54. package/dist/service-sequence-targets.d.ts +50 -0
  55. package/dist/service-sequence-targets.d.ts.map +1 -0
  56. package/dist/service-sequence-targets.js +136 -0
  57. package/dist/service-sequence.d.ts +68 -0
  58. package/dist/service-sequence.d.ts.map +1 -0
  59. package/dist/service-sequence.js +316 -0
  60. package/dist/service-shared.d.ts +107 -0
  61. package/dist/service-shared.d.ts.map +1 -0
  62. package/dist/service-shared.js +159 -0
  63. package/dist/service-stages.d.ts +23 -0
  64. package/dist/service-stages.d.ts.map +1 -0
  65. package/dist/service-stages.js +203 -0
  66. package/dist/service-template-data.d.ts +19 -0
  67. package/dist/service-template-data.d.ts.map +1 -0
  68. package/dist/service-template-data.js +278 -0
  69. package/dist/service-templates.d.ts +260 -0
  70. package/dist/service-templates.d.ts.map +1 -0
  71. package/dist/service-templates.js +293 -0
  72. package/dist/service.d.ts +273 -0
  73. package/dist/service.d.ts.map +1 -0
  74. package/dist/service.js +51 -0
  75. package/dist/task-runtime.d.ts +19 -0
  76. package/dist/task-runtime.d.ts.map +1 -0
  77. package/dist/task-runtime.js +11 -0
  78. package/dist/tasks/deliver-reminder.d.ts +9 -0
  79. package/dist/tasks/deliver-reminder.d.ts.map +1 -0
  80. package/dist/tasks/deliver-reminder.js +12 -0
  81. package/dist/tasks/index.d.ts +3 -0
  82. package/dist/tasks/index.d.ts.map +1 -0
  83. package/dist/tasks/index.js +2 -0
  84. package/dist/tasks/send-due-reminders.d.ts +7 -0
  85. package/dist/tasks/send-due-reminders.d.ts.map +1 -0
  86. package/dist/tasks/send-due-reminders.js +31 -0
  87. package/dist/template-authoring.d.ts +23 -0
  88. package/dist/template-authoring.d.ts.map +1 -0
  89. package/dist/template-authoring.js +386 -0
  90. package/dist/types.d.ts +82 -0
  91. package/dist/types.d.ts.map +1 -0
  92. package/dist/types.js +1 -0
  93. package/dist/validation.d.ts +1093 -0
  94. package/dist/validation.d.ts.map +1 -0
  95. package/dist/validation.js +451 -0
  96. package/package.json +102 -0
@@ -0,0 +1,1546 @@
1
+ import type { EventBus, ModuleContainer } from "@voyant-travel/core";
2
+ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
3
+ import type { BookingDocumentAttachmentResolver } from "./service-booking-documents.js";
4
+ import type { NotificationProvider } from "./types.js";
5
+ type Env = {
6
+ Bindings: Record<string, unknown>;
7
+ Variables: {
8
+ container: ModuleContainer;
9
+ db: PostgresJsDatabase;
10
+ userId?: string;
11
+ };
12
+ };
13
+ export type NotificationsRoutesOptions = {
14
+ providers?: ReadonlyArray<NotificationProvider>;
15
+ resolveProviders?: (bindings: Record<string, unknown>) => ReadonlyArray<NotificationProvider>;
16
+ publicCheckoutBaseUrl?: string | null;
17
+ resolvePublicCheckoutBaseUrl?: (bindings: Record<string, unknown>) => string | null | undefined;
18
+ documentAttachmentResolver?: BookingDocumentAttachmentResolver;
19
+ resolveDocumentAttachmentResolver?: (bindings: Record<string, unknown>) => BookingDocumentAttachmentResolver | undefined;
20
+ eventBus?: EventBus;
21
+ resolveEventBus?: (bindings: Record<string, unknown>) => EventBus | undefined;
22
+ };
23
+ export type NotificationsRouteRuntime = {
24
+ providers: ReadonlyArray<NotificationProvider>;
25
+ publicCheckoutBaseUrl?: string | null;
26
+ documentAttachmentResolver?: BookingDocumentAttachmentResolver;
27
+ eventBus?: EventBus;
28
+ };
29
+ export declare const NOTIFICATIONS_ROUTE_RUNTIME_CONTAINER_KEY = "providers.notifications.runtime";
30
+ export declare function buildNotificationsRouteRuntime(bindings: Record<string, unknown>, options?: NotificationsRoutesOptions): NotificationsRouteRuntime;
31
+ export declare function createNotificationsRoutes(options?: NotificationsRoutesOptions): import("hono/hono-base").HonoBase<Env, {
32
+ "/templates": {
33
+ $get: {
34
+ input: {};
35
+ output: {
36
+ data: {
37
+ id: string;
38
+ slug: string;
39
+ name: string;
40
+ channel: "email" | "sms";
41
+ provider: string | null;
42
+ status: "draft" | "active" | "archived";
43
+ subjectTemplate: string | null;
44
+ htmlTemplate: string | null;
45
+ textTemplate: string | null;
46
+ fromAddress: string | null;
47
+ isSystem: boolean;
48
+ metadata: {
49
+ [x: string]: import("hono/utils/types").JSONValue;
50
+ } | null;
51
+ createdAt: string;
52
+ updatedAt: string;
53
+ }[];
54
+ total: number;
55
+ limit: number;
56
+ offset: number;
57
+ };
58
+ outputFormat: "json";
59
+ status: import("hono/utils/http-status").ContentfulStatusCode;
60
+ };
61
+ };
62
+ } & {
63
+ "/templates": {
64
+ $post: {
65
+ input: {};
66
+ output: {
67
+ data: {
68
+ provider: string | null;
69
+ metadata: {
70
+ [x: string]: import("hono/utils/types").JSONValue;
71
+ } | null;
72
+ channel: "email" | "sms";
73
+ status: "draft" | "active" | "archived";
74
+ id: string;
75
+ name: string;
76
+ slug: string;
77
+ subjectTemplate: string | null;
78
+ htmlTemplate: string | null;
79
+ textTemplate: string | null;
80
+ fromAddress: string | null;
81
+ isSystem: boolean;
82
+ createdAt: string;
83
+ updatedAt: string;
84
+ } | null;
85
+ };
86
+ outputFormat: "json";
87
+ status: 201;
88
+ };
89
+ };
90
+ } & {
91
+ "/templates/:id": {
92
+ $get: {
93
+ input: {
94
+ param: {
95
+ id: string;
96
+ };
97
+ };
98
+ output: {
99
+ error: string;
100
+ };
101
+ outputFormat: "json";
102
+ status: 404;
103
+ } | {
104
+ input: {
105
+ param: {
106
+ id: string;
107
+ };
108
+ };
109
+ output: {
110
+ data: {
111
+ id: string;
112
+ slug: string;
113
+ name: string;
114
+ channel: "email" | "sms";
115
+ provider: string | null;
116
+ status: "draft" | "active" | "archived";
117
+ subjectTemplate: string | null;
118
+ htmlTemplate: string | null;
119
+ textTemplate: string | null;
120
+ fromAddress: string | null;
121
+ isSystem: boolean;
122
+ metadata: {
123
+ [x: string]: import("hono/utils/types").JSONValue;
124
+ } | null;
125
+ createdAt: string;
126
+ updatedAt: string;
127
+ };
128
+ };
129
+ outputFormat: "json";
130
+ status: import("hono/utils/http-status").ContentfulStatusCode;
131
+ };
132
+ };
133
+ } & {
134
+ "/templates/:id": {
135
+ $patch: {
136
+ input: {
137
+ param: {
138
+ id: string;
139
+ };
140
+ };
141
+ output: {
142
+ error: string;
143
+ };
144
+ outputFormat: "json";
145
+ status: 404;
146
+ } | {
147
+ input: {
148
+ param: {
149
+ id: string;
150
+ };
151
+ };
152
+ output: {
153
+ data: {
154
+ id: string;
155
+ slug: string;
156
+ name: string;
157
+ channel: "email" | "sms";
158
+ provider: string | null;
159
+ status: "draft" | "active" | "archived";
160
+ subjectTemplate: string | null;
161
+ htmlTemplate: string | null;
162
+ textTemplate: string | null;
163
+ fromAddress: string | null;
164
+ isSystem: boolean;
165
+ metadata: {
166
+ [x: string]: import("hono/utils/types").JSONValue;
167
+ } | null;
168
+ createdAt: string;
169
+ updatedAt: string;
170
+ };
171
+ };
172
+ outputFormat: "json";
173
+ status: import("hono/utils/http-status").ContentfulStatusCode;
174
+ };
175
+ };
176
+ } & {
177
+ "/templates/:id": {
178
+ $delete: {
179
+ input: {
180
+ param: {
181
+ id: string;
182
+ };
183
+ };
184
+ output: {
185
+ error: string;
186
+ };
187
+ outputFormat: "json";
188
+ status: 404;
189
+ } | {
190
+ input: {
191
+ param: {
192
+ id: string;
193
+ };
194
+ };
195
+ output: null;
196
+ outputFormat: "body";
197
+ status: 204;
198
+ };
199
+ };
200
+ } & {
201
+ "/preview": {
202
+ $post: {
203
+ input: {};
204
+ output: {
205
+ data: {
206
+ channel: "email" | "sms";
207
+ provider: string | null;
208
+ fromAddress: string | null;
209
+ subject: string | null;
210
+ html: string | null;
211
+ text: string | null;
212
+ };
213
+ };
214
+ outputFormat: "json";
215
+ status: import("hono/utils/http-status").ContentfulStatusCode;
216
+ };
217
+ };
218
+ } & {
219
+ "/deliveries": {
220
+ $get: {
221
+ input: {};
222
+ output: {
223
+ data: {
224
+ id: string;
225
+ templateId: string | null;
226
+ templateSlug: string | null;
227
+ targetType: "invoice" | "booking" | "booking_payment_schedule" | "booking_guarantee" | "payment_session" | "person" | "organization" | "other";
228
+ targetId: string | null;
229
+ personId: string | null;
230
+ organizationId: string | null;
231
+ bookingId: string | null;
232
+ invoiceId: string | null;
233
+ paymentSessionId: string | null;
234
+ channel: "email" | "sms";
235
+ provider: string;
236
+ providerMessageId: string | null;
237
+ status: "pending" | "sent" | "failed" | "cancelled";
238
+ toAddress: string;
239
+ fromAddress: string | null;
240
+ subject: string | null;
241
+ htmlBody: string | null;
242
+ textBody: string | null;
243
+ payloadData: {
244
+ [x: string]: import("hono/utils/types").JSONValue;
245
+ } | null;
246
+ metadata: {
247
+ [x: string]: import("hono/utils/types").JSONValue;
248
+ } | null;
249
+ errorMessage: string | null;
250
+ scheduledFor: string | null;
251
+ sentAt: string | null;
252
+ failedAt: string | null;
253
+ createdAt: string;
254
+ updatedAt: string;
255
+ }[];
256
+ total: number;
257
+ limit: number;
258
+ offset: number;
259
+ };
260
+ outputFormat: "json";
261
+ status: import("hono/utils/http-status").ContentfulStatusCode;
262
+ };
263
+ };
264
+ } & {
265
+ "/deliveries/:id": {
266
+ $get: {
267
+ input: {
268
+ param: {
269
+ id: string;
270
+ };
271
+ };
272
+ output: {
273
+ error: string;
274
+ };
275
+ outputFormat: "json";
276
+ status: 404;
277
+ } | {
278
+ input: {
279
+ param: {
280
+ id: string;
281
+ };
282
+ };
283
+ output: {
284
+ data: {
285
+ id: string;
286
+ templateId: string | null;
287
+ templateSlug: string | null;
288
+ targetType: "invoice" | "booking" | "booking_payment_schedule" | "booking_guarantee" | "payment_session" | "person" | "organization" | "other";
289
+ targetId: string | null;
290
+ personId: string | null;
291
+ organizationId: string | null;
292
+ bookingId: string | null;
293
+ invoiceId: string | null;
294
+ paymentSessionId: string | null;
295
+ channel: "email" | "sms";
296
+ provider: string;
297
+ providerMessageId: string | null;
298
+ status: "pending" | "sent" | "failed" | "cancelled";
299
+ toAddress: string;
300
+ fromAddress: string | null;
301
+ subject: string | null;
302
+ htmlBody: string | null;
303
+ textBody: string | null;
304
+ payloadData: {
305
+ [x: string]: import("hono/utils/types").JSONValue;
306
+ } | null;
307
+ metadata: {
308
+ [x: string]: import("hono/utils/types").JSONValue;
309
+ } | null;
310
+ errorMessage: string | null;
311
+ scheduledFor: string | null;
312
+ sentAt: string | null;
313
+ failedAt: string | null;
314
+ createdAt: string;
315
+ updatedAt: string;
316
+ };
317
+ };
318
+ outputFormat: "json";
319
+ status: import("hono/utils/http-status").ContentfulStatusCode;
320
+ };
321
+ };
322
+ } & {
323
+ "/deliveries/:id/resend": {
324
+ $post: {
325
+ input: {
326
+ param: {
327
+ id: string;
328
+ };
329
+ };
330
+ output: {
331
+ error: string;
332
+ };
333
+ outputFormat: "json";
334
+ status: 404;
335
+ } | {
336
+ input: {
337
+ param: {
338
+ id: string;
339
+ };
340
+ };
341
+ output: {
342
+ data: {
343
+ id: string;
344
+ templateId: string | null;
345
+ templateSlug: string | null;
346
+ targetType: "invoice" | "booking" | "booking_payment_schedule" | "booking_guarantee" | "payment_session" | "person" | "organization" | "other";
347
+ targetId: string | null;
348
+ personId: string | null;
349
+ organizationId: string | null;
350
+ bookingId: string | null;
351
+ invoiceId: string | null;
352
+ paymentSessionId: string | null;
353
+ channel: "email" | "sms";
354
+ provider: string;
355
+ providerMessageId: string | null;
356
+ status: "pending" | "sent" | "failed" | "cancelled";
357
+ toAddress: string;
358
+ fromAddress: string | null;
359
+ subject: string | null;
360
+ htmlBody: string | null;
361
+ textBody: string | null;
362
+ payloadData: {
363
+ [x: string]: import("hono/utils/types").JSONValue;
364
+ } | null;
365
+ metadata: {
366
+ [x: string]: import("hono/utils/types").JSONValue;
367
+ } | null;
368
+ errorMessage: string | null;
369
+ scheduledFor: string | null;
370
+ sentAt: string | null;
371
+ failedAt: string | null;
372
+ createdAt: string;
373
+ updatedAt: string;
374
+ };
375
+ };
376
+ outputFormat: "json";
377
+ status: 201;
378
+ } | {
379
+ input: {
380
+ param: {
381
+ id: string;
382
+ };
383
+ };
384
+ output: {
385
+ error: string;
386
+ };
387
+ outputFormat: "json";
388
+ status: 400;
389
+ };
390
+ };
391
+ } & {
392
+ "/reminder-rules": {
393
+ $get: {
394
+ input: {};
395
+ output: {
396
+ data: {
397
+ id: string;
398
+ slug: string;
399
+ name: string;
400
+ status: "draft" | "active" | "archived";
401
+ targetType: "invoice" | "booking_payment_schedule" | "booking_confirmed" | "payment_complete" | "booking_cancelled_non_payment";
402
+ channel: "email" | "sms";
403
+ provider: string | null;
404
+ templateId: string | null;
405
+ templateSlug: string | null;
406
+ priority: number;
407
+ suppressionGroup: string | null;
408
+ isSystem: boolean;
409
+ metadata: {
410
+ [x: string]: import("hono/utils/types").JSONValue;
411
+ } | null;
412
+ createdAt: string;
413
+ updatedAt: string;
414
+ }[];
415
+ total: number;
416
+ limit: number;
417
+ offset: number;
418
+ };
419
+ outputFormat: "json";
420
+ status: import("hono/utils/http-status").ContentfulStatusCode;
421
+ };
422
+ };
423
+ } & {
424
+ "/reminder-rules": {
425
+ $post: {
426
+ input: {};
427
+ output: {
428
+ data: {
429
+ templateId: string | null;
430
+ templateSlug: string | null;
431
+ provider: string | null;
432
+ metadata: {
433
+ [x: string]: import("hono/utils/types").JSONValue;
434
+ } | null;
435
+ channel: "email" | "sms";
436
+ status: "draft" | "active" | "archived";
437
+ id: string;
438
+ name: string;
439
+ slug: string;
440
+ isSystem: boolean;
441
+ createdAt: string;
442
+ updatedAt: string;
443
+ targetType: "invoice" | "booking_payment_schedule" | "booking_confirmed" | "payment_complete" | "booking_cancelled_non_payment";
444
+ priority: number;
445
+ suppressionGroup: string | null;
446
+ } | null;
447
+ };
448
+ outputFormat: "json";
449
+ status: 201;
450
+ };
451
+ };
452
+ } & {
453
+ "/reminder-rules/compose": {
454
+ $post: {
455
+ input: {};
456
+ output: {
457
+ error: string;
458
+ issues: {
459
+ code: string;
460
+ field?: string | undefined;
461
+ message: string;
462
+ fix?: string | undefined;
463
+ }[];
464
+ };
465
+ outputFormat: "json";
466
+ status: 422;
467
+ } | {
468
+ input: {};
469
+ output: {
470
+ data: {
471
+ ruleId: string;
472
+ stages: {
473
+ id: string;
474
+ orderIndex: number;
475
+ channels: {
476
+ id: string;
477
+ orderIndex: number;
478
+ }[];
479
+ }[];
480
+ };
481
+ };
482
+ outputFormat: "json";
483
+ status: 200 | 201;
484
+ };
485
+ };
486
+ } & {
487
+ "/reminder-rules/:id": {
488
+ $get: {
489
+ input: {
490
+ param: {
491
+ id: string;
492
+ };
493
+ };
494
+ output: {
495
+ error: string;
496
+ };
497
+ outputFormat: "json";
498
+ status: 404;
499
+ } | {
500
+ input: {
501
+ param: {
502
+ id: string;
503
+ };
504
+ };
505
+ output: {
506
+ data: {
507
+ id: string;
508
+ slug: string;
509
+ name: string;
510
+ status: "draft" | "active" | "archived";
511
+ targetType: "invoice" | "booking_payment_schedule" | "booking_confirmed" | "payment_complete" | "booking_cancelled_non_payment";
512
+ channel: "email" | "sms";
513
+ provider: string | null;
514
+ templateId: string | null;
515
+ templateSlug: string | null;
516
+ priority: number;
517
+ suppressionGroup: string | null;
518
+ isSystem: boolean;
519
+ metadata: {
520
+ [x: string]: import("hono/utils/types").JSONValue;
521
+ } | null;
522
+ createdAt: string;
523
+ updatedAt: string;
524
+ };
525
+ };
526
+ outputFormat: "json";
527
+ status: import("hono/utils/http-status").ContentfulStatusCode;
528
+ };
529
+ };
530
+ } & {
531
+ "/reminder-rules/:id": {
532
+ $patch: {
533
+ input: {
534
+ param: {
535
+ id: string;
536
+ };
537
+ };
538
+ output: {
539
+ error: string;
540
+ };
541
+ outputFormat: "json";
542
+ status: 404;
543
+ } | {
544
+ input: {
545
+ param: {
546
+ id: string;
547
+ };
548
+ };
549
+ output: {
550
+ data: {
551
+ id: string;
552
+ slug: string;
553
+ name: string;
554
+ status: "draft" | "active" | "archived";
555
+ targetType: "invoice" | "booking_payment_schedule" | "booking_confirmed" | "payment_complete" | "booking_cancelled_non_payment";
556
+ channel: "email" | "sms";
557
+ provider: string | null;
558
+ templateId: string | null;
559
+ templateSlug: string | null;
560
+ priority: number;
561
+ suppressionGroup: string | null;
562
+ isSystem: boolean;
563
+ metadata: {
564
+ [x: string]: import("hono/utils/types").JSONValue;
565
+ } | null;
566
+ createdAt: string;
567
+ updatedAt: string;
568
+ };
569
+ };
570
+ outputFormat: "json";
571
+ status: import("hono/utils/http-status").ContentfulStatusCode;
572
+ };
573
+ };
574
+ } & {
575
+ "/reminder-rules/:id": {
576
+ $delete: {
577
+ input: {
578
+ param: {
579
+ id: string;
580
+ };
581
+ };
582
+ output: null;
583
+ outputFormat: "body";
584
+ status: 204;
585
+ } | {
586
+ input: {
587
+ param: {
588
+ id: string;
589
+ };
590
+ };
591
+ output: {
592
+ error: string;
593
+ };
594
+ outputFormat: "json";
595
+ status: 404;
596
+ };
597
+ };
598
+ } & {
599
+ "/reminder-rules/:id/stages": {
600
+ $get: {
601
+ input: {
602
+ param: {
603
+ id: string;
604
+ };
605
+ };
606
+ output: {
607
+ data: {
608
+ metadata: {
609
+ [x: string]: import("hono/utils/types").JSONValue;
610
+ } | null;
611
+ anchor: "due_date" | "booking_created_at" | "departure_date" | "invoice_issued_at" | "last_send_at";
612
+ id: string;
613
+ name: string | null;
614
+ createdAt: string;
615
+ updatedAt: string;
616
+ reminderRuleId: string;
617
+ orderIndex: number;
618
+ windowStartDays: number;
619
+ windowEndDays: number;
620
+ cadenceKind: "once" | "every_n_days" | "escalating";
621
+ cadenceEveryDays: number | null;
622
+ cadenceIntervals: {
623
+ whenDaysUntilDueGT?: number | null | undefined;
624
+ whenDaysUntilDueLT?: number | null | undefined;
625
+ repeatEveryDays: number;
626
+ }[] | null;
627
+ maxSendsInStage: number | null;
628
+ respectQuietHours: boolean;
629
+ }[];
630
+ };
631
+ outputFormat: "json";
632
+ status: import("hono/utils/http-status").ContentfulStatusCode;
633
+ };
634
+ };
635
+ } & {
636
+ "/reminder-rules/:id/stages": {
637
+ $post: {
638
+ input: {
639
+ param: {
640
+ id: string;
641
+ };
642
+ };
643
+ output: {
644
+ data: {
645
+ metadata: {
646
+ [x: string]: import("hono/utils/types").JSONValue;
647
+ } | null;
648
+ anchor: "due_date" | "booking_created_at" | "departure_date" | "invoice_issued_at" | "last_send_at";
649
+ id: string;
650
+ name: string | null;
651
+ createdAt: string;
652
+ updatedAt: string;
653
+ reminderRuleId: string;
654
+ orderIndex: number;
655
+ windowStartDays: number;
656
+ windowEndDays: number;
657
+ cadenceKind: "once" | "every_n_days" | "escalating";
658
+ cadenceEveryDays: number | null;
659
+ cadenceIntervals: {
660
+ whenDaysUntilDueGT?: number | null | undefined;
661
+ whenDaysUntilDueLT?: number | null | undefined;
662
+ repeatEveryDays: number;
663
+ }[] | null;
664
+ maxSendsInStage: number | null;
665
+ respectQuietHours: boolean;
666
+ };
667
+ };
668
+ outputFormat: "json";
669
+ status: 201;
670
+ };
671
+ };
672
+ } & {
673
+ "/reminder-rules/:id/stages/reorder": {
674
+ $post: {
675
+ input: {
676
+ param: {
677
+ id: string;
678
+ };
679
+ };
680
+ output: {
681
+ data: {
682
+ metadata: {
683
+ [x: string]: import("hono/utils/types").JSONValue;
684
+ } | null;
685
+ anchor: "due_date" | "booking_created_at" | "departure_date" | "invoice_issued_at" | "last_send_at";
686
+ id: string;
687
+ name: string | null;
688
+ createdAt: string;
689
+ updatedAt: string;
690
+ reminderRuleId: string;
691
+ orderIndex: number;
692
+ windowStartDays: number;
693
+ windowEndDays: number;
694
+ cadenceKind: "once" | "every_n_days" | "escalating";
695
+ cadenceEveryDays: number | null;
696
+ cadenceIntervals: {
697
+ whenDaysUntilDueGT?: number | null | undefined;
698
+ whenDaysUntilDueLT?: number | null | undefined;
699
+ repeatEveryDays: number;
700
+ }[] | null;
701
+ maxSendsInStage: number | null;
702
+ respectQuietHours: boolean;
703
+ }[];
704
+ };
705
+ outputFormat: "json";
706
+ status: import("hono/utils/http-status").ContentfulStatusCode;
707
+ };
708
+ };
709
+ } & {
710
+ "/reminder-rules/:id/stages/:stageId": {
711
+ $patch: {
712
+ input: {
713
+ param: {
714
+ id: string;
715
+ } & {
716
+ stageId: string;
717
+ };
718
+ };
719
+ output: {
720
+ error: string;
721
+ };
722
+ outputFormat: "json";
723
+ status: 404;
724
+ } | {
725
+ input: {
726
+ param: {
727
+ id: string;
728
+ } & {
729
+ stageId: string;
730
+ };
731
+ };
732
+ output: {
733
+ data: {
734
+ metadata: {
735
+ [x: string]: import("hono/utils/types").JSONValue;
736
+ } | null;
737
+ anchor: "due_date" | "booking_created_at" | "departure_date" | "invoice_issued_at" | "last_send_at";
738
+ id: string;
739
+ name: string | null;
740
+ createdAt: string;
741
+ updatedAt: string;
742
+ reminderRuleId: string;
743
+ orderIndex: number;
744
+ windowStartDays: number;
745
+ windowEndDays: number;
746
+ cadenceKind: "once" | "every_n_days" | "escalating";
747
+ cadenceEveryDays: number | null;
748
+ cadenceIntervals: {
749
+ whenDaysUntilDueGT?: number | null | undefined;
750
+ whenDaysUntilDueLT?: number | null | undefined;
751
+ repeatEveryDays: number;
752
+ }[] | null;
753
+ maxSendsInStage: number | null;
754
+ respectQuietHours: boolean;
755
+ };
756
+ };
757
+ outputFormat: "json";
758
+ status: import("hono/utils/http-status").ContentfulStatusCode;
759
+ };
760
+ };
761
+ } & {
762
+ "/reminder-rules/:id/stages/:stageId": {
763
+ $delete: {
764
+ input: {
765
+ param: {
766
+ id: string;
767
+ } & {
768
+ stageId: string;
769
+ };
770
+ };
771
+ output: null;
772
+ outputFormat: "body";
773
+ status: 204;
774
+ } | {
775
+ input: {
776
+ param: {
777
+ id: string;
778
+ } & {
779
+ stageId: string;
780
+ };
781
+ };
782
+ output: {
783
+ error: string;
784
+ };
785
+ outputFormat: "json";
786
+ status: 404;
787
+ };
788
+ };
789
+ } & {
790
+ "/reminder-rules/:id/stages/:stageId/channels": {
791
+ $get: {
792
+ input: {
793
+ param: {
794
+ id: string;
795
+ } & {
796
+ stageId: string;
797
+ };
798
+ };
799
+ output: {
800
+ data: {
801
+ templateId: string | null;
802
+ templateSlug: string | null;
803
+ provider: string | null;
804
+ metadata: {
805
+ [x: string]: import("hono/utils/types").JSONValue;
806
+ } | null;
807
+ channel: "email" | "sms";
808
+ id: string;
809
+ createdAt: string;
810
+ updatedAt: string;
811
+ orderIndex: number;
812
+ stageId: string;
813
+ recipientKind: "primary" | "cc" | "bcc";
814
+ recipientRole: string | null;
815
+ }[];
816
+ };
817
+ outputFormat: "json";
818
+ status: import("hono/utils/http-status").ContentfulStatusCode;
819
+ };
820
+ };
821
+ } & {
822
+ "/reminder-rules/:id/stages/:stageId/channels": {
823
+ $post: {
824
+ input: {
825
+ param: {
826
+ id: string;
827
+ } & {
828
+ stageId: string;
829
+ };
830
+ };
831
+ output: {
832
+ data: {
833
+ templateId: string | null;
834
+ templateSlug: string | null;
835
+ provider: string | null;
836
+ metadata: {
837
+ [x: string]: import("hono/utils/types").JSONValue;
838
+ } | null;
839
+ channel: "email" | "sms";
840
+ id: string;
841
+ createdAt: string;
842
+ updatedAt: string;
843
+ orderIndex: number;
844
+ stageId: string;
845
+ recipientKind: "primary" | "cc" | "bcc";
846
+ recipientRole: string | null;
847
+ };
848
+ };
849
+ outputFormat: "json";
850
+ status: 201;
851
+ };
852
+ };
853
+ } & {
854
+ "/reminder-rules/:id/stages/:stageId/channels/:channelId": {
855
+ $patch: {
856
+ input: {
857
+ param: {
858
+ id: string;
859
+ } & {
860
+ stageId: string;
861
+ } & {
862
+ channelId: string;
863
+ };
864
+ };
865
+ output: {
866
+ error: string;
867
+ };
868
+ outputFormat: "json";
869
+ status: 404;
870
+ } | {
871
+ input: {
872
+ param: {
873
+ id: string;
874
+ } & {
875
+ stageId: string;
876
+ } & {
877
+ channelId: string;
878
+ };
879
+ };
880
+ output: {
881
+ data: {
882
+ templateId: string | null;
883
+ templateSlug: string | null;
884
+ provider: string | null;
885
+ metadata: {
886
+ [x: string]: import("hono/utils/types").JSONValue;
887
+ } | null;
888
+ channel: "email" | "sms";
889
+ id: string;
890
+ createdAt: string;
891
+ updatedAt: string;
892
+ orderIndex: number;
893
+ stageId: string;
894
+ recipientKind: "primary" | "cc" | "bcc";
895
+ recipientRole: string | null;
896
+ };
897
+ };
898
+ outputFormat: "json";
899
+ status: import("hono/utils/http-status").ContentfulStatusCode;
900
+ };
901
+ };
902
+ } & {
903
+ "/reminder-rules/:id/stages/:stageId/channels/:channelId": {
904
+ $delete: {
905
+ input: {
906
+ param: {
907
+ id: string;
908
+ } & {
909
+ stageId: string;
910
+ } & {
911
+ channelId: string;
912
+ };
913
+ };
914
+ output: null;
915
+ outputFormat: "body";
916
+ status: 204;
917
+ } | {
918
+ input: {
919
+ param: {
920
+ id: string;
921
+ } & {
922
+ stageId: string;
923
+ } & {
924
+ channelId: string;
925
+ };
926
+ };
927
+ output: {
928
+ error: string;
929
+ };
930
+ outputFormat: "json";
931
+ status: 404;
932
+ };
933
+ };
934
+ } & {
935
+ "/notification-settings": {
936
+ $get: {
937
+ input: {};
938
+ output: {
939
+ data: {
940
+ metadata: {
941
+ [x: string]: import("hono/utils/types").JSONValue;
942
+ } | null;
943
+ id: string;
944
+ createdAt: string;
945
+ updatedAt: string;
946
+ scope: string;
947
+ quietHoursLocal: {
948
+ start: string;
949
+ end: string;
950
+ tz: string;
951
+ } | null;
952
+ blackoutDates: string[] | null;
953
+ skipWeekends: boolean;
954
+ recipientRateLimitPerDay: number | null;
955
+ suppressionWindowHours: number;
956
+ };
957
+ };
958
+ outputFormat: "json";
959
+ status: import("hono/utils/http-status").ContentfulStatusCode;
960
+ };
961
+ };
962
+ } & {
963
+ "/notification-settings": {
964
+ $patch: {
965
+ input: {};
966
+ output: {
967
+ data: {
968
+ metadata: {
969
+ [x: string]: import("hono/utils/types").JSONValue;
970
+ } | null;
971
+ id: string;
972
+ createdAt: string;
973
+ updatedAt: string;
974
+ scope: string;
975
+ quietHoursLocal: {
976
+ start: string;
977
+ end: string;
978
+ tz: string;
979
+ } | null;
980
+ blackoutDates: string[] | null;
981
+ skipWeekends: boolean;
982
+ recipientRateLimitPerDay: number | null;
983
+ suppressionWindowHours: number;
984
+ };
985
+ };
986
+ outputFormat: "json";
987
+ status: import("hono/utils/http-status").ContentfulStatusCode;
988
+ };
989
+ };
990
+ } & {
991
+ "/reminders/preview": {
992
+ $get: {
993
+ input: {};
994
+ output: {
995
+ data: {
996
+ ruleId: string;
997
+ ruleName: string;
998
+ ruleSlug: string;
999
+ targetType: string;
1000
+ targetId: string;
1001
+ bookingId: string | null;
1002
+ stageId: string;
1003
+ stageName: string | null;
1004
+ stageOrderIndex: number;
1005
+ anchor: string;
1006
+ anchorDate: string;
1007
+ scheduledAt: string;
1008
+ sendCountAtFire: number;
1009
+ reasoning: string;
1010
+ }[];
1011
+ };
1012
+ outputFormat: "json";
1013
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1014
+ };
1015
+ };
1016
+ } & {
1017
+ "/reminder-runs": {
1018
+ $get: {
1019
+ input: {};
1020
+ output: {
1021
+ data: {
1022
+ id: string;
1023
+ reminderRuleId: string;
1024
+ targetType: "invoice" | "booking_payment_schedule" | "booking_confirmed" | "payment_complete" | "booking_cancelled_non_payment";
1025
+ targetId: string;
1026
+ dedupeKey: string;
1027
+ status: "sent" | "failed" | "queued" | "processing" | "skipped";
1028
+ recipient: string | null;
1029
+ scheduledFor: string;
1030
+ processedAt: string;
1031
+ errorMessage: string | null;
1032
+ metadata: {
1033
+ [x: string]: import("hono/utils/types").JSONValue;
1034
+ } | null;
1035
+ createdAt: string;
1036
+ updatedAt: string;
1037
+ links: {
1038
+ bookingId: string | null;
1039
+ bookingPaymentScheduleId: string | null;
1040
+ invoiceId: string | null;
1041
+ paymentSessionId: string | null;
1042
+ personId: string | null;
1043
+ organizationId: string | null;
1044
+ notificationDeliveryId: string | null;
1045
+ };
1046
+ reminderRule: {
1047
+ id: string;
1048
+ slug: string;
1049
+ name: string;
1050
+ status: "draft" | "active" | "archived";
1051
+ targetType: "invoice" | "booking_payment_schedule" | "booking_confirmed" | "payment_complete" | "booking_cancelled_non_payment";
1052
+ channel: "email" | "sms";
1053
+ provider: string | null;
1054
+ templateId: string | null;
1055
+ templateSlug: string | null;
1056
+ };
1057
+ delivery: {
1058
+ id: string;
1059
+ status: "pending" | "sent" | "failed" | "cancelled";
1060
+ channel: "email" | "sms";
1061
+ provider: string;
1062
+ toAddress: string;
1063
+ subject: string | null;
1064
+ sentAt: string | null;
1065
+ failedAt: string | null;
1066
+ errorMessage: string | null;
1067
+ } | null;
1068
+ }[];
1069
+ total: number;
1070
+ limit: number;
1071
+ offset: number;
1072
+ };
1073
+ outputFormat: "json";
1074
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1075
+ };
1076
+ };
1077
+ } & {
1078
+ "/reminder-runs/: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
+ reminderRuleId: string;
1100
+ targetType: "invoice" | "booking_payment_schedule" | "booking_confirmed" | "payment_complete" | "booking_cancelled_non_payment";
1101
+ targetId: string;
1102
+ dedupeKey: string;
1103
+ status: "sent" | "failed" | "queued" | "processing" | "skipped";
1104
+ recipient: string | null;
1105
+ scheduledFor: string;
1106
+ processedAt: string;
1107
+ errorMessage: string | null;
1108
+ metadata: {
1109
+ [x: string]: import("hono/utils/types").JSONValue;
1110
+ } | null;
1111
+ createdAt: string;
1112
+ updatedAt: string;
1113
+ links: {
1114
+ bookingId: string | null;
1115
+ bookingPaymentScheduleId: string | null;
1116
+ invoiceId: string | null;
1117
+ paymentSessionId: string | null;
1118
+ personId: string | null;
1119
+ organizationId: string | null;
1120
+ notificationDeliveryId: string | null;
1121
+ };
1122
+ reminderRule: {
1123
+ id: string;
1124
+ slug: string;
1125
+ name: string;
1126
+ status: "draft" | "active" | "archived";
1127
+ targetType: "invoice" | "booking_payment_schedule" | "booking_confirmed" | "payment_complete" | "booking_cancelled_non_payment";
1128
+ channel: "email" | "sms";
1129
+ provider: string | null;
1130
+ templateId: string | null;
1131
+ templateSlug: string | null;
1132
+ };
1133
+ delivery: {
1134
+ id: string;
1135
+ status: "pending" | "sent" | "failed" | "cancelled";
1136
+ channel: "email" | "sms";
1137
+ provider: string;
1138
+ toAddress: string;
1139
+ subject: string | null;
1140
+ sentAt: string | null;
1141
+ failedAt: string | null;
1142
+ errorMessage: string | null;
1143
+ } | null;
1144
+ };
1145
+ };
1146
+ outputFormat: "json";
1147
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1148
+ };
1149
+ };
1150
+ } & {
1151
+ "/reminders/run-due": {
1152
+ $post: {
1153
+ input: {};
1154
+ output: {
1155
+ data: {
1156
+ processed: number;
1157
+ sent: number;
1158
+ skipped: number;
1159
+ failed: number;
1160
+ };
1161
+ };
1162
+ outputFormat: "json";
1163
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1164
+ } | {
1165
+ input: {};
1166
+ output: {
1167
+ error: string;
1168
+ };
1169
+ outputFormat: "json";
1170
+ status: 400;
1171
+ };
1172
+ };
1173
+ } & {
1174
+ "/payment-sessions/:id/send": {
1175
+ $post: {
1176
+ input: {
1177
+ param: {
1178
+ id: string;
1179
+ };
1180
+ };
1181
+ output: {
1182
+ error: string;
1183
+ };
1184
+ outputFormat: "json";
1185
+ status: 404;
1186
+ } | {
1187
+ input: {
1188
+ param: {
1189
+ id: string;
1190
+ };
1191
+ };
1192
+ output: {
1193
+ data: {
1194
+ id: string;
1195
+ templateId: string | null;
1196
+ templateSlug: string | null;
1197
+ targetType: "invoice" | "booking" | "booking_payment_schedule" | "booking_guarantee" | "payment_session" | "person" | "organization" | "other";
1198
+ targetId: string | null;
1199
+ personId: string | null;
1200
+ organizationId: string | null;
1201
+ bookingId: string | null;
1202
+ invoiceId: string | null;
1203
+ paymentSessionId: string | null;
1204
+ channel: "email" | "sms";
1205
+ provider: string;
1206
+ providerMessageId: string | null;
1207
+ status: "pending" | "sent" | "failed" | "cancelled";
1208
+ toAddress: string;
1209
+ fromAddress: string | null;
1210
+ subject: string | null;
1211
+ htmlBody: string | null;
1212
+ textBody: string | null;
1213
+ payloadData: {
1214
+ [x: string]: import("hono/utils/types").JSONValue;
1215
+ } | null;
1216
+ metadata: {
1217
+ [x: string]: import("hono/utils/types").JSONValue;
1218
+ } | null;
1219
+ errorMessage: string | null;
1220
+ scheduledFor: string | null;
1221
+ sentAt: string | null;
1222
+ failedAt: string | null;
1223
+ createdAt: string;
1224
+ updatedAt: string;
1225
+ };
1226
+ };
1227
+ outputFormat: "json";
1228
+ status: 201;
1229
+ } | {
1230
+ input: {
1231
+ param: {
1232
+ id: string;
1233
+ };
1234
+ };
1235
+ output: {
1236
+ error: string;
1237
+ };
1238
+ outputFormat: "json";
1239
+ status: 400;
1240
+ };
1241
+ };
1242
+ } & {
1243
+ "/invoices/:id/send": {
1244
+ $post: {
1245
+ input: {
1246
+ param: {
1247
+ id: string;
1248
+ };
1249
+ };
1250
+ output: {
1251
+ error: string;
1252
+ };
1253
+ outputFormat: "json";
1254
+ status: 404;
1255
+ } | {
1256
+ input: {
1257
+ param: {
1258
+ id: string;
1259
+ };
1260
+ };
1261
+ output: {
1262
+ data: {
1263
+ id: string;
1264
+ templateId: string | null;
1265
+ templateSlug: string | null;
1266
+ targetType: "invoice" | "booking" | "booking_payment_schedule" | "booking_guarantee" | "payment_session" | "person" | "organization" | "other";
1267
+ targetId: string | null;
1268
+ personId: string | null;
1269
+ organizationId: string | null;
1270
+ bookingId: string | null;
1271
+ invoiceId: string | null;
1272
+ paymentSessionId: string | null;
1273
+ channel: "email" | "sms";
1274
+ provider: string;
1275
+ providerMessageId: string | null;
1276
+ status: "pending" | "sent" | "failed" | "cancelled";
1277
+ toAddress: string;
1278
+ fromAddress: string | null;
1279
+ subject: string | null;
1280
+ htmlBody: string | null;
1281
+ textBody: string | null;
1282
+ payloadData: {
1283
+ [x: string]: import("hono/utils/types").JSONValue;
1284
+ } | null;
1285
+ metadata: {
1286
+ [x: string]: import("hono/utils/types").JSONValue;
1287
+ } | null;
1288
+ errorMessage: string | null;
1289
+ scheduledFor: string | null;
1290
+ sentAt: string | null;
1291
+ failedAt: string | null;
1292
+ createdAt: string;
1293
+ updatedAt: string;
1294
+ };
1295
+ };
1296
+ outputFormat: "json";
1297
+ status: 201;
1298
+ } | {
1299
+ input: {
1300
+ param: {
1301
+ id: string;
1302
+ };
1303
+ };
1304
+ output: {
1305
+ error: string;
1306
+ };
1307
+ outputFormat: "json";
1308
+ status: 400;
1309
+ };
1310
+ };
1311
+ } & {
1312
+ "/bookings/:id/document-bundle": {
1313
+ $get: {
1314
+ input: {
1315
+ param: {
1316
+ id: string;
1317
+ };
1318
+ };
1319
+ output: {
1320
+ error: string;
1321
+ };
1322
+ outputFormat: "json";
1323
+ status: 404;
1324
+ } | {
1325
+ input: {
1326
+ param: {
1327
+ id: string;
1328
+ };
1329
+ };
1330
+ output: {
1331
+ data: {
1332
+ bookingId: string;
1333
+ documents: {
1334
+ key: string;
1335
+ source: "products" | "legal" | "finance";
1336
+ documentType: "contract" | "invoice" | "proforma" | "brochure";
1337
+ bookingId: string;
1338
+ name: string;
1339
+ createdAt: string;
1340
+ contractId?: string | null | undefined;
1341
+ invoiceId?: string | null | undefined;
1342
+ attachmentId?: string | null | undefined;
1343
+ renditionId?: string | null | undefined;
1344
+ contractStatus?: string | null | undefined;
1345
+ invoiceStatus?: string | null | undefined;
1346
+ format?: string | null | undefined;
1347
+ mimeType?: string | null | undefined;
1348
+ storageKey?: string | null | undefined;
1349
+ downloadUrl?: string | null | undefined;
1350
+ language?: string | null | undefined;
1351
+ metadata?: {
1352
+ [x: string]: import("hono/utils/types").JSONValue;
1353
+ } | null | undefined;
1354
+ }[];
1355
+ };
1356
+ };
1357
+ outputFormat: "json";
1358
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1359
+ };
1360
+ };
1361
+ } & {
1362
+ "/bookings/:id/confirm-and-dispatch": {
1363
+ $post: {
1364
+ input: {
1365
+ param: {
1366
+ id: string;
1367
+ };
1368
+ };
1369
+ output: {
1370
+ error: string;
1371
+ };
1372
+ outputFormat: "json";
1373
+ status: 404;
1374
+ } | {
1375
+ input: {
1376
+ param: {
1377
+ id: string;
1378
+ };
1379
+ };
1380
+ output: {
1381
+ data: {
1382
+ bookingId: string;
1383
+ documents: {
1384
+ key: string;
1385
+ source: "products" | "legal" | "finance";
1386
+ documentType: "contract" | "invoice" | "proforma" | "brochure";
1387
+ bookingId: string;
1388
+ name: string;
1389
+ createdAt: string;
1390
+ contractId?: string | null | undefined;
1391
+ invoiceId?: string | null | undefined;
1392
+ attachmentId?: string | null | undefined;
1393
+ renditionId?: string | null | undefined;
1394
+ contractStatus?: string | null | undefined;
1395
+ invoiceStatus?: string | null | undefined;
1396
+ format?: string | null | undefined;
1397
+ mimeType?: string | null | undefined;
1398
+ storageKey?: string | null | undefined;
1399
+ downloadUrl?: string | null | undefined;
1400
+ language?: string | null | undefined;
1401
+ metadata?: {
1402
+ [x: string]: import("hono/utils/types").JSONValue;
1403
+ } | null | undefined;
1404
+ }[];
1405
+ notification: {
1406
+ recipient: string;
1407
+ deliveryId: string;
1408
+ status: "pending" | "sent" | "failed" | "cancelled";
1409
+ provider?: string | null | undefined;
1410
+ } | null;
1411
+ skipReason: "preview_only" | "no_documents" | "no_recipient" | "no_attachments" | "send_failed" | null;
1412
+ };
1413
+ };
1414
+ outputFormat: "json";
1415
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1416
+ } | {
1417
+ input: {
1418
+ param: {
1419
+ id: string;
1420
+ };
1421
+ };
1422
+ output: {
1423
+ error: string;
1424
+ };
1425
+ outputFormat: "json";
1426
+ status: 400;
1427
+ };
1428
+ };
1429
+ } & {
1430
+ "/bookings/:id/send-documents": {
1431
+ $post: {
1432
+ input: {
1433
+ param: {
1434
+ id: string;
1435
+ };
1436
+ };
1437
+ output: {
1438
+ error: string;
1439
+ };
1440
+ outputFormat: "json";
1441
+ status: 404;
1442
+ } | {
1443
+ input: {
1444
+ param: {
1445
+ id: string;
1446
+ };
1447
+ };
1448
+ output: {
1449
+ error: string;
1450
+ };
1451
+ outputFormat: "json";
1452
+ status: 400;
1453
+ } | {
1454
+ input: {
1455
+ param: {
1456
+ id: string;
1457
+ };
1458
+ };
1459
+ output: {
1460
+ data: {
1461
+ bookingId: string;
1462
+ recipient: string;
1463
+ documents: {
1464
+ key: string;
1465
+ source: "products" | "legal" | "finance";
1466
+ documentType: "contract" | "invoice" | "proforma" | "brochure";
1467
+ bookingId: string;
1468
+ name: string;
1469
+ createdAt: string;
1470
+ contractId?: string | null | undefined;
1471
+ invoiceId?: string | null | undefined;
1472
+ attachmentId?: string | null | undefined;
1473
+ renditionId?: string | null | undefined;
1474
+ contractStatus?: string | null | undefined;
1475
+ invoiceStatus?: string | null | undefined;
1476
+ format?: string | null | undefined;
1477
+ mimeType?: string | null | undefined;
1478
+ storageKey?: string | null | undefined;
1479
+ downloadUrl?: string | null | undefined;
1480
+ language?: string | null | undefined;
1481
+ metadata?: {
1482
+ [x: string]: import("hono/utils/types").JSONValue;
1483
+ } | null | undefined;
1484
+ }[];
1485
+ deliveryId: string;
1486
+ status: "pending" | "sent" | "failed" | "cancelled";
1487
+ provider?: string | null | undefined;
1488
+ };
1489
+ };
1490
+ outputFormat: "json";
1491
+ status: 201;
1492
+ };
1493
+ };
1494
+ } & {
1495
+ "/send": {
1496
+ $post: {
1497
+ input: {};
1498
+ output: {
1499
+ data: {
1500
+ id: string;
1501
+ templateId: string | null;
1502
+ templateSlug: string | null;
1503
+ targetType: "invoice" | "booking" | "booking_payment_schedule" | "booking_guarantee" | "payment_session" | "person" | "organization" | "other";
1504
+ targetId: string | null;
1505
+ personId: string | null;
1506
+ organizationId: string | null;
1507
+ bookingId: string | null;
1508
+ invoiceId: string | null;
1509
+ paymentSessionId: string | null;
1510
+ channel: "email" | "sms";
1511
+ provider: string;
1512
+ providerMessageId: string | null;
1513
+ status: "pending" | "sent" | "failed" | "cancelled";
1514
+ toAddress: string;
1515
+ fromAddress: string | null;
1516
+ subject: string | null;
1517
+ htmlBody: string | null;
1518
+ textBody: string | null;
1519
+ payloadData: {
1520
+ [x: string]: import("hono/utils/types").JSONValue;
1521
+ } | null;
1522
+ metadata: {
1523
+ [x: string]: import("hono/utils/types").JSONValue;
1524
+ } | null;
1525
+ errorMessage: string | null;
1526
+ scheduledFor: string | null;
1527
+ sentAt: string | null;
1528
+ failedAt: string | null;
1529
+ createdAt: string;
1530
+ updatedAt: string;
1531
+ } | null;
1532
+ };
1533
+ outputFormat: "json";
1534
+ status: 201;
1535
+ } | {
1536
+ input: {};
1537
+ output: {
1538
+ error: string;
1539
+ };
1540
+ outputFormat: "json";
1541
+ status: 400;
1542
+ };
1543
+ };
1544
+ }, "/", "/send">;
1545
+ export {};
1546
+ //# sourceMappingURL=routes.d.ts.map