diff --git a/CHANGELOG.md b/CHANGELOG.md index a2983f5..d60b20f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog Hiber API +### 0.156 (2023-06-26) + +##### StatusService + +- Removed the outdated status service; it was no longer in use and used the old health. + +##### ModemService + +- Fix a bug where `connected_to_gateway` was not set on modem when showing child organizations. + +##### UserService + +- Invites now expire after 30 days. + - This has also been applied to existing invites. + ### 0.155 (2023-06-19) - Refactored encryption logic to allow us to more easily improve encryption (i.e. switching algorithms) in the future diff --git a/docs/html/message.html b/docs/html/message.html index e3936a6..bdf2c58 100644 --- a/docs/html/message.html +++ b/docs/html/message.html @@ -1813,6 +1813,13 @@

MessageSelection

Filter message by time range. This field is required, to limit the amount of messages.

+ + modem_message_ids + int64 + repeated +

Include messages by id

+ + override_time_range_with_modem_time_zone bool diff --git a/docs/md/message.md b/docs/md/message.md index edc434f..0ceee3d 100644 --- a/docs/md/message.md +++ b/docs/md/message.md @@ -388,6 +388,7 @@ Filter messages by modem and time sent (note that this is not the time the messa | ----- | ---- | ----------- | | modem_selection | [ hiber.modem.ModemSelection](#hibermodemmodemselection) | Select the modems to return messages for. | | time_range | [ hiber.TimeRange](#hibertimerange) | Filter message by time range. This field is required, to limit the amount of messages. | +| modem_message_ids | [repeated int64](#int64) | Include messages by id | | override_time_range_with_modem_time_zone | [ bool](#bool) | Replace whatever time zone was specified in the start and end time with the modem time zone. This means you may get values outside of the original time range, but can be useful when requesting data for a date, for example. For example: start.textual = 2022-01-01, end.textual = 2022-02-01 would return a month of data in UTC time. When combined with this flag, it would return that month of data in the time zone of the modem, which may even be different per modem. | diff --git a/event-json-examples/modem-alarm.json b/event-json-examples/modem-alarm.json index c1b7991..c020f00 100644 --- a/event-json-examples/modem-alarm.json +++ b/event-json-examples/modem-alarm.json @@ -27,7 +27,7 @@ } ], "title": "Expected battery to be within 20..100%, but it is now at 15%!", - "description": "In organization your-organization modem AAAA AAAA has failed the following checks:\n\n- example-check-id: Expected battery to be within 20..100%, but it is now at 15%!\n\nThe error messages were produced by alarm example-identifier: example\n\nwell: example-tag, example-tag-2", + "description": "In organization Your Organization (your-organization) modem AAAA AAAA has failed the following checks:\n\n- example-check-id: Expected battery to be within 20..100%, but it is now at 15%!\n\nThe error messages were produced by alarm example-identifier: example\n\nwell: example-tag, example-tag-2", "time": { "timestamp": "2020-06-01T05:15:25.355Z", "textual": "2020-06-01T05:15:25.355Z", @@ -61,7 +61,7 @@ "severity": "3" }, "title": "Expected battery to be within 20..100%, but it is now at 15%!", - "description": "In organization your-organization modem AAAA AAAA has failed the following checks:\n\n- example-check-id: Expected battery to be within 20..100%, but it is now at 15%!\n\nThe error messages were produced by alarm example-identifier: example\n\nwell: example-tag, example-tag-2", + "description": "In organization Your Organization (your-organization) modem AAAA AAAA has failed the following checks:\n\n- example-check-id: Expected battery to be within 20..100%, but it is now at 15%!\n\nThe error messages were produced by alarm example-identifier: example\n\nwell: example-tag, example-tag-2", "modem": { "number": "AAAA AAAA", "name": "AAAA AAAA", diff --git a/message.proto b/message.proto index a69b1bb..0cb3f72 100644 --- a/message.proto +++ b/message.proto @@ -132,6 +132,9 @@ message MessageSelection { /* Filter message by time range. This field is required, to limit the amount of messages. */ TimeRange time_range = 2; + /* Include messages by id */ + repeated int64 modem_message_ids = 4; + /* Replace whatever time zone was specified in the start and end time with the modem time zone. * This means you may get values outside of the original time range, but can be useful when requesting * data for a date, for example. diff --git a/status.proto b/status.proto deleted file mode 100644 index 5aeee28..0000000 --- a/status.proto +++ /dev/null @@ -1,141 +0,0 @@ -syntax = "proto3"; - -package hiber.status; - -import "base.proto"; -import "publisher.proto"; - -option java_multiple_files = false; -option java_package = "global.hiber.api.grpc.status"; -option java_outer_classname = "StatusApi"; -option go_package = "hiber"; - -/* Service to get the status of the hiber network - */ -service StatusService { - rpc Status (StatusRequest) returns (StatusRequest.Response); - - rpc UnhealthyModems (UnhealthyModems.Request) returns (UnhealthyModems.Response); - rpc UnhealthyPublishers (UnhealthyPublishers.Request) returns (UnhealthyPublishers.Response); -} - -message NetworkStatus { - Health health = 1; - string message = 2; - Timestamp last_updated = 3; -} - -message AreaStatus { - Area area = 1; - Health health = 2; - string message = 3; - Timestamp last_updated = 4; -} - -message OrganizationStatus { - message ModemStatus { - string modem_number = 1; - Health health = 2 [deprecated = true]; - repeated string messages = 3; - } - - message PublisherStatus { - int64 publisher_id = 1; - Health health = 2; - hiber.publisher.Publisher.Type publisher_type = 4; - repeated string messages = 3; - } - - /* Organization health, based on the values below. */ - Health health = 1; - - /* Health for modems, based on the most severe state for all your modems. */ - Health modems = 2; - - /* Health for publishers, based on the most severe state for all your publishers. */ - Health publishers = 3; - - /* A detailed list of modems with a non-OK status. - * Deprecated: is filled with the paginated response from relevant_modems_response. - */ - repeated ModemStatus relevant_modems = 4 [deprecated = true]; - - /* Pagination result for any the relevant modems. */ - UnhealthyModems.Response relevant_modems_response = 6; - - /* A detailed list of publishers with a non-OK status. - * Deprecated: is filled with the paginated response from relevant_publishers_response. - */ - repeated PublisherStatus relevant_publishers = 5 [deprecated = true]; - - /* Pagination result for any the relevant publishers. */ - UnhealthyPublishers.Response relevant_publishers_response = 7; -} - -message StatusRequest { - message Response { - StatusRequest request = 1; - - /* Areas of the globe that have a non-OK status, i.e. regions where coverage is hindered by external forces. */ - repeated AreaStatus global_areas = 4; - - /* Status for your organization, i.e. whether you have modems that are having trouble, or failed publishers. */ - OrganizationStatus organization = 5; - - /* Status for the server. Generally only used when the server is in read-only mode for maintenance. */ - NetworkStatus server = 6; - - reserved 2, 3; - } - - /* Pick the organization to use (/impersonate). If unset, your default organization is used. */ - string organization = 1; - - /* Whether to include a detailed list of modems with a non-OK status. */ - bool include_modems = 2; - - /* Whether to include a detailed list of modems with a non-OK status, with the given request. - * Note that organization should match this request's organization or be omitted. - * Only used when include_modems is true. - */ - UnhealthyModems.Request include_modems_request = 4; - - /* Whether to include a detailed list of publishers with a non-OK status. */ - bool include_publishers = 3; - - /* Whether to include a detailed list of publishers with a non-OK status, with the given request. - * Note that organization should match this request's organization or be omitted. - * Only used when include_publishers is true. - */ - UnhealthyPublishers.Request include_publishers_request = 5; -} - -message UnhealthyModems { - message Request { - /* Pick the organization to use (/impersonate). If unset, your default organization is used. */ - string organization = 1; - Pagination pagination = 2; - } - - message Response { - /* A detailed list of modems with a non-OK status. */ - repeated OrganizationStatus.ModemStatus unhealthy_modems = 1; - Pagination.Result pagination = 2; - Request request = 3; - } -} - -message UnhealthyPublishers { - message Request { - /* Pick the organization to use (/impersonate). If unset, your default organization is used. */ - string organization = 1; - Pagination pagination = 2; - } - - message Response { - /* A detailed list of publishers with a non-OK status. */ - repeated OrganizationStatus.PublisherStatus unhealthy_publishers = 1; - Pagination.Result pagination = 2; - Request request = 3; - } -}