UNPKG

matrix-react-sdk

Version:
28 lines (27 loc) 1.04 kB
import { IAnnotatedPushRule, PushRuleAction, RuleId } from "matrix-js-sdk/src/matrix"; import { TranslationKey } from "../languageHandler"; import { VectorState } from "./PushRuleVectorState"; type StateToActionsMap = { [state in VectorState]?: PushRuleAction[]; }; interface IVectorPushRuleDefinition { description: TranslationKey; vectorStateToActions: StateToActionsMap; /** * Rules that should be updated to be kept in sync * when this rule changes */ syncedRuleIds?: (RuleId | string)[]; } declare class VectorPushRuleDefinition { readonly description: TranslationKey; readonly vectorStateToActions: StateToActionsMap; readonly syncedRuleIds?: (RuleId | string)[]; constructor(opts: IVectorPushRuleDefinition); ruleToVectorState(rule: IAnnotatedPushRule): VectorState | undefined; } export type { VectorPushRuleDefinition }; /** * The descriptions of rules managed by the Vector UI. */ export declare const VectorPushRulesDefinitions: Record<string, VectorPushRuleDefinition>;