From de22863dd72af690291eea23f75423dfdfa4b68a Mon Sep 17 00:00:00 2001 From: Sam Jaarsma Date: Wed, 10 Jan 2024 17:06:38 +0100 Subject: [PATCH 1/4] added product list --- .../v1alpha1/search_parameters_types.proto | 13 ++++++----- proto/cmp/types/v1alpha1/product_list.proto | 22 +++++++++++++++++++ 2 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 proto/cmp/types/v1alpha1/product_list.proto diff --git a/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto b/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto index 889963d2..4aa2337d 100644 --- a/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto @@ -5,8 +5,9 @@ package cmp.services.accommodation.v1alpha1; import "cmp/types/v1alpha1/location.proto"; import "cmp/types/v1alpha1/meal_plan.proto"; import "cmp/types/v1alpha1/rate.proto"; +import "cmp/types/v1alpha1/product_list.proto"; -// ### Activity Search Parameters +// ### Accommodation Search Parameters // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto.dot.svg) @@ -39,8 +40,10 @@ message AccommodationSearchParameters { repeated cmp.types.v1alpha1.RatePlan rate_plan = 7; // 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? + // To be used when searching for specific rates like refundable or resellable offers repeated cmp.types.v1alpha1.RateRule rate_rules = 8; -} + + // Product code list + // Here a list of property codes would be used + repeated cmp.types.v1alpha1.ProductList product_list = 9; +} \ No newline at end of file diff --git a/proto/cmp/types/v1alpha1/product_list.proto b/proto/cmp/types/v1alpha1/product_list.proto new file mode 100644 index 00000000..56038486 --- /dev/null +++ b/proto/cmp/types/v1alpha1/product_list.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package cmp.types.v1alpha1; + +// Product list code and type +// +// This is being used in requests to specify the a list of products to be included in the reponse +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/product-list.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/product-list.proto.dot.svg) +message ProductList { + string product_code = 1; + ProductCodeType product_code_type = 2; +} + +// Product Code type +enum ProductCodeType { + PRODUCT_CODE_TYPE_UNSPECIFIED = 0; + PRODUCT_CODE_TYPE_PROVIDER = 1; + PRODUCT_CODE_TYPE_GIATA = 2; + PRODUCT_CODE_TYPE_GOAL_ID = 3; +} \ No newline at end of file From e22b7650776842ea5921e1fe6534d59f2ba50119 Mon Sep 17 00:00:00 2001 From: Sam Jaarsma Date: Thu, 11 Jan 2024 09:28:07 +0100 Subject: [PATCH 2/4] review comments implemented --- .../v1alpha1/search_parameters_types.proto | 4 ++-- .../{product_list.proto => product_code.proto} | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) rename proto/cmp/types/v1alpha1/{product_list.proto => product_code.proto} (65%) diff --git a/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto b/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto index 4aa2337d..421f39a2 100644 --- a/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto @@ -5,7 +5,7 @@ package cmp.services.accommodation.v1alpha1; import "cmp/types/v1alpha1/location.proto"; import "cmp/types/v1alpha1/meal_plan.proto"; import "cmp/types/v1alpha1/rate.proto"; -import "cmp/types/v1alpha1/product_list.proto"; +import "cmp/types/v1alpha1/product_code.proto"; // ### Accommodation Search Parameters // @@ -45,5 +45,5 @@ message AccommodationSearchParameters { // Product code list // Here a list of property codes would be used - repeated cmp.types.v1alpha1.ProductList product_list = 9; + repeated cmp.types.v1alpha1.ProductCode product_codes = 9; } \ No newline at end of file diff --git a/proto/cmp/types/v1alpha1/product_list.proto b/proto/cmp/types/v1alpha1/product_code.proto similarity index 65% rename from proto/cmp/types/v1alpha1/product_list.proto rename to proto/cmp/types/v1alpha1/product_code.proto index 56038486..6d0f3cfc 100644 --- a/proto/cmp/types/v1alpha1/product_list.proto +++ b/proto/cmp/types/v1alpha1/product_code.proto @@ -2,15 +2,15 @@ syntax = "proto3"; package cmp.types.v1alpha1; -// Product list code and type +// Product code and type // // This is being used in requests to specify the a list of products to be included in the reponse // -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/product-list.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/product-list.proto.dot.svg) -message ProductList { - string product_code = 1; - ProductCodeType product_code_type = 2; +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/product_code.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/product_code.proto.dot.svg) +message ProductCode { + string code = 1; + ProductCodeType type = 2; } // Product Code type From a44248f926f76a15b784750bd23922982863063e Mon Sep 17 00:00:00 2001 From: Sam Jaarsma Date: Thu, 11 Jan 2024 10:21:14 +0100 Subject: [PATCH 3/4] Implemented product_code message type instead of string in transport and activities --- .../services/activity/v1alpha1/search_parameters_types.proto | 3 ++- .../services/transport/v1alpha1/search_parameters_types.proto | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/proto/cmp/services/activity/v1alpha1/search_parameters_types.proto b/proto/cmp/services/activity/v1alpha1/search_parameters_types.proto index cc3fd989..abbcb9e8 100644 --- a/proto/cmp/services/activity/v1alpha1/search_parameters_types.proto +++ b/proto/cmp/services/activity/v1alpha1/search_parameters_types.proto @@ -5,6 +5,7 @@ package cmp.services.activity.v1alpha1; import "cmp/types/v1alpha1/language.proto"; import "cmp/types/v1alpha1/time.proto"; import "cmp/types/v1alpha1/price.proto"; +import "cmp/types/v1alpha1/product_code.proto"; // ### Activity Search Parameters // @@ -21,7 +22,7 @@ message ActivitySearchParameters { // Specify one or more product codes to be included in the search response // // Ex: "TC000000" - repeated string product_code = 2; + repeated cmp.types.v1alpha1.ProductCode product_codes = 2; // Specify one or more activity IDs to be included in the search response // diff --git a/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto b/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto index a2c7a21b..abf1ca09 100644 --- a/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto @@ -4,6 +4,7 @@ package cmp.services.transport.v1alpha1; import "cmp/types/v1alpha1/time.proto"; import "cmp/types/v1alpha1/price.proto"; +import "cmp/types/v1alpha1/product_code.proto"; // ### Transport Search Parameters // @@ -12,7 +13,7 @@ import "cmp/types/v1alpha1/price.proto"; message TransportSearchParameters { // Specify one or more type codes to be included in the search response // Ex: "SF" - repeated string product_code = 1; + repeated cmp.types.v1alpha1.ProductCode product_codes = 1; // Duration // Specify the minimal and maximum duration of an activity to be included in the search response From 38b19c432961bb3f6bf32fe767f8d7c116c505e0 Mon Sep 17 00:00:00 2001 From: Sam Jaarsma Date: Thu, 11 Jan 2024 11:09:28 +0100 Subject: [PATCH 4/4] improved single room vs multi room explanation --- .../accommodation/v1alpha1/search.proto | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/proto/cmp/services/accommodation/v1alpha1/search.proto b/proto/cmp/services/accommodation/v1alpha1/search.proto index 56fdc5ae..21009c18 100644 --- a/proto/cmp/services/accommodation/v1alpha1/search.proto +++ b/proto/cmp/services/accommodation/v1alpha1/search.proto @@ -24,14 +24,22 @@ import "cmp/types/v1alpha1/traveller.proto"; // // 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 +// 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. +// multi-property searches. +// This means that there is no grouping of different room, mealplan or rateplan options +// in single room or single property searches. Each AccommodationSearchResult is one +// bookable option. // -// Developers leveraging this message type should ensure proper validation and +// Several rooms or houses can be requested for the same dates and location or +// for the purpose of a tour or roadtrip, several accommodations or properties for +// sequential dates and different locations. This is done by specifying multiple Units +// for the same or different periods, the same or different accommodations or properties, +// specifying which travellers sleep in which unit. +// +//// Developers leveraging this message type should ensure proper validation and // handling, especially considering fields that are still under review, like // `speech_request`. message AccommodationSearchRequest {