Hierarchy (view full)

Constructors

Methods

  • Deactivates smart rule for given entities list.

    Parameters

    • rule: Partial<IRule>

      Smart rule managed object.

    • entitiesOrIdsList: IdReference[]

      List of entities or Id of the ManagedObjects.

    Returns Promise<IResult<IRule>>

    Response wrapped in [[IResult]]

    Example


    const rule: IRule = {id: '1', enabledSources: ['2', '3'],...};
    const entityOrIdList: IdReference[] = ['2'];
    (async () => {
    const {data, res} = await smartRulesService.bulkDeactivateEnabledSources(rule, entityOrIdList);
    })();
  • Checks if the smart rules microservice is subscribed and available to user.

    Example


    (async () => {
    const isAvailable = await smartRulesService.isMicroserviceAvailable();
    })();

    Returns Promise<boolean>

  • Updates smart rule.

    Parameters

    • rule: Partial<IRule>

      Smart rule managed object.

    Returns Promise<IResult<IRule>>

    Response wrapped in [[IResult]]

    Example


    const rule: IRule = {id: '1', enabledSources: ['2', '3'],...};
    (async () => {
    const {data, res} = await smartRulesService.updateSmartRule(rule);
    })();