Skip to content

Class: SlackNotifierAdapter ​

Defined in: slack/src/executors/slack-notifier-adapter.ts:17

One-way notify-only Slack incoming webhook HumanAdapter (slack:notifier).

Delivers outbound notifications via transport.postWebhook and rejects any attempt to invoke interactive requestDecision prompts on a 'notify-only' channel.

Implements ​

Constructors ​

Constructor ​

ts
new SlackNotifierAdapter(
   node, 
   ctx, 
   transport?
): SlackNotifierAdapter;

Defined in: slack/src/executors/slack-notifier-adapter.ts:36

Initializes a SlackNotifierAdapter bound to node, ctx, and transport.

Resolves node.webhookUrl lazily on each notify() call via ctx.resolveEnv.

Parameters ​

ParameterTypeDefault valueDescription
nodeSlackNotifierNodeundefinedPassive Slack notifier AST node.
ctxRuntimeDriverContextundefinedRuntime driver context.
transport?SlackTransportdefaultSlackTransportPluggable Slack transport.

Returns ​

SlackNotifierAdapter

Methods ​

notify() ​

ts
notify(message): Promise<void>;

Defined in: slack/src/executors/slack-notifier-adapter.ts:57

Sends a one-way notification message to node.webhookUrl.

Resolves webhookUrl from ctx.resolveEnv before invoking transport.postWebhook.

Parameters ​

ParameterTypeDescription
messagestringFormatted notification text to deliver.

Returns ​

Promise<void>

Resolves once the incoming webhook POST completes.

Throws ​

If webhookUrl resolution fails or the webhook HTTP request fails.

Implementation of ​

HumanAdapter.notify


requestDecision() ​

ts
requestDecision<TRequest, TResponse>(req): Promise<TResponse>;

Defined in: slack/src/executors/slack-notifier-adapter.ts:80

Rejects interactive decision requests on a one-way 'notify-only' Slack webhook channel.

Enforces at runtime the same 'notify-only' invariant verified statically by @paraharness/core.

Type Parameters ​

Type ParameterDescription
TRequestRequest brief payload type.
TResponseValidated response payload type.

Parameters ​

ParameterTypeDescription
reqHumanDecisionRequest<TRequest, TResponse>Attempted decision request.

Returns ​

Promise<TResponse>

Always rejects with an actionable domain error.

Throws ​

Always throws because 'notify-only' channels cannot service interactive decisions.

Implementation of ​

HumanAdapter.requestDecision

Released under the MIT License.