-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding transport product list service --------- Co-authored-by: Ekrem Seren <[email protected]>
- Loading branch information
Showing
13 changed files
with
347 additions
and
11 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,37 @@ | ||
syntax = "proto3"; | ||
|
||
package cmp.services.transport.v1; | ||
|
||
import "cmp/services/transport/v3/trip_types.proto"; | ||
import "cmp/types/v1/common.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
message TransportProductListRequest { | ||
// Message header | ||
cmp.types.v1.RequestHeader header = 1; | ||
|
||
// Only respond with the products that are modified after this timestamp | ||
// | ||
// Timestamps may be used for both off-chain and on-chain operations. | ||
// For on-chain operations, only seconds are supported, and nanoseconds | ||
// will be ignored. | ||
google.protobuf.Timestamp modified_after = 2; | ||
} | ||
|
||
message TransportProductListResponse { | ||
// Message header | ||
cmp.types.v1.ResponseHeader header = 1; | ||
|
||
// Product list: Trips | ||
repeated cmp.services.transport.v3.TripBasic trips = 2; | ||
} | ||
|
||
// This service is used to get a product list for transportation. | ||
// | ||
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1/list.proto.dot.xs.svg) | ||
// | ||
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1/list.proto.dot.svg) | ||
service TransportProductListService { | ||
// Gets an optional `modified_after` date and returns a product list. | ||
rpc TransportProductList(TransportProductListRequest) returns (TransportProductListResponse); | ||
} |
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
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,75 @@ | ||
syntax = "proto3"; | ||
|
||
// ## Transport Service | ||
// | ||
// The Transport Service is used for flights, trains, and buses. | ||
// | ||
// Any search message response in the Camino Messenger Protocol only includes | ||
// dynamic data. Static data can be cached and kept up to date with the Product List | ||
// and Product Details messages. | ||
// | ||
// This package is a WIP. | ||
package cmp.services.transport.v3; | ||
|
||
import "cmp/services/transport/v2/search_query_types.proto"; | ||
import "cmp/services/transport/v3/search_result_types.proto"; | ||
import "cmp/types/v1/common.proto"; | ||
import "cmp/types/v1/content_source.proto"; | ||
import "cmp/types/v2/search.proto"; | ||
import "cmp/types/v2/traveller.proto"; | ||
|
||
// Transport Search Request | ||
message TransportSearchRequest { | ||
// Message header. Contains API version, message info string and end-user wallet | ||
// address | ||
cmp.types.v1.RequestHeader header = 1; | ||
|
||
// Search request metadata | ||
cmp.types.v2.SearchRequestMetadata metadata = 2; | ||
|
||
// Generic search parameters | ||
// | ||
// Ex: Inclusion of OnRequest options and inclusion of only the cheapest or all | ||
// options. | ||
cmp.types.v2.SearchParameters search_parameters = 3; | ||
|
||
// Multiple search queries for this search request | ||
repeated cmp.services.transport.v2.TransportSearchQuery queries = 4; | ||
|
||
// Remarks | ||
string remarks = 5; | ||
} | ||
|
||
message TransportSearchResponse { | ||
// Message header. Contains API version, message info string and end-user wallet | ||
// address | ||
cmp.types.v1.ResponseHeader header = 1; | ||
|
||
// Search response metadata | ||
cmp.types.v2.SearchResponseMetadata metadata = 2; | ||
|
||
// Content source types for this search request. | ||
// | ||
// Ex: ContentSourceType.CONTENT_SOURCE_TYPE_GDS, | ||
// ContentSourceType.CONTENT_SOURCE_TYPE_NDC | ||
// ContentSourceType.CONTENT_SOURCE_TYPE_3RD_PARTY | ||
repeated cmp.types.v1.ContentSourceType content_source_types = 3; | ||
|
||
// Transit search results | ||
repeated cmp.services.transport.v3.TransportSearchResult results = 4; | ||
|
||
// Global definition of the travellers for all results to be used via the traveller_id | ||
repeated cmp.types.v2.BasicTraveller travellers = 5; | ||
} | ||
|
||
// Transport Search Service definition. | ||
// | ||
// Takes `TransportSearchRequest` message type and returns `TransportSearchResponse` | ||
// message type. | ||
// | ||
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v3/search.proto.dot.xs.svg) | ||
// | ||
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v3/search.proto.dot.svg) | ||
service TransportSearchService { | ||
rpc TransportSearch(TransportSearchRequest) returns (TransportSearchResponse); | ||
} |
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,71 @@ | ||
syntax = "proto3"; | ||
|
||
package cmp.services.transport.v3; | ||
|
||
import "cmp/services/transport/v3/trip_types.proto"; | ||
import "cmp/types/v1/bookability.proto"; | ||
import "cmp/types/v1/datetime_range.proto"; | ||
import "cmp/types/v1/link.proto"; | ||
import "cmp/types/v1/rate.proto"; | ||
import "cmp/types/v2/cancel_policy.proto"; | ||
import "cmp/types/v2/change_policy.proto"; | ||
import "cmp/types/v2/price.proto"; | ||
|
||
// Transport search result | ||
// | ||
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v3/search_result_types.proto.dot.xs.svg) | ||
// | ||
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v3/search_result_types.proto.dot.svg) | ||
message TransportSearchResult { | ||
// Unique result ID | ||
int32 result_id = 1; | ||
|
||
// Query ID is the id of the query this result is generated for | ||
int32 query_id = 2; | ||
|
||
// Offer ID. | ||
// | ||
// Option to carry through an offer identifier for other stateful provider systems | ||
// like NDC AirShopping RS | ||
string offer_id = 3; | ||
|
||
// Travellers | ||
repeated int32 traveller_ids = 4; | ||
|
||
// Travelling trip. A travelling trip can be repeated and will be in many cases 2 | ||
// trips: an outbound and returning trip from and to the same destination. | ||
// However, it is very much possible to specify your trip around the world into | ||
// several "Trips". For example AMS-NYC and after a couple of days NYC-IAH. There | ||
// we rent a car and do a road trip to San Fransisco and we take a flight from SFO | ||
// to SYD, where afer a couple of days we move on to Indonesia, Thailand, Japan, | ||
// Türkiye and back to Amsterdam again. | ||
repeated cmp.services.transport.v3.TripExtended travelling_trips = 5; | ||
|
||
// Total Price | ||
cmp.types.v2.PriceDetail total_price = 6; | ||
|
||
// Rate Rules | ||
repeated cmp.types.v1.RateRule rate_rules = 7; | ||
|
||
// Links | ||
repeated cmp.types.v1.Link links = 8; | ||
|
||
// Status of the result, whether it is immediately bookable or not | ||
cmp.types.v1.Bookability bookability = 9; | ||
|
||
// Validity of the search option. | ||
// | ||
// `DateTimeRange` type with `start_date` and `end_date` in which the option can | ||
// be booked. If the start_date is omitted, the offer can be booked until the | ||
// end-date. | ||
cmp.types.v1.DateTimeRange validity = 10; | ||
|
||
// Cancel Policy | ||
cmp.types.v2.CancelPolicy cancel_policy = 11; | ||
|
||
// Change Policy | ||
cmp.types.v2.ChangePolicy change_policy = 12; | ||
|
||
// Observations | ||
string observations = 13; | ||
} |
Oops, something went wrong.