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.

Action #

Copied to clipboard!
import { JSONObject, RequestPayload } from "kuzzle";
export type ActionApi = {
  /**
    * Action type
    */
  type: "api";
  /**
    * Request payload to execute
    */
  request: RequestPayload;
};
export type ActionTask = {
  /**
    * Action type
    */
  type: "task";
  /**
    * Task name to execute
    */
  name?: string;
  /**
    * Task custom arguments
    */
  args?: JSONObject;
};
export type ActionRule = {
  /**
    * Action type
    */
  type: "rule";
  /**
    * Rule ID to execute
    *
    */
  name: string;
  /**
    * Additional arguments to pass to the rule
    */
  args?: JSONObject;
};
export type ActionRuleGroup = {
  /**
    * Action type
    */
  type: "rule-group";
  /**
    * Group of rules to execute
    */
  name: string;
};
export type ActionPredicate = {
  /**
    * Action type
    */
  type: "predicate";
  /**
    * Predicate name to verify
    *
    */
  name: string;
  /**
    * Predicate custom arguments
    */
  args?: JSONObject;
};
export type Action =
  | ActionApi
  | ActionPredicate
  | ActionTask
  | ActionRule
  | ActionRuleGroup;