Skip to content

Commit

Permalink
Fix all comment lines to max 84 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
havan committed Dec 15, 2023
1 parent 25fdda4 commit 92bef6e
Show file tree
Hide file tree
Showing 38 changed files with 354 additions and 229 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
52 changes: 30 additions & 22 deletions proto/cmp/services/accommodation/v1alpha1/search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions proto/cmp/services/accommodation/v1alpha1/unit_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down
30 changes: 17 additions & 13 deletions proto/cmp/services/activity/v1alpha1/search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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
Expand Down
14 changes: 4 additions & 10 deletions proto/cmp/services/activity/v1alpha1/search_result_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand Down Expand Up @@ -42,7 +42,7 @@ message ActivitySearchResult {

// Pricing type
// Ex: "PerPerson", "PerGroup"
PricingType pricing_type = 9;
PricingType pricing_type = 9;
}

// ### Activity Info
Expand Down Expand Up @@ -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
Expand All @@ -104,7 +98,7 @@ message PickupDropoffEvent {
string location_code = 1;
// Ex: "Sunny Beach Hotel",
string location_name = 2;

// Ex: "true",
bool pickup_ind = 3;

Expand All @@ -119,4 +113,4 @@ enum PricingType {
PRICING_TYPE_UNSPECIFIED = 0;
PRICING_TYPE_PERPERSON = 1;
PRICING_TYPE_PERGROUP = 2;
}
}
7 changes: 5 additions & 2 deletions proto/cmp/services/network/v1alpha1/fee.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}

Expand Down
22 changes: 11 additions & 11 deletions proto/cmp/services/partner/v1alpha1/partner_configuration.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ 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;
}

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;
}

Expand All @@ -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);
}
6 changes: 3 additions & 3 deletions proto/cmp/services/ping/v1alpha1/ping.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 92bef6e

Please sign in to comment.