@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,454 +1,454 @@
1
- export type StaysBedType = 'single' | 'double' | 'queen' | 'king' | 'sofabed';
2
- export interface StaysBed {
3
- /**
4
- * The type of beds available in the room Available types: "single", "double", "queen", "king", "sofabed"
5
- */
6
- type: StaysBedType;
7
- /**
8
- * The number of beds of this type in the room.
9
- */
10
- count: number;
11
- }
12
- export interface StaysRating {
13
- /**
14
- * The source of this rating. Possible values: `"aaa"` (American Automobile Association Diamond Rating), `"northstar"` (Northstar Crown Rating), `"priceline"` (Priceline star rating)
15
- */
16
- source: 'aaa' | 'northstar' | 'priceline';
17
- /**
18
- * The rating value. This is an integer from 1 to 5 regardless of the `source`.
19
- */
20
- value: number;
21
- }
22
- export interface StaysRateCondition {
23
- /**
24
- * One or more paragraphs that outline the rate condition
25
- */
26
- description: string;
27
- /**
28
- * The condition title
29
- */
30
- title: string;
31
- }
32
- export interface StaysRateCancellationTimeline {
33
- /**
34
- * The amount refundable up until the specified before date
35
- */
36
- refund_amount: string;
37
- /**
38
- * The ISO 8601 datetime for the deadline of a refund.
39
- */
40
- before: string;
41
- /**
42
- * The currency of the amount, as an ISO 4217 currency code.
43
- */
44
- currency: string;
45
- }
46
- export type StaysLoyaltyProgramme = 'wyndham_rewards' | 'choice_privileges' | 'marriott_bonvoy' | 'best_western_rewards' | 'world_of_hyatt' | 'hilton_honors' | 'ihg_one_rewards' | 'leaders_club' | 'stash_rewards' | 'omni_select_guest' | 'i_prefer' | 'accor_live_limitless' | 'my_6' | 'jumeirah_one' | 'global_hotel_alliance_discovery' | 'duffel_hotel_group_rewards';
47
- export interface StaysRate {
48
- /**
49
- * The currency of the base_amount, as an ISO 4217 currency code.
50
- */
51
- base_amount: string | null;
52
- /**
53
- * The currency of the base_amount, as an ISO 4217 currency code.
54
- */
55
- base_currency: string;
56
- /**
57
- * The type of boarding offered by this rate.
58
- */
59
- board_type: 'room_only' | 'breakfast' | 'all_inclusive';
60
- /**
61
- * A timeline that contains policies, such as possible refunds, once this rate has been booked. This is sorted in ascending chronological order.
62
- */
63
- cancellation_timeline: StaysRateCancellationTimeline[];
64
- /**
65
- * The conditions or policies that apply to the rate. The information provided should be treated as mandatory and displayed to the traveller during and after the booking process.
66
- */
67
- conditions: Array<StaysRateCondition>;
68
- /**
69
- * Fees are sometimes payable at time of check in. These fees are not collected during the booking process
70
- */
71
- due_at_accommodation_amount: string | null;
72
- /**
73
- * The currency of the due_at_accommodation_amount
74
- */
75
- due_at_accommodation_currency: string;
76
- /**
77
- * ID of a given rate for a accommodation
78
- */
79
- id: string;
80
- /**
81
- * The accepted payment method for this rate. Prepaid rates require payment at time of reservation. Accepted types: prepaid
82
- */
83
- payment_type: 'prepaid';
84
- /**
85
- * The supplier from which Duffel got this rate
86
- */
87
- supplier: 'priceline';
88
- /**
89
- * The fee amount, as an ISO 4217 currency code.
90
- */
91
- fee_amount: string | null;
92
- /**
93
- * The currency of the fee_amount, as an ISO 4217 currency code
94
- */
95
- fee_currency: string;
96
- /**
97
- * The tax amount, as an ISO 4217 currency code.
98
- */
99
- tax_amount: string | null;
100
- /**
101
- * The currency of the tax_amount, as an ISO 4217 currency code
102
- */
103
- tax_currency: string;
104
- /**
105
- * The total price for the room for all nights and for all occupants. Please note, the occupant may be required to pay fees on arrival at the hotel. These are not included in the total_amount, and are included in due_at_accommodation_amount
106
- */
107
- total_amount: string;
108
- /**
109
- * The currency of the total_amount, as an ISO 4217 currency code
110
- */
111
- total_currency: string;
112
- /**
113
- * The method available for payment of this rate. A rate with the `balance` payment type will be paid for using your Duffel Balance, and a rate with the `card` payment type will be paid for with card details provided at time of booking.
114
- */
115
- payment_method: 'balance' | 'card';
116
- /**
117
- * The loyalty programme that this rate supports.
118
- * If the rate does not support a loyalty programme, this will be null.
119
- * The duffel_hotel_group_rewards value is an example programme for testing and integration purposes, and will only appear on Duffel Hotel Group test hotel rates.
120
- */
121
- supported_loyalty_programme: StaysLoyaltyProgramme | null;
122
- }
123
- export interface StaysRoomRate extends StaysRate {
124
- /**
125
- * The quantity of rooms available to be booked at this rate. This number is not guaranteed to be accurate. Will be null if this information is unknown.
126
- */
127
- quantity_available: number | null;
128
- }
129
- export interface StaysPhoto {
130
- url: string;
131
- }
132
- export interface StaysRoom {
133
- /**
134
- * The room name.
135
- */
136
- name: string;
137
- /**
138
- * Available beds in the room
139
- */
140
- beds?: StaysBed[];
141
- /**
142
- * Supplied photos for the room
143
- */
144
- photos?: StaysPhoto[];
145
- /**
146
- * The available rates for a specific room, including commission, distribution, payment and included services information.
147
- */
148
- rates: StaysRoomRate[];
149
- }
150
- export interface StaysAmenity {
151
- type: 'parking' | 'wi-fi' | 'gym';
152
- description: string;
153
- }
154
- export interface StaysChain {
155
- /**
156
- * The hotel chain’s name
157
- */
158
- name: string;
159
- }
160
- export interface StaysAddress {
161
- /**
162
- * The name of the city or metropolitan area where the accommodation is located.
163
- */
164
- city_name: string;
165
- /**
166
- * The ISO 3166-1 alpha-2 code for the country where the hotel is located.
167
- */
168
- country_code: string;
169
- /**
170
- * The first line of the accommodation's address
171
- */
172
- line_one: string;
173
- /**
174
- * The accommodation's postal code (or zip code)
175
- */
176
- postal_code: string;
177
- /**
178
- * The setay's region or state
179
- */
180
- region: string;
181
- }
182
- export interface GeographicCoordinates {
183
- /**
184
- * The latitude position of the accommodation represented in Decimal degrees with 6 decimal points with a range between -90° and 90°
185
- */
186
- latitude: number;
187
- /**
188
- * The longitude position of the accommodation represented in Decimal degrees with 6 decimal points with a range between -180° and 180°
189
- */
190
- longitude: number;
191
- }
192
- export interface StaysLocation {
193
- /**
194
- * Address information of the location
195
- */
196
- address: StaysAddress;
197
- /**
198
- * The exact latitude-longitude position of the accommodation. Useful for map views.
199
- */
200
- geographic_coordinates: GeographicCoordinates | null;
201
- }
202
- export interface StaysAccommodation {
203
- /**
204
- * Duffel ID for this accommodation. Useful for searching availability
205
- * for the same accommodation via accommodation based search.
206
- */
207
- id: string;
208
- /**
209
- * The amenities available at the accommodation
210
- */
211
- amenities: StaysAmenity[] | null;
212
- /**
213
- * Information about the chain this accommodation belongs to
214
- */
215
- chain: StaysChain | null;
216
- /**
217
- * Check in and check out related information
218
- */
219
- check_in_information: {
220
- /**
221
- * The ISO 8601 format for the earliest time a traveller can check-in to their room.
222
- */
223
- check_out_before_time: string;
224
- /**
225
- * The ISO 8601 format for the earliest time a traveller can check-out to their room.
226
- */
227
- check_in_after_time: string;
228
- } | null;
229
- /**
230
- * The total currency for the cheapest rate for this accommodation, as an ISO 4217 currency code. If rooms data is available, this is equivalent to the cheapest rate for the cheapest room.
231
- */
232
- cheapest_rate_currency: string;
233
- /**
234
- * The total amount for the cheapest rate for this accommodation. If rooms data is available, this is equivalent to the cheapest rate for the cheapest room.
235
- */
236
- cheapest_rate_total_amount: string;
237
- /**
238
- * The accommodation’s description
239
- */
240
- description?: string;
241
- /**
242
- * The accommodation’s email address. Note that this data may differ from the accommodation’s records if it was updated directly by the accommodation after the booking was created.
243
- */
244
- email: string | null;
245
- /**
246
- * Information on the accommodation's location
247
- */
248
- location: StaysLocation;
249
- /**
250
- * The accommodation's name
251
- */
252
- name: string;
253
- /**
254
- * The accommodation's phone number in E.164 (international) format. Note that this data may differ from the accommodation's records if it was updated directly by the accommodation after the booking was created.
255
- */
256
- phone_number: string | null;
257
- /**
258
- * Photos for the accommodation
259
- */
260
- photos?: StaysPhoto[];
261
- /**
262
- * Ratings of the accommodation
263
- */
264
- ratings: StaysRating[] | null;
265
- /**
266
- * Rooms for the accommodation
267
- */
268
- rooms: StaysRoom[];
269
- }
270
- /**
271
- * Represents a quote for a stay.
272
- */
273
- export interface StaysQuote {
274
- /**
275
- * The id of the stay quote.
276
- *
277
- * Example: "quo_0000AS0NZdKjjnnHZmSUbI"
278
- */
279
- id: string;
280
- /**
281
- * The ISO 8601 date on which the guest wants to check in.
282
- * This comes from the search request this quote originates from.
283
- *
284
- * Example: "2023-05-24"
285
- */
286
- check_in_date: string;
287
- /**
288
- * The ISO 8601 date on which the guest wants to check out.
289
- * This comes from the search request this quote originates from.
290
- *
291
- * Example: "2023-05-28"
292
- */
293
- check_out_date: string;
294
- /**
295
- * The accommodation associated with this quote.
296
- */
297
- accommodation: StaysAccommodation;
298
- /**
299
- * The total price for the room for all nights and for all guests.
300
- * Please note, the guest may be required to pay mandatory fees and taxes at the stay.
301
- * These are not included in the total_amount, and are included in due_at_accommodation_amount.
302
- *
303
- * Example: "799.00"
304
- */
305
- total_amount: string;
306
- /**
307
- * The currency of the total_amount, as an ISO 4217 currency code.
308
- *
309
- * Example: "GBP"
310
- */
311
- total_currency: string;
312
- /**
313
- * The base amount for this quote, excluding taxes and fees.
314
- * Will be null if the base amount is unknown.
315
- *
316
- * Example: "665.83"
317
- */
318
- base_amount: string | null;
319
- /**
320
- * The currency of the base_amount, as an ISO 4217 currency code.
321
- *
322
- * Example: "GBP"
323
- */
324
- base_currency: string;
325
- /**
326
- * The fee amount for this quote.
327
- * Will be null if the fee amount is unknown.
328
- *
329
- * Example: "50.94"
330
- */
331
- fee_amount: string | null;
332
- /**
333
- * The currency of the fee_amount, as an ISO 4217 currency code.
334
- *
335
- * Example: "GBP"
336
- */
337
- fee_currency: string;
338
- /**
339
- * The tax amount for this quote.
340
- * Will be null if the tax amount is unknown.
341
- *
342
- * Example: "133.17"
343
- */
344
- tax_amount: string | null;
345
- /**
346
- * The currency of the tax_amount, as an ISO 4217 currency code.
347
- *
348
- * Example: "GBP"
349
- */
350
- tax_currency: string;
351
- /**
352
- * Mandatory fees or taxes that are due by the guest at the accommodation.
353
- * Depending on the accommodation, these may be payable on check-in or check-out.
354
- * These fees are not collected during the booking process.
355
- * Will be null if the amount due at accommodation is unknown.
356
- *
357
- * Example: "39.95"
358
- */
359
- due_at_accommodation_amount: string | null;
360
- /**
361
- * The currency of the due_at_accommodation_amount, as an ISO 4217 currency code.
362
- *
363
- * Example: "GBP"
364
- */
365
- due_at_accommodation_currency: string;
366
- /**
367
- * The loyalty programme that this quote supports.
368
- */
369
- supported_loyalty_programme: StaysLoyaltyProgramme | null;
370
- }
371
- export type StaysBookingStatus = 'confirmed' | 'cancelled';
372
- export interface StaysBooking {
373
- /**
374
- * The ID of the booking
375
- */
376
- id: string;
377
- /**
378
- * The accommodation object for the booking
379
- */
380
- accommodation: StaysAccommodation;
381
- /**
382
- * The ISO 8601 date on which the guest wants to check in.
383
- */
384
- check_in_date: string;
385
- /**
386
- * The ISO 8601 date on which the guest wants to check out.
387
- */
388
- check_out_date: string;
389
- /**
390
- * A booking reference for the property you’ll be staying in. This is the reference you should use when contacting the accommodation.
391
- */
392
- reference: string | null;
393
- /**
394
- * The status of the booking. Possible values: requested, confirmed, failed,cancellation_requested,cancellation_confirmed.
395
- */
396
- status: StaysBookingStatus;
397
- /**
398
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the booking was made.
399
- */
400
- confirmed_at: string;
401
- /**
402
- * The ISO 8601 datetime of the cancellation of this booking.
403
- * This is null if the booking is not cancelled.
404
- */
405
- cancelled_at: string | null;
406
- /**
407
- * The guests for the booking
408
- */
409
- guests: Array<{
410
- given_name: string;
411
- family_name: string;
412
- }>;
413
- /**
414
- * The loyalty programme that this booking supports.
415
- */
416
- supported_loyalty_programme: StaysLoyaltyProgramme | null;
417
- /**
418
- * Loyalty account number to associate with this booking. Use this only when the quote has a supported_loyalty_programme indicated. Otherwise, this will result into an error.
419
- */
420
- loyalty_programme_account_number: string | null;
421
- /**
422
- * The number of rooms in the booking.
423
- */
424
- rooms: number;
425
- }
426
- interface CommonStaysSearchParams {
427
- check_in_date: string;
428
- check_out_date: string;
429
- adults: number;
430
- rooms: number;
431
- }
432
- type LocationSearchParams = {
433
- location: {
434
- radius: number;
435
- geographic_coordinates: {
436
- latitude: number;
437
- longitude: number;
438
- };
439
- };
440
- } & CommonStaysSearchParams;
441
- type AccommodationSearchParams = {
442
- accommodation: {
443
- ids: Array<string>;
444
- fetch_rates?: boolean;
445
- };
446
- } & CommonStaysSearchParams;
447
- export type StaysSearchParams = LocationSearchParams | AccommodationSearchParams;
448
- export interface StaysSearchResult {
449
- id: string;
450
- check_in_date: string;
451
- check_out_date: string;
452
- accommodation: StaysAccommodation;
453
- }
454
- export {};
1
+ export type StaysBedType = 'single' | 'double' | 'queen' | 'king' | 'sofabed';
2
+ export interface StaysBed {
3
+ /**
4
+ * The type of beds available in the room Available types: "single", "double", "queen", "king", "sofabed"
5
+ */
6
+ type: StaysBedType;
7
+ /**
8
+ * The number of beds of this type in the room.
9
+ */
10
+ count: number;
11
+ }
12
+ export interface StaysRating {
13
+ /**
14
+ * The source of this rating. Possible values: `"aaa"` (American Automobile Association Diamond Rating), `"northstar"` (Northstar Crown Rating), `"priceline"` (Priceline star rating)
15
+ */
16
+ source: 'aaa' | 'northstar' | 'priceline';
17
+ /**
18
+ * The rating value. This is an integer from 1 to 5 regardless of the `source`.
19
+ */
20
+ value: number;
21
+ }
22
+ export interface StaysRateCondition {
23
+ /**
24
+ * One or more paragraphs that outline the rate condition
25
+ */
26
+ description: string;
27
+ /**
28
+ * The condition title
29
+ */
30
+ title: string;
31
+ }
32
+ export interface StaysRateCancellationTimeline {
33
+ /**
34
+ * The amount refundable up until the specified before date
35
+ */
36
+ refund_amount: string;
37
+ /**
38
+ * The ISO 8601 datetime for the deadline of a refund.
39
+ */
40
+ before: string;
41
+ /**
42
+ * The currency of the amount, as an ISO 4217 currency code.
43
+ */
44
+ currency: string;
45
+ }
46
+ export type StaysLoyaltyProgramme = 'wyndham_rewards' | 'choice_privileges' | 'marriott_bonvoy' | 'best_western_rewards' | 'world_of_hyatt' | 'hilton_honors' | 'ihg_one_rewards' | 'leaders_club' | 'stash_rewards' | 'omni_select_guest' | 'i_prefer' | 'accor_live_limitless' | 'my_6' | 'jumeirah_one' | 'global_hotel_alliance_discovery' | 'duffel_hotel_group_rewards';
47
+ export interface StaysRate {
48
+ /**
49
+ * The currency of the base_amount, as an ISO 4217 currency code.
50
+ */
51
+ base_amount: string | null;
52
+ /**
53
+ * The currency of the base_amount, as an ISO 4217 currency code.
54
+ */
55
+ base_currency: string;
56
+ /**
57
+ * The type of boarding offered by this rate.
58
+ */
59
+ board_type: 'room_only' | 'breakfast' | 'all_inclusive';
60
+ /**
61
+ * A timeline that contains policies, such as possible refunds, once this rate has been booked. This is sorted in ascending chronological order.
62
+ */
63
+ cancellation_timeline: StaysRateCancellationTimeline[];
64
+ /**
65
+ * The conditions or policies that apply to the rate. The information provided should be treated as mandatory and displayed to the traveller during and after the booking process.
66
+ */
67
+ conditions: Array<StaysRateCondition>;
68
+ /**
69
+ * Fees are sometimes payable at time of check in. These fees are not collected during the booking process
70
+ */
71
+ due_at_accommodation_amount: string | null;
72
+ /**
73
+ * The currency of the due_at_accommodation_amount
74
+ */
75
+ due_at_accommodation_currency: string;
76
+ /**
77
+ * ID of a given rate for a accommodation
78
+ */
79
+ id: string;
80
+ /**
81
+ * The accepted payment method for this rate. Prepaid rates require payment at time of reservation. Accepted types: prepaid
82
+ */
83
+ payment_type: 'prepaid';
84
+ /**
85
+ * The supplier from which Duffel got this rate
86
+ */
87
+ supplier: 'priceline';
88
+ /**
89
+ * The fee amount, as an ISO 4217 currency code.
90
+ */
91
+ fee_amount: string | null;
92
+ /**
93
+ * The currency of the fee_amount, as an ISO 4217 currency code
94
+ */
95
+ fee_currency: string;
96
+ /**
97
+ * The tax amount, as an ISO 4217 currency code.
98
+ */
99
+ tax_amount: string | null;
100
+ /**
101
+ * The currency of the tax_amount, as an ISO 4217 currency code
102
+ */
103
+ tax_currency: string;
104
+ /**
105
+ * The total price for the room for all nights and for all occupants. Please note, the occupant may be required to pay fees on arrival at the hotel. These are not included in the total_amount, and are included in due_at_accommodation_amount
106
+ */
107
+ total_amount: string;
108
+ /**
109
+ * The currency of the total_amount, as an ISO 4217 currency code
110
+ */
111
+ total_currency: string;
112
+ /**
113
+ * The method available for payment of this rate. A rate with the `balance` payment type will be paid for using your Duffel Balance, and a rate with the `card` payment type will be paid for with card details provided at time of booking.
114
+ */
115
+ payment_method: 'balance' | 'card';
116
+ /**
117
+ * The loyalty programme that this rate supports.
118
+ * If the rate does not support a loyalty programme, this will be null.
119
+ * The duffel_hotel_group_rewards value is an example programme for testing and integration purposes, and will only appear on Duffel Hotel Group test hotel rates.
120
+ */
121
+ supported_loyalty_programme: StaysLoyaltyProgramme | null;
122
+ }
123
+ export interface StaysRoomRate extends StaysRate {
124
+ /**
125
+ * The quantity of rooms available to be booked at this rate. This number is not guaranteed to be accurate. Will be null if this information is unknown.
126
+ */
127
+ quantity_available: number | null;
128
+ }
129
+ export interface StaysPhoto {
130
+ url: string;
131
+ }
132
+ export interface StaysRoom {
133
+ /**
134
+ * The room name.
135
+ */
136
+ name: string;
137
+ /**
138
+ * Available beds in the room
139
+ */
140
+ beds?: StaysBed[];
141
+ /**
142
+ * Supplied photos for the room
143
+ */
144
+ photos?: StaysPhoto[];
145
+ /**
146
+ * The available rates for a specific room, including commission, distribution, payment and included services information.
147
+ */
148
+ rates: StaysRoomRate[];
149
+ }
150
+ export interface StaysAmenity {
151
+ type: 'parking' | 'wi-fi' | 'gym';
152
+ description: string;
153
+ }
154
+ export interface StaysChain {
155
+ /**
156
+ * The hotel chain’s name
157
+ */
158
+ name: string;
159
+ }
160
+ export interface StaysAddress {
161
+ /**
162
+ * The name of the city or metropolitan area where the accommodation is located.
163
+ */
164
+ city_name: string;
165
+ /**
166
+ * The ISO 3166-1 alpha-2 code for the country where the hotel is located.
167
+ */
168
+ country_code: string;
169
+ /**
170
+ * The first line of the accommodation's address
171
+ */
172
+ line_one: string;
173
+ /**
174
+ * The accommodation's postal code (or zip code)
175
+ */
176
+ postal_code: string;
177
+ /**
178
+ * The setay's region or state
179
+ */
180
+ region: string;
181
+ }
182
+ export interface GeographicCoordinates {
183
+ /**
184
+ * The latitude position of the accommodation represented in Decimal degrees with 6 decimal points with a range between -90° and 90°
185
+ */
186
+ latitude: number;
187
+ /**
188
+ * The longitude position of the accommodation represented in Decimal degrees with 6 decimal points with a range between -180° and 180°
189
+ */
190
+ longitude: number;
191
+ }
192
+ export interface StaysLocation {
193
+ /**
194
+ * Address information of the location
195
+ */
196
+ address: StaysAddress;
197
+ /**
198
+ * The exact latitude-longitude position of the accommodation. Useful for map views.
199
+ */
200
+ geographic_coordinates: GeographicCoordinates | null;
201
+ }
202
+ export interface StaysAccommodation {
203
+ /**
204
+ * Duffel ID for this accommodation. Useful for searching availability
205
+ * for the same accommodation via accommodation based search.
206
+ */
207
+ id: string;
208
+ /**
209
+ * The amenities available at the accommodation
210
+ */
211
+ amenities: StaysAmenity[] | null;
212
+ /**
213
+ * Information about the chain this accommodation belongs to
214
+ */
215
+ chain: StaysChain | null;
216
+ /**
217
+ * Check in and check out related information
218
+ */
219
+ check_in_information: {
220
+ /**
221
+ * The ISO 8601 format for the earliest time a traveller can check-in to their room.
222
+ */
223
+ check_out_before_time: string;
224
+ /**
225
+ * The ISO 8601 format for the earliest time a traveller can check-out to their room.
226
+ */
227
+ check_in_after_time: string;
228
+ } | null;
229
+ /**
230
+ * The total currency for the cheapest rate for this accommodation, as an ISO 4217 currency code. If rooms data is available, this is equivalent to the cheapest rate for the cheapest room.
231
+ */
232
+ cheapest_rate_currency: string;
233
+ /**
234
+ * The total amount for the cheapest rate for this accommodation. If rooms data is available, this is equivalent to the cheapest rate for the cheapest room.
235
+ */
236
+ cheapest_rate_total_amount: string;
237
+ /**
238
+ * The accommodation’s description
239
+ */
240
+ description?: string;
241
+ /**
242
+ * The accommodation’s email address. Note that this data may differ from the accommodation’s records if it was updated directly by the accommodation after the booking was created.
243
+ */
244
+ email: string | null;
245
+ /**
246
+ * Information on the accommodation's location
247
+ */
248
+ location: StaysLocation;
249
+ /**
250
+ * The accommodation's name
251
+ */
252
+ name: string;
253
+ /**
254
+ * The accommodation's phone number in E.164 (international) format. Note that this data may differ from the accommodation's records if it was updated directly by the accommodation after the booking was created.
255
+ */
256
+ phone_number: string | null;
257
+ /**
258
+ * Photos for the accommodation
259
+ */
260
+ photos?: StaysPhoto[];
261
+ /**
262
+ * Ratings of the accommodation
263
+ */
264
+ ratings: StaysRating[] | null;
265
+ /**
266
+ * Rooms for the accommodation
267
+ */
268
+ rooms: StaysRoom[];
269
+ }
270
+ /**
271
+ * Represents a quote for a stay.
272
+ */
273
+ export interface StaysQuote {
274
+ /**
275
+ * The id of the stay quote.
276
+ *
277
+ * Example: "quo_0000AS0NZdKjjnnHZmSUbI"
278
+ */
279
+ id: string;
280
+ /**
281
+ * The ISO 8601 date on which the guest wants to check in.
282
+ * This comes from the search request this quote originates from.
283
+ *
284
+ * Example: "2023-05-24"
285
+ */
286
+ check_in_date: string;
287
+ /**
288
+ * The ISO 8601 date on which the guest wants to check out.
289
+ * This comes from the search request this quote originates from.
290
+ *
291
+ * Example: "2023-05-28"
292
+ */
293
+ check_out_date: string;
294
+ /**
295
+ * The accommodation associated with this quote.
296
+ */
297
+ accommodation: StaysAccommodation;
298
+ /**
299
+ * The total price for the room for all nights and for all guests.
300
+ * Please note, the guest may be required to pay mandatory fees and taxes at the stay.
301
+ * These are not included in the total_amount, and are included in due_at_accommodation_amount.
302
+ *
303
+ * Example: "799.00"
304
+ */
305
+ total_amount: string;
306
+ /**
307
+ * The currency of the total_amount, as an ISO 4217 currency code.
308
+ *
309
+ * Example: "GBP"
310
+ */
311
+ total_currency: string;
312
+ /**
313
+ * The base amount for this quote, excluding taxes and fees.
314
+ * Will be null if the base amount is unknown.
315
+ *
316
+ * Example: "665.83"
317
+ */
318
+ base_amount: string | null;
319
+ /**
320
+ * The currency of the base_amount, as an ISO 4217 currency code.
321
+ *
322
+ * Example: "GBP"
323
+ */
324
+ base_currency: string;
325
+ /**
326
+ * The fee amount for this quote.
327
+ * Will be null if the fee amount is unknown.
328
+ *
329
+ * Example: "50.94"
330
+ */
331
+ fee_amount: string | null;
332
+ /**
333
+ * The currency of the fee_amount, as an ISO 4217 currency code.
334
+ *
335
+ * Example: "GBP"
336
+ */
337
+ fee_currency: string;
338
+ /**
339
+ * The tax amount for this quote.
340
+ * Will be null if the tax amount is unknown.
341
+ *
342
+ * Example: "133.17"
343
+ */
344
+ tax_amount: string | null;
345
+ /**
346
+ * The currency of the tax_amount, as an ISO 4217 currency code.
347
+ *
348
+ * Example: "GBP"
349
+ */
350
+ tax_currency: string;
351
+ /**
352
+ * Mandatory fees or taxes that are due by the guest at the accommodation.
353
+ * Depending on the accommodation, these may be payable on check-in or check-out.
354
+ * These fees are not collected during the booking process.
355
+ * Will be null if the amount due at accommodation is unknown.
356
+ *
357
+ * Example: "39.95"
358
+ */
359
+ due_at_accommodation_amount: string | null;
360
+ /**
361
+ * The currency of the due_at_accommodation_amount, as an ISO 4217 currency code.
362
+ *
363
+ * Example: "GBP"
364
+ */
365
+ due_at_accommodation_currency: string;
366
+ /**
367
+ * The loyalty programme that this quote supports.
368
+ */
369
+ supported_loyalty_programme: StaysLoyaltyProgramme | null;
370
+ }
371
+ export type StaysBookingStatus = 'confirmed' | 'cancelled';
372
+ export interface StaysBooking {
373
+ /**
374
+ * The ID of the booking
375
+ */
376
+ id: string;
377
+ /**
378
+ * The accommodation object for the booking
379
+ */
380
+ accommodation: StaysAccommodation;
381
+ /**
382
+ * The ISO 8601 date on which the guest wants to check in.
383
+ */
384
+ check_in_date: string;
385
+ /**
386
+ * The ISO 8601 date on which the guest wants to check out.
387
+ */
388
+ check_out_date: string;
389
+ /**
390
+ * A booking reference for the property you’ll be staying in. This is the reference you should use when contacting the accommodation.
391
+ */
392
+ reference: string | null;
393
+ /**
394
+ * The status of the booking. Possible values: requested, confirmed, failed,cancellation_requested,cancellation_confirmed.
395
+ */
396
+ status: StaysBookingStatus;
397
+ /**
398
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the booking was made.
399
+ */
400
+ confirmed_at: string;
401
+ /**
402
+ * The ISO 8601 datetime of the cancellation of this booking.
403
+ * This is null if the booking is not cancelled.
404
+ */
405
+ cancelled_at: string | null;
406
+ /**
407
+ * The guests for the booking
408
+ */
409
+ guests: Array<{
410
+ given_name: string;
411
+ family_name: string;
412
+ }>;
413
+ /**
414
+ * The loyalty programme that this booking supports.
415
+ */
416
+ supported_loyalty_programme: StaysLoyaltyProgramme | null;
417
+ /**
418
+ * Loyalty account number to associate with this booking. Use this only when the quote has a supported_loyalty_programme indicated. Otherwise, this will result into an error.
419
+ */
420
+ loyalty_programme_account_number: string | null;
421
+ /**
422
+ * The number of rooms in the booking.
423
+ */
424
+ rooms: number;
425
+ }
426
+ interface CommonStaysSearchParams {
427
+ check_in_date: string;
428
+ check_out_date: string;
429
+ adults: number;
430
+ rooms: number;
431
+ }
432
+ type LocationSearchParams = {
433
+ location: {
434
+ radius: number;
435
+ geographic_coordinates: {
436
+ latitude: number;
437
+ longitude: number;
438
+ };
439
+ };
440
+ } & CommonStaysSearchParams;
441
+ type AccommodationSearchParams = {
442
+ accommodation: {
443
+ ids: Array<string>;
444
+ fetch_rates?: boolean;
445
+ };
446
+ } & CommonStaysSearchParams;
447
+ export type StaysSearchParams = LocationSearchParams | AccommodationSearchParams;
448
+ export interface StaysSearchResult {
449
+ id: string;
450
+ check_in_date: string;
451
+ check_out_date: string;
452
+ accommodation: StaysAccommodation;
453
+ }
454
+ export {};