Add notification filters

This commit is contained in:
2026-04-24 20:02:22 +00:00
parent 5f74ddd964
commit c54df44ebe
24 changed files with 1288 additions and 7 deletions
@@ -8,6 +8,10 @@ use Illuminate\Support\Arr;
class StoreProjectNotificationAction
{
public function __construct(
private readonly NormalizeNotificationFilters $normalizeNotificationFilters,
) {}
/**
* @param array{
* channel: mixed,
@@ -15,6 +19,7 @@ class StoreProjectNotificationAction
* delivery_url: string,
* enabled: bool,
* event_type: mixed,
* filters?: mixed,
* message_template?: string|null,
* name: string
* } $validated
@@ -27,6 +32,7 @@ class StoreProjectNotificationAction
'delivery_url' => trim((string) Arr::get($validated, 'delivery_url')),
'enabled' => (bool) Arr::get($validated, 'enabled'),
'event_type' => Arr::get($validated, 'event_type'),
'filters' => $this->normalizeNotificationFilters->handle(Arr::get($validated, 'filters')),
'message_template' => $this->normalizeMessageTemplate(Arr::get($validated, 'message_template')),
'name' => trim((string) Arr::get($validated, 'name')),
]);