Skip to content

Commit

Permalink
latest from activity-info
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-c4t committed Aug 20, 2024
1 parent 710d0c1 commit d6cd233
Show file tree
Hide file tree
Showing 10 changed files with 133 additions and 168 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ message AccommodationSearchParameters {
// Single geographic point represented by two double fields.
cmp.types.v1alpha.Coordinate location_coordinate = 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
Expand Down
195 changes: 123 additions & 72 deletions proto/cmp/services/activity/v1alpha/activity_types.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
syntax = "proto3";

// ### Activity Services
//
// The Activity services are used for both tickets and excursions

package cmp.services.activity.v1alpha;

import "cmp/types/v1alpha/description.proto";
Expand All @@ -16,123 +12,179 @@ import "cmp/types/v1alpha/contact_info.proto";
import "cmp/types/v1alpha/product_code.proto";
import "cmp/types/v1alpha/delivery.proto";
import "cmp/types/v1alpha/redemption.proto";
import "cmp/services/activity/v1alpha/search_result_types.proto";
import "cmp/types/v1alpha/bookable.proto";
import "cmp/types/v1alpha/address.proto";
import "google/protobuf/timestamp.proto";

message ActivityExtendedInfo {
// Activity Product Details
ActivityDetails activity_product_detail_response = 1;

// Units
repeated ActivityUnit units = 2;
// 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;

// Service Info
ActivityService service = 3;
// Ex: "2023-08-28T12:03:50", specifying when the static data of a product was last updated
google.protobuf.Timestamp last_modified = 2;

// Zones
repeated ActivityZone zones = 4;
// 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 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 = 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 bookable = 7;
}

// Descriptions with different languages
repeated cmp.types.v1alpha.LocalizedDescriptionSet descriptions = 5;
message ActivityLocation {
// Ex: Ctra. de la Porrassa, s/n, Magaluf, ES 07181 in structured fields
cmp.types.v1alpha.Address address = 1;

// Coordinates
cmp.types.v1alpha.Coordinate position =6;
// Geo Tree. Country, region, city_or_resort
cmp.types.v1alpha.GeoTree geo_tree = 2;

// Activity Features
repeated ActivityFeature features = 7;
// Coordinate
cmp.types.v1alpha.Coordinate coordinate = 3;
}

// Tags
repeated ActivityTag tags = 8;
message PickupDropoffEvent {
// Ex: "AESPMI43NU",
string location_code = 1;
// Ex: "Sunny Beach Hotel",
string location_name = 2;

// Languages
repeated cmp.types.v1alpha.Language languages = 9;
// 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;

// Contact Info; Address, Email, Phone, Urls
cmp.types.v1alpha.ContactInfo contact_info = 10;
// Ex: "OTHERS / Parking Varadero(bus stop css nº50)",
string other_info = 4;

// Images
repeated cmp.types.v1alpha.Image images = 11;
// Datetime of the pickup dropoff event as Unix timestamp
google.protobuf.Timestamp date_time = 5;

// Videos
repeated cmp.types.v1alpha.Video videos = 12;
// Longitude and Latitude of the location
cmp.types.v1alpha.Coordinate coordinates = 6;
}

enum PricingType {
PRICING_TYPE_UNSPECIFIED = 0;
PRICING_TYPE_PERPERSON = 1;
PRICING_TYPE_PERGROUP = 2;
}

message ActivityDetails {
// 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;
message ActivityExtendedInfo {
// Activity dynamic info
Activity activity = 1;

// Errors encountered in the generation of the response. Standardized error list
// to be created.
repeated string errors = 2;
// Units
repeated ActivityUnit units = 2;

// Warnings encountered in the generation of the response. This section might include
// information about fields not processed due to incompatibilities with the
// inventory system
repeated string warnings = 3;
// Service Info
ActivityService service = 3;

// Supplier code from the Inventory System for this activity response.
string supplier_unit_code = 4;
// Zones
repeated ActivityZone zones = 4;

// An identifier for external sessions, aiding in tracking and continuity across
// sessions.
string external_session_id = 5;
// Descriptions with different languages
repeated cmp.types.v1alpha.LocalizedDescriptionSet descriptions = 5;

// Coordinates
cmp.types.v1alpha.Coordinate position =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 = 6;
string category_code = 14;

// Category name which describes the category_code
string category_name = 7;
string category_name = 15;

// Type Code
string type_code = 8;
string type_code = 16;

// Type name which describes type_code
string type_name = 9;

// Supplier specific code, matching the supplier code in ProductList and ProductInfo
// messages
cmp.types.v1alpha.SupplierProductCode supplier_code = 10;
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 = 11;

// product_code
cmp.types.v1alpha.ProductCode product_code = 12;
string supplier_code_name = 19;

// Duration range (min, max) of the activity in minutes
cmp.types.v1alpha.DurationRange duration_range = 13;
cmp.types.v1alpha.DurationRange duration_range = 20;

// Time given for confirmation before the offer expires
cmp.types.v1alpha.Duration max_confirmation_duration = 14;
cmp.types.v1alpha.Duration max_confirmation_duration = 21;

// Allow Free Sale
bool allow_free_sale = 15;
bool allow_free_sale = 22;

// The ability to confirm instantly
bool instant_confirmation = 16;
bool instant_confirmation = 23;

// Can be delivered instantly
bool instant_delivery = 17;
bool instant_delivery = 24;

// Check availability
bool availability_required = 18;
bool availability_required = 25;

// Availability Type
string availability_type = 19;
string availability_type = 26;

// Delivery Formats; such as QR Code, NFT, Ticket, ... etc
repeated cmp.types.v1alpha.DeliveryFormat delivery_formats = 20;
repeated cmp.types.v1alpha.DeliveryFormat delivery_formats = 27;

// Delivery Methods; such as Email, SMS, Post, ... etc
repeated cmp.types.v1alpha.DeliveryMethod delivery_methods = 21;
repeated cmp.types.v1alpha.DeliveryMethod delivery_methods = 28;

// Redemption method
repeated cmp.types.v1alpha.RedemptionMethod redemption_method = 22;
repeated cmp.types.v1alpha.RedemptionMethod redemption_methods = 29;
}


message ActivityUnit {
// Schedule
cmp.types.v1alpha.DateTimeRange schedule = 1;
Expand All @@ -147,7 +199,6 @@ message ActivityUnit {
string description = 4;
}


message ActivityService {
// Service Code
string code = 1;
Expand All @@ -169,7 +220,7 @@ message ActivityZone {
// Unit Code
string code = 1;

// 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 geo_tree = 2;

// pick-up and drop-off information about location and time
Expand Down
4 changes: 0 additions & 4 deletions proto/cmp/services/activity/v1alpha/info.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
syntax = "proto3";

// ### Activity Services
//
// The Activity services are used for both tickets and excursions

package cmp.services.activity.v1alpha;

import "cmp/types/v1alpha/common.proto";
Expand Down
2 changes: 1 addition & 1 deletion proto/cmp/services/activity/v1alpha/list.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
4 changes: 2 additions & 2 deletions proto/cmp/services/activity/v1alpha/search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ message ActivitySearchRequest {
// Single geographic point represented by two double fields.
cmp.types.v1alpha.Coordinate source_location_coordinate = 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
Expand All @@ -83,7 +83,7 @@ message ActivitySearchRequest {
// Single geographic point represented by two double fields.
cmp.types.v1alpha.Coordinate service_location_coordinate = 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
Expand Down
Loading

0 comments on commit d6cd233

Please sign in to comment.