From fdad4d5fa655819fb1bf2be606ee7303b9f9df29 Mon Sep 17 00:00:00 2001 From: Mohamed Elmoslemany <117270519+mo-c4t@users.noreply.github.com> Date: Wed, 21 Aug 2024 14:01:22 +0200 Subject: [PATCH] Add Activity product info service and message types (#22) * buf format, bookable -> bookability, typo fixes * coordinate --> coordinates --------- Co-authored-by: Ekrem Seren --- .../v1alpha/property_types.proto | 2 +- .../v1alpha/search_parameters_types.proto | 4 +- .../v1alpha/search_result_types.proto | 4 +- .../activity/v1alpha/activity_types.proto | 252 ++++++++++++++++++ .../cmp/services/activity/v1alpha/info.proto | 40 +++ .../cmp/services/activity/v1alpha/list.proto | 2 +- .../services/activity/v1alpha/search.proto | 8 +- .../v1alpha/search_result_types.proto | 78 +----- .../v1alpha/search_result_types.proto | 4 +- .../{bookable.proto => bookability.proto} | 14 +- proto/cmp/types/v1alpha/contact_info.proto | 26 ++ proto/cmp/types/v1alpha/delivery.proto | 26 ++ proto/cmp/types/v1alpha/duration.proto | 6 + proto/cmp/types/v1alpha/link.proto | 44 +++ proto/cmp/types/v1alpha/location.proto | 6 +- proto/cmp/types/v1alpha/redemption.proto | 15 ++ 16 files changed, 434 insertions(+), 97 deletions(-) create mode 100644 proto/cmp/services/activity/v1alpha/activity_types.proto create mode 100644 proto/cmp/services/activity/v1alpha/info.proto rename proto/cmp/types/v1alpha/{bookable.proto => bookability.proto} (66%) create mode 100644 proto/cmp/types/v1alpha/contact_info.proto create mode 100644 proto/cmp/types/v1alpha/delivery.proto create mode 100644 proto/cmp/types/v1alpha/link.proto create mode 100644 proto/cmp/types/v1alpha/redemption.proto diff --git a/proto/cmp/services/accommodation/v1alpha/property_types.proto b/proto/cmp/services/accommodation/v1alpha/property_types.proto index d9687ce..f05e291 100644 --- a/proto/cmp/services/accommodation/v1alpha/property_types.proto +++ b/proto/cmp/services/accommodation/v1alpha/property_types.proto @@ -54,7 +54,7 @@ message Property { repeated cmp.types.v1alpha.Phone phones = 10; // Location coordinate - cmp.types.v1alpha.Coordinate coordinate = 11; + cmp.types.v1alpha.Coordinates coordinates = 11; // Ex: "www.hotel.com" string website = 12; diff --git a/proto/cmp/services/accommodation/v1alpha/search_parameters_types.proto b/proto/cmp/services/accommodation/v1alpha/search_parameters_types.proto index c929bd7..1fe257d 100644 --- a/proto/cmp/services/accommodation/v1alpha/search_parameters_types.proto +++ b/proto/cmp/services/accommodation/v1alpha/search_parameters_types.proto @@ -22,9 +22,9 @@ message AccommodationSearchParameters { cmp.types.v1alpha.LocationCodes location_codes = 1; // Single geographic point represented by two double fields. - cmp.types.v1alpha.Coordinate location_coordinate = 2; + cmp.types.v1alpha.Coordinates location_coordinates = 2; - // Geo tree type, representted by Country, Region, and City_or_Resort. + // Geo tree type, represented by Country, Region, and City_or_Resort. cmp.types.v1alpha.GeoTree location_geo_tree = 3; // Geo circle. Represented by a coordinate and a distance for radius diff --git a/proto/cmp/services/accommodation/v1alpha/search_result_types.proto b/proto/cmp/services/accommodation/v1alpha/search_result_types.proto index 81ad94d..a950efe 100644 --- a/proto/cmp/services/accommodation/v1alpha/search_result_types.proto +++ b/proto/cmp/services/accommodation/v1alpha/search_result_types.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package cmp.services.accommodation.v1alpha; import "cmp/services/accommodation/v1alpha/unit_types.proto"; -import "cmp/types/v1alpha/bookable.proto"; +import "cmp/types/v1alpha/bookability.proto"; import "cmp/types/v1alpha/cancel_policy.proto"; import "cmp/types/v1alpha/price.proto"; import "cmp/types/v1alpha/rate.proto"; @@ -37,5 +37,5 @@ message AccommodationSearchResult { string remarks = 7; // Status of the result, whether it is immediately bookable or not - cmp.types.v1alpha.Bookability bookable = 8; + cmp.types.v1alpha.Bookability bookability = 8; } diff --git a/proto/cmp/services/activity/v1alpha/activity_types.proto b/proto/cmp/services/activity/v1alpha/activity_types.proto new file mode 100644 index 0000000..e8fe837 --- /dev/null +++ b/proto/cmp/services/activity/v1alpha/activity_types.proto @@ -0,0 +1,252 @@ +syntax = "proto3"; + +package cmp.services.activity.v1alpha; + +import "cmp/types/v1alpha/address.proto"; +import "cmp/types/v1alpha/bookability.proto"; +import "cmp/types/v1alpha/contact_info.proto"; +import "cmp/types/v1alpha/datetime_range.proto"; +import "cmp/types/v1alpha/delivery.proto"; +import "cmp/types/v1alpha/description.proto"; +import "cmp/types/v1alpha/duration.proto"; +import "cmp/types/v1alpha/file.proto"; +import "cmp/types/v1alpha/language.proto"; +import "cmp/types/v1alpha/location.proto"; +import "cmp/types/v1alpha/product_code.proto"; +import "cmp/types/v1alpha/redemption.proto"; +import "google/protobuf/timestamp.proto"; + +// This represents Activity types which is needed for different activity services (search, info, ... etc) +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/activity_types.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/activity_types.proto.dot.svg) +message Activity { + // Context for Inventory system concepts that need to be included in an info + // response, like an OwnerCode, PTC_OfferParameters, Tax codes, Disclosure RefID, + // etc. or a serialized combination of these codes. + string context = 1; + + // Ex: "2023-08-28T12:03:50", specifying when the static data of a product was + // last updated + google.protobuf.Timestamp last_modified = 2; + + // An identifier for external sessions, aiding in tracking and continuity across + // sessions. + string external_session_id = 3; + + // External Product codes for the result. These can be of different types + cmp.types.v1alpha.ProductCode product_code = 4; + + // Unit ID for the result + // + // The purpose of this concept is to allow for different activities for one + // product like "Windsurfing" and "Kitesurfing" under "Salou Playa Llarga". Code + // and description match the information provided in the ProductList and + // ProductInfo message. These are in general also supplier specific. + string unit_code = 5; + + // Service codes for the result + // + // Several different packages could be included like "Windsurfing" with or without + // "Wetsuit". Code and description match the information provided in the + // ProductInfo message These are in general also supplier specific + string service_code = 6; + + // Status of the result, whether it is immediately bookable or not + cmp.types.v1alpha.Bookability bookability = 7; +} + +message ActivityLocation { + // Ex: Ctra. de la Porrassa, s/n, Magaluf, ES 07181 in structured fields + cmp.types.v1alpha.Address address = 1; + + // Geo Tree. Country, region, city_or_resort + cmp.types.v1alpha.GeoTree geo_tree = 2; + + // Coordinate + cmp.types.v1alpha.Coordinates coordinates = 3; +} + +message PickupDropoffEvent { + // Ex: "AESPMI43NU", + string location_code = 1; + // Ex: "Sunny Beach Hotel", + string location_name = 2; + + // True if this pickup location is selected for the activity + // + // Ex: "true" + // + // FIXME: How is this relevant for the search result message? + bool pickup_indicator = 3; + + // Ex: "OTHERS / Parking Varadero(bus stop css nº50)", + string other_info = 4; + + // Datetime of the pickup dropoff event as Unix timestamp + google.protobuf.Timestamp date_time = 5; + + // Longitude and Latitude of the location + cmp.types.v1alpha.Coordinates coordinates = 6; +} + +enum PricingType { + PRICING_TYPE_UNSPECIFIED = 0; + PRICING_TYPE_PERPERSON = 1; + PRICING_TYPE_PERGROUP = 2; +} + +message ActivityExtendedInfo { + // Activity dynamic info + Activity activity = 1; + + // Units + repeated ActivityUnit units = 2; + + // Service Info + ActivityService service = 3; + + // Zones + repeated ActivityZone zones = 4; + + // Descriptions with different languages + repeated cmp.types.v1alpha.LocalizedDescriptionSet descriptions = 5; + + // Coordinates + cmp.types.v1alpha.Coordinates coordinates = 6; + + // Activity Features + repeated ActivityFeature features = 7; + + // Tags + repeated ActivityTag tags = 8; + + // Languages + repeated cmp.types.v1alpha.Language languages = 9; + + // Contact Info; Address, Email, Phone, Urls + cmp.types.v1alpha.ContactInfo contact_info = 10; + + // Images + repeated cmp.types.v1alpha.Image images = 11; + + // Videos + repeated cmp.types.v1alpha.Video videos = 12; + + // Supplier code from the Inventory System for this activity response. + string supplier_unit_code = 13; + + // Activity Category Code + string category_code = 14; + + // Category name which describes the category_code + string category_name = 15; + + // Type Code + string type_code = 16; + + // Type name which describes type_code + string type_name = 17; + + // Supplier Product codes for the result + // These must match the supplier codes provided in the ProductList and + // ProductInfo messages + cmp.types.v1alpha.SupplierProductCode supplier_code = 18; + + // Supplier Name + string supplier_code_name = 19; + + // Duration range (min, max) of the activity in minutes + cmp.types.v1alpha.DurationRange duration_range = 20; + + // Time given for confirmation before the offer expires + cmp.types.v1alpha.Duration max_confirmation_duration = 21; + + // Allow Free Sale + bool allow_free_sale = 22; + + // The ability to confirm instantly + bool instant_confirmation = 23; + + // Can be delivered instantly + bool instant_delivery = 24; + + // Check availability + bool availability_required = 25; + + // Availability Type + string availability_type = 26; + + // Delivery Formats; such as QR Code, NFT, Ticket, ... etc + repeated cmp.types.v1alpha.DeliveryFormat delivery_formats = 27; + + // Delivery Methods; such as Email, SMS, Post, ... etc + repeated cmp.types.v1alpha.DeliveryMethod delivery_methods = 28; + + // Redemption method + repeated cmp.types.v1alpha.RedemptionMethod redemption_methods = 29; +} + +message ActivityUnit { + // Schedule + cmp.types.v1alpha.DateTimeRange schedule = 1; + + // Unit Code + string code = 2; + + // Unit Name + string name = 3; + + // Unit Description + string description = 4; +} + +message ActivityService { + // Service Code + string code = 1; + + // Service Name + string name = 2; + + // Service Description + string description = 3; + + // Included items in the activity service + repeated string included = 4; + + // Encluded items in the activity service + repeated string excluded = 5; +} + +message ActivityZone { + // Unit Code + string code = 1; + + // Geo tree type, represented by Country, Region, and City_or_Resort. + cmp.types.v1alpha.GeoTree geo_tree = 2; + + // pick-up and drop-off information about location and time + repeated PickupDropoffEvent pickup_dropoff_events = 3; +} + +message ActivityFeature { + // Feature description + string description = 1; + + // Feature Code + string code = 2; +} + +message ActivityTag { + // active status + bool active = 1; + + // Unique ID + int32 id = 2; + + // Name + string name = 3; + + // Slug; giving an informal name to the tag + string slug = 4; +} diff --git a/proto/cmp/services/activity/v1alpha/info.proto b/proto/cmp/services/activity/v1alpha/info.proto new file mode 100644 index 0000000..fff0a09 --- /dev/null +++ b/proto/cmp/services/activity/v1alpha/info.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; + +package cmp.services.activity.v1alpha; + +import "cmp/services/activity/v1alpha/activity_types.proto"; +import "cmp/types/v1alpha/common.proto"; +import "cmp/types/v1alpha/language.proto"; +import "cmp/types/v1alpha/product_code.proto"; +import "google/protobuf/timestamp.proto"; + +message ActivityProductInfoRequest { + // Message header + cmp.types.v1alpha.RequestHeader header = 1; + + // Only respond with the products that are modified after this timestamp + google.protobuf.Timestamp modified_after = 2; + + // Languages + repeated cmp.types.v1alpha.Language languages = 3; + + // Activity codes + repeated cmp.types.v1alpha.SupplierProductCode supplier_codes = 4; +} + +message ActivityProductInfoResponse { + // Message header + cmp.types.v1alpha.ResponseHeader header = 1; + + // Product list: Activities + repeated ActivityExtendedInfo activities = 2; +} + +// Activity product info service definition +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/info.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/info.proto.dot.svg) +service ActivityProductInfoService { + // Returns product list for activity + rpc ActivityProductInfo(ActivityProductInfoRequest) returns (ActivityProductInfoResponse); +} diff --git a/proto/cmp/services/activity/v1alpha/list.proto b/proto/cmp/services/activity/v1alpha/list.proto index aa139a6..8d92f47 100644 --- a/proto/cmp/services/activity/v1alpha/list.proto +++ b/proto/cmp/services/activity/v1alpha/list.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package cmp.services.activity.v1alpha; -import "cmp/services/activity/v1alpha/search_result_types.proto"; +import "cmp/services/activity/v1alpha/activity_types.proto"; import "cmp/types/v1alpha/common.proto"; import "google/protobuf/timestamp.proto"; diff --git a/proto/cmp/services/activity/v1alpha/search.proto b/proto/cmp/services/activity/v1alpha/search.proto index c2103d1..93e32fb 100644 --- a/proto/cmp/services/activity/v1alpha/search.proto +++ b/proto/cmp/services/activity/v1alpha/search.proto @@ -57,9 +57,9 @@ message ActivitySearchRequest { cmp.types.v1alpha.LocationCodes source_location_codes = 7; // Single geographic point represented by two double fields. - cmp.types.v1alpha.Coordinate source_location_coordinate = 8; + cmp.types.v1alpha.Coordinates source_location_coordinates = 8; - // Geo tree type, representted by Country, Region, and City_or_Resort. + // Geo tree type, represented by Country, Region, and City_or_Resort. cmp.types.v1alpha.GeoTree source_location_geo_tree = 9; // Geo circle. Represented by a coordinate and a distance for radius @@ -81,9 +81,9 @@ message ActivitySearchRequest { cmp.types.v1alpha.LocationCodes service_location_codes = 12; // Single geographic point represented by two double fields. - cmp.types.v1alpha.Coordinate service_location_coordinate = 13; + cmp.types.v1alpha.Coordinates service_location_coordinates = 13; - // Geo tree type, representted by Country, Region, and City_or_Resort. + // Geo tree type, represented by Country, Region, and City_or_Resort. cmp.types.v1alpha.GeoTree service_location_geo_tree = 14; // Geo circle. Represented by a coordinate and a distance for radius diff --git a/proto/cmp/services/activity/v1alpha/search_result_types.proto b/proto/cmp/services/activity/v1alpha/search_result_types.proto index 967688b..42bd517 100644 --- a/proto/cmp/services/activity/v1alpha/search_result_types.proto +++ b/proto/cmp/services/activity/v1alpha/search_result_types.proto @@ -2,19 +2,15 @@ syntax = "proto3"; package cmp.services.activity.v1alpha; -import "cmp/types/v1alpha/address.proto"; -import "cmp/types/v1alpha/bookable.proto"; +import "cmp/services/activity/v1alpha/activity_types.proto"; import "cmp/types/v1alpha/datetime_range.proto"; -import "cmp/types/v1alpha/location.proto"; import "cmp/types/v1alpha/price.proto"; -import "cmp/types/v1alpha/product_code.proto"; -import "google/protobuf/timestamp.proto"; // This type represents a search result and is used in the `ActivitySearchResponse` // message. // -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/search_option_types.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/search_option_types.proto.dot.svg) +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/search_result_types.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha/search_result_types.proto.dot.svg) message ActivitySearchResult { // Option ID for the search option. This is an increasing number starting at 0 and // increasing by 1 for every search result. @@ -45,71 +41,3 @@ message ActivitySearchResult { // Ex: "PerPerson", "PerGroup" PricingType pricing_type = 9; } - -// Represents an Activity product. -// -// See extensive explanations in search_parameters_types -message Activity { - // Ex: "2023-08-28T12:03:50", specifying when the static data of a product was last updated - google.protobuf.Timestamp last_modified = 1; - // Supplier Product codes for the result - // These must match the supplier codes provided in the ProductList and - // ProductInfo messages - cmp.types.v1alpha.SupplierProductCode supplier_code = 2; - - // External Product codes for the result. These can be of different types - cmp.types.v1alpha.ProductCode product_code = 3; - - // Unit IDfor the result - // The purpose of this concept is to allow for different activities for one product - // like "Windsurfing" and "Kitesurfing" under "Salou Playa Llarga". - // Code and description match the information provided in the ProductList and - // ProductInfo message. These are in general also supplier specific. - string unit_code = 4; - - // Service codes for the result - // Several different packages could be included like "Windsurfing" with or without - // "Wetsuit". Code and description match the information provided in the ProductInfo message - // These are in general also supplier specific - string service_code = 5; - - // Status of the result, whether it is immediately bookable or not - cmp.types.v1alpha.Bookability bookable = 6; -} - -message ActivityLocation { - // Ex: Ctra. de la Porrassa, s/n, Magaluf, ES 07181 in structured fields - cmp.types.v1alpha.Address address = 1; - - // Geo Tree. Country, region, city_or_resort - cmp.types.v1alpha.GeoTree geo_tree = 2; - - // Coordinate - cmp.types.v1alpha.Coordinate coordinate = 3; -} - -message PickupDropoffEvent { - // Ex: "AESPMI43NU", - string location_code = 1; - // Ex: "Sunny Beach Hotel", - string location_name = 2; - - // True if this pickup location is selected for the activity - // - // Ex: "true" - // - // FIXME: How is this relevant for the search result message? - bool pickup_indicator = 3; - - // Ex: "OTHERS / Parking Varadero(bus stop css nº50)", - string other_info = 4; - - // Datetime of the pickup dropoff event as Unix timestamp - google.protobuf.Timestamp date_time = 5; -} - -enum PricingType { - PRICING_TYPE_UNSPECIFIED = 0; - PRICING_TYPE_PERPERSON = 1; - PRICING_TYPE_PERGROUP = 2; -} diff --git a/proto/cmp/services/transport/v1alpha/search_result_types.proto b/proto/cmp/services/transport/v1alpha/search_result_types.proto index 0a10e5d..3521acb 100644 --- a/proto/cmp/services/transport/v1alpha/search_result_types.proto +++ b/proto/cmp/services/transport/v1alpha/search_result_types.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package cmp.services.transport.v1alpha; import "cmp/services/transport/v1alpha/trip_types.proto"; -import "cmp/types/v1alpha/bookable.proto"; +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"; @@ -50,7 +50,7 @@ message TransportSearchResult { repeated cmp.types.v1alpha.Fulfillment fulfillments = 8; // Status of the result, whether it is immediately bookable or not - cmp.types.v1alpha.Bookability bookable = 9; + cmp.types.v1alpha.Bookability bookability = 9; // Validity of the search option. // diff --git a/proto/cmp/types/v1alpha/bookable.proto b/proto/cmp/types/v1alpha/bookability.proto similarity index 66% rename from proto/cmp/types/v1alpha/bookable.proto rename to proto/cmp/types/v1alpha/bookability.proto index 4bd8c50..3054291 100644 --- a/proto/cmp/types/v1alpha/bookable.proto +++ b/proto/cmp/types/v1alpha/bookability.proto @@ -4,10 +4,10 @@ package cmp.types.v1alpha; import "cmp/types/v1alpha/time.proto"; -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/bookable.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/bookable.proto.dot.svg) +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/bookability.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/bookability.proto.dot.svg) message Bookability { - Bookable bookable = 1; + BookabilityType type = 1; // In case of a bookable=on_request status, a confirmation time should be given by // the supplier. The supplier is to confirm the on-request booking with that @@ -16,8 +16,8 @@ message Bookability { cmp.types.v1alpha.Time confirmation_time = 2; } -enum Bookable { - BOOKABLE_UNSPECIFIED = 0; - BOOKABLE_AVAILABLE = 1; - BOOKABLE_ON_REQUEST = 2; +enum BookabilityType { + BOOKABILITY_TYPE_UNSPECIFIED = 0; + BOOKABILITY_TYPE_AVAILABLE = 1; + BOOKABILITY_TYPE_ON_REQUEST = 2; } diff --git a/proto/cmp/types/v1alpha/contact_info.proto b/proto/cmp/types/v1alpha/contact_info.proto new file mode 100644 index 0000000..da61cc6 --- /dev/null +++ b/proto/cmp/types/v1alpha/contact_info.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package cmp.types.v1alpha; + +import "cmp/types/v1alpha/address.proto"; +import "cmp/types/v1alpha/email.proto"; +import "cmp/types/v1alpha/link.proto"; +import "cmp/types/v1alpha/phone.proto"; + +// Contact Info for general use. +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/contact_info.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/contact_info.proto.dot.svg) +message ContactInfo { + // Address + repeated cmp.types.v1alpha.Address address = 1; + + // Phones + repeated cmp.types.v1alpha.Phone phones = 2; + + // Emails + repeated cmp.types.v1alpha.Email emails = 3; + + // Websites + repeated cmp.types.v1alpha.Link links = 4; +} diff --git a/proto/cmp/types/v1alpha/delivery.proto b/proto/cmp/types/v1alpha/delivery.proto new file mode 100644 index 0000000..03a559d --- /dev/null +++ b/proto/cmp/types/v1alpha/delivery.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package cmp.types.v1alpha; + +// Delivery Formats and Methods +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/delivery.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/delivery.proto.dot.svg) +enum DeliveryFormat { + DELIVERY_FORMAT_UNSPECIFIED = 0; + DELIVERY_FORMAT_OTHER = 1; + DELIVERY_FORMAT_NFT = 2; + DELIVERY_FORMAT_QRCODE = 3; + DELIVERY_FORMAT_BARCODE = 4; + DELIVERY_FORMAT_PDF = 5; +} + +enum DeliveryMethod { + DELIVERY_METHOD_UNSPECIFIED = 0; + DELIVERY_METHOD_OTHER = 1; + DELIVERY_METHOD_API = 2; + DELIVERY_METHOD_EMAIL = 3; + DELIVERY_METHOD_SMS = 4; + DELIVERY_METHOD_WHATSAPP = 5; + DELIVERY_METHOD_POST = 6; +} diff --git a/proto/cmp/types/v1alpha/duration.proto b/proto/cmp/types/v1alpha/duration.proto index e737f22..a7cf44a 100644 --- a/proto/cmp/types/v1alpha/duration.proto +++ b/proto/cmp/types/v1alpha/duration.proto @@ -9,3 +9,9 @@ package cmp.types.v1alpha; message Duration { int32 minutes = 1; } + +// Duration range message that includes minimum and maximum duration. +message DurationRange { + Duration min_duration = 1; + Duration max_duration = 2; +} diff --git a/proto/cmp/types/v1alpha/link.proto b/proto/cmp/types/v1alpha/link.proto new file mode 100644 index 0000000..b57b05d --- /dev/null +++ b/proto/cmp/types/v1alpha/link.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; + +package cmp.types.v1alpha; + +// Link is used to represent websites, social media contact, online check-in url, ... etc +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/link.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/link.proto.dot.svg) +message Link { + // Link type + // + // Ex: "LG" or "TC" + LinkType type = 1; + + // Link description + // + // Ex: "Baggage conditions" + string description = 2; + + // Link reference + // + // Ex: "https://api.lyko.tech/v2.1/transfers/ebaa9aed-dbc4-4d51-a41a-336a3c3e9bfc/pdf-terms-and-conditions" + string ref = 3; +} + +enum LinkType { + LINK_TYPE_UNSPECIFIED = 0; + LINK_TYPE_OTHER = 1; + LINK_TYPE_WEBSITE = 2; + LINK_TYPE_CHECKIN = 3; + LINK_TYPE_BOOKING = 4; + LINK_TYPE_SUPPORT = 5; + LINK_TYPE_FEEDBACK = 6; + LINK_TYPE_COMPLAINT = 7; + LINK_TYPE_FACEBOOK = 8; + LINK_TYPE_INSTAGRAM = 9; + LINK_TYPE_X = 10; + LINK_TYPE_LINKEDIN = 11; + LINK_TYPE_DISCORD = 12; + LINK_TYPE_MEDIUM = 13; + LINK_TYPE_TIKTOK = 14; + LINK_TYPE_WHATSAPP = 15; + LINK_TYPE_TELEGRAM = 16; +} diff --git a/proto/cmp/types/v1alpha/location.proto b/proto/cmp/types/v1alpha/location.proto index 3898768..3cc5229 100644 --- a/proto/cmp/types/v1alpha/location.proto +++ b/proto/cmp/types/v1alpha/location.proto @@ -11,7 +11,7 @@ import "cmp/types/v1alpha/measurement.proto"; // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/location.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/location.proto.dot.svg) -message Coordinate { +message Coordinates { // The latitude in degrees. It must be in the range [-90.0, +90.0]. double latitude = 1; // The longitude in degrees. It must be in the range [-180.0, +180.0]. @@ -20,14 +20,14 @@ message Coordinate { // Geo Circle message GeoCircle { - cmp.types.v1alpha.Coordinate center = 1; + cmp.types.v1alpha.Coordinates center = 1; cmp.types.v1alpha.Length radius = 2; } // Geo Polygon message GeoPolygon { // GPS points of the polygon - repeated cmp.types.v1alpha.Coordinate points = 1; + repeated cmp.types.v1alpha.Coordinates points = 1; } // Geo Tree diff --git a/proto/cmp/types/v1alpha/redemption.proto b/proto/cmp/types/v1alpha/redemption.proto new file mode 100644 index 0000000..55db80b --- /dev/null +++ b/proto/cmp/types/v1alpha/redemption.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package cmp.types.v1alpha; + +// Redemption Methods +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/redemption.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/redemption.proto.dot.svg) +enum RedemptionMethod { + REDEMPTION_METHOD_UNSPECIFIED = 0; + REDEMPTION_METHOD_OTHER = 1; + REDEMPTION_METHOD_DIGITAL = 2; + REDEMPTION_METHOD_PRINT = 3; + REDEMPTION_METHOD_MANIFEST = 4; +}