From 02e1992ffc6a7bbeedf94f0c86b133ce0736df78 Mon Sep 17 00:00:00 2001 From: Ekrem Seren Date: Sat, 13 Jan 2024 01:39:57 +0300 Subject: [PATCH] introduce search query concept, property product extended info --- .../v1alpha1/property_types.proto | 110 ++++++++++++++++++ .../accommodation/v1alpha1/search.proto | 55 +++------ .../v1alpha1/search_parameters_types.proto | 7 +- .../v1alpha1/search_query_types.proto | 29 +++++ .../v1alpha1/search_result_types.proto | 15 +-- .../accommodation/v1alpha1/unit_types.proto | 27 ++--- .../v1alpha1/search_result_types.proto | 7 +- .../services/transport/v1alpha1/search.proto | 32 +---- .../v1alpha1/search_parameters_types.proto | 51 ++++---- .../v1alpha1/search_query_types.proto | 37 ++++++ .../v1alpha1/search_result_types.proto | 10 +- .../transport/v1alpha1/trip_types.proto | 4 +- proto/cmp/types/v1alpha1/bed.proto | 15 +++ proto/cmp/types/v1alpha1/description.proto | 21 ++++ proto/cmp/types/v1alpha1/file.proto | 64 ++++++++++ proto/cmp/types/v1alpha1/meal_plan.proto | 4 +- proto/cmp/types/v1alpha1/phone.proto | 4 +- proto/cmp/types/v1alpha1/search.proto | 27 +++-- proto/cmp/types/v1alpha1/service_fact.proto | 2 +- 19 files changed, 375 insertions(+), 146 deletions(-) create mode 100644 proto/cmp/services/accommodation/v1alpha1/search_query_types.proto create mode 100644 proto/cmp/services/transport/v1alpha1/search_query_types.proto create mode 100644 proto/cmp/types/v1alpha1/bed.proto create mode 100644 proto/cmp/types/v1alpha1/description.proto create mode 100644 proto/cmp/types/v1alpha1/file.proto diff --git a/proto/cmp/services/accommodation/v1alpha1/property_types.proto b/proto/cmp/services/accommodation/v1alpha1/property_types.proto index 755838f5..63055652 100644 --- a/proto/cmp/services/accommodation/v1alpha1/property_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/property_types.proto @@ -3,9 +3,17 @@ syntax = "proto3"; package cmp.services.accommodation.v1alpha1; import "cmp/types/v1alpha1/address.proto"; +import "cmp/types/v1alpha1/bed.proto"; +import "cmp/types/v1alpha1/cancel_policy.proto"; +import "cmp/types/v1alpha1/description.proto"; import "cmp/types/v1alpha1/email.proto"; +import "cmp/types/v1alpha1/file.proto"; import "cmp/types/v1alpha1/location.proto"; +import "cmp/types/v1alpha1/meal_plan.proto"; import "cmp/types/v1alpha1/phone.proto"; +import "cmp/types/v1alpha1/rate.proto"; +import "cmp/types/v1alpha1/service_fact.proto"; +import "cmp/types/v1alpha1/traveller.proto"; import "google/protobuf/timestamp.proto"; // ### Property message type @@ -92,3 +100,105 @@ enum CategoryUnit { CATEGORY_UNIT_STARS = 1; CATEGORY_UNIT_PALMS = 2; } + +// This message type contains extended info about a property +message PropertyExtendedInfo { + // Property + Property property = 1; + + // Images + repeated cmp.types.v1alpha1.Image images = 2; + + // Videos + repeated cmp.types.v1alpha1.Video videos = 3; + + // Segmentation classification + repeated string classification = 4; + + // Property descriptions + repeated cmp.types.v1alpha1.LocalizedDescriptionSet localized_descriptions = 5; + + // Room descriptions + repeated cmp.types.v1alpha1.LocalizedDescriptionSet localized_room_descriptions = 6; + + // Payment type. Ex: "MERCHANT" + string payment_type = 7; + + // Status. FIXME: This needs to be an enum!? + string status = 8; +} + +message Room { + string code = 1; + string name = 2; + repeated cmp.types.v1alpha1.Image images = 3; + repeated cmp.types.v1alpha1.Video videos = 4; + + // Room descriptions + repeated cmp.types.v1alpha1.LocalizedDescriptionSet descriptions = 5; + + // Meal plan (Board code) + cmp.types.v1alpha1.MealPlan meal_plan = 6; + + // FIXME: Need board description & amenities here + + // Rate plans + repeated cmp.types.v1alpha1.RatePlan rate_plans = 7; + + // Rate Rule + repeated cmp.types.v1alpha1.RateRule rate_rules = 8; + + // Beds + repeated cmp.types.v1alpha1.Bed beds = 9; + + // Occupancy + Occupancy occupancy = 10; + + // Services + repeated cmp.types.v1alpha1.ServiceFact included_services = 11; + repeated cmp.types.v1alpha1.ServiceFact compulsory_extras = 12; + repeated cmp.types.v1alpha1.ServiceFact optional_extras = 13; + + // This is a list so that various policies can be expressed. + // + // Ex: 10-5 days before arrival x€, 4-1 days before arrival y€ and 0 days before + // arrival z€ + repeated cmp.types.v1alpha1.CancelPolicy cancel_policies = 14; +} + +message Occupancy { + // Min guests + int32 min_guests = 1; + + // Max guests + int32 max_guests = 2; + + // Standard occupancy + int32 standard_occupancy = 3; + + // Full payers + int32 full_payers = 4; + + // If infants are counted in total guests or not + bool infant_counted_in_total_guests = 5; + + // Occupancy options + repeated OccupancyOption occupancy_options = 6; +} + +message OccupancyOption { + // Guest type like adult, child, infant. + cmp.types.v1alpha1.TravellerType guest_type = 1; + + // Min guests + int32 min = 2; + + // Max guests + int32 max = 3; + + // Min age + int32 min_age = 4; + + // Max age + int32 max_age = 5; +} diff --git a/proto/cmp/services/accommodation/v1alpha1/search.proto b/proto/cmp/services/accommodation/v1alpha1/search.proto index 21009c18..4ef04613 100644 --- a/proto/cmp/services/accommodation/v1alpha1/search.proto +++ b/proto/cmp/services/accommodation/v1alpha1/search.proto @@ -12,34 +12,28 @@ syntax = "proto3"; // This package is a **WIP**. package cmp.services.accommodation.v1alpha1; -import "cmp/services/accommodation/v1alpha1/search_parameters_types.proto"; +import "cmp/services/accommodation/v1alpha1/search_query_types.proto"; import "cmp/services/accommodation/v1alpha1/search_result_types.proto"; -import "cmp/services/accommodation/v1alpha1/unit_types.proto"; import "cmp/types/v1alpha1/common.proto"; import "cmp/types/v1alpha1/search.proto"; -import "cmp/types/v1alpha1/travel_period.proto"; -import "cmp/types/v1alpha1/traveller.proto"; -// ### Accommodation Search Request Message Type -// // The `Accommodation Search Request` message type facilitates the request for // accommodations like hotel and holiday home searches within the platform. In the -// request the market, language and currency are specified at the top-level. -// -// In the Unit we specify the details of the trip like dates, properties or locations or -// filters. The purpose of such a structure is to allow for multi-room and -// multi-property searches. -// This means that there is no grouping of different room, mealplan or rateplan options -// in single room or single property searches. Each AccommodationSearchResult is one -// bookable option. +// request the market, language and currency are specified at the top-level. +// +// In the Unit we specify the details of the trip like dates, properties or +// locations or filters. The purpose of such a structure is to allow for multi-room +// and multi-property searches. This means that there is no grouping of different +// room, mealplan or rateplan options in single room or single property searches. +// Each AccommodationSearchResult is one bookable option. // -// Several rooms or houses can be requested for the same dates and location or -// for the purpose of a tour or roadtrip, several accommodations or properties for -// sequential dates and different locations. This is done by specifying multiple Units -// for the same or different periods, the same or different accommodations or properties, -// specifying which travellers sleep in which unit. -// -//// Developers leveraging this message type should ensure proper validation and +// Several rooms or houses can be requested for the same dates and location or for +// the purpose of a tour or roadtrip, several accommodations or properties for +// sequential dates and different locations. This is done by specifying multiple +// Units for the same or different periods, the same or different accommodations or +// properties, specifying which travellers sleep in which unit. +// +// Developers leveraging this message type should ensure proper validation and // handling, especially considering fields that are still under review, like // `speech_request`. message AccommodationSearchRequest { @@ -54,22 +48,11 @@ message AccommodationSearchRequest { // only the cheapest or all options. cmp.types.v1alpha1.SearchParameters search_parameters_generic = 3; - // Accommodation specific search parameters Ex: Specific search parameters like - // geo location, meal plan, rate plan and rate rules. - AccommodationSearchParameters search_parameters_accommodation = 4; - - // Travel period - cmp.types.v1alpha1.TravelPeriod travel_period = 5; - - // Travellers - repeated cmp.types.v1alpha1.Traveller travellers = 6; - - // Unit Types - repeated UnitType unit_types = 7; + // This field represents a list of search queries that can be used to create + // multiroom multi location searches. + repeated AccommodationSearchQuery queries = 4; } -// ### Accommodation Search Response -// // The `Accommodation Search Response` message type facilitates the response for // accommodations like hotel and holiday home searches within the platform. // @@ -89,7 +72,7 @@ message AccommodationSearchResponse { repeated AccommodationSearchResult results = 3; } -// ### Accommodation Search Service definition +// Service definition for Accommodation search // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search.proto.dot.svg) diff --git a/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto b/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto index 421f39a2..ee25b243 100644 --- a/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto @@ -4,10 +4,11 @@ package cmp.services.accommodation.v1alpha1; import "cmp/types/v1alpha1/location.proto"; import "cmp/types/v1alpha1/meal_plan.proto"; -import "cmp/types/v1alpha1/rate.proto"; import "cmp/types/v1alpha1/product_code.proto"; +import "cmp/types/v1alpha1/rate.proto"; -// ### Accommodation Search Parameters +// This type is used in search requests for parameters like location, meal plan +// codes etc. // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto.dot.svg) @@ -46,4 +47,4 @@ message AccommodationSearchParameters { // Product code list // Here a list of property codes would be used repeated cmp.types.v1alpha1.ProductCode product_codes = 9; -} \ No newline at end of file +} diff --git a/proto/cmp/services/accommodation/v1alpha1/search_query_types.proto b/proto/cmp/services/accommodation/v1alpha1/search_query_types.proto new file mode 100644 index 00000000..2e4b21e8 --- /dev/null +++ b/proto/cmp/services/accommodation/v1alpha1/search_query_types.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package cmp.services.accommodation.v1alpha1; + +import "cmp/services/accommodation/v1alpha1/search_parameters_types.proto"; +import "cmp/services/accommodation/v1alpha1/unit_types.proto"; +import "cmp/types/v1alpha1/travel_period.proto"; +import "cmp/types/v1alpha1/traveller.proto"; + +message AccommodationSearchQuery { + // Integer query ID, unique per search request + int32 query_id = 1; + + // Accommodation specific search parameters Ex: Specific search parameters like + // geo location, meal plan, rate plan and rate rules. + AccommodationSearchParameters search_parameters_accommodation = 2; + + // Travel period + cmp.types.v1alpha1.TravelPeriod travel_period = 3; + + // Travellers + repeated cmp.types.v1alpha1.Traveller travellers = 4; + + // Total number of rooms / holiday homes + int32 unit_count = 5; + + // Type of the unit, like room or holiday home + UnitType unit_type = 6; +} diff --git a/proto/cmp/services/accommodation/v1alpha1/search_result_types.proto b/proto/cmp/services/accommodation/v1alpha1/search_result_types.proto index 9faf1c14..284fb2c1 100644 --- a/proto/cmp/services/accommodation/v1alpha1/search_result_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/search_result_types.proto @@ -7,8 +7,6 @@ import "cmp/types/v1alpha1/cancel_policy.proto"; import "cmp/types/v1alpha1/price.proto"; import "cmp/types/v1alpha1/rate.proto"; -// ### Search result type for Accommodation Search Service -// // This type represents a search result and is used in the // `AccommodationSearchResponse` message. // @@ -19,18 +17,21 @@ message AccommodationSearchResult { // increasing by 1 for every search result. int32 result_id = 1; + // This field represents the query ID associated with the search result. + int32 query_id = 2; + // Units for this search result - repeated Unit units = 2; + repeated Unit units = 3; // ## Total price in detail, with breakdowns - cmp.types.v1alpha1.PriceDetail total_price_detail = 3; + cmp.types.v1alpha1.PriceDetail total_price_detail = 4; // The RateRule specifies whether a search result is non-refundable or not - repeated cmp.types.v1alpha1.RateRule rate_rules = 4; + repeated cmp.types.v1alpha1.RateRule rate_rules = 5; // The cancellation conditions related to an option - cmp.types.v1alpha1.CancelPolicy cancel_policy = 5; + cmp.types.v1alpha1.CancelPolicy cancel_policy = 6; // Freetext remarks without any functionality - string remarks = 6; + string remarks = 7; } diff --git a/proto/cmp/services/accommodation/v1alpha1/unit_types.proto b/proto/cmp/services/accommodation/v1alpha1/unit_types.proto index de222de8..64788448 100644 --- a/proto/cmp/services/accommodation/v1alpha1/unit_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/unit_types.proto @@ -2,18 +2,19 @@ syntax = "proto3"; package cmp.services.accommodation.v1alpha1; +import "cmp/types/v1alpha1/bed.proto"; import "cmp/types/v1alpha1/cancel_policy.proto"; import "cmp/types/v1alpha1/meal_plan.proto"; import "cmp/types/v1alpha1/price.proto"; +import "cmp/types/v1alpha1/product_code.proto"; import "cmp/types/v1alpha1/rate.proto"; import "cmp/types/v1alpha1/service_fact.proto"; import "cmp/types/v1alpha1/travel_period.proto"; import "cmp/types/v1alpha1/traveller.proto"; -// ### Unit -// // A Unit can represent a room in a hotel. One search option can have multiple units // for multi-room requests Ex: one request for 2 rooms for 4 adults, 2 in each room. +// // A unit can also be a different property in a multi-property request for holiday // homes. Ex: 1 house for 4 persons and another house for 6 persons. // @@ -38,7 +39,7 @@ message Unit { repeated cmp.types.v1alpha1.Traveller travellers = 5; // Beds - repeated Bed beds = 6; + repeated cmp.types.v1alpha1.Bed beds = 6; // Price in detail with breakdowns etc cmp.types.v1alpha1.PriceDetail price_detail = 7; @@ -57,8 +58,8 @@ message Unit { // Rate Rule cmp.types.v1alpha1.RateRule rate_rule = 13; - // Cancel Policies - // This is a list so that various policies can be expressed + // This is a list so that various policies can be expressed. + // // Ex: 10-5 days before arrival x€, 4-1 days before arrival y€ and 0 days before // arrival z€ repeated cmp.types.v1alpha1.CancelPolicy cancel_policies = 14; @@ -66,26 +67,14 @@ message Unit { // Remaining units int32 remaining_units = 15; - // Propert code - string property_code = 16; + // Property code + cmp.types.v1alpha1.ProductCode property_code = 16; // Remarks // FIXME: Is this field "per Unit" or should it be "per search request"? string remarks = 17; } -message Bed { - BedType type = 1; - int32 count = 2; -} - -enum BedType { - BED_TYPE_UNSPECIFIED = 0; - BED_TYPE_SINGLE = 1; - BED_TYPE_DOUBLE = 2; - BED_TYPE_KING = 3; -} - enum UnitType { UNIT_TYPE_UNSPECIFIED = 0; UNIT_TYPE_ROOM = 1; diff --git a/proto/cmp/services/activity/v1alpha1/search_result_types.proto b/proto/cmp/services/activity/v1alpha1/search_result_types.proto index 69c325a5..6c52d004 100644 --- a/proto/cmp/services/activity/v1alpha1/search_result_types.proto +++ b/proto/cmp/services/activity/v1alpha1/search_result_types.proto @@ -8,10 +8,9 @@ import "cmp/types/v1alpha1/location.proto"; import "cmp/types/v1alpha1/price.proto"; import "google/protobuf/timestamp.proto"; -// ### Search option type for Activity Search Service +// This type represents a search result and is used in the `ActivitySearchResponse` +// message. // -// This type represents a search result and is used in the -// `ActivitySearchResponse` message. // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/search_option_types.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/search_option_types.proto.dot.svg) message ActivitySearchResult { @@ -115,7 +114,7 @@ message PickupDropoffEvent { // Ex: "OTHERS / Parking Varadero(bus stop css nº50)", string other_info = 4; - // Ex: "2023-07-15T09:05:00" + // Datetime of the pickup dropoff event as Unix timestamp google.protobuf.Timestamp date_time = 5; } diff --git a/proto/cmp/services/transport/v1alpha1/search.proto b/proto/cmp/services/transport/v1alpha1/search.proto index 9b928802..4409581a 100644 --- a/proto/cmp/services/transport/v1alpha1/search.proto +++ b/proto/cmp/services/transport/v1alpha1/search.proto @@ -11,13 +11,11 @@ syntax = "proto3"; // This package is a WIP. package cmp.services.transport.v1alpha1; -import "cmp/services/transport/v1alpha1/search_parameters_types.proto"; +import "cmp/services/transport/v1alpha1/search_query_types.proto"; import "cmp/services/transport/v1alpha1/search_result_types.proto"; import "cmp/services/transport/v1alpha1/source_types.proto"; -import "cmp/services/transport/v1alpha1/trip_types.proto"; import "cmp/types/v1alpha1/common.proto"; import "cmp/types/v1alpha1/search.proto"; -import "cmp/types/v1alpha1/traveller.proto"; // ### Transport Search Request message TransportSearchRequest { @@ -34,36 +32,16 @@ message TransportSearchRequest { // options. cmp.types.v1alpha1.SearchParameters search_parameters = 3; - // Transport specific search parameters - // - // Ex: ?? - TransportSearchParameters search_parameters_transport = 4; - // Content source types for this search request to specify which sources to // include. // // Ex: ContentSourceType.CONTENT_SOURCE_TYPE_GDS, // ContentSourceType.CONTENT_SOURCE_TYPE_NDC // ContentSourceType.CONTENT_SOURCE_TYPE_3RD_PARTY - repeated ContentSourceType conten_source_types = 5; - - // Travellers - repeated cmp.types.v1alpha1.Traveller travellers = 6; + repeated ContentSourceType conten_source_types = 4; - // Travelling trip - // - // To avoid confusion of the direction of travel that occurs with terms like - // "inbound" and "outbound". The travelling trip is also used for "one way" in - // which case the returning trip is omitted. For tours or roadtrips, multiple - // requests with just a travelling trip for sequential dates can be submitted to - // specific suppliers of each part of tour or roadtrip. - Trip travelling_trip = 7; - - // Returning trip - // - // In many cases our travel plans consist of going to a destination and return to - // the same place where we started - Trip returning_trip = 8; + // Multiple search queries for this search request + repeated TransportSearchQuery queries = 5; // Remarks string remarks = 9; @@ -88,7 +66,7 @@ message TransportSearchResponse { repeated TransportSearchResult results = 4; } -// ### Transport Search Service +// Transport Search Service definition. // // Takes `TransportSearchRequest` message type and returns `TransportSearchResponse` // message type. diff --git a/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto b/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto index abf1ca09..a63b6772 100644 --- a/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto @@ -2,9 +2,9 @@ syntax = "proto3"; package cmp.services.transport.v1alpha1; -import "cmp/types/v1alpha1/time.proto"; import "cmp/types/v1alpha1/price.proto"; import "cmp/types/v1alpha1/product_code.proto"; +import "cmp/types/v1alpha1/time.proto"; // ### Transport Search Parameters // @@ -15,45 +15,48 @@ message TransportSearchParameters { // Ex: "SF" repeated cmp.types.v1alpha1.ProductCode product_codes = 1; - // Duration - // Specify the minimal and maximum duration of an activity to be included in the search response + // The minimum duration of a transport to be included in the search response cmp.types.v1alpha1.Time min_duration = 2; + + // The maximum duration of a transport to be included in the search response cmp.types.v1alpha1.Time max_duration = 3; - // Pricerange - // Specify the minimum and maximum price of an activity to be included in the search response + // The minimum price of a transport to be included in the search response cmp.types.v1alpha1.Price min_price = 4; + + // The maximum price of a transport to be included in the search response cmp.types.v1alpha1.Price max_price = 5; - // Brandcode - // Specify one or more brand codes or distribution channels for which assigned product is + // One or more brand codes or distribution channels for which assigned product is // to be included in the search response - repeated string brand_code = 6; + repeated cmp.types.v1alpha1.ProductCode brand_code = 6; - // Maximum number of segments - // Specify the maximum number of segments a trip might be containing - // if only a direct flight, transfer or train journey the maximum number of segments is set to one. - int32 max_segments = 7; + // The maximum number of segments a trip might be containing, if only a direct + // flight, transfer, or train journey the maximum number of segments is set to + // one. + int32 max_segments = 7; - // Travelling - // Specify the departure and/or arrival time of the trip + // Minimum departure time of the travelling trip cmp.types.v1alpha1.Time travelling_min_departure_time = 8; + + // Maximum departure time of the travelling trip cmp.types.v1alpha1.Time travelling_max_departure_time = 9; + + // Minimum arrival time of the travelling trip cmp.types.v1alpha1.Time travelling_min_arrival_time = 10; + + // Maximum arrival time of the travelling trip cmp.types.v1alpha1.Time travelling_max_arrival_time = 11; - // Returning - // Specify the departure and/or arrival time of the trip + // Minimum departure time of the returning trip cmp.types.v1alpha1.Time returning_min_departure_time = 12; + + // Maximum departure time of the returning trip cmp.types.v1alpha1.Time returning_max_departure_time = 13; + + // Minimum arrival time of the returning trip cmp.types.v1alpha1.Time returning_min_arrival_time = 14; - cmp.types.v1alpha1.Time returning_max_arrival_time = 15; - // using filters - // filters have a code, a type and a value. - // filters for business class, first class or economy flights can be set using filters and IATA codelist - // filters for private, shuttle, speedyshuttle can be based on GlobalTypes or OTA codelist - // filters for 1st or 2nd class train can be based UIC codes or OTA codelist - // filters can also be set for provider specific codes - // see filter.proto for more details + // Maximum arrival time of the returning trip + cmp.types.v1alpha1.Time returning_max_arrival_time = 15; } diff --git a/proto/cmp/services/transport/v1alpha1/search_query_types.proto b/proto/cmp/services/transport/v1alpha1/search_query_types.proto new file mode 100644 index 00000000..be137fd2 --- /dev/null +++ b/proto/cmp/services/transport/v1alpha1/search_query_types.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +package cmp.services.transport.v1alpha1; + +import "cmp/services/transport/v1alpha1/search_parameters_types.proto"; +import "cmp/services/transport/v1alpha1/trip_types.proto"; +import "cmp/types/v1alpha1/traveller.proto"; + +// Transport search query +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_query_types.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_query_types.proto.dot.svg) +message TransportSearchQuery { + // ID + int32 query_id = 1; + + // Transport specific search parameters + TransportSearchParameters search_parameters_transport = 4; + + // Travellers + repeated cmp.types.v1alpha1.Traveller travellers = 6; + + // Travelling trip + // + // To avoid confusion of the direction of travel that occurs with terms like + // "inbound" and "outbound". The travelling trip is also used for "one way" in + // which case the returning trip is omitted. For tours or roadtrips, multiple + // requests with just a travelling trip for sequential dates can be submitted to + // specific suppliers of each part of tour or roadtrip. + Trip travelling_trip = 7; + + // Returning trip + // + // In many cases our travel plans consist of going to a destination and return to + // the same place where we started. + Trip returning_trip = 8; +} diff --git a/proto/cmp/services/transport/v1alpha1/search_result_types.proto b/proto/cmp/services/transport/v1alpha1/search_result_types.proto index 01f3c4db..711b027a 100644 --- a/proto/cmp/services/transport/v1alpha1/search_result_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_result_types.proto @@ -13,11 +13,11 @@ import "cmp/types/v1alpha1/traveller.proto"; // Transport search result // -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_option_types.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_option_types.proto.dot.svg) +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_result_types.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_result_types.proto.dot.svg) message TransportSearchResult { - // Unique option ID for this search - int32 option_id = 1; + // Unique result ID + int32 result_id = 1; // Offer ID. // @@ -60,4 +60,4 @@ message TransportSearchResult { // Observations string observations = 14; -} \ No newline at end of file +} diff --git a/proto/cmp/services/transport/v1alpha1/trip_types.proto b/proto/cmp/services/transport/v1alpha1/trip_types.proto index 23033c01..f3070270 100644 --- a/proto/cmp/services/transport/v1alpha1/trip_types.proto +++ b/proto/cmp/services/transport/v1alpha1/trip_types.proto @@ -9,8 +9,6 @@ import "cmp/types/v1alpha1/price.proto"; import "cmp/types/v1alpha1/time.proto"; import "google/protobuf/timestamp.proto"; -// ### Trip message type -// // This message type represents a one way trip, either travelling or returning. // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/trip_types.proto.dot.xs.svg) @@ -95,7 +93,7 @@ message TripSegment { // Max PAX // // Ex: `3` - int32 max_max = 13; + int32 max_pax = 13; // Luggage // diff --git a/proto/cmp/types/v1alpha1/bed.proto b/proto/cmp/types/v1alpha1/bed.proto new file mode 100644 index 00000000..01868ed0 --- /dev/null +++ b/proto/cmp/types/v1alpha1/bed.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package cmp.types.v1alpha1; + +message Bed { + BedType type = 1; + int32 count = 2; +} + +enum BedType { + BED_TYPE_UNSPECIFIED = 0; + BED_TYPE_SINGLE = 1; + BED_TYPE_DOUBLE = 2; + BED_TYPE_KING = 3; +} diff --git a/proto/cmp/types/v1alpha1/description.proto b/proto/cmp/types/v1alpha1/description.proto new file mode 100644 index 00000000..d5015ab7 --- /dev/null +++ b/proto/cmp/types/v1alpha1/description.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package cmp.types.v1alpha1; + +import "cmp/types/v1alpha1/language.proto"; + +message LocalizedDescriptionSet { + // Language + Language language = 1; + + // Desctription set + repeated Description descriptions = 2; +} + +message Description { + // Category of the description like "General", "Amenities". + string category = 1; + + // Description text + string text = 2; +} diff --git a/proto/cmp/types/v1alpha1/file.proto b/proto/cmp/types/v1alpha1/file.proto new file mode 100644 index 00000000..ac9b93ab --- /dev/null +++ b/proto/cmp/types/v1alpha1/file.proto @@ -0,0 +1,64 @@ +syntax = "proto3"; + +package cmp.types.v1alpha1; + +import "google/protobuf/timestamp.proto"; + +message File { + // file name + string name = 1; + + // URL + string url = 2; + + // Last modification time + google.protobuf.Timestamp last_modified = 3; +} + +message Image { + // file + File file = 1; + + // Width + int32 width = 2; + + // Height + int32 height = 3; + + // Category + // + // FIXME: Enum? + string category = 6; +} + +message Video { + // File + File file = 1; + + // Codec of video + string codec = 2; + + // Bitrate in kbps + int32 bitrate = 3; + + // Framerate + int32 framerate = 4; + + // Aspect ratio as a string with format "int:int". Ex: "16:9" + string aspect_ratio = 5; + + // Resolution. Ex: "720p", "4K" + // + // FIXME: Why don't we just use width and height? + string resolution = 6; + + // Container format. Ex: "MP4" + // + // FIXME: Enum? + string format = 7; + + // Category + // + // FIXME: Enum? + string category = 8; +} diff --git a/proto/cmp/types/v1alpha1/meal_plan.proto b/proto/cmp/types/v1alpha1/meal_plan.proto index fcc0b1fb..3bcdbc53 100644 --- a/proto/cmp/types/v1alpha1/meal_plan.proto +++ b/proto/cmp/types/v1alpha1/meal_plan.proto @@ -4,8 +4,8 @@ package cmp.types.v1alpha1; // Meal Plan message type // -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/mealplan.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/mealplan.proto.dot.svg) +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/meal_plan.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/meal_plan.proto.dot.svg) message MealPlan { // Meal Plan Code // diff --git a/proto/cmp/types/v1alpha1/phone.proto b/proto/cmp/types/v1alpha1/phone.proto index 24d4e97b..73e4f6c3 100644 --- a/proto/cmp/types/v1alpha1/phone.proto +++ b/proto/cmp/types/v1alpha1/phone.proto @@ -2,9 +2,7 @@ syntax = "proto3"; package cmp.types.v1alpha1; -// Phone -// -// Phone type for hotels, holiday homes etc +// Phone type to be used in various types as hotels, holiday homes etc. // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/phone.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/phone.proto.dot.svg) diff --git a/proto/cmp/types/v1alpha1/search.proto b/proto/cmp/types/v1alpha1/search.proto index 21be0fa5..f7b9dbed 100644 --- a/proto/cmp/types/v1alpha1/search.proto +++ b/proto/cmp/types/v1alpha1/search.proto @@ -52,33 +52,36 @@ message SearchParameters { string search_description_audio_url = 10; } -// Search Response Metadata +// This message type is used in every search request to contain the request metadata message SearchRequestMetadata { + // Request unique identifier + UUID request_id = 1; + // An identifier for external sessions, aiding in tracking and continuity across // sessions. - string external_session_id = 1; + string external_session_id = 2; } -// Search Response Metadata +// This message type is used in every search response to contain the response metadata message SearchResponseMetadata { + // Search_id to be used in the Validation Request. This must be a UUID according + // to RFC 4122 + UUID search_id = 1; + // Context for Inventory system communication. - string context = 1; + string context = 2; // Errors encountered in the generation of the response. Standardized error list // to be created. - string errors = 2; + string errors = 3; // Warnings encountered in the generation of the response. - string warnings = 3; + string warnings = 4; // Supplier code from the Inventory System for this search response. - string supplier_code = 4; + string supplier_code = 5; // An identifier for external sessions, aiding in tracking and continuity across // sessions. - string external_session_id = 5; - - // Search_id to be used in the Validation Request. This must be a UUID according - // to RFC 4122 - UUID search_id = 6; + string external_session_id = 6; } diff --git a/proto/cmp/types/v1alpha1/service_fact.proto b/proto/cmp/types/v1alpha1/service_fact.proto index 3767f8b2..4610522e 100644 --- a/proto/cmp/types/v1alpha1/service_fact.proto +++ b/proto/cmp/types/v1alpha1/service_fact.proto @@ -34,5 +34,5 @@ import "cmp/types/v1alpha1/price.proto"; // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/service_fact.proto.dot.svg) message ServiceFact { string description = 1; - Price price = 2; + PriceDetail price_detail = 2; }