Skip to content

Commit

Permalink
dependencies fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SamJaarsma committed Sep 24, 2024
1 parent 98b966c commit 3b82911
Show file tree
Hide file tree
Showing 16 changed files with 703 additions and 30 deletions.
18 changes: 9 additions & 9 deletions proto/cmp/services/accommodation/v2/property_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ package cmp.services.accommodation.v2;

import "cmp/types/v1/amenity.proto";
import "cmp/types/v1/bed.proto";
import "cmp/types/v1/contact_info.proto";
import "cmp/types/v2/contact_info.proto";
import "cmp/types/v1/description.proto";
import "cmp/types/v1/file.proto";
import "cmp/types/v2/file.proto";
import "cmp/types/v1/location.proto";
import "cmp/types/v1/meal_plan.proto";
import "cmp/types/v1/product_code.proto";
import "cmp/types/v1/product_status.proto";
import "cmp/types/v1/traveller.proto";
import "cmp/types/v2/traveller.proto";
import "cmp/types/v2/service_fact.proto";
import "google/protobuf/timestamp.proto";

Expand Down Expand Up @@ -43,7 +43,7 @@ message Property {
cmp.services.accommodation.v2.CategoryUnit category_unit = 7;

// Contact Info: phone, address, email, links
cmp.types.v1.ContactInfo contact_info = 8;
cmp.types.v2.ContactInfo contact_info = 8;

// Location coordinate
cmp.types.v1.Coordinates coordinates = 9;
Expand Down Expand Up @@ -92,10 +92,10 @@ message PropertyExtendedInfo {
cmp.services.accommodation.v2.Property property = 1;

// Images
repeated cmp.types.v1.Image images = 2;
repeated cmp.types.v2.Image images = 2;

// Videos
repeated cmp.types.v1.Video videos = 3;
repeated cmp.types.v2.Video videos = 3;

// Segmentation classification
repeated string classifications = 4;
Expand Down Expand Up @@ -133,8 +133,8 @@ message Room {
// For holiday homes specific room names if availbale can be given.
string original_name = 3;

repeated cmp.types.v1.Image images = 4;
repeated cmp.types.v1.Video videos = 5;
repeated cmp.types.v2.Image images = 4;
repeated cmp.types.v2.Video videos = 5;

// Room descriptions
repeated cmp.types.v1.LocalizedDescriptionSet descriptions = 6;
Expand Down Expand Up @@ -177,7 +177,7 @@ message Occupancy {

message OccupancyOption {
// Guest type like adult, child, infant.
cmp.types.v1.TravellerType guest_type = 1;
cmp.types.v2.TravellerType guest_type = 1;

// Min guests
int32 min = 2;
Expand Down
4 changes: 2 additions & 2 deletions proto/cmp/services/accommodation/v2/search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package cmp.services.accommodation.v2;
import "cmp/services/accommodation/v2/search_query_types.proto";
import "cmp/services/accommodation/v2/search_result_types.proto";
import "cmp/types/v1/common.proto";
import "cmp/types/v1/traveller.proto";
import "cmp/types/v2/traveller.proto";
import "cmp/types/v2/search.proto";

// The `Accommodation Search Request` message type facilitates the request for
Expand Down Expand Up @@ -109,7 +109,7 @@ message AccommodationSearchResponse {
repeated cmp.services.accommodation.v2.AccommodationSearchResult results = 3;

// Global definition of the travellers for all results to be used via the traveller_id each unit.
repeated cmp.types.v1.BasicTraveller travellers = 4;
repeated cmp.types.v2.BasicTraveller travellers = 4;
}

// Service definition for Accommodation search
Expand Down
4 changes: 2 additions & 2 deletions proto/cmp/services/accommodation/v2/search_query_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package cmp.services.accommodation.v2;
import "cmp/services/accommodation/v1/search_parameters_types.proto";
import "cmp/services/accommodation/v2/unit_types.proto";
import "cmp/types/v1/travel_period.proto";
import "cmp/types/v1/traveller.proto";
import "cmp/types/v2/traveller.proto";

message AccommodationSearchQuery {
// Integer query ID, unique per search request
Expand All @@ -19,7 +19,7 @@ message AccommodationSearchQuery {
cmp.types.v1.TravelPeriod travel_period = 3;

// Travellers
repeated cmp.types.v1.BasicTraveller travellers = 4;
repeated cmp.types.v2.BasicTraveller travellers = 4;

// Total number of rooms / holiday homes
int32 unit_count = 5;
Expand Down
259 changes: 259 additions & 0 deletions proto/cmp/services/activity/v2/activity_types.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
syntax = "proto3";

package cmp.services.activity.v2;

import "cmp/types/v1/address.proto";
import "cmp/types/v1/bookability.proto";
import "cmp/types/v2/contact_info.proto";
import "cmp/types/v1/datetime_range.proto";
import "cmp/types/v1/delivery.proto";
import "cmp/types/v1/description.proto";
import "cmp/types/v1/duration.proto";
import "cmp/types/v2/file.proto";
import "cmp/types/v1/language.proto";
import "cmp/types/v1/location.proto";
import "cmp/types/v1/product_code.proto";
import "cmp/types/v1/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/v1/activity_types.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1/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.v1.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.v1.Bookability bookability = 7;
}

message ActivityLocation {
// Ex: Ctra. de la Porrassa, s/n, Magaluf, ES 07181 in structured fields
cmp.types.v1.Address address = 1;

// Geo Tree. Country, region, city_or_resort
cmp.types.v1.GeoTree geo_tree = 2;

// Coordinate
cmp.types.v1.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
//
// 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)",
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.v1.Coordinates coordinates = 6;
}

// Activity static info
message ActivityExtendedInfo {
// Activity dynamic info references
cmp.services.activity.v2.Activity activity = 1;

// Available Units
repeated cmp.services.activity.v2.ActivityUnit units = 2;

// Available Services
repeated cmp.services.activity.v2.ActivityService services = 3;

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

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

// Coordinates of where the activity takes place
cmp.services.activity.v2.ActivityLocation location = 6;

// Activity Features
repeated cmp.services.activity.v2.ActivityFeature features = 7;

// Tags
repeated cmp.services.activity.v2.ActivityTag tags = 8;

// Languages
repeated cmp.types.v1.Language languages = 9;

// Contact Info; Address, Email, Phone, Urls
cmp.types.v2.ContactInfo contact_info = 10;

// Images
repeated cmp.types.v2.Image images = 11;

// Videos
repeated cmp.types.v2.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.v1.SupplierProductCode supplier_code = 18;

// Supplier Name
string supplier_code_name = 19;

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

// Time given for confirmation before the offer expires
cmp.types.v1.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.v1.DeliveryFormat delivery_formats = 27;

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

// Redemption method
repeated cmp.types.v1.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.v1.DateTimeRange schedule = 1;

// Unit Code
string code = 2;

// Unit Name
string name = 3;

// Unit Description
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;

// Service Name
string name = 2;

// Service Description
string description = 3;

// Included items in the activity service
repeated string included = 4;

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

message TransferZone {
// Zone Code used in transfer operations
string code = 1;

// Geo tree type, represented by Country, Region, and City_or_Resort.
cmp.types.v1.GeoTree geo_tree = 2;

// pick-up and drop-off information about location and time
repeated cmp.services.activity.v2.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;
}
42 changes: 42 additions & 0 deletions proto/cmp/services/activity/v2/info.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
syntax = "proto3";

package cmp.services.activity.v2;

import "cmp/services/activity/v2/activity_types.proto";
import "cmp/types/v1/common.proto";
import "cmp/types/v1/language.proto";
import "cmp/types/v1/product_code.proto";
import "google/protobuf/timestamp.proto";

message ActivityProductInfoRequest {
// Message header
cmp.types.v1.RequestHeader header = 1;

// Only respond with the products that are new, modified or deactivated after this
// timestamp.
google.protobuf.Timestamp modified_after = 2;

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

// Activity codes
repeated cmp.types.v1.SupplierProductCode supplier_codes = 4;
}

message ActivityProductInfoResponse {
// Message header
cmp.types.v1.ResponseHeader header = 1;

// Product list: Activities
repeated cmp.services.activity.v2.ActivityExtendedInfo activities = 2;
}

// Activity product info service definition
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1/info.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1/info.proto.dot.svg)
service ActivityProductInfoService {
// Returns product list for activity
rpc ActivityProductInfo(ActivityProductInfoRequest) returns (ActivityProductInfoResponse);
}
Loading

0 comments on commit 3b82911

Please sign in to comment.