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

change v1alpha to v1 #30

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
syntax = "proto3";

package cmp.services.accommodation.v1alpha;
package cmp.services.accommodation.v1;

import "cmp/services/accommodation/v1alpha/property_types.proto";
import "cmp/types/v1alpha/common.proto";
import "cmp/types/v1alpha/language.proto";
import "cmp/types/v1alpha/product_code.proto";
import "cmp/services/accommodation/v1/property_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 AccommodationProductInfoRequest {
// Message header
cmp.types.v1alpha.RequestHeader header = 1;
cmp.types.v1.RequestHeader header = 1;

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

// Languages
repeated cmp.types.v1alpha.Language languages = 3;
repeated cmp.types.v1.Language languages = 3;

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

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

// Product list: Properties
repeated PropertyExtendedInfo properties = 2;
}

// Accommodation product info service definition
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha/info.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha/info.proto.dot.svg)
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1/info.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1/info.proto.dot.svg)
service AccommodationProductInfoService {
// Returns product list for accommodation (properties)
rpc AccommodationProductInfo(AccommodationProductInfoRequest) returns (AccommodationProductInfoResponse);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
syntax = "proto3";

package cmp.services.accommodation.v1alpha;
package cmp.services.accommodation.v1;

import "cmp/services/accommodation/v1alpha/property_types.proto";
import "cmp/types/v1alpha/common.proto";
import "cmp/services/accommodation/v1/property_types.proto";
import "cmp/types/v1/common.proto";
import "google/protobuf/timestamp.proto";

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

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

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

// Product list: Properties
repeated Property properties = 2;
}

// Accommodation product list service definition
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha/list.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha/list.proto.dot.svg)
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1/list.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1/list.proto.dot.svg)
service AccommodationProductListService {
// Returns product list for accommodation (properties)
rpc AccommodationProductList(AccommodationProductListRequest) returns (AccommodationProductListResponse);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
syntax = "proto3";

package cmp.services.accommodation.v1alpha;

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/file.proto";
import "cmp/types/v1alpha/location.proto";
import "cmp/types/v1alpha/meal_plan.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";
package cmp.services.accommodation.v1;

import "cmp/types/v1/amenity.proto";
import "cmp/types/v1/bed.proto";
import "cmp/types/v1/contact_info.proto";
import "cmp/types/v1/description.proto";
import "cmp/types/v1/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/service_fact.proto";
import "cmp/types/v1/traveller.proto";
import "google/protobuf/timestamp.proto";

// Represents property info for an accommodation product
//
// ![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)
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1/property_types.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1/property_types.proto.dot.svg)
message Property {
// 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 Code
cmp.types.v1alpha.SupplierProductCode supplier_code = 2;
cmp.types.v1.SupplierProductCode supplier_code = 2;

// Product code which can be of different types
repeated cmp.types.v1alpha.ProductCode product_codes = 3;
repeated cmp.types.v1.ProductCode product_codes = 3;

// Ex: "Beach Hotel Alanya"
string name = 4;
Expand All @@ -43,13 +43,13 @@ message Property {
CategoryUnit category_unit = 7;

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

// Location coordinate
cmp.types.v1alpha.Coordinates coordinates = 9;
cmp.types.v1.Coordinates coordinates = 9;

// Status of the property
cmp.types.v1alpha.ProductStatus status = 10;
cmp.types.v1.ProductStatus status = 10;

// Airports
// Ex: ["PMI", "ZRH", "AYT"]
Expand Down Expand Up @@ -92,19 +92,19 @@ message PropertyExtendedInfo {
Property property = 1;

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

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

// Segmentation classification
repeated string classifications = 4;

// Property descriptions
repeated cmp.types.v1alpha.LocalizedDescriptionSet localized_descriptions = 5;
repeated cmp.types.v1.LocalizedDescriptionSet localized_descriptions = 5;

// Room descriptions
repeated cmp.types.v1alpha.LocalizedDescriptionSet localized_room_descriptions = 6;
repeated cmp.types.v1.LocalizedDescriptionSet localized_room_descriptions = 6;

// Payment type. Ex: "MERCHANT"
string payment_type = 7;
Expand Down Expand Up @@ -133,26 +133,26 @@ message Room {
// For holiday homes specific room names if availbale can be given.
string original_name = 3;

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

// Room descriptions
repeated cmp.types.v1alpha.LocalizedDescriptionSet descriptions = 6;
repeated cmp.types.v1.LocalizedDescriptionSet descriptions = 6;

// Meal plan (Board code)
repeated cmp.types.v1alpha.MealPlan meal_plans = 7;
repeated cmp.types.v1.MealPlan meal_plans = 7;

// Beds
repeated cmp.types.v1alpha.Bed beds = 8;
repeated cmp.types.v1.Bed beds = 8;

// Occupancy
Occupancy total_occupancy = 9;

// Services
repeated cmp.types.v1alpha.ServiceFact services = 10;
repeated cmp.types.v1.ServiceFact services = 10;

// Amenities
repeated cmp.types.v1alpha.Amenity amenities = 11;
repeated cmp.types.v1.Amenity amenities = 11;
}

message Occupancy {
Expand All @@ -177,7 +177,7 @@ message Occupancy {

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

// Min guests
int32 min = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ syntax = "proto3";
// and Product Details messages.
//
// This package is a **WIP**.
package cmp.services.accommodation.v1alpha;
package cmp.services.accommodation.v1;

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";
import "cmp/services/accommodation/v1/search_query_types.proto";
import "cmp/services/accommodation/v1/search_result_types.proto";
import "cmp/types/v1/common.proto";
import "cmp/types/v1/search.proto";
import "cmp/types/v1/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 @@ -73,17 +73,17 @@ import "cmp/types/v1alpha/traveller.proto";
message AccommodationSearchRequest {
// Message header. Contains API version, message info string and end-user wallet
// address
cmp.types.v1alpha.RequestHeader header = 1;
cmp.types.v1.RequestHeader header = 1;

// Search request metadata
cmp.types.v1alpha.SearchRequestMetadata metadata = 2;
cmp.types.v1.SearchRequestMetadata metadata = 2;

// Generic search parameters Ex: Inclusion of OnRequest options and inclusion of
// only the cheapest or all options.
// In the search parameters multiple filters can be applied for upfront filtering
// of the search results to for example to only include hotels that are less than
// one kilometer from the beach, have a kids club and offer an a la carte restaurant
cmp.types.v1alpha.SearchParameters search_parameters_generic = 3;
cmp.types.v1.SearchParameters search_parameters_generic = 3;

// This field represents a list of search queries that can be used to create
// multiroom multi location searches.
Expand All @@ -100,22 +100,22 @@ message AccommodationSearchRequest {
message AccommodationSearchResponse {
// Message header. Contains API version, message info string and end user wallet
// address.
cmp.types.v1alpha.ResponseHeader header = 1;
cmp.types.v1.ResponseHeader header = 1;

// Search response metadata
cmp.types.v1alpha.SearchResponseMetadata metadata = 2;
cmp.types.v1.SearchResponseMetadata metadata = 2;

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

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

// Service definition for Accommodation search
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha/search.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha/search.proto.dot.svg)
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1/search.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1/search.proto.dot.svg)
service AccommodationSearchService {
// Accommodation Search method
rpc AccommodationSearch(AccommodationSearchRequest) returns (AccommodationSearchResponse);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
syntax = "proto3";

package cmp.services.accommodation.v1alpha;
package cmp.services.accommodation.v1;

import "cmp/types/v1alpha/location.proto";
import "cmp/types/v1alpha/meal_plan.proto";
import "cmp/types/v1alpha/product_code.proto";
import "cmp/types/v1alpha/rate.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/rate.proto";

// This type is used in search requests for parameters like location, meal plan
// codes etc.
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha/search_parameters_types.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha/search_parameters_types.proto.dot.svg)
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1/search_parameters_types.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1/search_parameters_types.proto.dot.svg)
message AccommodationSearchParameters {
// Geo Location for search, set only one of the fields at once.
//
// This "one of" field enforces only one of the fields below. They all share
// memory, setting one will remove the others.
oneof geo_location {
// A list of location codes or just one code.
cmp.types.v1alpha.LocationCodes location_codes = 1;
cmp.types.v1.LocationCodes location_codes = 1;

// Single geographic point represented by two double fields.
cmp.types.v1alpha.Coordinates location_coordinates = 2;
cmp.types.v1.Coordinates location_coordinates = 2;

// Geo tree type, represented by Country, Region, and City_or_Resort.
cmp.types.v1alpha.GeoTree location_geo_tree = 3;
cmp.types.v1.GeoTree location_geo_tree = 3;

// Geo circle. Represented by a coordinate and a distance for radius
cmp.types.v1alpha.GeoCircle location_geo_circle = 4;
cmp.types.v1.GeoCircle location_geo_circle = 4;

// Geo polygon. Represented by a list of coordinate points.
cmp.types.v1alpha.GeoPolygon location_geo_polygon = 5;
cmp.types.v1.GeoPolygon location_geo_polygon = 5;
}

// Mealplan codes
repeated cmp.types.v1alpha.MealPlan meal_plan_codes = 6;
repeated cmp.types.v1.MealPlan meal_plan_codes = 6;

// Rate plans
repeated cmp.types.v1alpha.RatePlan rate_plans = 7;
repeated cmp.types.v1.RatePlan rate_plans = 7;

// Rate Rules
// To be used when searching for specific rates like refundable or resellable offers
repeated cmp.types.v1alpha.RateRule rate_rules = 8;
repeated cmp.types.v1.RateRule rate_rules = 8;

// Product code list
// Here a list of property codes would be used that could be of different types
repeated cmp.types.v1alpha.ProductCode product_codes = 9;
repeated cmp.types.v1.ProductCode product_codes = 9;

// Or a list of provider codes would be used
repeated cmp.types.v1alpha.SupplierProductCode supplier_codes = 10;
repeated cmp.types.v1.SupplierProductCode supplier_codes = 10;
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
syntax = "proto3";

package cmp.services.accommodation.v1alpha;
package cmp.services.accommodation.v1;

import "cmp/services/accommodation/v1alpha/search_parameters_types.proto";
import "cmp/services/accommodation/v1alpha/unit_types.proto";
import "cmp/types/v1alpha/travel_period.proto";
import "cmp/types/v1alpha/traveller.proto";
import "cmp/services/accommodation/v1/search_parameters_types.proto";
import "cmp/services/accommodation/v1/unit_types.proto";
import "cmp/types/v1/travel_period.proto";
import "cmp/types/v1/traveller.proto";

message AccommodationSearchQuery {
// Integer query ID, unique per search request
Expand All @@ -16,10 +16,10 @@ message AccommodationSearchQuery {
AccommodationSearchParameters search_parameters_accommodation = 2;

// Travel period
cmp.types.v1alpha.TravelPeriod travel_period = 3;
cmp.types.v1.TravelPeriod travel_period = 3;

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

// Total number of rooms / holiday homes
int32 unit_count = 5;
Expand Down
Loading