From ae259c438b93e849f2d96e3f00f3ecd08db56412 Mon Sep 17 00:00:00 2001 From: Mohamed Elmoslemany Date: Wed, 28 Aug 2024 08:52:22 +0200 Subject: [PATCH] latest changes from c4t --- .../v1alpha/property_types.proto | 23 +--- .../v1alpha/search_parameters_types.proto | 2 +- .../v1alpha/search_result_types.proto | 4 +- .../activity/v1alpha/activity_types.proto | 110 ++++++++++-------- .../cmp/services/activity/v1alpha/info.proto | 30 ++--- .../services/activity/v1alpha/search.proto | 66 ++++++++--- .../v1alpha/search_parameters_types.proto | 2 +- .../v1alpha/search_result_types.proto | 11 +- .../info/v1alpha/entry_requirements.proto | 2 +- .../services/seat_map/v1alpha/seat_map.proto | 4 + .../v1alpha/search_result_types.proto | 10 +- .../{bookable.proto => bookability.proto} | 14 +-- proto/cmp/types/v1alpha/contact_info.proto | 26 ++--- proto/cmp/types/v1alpha/delivery.proto | 27 +++-- proto/cmp/types/v1alpha/fulfillment.proto | 26 ----- proto/cmp/types/v1alpha/link.proto | 6 +- proto/cmp/types/v1alpha/location.proto | 14 ++- proto/cmp/types/v1alpha/price.proto | 8 +- proto/cmp/types/v1alpha/price_type.proto | 34 ++++-- proto/cmp/types/v1alpha/redemption.proto | 10 +- proto/cmp/types/v1alpha/seat_map.proto | 23 ++-- proto/cmp/types/v1alpha/traveller.proto | 8 +- 22 files changed, 252 insertions(+), 208 deletions(-) rename proto/cmp/types/v1alpha/{bookable.proto => bookability.proto} (66%) delete mode 100644 proto/cmp/types/v1alpha/fulfillment.proto diff --git a/proto/cmp/services/accommodation/v1alpha/property_types.proto b/proto/cmp/services/accommodation/v1alpha/property_types.proto index d9687ce..a8b40ec 100644 --- a/proto/cmp/services/accommodation/v1alpha/property_types.proto +++ b/proto/cmp/services/accommodation/v1alpha/property_types.proto @@ -2,15 +2,13 @@ syntax = "proto3"; package cmp.services.accommodation.v1alpha; -import "cmp/types/v1alpha/address.proto"; import "cmp/types/v1alpha/amenity.proto"; import "cmp/types/v1alpha/bed.proto"; +import "cmp/types/v1alpha/contact_info.proto"; import "cmp/types/v1alpha/description.proto"; -import "cmp/types/v1alpha/email.proto"; import "cmp/types/v1alpha/file.proto"; import "cmp/types/v1alpha/location.proto"; import "cmp/types/v1alpha/meal_plan.proto"; -import "cmp/types/v1alpha/phone.proto"; import "cmp/types/v1alpha/product_code.proto"; import "cmp/types/v1alpha/product_status.proto"; import "cmp/types/v1alpha/service_fact.proto"; @@ -44,27 +42,18 @@ message Property { // Ex: CategoryUnit.CATEGORY_UNIT_PALMS CategoryUnit category_unit = 7; - // Ex: Address type - cmp.types.v1alpha.Address address = 8; - - // Emails - repeated cmp.types.v1alpha.Email emails = 9; - - // Phones - repeated cmp.types.v1alpha.Phone phones = 10; + // Contact Info: phone, address, email, links + cmp.types.v1alpha.ContactInfo contact_info = 8; // Location coordinate - cmp.types.v1alpha.Coordinate coordinate = 11; - - // Ex: "www.hotel.com" - string website = 12; + cmp.types.v1alpha.Coordinates coordinates = 9; // Status of the property - cmp.types.v1alpha.ProductStatus status = 13; + cmp.types.v1alpha.ProductStatus status = 10; // Airports // Ex: ["PMI", "ZRH", "AYT"] - repeated string airports = 14; + repeated string airports = 11; } enum CategoryRating { diff --git a/proto/cmp/services/accommodation/v1alpha/search_parameters_types.proto b/proto/cmp/services/accommodation/v1alpha/search_parameters_types.proto index 57290e3..1fe257d 100644 --- a/proto/cmp/services/accommodation/v1alpha/search_parameters_types.proto +++ b/proto/cmp/services/accommodation/v1alpha/search_parameters_types.proto @@ -22,7 +22,7 @@ message AccommodationSearchParameters { cmp.types.v1alpha.LocationCodes location_codes = 1; // Single geographic point represented by two double fields. - cmp.types.v1alpha.Coordinate location_coordinate = 2; + cmp.types.v1alpha.Coordinates location_coordinates = 2; // Geo tree type, represented by Country, Region, and City_or_Resort. cmp.types.v1alpha.GeoTree location_geo_tree = 3; diff --git a/proto/cmp/services/accommodation/v1alpha/search_result_types.proto b/proto/cmp/services/accommodation/v1alpha/search_result_types.proto index 81ad94d..a950efe 100644 --- a/proto/cmp/services/accommodation/v1alpha/search_result_types.proto +++ b/proto/cmp/services/accommodation/v1alpha/search_result_types.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package cmp.services.accommodation.v1alpha; import "cmp/services/accommodation/v1alpha/unit_types.proto"; -import "cmp/types/v1alpha/bookable.proto"; +import "cmp/types/v1alpha/bookability.proto"; import "cmp/types/v1alpha/cancel_policy.proto"; import "cmp/types/v1alpha/price.proto"; import "cmp/types/v1alpha/rate.proto"; @@ -37,5 +37,5 @@ message AccommodationSearchResult { string remarks = 7; // Status of the result, whether it is immediately bookable or not - cmp.types.v1alpha.Bookability bookable = 8; + cmp.types.v1alpha.Bookability bookability = 8; } diff --git a/proto/cmp/services/activity/v1alpha/activity_types.proto b/proto/cmp/services/activity/v1alpha/activity_types.proto index 6f6b4ea..48a8ea6 100644 --- a/proto/cmp/services/activity/v1alpha/activity_types.proto +++ b/proto/cmp/services/activity/v1alpha/activity_types.proto @@ -2,32 +2,32 @@ syntax = "proto3"; package cmp.services.activity.v1alpha; -import "cmp/types/v1alpha/description.proto"; -import "cmp/types/v1alpha/location.proto"; -import "cmp/types/v1alpha/language.proto"; -import "cmp/types/v1alpha/file.proto"; +import "cmp/types/v1alpha/address.proto"; +import "cmp/types/v1alpha/bookability.proto"; +import "cmp/types/v1alpha/contact_info.proto"; import "cmp/types/v1alpha/datetime_range.proto"; +import "cmp/types/v1alpha/delivery.proto"; +import "cmp/types/v1alpha/description.proto"; import "cmp/types/v1alpha/duration.proto"; -import "cmp/types/v1alpha/contact_info.proto"; +import "cmp/types/v1alpha/file.proto"; +import "cmp/types/v1alpha/language.proto"; +import "cmp/types/v1alpha/location.proto"; import "cmp/types/v1alpha/product_code.proto"; -import "cmp/types/v1alpha/delivery.proto"; import "cmp/types/v1alpha/redemption.proto"; -import "cmp/types/v1alpha/bookable.proto"; -import "cmp/types/v1alpha/address.proto"; import "google/protobuf/timestamp.proto"; - // This represents Activity types which is needed for different activity services (search, info, ... etc) // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/activity_types.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/activity_types.proto.dot.svg) message Activity { - // Context for Inventory system concepts that need to be included in an info response, - // like an OwnerCode, PTC_OfferParameters, Tax codes, Disclosure RefID, etc. or a - // serialized combination of these codes. + // Context for Inventory system concepts that need to be included in an info + // response, like an OwnerCode, PTC_OfferParameters, Tax codes, Disclosure RefID, + // etc. or a serialized combination of these codes. string context = 1; - // Ex: "2023-08-28T12:03:50", specifying when the static data of a product was last updated + // Ex: "2023-08-28T12:03:50", specifying when the static data of a product was + // last updated google.protobuf.Timestamp last_modified = 2; // An identifier for external sessions, aiding in tracking and continuity across @@ -37,21 +37,23 @@ message Activity { // External Product codes for the result. These can be of different types cmp.types.v1alpha.ProductCode product_code = 4; - // Unit IDfor the result - // The purpose of this concept is to allow for different activities for one product - // like "Windsurfing" and "Kitesurfing" under "Salou Playa Llarga". - // Code and description match the information provided in the ProductList and + // Unit ID for the result + // + // The purpose of this concept is to allow for different activities for one + // product like "Windsurfing" and "Kitesurfing" under "Salou Playa Llarga". Code + // and description match the information provided in the ProductList and // ProductInfo message. These are in general also supplier specific. string unit_code = 5; // Service codes for the result + // // Several different packages could be included like "Windsurfing" with or without - // "Wetsuit". Code and description match the information provided in the ProductInfo message - // These are in general also supplier specific + // "Wetsuit". Code and description match the information provided in the + // ProductInfo message These are in general also supplier specific. string service_code = 6; // Status of the result, whether it is immediately bookable or not - cmp.types.v1alpha.Bookability bookable = 7; + cmp.types.v1alpha.Bookability bookability = 7; } message ActivityLocation { @@ -62,10 +64,13 @@ message ActivityLocation { cmp.types.v1alpha.GeoTree geo_tree = 2; // Coordinate - cmp.types.v1alpha.Coordinate coordinate = 3; + cmp.types.v1alpha.Coordinates coordinates = 3; } message PickupDropoffEvent { + // Supplier specific pick-up code. Avoid using this and use a more generic concept + // where possible, so that the integration is suitable for more than one partner. + // // Ex: "AESPMI43NU", string location_code = 1; // Ex: "Sunny Beach Hotel", @@ -73,45 +78,43 @@ message PickupDropoffEvent { // True if this pickup location is selected for the activity // - // Ex: "true" - // - // FIXME: How is this relevant for the search result message? + // If the boolean is set to false, this is a specific indication that + // pick-up/drop-off at this location is not possible. An activity search response + // can have one result without a transfer service and without a PickupDropoffEvent + // to indicate that there is no transfer included. Or a PickupDropoffEvent with + // pick_up indicator set to false can be included to make it explicit. bool pickup_indicator = 3; - // Ex: "OTHERS / Parking Varadero(bus stop css nº50)", + // Ex: "OTHERS / Parking Varadero (bus stop css nº50)", string other_info = 4; // Datetime of the pickup dropoff event as Unix timestamp google.protobuf.Timestamp date_time = 5; // Longitude and Latitude of the location - cmp.types.v1alpha.Coordinate coordinates = 6; -} - -enum PricingType { - PRICING_TYPE_UNSPECIFIED = 0; - PRICING_TYPE_PERPERSON = 1; - PRICING_TYPE_PERGROUP = 2; + cmp.types.v1alpha.Coordinates coordinates = 6; } +// Activity static info message ActivityExtendedInfo { - // Activity dynamic info + // Activity dynamic info references Activity activity = 1; - // Units + // Available Units repeated ActivityUnit units = 2; - // Service Info - ActivityService service = 3; + // Available Services + repeated ActivityService services = 3; - // Zones - repeated ActivityZone zones = 4; + // Transfer Zone(s) in which participants of the activity can be used for pick-up + // and drop-off + repeated TransferZone zones = 4; // Descriptions with different languages repeated cmp.types.v1alpha.LocalizedDescriptionSet descriptions = 5; - // Coordinates - cmp.types.v1alpha.Coordinate position =6; + // Coordinates of where the activity takes place + ActivityLocation location = 6; // Activity Features repeated ActivityFeature features = 7; @@ -145,7 +148,7 @@ message ActivityExtendedInfo { // Type name which describes type_code string type_name = 17; - + // Supplier Product codes for the result // These must match the supplier codes provided in the ProductList and // ProductInfo messages @@ -158,7 +161,7 @@ message ActivityExtendedInfo { cmp.types.v1alpha.DurationRange duration_range = 20; // Time given for confirmation before the offer expires - cmp.types.v1alpha.Duration max_confirmation_duration = 21; + cmp.types.v1alpha.Duration max_confirmation_duration = 21; // Allow Free Sale bool allow_free_sale = 22; @@ -171,7 +174,7 @@ message ActivityExtendedInfo { // Check availability bool availability_required = 25; - + // Availability Type string availability_type = 26; @@ -185,9 +188,12 @@ message ActivityExtendedInfo { repeated cmp.types.v1alpha.RedemptionMethod redemption_methods = 29; } +// The unit gives us a choice of the different options that are available in an +// activity, like for example a normal ticket or a VIP ticket. a 2 hour or 4 hour +// jeep safari. A ticket to a specific section of a stadium. message ActivityUnit { - // Schedule - cmp.types.v1alpha.DateTimeRange schedule = 1; + //Schedule + cmp.types.v1alpha.DateTimeRange schedule = 1; // Unit Code string code = 2; @@ -199,6 +205,9 @@ message ActivityUnit { string description = 4; } +// Services can be selected like do we go to the activity by ourselves or is a +// transfer from our hotel included. Do we book the VIP ticket with or without +// alcoholic drinks included? message ActivityService { // Service Code string code = 1; @@ -212,19 +221,19 @@ message ActivityService { // Included items in the activity service repeated string included = 4; - // Encluded items in the activity service + // Excluded items in the activity service repeated string excluded = 5; } -message ActivityZone { - // Unit Code +message TransferZone { + // Zone Code used in transfer operations string code = 1; // Geo tree type, represented by Country, Region, and City_or_Resort. cmp.types.v1alpha.GeoTree geo_tree = 2; // pick-up and drop-off information about location and time - repeated cmp.services.activity.v1alpha.PickupDropoffEvent pickup_dropoff = 3; + repeated PickupDropoffEvent pickup_dropoff_events = 3; } message ActivityFeature { @@ -232,7 +241,7 @@ message ActivityFeature { string description = 1; // Feature Code - string code = 2; + string code = 2; } message ActivityTag { @@ -248,4 +257,3 @@ message ActivityTag { // Slug; giving an informal name to the tag string slug = 4; } - diff --git a/proto/cmp/services/activity/v1alpha/info.proto b/proto/cmp/services/activity/v1alpha/info.proto index a3232ca..8165507 100644 --- a/proto/cmp/services/activity/v1alpha/info.proto +++ b/proto/cmp/services/activity/v1alpha/info.proto @@ -2,22 +2,22 @@ syntax = "proto3"; package cmp.services.activity.v1alpha; +import "cmp/services/activity/v1alpha/activity_types.proto"; import "cmp/types/v1alpha/common.proto"; import "cmp/types/v1alpha/language.proto"; import "cmp/types/v1alpha/product_code.proto"; -import "cmp/services/activity/v1alpha/activity_types.proto"; import "google/protobuf/timestamp.proto"; - message ActivityProductInfoRequest { - // Message header cmp.types.v1alpha.RequestHeader header = 1; - // Only respond with the products that are modified after this timestamp + // Only respond with the products that are new, modified or deactivated after this + // timestamp. google.protobuf.Timestamp modified_after = 2; - // Languages + // Languages to be included in the response for descriptions. Null means all + // available languages. repeated cmp.types.v1alpha.Language languages = 3; // Activity codes @@ -30,13 +30,13 @@ message ActivityProductInfoResponse { // Product list: Activities repeated ActivityExtendedInfo activities = 2; - } - - // Activity product info service definition - // - // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/info.proto.dot.xs.svg) - // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/info.proto.dot.svg) - service ActivityProductInfoService { - // Returns product list for activity - rpc ActivityProductInfo(ActivityProductInfoRequest) returns (ActivityProductInfoResponse); - } \ No newline at end of file +} + +// Activity product info service definition +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/info.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/info.proto.dot.svg) +service ActivityProductInfoService { + // Returns product list for activity + rpc ActivityProductInfo(ActivityProductInfoRequest) returns (ActivityProductInfoResponse); +} diff --git a/proto/cmp/services/activity/v1alpha/search.proto b/proto/cmp/services/activity/v1alpha/search.proto index ea35952..ad1b89f 100644 --- a/proto/cmp/services/activity/v1alpha/search.proto +++ b/proto/cmp/services/activity/v1alpha/search.proto @@ -2,13 +2,39 @@ syntax = "proto3"; // ### Activity Services // -// The Activity services are used for both tickets and excursions +// The Activity services are used for both tickets and excursions. // // Any search message response in the Camino Messenger Protocol only includes -// dynamic data. Static data can be cached and kept up to data with the Product List -// and Product Details messages. +// dynamic data in the search, validate and mint process. Static data can be cached +// and kept up to date with the Product List and Product Details messages. // -// This package is a **WIP**. +// Partners keep the list of activity products up-to-date on a daily basis, by +// getting changes since yesterday with the ActivityProductList service. The details +// of the updated activities are bing pulled using the ActivityProductInfo service. +// +// Once we have a traveller interested in an activity, the ActivitySearch service is +// used to obtain the pricing of relevant activities that are available. In this +// process there is no repeated exchange of static data to reduce the message size, +// reduce cost and increase processing speed. +// +// Similar to all other message types, the Activity service is constructed using the +// "Product", "Unit" and "Service" layers. For example the product is a Taylor Swift +// concert or a Disney World ticket. The unit then gives us a choice of the +// different options that are available, like for example a normal ticket or a VIP +// ticket. Finally we would have the services, which can be selected like do we go +// there by ourselves or is a transfer from our hotel included. This then would +// result to product=Disneyland, unit=VIP, service=TRFIncluded. +// +// It is of course impossible to offer a transfer from every hotel in Florida to +// Disney World. A supplier might have defined just the ticket, without transfer. And +// additionally a ticket with transfer from the 25 most popular hotels in the area. +// If the PickUp is not provided in the search request, the response should include +// an option without transfer and further options that include a transfer from +// several hotels that are close together and would cost the same for the ticket and +// transfer. +// +// The Activity search messages will be adapted to work with the SeatMap services, +// just like the Transport service. This package is **WIP**. package cmp.services.activity.v1alpha; import "cmp/services/activity/v1alpha/search_parameters_types.proto"; @@ -22,7 +48,7 @@ import "cmp/types/v1alpha/traveller.proto"; // Search request for Activities message ActivitySearchRequest { // Message header. Contains API version, message info string and end-user wallet - // address + // address. cmp.types.v1alpha.RequestHeader header = 1; // Search request metadata @@ -30,12 +56,14 @@ message ActivitySearchRequest { // Generic search parameters // - // Ex: Inclusion of OnRequest options and inclusion of only the cheapest or all - // options. + // Ex: Inclusion of OnRequest options, inclusion of only the cheapest or all + // options, setting the market, language, currency, sorting and filters etc. cmp.types.v1alpha.SearchParameters search_parameters_generic = 3; - // Activiy specific search parameters - // Ex: ?? + // Activity specific search parameters + // + // Here we set for example a list of activity product codes that we want to search + // for, set min or mar duration or price. ActivitySearchParameters search_parameters_activity = 4; // Travel period @@ -48,6 +76,9 @@ message ActivitySearchRequest { // customer’s position at the start of the service. Typical value would be the // stay hotel or the touristic destination. The source location is needed for // service and transfer availability, pickup location and pickup time calculation. + // Setting the source_location will reduce the list of options to the activities + // that can be serviced. In the example of Disney World and Orlando it will reduce + // the list substantially as the non-relevant pick-up points will not be included. // // This one of field enforces only one of the fields below. They all share memory, // setting one will remove the others. @@ -57,7 +88,7 @@ message ActivitySearchRequest { cmp.types.v1alpha.LocationCodes source_location_codes = 7; // Single geographic point represented by two double fields. - cmp.types.v1alpha.Coordinate source_location_coordinate = 8; + cmp.types.v1alpha.Coordinates source_location_coordinates = 8; // Geo tree type, represented by Country, Region, and City_or_Resort. cmp.types.v1alpha.GeoTree source_location_geo_tree = 9; @@ -70,18 +101,19 @@ message ActivitySearchRequest { } // For search, set only one of the field at once. Service location specifies the - // areas involved in aticket or excursion service. Service location indicates the + // areas involved in a ticket or excursion service. Service location indicates the // area of the requested services. Typical value would be the region or resort. // // This one of field enforces only one of the fields below. They all share memory, // setting one will remove the others. oneof service_location { - // The code and code type of a stay location the distributor will be able to process - // Ex. Google Place ID, Foursquare fsq_id, OpenStreetMap Ref, Here ID or any other agreed code type. + // The code and code type of a stay location the distributor will be able to + // process. Ex. Google Place ID, Foursquare fsq_id, OpenStreetMap Ref, Here ID or + // any other agreed code type. cmp.types.v1alpha.LocationCodes service_location_codes = 12; // Single geographic point represented by two double fields. - cmp.types.v1alpha.Coordinate service_location_coordinate = 13; + cmp.types.v1alpha.Coordinates service_location_coordinates = 13; // Geo tree type, represented by Country, Region, and City_or_Resort. cmp.types.v1alpha.GeoTree service_location_geo_tree = 14; @@ -100,9 +132,13 @@ message ActivitySearchResponse { cmp.types.v1alpha.ResponseHeader header = 1; // Search response metadata + // + // The most important field is the search_id, which is a UUID that needs to be + // carried through to the validate request. cmp.types.v1alpha.SearchResponseMetadata metadata = 2; - // Unique combinations of bookable search results + // Unique combinations of bookable search results, each identified by a result_id + // that needs to be carried through to the validate request. repeated ActivitySearchResult results = 3; // The traveller_id is specified in each result and the ids are detailed with diff --git a/proto/cmp/services/activity/v1alpha/search_parameters_types.proto b/proto/cmp/services/activity/v1alpha/search_parameters_types.proto index 396f654..9f25bf1 100644 --- a/proto/cmp/services/activity/v1alpha/search_parameters_types.proto +++ b/proto/cmp/services/activity/v1alpha/search_parameters_types.proto @@ -46,7 +46,7 @@ message ActivitySearchParameters { cmp.types.v1alpha.Duration min_duration = 6; cmp.types.v1alpha.Duration max_duration = 7; - // Pricerange + // Price range // // Specify the minimum and maximum price of an activity to be included in the // search response diff --git a/proto/cmp/services/activity/v1alpha/search_result_types.proto b/proto/cmp/services/activity/v1alpha/search_result_types.proto index 58b6798..fe4569b 100644 --- a/proto/cmp/services/activity/v1alpha/search_result_types.proto +++ b/proto/cmp/services/activity/v1alpha/search_result_types.proto @@ -2,15 +2,16 @@ syntax = "proto3"; package cmp.services.activity.v1alpha; +import "cmp/services/activity/v1alpha/activity_types.proto"; import "cmp/types/v1alpha/datetime_range.proto"; import "cmp/types/v1alpha/price.proto"; -import "cmp/services/activity/v1alpha/activity_types.proto"; +import "cmp/types/v1alpha/price_type.proto"; // 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/v1alpha/search_option_types.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/search_option_types.proto.dot.svg) +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/search_result_types.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/search_result_types.proto.dot.svg) message ActivitySearchResult { // Option ID for the search option. This is an increasing number starting at 0 and // increasing by 1 for every search result. @@ -39,5 +40,5 @@ message ActivitySearchResult { // Pricing type // Ex: "PerPerson", "PerGroup" - PricingType pricing_type = 9; -} \ No newline at end of file + cmp.types.v1alpha.ChargeType charge_type = 9; +} diff --git a/proto/cmp/services/info/v1alpha/entry_requirements.proto b/proto/cmp/services/info/v1alpha/entry_requirements.proto index 158b5c1..98d910b 100644 --- a/proto/cmp/services/info/v1alpha/entry_requirements.proto +++ b/proto/cmp/services/info/v1alpha/entry_requirements.proto @@ -77,7 +77,7 @@ message CountryEntryRequirementCategory { repeated cmp.types.v1alpha.LocalizedString names = 2; // Items - CountryEntryRequirementItem items = 3; + repeated CountryEntryRequirementItem items = 3; // Sub categories repeated CountryEntryRequirementCategory sub_categories = 4; diff --git a/proto/cmp/services/seat_map/v1alpha/seat_map.proto b/proto/cmp/services/seat_map/v1alpha/seat_map.proto index ab8901b..cbdf880 100644 --- a/proto/cmp/services/seat_map/v1alpha/seat_map.proto +++ b/proto/cmp/services/seat_map/v1alpha/seat_map.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package cmp.services.seat_map.v1alpha; import "cmp/types/v1alpha/common.proto"; +import "cmp/types/v1alpha/language.proto"; import "cmp/types/v1alpha/seat_map.proto"; // Request for seat map data @@ -19,6 +20,9 @@ message SeatMapRequest { // This is the map ID that is received in the search results and also from the // product info responses. string map_id = 2; + + // Requested Languages + repeated cmp.types.v1alpha.Language languages = 3; } // Response for seat map request diff --git a/proto/cmp/services/transport/v1alpha/search_result_types.proto b/proto/cmp/services/transport/v1alpha/search_result_types.proto index 0a10e5d..a7c5ac7 100644 --- a/proto/cmp/services/transport/v1alpha/search_result_types.proto +++ b/proto/cmp/services/transport/v1alpha/search_result_types.proto @@ -3,11 +3,11 @@ syntax = "proto3"; package cmp.services.transport.v1alpha; import "cmp/services/transport/v1alpha/trip_types.proto"; -import "cmp/types/v1alpha/bookable.proto"; +import "cmp/types/v1alpha/bookability.proto"; import "cmp/types/v1alpha/cancel_policy.proto"; import "cmp/types/v1alpha/change_policy.proto"; import "cmp/types/v1alpha/datetime_range.proto"; -import "cmp/types/v1alpha/fulfillment.proto"; +import "cmp/types/v1alpha/link.proto"; import "cmp/types/v1alpha/price.proto"; import "cmp/types/v1alpha/rate.proto"; @@ -46,11 +46,11 @@ message TransportSearchResult { // Rate Rules repeated cmp.types.v1alpha.RateRule rate_rules = 7; - // Fulfillment - repeated cmp.types.v1alpha.Fulfillment fulfillments = 8; + // Links + repeated cmp.types.v1alpha.Link links = 8; // Status of the result, whether it is immediately bookable or not - cmp.types.v1alpha.Bookability bookable = 9; + cmp.types.v1alpha.Bookability bookability = 9; // Validity of the search option. // diff --git a/proto/cmp/types/v1alpha/bookable.proto b/proto/cmp/types/v1alpha/bookability.proto similarity index 66% rename from proto/cmp/types/v1alpha/bookable.proto rename to proto/cmp/types/v1alpha/bookability.proto index 4bd8c50..3054291 100644 --- a/proto/cmp/types/v1alpha/bookable.proto +++ b/proto/cmp/types/v1alpha/bookability.proto @@ -4,10 +4,10 @@ package cmp.types.v1alpha; import "cmp/types/v1alpha/time.proto"; -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/bookable.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/bookable.proto.dot.svg) +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/bookability.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/bookability.proto.dot.svg) message Bookability { - Bookable bookable = 1; + BookabilityType type = 1; // In case of a bookable=on_request status, a confirmation time should be given by // the supplier. The supplier is to confirm the on-request booking with that @@ -16,8 +16,8 @@ message Bookability { cmp.types.v1alpha.Time confirmation_time = 2; } -enum Bookable { - BOOKABLE_UNSPECIFIED = 0; - BOOKABLE_AVAILABLE = 1; - BOOKABLE_ON_REQUEST = 2; +enum BookabilityType { + BOOKABILITY_TYPE_UNSPECIFIED = 0; + BOOKABILITY_TYPE_AVAILABLE = 1; + BOOKABILITY_TYPE_ON_REQUEST = 2; } diff --git a/proto/cmp/types/v1alpha/contact_info.proto b/proto/cmp/types/v1alpha/contact_info.proto index a6d3099..da61cc6 100644 --- a/proto/cmp/types/v1alpha/contact_info.proto +++ b/proto/cmp/types/v1alpha/contact_info.proto @@ -3,24 +3,24 @@ syntax = "proto3"; package cmp.types.v1alpha; import "cmp/types/v1alpha/address.proto"; -import "cmp/types/v1alpha/phone.proto"; import "cmp/types/v1alpha/email.proto"; import "cmp/types/v1alpha/link.proto"; +import "cmp/types/v1alpha/phone.proto"; // Contact Info for general use. // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/contact_info.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/contact_info.proto.dot.svg) message ContactInfo { - // Address - repeated cmp.types.v1alpha.Address address = 1; - - // Phones - repeated cmp.types.v1alpha.Phone phones = 2; - - // Emails - repeated cmp.types.v1alpha.Email emails = 3; - - // Websites - repeated cmp.types.v1alpha.Link links = 4; - } \ No newline at end of file + // Address + repeated cmp.types.v1alpha.Address address = 1; + + // Phones + repeated cmp.types.v1alpha.Phone phones = 2; + + // Emails + repeated cmp.types.v1alpha.Email emails = 3; + + // Websites + repeated cmp.types.v1alpha.Link links = 4; +} diff --git a/proto/cmp/types/v1alpha/delivery.proto b/proto/cmp/types/v1alpha/delivery.proto index 86ca05a..03a559d 100644 --- a/proto/cmp/types/v1alpha/delivery.proto +++ b/proto/cmp/types/v1alpha/delivery.proto @@ -7,21 +7,20 @@ package cmp.types.v1alpha; // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/delivery.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/delivery.proto.dot.svg) enum DeliveryFormat { - DELIVERY_FORMAT_UNSPECIFIED = 0; - DELIVERY_FORMAT_OTHER = 1; - DELIVERY_FORMAT_NFT = 2; - DELIVERY_FORMAT_QRCODE = 3; - DELIVERY_FORMAT_BARCODE = 4; - DELIVERY_FORMAT_PDF = 5; + DELIVERY_FORMAT_UNSPECIFIED = 0; + DELIVERY_FORMAT_OTHER = 1; + DELIVERY_FORMAT_NFT = 2; + DELIVERY_FORMAT_QRCODE = 3; + DELIVERY_FORMAT_BARCODE = 4; + DELIVERY_FORMAT_PDF = 5; } - enum DeliveryMethod { - DELIVERY_METHOD_UNSPECIFIED = 0; - DELIVERY_METHOD_OTHER = 1; - DELIVERY_METHOD_API = 2; - DELIVERY_METHOD_EMAIL = 3; - DELIVERY_METHOD_SMS = 4; - DELIVERY_METHOD_WHATSAPP = 5; - DELIVERY_METHOD_POST = 6; + DELIVERY_METHOD_UNSPECIFIED = 0; + DELIVERY_METHOD_OTHER = 1; + DELIVERY_METHOD_API = 2; + DELIVERY_METHOD_EMAIL = 3; + DELIVERY_METHOD_SMS = 4; + DELIVERY_METHOD_WHATSAPP = 5; + DELIVERY_METHOD_POST = 6; } diff --git a/proto/cmp/types/v1alpha/fulfillment.proto b/proto/cmp/types/v1alpha/fulfillment.proto deleted file mode 100644 index 19ac2a8..0000000 --- a/proto/cmp/types/v1alpha/fulfillment.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package cmp.types.v1alpha; - -// Fulfillment message type. TODO: Add documentation to explain the purpose of this message -// -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/fulfillment.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/fulfillment.proto.dot.svg) -message Fulfillment { - // Link type - // - // Ex: "LG" or "TC" - // - // FIXME: Enum? - string link_type = 1; - - // Link description - // - // Ex: "Baggage conditions" - string link_description = 2; - - // Link reference - // - // Ex: "https://api.lyko.tech/v2.1/transfers/ebaa9aed-dbc4-4d51-a41a-336a3c3e9bfc/pdf-terms-and-conditions" - string link_ref = 3; -} diff --git a/proto/cmp/types/v1alpha/link.proto b/proto/cmp/types/v1alpha/link.proto index dc2c2f5..b57b05d 100644 --- a/proto/cmp/types/v1alpha/link.proto +++ b/proto/cmp/types/v1alpha/link.proto @@ -7,7 +7,7 @@ package cmp.types.v1alpha; // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/link.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/link.proto.dot.svg) message Link { - // Link type + // Link type // // Ex: "LG" or "TC" LinkType type = 1; @@ -40,7 +40,5 @@ enum LinkType { LINK_TYPE_MEDIUM = 13; LINK_TYPE_TIKTOK = 14; LINK_TYPE_WHATSAPP = 15; - LINK_TYPE_TELEGRAM = 16; + LINK_TYPE_TELEGRAM = 16; } - - diff --git a/proto/cmp/types/v1alpha/location.proto b/proto/cmp/types/v1alpha/location.proto index 3898768..61eb051 100644 --- a/proto/cmp/types/v1alpha/location.proto +++ b/proto/cmp/types/v1alpha/location.proto @@ -11,7 +11,7 @@ import "cmp/types/v1alpha/measurement.proto"; // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/location.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/location.proto.dot.svg) -message Coordinate { +message Coordinates { // The latitude in degrees. It must be in the range [-90.0, +90.0]. double latitude = 1; // The longitude in degrees. It must be in the range [-180.0, +180.0]. @@ -20,17 +20,21 @@ message Coordinate { // Geo Circle message GeoCircle { - cmp.types.v1alpha.Coordinate center = 1; + cmp.types.v1alpha.Coordinates center = 1; cmp.types.v1alpha.Length radius = 2; } // Geo Polygon message GeoPolygon { // GPS points of the polygon - repeated cmp.types.v1alpha.Coordinate points = 1; + repeated cmp.types.v1alpha.Coordinates points = 1; } // Geo Tree +// +// Contrary to Geo coordinates, circle and polygon, a geotree is supplier specific +// and would require mapping for every connection. If possible use generic concepts, +// so that implementations can easily be reused among suppliers. message GeoTree { Country country = 1; string region = 2; @@ -38,6 +42,10 @@ message GeoTree { } // Location Code +// +// Location codes can be generic across multiple suppliers that support standardized +// code types. However, using provider specific codes makes an implementation more +// unique. message LocationCode { string code = 1; LocationCodeType type = 2; diff --git a/proto/cmp/types/v1alpha/price.proto b/proto/cmp/types/v1alpha/price.proto index 7aaabc8..b90db40 100644 --- a/proto/cmp/types/v1alpha/price.proto +++ b/proto/cmp/types/v1alpha/price.proto @@ -10,7 +10,7 @@ import "cmp/types/v1alpha/price_type.proto"; // This message consists of the value as a Price object and additional fields as // binding, concept, and breakdown. // -// Breakdown is a recursively inhereted object of PriceDetail. This way complex +// Breakdown is a recursively inherited object of PriceDetail. This way complex // pricing structures can be represented. // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/price.proto.dot.xs.svg) @@ -32,8 +32,10 @@ message PriceDetail { // a hotel. Intended to be used in the breakdown. bool locally_payable = 4; - // Type of price and price code - PriceTypeCode price_type_code = 5; + // Type of price breakdown. This is meant to be used in price breakdown + // definitions, when we want to specify the different elements of how a total + // price was computed. + PriceBreakdownType type = 5; // We can use a single PriceDetail to represent a price breakdown. repeated PriceDetail breakdowns = 6; diff --git a/proto/cmp/types/v1alpha/price_type.proto b/proto/cmp/types/v1alpha/price_type.proto index 8ee8814..ca2d1ab 100644 --- a/proto/cmp/types/v1alpha/price_type.proto +++ b/proto/cmp/types/v1alpha/price_type.proto @@ -2,15 +2,35 @@ syntax = "proto3"; package cmp.types.v1alpha; -// TODO: Add documentation to explain the purpose of this message -message PriceTypeCode { - // Type code of the price - string type_code = 1; +// The ChargeType defines whether a price is per person, per group or per unit. Enum +// might be amended upon request. +enum ChargeType { + CHARGE_TYPE_UNSPECIFIED = 0; + CHARGE_TYPE_PER_PERSON = 1; + CHARGE_TYPE_PER_GROUP = 2; + CHARGE_TYPE_PER_UNIT = 3; +} + +// The PriceBreakdownType message is meant to be used in price breakdown +// definitions, when we want to specify the different elements of how a total price +// was computed. +message PriceBreakdownType { + // Type code of the price for traceability towards data in the inventory system or + // contract. + string code = 1; - // A price type can be a type of service or produc delivered or form part of the fee or tax breakdown + // A price type can be a type of service or product delivered or form part of the + // fee or tax breakdown. oneof type { + // Detailing whether the price component is the base (room, flight seat, + // ticket), a unit or a service surcharge or even a negative application of an + // offer or a discount. PriceType price_type = 2; + + // The tax code of the price. TaxCode tax_code = 3; + + // The fee code of the price. FeeCode fee_code = 4; } @@ -155,13 +175,13 @@ message PriceTypeCode { FEE_CODE_LATE_PM_FEE = 86; FEE_CODE_LICENSE_RECOUPMENT_FEE = 87; FEE_CODE_LOCAL_AMENITY_USAGE_FEE = 88; - FEE_CODE_MAINTAINENCE_FEE = 89; + FEE_CODE_MAINTENANCE_FEE = 89; FEE_CODE_LOCAL_FEE = 90; FEE_CODE_LOCAL_GOVERNMENT_FEE = 91; FEE_CODE_LOCAL_ORDINANCE_SURCHARGE = 92; FEE_CODE_LOCATION_CUSTOMER_FEE = 93; FEE_CODE_MAINTENANCE_FACILITY_FEE = 94; - FEE_CODE_MAINTENANCE_FEE = 95; + // FEE_CODE_MAINTENANCE_FEE = 95; duplicate from 89 FEE_CODE_MANDATORY_CHARGES_TOTAL = 96; FEE_CODE_MISCELLANEOUS_FEE = 97; FEE_CODE_MITIGATION_FEE = 98; diff --git a/proto/cmp/types/v1alpha/redemption.proto b/proto/cmp/types/v1alpha/redemption.proto index 6552b18..55db80b 100644 --- a/proto/cmp/types/v1alpha/redemption.proto +++ b/proto/cmp/types/v1alpha/redemption.proto @@ -7,9 +7,9 @@ package cmp.types.v1alpha; // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/redemption.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/redemption.proto.dot.svg) enum RedemptionMethod { - REDEMPTION_METHOD_UNSPECIFIED = 0; - REDEMPTION_METHOD_OTHER = 1; - REDEMPTION_METHOD_DIGITAL = 2; - REDEMPTION_METHOD_PRINT = 3; - REDEMPTION_METHOD_MANIFEST = 4; + REDEMPTION_METHOD_UNSPECIFIED = 0; + REDEMPTION_METHOD_OTHER = 1; + REDEMPTION_METHOD_DIGITAL = 2; + REDEMPTION_METHOD_PRINT = 3; + REDEMPTION_METHOD_MANIFEST = 4; } diff --git a/proto/cmp/types/v1alpha/seat_map.proto b/proto/cmp/types/v1alpha/seat_map.proto index f47458d..6dd336c 100644 --- a/proto/cmp/types/v1alpha/seat_map.proto +++ b/proto/cmp/types/v1alpha/seat_map.proto @@ -4,6 +4,8 @@ package cmp.types.v1alpha; import "cmp/types/v1alpha/description.proto"; import "cmp/types/v1alpha/file.proto"; +import "cmp/types/v1alpha/language.proto"; +import "cmp/types/v1alpha/localized.proto"; import "google/protobuf/wrappers.proto"; // Represents a basic seat with optional features and restrictions. Each seat has a @@ -19,10 +21,10 @@ message Seat { SeatLocation location = 2; // Static features associated with the seat, such as type, amenities, etc. - repeated SeatAttribute features = 3; + repeated LocalizedSeatAttributeSet features = 3; // Restrictions associated with the seat, such as age limits or accessibility requirements. - repeated SeatAttribute restrictions = 4; + repeated LocalizedSeatAttributeSet restrictions = 4; } // List of seats @@ -40,8 +42,8 @@ message Section { // "Orchestra" or "A", "12". Must be unique for each section. string id = 1; - // Human readable name of the section - string name = 2; + // List of localized names Human readable names of the section + repeated cmp.types.v1alpha.LocalizedString names = 2; // Seats in this section. oneof seat_info { @@ -60,9 +62,9 @@ message Section { // used to represent seat location inside this image). cmp.types.v1alpha.Image image = 5; - // A set of localized descriptions for this section, useful for providing + // A list of localized descriptions for this section, useful for providing // information about features and amenities in multiple languages. - cmp.types.v1alpha.LocalizedDescriptionSet localized_description_set = 6; + repeated cmp.types.v1alpha.LocalizedDescriptionSet localized_descriptions = 6; // Nested sections within this section, allowing for a hierarchical representation // of the venue's layout. @@ -90,9 +92,10 @@ message SeatMap { // bitmap format. cmp.types.v1alpha.Image image = 3; - // A set of localized descriptions for the seat map. This can be used to describe + // A list of localized descriptions for the seat map. This can be used to describe // features and amenities of the seating arrangement in multiple languages. - cmp.types.v1alpha.LocalizedDescriptionSet localized_description_set = 4; + // The languages should match those requested in SeatMapRequest + repeated cmp.types.v1alpha.LocalizedDescriptionSet localized_descriptions = 4; } // List of _only_ seat IDs to be used for seat selection or seat availability. @@ -141,6 +144,10 @@ message SeatMapInventory { repeated SectionInventory sections = 2; } +message LocalizedSeatAttributeSet { + Language language = 1; + repeated SeatAttribute seat_attributes = 2; +} /* Helper messages */ // Defines a static attribute for a seat, which can be used for specifying features diff --git a/proto/cmp/types/v1alpha/traveller.proto b/proto/cmp/types/v1alpha/traveller.proto index b273672..c5aaf63 100644 --- a/proto/cmp/types/v1alpha/traveller.proto +++ b/proto/cmp/types/v1alpha/traveller.proto @@ -2,11 +2,10 @@ syntax = "proto3"; package cmp.types.v1alpha; +import "cmp/types/v1alpha/contact_info.proto"; import "cmp/types/v1alpha/country.proto"; import "cmp/types/v1alpha/date.proto"; import "cmp/types/v1alpha/document.proto"; -import "cmp/types/v1alpha/email.proto"; -import "cmp/types/v1alpha/phone.proto"; // Traveller // @@ -65,9 +64,8 @@ message ExtensiveTraveller { // into first_name: John, first_name: Roger, surname: Stephens, surname: Legend. repeated string first_names = 3; repeated string surnames = 4; - cmp.types.v1alpha.Phone phone = 5; - cmp.types.v1alpha.Email email = 6; - repeated cmp.types.v1alpha.Document documents = 7; + cmp.types.v1alpha.ContactInfo contact_info = 5; + repeated cmp.types.v1alpha.Document documents = 6; } // Gender Type