Skip to main content

Class: PluginCatalog

Manages the global plugin catalog and annotations (not project-scoped).

Constructors

new PluginCatalog()

new PluginCatalog(ctx): PluginCatalog

Internal

Parameters

ParameterType
ctxClientContext

Returns

PluginCatalog

Defined in

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

Methods

get()

get(slug): Promise<object>

Get a plugin by slug

Parameters

ParameterTypeDescription
slugstringPlugin slug (e.g. "profanity-filter")

Returns

Promise<object>

Plugin details

NameTypeDescriptionDefined in
category"moderation" | "analytics" | "automation" | "integration"Description Category4Players/cortex-typescript-sdk/src/types.ts:2454
description?stringDescription Description4Players/cortex-typescript-sdk/src/types.ts:2444
eventsstring[]Description Event patterns Example [ "message.created" ]4Players/cortex-typescript-sdk/src/types.ts:2461
icon?stringDescription Heroicons icon name Example heroicons_outline:shield-check4Players/cortex-typescript-sdk/src/types.ts:2483
idstringDescription Plugin UUID4Players/cortex-typescript-sdk/src/types.ts:2432
isActivebooleanDescription Whether plugin is available4Players/cortex-typescript-sdk/src/types.ts:2485
namestringDescription Display name Example Profanity Filter4Players/cortex-typescript-sdk/src/types.ts:2442
outputAnnotationType?"profanity" | "summary" | "action_items" | "sentiment"Description Output annotation type4Players/cortex-typescript-sdk/src/types.ts:2466
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
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
settingsSchema?object[]Description Settings schema4Players/cortex-typescript-sdk/src/types.ts:2468
slugstringDescription URL-friendly identifier Example profanity-filter4Players/cortex-typescript-sdk/src/types.ts:2437
versionstringDescription Semantic version Example 1.0.04Players/cortex-typescript-sdk/src/types.ts:2449

Defined in

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


getMessageAnnotationsBatch()

getMessageAnnotationsBatch(messageIds): Promise<Record<string, object[]>>

Batch retrieve annotations for multiple messages

Parameters

ParameterTypeDescription
messageIdsstring[]Array of message IDs

Returns

Promise<Record<string, object[]>>

Annotations grouped by message ID

Defined in

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


getSessionAnnotations()

getSessionAnnotations(sessionId): Promise<object[]>

Get annotations for a session

Parameters

ParameterTypeDescription
sessionIdstringSession ID

Returns

Promise<object[]>

Array of session annotations

Defined in

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


list()

list(): Promise<object[]>

List all available plugins in the catalog

Returns

Promise<object[]>

Array of plugins

Defined in

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