@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,1361 @@
1
+ /**
2
+ * Mobility needs and medical notes the traveler chose to share with the agency.
3
+ */
4
+ export interface Accessibility {
5
+ medicalNotes: string | null;
6
+ mobility: "NONE" | "REDUCED_MOBILITY" | "WHEELCHAIR_ASSISTANCE" | "WHEELCHAIR_OWN" | null;
7
+ }
8
+ export type AgingBucket = "NOT_TRAVELED" | "0_30" | "31_60" | "61_90" | "91_180" | "180_PLUS";
9
+ /**
10
+ * How the traveler likes to fly: cabin, seat, meal code, preferred airlines and
11
+ * airports.
12
+ */
13
+ export interface AirPreferences {
14
+ cabinClass: "BUSINESS" | "ECONOMY" | "FIRST" | "PREMIUM_ECONOMY" | null;
15
+ mealCode: string | null;
16
+ notes: string | null;
17
+ preferredAirlineCodes: CarrierCode[];
18
+ preferredAirportCodes: AirportCode[];
19
+ seat: "AISLE" | "ANY" | "WINDOW" | null;
20
+ }
21
+ export type AirportCode = string;
22
+ export interface AllocationRequest {
23
+ amountMinor: number;
24
+ commissionItemId: string;
25
+ }
26
+ export interface AllocationSplit {
27
+ advisorMinor: number;
28
+ agencyMinor: number;
29
+ feesMinor: number;
30
+ hostMinor: number;
31
+ houseMinor: number;
32
+ referrerMinor: number;
33
+ }
34
+ export type AttachmentContentType = "application/pdf" | "image/jpeg" | "image/png" | "message/rfc822" | "text/csv" | "text/plain" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
35
+ /**
36
+ * The most a bag may measure: the sum of its sides, each side, or both.
37
+ */
38
+ export interface BaggageSize {
39
+ dimensions: number[] | null;
40
+ linear: number | null;
41
+ unit: "CM" | "IN";
42
+ }
43
+ /**
44
+ * A bag's weight limit. Beside a piece count it caps each piece; alone it is
45
+ * the total a passenger may carry.
46
+ */
47
+ export interface BaggageWeight {
48
+ unit: "KG" | "LB";
49
+ value: number;
50
+ }
51
+ export interface BookingCommercialSnapshot {
52
+ calculationInputs: {
53
+ [key: string]: boolean | number | string | null;
54
+ };
55
+ expectedAdvisorEarning: {
56
+ amountMinor: number;
57
+ basis: string | null;
58
+ currency: CurrencyCode;
59
+ rateBps: number | null;
60
+ } | null;
61
+ expectedSupplierCommission: {
62
+ amountMinor: number;
63
+ basis: string | null;
64
+ currency: CurrencyCode;
65
+ rateBps: number | null;
66
+ } | null;
67
+ expectedTravelerReward: {
68
+ amountMinor: number;
69
+ basis: string | null;
70
+ currency: CurrencyCode;
71
+ rateBps: number | null;
72
+ } | null;
73
+ policyVersion: string;
74
+ }
75
+ export interface BookingPriceSnapshot {
76
+ baseMinor: number | null;
77
+ collector: "MULTIPLE" | "NICER" | "PROPERTY" | "PROVIDER" | "UNKNOWN";
78
+ currency: CurrencyCode;
79
+ depositMinor: number | null;
80
+ discounts: PriceComponent[];
81
+ dueAtPropertyMinor: number;
82
+ dueLaterMinor: number;
83
+ dueNowMinor: number;
84
+ fees: PriceComponent[];
85
+ lineItems: PriceComponent[];
86
+ taxes: PriceComponent[];
87
+ totalMinor: number;
88
+ }
89
+ export type BookingProductSnapshot = HotelProductSnapshot | FlightProductSnapshot | CarRentalProductSnapshot | InsuranceProductSnapshot;
90
+ export interface CarRentalLocationSnapshot {
91
+ address: string | null;
92
+ airportCode: AirportCode | null;
93
+ latitude: number | null;
94
+ localDateTime?: string;
95
+ longitude: number | null;
96
+ name: string;
97
+ timeZone?: string | null;
98
+ utcOffset?: string | null;
99
+ }
100
+ export interface CarRentalProductSnapshot {
101
+ category: string;
102
+ charges?: {
103
+ amountMinor: number;
104
+ chargeType: string;
105
+ currency: CurrencyCode;
106
+ extraMileageCharge: string | null;
107
+ mileageAllowance: string | null;
108
+ unitOfMeasure: string | null;
109
+ }[];
110
+ dropOffAt: string;
111
+ dropOffLocation: CarRentalLocationSnapshot;
112
+ images: QuoteImage[];
113
+ inclusions: string[];
114
+ kind: "CAR_RENTAL";
115
+ name: string;
116
+ paymentPolicy?: {
117
+ kind: "PAY_AT_LOCATION" | "PREPAID" | "UNKNOWN";
118
+ summary: string | null;
119
+ timing: "PICKUP" | "RETURN" | null;
120
+ };
121
+ pickUpAt: string;
122
+ pickUpLocation: CarRentalLocationSnapshot;
123
+ policies: QuotePolicy[];
124
+ productId: string;
125
+ selectedExtras: {
126
+ name: string;
127
+ price: Money | null;
128
+ serviceId: string;
129
+ }[];
130
+ specifications?: {
131
+ bodyType: string | null;
132
+ doors: number | null;
133
+ driveWheelConfiguration: string | null;
134
+ fuelType: string | null;
135
+ largeBags: number | null;
136
+ seatBelts: number | null;
137
+ smallBags: number | null;
138
+ transmission: string | null;
139
+ vehicleType: string | null;
140
+ };
141
+ supplierName: string;
142
+ }
143
+ export type CarrierCode = string;
144
+ export interface CommissionAttachment {
145
+ attachmentId: string;
146
+ contentType: string;
147
+ createdAt: string;
148
+ downloadUrl: string;
149
+ fileName: string;
150
+ label: string | null;
151
+ sizeBytes: number;
152
+ uploadedByUserId: string;
153
+ }
154
+ export type CommissionCategory = "HOTEL" | "CRUISE" | "TOUR" | "DMC" | "FLIGHT" | "CAR_RENTAL" | "RAIL" | "INSURANCE" | "TRANSFER" | "CONCIERGE" | "FEE" | "OTHER";
155
+ export type CommissionChannel = "ARC" | "BSP" | "CHECK" | "ACH" | "WIRE" | "CARD" | "STRIPE" | "CASH" | "HOST_STATEMENT" | "OTHER";
156
+ export type CommissionFileStatus = "AWAITING_UPLOAD" | "UPLOADED" | "PARSING" | "READY" | "COMMITTING" | "COMMITTED" | "UNDONE" | "DISCARDED" | "FAILED";
157
+ export interface CommissionIdentifierRef {
158
+ identifierId: string;
159
+ kind: string;
160
+ number: string;
161
+ }
162
+ export type CommissionItemKind = "SUPPLIER_COMMISSION" | "CLIENT_NET_MARKUP" | "CLIENT_FEE";
163
+ export type CommissionItemSource = "CHECKOUT" | "GDS_IMPORT" | "MANUAL" | "FILE_IMPORT";
164
+ export interface CommissionItemSummary {
165
+ advisorUserId: string | null;
166
+ agingBucket: AgingBucket;
167
+ balanceMinor: number;
168
+ bookedOn: string;
169
+ category: CommissionCategory;
170
+ clientName: string;
171
+ collectedByNicer: boolean;
172
+ commissionItemId: string;
173
+ companyName: string;
174
+ confirmationNumber: string | null;
175
+ currency: CurrencyCode;
176
+ daysPastDue: number;
177
+ dueOn: string;
178
+ expectedMinor: number;
179
+ externalBookingId: string | null;
180
+ grossMinor: number;
181
+ isCommissionable: boolean;
182
+ isFlagged: boolean;
183
+ isOverdue: boolean;
184
+ kind: CommissionItemKind;
185
+ lastReceivedOn: string | null;
186
+ needsReview: boolean;
187
+ number: string;
188
+ orderId: string | null;
189
+ paymentStatus: CommissionPaymentStatus;
190
+ percentPaid: number | null;
191
+ providerLocator: string | null;
192
+ receivedMinor: number;
193
+ receivingCompanyName: string;
194
+ source: CommissionItemSource;
195
+ supplier: {
196
+ name: string | null;
197
+ supplierId: string | null;
198
+ verified: boolean;
199
+ };
200
+ tags: CommissionTag[];
201
+ travelEnd: string;
202
+ travelStart: string;
203
+ updatedAt: string;
204
+ }
205
+ export interface CommissionNote {
206
+ authorUserId: string;
207
+ bodyMarkdown: string;
208
+ createdAt: string;
209
+ noteId: string;
210
+ }
211
+ export type CommissionPaymentStatus = "UPCOMING" | "DUE" | "OVERDUE" | "PAID" | "CANCELLED" | "NOT_COMMISSIONABLE";
212
+ export type CommissionTag = string;
213
+ export type CountryCode = string;
214
+ export type CurrencyCode = string;
215
+ /**
216
+ * The record a delete removed: its id, and deleted set to true.
217
+ */
218
+ export interface Deleted {
219
+ /**
220
+ * Always true: the record no longer exists.
221
+ */
222
+ deleted: true;
223
+ /**
224
+ * The id of the record deleted.
225
+ */
226
+ id: string;
227
+ }
228
+ /**
229
+ * Dietary needs, as codes and notes.
230
+ */
231
+ export interface Dietary {
232
+ codes: ("DIABETIC" | "GLUTEN_FREE" | "HALAL" | "KOSHER" | "LACTOSE_FREE" | "LOW_SODIUM" | "NUT_ALLERGY" | "OTHER" | "SHELLFISH_ALLERGY" | "VEGAN" | "VEGETARIAN")[];
233
+ notes: string | null;
234
+ }
235
+ /**
236
+ * A phone number in E.164 format.
237
+ */
238
+ export type E164Phone = string;
239
+ /**
240
+ * Who to call in an emergency; `travelerId` links them when they are a traveler
241
+ * of the agency.
242
+ */
243
+ export interface EmergencyContact {
244
+ name: string;
245
+ phone: E164Phone | null;
246
+ relationship: string | null;
247
+ travelerId: string | null;
248
+ }
249
+ export interface ErrorResponse {
250
+ errorCode: string;
251
+ errorMessage: string;
252
+ }
253
+ export interface EstimatedCommission {
254
+ grossAmount: Money | null;
255
+ rateBasisPoints: number | null;
256
+ source: "NICER_PRICE_ADJUSTMENT" | "PROVIDER_RATE";
257
+ }
258
+ export interface FlightAirportSnapshot {
259
+ city: string | null;
260
+ countryCode: CountryCode | null;
261
+ iataCode: AirportCode;
262
+ name: string | null;
263
+ timeZone: string | null;
264
+ }
265
+ /**
266
+ * The price of each bag beyond the allowance, for one passenger and the flights
267
+ * one payment covers.
268
+ */
269
+ export interface FlightBaggageCharge {
270
+ description: string | null;
271
+ firstPiece: number;
272
+ lastPiece: number;
273
+ passengerReference: string;
274
+ price: Money;
275
+ segmentReferences: string[];
276
+ size: BaggageSize | null;
277
+ type: "CARRY_ON" | "CHECKED";
278
+ weight: BaggageWeight | null;
279
+ }
280
+ export interface FlightBaggageSnapshot {
281
+ description?: string | null;
282
+ passengerReference: string;
283
+ pieces: number | null;
284
+ serviceId: string;
285
+ size?: BaggageSize | null;
286
+ status: "AVAILABLE" | "NOT_REQUESTED" | "NOT_SUPPORTED";
287
+ type: "CARRY_ON" | "CHECKED";
288
+ weight: BaggageWeight | null;
289
+ }
290
+ export interface FlightBrandFeatureSnapshot {
291
+ availability: "CHARGEABLE" | "INCLUDED" | "NOT_OFFERED";
292
+ name: string;
293
+ }
294
+ export interface FlightCarrierSnapshot {
295
+ code: CarrierCode;
296
+ logoAssetReference?: string | null;
297
+ name: string | null;
298
+ }
299
+ export interface FlightEndpointSnapshot {
300
+ airport: FlightAirportSnapshot;
301
+ at: string;
302
+ localDateTime: string;
303
+ terminal: string | null;
304
+ utcOffset: string | null;
305
+ }
306
+ export interface FlightFareRuleSnapshot {
307
+ category: "ADVANCE_PURCHASE" | "CANCELLATION" | "CHANGE" | "MINIMUM_STAY" | "NO_SHOW" | "OTHER";
308
+ exactCopy: string;
309
+ passengerReferences: string[];
310
+ }
311
+ export interface FlightHiddenStopSnapshot {
312
+ airport: FlightAirportSnapshot;
313
+ arrivalAt: string | null;
314
+ departureAt: string | null;
315
+ durationMinutes: number | null;
316
+ }
317
+ export interface FlightLegSnapshot {
318
+ aircraft: {
319
+ code: string;
320
+ name: string | null;
321
+ } | null;
322
+ arrival: FlightEndpointSnapshot;
323
+ baggage: FlightBaggageSnapshot[];
324
+ bookingClass: string | null;
325
+ brand?: {
326
+ code: string;
327
+ name: string;
328
+ } | null;
329
+ cabin: "BUSINESS" | "ECONOMY" | "FIRST" | "PREMIUM_ECONOMY";
330
+ departure: FlightEndpointSnapshot;
331
+ durationMinutes: number;
332
+ fareBasisCode: string | null;
333
+ hiddenStops: FlightHiddenStopSnapshot[];
334
+ legId: string;
335
+ marketingCarrier: FlightCarrierSnapshot;
336
+ marketingFlightNumber: string;
337
+ operatingCarrier: FlightCarrierSnapshot | null;
338
+ operatingFlightNumber: string | null;
339
+ providerSegmentReference: string;
340
+ seats: FlightSelectedSeat[];
341
+ services: FlightSelectedService[];
342
+ }
343
+ export interface FlightPassengerSnapshot {
344
+ count: number;
345
+ totalMinor: number | null;
346
+ type: "ADULT" | "CHILD" | "INFANT";
347
+ }
348
+ export interface FlightProductSnapshot {
349
+ baggageCharges?: FlightBaggageCharge[];
350
+ brandFeatures?: FlightBrandFeatureSnapshot[];
351
+ capabilities: {
352
+ ancillaries: "AVAILABLE" | "NOT_REQUESTED" | "NOT_SUPPORTED";
353
+ seats: "AVAILABLE" | "NOT_REQUESTED" | "NOT_SUPPORTED";
354
+ };
355
+ fareRules: FlightFareRuleSnapshot[];
356
+ kind: "FLIGHT";
357
+ owner: FlightCarrierSnapshot;
358
+ passengers?: FlightPassengerSnapshot[];
359
+ policies: QuotePolicy[];
360
+ productId: string;
361
+ /**
362
+ * What changing or canceling costs before departure and, when filed, after
363
+ * it.
364
+ */
365
+ rules?: FlightRules;
366
+ slices: FlightSliceSnapshot[];
367
+ ticketingDeadline: string | null;
368
+ /**
369
+ * Every airline that may issue this fare's ticket, the default (`owner`)
370
+ * first. Present only when there is more than one; checkout takes the chosen
371
+ * code as `validatingCarrier`.
372
+ */
373
+ validatingCarriers?: FlightCarrierSnapshot[];
374
+ }
375
+ /**
376
+ * What changing or canceling costs before departure and, when filed, after it.
377
+ */
378
+ export interface FlightRules {
379
+ afterDeparture?: {
380
+ cancellation: {
381
+ allowed: boolean | null;
382
+ deadline: string | null;
383
+ penalty: Money | null;
384
+ penaltyRange?: {
385
+ currency: CurrencyCode;
386
+ maximumAmountMinor: number;
387
+ minimumAmountMinor: number;
388
+ } | null;
389
+ summary: string | null;
390
+ };
391
+ change: {
392
+ allowed: boolean | null;
393
+ deadline: string | null;
394
+ penalty: Money | null;
395
+ penaltyRange?: {
396
+ currency: CurrencyCode;
397
+ maximumAmountMinor: number;
398
+ minimumAmountMinor: number;
399
+ } | null;
400
+ summary: string | null;
401
+ };
402
+ };
403
+ cancellation: {
404
+ allowed: boolean | null;
405
+ deadline: string | null;
406
+ penalty: Money | null;
407
+ penaltyRange?: {
408
+ currency: CurrencyCode;
409
+ maximumAmountMinor: number;
410
+ minimumAmountMinor: number;
411
+ } | null;
412
+ summary: string | null;
413
+ };
414
+ change: {
415
+ allowed: boolean | null;
416
+ deadline: string | null;
417
+ penalty: Money | null;
418
+ penaltyRange?: {
419
+ currency: CurrencyCode;
420
+ maximumAmountMinor: number;
421
+ minimumAmountMinor: number;
422
+ } | null;
423
+ summary: string | null;
424
+ };
425
+ }
426
+ export interface FlightSelectedSeat {
427
+ passengerReference: string;
428
+ price: Money | null;
429
+ seatId: string;
430
+ seatNumber: string;
431
+ }
432
+ export interface FlightSelectedService {
433
+ name: string;
434
+ passengerReferences: string[];
435
+ price: Money | null;
436
+ serviceId: string;
437
+ status: "CONFIRMED" | "ON_REQUEST";
438
+ }
439
+ export interface FlightSliceSnapshot {
440
+ durationMinutes: number;
441
+ legs: FlightLegSnapshot[];
442
+ sliceId: string;
443
+ }
444
+ /**
445
+ * An airline loyalty membership: the airline's code and the member number.
446
+ */
447
+ export interface FrequentFlyerProgram {
448
+ airlineIataCode: CarrierCode;
449
+ memberNumber: string;
450
+ }
451
+ export type FxRate = string;
452
+ export type GrantScopeKind = "USER" | "TRIP" | "ADVISOR";
453
+ export interface HotelBookingRequirements {
454
+ acceptedCardCodes: string[] | null;
455
+ guaranteeType: "GUAR" | "DEP" | "LATE" | "NONE" | "UNKNOWN";
456
+ loyaltyProgram?: {
457
+ chainCode: string;
458
+ programName: string | null;
459
+ } | null;
460
+ membership: {
461
+ chainCode: string | null;
462
+ programName: string | null;
463
+ } | null;
464
+ unsupportedReason: "MEMBERSHIP_CHAIN_UNKNOWN" | null;
465
+ }
466
+ export interface HotelMembership {
467
+ chainCode: string;
468
+ memberNumber: string;
469
+ }
470
+ /**
471
+ * How the traveler likes to stay: bed, floor, room type and favorite brands.
472
+ */
473
+ export interface HotelPreferences {
474
+ bed: "ANY" | "KING" | "QUEEN" | "TWIN" | null;
475
+ floor: "ANY" | "HIGH" | "LOW" | null;
476
+ notes: string | null;
477
+ preferredBrands: string[];
478
+ roomType: string | null;
479
+ }
480
+ export interface HotelProductSnapshot {
481
+ address: string | null;
482
+ amenities: string[];
483
+ chainName: string | null;
484
+ checkIn: string;
485
+ checkOut: string;
486
+ city: string | null;
487
+ countryCode: CountryCode | null;
488
+ description: string | null;
489
+ hotelReference: string;
490
+ images: QuoteImage[];
491
+ kind: "HOTEL";
492
+ latitude: number;
493
+ longitude: number;
494
+ name: string;
495
+ policies: QuotePolicy[];
496
+ productId: string;
497
+ rooms: {
498
+ amenities: string[];
499
+ bedTypes: string[];
500
+ board: string | null;
501
+ bookingRequirements?: HotelBookingRequirements;
502
+ category?: string | null;
503
+ description: string | null;
504
+ images: QuoteImage[];
505
+ name: string;
506
+ occupancy: {
507
+ adults: number;
508
+ childrenAges: number[];
509
+ };
510
+ rateId: string;
511
+ ratePlanClientId?: string | null;
512
+ ratePlanCode?: string | null;
513
+ ratePlanName: string | null;
514
+ refundable: boolean | null;
515
+ roomId: string;
516
+ roomNumber: number;
517
+ }[];
518
+ starRating: number | null;
519
+ }
520
+ /**
521
+ * A date the agency remembers every year, such as a wedding anniversary. The
522
+ * birthday comes from birthDate.
523
+ */
524
+ export interface ImportantDate {
525
+ /**
526
+ * The date, YYYY-MM-DD. Its month and day come back every year; the year is
527
+ * the first one.
528
+ */
529
+ date: string;
530
+ /**
531
+ * The date's id: send it back in an update to keep or replace this date.
532
+ */
533
+ dateId: string;
534
+ /**
535
+ * What kind of date it is.
536
+ */
537
+ kind: ImportantDateKind;
538
+ /**
539
+ * What the date is to people, e.g. Wedding anniversary, 1 to 80 characters;
540
+ * null when the kind says enough.
541
+ */
542
+ label: string | null;
543
+ }
544
+ /**
545
+ * A date to keep: with the dateId of a stored date to replace it, or without
546
+ * one to add it.
547
+ */
548
+ export interface ImportantDateInput {
549
+ /**
550
+ * The date, YYYY-MM-DD.
551
+ */
552
+ date: string;
553
+ /**
554
+ * The id of the stored date this one replaces; absent adds a new date.
555
+ */
556
+ dateId?: string;
557
+ /**
558
+ * What kind of date it is.
559
+ */
560
+ kind: ImportantDateKind;
561
+ /**
562
+ * What the date is to people, 1 to 80 characters; null or absent when the
563
+ * kind says enough.
564
+ */
565
+ label?: string | null;
566
+ }
567
+ /**
568
+ * ANNIVERSARY for a wedding or other anniversary; OTHER for any other date the
569
+ * agency remembers every year, named by its label.
570
+ */
571
+ export type ImportantDateKind = "ANNIVERSARY" | "OTHER";
572
+ export interface InsuranceProductSnapshot {
573
+ description: string | null;
574
+ effectiveDate: string;
575
+ exclusions: string[];
576
+ expirationDate: string;
577
+ insuredItems: {
578
+ amount: Money;
579
+ reference: string;
580
+ title: string;
581
+ }[];
582
+ kind: "INSURANCE";
583
+ planName: string;
584
+ policies: QuotePolicy[];
585
+ productId: string;
586
+ selectedCoverages: {
587
+ coverageId: string;
588
+ description: string | null;
589
+ name: string;
590
+ price: Money | null;
591
+ }[];
592
+ }
593
+ /**
594
+ * Travel styles, interests, the bucket list and how the traveler usually
595
+ * budgets.
596
+ */
597
+ export interface Interests {
598
+ bucketList: string | null;
599
+ budgetNotes: string | null;
600
+ interests: string[];
601
+ travelStyles: string[];
602
+ }
603
+ /**
604
+ * A language tag such as es or en-US.
605
+ */
606
+ export type LanguageTag = string;
607
+ export type LineExclusionReason = "DUPLICATE" | "NOT_COMMISSION" | "OTHER_COMPANY" | "OTHER";
608
+ /**
609
+ * A loyalty membership: the program type, the supplier's code, the member
610
+ * number and the tier.
611
+ */
612
+ export interface LoyaltyProgram {
613
+ number: string;
614
+ receiverCode?: string;
615
+ supplierCode?: string;
616
+ tier?: string;
617
+ type?: string;
618
+ }
619
+ /**
620
+ * Whether the traveler agreed to marketing messages, per channel.
621
+ */
622
+ export interface MarketingConsent {
623
+ /**
624
+ * Whether the traveler agreed to marketing by email.
625
+ */
626
+ email: boolean;
627
+ /**
628
+ * Whether the traveler agreed to marketing by SMS.
629
+ */
630
+ sms: boolean;
631
+ /**
632
+ * Whether the traveler agreed to marketing on WhatsApp.
633
+ */
634
+ whatsapp: boolean;
635
+ }
636
+ export type MatchFeatures = {
637
+ [key: string]: number;
638
+ };
639
+ export interface MatchProposal {
640
+ autoEligible: boolean;
641
+ balanceMinor: number;
642
+ clientName: string;
643
+ commissionItemId: string;
644
+ companyName: string;
645
+ confirmationNumber: string | null;
646
+ currency: CurrencyCode;
647
+ features: MatchFeatures;
648
+ itemNumber: string;
649
+ method: "AUTO" | "SUGGESTED" | "MANUAL" | "CLAIM" | null;
650
+ proposedAmountMinor: number;
651
+ rank: number;
652
+ score: number;
653
+ selected: boolean;
654
+ supplierName: string | null;
655
+ travelEnd: string;
656
+ travelStart: string;
657
+ }
658
+ export interface Money {
659
+ amountMinor: number;
660
+ currency: CurrencyCode;
661
+ }
662
+ export type ParticipantField = "ADDRESS" | "BIRTH_DATE" | "CONTACT_EMAIL" | "CONTACT_PHONE" | "DOCUMENTS" | "NAME" | "NATIONALITY" | "SEX";
663
+ export interface ParticipantRequirements {
664
+ slots: ParticipantSlotRequirement[];
665
+ }
666
+ /**
667
+ * The sex marker printed on the travel document: "F", "M", "U" (unspecified) or
668
+ * "X".
669
+ */
670
+ export type ParticipantSex = "F" | "M" | "U" | "X";
671
+ export interface ParticipantSlotRequirement {
672
+ ageBands?: {
673
+ count: number;
674
+ type: "ADULT" | "CHILD" | "INFANT";
675
+ }[];
676
+ documentTypes: ("DRIVER_LICENSE" | "KNOWN_TRAVELER_NUMBER" | "NATIONAL_ID" | "PASSPORT" | "REDRESS_NUMBER" | "RESIDENCE_PERMIT" | "VISA")[];
677
+ hotelBookingRequirements?: HotelBookingRequirements;
678
+ maximum: number;
679
+ minimum: number;
680
+ optionalDocumentTypes?: ("DRIVER_LICENSE" | "KNOWN_TRAVELER_NUMBER" | "NATIONAL_ID" | "PASSPORT" | "REDRESS_NUMBER" | "RESIDENCE_PERMIT" | "VISA")[];
681
+ requiredFields: ParticipantField[];
682
+ role: "DRIVER" | "GUEST" | "INSURED" | "PAYER" | "TRAVELER";
683
+ }
684
+ export interface PaymentMethodSummary {
685
+ /**
686
+ * The card's live TRIP and ADVISOR authorizations the caller may see: enough
687
+ * to pick the right client's card (when it was authorized, the trip it came
688
+ * from and its title, the recipient named, the CRM traveler it belongs to).
689
+ * Empty for a card that is only the caller's own.
690
+ */
691
+ authorizations: {
692
+ advisorName?: string | null;
693
+ advisorUserId: string | null;
694
+ authorizedAt: string | null;
695
+ kind: "TRIP" | "ADVISOR";
696
+ recipientEmail?: string | null;
697
+ travelerId?: TravelerId | null;
698
+ travelersTripId: string | null;
699
+ tripTitle?: string | null;
700
+ }[];
701
+ brand: string | null;
702
+ expiry: string | null;
703
+ label: string;
704
+ last4: string | null;
705
+ paymentMethodId: string;
706
+ scopes: GrantScopeKind[];
707
+ usable: boolean;
708
+ usableUntil: string | null;
709
+ }
710
+ export interface PaymentTerms {
711
+ acceptedCopy: string;
712
+ amountDueAtProperty: Money;
713
+ amountDueLater: Money;
714
+ amountDueNow: Money;
715
+ attemptPurpose: "NICER_CHARGE" | "PROVIDER_GUARANTEE" | "PROVIDER_PAYMENT";
716
+ cancellationPolicy: QuotePolicy | null;
717
+ collectionMode: "GUARANTEE_ONLY" | "NICER_COLLECTS" | "PAY_AT_PROVIDER" | "PROVIDER_COLLECTS";
718
+ guaranteeRequired: boolean;
719
+ /**
720
+ * Whether this checkout may request a hold. Flights require a confirmed
721
+ * airline deadline at least 12 hours away; eligibility is checked again when
722
+ * checkout is submitted.
723
+ */
724
+ holdAllowed: boolean;
725
+ /**
726
+ * The confirmed supplier deadline, when known. For a requested flight hold,
727
+ * the customer's payment deadline is half the remaining airline window and is
728
+ * recorded on the submitted order.
729
+ */
730
+ holdExpiresAt: string | null;
731
+ kind: "DEPOSIT" | "GUARANTEE" | "HOLD" | "PAY_AT_PROPERTY" | "PAY_LATER" | "PAY_NOW";
732
+ paymentRoute: "NONE" | "PROVIDER_CARD" | "STRIPE";
733
+ }
734
+ export type PayoutMethod = "STRIPE_CONNECT" | "CHECK" | "MANUAL";
735
+ /**
736
+ * A postal address: street, city, state, postal code and country.
737
+ */
738
+ export interface PersonAddress {
739
+ address1: string;
740
+ city: string;
741
+ countryCode: CountryCode;
742
+ postalCode: string;
743
+ stateCode: string;
744
+ }
745
+ /**
746
+ * How to reach the person. The phone is in E.164 format.
747
+ */
748
+ export interface PersonContact {
749
+ email: string | null;
750
+ phone: E164Phone | null;
751
+ }
752
+ /**
753
+ * The legal name as printed on the travel document: given name, middle name and
754
+ * family name.
755
+ */
756
+ export interface PersonName {
757
+ familyName: string;
758
+ givenName: string;
759
+ middleName: string | null;
760
+ }
761
+ /**
762
+ * A pet that travels with the traveler.
763
+ */
764
+ export interface Pet {
765
+ name: string;
766
+ notes: string | null;
767
+ species: string;
768
+ weightKg: number | null;
769
+ }
770
+ /**
771
+ * How the traveler prefers to be contacted.
772
+ */
773
+ export type PreferredChannel = "EMAIL" | "PHONE" | "SMS" | "WHATSAPP";
774
+ export interface PriceComponent {
775
+ amountMinor: number;
776
+ code: string;
777
+ label: string;
778
+ }
779
+ export type ProductKind = "CAR_RENTAL" | "FLIGHT" | "HOTEL" | "INSURANCE";
780
+ export type ProviderKey = string;
781
+ export interface QuoteImage {
782
+ alt: string | null;
783
+ url: string;
784
+ }
785
+ export interface QuotePolicy {
786
+ allowed: boolean | null;
787
+ deadline: string | null;
788
+ exactCopy: string;
789
+ kind: "CANCELLATION" | "CHANGE" | "DEPOSIT" | "GUARANTEE" | "NO_SHOW" | "PAY_AT_PROPERTY";
790
+ penalties: {
791
+ amount: Money | null;
792
+ from: string | null;
793
+ summary: string;
794
+ }[];
795
+ }
796
+ export interface RemittanceAllocation {
797
+ allocatedByUserId: string | null;
798
+ allocationId: string;
799
+ amountMinor: number;
800
+ commissionItemId: string;
801
+ createdAt: string;
802
+ currency: CurrencyCode;
803
+ entryType: "ALLOCATION" | "REVERSAL";
804
+ fxRate: FxRate;
805
+ itemCompanyName: string;
806
+ itemNumber: string;
807
+ lineAmountMinor: number;
808
+ matchScore: number | null;
809
+ method: "AUTO" | "SUGGESTED" | "MANUAL" | "CLAIM";
810
+ reason: string | null;
811
+ receivedOn: string;
812
+ remittanceLineId: string;
813
+ reversedMinor: number;
814
+ reversesAllocationId: string | null;
815
+ split: AllocationSplit;
816
+ }
817
+ export interface RemittanceClaim {
818
+ amountMinor: number;
819
+ claimId: string;
820
+ claimantCompanyName: string;
821
+ claimantUserId: string;
822
+ commissionItemId: string;
823
+ createdAt: string;
824
+ decidedAt: string | null;
825
+ decidedByUserId: string | null;
826
+ decisionReason: string | null;
827
+ itemCompanyName: string;
828
+ itemNumber: string;
829
+ note: string | null;
830
+ remittanceId: string;
831
+ remittanceLineId: string;
832
+ status: "PENDING" | "APPROVED" | "REJECTED";
833
+ }
834
+ export interface RemittanceLine {
835
+ allocatedMinor: number;
836
+ allocations: RemittanceAllocation[];
837
+ amountMinor: number;
838
+ archivedAt: string | null;
839
+ batchId: string | null;
840
+ cells: {
841
+ [key: string]: string;
842
+ };
843
+ currency: CurrencyCode;
844
+ duplicateOfLineId: string | null;
845
+ exclusionReason: LineExclusionReason | null;
846
+ feeMinor: number;
847
+ fxRate: FxRate | null;
848
+ lineNumber: number;
849
+ matchState: RemittanceLineMatchState;
850
+ originalAmountMinor: number | null;
851
+ originalCurrency: CurrencyCode | null;
852
+ proposals: MatchProposal[];
853
+ received: RemittanceLineReceived;
854
+ remittanceId: string;
855
+ remittanceLineId: string;
856
+ unallocatedMinor: number;
857
+ }
858
+ export type RemittanceLineMatchState = "UNMATCHED" | "PROPOSED" | "PENDING_REVIEW" | "MATCHED" | "EXCLUDED" | "ZERO";
859
+ export interface RemittanceLineReceived {
860
+ checkIn: string | null;
861
+ checkOut: string | null;
862
+ clientName: string | null;
863
+ confirmationNumber: string | null;
864
+ grossMinor: number | null;
865
+ identifierNumber: string | null;
866
+ rateBps: number | null;
867
+ supplierName: string | null;
868
+ }
869
+ /**
870
+ * Where a trip stands as a sale: INQUIRY, PLANNING, PROPOSAL, BOOKED,
871
+ * TRAVELING, COMPLETED or LOST.
872
+ */
873
+ export type SalesStage = "BOOKED" | "COMPLETED" | "INQUIRY" | "LOST" | "PLANNING" | "PROPOSAL" | "TRAVELING";
874
+ export interface SupplierAddress {
875
+ city: string | null;
876
+ countryCode: string | null;
877
+ line1: string | null;
878
+ line2: string | null;
879
+ postalCode: string | null;
880
+ region: string | null;
881
+ }
882
+ export type SupplierKind = "PROPERTY" | "CRUISE_LINE" | "TOUR_OPERATOR" | "DMC" | "AIRLINE" | "CAR_RENTAL" | "RAIL" | "INSURANCE" | "TRANSFER" | "OTHER";
883
+ /**
884
+ * Something to do about a traveler or a trip.
885
+ */
886
+ export interface Task {
887
+ /**
888
+ * The advisor or admin who should do it; null when nobody is assigned.
889
+ */
890
+ assignedUserId: string | null;
891
+ /**
892
+ * The itinerary (TI…) of the trip the task is about, when it has one; null
893
+ * otherwise.
894
+ */
895
+ associatedTripItineraryId: string | null;
896
+ /**
897
+ * The agency the task belongs to.
898
+ */
899
+ companyName: string;
900
+ /**
901
+ * Whether the task is done.
902
+ */
903
+ completed: boolean;
904
+ /**
905
+ * When the task was marked done; null while it is open.
906
+ */
907
+ completedAt: string | null;
908
+ /**
909
+ * When the task was created.
910
+ */
911
+ createdAt: string;
912
+ /**
913
+ * The user id of who created it, or SYSTEM for the CRM.
914
+ */
915
+ createdBy: string;
916
+ /**
917
+ * The user id of who changed it last, or SYSTEM for the CRM.
918
+ */
919
+ lastModifiedBy: string;
920
+ /**
921
+ * More about it; null when there is none.
922
+ */
923
+ notes: string | null;
924
+ /**
925
+ * How the task was made.
926
+ */
927
+ origin: TaskOrigin;
928
+ /**
929
+ * The task's id: what updateTask and deleteTask take.
930
+ */
931
+ taskId: string;
932
+ /**
933
+ * When it should be done, as a date; null when undated.
934
+ */
935
+ tentativeDate: string | null;
936
+ /**
937
+ * What to do, in a few words.
938
+ */
939
+ title: string;
940
+ /**
941
+ * The traveler the task is about; null for a task about a trip. A task is
942
+ * about one traveler or one trip.
943
+ */
944
+ travelerId: TravelerId | null;
945
+ /**
946
+ * The traveler's name as the agency knows them, read when the task is
947
+ * answered; null for a task about a trip.
948
+ */
949
+ travelerName: string | null;
950
+ /**
951
+ * The trip (TT…) the task is about; null for a task about a traveler.
952
+ */
953
+ travelersTripId: string | null;
954
+ /**
955
+ * The trip's name, read when the task is answered; null for a task about a
956
+ * traveler or a trip without a name.
957
+ */
958
+ tripName: string | null;
959
+ /**
960
+ * When the task last changed.
961
+ */
962
+ updatedAt: string;
963
+ }
964
+ /**
965
+ * Tasks and the token of the next page: null on the last page, and always null
966
+ * after applying a template, which answers every task it made.
967
+ */
968
+ export interface TaskList {
969
+ /**
970
+ * The items of this page.
971
+ */
972
+ items: Task[];
973
+ /**
974
+ * Send it back as nextToken to read the next page; null on the last page.
975
+ */
976
+ nextToken: string | null;
977
+ }
978
+ /**
979
+ * MANUAL for a task a person created; TEMPLATE, BIRTHDAY, ANNIVERSARY or
980
+ * DOCUMENT_EXPIRY for one the CRM created.
981
+ */
982
+ export type TaskOrigin = "ANNIVERSARY" | "BIRTHDAY" | "DOCUMENT_EXPIRY" | "MANUAL" | "TEMPLATE";
983
+ export type TermsDigest = string;
984
+ /**
985
+ * A travel document: its kind, number, issuing country and dates, as a
986
+ * reservation needs them.
987
+ */
988
+ export interface TravelDocument {
989
+ /**
990
+ * The citizenship stated on this document, as an ISO 3166-1 alpha-2 country
991
+ * code; it is not always the person's nationality. Null or absent when the
992
+ * document states none.
993
+ */
994
+ citizenshipCountry?: CountryCode | null;
995
+ /**
996
+ * The day the document expires, YYYY-MM-DD; null for one that does not.
997
+ */
998
+ expirationDate: string | null;
999
+ /**
1000
+ * The day the document was issued, YYYY-MM-DD; null or absent when unknown.
1001
+ */
1002
+ issueDate?: string | null;
1003
+ /**
1004
+ * The country that issued the document, as an ISO 3166-1 alpha-2 country
1005
+ * code; null when unknown.
1006
+ */
1007
+ issuingCountryCode: CountryCode | null;
1008
+ /**
1009
+ * What the document is.
1010
+ */
1011
+ kind: TravelDocumentKind;
1012
+ /**
1013
+ * The document's number, in full, 1 to 100 characters.
1014
+ */
1015
+ number: string;
1016
+ /**
1017
+ * The place of birth printed on the document; null or absent when unknown.
1018
+ */
1019
+ placeOfBirth?: string | null;
1020
+ /**
1021
+ * Where the document was issued; null or absent when unknown.
1022
+ */
1023
+ placeOfIssue?: string | null;
1024
+ }
1025
+ /**
1026
+ * What the document is. A Known Traveler Number (TSA PreCheck, Global Entry)
1027
+ * and a redress number are documents too.
1028
+ */
1029
+ export type TravelDocumentKind = "DRIVER_LICENSE" | "KNOWN_TRAVELER_NUMBER" | "NATIONAL_ID" | "PASSPORT" | "REDRESS_NUMBER" | "RESIDENCE_PERMIT" | "VISA";
1030
+ /**
1031
+ * The traveler's preferences, loyalty memberships, health notes and emergency
1032
+ * contacts.
1033
+ */
1034
+ export interface TravelProfile {
1035
+ accessibility: Accessibility | null;
1036
+ air: AirPreferences | null;
1037
+ dietary: Dietary | null;
1038
+ emergencyContacts: EmergencyContact[];
1039
+ hotel: HotelPreferences | null;
1040
+ interests: Interests | null;
1041
+ loyaltyPrograms: LoyaltyProgram[];
1042
+ pets: Pet[];
1043
+ }
1044
+ /**
1045
+ * Sections of the profile to replace. An omitted section is kept and null
1046
+ * clears it.
1047
+ */
1048
+ export interface TravelProfileUpdate {
1049
+ accessibility?: Accessibility | null;
1050
+ air?: AirPreferences | null;
1051
+ dietary?: Dietary | null;
1052
+ emergencyContacts?: EmergencyContact[];
1053
+ hotel?: HotelPreferences | null;
1054
+ interests?: Interests | null;
1055
+ loyaltyPrograms?: LoyaltyProgram[];
1056
+ pets?: Pet[];
1057
+ }
1058
+ /**
1059
+ * A travel document with its full number, its id and an optional label such as
1060
+ * ESTA.
1061
+ */
1062
+ export interface TravelerDocument {
1063
+ /**
1064
+ * The citizenship stated on this document, as an ISO 3166-1 alpha-2 country
1065
+ * code; it is not always the person's nationality. Null or absent when the
1066
+ * document states none.
1067
+ */
1068
+ citizenshipCountry?: CountryCode | null;
1069
+ /**
1070
+ * The document's id: send it back in an update to keep or replace this
1071
+ * document.
1072
+ */
1073
+ documentId: string;
1074
+ /**
1075
+ * The day the document expires, YYYY-MM-DD; null for one that does not.
1076
+ */
1077
+ expirationDate: string | null;
1078
+ /**
1079
+ * The day the document was issued, YYYY-MM-DD; null or absent when unknown.
1080
+ */
1081
+ issueDate?: string | null;
1082
+ /**
1083
+ * The country that issued the document, as an ISO 3166-1 alpha-2 country
1084
+ * code; null when unknown.
1085
+ */
1086
+ issuingCountryCode: CountryCode | null;
1087
+ /**
1088
+ * What the document is.
1089
+ */
1090
+ kind: TravelDocumentKind;
1091
+ /**
1092
+ * What the document is to people, e.g. "ESTA" or "Schengen", 1 to 60
1093
+ * characters; null when it has none.
1094
+ */
1095
+ label: string | null;
1096
+ /**
1097
+ * The document's number, in full, 1 to 100 characters.
1098
+ */
1099
+ number: string;
1100
+ /**
1101
+ * The place of birth printed on the document; null or absent when unknown.
1102
+ */
1103
+ placeOfBirth?: string | null;
1104
+ /**
1105
+ * Where the document was issued; null or absent when unknown.
1106
+ */
1107
+ placeOfIssue?: string | null;
1108
+ }
1109
+ /**
1110
+ * A travel document to keep: with the documentId of a stored document to
1111
+ * replace it, or without one to add it.
1112
+ */
1113
+ export interface TravelerDocumentInput {
1114
+ /**
1115
+ * The citizenship stated on this document, as an ISO 3166-1 alpha-2 country
1116
+ * code; it is not always the person's nationality. Null or absent when the
1117
+ * document states none.
1118
+ */
1119
+ citizenshipCountry?: CountryCode | null;
1120
+ /**
1121
+ * The id of the stored document this one replaces; absent adds a new
1122
+ * document.
1123
+ */
1124
+ documentId?: string;
1125
+ /**
1126
+ * The day the document expires, YYYY-MM-DD; null for one that does not.
1127
+ */
1128
+ expirationDate: string | null;
1129
+ /**
1130
+ * The day the document was issued, YYYY-MM-DD; null or absent when unknown.
1131
+ */
1132
+ issueDate?: string | null;
1133
+ /**
1134
+ * The country that issued the document, as an ISO 3166-1 alpha-2 country
1135
+ * code; null when unknown.
1136
+ */
1137
+ issuingCountryCode: CountryCode | null;
1138
+ /**
1139
+ * What the document is.
1140
+ */
1141
+ kind: TravelDocumentKind;
1142
+ /**
1143
+ * What the document is to people, e.g. "ESTA" or "Schengen", 1 to 60
1144
+ * characters; null or absent for none.
1145
+ */
1146
+ label?: string | null;
1147
+ /**
1148
+ * The document's number, in full, 1 to 100 characters.
1149
+ */
1150
+ number: string;
1151
+ /**
1152
+ * The place of birth printed on the document; null or absent when unknown.
1153
+ */
1154
+ placeOfBirth?: string | null;
1155
+ /**
1156
+ * Where the document was issued; null or absent when unknown.
1157
+ */
1158
+ placeOfIssue?: string | null;
1159
+ }
1160
+ /**
1161
+ * The traveler's id in the CRM, e.g. TRV01JD4Q9W0Y5X3M2K8B7N6P4R1T.
1162
+ */
1163
+ export type TravelerId = string;
1164
+ /**
1165
+ * Who the related traveler is to this one: a PARENT has a CHILD, an EMPLOYER
1166
+ * has an ASSISTANT or a NANNY, someone REFERRED_BY was REFERRED; the others are
1167
+ * the same both ways.
1168
+ */
1169
+ export type TravelerRelationshipKind = "ASSISTANT" | "CHILD" | "COLLEAGUE" | "EMPLOYER" | "FRIEND" | "NANNY" | "PARENT" | "PARTNER" | "REFERRED" | "REFERRED_BY" | "RELATIVE" | "SIBLING" | "SPOUSE";
1170
+ /**
1171
+ * A traveler as the person sees and fills it: identity, contact, documents and
1172
+ * preferences, without the agency's own fields.
1173
+ */
1174
+ export interface TravelerSelf {
1175
+ /**
1176
+ * The traveler's postal address; null when nobody gave one.
1177
+ */
1178
+ address: PersonAddress | null;
1179
+ /**
1180
+ * Date of birth, YYYY-MM-DD; null when unknown.
1181
+ */
1182
+ birthDate: string | null;
1183
+ /**
1184
+ * The agency the traveler belongs to.
1185
+ */
1186
+ companyName: string;
1187
+ /**
1188
+ * The traveler's email and phone, the phone in E.164; each is null when
1189
+ * unknown.
1190
+ */
1191
+ contact: PersonContact;
1192
+ /**
1193
+ * The traveler's travel documents with their full numbers, oldest first.
1194
+ */
1195
+ documents: TravelerDocument[];
1196
+ /**
1197
+ * Airline loyalty memberships, as a flight reservation carries them.
1198
+ */
1199
+ frequentFlyerPrograms: FrequentFlyerProgram[];
1200
+ /**
1201
+ * The dates the agency remembers every year; the birthday is birthDate, not
1202
+ * one of these.
1203
+ */
1204
+ importantDates: ImportantDate[];
1205
+ /**
1206
+ * Whether the traveler agreed to marketing messages, per channel.
1207
+ */
1208
+ marketingConsent: MarketingConsent;
1209
+ /**
1210
+ * The legal name, as printed on the travel document.
1211
+ */
1212
+ name: PersonName;
1213
+ /**
1214
+ * Nationality, as an ISO 3166-1 alpha-2 country code; null when unknown.
1215
+ */
1216
+ nationalityCountryCode: CountryCode | null;
1217
+ /**
1218
+ * How the traveler prefers to be contacted; null when they have not said.
1219
+ */
1220
+ preferredChannel: PreferredChannel | null;
1221
+ /**
1222
+ * The language to write to the traveler in, e.g. es or en-US; null when
1223
+ * unknown.
1224
+ */
1225
+ preferredLanguage: LanguageTag | null;
1226
+ /**
1227
+ * The name the traveler goes by when it is not their given name; null
1228
+ * otherwise.
1229
+ */
1230
+ preferredName: string | null;
1231
+ /**
1232
+ * The travel profile: air and hotel preferences, dietary and accessibility
1233
+ * needs, loyalty programs, emergency contacts, interests and pets.
1234
+ */
1235
+ profile: TravelProfile;
1236
+ /**
1237
+ * Country of residence, as an ISO 3166-1 alpha-2 country code; null when
1238
+ * unknown.
1239
+ */
1240
+ residenceCountryCode: CountryCode | null;
1241
+ /**
1242
+ * Goes up by one on every change. Send it back with an update, so a change
1243
+ * made meanwhile is never overwritten.
1244
+ */
1245
+ revision: number;
1246
+ /**
1247
+ * The sex marker on the travel document; null when unknown.
1248
+ */
1249
+ sex: ParticipantSex | null;
1250
+ /**
1251
+ * The traveler's id.
1252
+ */
1253
+ travelerId: TravelerId;
1254
+ }
1255
+ /**
1256
+ * A change the person makes to a traveler they fill: each key is one section,
1257
+ * an omitted section is kept, null clears a nullable one, and a list replaces
1258
+ * the stored list.
1259
+ */
1260
+ export interface TravelerSelfUpdate {
1261
+ /**
1262
+ * The postal address; null clears it.
1263
+ */
1264
+ address?: PersonAddress | null;
1265
+ /**
1266
+ * Date of birth, YYYY-MM-DD; null clears it.
1267
+ */
1268
+ birthDate?: string | null;
1269
+ /**
1270
+ * The email and phone, both replaced; the phone in E.164.
1271
+ */
1272
+ contact?: PersonContact;
1273
+ /**
1274
+ * Every travel document to keep, at most 12: a stored document left out is
1275
+ * removed, one sent with its documentId is replaced, and one without is
1276
+ * added. Absent leaves the documents as they are.
1277
+ */
1278
+ documents?: TravelerDocumentInput[];
1279
+ /**
1280
+ * Every airline loyalty membership to keep, at most 8.
1281
+ */
1282
+ frequentFlyerPrograms?: FrequentFlyerProgram[];
1283
+ /**
1284
+ * Every important date to keep, at most 20: a stored date left out is
1285
+ * removed, one sent with its dateId is replaced, and one without is added.
1286
+ */
1287
+ importantDates?: ImportantDateInput[];
1288
+ /**
1289
+ * Whether the traveler agreed to marketing messages, per channel.
1290
+ */
1291
+ marketingConsent?: MarketingConsent;
1292
+ /**
1293
+ * The legal name, as printed on the travel document. Required on the change
1294
+ * that adds the person's own traveler at an agency.
1295
+ */
1296
+ name?: PersonName;
1297
+ /**
1298
+ * Nationality, as an ISO 3166-1 alpha-2 country code; null clears it.
1299
+ */
1300
+ nationalityCountryCode?: CountryCode | null;
1301
+ /**
1302
+ * How the traveler prefers to be contacted; null clears it.
1303
+ */
1304
+ preferredChannel?: PreferredChannel | null;
1305
+ /**
1306
+ * The language to write to the traveler in, e.g. es or en-US; null clears it.
1307
+ */
1308
+ preferredLanguage?: LanguageTag | null;
1309
+ /**
1310
+ * The name the traveler goes by, 1 to 100 characters; null clears it.
1311
+ */
1312
+ preferredName?: string | null;
1313
+ /**
1314
+ * Sections of the travel profile to replace: a section left out is kept and
1315
+ * null clears it.
1316
+ */
1317
+ profile?: TravelProfileUpdate;
1318
+ /**
1319
+ * Country of residence, as an ISO 3166-1 alpha-2 country code; null clears
1320
+ * it.
1321
+ */
1322
+ residenceCountryCode?: CountryCode | null;
1323
+ /**
1324
+ * The revision read, required for a traveler that exists; left out only on
1325
+ * the change that adds the person's own traveler. A traveler changed since
1326
+ * answers 409 CRM_REVISION_CONFLICT: read it again and reapply.
1327
+ */
1328
+ revision?: number;
1329
+ /**
1330
+ * The sex marker on the travel document; null clears it.
1331
+ */
1332
+ sex?: ParticipantSex | null;
1333
+ }
1334
+ /**
1335
+ * LEAD until the traveler's first booking is confirmed, then CLIENT. An advisor
1336
+ * may set it too.
1337
+ */
1338
+ export type TravelerStage = "CLIENT" | "LEAD";
1339
+ /**
1340
+ * A label the agency uses to group travelers, e.g. VIP.
1341
+ */
1342
+ export type TravelerTag = string;
1343
+ /**
1344
+ * ADVISORS: only the advisors who serve the traveler, and admins. COMPANY:
1345
+ * every advisor of the agency.
1346
+ */
1347
+ export type TravelerVisibility = "ADVISORS" | "COMPANY";
1348
+ /**
1349
+ * How a person takes part in a trip: PRIMARY (the lead traveler), TRAVELER,
1350
+ * PAYER or BILLING_CONTACT.
1351
+ */
1352
+ export type TravelersTripRelationship = "BILLING_CONTACT" | "PAYER" | "PRIMARY" | "TRAVELER";
1353
+ export type TripItineraryStatus = "PROPOSAL" | "IN_PROGRESS" | "TRAVELING";
1354
+ export interface UploadLink {
1355
+ expiresAt: string;
1356
+ headers: {
1357
+ [key: string]: string;
1358
+ };
1359
+ method: "PUT";
1360
+ url: string;
1361
+ }