From b4c8c8f47dfff38a2ff1b7fe14e1b2a1beea651c Mon Sep 17 00:00:00 2001 From: Anatolii Kurotych Date: Tue, 17 Dec 2024 18:32:25 +0200 Subject: [PATCH] Changes in `gateway_info_v2` * Change min_refreshed_at => min_updated_at * Remove db service fields from gateway_info_v2 * Add info_batch_v2 endpoint * Add info_v2 endpoint * Add comment to refreshed_at --- src/service/mobile_config.proto | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/service/mobile_config.proto b/src/service/mobile_config.proto index 3211a971..bdc63061 100644 --- a/src/service/mobile_config.proto +++ b/src/service/mobile_config.proto @@ -77,11 +77,8 @@ message gateway_info_v2 { // 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; + uint64 created_at = 4; } message gateway_info_req_v1 { @@ -142,10 +139,9 @@ message gateway_info_stream_req_v2 { // 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; + // Filters the response based on the last time gateway parameter(s) was + // updated. Use 0 to fetch all gateways. + uint64 min_updated_at = 5; } message gateway_info_stream_res_v1 { @@ -352,18 +348,29 @@ message carrier_incentive_promotion_list_res_v1 { service gateway { // Get info for the specified gateway - rpc info(gateway_info_req_v1) returns (gateway_info_res_v1); + rpc info(gateway_info_req_v1) returns (gateway_info_res_v1) { + option deprecated = true; + } // Get info for a batch of gateways specified by public key rpc info_batch(gateway_info_batch_req_v1) - returns (stream gateway_info_stream_res_v1); + returns (stream gateway_info_stream_res_v1) { + option deprecated = true; + } // Get a stream of gateway info rpc info_stream(gateway_info_stream_req_v1) returns (stream gateway_info_stream_res_v1) { option deprecated = true; } + + // V2 + // Get info for the specified gateway (V2) + rpc info_v2(gateway_info_req_v1) returns (gateway_info_res_v2); // Get a stream of gateway info (V2) rpc info_stream_v2(gateway_info_stream_req_v2) returns (stream gateway_info_stream_res_v2); + // Get info for a batch of gateways specified by public key (V2) + rpc info_batch_v2(gateway_info_batch_req_v1) + returns (stream gateway_info_stream_res_v2); } service entity {