From 0aa1c5f924d84b4b43791870438f5ac7a9bb381a Mon Sep 17 00:00:00 2001 From: Ekrem Seren Date: Tue, 12 Dec 2023 21:54:44 +0300 Subject: [PATCH] refactor options to results --- proto/cmp/services/accommodation/v1alpha1/search.proto | 6 +++--- ...ch_option_types.proto => search_result_types.proto} | 7 ++++--- proto/cmp/services/activity/v1alpha1/search.proto | 6 +++--- ...ch_option_types.proto => search_result_types.proto} | 2 +- proto/cmp/services/transport/v1alpha1/search.proto | 10 +++++----- ...ch_option_types.proto => search_result_types.proto} | 2 +- 6 files changed, 17 insertions(+), 16 deletions(-) rename proto/cmp/services/accommodation/v1alpha1/{search_option_types.proto => search_result_types.proto} (90%) rename proto/cmp/services/activity/v1alpha1/{search_option_types.proto => search_result_types.proto} (98%) rename proto/cmp/services/transport/v1alpha1/{search_option_types.proto => search_result_types.proto} (98%) diff --git a/proto/cmp/services/accommodation/v1alpha1/search.proto b/proto/cmp/services/accommodation/v1alpha1/search.proto index 38e94813..3a745e3c 100644 --- a/proto/cmp/services/accommodation/v1alpha1/search.proto +++ b/proto/cmp/services/accommodation/v1alpha1/search.proto @@ -10,7 +10,7 @@ syntax = "proto3"; // This package is a **WIP**. package cmp.services.accommodation.v1alpha1; -import "cmp/services/accommodation/v1alpha1/search_option_types.proto"; +import "cmp/services/accommodation/v1alpha1/search_result_types.proto"; import "cmp/services/accommodation/v1alpha1/unit_types.proto"; import "cmp/types/v1alpha1/common.proto"; import "cmp/types/v1alpha1/search.proto"; @@ -57,8 +57,8 @@ message AccommodationSearchResponse { // Search response metadata cmp.types.v1alpha1.SearchResponseMetadata metadata = 2; - // Unique combinations of bookable options, like property, - repeated AccommodationSearchOption options = 3; + // Unique combinations of bookable search results, like property, + repeated AccommodationSearchResult results = 3; } // ### Accommodation Search Service definition diff --git a/proto/cmp/services/accommodation/v1alpha1/search_option_types.proto b/proto/cmp/services/accommodation/v1alpha1/search_result_types.proto similarity index 90% rename from proto/cmp/services/accommodation/v1alpha1/search_option_types.proto rename to proto/cmp/services/accommodation/v1alpha1/search_result_types.proto index 8de5260b..1287657c 100644 --- a/proto/cmp/services/accommodation/v1alpha1/search_option_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/search_result_types.proto @@ -11,9 +11,10 @@ import "cmp/types/v1alpha1/rate.proto"; // // This type represents a search result and is used in the // `AccommodationSearchResponse` message. -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search_option_types.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search_option_types.proto.dot.svg) -message AccommodationSearchOption { +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search_result_types.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search_result_types.proto.dot.svg) +message AccommodationSearchResult { // Option ID for the search option. This is an increasing number starting at 0 and // increasing by 1 for every search result. int32 option_id = 1; diff --git a/proto/cmp/services/activity/v1alpha1/search.proto b/proto/cmp/services/activity/v1alpha1/search.proto index 4bde5ccb..9a514932 100644 --- a/proto/cmp/services/activity/v1alpha1/search.proto +++ b/proto/cmp/services/activity/v1alpha1/search.proto @@ -10,7 +10,7 @@ syntax = "proto3"; // This package is a **WIP**. package cmp.services.activity.v1alpha1; -import "cmp/services/activity/v1alpha1/search_option_types.proto"; +import "cmp/services/activity/v1alpha1/search_result_types.proto"; import "cmp/types/v1alpha1/common.proto"; import "cmp/types/v1alpha1/location.proto"; import "cmp/types/v1alpha1/search.proto"; @@ -91,8 +91,8 @@ message ActivitySearchResponse { // Search response metadata cmp.types.v1alpha1.SearchResponseMetadata metadata = 2; - // Unique combinations of bookable options - repeated ActivitySearchOption options = 3; + // Unique combinations of bookable search results + repeated ActivitySearchResult results = 3; } // ### Activity Search Service diff --git a/proto/cmp/services/activity/v1alpha1/search_option_types.proto b/proto/cmp/services/activity/v1alpha1/search_result_types.proto similarity index 98% rename from proto/cmp/services/activity/v1alpha1/search_option_types.proto rename to proto/cmp/services/activity/v1alpha1/search_result_types.proto index 40174a28..e8ffc357 100644 --- a/proto/cmp/services/activity/v1alpha1/search_option_types.proto +++ b/proto/cmp/services/activity/v1alpha1/search_result_types.proto @@ -13,7 +13,7 @@ import "google/protobuf/timestamp.proto"; // `ActivitySearchResponse` message. // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/search_option_types.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/search_option_types.proto.dot.svg) -message ActivitySearchOption { +message ActivitySearchResult { // Option ID for the search option. This is an increasing number starting at 0 and // increasing by 1 for every search result. int32 option_id = 1; diff --git a/proto/cmp/services/transport/v1alpha1/search.proto b/proto/cmp/services/transport/v1alpha1/search.proto index 3454ec55..c9d61294 100644 --- a/proto/cmp/services/transport/v1alpha1/search.proto +++ b/proto/cmp/services/transport/v1alpha1/search.proto @@ -9,7 +9,7 @@ syntax = "proto3"; // This package is a WIP. package cmp.services.transport.v1alpha1; -import "cmp/services/transport/v1alpha1/search_option_types.proto"; +import "cmp/services/transport/v1alpha1/search_result_types.proto"; import "cmp/services/transport/v1alpha1/source_types.proto"; import "cmp/services/transport/v1alpha1/trip_types.proto"; import "cmp/types/v1alpha1/common.proto"; @@ -47,14 +47,14 @@ message TransportSearchRequest { // 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 + // 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 = 9; // Returning trip - // In many cases our travel plans consist of going to a destination and return to + // In many cases our travel plans consist of going to a destination and return to // the same place where we started Trip returning_trip = 10; @@ -74,8 +74,8 @@ message TransportSearchResponse { // ContentSourceType.CONTENT_SOURCE_TYPE_3RD_PARTY repeated ContentSourceType conten_source_types = 3; - // Transit Search Options (Results) - repeated TransportSearchOption options = 4; + // Transit search results + repeated TransportSearchResult results = 4; } // ## Transport Search Service diff --git a/proto/cmp/services/transport/v1alpha1/search_option_types.proto b/proto/cmp/services/transport/v1alpha1/search_result_types.proto similarity index 98% rename from proto/cmp/services/transport/v1alpha1/search_option_types.proto rename to proto/cmp/services/transport/v1alpha1/search_result_types.proto index 83d7bafe..1798fdab 100644 --- a/proto/cmp/services/transport/v1alpha1/search_option_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_result_types.proto @@ -14,7 +14,7 @@ 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 TransportSearchOption { +message TransportSearchResult { // Unique option ID for this search int32 option_id = 1;