(
mr/def
::Notification
"Schema for the notification."
[
:merge
#_
[
:map
[
:payload_type
(
into
[
:enum
]
models.notification/notification-types
)
]
[
:id
{
:optional
true
}
[
:maybe
ms/PositiveInt
]
]
[
:active
{
:optional
true
}
:boolean
]
[
:created_at
{
:optional
true
}
:any
]
[
:updated_at
{
:optional
true
}
:any
]
[
:subscriptions
{
:optional
true
}
[
:sequential
::models.notification/NotificationSubscription
]
]
]
[
:multi
{
:dispatch
:payload_type
}
[
:notification/system-event
[
:map
[
:payload
[
:map
{
:closed
true
}
[
:event_topic
[
:fn
#(
=
"event"
(
->
%
keyword
namespace
)
)
]
]
[
:event_info
[
:maybe
:map
]
]
]
]
]
]
[
:notification/card
[
:map
[
:payload
{
:optional
true
}
::models.notification/NotificationCard
]
[
:creator_id
ms/PositiveInt
]
]
]
[
:notification/dashboard
[
:map
[
:creator_id
ms/PositiveInt
]
[
:dashboard_subscription
#_
[
:map
[
:dashboard_id
ms/PositiveInt
]
[
:parameters
{
:optional
true
}
[
:maybe
[
:sequential
:map
]
]
]
[
:dashboard_subscription_dashcards
{
:optional
true
}
[
:sequential
[
:map
[
:card_id
[
:maybe
ms/PositiveInt
]
]
[
:include_csv
{
:optional
true
}
[
:maybe
ms/BooleanValue
]
]
[
:include_xls
{
:optional
true
}
[
:maybe
ms/BooleanValue
]
]
[
:format_rows
{
:optional
true
}
[
:maybe
ms/BooleanValue
]
]
[
:pivot_results
{
:optional
true
}
[
:maybe
ms/BooleanValue
]
]
]
]
]
]
]
]
]
[
:notification/testing
:map
]
]
]
)