diff --git a/proto/cmp/services/accommodation/v1alpha/info.proto b/proto/cmp/services/accommodation/v1alpha/info.proto index 2d74df4..29e0c05 100644 --- a/proto/cmp/services/accommodation/v1alpha/info.proto +++ b/proto/cmp/services/accommodation/v1alpha/info.proto @@ -5,8 +5,8 @@ package cmp.services.accommodation.v1alpha; import "cmp/services/accommodation/v1alpha/property_types.proto"; import "cmp/types/v1alpha/common.proto"; import "cmp/types/v1alpha/language.proto"; -import "google/protobuf/timestamp.proto"; import "cmp/types/v1alpha/product_code.proto"; +import "google/protobuf/timestamp.proto"; message AccommodationProductInfoRequest { // Message header diff --git a/proto/cmp/services/accommodation/v1alpha/property_types.proto b/proto/cmp/services/accommodation/v1alpha/property_types.proto index a662703..f43ee4d 100644 --- a/proto/cmp/services/accommodation/v1alpha/property_types.proto +++ b/proto/cmp/services/accommodation/v1alpha/property_types.proto @@ -11,10 +11,11 @@ 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"; import "cmp/types/v1alpha/traveller.proto"; import "google/protobuf/timestamp.proto"; -import "cmp/types/v1alpha/product_code.proto"; // ### Property message type // @@ -23,14 +24,15 @@ import "cmp/types/v1alpha/product_code.proto"; // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha/property_types.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha/property_types.proto.dot.svg) message Property { - // Ex: "2023-08-28T12:03:50", + // Ex: "2023-08-28T12:03:50", specifying when the static data of a product was + // last updated google.protobuf.Timestamp last_modified = 1; - // Ex: "AESPMI1234" + // Supplier product Code cmp.types.v1alpha.SupplierProductCode supplier_code = 2; // Product code which can be of different types - repeated cmp.types.v1alpha.ProductCode product_code = 3; + repeated cmp.types.v1alpha.ProductCode product_codes = 3; // Ex: "Beach Hotel Alanya" string name = 4; @@ -60,7 +62,7 @@ message Property { string website = 12; // Status of the property - PropertyStatus status = 13; + cmp.types.v1alpha.ProductStatus status = 13; // Airports // Ex: ["PMI", "ZRH", "AYT"] @@ -97,13 +99,6 @@ enum CategoryUnit { CATEGORY_UNIT_PALMS = 2; } -enum PropertyStatus { - PROPERTY_STATUS_UNSPECIFIED = 0; - PROPERTY_STATUS_DRAFT = 1; - PROPERTY_STATUS_CONFIRMED = 2; - PROPERTY_STATUS_EXPIRED = 3; -} - // This message type contains extended info about a property message PropertyExtendedInfo { // Property @@ -116,7 +111,7 @@ message PropertyExtendedInfo { repeated cmp.types.v1alpha.Video videos = 3; // Segmentation classification - repeated string classification = 4; + repeated string classifications = 4; // Property descriptions repeated cmp.types.v1alpha.LocalizedDescriptionSet localized_descriptions = 5; @@ -137,19 +132,19 @@ message Room { // in the ProductList and the ProductInfo messages, so that the static data like room // amenities, descriptions, images etc. can be married to the dynamic price and // availability data for display to the end user. - string supplier_room_code = 1; + string supplier_code = 1; - // Room name. In case of hotel a standardized room name is often derrived from - // room code structures. Exmple: "superior seaview room". - // For holiday homes we expect names like "Master Bedroom", "Second Bedroom" or - // "Bathroom" when specific descriptions for each room are available. - string supplier_room_name = 2; + // Room name. In case of hotel a standardized room name is often derrived from + // room code structures. Exmple: "superior seaview room". + // For holiday homes we expect names like "Master Bedroom", "Second Bedroom" or + // "Bathroom" when specific descriptions for each room are available. + string supplier_name = 2; // Original room name as assigned by the hotel. In case of spefifically designated room // names by chains and both the chain and the customer wants to adhere to them. // Ex: "CEIBA CLUB", "CEIBA GOVERNORS SUITE", "GOVERNORS SUITE" or "ENCLAVE NATURE VIEW" // For holiday homes specific room names if availbale can be given. - string original_room_name =3; + string original_name = 3; repeated cmp.types.v1alpha.Image images = 4; repeated cmp.types.v1alpha.Video videos = 5; @@ -158,7 +153,7 @@ message Room { repeated cmp.types.v1alpha.LocalizedDescriptionSet descriptions = 6; // Meal plan (Board code) - repeated cmp.types.v1alpha.MealPlan meal_plan = 7; + repeated cmp.types.v1alpha.MealPlan meal_plans = 7; // Beds repeated cmp.types.v1alpha.Bed beds = 8; diff --git a/proto/cmp/services/accommodation/v1alpha/search.proto b/proto/cmp/services/accommodation/v1alpha/search.proto index 08664c4..8740b78 100644 --- a/proto/cmp/services/accommodation/v1alpha/search.proto +++ b/proto/cmp/services/accommodation/v1alpha/search.proto @@ -16,6 +16,7 @@ import "cmp/services/accommodation/v1alpha/search_query_types.proto"; import "cmp/services/accommodation/v1alpha/search_result_types.proto"; import "cmp/types/v1alpha/common.proto"; import "cmp/types/v1alpha/search.proto"; +import "cmp/types/v1alpha/traveller.proto"; // The `Accommodation Search Request` message type facilitates the request for // accommodations like hotel and holiday home searches within the platform. In the @@ -23,7 +24,7 @@ import "cmp/types/v1alpha/search.proto"; // // In "queries" 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 search requests. +// and multi-property search requests. // // For the response this means that there is no grouping of different // room, mealplan or rateplan options in single room or single property searches. @@ -33,7 +34,7 @@ import "cmp/types/v1alpha/search.proto"; // a search for 1 room for 2 adults would be just 1 query, with one travel period and // one set of search parameters. The response has one query_id with many result_ids // for various rooms, mealplans and rateplans in one hotel and depending on the search -// parameters, again for other hotels. Each property+room+rateplan+mealplan is one +// parameters, again for other hotels. Each property+room+rateplan+mealplan is one // result_id with just one unit. // // The simple example is also applicable for holiday homes where one or multiple @@ -62,15 +63,13 @@ import "cmp/types/v1alpha/search.proto"; // In this case the number of rooms is specified and the total amount of travellers, // but no distribution of travellers per room is detailed in the request. The reponse // then hold multiple units for one search_id and result_id, so that if 5 rooms are -// requested, but only 2 standard rooms are available, the requested amount can be +// requested, but only 2 standard rooms are available, the requested amount can be // completed with a different room type (superior, seaview,..) // // In general, the number of available rooms should be considered to ensure that for // requests with multiple rooms or homes, the same room or home is not offered twice // to different travellers. // -// - message AccommodationSearchRequest { // Message header. Contains API version, message info string and end-user wallet // address @@ -108,6 +107,9 @@ message AccommodationSearchResponse { // Unique combinations of bookable search results, like property, repeated AccommodationSearchResult results = 3; + + // Global definition of the travellers for all results to be used via the traveller_id each unit. + repeated cmp.types.v1alpha.BasicTraveller travellers = 4; } // Service definition for Accommodation search diff --git a/proto/cmp/services/accommodation/v1alpha/search_parameters_types.proto b/proto/cmp/services/accommodation/v1alpha/search_parameters_types.proto index c98f480..c929bd7 100644 --- a/proto/cmp/services/accommodation/v1alpha/search_parameters_types.proto +++ b/proto/cmp/services/accommodation/v1alpha/search_parameters_types.proto @@ -18,7 +18,7 @@ message AccommodationSearchParameters { // This "one of" field enforces only one of the fields below. They all share // memory, setting one will remove the others. oneof geo_location { - // FIXME: Do we need a list of location code here? Other fields are not lists. + // A list of location codes or just one code. cmp.types.v1alpha.LocationCodes location_codes = 1; // Single geographic point represented by two double fields. @@ -38,7 +38,7 @@ message AccommodationSearchParameters { repeated cmp.types.v1alpha.MealPlan meal_plan_codes = 6; // Rate plans - repeated cmp.types.v1alpha.RatePlan rate_plan = 7; + repeated cmp.types.v1alpha.RatePlan rate_plans = 7; // Rate Rules // To be used when searching for specific rates like refundable or resellable offers diff --git a/proto/cmp/services/accommodation/v1alpha/search_query_types.proto b/proto/cmp/services/accommodation/v1alpha/search_query_types.proto index 0f5eef1..64a95c0 100644 --- a/proto/cmp/services/accommodation/v1alpha/search_query_types.proto +++ b/proto/cmp/services/accommodation/v1alpha/search_query_types.proto @@ -19,7 +19,7 @@ message AccommodationSearchQuery { cmp.types.v1alpha.TravelPeriod travel_period = 3; // Travellers - repeated cmp.types.v1alpha.Traveller travellers = 4; + repeated cmp.types.v1alpha.BasicTraveller travellers = 4; // Total number of rooms / holiday homes int32 unit_count = 5; diff --git a/proto/cmp/services/accommodation/v1alpha/search_result_types.proto b/proto/cmp/services/accommodation/v1alpha/search_result_types.proto index 79359ca..81ad94d 100644 --- a/proto/cmp/services/accommodation/v1alpha/search_result_types.proto +++ b/proto/cmp/services/accommodation/v1alpha/search_result_types.proto @@ -3,6 +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/cancel_policy.proto"; import "cmp/types/v1alpha/price.proto"; import "cmp/types/v1alpha/rate.proto"; @@ -34,4 +35,7 @@ message AccommodationSearchResult { // Freetext remarks without any functionality string remarks = 7; + + // Status of the result, whether it is immediately bookable or not + cmp.types.v1alpha.Bookability bookable = 8; } diff --git a/proto/cmp/services/accommodation/v1alpha/unit_types.proto b/proto/cmp/services/accommodation/v1alpha/unit_types.proto index 8991ab4..f4d4dcf 100644 --- a/proto/cmp/services/accommodation/v1alpha/unit_types.proto +++ b/proto/cmp/services/accommodation/v1alpha/unit_types.proto @@ -10,7 +10,6 @@ import "cmp/types/v1alpha/product_code.proto"; import "cmp/types/v1alpha/rate.proto"; import "cmp/types/v1alpha/service_fact.proto"; import "cmp/types/v1alpha/travel_period.proto"; -import "cmp/types/v1alpha/traveller.proto"; // 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. @@ -45,8 +44,9 @@ message Unit { // Travel period cmp.types.v1alpha.TravelPeriod travel_period = 5; - // Travellers - repeated cmp.types.v1alpha.Traveller travellers = 6; + // Traveller_id is a list of travellers related to this unit. The details can be found in + // the search response repeated travellers field + repeated int32 traveller_ids = 6; // Beds repeated cmp.types.v1alpha.Bed beds = 7; @@ -77,7 +77,7 @@ message Unit { // Property code which can be of different types cmp.types.v1alpha.ProductCode property_code = 15; - + // Supplier Property code, consistent in ProductList, ProductInfo and Search cmp.types.v1alpha.SupplierProductCode supplier_code = 16; diff --git a/proto/cmp/services/activity/v1alpha/search.proto b/proto/cmp/services/activity/v1alpha/search.proto index bc15130..7fec8db 100644 --- a/proto/cmp/services/activity/v1alpha/search.proto +++ b/proto/cmp/services/activity/v1alpha/search.proto @@ -44,7 +44,7 @@ message ActivitySearchRequest { cmp.types.v1alpha.TravelPeriod travel_period = 5; // Travellers - repeated cmp.types.v1alpha.Traveller travellers = 6; + repeated cmp.types.v1alpha.BasicTraveller travellers = 6; // ### Source Location // @@ -110,6 +110,11 @@ message ActivitySearchResponse { // Unique combinations of bookable search results repeated ActivitySearchResult results = 3; + + // The traveller_id is specified in each result and the ids are detailed with + // basic traveller data only once in the top-level search response to avoid + // repetition. + repeated cmp.types.v1alpha.BasicTraveller travellers = 4; } // ### Activity Search Service diff --git a/proto/cmp/services/activity/v1alpha/search_parameters_types.proto b/proto/cmp/services/activity/v1alpha/search_parameters_types.proto index 4e842b2..c89503b 100644 --- a/proto/cmp/services/activity/v1alpha/search_parameters_types.proto +++ b/proto/cmp/services/activity/v1alpha/search_parameters_types.proto @@ -2,8 +2,8 @@ syntax = "proto3"; package cmp.services.activity.v1alpha; -import "cmp/types/v1alpha/language.proto"; import "cmp/types/v1alpha/duration.proto"; +import "cmp/types/v1alpha/language.proto"; import "cmp/types/v1alpha/price.proto"; import "cmp/types/v1alpha/product_code.proto"; @@ -17,57 +17,41 @@ message ActivitySearchParameters { // Specify the language(s) a potential guide should speak for example a tour in // the Anne Frank house in Amsterdam in French or the tour at the pyramids in // Egypt should be in Russian - repeated cmp.types.v1alpha.Language spoken_language = 1; - - // Specify one or more product codes to be included in the search response - // These can be of different types - // Ex: "TC000000" - repeated cmp.types.v1alpha.ProductCode product_codes = 2; + repeated cmp.types.v1alpha.Language spoken_languages = 1; // Specify one or more supplier codes to be included in the search response // These must match the supplier codes provided in the ProductList and // ProductInfo messages - repeated cmp.types.v1alpha.SupplierProductCode supplier_codes = 3; + repeated cmp.types.v1alpha.SupplierProductCode supplier_codes = 2; + + // Specify one or more product codes to be included in the search response + // These can be of different types + repeated cmp.types.v1alpha.ProductCode product_codes = 3; - // Specify one or more activity IDs to be included in the search response + // Specify one or more unit IDs to be included in the search response // 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 + // Code and description match the information provided in the ProductList and // ProductInfo message. These are in general also supplier specific. - // Ex: "EESPMI46VY" - repeated string activity_id = 4; + repeated string unit_codes = 4; // Specify one or more service codes to be included in the search response // 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 - // Ex: "XO" - repeated string service_code = 5; - - // Specify one or more category codes to be included in the search response - // This concept is covering classification and segmentation aspects like for example - // Museum tours, Outdoor activities, Theme parks etc... - // Code and description match the information provided in the ProductInfo message - // These are in general also supplier specific - repeated string category_code = 6; - - // Specify one or more type codes to be included in the search response - // A code to identify a specific type of excursion like Leisure, Activity, Learning, etc - // Code and description match the information provided in the ProductInfo message - // These are in general also supplier specific - repeated string type_code = 7; + repeated string service_codes = 5; // Duration // // Specify the minimal and maximum duration of an activity to be included in the // search response - cmp.types.v1alpha.Duration min_duration = 8; - cmp.types.v1alpha.Duration max_duration = 9; + cmp.types.v1alpha.Duration min_duration = 6; + cmp.types.v1alpha.Duration max_duration = 7; // Pricerange // // Specify the minimum and maximum price of an activity to be included in the // search response - cmp.types.v1alpha.Price min_price = 10; - cmp.types.v1alpha.Price max_price = 11; -} \ No newline at end of file + cmp.types.v1alpha.Price min_price = 8; + cmp.types.v1alpha.Price max_price = 9; +} diff --git a/proto/cmp/services/activity/v1alpha/search_result_types.proto b/proto/cmp/services/activity/v1alpha/search_result_types.proto index 8eed34e..6c5454e 100644 --- a/proto/cmp/services/activity/v1alpha/search_result_types.proto +++ b/proto/cmp/services/activity/v1alpha/search_result_types.proto @@ -3,11 +3,12 @@ syntax = "proto3"; package cmp.services.activity.v1alpha; import "cmp/types/v1alpha/address.proto"; +import "cmp/types/v1alpha/bookable.proto"; import "cmp/types/v1alpha/datetime_range.proto"; import "cmp/types/v1alpha/location.proto"; import "cmp/types/v1alpha/price.proto"; -import "google/protobuf/timestamp.proto"; import "cmp/types/v1alpha/product_code.proto"; +import "google/protobuf/timestamp.proto"; // This type represents a search result and is used in the `ActivitySearchResponse` // message. @@ -49,44 +50,31 @@ message ActivitySearchResult { // // See extensive explanations in search_parameters_types message Activity { - // Ex: "TC000000" - cmp.types.v1alpha.SupplierProductCode supplier_code = 1; - - // Product code which can be of different types - cmp.types.v1alpha.ProductCode product_code = 2; - - // Ex: "Helicopter Tour Heli" - string product_name = 3; - - // Ex: "EESPMI46VY" - string activity_id = 4; - - // Ex: "Tour (40 min)" - string activity_name = 5; - - // Ex: "XO" - string service_code = 6; - - // Ex: "with transfer from/to hotel" - string service_name = 7; - - // Ex: "XA" - string category_code = 8; - - // Ex: "Excursions & Activities" - string category_name = 9; - - // Ex: "SF" - string type_code = 10; - - // Ex: "Safari" - string type_name = 11; - - // Status - // - // FIXME: We need to make this an ENUM (this is also used for several other - // verticals) - string status = 12; + // Ex: "2023-08-28T12:03:50", specifying when the static data of a product was last updated + google.protobuf.Timestamp last_modified = 1; + // Supplier Product codes for the result + // These must match the supplier codes provided in the ProductList and + // ProductInfo messages + cmp.types.v1alpha.SupplierProductCode supplier_code = 2; + + // External Product codes for the result. These can be of different types + cmp.types.v1alpha.ProductCode product_code = 3; + + // 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 + // ProductInfo message. These are in general also supplier specific. + string unit_code = 4; + + // 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 + string service_code = 5; + + // Status of the result, whether it is immediately bookable or not + cmp.types.v1alpha.Bookability bookable = 6; } // ### Activity Location diff --git a/proto/cmp/services/network/v1alpha/fee.proto b/proto/cmp/services/network/v1alpha/fee.proto index eb42db3..47056ea 100644 --- a/proto/cmp/services/network/v1alpha/fee.proto +++ b/proto/cmp/services/network/v1alpha/fee.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package cmp.services.network.v1alpha; -import "cmp/types/v1alpha/asset.proto"; - // ### Network Fee Message Type // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/network/v1alpha/fee.proto.dot.xs.svg) @@ -11,13 +9,8 @@ import "cmp/types/v1alpha/asset.proto"; message NetworkFee { // Network fee, unit is nCAM // 1 CAM == 1 000 000 000 nCAM + // TODO: explain in more detail when we have defined the CAM denominator on the T-Chain int32 amount = 1; - - // Asset of the fee - // - // FIXME: Not sure if we need this. For CAM it's a well known asset on the chain - // but maybe we'll need other assets also? - cmp.types.v1alpha.Asset asset = 2; } message GetNetworkFeeRequest { diff --git a/proto/cmp/services/transport/v1alpha/search.proto b/proto/cmp/services/transport/v1alpha/search.proto index 71fe5cb..e3162a7 100644 --- a/proto/cmp/services/transport/v1alpha/search.proto +++ b/proto/cmp/services/transport/v1alpha/search.proto @@ -16,6 +16,7 @@ import "cmp/services/transport/v1alpha/search_result_types.proto"; import "cmp/types/v1alpha/common.proto"; import "cmp/types/v1alpha/content_source.proto"; import "cmp/types/v1alpha/search.proto"; +import "cmp/types/v1alpha/traveller.proto"; // ### Transport Search Request message TransportSearchRequest { @@ -56,6 +57,9 @@ message TransportSearchResponse { // Transit search results repeated TransportSearchResult results = 4; + + // Global definition of the travellers for all results to be used via the traveller_id + repeated cmp.types.v1alpha.BasicTraveller travellers = 5; } // Transport Search Service definition. diff --git a/proto/cmp/services/transport/v1alpha/search_parameters_types.proto b/proto/cmp/services/transport/v1alpha/search_parameters_types.proto index 839cf51..69f59ef 100644 --- a/proto/cmp/services/transport/v1alpha/search_parameters_types.proto +++ b/proto/cmp/services/transport/v1alpha/search_parameters_types.proto @@ -2,10 +2,10 @@ syntax = "proto3"; package cmp.services.transport.v1alpha; +import "cmp/types/v1alpha/duration.proto"; import "cmp/types/v1alpha/price.proto"; import "cmp/types/v1alpha/product_code.proto"; import "cmp/types/v1alpha/time.proto"; -import "cmp/types/v1alpha/duration.proto"; // ### Transport Search Parameters // @@ -35,7 +35,7 @@ message TransportSearchParameters { // One or more brand codes or distribution channels for which assigned product is // to be included in the search response - repeated string brand_code = 7; + repeated string brand_codes = 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 diff --git a/proto/cmp/services/transport/v1alpha/search_query_types.proto b/proto/cmp/services/transport/v1alpha/search_query_types.proto index 3b26ee3..c5b4c78 100644 --- a/proto/cmp/services/transport/v1alpha/search_query_types.proto +++ b/proto/cmp/services/transport/v1alpha/search_query_types.proto @@ -22,8 +22,8 @@ message TransportSearchQuery { // ID int32 query_id = 1; - // Travellers - repeated cmp.types.v1alpha.Traveller travellers = 2; + // Global definition of the travellers for all requests to be used via the traveller_id + repeated cmp.types.v1alpha.BasicTraveller travellers = 2; // Trips repeated QueryTrip trips = 3; diff --git a/proto/cmp/services/transport/v1alpha/search_result_types.proto b/proto/cmp/services/transport/v1alpha/search_result_types.proto index 806b913..0a10e5d 100644 --- a/proto/cmp/services/transport/v1alpha/search_result_types.proto +++ b/proto/cmp/services/transport/v1alpha/search_result_types.proto @@ -3,13 +3,13 @@ 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/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/price.proto"; import "cmp/types/v1alpha/rate.proto"; -import "cmp/types/v1alpha/service_fact.proto"; -import "cmp/types/v1alpha/traveller.proto"; // Transport search result // @@ -29,35 +29,41 @@ message TransportSearchResult { string offer_id = 3; // Travellers - repeated cmp.types.v1alpha.Traveller travellers = 4; + repeated int32 traveller_ids = 4; - // Travelling trip. See `search.proto` documentation - Trip travelling_trip = 5; - - // Returning trip. See `search.proto` documentation - Trip returning_trip = 6; + // Travelling trip. A travelling trip can be repeated and will be in many cases 2 + // trips: an outbound and returning trip from and to the same destination. + // However, it is very much possible to specify your trip around the world into + // several "Trips". For example AMS-NYC and after a couple of days NYC-IAH. There + // we rent a car and do a road trip to San Fransisco and we take a flight from SFO + // to SYD, where afer a couple of days we move on to Indonesia, Thailand, Japan, + // Türkiye and back to Amsterdam again. + repeated Trip travelling_trips = 5; // Total Price - cmp.types.v1alpha.PriceDetail total_price = 7; - - // Services - repeated cmp.types.v1alpha.ServiceFact services = 8; + cmp.types.v1alpha.PriceDetail total_price = 6; // Rate Rules - repeated cmp.types.v1alpha.RateRule rate_rules = 9; + repeated cmp.types.v1alpha.RateRule rate_rules = 7; // Fulfillment - repeated cmp.types.v1alpha.Fulfillment fulfillments = 10; //FIXME: Can linktype be an ENUM? + repeated cmp.types.v1alpha.Fulfillment fulfillments = 8; + + // Status of the result, whether it is immediately bookable or not + cmp.types.v1alpha.Bookability bookable = 9; // Validity of the search option. // // `DateTimeRange` type with `start_date` and `end_date` in which the option can // be booked. If the start_date is omitted, the offer can be booked until the // end-date. - cmp.types.v1alpha.DateTimeRange validity = 11; + cmp.types.v1alpha.DateTimeRange validity = 10; // Cancel Policy - cmp.types.v1alpha.CancelPolicy cancel_policy = 12; + cmp.types.v1alpha.CancelPolicy cancel_policy = 11; + + // Change Policy + cmp.types.v1alpha.ChangePolicy change_policy = 12; // Observations string observations = 13; diff --git a/proto/cmp/services/transport/v1alpha/trip_types.proto b/proto/cmp/services/transport/v1alpha/trip_types.proto index e201aa1..be6879e 100644 --- a/proto/cmp/services/transport/v1alpha/trip_types.proto +++ b/proto/cmp/services/transport/v1alpha/trip_types.proto @@ -3,11 +3,12 @@ syntax = "proto3"; package cmp.services.transport.v1alpha; import "cmp/types/v1alpha/baggage.proto"; +import "cmp/types/v1alpha/duration.proto"; import "cmp/types/v1alpha/location.proto"; import "cmp/types/v1alpha/measurement.proto"; import "cmp/types/v1alpha/price.proto"; -import "cmp/types/v1alpha/duration.proto"; import "cmp/types/v1alpha/product_code.proto"; +import "cmp/types/v1alpha/service_fact.proto"; import "google/protobuf/timestamp.proto"; // This message type represents a one way trip, either travelling or returning. @@ -15,14 +16,9 @@ import "google/protobuf/timestamp.proto"; // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha/trip_types.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha/trip_types.proto.dot.svg) message Trip { - // Departure event - TransitEvent departure = 1; - - // Arrival event - TransitEvent arrival = 2; - - // Trip segments - repeated TripSegment segments = 3; + // Departure and Arrival dates and times can be derrived from the first and last segments + // Trip segments are the legs offered + repeated TripSegment segments = 1; } // Represents a departure or arrival event @@ -64,11 +60,11 @@ message TripSegment { // flight number in the number field. // // For train some operators use a combination of a code and a number like - // Eurostar, but others just use a code or a number (SNCF). + // Eurostar, but others just use a code or a number (SNCF). // // Transfers are often identified by just a product code servicing an area. cmp.types.v1alpha.ProductCode product_code = 5; - + // Supplier specific code, matching the supplier code in ProductList and ProductInfo // messages cmp.types.v1alpha.SupplierProductCode supplier_code = 6; @@ -95,31 +91,36 @@ message TripSegment { // transfer: "Shuttle", "Private", "VIP Limosine", "Speedy Shuttle",... string service_type_description = 10; - // Trip duration in minutes - cmp.types.v1alpha.Duration trip_duration = 11; + // Included, optional or compulsary services for this segment or leg. Just a code and + // description can be included if it is a package (seat, priority, large carry-on). + // or a price detail can be included for optionally pre-ordered meals for example. + repeated cmp.types.v1alpha.ServiceFact services = 11; + + // Segment duration in minutes + cmp.types.v1alpha.Duration segment_duration = 12; - // Trip Distance + // Segment Distance // // Ex: `Length(value=15, unit=LengthUnit.DISTANCE_UNIT_KILOMETERS)` - cmp.types.v1alpha.Length trip_distance = 12; + cmp.types.v1alpha.Length segment_distance = 13; // Min PAX // // Ex: `1` - int32 min_pax = 13; + int32 min_pax = 14; // Max PAX // // Ex: `3` - int32 max_pax = 14; + int32 max_pax = 15; // Luggage // // Ex: `3` - cmp.types.v1alpha.Baggage baggage = 15; + cmp.types.v1alpha.Baggage baggage = 16; // Price // // Ex: `Price(net=240, currency=Currency.CURRENCY_EUR) - cmp.types.v1alpha.Price price = 16; -} \ No newline at end of file + cmp.types.v1alpha.Price price = 17; +} diff --git a/proto/cmp/types/v1alpha/asset.proto b/proto/cmp/types/v1alpha/asset.proto deleted file mode 100644 index fc3c84a..0000000 --- a/proto/cmp/types/v1alpha/asset.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; - -package cmp.types.v1alpha; - -// An on-chain asset on the Camino Network -// -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/asset.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/asset.proto.dot.svg) -message Asset { - string asset_id = 1; - string name = 2; - string symbol = 3; - uint32 decimals = 4; -} diff --git a/proto/cmp/types/v1alpha/bookable.proto b/proto/cmp/types/v1alpha/bookable.proto new file mode 100644 index 0000000..4bd8c50 --- /dev/null +++ b/proto/cmp/types/v1alpha/bookable.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +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) +message Bookability { + Bookable bookable = 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 + // specified time. If confirmation id not provided, the booking is to be + // considered "rejected". + cmp.types.v1alpha.Time confirmation_time = 2; +} + +enum Bookable { + BOOKABLE_UNSPECIFIED = 0; + BOOKABLE_AVAILABLE = 1; + BOOKABLE_ON_REQUEST = 2; +} diff --git a/proto/cmp/types/v1alpha/cancel_policy.proto b/proto/cmp/types/v1alpha/cancel_policy.proto index 00ed4fc..fc181d8 100644 --- a/proto/cmp/types/v1alpha/cancel_policy.proto +++ b/proto/cmp/types/v1alpha/cancel_policy.proto @@ -15,11 +15,12 @@ import "google/protobuf/timestamp.proto"; // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/cancel_policy.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/cancel_policy.proto.dot.svg) message CancelPolicy { - // Cancellation policy refundable or not + // the search result is refundable or not (at least one cancellation penalty exists + // that provides a (partial) refund) bool refundable = 1; // The "free cancellation upto" identifier specifies the exact DateTime upto when - // a booking can be cancelled free of charge. + // this booking can be cancelled free of charge. google.protobuf.Timestamp free_cancellation_upto = 2; // Full cancellation policies can be complex and extensive. Inclusion in search @@ -37,7 +38,7 @@ message CancelPolicy { repeated CancelPenalty cancel_penalties = 3; } -//Cancellation Penalty +// Cancellation Penalty message CancelPenalty { // When this penalty is valid. Either use the start and end date of the DateTime // range @@ -52,5 +53,5 @@ message CancelPenalty { string description = 3; // For which rateplan the penalty is valid. - repeated string valid_for_rate_plan = 4; + repeated string valid_for_rate_plans = 4; } diff --git a/proto/cmp/types/v1alpha/change_policy.proto b/proto/cmp/types/v1alpha/change_policy.proto new file mode 100644 index 0000000..ac6f8f2 --- /dev/null +++ b/proto/cmp/types/v1alpha/change_policy.proto @@ -0,0 +1,60 @@ +syntax = "proto3"; + +package cmp.types.v1alpha; + +import "cmp/types/v1alpha/datetime_range.proto"; +import "cmp/types/v1alpha/price.proto"; +import "google/protobuf/timestamp.proto"; + +// Change Policy: The change policy section consists of 3 options: +// +// - A simple boolean for changable or non-changable search results +// - A "free change upto" DateTime for a search result +// - Multiple change types with start/end DateTime stamps for a search result +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/change_policy.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/change_policy.proto.dot.svg) +message ChangePolicy { + // the search result is changeable or not (at least one change type exists) + bool change_allowed = 1; + + // The "free change upto" identifier specifies the exact DateTime upto when + // this search result can be changed free of charge. + google.protobuf.Timestamp free_change_upto = 2; + + // Full change policies can be complex and extensive. Inclusion in search + // messages should be avoided because they substantially increase the message size + // for each option and in general detailed cancellation information is required at + // a later step in the booking flow. + // + // Specify several change types with their change fee relative to the start + // date-time of the service. When in the inventory system several entries with + // different hours before specified, like for example 10€ from 240 hours (10 days) + // before consumption, 50€ from 5 days before consumption and 100€ from 24 hours + // before consumption, they must be computed to one uniform format of date ranges + // and fees, related to the start DateTime of the service or product + // delivery. + repeated ChangeType change_types = 3; +} + +// ChangeTypes +// TODO: Add documentation +message ChangeType { + // Change type code + string change_type_code = 1; + + // When this change type and date is valid. Either use the start and end date of + // the DateTime range + cmp.types.v1alpha.DateTimeRange datetime_range = 2; + + // change fee. Percentages of the selling price are purposely not allowed for + // simplicity and uniformity. + cmp.types.v1alpha.Price value = 3; + + // Description of the change in a non computable manner. The Description should be + // in the language that is specified in the request. + string description = 4; + + // For which rateplan the policy is valid. + repeated string valid_for_rate_plans = 5; +} diff --git a/proto/cmp/types/v1alpha/common.proto b/proto/cmp/types/v1alpha/common.proto index 127c7e0..bf5b246 100644 --- a/proto/cmp/types/v1alpha/common.proto +++ b/proto/cmp/types/v1alpha/common.proto @@ -3,6 +3,31 @@ syntax = "proto3"; // ## Camino Messenger Protocol (CMP) Types Package // // Commonly used message types across all CMP messages +// +// While parsing protobuf one can only distinguish between "a message is present" +// and "a message is absent". All fields (which are not messages) inside a present +// message are automatically filled with the default values like empty string or in +// case of an enum/integer value: 0. +// With that in mind all enums are defined as **0=Unspecified** as this is a default +// value similar to "field was not given at all". So ultimately one can not distinguish +// between "someone has deliberately filled the field with the default value 0" or +// "the field was not given at all". +// Conclusively the field value 0 of enums is basically "invalid" depending on the context. +// +// In the context of validation this would mean that if an enum is optional the field +// value of 0 is "allowed" (meaning that the field was just not given and conclusively +// everything bound/related to that is also invalid). +// If an enum is required the field value of 0 is forbidden. +// +// The exact same applies for other field types beside enum, but the validation logic might +// be a bit more complex than simply "valid enum != 0". +// +// Protobuf keeps the **order of the values inside a repeated field**. Conclusively if +// you specify for example in a transport message trips travelling 1 June DUS-NYC, +// travelling 15 June LAS->LAX, travelling 15 June LAX->LAS, returning NYC->DUS, by specifying +// the trips in this order it is defined that the trip in the middle is a same day return +// LAS to LAX and not LAX to LAS as then it should have been specified as travelling 15 June +// LAX->LAS, travelling 15 June LAS->LAX. package cmp.types.v1alpha; // ### CM Message Header @@ -11,6 +36,12 @@ package cmp.types.v1alpha; // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/common.proto.dot.svg) message Header { // Protocol Version + // The request and response should always hold the true version implemented. + // This will help transparency and troubleshooting when issues arise. For example + // in case a new filter is introduced with version 1.3.0 and a response by a supply + // partner is still in version 1.1.0 that does not have the new filter. Obviously the + // supply partner has not processed the new field and the response is not filtered as + // specified in the request. Version version = 1; // End-user wallet ID for personalization purposes diff --git a/proto/cmp/types/v1alpha/currency.proto b/proto/cmp/types/v1alpha/currency.proto index c0b3bb5..7b6add3 100644 --- a/proto/cmp/types/v1alpha/currency.proto +++ b/proto/cmp/types/v1alpha/currency.proto @@ -2,6 +2,20 @@ syntax = "proto3"; package cmp.types.v1alpha; +import "cmp/types/v1alpha/token.proto"; +import "google/protobuf/empty.proto"; + +// See extensive explanation at Price in price.proto +message Currency { + oneof currency { + cmp.types.v1alpha.IsoCurrency iso_currency = 1; + + cmp.types.v1alpha.TokenCurrency token_currency = 2; + + google.protobuf.Empty native_token = 3; + } +} + // Currency list of ISO 4217 standard // // First 20 currencies are the most traded currencies in the world. This is done to @@ -9,163 +23,163 @@ package cmp.types.v1alpha; // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/currency.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/currency.proto.dot.svg) -enum Currency { - CURRENCY_UNSPECIFIED = 0; // Placeholder or unspecified currency +enum IsoCurrency { + ISO_CURRENCY_UNSPECIFIED = 0; // Placeholder or unspecified currency - CURRENCY_AUD = 1; // Australian dollar - CURRENCY_BRL = 2; // Brazilian real - CURRENCY_CAD = 3; // Canadian dollar - CURRENCY_CHF = 4; // Swiss franc - CURRENCY_CNY = 5; // Renminbi (China) - CURRENCY_EUR = 6; // Euro - CURRENCY_GBP = 7; // British pound - CURRENCY_HKD = 8; // Hong Kong dollar - CURRENCY_IDR = 9; // Indonesian rupiah - CURRENCY_INR = 10; // Indian rupee - CURRENCY_JPY = 11; // Japanese yen - CURRENCY_KRW = 12; // South Korean won - CURRENCY_MXN = 13; // Mexican peso - CURRENCY_NOK = 14; // Norwegian krone - CURRENCY_RUB = 15; // Russian ruble - CURRENCY_SAR = 16; // Saudi riyal - CURRENCY_SEK = 17; // Swedish krona - CURRENCY_SGD = 18; // Singapore dollar - CURRENCY_TRY = 19; // Turkish lira - CURRENCY_USD = 20; // United States dollar + ISO_CURRENCY_AUD = 1; // Australian dollar + ISO_CURRENCY_BRL = 2; // Brazilian real + ISO_CURRENCY_CAD = 3; // Canadian dollar + ISO_CURRENCY_CHF = 4; // Swiss franc + ISO_CURRENCY_CNY = 5; // Renminbi (China) + ISO_CURRENCY_EUR = 6; // Euro + ISO_CURRENCY_GBP = 7; // British pound + ISO_CURRENCY_HKD = 8; // Hong Kong dollar + ISO_CURRENCY_IDR = 9; // Indonesian rupiah + ISO_CURRENCY_INR = 10; // Indian rupee + ISO_CURRENCY_JPY = 11; // Japanese yen + ISO_CURRENCY_KRW = 12; // South Korean won + ISO_CURRENCY_MXN = 13; // Mexican peso + ISO_CURRENCY_NOK = 14; // Norwegian krone + ISO_CURRENCY_RUB = 15; // Russian ruble + ISO_CURRENCY_SAR = 16; // Saudi riyal + ISO_CURRENCY_SEK = 17; // Swedish krona + ISO_CURRENCY_SGD = 18; // Singapore dollar + ISO_CURRENCY_TRY = 19; // Turkish lira + ISO_CURRENCY_USD = 20; // United States dollar - CURRENCY_AED = 21; // United Arab Emirates dirham - CURRENCY_AFN = 22; // Afghan afghani - CURRENCY_ALL = 23; // Albanian lek - CURRENCY_AMD = 24; // Armenian dram - CURRENCY_ANG = 25; // Netherlands Antillean guilder - CURRENCY_AOA = 26; // Angolan kwanza - CURRENCY_ARS = 27; // Argentine peso - CURRENCY_AWG = 28; // Aruban florin - CURRENCY_AZN = 29; // Azerbaijani manat - CURRENCY_BAM = 30; // Bosnia and Herzegovina convertible mark - CURRENCY_BBD = 31; // Barbados dollar - CURRENCY_BDT = 32; // Bangladeshi taka - CURRENCY_BGN = 33; // Bulgarian lev - CURRENCY_BHD = 34; // Bahraini dinar - CURRENCY_BIF = 35; // Burundian franc - CURRENCY_BMD = 36; // Bermudian dollar - CURRENCY_BND = 37; // Brunei dollar - CURRENCY_BOB = 38; // Bolivian boliviano - CURRENCY_BSD = 39; // Bahamian dollar - CURRENCY_BTN = 40; // Bhutanese ngultrum - CURRENCY_BWP = 41; // Botswana pula - CURRENCY_BYN = 42; // Belarusian ruble - CURRENCY_BZD = 43; // Belize dollar - CURRENCY_CDF = 44; // Congolese franc - CURRENCY_CLP = 45; // Chilean peso - CURRENCY_COP = 46; // Colombian peso - CURRENCY_CRC = 47; // Costa Rican colón - CURRENCY_CUC = 48; // Cuban convertible peso - CURRENCY_CUP = 49; // Cuban peso - CURRENCY_CVE = 50; // Cape Verdean escudo - CURRENCY_CZK = 51; // Czech koruna - CURRENCY_DJF = 52; // Djiboutian franc - CURRENCY_DKK = 53; // Danish krone - CURRENCY_DOP = 54; // Dominican peso - CURRENCY_DZD = 55; // Algerian dinar - CURRENCY_EGP = 56; // Egyptian pound - CURRENCY_ERN = 57; // Eritrean nakfa - CURRENCY_ETB = 58; // Ethiopian birr - CURRENCY_FJD = 59; // Fijian dollar - CURRENCY_FKP = 60; // Falkland Islands pound - CURRENCY_GEL = 61; // Georgian lari - CURRENCY_GHS = 62; // Ghanaian cedi - CURRENCY_GIP = 63; // Gibraltar pound - CURRENCY_GMD = 64; // Gambian dalasi - CURRENCY_GNF = 65; // Guinean franc - CURRENCY_GTQ = 66; // Guatemalan quetzal - CURRENCY_GYD = 67; // Guyanese dollar - CURRENCY_HNL = 68; // Honduran lempira - CURRENCY_HRK = 69; // Croatian kuna - CURRENCY_HTG = 70; // Haitian gourde - CURRENCY_HUF = 71; // Hungarian forint - CURRENCY_ILS = 72; // Israeli new shekel - CURRENCY_IQD = 73; // Iraqi dinar - CURRENCY_IRR = 74; // Iranian rial - CURRENCY_ISK = 75; // Icelandic króna - CURRENCY_JMD = 76; // Jamaican dollar - CURRENCY_JOD = 77; // Jordanian dinar - CURRENCY_KES = 78; // Kenyan shilling - CURRENCY_KGS = 79; // Kyrgyzstani som - CURRENCY_KHR = 80; // Cambodian riel - CURRENCY_KMF = 81; // Comoro franc - CURRENCY_KPW = 82; // North Korean won - CURRENCY_KWD = 83; // Kuwaiti dinar - CURRENCY_KYD = 84; // Cayman Islands dollar - CURRENCY_KZT = 85; // Kazakhstani tenge - CURRENCY_LAK = 86; // Lao kip - CURRENCY_LBP = 87; // Lebanese pound - CURRENCY_LKR = 88; // Sri Lanka rupee - CURRENCY_LRD = 89; // Liberian dollar - CURRENCY_LSL = 90; // Lesotho loti - CURRENCY_LYD = 91; // Libyan dinar - CURRENCY_MAD = 92; // Moroccan dirham - CURRENCY_MDL = 93; // Moldovan leu - CURRENCY_MGA = 94; // Malagasy ariary - CURRENCY_MKD = 95; // Macedonian denar - CURRENCY_MMK = 96; // Myanmar kyat - CURRENCY_MNT = 97; // Mongolian tögrög - CURRENCY_MOP = 98; // Macanese pataca - CURRENCY_MRU = 99; // Mauritanian ouguiya - CURRENCY_MUR = 100; // Mauritian rupee - CURRENCY_MVR = 101; // Maldivian rufiyaa - CURRENCY_MWK = 102; // Malawian kwacha - CURRENCY_MYR = 103; // Malaysian ringgit - CURRENCY_MZN = 104; // Mozambican metical - CURRENCY_NAD = 105; // Namibian dollar - CURRENCY_NGN = 106; // Nigerian naira - CURRENCY_NIO = 107; // Nicaraguan córdoba - CURRENCY_NPR = 108; // Nepalese rupee - CURRENCY_NZD = 109; // New Zealand dollar - CURRENCY_OMR = 110; // Omani rial - CURRENCY_PAB = 111; // Panamanian balboa - CURRENCY_PEN = 112; // Peruvian sol - CURRENCY_PGK = 113; // Papua New Guinean kina - CURRENCY_PHP = 114; // Philippine peso - CURRENCY_PKR = 115; // Pakistani rupee - CURRENCY_PLN = 116; // Polish złoty - CURRENCY_PYG = 117; // Paraguayan guaraní - CURRENCY_QAR = 118; // Qatari riyal - CURRENCY_RON = 119; // Romanian leu - CURRENCY_RSD = 120; // Serbian dinar - CURRENCY_RWF = 121; // Rwandan franc - CURRENCY_SBD = 122; // Solomon Islands dollar - CURRENCY_SCR = 123; // Seychellois rupee - CURRENCY_SDG = 124; // Sudanese pound - CURRENCY_SHP = 125; // Saint Helena pound - CURRENCY_SLL = 126; // Sierra Leonean leone - CURRENCY_SOS = 127; // Somali shilling - CURRENCY_SRD = 128; // Surinamese dollar - CURRENCY_SSP = 129; // South Sudanese pound - CURRENCY_STN = 130; // São Tomé and Príncipe dobra - CURRENCY_SVC = 131; // Salvadoran colón - CURRENCY_SYP = 132; // Syrian pound - CURRENCY_SZL = 133; // Swazi lilangeni - CURRENCY_THB = 134; // Thai baht - CURRENCY_TJS = 135; // Tajikistani somoni - CURRENCY_TMT = 136; // Turkmenistan manat - CURRENCY_TND = 137; // Tunisian dinar - CURRENCY_TOP = 138; // Tongan paʻanga - CURRENCY_TTD = 139; // Trinidad and Tobago dollar - CURRENCY_TWD = 140; // New Taiwan dollar - CURRENCY_TZS = 141; // Tanzanian shilling - CURRENCY_UAH = 142; // Ukrainian hryvnia - CURRENCY_UGX = 143; // Ugandan shilling - CURRENCY_UYU = 144; // Uruguayan peso - CURRENCY_UZS = 145; // Uzbekistani soʻm - CURRENCY_VND = 146; // Vietnamese đồng - CURRENCY_VUV = 147; // Vanuatu vatu - CURRENCY_WST = 148; // Samoan tālā - CURRENCY_XAF = 149; // Central African CFA franc - CURRENCY_XCD = 150; // East Caribbean dollar - CURRENCY_XOF = 151; // West African CFA franc - CURRENCY_XPF = 152; // CFP franc - CURRENCY_YER = 153; // Yemeni rial - CURRENCY_ZAR = 154; // South African rand - CURRENCY_ZMW = 155; // Zambian kwacha + ISO_CURRENCY_AED = 21; // United Arab Emirates dirham + ISO_CURRENCY_AFN = 22; // Afghan afghani + ISO_CURRENCY_ALL = 23; // Albanian lek + ISO_CURRENCY_AMD = 24; // Armenian dram + ISO_CURRENCY_ANG = 25; // Netherlands Antillean guilder + ISO_CURRENCY_AOA = 26; // Angolan kwanza + ISO_CURRENCY_ARS = 27; // Argentine peso + ISO_CURRENCY_AWG = 28; // Aruban florin + ISO_CURRENCY_AZN = 29; // Azerbaijani manat + ISO_CURRENCY_BAM = 30; // Bosnia and Herzegovina convertible mark + ISO_CURRENCY_BBD = 31; // Barbados dollar + ISO_CURRENCY_BDT = 32; // Bangladeshi taka + ISO_CURRENCY_BGN = 33; // Bulgarian lev + ISO_CURRENCY_BHD = 34; // Bahraini dinar + ISO_CURRENCY_BIF = 35; // Burundian franc + ISO_CURRENCY_BMD = 36; // Bermudian dollar + ISO_CURRENCY_BND = 37; // Brunei dollar + ISO_CURRENCY_BOB = 38; // Bolivian boliviano + ISO_CURRENCY_BSD = 39; // Bahamian dollar + ISO_CURRENCY_BTN = 40; // Bhutanese ngultrum + ISO_CURRENCY_BWP = 41; // Botswana pula + ISO_CURRENCY_BYN = 42; // Belarusian ruble + ISO_CURRENCY_BZD = 43; // Belize dollar + ISO_CURRENCY_CDF = 44; // Congolese franc + ISO_CURRENCY_CLP = 45; // Chilean peso + ISO_CURRENCY_COP = 46; // Colombian peso + ISO_CURRENCY_CRC = 47; // Costa Rican colón + ISO_CURRENCY_CUC = 48; // Cuban convertible peso + ISO_CURRENCY_CUP = 49; // Cuban peso + ISO_CURRENCY_CVE = 50; // Cape Verdean escudo + ISO_CURRENCY_CZK = 51; // Czech koruna + ISO_CURRENCY_DJF = 52; // Djiboutian franc + ISO_CURRENCY_DKK = 53; // Danish krone + ISO_CURRENCY_DOP = 54; // Dominican peso + ISO_CURRENCY_DZD = 55; // Algerian dinar + ISO_CURRENCY_EGP = 56; // Egyptian pound + ISO_CURRENCY_ERN = 57; // Eritrean nakfa + ISO_CURRENCY_ETB = 58; // Ethiopian birr + ISO_CURRENCY_FJD = 59; // Fijian dollar + ISO_CURRENCY_FKP = 60; // Falkland Islands pound + ISO_CURRENCY_GEL = 61; // Georgian lari + ISO_CURRENCY_GHS = 62; // Ghanaian cedi + ISO_CURRENCY_GIP = 63; // Gibraltar pound + ISO_CURRENCY_GMD = 64; // Gambian dalasi + ISO_CURRENCY_GNF = 65; // Guinean franc + ISO_CURRENCY_GTQ = 66; // Guatemalan quetzal + ISO_CURRENCY_GYD = 67; // Guyanese dollar + ISO_CURRENCY_HNL = 68; // Honduran lempira + ISO_CURRENCY_HRK = 69; // Croatian kuna + ISO_CURRENCY_HTG = 70; // Haitian gourde + ISO_CURRENCY_HUF = 71; // Hungarian forint + ISO_CURRENCY_ILS = 72; // Israeli new shekel + ISO_CURRENCY_IQD = 73; // Iraqi dinar + ISO_CURRENCY_IRR = 74; // Iranian rial + ISO_CURRENCY_ISK = 75; // Icelandic króna + ISO_CURRENCY_JMD = 76; // Jamaican dollar + ISO_CURRENCY_JOD = 77; // Jordanian dinar + ISO_CURRENCY_KES = 78; // Kenyan shilling + ISO_CURRENCY_KGS = 79; // Kyrgyzstani som + ISO_CURRENCY_KHR = 80; // Cambodian riel + ISO_CURRENCY_KMF = 81; // Comoro franc + ISO_CURRENCY_KPW = 82; // North Korean won + ISO_CURRENCY_KWD = 83; // Kuwaiti dinar + ISO_CURRENCY_KYD = 84; // Cayman Islands dollar + ISO_CURRENCY_KZT = 85; // Kazakhstani tenge + ISO_CURRENCY_LAK = 86; // Lao kip + ISO_CURRENCY_LBP = 87; // Lebanese pound + ISO_CURRENCY_LKR = 88; // Sri Lanka rupee + ISO_CURRENCY_LRD = 89; // Liberian dollar + ISO_CURRENCY_LSL = 90; // Lesotho loti + ISO_CURRENCY_LYD = 91; // Libyan dinar + ISO_CURRENCY_MAD = 92; // Moroccan dirham + ISO_CURRENCY_MDL = 93; // Moldovan leu + ISO_CURRENCY_MGA = 94; // Malagasy ariary + ISO_CURRENCY_MKD = 95; // Macedonian denar + ISO_CURRENCY_MMK = 96; // Myanmar kyat + ISO_CURRENCY_MNT = 97; // Mongolian tögrög + ISO_CURRENCY_MOP = 98; // Macanese pataca + ISO_CURRENCY_MRU = 99; // Mauritanian ouguiya + ISO_CURRENCY_MUR = 100; // Mauritian rupee + ISO_CURRENCY_MVR = 101; // Maldivian rufiyaa + ISO_CURRENCY_MWK = 102; // Malawian kwacha + ISO_CURRENCY_MYR = 103; // Malaysian ringgit + ISO_CURRENCY_MZN = 104; // Mozambican metical + ISO_CURRENCY_NAD = 105; // Namibian dollar + ISO_CURRENCY_NGN = 106; // Nigerian naira + ISO_CURRENCY_NIO = 107; // Nicaraguan córdoba + ISO_CURRENCY_NPR = 108; // Nepalese rupee + ISO_CURRENCY_NZD = 109; // New Zealand dollar + ISO_CURRENCY_OMR = 110; // Omani rial + ISO_CURRENCY_PAB = 111; // Panamanian balboa + ISO_CURRENCY_PEN = 112; // Peruvian sol + ISO_CURRENCY_PGK = 113; // Papua New Guinean kina + ISO_CURRENCY_PHP = 114; // Philippine peso + ISO_CURRENCY_PKR = 115; // Pakistani rupee + ISO_CURRENCY_PLN = 116; // Polish złoty + ISO_CURRENCY_PYG = 117; // Paraguayan guaraní + ISO_CURRENCY_QAR = 118; // Qatari riyal + ISO_CURRENCY_RON = 119; // Romanian leu + ISO_CURRENCY_RSD = 120; // Serbian dinar + ISO_CURRENCY_RWF = 121; // Rwandan franc + ISO_CURRENCY_SBD = 122; // Solomon Islands dollar + ISO_CURRENCY_SCR = 123; // Seychellois rupee + ISO_CURRENCY_SDG = 124; // Sudanese pound + ISO_CURRENCY_SHP = 125; // Saint Helena pound + ISO_CURRENCY_SLL = 126; // Sierra Leonean leone + ISO_CURRENCY_SOS = 127; // Somali shilling + ISO_CURRENCY_SRD = 128; // Surinamese dollar + ISO_CURRENCY_SSP = 129; // South Sudanese pound + ISO_CURRENCY_STN = 130; // São Tomé and Príncipe dobra + ISO_CURRENCY_SVC = 131; // Salvadoran colón + ISO_CURRENCY_SYP = 132; // Syrian pound + ISO_CURRENCY_SZL = 133; // Swazi lilangeni + ISO_CURRENCY_THB = 134; // Thai baht + ISO_CURRENCY_TJS = 135; // Tajikistani somoni + ISO_CURRENCY_TMT = 136; // Turkmenistan manat + ISO_CURRENCY_TND = 137; // Tunisian dinar + ISO_CURRENCY_TOP = 138; // Tongan paʻanga + ISO_CURRENCY_TTD = 139; // Trinidad and Tobago dollar + ISO_CURRENCY_TWD = 140; // New Taiwan dollar + ISO_CURRENCY_TZS = 141; // Tanzanian shilling + ISO_CURRENCY_UAH = 142; // Ukrainian hryvnia + ISO_CURRENCY_UGX = 143; // Ugandan shilling + ISO_CURRENCY_UYU = 144; // Uruguayan peso + ISO_CURRENCY_UZS = 145; // Uzbekistani soʻm + ISO_CURRENCY_VND = 146; // Vietnamese đồng + ISO_CURRENCY_VUV = 147; // Vanuatu vatu + ISO_CURRENCY_WST = 148; // Samoan tālā + ISO_CURRENCY_XAF = 149; // Central African CFA franc + ISO_CURRENCY_XCD = 150; // East Caribbean dollar + ISO_CURRENCY_XOF = 151; // West African CFA franc + ISO_CURRENCY_XPF = 152; // CFP franc + ISO_CURRENCY_YER = 153; // Yemeni rial + ISO_CURRENCY_ZAR = 154; // South African rand + ISO_CURRENCY_ZMW = 155; // Zambian kwacha } diff --git a/proto/cmp/types/v1alpha/document.proto b/proto/cmp/types/v1alpha/document.proto new file mode 100644 index 0000000..3d49a6c --- /dev/null +++ b/proto/cmp/types/v1alpha/document.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; + +package cmp.types.v1alpha; + +// Document type to be used in various messages +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/document.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/document.proto.dot.svg) +message Document { + string document_number = 1; + DocumentType document_type = 2; +} + +enum DocumentType { + DOCUMENT_TYPE_UNSPECIFIED = 0; + DOCUMENT_TYPE_VISA = 1; + DOCUMENT_TYPE_PASSPORT = 2; + DOCUMENT_TYPE_PASSPORT_CARD = 3; + DOCUMENT_TYPE_MILITARY_IDENTIFICATION = 4; + DOCUMENT_TYPE_DRIVERS_LICENSE = 5; + DOCUMENT_TYPE_NATIONAL_IDENTITY_DOCUMENT = 6; + DOCUMENT_TYPE_VACCINATION_CERTIFICATE = 7; + DOCUMENT_TYPE_ALIEN_REGISTRATION = 8; + DOCUMENT_TYPE_INSURANCE_POLICY = 9; + DOCUMENT_TYPE_TAX_REGISTRATION_EXEMPTION = 10; + DOCUMENT_TYPE_VEHICLE_REGISTRATION_LICENSE = 11; + DOCUMENT_TYPE_BORDER_CROSSING_CARD = 12; + DOCUMENT_TYPE_REFUGEE_TRAVEL_DOCUMENT = 13; + DOCUMENT_TYPE_PILOTS_LICENSE = 14; + DOCUMENT_TYPE_PERMANENT_RESIDENT_CARD = 15; + DOCUMENT_TYPE_REDRESS_NUMBER = 16; + DOCUMENT_TYPE_KNOWN_TRAVELER = 17; + DOCUMENT_TYPE_NON_STANDARD = 18; + DOCUMENT_TYPE_MERCHANT_MARINER = 19; + DOCUMENT_TYPE_AIR_NEXUS_CARD = 20; + DOCUMENT_TYPE_CREW_MEMBER_CERTIFICATE = 21; + DOCUMENT_TYPE_NATURALIZATION_CERTIFICATE = 22; + DOCUMENT_TYPE_CPF = 23; + DOCUMENT_TYPE_CEDULA = 24; +} diff --git a/proto/cmp/types/v1alpha/duration.proto b/proto/cmp/types/v1alpha/duration.proto index 33a9733..c05f756 100644 --- a/proto/cmp/types/v1alpha/duration.proto +++ b/proto/cmp/types/v1alpha/duration.proto @@ -8,4 +8,4 @@ package cmp.types.v1alpha; // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/duration.proto.dot.svg) message Duration { int32 minutes = 1; -} \ No newline at end of file +} diff --git a/proto/cmp/types/v1alpha/filter.proto b/proto/cmp/types/v1alpha/filter.proto index 41936fa..0fad805 100644 --- a/proto/cmp/types/v1alpha/filter.proto +++ b/proto/cmp/types/v1alpha/filter.proto @@ -22,7 +22,7 @@ message Filter { // // Conclusively we recommend to filter using standards. It is much better to filter // for seaview or seaside rooms using for example DRV global types supported by many - // providers of the Camino Nnetwork, than to implement specific logics per provider, + // providers of the Camino Nnetwork, than to implement specific logics per provider, // using their unique codes string filter_code = 1; @@ -58,4 +58,4 @@ enum FilterType { FILTER_TYPE_ISO = 7; // settlement services provider https://www.arccorp.com/ FILTER_TYPE_ARC = 8; -} \ No newline at end of file +} diff --git a/proto/cmp/types/v1alpha/language.proto b/proto/cmp/types/v1alpha/language.proto index 781ba6d..b5c0419 100644 --- a/proto/cmp/types/v1alpha/language.proto +++ b/proto/cmp/types/v1alpha/language.proto @@ -196,4 +196,4 @@ enum Language { LANGUAGE_YO = 181; // Yoruba LANGUAGE_ZA = 182; // "Zhuang, Chuang" LANGUAGE_ZU = 183; // Zulu -} \ No newline at end of file +} diff --git a/proto/cmp/types/v1alpha/partner.proto b/proto/cmp/types/v1alpha/partner.proto index 55e13be..f498d95 100644 --- a/proto/cmp/types/v1alpha/partner.proto +++ b/proto/cmp/types/v1alpha/partner.proto @@ -34,27 +34,22 @@ message Partner { // FIXME: Need review here! string domain = 4; - // On chain payment support - bool on_chain_payment_supported = 5; - - // Supported tokens for payment on-chain - // - // Note: Type of this field will depend on the T-Chain implementation If we go - // with X-Chain like (assets) we may need to switch to `Asset` type. - repeated ERC20Token supported_tokens = 6; + // Supported tokens for payment (on-chain). If a TokenCurrency is specified, this + // then means that on-chain payment is supported. + repeated TokenCurrency on_chain_currencies = 5; // Off chain payment support - bool off_chain_payment_supported = 7; + bool off_chain_payment_supported = 6; // Supported services - repeated PartnerService services = 8; + repeated PartnerService services = 7; // Partner addresses of the messenger bots - repeated cmp.types.v1alpha.WalletAddress addresses = 9; + repeated cmp.types.v1alpha.WalletAddress addresses = 8; // Partner's consortium member wallet address. This address should be the one who // creates the entry in Partner Configuration on the chain. - cmp.types.v1alpha.WalletAddress partner_wallet_address = 10; + cmp.types.v1alpha.WalletAddress partner_wallet_address = 9; } // Partner Service diff --git a/proto/cmp/types/v1alpha/price.proto b/proto/cmp/types/v1alpha/price.proto index 314b7de..7aaabc8 100644 --- a/proto/cmp/types/v1alpha/price.proto +++ b/proto/cmp/types/v1alpha/price.proto @@ -3,11 +3,12 @@ syntax = "proto3"; package cmp.types.v1alpha; import "cmp/types/v1alpha/currency.proto"; +import "cmp/types/v1alpha/price_type.proto"; // ### PriceDetail // -// This message consists of net value as a Price object and additional fields as -// gross, binding, concept, and breakdown. +// 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 // pricing structures can be represented. @@ -18,33 +19,63 @@ message PriceDetail { // Principle price element Price price = 1; - // gross price in case taxes or commissions are specified - float gross = 2; - - // Identification whether the gross price must be respected towards the end-user + // Identification whether the price must be respected towards the end-user // and the product or service cannot be offered for a lower price. - bool binding = 3; + bool binding = 2; // Description of the product or service this price(element) is valid for. - string description = 4; - - // Type of price - string type = 5; + string description = 3; - // Type code of the price - string type_code = 6; + // If not specified, the default of the boolean is false which means it is + // included in the price. If set to True, it means that this PriceDetail is only + // payable locally. For example local tourism tax that you pay at the reception of + // a hotel. Intended to be used in the breakdown. + bool locally_payable = 4; - // Description - int32 units = 7; + // Type of price and price code + PriceTypeCode price_type_code = 5; // We can use a single PriceDetail to represent a price breakdown. - repeated PriceDetail breakdown = 8; + repeated PriceDetail breakdowns = 6; } -// ### Simple Price type +// ### Simple Price type message Price +// +// Value of the price, this should be an integer converted to string. +// +// This field is a string intentionally. Because the currency can be a crypto +// currency, we need a reliable way to represent big integers as most of the crypto +// currencies have 18 decimals precision. +// +// Definition of the price message: The combination of "value" and "decimals" fields +// express always the value of the currency, not of the fraction of the currency [ +// ETH not wei, CAM and not aCAM, BTC and not Satoshi, EUR not EUR-Cents ] Be aware +// that partners should not do rounding with crypto currencies. // -// Consists of a net value and a Currency type. +// Example implementations: off-chain payment of 100 € or 100 $: value=10000 +// decimals=2 iso_currency=EUR or USD +// +// On-chain payment of 100.65 EURSH value=10065 decimals=2 contract_address=0x... +// this currency has 5 decimals on Columbus and conclusively to create the +// transaction value, 10065 must be divided by 10^2 = 100.65 EURSH and created in +// its smallest fraction by multiplying 100.65 EURSH * 10^5 => 10065000 (example +// conversion to bigint without losing accuracy: bigint(10065) * 10^(5-2)) +// +// On-chain payment of 0.0065 BTC value=65 decimals=4 contract_address=0x... Using +// the contract address, we get the decimals decimals and the currency name or +// abbreviation: 8 decimals & WBTC Because we see 4 decimals specified in the +// message we divide 65 by 10^4 == 0.0065 WBTC (for showing in the front-end UIs) +// +// This currency has 8 decimals on-chain and conclusively to use the value of +// 0.0065 for on-chain operations must be converted to big integer as bigint(65) * +// 10^(8-4) == 650000 +// +// On-chain payment of 1 nCAM value=1 decimals=9 this currency has denominator 18 on +// Columbus and conclusively to mint the value of 1 nCam must be divided by 10^9 = +// 0.000000001 CAM and minted in its smallest fraction by multiplying 0.000000001 * +// 10^18 => 1000000000 aCAM message Price { - cmp.types.v1alpha.Currency currency = 1; - float net = 2; -} \ No newline at end of file + string value = 1; + int32 decimals = 2; + Currency currency = 3; +} diff --git a/proto/cmp/types/v1alpha/price_type.proto b/proto/cmp/types/v1alpha/price_type.proto new file mode 100644 index 0000000..0a27195 --- /dev/null +++ b/proto/cmp/types/v1alpha/price_type.proto @@ -0,0 +1,229 @@ +syntax = "proto3"; + +package cmp.types.v1alpha; + +message PriceTypeCode { + // Type code of the price + string type_code = 1; + + // A price type can be a type of service or produc delivered or form part of the fee or tax breakdown + oneof type { + PriceType price_type = 2; + TaxCode tax_code = 3; + FeeCode fee_code = 4; + } + + enum PriceType { + PRICE_TYPE_UNSPECIFIED = 0; + PRICE_TYPE_BASE_RATE = 1; + PRICE_TYPE_OVERRIDE = 2; + PRICE_TYPE_RATE = 3; + PRICE_TYPE_FARE = 4; + PRICE_TYPE_EXTRA_PASSENGER = 5; + PRICE_TYPE_UNIT = 6; + PRICE_TYPE_SERVICE = 7; + PRICE_TYPE_SUB_SERVICE = 8; + PRICE_TYPE_OFFER = 9; + PRICE_TYPE_DISCOUNT = 10; + PRICE_TYPE_EXTRA = 11; + } + + enum TaxCode { + TAX_CODE_UNSPECIFIED = 0; + TAX_CODE_ASSESSMENT_TAX = 1; + TAX_CODE_LICENSE_TAX = 2; + TAX_CODE_BED_TAX = 3; + TAX_CODE_CHILD_ROLLAWAY_CHARGE = 4; + TAX_CODE_CITY_TAX = 5; + TAX_CODE_CONVENTION_TAX = 6; + TAX_CODE_COUNTRY_TAX = 7; + TAX_CODE_COUNTY_TAX = 8; + TAX_CODE_DEPARTURE_TAX = 9; + TAX_CODE_ENERGY_TAX = 10; + TAX_CODE_FEDERAL_TAX = 11; + TAX_CODE_FOOD_AND_BEVERAGE_TAX = 12; + TAX_CODE_FOOD_TAX = 13; + TAX_CODE_GENERAL_EXCISE_TAX = 14; + TAX_CODE_GOODS_AND_SERVICES_TAX = 15; + TAX_CODE_INSURANCE_PREMIUM_TAX = 16; + TAX_CODE_INTERNATIONAL_TAX = 17; + TAX_CODE_LESSOR_TAX = 18; + TAX_CODE_LODGING_TAX = 19; + TAX_CODE_NATIONAL_GOVERNMENT_TAX = 20; + TAX_CODE_OCCUPANCY_TAX = 21; + TAX_CODE_ROOM_TAX = 22; + TAX_CODE_SALES_TAX = 23; + TAX_CODE_STANDARD_TAX = 24; + TAX_CODE_STATE_TAX = 25; + TAX_CODE_SURPLUS_LINES_TAX = 26; + TAX_CODE_TAX_EXEMPT = 27; + TAX_CODE_TOBACCO_TAX = 28; + TAX_CODE_TOTAL_TAX = 29; + TAX_CODE_TOURISM_TAX = 30; + TAX_CODE_VALUE_ADDED_TAX = 31; + TAX_CODE_ZERO_RATED_TAX = 32; + } + + enum FeeCode { + FEE_CODE_UNSPECIFIED = 0; + FEE_CODE_ADDITIONAL_DAY = 1; + FEE_CODE_ADDITIONAL_DISTANCE = 2; + FEE_CODE_ADDITIONAL_DRIVE = 3; + FEE_CODE_ADDITIONAL_DRIVER_FEE = 4; + FEE_CODE_ADDITIONAL_HOUR = 5; + FEE_CODE_ADDITIONAL_WEEK = 6; + FEE_CODE_ADDL_DEVIATION_SVC_CHARGE = 7; + FEE_CODE_ADJUSTMENT = 8; + FEE_CODE_ADMINISTRATION_FEE = 9; + FEE_CODE_ADULT_ROLLAWAY_FEE = 10; + FEE_CODE_AGE_DIFFERENTIAL = 11; + FEE_CODE_AIR_CANCEL_CHARGE = 12; + FEE_CODE_AIR_CONDITIONING_SURCHARGE = 13; + FEE_CODE_AIR_DEPOSIT_CHARGE = 14; + FEE_CODE_AIR_TICKET_CHARGE = 15; + FEE_CODE_AIRPORT_ACCESS_FEE = 16; + FEE_CODE_AIRPORT_CONCESSION_FEE_RECOVERY = 17; + FEE_CODE_AIRPORT_CONSTRUCTION_FEE = 18; + FEE_CODE_AIRPORT_CONTRACT_FEE = 19; + FEE_CODE_AIRPORT_FEE = 20; + FEE_CODE_AIRPORT_SURCHARGE = 21; + FEE_CODE_AMENDMENT_FEE = 22; + FEE_CODE_APPLICATION_FEE = 23; + FEE_CODE_AUTO_EXCISE = 24; + FEE_CODE_AV_SUPPLY_FEE = 25; + FEE_CODE_BANQUET_SERVICE_FEE = 26; + FEE_CODE_BOOKING_FEE = 27; + FEE_CODE_BORDER_CROSSING_FEE = 28; + FEE_CODE_CANCELLATION_FEE = 29; + FEE_CODE_CANCELLATION_FEES = 30; + FEE_CODE_CAR_SEAT_FEE = 31; + FEE_CODE_CARBON_OFFSET = 32; + FEE_CODE_CHARITY_SUPPORT_FEE = 33; + FEE_CODE_CITY_HOTEL_FEE = 34; + FEE_CODE_CITY_MITIGATION_FEE = 35; + FEE_CODE_CITY_PROJECT_FUND = 36; + FEE_CODE_CLEANING_FEE = 37; + FEE_CODE_CONCESSION_FEE = 38; + FEE_CODE_CONCESSION_RECOVERY_FEE = 39; + FEE_CODE_CONTRACT_FEE = 40; + FEE_CODE_CONVENTION_FEE = 41; + FEE_CODE_TOURISM_FEE = 42; + FEE_CODE_COUNTY_LICENSE_FEE = 43; + FEE_CODE_COUNTY_SURCHARGE = 44; + FEE_CODE_COUNTY_TAX = 45; + FEE_CODE_COVERAGE = 46; + FEE_CODE_CRIB_FEE = 47; + FEE_CODE_CRUISE_CANCEL_FEE = 48; + FEE_CODE_CUSTOMER_DROP_OFF = 49; + FEE_CODE_CUSTOMER_FACILITY_CHARGE = 50; + FEE_CODE_CUSTOMER_PICKUP = 51; + FEE_CODE_DEPARTURE_TAX_FEES = 52; + FEE_CODE_DESTINATION_AMENITY_FEE = 53; + FEE_CODE_DESTINATION_MARKETING_FEE = 54; + FEE_CODE_DISCOUNT = 55; + FEE_CODE_DOCUMENT_REISSUE_FEE = 56; + FEE_CODE_DROP = 57; + FEE_CODE_EARLY_AM_FEE = 58; + FEE_CODE_EARLY_CHECKOUT_FEE = 59; + FEE_CODE_ENERGY_SURCHARGE = 60; + FEE_CODE_ENVIRONMENTAL_SURCHARGE = 61; + FEE_CODE_EQUIPMENT = 62; + FEE_CODE_EVENT_FEE = 63; + FEE_CODE_EXPRESS_HANDLING_FEE = 64; + FEE_CODE_EXTRA_CHILD_CHARGE = 65; + FEE_CODE_EXTRA_PERSON_CHARGE = 66; + FEE_CODE_FACILITY_FEE = 67; + FEE_CODE_FEE = 68; + FEE_CODE_FUEL = 69; + FEE_CODE_FUEL_COST_PRICE_INCREASE = 70; + FEE_CODE_FUEL_SURCHARGE = 71; + FEE_CODE_GENERAL_EXCISE_TAX = 72; + FEE_CODE_GOODS_AND_SERVICE_FEE = 73; + FEE_CODE_GOVERNMENT_RATE_SUPPLEMENT = 74; + FEE_CODE_GOVERNMENT_RENTAL_SURCHARGE = 75; + FEE_CODE_GREENS_FEES = 76; + FEE_CODE_GROSS_RECEIPTS_FEE = 77; + FEE_CODE_GUEST_PC_FEE = 78; + FEE_CODE_HIGH_SEASON_SURCHARGE = 79; + FEE_CODE_HIGHWAY_USE_CHARGE = 80; + FEE_CODE_HOLIDAY_SURCHARGE = 81; + FEE_CODE_HOTEL_DEVELOPMENT_FEE = 82; + FEE_CODE_CHILD_RESTRAINT_DEVICE_SURCHARGE = 83; + FEE_CODE_INSURANCE_CANCEL_CHARGE = 84; + FEE_CODE_INSURANCE_FEE = 85; + 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_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_MANDATORY_CHARGES_TOTAL = 96; + FEE_CODE_MISCELLANEOUS_FEE = 97; + FEE_CODE_MITIGATION_FEE = 98; + FEE_CODE_MOTOR_VEHICLE_CHARGE = 99; + FEE_CODE_NAME_CHANGE_FEE = 100; + FEE_CODE_OPTIONAL = 101; + FEE_CODE_OUT_OF_HOURS_FEE = 102; + FEE_CODE_PACKAGE_CANCEL_CHARGE = 103; + FEE_CODE_PACKAGE_FEE = 104; + FEE_CODE_PARKING_FEE = 105; + FEE_CODE_PASSENGER_SERVICES_FEE = 106; + FEE_CODE_PAY_ON_ARRIVAL_AMOUNT = 107; + FEE_CODE_PC_FEE = 108; + FEE_CODE_PENALTY_FEE = 109; + FEE_CODE_PET_SANITATION_FEE = 110; + FEE_CODE_PET_SURCHARGE = 111; + FEE_CODE_PREMIUM_LOCATION_SURCHARGE = 112; + FEE_CODE_PREPAID_FUEL = 113; + FEE_CODE_PREPAY_AMOUNT = 114; + FEE_CODE_PTA_SERVICE_CHARGE = 115; + FEE_CODE_REFUELING_SURCHARGE = 116; + FEE_CODE_REFUNDABLE_PET_FEE = 117; + FEE_CODE_REGISTRATION_FEE = 118; + FEE_CODE_REIMBURSEMENT_FEE = 119; + FEE_CODE_RESORT_FEE = 120; + FEE_CODE_ROAD_SAFETY_PROGRAM_FEE = 121; + FEE_CODE_ROAD_USAGE_SURCHARGE = 122; + FEE_CODE_ROLLAWAY_FEE = 123; + FEE_CODE_ROOM_SERVICE_FEE = 124; + FEE_CODE_SCREEN_FEE = 125; + FEE_CODE_SECURITY_FEE = 126; + FEE_CODE_SENIOR = 127; + FEE_CODE_SERVICE_CHARGE = 128; + FEE_CODE_SERVICE_FEE = 129; + FEE_CODE_SHORE_EXCURSION_FEE = 130; + FEE_CODE_STANDARD_FOOD_AND_BEVERAGE_GRATUITY = 131; + FEE_CODE_STATE_COST_RECOVERY_FEE = 132; + FEE_CODE_STATE_RENTAL_FEE = 133; + FEE_CODE_STATE_SURCHARGE = 134; + FEE_CODE_STATE_TOURISM_FUND = 135; + FEE_CODE_SUBTOTAL = 136; + FEE_CODE_SURCHARGE = 137; + FEE_CODE_SURFACE_TRANSPORTATION_CHARGE = 138; + FEE_CODE_SUSTAINABILITY_FEE = 139; + FEE_CODE_TAX = 140; + FEE_CODE_TICKETING_FEE = 141; + FEE_CODE_TIRE_AND_BATTERY_FEE = 142; + FEE_CODE_TIRE_MANAGEMENT_FEE = 143; + FEE_CODE_TOTAL_SURCHARGES = 144; + FEE_CODE_TOURISM_CHARGE = 145; + FEE_CODE_TRANSACTION_FEE = 146; + FEE_CODE_TRANSPORTATION_FEE = 147; + FEE_CODE_TRANSFER_FEE = 148; + FEE_CODE_TRAVEL_TIME_FEE = 149; + FEE_CODE_U_DRIVE_IT_FEE = 150; + FEE_CODE_VALIDATING_CARRIER_FEE = 151; + FEE_CODE_VEHICLE_COLLECTION = 152; + FEE_CODE_VEHICLE_DELIVERY = 153; + FEE_CODE_VEHICLE_LICENSE_FEE = 154; + FEE_CODE_VEHICLE_MAINTENANCE_FEE = 155; + FEE_CODE_VEHICLE_RENTAL = 156; + FEE_CODE_WINTER_SERVICE_CHARGE = 157; + FEE_CODE_YOUNG_DRIVER = 158; + FEE_CODE_YOUNGER_DRIVER = 159; + } +} diff --git a/proto/cmp/types/v1alpha/product_code.proto b/proto/cmp/types/v1alpha/product_code.proto index 17c0366..a5f7e12 100644 --- a/proto/cmp/types/v1alpha/product_code.proto +++ b/proto/cmp/types/v1alpha/product_code.proto @@ -9,7 +9,6 @@ package cmp.types.v1alpha; // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/product_code.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/product_code.proto.dot.svg) message ProductCode { - // In most cases like in accommodation, just the field "code" and "type" will be // used. For example in case of a GiataID (for example code=182568), a provider // hotel code (for example a hotel code=AESPMI1234), a transfer code, etc. @@ -18,6 +17,10 @@ message ProductCode { // number=2803. It is not recommended to concatenate for example the airline code // and the flight number into the code field as "EW 51", as this would cause different // implementations for providers of the same product. + // + // Please note that when utilizing licensed codes or formats such as GiataID and DRV + // GlobalTypes, it is the partners' responsibility to confirm and settle any associated + // license fees directly with the respective organizations string code = 1; int32 number = 2; ProductCodeType type = 3; @@ -33,8 +36,7 @@ enum ProductCodeType { } message SupplierProductCode { - - // The supplier product code is unique for a product provided by the supplier and it + // The supplier product code is unique for a product provided by the supplier and it // must remain consistent across the different messages like the ProductList, ProductInfo // and Search messages. Mapping is done on static data, however making a search request // with a GiataID or an ICAO code, could return one or more search results with each @@ -45,8 +47,8 @@ message SupplierProductCode { // an accommodation, the accommodation with a flight and transfer or the accommodation with // a flight and a rent a car. As the product descriptions from the supplier will have // different services, it is safe to assume the product codes will be differnt, the product - // name will be different and the descriptions and amenities as well in the ProductList and + // name will be different and the descriptions and amenities as well in the ProductList and // ProductInfo messages. string supplier_code = 1; int32 supplier_number = 2; - } \ No newline at end of file +} diff --git a/proto/cmp/types/v1alpha/product_status.proto b/proto/cmp/types/v1alpha/product_status.proto new file mode 100644 index 0000000..9530aed --- /dev/null +++ b/proto/cmp/types/v1alpha/product_status.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package cmp.types.v1alpha; + +// Product Status +// +// This is being used in responses to specify the status of a product of any message type. +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/product_status.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/product_status.proto.dot.svg) +enum ProductStatus { + PRODUCT_STATUS_UNSPECIFIED = 0; + PRODUCT_STATUS_NEW = 1; + PRODUCT_STATUS_MODIFIED = 2; + PRODUCT_STATUS_DEACTIVATED = 3; +} diff --git a/proto/cmp/types/v1alpha/rate.proto b/proto/cmp/types/v1alpha/rate.proto index d209fab..76b645f 100644 --- a/proto/cmp/types/v1alpha/rate.proto +++ b/proto/cmp/types/v1alpha/rate.proto @@ -7,7 +7,13 @@ package cmp.types.v1alpha; // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/rate.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/rate.proto.dot.svg) message RateRule { + // RateRule + // + // The eneumeration for RateRuleType is meant for uniformed and standardized display. RateRuleType rate_type = 1; + + // Rate description and reference. In case of enrichment additional description of the rate type. + // Please omit if covered with the RateRuleType. string rate_description = 2; string rate_reference = 3; } @@ -22,15 +28,60 @@ enum RateRuleType { } // Rate plan message type. Contains `rate_plan` and `rate_plan_description` fields -// as strings. +// as strings. The enumeration for RatePlanType is meant for uniformed and +// standardized display. message RatePlan { // Rate plan // - // Ex: ??? - string rate_plan = 1; + // Supplier Rateplan code + string rate_plan_code = 1; + + // Rateplan type standardization + RatePlanType rate_plan_type = 2; - // Rateplan description. In case of enrichment additional description of the unit code. + // Rateplan description. In case of enrichment additional description of the rate plan. // - // Ex: "Package Rate" - string rate_plan_description = 2; + // Ex: "Package Rate". Please omit if covered with the RatePlanType. + string rate_plan_description = 3; +} + +enum RatePlanType { + RATE_PLAN_TYPE_UNSPECIFIED = 0; + RATE_PLAN_TYPE_ASSOCIATION = 1; + RATE_PLAN_TYPE_CLUB = 2; + RATE_PLAN_TYPE_CONCIERGE = 3; + RATE_PLAN_TYPE_CONVENTION = 4; + RATE_PLAN_TYPE_CORPORATE = 5; + RATE_PLAN_TYPE_DAY_RATE = 6; + RATE_PLAN_TYPE_DISTRESSED_INVENTORY = 7; + RATE_PLAN_TYPE_FAMILY_PLAN = 8; + RATE_PLAN_TYPE_GOVERNMENT = 9; + RATE_PLAN_TYPE_MILITARY = 10; + RATE_PLAN_TYPE_NEGOTIATED = 11; + RATE_PLAN_TYPE_PACKAGE = 12; + RATE_PLAN_TYPE_PROMOTIONAL = 13; + RATE_PLAN_TYPE_REGULAR = 14; + RATE_PLAN_TYPE_RACK = 15; + RATE_PLAN_TYPE_SENIOR_CITIZEN = 16; + RATE_PLAN_TYPE_TOUR = 17; + RATE_PLAN_TYPE_WHOLESALE = 18; + RATE_PLAN_TYPE_TRAVEL_INDUSTRY = 19; + RATE_PLAN_TYPE_WEEKEND = 20; + RATE_PLAN_TYPE_LAST_ROOM_AVAILABLE = 21; + RATE_PLAN_TYPE_NON_LAST_ROOM_AVAILABLE = 22; + RATE_PLAN_TYPE_CONSORTIA = 23; + RATE_PLAN_TYPE_GROUP = 24; + RATE_PLAN_TYPE_CONTRACT = 25; + RATE_PLAN_TYPE_PROMOTIONAL_PACKAGE = 26; + RATE_PLAN_TYPE_PUBLISHED = 27; + RATE_PLAN_TYPE_NET = 28; + RATE_PLAN_TYPE_MULTI_DAY_PACKAGE = 29; + RATE_PLAN_TYPE_WEEKLY = 30; + RATE_PLAN_TYPE_MONTHLY = 31; + RATE_PLAN_TYPE_STANDARD_REDEMPTION_RATE = 32; + RATE_PLAN_TYPE_DISCOUNT_REDEMPTION_RATE = 33; + RATE_PLAN_TYPE_CASH_AND_POINTS_REDEMPTION_RATE = 34; + RATE_PLAN_TYPE_POINT_UPGRADE_REDEMPTION_RATE = 35; + RATE_PLAN_TYPE_CASH_UPGRADE_REDEMPTION_RATE = 36; + RATE_PLAN_TYPE_EXTENDED_STAY_RATE = 37; } diff --git a/proto/cmp/types/v1alpha/search.proto b/proto/cmp/types/v1alpha/search.proto index 0e15098..4dbf37b 100644 --- a/proto/cmp/types/v1alpha/search.proto +++ b/proto/cmp/types/v1alpha/search.proto @@ -29,7 +29,7 @@ message SearchParameters { // Request generated for a specific brand or point-of-sale by one distributor // Specify one or more brand codes or distribution channels for which assigned // product is to be included in the search response - repeated string brand_code = 4; + repeated string brand_codes = 4; // Include OnRequest options in the response or only immediately bookable options bool include_on_request = 5; @@ -81,15 +81,19 @@ message SearchResponseMetadata { // to RFC 4122 UUID search_id = 1; - // Context for Inventory system communication. + // Context for Inventory system concepts that need to be included in a search response, + // like an OwnerCode, PTC_OfferParameters, Tax codes, Disclosure RefID, etc. or a + // serialized combination of these codes. string context = 2; // Errors encountered in the generation of the response. Standardized error list // to be created. - string errors = 3; + repeated string errors = 3; - // Warnings encountered in the generation of the response. - string warnings = 4; + // Warnings encountered in the generation of the response. This section might include + // information about fields not processed due to incompatibilities with the + // inventory system + repeated string warnings = 4; // Supplier code from the Inventory System for this search response. string supplier_code = 5; diff --git a/proto/cmp/types/v1alpha/service_fact.proto b/proto/cmp/types/v1alpha/service_fact.proto index f713702..e23a281 100644 --- a/proto/cmp/types/v1alpha/service_fact.proto +++ b/proto/cmp/types/v1alpha/service_fact.proto @@ -20,10 +20,9 @@ import "cmp/types/v1alpha/price.proto"; // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/service_fact.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/service_fact.proto.dot.svg) message ServiceFact { - // A code for the specific service, when a service is optional, this code is - // referenced in the booking so that the optional service will be added to the - // booking. + // referenced in the validate request, so that the optional service will be added + // to the booking. string code = 1; // A description of the service like "business class", "shuttle transfer", "early @@ -48,9 +47,14 @@ message ServiceFact { ChargeBasisType charge_basis = 5; // We can use a single ServiceFact to express just one service. But many services - // actually are actually a combination of several services, like the typical + // are actually a combination of several services, like the typical // priority boarding, which also allows for a larger carry-on bag. repeated ServiceFact details = 6; + + // the count of the number of services. In case the service requires specification + // of the number or frequency of the products that will be included. For example + // "bouquet of roses, qty=24" or "baggage qty=2". + int32 quantity = 7; } enum ServiceAvailabilityType { diff --git a/proto/cmp/types/v1alpha/time.proto b/proto/cmp/types/v1alpha/time.proto index 7841e34..a5ad576 100644 --- a/proto/cmp/types/v1alpha/time.proto +++ b/proto/cmp/types/v1alpha/time.proto @@ -9,4 +9,4 @@ package cmp.types.v1alpha; message Time { int32 hours = 1; int32 minutes = 2; -} \ No newline at end of file +} diff --git a/proto/cmp/types/v1alpha/token.proto b/proto/cmp/types/v1alpha/token.proto index b40161f..d617712 100644 --- a/proto/cmp/types/v1alpha/token.proto +++ b/proto/cmp/types/v1alpha/token.proto @@ -2,13 +2,10 @@ syntax = "proto3"; package cmp.types.v1alpha; -// ERC20 Token Reference +// Token Reference // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/token.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/token.proto.dot.svg) -message ERC20Token { +message TokenCurrency { string contract_address = 1; - string name = 2; - string symbol = 3; - uint32 decimals = 4; } diff --git a/proto/cmp/types/v1alpha/traveller.proto b/proto/cmp/types/v1alpha/traveller.proto index 5cf6cb7..38b5420 100644 --- a/proto/cmp/types/v1alpha/traveller.proto +++ b/proto/cmp/types/v1alpha/traveller.proto @@ -4,18 +4,24 @@ package cmp.types.v1alpha; import "cmp/types/v1alpha/country.proto"; import "cmp/types/v1alpha/date.proto"; +import "cmp/types/v1alpha/document.proto"; // Traveller // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/traveller.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/traveller.proto.dot.svg) -message Traveller { + +message BasicTraveller { // Guest number, the lowest number is the lead-pax. This ID is also used for // referencing services linked to specific participants, like baggage. + // the traveller_id must be kept consistent between the search request and response. + // Conclusively if the request specifies traveller 0 and 1, then the response also refers + // to these traveller numbers. If the request specifies 1 and 2 or 10 and 20, then the + // response also returns these references. + // The traveller_id is specified in each unit and only detailed once in the search response + // repeated travellers field int32 traveller_id = 1; - // FIXME: Why we need both traveller type and birthday? - // Traveller type from enum below TravellerType type = 2; @@ -23,19 +29,7 @@ message Traveller { cmp.types.v1alpha.Date birthdate = 3; // The country code for the nationality of the traveller. - // - // FIXME: Or should we have instead of "UK" "English"? cmp.types.v1alpha.Country nationality = 4; - - //Gender from the enum below - GenderType gender = 5; - - string first_names = 6; // FIXME: Why plural here? And not in last name? - string last_name = 7; - string second_last_name = 8; - string phone_number = 9; - string email = 10; - string document_number = 11; } // Traveller Type @@ -47,6 +41,34 @@ enum TravellerType { TRAVELLER_TYPE_SENIOR = 4; } +message ExtensiveTraveller { + // Guest number, the lowest number is the lead-pax. This ID is also used for + // referencing services linked to specific participants, like baggage. + int32 traveller_id = 1; + + // Gender from the enum below + GenderType gender = 2; + + // Many systems might just have one field for all first names and just one field + // for all surnames of a traveller. However, we see many countries with many + // surnames and authorities that require the names data to be correctly registered + // as in the passport of the traveller. In this case you can for example find in + // the fist name field "Diana Frances" and in the surname field "Spencer". However + // with double barrelled surnames this becomes problematic like in the case of + // firstname: "Winnie" Surname: "Madikizela-Mandela". In Spanish tradition, double + // surnames are the norm, which are composed of surname of their fathers, followed + // by the (first) surname of their mothers. These names are combined without + // hyphen for example Julio Iglesias de la Cueva and Enrique Iglesias Preysler. + // Conclusively systems that haye a limited number of first name and surname + // fields can just use one antry and systems that have multipl can fit John legen + // into first_name: John, first_name: Roger, surname: Stephens, surname: Legend. + repeated string first_names = 3; + repeated string surnames = 4; + string phone_number = 6; + string email = 7; + repeated cmp.types.v1alpha.Document documents = 8; +} + // Gender Type enum GenderType { GENDER_TYPE_UNSPECIFIED = 0;