Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 4 update #15

Merged
merged 33 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ac6ca61
ProductStatus, Disclaimer Licenses, Unspecified, lists ordering comme…
SamJaarsma Mar 26, 2024
bd82047
splitting of basic and extensive traveller info
SamJaarsma Mar 26, 2024
340d5cb
added on-request using the types/bookability message
SamJaarsma Mar 26, 2024
0b750ac
moving traveler details from each result to the search result with a …
SamJaarsma Mar 26, 2024
58d000c
forgot import
SamJaarsma Mar 26, 2024
e62492b
simplify enum for product status
SamJaarsma Mar 26, 2024
9759971
added timestamp to the activity list and info
SamJaarsma Mar 27, 2024
1f09b8d
field order correction
SamJaarsma Mar 27, 2024
beb15f7
improve explanation of cancellation boolean and moved servicefact to …
SamJaarsma Mar 27, 2024
3af70fe
implementation of change policy in transport
SamJaarsma Mar 27, 2024
b33da1e
amended explanation for warnings
SamJaarsma Mar 27, 2024
f558a6d
fix multi room explanation
SamJaarsma Mar 28, 2024
ae12780
first attempt to currency
SamJaarsma Apr 2, 2024
b1891d4
Price and currency revision final. Added locally payable or included …
SamJaarsma Apr 3, 2024
1c09e46
added a comment
SamJaarsma Apr 3, 2024
d96ffac
fix small typos and comments
havan Apr 4, 2024
11991f1
Merge branch 'version-4-update' of https://github.com/chain4travel/ca…
SamJaarsma Apr 4, 2024
0a0ab18
review comments
SamJaarsma Apr 4, 2024
6557fa4
further review comments
SamJaarsma Apr 4, 2024
ad3adeb
Update proto/cmp/services/accommodation/v1alpha/search.proto
SamJaarsma Apr 11, 2024
26297d2
Update proto/cmp/services/transport/v1alpha/search.proto
SamJaarsma Apr 11, 2024
6314e38
Update proto/cmp/services/transport/v1alpha/search_query_types.proto
SamJaarsma Apr 11, 2024
8cc2d52
Update proto/cmp/types/v1alpha/service_fact.proto
SamJaarsma Apr 11, 2024
2a333ce
review comments Alex
SamJaarsma Apr 11, 2024
ff61da1
Merge branch 'version-4-update' of https://github.com/chain4travel/ca…
SamJaarsma Apr 11, 2024
db632c6
further comments from Alex
SamJaarsma Apr 11, 2024
cb079bd
specification of on-chain payment improvement and typos
SamJaarsma Apr 11, 2024
e1ab928
buf format
havan Apr 11, 2024
df683c3
rename supported_currencies to on_chain_currencies
SamJaarsma Apr 12, 2024
5add7d6
made made names of all repeated fields plural
SamJaarsma Apr 12, 2024
64b401d
Added enum RatepPlanType
SamJaarsma Apr 12, 2024
6903b65
improved RatePlan documentation
SamJaarsma Apr 12, 2024
92995fe
fix typo
havan Apr 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions proto/cmp/services/accommodation/v1alpha/property_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ 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";
import "cmp/types/v1alpha/traveller.proto";
import "google/protobuf/timestamp.proto";
import "cmp/types/v1alpha/product_code.proto";

// ### Property message type
//
Expand All @@ -23,10 +24,11 @@ import "cmp/types/v1alpha/product_code.proto";
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha/property_types.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha/property_types.proto.dot.svg)
message Property {
// Ex: "2023-08-28T12:03:50",
// Ex: "2023-08-28T12:03:50", specifying when the static data of a product was
// last updated
google.protobuf.Timestamp last_modified = 1;

// Ex: "AESPMI1234"
// Supplier product Code
cmp.types.v1alpha.SupplierProductCode supplier_code = 2;

// Product code which can be of different types
Expand Down Expand Up @@ -60,7 +62,7 @@ message Property {
string website = 12;

// Status of the property
PropertyStatus status = 13;
cmp.types.v1alpha.ProductStatus status = 13;

// Airports
// Ex: ["PMI", "ZRH", "AYT"]
Expand Down Expand Up @@ -97,13 +99,6 @@ enum CategoryUnit {
CATEGORY_UNIT_PALMS = 2;
}

enum PropertyStatus {
PROPERTY_STATUS_UNSPECIFIED = 0;
PROPERTY_STATUS_DRAFT = 1;
PROPERTY_STATUS_CONFIRMED = 2;
PROPERTY_STATUS_EXPIRED = 3;
}

// This message type contains extended info about a property
message PropertyExtendedInfo {
// Property
Expand Down Expand Up @@ -139,17 +134,17 @@ message Room {
// availability data for display to the end user.
string supplier_room_code = 1;

// Room name. In case of hotel a standardized room name is often derrived from
// room code structures. Exmple: "superior seaview room".
// For holiday homes we expect names like "Master Bedroom", "Second Bedroom" or
// "Bathroom" when specific descriptions for each room are available.
// Room name. In case of hotel a standardized room name is often derrived from
// room code structures. Exmple: "superior seaview room".
// For holiday homes we expect names like "Master Bedroom", "Second Bedroom" or
// "Bathroom" when specific descriptions for each room are available.
string supplier_room_name = 2;

// Original room name as assigned by the hotel. In case of spefifically designated room
// names by chains and both the chain and the customer wants to adhere to them.
// Ex: "CEIBA CLUB", "CEIBA GOVERNORS SUITE", "GOVERNORS SUITE" or "ENCLAVE NATURE VIEW"
// For holiday homes specific room names if availbale can be given.
string original_room_name =3;
string original_room_name = 3;

repeated cmp.types.v1alpha.Image images = 4;
SamJaarsma marked this conversation as resolved.
Show resolved Hide resolved
repeated cmp.types.v1alpha.Video videos = 5;
Expand Down
6 changes: 4 additions & 2 deletions proto/cmp/services/accommodation/v1alpha/search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import "cmp/services/accommodation/v1alpha/search_query_types.proto";
import "cmp/services/accommodation/v1alpha/search_result_types.proto";
import "cmp/types/v1alpha/common.proto";
import "cmp/types/v1alpha/search.proto";
import "cmp/types/v1alpha/traveller.proto";

// The `Accommodation Search Request` message type facilitates the request for
// accommodations like hotel and holiday home searches within the platform. In the
Expand Down Expand Up @@ -69,8 +70,6 @@ import "cmp/types/v1alpha/search.proto";
// requests with multiple rooms or homes, the same room or home is not offered twice
// to different travellers.
//
//

message AccommodationSearchRequest {
// Message header. Contains API version, message info string and end-user wallet
// address
Expand Down Expand Up @@ -108,6 +107,9 @@ message AccommodationSearchResponse {

// Unique combinations of bookable search results, like property,
repeated AccommodationSearchResult results = 3;

// The traveller_id is specified in each unit and only detailed once in the search response
SamJaarsma marked this conversation as resolved.
Show resolved Hide resolved
repeated cmp.types.v1alpha.BasicTraveller travellers = 4;
}

// Service definition for Accommodation search
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ message AccommodationSearchQuery {
cmp.types.v1alpha.TravelPeriod travel_period = 3;

// Travellers
repeated cmp.types.v1alpha.Traveller travellers = 4;
repeated cmp.types.v1alpha.BasicTraveller traveller = 4;

// Total number of rooms / holiday homes
int32 unit_count = 5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import "cmp/services/accommodation/v1alpha/unit_types.proto";
import "cmp/types/v1alpha/cancel_policy.proto";
import "cmp/types/v1alpha/price.proto";
import "cmp/types/v1alpha/rate.proto";
import "cmp/types/v1alpha/bookable.proto";

// This type represents a search result and is used in the
// `AccommodationSearchResponse` message.
Expand Down Expand Up @@ -34,4 +35,7 @@ message AccommodationSearchResult {

// Freetext remarks without any functionality
string remarks = 7;

// Status of the result, whether it is immediately bookable or not
cmp.types.v1alpha.Bookability bookable = 8;
SamJaarsma marked this conversation as resolved.
Show resolved Hide resolved
}
8 changes: 4 additions & 4 deletions proto/cmp/services/accommodation/v1alpha/unit_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import "cmp/types/v1alpha/product_code.proto";
import "cmp/types/v1alpha/rate.proto";
import "cmp/types/v1alpha/service_fact.proto";
import "cmp/types/v1alpha/travel_period.proto";
import "cmp/types/v1alpha/traveller.proto";

// A Unit can represent a room in a hotel. One search option can have multiple units
// for multi-room requests Ex: one request for 2 rooms for 4 adults, 2 in each room.
Expand Down Expand Up @@ -45,8 +44,9 @@ message Unit {
// Travel period
cmp.types.v1alpha.TravelPeriod travel_period = 5;

// Travellers
repeated cmp.types.v1alpha.Traveller travellers = 6;
// Traveller_id is a list of travellers related to this unit. The details can be found in
// the search response repeated travellers field
repeated int32 traveller_ids = 6;

// Beds
repeated cmp.types.v1alpha.Bed beds = 7;
Expand Down Expand Up @@ -77,7 +77,7 @@ message Unit {

// Property code which can be of different types
cmp.types.v1alpha.ProductCode property_code = 15;

// Supplier Property code, consistent in ProductList, ProductInfo and Search
cmp.types.v1alpha.SupplierProductCode supplier_code = 16;

Expand Down
7 changes: 6 additions & 1 deletion proto/cmp/services/activity/v1alpha/search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ message ActivitySearchRequest {
cmp.types.v1alpha.TravelPeriod travel_period = 5;

// Travellers
repeated cmp.types.v1alpha.Traveller travellers = 6;
repeated cmp.types.v1alpha.BasicTraveller travellers = 6;

// ### Source Location
//
Expand Down Expand Up @@ -110,6 +110,11 @@ message ActivitySearchResponse {

// Unique combinations of bookable search results
repeated ActivitySearchResult results = 3;

// The traveller_id is specified in each result and the ids are detailed with
// basic traveller data only once in the top-level search response to avoid
// repetition.
repeated cmp.types.v1alpha.BasicTraveller travellers = 4;
}

// ### Activity Search Service
Expand Down
38 changes: 11 additions & 27 deletions proto/cmp/services/activity/v1alpha/search_parameters_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,55 +19,39 @@ message ActivitySearchParameters {
// Egypt should be in Russian
repeated cmp.types.v1alpha.Language spoken_language = 1;

// Specify one or more product codes to be included in the search response
// These can be of different types
// Ex: "TC000000"
repeated cmp.types.v1alpha.ProductCode product_codes = 2;

// Specify one or more supplier codes to be included in the search response
// These must match the supplier codes provided in the ProductList and
// ProductInfo messages
repeated cmp.types.v1alpha.SupplierProductCode supplier_codes = 3;
repeated cmp.types.v1alpha.SupplierProductCode supplier_codes = 2;

// Specify one or more product codes to be included in the search response
// These can be of different types
repeated cmp.types.v1alpha.ProductCode product_codes = 3;

// Specify one or more activity IDs to be included in the search response
// Specify one or more unit IDs to be included in the search response
// 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.
// Ex: "EESPMI46VY"
repeated string activity_id = 4;
repeated string unit_id = 4;
SamJaarsma marked this conversation as resolved.
Show resolved Hide resolved

// Specify one or more service codes to be included in the search response
// 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
// Ex: "XO"
repeated string service_code = 5;

// Specify one or more category codes to be included in the search response
// This concept is covering classification and segmentation aspects like for example
// Museum tours, Outdoor activities, Theme parks etc...
// Code and description match the information provided in the ProductInfo message
// These are in general also supplier specific
repeated string category_code = 6;

// Specify one or more type codes to be included in the search response
// A code to identify a specific type of excursion like Leisure, Activity, Learning, etc
// Code and description match the information provided in the ProductInfo message
// These are in general also supplier specific
repeated string type_code = 7;

SamJaarsma marked this conversation as resolved.
Show resolved Hide resolved
// Duration
//
// Specify the minimal and maximum duration of an activity to be included in the
// search response
cmp.types.v1alpha.Duration min_duration = 8;
cmp.types.v1alpha.Duration max_duration = 9;
cmp.types.v1alpha.Duration min_duration = 6;
cmp.types.v1alpha.Duration max_duration = 7;

// Pricerange
//
// Specify the minimum and maximum price of an activity to be included in the
// search response
cmp.types.v1alpha.Price min_price = 10;
cmp.types.v1alpha.Price max_price = 11;
cmp.types.v1alpha.Price min_price = 8;
cmp.types.v1alpha.Price max_price = 9;
}
64 changes: 26 additions & 38 deletions proto/cmp/services/activity/v1alpha/search_result_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "cmp/types/v1alpha/location.proto";
import "cmp/types/v1alpha/price.proto";
import "google/protobuf/timestamp.proto";
import "cmp/types/v1alpha/product_code.proto";
import "cmp/types/v1alpha/bookable.proto";

// This type represents a search result and is used in the `ActivitySearchResponse`
// message.
Expand Down Expand Up @@ -49,44 +50,31 @@ message ActivitySearchResult {
//
// See extensive explanations in search_parameters_types
message Activity {
// Ex: "TC000000"
cmp.types.v1alpha.SupplierProductCode supplier_code = 1;

// Product code which can be of different types
cmp.types.v1alpha.ProductCode product_code = 2;

// Ex: "Helicopter Tour Heli"
string product_name = 3;

// Ex: "EESPMI46VY"
string activity_id = 4;

// Ex: "Tour (40 min)"
string activity_name = 5;

// Ex: "XO"
string service_code = 6;

// Ex: "with transfer from/to hotel"
string service_name = 7;

// Ex: "XA"
string category_code = 8;

// Ex: "Excursions & Activities"
string category_name = 9;

// Ex: "SF"
string type_code = 10;

// Ex: "Safari"
string type_name = 11;

// Status
//
// FIXME: We need to make this an ENUM (this is also used for several other
// verticals)
string status = 12;
// 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_id = 4;
SamJaarsma marked this conversation as resolved.
Show resolved Hide resolved

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

// ### Activity Location
Expand Down
5 changes: 5 additions & 0 deletions proto/cmp/services/transport/v1alpha/search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import "cmp/services/transport/v1alpha/search_result_types.proto";
import "cmp/types/v1alpha/common.proto";
import "cmp/types/v1alpha/content_source.proto";
import "cmp/types/v1alpha/search.proto";
import "cmp/types/v1alpha/traveller.proto";


// ### Transport Search Request
message TransportSearchRequest {
Expand Down Expand Up @@ -56,6 +58,9 @@ message TransportSearchResponse {

// Transit search results
repeated TransportSearchResult results = 4;

// Travellers
SamJaarsma marked this conversation as resolved.
Show resolved Hide resolved
repeated cmp.types.v1alpha.BasicTraveller travellers = 5;
SamJaarsma marked this conversation as resolved.
Show resolved Hide resolved
}

// Transport Search Service definition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ message TransportSearchQuery {
int32 query_id = 1;

// Travellers
SamJaarsma marked this conversation as resolved.
Show resolved Hide resolved
repeated cmp.types.v1alpha.Traveller travellers = 2;
repeated cmp.types.v1alpha.BasicTraveller travellers = 2;

// Trips
repeated QueryTrip trips = 3;
Expand Down
Loading