@voyantjs/travel-composer 0.55.0

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