This implements the actual call to the API to create a booking. That’s the only thing it does, it doesn’t handle the response in any way. This PR is just to get it there and the new booking sub team will handle it further, with payment etc. Approved-by: Michael Zetterberg Approved-by: Fredrik Thorsson Approved-by: Simon.Emanuelsson
24 lines
752 B
TypeScript
24 lines
752 B
TypeScript
/**
|
|
* Nested enum requires namespace
|
|
*/
|
|
export namespace endpoints {
|
|
export const enum v0 {
|
|
profile = "profile/v0/Profile",
|
|
availability = "availability/v0/availabilities/city",
|
|
}
|
|
export const enum v1 {
|
|
profile = "profile/v1/Profile",
|
|
creditCards = `${profile}/creditCards`,
|
|
initiateSaveCard = `${creditCards}/initiateSaveCard`,
|
|
friendTransactions = "profile/v1/Transaction/friendTransactions",
|
|
upcomingStays = "booking/v1/Stays/future",
|
|
previousStays = "booking/v1/Stays/past",
|
|
hotels = "hotel/v1/Hotels",
|
|
intiateSaveCard = `${creditCards}/initiateSaveCard`,
|
|
deleteCreditCard = `${profile}/creditCards`,
|
|
booking = "booking/v1/Bookings",
|
|
}
|
|
}
|
|
|
|
export type Endpoint = endpoints.v0 | endpoints.v1
|