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:2566
idstringDescription Instance UUID4Players/cortex-typescript-sdk/src/types.ts:2549
isEnabledbooleanDescription Whether this instance is enabled4Players/cortex-typescript-sdk/src/types.ts:2561
pluginIdstringDescription Plugin ID4Players/cortex-typescript-sdk/src/types.ts:2555
projectId?stringDescription Project ID (null = all projects)4Players/cortex-typescript-sdk/src/types.ts:2553
settingsobjectDescription User-configured settings4Players/cortex-typescript-sdk/src/types.ts:2557
tenantIdstringDescription Tenant ID4Players/cortex-typescript-sdk/src/types.ts:2551
updatedAtstringFormat: date-time Description Last update timestamp4Players/cortex-typescript-sdk/src/types.ts:2571

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:2586

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:2530
idstringDescription Instance UUID4Players/cortex-typescript-sdk/src/types.ts:2513
isEnabledbooleanDescription Whether this instance is enabled4Players/cortex-typescript-sdk/src/types.ts:2525
pluginobjectDescription Plugin definition4Players/cortex-typescript-sdk/src/types.ts:2537
plugin.category"moderation" | "analytics" | "automation" | "integration"Description Category4Players/cortex-typescript-sdk/src/types.ts:2454
plugin.description?stringDescription Description4Players/cortex-typescript-sdk/src/types.ts:2444
plugin.eventsstring[]Description Event patterns Example [ "message.created" ]4Players/cortex-typescript-sdk/src/types.ts:2461
plugin.icon?stringDescription Heroicons icon name Example heroicons_outline:shield-check4Players/cortex-typescript-sdk/src/types.ts:2483
plugin.idstringDescription Plugin UUID4Players/cortex-typescript-sdk/src/types.ts:2432
plugin.isActivebooleanDescription Whether plugin is available4Players/cortex-typescript-sdk/src/types.ts:2485
plugin.namestringDescription Display name Example Profanity Filter4Players/cortex-typescript-sdk/src/types.ts:2442
plugin.outputAnnotationType?"profanity" | "summary" | "action_items" | "sentiment"Description Output annotation type4Players/cortex-typescript-sdk/src/types.ts:2466
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:2478
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:2473
plugin.settingsSchema?object[]Description Settings schema4Players/cortex-typescript-sdk/src/types.ts:2468
plugin.slugstringDescription URL-friendly identifier Example profanity-filter4Players/cortex-typescript-sdk/src/types.ts:2437
plugin.versionstringDescription Semantic version Example 1.0.04Players/cortex-typescript-sdk/src/types.ts:2449
pluginIdstringDescription Plugin ID4Players/cortex-typescript-sdk/src/types.ts:2519
projectId?stringDescription Project ID (null = all projects)4Players/cortex-typescript-sdk/src/types.ts:2517
settingsobjectDescription User-configured settings4Players/cortex-typescript-sdk/src/types.ts:2521
tenantIdstringDescription Tenant ID4Players/cortex-typescript-sdk/src/types.ts:2515
updatedAtstringFormat: date-time Description Last update timestamp4Players/cortex-typescript-sdk/src/types.ts:2535

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:2566
idstringDescription Instance UUID4Players/cortex-typescript-sdk/src/types.ts:2549
isEnabledbooleanDescription Whether this instance is enabled4Players/cortex-typescript-sdk/src/types.ts:2561
pluginIdstringDescription Plugin ID4Players/cortex-typescript-sdk/src/types.ts:2555
projectId?stringDescription Project ID (null = all projects)4Players/cortex-typescript-sdk/src/types.ts:2553
settingsobjectDescription User-configured settings4Players/cortex-typescript-sdk/src/types.ts:2557
tenantIdstringDescription Tenant ID4Players/cortex-typescript-sdk/src/types.ts:2551
updatedAtstringFormat: date-time Description Last update timestamp4Players/cortex-typescript-sdk/src/types.ts:2571

Defined in

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