Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing types #968

Merged
merged 13 commits into from
Oct 10, 2024
Merged

Add missing types #968

merged 13 commits into from
Oct 10, 2024

Conversation

andrejak
Copy link
Contributor

@andrejak andrejak commented Oct 7, 2024

what

We started using the types from our client library in our dashboard and in doing so identified a few things we can improve and other bits that need fixing. This addresses the gaps we found.

Please see the comments for links to documentation to compare with.

@andrejak andrejak requested a review from a team as a code owner October 7, 2024 13:57
@andrejak andrejak force-pushed the missing-types branch 2 times, most recently from 791398c to c83324d Compare October 7, 2024 15:41
@andrejak andrejak changed the title [WIP] Add missing types Add missing types Oct 7, 2024
Copy link
Contributor Author

@andrejak andrejak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added links to some docs for the changes.

@@ -11,6 +11,13 @@ export type AirlineInitiatedChangeAvailableAction =
| 'change'
| 'update'

export interface TravelAgentTicket {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -66,7 +73,7 @@ export interface AirlineInitiatedChange {
* Change. This value will be present for Airline-Initiated changes that take
* some time to be processed.
*/
travel_agent_ticket: any | null
travel_agent_ticket: TravelAgentTicket | EmptyObject | null
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "EmptyObject" is copied from dashboard...

cabin: OfferSliceSegmentPassengerCabin | null
}

export interface OfferSliceSegmentPassengerCabin {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -14,6 +14,43 @@ export interface ListOrderCancellationsParams extends PaginationMeta {
order_id?: string
}

export interface OrderCancellationAirlineCredit {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -4,7 +4,7 @@ export interface OrderChange {
/**
* The price of this offer as a change to your existing order, excluding taxes
*/
change_total_amount: string | null
change_total_amount: string
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* Note that this data may differ from the airline's records if it was updated directly with the airline since the order was created.
* @xample "[email protected]"
*/
email: string
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/**
* The ISO 8601 datetime at which the Order was paid for, if at all
*/
paid_at: string | null
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stops: Array<Stop>
}

export interface Stop {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* The list of passenger ids the document applies to
* @example ["pas_00009hj8USM7Ncg31cBCLL"]
*/
passenger_ids: string[]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*
* @example "2020-04-11T15:48:11Z"
*/
synced_at: string
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrejak andrejak requested a review from igorp1 October 9, 2024 12:39
igorp1
igorp1 previously approved these changes Oct 9, 2024
Copy link
Contributor

@igorp1 igorp1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for all the guiding comments to the docs, very helpful to quickly validate the change (and possibly for archeology in the future!)

src/types/shared.ts Outdated Show resolved Hide resolved
src/types/shared.ts Outdated Show resolved Hide resolved
src/types/shared.ts Outdated Show resolved Hide resolved
@@ -450,7 +451,7 @@ export interface OfferSlice {
* - `"4"`: premium seating, additional legroom and recline. Situated in business class or higher.
* - `"5"`: deluxe seating, additional legroom and reclines to lie flat position. Situated in business class or higher.
*/
ngs_shelf: number
ngs_shelf: number | null
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -151,17 +165,17 @@ export type OfferSliceConditions = FlightsConditions & {
/**
* Whether passengers are able to select a seat prior to check in.
*/
advance_seat_selection: boolean
advance_seat_selection: boolean | null
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrejak andrejak force-pushed the missing-types branch 2 times, most recently from aa74ee5 to eb939c2 Compare October 9, 2024 14:17
andrejak and others added 3 commits October 9, 2024 15:26

/**
* Whether passengers are given access to a fast track lane during check in.
*/
priority_check_in: boolean
priority_check_in: boolean | null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


/**
* Whether passengers are given preferential boarding over others passengers in their cabin.
*/
priority_boarding: boolean
priority_boarding: boolean | null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -597,7 +599,10 @@ export const mockOnHoldOrders: Order[] = [
iata_code: 'MIA',
},
},
conditions: { change_before_departure: null },
conditions: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrejak andrejak merged commit d0a80d8 into main Oct 10, 2024
4 checks passed
@andrejak andrejak deleted the missing-types branch October 10, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants