@nicertravel/sdk 0.0.0 → 1.0.0-beta.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 (270) hide show
  1. package/README.md +89 -3
  2. package/dist/_/codec.d.ts +93 -0
  3. package/dist/_/codec.js +298 -0
  4. package/dist/_/error.d.ts +27 -0
  5. package/dist/_/error.js +68 -0
  6. package/dist/_/hooks/envelope.d.ts +11 -0
  7. package/dist/_/hooks/envelope.js +15 -0
  8. package/dist/_/index.d.ts +3 -0
  9. package/dist/_/index.js +5 -0
  10. package/dist/_/transport.d.ts +146 -0
  11. package/dist/_/transport.js +220 -0
  12. package/dist/activities/client.d.ts +35 -0
  13. package/dist/activities/client.js +23 -0
  14. package/dist/activities/index.d.ts +5 -0
  15. package/dist/activities/index.js +4 -0
  16. package/dist/activities/models.d.ts +27 -0
  17. package/dist/activities/models.js +3 -0
  18. package/dist/activityDestinations/client.d.ts +24 -0
  19. package/dist/activityDestinations/client.js +17 -0
  20. package/dist/activityDestinations/index.d.ts +4 -0
  21. package/dist/activityDestinations/index.js +4 -0
  22. package/dist/balances/client.d.ts +29 -0
  23. package/dist/balances/client.js +18 -0
  24. package/dist/balances/index.d.ts +5 -0
  25. package/dist/balances/index.js +4 -0
  26. package/dist/balances/models.d.ts +12 -0
  27. package/dist/balances/models.js +3 -0
  28. package/dist/bookingSelections/client.d.ts +54 -0
  29. package/dist/bookingSelections/client.js +25 -0
  30. package/dist/bookingSelections/index.d.ts +5 -0
  31. package/dist/bookingSelections/index.js +4 -0
  32. package/dist/bookingSelections/models.d.ts +35 -0
  33. package/dist/bookingSelections/models.js +3 -0
  34. package/dist/carRentals/client.d.ts +55 -0
  35. package/dist/carRentals/client.js +25 -0
  36. package/dist/carRentals/index.d.ts +5 -0
  37. package/dist/carRentals/index.js +4 -0
  38. package/dist/carRentals/models.d.ts +157 -0
  39. package/dist/carRentals/models.js +3 -0
  40. package/dist/carriers/client.d.ts +32 -0
  41. package/dist/carriers/client.js +18 -0
  42. package/dist/carriers/index.d.ts +5 -0
  43. package/dist/carriers/index.js +4 -0
  44. package/dist/carriers/models.d.ts +9 -0
  45. package/dist/carriers/models.js +3 -0
  46. package/dist/chats/client.d.ts +69 -0
  47. package/dist/chats/client.js +38 -0
  48. package/dist/chats/index.d.ts +5 -0
  49. package/dist/chats/index.js +4 -0
  50. package/dist/chats/models.d.ts +25 -0
  51. package/dist/chats/models.js +3 -0
  52. package/dist/checkouts/client.d.ts +27 -0
  53. package/dist/checkouts/client.js +18 -0
  54. package/dist/checkouts/index.d.ts +5 -0
  55. package/dist/checkouts/index.js +4 -0
  56. package/dist/checkouts/models.d.ts +23 -0
  57. package/dist/checkouts/models.js +3 -0
  58. package/dist/client.d.ts +95 -0
  59. package/dist/client.js +220 -0
  60. package/dist/commissionExports/client.d.ts +62 -0
  61. package/dist/commissionExports/client.js +33 -0
  62. package/dist/commissionExports/index.d.ts +5 -0
  63. package/dist/commissionExports/index.js +4 -0
  64. package/dist/commissionExports/models.d.ts +165 -0
  65. package/dist/commissionExports/models.js +3 -0
  66. package/dist/commissionImports/client.d.ts +61 -0
  67. package/dist/commissionImports/client.js +34 -0
  68. package/dist/commissionImports/index.d.ts +5 -0
  69. package/dist/commissionImports/index.js +4 -0
  70. package/dist/commissionImports/models.d.ts +118 -0
  71. package/dist/commissionImports/models.js +3 -0
  72. package/dist/commissionItems/client.d.ts +128 -0
  73. package/dist/commissionItems/client.js +41 -0
  74. package/dist/commissionItems/index.d.ts +5 -0
  75. package/dist/commissionItems/index.js +4 -0
  76. package/dist/commissionItems/models.d.ts +217 -0
  77. package/dist/commissionItems/models.js +3 -0
  78. package/dist/commissionReports/client.d.ts +76 -0
  79. package/dist/commissionReports/client.js +18 -0
  80. package/dist/commissionReports/index.d.ts +5 -0
  81. package/dist/commissionReports/index.js +4 -0
  82. package/dist/commissionReports/models.d.ts +208 -0
  83. package/dist/commissionReports/models.js +3 -0
  84. package/dist/crmSettings/client.d.ts +50 -0
  85. package/dist/crmSettings/client.js +25 -0
  86. package/dist/crmSettings/index.d.ts +5 -0
  87. package/dist/crmSettings/index.js +4 -0
  88. package/dist/crmSettings/models.d.ts +313 -0
  89. package/dist/crmSettings/models.js +3 -0
  90. package/dist/earnings/client.d.ts +30 -0
  91. package/dist/earnings/client.js +18 -0
  92. package/dist/earnings/index.d.ts +5 -0
  93. package/dist/earnings/index.js +4 -0
  94. package/dist/earnings/models.d.ts +16 -0
  95. package/dist/earnings/models.js +3 -0
  96. package/dist/externalBookings/client.d.ts +56 -0
  97. package/dist/externalBookings/client.js +33 -0
  98. package/dist/externalBookings/index.d.ts +5 -0
  99. package/dist/externalBookings/index.js +4 -0
  100. package/dist/externalBookings/models.d.ts +93 -0
  101. package/dist/externalBookings/models.js +3 -0
  102. package/dist/externalPayments/client.d.ts +23 -0
  103. package/dist/externalPayments/client.js +18 -0
  104. package/dist/externalPayments/index.d.ts +5 -0
  105. package/dist/externalPayments/index.js +4 -0
  106. package/dist/externalPayments/models.d.ts +47 -0
  107. package/dist/externalPayments/models.js +3 -0
  108. package/dist/favorites/client.d.ts +87 -0
  109. package/dist/favorites/client.js +63 -0
  110. package/dist/favorites/index.d.ts +5 -0
  111. package/dist/favorites/index.js +4 -0
  112. package/dist/favorites/models.d.ts +79 -0
  113. package/dist/favorites/models.js +3 -0
  114. package/dist/flightSchedules/client.d.ts +29 -0
  115. package/dist/flightSchedules/client.js +18 -0
  116. package/dist/flightSchedules/index.d.ts +5 -0
  117. package/dist/flightSchedules/index.js +4 -0
  118. package/dist/flightSchedules/models.d.ts +25 -0
  119. package/dist/flightSchedules/models.js +3 -0
  120. package/dist/flights/client.d.ts +73 -0
  121. package/dist/flights/client.js +25 -0
  122. package/dist/flights/index.d.ts +5 -0
  123. package/dist/flights/index.js +4 -0
  124. package/dist/flights/models.d.ts +345 -0
  125. package/dist/flights/models.js +3 -0
  126. package/dist/hotels/client.d.ts +104 -0
  127. package/dist/hotels/client.js +26 -0
  128. package/dist/hotels/index.d.ts +5 -0
  129. package/dist/hotels/index.js +4 -0
  130. package/dist/hotels/models.d.ts +355 -0
  131. package/dist/hotels/models.js +3 -0
  132. package/dist/index.d.ts +5 -0
  133. package/dist/index.js +4 -0
  134. package/dist/insuranceQuotes/client.d.ts +27 -0
  135. package/dist/insuranceQuotes/client.js +18 -0
  136. package/dist/insuranceQuotes/index.d.ts +5 -0
  137. package/dist/insuranceQuotes/index.js +4 -0
  138. package/dist/insuranceQuotes/models.d.ts +76 -0
  139. package/dist/insuranceQuotes/models.js +3 -0
  140. package/dist/itineraries/client.d.ts +165 -0
  141. package/dist/itineraries/client.js +86 -0
  142. package/dist/itineraries/index.d.ts +5 -0
  143. package/dist/itineraries/index.js +4 -0
  144. package/dist/itineraries/models.d.ts +1619 -0
  145. package/dist/itineraries/models.js +4 -0
  146. package/dist/models.d.ts +1361 -0
  147. package/dist/models.js +3 -0
  148. package/dist/notes/client.d.ts +82 -0
  149. package/dist/notes/client.js +41 -0
  150. package/dist/notes/index.d.ts +5 -0
  151. package/dist/notes/index.js +4 -0
  152. package/dist/notes/models.d.ts +116 -0
  153. package/dist/notes/models.js +3 -0
  154. package/dist/offers/client.d.ts +27 -0
  155. package/dist/offers/client.js +17 -0
  156. package/dist/offers/index.d.ts +5 -0
  157. package/dist/offers/index.js +4 -0
  158. package/dist/offers/models.d.ts +19 -0
  159. package/dist/offers/models.js +3 -0
  160. package/dist/options/index.d.ts +114 -0
  161. package/dist/options/index.js +115 -0
  162. package/dist/orders/client.d.ts +154 -0
  163. package/dist/orders/client.js +65 -0
  164. package/dist/orders/index.d.ts +5 -0
  165. package/dist/orders/index.js +4 -0
  166. package/dist/orders/models.d.ts +2510 -0
  167. package/dist/orders/models.js +3 -0
  168. package/dist/payees/client.d.ts +48 -0
  169. package/dist/payees/client.js +26 -0
  170. package/dist/payees/index.d.ts +5 -0
  171. package/dist/payees/index.js +4 -0
  172. package/dist/payees/models.d.ts +50 -0
  173. package/dist/payees/models.js +3 -0
  174. package/dist/paymentMethods/client.d.ts +24 -0
  175. package/dist/paymentMethods/client.js +18 -0
  176. package/dist/paymentMethods/index.d.ts +5 -0
  177. package/dist/paymentMethods/index.js +4 -0
  178. package/dist/paymentMethods/models.d.ts +60 -0
  179. package/dist/paymentMethods/models.js +3 -0
  180. package/dist/places/client.d.ts +61 -0
  181. package/dist/places/client.js +25 -0
  182. package/dist/places/index.d.ts +5 -0
  183. package/dist/places/index.js +4 -0
  184. package/dist/places/models.d.ts +51 -0
  185. package/dist/places/models.js +3 -0
  186. package/dist/profileForms/client.d.ts +38 -0
  187. package/dist/profileForms/client.js +25 -0
  188. package/dist/profileForms/index.d.ts +5 -0
  189. package/dist/profileForms/index.js +4 -0
  190. package/dist/profileForms/models.d.ts +24 -0
  191. package/dist/profileForms/models.js +3 -0
  192. package/dist/quotes/client.d.ts +30 -0
  193. package/dist/quotes/client.js +18 -0
  194. package/dist/quotes/index.d.ts +5 -0
  195. package/dist/quotes/index.js +4 -0
  196. package/dist/quotes/models.d.ts +47 -0
  197. package/dist/quotes/models.js +3 -0
  198. package/dist/remittanceBatches/client.d.ts +78 -0
  199. package/dist/remittanceBatches/client.js +42 -0
  200. package/dist/remittanceBatches/index.d.ts +5 -0
  201. package/dist/remittanceBatches/index.js +4 -0
  202. package/dist/remittanceBatches/models.d.ts +131 -0
  203. package/dist/remittanceBatches/models.js +3 -0
  204. package/dist/remittanceClaims/client.d.ts +27 -0
  205. package/dist/remittanceClaims/client.js +18 -0
  206. package/dist/remittanceClaims/index.d.ts +5 -0
  207. package/dist/remittanceClaims/index.js +4 -0
  208. package/dist/remittanceClaims/models.d.ts +5 -0
  209. package/dist/remittanceClaims/models.js +3 -0
  210. package/dist/remittanceLines/client.d.ts +27 -0
  211. package/dist/remittanceLines/client.js +18 -0
  212. package/dist/remittanceLines/index.d.ts +5 -0
  213. package/dist/remittanceLines/index.js +4 -0
  214. package/dist/remittanceLines/models.d.ts +5 -0
  215. package/dist/remittanceLines/models.js +3 -0
  216. package/dist/remittances/client.d.ts +78 -0
  217. package/dist/remittances/client.js +42 -0
  218. package/dist/remittances/index.d.ts +5 -0
  219. package/dist/remittances/index.js +4 -0
  220. package/dist/remittances/models.d.ts +116 -0
  221. package/dist/remittances/models.js +3 -0
  222. package/dist/statements/client.d.ts +75 -0
  223. package/dist/statements/client.js +34 -0
  224. package/dist/statements/index.d.ts +5 -0
  225. package/dist/statements/index.js +4 -0
  226. package/dist/statements/models.d.ts +147 -0
  227. package/dist/statements/models.js +3 -0
  228. package/dist/suppliers/client.d.ts +71 -0
  229. package/dist/suppliers/client.js +41 -0
  230. package/dist/suppliers/index.d.ts +5 -0
  231. package/dist/suppliers/index.js +4 -0
  232. package/dist/suppliers/models.d.ts +130 -0
  233. package/dist/suppliers/models.js +3 -0
  234. package/dist/taskTemplates/client.d.ts +36 -0
  235. package/dist/taskTemplates/client.js +18 -0
  236. package/dist/taskTemplates/index.d.ts +5 -0
  237. package/dist/taskTemplates/index.js +4 -0
  238. package/dist/taskTemplates/models.d.ts +15 -0
  239. package/dist/taskTemplates/models.js +3 -0
  240. package/dist/tasks/client.d.ts +105 -0
  241. package/dist/tasks/client.js +41 -0
  242. package/dist/tasks/index.d.ts +5 -0
  243. package/dist/tasks/index.js +4 -0
  244. package/dist/tasks/models.d.ts +59 -0
  245. package/dist/tasks/models.js +3 -0
  246. package/dist/timeline/client.d.ts +42 -0
  247. package/dist/timeline/client.js +18 -0
  248. package/dist/timeline/index.d.ts +5 -0
  249. package/dist/timeline/index.js +4 -0
  250. package/dist/timeline/models.d.ts +65 -0
  251. package/dist/timeline/models.js +3 -0
  252. package/dist/travelProfile/client.d.ts +56 -0
  253. package/dist/travelProfile/client.js +25 -0
  254. package/dist/travelProfile/index.d.ts +5 -0
  255. package/dist/travelProfile/index.js +4 -0
  256. package/dist/travelProfile/models.d.ts +95 -0
  257. package/dist/travelProfile/models.js +3 -0
  258. package/dist/travelers/client.d.ts +214 -0
  259. package/dist/travelers/client.js +76 -0
  260. package/dist/travelers/index.d.ts +5 -0
  261. package/dist/travelers/index.js +4 -0
  262. package/dist/travelers/models.d.ts +576 -0
  263. package/dist/travelers/models.js +3 -0
  264. package/dist/trips/client.d.ts +224 -0
  265. package/dist/trips/client.js +88 -0
  266. package/dist/trips/index.d.ts +5 -0
  267. package/dist/trips/index.js +4 -0
  268. package/dist/trips/models.d.ts +486 -0
  269. package/dist/trips/models.js +3 -0
  270. package/package.json +35 -2
@@ -0,0 +1,2510 @@
1
+ import type { AirportCode, BookingCommercialSnapshot, BookingPriceSnapshot, BookingProductSnapshot, CarrierCode, CountryCode, CurrencyCode, FrequentFlyerProgram, HotelMembership, LoyaltyProgram, Money, ParticipantField, ParticipantRequirements, ParticipantSex, PaymentMethodSummary, PaymentTerms, PersonAddress, PersonContact, PersonName, ProductKind, ProviderKey, QuotePolicy, TermsDigest, TravelDocument } from "../models.js";
2
+ export interface BookingQuote {
3
+ bookingSelectionId: string | null;
4
+ commercialSnapshot: BookingCommercialSnapshot;
5
+ createdAt: string;
6
+ expiresAt: string;
7
+ itineraryItemId: string | null;
8
+ offerReference: string;
9
+ participantRequirements: ParticipantRequirements;
10
+ paymentTerms: PaymentTerms;
11
+ priceSnapshot: BookingPriceSnapshot;
12
+ productSnapshot: BookingProductSnapshot;
13
+ productType: ProductKind;
14
+ providerKey: ProviderKey;
15
+ providerProductId: string;
16
+ quoteId: string;
17
+ searchId: string | null;
18
+ status: "ACTIVE" | "CONSUMED" | "EXPIRED" | "INVALIDATED";
19
+ termsDigest: TermsDigest;
20
+ travelReferenceId: string | null;
21
+ travelersTripId: string | null;
22
+ }
23
+ export interface CreateOrderResponse {
24
+ /**
25
+ * Air planning fee in USD cents for the whole reservation.
26
+ */
27
+ airPlanningFeeMinor?: number;
28
+ allowedActions: ("SUBMIT_CHECKOUT" | "CREATE_PAYMENT_LINK" | "CONFIRM_NICER_PAYMENT" | "PAY" | "CANCEL" | "REVOKE_PAYMENT_LINK" | "RECORD_EXTERNAL_PAYMENT")[];
29
+ bookingSelectionId: string | null;
30
+ /**
31
+ * True when the caller may authorize the card they pay with to the order's
32
+ * advisor: a traveler-side payer on an order that has an advisor.
33
+ */
34
+ canSaveCard?: boolean;
35
+ cancellation: {
36
+ allowed: boolean;
37
+ estimatedPenalty: Money | null;
38
+ kind: "CANCEL_BOOKING" | "NONE" | "RELEASE_HOLD";
39
+ policy: QuotePolicy | null;
40
+ };
41
+ /**
42
+ * The original checkout choice: HOLD reserves to pay later; BOOK requests
43
+ * immediate booking and ticketing. Null or absent means the choice was not
44
+ * recorded; never infer it from payment terms or reservation state.
45
+ */
46
+ checkoutIntent?: "HOLD" | "BOOK" | null;
47
+ /**
48
+ * Expiry of the caller's secure payment access, independent of the quote and
49
+ * airline hold deadlines.
50
+ */
51
+ checkoutSessionExpiresAt?: string;
52
+ commercialSnapshot: BookingCommercialSnapshot;
53
+ committedAt: string | null;
54
+ companyName: string;
55
+ createdAt: string;
56
+ currentProductSnapshot: OrderProductSnapshot;
57
+ expiresAt: string;
58
+ externalPayments: {
59
+ amount: Money;
60
+ externalPaymentId: string;
61
+ paidAt: string;
62
+ paymentMethod: string;
63
+ providerReference: string | null;
64
+ receiptAttached: boolean;
65
+ recordedAt: string;
66
+ status: "RECORDED" | "REVERSED";
67
+ }[];
68
+ flight: {
69
+ changes: {
70
+ changeId: string;
71
+ currentValue: string | null;
72
+ detectedAt: string;
73
+ kind: "SCHEDULE" | "TERMINAL" | "EQUIPMENT" | "MARKETING_CARRIER" | "OPERATING_CARRIER" | "FLIGHT_NUMBER" | "ROUTE" | "CABIN_OR_BOOKING_CLASS" | "STATUS_OR_CANCELLATION";
74
+ legId: string;
75
+ previousValue: string | null;
76
+ version: number;
77
+ }[];
78
+ legs: {
79
+ aircraftCode: string | null;
80
+ arrivalAt: string;
81
+ arrivalTerminal: string | null;
82
+ companyName: string;
83
+ currentVersion: number;
84
+ departureAt: string;
85
+ departureTerminal: string | null;
86
+ destinationAirport: AirportCode;
87
+ legId: string;
88
+ marketingCarrierCode: CarrierCode;
89
+ marketingFlightNumber: string;
90
+ operatingCarrierCode: CarrierCode | null;
91
+ operatingFlightNumber: string | null;
92
+ orderId: string;
93
+ originAirport: AirportCode;
94
+ sequence: number;
95
+ status: string;
96
+ }[];
97
+ validatingCarrier?: CarrierCode;
98
+ } | null;
99
+ fulfillment: {
100
+ agencyTicketing?: {
101
+ queuedAt: string | null;
102
+ };
103
+ issuedDocuments: number;
104
+ items: OrderFulfillment[];
105
+ requiredDocuments: number;
106
+ state: FulfillmentState;
107
+ };
108
+ itineraryItemId: string | null;
109
+ message: string | null;
110
+ /**
111
+ * False when the checkout asked for this order's emails to reach its advisor
112
+ * alone, not its travelers or payer. Absent means they reach the travelers
113
+ * too.
114
+ */
115
+ notifyTravelers?: boolean;
116
+ orderId: string;
117
+ orderVersion: number;
118
+ participantRequirements: ParticipantRequirements;
119
+ participants: {
120
+ completedFields: ParticipantField[];
121
+ displayName: string | null;
122
+ email?: string | null;
123
+ emailMasked: string | null;
124
+ participantId: string;
125
+ phone?: string | null;
126
+ phoneMasked: string | null;
127
+ role: "DRIVER" | "GUEST" | "INSURED" | "PAYER" | "TRAVELER";
128
+ status: "COMPLETE" | "INCOMPLETE";
129
+ travelerId?: string | null;
130
+ }[];
131
+ payment: {
132
+ latestAttempt: PaymentAttempt | null;
133
+ methods: PaymentMethodSummary[];
134
+ newAttemptAllowed: boolean;
135
+ presentation: {
136
+ type: "NONE";
137
+ } | {
138
+ type: "STRIPE_PAYMENT_ELEMENT";
139
+ } | {
140
+ type: "PROVIDER_CARD_FORM";
141
+ } | {
142
+ message: string;
143
+ type: "WAITING_PROVIDER";
144
+ };
145
+ purpose: "NICER_CHARGE" | "PROVIDER_GUARANTEE" | "PROVIDER_PAYMENT";
146
+ };
147
+ paymentLink?: {
148
+ expiresAt: string | null;
149
+ paymentUrl: string | null;
150
+ };
151
+ paymentState: PaymentState;
152
+ paymentTerms: PaymentTerms;
153
+ pollAfterMs: number | null;
154
+ priceSnapshot: BookingPriceSnapshot;
155
+ productSnapshot: OrderProductSnapshot;
156
+ productType: "PLANNING_FEE" | "EXTRA_PAYMENT" | "HOTEL" | "FLIGHT" | "INSURANCE" | "CAR_RENTAL";
157
+ providerKey: ProviderKey;
158
+ providerObservation?: {
159
+ evidence: {
160
+ ancillaries: {
161
+ applicability?: string;
162
+ categoryCode?: string;
163
+ categoryName?: string;
164
+ code?: string;
165
+ commissionable?: boolean;
166
+ documentReference?: string;
167
+ money?: {
168
+ currency: string;
169
+ feesMinor?: number;
170
+ subtotalMinor?: number;
171
+ taxesMinor?: number;
172
+ totalMinor?: number;
173
+ };
174
+ name?: string;
175
+ quantity?: number;
176
+ reference: string;
177
+ refundable?: boolean;
178
+ scope: ReservationAssociation;
179
+ source?: string;
180
+ status?: {
181
+ code?: string;
182
+ name?: string;
183
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
184
+ };
185
+ subcode?: string;
186
+ supplierCode?: string;
187
+ taxes?: {
188
+ amount?: {
189
+ currency: string;
190
+ totalMinor: number;
191
+ };
192
+ code?: string;
193
+ unconvertedAmount?: string;
194
+ }[];
195
+ vendorCode?: string;
196
+ }[];
197
+ baggage: {
198
+ allowance?: {
199
+ maximumPieces?: number;
200
+ pieces?: {
201
+ description?: string;
202
+ maximumSizeCentimeters?: number;
203
+ maximumSizeInches?: number;
204
+ maximumWeightKilograms?: number;
205
+ maximumWeightPounds?: number;
206
+ pieces?: number;
207
+ }[];
208
+ totalWeightKilograms?: number;
209
+ };
210
+ charges?: {
211
+ amount?: {
212
+ currency: string;
213
+ totalMinor: number;
214
+ };
215
+ checkInOnly?: boolean;
216
+ description?: string;
217
+ maximumSizeCentimeters?: number;
218
+ maximumSizeInches?: number;
219
+ maximumWeightKilograms?: number;
220
+ maximumWeightPounds?: number;
221
+ pieces?: number;
222
+ }[];
223
+ kind: "CHECKED" | "CABIN" | "OTHER";
224
+ reference: string;
225
+ scope: ReservationAssociation;
226
+ }[];
227
+ cancelable?: boolean;
228
+ contacts: {
229
+ address?: ReservationAddress;
230
+ displayName?: string;
231
+ emails?: string[];
232
+ emergencyPhones?: {
233
+ label?: string;
234
+ number: string;
235
+ }[];
236
+ faxes?: string[];
237
+ givenName?: string;
238
+ middleName?: string;
239
+ phones?: {
240
+ label?: string;
241
+ number: string;
242
+ }[];
243
+ reference: string;
244
+ scope: ReservationAssociation;
245
+ surname?: string;
246
+ }[];
247
+ createdAt?: ReservationTimestamp;
248
+ creator?: {
249
+ agencyIataNumber?: string;
250
+ homeOfficeId?: string;
251
+ officeId?: string;
252
+ supplierCode?: string;
253
+ userCode?: string;
254
+ };
255
+ documents: {
256
+ bundled?: boolean;
257
+ commission?: {
258
+ amount?: {
259
+ currency: string;
260
+ totalMinor: number;
261
+ };
262
+ percentage?: string;
263
+ text?: string;
264
+ unconvertedAmount?: string;
265
+ };
266
+ coupons?: {
267
+ number?: number;
268
+ reference?: string;
269
+ segmentReference?: string;
270
+ status?: {
271
+ code?: string;
272
+ name?: string;
273
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
274
+ };
275
+ }[];
276
+ issuedAt?: ReservationTimestamp;
277
+ issuer?: {
278
+ agencyIataNumber?: string;
279
+ homeOfficeId?: string;
280
+ officeId?: string;
281
+ supplierCode?: string;
282
+ userCode?: string;
283
+ };
284
+ kind: "ELECTRONIC_TICKET" | "NON_ELECTRONIC_TICKET" | "ANCILLARY_DOCUMENT" | "OTHER";
285
+ money?: {
286
+ currency: string;
287
+ feesMinor?: number;
288
+ subtotalMinor?: number;
289
+ taxesMinor?: number;
290
+ totalMinor?: number;
291
+ };
292
+ number?: string;
293
+ reference: string;
294
+ scope: ReservationAssociation;
295
+ status?: {
296
+ code?: string;
297
+ name?: string;
298
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
299
+ };
300
+ }[];
301
+ fareRules: {
302
+ cancelable?: boolean;
303
+ changeable?: boolean;
304
+ destination?: string;
305
+ exchangePenalties?: {
306
+ amount?: {
307
+ currency: string;
308
+ totalMinor: number;
309
+ };
310
+ applicability?: string;
311
+ conditionsApply?: boolean;
312
+ hasNoShowCost?: boolean;
313
+ noShowAmount?: {
314
+ currency: string;
315
+ totalMinor: number;
316
+ };
317
+ }[];
318
+ origin?: string;
319
+ passengerType?: string;
320
+ reference: string;
321
+ refundPenalties?: {
322
+ amount?: {
323
+ currency: string;
324
+ totalMinor: number;
325
+ };
326
+ applicability?: string;
327
+ conditionsApply?: boolean;
328
+ hasNoShowCost?: boolean;
329
+ noShowAmount?: {
330
+ currency: string;
331
+ totalMinor: number;
332
+ };
333
+ }[];
334
+ refundable?: boolean;
335
+ scope: ReservationAssociation;
336
+ supplierCode?: string;
337
+ }[];
338
+ fares: {
339
+ bundledServices?: {
340
+ amount?: {
341
+ currency: string;
342
+ totalMinor: number;
343
+ };
344
+ code?: string;
345
+ description?: string;
346
+ quantity?: number;
347
+ type?: string;
348
+ }[];
349
+ calculationLine?: string;
350
+ commission?: {
351
+ amount?: {
352
+ currency: string;
353
+ totalMinor: number;
354
+ };
355
+ percentage?: string;
356
+ text?: string;
357
+ unconvertedAmount?: string;
358
+ };
359
+ components?: {
360
+ accountCode?: string;
361
+ baseAmount?: {
362
+ currency: string;
363
+ totalMinor: number;
364
+ };
365
+ brandAttributes?: string[];
366
+ brandCode?: string;
367
+ brandName?: string;
368
+ checkedBaggage?: {
369
+ maximumPieces?: number;
370
+ pieces?: {
371
+ description?: string;
372
+ maximumSizeCentimeters?: number;
373
+ maximumSizeInches?: number;
374
+ maximumWeightKilograms?: number;
375
+ maximumWeightPounds?: number;
376
+ pieces?: number;
377
+ }[];
378
+ totalWeightKilograms?: number;
379
+ };
380
+ currentItinerary?: boolean;
381
+ fareBasis?: string;
382
+ programCode?: string;
383
+ programName?: string;
384
+ reference?: string;
385
+ scope: ReservationAssociation;
386
+ }[];
387
+ createdAt?: ReservationTimestamp;
388
+ issuer?: {
389
+ agencyIataNumber?: string;
390
+ homeOfficeId?: string;
391
+ officeId?: string;
392
+ supplierCode?: string;
393
+ userCode?: string;
394
+ };
395
+ money?: {
396
+ currency: string;
397
+ feesMinor?: number;
398
+ subtotalMinor?: number;
399
+ taxesMinor?: number;
400
+ totalMinor?: number;
401
+ };
402
+ negotiated?: boolean;
403
+ originalMoney?: {
404
+ currency: string;
405
+ feesMinor?: number;
406
+ subtotalMinor?: number;
407
+ taxesMinor?: number;
408
+ totalMinor?: number;
409
+ };
410
+ pricedTravelerType?: string;
411
+ purchaseDeadline?: ReservationTimestamp;
412
+ recordTypeCode?: string;
413
+ recordTypeName?: string;
414
+ reference: string;
415
+ requestedTravelerType?: string;
416
+ scope: ReservationAssociation;
417
+ status?: {
418
+ code?: string;
419
+ name?: string;
420
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
421
+ };
422
+ supplierCode?: string;
423
+ taxes?: {
424
+ amount?: {
425
+ currency: string;
426
+ totalMinor: number;
427
+ };
428
+ code?: string;
429
+ unconvertedAmount?: string;
430
+ }[];
431
+ tourCode?: string;
432
+ typeCode?: string;
433
+ typeName?: string;
434
+ validPricing?: boolean;
435
+ }[];
436
+ guarantees: {
437
+ approval?: {
438
+ amount?: {
439
+ currency: string;
440
+ totalMinor: number;
441
+ };
442
+ expiresAt?: ReservationTimestamp;
443
+ requestedAt?: ReservationTimestamp;
444
+ supplierCode?: string;
445
+ };
446
+ card?: {
447
+ brand: string | null;
448
+ expiresYearMonth: string | null;
449
+ holderName?: string | null;
450
+ last4: string | null;
451
+ };
452
+ holder?: {
453
+ address?: ReservationAddress;
454
+ displayName?: string;
455
+ emails?: string[];
456
+ emergencyPhones?: {
457
+ label?: string;
458
+ number: string;
459
+ }[];
460
+ faxes?: string[];
461
+ givenName?: string;
462
+ middleName?: string;
463
+ phones?: {
464
+ label?: string;
465
+ number: string;
466
+ }[];
467
+ surname?: string;
468
+ };
469
+ kind: "CARD" | "CASH" | "CHECK" | "AGENCY" | "OTHER" | "UNKNOWN";
470
+ linkedGuaranteeReferences?: string[];
471
+ reference: string;
472
+ scope: ReservationAssociation;
473
+ tripTypes?: string[];
474
+ typeCode?: string;
475
+ typeName?: string;
476
+ useTypes?: string[];
477
+ }[];
478
+ history: {
479
+ address?: ReservationAddress;
480
+ cardLast4?: string;
481
+ code?: string;
482
+ commission?: {
483
+ amount?: {
484
+ currency: string;
485
+ totalMinor: number;
486
+ };
487
+ percentage?: string;
488
+ text?: string;
489
+ unconvertedAmount?: string;
490
+ };
491
+ confirmation?: string;
492
+ description?: string;
493
+ destination?: string;
494
+ documentReference?: string;
495
+ end?: ReservationTimestamp;
496
+ endAddress?: ReservationAddress;
497
+ fareApplicationType?: string;
498
+ guaranteeReferences?: string[];
499
+ invoiceReferences?: string[];
500
+ issuer?: {
501
+ agencyIataNumber?: string;
502
+ homeOfficeId?: string;
503
+ officeId?: string;
504
+ supplierCode?: string;
505
+ userCode?: string;
506
+ };
507
+ kind: "SEGMENT" | "SERVICE" | "ACCOUNTING" | "CREATED" | "UPDATED" | "TICKETING" | "RETENTION" | "OTHER";
508
+ messageOmitted?: boolean;
509
+ money?: {
510
+ currency: string;
511
+ feesMinor?: number;
512
+ subtotalMinor?: number;
513
+ taxesMinor?: number;
514
+ totalMinor?: number;
515
+ };
516
+ occurredAt?: ReservationTimestamp;
517
+ origin?: string;
518
+ paymentType?: string;
519
+ quantity?: number;
520
+ reference: string;
521
+ scope: ReservationAssociation;
522
+ start?: ReservationTimestamp;
523
+ startAddress?: ReservationAddress;
524
+ status?: {
525
+ code?: string;
526
+ name?: string;
527
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
528
+ };
529
+ supplierCode?: string;
530
+ taxAmount?: {
531
+ currency: string;
532
+ totalMinor: number;
533
+ };
534
+ typeCode?: string;
535
+ unconvertedAmount?: string;
536
+ unconvertedTaxAmount?: string;
537
+ }[];
538
+ journeys: {
539
+ departureAt?: ReservationTimestamp;
540
+ destination?: string;
541
+ durationMinutes?: number;
542
+ origin?: string;
543
+ reference: string;
544
+ scope: ReservationAssociation;
545
+ segmentCount?: number;
546
+ }[];
547
+ meals: {
548
+ code?: string;
549
+ description?: string;
550
+ reference: string;
551
+ scope: ReservationAssociation;
552
+ }[];
553
+ profiles: {
554
+ reference: string;
555
+ scope: ReservationAssociation;
556
+ type?: string;
557
+ }[];
558
+ retentionEndsOn?: string;
559
+ retrievedAt?: ReservationTimestamp;
560
+ seats: {
561
+ characteristics?: string[];
562
+ number: string;
563
+ reference: string;
564
+ scope: ReservationAssociation;
565
+ status?: {
566
+ code?: string;
567
+ name?: string;
568
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
569
+ };
570
+ }[];
571
+ segments: {
572
+ aircraftCode?: string;
573
+ aircraftName?: string;
574
+ arrival?: {
575
+ airportCode?: string;
576
+ gate?: string;
577
+ scheduledAt?: ReservationTimestamp;
578
+ terminalCode?: string;
579
+ terminalName?: string;
580
+ updatedAt?: ReservationTimestamp;
581
+ };
582
+ bookingClass?: string;
583
+ cabinCode?: string;
584
+ cabinName?: string;
585
+ createdAt?: ReservationTimestamp;
586
+ departure?: {
587
+ airportCode?: string;
588
+ gate?: string;
589
+ scheduledAt?: ReservationTimestamp;
590
+ terminalCode?: string;
591
+ terminalName?: string;
592
+ updatedAt?: ReservationTimestamp;
593
+ };
594
+ distanceMiles?: number;
595
+ durationMinutes?: number;
596
+ fareBasis?: string;
597
+ hiddenStops?: {
598
+ airportCode?: string;
599
+ arrivalAt?: ReservationTimestamp;
600
+ departureAt?: ReservationTimestamp;
601
+ durationMinutes?: number;
602
+ }[];
603
+ identityDocuments?: {
604
+ reference: string;
605
+ status?: {
606
+ code?: string;
607
+ name?: string;
608
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
609
+ };
610
+ }[];
611
+ kind: "FLIGHT";
612
+ marketingCarrierCode?: string;
613
+ marketingCarrierName?: string;
614
+ marketingFlightNumber?: string;
615
+ operatingCarrierCode?: string;
616
+ operatingCarrierName?: string;
617
+ operatingFlightNumber?: string;
618
+ past?: boolean;
619
+ reference: string;
620
+ scope: ReservationAssociation;
621
+ seats?: number;
622
+ sourceType?: string;
623
+ status?: {
624
+ code?: string;
625
+ name?: string;
626
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
627
+ };
628
+ supplierConfirmation?: string;
629
+ }[];
630
+ sourceDigest?: string;
631
+ specialRequests: {
632
+ code: string;
633
+ description?: string;
634
+ messageOmitted?: boolean;
635
+ name?: string;
636
+ reference: string;
637
+ scope: ReservationAssociation;
638
+ status?: {
639
+ code?: string;
640
+ name?: string;
641
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
642
+ };
643
+ }[];
644
+ ticketed?: boolean;
645
+ totals: {
646
+ kind: "FLIGHT" | "FLIGHT_CURRENT" | "HOTEL" | "CAR_RENTAL" | "ANCILLARY" | "RESERVATION";
647
+ money: {
648
+ currency: string;
649
+ feesMinor?: number;
650
+ subtotalMinor?: number;
651
+ taxesMinor?: number;
652
+ totalMinor?: number;
653
+ };
654
+ scope: ReservationAssociation;
655
+ }[];
656
+ travelers: {
657
+ address?: ReservationAddress;
658
+ birthDate?: string;
659
+ displayName?: string;
660
+ emails?: string[];
661
+ emergencyPhones?: {
662
+ label?: string;
663
+ number: string;
664
+ }[];
665
+ faxes?: string[];
666
+ gender?: string;
667
+ givenName?: string;
668
+ guaranteeReferences?: string[];
669
+ identityDocuments?: {
670
+ birthDate?: string;
671
+ citizenshipCountryCode?: string;
672
+ destinationAddress?: ReservationAddress;
673
+ expiresOn?: string;
674
+ gender?: string;
675
+ givenName?: string;
676
+ hostCountryCode?: string;
677
+ issuedOn?: string;
678
+ issuingCountryCode?: string;
679
+ middleName?: string;
680
+ number?: string;
681
+ passportType?: string;
682
+ placeOfIssue?: string;
683
+ primaryHolder?: boolean;
684
+ reference?: string;
685
+ residenceCountryCode?: string;
686
+ surname?: string;
687
+ type?: string;
688
+ visaType?: string;
689
+ }[];
690
+ loyaltyPrograms?: LoyaltyProgram[];
691
+ middleName?: string;
692
+ nameReference?: string;
693
+ passengerType?: string;
694
+ phones?: {
695
+ label?: string;
696
+ number: string;
697
+ }[];
698
+ reference: string;
699
+ sourceReference?: string;
700
+ surname?: string;
701
+ unresolvedPaymentMethodIndices?: number[];
702
+ }[];
703
+ updateCount?: number;
704
+ updatedAt?: ReservationTimestamp;
705
+ updater?: {
706
+ agencyIataNumber?: string;
707
+ homeOfficeId?: string;
708
+ officeId?: string;
709
+ supplierCode?: string;
710
+ userCode?: string;
711
+ };
712
+ version: 1;
713
+ };
714
+ normalizationVersion: number;
715
+ observedAt: string;
716
+ recordedAt: string;
717
+ };
718
+ providerProductId: string;
719
+ quoteId: string | null;
720
+ reservation: {
721
+ holdExpiresAt: string | null;
722
+ observation: {
723
+ isCancelable: boolean | null;
724
+ isTicketed: boolean | null;
725
+ observedAt: string;
726
+ statuses: {
727
+ code: string | null;
728
+ itemId: string;
729
+ kind: "FLIGHT" | "HOTEL" | "TICKET";
730
+ name: string | null;
731
+ }[];
732
+ } | null;
733
+ paymentDeadline: string | null;
734
+ providerLocator: string | null;
735
+ refusal?: {
736
+ code: string;
737
+ message: string;
738
+ } | null;
739
+ state: ReservationState;
740
+ supplierConfirmations?: {
741
+ marketingCarrierCode: CarrierCode;
742
+ supplierConfirmation: string;
743
+ }[];
744
+ ticketingDeadlines?: ReservationTimestamp[];
745
+ };
746
+ reservationState: ReservationState;
747
+ /**
748
+ * The exact statement the payer accepts to authorize the card to the order's
749
+ * advisor, by name, and their agency. Present only when canSaveCard is true.
750
+ */
751
+ saveCardConsentCopy?: string;
752
+ specialRequest?: string | null;
753
+ status: OrderLifecycleStatus;
754
+ termsDigest: TermsDigest;
755
+ timeline: {
756
+ code: string;
757
+ occurredAt: string;
758
+ summary: string;
759
+ }[];
760
+ travelReferenceId: string | null;
761
+ travelersTripId: string | null;
762
+ tripItineraryId?: string;
763
+ updatedAt: string;
764
+ viewerRole?: "ADVISOR" | "GUEST" | "PAYER" | "STAFF" | "TRAVELER";
765
+ }
766
+ export interface DirectProductSnapshot {
767
+ description: string;
768
+ kind: "EXTRA_PAYMENT" | "PLANNING_FEE";
769
+ name: string;
770
+ productId: string;
771
+ }
772
+ export type FulfillmentState = "NOT_STARTED" | "PENDING_ISSUANCE" | "PARTIALLY_ISSUED" | "ISSUED" | "FAILED" | "UNKNOWN";
773
+ export interface OfferOrderSource {
774
+ acceptedQuoteId?: string;
775
+ groupId?: string;
776
+ /**
777
+ * A live offer from getHotelRooms, searchFlights or searchCarRentals.
778
+ */
779
+ offerReference: string;
780
+ paymentLink?: {
781
+ audience?: "SELF" | "TRAVELER";
782
+ expiresInMinutes?: number;
783
+ };
784
+ reviewChanges?: true;
785
+ /**
786
+ * The trip, with offerReference (the offer also goes on its itinerary) or
787
+ * directProduct. Never with quoteId: a quote keeps the trip it was quoted for
788
+ * (createBookingQuote takes travelersTripId).
789
+ */
790
+ travelersTripId?: string;
791
+ }
792
+ export interface Order {
793
+ /**
794
+ * Air planning fee in USD cents for the whole reservation.
795
+ */
796
+ airPlanningFeeMinor?: number;
797
+ allowedActions: ("SUBMIT_CHECKOUT" | "CREATE_PAYMENT_LINK" | "CONFIRM_NICER_PAYMENT" | "PAY" | "CANCEL" | "REVOKE_PAYMENT_LINK" | "RECORD_EXTERNAL_PAYMENT")[];
798
+ bookingSelectionId: string | null;
799
+ /**
800
+ * True when the caller may authorize the card they pay with to the order's
801
+ * advisor: a traveler-side payer on an order that has an advisor.
802
+ */
803
+ canSaveCard?: boolean;
804
+ cancellation: {
805
+ allowed: boolean;
806
+ estimatedPenalty: Money | null;
807
+ kind: "CANCEL_BOOKING" | "NONE" | "RELEASE_HOLD";
808
+ policy: QuotePolicy | null;
809
+ };
810
+ /**
811
+ * The original checkout choice: HOLD reserves to pay later; BOOK requests
812
+ * immediate booking and ticketing. Null or absent means the choice was not
813
+ * recorded; never infer it from payment terms or reservation state.
814
+ */
815
+ checkoutIntent?: "HOLD" | "BOOK" | null;
816
+ /**
817
+ * Expiry of the caller's secure payment access, independent of the quote and
818
+ * airline hold deadlines.
819
+ */
820
+ checkoutSessionExpiresAt?: string;
821
+ commercialSnapshot: BookingCommercialSnapshot;
822
+ committedAt: string | null;
823
+ companyName: string;
824
+ createdAt: string;
825
+ currentProductSnapshot: OrderProductSnapshot;
826
+ expiresAt: string;
827
+ externalPayments: {
828
+ amount: Money;
829
+ externalPaymentId: string;
830
+ paidAt: string;
831
+ paymentMethod: string;
832
+ providerReference: string | null;
833
+ receiptAttached: boolean;
834
+ recordedAt: string;
835
+ status: "RECORDED" | "REVERSED";
836
+ }[];
837
+ flight: {
838
+ changes: {
839
+ changeId: string;
840
+ currentValue: string | null;
841
+ detectedAt: string;
842
+ kind: "SCHEDULE" | "TERMINAL" | "EQUIPMENT" | "MARKETING_CARRIER" | "OPERATING_CARRIER" | "FLIGHT_NUMBER" | "ROUTE" | "CABIN_OR_BOOKING_CLASS" | "STATUS_OR_CANCELLATION";
843
+ legId: string;
844
+ previousValue: string | null;
845
+ version: number;
846
+ }[];
847
+ legs: {
848
+ aircraftCode: string | null;
849
+ arrivalAt: string;
850
+ arrivalTerminal: string | null;
851
+ companyName: string;
852
+ currentVersion: number;
853
+ departureAt: string;
854
+ departureTerminal: string | null;
855
+ destinationAirport: AirportCode;
856
+ legId: string;
857
+ marketingCarrierCode: CarrierCode;
858
+ marketingFlightNumber: string;
859
+ operatingCarrierCode: CarrierCode | null;
860
+ operatingFlightNumber: string | null;
861
+ orderId: string;
862
+ originAirport: AirportCode;
863
+ sequence: number;
864
+ status: string;
865
+ }[];
866
+ validatingCarrier?: CarrierCode;
867
+ } | null;
868
+ fulfillment: {
869
+ agencyTicketing?: {
870
+ queuedAt: string | null;
871
+ };
872
+ issuedDocuments: number;
873
+ items: OrderFulfillment[];
874
+ requiredDocuments: number;
875
+ state: FulfillmentState;
876
+ };
877
+ itineraryItemId: string | null;
878
+ message: string | null;
879
+ /**
880
+ * False when the checkout asked for this order's emails to reach its advisor
881
+ * alone, not its travelers or payer. Absent means they reach the travelers
882
+ * too.
883
+ */
884
+ notifyTravelers?: boolean;
885
+ orderId: string;
886
+ orderVersion: number;
887
+ participantRequirements: ParticipantRequirements;
888
+ participants: {
889
+ completedFields: ParticipantField[];
890
+ displayName: string | null;
891
+ email?: string | null;
892
+ emailMasked: string | null;
893
+ participantId: string;
894
+ phone?: string | null;
895
+ phoneMasked: string | null;
896
+ role: "DRIVER" | "GUEST" | "INSURED" | "PAYER" | "TRAVELER";
897
+ status: "COMPLETE" | "INCOMPLETE";
898
+ travelerId?: string | null;
899
+ }[];
900
+ payment: {
901
+ latestAttempt: PaymentAttempt | null;
902
+ methods: PaymentMethodSummary[];
903
+ newAttemptAllowed: boolean;
904
+ presentation: {
905
+ type: "NONE";
906
+ } | {
907
+ type: "STRIPE_PAYMENT_ELEMENT";
908
+ } | {
909
+ type: "PROVIDER_CARD_FORM";
910
+ } | {
911
+ message: string;
912
+ type: "WAITING_PROVIDER";
913
+ };
914
+ purpose: "NICER_CHARGE" | "PROVIDER_GUARANTEE" | "PROVIDER_PAYMENT";
915
+ };
916
+ paymentState: PaymentState;
917
+ paymentTerms: PaymentTerms;
918
+ pollAfterMs: number | null;
919
+ priceSnapshot: BookingPriceSnapshot;
920
+ productSnapshot: OrderProductSnapshot;
921
+ productType: "PLANNING_FEE" | "EXTRA_PAYMENT" | "HOTEL" | "FLIGHT" | "INSURANCE" | "CAR_RENTAL";
922
+ providerKey: ProviderKey;
923
+ providerObservation?: {
924
+ evidence: {
925
+ ancillaries: {
926
+ applicability?: string;
927
+ categoryCode?: string;
928
+ categoryName?: string;
929
+ code?: string;
930
+ commissionable?: boolean;
931
+ documentReference?: string;
932
+ money?: {
933
+ currency: string;
934
+ feesMinor?: number;
935
+ subtotalMinor?: number;
936
+ taxesMinor?: number;
937
+ totalMinor?: number;
938
+ };
939
+ name?: string;
940
+ quantity?: number;
941
+ reference: string;
942
+ refundable?: boolean;
943
+ scope: ReservationAssociation;
944
+ source?: string;
945
+ status?: {
946
+ code?: string;
947
+ name?: string;
948
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
949
+ };
950
+ subcode?: string;
951
+ supplierCode?: string;
952
+ taxes?: {
953
+ amount?: {
954
+ currency: string;
955
+ totalMinor: number;
956
+ };
957
+ code?: string;
958
+ unconvertedAmount?: string;
959
+ }[];
960
+ vendorCode?: string;
961
+ }[];
962
+ baggage: {
963
+ allowance?: {
964
+ maximumPieces?: number;
965
+ pieces?: {
966
+ description?: string;
967
+ maximumSizeCentimeters?: number;
968
+ maximumSizeInches?: number;
969
+ maximumWeightKilograms?: number;
970
+ maximumWeightPounds?: number;
971
+ pieces?: number;
972
+ }[];
973
+ totalWeightKilograms?: number;
974
+ };
975
+ charges?: {
976
+ amount?: {
977
+ currency: string;
978
+ totalMinor: number;
979
+ };
980
+ checkInOnly?: boolean;
981
+ description?: string;
982
+ maximumSizeCentimeters?: number;
983
+ maximumSizeInches?: number;
984
+ maximumWeightKilograms?: number;
985
+ maximumWeightPounds?: number;
986
+ pieces?: number;
987
+ }[];
988
+ kind: "CHECKED" | "CABIN" | "OTHER";
989
+ reference: string;
990
+ scope: ReservationAssociation;
991
+ }[];
992
+ cancelable?: boolean;
993
+ contacts: {
994
+ address?: ReservationAddress;
995
+ displayName?: string;
996
+ emails?: string[];
997
+ emergencyPhones?: {
998
+ label?: string;
999
+ number: string;
1000
+ }[];
1001
+ faxes?: string[];
1002
+ givenName?: string;
1003
+ middleName?: string;
1004
+ phones?: {
1005
+ label?: string;
1006
+ number: string;
1007
+ }[];
1008
+ reference: string;
1009
+ scope: ReservationAssociation;
1010
+ surname?: string;
1011
+ }[];
1012
+ createdAt?: ReservationTimestamp;
1013
+ creator?: {
1014
+ agencyIataNumber?: string;
1015
+ homeOfficeId?: string;
1016
+ officeId?: string;
1017
+ supplierCode?: string;
1018
+ userCode?: string;
1019
+ };
1020
+ documents: {
1021
+ bundled?: boolean;
1022
+ commission?: {
1023
+ amount?: {
1024
+ currency: string;
1025
+ totalMinor: number;
1026
+ };
1027
+ percentage?: string;
1028
+ text?: string;
1029
+ unconvertedAmount?: string;
1030
+ };
1031
+ coupons?: {
1032
+ number?: number;
1033
+ reference?: string;
1034
+ segmentReference?: string;
1035
+ status?: {
1036
+ code?: string;
1037
+ name?: string;
1038
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
1039
+ };
1040
+ }[];
1041
+ issuedAt?: ReservationTimestamp;
1042
+ issuer?: {
1043
+ agencyIataNumber?: string;
1044
+ homeOfficeId?: string;
1045
+ officeId?: string;
1046
+ supplierCode?: string;
1047
+ userCode?: string;
1048
+ };
1049
+ kind: "ELECTRONIC_TICKET" | "NON_ELECTRONIC_TICKET" | "ANCILLARY_DOCUMENT" | "OTHER";
1050
+ money?: {
1051
+ currency: string;
1052
+ feesMinor?: number;
1053
+ subtotalMinor?: number;
1054
+ taxesMinor?: number;
1055
+ totalMinor?: number;
1056
+ };
1057
+ number?: string;
1058
+ reference: string;
1059
+ scope: ReservationAssociation;
1060
+ status?: {
1061
+ code?: string;
1062
+ name?: string;
1063
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
1064
+ };
1065
+ }[];
1066
+ fareRules: {
1067
+ cancelable?: boolean;
1068
+ changeable?: boolean;
1069
+ destination?: string;
1070
+ exchangePenalties?: {
1071
+ amount?: {
1072
+ currency: string;
1073
+ totalMinor: number;
1074
+ };
1075
+ applicability?: string;
1076
+ conditionsApply?: boolean;
1077
+ hasNoShowCost?: boolean;
1078
+ noShowAmount?: {
1079
+ currency: string;
1080
+ totalMinor: number;
1081
+ };
1082
+ }[];
1083
+ origin?: string;
1084
+ passengerType?: string;
1085
+ reference: string;
1086
+ refundPenalties?: {
1087
+ amount?: {
1088
+ currency: string;
1089
+ totalMinor: number;
1090
+ };
1091
+ applicability?: string;
1092
+ conditionsApply?: boolean;
1093
+ hasNoShowCost?: boolean;
1094
+ noShowAmount?: {
1095
+ currency: string;
1096
+ totalMinor: number;
1097
+ };
1098
+ }[];
1099
+ refundable?: boolean;
1100
+ scope: ReservationAssociation;
1101
+ supplierCode?: string;
1102
+ }[];
1103
+ fares: {
1104
+ bundledServices?: {
1105
+ amount?: {
1106
+ currency: string;
1107
+ totalMinor: number;
1108
+ };
1109
+ code?: string;
1110
+ description?: string;
1111
+ quantity?: number;
1112
+ type?: string;
1113
+ }[];
1114
+ calculationLine?: string;
1115
+ commission?: {
1116
+ amount?: {
1117
+ currency: string;
1118
+ totalMinor: number;
1119
+ };
1120
+ percentage?: string;
1121
+ text?: string;
1122
+ unconvertedAmount?: string;
1123
+ };
1124
+ components?: {
1125
+ accountCode?: string;
1126
+ baseAmount?: {
1127
+ currency: string;
1128
+ totalMinor: number;
1129
+ };
1130
+ brandAttributes?: string[];
1131
+ brandCode?: string;
1132
+ brandName?: string;
1133
+ checkedBaggage?: {
1134
+ maximumPieces?: number;
1135
+ pieces?: {
1136
+ description?: string;
1137
+ maximumSizeCentimeters?: number;
1138
+ maximumSizeInches?: number;
1139
+ maximumWeightKilograms?: number;
1140
+ maximumWeightPounds?: number;
1141
+ pieces?: number;
1142
+ }[];
1143
+ totalWeightKilograms?: number;
1144
+ };
1145
+ currentItinerary?: boolean;
1146
+ fareBasis?: string;
1147
+ programCode?: string;
1148
+ programName?: string;
1149
+ reference?: string;
1150
+ scope: ReservationAssociation;
1151
+ }[];
1152
+ createdAt?: ReservationTimestamp;
1153
+ issuer?: {
1154
+ agencyIataNumber?: string;
1155
+ homeOfficeId?: string;
1156
+ officeId?: string;
1157
+ supplierCode?: string;
1158
+ userCode?: string;
1159
+ };
1160
+ money?: {
1161
+ currency: string;
1162
+ feesMinor?: number;
1163
+ subtotalMinor?: number;
1164
+ taxesMinor?: number;
1165
+ totalMinor?: number;
1166
+ };
1167
+ negotiated?: boolean;
1168
+ originalMoney?: {
1169
+ currency: string;
1170
+ feesMinor?: number;
1171
+ subtotalMinor?: number;
1172
+ taxesMinor?: number;
1173
+ totalMinor?: number;
1174
+ };
1175
+ pricedTravelerType?: string;
1176
+ purchaseDeadline?: ReservationTimestamp;
1177
+ recordTypeCode?: string;
1178
+ recordTypeName?: string;
1179
+ reference: string;
1180
+ requestedTravelerType?: string;
1181
+ scope: ReservationAssociation;
1182
+ status?: {
1183
+ code?: string;
1184
+ name?: string;
1185
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
1186
+ };
1187
+ supplierCode?: string;
1188
+ taxes?: {
1189
+ amount?: {
1190
+ currency: string;
1191
+ totalMinor: number;
1192
+ };
1193
+ code?: string;
1194
+ unconvertedAmount?: string;
1195
+ }[];
1196
+ tourCode?: string;
1197
+ typeCode?: string;
1198
+ typeName?: string;
1199
+ validPricing?: boolean;
1200
+ }[];
1201
+ guarantees: {
1202
+ approval?: {
1203
+ amount?: {
1204
+ currency: string;
1205
+ totalMinor: number;
1206
+ };
1207
+ expiresAt?: ReservationTimestamp;
1208
+ requestedAt?: ReservationTimestamp;
1209
+ supplierCode?: string;
1210
+ };
1211
+ card?: {
1212
+ brand: string | null;
1213
+ expiresYearMonth: string | null;
1214
+ holderName?: string | null;
1215
+ last4: string | null;
1216
+ };
1217
+ holder?: {
1218
+ address?: ReservationAddress;
1219
+ displayName?: string;
1220
+ emails?: string[];
1221
+ emergencyPhones?: {
1222
+ label?: string;
1223
+ number: string;
1224
+ }[];
1225
+ faxes?: string[];
1226
+ givenName?: string;
1227
+ middleName?: string;
1228
+ phones?: {
1229
+ label?: string;
1230
+ number: string;
1231
+ }[];
1232
+ surname?: string;
1233
+ };
1234
+ kind: "CARD" | "CASH" | "CHECK" | "AGENCY" | "OTHER" | "UNKNOWN";
1235
+ linkedGuaranteeReferences?: string[];
1236
+ reference: string;
1237
+ scope: ReservationAssociation;
1238
+ tripTypes?: string[];
1239
+ typeCode?: string;
1240
+ typeName?: string;
1241
+ useTypes?: string[];
1242
+ }[];
1243
+ history: {
1244
+ address?: ReservationAddress;
1245
+ cardLast4?: string;
1246
+ code?: string;
1247
+ commission?: {
1248
+ amount?: {
1249
+ currency: string;
1250
+ totalMinor: number;
1251
+ };
1252
+ percentage?: string;
1253
+ text?: string;
1254
+ unconvertedAmount?: string;
1255
+ };
1256
+ confirmation?: string;
1257
+ description?: string;
1258
+ destination?: string;
1259
+ documentReference?: string;
1260
+ end?: ReservationTimestamp;
1261
+ endAddress?: ReservationAddress;
1262
+ fareApplicationType?: string;
1263
+ guaranteeReferences?: string[];
1264
+ invoiceReferences?: string[];
1265
+ issuer?: {
1266
+ agencyIataNumber?: string;
1267
+ homeOfficeId?: string;
1268
+ officeId?: string;
1269
+ supplierCode?: string;
1270
+ userCode?: string;
1271
+ };
1272
+ kind: "SEGMENT" | "SERVICE" | "ACCOUNTING" | "CREATED" | "UPDATED" | "TICKETING" | "RETENTION" | "OTHER";
1273
+ messageOmitted?: boolean;
1274
+ money?: {
1275
+ currency: string;
1276
+ feesMinor?: number;
1277
+ subtotalMinor?: number;
1278
+ taxesMinor?: number;
1279
+ totalMinor?: number;
1280
+ };
1281
+ occurredAt?: ReservationTimestamp;
1282
+ origin?: string;
1283
+ paymentType?: string;
1284
+ quantity?: number;
1285
+ reference: string;
1286
+ scope: ReservationAssociation;
1287
+ start?: ReservationTimestamp;
1288
+ startAddress?: ReservationAddress;
1289
+ status?: {
1290
+ code?: string;
1291
+ name?: string;
1292
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
1293
+ };
1294
+ supplierCode?: string;
1295
+ taxAmount?: {
1296
+ currency: string;
1297
+ totalMinor: number;
1298
+ };
1299
+ typeCode?: string;
1300
+ unconvertedAmount?: string;
1301
+ unconvertedTaxAmount?: string;
1302
+ }[];
1303
+ journeys: {
1304
+ departureAt?: ReservationTimestamp;
1305
+ destination?: string;
1306
+ durationMinutes?: number;
1307
+ origin?: string;
1308
+ reference: string;
1309
+ scope: ReservationAssociation;
1310
+ segmentCount?: number;
1311
+ }[];
1312
+ meals: {
1313
+ code?: string;
1314
+ description?: string;
1315
+ reference: string;
1316
+ scope: ReservationAssociation;
1317
+ }[];
1318
+ profiles: {
1319
+ reference: string;
1320
+ scope: ReservationAssociation;
1321
+ type?: string;
1322
+ }[];
1323
+ retentionEndsOn?: string;
1324
+ retrievedAt?: ReservationTimestamp;
1325
+ seats: {
1326
+ characteristics?: string[];
1327
+ number: string;
1328
+ reference: string;
1329
+ scope: ReservationAssociation;
1330
+ status?: {
1331
+ code?: string;
1332
+ name?: string;
1333
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
1334
+ };
1335
+ }[];
1336
+ segments: {
1337
+ aircraftCode?: string;
1338
+ aircraftName?: string;
1339
+ arrival?: {
1340
+ airportCode?: string;
1341
+ gate?: string;
1342
+ scheduledAt?: ReservationTimestamp;
1343
+ terminalCode?: string;
1344
+ terminalName?: string;
1345
+ updatedAt?: ReservationTimestamp;
1346
+ };
1347
+ bookingClass?: string;
1348
+ cabinCode?: string;
1349
+ cabinName?: string;
1350
+ createdAt?: ReservationTimestamp;
1351
+ departure?: {
1352
+ airportCode?: string;
1353
+ gate?: string;
1354
+ scheduledAt?: ReservationTimestamp;
1355
+ terminalCode?: string;
1356
+ terminalName?: string;
1357
+ updatedAt?: ReservationTimestamp;
1358
+ };
1359
+ distanceMiles?: number;
1360
+ durationMinutes?: number;
1361
+ fareBasis?: string;
1362
+ hiddenStops?: {
1363
+ airportCode?: string;
1364
+ arrivalAt?: ReservationTimestamp;
1365
+ departureAt?: ReservationTimestamp;
1366
+ durationMinutes?: number;
1367
+ }[];
1368
+ identityDocuments?: {
1369
+ reference: string;
1370
+ status?: {
1371
+ code?: string;
1372
+ name?: string;
1373
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
1374
+ };
1375
+ }[];
1376
+ kind: "FLIGHT";
1377
+ marketingCarrierCode?: string;
1378
+ marketingCarrierName?: string;
1379
+ marketingFlightNumber?: string;
1380
+ operatingCarrierCode?: string;
1381
+ operatingCarrierName?: string;
1382
+ operatingFlightNumber?: string;
1383
+ past?: boolean;
1384
+ reference: string;
1385
+ scope: ReservationAssociation;
1386
+ seats?: number;
1387
+ sourceType?: string;
1388
+ status?: {
1389
+ code?: string;
1390
+ name?: string;
1391
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
1392
+ };
1393
+ supplierConfirmation?: string;
1394
+ }[];
1395
+ sourceDigest?: string;
1396
+ specialRequests: {
1397
+ code: string;
1398
+ description?: string;
1399
+ messageOmitted?: boolean;
1400
+ name?: string;
1401
+ reference: string;
1402
+ scope: ReservationAssociation;
1403
+ status?: {
1404
+ code?: string;
1405
+ name?: string;
1406
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
1407
+ };
1408
+ }[];
1409
+ ticketed?: boolean;
1410
+ totals: {
1411
+ kind: "FLIGHT" | "FLIGHT_CURRENT" | "HOTEL" | "CAR_RENTAL" | "ANCILLARY" | "RESERVATION";
1412
+ money: {
1413
+ currency: string;
1414
+ feesMinor?: number;
1415
+ subtotalMinor?: number;
1416
+ taxesMinor?: number;
1417
+ totalMinor?: number;
1418
+ };
1419
+ scope: ReservationAssociation;
1420
+ }[];
1421
+ travelers: {
1422
+ address?: ReservationAddress;
1423
+ birthDate?: string;
1424
+ displayName?: string;
1425
+ emails?: string[];
1426
+ emergencyPhones?: {
1427
+ label?: string;
1428
+ number: string;
1429
+ }[];
1430
+ faxes?: string[];
1431
+ gender?: string;
1432
+ givenName?: string;
1433
+ guaranteeReferences?: string[];
1434
+ identityDocuments?: {
1435
+ birthDate?: string;
1436
+ citizenshipCountryCode?: string;
1437
+ destinationAddress?: ReservationAddress;
1438
+ expiresOn?: string;
1439
+ gender?: string;
1440
+ givenName?: string;
1441
+ hostCountryCode?: string;
1442
+ issuedOn?: string;
1443
+ issuingCountryCode?: string;
1444
+ middleName?: string;
1445
+ number?: string;
1446
+ passportType?: string;
1447
+ placeOfIssue?: string;
1448
+ primaryHolder?: boolean;
1449
+ reference?: string;
1450
+ residenceCountryCode?: string;
1451
+ surname?: string;
1452
+ type?: string;
1453
+ visaType?: string;
1454
+ }[];
1455
+ loyaltyPrograms?: LoyaltyProgram[];
1456
+ middleName?: string;
1457
+ nameReference?: string;
1458
+ passengerType?: string;
1459
+ phones?: {
1460
+ label?: string;
1461
+ number: string;
1462
+ }[];
1463
+ reference: string;
1464
+ sourceReference?: string;
1465
+ surname?: string;
1466
+ unresolvedPaymentMethodIndices?: number[];
1467
+ }[];
1468
+ updateCount?: number;
1469
+ updatedAt?: ReservationTimestamp;
1470
+ updater?: {
1471
+ agencyIataNumber?: string;
1472
+ homeOfficeId?: string;
1473
+ officeId?: string;
1474
+ supplierCode?: string;
1475
+ userCode?: string;
1476
+ };
1477
+ version: 1;
1478
+ };
1479
+ normalizationVersion: number;
1480
+ observedAt: string;
1481
+ recordedAt: string;
1482
+ };
1483
+ providerProductId: string;
1484
+ quoteId: string | null;
1485
+ reservation: {
1486
+ holdExpiresAt: string | null;
1487
+ observation: {
1488
+ isCancelable: boolean | null;
1489
+ isTicketed: boolean | null;
1490
+ observedAt: string;
1491
+ statuses: {
1492
+ code: string | null;
1493
+ itemId: string;
1494
+ kind: "FLIGHT" | "HOTEL" | "TICKET";
1495
+ name: string | null;
1496
+ }[];
1497
+ } | null;
1498
+ paymentDeadline: string | null;
1499
+ providerLocator: string | null;
1500
+ refusal?: {
1501
+ code: string;
1502
+ message: string;
1503
+ } | null;
1504
+ state: ReservationState;
1505
+ supplierConfirmations?: {
1506
+ marketingCarrierCode: CarrierCode;
1507
+ supplierConfirmation: string;
1508
+ }[];
1509
+ ticketingDeadlines?: ReservationTimestamp[];
1510
+ };
1511
+ reservationState: ReservationState;
1512
+ /**
1513
+ * The exact statement the payer accepts to authorize the card to the order's
1514
+ * advisor, by name, and their agency. Present only when canSaveCard is true.
1515
+ */
1516
+ saveCardConsentCopy?: string;
1517
+ specialRequest?: string | null;
1518
+ status: OrderLifecycleStatus;
1519
+ termsDigest: TermsDigest;
1520
+ timeline: {
1521
+ code: string;
1522
+ occurredAt: string;
1523
+ summary: string;
1524
+ }[];
1525
+ travelReferenceId: string | null;
1526
+ travelersTripId: string | null;
1527
+ updatedAt: string;
1528
+ viewerRole?: "ADVISOR" | "GUEST" | "PAYER" | "STAFF" | "TRAVELER";
1529
+ }
1530
+ export type OrderActionRunBody = {
1531
+ code: string;
1532
+ type: "EXCHANGE_CHECKOUT_SESSION";
1533
+ } | {
1534
+ type: "RENEW_CHECKOUT";
1535
+ } | {
1536
+ acceptedTermsDigest: TermsDigest;
1537
+ airPlanningFeeMinor?: number;
1538
+ notifyTravelers?: boolean;
1539
+ participants: {
1540
+ address: PersonAddress | null;
1541
+ birthDate: string | null;
1542
+ contact: PersonContact;
1543
+ documents: TravelDocument[];
1544
+ frequentFlyerPrograms?: FrequentFlyerProgram[];
1545
+ hotelMembership?: HotelMembership | null;
1546
+ name: PersonName;
1547
+ nationalityCountryCode: CountryCode | null;
1548
+ participantId: string;
1549
+ sex: ParticipantSex | null;
1550
+ travelerId?: string;
1551
+ }[];
1552
+ paymentTermsKind?: "HOLD" | "PAY_NOW";
1553
+ specialRequest?: string | null;
1554
+ type: "SUBMIT_CHECKOUT";
1555
+ validatingCarrier?: CarrierCode;
1556
+ } | {
1557
+ audience?: "SELF" | "TRAVELER";
1558
+ expiresInMinutes?: number;
1559
+ type: "CREATE_PAYMENT_LINK";
1560
+ } | {
1561
+ paymentAttemptId: string;
1562
+ type: "CONFIRM_NICER_PAYMENT";
1563
+ } | {
1564
+ acceptedTermsDigest: TermsDigest;
1565
+ reason?: string | null;
1566
+ type: "CANCEL";
1567
+ } | {
1568
+ capabilityId: string;
1569
+ type: "REVOKE_PAYMENT_LINK";
1570
+ };
1571
+ export interface OrderActionRunResponse {
1572
+ checkoutSession?: {
1573
+ expiresAt: string;
1574
+ token: string;
1575
+ };
1576
+ expiresAt: string | null;
1577
+ orderId: string;
1578
+ orderStatus: OrderLifecycleStatus;
1579
+ paymentUrl: string | null;
1580
+ status: "ACCEPTED" | "COMPLETED";
1581
+ type: "EXCHANGE_CHECKOUT_SESSION" | "RENEW_CHECKOUT" | "SUBMIT_CHECKOUT" | "CREATE_PAYMENT_LINK" | "CONFIRM_NICER_PAYMENT" | "CANCEL" | "REVOKE_PAYMENT_LINK";
1582
+ }
1583
+ export interface OrderAdvisorAssignBody {
1584
+ assignment: {
1585
+ mode: "INHERIT";
1586
+ } | {
1587
+ mode: "UNASSIGNED";
1588
+ } | {
1589
+ advisorUserId: string;
1590
+ mode: "ASSIGNED";
1591
+ };
1592
+ expectedVersion: number;
1593
+ reason: string;
1594
+ }
1595
+ export interface OrderAdvisorAssignResponse {
1596
+ advisorUserId: string | null;
1597
+ assignment: {
1598
+ mode: "INHERIT";
1599
+ } | {
1600
+ mode: "UNASSIGNED";
1601
+ } | {
1602
+ advisorUserId: string;
1603
+ mode: "ASSIGNED";
1604
+ };
1605
+ orderId: string;
1606
+ orderVersion: number;
1607
+ }
1608
+ export interface OrderConfirmationSendBody {
1609
+ emails: string[];
1610
+ }
1611
+ export interface OrderConfirmationSendResponse {
1612
+ queuedRecipients: number;
1613
+ success: true;
1614
+ }
1615
+ export type OrderCreateBody = {
1616
+ paymentLink?: {
1617
+ audience?: "SELF" | "TRAVELER";
1618
+ expiresInMinutes?: number;
1619
+ };
1620
+ quoteId: string;
1621
+ } | {
1622
+ directProduct: {
1623
+ amount: {
1624
+ amountMinor: number;
1625
+ currency: CurrencyCode;
1626
+ };
1627
+ description: string;
1628
+ kind: "EXTRA_PAYMENT" | "PLANNING_FEE";
1629
+ name: string;
1630
+ };
1631
+ itineraryItemId?: string;
1632
+ paymentLink?: {
1633
+ audience?: "SELF" | "TRAVELER";
1634
+ expiresInMinutes?: number;
1635
+ };
1636
+ travelersTripId?: string;
1637
+ } | OfferOrderSource;
1638
+ export type OrderCreateResponse = CreateOrderResponse | OrderOfferReview;
1639
+ export type OrderFulfillment = {
1640
+ externalReference: string;
1641
+ fulfillmentId: string;
1642
+ issuedAt: string | null;
1643
+ kind: "TICKET";
1644
+ passengerReference: string;
1645
+ ticketNumber: string;
1646
+ } | {
1647
+ confirmationNumber: string;
1648
+ externalReference: string;
1649
+ fulfillmentId: string;
1650
+ issuedAt: string | null;
1651
+ kind: "HOTEL_CONFIRMATION";
1652
+ } | {
1653
+ documentUrl?: string | null;
1654
+ externalReference: string;
1655
+ fulfillmentId: string;
1656
+ issuedAt: string | null;
1657
+ kind: "POLICY";
1658
+ policyNumber: string;
1659
+ } | {
1660
+ externalReference: string;
1661
+ fulfillmentId: string;
1662
+ issuedAt: string | null;
1663
+ kind: "VOUCHER";
1664
+ voucherReference: string;
1665
+ };
1666
+ export type OrderGetResponse = Order | RecordedOrder;
1667
+ export type OrderLifecycleStatus = "DRAFT" | "AWAITING_PAYMENT" | "HOLDING" | "HELD" | "PAYMENT_PROCESSING" | "TICKETING" | "BOOKED" | "CANCELLATION_PROCESSING" | "CANCELLED" | "EXPIRED" | "NEEDS_ATTENTION" | "FAILED";
1668
+ export interface OrderListItem {
1669
+ bookedByUserId: string | null;
1670
+ bookingOrigin: "NICER" | "EXTERNAL" | "UNKNOWN";
1671
+ canCancel: boolean;
1672
+ canCreatePaymentLink: boolean;
1673
+ committedAt: string | null;
1674
+ companyName: string;
1675
+ createdAt: string;
1676
+ entryMethod: "CHECKOUT" | "IMPORT" | "MANUAL";
1677
+ orderId: string;
1678
+ /**
1679
+ * When a held order must be paid by. Null when the order is not held.
1680
+ */
1681
+ paymentDeadline?: string | null;
1682
+ price: {
1683
+ currency: CurrencyCode;
1684
+ totalMinor: number;
1685
+ } | null;
1686
+ productName: string;
1687
+ productType: "PLANNING_FEE" | "EXTRA_PAYMENT" | "HOTEL" | "FLIGHT" | "INSURANCE" | "CAR_RENTAL";
1688
+ providerLocator: string | null;
1689
+ status: OrderLifecycleStatus;
1690
+ travelDates: {
1691
+ end: string | null;
1692
+ start: string | null;
1693
+ };
1694
+ travelersTripId: string | null;
1695
+ }
1696
+ export interface OrderOfferReview {
1697
+ previousPrice: BookingPriceSnapshot;
1698
+ quote: BookingQuote;
1699
+ status: "PRICE_CHANGED";
1700
+ termsChanged: boolean;
1701
+ }
1702
+ export interface OrderPaymentSubmitBody {
1703
+ method: {
1704
+ kind: "NEW";
1705
+ } | {
1706
+ kind: "SAVED";
1707
+ paymentMethodId: string;
1708
+ } | {
1709
+ kind: "PROVIDER_CARD_CREDENTIAL";
1710
+ paymentCredentialId: string;
1711
+ };
1712
+ saveFor?: {
1713
+ kind: "NONE";
1714
+ } | {
1715
+ kind: "USER";
1716
+ } | {
1717
+ consentAccepted: true;
1718
+ kind: "TRIP";
1719
+ travelersTripId: string;
1720
+ } | {
1721
+ consentAccepted: true;
1722
+ consentCopy: string;
1723
+ kind: "ADVISOR";
1724
+ };
1725
+ }
1726
+ export type OrderPaymentSubmitResponse = PaymentAttempt | {
1727
+ action: {
1728
+ token: string;
1729
+ url: string;
1730
+ };
1731
+ collectionId: string;
1732
+ expiresAt: string;
1733
+ status: "AWAITING_CARD";
1734
+ type: "PROVIDER_CARD_COLLECTION";
1735
+ };
1736
+ export type OrderProductSnapshot = BookingProductSnapshot | DirectProductSnapshot;
1737
+ export interface OrdersListResponse {
1738
+ items: OrderListItem[];
1739
+ nextCursor?: string | null;
1740
+ totalCount: number;
1741
+ }
1742
+ export interface PaymentAttempt {
1743
+ amount: Money;
1744
+ createdAt: string;
1745
+ nextAction: {
1746
+ clientSecret?: string;
1747
+ type: "CONFIRM_NICER_PAYMENT";
1748
+ } | null;
1749
+ paymentAttemptId: string;
1750
+ purpose: "NICER_CHARGE" | "PROVIDER_GUARANTEE" | "PROVIDER_PAYMENT";
1751
+ reason: {
1752
+ code: string;
1753
+ message: string;
1754
+ retryable: boolean;
1755
+ } | null;
1756
+ status: "REQUIRES_ACTION" | "AUTHORIZED" | "PROCESSING" | "SUCCEEDED" | "DECLINED" | "UNKNOWN" | "CANCELLED";
1757
+ usedMethod?: {
1758
+ brand: string | null;
1759
+ funding?: string | null;
1760
+ last4: string | null;
1761
+ wallet?: string | null;
1762
+ } | null;
1763
+ }
1764
+ export type PaymentState = "NOT_STARTED" | "AWAITING_METHOD" | "REQUIRES_ACTION" | "PROCESSING" | "AUTHORIZED" | "SUCCEEDED" | "DECLINED" | "CANCELLED" | "PARTIALLY_REFUNDED" | "REFUNDED" | "UNKNOWN";
1765
+ export interface RecordedOrder {
1766
+ advisorUserId: string | null;
1767
+ allowedActions: unknown[];
1768
+ amount: {
1769
+ currency: string;
1770
+ totalMinor: number;
1771
+ } | null;
1772
+ assignment: {
1773
+ mode: "INHERIT";
1774
+ } | {
1775
+ mode: "UNASSIGNED";
1776
+ } | {
1777
+ advisorUserId: string;
1778
+ mode: "ASSIGNED";
1779
+ };
1780
+ bookingOrigin: "NICER" | "EXTERNAL" | "UNKNOWN";
1781
+ companyName: string;
1782
+ createdAt: string;
1783
+ entryMethod: "IMPORT" | "MANUAL";
1784
+ orderId: string;
1785
+ orderVersion: number;
1786
+ product: {
1787
+ detail?: {
1788
+ car?: {
1789
+ distanceAllowance?: string;
1790
+ dropOff?: {
1791
+ address?: ReservationAddress;
1792
+ at?: string;
1793
+ emergencyPhones?: string[];
1794
+ faxes?: string[];
1795
+ locationCode?: string;
1796
+ phones?: string[];
1797
+ };
1798
+ guaranteeType?: string;
1799
+ pickUp?: {
1800
+ address?: ReservationAddress;
1801
+ at?: string;
1802
+ emergencyPhones?: string[];
1803
+ faxes?: string[];
1804
+ locationCode?: string;
1805
+ phones?: string[];
1806
+ };
1807
+ rateCode?: string;
1808
+ refundable?: boolean;
1809
+ rentalDays?: number;
1810
+ supplierCode?: string;
1811
+ vehicleCategory?: string;
1812
+ vehicleModel?: string;
1813
+ vehicleType?: string;
1814
+ vehicleTypeCode?: string;
1815
+ vehicles?: number;
1816
+ };
1817
+ commission?: {
1818
+ amount?: {
1819
+ currency: string;
1820
+ totalMinor: number;
1821
+ };
1822
+ percentage?: string;
1823
+ text?: string;
1824
+ };
1825
+ fare?: {
1826
+ calculationLine?: string;
1827
+ changeable?: boolean;
1828
+ fareBasis?: string;
1829
+ negotiated?: boolean;
1830
+ refundable?: boolean;
1831
+ taxes?: {
1832
+ amount: {
1833
+ currency: string;
1834
+ totalMinor: number;
1835
+ };
1836
+ code: string;
1837
+ }[];
1838
+ tickets?: {
1839
+ issuedOn?: string;
1840
+ issuingOfficeId?: string;
1841
+ number: string;
1842
+ status?: string;
1843
+ }[];
1844
+ tourCode?: string;
1845
+ };
1846
+ hotel?: {
1847
+ address?: ReservationAddress;
1848
+ cancellationPolicy?: string;
1849
+ chainCode?: string;
1850
+ chainName?: string;
1851
+ checkInTime?: string;
1852
+ checkOutTime?: string;
1853
+ clientRateCode?: string;
1854
+ corporateRateCode?: string;
1855
+ emergencyPhones?: string[];
1856
+ faxes?: string[];
1857
+ guaranteeType?: string;
1858
+ guaranteeTypeCode?: string;
1859
+ guests?: number;
1860
+ nightlyRate?: {
1861
+ currency: string;
1862
+ totalMinor: number;
1863
+ };
1864
+ nights?: {
1865
+ amount?: {
1866
+ currency: string;
1867
+ totalMinor: number;
1868
+ };
1869
+ from?: string;
1870
+ nights?: number;
1871
+ percentage?: string;
1872
+ to?: string;
1873
+ }[];
1874
+ paymentPolicy?: string;
1875
+ phones?: string[];
1876
+ productCode?: string;
1877
+ propertyId?: string;
1878
+ providerPropertyId?: string;
1879
+ rateCode?: string;
1880
+ rateDescription?: string[];
1881
+ refundPenalties?: {
1882
+ amount?: {
1883
+ currency: string;
1884
+ totalMinor: number;
1885
+ };
1886
+ from?: string;
1887
+ nights?: number;
1888
+ percentage?: string;
1889
+ to?: string;
1890
+ }[];
1891
+ refundable?: boolean;
1892
+ roomDescription?: string;
1893
+ roomType?: string;
1894
+ roomTypeCode?: string;
1895
+ rooms?: number;
1896
+ sourceTypeCode?: string;
1897
+ sourceTypeName?: string;
1898
+ specialInstructions?: string;
1899
+ };
1900
+ money?: {
1901
+ currency: string;
1902
+ feesMinor?: number;
1903
+ subtotalMinor?: number;
1904
+ taxesMinor?: number;
1905
+ totalMinor?: number;
1906
+ };
1907
+ references?: {
1908
+ agencyIataNumber?: string;
1909
+ agencyProfileId?: string;
1910
+ corporateProfileId?: string;
1911
+ providerSegmentIds?: string[];
1912
+ };
1913
+ };
1914
+ end: string | null;
1915
+ kind: ProductKind;
1916
+ name: string;
1917
+ start: string | null;
1918
+ supplierConfirmation: string | null;
1919
+ supplierName: string | null;
1920
+ };
1921
+ providerConfigId: string | null;
1922
+ providerKey: ProviderKey;
1923
+ providerLocator: string | null;
1924
+ providerObservation?: {
1925
+ evidence: {
1926
+ ancillaries: {
1927
+ applicability?: string;
1928
+ categoryCode?: string;
1929
+ categoryName?: string;
1930
+ code?: string;
1931
+ commissionable?: boolean;
1932
+ documentReference?: string;
1933
+ money?: {
1934
+ currency: string;
1935
+ feesMinor?: number;
1936
+ subtotalMinor?: number;
1937
+ taxesMinor?: number;
1938
+ totalMinor?: number;
1939
+ };
1940
+ name?: string;
1941
+ quantity?: number;
1942
+ reference: string;
1943
+ refundable?: boolean;
1944
+ scope: ReservationAssociation;
1945
+ source?: string;
1946
+ status?: {
1947
+ code?: string;
1948
+ name?: string;
1949
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
1950
+ };
1951
+ subcode?: string;
1952
+ supplierCode?: string;
1953
+ taxes?: {
1954
+ amount?: {
1955
+ currency: string;
1956
+ totalMinor: number;
1957
+ };
1958
+ code?: string;
1959
+ unconvertedAmount?: string;
1960
+ }[];
1961
+ vendorCode?: string;
1962
+ }[];
1963
+ baggage: {
1964
+ allowance?: {
1965
+ maximumPieces?: number;
1966
+ pieces?: {
1967
+ description?: string;
1968
+ maximumSizeCentimeters?: number;
1969
+ maximumSizeInches?: number;
1970
+ maximumWeightKilograms?: number;
1971
+ maximumWeightPounds?: number;
1972
+ pieces?: number;
1973
+ }[];
1974
+ totalWeightKilograms?: number;
1975
+ };
1976
+ charges?: {
1977
+ amount?: {
1978
+ currency: string;
1979
+ totalMinor: number;
1980
+ };
1981
+ checkInOnly?: boolean;
1982
+ description?: string;
1983
+ maximumSizeCentimeters?: number;
1984
+ maximumSizeInches?: number;
1985
+ maximumWeightKilograms?: number;
1986
+ maximumWeightPounds?: number;
1987
+ pieces?: number;
1988
+ }[];
1989
+ kind: "CHECKED" | "CABIN" | "OTHER";
1990
+ reference: string;
1991
+ scope: ReservationAssociation;
1992
+ }[];
1993
+ cancelable?: boolean;
1994
+ contacts: {
1995
+ address?: ReservationAddress;
1996
+ displayName?: string;
1997
+ emails?: string[];
1998
+ emergencyPhones?: {
1999
+ label?: string;
2000
+ number: string;
2001
+ }[];
2002
+ faxes?: string[];
2003
+ givenName?: string;
2004
+ middleName?: string;
2005
+ phones?: {
2006
+ label?: string;
2007
+ number: string;
2008
+ }[];
2009
+ reference: string;
2010
+ scope: ReservationAssociation;
2011
+ surname?: string;
2012
+ }[];
2013
+ createdAt?: ReservationTimestamp;
2014
+ creator?: {
2015
+ agencyIataNumber?: string;
2016
+ homeOfficeId?: string;
2017
+ officeId?: string;
2018
+ supplierCode?: string;
2019
+ userCode?: string;
2020
+ };
2021
+ documents: {
2022
+ bundled?: boolean;
2023
+ commission?: {
2024
+ amount?: {
2025
+ currency: string;
2026
+ totalMinor: number;
2027
+ };
2028
+ percentage?: string;
2029
+ text?: string;
2030
+ unconvertedAmount?: string;
2031
+ };
2032
+ coupons?: {
2033
+ number?: number;
2034
+ reference?: string;
2035
+ segmentReference?: string;
2036
+ status?: {
2037
+ code?: string;
2038
+ name?: string;
2039
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
2040
+ };
2041
+ }[];
2042
+ issuedAt?: ReservationTimestamp;
2043
+ issuer?: {
2044
+ agencyIataNumber?: string;
2045
+ homeOfficeId?: string;
2046
+ officeId?: string;
2047
+ supplierCode?: string;
2048
+ userCode?: string;
2049
+ };
2050
+ kind: "ELECTRONIC_TICKET" | "NON_ELECTRONIC_TICKET" | "ANCILLARY_DOCUMENT" | "OTHER";
2051
+ money?: {
2052
+ currency: string;
2053
+ feesMinor?: number;
2054
+ subtotalMinor?: number;
2055
+ taxesMinor?: number;
2056
+ totalMinor?: number;
2057
+ };
2058
+ number?: string;
2059
+ reference: string;
2060
+ scope: ReservationAssociation;
2061
+ status?: {
2062
+ code?: string;
2063
+ name?: string;
2064
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
2065
+ };
2066
+ }[];
2067
+ fareRules: {
2068
+ cancelable?: boolean;
2069
+ changeable?: boolean;
2070
+ destination?: string;
2071
+ exchangePenalties?: {
2072
+ amount?: {
2073
+ currency: string;
2074
+ totalMinor: number;
2075
+ };
2076
+ applicability?: string;
2077
+ conditionsApply?: boolean;
2078
+ hasNoShowCost?: boolean;
2079
+ noShowAmount?: {
2080
+ currency: string;
2081
+ totalMinor: number;
2082
+ };
2083
+ }[];
2084
+ origin?: string;
2085
+ passengerType?: string;
2086
+ reference: string;
2087
+ refundPenalties?: {
2088
+ amount?: {
2089
+ currency: string;
2090
+ totalMinor: number;
2091
+ };
2092
+ applicability?: string;
2093
+ conditionsApply?: boolean;
2094
+ hasNoShowCost?: boolean;
2095
+ noShowAmount?: {
2096
+ currency: string;
2097
+ totalMinor: number;
2098
+ };
2099
+ }[];
2100
+ refundable?: boolean;
2101
+ scope: ReservationAssociation;
2102
+ supplierCode?: string;
2103
+ }[];
2104
+ fares: {
2105
+ bundledServices?: {
2106
+ amount?: {
2107
+ currency: string;
2108
+ totalMinor: number;
2109
+ };
2110
+ code?: string;
2111
+ description?: string;
2112
+ quantity?: number;
2113
+ type?: string;
2114
+ }[];
2115
+ calculationLine?: string;
2116
+ commission?: {
2117
+ amount?: {
2118
+ currency: string;
2119
+ totalMinor: number;
2120
+ };
2121
+ percentage?: string;
2122
+ text?: string;
2123
+ unconvertedAmount?: string;
2124
+ };
2125
+ components?: {
2126
+ accountCode?: string;
2127
+ baseAmount?: {
2128
+ currency: string;
2129
+ totalMinor: number;
2130
+ };
2131
+ brandAttributes?: string[];
2132
+ brandCode?: string;
2133
+ brandName?: string;
2134
+ checkedBaggage?: {
2135
+ maximumPieces?: number;
2136
+ pieces?: {
2137
+ description?: string;
2138
+ maximumSizeCentimeters?: number;
2139
+ maximumSizeInches?: number;
2140
+ maximumWeightKilograms?: number;
2141
+ maximumWeightPounds?: number;
2142
+ pieces?: number;
2143
+ }[];
2144
+ totalWeightKilograms?: number;
2145
+ };
2146
+ currentItinerary?: boolean;
2147
+ fareBasis?: string;
2148
+ programCode?: string;
2149
+ programName?: string;
2150
+ reference?: string;
2151
+ scope: ReservationAssociation;
2152
+ }[];
2153
+ createdAt?: ReservationTimestamp;
2154
+ issuer?: {
2155
+ agencyIataNumber?: string;
2156
+ homeOfficeId?: string;
2157
+ officeId?: string;
2158
+ supplierCode?: string;
2159
+ userCode?: string;
2160
+ };
2161
+ money?: {
2162
+ currency: string;
2163
+ feesMinor?: number;
2164
+ subtotalMinor?: number;
2165
+ taxesMinor?: number;
2166
+ totalMinor?: number;
2167
+ };
2168
+ negotiated?: boolean;
2169
+ originalMoney?: {
2170
+ currency: string;
2171
+ feesMinor?: number;
2172
+ subtotalMinor?: number;
2173
+ taxesMinor?: number;
2174
+ totalMinor?: number;
2175
+ };
2176
+ pricedTravelerType?: string;
2177
+ purchaseDeadline?: ReservationTimestamp;
2178
+ recordTypeCode?: string;
2179
+ recordTypeName?: string;
2180
+ reference: string;
2181
+ requestedTravelerType?: string;
2182
+ scope: ReservationAssociation;
2183
+ status?: {
2184
+ code?: string;
2185
+ name?: string;
2186
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
2187
+ };
2188
+ supplierCode?: string;
2189
+ taxes?: {
2190
+ amount?: {
2191
+ currency: string;
2192
+ totalMinor: number;
2193
+ };
2194
+ code?: string;
2195
+ unconvertedAmount?: string;
2196
+ }[];
2197
+ tourCode?: string;
2198
+ typeCode?: string;
2199
+ typeName?: string;
2200
+ validPricing?: boolean;
2201
+ }[];
2202
+ guarantees: {
2203
+ approval?: {
2204
+ amount?: {
2205
+ currency: string;
2206
+ totalMinor: number;
2207
+ };
2208
+ expiresAt?: ReservationTimestamp;
2209
+ requestedAt?: ReservationTimestamp;
2210
+ supplierCode?: string;
2211
+ };
2212
+ card?: {
2213
+ brand: string | null;
2214
+ expiresYearMonth: string | null;
2215
+ holderName?: string | null;
2216
+ last4: string | null;
2217
+ };
2218
+ holder?: {
2219
+ address?: ReservationAddress;
2220
+ displayName?: string;
2221
+ emails?: string[];
2222
+ emergencyPhones?: {
2223
+ label?: string;
2224
+ number: string;
2225
+ }[];
2226
+ faxes?: string[];
2227
+ givenName?: string;
2228
+ middleName?: string;
2229
+ phones?: {
2230
+ label?: string;
2231
+ number: string;
2232
+ }[];
2233
+ surname?: string;
2234
+ };
2235
+ kind: "CARD" | "CASH" | "CHECK" | "AGENCY" | "OTHER" | "UNKNOWN";
2236
+ linkedGuaranteeReferences?: string[];
2237
+ reference: string;
2238
+ scope: ReservationAssociation;
2239
+ tripTypes?: string[];
2240
+ typeCode?: string;
2241
+ typeName?: string;
2242
+ useTypes?: string[];
2243
+ }[];
2244
+ history: {
2245
+ address?: ReservationAddress;
2246
+ cardLast4?: string;
2247
+ code?: string;
2248
+ commission?: {
2249
+ amount?: {
2250
+ currency: string;
2251
+ totalMinor: number;
2252
+ };
2253
+ percentage?: string;
2254
+ text?: string;
2255
+ unconvertedAmount?: string;
2256
+ };
2257
+ confirmation?: string;
2258
+ description?: string;
2259
+ destination?: string;
2260
+ documentReference?: string;
2261
+ end?: ReservationTimestamp;
2262
+ endAddress?: ReservationAddress;
2263
+ fareApplicationType?: string;
2264
+ guaranteeReferences?: string[];
2265
+ invoiceReferences?: string[];
2266
+ issuer?: {
2267
+ agencyIataNumber?: string;
2268
+ homeOfficeId?: string;
2269
+ officeId?: string;
2270
+ supplierCode?: string;
2271
+ userCode?: string;
2272
+ };
2273
+ kind: "SEGMENT" | "SERVICE" | "ACCOUNTING" | "CREATED" | "UPDATED" | "TICKETING" | "RETENTION" | "OTHER";
2274
+ messageOmitted?: boolean;
2275
+ money?: {
2276
+ currency: string;
2277
+ feesMinor?: number;
2278
+ subtotalMinor?: number;
2279
+ taxesMinor?: number;
2280
+ totalMinor?: number;
2281
+ };
2282
+ occurredAt?: ReservationTimestamp;
2283
+ origin?: string;
2284
+ paymentType?: string;
2285
+ quantity?: number;
2286
+ reference: string;
2287
+ scope: ReservationAssociation;
2288
+ start?: ReservationTimestamp;
2289
+ startAddress?: ReservationAddress;
2290
+ status?: {
2291
+ code?: string;
2292
+ name?: string;
2293
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
2294
+ };
2295
+ supplierCode?: string;
2296
+ taxAmount?: {
2297
+ currency: string;
2298
+ totalMinor: number;
2299
+ };
2300
+ typeCode?: string;
2301
+ unconvertedAmount?: string;
2302
+ unconvertedTaxAmount?: string;
2303
+ }[];
2304
+ journeys: {
2305
+ departureAt?: ReservationTimestamp;
2306
+ destination?: string;
2307
+ durationMinutes?: number;
2308
+ origin?: string;
2309
+ reference: string;
2310
+ scope: ReservationAssociation;
2311
+ segmentCount?: number;
2312
+ }[];
2313
+ meals: {
2314
+ code?: string;
2315
+ description?: string;
2316
+ reference: string;
2317
+ scope: ReservationAssociation;
2318
+ }[];
2319
+ profiles: {
2320
+ reference: string;
2321
+ scope: ReservationAssociation;
2322
+ type?: string;
2323
+ }[];
2324
+ retentionEndsOn?: string;
2325
+ retrievedAt?: ReservationTimestamp;
2326
+ seats: {
2327
+ characteristics?: string[];
2328
+ number: string;
2329
+ reference: string;
2330
+ scope: ReservationAssociation;
2331
+ status?: {
2332
+ code?: string;
2333
+ name?: string;
2334
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
2335
+ };
2336
+ }[];
2337
+ segments: {
2338
+ aircraftCode?: string;
2339
+ aircraftName?: string;
2340
+ arrival?: {
2341
+ airportCode?: string;
2342
+ gate?: string;
2343
+ scheduledAt?: ReservationTimestamp;
2344
+ terminalCode?: string;
2345
+ terminalName?: string;
2346
+ updatedAt?: ReservationTimestamp;
2347
+ };
2348
+ bookingClass?: string;
2349
+ cabinCode?: string;
2350
+ cabinName?: string;
2351
+ createdAt?: ReservationTimestamp;
2352
+ departure?: {
2353
+ airportCode?: string;
2354
+ gate?: string;
2355
+ scheduledAt?: ReservationTimestamp;
2356
+ terminalCode?: string;
2357
+ terminalName?: string;
2358
+ updatedAt?: ReservationTimestamp;
2359
+ };
2360
+ distanceMiles?: number;
2361
+ durationMinutes?: number;
2362
+ fareBasis?: string;
2363
+ hiddenStops?: {
2364
+ airportCode?: string;
2365
+ arrivalAt?: ReservationTimestamp;
2366
+ departureAt?: ReservationTimestamp;
2367
+ durationMinutes?: number;
2368
+ }[];
2369
+ identityDocuments?: {
2370
+ reference: string;
2371
+ status?: {
2372
+ code?: string;
2373
+ name?: string;
2374
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
2375
+ };
2376
+ }[];
2377
+ kind: "FLIGHT";
2378
+ marketingCarrierCode?: string;
2379
+ marketingCarrierName?: string;
2380
+ marketingFlightNumber?: string;
2381
+ operatingCarrierCode?: string;
2382
+ operatingCarrierName?: string;
2383
+ operatingFlightNumber?: string;
2384
+ past?: boolean;
2385
+ reference: string;
2386
+ scope: ReservationAssociation;
2387
+ seats?: number;
2388
+ sourceType?: string;
2389
+ status?: {
2390
+ code?: string;
2391
+ name?: string;
2392
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
2393
+ };
2394
+ supplierConfirmation?: string;
2395
+ }[];
2396
+ sourceDigest?: string;
2397
+ specialRequests: {
2398
+ code: string;
2399
+ description?: string;
2400
+ messageOmitted?: boolean;
2401
+ name?: string;
2402
+ reference: string;
2403
+ scope: ReservationAssociation;
2404
+ status?: {
2405
+ code?: string;
2406
+ name?: string;
2407
+ state: "CONFIRMED" | "PENDING" | "CANCELLED" | "ISSUED" | "VOIDED" | "REFUNDED" | "USED" | "EXCHANGED" | "OPEN" | "UNKNOWN";
2408
+ };
2409
+ }[];
2410
+ ticketed?: boolean;
2411
+ totals: {
2412
+ kind: "FLIGHT" | "FLIGHT_CURRENT" | "HOTEL" | "CAR_RENTAL" | "ANCILLARY" | "RESERVATION";
2413
+ money: {
2414
+ currency: string;
2415
+ feesMinor?: number;
2416
+ subtotalMinor?: number;
2417
+ taxesMinor?: number;
2418
+ totalMinor?: number;
2419
+ };
2420
+ scope: ReservationAssociation;
2421
+ }[];
2422
+ travelers: {
2423
+ address?: ReservationAddress;
2424
+ birthDate?: string;
2425
+ displayName?: string;
2426
+ emails?: string[];
2427
+ emergencyPhones?: {
2428
+ label?: string;
2429
+ number: string;
2430
+ }[];
2431
+ faxes?: string[];
2432
+ gender?: string;
2433
+ givenName?: string;
2434
+ guaranteeReferences?: string[];
2435
+ identityDocuments?: {
2436
+ birthDate?: string;
2437
+ citizenshipCountryCode?: string;
2438
+ destinationAddress?: ReservationAddress;
2439
+ expiresOn?: string;
2440
+ gender?: string;
2441
+ givenName?: string;
2442
+ hostCountryCode?: string;
2443
+ issuedOn?: string;
2444
+ issuingCountryCode?: string;
2445
+ middleName?: string;
2446
+ number?: string;
2447
+ passportType?: string;
2448
+ placeOfIssue?: string;
2449
+ primaryHolder?: boolean;
2450
+ reference?: string;
2451
+ residenceCountryCode?: string;
2452
+ surname?: string;
2453
+ type?: string;
2454
+ visaType?: string;
2455
+ }[];
2456
+ loyaltyPrograms?: LoyaltyProgram[];
2457
+ middleName?: string;
2458
+ nameReference?: string;
2459
+ passengerType?: string;
2460
+ phones?: {
2461
+ label?: string;
2462
+ number: string;
2463
+ }[];
2464
+ reference: string;
2465
+ sourceReference?: string;
2466
+ surname?: string;
2467
+ unresolvedPaymentMethodIndices?: number[];
2468
+ }[];
2469
+ updateCount?: number;
2470
+ updatedAt?: ReservationTimestamp;
2471
+ updater?: {
2472
+ agencyIataNumber?: string;
2473
+ homeOfficeId?: string;
2474
+ officeId?: string;
2475
+ supplierCode?: string;
2476
+ userCode?: string;
2477
+ };
2478
+ version: 1;
2479
+ };
2480
+ normalizationVersion: number;
2481
+ observedAt: string;
2482
+ recordedAt: string;
2483
+ };
2484
+ status: OrderLifecycleStatus;
2485
+ travelersTripId: string | null;
2486
+ updatedAt: string;
2487
+ }
2488
+ export interface ReservationAddress {
2489
+ city?: string;
2490
+ cityCode?: string;
2491
+ countryCode?: string;
2492
+ lines?: string[];
2493
+ name?: string;
2494
+ postalCode?: string;
2495
+ stateProvince?: string;
2496
+ street?: string;
2497
+ }
2498
+ export interface ReservationAssociation {
2499
+ segmentReferences: string[];
2500
+ serviceReferences: string[];
2501
+ travelerReferences: string[];
2502
+ unresolvedSegmentIndices: number[];
2503
+ unresolvedTravelerIndices: number[];
2504
+ }
2505
+ export type ReservationState = "NOT_STARTED" | "HOLDING" | "HELD" | "CONFIRMED" | "CANCELLATION_PROCESSING" | "CANCELLED" | "EXPIRED" | "UNKNOWN";
2506
+ export type ReservationTimestamp = string | {
2507
+ date: string;
2508
+ time?: string;
2509
+ timeZone?: string;
2510
+ };