Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions apps/api_web/lib/api_web/controllers/alert_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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"
)

Expand Down Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion apps/model/lib/model/alert.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
Loading