@duffel/api 2.5.3 → 2.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/DuffelPayments/PaymentIntents/PaymentIntents.d.ts +28 -28
  2. package/dist/DuffelPayments/PaymentIntents/PaymentIntents.spec.d.ts +1 -1
  3. package/dist/DuffelPayments/PaymentIntents/PaymentIntentsType.d.ts +112 -112
  4. package/dist/DuffelPayments/PaymentIntents/index.d.ts +1 -1
  5. package/dist/DuffelPayments/Refunds/Refunds.d.ts +21 -21
  6. package/dist/DuffelPayments/Refunds/Refunds.spec.d.ts +1 -1
  7. package/dist/DuffelPayments/Refunds/RefundsType.d.ts +70 -70
  8. package/dist/DuffelPayments/Refunds/index.d.ts +1 -1
  9. package/dist/DuffelPayments/index.d.ts +1 -1
  10. package/dist/Links/Sessions/Sessions.d.ts +63 -63
  11. package/dist/Links/Sessions/Sessions.spec.d.ts +1 -1
  12. package/dist/Links/Sessions/index.d.ts +1 -1
  13. package/dist/Links/index.d.ts +1 -1
  14. package/dist/Places/Suggestions/Suggestions.d.ts +42 -42
  15. package/dist/Places/Suggestions/Suggestions.spec.d.ts +1 -1
  16. package/dist/Places/Suggestions/SuggestionsType.d.ts +59 -59
  17. package/dist/Places/Suggestions/index.d.ts +1 -1
  18. package/dist/Places/index.d.ts +1 -1
  19. package/dist/Stays/Bookings/Bookings.d.ts +41 -41
  20. package/dist/Stays/Bookings/Bookings.spec.d.ts +1 -1
  21. package/dist/Stays/Bookings/index.d.ts +1 -1
  22. package/dist/Stays/Quotes/Quotes.d.ts +16 -16
  23. package/dist/Stays/Quotes/Quotes.spec.d.ts +1 -1
  24. package/dist/Stays/Quotes/index.d.ts +1 -1
  25. package/dist/Stays/SearchResults/SearchResults.d.ts +16 -16
  26. package/dist/Stays/SearchResults/SearchResults.spec.d.ts +1 -1
  27. package/dist/Stays/SearchResults/index.d.ts +1 -1
  28. package/dist/Stays/Stays.d.ts +22 -22
  29. package/dist/Stays/Stays.spec.d.ts +1 -1
  30. package/dist/Stays/StaysTypes.d.ts +454 -454
  31. package/dist/booking/AirlineInitiatedChanges/AirlineInitiatedChanges.d.ts +63 -63
  32. package/dist/booking/AirlineInitiatedChanges/AirlineInitiatedChanges.spec.d.ts +1 -1
  33. package/dist/booking/AirlineInitiatedChanges/AirlineInitiatedChangesTypes.d.ts +57 -57
  34. package/dist/booking/AirlineInitiatedChanges/index.d.ts +1 -1
  35. package/dist/booking/OfferRequests/OfferRequests.d.ts +46 -46
  36. package/dist/booking/OfferRequests/OfferRequests.spec.d.ts +1 -1
  37. package/dist/booking/OfferRequests/OfferRequestsTypes.d.ts +240 -240
  38. package/dist/booking/OfferRequests/index.d.ts +1 -1
  39. package/dist/booking/Offers/OfferTypes.d.ts +495 -495
  40. package/dist/booking/Offers/Offers.d.ts +53 -53
  41. package/dist/booking/Offers/Offers.spec.d.ts +1 -1
  42. package/dist/booking/Offers/index.d.ts +1 -1
  43. package/dist/booking/OrderCancellations/OrderCancellations.d.ts +41 -41
  44. package/dist/booking/OrderCancellations/OrderCancellations.spec.d.ts +1 -1
  45. package/dist/booking/OrderCancellations/OrderCancellationsTypes.d.ts +53 -53
  46. package/dist/booking/OrderCancellations/index.d.ts +1 -1
  47. package/dist/booking/OrderChangeOffers/OrderChangeOfferTypes.d.ts +113 -113
  48. package/dist/booking/OrderChangeOffers/OrderChangeOffers.d.ts +31 -31
  49. package/dist/booking/OrderChangeOffers/OrderChangeOffers.spec.d.ts +1 -1
  50. package/dist/booking/OrderChangeOffers/index.d.ts +1 -1
  51. package/dist/booking/OrderChangeRequests/OrderChangeRequests.d.ts +29 -29
  52. package/dist/booking/OrderChangeRequests/OrderChangeRequestsTypes.d.ts +141 -141
  53. package/dist/booking/OrderChangeRequests/OrderRequestChanges.spec.d.ts +1 -1
  54. package/dist/booking/OrderChangeRequests/index.d.ts +1 -1
  55. package/dist/booking/OrderChanges/OrderChanges.d.ts +31 -31
  56. package/dist/booking/OrderChanges/OrderChanges.spec.d.ts +1 -1
  57. package/dist/booking/OrderChanges/OrderChangesTypes.d.ts +102 -102
  58. package/dist/booking/OrderChanges/index.d.ts +1 -1
  59. package/dist/booking/Orders/Orders.d.ts +52 -52
  60. package/dist/booking/Orders/Orders.spec.d.ts +1 -1
  61. package/dist/booking/Orders/OrdersTypes.d.ts +500 -500
  62. package/dist/booking/Orders/index.d.ts +1 -1
  63. package/dist/booking/PartialOfferRequests/PartialOfferRequestTypes.d.ts +6 -6
  64. package/dist/booking/PartialOfferRequests/PartialOfferRequests.d.ts +40 -40
  65. package/dist/booking/PartialOfferRequests/PartialOfferRequests.spec.d.ts +1 -1
  66. package/dist/booking/PartialOfferRequests/index.d.ts +1 -1
  67. package/dist/booking/Payments/Payments.d.ts +16 -16
  68. package/dist/booking/Payments/Payments.spec.d.ts +1 -1
  69. package/dist/booking/Payments/PaymentsTypes.d.ts +43 -43
  70. package/dist/booking/Payments/index.d.ts +1 -1
  71. package/dist/booking/SeatMaps/SeatMapTypes.d.ts +190 -190
  72. package/dist/booking/SeatMaps/SeatMaps.d.ts +17 -17
  73. package/dist/booking/SeatMaps/SeatMaps.spec.d.ts +1 -1
  74. package/dist/booking/SeatMaps/index.d.ts +1 -1
  75. package/dist/booking/index.d.ts +11 -11
  76. package/dist/index.es.js +1 -1
  77. package/dist/index.js +1 -1
  78. package/dist/notifications/Webhooks/Webhooks.d.ts +51 -51
  79. package/dist/notifications/Webhooks/Webhooks.spec.d.ts +1 -1
  80. package/dist/notifications/Webhooks/WebhooksType.d.ts +113 -113
  81. package/dist/notifications/Webhooks/index.d.ts +1 -1
  82. package/dist/notifications/index.d.ts +1 -1
  83. package/dist/supportingResources/Aircraft/Aircraft.d.ts +30 -30
  84. package/dist/supportingResources/Aircraft/Aircraft.spec.d.ts +1 -1
  85. package/dist/supportingResources/Aircraft/AircraftTypes.d.ts +18 -18
  86. package/dist/supportingResources/Aircraft/index.d.ts +1 -1
  87. package/dist/supportingResources/Airlines/Airlines.d.ts +29 -29
  88. package/dist/supportingResources/Airlines/Airlines.spec.d.ts +1 -1
  89. package/dist/supportingResources/Airlines/AirlinesTypes.d.ts +17 -17
  90. package/dist/supportingResources/Airlines/index.d.ts +2 -2
  91. package/dist/supportingResources/Airports/Airports.d.ts +30 -30
  92. package/dist/supportingResources/Airports/Airports.spec.d.ts +1 -1
  93. package/dist/supportingResources/Airports/AirportsTypes.d.ts +55 -55
  94. package/dist/supportingResources/Airports/index.d.ts +2 -2
  95. package/dist/supportingResources/index.d.ts +3 -3
  96. package/package.json +15 -15
@@ -1,240 +1,240 @@
1
- import { Airline, CabinClass, DuffelPassengerType, Place, PlaceType } from '../../types';
2
- import { Offer } from '../Offers/OfferTypes';
3
- export interface OfferRequestSlice {
4
- /**
5
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the passengers want to depart
6
- */
7
- departure_date: string;
8
- /**
9
- * The city or airport the passengers want to travel to
10
- */
11
- destination: Place | string;
12
- /**
13
- * The city or airport the passengers want to depart from
14
- */
15
- origin: Place | string;
16
- /**
17
- * The type of the origin
18
- */
19
- origin_type: PlaceType;
20
- /**
21
- * The type of the destination
22
- */
23
- destination_type: PlaceType;
24
- }
25
- interface CreateOfferRequestPassengerCommon {
26
- /**
27
- * The passenger's family name. Only `space`, `-`, `'`, and letters from the
28
- * `ASCII`, `Latin-1 Supplement` and `Latin Extended-A` (with the exceptions
29
- * of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, and `ð`) Unicode charts are accepted.
30
- * All other characters will result in a validation error. The minimum length
31
- * is 1 character, and the maximum is 20 characters.
32
- *
33
- * This is only required if you're also including
34
- * **Loyalty Programme Accounts**.
35
- */
36
- family_name?: string;
37
- /**
38
- * The passenger's given name. Only `space`, `-`, `'`, and letters from the
39
- * `ASCII`, `Latin-1 Supplement` and `Latin Extended-A` (with the exceptions
40
- * of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, and `ð`) Unicode charts are accepted.
41
- * All other characters will result in a validation error. The minimum length
42
- * is 1 character, and the maximum is 20 characters.
43
- *
44
- * This is only required if you're also including
45
- * **Loyalty Programme Accounts**.
46
- */
47
- given_name?: string;
48
- /**
49
- * The **Loyalty Programme Accounts** for this passenger.
50
- */
51
- loyalty_programme_accounts?: LoyaltyProgrammeAccount[];
52
- }
53
- interface CreateOfferRequestAdultPassenger extends CreateOfferRequestPassengerCommon {
54
- age?: never;
55
- fare_type?: never;
56
- /**
57
- * The type of the passenger. If the passenger is aged 18 or over, you should
58
- * specify a `type` of `adult`. If a passenger is aged under 18, you should
59
- * specify their `age` instead of a `type`. A passenger can have only a type
60
- * or an age, but not both.
61
- */
62
- type: Extract<DuffelPassengerType, 'adult'>;
63
- }
64
- interface CreateOfferRequestNonAdultPassenger extends CreateOfferRequestPassengerCommon {
65
- /**
66
- * The age of the passenger on the `departure_date` of the final slice. e.g.
67
- * if you a searching for a round trip and the passenger is 15 years old at
68
- * the time of the outbound flight, but they then have their birthday and are
69
- * 16 years old for the inbound flight, you must set the age to 16. You should
70
- * specify an `age` for passengers who are under 18 years old. A passenger can
71
- * have only a type or an age, but not both. You can optionally pass age with
72
- * `fare_type` though.
73
- */
74
- age: number;
75
- fare_type?: never;
76
- type?: never;
77
- }
78
- export type CreateOfferRequestPassengerFareType = 'accompanying_adult' | 'contract_bulk' | 'contract_bulk_child' | 'contract_bulk_infant_with_seat' | 'contract_bulk_infant_without_seat' | 'frequent_flyer' | 'group_inclusive_tour' | 'group_inclusive_tour_child' | 'humanitarian' | 'individual_inclusive_tour_child' | 'marine' | 'seat_only' | 'student' | 'teacher' | 'tour_operator_inclusive' | 'tour_operator_inclusive_infant' | 'unaccompanied_child' | 'visiting_friends_and_family';
79
- interface CreateOfferRequestPassengerWithFareType extends CreateOfferRequestPassengerCommon {
80
- /**
81
- * The age of the passenger on the `departure_date` of the final slice. e.g.
82
- * if you a searching for a round trip and the passenger is 15 years old at
83
- * the time of the outbound flight, but they then have their birthday and are
84
- * 16 years old for the inbound flight, you must set the age to 16. You should
85
- * specify an `age` for passengers who are under 18 years old. A passenger can
86
- * have only a type or an age, but not both. You can optionally pass age with
87
- * `fare_type` though.
88
- */
89
- age?: number;
90
- /**
91
- * The fare type of the passenger. If the passenger is aged less than 18, you
92
- * should pass in age as well.
93
- */
94
- fare_type: CreateOfferRequestPassengerFareType;
95
- type?: never;
96
- }
97
- export type CreateOfferRequestPassenger = CreateOfferRequestAdultPassenger | CreateOfferRequestNonAdultPassenger | CreateOfferRequestPassengerWithFareType;
98
- export interface CreateOfferRequestPrivateFare {
99
- corporate_code: string;
100
- tracking_reference: string;
101
- }
102
- /**
103
- * The passengers who want to travel. A passenger will have only a type or an age.
104
- */
105
- export interface OfferRequestPassenger {
106
- /**
107
- * The age of the passenger on the `departure_date` of the final slice.
108
- */
109
- age?: number;
110
- /**
111
- * The type of the passenger.
112
- */
113
- type?: DuffelPassengerType;
114
- /**
115
- * The passenger's family name. Only `space`, `-`, `'`, and letters from the `ASCII`, `Latin-1 Supplement` and `Latin
116
- * Extended-A` (with the exceptions of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, , and `ð`) Unicode charts are accepted. All
117
- * other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20
118
- * characters.
119
- *
120
- * This is only required if you're also including **Loyalty Programme Accounts**.
121
- */
122
- family_name?: string;
123
- /**
124
- * The passenger's given name. Only `space`, `-`, `'`, and letters from the `ASCII`, `Latin-1 Supplement` and `Latin
125
- * Extended-A` (with the exceptions of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, , and `ð`) Unicode charts are accepted. All
126
- * other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20
127
- * characters.
128
- *
129
- * This is only required if you're also including **Loyalty Programme Accounts**.
130
- */
131
- given_name?: string;
132
- /**
133
- * The **Loyalty Programme Accounts** for this passenger.
134
- */
135
- loyalty_programme_accounts?: LoyaltyProgrammeAccount[];
136
- /**
137
- * The identifier for the passenger, unique within this Offer Request and across all Offer Requests.
138
- * This ID will be generated by Duffel unless you had optionally provided one.
139
- * Optionally providing one has been deprecated.
140
- */
141
- id: string;
142
- }
143
- /**
144
- * The **Loyalty Programme Account** details.
145
- */
146
- export interface LoyaltyProgrammeAccount {
147
- /**
148
- * The passenger's account number for this **Loyalty Programme Account**.
149
- */
150
- account_number: string;
151
- /**
152
- * The IATA code for the airline that this **Loyalty Programme Account** belongs to.
153
- */
154
- airline_iata_code: Airline['iata_code'];
155
- }
156
- /**
157
- * To search for flights, you'll need to create an offer request.
158
- * An offer request describes the passengers and where and when they want to travel (in the form of a list of slices).
159
- * It may also include additional filters (e.g. a particular cabin to travel in).
160
- * @link https://duffel.com/docs/api/offer-requests/schema
161
- */
162
- export interface OfferRequest {
163
- /**
164
- * The slices that make up this offer request.
165
- * One-way journeys can be expressed using one slice, whereas return trips will need two.
166
- * @link https://duffel.com/docs/api/overview/key-principles
167
- */
168
- slices: OfferRequestSlice[];
169
- /**
170
- * The cabin that the passengers want to travel in
171
- */
172
- cabin_class?: CabinClass;
173
- /**
174
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer request was created
175
- */
176
- created_at: string;
177
- /**
178
- * Duffel's unique identifier for the offer request
179
- */
180
- id: string;
181
- /**
182
- * Whether the offer request was created in live mode. This field will be set to true if the offer request was created in live mode, or false if it was created in test mode.
183
- */
184
- live_mode: boolean;
185
- /**
186
- * The offers returned by the airlines
187
- */
188
- offers: Omit<Offer, 'available_services'>[];
189
- /**
190
- * The passengers who want to travel. A passenger will have only a type or an age.
191
- */
192
- passengers: OfferRequestPassenger[];
193
- }
194
- export interface CreateOfferRequest {
195
- /**
196
- * The cabin that the passengers want to travel in.
197
- */
198
- cabin_class?: CabinClass;
199
- /**
200
- * The maximum number of connections within any slice of the offer. For
201
- * example 0 means a direct flight which will have a single segment within
202
- * each slice and 1 means a maximum of two segments within each slice of the
203
- * offer.
204
- */
205
- max_connections?: 0 | 1 | 2;
206
- /**
207
- * The passengers who want to travel. If you specify an `age` for a passenger,
208
- * the `type` may differ for the same passenger in different offers due to
209
- * airline's different rules. E.g. one airline may treat a 14 year old as an
210
- * adult, and another as a young adult. You may only specify an `age` or a
211
- * `type` – not both.
212
- */
213
- passengers: CreateOfferRequestPassenger[];
214
- /**
215
- * The private fare codes for this Offer Request. You can pass in multiple
216
- * airlines with their specific private fare codes. The key is the airline's
217
- * IATA code that provided the private fare code. The `corporate_code` is
218
- * provided to you by the airline and the `tracking_reference` is to identify
219
- * your business by the airlines.
220
- */
221
- private_fares?: {
222
- [iataCode: string]: CreateOfferRequestPrivateFare[];
223
- };
224
- /**
225
- * The [slices](https://duffel.com/docs/api/overview/key-principles) that make
226
- * up this offer request. One-way journeys can be expressed using one slice,
227
- * whereas return trips will need two.
228
- */
229
- slices: Omit<OfferRequestSlice, 'origin_type' | 'destination_type'>[];
230
- }
231
- export interface CreateOfferRequestQueryParameters {
232
- /**
233
- * When set to `true`, the offer request resource returned will include all the offers returned by the airlines.
234
- * If set to `false`, the offer request resource won't include any offers.
235
- * To retrieve the associated `offers` later, use the [List Offers](https://duffel.com/docs/api/offers/get-offers) endpoint, specifying the `offer_request_id`.
236
- * You should use this option if you want to take advantage of the pagination, sorting and filtering that the [List Offers](https://duffel.com/docs/api/offers/get-offers) endpoint provides.
237
- */
238
- return_offers?: boolean;
239
- }
240
- export {};
1
+ import { Airline, CabinClass, DuffelPassengerType, Place, PlaceType } from '../../types';
2
+ import { Offer } from '../Offers/OfferTypes';
3
+ export interface OfferRequestSlice {
4
+ /**
5
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the passengers want to depart
6
+ */
7
+ departure_date: string;
8
+ /**
9
+ * The city or airport the passengers want to travel to
10
+ */
11
+ destination: Place | string;
12
+ /**
13
+ * The city or airport the passengers want to depart from
14
+ */
15
+ origin: Place | string;
16
+ /**
17
+ * The type of the origin
18
+ */
19
+ origin_type: PlaceType;
20
+ /**
21
+ * The type of the destination
22
+ */
23
+ destination_type: PlaceType;
24
+ }
25
+ interface CreateOfferRequestPassengerCommon {
26
+ /**
27
+ * The passenger's family name. Only `space`, `-`, `'`, and letters from the
28
+ * `ASCII`, `Latin-1 Supplement` and `Latin Extended-A` (with the exceptions
29
+ * of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, and `ð`) Unicode charts are accepted.
30
+ * All other characters will result in a validation error. The minimum length
31
+ * is 1 character, and the maximum is 20 characters.
32
+ *
33
+ * This is only required if you're also including
34
+ * **Loyalty Programme Accounts**.
35
+ */
36
+ family_name?: string;
37
+ /**
38
+ * The passenger's given name. Only `space`, `-`, `'`, and letters from the
39
+ * `ASCII`, `Latin-1 Supplement` and `Latin Extended-A` (with the exceptions
40
+ * of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, and `ð`) Unicode charts are accepted.
41
+ * All other characters will result in a validation error. The minimum length
42
+ * is 1 character, and the maximum is 20 characters.
43
+ *
44
+ * This is only required if you're also including
45
+ * **Loyalty Programme Accounts**.
46
+ */
47
+ given_name?: string;
48
+ /**
49
+ * The **Loyalty Programme Accounts** for this passenger.
50
+ */
51
+ loyalty_programme_accounts?: LoyaltyProgrammeAccount[];
52
+ }
53
+ interface CreateOfferRequestAdultPassenger extends CreateOfferRequestPassengerCommon {
54
+ age?: never;
55
+ fare_type?: never;
56
+ /**
57
+ * The type of the passenger. If the passenger is aged 18 or over, you should
58
+ * specify a `type` of `adult`. If a passenger is aged under 18, you should
59
+ * specify their `age` instead of a `type`. A passenger can have only a type
60
+ * or an age, but not both.
61
+ */
62
+ type: Extract<DuffelPassengerType, 'adult'>;
63
+ }
64
+ interface CreateOfferRequestNonAdultPassenger extends CreateOfferRequestPassengerCommon {
65
+ /**
66
+ * The age of the passenger on the `departure_date` of the final slice. e.g.
67
+ * if you a searching for a round trip and the passenger is 15 years old at
68
+ * the time of the outbound flight, but they then have their birthday and are
69
+ * 16 years old for the inbound flight, you must set the age to 16. You should
70
+ * specify an `age` for passengers who are under 18 years old. A passenger can
71
+ * have only a type or an age, but not both. You can optionally pass age with
72
+ * `fare_type` though.
73
+ */
74
+ age: number;
75
+ fare_type?: never;
76
+ type?: never;
77
+ }
78
+ export type CreateOfferRequestPassengerFareType = 'accompanying_adult' | 'contract_bulk' | 'contract_bulk_child' | 'contract_bulk_infant_with_seat' | 'contract_bulk_infant_without_seat' | 'frequent_flyer' | 'group_inclusive_tour' | 'group_inclusive_tour_child' | 'humanitarian' | 'individual_inclusive_tour_child' | 'marine' | 'seat_only' | 'student' | 'teacher' | 'tour_operator_inclusive' | 'tour_operator_inclusive_infant' | 'unaccompanied_child' | 'visiting_friends_and_family';
79
+ interface CreateOfferRequestPassengerWithFareType extends CreateOfferRequestPassengerCommon {
80
+ /**
81
+ * The age of the passenger on the `departure_date` of the final slice. e.g.
82
+ * if you a searching for a round trip and the passenger is 15 years old at
83
+ * the time of the outbound flight, but they then have their birthday and are
84
+ * 16 years old for the inbound flight, you must set the age to 16. You should
85
+ * specify an `age` for passengers who are under 18 years old. A passenger can
86
+ * have only a type or an age, but not both. You can optionally pass age with
87
+ * `fare_type` though.
88
+ */
89
+ age?: number;
90
+ /**
91
+ * The fare type of the passenger. If the passenger is aged less than 18, you
92
+ * should pass in age as well.
93
+ */
94
+ fare_type: CreateOfferRequestPassengerFareType;
95
+ type?: never;
96
+ }
97
+ export type CreateOfferRequestPassenger = CreateOfferRequestAdultPassenger | CreateOfferRequestNonAdultPassenger | CreateOfferRequestPassengerWithFareType;
98
+ export interface CreateOfferRequestPrivateFare {
99
+ corporate_code: string;
100
+ tracking_reference: string;
101
+ }
102
+ /**
103
+ * The passengers who want to travel. A passenger will have only a type or an age.
104
+ */
105
+ export interface OfferRequestPassenger {
106
+ /**
107
+ * The age of the passenger on the `departure_date` of the final slice.
108
+ */
109
+ age?: number;
110
+ /**
111
+ * The type of the passenger.
112
+ */
113
+ type?: DuffelPassengerType;
114
+ /**
115
+ * The passenger's family name. Only `space`, `-`, `'`, and letters from the `ASCII`, `Latin-1 Supplement` and `Latin
116
+ * Extended-A` (with the exceptions of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, , and `ð`) Unicode charts are accepted. All
117
+ * other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20
118
+ * characters.
119
+ *
120
+ * This is only required if you're also including **Loyalty Programme Accounts**.
121
+ */
122
+ family_name?: string;
123
+ /**
124
+ * The passenger's given name. Only `space`, `-`, `'`, and letters from the `ASCII`, `Latin-1 Supplement` and `Latin
125
+ * Extended-A` (with the exceptions of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, , and `ð`) Unicode charts are accepted. All
126
+ * other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20
127
+ * characters.
128
+ *
129
+ * This is only required if you're also including **Loyalty Programme Accounts**.
130
+ */
131
+ given_name?: string;
132
+ /**
133
+ * The **Loyalty Programme Accounts** for this passenger.
134
+ */
135
+ loyalty_programme_accounts?: LoyaltyProgrammeAccount[];
136
+ /**
137
+ * The identifier for the passenger, unique within this Offer Request and across all Offer Requests.
138
+ * This ID will be generated by Duffel unless you had optionally provided one.
139
+ * Optionally providing one has been deprecated.
140
+ */
141
+ id: string;
142
+ }
143
+ /**
144
+ * The **Loyalty Programme Account** details.
145
+ */
146
+ export interface LoyaltyProgrammeAccount {
147
+ /**
148
+ * The passenger's account number for this **Loyalty Programme Account**.
149
+ */
150
+ account_number: string;
151
+ /**
152
+ * The IATA code for the airline that this **Loyalty Programme Account** belongs to.
153
+ */
154
+ airline_iata_code: Airline['iata_code'];
155
+ }
156
+ /**
157
+ * To search for flights, you'll need to create an offer request.
158
+ * An offer request describes the passengers and where and when they want to travel (in the form of a list of slices).
159
+ * It may also include additional filters (e.g. a particular cabin to travel in).
160
+ * @link https://duffel.com/docs/api/offer-requests/schema
161
+ */
162
+ export interface OfferRequest {
163
+ /**
164
+ * The slices that make up this offer request.
165
+ * One-way journeys can be expressed using one slice, whereas return trips will need two.
166
+ * @link https://duffel.com/docs/api/overview/key-principles
167
+ */
168
+ slices: OfferRequestSlice[];
169
+ /**
170
+ * The cabin that the passengers want to travel in
171
+ */
172
+ cabin_class?: CabinClass;
173
+ /**
174
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer request was created
175
+ */
176
+ created_at: string;
177
+ /**
178
+ * Duffel's unique identifier for the offer request
179
+ */
180
+ id: string;
181
+ /**
182
+ * Whether the offer request was created in live mode. This field will be set to true if the offer request was created in live mode, or false if it was created in test mode.
183
+ */
184
+ live_mode: boolean;
185
+ /**
186
+ * The offers returned by the airlines
187
+ */
188
+ offers: Omit<Offer, 'available_services'>[];
189
+ /**
190
+ * The passengers who want to travel. A passenger will have only a type or an age.
191
+ */
192
+ passengers: OfferRequestPassenger[];
193
+ }
194
+ export interface CreateOfferRequest {
195
+ /**
196
+ * The cabin that the passengers want to travel in.
197
+ */
198
+ cabin_class?: CabinClass;
199
+ /**
200
+ * The maximum number of connections within any slice of the offer. For
201
+ * example 0 means a direct flight which will have a single segment within
202
+ * each slice and 1 means a maximum of two segments within each slice of the
203
+ * offer.
204
+ */
205
+ max_connections?: 0 | 1 | 2;
206
+ /**
207
+ * The passengers who want to travel. If you specify an `age` for a passenger,
208
+ * the `type` may differ for the same passenger in different offers due to
209
+ * airline's different rules. E.g. one airline may treat a 14 year old as an
210
+ * adult, and another as a young adult. You may only specify an `age` or a
211
+ * `type` – not both.
212
+ */
213
+ passengers: CreateOfferRequestPassenger[];
214
+ /**
215
+ * The private fare codes for this Offer Request. You can pass in multiple
216
+ * airlines with their specific private fare codes. The key is the airline's
217
+ * IATA code that provided the private fare code. The `corporate_code` is
218
+ * provided to you by the airline and the `tracking_reference` is to identify
219
+ * your business by the airlines.
220
+ */
221
+ private_fares?: {
222
+ [iataCode: string]: CreateOfferRequestPrivateFare[];
223
+ };
224
+ /**
225
+ * The [slices](https://duffel.com/docs/api/overview/key-principles) that make
226
+ * up this offer request. One-way journeys can be expressed using one slice,
227
+ * whereas return trips will need two.
228
+ */
229
+ slices: Omit<OfferRequestSlice, 'origin_type' | 'destination_type'>[];
230
+ }
231
+ export interface CreateOfferRequestQueryParameters {
232
+ /**
233
+ * When set to `true`, the offer request resource returned will include all the offers returned by the airlines.
234
+ * If set to `false`, the offer request resource won't include any offers.
235
+ * To retrieve the associated `offers` later, use the [List Offers](https://duffel.com/docs/api/offers/get-offers) endpoint, specifying the `offer_request_id`.
236
+ * You should use this option if you want to take advantage of the pagination, sorting and filtering that the [List Offers](https://duffel.com/docs/api/offers/get-offers) endpoint provides.
237
+ */
238
+ return_offers?: boolean;
239
+ }
240
+ export {};
@@ -1 +1 @@
1
- export * from './OfferRequests';
1
+ export * from './OfferRequests';