From 1e9cff5c74275d27264d39e9fe682d22d2401768 Mon Sep 17 00:00:00 2001 From: Mohamed Elmoslemany <117270519+mo-c4t@users.noreply.github.com> Date: Tue, 27 Aug 2024 14:51:37 +0200 Subject: [PATCH] use link instead of fulfilment and use contact info (#27) remove fulfilment and use link instead use contact_info instead of phone, address and email --- .../v1alpha/property_types.proto | 23 +++++----------- .../v1alpha/search_result_types.proto | 6 ++--- proto/cmp/types/v1alpha/fulfillment.proto | 26 ------------------- proto/cmp/types/v1alpha/traveller.proto | 8 +++--- 4 files changed, 12 insertions(+), 51 deletions(-) delete mode 100644 proto/cmp/types/v1alpha/fulfillment.proto diff --git a/proto/cmp/services/accommodation/v1alpha/property_types.proto b/proto/cmp/services/accommodation/v1alpha/property_types.proto index f05e291e..a8b40ecc 100644 --- a/proto/cmp/services/accommodation/v1alpha/property_types.proto +++ b/proto/cmp/services/accommodation/v1alpha/property_types.proto @@ -2,15 +2,13 @@ syntax = "proto3"; package cmp.services.accommodation.v1alpha; -import "cmp/types/v1alpha/address.proto"; import "cmp/types/v1alpha/amenity.proto"; import "cmp/types/v1alpha/bed.proto"; +import "cmp/types/v1alpha/contact_info.proto"; import "cmp/types/v1alpha/description.proto"; -import "cmp/types/v1alpha/email.proto"; import "cmp/types/v1alpha/file.proto"; import "cmp/types/v1alpha/location.proto"; import "cmp/types/v1alpha/meal_plan.proto"; -import "cmp/types/v1alpha/phone.proto"; import "cmp/types/v1alpha/product_code.proto"; import "cmp/types/v1alpha/product_status.proto"; import "cmp/types/v1alpha/service_fact.proto"; @@ -44,27 +42,18 @@ message Property { // Ex: CategoryUnit.CATEGORY_UNIT_PALMS CategoryUnit category_unit = 7; - // Ex: Address type - cmp.types.v1alpha.Address address = 8; - - // Emails - repeated cmp.types.v1alpha.Email emails = 9; - - // Phones - repeated cmp.types.v1alpha.Phone phones = 10; + // Contact Info: phone, address, email, links + cmp.types.v1alpha.ContactInfo contact_info = 8; // Location coordinate - cmp.types.v1alpha.Coordinates coordinates = 11; - - // Ex: "www.hotel.com" - string website = 12; + cmp.types.v1alpha.Coordinates coordinates = 9; // Status of the property - cmp.types.v1alpha.ProductStatus status = 13; + cmp.types.v1alpha.ProductStatus status = 10; // Airports // Ex: ["PMI", "ZRH", "AYT"] - repeated string airports = 14; + repeated string airports = 11; } enum CategoryRating { diff --git a/proto/cmp/services/transport/v1alpha/search_result_types.proto b/proto/cmp/services/transport/v1alpha/search_result_types.proto index 3521acbb..a7c5ac7d 100644 --- a/proto/cmp/services/transport/v1alpha/search_result_types.proto +++ b/proto/cmp/services/transport/v1alpha/search_result_types.proto @@ -7,7 +7,7 @@ import "cmp/types/v1alpha/bookability.proto"; import "cmp/types/v1alpha/cancel_policy.proto"; import "cmp/types/v1alpha/change_policy.proto"; import "cmp/types/v1alpha/datetime_range.proto"; -import "cmp/types/v1alpha/fulfillment.proto"; +import "cmp/types/v1alpha/link.proto"; import "cmp/types/v1alpha/price.proto"; import "cmp/types/v1alpha/rate.proto"; @@ -46,8 +46,8 @@ message TransportSearchResult { // Rate Rules repeated cmp.types.v1alpha.RateRule rate_rules = 7; - // Fulfillment - repeated cmp.types.v1alpha.Fulfillment fulfillments = 8; + // Links + repeated cmp.types.v1alpha.Link links = 8; // Status of the result, whether it is immediately bookable or not cmp.types.v1alpha.Bookability bookability = 9; diff --git a/proto/cmp/types/v1alpha/fulfillment.proto b/proto/cmp/types/v1alpha/fulfillment.proto deleted file mode 100644 index 19ac2a8a..00000000 --- a/proto/cmp/types/v1alpha/fulfillment.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package cmp.types.v1alpha; - -// Fulfillment message type. TODO: Add documentation to explain the purpose of this message -// -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/fulfillment.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/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/v1alpha/traveller.proto b/proto/cmp/types/v1alpha/traveller.proto index b273672a..c5aaf633 100644 --- a/proto/cmp/types/v1alpha/traveller.proto +++ b/proto/cmp/types/v1alpha/traveller.proto @@ -2,11 +2,10 @@ syntax = "proto3"; package cmp.types.v1alpha; +import "cmp/types/v1alpha/contact_info.proto"; import "cmp/types/v1alpha/country.proto"; import "cmp/types/v1alpha/date.proto"; import "cmp/types/v1alpha/document.proto"; -import "cmp/types/v1alpha/email.proto"; -import "cmp/types/v1alpha/phone.proto"; // Traveller // @@ -65,9 +64,8 @@ message ExtensiveTraveller { // into first_name: John, first_name: Roger, surname: Stephens, surname: Legend. repeated string first_names = 3; repeated string surnames = 4; - cmp.types.v1alpha.Phone phone = 5; - cmp.types.v1alpha.Email email = 6; - repeated cmp.types.v1alpha.Document documents = 7; + cmp.types.v1alpha.ContactInfo contact_info = 5; + repeated cmp.types.v1alpha.Document documents = 6; } // Gender Type