Skip to content

Commit

Permalink
add a comment for timestamp (#48)
Browse files Browse the repository at this point in the history
* add a comment for timestamp
  • Loading branch information
mo-c4t authored Oct 17, 2024
1 parent 8736680 commit 3864f7f
Show file tree
Hide file tree
Showing 29 changed files with 140 additions and 0 deletions.
4 changes: 4 additions & 0 deletions proto/cmp/services/accommodation/v1/info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ message AccommodationProductInfoRequest {
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;

// Languages
Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/accommodation/v1/list.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ message AccommodationProductListRequest {
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;
}

Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/accommodation/v1/property_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ import "google/protobuf/timestamp.proto";
message Property {
// Ex: "2023-08-28T12:03:50", specifying when the static data of a product was
// last updated
//
// 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 last_modified = 1;

// Supplier product Code
Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/accommodation/v2/info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ message AccommodationProductInfoRequest {
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;

// Languages
Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/accommodation/v2/list.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ message AccommodationProductListRequest {
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;
}

Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/accommodation/v2/property_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ import "google/protobuf/timestamp.proto";
message Property {
// Ex: "2023-08-28T12:03:50", specifying when the static data of a product was
// last updated
//
// 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 last_modified = 1;

// Supplier product Code
Expand Down
8 changes: 8 additions & 0 deletions proto/cmp/services/activity/v1/activity_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ message Activity {

// Ex: "2023-08-28T12:03:50", specifying when the static data of a product was
// last updated
//
// 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 last_modified = 2;

// An identifier for external sessions, aiding in tracking and continuity across
Expand Down Expand Up @@ -90,6 +94,10 @@ message PickupDropoffEvent {
string other_info = 4;

// Datetime of the pickup dropoff event as Unix 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 date_time = 5;

// Longitude and Latitude of the location
Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/activity/v1/info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ message ActivityProductInfoRequest {

// Only respond with the products that are new, modified or deactivated 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;

// Languages to be included in the response for descriptions. Null means all
Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/activity/v1/list.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ message ActivityProductListRequest {
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;
}

Expand Down
8 changes: 8 additions & 0 deletions proto/cmp/services/activity/v2/activity_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ message Activity {

// Ex: "2023-08-28T12:03:50", specifying when the static data of a product was
// last updated
//
// 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 last_modified = 2;

// An identifier for external sessions, aiding in tracking and continuity across
Expand Down Expand Up @@ -90,6 +94,10 @@ message PickupDropoffEvent {
string other_info = 4;

// Datetime of the pickup dropoff event as Unix 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 date_time = 5;

// Longitude and Latitude of the location
Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/activity/v2/info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ message ActivityProductInfoRequest {

// Only respond with the products that are new, modified or deactivated 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;

// Languages to be included in the response for descriptions. Null means all
Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/activity/v2/list.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ message ActivityProductListRequest {
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;
}

Expand Down
8 changes: 8 additions & 0 deletions proto/cmp/services/book/v1/mint.proto
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ message MintResponse {
string provider_booking_reference = 4;

// Timestamp of the booking in the inventory system of the supplier.
//
// 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 provider_booking_timestamp = 5;

// Price of the `BookingToken`. This field is meant to be populated by the
Expand All @@ -73,6 +77,10 @@ message MintResponse {

// On chain booking token should be only buyable until this timestamp and should
// expire after that.
//
// 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 buyable_until = 9;

// Transaction ID of the buy operation. This field is populated by the distributor
Expand Down
8 changes: 8 additions & 0 deletions proto/cmp/services/book/v2/mint.proto
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ message MintResponse {
string provider_booking_reference = 4;

// Timestamp of the booking in the inventory system of the supplier.
//
// 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 provider_booking_timestamp = 5;

// Price of the `BookingToken`. This field is meant to be populated by the
Expand All @@ -78,6 +82,10 @@ message MintResponse {

// On chain booking token should be only buyable until this timestamp and should
// expire after that.
//
// 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 buyable_until = 10;

// Transaction ID of the buy operation. This field is populated by the distributor
Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/info/v1/entry_requirements.proto
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ message CountryEntryRequirementItem {
cmp.services.info.v1.ItemStatus status = 3;

// Significant update date
//
// 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 last_significant_update = 4;
}

Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/info/v2/entry_requirements.proto
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ message CountryEntryRequirementItem {
cmp.services.info.v2.ItemStatus status = 3;

// Significant update date
//
// 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 last_significant_update = 4;
}

Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/insurance/v1/info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ message InsuranceProductInfoRequest {

// Only respond with the products that are new, modified or deactivated 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;

// Languages to be included in the response for descriptions. Null means all
Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/insurance/v1/insurance_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ message Policy {

// Ex: "2023-08-28T12:03:50", specifying when the static data of a product was
// last updated
//
// 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 last_modified = 3;
}

Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/insurance/v1/list.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ message InsuranceProductListRequest {
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;
}

Expand Down
8 changes: 8 additions & 0 deletions proto/cmp/services/ping/v1/ping.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ message PingRequest {
string ping_message = 2;

// DateTime of the ping request
//
// 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 timestamp = 3;
}

Expand All @@ -28,6 +32,10 @@ message PingResponse {
string ping_message = 2;

// DateTime of the ping response
//
// 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 timestamp = 3;
}

Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/transport/v1/trip_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ message Trip {
// Represents a departure or arrival event
message TransitEvent {
// Date time of the event
//
// 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 date_time = 1;

// Event location
Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/services/transport/v2/trip_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ message Trip {
// Represents a departure or arrival event
message TransitEvent {
// Date time of the event
//
// 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 date_time = 1;

// Event location
Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/types/v1/cancel_policy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ message CancelPolicy {

// The "free cancellation upto" identifier specifies the exact DateTime upto when
// this booking can be cancelled free of charge.
//
// 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 free_cancellation_upto = 2;

// Full cancellation policies can be complex and extensive. Inclusion in search
Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/types/v1/change_policy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ message ChangePolicy {

// The "free change upto" identifier specifies the exact DateTime upto when
// this search result can be changed free of charge.
//
// 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 free_change_upto = 2;

// Full change policies can be complex and extensive. Inclusion in search
Expand Down
8 changes: 8 additions & 0 deletions proto/cmp/types/v1/datetime_range.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ import "google/protobuf/timestamp.proto";
//
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1/datetime_range.proto.dot.svg)
message DateTimeRange {
//
// 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 start_datetime = 1;
//
// 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 end_datetime = 2;
}
4 changes: 4 additions & 0 deletions proto/cmp/types/v1/file.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ message File {
string url = 2;

// Last modification time
//
// 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 last_modified = 3;
}

Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/types/v2/cancel_policy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ message CancelPolicy {

// The "free cancellation upto" identifier specifies the exact DateTime upto when
// this booking can be cancelled free of charge.
//
// 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 free_cancellation_upto = 2;

// Full cancellation policies can be complex and extensive. Inclusion in search
Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/types/v2/change_policy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ message ChangePolicy {

// The "free change upto" identifier specifies the exact DateTime upto when
// this search result can be changed free of charge.
//
// 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 free_change_upto = 2;

// Full change policies can be complex and extensive. Inclusion in search
Expand Down
4 changes: 4 additions & 0 deletions proto/cmp/types/v2/file.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ message File {
string url = 2;

// Last modification time
//
// 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 last_modified = 3;
}

Expand Down

0 comments on commit 3864f7f

Please sign in to comment.