@duffel/api 2.5.3 → 2.5.5
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.
- package/dist/DuffelPayments/PaymentIntents/PaymentIntents.d.ts +28 -28
- package/dist/DuffelPayments/PaymentIntents/PaymentIntents.spec.d.ts +1 -1
- package/dist/DuffelPayments/PaymentIntents/PaymentIntentsType.d.ts +112 -112
- package/dist/DuffelPayments/PaymentIntents/index.d.ts +1 -1
- package/dist/DuffelPayments/Refunds/Refunds.d.ts +21 -21
- package/dist/DuffelPayments/Refunds/Refunds.spec.d.ts +1 -1
- package/dist/DuffelPayments/Refunds/RefundsType.d.ts +70 -70
- package/dist/DuffelPayments/Refunds/index.d.ts +1 -1
- package/dist/DuffelPayments/index.d.ts +1 -1
- package/dist/Links/Sessions/Sessions.d.ts +63 -63
- package/dist/Links/Sessions/Sessions.spec.d.ts +1 -1
- package/dist/Links/Sessions/index.d.ts +1 -1
- package/dist/Links/index.d.ts +1 -1
- package/dist/Places/Suggestions/Suggestions.d.ts +42 -42
- package/dist/Places/Suggestions/Suggestions.spec.d.ts +1 -1
- package/dist/Places/Suggestions/SuggestionsType.d.ts +59 -59
- package/dist/Places/Suggestions/index.d.ts +1 -1
- package/dist/Places/index.d.ts +1 -1
- package/dist/Stays/Bookings/Bookings.d.ts +41 -41
- package/dist/Stays/Bookings/Bookings.spec.d.ts +1 -1
- package/dist/Stays/Bookings/index.d.ts +1 -1
- package/dist/Stays/Quotes/Quotes.d.ts +16 -16
- package/dist/Stays/Quotes/Quotes.spec.d.ts +1 -1
- package/dist/Stays/Quotes/index.d.ts +1 -1
- package/dist/Stays/SearchResults/SearchResults.d.ts +16 -16
- package/dist/Stays/SearchResults/SearchResults.spec.d.ts +1 -1
- package/dist/Stays/SearchResults/index.d.ts +1 -1
- package/dist/Stays/Stays.d.ts +22 -22
- package/dist/Stays/Stays.spec.d.ts +1 -1
- package/dist/Stays/StaysTypes.d.ts +454 -454
- package/dist/booking/AirlineInitiatedChanges/AirlineInitiatedChanges.d.ts +63 -63
- package/dist/booking/AirlineInitiatedChanges/AirlineInitiatedChanges.spec.d.ts +1 -1
- package/dist/booking/AirlineInitiatedChanges/AirlineInitiatedChangesTypes.d.ts +57 -57
- package/dist/booking/AirlineInitiatedChanges/index.d.ts +1 -1
- package/dist/booking/OfferRequests/OfferRequests.d.ts +46 -46
- package/dist/booking/OfferRequests/OfferRequests.spec.d.ts +1 -1
- package/dist/booking/OfferRequests/OfferRequestsTypes.d.ts +240 -240
- package/dist/booking/OfferRequests/index.d.ts +1 -1
- package/dist/booking/Offers/OfferTypes.d.ts +495 -495
- package/dist/booking/Offers/Offers.d.ts +53 -53
- package/dist/booking/Offers/Offers.spec.d.ts +1 -1
- package/dist/booking/Offers/index.d.ts +1 -1
- package/dist/booking/OrderCancellations/OrderCancellations.d.ts +41 -41
- package/dist/booking/OrderCancellations/OrderCancellations.spec.d.ts +1 -1
- package/dist/booking/OrderCancellations/OrderCancellationsTypes.d.ts +53 -53
- package/dist/booking/OrderCancellations/index.d.ts +1 -1
- package/dist/booking/OrderChangeOffers/OrderChangeOfferTypes.d.ts +113 -113
- package/dist/booking/OrderChangeOffers/OrderChangeOffers.d.ts +31 -31
- package/dist/booking/OrderChangeOffers/OrderChangeOffers.spec.d.ts +1 -1
- package/dist/booking/OrderChangeOffers/index.d.ts +1 -1
- package/dist/booking/OrderChangeRequests/OrderChangeRequests.d.ts +29 -29
- package/dist/booking/OrderChangeRequests/OrderChangeRequestsTypes.d.ts +141 -141
- package/dist/booking/OrderChangeRequests/OrderRequestChanges.spec.d.ts +1 -1
- package/dist/booking/OrderChangeRequests/index.d.ts +1 -1
- package/dist/booking/OrderChanges/OrderChanges.d.ts +31 -31
- package/dist/booking/OrderChanges/OrderChanges.spec.d.ts +1 -1
- package/dist/booking/OrderChanges/OrderChangesTypes.d.ts +102 -102
- package/dist/booking/OrderChanges/index.d.ts +1 -1
- package/dist/booking/Orders/Orders.d.ts +52 -52
- package/dist/booking/Orders/Orders.spec.d.ts +1 -1
- package/dist/booking/Orders/OrdersTypes.d.ts +500 -500
- package/dist/booking/Orders/index.d.ts +1 -1
- package/dist/booking/PartialOfferRequests/PartialOfferRequestTypes.d.ts +6 -6
- package/dist/booking/PartialOfferRequests/PartialOfferRequests.d.ts +40 -40
- package/dist/booking/PartialOfferRequests/PartialOfferRequests.spec.d.ts +1 -1
- package/dist/booking/PartialOfferRequests/index.d.ts +1 -1
- package/dist/booking/Payments/Payments.d.ts +16 -16
- package/dist/booking/Payments/Payments.spec.d.ts +1 -1
- package/dist/booking/Payments/PaymentsTypes.d.ts +43 -43
- package/dist/booking/Payments/index.d.ts +1 -1
- package/dist/booking/SeatMaps/SeatMapTypes.d.ts +190 -190
- package/dist/booking/SeatMaps/SeatMaps.d.ts +17 -17
- package/dist/booking/SeatMaps/SeatMaps.spec.d.ts +1 -1
- package/dist/booking/SeatMaps/index.d.ts +1 -1
- package/dist/booking/index.d.ts +11 -11
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/dist/notifications/Webhooks/Webhooks.d.ts +51 -51
- package/dist/notifications/Webhooks/Webhooks.spec.d.ts +1 -1
- package/dist/notifications/Webhooks/WebhooksType.d.ts +113 -113
- package/dist/notifications/Webhooks/index.d.ts +1 -1
- package/dist/notifications/index.d.ts +1 -1
- package/dist/supportingResources/Aircraft/Aircraft.d.ts +30 -30
- package/dist/supportingResources/Aircraft/Aircraft.spec.d.ts +1 -1
- package/dist/supportingResources/Aircraft/AircraftTypes.d.ts +18 -18
- package/dist/supportingResources/Aircraft/index.d.ts +1 -1
- package/dist/supportingResources/Airlines/Airlines.d.ts +29 -29
- package/dist/supportingResources/Airlines/Airlines.spec.d.ts +1 -1
- package/dist/supportingResources/Airlines/AirlinesTypes.d.ts +17 -17
- package/dist/supportingResources/Airlines/index.d.ts +2 -2
- package/dist/supportingResources/Airports/Airports.d.ts +30 -30
- package/dist/supportingResources/Airports/Airports.spec.d.ts +1 -1
- package/dist/supportingResources/Airports/AirportsTypes.d.ts +55 -55
- package/dist/supportingResources/Airports/index.d.ts +2 -2
- package/dist/supportingResources/index.d.ts +3 -3
- package/dist/typings.d.ts +2 -3
- package/package.json +15 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './Orders';
|
|
1
|
+
export * from './Orders';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export interface SelectedPartialOffersParams {
|
|
2
|
-
/**
|
|
3
|
-
* Whether to filter orders that are awaiting payment or not. If not specified, all orders regardless of their payment state will be returned.
|
|
4
|
-
*/
|
|
5
|
-
'selected_partial_offer[]'?: string[];
|
|
6
|
-
}
|
|
1
|
+
export interface SelectedPartialOffersParams {
|
|
2
|
+
/**
|
|
3
|
+
* Whether to filter orders that are awaiting payment or not. If not specified, all orders regardless of their payment state will be returned.
|
|
4
|
+
*/
|
|
5
|
+
'selected_partial_offer[]'?: string[];
|
|
6
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { Client } from '../../Client';
|
|
2
|
-
import { Resource } from '../../Resource';
|
|
3
|
-
import { CreateOfferRequest, DuffelResponse, OfferRequest } from '../../types';
|
|
4
|
-
import { SelectedPartialOffersParams } from './PartialOfferRequestTypes';
|
|
5
|
-
/**
|
|
6
|
-
* To search for and select flights separately for each slice of the journey, you'll need to create a partial offer request.
|
|
7
|
-
*
|
|
8
|
-
* A partial offer request describes the passengers and where and when they want to travel (in the form of a list of slices).
|
|
9
|
-
* @class
|
|
10
|
-
* @link https://duffel.com/docs/api/partial-offer-requests
|
|
11
|
-
*/
|
|
12
|
-
export declare class PartialOfferRequests extends Resource {
|
|
13
|
-
/**
|
|
14
|
-
* Endpoint path
|
|
15
|
-
*/
|
|
16
|
-
path: string;
|
|
17
|
-
constructor(client: Client);
|
|
18
|
-
/**
|
|
19
|
-
* Retrieves a partial offers request by its ID, only including partial offers for the current slice of multi-step search flow.
|
|
20
|
-
* @param {string} id - Duffel's unique identifier for the partial offer request
|
|
21
|
-
* @param {Object} [options] - Selected partial offers
|
|
22
|
-
* @link https:/duffel.com/docs/api/partial-offer-requests/get-partial-offer-request-by-id
|
|
23
|
-
*/
|
|
24
|
-
get: (id: string, options?: SelectedPartialOffersParams) => Promise<DuffelResponse<OfferRequest>>;
|
|
25
|
-
/**
|
|
26
|
-
* To search for and select flights separately for each slice of the journey, you'll need to create a partial offer request.
|
|
27
|
-
* A partial offer request describes the passengers and where and when they want to travel (in the form of a list of slices).
|
|
28
|
-
* It may also include additional filters (e.g. a particular cabin to travel in).
|
|
29
|
-
* @param {Object} [options] - the parameters for making a partial offer requests (required: slices, passengers; optional: cabin_class)
|
|
30
|
-
* @link https://duffel.com/docs/api/partial-offer-requests/create-partial-offer-request
|
|
31
|
-
*/
|
|
32
|
-
create: <QueryParams>(options: CreateOfferRequest & QueryParams) => Promise<DuffelResponse<OfferRequest>>;
|
|
33
|
-
/**
|
|
34
|
-
* Retrieves an offer request with offers for fares matching selected partial offers..
|
|
35
|
-
* @param {string} id - Duffel's unique identifier for the partial offer request
|
|
36
|
-
* @param {Object} [options] - Selected partial offers
|
|
37
|
-
* @link https:/duffel.com/docs/api/partial-offer-requests/get-partial-offer-request-fares-by-id
|
|
38
|
-
*/
|
|
39
|
-
getFaresById: (id: string, options?: SelectedPartialOffersParams) => Promise<DuffelResponse<OfferRequest>>;
|
|
40
|
-
}
|
|
1
|
+
import { Client } from '../../Client';
|
|
2
|
+
import { Resource } from '../../Resource';
|
|
3
|
+
import { CreateOfferRequest, DuffelResponse, OfferRequest } from '../../types';
|
|
4
|
+
import { SelectedPartialOffersParams } from './PartialOfferRequestTypes';
|
|
5
|
+
/**
|
|
6
|
+
* To search for and select flights separately for each slice of the journey, you'll need to create a partial offer request.
|
|
7
|
+
*
|
|
8
|
+
* A partial offer request describes the passengers and where and when they want to travel (in the form of a list of slices).
|
|
9
|
+
* @class
|
|
10
|
+
* @link https://duffel.com/docs/api/partial-offer-requests
|
|
11
|
+
*/
|
|
12
|
+
export declare class PartialOfferRequests extends Resource {
|
|
13
|
+
/**
|
|
14
|
+
* Endpoint path
|
|
15
|
+
*/
|
|
16
|
+
path: string;
|
|
17
|
+
constructor(client: Client);
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves a partial offers request by its ID, only including partial offers for the current slice of multi-step search flow.
|
|
20
|
+
* @param {string} id - Duffel's unique identifier for the partial offer request
|
|
21
|
+
* @param {Object} [options] - Selected partial offers
|
|
22
|
+
* @link https:/duffel.com/docs/api/partial-offer-requests/get-partial-offer-request-by-id
|
|
23
|
+
*/
|
|
24
|
+
get: (id: string, options?: SelectedPartialOffersParams) => Promise<DuffelResponse<OfferRequest>>;
|
|
25
|
+
/**
|
|
26
|
+
* To search for and select flights separately for each slice of the journey, you'll need to create a partial offer request.
|
|
27
|
+
* A partial offer request describes the passengers and where and when they want to travel (in the form of a list of slices).
|
|
28
|
+
* It may also include additional filters (e.g. a particular cabin to travel in).
|
|
29
|
+
* @param {Object} [options] - the parameters for making a partial offer requests (required: slices, passengers; optional: cabin_class)
|
|
30
|
+
* @link https://duffel.com/docs/api/partial-offer-requests/create-partial-offer-request
|
|
31
|
+
*/
|
|
32
|
+
create: <QueryParams>(options: CreateOfferRequest & QueryParams) => Promise<DuffelResponse<OfferRequest>>;
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves an offer request with offers for fares matching selected partial offers..
|
|
35
|
+
* @param {string} id - Duffel's unique identifier for the partial offer request
|
|
36
|
+
* @param {Object} [options] - Selected partial offers
|
|
37
|
+
* @link https:/duffel.com/docs/api/partial-offer-requests/get-partial-offer-request-fares-by-id
|
|
38
|
+
*/
|
|
39
|
+
getFaresById: (id: string, options?: SelectedPartialOffersParams) => Promise<DuffelResponse<OfferRequest>>;
|
|
40
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './PartialOfferRequests';
|
|
1
|
+
export * from './PartialOfferRequests';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Resource } from '../../Resource';
|
|
2
|
-
import { CreatePayment, DuffelResponse, Payment } from '../../types';
|
|
3
|
-
export declare class Payments extends Resource {
|
|
4
|
-
/**
|
|
5
|
-
* Endpoint path
|
|
6
|
-
*/
|
|
7
|
-
path: string;
|
|
8
|
-
constructor(args: any);
|
|
9
|
-
/**
|
|
10
|
-
* Creates a payment for an existing pay later order.
|
|
11
|
-
* An order can be paid for up to the time limit indicated in `payment_required_by`, after which the space held for the order will be released and you will have to create a new order.
|
|
12
|
-
* @param {string} order_id
|
|
13
|
-
* @param {string} payment
|
|
14
|
-
*/
|
|
15
|
-
create: (options: CreatePayment) => Promise<DuffelResponse<Payment>>;
|
|
16
|
-
}
|
|
1
|
+
import { Resource } from '../../Resource';
|
|
2
|
+
import { CreatePayment, DuffelResponse, Payment } from '../../types';
|
|
3
|
+
export declare class Payments extends Resource {
|
|
4
|
+
/**
|
|
5
|
+
* Endpoint path
|
|
6
|
+
*/
|
|
7
|
+
path: string;
|
|
8
|
+
constructor(args: any);
|
|
9
|
+
/**
|
|
10
|
+
* Creates a payment for an existing pay later order.
|
|
11
|
+
* An order can be paid for up to the time limit indicated in `payment_required_by`, after which the space held for the order will be released and you will have to create a new order.
|
|
12
|
+
* @param {string} order_id
|
|
13
|
+
* @param {string} payment
|
|
14
|
+
*/
|
|
15
|
+
create: (options: CreatePayment) => Promise<DuffelResponse<Payment>>;
|
|
16
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { PaymentType } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* To pay for an unpaid order you've previously created, you'll need to create a payment for it.
|
|
4
|
-
* @link https:/duffel.com/docs/api/payments/schema
|
|
5
|
-
*/
|
|
6
|
-
export interface Payment {
|
|
7
|
-
/**
|
|
8
|
-
* The amount of the payment.
|
|
9
|
-
* This should be the same as the `total_amount` of the offer specified in `selected_offers` for an instant order or the `total_amount` of the previously created pay later order specified in `order_id`, plus the `total_amount` of all the services specified in services.
|
|
10
|
-
*/
|
|
11
|
-
amount: string;
|
|
12
|
-
/**
|
|
13
|
-
* The currency of the amount, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
|
|
14
|
-
* For an instant order, this should be the same as the `total_currency` of the offer specified in selected_offers.
|
|
15
|
-
* For a pay later order, this should be the same as the `total_currency` of the previously created order specified in `order_id`.
|
|
16
|
-
*/
|
|
17
|
-
currency?: string | null;
|
|
18
|
-
/**
|
|
19
|
-
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the payment was created
|
|
20
|
-
*/
|
|
21
|
-
created_at: string;
|
|
22
|
-
/**
|
|
23
|
-
* Duffel's unique identifier for the payment
|
|
24
|
-
*/
|
|
25
|
-
id: string;
|
|
26
|
-
/**
|
|
27
|
-
* The type of payment you want to apply to the order.
|
|
28
|
-
* 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`.
|
|
29
|
-
* Otherwise, you must pay using your Duffel account's balance by specifying `balance`. In [test mode](https://duffel.com/docs/api/overview/test-mode), your balance is unlimited.
|
|
30
|
-
* 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).
|
|
31
|
-
*/
|
|
32
|
-
type: PaymentType;
|
|
33
|
-
}
|
|
34
|
-
export interface CreatePayment {
|
|
35
|
-
/**
|
|
36
|
-
* The `id` of the order you want to pay for.
|
|
37
|
-
*/
|
|
38
|
-
order_id: string;
|
|
39
|
-
/**
|
|
40
|
-
* The payment details to use to pay for the order
|
|
41
|
-
*/
|
|
42
|
-
payment: Omit<Payment, 'created_at' | 'id'>;
|
|
43
|
-
}
|
|
1
|
+
import { PaymentType } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* To pay for an unpaid order you've previously created, you'll need to create a payment for it.
|
|
4
|
+
* @link https:/duffel.com/docs/api/payments/schema
|
|
5
|
+
*/
|
|
6
|
+
export interface Payment {
|
|
7
|
+
/**
|
|
8
|
+
* The amount of the payment.
|
|
9
|
+
* This should be the same as the `total_amount` of the offer specified in `selected_offers` for an instant order or the `total_amount` of the previously created pay later order specified in `order_id`, plus the `total_amount` of all the services specified in services.
|
|
10
|
+
*/
|
|
11
|
+
amount: string;
|
|
12
|
+
/**
|
|
13
|
+
* The currency of the amount, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
|
|
14
|
+
* For an instant order, this should be the same as the `total_currency` of the offer specified in selected_offers.
|
|
15
|
+
* For a pay later order, this should be the same as the `total_currency` of the previously created order specified in `order_id`.
|
|
16
|
+
*/
|
|
17
|
+
currency?: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the payment was created
|
|
20
|
+
*/
|
|
21
|
+
created_at: string;
|
|
22
|
+
/**
|
|
23
|
+
* Duffel's unique identifier for the payment
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* The type of payment you want to apply to the order.
|
|
28
|
+
* 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`.
|
|
29
|
+
* Otherwise, you must pay using your Duffel account's balance by specifying `balance`. In [test mode](https://duffel.com/docs/api/overview/test-mode), your balance is unlimited.
|
|
30
|
+
* 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).
|
|
31
|
+
*/
|
|
32
|
+
type: PaymentType;
|
|
33
|
+
}
|
|
34
|
+
export interface CreatePayment {
|
|
35
|
+
/**
|
|
36
|
+
* The `id` of the order you want to pay for.
|
|
37
|
+
*/
|
|
38
|
+
order_id: string;
|
|
39
|
+
/**
|
|
40
|
+
* The payment details to use to pay for the order
|
|
41
|
+
*/
|
|
42
|
+
payment: Omit<Payment, 'created_at' | 'id'>;
|
|
43
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './Payments';
|
|
1
|
+
export * from './Payments';
|
|
@@ -1,190 +1,190 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Seat maps are used to build a rich experience for your customers so they can select a seat as part of an order.
|
|
3
|
-
* A seat map includes the data for rendering seats in the relevant cabins, along with their total cost and other information such as disclosures.
|
|
4
|
-
* @link https://duffel.com/docs/api/seat-maps/schema
|
|
5
|
-
*/
|
|
6
|
-
export interface SeatMap {
|
|
7
|
-
/**
|
|
8
|
-
* Duffel's unique identifier for the seat map
|
|
9
|
-
*/
|
|
10
|
-
id: string;
|
|
11
|
-
/**
|
|
12
|
-
* Duffel's unique identifier for the slice. It identifies the slice of an offer (i.e. the same slice across offers will have different ids.)
|
|
13
|
-
*/
|
|
14
|
-
slice_id: string;
|
|
15
|
-
/**
|
|
16
|
-
* Duffel's unique identifier for the segment. It identifies the segment of an offer (i.e. the same segment across offers will have different ids).
|
|
17
|
-
*/
|
|
18
|
-
segment_id: string;
|
|
19
|
-
/**
|
|
20
|
-
* The list of cabins in this seat map.
|
|
21
|
-
* Cabins are ordered by deck from lowest to highest, and then within each deck from the front to back of the aircraft.
|
|
22
|
-
*/
|
|
23
|
-
cabins: SeatMapCabin[];
|
|
24
|
-
}
|
|
25
|
-
export interface SeatMapCabin {
|
|
26
|
-
/**
|
|
27
|
-
* Level 0 is the main deck and level 1 is the upper deck above that, which is found on some large aircraft.
|
|
28
|
-
*/
|
|
29
|
-
deck: number;
|
|
30
|
-
/**
|
|
31
|
-
* The cabin class that the passenger will travel in on this segment
|
|
32
|
-
*/
|
|
33
|
-
cabin_class: string;
|
|
34
|
-
/**
|
|
35
|
-
* Where the wings of the aircraft are in relation to rows in the cabin.
|
|
36
|
-
* The numbers correspond to the indices of the first and the last row which are overwing. You can use this to draw a visual representation of the wings to help users get a better idea of what they will see outside their window.
|
|
37
|
-
* The indices are 0 th-based and are for all rows, not just those that have seats.
|
|
38
|
-
* This is null when no rows of the cabin are overwing.
|
|
39
|
-
*/
|
|
40
|
-
wings: {
|
|
41
|
-
/**
|
|
42
|
-
* The index of the first row which is overwing, starting from the front of the aircraft.
|
|
43
|
-
*/
|
|
44
|
-
first_row_index: number;
|
|
45
|
-
/**
|
|
46
|
-
* The index of the last row which is overwing, starting from the front of the aircraft.
|
|
47
|
-
*/
|
|
48
|
-
last_row_index: number;
|
|
49
|
-
} | null;
|
|
50
|
-
/**
|
|
51
|
-
* The number of aisles in this cabin.
|
|
52
|
-
* If this is set to 1, each row of the cabin is split into two sections. If this is set to 2, each row of the cabin is split into three section.
|
|
53
|
-
*/
|
|
54
|
-
aisles: number;
|
|
55
|
-
/**
|
|
56
|
-
* A list of rows in this cabin.
|
|
57
|
-
* Row sections are broken up by aisles. Rows are ordered from front to back of the aircraft.
|
|
58
|
-
*/
|
|
59
|
-
rows: SeatMapCabinRow[];
|
|
60
|
-
}
|
|
61
|
-
export interface SeatMapCabinRow {
|
|
62
|
-
/**
|
|
63
|
-
* A list of sections.
|
|
64
|
-
* Each row is divided into sections by one or more aisles.
|
|
65
|
-
*/
|
|
66
|
-
sections: SeatMapCabinRowSection[];
|
|
67
|
-
}
|
|
68
|
-
export interface SeatMapCabinRowSection {
|
|
69
|
-
/**
|
|
70
|
-
* The elements that make up this section.
|
|
71
|
-
*/
|
|
72
|
-
elements: SeatMapCabinRowSectionElement[];
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* A seat for a passenger. If the available_services list is empty (which will be represented as an empty list : []), the seat is unavailable.
|
|
76
|
-
* For display, all seats should be displayed with the same static width.
|
|
77
|
-
*/
|
|
78
|
-
export interface SeatMapCabinRowSectionElementSeat {
|
|
79
|
-
/**
|
|
80
|
-
* The type of this element.
|
|
81
|
-
*/
|
|
82
|
-
type: 'seat';
|
|
83
|
-
/**
|
|
84
|
-
* The designator used to uniquely identify the seat, usually made up of a row number and a column letter
|
|
85
|
-
*/
|
|
86
|
-
designator: string;
|
|
87
|
-
/**
|
|
88
|
-
* A name which describes the type of seat, which you can display in your user interface to help customers to understand its features
|
|
89
|
-
*/
|
|
90
|
-
name?: string;
|
|
91
|
-
/**
|
|
92
|
-
* Each disclosure is text, in English, provided by the airline that describes the terms and conditions of this seat. We recommend showing this in your user interface to make sure that customers understand any restrictions and limitations.
|
|
93
|
-
*/
|
|
94
|
-
disclosures: string[];
|
|
95
|
-
/**
|
|
96
|
-
* Seats are considered a special kind of service. There will be at most one service per seat per passenger. A seat can only be booked for one passenger. If a seat has no available services (which will be represented as an empty list : []) then it's unavailable.
|
|
97
|
-
*/
|
|
98
|
-
available_services: SeatMapCabinRowSectionAvailableService[];
|
|
99
|
-
}
|
|
100
|
-
export interface SeatMapCabinRowSectionAvailableService {
|
|
101
|
-
/**
|
|
102
|
-
* Duffel's unique identifier for the service
|
|
103
|
-
*/
|
|
104
|
-
id: string;
|
|
105
|
-
/**
|
|
106
|
-
* The passenger that this seat is for
|
|
107
|
-
*/
|
|
108
|
-
passenger_id: string;
|
|
109
|
-
/**
|
|
110
|
-
* The total price of the seat, including taxes
|
|
111
|
-
*/
|
|
112
|
-
total_amount: string;
|
|
113
|
-
/**
|
|
114
|
-
* The currency of the total_amount, as an ISO 4217 currency code
|
|
115
|
-
*/
|
|
116
|
-
total_currency: string;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* A bassinet is a child's cradle. This element will be aligned with the corresponding seat in the following row.
|
|
120
|
-
* For display, this element should have the same width as a seat for proper alignment.
|
|
121
|
-
*/
|
|
122
|
-
export interface SeatMapCabinRowSectionElementBassinet {
|
|
123
|
-
/**
|
|
124
|
-
* The type of this element.
|
|
125
|
-
*/
|
|
126
|
-
type: 'bassinet';
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* An empty space used for padding in some non-standard seat arrangements.
|
|
130
|
-
* For display, this element should have the same dimensions as a seat for proper alignment.
|
|
131
|
-
*/
|
|
132
|
-
export interface SeatMapCabinRowSectionElementEmpty {
|
|
133
|
-
/**
|
|
134
|
-
* The type of this element.
|
|
135
|
-
*/
|
|
136
|
-
type: 'empty';
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* An exit row represents the extra wide legroom used to reach aircraft exits. There is one exit_row element per row section.
|
|
140
|
-
* Exit row elements only occur in their own row, so they can be displayed as one element across the whole row. Displaying an exit row element filling all available space in its section or using the same width as the seat is also reasonable.
|
|
141
|
-
*/
|
|
142
|
-
export interface SeatMapCabinRowSectionElementExitRow {
|
|
143
|
-
/**
|
|
144
|
-
* The type of this element.
|
|
145
|
-
*/
|
|
146
|
-
type: 'exit_row';
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* A lavatory for use by passengers.
|
|
150
|
-
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
151
|
-
*/
|
|
152
|
-
export interface SeatMapCabinRowSectionElementLavatory {
|
|
153
|
-
/**
|
|
154
|
-
* The type of this element.
|
|
155
|
-
*/
|
|
156
|
-
type: 'lavatory';
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* A galley is the compartment where food is cooked or prepared. These are conventionally marked with a teacup symbol.
|
|
160
|
-
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
161
|
-
*/
|
|
162
|
-
export interface SeatMapCabinRowSectionElementGalley {
|
|
163
|
-
/**
|
|
164
|
-
* The type of this element.
|
|
165
|
-
*/
|
|
166
|
-
type: 'galley';
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* A closet used for storage. These are conventionally marked with a clothes hanger symbol.
|
|
170
|
-
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
171
|
-
*/
|
|
172
|
-
export interface SeatMapCabinRowSectionElementCloset {
|
|
173
|
-
/**
|
|
174
|
-
* The type of this element.
|
|
175
|
-
*/
|
|
176
|
-
type: 'closet';
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* A set of stairs to another deck.
|
|
180
|
-
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
181
|
-
*/
|
|
182
|
-
export interface SeatMapCabinRowSectionElementStairs {
|
|
183
|
-
/**
|
|
184
|
-
* The type of this element.
|
|
185
|
-
*/
|
|
186
|
-
type: 'stairs';
|
|
187
|
-
}
|
|
188
|
-
export type SeatMapCabinRowSectionElement = SeatMapCabinRowSectionElementSeat | SeatMapCabinRowSectionElementBassinet | SeatMapCabinRowSectionElementEmpty | SeatMapCabinRowSectionElementExitRow | SeatMapCabinRowSectionElementLavatory | SeatMapCabinRowSectionElementGalley | SeatMapCabinRowSectionElementCloset | SeatMapCabinRowSectionElementStairs;
|
|
189
|
-
export type SeatMapCabinRowSectionElementType = SeatMapCabinRowSectionElement['type'];
|
|
190
|
-
export type SeatMapCabinRowSectionElementAmenity = Exclude<SeatMapCabinRowSectionElementType, 'empty' | 'seat'>;
|
|
1
|
+
/**
|
|
2
|
+
* Seat maps are used to build a rich experience for your customers so they can select a seat as part of an order.
|
|
3
|
+
* A seat map includes the data for rendering seats in the relevant cabins, along with their total cost and other information such as disclosures.
|
|
4
|
+
* @link https://duffel.com/docs/api/seat-maps/schema
|
|
5
|
+
*/
|
|
6
|
+
export interface SeatMap {
|
|
7
|
+
/**
|
|
8
|
+
* Duffel's unique identifier for the seat map
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* Duffel's unique identifier for the slice. It identifies the slice of an offer (i.e. the same slice across offers will have different ids.)
|
|
13
|
+
*/
|
|
14
|
+
slice_id: string;
|
|
15
|
+
/**
|
|
16
|
+
* Duffel's unique identifier for the segment. It identifies the segment of an offer (i.e. the same segment across offers will have different ids).
|
|
17
|
+
*/
|
|
18
|
+
segment_id: string;
|
|
19
|
+
/**
|
|
20
|
+
* The list of cabins in this seat map.
|
|
21
|
+
* Cabins are ordered by deck from lowest to highest, and then within each deck from the front to back of the aircraft.
|
|
22
|
+
*/
|
|
23
|
+
cabins: SeatMapCabin[];
|
|
24
|
+
}
|
|
25
|
+
export interface SeatMapCabin {
|
|
26
|
+
/**
|
|
27
|
+
* Level 0 is the main deck and level 1 is the upper deck above that, which is found on some large aircraft.
|
|
28
|
+
*/
|
|
29
|
+
deck: number;
|
|
30
|
+
/**
|
|
31
|
+
* The cabin class that the passenger will travel in on this segment
|
|
32
|
+
*/
|
|
33
|
+
cabin_class: string;
|
|
34
|
+
/**
|
|
35
|
+
* Where the wings of the aircraft are in relation to rows in the cabin.
|
|
36
|
+
* The numbers correspond to the indices of the first and the last row which are overwing. You can use this to draw a visual representation of the wings to help users get a better idea of what they will see outside their window.
|
|
37
|
+
* The indices are 0 th-based and are for all rows, not just those that have seats.
|
|
38
|
+
* This is null when no rows of the cabin are overwing.
|
|
39
|
+
*/
|
|
40
|
+
wings: {
|
|
41
|
+
/**
|
|
42
|
+
* The index of the first row which is overwing, starting from the front of the aircraft.
|
|
43
|
+
*/
|
|
44
|
+
first_row_index: number;
|
|
45
|
+
/**
|
|
46
|
+
* The index of the last row which is overwing, starting from the front of the aircraft.
|
|
47
|
+
*/
|
|
48
|
+
last_row_index: number;
|
|
49
|
+
} | null;
|
|
50
|
+
/**
|
|
51
|
+
* The number of aisles in this cabin.
|
|
52
|
+
* If this is set to 1, each row of the cabin is split into two sections. If this is set to 2, each row of the cabin is split into three section.
|
|
53
|
+
*/
|
|
54
|
+
aisles: number;
|
|
55
|
+
/**
|
|
56
|
+
* A list of rows in this cabin.
|
|
57
|
+
* Row sections are broken up by aisles. Rows are ordered from front to back of the aircraft.
|
|
58
|
+
*/
|
|
59
|
+
rows: SeatMapCabinRow[];
|
|
60
|
+
}
|
|
61
|
+
export interface SeatMapCabinRow {
|
|
62
|
+
/**
|
|
63
|
+
* A list of sections.
|
|
64
|
+
* Each row is divided into sections by one or more aisles.
|
|
65
|
+
*/
|
|
66
|
+
sections: SeatMapCabinRowSection[];
|
|
67
|
+
}
|
|
68
|
+
export interface SeatMapCabinRowSection {
|
|
69
|
+
/**
|
|
70
|
+
* The elements that make up this section.
|
|
71
|
+
*/
|
|
72
|
+
elements: SeatMapCabinRowSectionElement[];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* A seat for a passenger. If the available_services list is empty (which will be represented as an empty list : []), the seat is unavailable.
|
|
76
|
+
* For display, all seats should be displayed with the same static width.
|
|
77
|
+
*/
|
|
78
|
+
export interface SeatMapCabinRowSectionElementSeat {
|
|
79
|
+
/**
|
|
80
|
+
* The type of this element.
|
|
81
|
+
*/
|
|
82
|
+
type: 'seat';
|
|
83
|
+
/**
|
|
84
|
+
* The designator used to uniquely identify the seat, usually made up of a row number and a column letter
|
|
85
|
+
*/
|
|
86
|
+
designator: string;
|
|
87
|
+
/**
|
|
88
|
+
* A name which describes the type of seat, which you can display in your user interface to help customers to understand its features
|
|
89
|
+
*/
|
|
90
|
+
name?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Each disclosure is text, in English, provided by the airline that describes the terms and conditions of this seat. We recommend showing this in your user interface to make sure that customers understand any restrictions and limitations.
|
|
93
|
+
*/
|
|
94
|
+
disclosures: string[];
|
|
95
|
+
/**
|
|
96
|
+
* Seats are considered a special kind of service. There will be at most one service per seat per passenger. A seat can only be booked for one passenger. If a seat has no available services (which will be represented as an empty list : []) then it's unavailable.
|
|
97
|
+
*/
|
|
98
|
+
available_services: SeatMapCabinRowSectionAvailableService[];
|
|
99
|
+
}
|
|
100
|
+
export interface SeatMapCabinRowSectionAvailableService {
|
|
101
|
+
/**
|
|
102
|
+
* Duffel's unique identifier for the service
|
|
103
|
+
*/
|
|
104
|
+
id: string;
|
|
105
|
+
/**
|
|
106
|
+
* The passenger that this seat is for
|
|
107
|
+
*/
|
|
108
|
+
passenger_id: string;
|
|
109
|
+
/**
|
|
110
|
+
* The total price of the seat, including taxes
|
|
111
|
+
*/
|
|
112
|
+
total_amount: string;
|
|
113
|
+
/**
|
|
114
|
+
* The currency of the total_amount, as an ISO 4217 currency code
|
|
115
|
+
*/
|
|
116
|
+
total_currency: string;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A bassinet is a child's cradle. This element will be aligned with the corresponding seat in the following row.
|
|
120
|
+
* For display, this element should have the same width as a seat for proper alignment.
|
|
121
|
+
*/
|
|
122
|
+
export interface SeatMapCabinRowSectionElementBassinet {
|
|
123
|
+
/**
|
|
124
|
+
* The type of this element.
|
|
125
|
+
*/
|
|
126
|
+
type: 'bassinet';
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* An empty space used for padding in some non-standard seat arrangements.
|
|
130
|
+
* For display, this element should have the same dimensions as a seat for proper alignment.
|
|
131
|
+
*/
|
|
132
|
+
export interface SeatMapCabinRowSectionElementEmpty {
|
|
133
|
+
/**
|
|
134
|
+
* The type of this element.
|
|
135
|
+
*/
|
|
136
|
+
type: 'empty';
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* An exit row represents the extra wide legroom used to reach aircraft exits. There is one exit_row element per row section.
|
|
140
|
+
* Exit row elements only occur in their own row, so they can be displayed as one element across the whole row. Displaying an exit row element filling all available space in its section or using the same width as the seat is also reasonable.
|
|
141
|
+
*/
|
|
142
|
+
export interface SeatMapCabinRowSectionElementExitRow {
|
|
143
|
+
/**
|
|
144
|
+
* The type of this element.
|
|
145
|
+
*/
|
|
146
|
+
type: 'exit_row';
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* A lavatory for use by passengers.
|
|
150
|
+
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
151
|
+
*/
|
|
152
|
+
export interface SeatMapCabinRowSectionElementLavatory {
|
|
153
|
+
/**
|
|
154
|
+
* The type of this element.
|
|
155
|
+
*/
|
|
156
|
+
type: 'lavatory';
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* A galley is the compartment where food is cooked or prepared. These are conventionally marked with a teacup symbol.
|
|
160
|
+
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
161
|
+
*/
|
|
162
|
+
export interface SeatMapCabinRowSectionElementGalley {
|
|
163
|
+
/**
|
|
164
|
+
* The type of this element.
|
|
165
|
+
*/
|
|
166
|
+
type: 'galley';
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* A closet used for storage. These are conventionally marked with a clothes hanger symbol.
|
|
170
|
+
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
171
|
+
*/
|
|
172
|
+
export interface SeatMapCabinRowSectionElementCloset {
|
|
173
|
+
/**
|
|
174
|
+
* The type of this element.
|
|
175
|
+
*/
|
|
176
|
+
type: 'closet';
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* A set of stairs to another deck.
|
|
180
|
+
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
181
|
+
*/
|
|
182
|
+
export interface SeatMapCabinRowSectionElementStairs {
|
|
183
|
+
/**
|
|
184
|
+
* The type of this element.
|
|
185
|
+
*/
|
|
186
|
+
type: 'stairs';
|
|
187
|
+
}
|
|
188
|
+
export type SeatMapCabinRowSectionElement = SeatMapCabinRowSectionElementSeat | SeatMapCabinRowSectionElementBassinet | SeatMapCabinRowSectionElementEmpty | SeatMapCabinRowSectionElementExitRow | SeatMapCabinRowSectionElementLavatory | SeatMapCabinRowSectionElementGalley | SeatMapCabinRowSectionElementCloset | SeatMapCabinRowSectionElementStairs;
|
|
189
|
+
export type SeatMapCabinRowSectionElementType = SeatMapCabinRowSectionElement['type'];
|
|
190
|
+
export type SeatMapCabinRowSectionElementAmenity = Exclude<SeatMapCabinRowSectionElementType, 'empty' | 'seat'>;
|