Skip to main content

create

client.contextRuleEngine.create(data: CreateContextRuleRequest): Promise<ContextRuleDefinition>

Creates a new context rule.

Registers a new rule with the system using the provided configuration. The rule can be configured with conditions, priority, and actions to execute when the rule matches.

Parameters​

ParameterTypeRequiredDescription
dataCreateContextRuleRequestYesRequest containing the new rule configuration

Returns​

Promise<ContextRuleDefinition> — A promise that resolves to the created ContextRuleDefinition object

Example​

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.contextRuleEngine.create(/* CreateContextRuleRequest */);
console.log(result);