Skip to main content

Class: PluginInstanceManager

Manages plugin instances (installations) for a project.

Constructors

new PluginInstanceManager()

new PluginInstanceManager(ctx, projectId): PluginInstanceManager

Internal

Parameters

ParameterType
ctxClientContext
projectIdstring

Returns

PluginInstanceManager

Defined in

4Players/cortex-typescript-sdk/src/resources/plugins.ts:82

Methods

create()

create(body): Promise<object>

Install a plugin for this project

Parameters

ParameterTypeDescription
bodyobjectPlugin installation payload
body.pluginIdstringDescription Plugin ID to activate
body.settings?objectDescription Initial settings

Returns

Promise<object>

Created plugin instance

NameTypeDescriptionDefined in
createdAtstringFormat: date-time Description Creation timestamp4Players/cortex-typescript-sdk/src/types.ts:2328
idstringDescription Instance UUID4Players/cortex-typescript-sdk/src/types.ts:2311
isEnabledbooleanDescription Whether this instance is enabled4Players/cortex-typescript-sdk/src/types.ts:2323
pluginIdstringDescription Plugin ID4Players/cortex-typescript-sdk/src/types.ts:2317
projectId?stringDescription Project ID (null = all projects)4Players/cortex-typescript-sdk/src/types.ts:2315
settingsobjectDescription User-configured settings4Players/cortex-typescript-sdk/src/types.ts:2319
tenantIdstringDescription Tenant ID4Players/cortex-typescript-sdk/src/types.ts:2313
updatedAtstringFormat: date-time Description Last update timestamp4Players/cortex-typescript-sdk/src/types.ts:2333

Defined in

4Players/cortex-typescript-sdk/src/resources/plugins.ts:105


delete()

delete(instanceId): Promise<object>

Uninstall a plugin instance

Parameters

ParameterTypeDescription
instanceIdstringPlugin instance ID

Returns

Promise<object>

Deletion confirmation

NameTypeDescriptionDefined in
messagestringDescription Status message Example Plugin instance deleted4Players/cortex-typescript-sdk/src/types.ts:2348

Defined in

4Players/cortex-typescript-sdk/src/resources/plugins.ts:148


get()

get(instanceId): Promise<object>

Get a plugin instance by ID

Parameters

ParameterTypeDescription
instanceIdstringPlugin instance ID

Returns

Promise<object>

Plugin instance with plugin details

NameTypeDescriptionDefined in
createdAtstringFormat: date-time Description Creation timestamp4Players/cortex-typescript-sdk/src/types.ts:2292
idstringDescription Instance UUID4Players/cortex-typescript-sdk/src/types.ts:2275
isEnabledbooleanDescription Whether this instance is enabled4Players/cortex-typescript-sdk/src/types.ts:2287
pluginobjectDescription Plugin definition4Players/cortex-typescript-sdk/src/types.ts:2299
plugin.category"moderation" | "analytics" | "automation" | "integration"Description Category4Players/cortex-typescript-sdk/src/types.ts:2216
plugin.description?stringDescription Description4Players/cortex-typescript-sdk/src/types.ts:2206
plugin.eventsstring[]Description Event patterns Example [ "message.created" ]4Players/cortex-typescript-sdk/src/types.ts:2223
plugin.icon?stringDescription Heroicons icon name Example heroicons_outline:shield-check4Players/cortex-typescript-sdk/src/types.ts:2245
plugin.idstringDescription Plugin UUID4Players/cortex-typescript-sdk/src/types.ts:2194
plugin.isActivebooleanDescription Whether plugin is available4Players/cortex-typescript-sdk/src/types.ts:2247
plugin.namestringDescription Display name Example Profanity Filter4Players/cortex-typescript-sdk/src/types.ts:2204
plugin.outputAnnotationType?"profanity" | "summary" | "action_items" | "sentiment"Description Output annotation type4Players/cortex-typescript-sdk/src/types.ts:2228
plugin.pricingUrl?stringDescription Pricing page URL for the tied Payment product, shown in the install cost-acceptance notice. Example https://odin.4players.io/pricing4Players/cortex-typescript-sdk/src/types.ts:2240
plugin.productSlug?stringDescription Payment product slug this plugin activates (set = paid plugin). When present, installing/enabling the plugin activates this product and disabling/uninstalling deactivates it. Example amanda4Players/cortex-typescript-sdk/src/types.ts:2235
plugin.settingsSchema?object[]Description Settings schema4Players/cortex-typescript-sdk/src/types.ts:2230
plugin.slugstringDescription URL-friendly identifier Example profanity-filter4Players/cortex-typescript-sdk/src/types.ts:2199
plugin.versionstringDescription Semantic version Example 1.0.04Players/cortex-typescript-sdk/src/types.ts:2211
pluginIdstringDescription Plugin ID4Players/cortex-typescript-sdk/src/types.ts:2281
projectId?stringDescription Project ID (null = all projects)4Players/cortex-typescript-sdk/src/types.ts:2279
settingsobjectDescription User-configured settings4Players/cortex-typescript-sdk/src/types.ts:2283
tenantIdstringDescription Tenant ID4Players/cortex-typescript-sdk/src/types.ts:2277
updatedAtstringFormat: date-time Description Last update timestamp4Players/cortex-typescript-sdk/src/types.ts:2297

Defined in

4Players/cortex-typescript-sdk/src/resources/plugins.ts:119


list()

list(): Promise<object[]>

List installed plugin instances

Returns

Promise<object[]>

Array of plugin instances with plugin details

Defined in

4Players/cortex-typescript-sdk/src/resources/plugins.ts:91


update()

update(instanceId, body): Promise<object>

Update a plugin instance

Parameters

ParameterTypeDescription
instanceIdstringPlugin instance ID
bodyobjectUpdated settings
body.isEnabled?booleanDescription Enable/disable the instance
body.settings?objectDescription Updated settings

Returns

Promise<object>

Updated plugin instance

NameTypeDescriptionDefined in
createdAtstringFormat: date-time Description Creation timestamp4Players/cortex-typescript-sdk/src/types.ts:2328
idstringDescription Instance UUID4Players/cortex-typescript-sdk/src/types.ts:2311
isEnabledbooleanDescription Whether this instance is enabled4Players/cortex-typescript-sdk/src/types.ts:2323
pluginIdstringDescription Plugin ID4Players/cortex-typescript-sdk/src/types.ts:2317
projectId?stringDescription Project ID (null = all projects)4Players/cortex-typescript-sdk/src/types.ts:2315
settingsobjectDescription User-configured settings4Players/cortex-typescript-sdk/src/types.ts:2319
tenantIdstringDescription Tenant ID4Players/cortex-typescript-sdk/src/types.ts:2313
updatedAtstringFormat: date-time Description Last update timestamp4Players/cortex-typescript-sdk/src/types.ts:2333

Defined in

4Players/cortex-typescript-sdk/src/resources/plugins.ts:134