@duffel/api 1.28.0 → 2.0.0

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.
@@ -1,157 +0,0 @@
1
- import { Airport } from '../supportingResources/Airports/AirportsTypes';
2
- /**
3
- * The metropolitan area where the airport is located.
4
- * Only present for airports which are registered with IATA as belonging to a metropolitan area.
5
- * @link https://portal.iata.org/faq/articles/en_US/FAQ/How-do-I-create-a-new-Metropolitan-Area
6
- */
7
- export interface City {
8
- /**
9
- * The type of the place
10
- */
11
- type?: 'city';
12
- /**
13
- * The three-character IATA code for the city
14
- * @example "LON"
15
- */
16
- iata_code: string;
17
- /**
18
- * The ISO 3166-1 alpha-2 code for the country where the city is located
19
- * @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
20
- * @example "GB"
21
- */
22
- iata_country_code: string;
23
- /**
24
- * Duffel's unique identifier for the city
25
- * @example "cit_lon_gb"
26
- */
27
- id: string;
28
- /**
29
- * The name of the city
30
- * @example "London"
31
- */
32
- name: string;
33
- /**
34
- * The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
35
- */
36
- time_zone?: string | null;
37
- /**
38
- * The longitude position of the airport represented in [Decimal degrees](https://en.wikipedia.org/wiki/Decimal_degrees) with 6 decimal points with a range between -180° and 180°
39
- */
40
- longitude?: number | null;
41
- /**
42
- * The latitude position of the airport represented in [Decimal degrees](https://en.wikipedia.org/wiki/Decimal_degrees) with 6 decimal points with a range between -90° and 90°
43
- */
44
- latitude?: number | null;
45
- /**
46
- * The 3-letter IATA code for the city where the place is located.
47
- * Only present for airports which are registered with IATA as belonging to a [metropolitan area](https://portal.iata.org/faq/articles/en_US/FAQ/How-do-I-create-a-new-Metropolitan-Area).
48
- */
49
- iata_city_code?: string | null;
50
- /**
51
- * The name of the city (or cities separated by a `/`) where the airport is located
52
- */
53
- city_name?: string | null;
54
- }
55
- /**
56
- * The cabin class that the passenger will travel in on this segment
57
- */
58
- export declare type CabinClass = 'first' | 'business' | 'premium_economy' | 'economy';
59
- /**
60
- * The type of the passenger
61
- */
62
- export declare type DuffelPassengerType = 'adult' | 'child' | 'infant_without_seat';
63
- /**
64
- * The passenger's title
65
- */
66
- export declare type DuffelPassengerTitle = 'mr' | 'ms' | 'mrs' | 'MR' | 'MS' | 'MRS';
67
- /**
68
- * The passenger's gender
69
- */
70
- export declare type DuffelPassengerGender = 'm' | 'f';
71
- /**
72
- * The type of the identity document. Currently, the only supported type is passport.
73
- * This must be one of the `allowed_passenger_identity_document_types` on the offer.
74
- */
75
- export declare type PassengerIdentityDocumentType = 'passport';
76
- /**
77
- * The type of the origin or destination
78
- */
79
- export declare type PlaceType = 'airport' | 'city';
80
- export declare type Place = (Airport & {
81
- type?: 'airport';
82
- airports?: Airport[] | null;
83
- }) | (City & {
84
- type?: 'city';
85
- });
86
- /**
87
- * The conditions associated with this offer, describing the kinds of modifications you can make post-booking and any penalties that will apply to those modifications.
88
- * This information assumes the condition is applied to all of the slices and passengers associated with this offer - for information at the slice level (e.g. "what happens if I just want to change the first slice?") refer to the slices.
89
- * If a particular kind of modification is allowed, you may not always be able to take action through the Duffel API.
90
- * In some cases, you may need to contact the Duffel support team or the airline directly.
91
- */
92
- export declare type FlightsConditions = {
93
- /**
94
- * Whether the whole order or offer can be refunded before the departure of the first slice.
95
- * If all of the slices on the order or offer can be refunded then the `allowed` property will be `true` and information will be provided about any penalties.
96
- * If any of the slices on the order or offer can't be refunded then the `allowed` property will be `false`.
97
- * If the airline hasn't provided any information about whether this order or offer can be refunded then this property will be `null`.
98
- */
99
- refund_before_departure?: {
100
- /**
101
- * The currency of the `penalty_amount` as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
102
- * This will be in a currency determined by the airline, which is not necessarily the same as the currency of the order or offer.
103
- * If this is `null` then `penalty_amount` will also be `null`.
104
- * @example "GBP"
105
- */
106
- penalty_currency: string;
107
- /**
108
- * If the modification is `allowed` then this is the amount payable to apply the modification to all passengers.
109
- * If there is no penalty, the value will be zero. If the modification isn't `allowed` or the penalty is not known then this field will be `null`.
110
- * If this is `null` then the `penalty_currency` will also be null.
111
- * @example "100.00"
112
- */
113
- penalty_amount?: string;
114
- /**
115
- * Whether this kind of modification is allowed post-booking
116
- *
117
- * @example "true"
118
- */
119
- allowed: boolean;
120
- } | null;
121
- /**
122
- * Whether the whole order or offer can be changed before the departure of the first slice.
123
- * If all of the slices on the order or offer can be changed then the `allowed` property will be `true`.
124
- * Refer to the `slices` for information about change penalties.
125
- * If any of the slices on the order or offer can't be changed then the `allowed` property will be `false`.
126
- * In this case you should refer to the slices conditions to determine if any part of the order or offer is changeable.
127
- * If the airline hasn't provided any information about whether this order or offer can be changed then this property will be `null`.
128
- */
129
- change_before_departure?: {
130
- /**
131
- * The currency of the `penalty_amount` as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
132
- * This will be in a currency determined by the airline, which is not necessarily the same as the currency of the order or offer.
133
- * If this is `null` then `penalty_amount` will also be `null`.
134
- * @example "GBP"
135
- */
136
- penalty_currency: string;
137
- /**
138
- * If the modification is `allowed` then this is the amount payable to apply the modification to all passengers.
139
- * If there is no penalty, the value will be zero. If the modification isn't `allowed` or the penalty is not known then this field will be `null`.
140
- * If this is `null` then the `penalty_currency` will also be null.
141
- * @example "100.00"
142
- */
143
- penalty_amount?: string;
144
- /**
145
- * Whether this kind of modification is allowed post-booking
146
- *
147
- * @example "true"
148
- */
149
- allowed: boolean;
150
- } | null;
151
- };
152
- /**
153
- * The type of payment you want to apply to the order.
154
- * If you are an IATA agent with your own agreements with airlines, in some cases, you can pay using ARC/BSP cash by specifying `arc_bsp_cash`. Otherwise, you must pay using your Duffel account's balance by specifying `balance`.
155
- * In test mode, your balance is unlimited. If you're not sure which of these options applies to you, get in touch with the Duffel support team at [help@duffel.com](mailto:help@duffel.com).
156
- */
157
- export declare type PaymentType = 'arc_bsp_cash' | 'balance';