Skip to content

Commit

Permalink
latest changes from c4t
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-c4t committed Aug 28, 2024
1 parent d6cd233 commit ae259c4
Show file tree
Hide file tree
Showing 22 changed files with 252 additions and 208 deletions.
23 changes: 6 additions & 17 deletions proto/cmp/services/accommodation/v1alpha/property_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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.Coordinate coordinate = 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ 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, represented by Country, Region, and City_or_Resort.
cmp.types.v1alpha.GeoTree location_geo_tree = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
}
110 changes: 59 additions & 51 deletions proto/cmp/services/activity/v1alpha/activity_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@ syntax = "proto3";

package cmp.services.activity.v1alpha;

import "cmp/types/v1alpha/description.proto";
import "cmp/types/v1alpha/location.proto";
import "cmp/types/v1alpha/language.proto";
import "cmp/types/v1alpha/file.proto";
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/contact_info.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/delivery.proto";
import "cmp/types/v1alpha/redemption.proto";
import "cmp/types/v1alpha/bookable.proto";
import "cmp/types/v1alpha/address.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.
// 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
// 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
Expand All @@ -37,21 +37,23 @@ message Activity {
// 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
// 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
// "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;
cmp.types.v1alpha.Bookability bookability = 7;
}

message ActivityLocation {
Expand All @@ -62,56 +64,57 @@ message ActivityLocation {
cmp.types.v1alpha.GeoTree geo_tree = 2;

// Coordinate
cmp.types.v1alpha.Coordinate coordinate = 3;
cmp.types.v1alpha.Coordinates coordinates = 3;
}

message PickupDropoffEvent {
// Supplier specific pick-up code. Avoid using this and use a more generic concept
// where possible, so that the integration is suitable for more than one partner.
//
// 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?
// If the boolean is set to false, this is a specific indication that
// pick-up/drop-off at this location is not possible. An activity search response
// can have one result without a transfer service and without a PickupDropoffEvent
// to indicate that there is no transfer included. Or a PickupDropoffEvent with
// pick_up indicator set to false can be included to make it explicit.
bool pickup_indicator = 3;

// Ex: "OTHERS / Parking Varadero(bus stop css nº50)",
// 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.Coordinate coordinates = 6;
}

enum PricingType {
PRICING_TYPE_UNSPECIFIED = 0;
PRICING_TYPE_PERPERSON = 1;
PRICING_TYPE_PERGROUP = 2;
cmp.types.v1alpha.Coordinates coordinates = 6;
}

// Activity static info
message ActivityExtendedInfo {
// Activity dynamic info
// Activity dynamic info references
Activity activity = 1;

// Units
// Available Units
repeated ActivityUnit units = 2;

// Service Info
ActivityService service = 3;
// Available Services
repeated ActivityService services = 3;

// Zones
repeated ActivityZone zones = 4;
// Transfer Zone(s) in which participants of the activity can be used for pick-up
// and drop-off
repeated TransferZone zones = 4;

// Descriptions with different languages
repeated cmp.types.v1alpha.LocalizedDescriptionSet descriptions = 5;

// Coordinates
cmp.types.v1alpha.Coordinate position =6;
// Coordinates of where the activity takes place
ActivityLocation location = 6;

// Activity Features
repeated ActivityFeature features = 7;
Expand Down Expand Up @@ -145,7 +148,7 @@ message ActivityExtendedInfo {

// 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
Expand All @@ -158,7 +161,7 @@ message ActivityExtendedInfo {
cmp.types.v1alpha.DurationRange duration_range = 20;

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

// Allow Free Sale
bool allow_free_sale = 22;
Expand All @@ -171,7 +174,7 @@ message ActivityExtendedInfo {

// Check availability
bool availability_required = 25;

// Availability Type
string availability_type = 26;

Expand All @@ -185,9 +188,12 @@ message ActivityExtendedInfo {
repeated cmp.types.v1alpha.RedemptionMethod redemption_methods = 29;
}

// The unit gives us a choice of the different options that are available in an
// activity, like for example a normal ticket or a VIP ticket. a 2 hour or 4 hour
// jeep safari. A ticket to a specific section of a stadium.
message ActivityUnit {
// Schedule
cmp.types.v1alpha.DateTimeRange schedule = 1;
//Schedule
cmp.types.v1alpha.DateTimeRange schedule = 1;

// Unit Code
string code = 2;
Expand All @@ -199,6 +205,9 @@ message ActivityUnit {
string description = 4;
}

// Services can be selected like do we go to the activity by ourselves or is a
// transfer from our hotel included. Do we book the VIP ticket with or without
// alcoholic drinks included?
message ActivityService {
// Service Code
string code = 1;
Expand All @@ -212,27 +221,27 @@ message ActivityService {
// Included items in the activity service
repeated string included = 4;

// Encluded items in the activity service
// Excluded items in the activity service
repeated string excluded = 5;
}

message ActivityZone {
// Unit Code
message TransferZone {
// Zone Code used in transfer operations
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 cmp.services.activity.v1alpha.PickupDropoffEvent pickup_dropoff = 3;
repeated PickupDropoffEvent pickup_dropoff_events = 3;
}

message ActivityFeature {
// Feature description
string description = 1;

// Feature Code
string code = 2;
string code = 2;
}

message ActivityTag {
Expand All @@ -248,4 +257,3 @@ message ActivityTag {
// Slug; giving an informal name to the tag
string slug = 4;
}

30 changes: 15 additions & 15 deletions proto/cmp/services/activity/v1alpha/info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ 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 "cmp/services/activity/v1alpha/activity_types.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
// Only respond with the products that are new, modified or deactivated after this
// timestamp.
google.protobuf.Timestamp modified_after = 2;

// Languages
// Languages to be included in the response for descriptions. Null means all
// available languages.
repeated cmp.types.v1alpha.Language languages = 3;

// Activity codes
Expand All @@ -30,13 +30,13 @@ message ActivityProductInfoResponse {

// 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);
}
}

// 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);
}
Loading

0 comments on commit ae259c4

Please sign in to comment.