From 5c323895982fe75b6179719317c24700ef238457 Mon Sep 17 00:00:00 2001 From: Anatolii Kurotych Date: Tue, 12 Nov 2024 18:50:06 +0200 Subject: [PATCH 1/2] Add fields to gateway_info and gateway_info_stream_req_v1 req --- src/service/mobile_config.proto | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/service/mobile_config.proto b/src/service/mobile_config.proto index e6306ea5..bdbdd9d2 100644 --- a/src/service/mobile_config.proto +++ b/src/service/mobile_config.proto @@ -34,6 +34,12 @@ message gateway_info { gateway_metadata metadata = 2; // the asserted device type of the gateway device_type device_type = 3; + // The unix epoch timestamp (in seconds) + // when the data was read from chain and written to the db + uint64 refreshed_at = 4; + // The unix epoch timestamp (in seconds) + // when the gateway was first added to the database. + uint64 created_at = 5; } message gateway_info_req_v1 { @@ -72,6 +78,11 @@ message gateway_info_stream_req_v1 { // Device types that will be returned in the response // Returns all devices if empty repeated device_type device_types = 4; + // The Unix epoch timestamp (in seconds). + // Filters the response based on the `refreshed_at` field in `gateway_info`. + // Returns only gateways where `refreshed_at` > `min_refreshed_at`. + // Use 0 to fetch all gateways. + uint64 min_refreshed_at = 5; } message gateway_info_stream_res_v1 { From 128ef41209372360c1f205f4e8a44252e18b7eca Mon Sep 17 00:00:00 2001 From: Anatolii Kurotych Date: Wed, 13 Nov 2024 12:26:41 +0200 Subject: [PATCH 2/2] refreshed_at >= min_refreshed_at --- src/service/mobile_config.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service/mobile_config.proto b/src/service/mobile_config.proto index bdbdd9d2..0d354051 100644 --- a/src/service/mobile_config.proto +++ b/src/service/mobile_config.proto @@ -80,7 +80,7 @@ message gateway_info_stream_req_v1 { repeated device_type device_types = 4; // The Unix epoch timestamp (in seconds). // Filters the response based on the `refreshed_at` field in `gateway_info`. - // Returns only gateways where `refreshed_at` > `min_refreshed_at`. + // Returns only gateways where `refreshed_at` >= `min_refreshed_at`. // Use 0 to fetch all gateways. uint64 min_refreshed_at = 5; }