corvix.web.rule_snippets¶
Prefilled ignore-rule snippet generation for a notification.
Backs the GET /api/v1/notifications/{account_id}/{thread_id}/rule-snippets
route: given a stored notification record, it renders ready-to-paste YAML
snippets for dashboard-scoped ignores and global excludes, optionally including
enrichment-context predicates.
Functions¶
Compute and return the typed rule-snippets payload. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Module Contents¶
- corvix.web.rule_snippets._notification_rule_snippets_impl(account_id: str, thread_id: str, dashboard: str | None = None) corvix.web.schemas.RuleSnippetsResponse[source][source]¶
Compute and return the typed rule-snippets payload.
- corvix.web.rule_snippets._find_record(*, records: list[corvix.domain.NotificationRecord], account_id: str, thread_id: str) corvix.domain.NotificationRecord | None[source][source]¶
- corvix.web.rule_snippets._rule_name_for_record(record: corvix.domain.NotificationRecord) str[source][source]¶
- corvix.web.rule_snippets._rule_match_lines(*, record: corvix.domain.NotificationRecord, include_context: Literal[False]) list[str][source][source]¶
- corvix.web.rule_snippets._rule_match_lines(*, record: corvix.domain.NotificationRecord, include_context: Literal[True]) list[str] | None
- corvix.web.rule_snippets._context_predicate_lines(*, record: corvix.domain.NotificationRecord) list[str][source][source]¶
- corvix.web.rule_snippets._context_path_value(*, context: collections.abc.Mapping[str, object], path: str) tuple[bool, object | None][source][source]¶
- corvix.web.rule_snippets._dashboard_ignore_rule_snippet(match_lines: list[str]) str[source][source]¶
- corvix.web.rule_snippets._global_exclude_rule_snippet(*, record: corvix.domain.NotificationRecord, match_lines: list[str]) str[source][source]¶