-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98b966c
commit 3b82911
Showing
16 changed files
with
703 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
Oops, something went wrong.