From 3864f7f61e3b88b2dc13c9da6853aa64cb82818a Mon Sep 17 00:00:00 2001 From: Mohamed Elmoslemany <117270519+mo-c4t@users.noreply.github.com> Date: Fri, 18 Oct 2024 00:18:01 +0200 Subject: [PATCH] add a comment for timestamp (#48) * add a comment for timestamp --- proto/cmp/services/accommodation/v1/info.proto | 4 ++++ proto/cmp/services/accommodation/v1/list.proto | 4 ++++ proto/cmp/services/accommodation/v1/property_types.proto | 4 ++++ proto/cmp/services/accommodation/v2/info.proto | 4 ++++ proto/cmp/services/accommodation/v2/list.proto | 4 ++++ proto/cmp/services/accommodation/v2/property_types.proto | 4 ++++ proto/cmp/services/activity/v1/activity_types.proto | 8 ++++++++ proto/cmp/services/activity/v1/info.proto | 4 ++++ proto/cmp/services/activity/v1/list.proto | 4 ++++ proto/cmp/services/activity/v2/activity_types.proto | 8 ++++++++ proto/cmp/services/activity/v2/info.proto | 4 ++++ proto/cmp/services/activity/v2/list.proto | 4 ++++ proto/cmp/services/book/v1/mint.proto | 8 ++++++++ proto/cmp/services/book/v2/mint.proto | 8 ++++++++ proto/cmp/services/info/v1/entry_requirements.proto | 4 ++++ proto/cmp/services/info/v2/entry_requirements.proto | 4 ++++ proto/cmp/services/insurance/v1/info.proto | 4 ++++ proto/cmp/services/insurance/v1/insurance_types.proto | 4 ++++ proto/cmp/services/insurance/v1/list.proto | 4 ++++ proto/cmp/services/ping/v1/ping.proto | 8 ++++++++ proto/cmp/services/transport/v1/trip_types.proto | 4 ++++ proto/cmp/services/transport/v2/trip_types.proto | 4 ++++ proto/cmp/types/v1/cancel_policy.proto | 4 ++++ proto/cmp/types/v1/change_policy.proto | 4 ++++ proto/cmp/types/v1/datetime_range.proto | 8 ++++++++ proto/cmp/types/v1/file.proto | 4 ++++ proto/cmp/types/v2/cancel_policy.proto | 4 ++++ proto/cmp/types/v2/change_policy.proto | 4 ++++ proto/cmp/types/v2/file.proto | 4 ++++ 29 files changed, 140 insertions(+) diff --git a/proto/cmp/services/accommodation/v1/info.proto b/proto/cmp/services/accommodation/v1/info.proto index 090725f..964a04c 100644 --- a/proto/cmp/services/accommodation/v1/info.proto +++ b/proto/cmp/services/accommodation/v1/info.proto @@ -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 diff --git a/proto/cmp/services/accommodation/v1/list.proto b/proto/cmp/services/accommodation/v1/list.proto index b11800a..646edb0 100644 --- a/proto/cmp/services/accommodation/v1/list.proto +++ b/proto/cmp/services/accommodation/v1/list.proto @@ -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; } diff --git a/proto/cmp/services/accommodation/v1/property_types.proto b/proto/cmp/services/accommodation/v1/property_types.proto index af57fb1..87d9be0 100644 --- a/proto/cmp/services/accommodation/v1/property_types.proto +++ b/proto/cmp/services/accommodation/v1/property_types.proto @@ -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 diff --git a/proto/cmp/services/accommodation/v2/info.proto b/proto/cmp/services/accommodation/v2/info.proto index 79ab52b..1c6a6d6 100644 --- a/proto/cmp/services/accommodation/v2/info.proto +++ b/proto/cmp/services/accommodation/v2/info.proto @@ -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 diff --git a/proto/cmp/services/accommodation/v2/list.proto b/proto/cmp/services/accommodation/v2/list.proto index 7bb7f02..ad8bdf4 100644 --- a/proto/cmp/services/accommodation/v2/list.proto +++ b/proto/cmp/services/accommodation/v2/list.proto @@ -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; } diff --git a/proto/cmp/services/accommodation/v2/property_types.proto b/proto/cmp/services/accommodation/v2/property_types.proto index d098ded..7b7c41a 100644 --- a/proto/cmp/services/accommodation/v2/property_types.proto +++ b/proto/cmp/services/accommodation/v2/property_types.proto @@ -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 diff --git a/proto/cmp/services/activity/v1/activity_types.proto b/proto/cmp/services/activity/v1/activity_types.proto index 17322b5..246dd86 100644 --- a/proto/cmp/services/activity/v1/activity_types.proto +++ b/proto/cmp/services/activity/v1/activity_types.proto @@ -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 @@ -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 diff --git a/proto/cmp/services/activity/v1/info.proto b/proto/cmp/services/activity/v1/info.proto index 0520c2e..ab7e636 100644 --- a/proto/cmp/services/activity/v1/info.proto +++ b/proto/cmp/services/activity/v1/info.proto @@ -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 diff --git a/proto/cmp/services/activity/v1/list.proto b/proto/cmp/services/activity/v1/list.proto index f09e455..788bda4 100644 --- a/proto/cmp/services/activity/v1/list.proto +++ b/proto/cmp/services/activity/v1/list.proto @@ -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; } diff --git a/proto/cmp/services/activity/v2/activity_types.proto b/proto/cmp/services/activity/v2/activity_types.proto index 8fb1170..60bf07c 100644 --- a/proto/cmp/services/activity/v2/activity_types.proto +++ b/proto/cmp/services/activity/v2/activity_types.proto @@ -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 @@ -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 diff --git a/proto/cmp/services/activity/v2/info.proto b/proto/cmp/services/activity/v2/info.proto index df8c105..16bcc60 100644 --- a/proto/cmp/services/activity/v2/info.proto +++ b/proto/cmp/services/activity/v2/info.proto @@ -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 diff --git a/proto/cmp/services/activity/v2/list.proto b/proto/cmp/services/activity/v2/list.proto index ac6d743..807782e 100644 --- a/proto/cmp/services/activity/v2/list.proto +++ b/proto/cmp/services/activity/v2/list.proto @@ -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; } diff --git a/proto/cmp/services/book/v1/mint.proto b/proto/cmp/services/book/v1/mint.proto index 7a93a39..7a62654 100644 --- a/proto/cmp/services/book/v1/mint.proto +++ b/proto/cmp/services/book/v1/mint.proto @@ -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 @@ -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 diff --git a/proto/cmp/services/book/v2/mint.proto b/proto/cmp/services/book/v2/mint.proto index 2e6654d..bd9f32e 100644 --- a/proto/cmp/services/book/v2/mint.proto +++ b/proto/cmp/services/book/v2/mint.proto @@ -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 @@ -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 diff --git a/proto/cmp/services/info/v1/entry_requirements.proto b/proto/cmp/services/info/v1/entry_requirements.proto index 7a496fc..f9a2a42 100644 --- a/proto/cmp/services/info/v1/entry_requirements.proto +++ b/proto/cmp/services/info/v1/entry_requirements.proto @@ -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; } diff --git a/proto/cmp/services/info/v2/entry_requirements.proto b/proto/cmp/services/info/v2/entry_requirements.proto index 28ffd09..e6f3853 100644 --- a/proto/cmp/services/info/v2/entry_requirements.proto +++ b/proto/cmp/services/info/v2/entry_requirements.proto @@ -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; } diff --git a/proto/cmp/services/insurance/v1/info.proto b/proto/cmp/services/insurance/v1/info.proto index 2e937b6..4abe39f 100644 --- a/proto/cmp/services/insurance/v1/info.proto +++ b/proto/cmp/services/insurance/v1/info.proto @@ -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 diff --git a/proto/cmp/services/insurance/v1/insurance_types.proto b/proto/cmp/services/insurance/v1/insurance_types.proto index c2ce976..6993b7f 100644 --- a/proto/cmp/services/insurance/v1/insurance_types.proto +++ b/proto/cmp/services/insurance/v1/insurance_types.proto @@ -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; } diff --git a/proto/cmp/services/insurance/v1/list.proto b/proto/cmp/services/insurance/v1/list.proto index 6212334..6568c88 100644 --- a/proto/cmp/services/insurance/v1/list.proto +++ b/proto/cmp/services/insurance/v1/list.proto @@ -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; } diff --git a/proto/cmp/services/ping/v1/ping.proto b/proto/cmp/services/ping/v1/ping.proto index aac3cb3..19de947 100644 --- a/proto/cmp/services/ping/v1/ping.proto +++ b/proto/cmp/services/ping/v1/ping.proto @@ -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; } @@ -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; } diff --git a/proto/cmp/services/transport/v1/trip_types.proto b/proto/cmp/services/transport/v1/trip_types.proto index 479eca8..686d9b0 100644 --- a/proto/cmp/services/transport/v1/trip_types.proto +++ b/proto/cmp/services/transport/v1/trip_types.proto @@ -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 diff --git a/proto/cmp/services/transport/v2/trip_types.proto b/proto/cmp/services/transport/v2/trip_types.proto index 306cdf9..0ea5799 100644 --- a/proto/cmp/services/transport/v2/trip_types.proto +++ b/proto/cmp/services/transport/v2/trip_types.proto @@ -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 diff --git a/proto/cmp/types/v1/cancel_policy.proto b/proto/cmp/types/v1/cancel_policy.proto index 2b43c2c..a44669c 100644 --- a/proto/cmp/types/v1/cancel_policy.proto +++ b/proto/cmp/types/v1/cancel_policy.proto @@ -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 diff --git a/proto/cmp/types/v1/change_policy.proto b/proto/cmp/types/v1/change_policy.proto index ed38f67..fc8876c 100644 --- a/proto/cmp/types/v1/change_policy.proto +++ b/proto/cmp/types/v1/change_policy.proto @@ -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 diff --git a/proto/cmp/types/v1/datetime_range.proto b/proto/cmp/types/v1/datetime_range.proto index cc998ce..28339cf 100644 --- a/proto/cmp/types/v1/datetime_range.proto +++ b/proto/cmp/types/v1/datetime_range.proto @@ -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; } diff --git a/proto/cmp/types/v1/file.proto b/proto/cmp/types/v1/file.proto index ca974e5..9193378 100644 --- a/proto/cmp/types/v1/file.proto +++ b/proto/cmp/types/v1/file.proto @@ -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; } diff --git a/proto/cmp/types/v2/cancel_policy.proto b/proto/cmp/types/v2/cancel_policy.proto index 28ee10e..bb02f36 100644 --- a/proto/cmp/types/v2/cancel_policy.proto +++ b/proto/cmp/types/v2/cancel_policy.proto @@ -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 diff --git a/proto/cmp/types/v2/change_policy.proto b/proto/cmp/types/v2/change_policy.proto index baada24..c9f2b28 100644 --- a/proto/cmp/types/v2/change_policy.proto +++ b/proto/cmp/types/v2/change_policy.proto @@ -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 diff --git a/proto/cmp/types/v2/file.proto b/proto/cmp/types/v2/file.proto index 217a163..a8a5092 100644 --- a/proto/cmp/types/v2/file.proto +++ b/proto/cmp/types/v2/file.proto @@ -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; }