feat(notifications): add support for included topics

this can be used to configure processors to only process notifications
that contain specific topics. if notification does not have a topic and
included topics are configured, the notification will not get processed
by the specific processor. this is mainly for the email processor but
can be used by other processors as well.

closes #32497

Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
This commit is contained in:
Hellgren Heikki
2026-01-29 15:19:49 +02:00
parent dbd5e7a614
commit e9eb400f9c
7 changed files with 150 additions and 9 deletions
@@ -64,6 +64,7 @@ export type NotificationProcessorFilters = {
minSeverity?: NotificationSeverity;
maxSeverity?: NotificationSeverity;
excludedTopics?: string[];
includedTopics?: string[];
};
// @public (undocumented)
@@ -43,5 +43,8 @@ export const getProcessorFiltersFromConfig = (config: Config) => {
filter.excludedTopics = config.getOptionalStringArray(
'filter.excludedTopics',
);
filter.includedTopics = config.getOptionalStringArray(
'filter.includedTopics',
);
return filter;
};
@@ -130,6 +130,7 @@ export type NotificationProcessorFilters = {
minSeverity?: NotificationSeverity;
maxSeverity?: NotificationSeverity;
excludedTopics?: string[];
includedTopics?: string[];
};
/**