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

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

RuleContent #

Copied to clipboard!
import { JSONObject } from 'kuzzle';
import { Action } from './index';
export type RuleContent = {
  /**
    *  Rule name
    */
  name: string;
  /**
    *  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[];
  /**
    * Kuzzle metadata
    */
  _kuzzle_info?: {
    author?: string,
    createdAt?: number,
    updater?: string | null,
    updatedAt?: number | null
  };
};