Skip to content

Commit

Permalink
refactor options to results
Browse files Browse the repository at this point in the history
  • Loading branch information
havan committed Dec 12, 2023
1 parent c4bc1e4 commit 0aa1c5f
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
6 changes: 3 additions & 3 deletions proto/cmp/services/accommodation/v1alpha1/search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions proto/cmp/services/activity/v1alpha1/search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions proto/cmp/services/transport/v1alpha1/search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0aa1c5f

Please sign in to comment.