corvix.web.rule_snippets ======================== .. py:module:: corvix.web.rule_snippets .. autoapi-nested-parse:: 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 --------- .. autoapisummary:: corvix.web.rule_snippets._notification_rule_snippets_impl corvix.web.rule_snippets._find_record corvix.web.rule_snippets._yaml_quoted corvix.web.rule_snippets._yaml_scalar corvix.web.rule_snippets._slug_token corvix.web.rule_snippets._rule_name_for_record corvix.web.rule_snippets._rule_match_lines corvix.web.rule_snippets._context_predicate_lines corvix.web.rule_snippets._anchored_title_regex corvix.web.rule_snippets._context_path_value corvix.web.rule_snippets._dashboard_ignore_rule_snippet corvix.web.rule_snippets._global_exclude_rule_snippet Module Contents --------------- .. py:function:: _notification_rule_snippets_impl(account_id: str, thread_id: str, dashboard: str | None = None) -> corvix.web.schemas.RuleSnippetsResponse Compute and return the typed rule-snippets payload. .. py:function:: _find_record(*, records: list[corvix.domain.NotificationRecord], account_id: str, thread_id: str) -> corvix.domain.NotificationRecord | None .. py:function:: _yaml_quoted(value: str) -> str .. py:function:: _yaml_scalar(value: object) -> str .. py:function:: _slug_token(value: str) -> str .. py:function:: _rule_name_for_record(record: corvix.domain.NotificationRecord) -> str .. py:function:: _rule_match_lines(*, record: corvix.domain.NotificationRecord, include_context: Literal[False]) -> list[str] _rule_match_lines(*, record: corvix.domain.NotificationRecord, include_context: Literal[True]) -> list[str] | None .. py:function:: _context_predicate_lines(*, record: corvix.domain.NotificationRecord) -> list[str] .. py:function:: _anchored_title_regex(title: str) -> str .. py:function:: _context_path_value(*, context: collections.abc.Mapping[str, object], path: str) -> tuple[bool, object | None] .. py:function:: _dashboard_ignore_rule_snippet(match_lines: list[str]) -> str .. py:function:: _global_exclude_rule_snippet(*, record: corvix.domain.NotificationRecord, match_lines: list[str]) -> str