diff --git a/apps/api_web/lib/api_web/controllers/alert_controller.ex b/apps/api_web/lib/api_web/controllers/alert_controller.ex index c210d56e..ab27858c 100644 --- a/apps/api_web/lib/api_web/controllers/alert_controller.ex +++ b/apps/api_web/lib/api_web/controllers/alert_controller.ex @@ -401,7 +401,7 @@ defmodule ApiWeb.AlertController do closed_timestamp( nullable(%Schema{type: :string, format: :"date-time"}, true), - "If the alert has been closed and an all clear notification should be sent, the time at which the alert was closed.", + "The time at which the alert was closed.", example: "2025-08-17T11:21:00-04:00" ) @@ -474,7 +474,7 @@ defmodule ApiWeb.AlertController do last_push_notification_timestamp( nullable(%Schema{type: :string, format: :"date-time"}, true), - "The most recent time at which the alert changed significantly enough that a notification should be sent.", + "The most recent time at which the alert changed significantly enough that a notification should be sent. When this matches closed_timestamp, an \"All Clear\" notification should be sent.", example: "2025-08-17T11:23:00-04:00" ) @@ -613,11 +613,11 @@ defmodule ApiWeb.AlertController do There are 3 notifications related attributes - | JSON pointer | Description | - |-----------------------------------------------------------------|-----------------------------------------------------| - | `#{parent_pointer}/attributes/closed_timestamp` | Time to send an all clear notification | - | `#{parent_pointer}/attributes/last_push_notification_timestamp` | Time to send a new or updated alert notification | - | `#{parent_pointer}/attributes/reminder_times` | Times to send upcoming alert reminder notifications | + | JSON pointer | Description | + |-----------------------------------------------------------------|-------------------------------------------------------------------------------------------------------| + | `#{parent_pointer}/attributes/closed_timestamp` | Time the alert was closed. | + | `#{parent_pointer}/attributes/last_push_notification_timestamp` | Time to send a new or updated alert notification. Send an "all clear" if equal to closed_timestamp. | + | `#{parent_pointer}/attributes/reminder_times` | Times to send upcoming alert reminder notifications | """ end diff --git a/apps/model/lib/model/alert.ex b/apps/model/lib/model/alert.ex index dee0e384..1307f652 100644 --- a/apps/model/lib/model/alert.ex +++ b/apps/model/lib/model/alert.ex @@ -253,7 +253,7 @@ defmodule Model.Alert do * `:active_period` - See `t:datetime_pair/0` for individual entries in list. * `:banner` - Set if alert is meant to be displayed prominently, such as the top of every page. * `:cause` - Cause of the alert. See `t:cause/0` for all names and values. - * `:closed_timestamp` - If the alert has been closed and an all clear notification should be sent, the time at which the alert was closed. + * `:closed_timestamp` - The time at which the alert was closed. * `:create` - When the alert was created, which is completely unrelarted to the `active_period`s. * `:description` - This plain-text string will be formatted as the body of the alert (or shown on an explicit "expand" request by the user). The information in the description should add to the information of the header. See @@ -269,6 +269,7 @@ defmodule Model.Alert do * `:informed_entity` - Entities whose users we should notify of this alert. See [GTFS Realtime `FeedMessage` `FeedEntity` `Alert` `informed_entity`](https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/reference.md#message-alert) * `:last_push_notification_timestamp` - The most recent time at which the alert changed significantly enough that a notification should be sent. + When this matches `closed_timestamp`, an \"All Clear\" notification should be sent * `:lifecycle` - Enumeration of where the alert is in its lifecycle. See `t:lifecycle/0`. * `:reminder_times` - Times at which a reminder notification should be sent. * `:service_effect` - Summarizes the service and the impact to that service.