Skip to main content

Get plugin ability configuration

Suitable EnviromentSaaS
Private Deployment

Requirements​

ONES
v3.6.0+

Overview​

The plugin can obtain the ability configuration information through this ability.

The ability configuration is located in the plugin configuration file plugin.yaml

Usage​

Step1:Installing dependencies​

Enter the backend directory of the plugin project, and execute the following command for dependent installation:

npm i @ones-op/node-ability

Step2:Get ability configuration information​

Obtain the ability configuration information through the getAbilityConfig method

import { getAbilityConfig } from '@ones-op/node-ability'

const response = await getAbilityConfig()

This ability allows you to obtain the specified ability configuration information by abilityID.

info

The abilityID can be obtained in the plugin configuration file plugin.yaml

import { getAbilityConfig } from '@ones-op/node-ability'

const teamUUID = 'xxx'
const response = await getAbilityConfig(abilityID, teamUUID)

SDK​

reference: @ones-op/node-ability