Official Plugins (Kuzzle v2.x)
Workflows v0.x
2

This plugin is part of the Kuzzle Enterprise Plan. If you are interested, please contact us.

RuleContent #

Copied to clipboard!
import { JSONObject, KDocumentContent } from "kuzzle";
import { Action } from "../types/Action";
export interface RuleContent extends KDocumentContent {
  /**
    *  Rule name in kebab-case
    */
  name: string;
  disabled?: boolean;
  /**
    *  Rule description
    */
  description: string;
  /**
    * If set, this rule belongs to a group.
    */
  group?: string;
  /**
    * Set of Koncorde filters applied to the extracted payload to verify
    * before executing the rule.
    */
  filters?: JSONObject;
  /**
    * Array of predicates to verify
    */
  predicates?: Array<{
    /**
      * Predicate name
      */
    name: string;
    /**
      * Predicate custom arguments
      */
    args?: JSONObject;
  }>;
  /**
    * Actions to execute when the rule is triggered
    */
  actions: Action[];
}