diff --git a/proto/cmp/services/accommodation/v1alpha1/property_types.proto b/proto/cmp/services/accommodation/v1alpha1/property_types.proto index 09fe5843..755838f5 100644 --- a/proto/cmp/services/accommodation/v1alpha1/property_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/property_types.proto @@ -49,7 +49,7 @@ message Property { string website = 11; // Status of the property - // FIXME: Chaned "deactivated" to "status". But we should still make this an enum. ?? + // FIXME: Changed "deactivated" to "status". But we should still make this an enum. ?? string status = 12; // GIATA ID diff --git a/proto/cmp/services/accommodation/v1alpha1/search.proto b/proto/cmp/services/accommodation/v1alpha1/search.proto index 18fe7c04..56fdc5ae 100644 --- a/proto/cmp/services/accommodation/v1alpha1/search.proto +++ b/proto/cmp/services/accommodation/v1alpha1/search.proto @@ -2,10 +2,12 @@ syntax = "proto3"; // ## Accommodation Services // -// The Accommodation services are used for both hotels and holiday homes, often called short term rentals. +// The Accommodation services are used for both hotels and holiday homes, often +// called short term rentals. // -// 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. +// 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. // // This package is a **WIP**. package cmp.services.accommodation.v1alpha1; @@ -20,28 +22,32 @@ import "cmp/types/v1alpha1/traveller.proto"; // ### Accommodation Search Request Message Type // -// The `Accommodation Search Request` message type facilitates the request for accommodations like hotel and holiday -// home searches within the platform. In the request the market, language and currency are specified at the top-level. -// In the Unit we specify the details of the trip like dates, properties or locations or filters. -// The purpose of such a structure is to allow for multi-room and multi-property searches, so that several rooms or houses -// can be requested for the same dates and location or for the purpose of a tour or roadtrip, several accommodations for -// sequential dates and different locations. +// The `Accommodation Search Request` message type facilitates the request for +// accommodations like hotel and holiday home searches within the platform. In the +// request the market, language and currency are specified at the top-level. In the +// Unit we specify the details of the trip like dates, properties or locations or +// filters. The purpose of such a structure is to allow for multi-room and +// multi-property searches, so that several rooms or houses can be requested for the +// same dates and location or for the purpose of a tour or roadtrip, several +// accommodations for sequential dates and different locations. // -// Developers leveraging this message type should ensure proper validation and handling, especially considering fields -// that are still under review, like `speech_request`. +// Developers leveraging this message type should ensure proper validation and +// handling, especially considering fields that are still under review, like +// `speech_request`. message AccommodationSearchRequest { - // Message header. Contains API version, message info string and end-user wallet address + // Message header. Contains API version, message info string and end-user wallet + // address cmp.types.v1alpha1.Header header = 1; // Search request metadata cmp.types.v1alpha1.SearchRequestMetadata metadata = 2; - // Generic search parameters - // Ex: Inclusion of OnRequest options and inclusion of only the cheapest or all options. + // Generic search parameters Ex: Inclusion of OnRequest options and inclusion of + // only the cheapest or all options. cmp.types.v1alpha1.SearchParameters search_parameters_generic = 3; - // Accommodation specific search parameters - // Ex: Specific search parameters like geo location, meal plan, rate plan and rate rules. + // Accommodation specific search parameters Ex: Specific search parameters like + // geo location, meal plan, rate plan and rate rules. AccommodationSearchParameters search_parameters_accommodation = 4; // Travel period @@ -56,14 +62,16 @@ message AccommodationSearchRequest { // ### Accommodation Search Response // -// The `Accommodation Search Response` message type facilitates the response for accommodations like hotel and holiday -// home searches within the platform. +// The `Accommodation Search Response` message type facilitates the response for +// accommodations like hotel and holiday home searches within the platform. // -// In the response a search_id must be included and a search_option_id for every bookable -// option responded. Included, compulsary and optional services can be included. A simple "free cancellation upto" can -// be set or full cancellation pilicies can be included. +// In the response a search_id must be included and a search_option_id for every +// bookable option responded. Included, compulsary and optional services can be +// included. A simple "free cancellation upto" can be set or full cancellation +// pilicies can be included. message AccommodationSearchResponse { - // Message header. Contains API version, message info string and end user wallet address. + // Message header. Contains API version, message info string and end user wallet + // address. cmp.types.v1alpha1.Header header = 1; // Search response metadata diff --git a/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto b/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto index 1dc62516..889963d2 100644 --- a/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto @@ -13,8 +13,8 @@ import "cmp/types/v1alpha1/rate.proto"; message AccommodationSearchParameters { // Geo Location for search, set only one of the fields at once. // - // This "one of" field enforces only one of the fields below. They all share memory, - // setting one will remove the others. + // 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. cmp.types.v1alpha1.LocationCodes location_codes = 1; diff --git a/proto/cmp/services/accommodation/v1alpha1/unit_types.proto b/proto/cmp/services/accommodation/v1alpha1/unit_types.proto index d8f96622..de222de8 100644 --- a/proto/cmp/services/accommodation/v1alpha1/unit_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/unit_types.proto @@ -12,16 +12,15 @@ import "cmp/types/v1alpha1/traveller.proto"; // ### Unit // -// A Unit can represent a room in a hotel. One search option can have multiple units for -// multi-room requests Ex: one request for 2 rooms for 4 adults, 2 in each room. -// A unit can also be a different property in a multi-property request for holiday homes. -// Ex: 1 house for 4 persons and another house for 6 persons. +// A Unit can represent a room in a hotel. One search option can have multiple units +// for multi-room requests Ex: one request for 2 rooms for 4 adults, 2 in each room. +// A unit can also be a different property in a multi-property request for holiday +// homes. Ex: 1 house for 4 persons and another house for 6 persons. // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/unit_types.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/unit_types.proto.dot.svg) message Unit { - // Unit Type - // Used to distinguish between hotel rooms and holiday homes. + // Unit Type. Used to distinguish between hotel rooms and holiday homes. // Ex: `UnitType.UNIT_TYPE_ROOM` UnitType type = 1; @@ -60,7 +59,8 @@ message Unit { // Cancel Policies // This is a list so that various policies can be expressed - // Ex. 10-5 days before arrival x€, 4-1 days before arrival y€ and 0 days before arrival z€ + // Ex: 10-5 days before arrival x€, 4-1 days before arrival y€ and 0 days before + // arrival z€ repeated cmp.types.v1alpha1.CancelPolicy cancel_policies = 14; // Remaining units diff --git a/proto/cmp/services/activity/v1alpha1/search.proto b/proto/cmp/services/activity/v1alpha1/search.proto index 666b8ce8..82f5e2f6 100644 --- a/proto/cmp/services/activity/v1alpha1/search.proto +++ b/proto/cmp/services/activity/v1alpha1/search.proto @@ -4,8 +4,9 @@ syntax = "proto3"; // // 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. +// 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. // // This package is a **WIP**. package cmp.services.activity.v1alpha1; @@ -22,14 +23,17 @@ import "cmp/types/v1alpha1/traveller.proto"; // // Search request for Activities message ActivitySearchRequest { - // Message header. Contains API version, message info string and end-user wallet address + // Message header. Contains API version, message info string and end-user wallet + // address cmp.types.v1alpha1.Header header = 1; // Search request metadata cmp.types.v1alpha1.SearchRequestMetadata metadata = 2; // Generic search parameters - // Ex: Inclusion of OnRequest options and inclusion of only the cheapest or all options. + // + // Ex: Inclusion of OnRequest options and inclusion of only the cheapest or all + // options. cmp.types.v1alpha1.SearchParameters search_parameters_generic = 3; // Activiy specific search parameters @@ -44,10 +48,10 @@ message ActivitySearchRequest { // ### Source Location // - // For search, set only one of the fields at once. - // Source location indicates the 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. + // For search, set only one of the fields at once. Source location indicates the + // 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. // // This one of field enforces only one of the fields below. They all share memory, // setting one will remove the others. @@ -71,13 +75,12 @@ message ActivitySearchRequest { // ### Service Location // - // 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 area of the requested services. Typical value would be the region or resort. + // 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 + // 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. @@ -98,7 +101,8 @@ message ActivitySearchRequest { } message ActivitySearchResponse { - // Message header. Contains API version, message info string and end user wallet address. + // Message header. Contains API version, message info string and end user wallet + // address. cmp.types.v1alpha1.Header header = 1; // Search response metadata diff --git a/proto/cmp/services/activity/v1alpha1/search_result_types.proto b/proto/cmp/services/activity/v1alpha1/search_result_types.proto index e3f3490f..1d1d0cd4 100644 --- a/proto/cmp/services/activity/v1alpha1/search_result_types.proto +++ b/proto/cmp/services/activity/v1alpha1/search_result_types.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package cmp.services.activity.v1alpha1; +import "cmp/types/v1alpha1/address.proto"; import "cmp/types/v1alpha1/datetime_range.proto"; import "cmp/types/v1alpha1/location.proto"; import "cmp/types/v1alpha1/price.proto"; import "google/protobuf/timestamp.proto"; -import "cmp/types/v1alpha1/address.proto"; // ### Search option type for Activity Search Service // @@ -42,7 +42,7 @@ message ActivitySearchResult { // Pricing type // Ex: "PerPerson", "PerGroup" - PricingType pricing_type = 9; + PricingType pricing_type = 9; } // ### Activity Info @@ -86,12 +86,6 @@ message ActivityLocation { cmp.types.v1alpha1.Address address = 1; // Geo Tree. Country, region, city_or_resort - // Ex: - // GeoTree( - // country=Country.COUNTRY_ES, - // region="Mallorca", - // city_or_resort="Palma City", - // ) cmp.types.v1alpha1.GeoTree geo_tree = 2; // Coordinate @@ -104,7 +98,7 @@ message PickupDropoffEvent { string location_code = 1; // Ex: "Sunny Beach Hotel", string location_name = 2; - + // Ex: "true", bool pickup_ind = 3; @@ -119,4 +113,4 @@ enum PricingType { PRICING_TYPE_UNSPECIFIED = 0; PRICING_TYPE_PERPERSON = 1; PRICING_TYPE_PERGROUP = 2; -} \ No newline at end of file +} diff --git a/proto/cmp/services/network/v1alpha1/fee.proto b/proto/cmp/services/network/v1alpha1/fee.proto index ac8e3eac..e418cc3f 100644 --- a/proto/cmp/services/network/v1alpha1/fee.proto +++ b/proto/cmp/services/network/v1alpha1/fee.proto @@ -4,6 +4,8 @@ package cmp.services.network.v1alpha1; import "cmp/types/v1alpha1/asset.proto"; +// ### Network Fee Message Type +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/network/v1alpha1/fee.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/network/v1alpha1/fee.proto.dot.svg) message NetworkFee { @@ -12,8 +14,9 @@ message NetworkFee { 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? + // + // 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.v1alpha1.Asset asset = 2; } diff --git a/proto/cmp/services/partner/v1alpha1/partner_configuration.proto b/proto/cmp/services/partner/v1alpha1/partner_configuration.proto index 0a8f044b..1f25c402 100644 --- a/proto/cmp/services/partner/v1alpha1/partner_configuration.proto +++ b/proto/cmp/services/partner/v1alpha1/partner_configuration.proto @@ -6,18 +6,19 @@ import "cmp/types/v1alpha1/partner.proto"; // ### Partner Configuration message type // -// This message type represents the partner configuration on T-Chain (not implemented yet) +// This message type represents the partner configuration on T-Chain (not +// implemented yet) message PartnerConfiguration { // List of partners from the on-chain Partner Configuration repeated cmp.types.v1alpha1.Partner partners = 1; } message GetPartnerConfigurationRequest { - // Only respond with updated partners after this block height + // Only respond with updated partners after this block height. int32 block_height = 2; - // Partner wallet addresses - // Response is returned with only partners that have these addresses + // Partner wallet addresses. Response is returned with only partners that have + // these addresses. repeated string partner_addresses = 3; } @@ -25,8 +26,7 @@ message GetPartnerConfigurationResponse { // Partner configuration PartnerConfiguration partner_configuration = 1; - // Current block height - // Distributors can keep this info for later reference + // Current block height. Distributors can keep this info for later reference. int32 current_block_height = 2; } @@ -37,10 +37,10 @@ message GetPartnerConfigurationResponse { service GetPartnerConfigurationService { // #### GetPartnerConfiguration // - // Takes `GetPartnerConfigurationRequest` which contains optional block height - // and partner wallet addresses and returns `GetPartnerConfigurationResponse` - // which contains the current block height and the`PartnerConfiguration` for - // the given addresses (if any, returns all if none is provided) and only if - // the data is changed after the provided block height. + // Takes `GetPartnerConfigurationRequest` which contains optional block height and + // partner wallet addresses and returns `GetPartnerConfigurationResponse` which + // contains the current block height and the`PartnerConfiguration` for the given + // addresses (if any, returns all if none is provided) and only if the data is + // changed after the provided block height. rpc GetPartnerConfiguration(GetPartnerConfigurationRequest) returns (GetPartnerConfigurationResponse); } diff --git a/proto/cmp/services/ping/v1alpha1/ping.proto b/proto/cmp/services/ping/v1alpha1/ping.proto index d83bb36f..59ce8393 100644 --- a/proto/cmp/services/ping/v1alpha1/ping.proto +++ b/proto/cmp/services/ping/v1alpha1/ping.proto @@ -6,9 +6,9 @@ package cmp.services.ping.v1alpha1; import "cmp/types/v1alpha1/common.proto"; import "google/protobuf/timestamp.proto"; -// The ping message is designed to test the availability of a provider service -// and to test the network latency as in the gRPC metadata information the -// DateTime is stored of each hop. +// The ping message is designed to test the availability of a provider service and +// to test the network latency as in the gRPC metadata information the DateTime is +// stored of each hop. message PingRequest { // Message Header cmp.types.v1alpha1.Header header = 1; diff --git a/proto/cmp/services/transport/v1alpha1/search.proto b/proto/cmp/services/transport/v1alpha1/search.proto index a047cb29..9b928802 100644 --- a/proto/cmp/services/transport/v1alpha1/search.proto +++ b/proto/cmp/services/transport/v1alpha1/search.proto @@ -4,9 +4,9 @@ syntax = "proto3"; // // The Transport Service is used for flights, trains, and buses. // -// 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. +// 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. // // This package is a WIP. package cmp.services.transport.v1alpha1; @@ -21,22 +21,29 @@ import "cmp/types/v1alpha1/traveller.proto"; // ### Transport Search Request message TransportSearchRequest { - // Message header. Contains API version, message info string and end-user wallet address + // Message header. Contains API version, message info string and end-user wallet + // address cmp.types.v1alpha1.Header header = 1; // Search request metadata cmp.types.v1alpha1.SearchRequestMetadata metadata = 2; // Generic search parameters - // Ex: Inclusion of OnRequest options and inclusion of only the cheapest or all options. + // + // Ex: Inclusion of OnRequest options and inclusion of only the cheapest or all + // options. cmp.types.v1alpha1.SearchParameters search_parameters = 3; // Transport specific search parameters + // // Ex: ?? TransportSearchParameters search_parameters_transport = 4; - // Content source types for this search request to specify which sources to include - // Ex: ContentSourceType.CONTENT_SOURCE_TYPE_GDS, ContentSourceType.CONTENT_SOURCE_TYPE_NDC + // Content source types for this search request to specify which sources to + // include. + // + // Ex: ContentSourceType.CONTENT_SOURCE_TYPE_GDS, + // ContentSourceType.CONTENT_SOURCE_TYPE_NDC // ContentSourceType.CONTENT_SOURCE_TYPE_3RD_PARTY repeated ContentSourceType conten_source_types = 5; @@ -44,14 +51,16 @@ message TransportSearchRequest { repeated cmp.types.v1alpha1.Traveller travellers = 6; // Travelling trip - // to avoid confusion of the direction of travel that occurs with terms like "inbound" - // and "outbound". The travelling trip is also used for "one way" in which case the - // returning trip is omitted. For tours or roadtrips, multiple requests with just a - // travelling trip for sequential dates can be submitted to specific suppliers of - // each part of tour or roadtrip. + // + // To avoid confusion of the direction of travel that occurs with terms like + // "inbound" and "outbound". The travelling trip is also used for "one way" in + // which case the returning trip is omitted. For tours or roadtrips, multiple + // requests with just a travelling trip for sequential dates can be submitted to + // specific suppliers of each part of tour or roadtrip. Trip travelling_trip = 7; // Returning trip + // // In many cases our travel plans consist of going to a destination and return to // the same place where we started Trip returning_trip = 8; @@ -61,14 +70,17 @@ message TransportSearchRequest { } message TransportSearchResponse { - // Message header. Contains API version, message info string and end-user wallet address + // Message header. Contains API version, message info string and end-user wallet + // address cmp.types.v1alpha1.Header header = 1; // Search response metadata cmp.types.v1alpha1.SearchResponseMetadata metadata = 2; - // Conten source types for this search request - // Ex: ContentSourceType.CONTENT_SOURCE_TYPE_GDS, ContentSourceType.CONTENT_SOURCE_TYPE_NDC + // Conten source types for this search request. + // + // Ex: ContentSourceType.CONTENT_SOURCE_TYPE_GDS, + // ContentSourceType.CONTENT_SOURCE_TYPE_NDC // ContentSourceType.CONTENT_SOURCE_TYPE_3RD_PARTY repeated ContentSourceType conten_source_types = 3; @@ -78,7 +90,8 @@ message TransportSearchResponse { // ### Transport Search Service // -// Takes `TransportSearchRequest` message type and returns `TransportSearchResponse` message type. +// Takes `TransportSearchRequest` message type and returns `TransportSearchResponse` +// message type. // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search.proto.dot.svg) diff --git a/proto/cmp/services/transport/v1alpha1/search_result_types.proto b/proto/cmp/services/transport/v1alpha1/search_result_types.proto index 1798fdab..aff348fd 100644 --- a/proto/cmp/services/transport/v1alpha1/search_result_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_result_types.proto @@ -12,49 +12,52 @@ import "cmp/types/v1alpha1/service_fact.proto"; import "cmp/types/v1alpha1/traveller.proto"; // Transport search result +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_option_types.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_option_types.proto.dot.svg) message TransportSearchResult { // Unique option ID for this search int32 option_id = 1; - // Offer ID - // option to carry through an offer identifier for other statefull provider systems like NDC AirShopping RS + // Offer ID. + // + // Option to carry through an offer identifier for other stateful provider systems + // like NDC AirShopping RS string offer_id = 2; // Travellers - repeated cmp.types.v1alpha1.Traveller travellers = 7; + repeated cmp.types.v1alpha1.Traveller travellers = 3; - // Travelling trip - // See search.proto documentation - Trip travelling_trip = 9; + // Travelling trip. See `search.proto` documentation + Trip travelling_trip = 4; - // Returning trip - // See search.proto documentation - Trip returning_trip = 10; + // Returning trip. See `search.proto` documentation + Trip returning_trip = 5; // Total Price - cmp.types.v1alpha1.PriceDetail total_price = 11; + cmp.types.v1alpha1.PriceDetail total_price = 6; // Services - repeated cmp.types.v1alpha1.ServiceFact included_services = 12; - repeated cmp.types.v1alpha1.ServiceFact compulsory_extras = 13; - repeated cmp.types.v1alpha1.ServiceFact optional_extras = 14; + repeated cmp.types.v1alpha1.ServiceFact included_services = 7; + repeated cmp.types.v1alpha1.ServiceFact compulsory_extras = 8; + repeated cmp.types.v1alpha1.ServiceFact optional_extras = 9; // Rate Rules - repeated cmp.types.v1alpha1.RateRule rate_rules = 15; + repeated cmp.types.v1alpha1.RateRule rate_rules = 10; - // Fullfillment - repeated cmp.types.v1alpha1.Fulfillment fulfillments = 16; //FIXME: Can linktype be an ENUM? + // Fulfillment + repeated cmp.types.v1alpha1.Fulfillment fulfillments = 11; //FIXME: Can linktype be an ENUM? // 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.v1alpha1.DateTimeRange validity = 17; + // + // `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.v1alpha1.DateTimeRange validity = 12; // Cancel Policy - cmp.types.v1alpha1.CancelPolicy cancel_policy = 18; + cmp.types.v1alpha1.CancelPolicy cancel_policy = 13; // Observations - string observations = 19; + string observations = 14; } diff --git a/proto/cmp/services/transport/v1alpha1/trip_types.proto b/proto/cmp/services/transport/v1alpha1/trip_types.proto index 562b0136..679fd24b 100644 --- a/proto/cmp/services/transport/v1alpha1/trip_types.proto +++ b/proto/cmp/services/transport/v1alpha1/trip_types.proto @@ -9,6 +9,7 @@ import "cmp/types/v1alpha1/time.proto"; import "google/protobuf/timestamp.proto"; // ### Trip message type +// // This message type represents a one way trip, either travelling or returning. // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/trip_types.proto.dot.xs.svg) @@ -26,11 +27,12 @@ message Trip { // Arrival event TransitEvent arrival = 4; - // Trip Segments + // Trip segments repeated TripSegment trip_segments = 5; } // ### Trip Segment messag type +// // A segment of a trip message TripSegment { // Segment ID @@ -45,14 +47,18 @@ message TripSegment { // Ex: "BC" string retailer_code = 3; - // Sub Provider Code, replacing Operating carrier or identifying sub contracted services - // provided by other suppliers + // Sub Provider Code, replacing Operating carrier or identifying sub contracted + // services provided by other suppliers. + // // Ex: "BC" string sub_provider_code = 4; // Service Number + // // Ex: "1234" - // FIXME: Should this be an integer? For flights yes, but for trains and transfers? + // + // FIXME: Should this be an integer? For flights yes, but for trains and + // transfers? string service_number = 5; // Departure @@ -62,6 +68,7 @@ message TripSegment { TransitEvent arrival = 7; // Service description + // // Ex: "Economy" string service_description = 8; @@ -70,31 +77,38 @@ message TripSegment { string service_code = 9; // Trip Time + // // Ex: Time(hours=2, minutes=45) cmp.types.v1alpha1.Time trip_time = 10; // Trip Distance + // // Ex: `Distance(value=15, unit=DistanceType.DISTANCE_UNIT_KILOMETERS)` cmp.types.v1alpha1.Distance trip_distance = 11; // Min PAX + // // Ex: `1` int32 min_pax = 12; // Max PAX + // // Ex: `3` int32 max_max = 13; // Luggage + // // Ex: `3` int32 luggage = 14; // Price + // // Ex: `Price(net=240, currency=Currency.CURRENCY_EUR) cmp.types.v1alpha1.Price price = 15; } // ### Transit Event message type +// // Represents a departure or arrival event message TransitEvent { // Date tim of the event diff --git a/proto/cmp/types/v1alpha1/asset.proto b/proto/cmp/types/v1alpha1/asset.proto index c2e892ed..2df27f6e 100644 --- a/proto/cmp/types/v1alpha1/asset.proto +++ b/proto/cmp/types/v1alpha1/asset.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package cmp.types.v1alpha1; // An on-chain asset on the Camino Network +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/asset.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/asset.proto.dot.svg) message Asset { diff --git a/proto/cmp/types/v1alpha1/cancel_policy.proto b/proto/cmp/types/v1alpha1/cancel_policy.proto index 53912933..385afadb 100644 --- a/proto/cmp/types/v1alpha1/cancel_policy.proto +++ b/proto/cmp/types/v1alpha1/cancel_policy.proto @@ -6,48 +6,49 @@ import "cmp/types/v1alpha1/datetime_range.proto"; import "cmp/types/v1alpha1/price.proto"; import "google/protobuf/timestamp.proto"; -// Cancellation Policy: the cancellation policy section consists of 3 options: -// - a simple boolean for refundable or non-refundable options -// - a "free cancellation upto" DateTime -// - complete cancellation policies with from/to DateTime stamps +// Cancellation Policy: The cancellation policy section consists of 3 options: +// +// - A simple boolean for refundable or non-refundable options +// - A "free cancellation upto" DateTime +// - Complete cancellation policies with from/to DateTime stamps +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/cancel_policy.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/cancel_policy.proto.dot.svg) message CancelPolicy { // Cancellation policy refundable or not bool refundable = 1; - // The "free cancellation upto" identifier specifies the exact DateTime upto when a booking - // can be cancelled free of charge. - + // The "free cancellation upto" identifier specifies the exact DateTime upto when + // a 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 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 date ranges with their penalties 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 penalties, related to the start DateTime - // of the service or product delivery. - + // Full cancellation 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 date ranges with their penalties 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 penalties, related to the start DateTime of the service or product + // delivery. repeated CancelPenalty cancel_penalties = 3; } //Cancellation Penalty message CancelPenalty { - // When this penalty is valid. Either use the start and end date of the DateTime range - + // When this penalty is valid. Either use the start and end date of the DateTime + // range cmp.types.v1alpha1.DateTimeRange datetime_range = 1; - // Penalty value. - // Percentages of the selling price are purposely not allowed for simplicity and uniformity. + // Penalty value. Percentages of the selling price are purposely not allowed for + // simplicity and uniformity. cmp.types.v1alpha1.Price value = 2; - // Description of the penalty in a non computable manner. The Description should be in - // the language that is specified in the request. + // Description of the penalty in a non computable manner. The Description should + // be in the language that is specified in the request. string description = 3; // For which rateplan the penalty is valid. diff --git a/proto/cmp/types/v1alpha1/common.proto b/proto/cmp/types/v1alpha1/common.proto index 89bb63a8..3d636151 100644 --- a/proto/cmp/types/v1alpha1/common.proto +++ b/proto/cmp/types/v1alpha1/common.proto @@ -6,6 +6,7 @@ syntax = "proto3"; package cmp.types.v1alpha1; // ### CM Message Header +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/common.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/common.proto.dot.svg) message Header { @@ -18,10 +19,15 @@ message Header { // Version message Version { - // API Version, major version which can have breaking changes (semantic versioning) + // API Version, major version which can have breaking changes (semantic + // versioning) int32 major = 1; - // API Version, minor version has backwards compatible new features (semantic versioning) + + // API Version, minor version has backwards compatible new features (semantic + // versioning) int32 minor = 2; - // API Version, patch version small improvements and bugfixes (semantic versioning) + + // API Version, patch version small improvements and bugfixes (semantic + // versioning) int32 patch = 3; } diff --git a/proto/cmp/types/v1alpha1/country.proto b/proto/cmp/types/v1alpha1/country.proto index 895a5738..d72d92f9 100644 --- a/proto/cmp/types/v1alpha1/country.proto +++ b/proto/cmp/types/v1alpha1/country.proto @@ -2,10 +2,11 @@ syntax = "proto3"; package cmp.types.v1alpha1; -// ## Language options +// ### Language options // // Country options according to ISO 3166-1, with the 31 most popular countries // first, using fewer bytes in the code thus reducing message size. +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/country.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/country.proto.dot.svg) enum Country { diff --git a/proto/cmp/types/v1alpha1/currency.proto b/proto/cmp/types/v1alpha1/currency.proto index 63b14d66..94e2abff 100644 --- a/proto/cmp/types/v1alpha1/currency.proto +++ b/proto/cmp/types/v1alpha1/currency.proto @@ -2,10 +2,11 @@ syntax = "proto3"; package cmp.types.v1alpha1; -// ## Currency list of ISO 4217 standard +// ### Currency list of ISO 4217 standard +// +// First 20 currencies are the most traded currencies in the world. This is done to +// optimize the size of the protobuf message size. // -// First 20 currencies are the most traded currencies in the world. -// This is done to optimize the size of the protobuf message size. // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/currency.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/currency.proto.dot.svg) enum Currency { diff --git a/proto/cmp/types/v1alpha1/date.proto b/proto/cmp/types/v1alpha1/date.proto index 7f71393d..bff59f55 100644 --- a/proto/cmp/types/v1alpha1/date.proto +++ b/proto/cmp/types/v1alpha1/date.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package cmp.types.v1alpha1; // Date Message +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/date.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/date.proto.dot.svg) message Date { diff --git a/proto/cmp/types/v1alpha1/datetime_range.proto b/proto/cmp/types/v1alpha1/datetime_range.proto index 999a83d4..7a01b0c3 100644 --- a/proto/cmp/types/v1alpha1/datetime_range.proto +++ b/proto/cmp/types/v1alpha1/datetime_range.proto @@ -4,7 +4,8 @@ package cmp.types.v1alpha1; import "google/protobuf/timestamp.proto"; -// Date Message +// Date Range Message +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/datetime_range.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/datetime_range.proto.dot.svg) message DateTimeRange { diff --git a/proto/cmp/types/v1alpha1/distance.proto b/proto/cmp/types/v1alpha1/distance.proto index 641c761b..2d2a8167 100644 --- a/proto/cmp/types/v1alpha1/distance.proto +++ b/proto/cmp/types/v1alpha1/distance.proto @@ -2,7 +2,8 @@ syntax = "proto3"; package cmp.types.v1alpha1; -// ### Distance unit and value pair +// Distance unit and value pair +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/distance.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/distance.proto.dot.svg) message Distance { diff --git a/proto/cmp/types/v1alpha1/dow.proto b/proto/cmp/types/v1alpha1/dow.proto index 381afd86..85022bf2 100644 --- a/proto/cmp/types/v1alpha1/dow.proto +++ b/proto/cmp/types/v1alpha1/dow.proto @@ -2,20 +2,22 @@ syntax = "proto3"; package cmp.types.v1alpha1; -// DOW +// ### Day of Week // -// DOW means DayOfWeek and is used to determine specific arrival days of the week a customer would like to go on holidays -// for example only travelling on a Saturday or Sunday. -// It is also used to express that a show, tour or excursion is only taking place on Sundays. Or that a forthnight -// Flotilla Sailing starts on Saturday. +// DOW means DayOfWeek and is used to determine specific arrival days of the week a +// customer would like to go on holidays for example only travelling on a Saturday +// or Sunday. It is also used to express that a show, tour or excursion is only +// taking place on Sundays. Or that a forthnight Flotilla Sailing starts on +// Saturday. // -// we are using a bitmask like this: +// We are using a bitmask like this: // -// dow = 112 -// the intention is to express Friday, Saturday and Sunday, which is binary 1110000, which computes to DOW=112, -// like just fri+sat is 110000 which computes to DOW=48 or Monday and Tuesday which computes to DOW=3 -// This is easy to calculate with basic integer mathematics, like for Sunday + Wednesday you sum 64 + 4 = 68, -// so you set the field to 68. +// With `dow=112` the intention is to express Friday, Saturday and Sunday, which is +// binary 1110000, which computes to `dow=112`, like just fri+sat is `110000` which +// computes to `dow=48` or Monday and Tuesday which computes to `dow=3`. +// +// This is easy to calculate with basic integer mathematics, like for Sunday + +// Wednesday you sum 64 + 4 = 68, so you set the field to 68. // // See this table with DOW logic: // diff --git a/proto/cmp/types/v1alpha1/email.proto b/proto/cmp/types/v1alpha1/email.proto index ccb0b08f..7d270385 100644 --- a/proto/cmp/types/v1alpha1/email.proto +++ b/proto/cmp/types/v1alpha1/email.proto @@ -4,7 +4,7 @@ package cmp.types.v1alpha1; // Email // -// Email type for hotels, holiday homes etc +// Email type for hotels, holiday homes etc. // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/email.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/email.proto.dot.svg) diff --git a/proto/cmp/types/v1alpha1/filter.proto b/proto/cmp/types/v1alpha1/filter.proto index b371f491..7024409e 100644 --- a/proto/cmp/types/v1alpha1/filter.proto +++ b/proto/cmp/types/v1alpha1/filter.proto @@ -3,10 +3,12 @@ syntax = "proto3"; package cmp.types.v1alpha1; // Upfront filtering of possible search options in the search response +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/filter.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/filter.proto.dot.svg) message Filter { // Filter code agreed between provider and distributor + // // FIXME: Should filters be standardized per vertical? string filter_code = 1; diff --git a/proto/cmp/types/v1alpha1/fulfillment.proto b/proto/cmp/types/v1alpha1/fulfillment.proto index e1600e72..c929d7cc 100644 --- a/proto/cmp/types/v1alpha1/fulfillment.proto +++ b/proto/cmp/types/v1alpha1/fulfillment.proto @@ -3,19 +3,24 @@ syntax = "proto3"; package cmp.types.v1alpha1; // ### Fulfillment message type +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/fulfillment.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/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/v1alpha1/language.proto b/proto/cmp/types/v1alpha1/language.proto index 340a4307..f24129f4 100644 --- a/proto/cmp/types/v1alpha1/language.proto +++ b/proto/cmp/types/v1alpha1/language.proto @@ -4,9 +4,10 @@ package cmp.types.v1alpha1; // ### Language options // -// Language options according to ISO 639-1, with the 26 most popular languages first. -// This is done to use the smaller values more frequently and thus consume less bytes -// for this field. +// Language options according to ISO 639-1, with the 26 most popular languages +// first. This is done to use the smaller values more frequently and thus consume +// less bytes for this field. +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/language.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/language.proto.dot.svg) enum Language { diff --git a/proto/cmp/types/v1alpha1/location.proto b/proto/cmp/types/v1alpha1/location.proto index f0aafcf0..263488f1 100644 --- a/proto/cmp/types/v1alpha1/location.proto +++ b/proto/cmp/types/v1alpha1/location.proto @@ -8,6 +8,7 @@ import "cmp/types/v1alpha1/distance.proto"; // ### Coordinate // // Represents a geographic location +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/location.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/location.proto.dot.svg) message Coordinate { @@ -64,8 +65,8 @@ enum LocationCodeType { // ICAO airport code LOCATION_CODE_TYPE_ICAO_CODE = 3; - // A 3-character code used for train stations. Previously referred to as - // CRS (Computer Reservation System) or NRS (National Reservation System) codes. + // A 3-character code used for train stations. Previously referred to as CRS + // (Computer Reservation System) or NRS (National Reservation System) codes. LOCATION_CODE_TYPE_3ALPHA_CODE = 4; // A 6-digit code for train stations generally used for retail purposes @@ -74,9 +75,9 @@ enum LocationCodeType { // Codes relating to points used in deriving train schedules LOCATION_CODE_TYPE_TIPLOC_CODE = 6; - // These codes can refer to locations such as sidings and junctions. - // STANOX codes are grouped by geographical area - the first two digits specify - // the area in which the location exists. + // These codes can refer to locations such as sidings and junctions. STANOX codes + // are grouped by geographical area - the first two digits specify the area in + // which the location exists. LOCATION_CODE_TYPE_STANOX_CODE = 7; // Used by multi-modal journey planners and timetables @@ -93,5 +94,4 @@ enum LocationCodeType { // Used in combination with the HERE Places API LOCATION_CODE_TYPE_HERE_ID = 12; - } diff --git a/proto/cmp/types/v1alpha1/meal_plan.proto b/proto/cmp/types/v1alpha1/meal_plan.proto index bfad518d..fcc0b1fb 100644 --- a/proto/cmp/types/v1alpha1/meal_plan.proto +++ b/proto/cmp/types/v1alpha1/meal_plan.proto @@ -3,14 +3,17 @@ syntax = "proto3"; package cmp.types.v1alpha1; // Meal Plan message type +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/mealplan.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/mealplan.proto.dot.svg) message MealPlan { // Meal Plan Code + // // Ex: `MealPlan.MEAL_PLAN_AI` for "All Inclusive" meal plan. MealPlanCode meal_plan_code = 1; // Mealplan description. In case of enrichment additional description of the unit code. + // // Ex: "All Inclusive" string meal_plan_description = 2; } diff --git a/proto/cmp/types/v1alpha1/partner.proto b/proto/cmp/types/v1alpha1/partner.proto index 33ed2957..062c0869 100644 --- a/proto/cmp/types/v1alpha1/partner.proto +++ b/proto/cmp/types/v1alpha1/partner.proto @@ -6,6 +6,7 @@ import "cmp/types/v1alpha1/token.proto"; import "cmp/types/v1alpha1/wallet.proto"; // ### Partner message type +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/partner.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/partner.proto.dot.svg) message Partner { @@ -19,6 +20,7 @@ message Partner { string business_description = 3; // Domain for the partner + // // Ex: chain4travel.com // // Provider should create two DNS records for their address to verify they own @@ -28,15 +30,17 @@ message Partner { // Example DNS TXT Records: // `@ IN TXT "camino-t-addr=T-camino1tdkgjhfjq8z4glnvu8davxvdm66jx55tfr6qnz" TTL 3600` // `@ IN TXT "camino-pubkey=043134d4b70236e59f99ae9e6ed9d1d512bacfa83506c9371ff4e372b7837844d82b1c56d81d04a23e25b18ff3f7eb531a5ef17df3bf5730b29e13f854a65b4651" TTL 3600` + // + // FIXME: Need review here! string domain = 4; // On chain payment support bool on_chain_payment_supported = 5; // Supported tokens for payment on-chain - // This is a list of `ERC20Token` type - // 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. + // + // 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; // Off chain payment support @@ -48,8 +52,8 @@ message Partner { // Partner addresses of the messenger bots repeated cmp.types.v1alpha1.WalletAddress addresses = 9; - // Partner's consortium member wallet address - // This address should be the one who creates the entry in Partner Configuration on the chain. + // Partner's consortium member wallet address. This address should be the one who + // creates the entry in Partner Configuration on the chain. cmp.types.v1alpha1.WalletAddress partner_wallet_address = 10; } @@ -65,42 +69,48 @@ message PartnerService { // version. // // Ex: "cmp.services.accommodation.v1alpha1.AccommodationSearchService" - // Ex ChatGPT: string service_name = 1; // Response of the service. - // FIXME: Do we need this? One can check the service definition and see the response - // message type. + // // Ex: "cmp.services.accommodation.v1alpha1.AccommodationSearchResponse" + // + // FIXME: Do we need this? One can check the service definition and see the + // response message type. string response_name = 2; // Result field - // Ex: "options" - // Representing the field at "cmp.services.accommodation.v1alpha1.AccommodationSearchResponse.options" - // which is a SearchOption type + // + // Ex: "options" representing the field at + // "cmp.services.accommodation.v1alpha1.AccommodationSearchResponse.options" which + // is a SearchOption type string result_field = 3; - // Result Type. Ex: ResultType.RESULT_TYPE_DISCRETE + // Result Type. + // + // Ex: ResultType.RESULT_TYPE_DISCRETE ResultType result_type = 4; // Default bundled price for the service BundledPrice bundled_price = 5; // Exclusive bundled prices for specific addresses. + // // This field should be a serialized proto message of `CustomBundledPrice` type. - // The field's scalar type is `bytes` on purpose, so it can be encrypted if - // it's desired. + // The field's scalar type is `bytes` on purpose, so it can be encrypted if it's + // desired. repeated bytes custom_bundled_prices = 6; } // Custom Bundle Price // -// This message encapsulates `BundledPrice` message to be used for a custom -// price per buyer. If it's required, this message can be encrypted before -// adding it to the `PartnerService` message type. +// This message encapsulates `BundledPrice` message to be used for a custom price +// per buyer. If it's required, this message can be encrypted before adding it to +// the `PartnerService` message type. message CustomBundledPrice { // Address of the wallet that the bundled price below is valid for. string address = 1; + // Bundled price that is exclusive to the wallet address above. BundledPrice bundled_price = 2; } @@ -110,7 +120,9 @@ message CustomBundledPrice { // Message representing a bundled price of a service. message BundledPrice { // Bundle size. + // // Example for a chat bot: 1 + // // Example for SearchOptions: 100 int32 results_per_bundle = 1; @@ -120,6 +132,7 @@ message BundledPrice { BundleUnit results_per_bundle_unit = 2; // Price per bundle, in nCAMs + // // Ex: 100 int64 price_per_bundle = 3; } @@ -137,10 +150,13 @@ enum BundleUnit { enum ResultType { RESULT_TYPE_UNSPECIFIED = 0; - // Objects countable with integers, like the SearchOption of an AccommodationSearchResponse + // Objects countable with integers, like the SearchOption of an + // `AccommodationSearchResponse` RESULT_TYPE_DISCRETE = 1; - // Continous data types like strings. Ex: A response from a chat bot can be 100 chars long - // or 20000 chars long. Or in bytes or kilobytes for some binary data. + // Continous data types like strings. + // + // Ex: A response from a chat bot can be 100 chars long or 20000 chars long. Or in + // bytes or kilobytes for some binary data. RESULT_TYPE_NON_DISCRETE = 2; } diff --git a/proto/cmp/types/v1alpha1/price.proto b/proto/cmp/types/v1alpha1/price.proto index 19358b17..a13a490b 100644 --- a/proto/cmp/types/v1alpha1/price.proto +++ b/proto/cmp/types/v1alpha1/price.proto @@ -6,29 +6,37 @@ import "cmp/types/v1alpha1/currency.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 net value as a Price object and additional fields as +// gross, binding, concept, and breakdown. // // Breakdown is a recursively inhereted object of PriceDetail. This way complex // pricing structures can be represented. +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/price.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/price.proto.dot.svg) 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 // and the product or service cannot be offered for a lower price. bool binding = 3; + // Description of the product or service this price(element) is valid for. string description = 4; + // Type of price string type = 5; + // Type code of the price string type_code = 6; + // Description int32 units = 7; + // We can use a single PriceDetail to represent a price breakdown. repeated PriceDetail breakdown = 8; } diff --git a/proto/cmp/types/v1alpha1/rate.proto b/proto/cmp/types/v1alpha1/rate.proto index 8ca90225..3554ea9a 100644 --- a/proto/cmp/types/v1alpha1/rate.proto +++ b/proto/cmp/types/v1alpha1/rate.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package cmp.types.v1alpha1; // Rate Rule +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/rate.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/rate.proto.dot.svg) message RateRule { @@ -20,14 +21,16 @@ enum RateRuleType { RATE_RULE_TYPE_SEMI_NON_REFUNDABLE = 4; } -// Rate plan message type -// Contains `rate_plan` and `rate_plan_description` fields as strings. +// Rate plan message type. Contains `rate_plan` and `rate_plan_description` fields +// as strings. message RatePlan { // Rate plan + // // Ex: ??? string rate_plan = 1; // Rateplan description. In case of enrichment additional description of the unit code. + // // Ex: "Package Rate" string rate_plan_description = 2; } diff --git a/proto/cmp/types/v1alpha1/search.proto b/proto/cmp/types/v1alpha1/search.proto index e98c739a..6e1829ef 100644 --- a/proto/cmp/types/v1alpha1/search.proto +++ b/proto/cmp/types/v1alpha1/search.proto @@ -17,10 +17,12 @@ import "cmp/types/v1alpha1/uuid.proto"; // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/search.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/search.proto.dot.svg) message SearchParameters { - // Requested currency in which prices have to be supplied in the response according to ISO 4217 Currency codes + // Requested currency in which prices have to be supplied in the response + // according to ISO 4217 Currency codes Currency currency = 1; - // Requested language setting for descriptions in the response according to ISO 639-1 Language codes + // Requested language setting for descriptions in the response according to ISO + // 639-1 Language codes Language language = 2; // Request generated for a specific market according to ISO 3166-1 Country codes @@ -29,7 +31,8 @@ message SearchParameters { // Include OnRequest options in the response or only immediately bookable options bool include_on_request = 4; - // Only show the cheapest option for one product, or include all possible combinations + // Only show the cheapest option for one product, or include all possible + // combinations bool include_combinations = 5; // Limit the maximum number of options included in the response @@ -38,18 +41,17 @@ message SearchParameters { // Specify the sorting required in the response Sorting sorting = 7; - // Filters for the search - // Various provider and product specific filters can be provided here in - // agreed name/value pairs + // Filters for the search. Various provider and product specific filters can be + // provided here in agreed name/value pairs. repeated Filter filters = 8; - // Free-text field to provide more detials for better offer personalization. - // This field can be provided in combination with a Geo location or as stand-alone. + // Free-text field to provide more detials for better offer personalization. This + // field can be provided in combination with a Geo location or as stand-alone. string search_description_text = 9; // The speech is provided as a link to a recording to process for better offer - // personalization. This field can be provided in combination with a Geo - // location or as stand-alone. + // personalization. This field can be provided in combination with a Geo location + // or as stand-alone. string search_description_audio_url = 10; } @@ -68,7 +70,7 @@ message SearchParametersSpecific { // Geo tree type, representted by Country, Region, and City_or_Resort. GeoTree location_geo_tree = 11; - // Geo circle. Represented by a coordinate and a distance for radius + // Geo circle. Represented by a coordinate and a distance for radius. GeoCircle location_geo_circle = 12; // Geo polygon. Represented by a list of coordinate points. @@ -82,15 +84,16 @@ message SearchParametersSpecific { repeated RatePlan rate_plan = 17; // Rate Rules - // FIXME: Did we decided to remove this from SearchParameters? - // FIXME: Maybe some users/distributors would want to search for only - // FIXME: RESELLABLE offers? + // + // FIXME: Did we decided to remove this from SearchParameters? Maybe some + // users/distributors would want to search for only RESELLABLE offers? repeated RateRule rate_rules = 18; } // Search Response Metadata message SearchRequestMetadata { - // An identifier for external sessions, aiding in tracking and continuity across sessions. + // An identifier for external sessions, aiding in tracking and continuity across + // sessions. string external_session_id = 1; } @@ -99,7 +102,8 @@ message SearchResponseMetadata { // Context for Inventory system communication. string context = 1; - // Errors encountered in the generation of the response. Standardized error list to be created. + // Errors encountered in the generation of the response. Standardized error list + // to be created. string errors = 2; // Warnings encountered in the generation of the response. @@ -108,9 +112,11 @@ message SearchResponseMetadata { // Supplier code from the Inventory System for this search response. string supplier_code = 4; - // An identifier for external sessions, aiding in tracking and continuity across sessions. + // An identifier for external sessions, aiding in tracking and continuity across + // sessions. string external_session_id = 5; - // Search_id to be used in the Validation Request. This must be a UUID according to RFC 4122 + // Search_id to be used in the Validation Request. This must be a UUID according + // to RFC 4122 UUID search_id = 6; } diff --git a/proto/cmp/types/v1alpha1/sorting.proto b/proto/cmp/types/v1alpha1/sorting.proto index 04b3bccf..1004a061 100644 --- a/proto/cmp/types/v1alpha1/sorting.proto +++ b/proto/cmp/types/v1alpha1/sorting.proto @@ -2,8 +2,10 @@ syntax = "proto3"; package cmp.types.v1alpha1; -// Sorting type and order: this is being used in requests to specify the sorting -// required in the response. +// Sorting type and order +// +// This is being used in requests to specify the sorting required in the response. +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/sorting.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/sorting.proto.dot.svg) message Sorting { diff --git a/proto/cmp/types/v1alpha1/time.proto b/proto/cmp/types/v1alpha1/time.proto index 7a9db7a1..df893545 100644 --- a/proto/cmp/types/v1alpha1/time.proto +++ b/proto/cmp/types/v1alpha1/time.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package cmp.types.v1alpha1; // Time Message +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/time.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/time.proto.dot.svg) message Time { diff --git a/proto/cmp/types/v1alpha1/token.proto b/proto/cmp/types/v1alpha1/token.proto index 46b46992..81439074 100644 --- a/proto/cmp/types/v1alpha1/token.proto +++ b/proto/cmp/types/v1alpha1/token.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package cmp.types.v1alpha1; // ERC20 Token Reference +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/token.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/token.proto.dot.svg) message ERC20Token { diff --git a/proto/cmp/types/v1alpha1/travel_period.proto b/proto/cmp/types/v1alpha1/travel_period.proto index 184089e6..67c3d081 100644 --- a/proto/cmp/types/v1alpha1/travel_period.proto +++ b/proto/cmp/types/v1alpha1/travel_period.proto @@ -6,31 +6,47 @@ import "cmp/types/v1alpha1/date.proto"; import "cmp/types/v1alpha1/dow.proto"; // Travel Period +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/travel_period.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/travel_period.proto.dot.svg) message TravelPeriod { - // Start date of a trip for messages where no Date/Time is required (datetime_range.proto) when the travelling starts. - // Most trips will be for an exact start and end date. In that case just these two fields are used. We discourage the use - // of only a start date and Length of Stay. + // Start date of a trip for messages where no Date/Time is required + // (datetime_range.proto) when the travelling starts. Most trips will be for an + // exact start and end date. In that case just these two fields are used. We + // discourage the use of only a start date and Length of Stay. cmp.types.v1alpha1.Date start_date = 1; - // End date of a trip for messages where no Date/Time is required (datetime_range.proto) when the travelling ends. - // The end date is different when the trip is a one-way from point A to B compared to when the trip is a fortnight - // holiday and the customers return home on the end date. + + // End date of a trip for messages where no Date/Time is required + // (datetime_range.proto) when the travelling ends. The end date is different when + // the trip is a one-way from point A to B compared to when the trip is a + // fortnight holiday and the customers return home on the end date. cmp.types.v1alpha1.Date end_date = 2; - // Start and end date can be set wider than the desired length of a trip, so that various alternatives can be considered. - // Ex start date = 1 April, End date is 30 June, stay would be for 7 nights. - // Setting the boolean to true means that the period between start and end date should be more than the Length of Stay. + // Start and end date can be set wider than the desired length of a trip, so that + // various alternatives can be considered. + // + // Ex: start date = 1 April, End date is 30 June, stay would be for 7 nights. + // + // Setting the boolean to true means that the period between start and end date + // should be more than the Length of Stay. bool flexible = 3; + // Setting the length of the trip in case of a flexible search. - // Ex start date = 1 April, End date is 30 June, stay would be for 7 to 7 nights. - // Ex start date = 1 April, End date is 30 June, stay would be for 7 to 10 nights. + // + // Ex: start date = 1 April, End date is 30 June, stay would be for 7 to 7 nights. + // + // Ex: start date = 1 April, End date is 30 June, stay would be for 7 to 10 nights. + // // The arrival and departure must fall between start and end-date. int32 los_from_nights = 4; + int32 los_to_nights = 5; - // By adding a DayOfWeek restriction, the number of results can be reduced to the specific arrival days in the interest - // of the end-customer who for example only can travel during weekends or at the contrary desires to avoid the crowds - // by travelling during weekdays. - // a bitmask is being used to express the DOW or DOWs. + + // By adding a DayOfWeek restriction, the number of results can be reduced to the + // specific arrival days in the interest of the end-customer who for example only + // can travel during weekends or at the contrary desires to avoid the crowds by + // travelling during weekdays. + // + // A bitmask is being used to express the DOW or DOWs. cmp.types.v1alpha1.DayOfWeek dow = 6; } diff --git a/proto/cmp/types/v1alpha1/traveller.proto b/proto/cmp/types/v1alpha1/traveller.proto index 3caf72d9..7b0ba870 100644 --- a/proto/cmp/types/v1alpha1/traveller.proto +++ b/proto/cmp/types/v1alpha1/traveller.proto @@ -6,6 +6,7 @@ import "cmp/types/v1alpha1/country.proto"; import "cmp/types/v1alpha1/date.proto"; // Traveller +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/traveller.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/traveller.proto.dot.svg) message Traveller { @@ -20,7 +21,9 @@ message Traveller { // Birthdate cmp.types.v1alpha1.Date birthdate = 3; - // The country code for the nationality of the traveller. FIXME: Or should we have instead of "UK" "English"? + // The country code for the nationality of the traveller. + // + // FIXME: Or should we have instead of "UK" "English"? cmp.types.v1alpha1.Country nationality = 4; //Gender from the enum below diff --git a/proto/cmp/types/v1alpha1/uuid.proto b/proto/cmp/types/v1alpha1/uuid.proto index fb49126a..a4ce40f7 100644 --- a/proto/cmp/types/v1alpha1/uuid.proto +++ b/proto/cmp/types/v1alpha1/uuid.proto @@ -3,7 +3,9 @@ syntax = "proto3"; package cmp.types.v1alpha1; // ### UUID message type +// // This must be a UUID according to RFC 4122 standard. +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/uuid.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/uuid.proto.dot.svg) message UUID { diff --git a/proto/cmp/types/v1alpha1/wallet.proto b/proto/cmp/types/v1alpha1/wallet.proto index 22eafad0..add02dd8 100644 --- a/proto/cmp/types/v1alpha1/wallet.proto +++ b/proto/cmp/types/v1alpha1/wallet.proto @@ -3,15 +3,17 @@ syntax = "proto3"; package cmp.types.v1alpha1; // Address and public key for a wallet +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/wallet.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/wallet.proto.dot.svg) message WalletAddress { // Wallet address - // Example: - // `T-camino1tdkgjhfjq8z4glnvu8davxvdm66jx55tfr6qnz` + // + // Example: `T-camino1tdkgjhfjq8z4glnvu8davxvdm66jx55tfr6qnz` string address = 1; // Public key for the address above + // // Example: // `043134d4b70236e59f99ae9e6ed9d1d512bacfa83506c9371ff4e372b7837844d82b1c56d81d04a23e25b18ff3f7eb531a5ef17df3bf5730b29e13f854a65b4651` string public_key = 2;