@voyant-travel/trips 0.110.2

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 (63) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +38 -0
  3. package/dist/catalog-component-adapter.d.ts +16 -0
  4. package/dist/catalog-component-adapter.d.ts.map +1 -0
  5. package/dist/catalog-component-adapter.js +34 -0
  6. package/dist/cruise-extension.d.ts +48 -0
  7. package/dist/cruise-extension.d.ts.map +1 -0
  8. package/dist/cruise-extension.js +66 -0
  9. package/dist/index.d.ts +24 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +31 -0
  12. package/dist/mcp-contract.d.ts +79 -0
  13. package/dist/mcp-contract.d.ts.map +1 -0
  14. package/dist/mcp-contract.js +21 -0
  15. package/dist/mcp-registry.d.ts +48 -0
  16. package/dist/mcp-registry.d.ts.map +1 -0
  17. package/dist/mcp-registry.js +88 -0
  18. package/dist/mcp-tools.d.ts +157 -0
  19. package/dist/mcp-tools.d.ts.map +1 -0
  20. package/dist/mcp-tools.js +109 -0
  21. package/dist/routes.d.ts +2068 -0
  22. package/dist/routes.d.ts.map +1 -0
  23. package/dist/routes.js +280 -0
  24. package/dist/schema.d.ts +1897 -0
  25. package/dist/schema.d.ts.map +1 -0
  26. package/dist/schema.js +255 -0
  27. package/dist/service-cancellation.d.ts +6 -0
  28. package/dist/service-cancellation.d.ts.map +1 -0
  29. package/dist/service-cancellation.js +251 -0
  30. package/dist/service-checkout.d.ts +6 -0
  31. package/dist/service-checkout.d.ts.map +1 -0
  32. package/dist/service-checkout.js +328 -0
  33. package/dist/service-helpers.d.ts +17 -0
  34. package/dist/service-helpers.d.ts.map +1 -0
  35. package/dist/service-helpers.js +161 -0
  36. package/dist/service-internals.d.ts +11 -0
  37. package/dist/service-internals.d.ts.map +1 -0
  38. package/dist/service-internals.js +72 -0
  39. package/dist/service-pricing.d.ts +8 -0
  40. package/dist/service-pricing.d.ts.map +1 -0
  41. package/dist/service-pricing.js +142 -0
  42. package/dist/service-reservation.d.ts +5 -0
  43. package/dist/service-reservation.d.ts.map +1 -0
  44. package/dist/service-reservation.js +493 -0
  45. package/dist/service-snapshots.d.ts +8 -0
  46. package/dist/service-snapshots.d.ts.map +1 -0
  47. package/dist/service-snapshots.js +115 -0
  48. package/dist/service-trips.d.ts +14 -0
  49. package/dist/service-trips.d.ts.map +1 -0
  50. package/dist/service-trips.js +378 -0
  51. package/dist/service-types.d.ts +285 -0
  52. package/dist/service-types.d.ts.map +1 -0
  53. package/dist/service-types.js +6 -0
  54. package/dist/service.d.ts +38 -0
  55. package/dist/service.d.ts.map +1 -0
  56. package/dist/service.js +40 -0
  57. package/dist/traveler-party-validation.d.ts +3 -0
  58. package/dist/traveler-party-validation.d.ts.map +1 -0
  59. package/dist/traveler-party-validation.js +68 -0
  60. package/dist/validation.d.ts +449 -0
  61. package/dist/validation.d.ts.map +1 -0
  62. package/dist/validation.js +261 -0
  63. package/package.json +83 -0
@@ -0,0 +1,449 @@
1
+ import { z } from "zod";
2
+ export declare const tripEnvelopeStatusSchema: z.ZodEnum<{
3
+ cancelled: "cancelled";
4
+ draft: "draft";
5
+ priced: "priced";
6
+ reserve_in_progress: "reserve_in_progress";
7
+ reserved: "reserved";
8
+ checkout_started: "checkout_started";
9
+ booked: "booked";
10
+ failed: "failed";
11
+ }>;
12
+ export type TripEnvelopeStatus = z.infer<typeof tripEnvelopeStatusSchema>;
13
+ export declare const tripComponentKindSchema: z.ZodEnum<{
14
+ catalog_booking: "catalog_booking";
15
+ manual_placeholder: "manual_placeholder";
16
+ flight_placeholder: "flight_placeholder";
17
+ flight_order: "flight_order";
18
+ external_order: "external_order";
19
+ }>;
20
+ export type TripComponentKind = z.infer<typeof tripComponentKindSchema>;
21
+ export declare const tripComponentStatusSchema: z.ZodEnum<{
22
+ cancelled: "cancelled";
23
+ draft: "draft";
24
+ priced: "priced";
25
+ checkout_started: "checkout_started";
26
+ booked: "booked";
27
+ failed: "failed";
28
+ unavailable: "unavailable";
29
+ held: "held";
30
+ removed: "removed";
31
+ }>;
32
+ export type TripComponentStatus = z.infer<typeof tripComponentStatusSchema>;
33
+ export declare const tripComponentEventTypeSchema: z.ZodEnum<{
34
+ cancelled: "cancelled";
35
+ priced: "priced";
36
+ checkout_started: "checkout_started";
37
+ booked: "booked";
38
+ failed: "failed";
39
+ removed: "removed";
40
+ hold_placed: "hold_placed";
41
+ created: "created";
42
+ updated: "updated";
43
+ staff_remediation_required: "staff_remediation_required";
44
+ }>;
45
+ export type TripComponentEventType = z.infer<typeof tripComponentEventTypeSchema>;
46
+ export declare const tripComponentTaxLineSchema: z.ZodObject<{
47
+ code: z.ZodString;
48
+ label: z.ZodString;
49
+ amountCents: z.ZodNumber;
50
+ baseAmountCents: z.ZodNumber;
51
+ rate: z.ZodOptional<z.ZodNumber>;
52
+ jurisdiction: z.ZodOptional<z.ZodString>;
53
+ includedInPrice: z.ZodOptional<z.ZodBoolean>;
54
+ source: z.ZodOptional<z.ZodString>;
55
+ }, z.core.$strip>;
56
+ export type TripComponentTaxLine = z.infer<typeof tripComponentTaxLineSchema>;
57
+ export declare const tripComponentPricingSnapshotSchema: z.ZodObject<{
58
+ currency: z.ZodString;
59
+ subtotalAmountCents: z.ZodNumber;
60
+ taxAmountCents: z.ZodNumber;
61
+ totalAmountCents: z.ZodNumber;
62
+ priceExpiresAt: z.ZodOptional<z.ZodString>;
63
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
64
+ }, z.core.$strip>;
65
+ export type TripComponentPricingSnapshot = z.infer<typeof tripComponentPricingSnapshotSchema>;
66
+ export declare const tripEnvelopePricingSnapshotSchema: z.ZodObject<{
67
+ currency: z.ZodString;
68
+ subtotalAmountCents: z.ZodNumber;
69
+ taxAmountCents: z.ZodNumber;
70
+ totalAmountCents: z.ZodNumber;
71
+ componentCount: z.ZodNumber;
72
+ pricedComponentCount: z.ZodNumber;
73
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
74
+ }, z.core.$strip>;
75
+ export type TripEnvelopePricingSnapshot = z.infer<typeof tripEnvelopePricingSnapshotSchema>;
76
+ export declare const catalogComponentReferenceSchema: z.ZodObject<{
77
+ entityModule: z.ZodString;
78
+ entityId: z.ZodString;
79
+ sourceKind: z.ZodString;
80
+ sourceConnectionId: z.ZodOptional<z.ZodString>;
81
+ sourceRef: z.ZodOptional<z.ZodString>;
82
+ }, z.core.$strip>;
83
+ export type CatalogComponentReference = z.infer<typeof catalogComponentReferenceSchema>;
84
+ export declare const committedComponentReferenceSchema: z.ZodObject<{
85
+ bookingId: z.ZodOptional<z.ZodString>;
86
+ bookingGroupId: z.ZodOptional<z.ZodString>;
87
+ orderId: z.ZodOptional<z.ZodString>;
88
+ paymentSessionId: z.ZodOptional<z.ZodString>;
89
+ providerRef: z.ZodOptional<z.ZodString>;
90
+ supplierRef: z.ZodOptional<z.ZodString>;
91
+ }, z.core.$strip>;
92
+ export type CommittedComponentReference = z.infer<typeof committedComponentReferenceSchema>;
93
+ export declare const createTripEnvelopeSchema: z.ZodObject<{
94
+ title: z.ZodOptional<z.ZodString>;
95
+ description: z.ZodOptional<z.ZodString>;
96
+ travelerParty: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
97
+ constraints: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
98
+ createdBy: z.ZodOptional<z.ZodString>;
99
+ }, z.core.$strip>;
100
+ export type CreateTripEnvelopeInput = z.infer<typeof createTripEnvelopeSchema>;
101
+ export declare const tripsListSortFieldSchema: z.ZodEnum<{
102
+ status: "status";
103
+ createdAt: "createdAt";
104
+ updatedAt: "updatedAt";
105
+ total: "total";
106
+ }>;
107
+ export type TripsListSortField = z.infer<typeof tripsListSortFieldSchema>;
108
+ export declare const tripsListSortDirSchema: z.ZodEnum<{
109
+ asc: "asc";
110
+ desc: "desc";
111
+ }>;
112
+ export type TripsListSortDir = z.infer<typeof tripsListSortDirSchema>;
113
+ export declare const listTripsQuerySchema: z.ZodObject<{
114
+ status: z.ZodOptional<z.ZodEnum<{
115
+ cancelled: "cancelled";
116
+ draft: "draft";
117
+ priced: "priced";
118
+ reserve_in_progress: "reserve_in_progress";
119
+ reserved: "reserved";
120
+ checkout_started: "checkout_started";
121
+ booked: "booked";
122
+ failed: "failed";
123
+ }>>;
124
+ search: z.ZodOptional<z.ZodString>;
125
+ productId: z.ZodOptional<z.ZodString>;
126
+ accommodationId: z.ZodOptional<z.ZodString>;
127
+ cruiseId: z.ZodOptional<z.ZodString>;
128
+ hasFlight: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
129
+ totalMinCents: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
130
+ totalMaxCents: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
131
+ createdFrom: z.ZodOptional<z.ZodString>;
132
+ createdTo: z.ZodOptional<z.ZodString>;
133
+ sortBy: z.ZodDefault<z.ZodEnum<{
134
+ status: "status";
135
+ createdAt: "createdAt";
136
+ updatedAt: "updatedAt";
137
+ total: "total";
138
+ }>>;
139
+ sortDir: z.ZodDefault<z.ZodEnum<{
140
+ asc: "asc";
141
+ desc: "desc";
142
+ }>>;
143
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
144
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
145
+ }, z.core.$strip>;
146
+ export type ListTripsQuery = z.infer<typeof listTripsQuerySchema>;
147
+ export declare const tripSnapshotProposalLineSchema: z.ZodObject<{
148
+ componentId: z.ZodString;
149
+ sequence: z.ZodNumber;
150
+ kind: z.ZodEnum<{
151
+ catalog_booking: "catalog_booking";
152
+ manual_placeholder: "manual_placeholder";
153
+ flight_placeholder: "flight_placeholder";
154
+ flight_order: "flight_order";
155
+ external_order: "external_order";
156
+ }>;
157
+ status: z.ZodEnum<{
158
+ cancelled: "cancelled";
159
+ draft: "draft";
160
+ priced: "priced";
161
+ checkout_started: "checkout_started";
162
+ booked: "booked";
163
+ failed: "failed";
164
+ unavailable: "unavailable";
165
+ held: "held";
166
+ removed: "removed";
167
+ }>;
168
+ title: z.ZodNullable<z.ZodString>;
169
+ description: z.ZodString;
170
+ entityModule: z.ZodNullable<z.ZodString>;
171
+ entityId: z.ZodNullable<z.ZodString>;
172
+ sourceKind: z.ZodNullable<z.ZodString>;
173
+ currency: z.ZodString;
174
+ subtotalAmountCents: z.ZodNumber;
175
+ taxAmountCents: z.ZodNumber;
176
+ totalAmountCents: z.ZodNumber;
177
+ priceExpiresAt: z.ZodNullable<z.ZodString>;
178
+ warnings: z.ZodArray<z.ZodString>;
179
+ }, z.core.$strip>;
180
+ export type TripSnapshotProposalLine = z.infer<typeof tripSnapshotProposalLineSchema>;
181
+ export declare const tripSnapshotProposalSchema: z.ZodObject<{
182
+ envelopeId: z.ZodString;
183
+ title: z.ZodNullable<z.ZodString>;
184
+ description: z.ZodNullable<z.ZodString>;
185
+ currency: z.ZodString;
186
+ subtotalAmountCents: z.ZodNumber;
187
+ taxAmountCents: z.ZodNumber;
188
+ totalAmountCents: z.ZodNumber;
189
+ componentCount: z.ZodNumber;
190
+ pricedComponentCount: z.ZodNumber;
191
+ warnings: z.ZodArray<z.ZodString>;
192
+ frozenAt: z.ZodString;
193
+ lines: z.ZodArray<z.ZodObject<{
194
+ componentId: z.ZodString;
195
+ sequence: z.ZodNumber;
196
+ kind: z.ZodEnum<{
197
+ catalog_booking: "catalog_booking";
198
+ manual_placeholder: "manual_placeholder";
199
+ flight_placeholder: "flight_placeholder";
200
+ flight_order: "flight_order";
201
+ external_order: "external_order";
202
+ }>;
203
+ status: z.ZodEnum<{
204
+ cancelled: "cancelled";
205
+ draft: "draft";
206
+ priced: "priced";
207
+ checkout_started: "checkout_started";
208
+ booked: "booked";
209
+ failed: "failed";
210
+ unavailable: "unavailable";
211
+ held: "held";
212
+ removed: "removed";
213
+ }>;
214
+ title: z.ZodNullable<z.ZodString>;
215
+ description: z.ZodString;
216
+ entityModule: z.ZodNullable<z.ZodString>;
217
+ entityId: z.ZodNullable<z.ZodString>;
218
+ sourceKind: z.ZodNullable<z.ZodString>;
219
+ currency: z.ZodString;
220
+ subtotalAmountCents: z.ZodNumber;
221
+ taxAmountCents: z.ZodNumber;
222
+ totalAmountCents: z.ZodNumber;
223
+ priceExpiresAt: z.ZodNullable<z.ZodString>;
224
+ warnings: z.ZodArray<z.ZodString>;
225
+ }, z.core.$strip>>;
226
+ }, z.core.$strip>;
227
+ export type TripSnapshotProposal = z.infer<typeof tripSnapshotProposalSchema>;
228
+ export declare const createTripSnapshotSchema: z.ZodObject<{
229
+ envelopeId: z.ZodString;
230
+ createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
231
+ }, z.core.$strip>;
232
+ export type CreateTripSnapshotInput = z.infer<typeof createTripSnapshotSchema>;
233
+ export declare const updateTripEnvelopeSchema: z.ZodObject<{
234
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
235
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
236
+ travelerParty: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
237
+ constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
238
+ status: z.ZodOptional<z.ZodEnum<{
239
+ cancelled: "cancelled";
240
+ draft: "draft";
241
+ priced: "priced";
242
+ reserve_in_progress: "reserve_in_progress";
243
+ reserved: "reserved";
244
+ checkout_started: "checkout_started";
245
+ booked: "booked";
246
+ failed: "failed";
247
+ }>>;
248
+ updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
249
+ }, z.core.$strip>;
250
+ export type UpdateTripEnvelopeInput = z.infer<typeof updateTripEnvelopeSchema>;
251
+ export declare const createTripComponentSchema: z.ZodObject<{
252
+ envelopeId: z.ZodString;
253
+ sequence: z.ZodDefault<z.ZodNumber>;
254
+ kind: z.ZodEnum<{
255
+ catalog_booking: "catalog_booking";
256
+ manual_placeholder: "manual_placeholder";
257
+ flight_placeholder: "flight_placeholder";
258
+ flight_order: "flight_order";
259
+ external_order: "external_order";
260
+ }>;
261
+ description: z.ZodOptional<z.ZodString>;
262
+ catalogRef: z.ZodOptional<z.ZodObject<{
263
+ entityModule: z.ZodString;
264
+ entityId: z.ZodString;
265
+ sourceKind: z.ZodString;
266
+ sourceConnectionId: z.ZodOptional<z.ZodString>;
267
+ sourceRef: z.ZodOptional<z.ZodString>;
268
+ }, z.core.$strip>>;
269
+ estimatedPricing: z.ZodOptional<z.ZodObject<{
270
+ currency: z.ZodString;
271
+ subtotalAmountCents: z.ZodNumber;
272
+ taxAmountCents: z.ZodNumber;
273
+ totalAmountCents: z.ZodNumber;
274
+ priceExpiresAt: z.ZodOptional<z.ZodString>;
275
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
276
+ }, z.core.$strip>>;
277
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
278
+ }, z.core.$strict>;
279
+ export type CreateTripComponentInput = z.infer<typeof createTripComponentSchema>;
280
+ export declare const createTripComponentBodySchema: z.ZodObject<{
281
+ description: z.ZodOptional<z.ZodString>;
282
+ sequence: z.ZodDefault<z.ZodNumber>;
283
+ kind: z.ZodEnum<{
284
+ catalog_booking: "catalog_booking";
285
+ manual_placeholder: "manual_placeholder";
286
+ flight_placeholder: "flight_placeholder";
287
+ flight_order: "flight_order";
288
+ external_order: "external_order";
289
+ }>;
290
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
291
+ catalogRef: z.ZodOptional<z.ZodObject<{
292
+ entityModule: z.ZodString;
293
+ entityId: z.ZodString;
294
+ sourceKind: z.ZodString;
295
+ sourceConnectionId: z.ZodOptional<z.ZodString>;
296
+ sourceRef: z.ZodOptional<z.ZodString>;
297
+ }, z.core.$strip>>;
298
+ estimatedPricing: z.ZodOptional<z.ZodObject<{
299
+ currency: z.ZodString;
300
+ subtotalAmountCents: z.ZodNumber;
301
+ taxAmountCents: z.ZodNumber;
302
+ totalAmountCents: z.ZodNumber;
303
+ priceExpiresAt: z.ZodOptional<z.ZodString>;
304
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
305
+ }, z.core.$strip>>;
306
+ }, z.core.$strict>;
307
+ export type CreateTripComponentBodyInput = z.infer<typeof createTripComponentBodySchema>;
308
+ export declare const updateTripComponentSchema: z.ZodObject<{
309
+ sequence: z.ZodOptional<z.ZodNumber>;
310
+ status: z.ZodOptional<z.ZodEnum<{
311
+ cancelled: "cancelled";
312
+ draft: "draft";
313
+ priced: "priced";
314
+ checkout_started: "checkout_started";
315
+ booked: "booked";
316
+ failed: "failed";
317
+ unavailable: "unavailable";
318
+ held: "held";
319
+ removed: "removed";
320
+ }>>;
321
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
322
+ catalogRef: z.ZodOptional<z.ZodNullable<z.ZodObject<{
323
+ entityModule: z.ZodString;
324
+ entityId: z.ZodString;
325
+ sourceKind: z.ZodString;
326
+ sourceConnectionId: z.ZodOptional<z.ZodString>;
327
+ sourceRef: z.ZodOptional<z.ZodString>;
328
+ }, z.core.$strip>>>;
329
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
330
+ warningCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
331
+ }, z.core.$strip>;
332
+ export type UpdateTripComponentInput = z.infer<typeof updateTripComponentSchema>;
333
+ export declare const reorderTripComponentsSchema: z.ZodObject<{
334
+ envelopeId: z.ZodString;
335
+ componentIds: z.ZodArray<z.ZodString>;
336
+ }, z.core.$strip>;
337
+ export type ReorderTripComponentsInput = z.infer<typeof reorderTripComponentsSchema>;
338
+ export declare const updateTripComponentRefsSchema: z.ZodObject<{
339
+ bookingDraftId: z.ZodOptional<z.ZodString>;
340
+ catalogQuoteId: z.ZodOptional<z.ZodString>;
341
+ committedRef: z.ZodOptional<z.ZodObject<{
342
+ bookingId: z.ZodOptional<z.ZodString>;
343
+ bookingGroupId: z.ZodOptional<z.ZodString>;
344
+ orderId: z.ZodOptional<z.ZodString>;
345
+ paymentSessionId: z.ZodOptional<z.ZodString>;
346
+ providerRef: z.ZodOptional<z.ZodString>;
347
+ supplierRef: z.ZodOptional<z.ZodString>;
348
+ }, z.core.$strip>>;
349
+ }, z.core.$strip>;
350
+ export type UpdateTripComponentRefsInput = z.infer<typeof updateTripComponentRefsSchema>;
351
+ export declare const priceTripSchema: z.ZodObject<{
352
+ envelopeId: z.ZodString;
353
+ scope: z.ZodObject<{
354
+ locale: z.ZodString;
355
+ audience: z.ZodEnum<{
356
+ staff: "staff";
357
+ customer: "customer";
358
+ partner: "partner";
359
+ supplier: "supplier";
360
+ }>;
361
+ market: z.ZodString;
362
+ currency: z.ZodOptional<z.ZodString>;
363
+ }, z.core.$strip>;
364
+ ttlMs: z.ZodOptional<z.ZodNumber>;
365
+ }, z.core.$strip>;
366
+ export type PriceTripInput = z.infer<typeof priceTripSchema>;
367
+ export declare const reserveTripSchema: z.ZodObject<{
368
+ envelopeId: z.ZodString;
369
+ idempotencyKey: z.ZodOptional<z.ZodString>;
370
+ refreshScope: z.ZodOptional<z.ZodObject<{
371
+ locale: z.ZodString;
372
+ audience: z.ZodEnum<{
373
+ staff: "staff";
374
+ customer: "customer";
375
+ partner: "partner";
376
+ supplier: "supplier";
377
+ }>;
378
+ market: z.ZodString;
379
+ currency: z.ZodOptional<z.ZodString>;
380
+ }, z.core.$strip>>;
381
+ }, z.core.$strip>;
382
+ export type ReserveTripInput = z.infer<typeof reserveTripSchema>;
383
+ export declare const startTripCheckoutSchema: z.ZodObject<{
384
+ envelopeId: z.ZodString;
385
+ idempotencyKey: z.ZodOptional<z.ZodString>;
386
+ intent: z.ZodDefault<z.ZodEnum<{
387
+ hold: "hold";
388
+ card: "card";
389
+ bank_transfer: "bank_transfer";
390
+ inquiry: "inquiry";
391
+ }>>;
392
+ request: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
393
+ }, z.core.$strip>;
394
+ export type StartTripCheckoutInput = z.infer<typeof startTripCheckoutSchema>;
395
+ export declare const previewTripCancellationSchema: z.ZodObject<{
396
+ envelopeId: z.ZodString;
397
+ componentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
398
+ reason: z.ZodOptional<z.ZodString>;
399
+ requestedAt: z.ZodOptional<z.ZodString>;
400
+ request: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
401
+ }, z.core.$strip>;
402
+ export type PreviewTripCancellationInput = z.infer<typeof previewTripCancellationSchema>;
403
+ export declare const cancelTripComponentsSchema: z.ZodObject<{
404
+ envelopeId: z.ZodString;
405
+ componentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
406
+ reason: z.ZodOptional<z.ZodString>;
407
+ requestedAt: z.ZodOptional<z.ZodString>;
408
+ request: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
409
+ idempotencyKey: z.ZodOptional<z.ZodString>;
410
+ }, z.core.$strip>;
411
+ export type CancelTripComponentsInput = z.infer<typeof cancelTripComponentsSchema>;
412
+ export declare function isAllowedTripComponentStatusTransition(from: TripComponentStatus, to: TripComponentStatus): boolean;
413
+ export declare const tripComponentStatusTransitionSchema: z.ZodObject<{
414
+ from: z.ZodEnum<{
415
+ cancelled: "cancelled";
416
+ draft: "draft";
417
+ priced: "priced";
418
+ checkout_started: "checkout_started";
419
+ booked: "booked";
420
+ failed: "failed";
421
+ unavailable: "unavailable";
422
+ held: "held";
423
+ removed: "removed";
424
+ }>;
425
+ to: z.ZodEnum<{
426
+ cancelled: "cancelled";
427
+ draft: "draft";
428
+ priced: "priced";
429
+ checkout_started: "checkout_started";
430
+ booked: "booked";
431
+ failed: "failed";
432
+ unavailable: "unavailable";
433
+ held: "held";
434
+ removed: "removed";
435
+ }>;
436
+ }, z.core.$strip>;
437
+ export type TripComponentStatusTransition = z.infer<typeof tripComponentStatusTransitionSchema>;
438
+ export declare function isTerminalTripComponentStatus(status: TripComponentStatus): boolean;
439
+ export declare const tripsStatusSchema: z.ZodObject<{
440
+ module: z.ZodLiteral<"trips">;
441
+ status: z.ZodLiteral<"scaffolded">;
442
+ }, z.core.$strip>;
443
+ export type TripsStatus = z.infer<typeof tripsStatusSchema>;
444
+ export declare const tripsHealthCheckSchema: z.ZodObject<{
445
+ module: z.ZodLiteral<"trips">;
446
+ status: z.ZodLiteral<"scaffolded">;
447
+ }, z.core.$strip>;
448
+ export type TripsHealthCheck = z.infer<typeof tripsHealthCheckSchema>;
449
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,wBAAwB;;;;;;;;;EASnC,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEzE,eAAO,MAAM,uBAAuB;;;;;;EAMlC,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEvE,eAAO,MAAM,yBAAyB;;;;;;;;;;EAUpC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE3E,eAAO,MAAM,4BAA4B;;;;;;;;;;;EAWvC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEjF,eAAO,MAAM,0BAA0B;;;;;;;;;iBASrC,CAAA;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAE7E,eAAO,MAAM,kCAAkC;;;;;;;iBAO7C,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAE7F,eAAO,MAAM,iCAAi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