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:2216
description?stringDescription Description4Players/cortex-typescript-sdk/src/types.ts:2206
eventsstring[]Description Event patterns Example [ "message.created" ]4Players/cortex-typescript-sdk/src/types.ts:2223
icon?stringDescription Heroicons icon name Example heroicons_outline:shield-check4Players/cortex-typescript-sdk/src/types.ts:2245
idstringDescription Plugin UUID4Players/cortex-typescript-sdk/src/types.ts:2194
isActivebooleanDescription Whether plugin is available4Players/cortex-typescript-sdk/src/types.ts:2247
namestringDescription Display name Example Profanity Filter4Players/cortex-typescript-sdk/src/types.ts:2204
outputAnnotationType?"profanity" | "summary" | "action_items" | "sentiment"Description Output annotation type4Players/cortex-typescript-sdk/src/types.ts:2228
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
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
settingsSchema?object[]Description Settings schema4Players/cortex-typescript-sdk/src/types.ts:2230
slugstringDescription URL-friendly identifier Example profanity-filter4Players/cortex-typescript-sdk/src/types.ts:2199
versionstringDescription Semantic version Example 1.0.04Players/cortex-typescript-sdk/src/types.ts:2211

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