Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: ${{ matrix.node-version }}
- run: npm install --verbose
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
contents: read
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Expand All @@ -48,7 +48,7 @@ jobs:
contents: read
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: ${{ matrix.node-version }}
- name: Checkout bolt-js
Expand Down
2 changes: 0 additions & 2 deletions docs/english/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Below is the current list of methods that accept listener functions. These metho
| `app.action(actionId, fn);` | Listens for an action event from a Block Kit element, such as a user interaction with a button, select menu, or datepicker. The `actionId` identifier is a `string` that should match the unique `action_id` included when your app sends the element to a view. Note that a view can be a message, modal, or app home. Note that action elements included in an `input` block do not trigger any events.
| `app.shortcut(callbackId, fn);` | Listens for global or message shortcut invocation. The `callbackId` is a `string` or `RegExp` that must match a shortcut `callback_id` specified within your app's configuration.
| `app.view(callbackId, fn);` | Listens for `view_submission` and `view_closed` events. `view_submission` events are sent when a user submits a modal that your app opened. `view_closed` events are sent when a user closes the modal rather than submits it.
| `app.step(workflowStep)` | Listen and responds to steps from apps events using the callbacks passed in an instance of `WorkflowStep`. Callbacks include three callbacks: `edit`, `save`, and `execute`. More information on steps from apps can be found [in the documentation](/tools/bolt-js/legacy/steps-from-apps).
| `app.command(commandName, fn);` | Listens for slash command invocations. The `commandName` is a `string` that must match a slash command specified in your app's configuration. Slash command names should be prefaced with a `/` (ex: `/helpdesk`).
| `app.options(actionId, fn);` | Listens for options requests (from select menus with an external data source). This isn't often used, and shouldn't be mistaken with `app.action`. The `actionId` identifier is a `string` that matches the unique `action_id` included when you app sends a [select with an external data source](/reference/block-kit/block-elements/multi-select-menu-element/#external_multi_select).

Expand Down Expand Up @@ -185,7 +184,6 @@ Bolt includes a set of error types to make errors easier to handle, with more sp
| `ReceiverMultipleAckError` | Error thrown within Receiver when your app calls `ack()` when that request has previously been acknowledged. Currently only used in the default `HTTPReceiver`. |
| `ReceiverAuthenticityError` | Error thrown when your app's request signature could not be verified. The error includes information on why it failed, such as an invalid timestamp, missing headers, or invalid signing secret.
| `MultipleListenerError` | Thrown when multiple errors occur when processing multiple listeners for a single event. Includes an `originals` property with an array of the individual errors. |
| `WorkflowStepInitializationError` | Error thrown when configuration options are invalid or missing when instantiating a new `WorkflowStep` instance. This could be scenarios like not including a `callback_id`, or not including a configuration object. More information on steps from apps [can be found in the documentation](/tools/bolt-js/legacy/steps-from-apps). |
| `UnknownError` | An error that was thrown inside the framework but does not have a specified error code. Contains an `original` property with more details. |

:::info
Expand Down
2 changes: 0 additions & 2 deletions docs/japanese/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Slack アプリは通常、Slack からのイベント情報を受け取った
| `app.action(actionId, fn);` | Block Kit エレメントから送信される `action` イベントをリッスンします。このイベントにはユーザーのボタン操作、メニュー選択、日付ピッカーの操作などがあります。`actionId` は文字列型で、アプリがビュー内に含めたブロックエレメントに指定した一意の `action_id` の値と一致する必要があります。ここでいう「ビュー」とは、メッセージ、モーダル、アプリのホームタブのことを指します。アクションエレメントを `input` ブロックに配置した場合はイベントがトリガーされないことに注意してください。
| `app.shortcut(callbackId, fn);` | グローバルショートカットまたはメッセージショートカットの呼び出しをリッスンします。`callbackId` は文字列または正規表現で、アプリの設定で指定したショートカットの `callback_id` にマッチする必要があります。
| `app.view(callbackId, fn);` | `view_submission` イベントと `view_closed` イベントをリッスンします。`view_submission` イベントは、アプリが開いたモーダルでユーザーがデータ送信の操作をしたときに発生します。`view_closed` イベントは、ユーザーがデータ送信を実行せずにモーダルを閉じたときに発生します。
| `app.step(workflowStep)` | `WorkflowStep` のインスタンスに渡されたコールバックを使用して、ワークフローステップイベントのリッスンと応答を行います。コールバックには `edit`、`save`、`execute` の 3 種類があります。ワークフローステップについて詳しくは、[ドキュメント](/tools/bolt-js/legacy/steps-from-apps)を参照してください。
| `app.command(commandName, fn);` | Slash コマンドの呼び出しをリッスンします。`commandName` は文字列型で、アプリの設定で指定したスラッシュコマンドと一致する必要があります。スラッシュコマンドの名前では `/` を最初に配置します(例 : `/helpdesk`)。
| `app.options(actionId, fn);` | 外部データソースを使用するセレクトメニューなどから送られる選択肢読み込みのリクエストをリッスンします。使う機会は多くありませんが、`app.action` と混同しないようにしましょう。`actionId` は文字列型で、アプリがビュー内に[外部データソースを使用するセレクトメニュー](/reference/block-kit/block-elements/multi-select-menu-element#external_multi_select)を含めるときに指定した`action_id` と一致する必要があります。

Expand Down Expand Up @@ -124,7 +123,6 @@ Bolt では、さまざまなエラーが定義されています。これらに
| `ReceiverMultipleAckError` | Receiver 内で、すでに確認が済んでいるリクエストに対してアプリがさらに `ack()` を呼んだ場合にスローされるエラーです。現在、デフォルトの `HTTPReceiver` でのみ使用されます。 |
| `ReceiverAuthenticityError` | アプリのリクエストの署名が検証できないときにスローされるエラーです。このエラーには、失敗した理由を示す情報が含まれます(例 : タイムスタンプが有効でない、ヘッダーに抜けがある、署名シークレットが有効でない)。
| `MultipleListenerError` | 単一のイベントに対して複数のリスナーでの処理中に複数のエラーが発生した場合にスローされるエラーです。個々のエラーを配列に収めた `originals` プロパティを持ちます。 |
| `WorkflowStepInitializationError` | 新しい `WorkflowStep` をインスタンス化する際に、設定オプションが無効な場合、または不足している場合にスローされるエラーです。原因として、`callback_id` が指定されていない、または設定オブジェクトが指定されていないことが考えられます。ワークフローステップについて詳しくは、[ドキュメント](/tools/bolt-js/legacy/steps-from-apps)を参照してください。 |
| `UnknownError` | フレームワーク内でスローされる、特定のエラーコードを持たないエラーです。`original` プロパティで詳細を確認できます。 |

> [errors.ts](https://github.com/slackapi/bolt-js/blob/main/src/errors.ts) のコードで、エラー定義の部分とコンストラクターの部分を読み、参考にしてみてください。
Expand Down
17 changes: 0 additions & 17 deletions src/App.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Agent } from 'node:http';
import type { SecureContextOptions } from 'node:tls';
import util from 'node:util';

Check failure on line 3 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (18.x, examples/custom-receiver)

Module '"node:util"' has no default export.

Check failure on line 3 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (20.x, examples/getting-started-typescript)

Module '"node:util"' has no default export.

Check failure on line 3 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (22.x, examples/custom-receiver)

Module '"node:util"' has no default export.

Check failure on line 3 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (20.x, examples/custom-receiver)

Module '"node:util"' has no default export.

Check failure on line 3 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (18.x, examples/getting-started-typescript)

Module '"node:util"' has no default export.

Check failure on line 3 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Module '"node:util"' has no default export.

Check failure on line 3 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Module '"node:util"' has no default export.

Check failure on line 3 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (22.x, examples/getting-started-typescript)

Module '"node:util"' has no default export.

Check failure on line 3 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Module '"node:util"' has no default export.
import { ConsoleLogger, LogLevel, type Logger } from '@slack/logger';
import { type ChatPostMessageArguments, WebClient, type WebClientOptions, addAppMetadata } from '@slack/web-api';
import axios, { type AxiosInstance, type AxiosResponse } from 'axios';
Expand All @@ -13,7 +13,6 @@
createFunctionComplete,
createFunctionFail,
} from './CustomFunction';
import type { WorkflowStep } from './WorkflowStep';
import { type ConversationStore, MemoryStore, conversationContext } from './conversation-store';
import {
AppInitializationError,
Expand Down Expand Up @@ -84,7 +83,6 @@
SlashCommand,
ViewConstraints,
ViewOutput,
WorkflowStepEdit,
} from './types';
import { contextBuiltinKeys } from './types';
import { type StringIndexed, isRejected } from './types/utilities';
Expand Down Expand Up @@ -522,19 +520,6 @@
return this;
}

/**
* Register WorkflowStep middleware
*
* @param workflowStep global workflow step middleware function
* @deprecated Steps from Apps are no longer supported and support for them will be removed in the next major bolt-js
* version.
*/
public step(workflowStep: WorkflowStep): this {
const m = workflowStep.getMiddleware();
this.middleware.push(m);
return this;
}

/**
* Register middleware for a workflow step.
* @param callbackId Unique callback ID of a step.
Expand Down Expand Up @@ -684,7 +669,7 @@
): void {
const messageMiddleware = patternsOrMiddleware.map((patternOrMiddleware) => {
if (typeof patternOrMiddleware === 'string' || util.types.isRegExp(patternOrMiddleware)) {
return matchMessage(patternOrMiddleware);

Check failure on line 672 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (18.x, examples/custom-receiver)

Argument of type 'string | RegExp | MessageEventMiddleware<AppCustomContext & MiddlewareCustomContext>' is not assignable to parameter of type 'string | RegExp'.

Check failure on line 672 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (20.x, examples/getting-started-typescript)

Argument of type 'string | RegExp | MessageEventMiddleware<AppCustomContext & MiddlewareCustomContext>' is not assignable to parameter of type 'string | RegExp'.

Check failure on line 672 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (22.x, examples/custom-receiver)

Argument of type 'string | RegExp | MessageEventMiddleware<AppCustomContext & MiddlewareCustomContext>' is not assignable to parameter of type 'string | RegExp'.

Check failure on line 672 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (20.x, examples/custom-receiver)

Argument of type 'string | RegExp | MessageEventMiddleware<AppCustomContext & MiddlewareCustomContext>' is not assignable to parameter of type 'string | RegExp'.

Check failure on line 672 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (18.x, examples/getting-started-typescript)

Argument of type 'string | RegExp | MessageEventMiddleware<AppCustomContext & MiddlewareCustomContext>' is not assignable to parameter of type 'string | RegExp'.

Check failure on line 672 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Argument of type 'string | RegExp | MessageEventMiddleware<AppCustomContext & MiddlewareCustomContext>' is not assignable to parameter of type 'string | RegExp'.

Check failure on line 672 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Argument of type 'string | RegExp | MessageEventMiddleware<AppCustomContext & MiddlewareCustomContext>' is not assignable to parameter of type 'string | RegExp'.

Check failure on line 672 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (22.x, examples/getting-started-typescript)

Argument of type 'string | RegExp | MessageEventMiddleware<AppCustomContext & MiddlewareCustomContext>' is not assignable to parameter of type 'string | RegExp'.

Check failure on line 672 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Argument of type 'string | RegExp | MessageEventMiddleware<AppCustomContext & MiddlewareCustomContext>' is not assignable to parameter of type 'string | RegExp'.
}
return patternOrMiddleware;
// biome-ignore lint/suspicious/noExplicitAny: FIXME: workaround for TypeScript 4.7 breaking changes
Expand Down Expand Up @@ -726,7 +711,7 @@
AppCustomContext & MiddlewareCustomContext
>[]
): void {
const constraints: ShortcutConstraints =

Check failure on line 714 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (18.x, examples/custom-receiver)

Type 'RegExp | Constraints | { callback_id: string | RegExp | Constraints; }' is not assignable to type 'ShortcutConstraints<SlackShortcut>'.

Check failure on line 714 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (20.x, examples/getting-started-typescript)

Type 'RegExp | Constraints | { callback_id: string | RegExp | Constraints; }' is not assignable to type 'ShortcutConstraints<SlackShortcut>'.

Check failure on line 714 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (22.x, examples/custom-receiver)

Type 'RegExp | Constraints | { callback_id: string | RegExp | Constraints; }' is not assignable to type 'ShortcutConstraints<SlackShortcut>'.

Check failure on line 714 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (20.x, examples/custom-receiver)

Type 'RegExp | Constraints | { callback_id: string | RegExp | Constraints; }' is not assignable to type 'ShortcutConstraints<SlackShortcut>'.

Check failure on line 714 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (18.x, examples/getting-started-typescript)

Type 'RegExp | Constraints | { callback_id: string | RegExp | Constraints; }' is not assignable to type 'ShortcutConstraints<SlackShortcut>'.

Check failure on line 714 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Type 'RegExp | Constraints | { callback_id: string | RegExp | Constraints; }' is not assignable to type 'ShortcutConstraints<SlackShortcut>'.

Check failure on line 714 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Type 'RegExp | Constraints | { callback_id: string | RegExp | Constraints; }' is not assignable to type 'ShortcutConstraints<SlackShortcut>'.

Check failure on line 714 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (22.x, examples/getting-started-typescript)

Type 'RegExp | Constraints | { callback_id: string | RegExp | Constraints; }' is not assignable to type 'ShortcutConstraints<SlackShortcut>'.

Check failure on line 714 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Type 'RegExp | Constraints | { callback_id: string | RegExp | Constraints; }' is not assignable to type 'ShortcutConstraints<SlackShortcut>'.
typeof callbackIdOrConstraints === 'string' || util.types.isRegExp(callbackIdOrConstraints)
? { callback_id: callbackIdOrConstraints }
: callbackIdOrConstraints;
Expand Down Expand Up @@ -781,7 +766,7 @@
>[]
): void {
// Normalize Constraints
const constraints: ActionConstraints =

Check failure on line 769 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (18.x, examples/custom-receiver)

Type 'RegExp | Constraints | { action_id: string | RegExp | Constraints; }' is not assignable to type 'ActionConstraints<SlackAction>'.

Check failure on line 769 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (20.x, examples/getting-started-typescript)

Type 'RegExp | Constraints | { action_id: string | RegExp | Constraints; }' is not assignable to type 'ActionConstraints<SlackAction>'.

Check failure on line 769 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (22.x, examples/custom-receiver)

Type 'RegExp | Constraints | { action_id: string | RegExp | Constraints; }' is not assignable to type 'ActionConstraints<SlackAction>'.

Check failure on line 769 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (20.x, examples/custom-receiver)

Type 'RegExp | Constraints | { action_id: string | RegExp | Constraints; }' is not assignable to type 'ActionConstraints<SlackAction>'.

Check failure on line 769 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (18.x, examples/getting-started-typescript)

Type 'RegExp | Constraints | { action_id: string | RegExp | Constraints; }' is not assignable to type 'ActionConstraints<SlackAction>'.

Check failure on line 769 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Type 'RegExp | Constraints | { action_id: string | RegExp | Constraints; }' is not assignable to type 'ActionConstraints<SlackAction>'.

Check failure on line 769 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Type 'RegExp | Constraints | { action_id: string | RegExp | Constraints; }' is not assignable to type 'ActionConstraints<SlackAction>'.

Check failure on line 769 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (22.x, examples/getting-started-typescript)

Type 'RegExp | Constraints | { action_id: string | RegExp | Constraints; }' is not assignable to type 'ActionConstraints<SlackAction>'.

Check failure on line 769 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Type 'RegExp | Constraints | { action_id: string | RegExp | Constraints; }' is not assignable to type 'ActionConstraints<SlackAction>'.
typeof actionIdOrConstraints === 'string' || util.types.isRegExp(actionIdOrConstraints)
? { action_id: actionIdOrConstraints }
: actionIdOrConstraints;
Expand Down Expand Up @@ -839,7 +824,7 @@
actionIdOrConstraints: string | RegExp | OptionsConstraints,
...listeners: Middleware<SlackOptionsMiddlewareArgs<Source>, AppCustomContext & MiddlewareCustomContext>[]
): void {
const constraints: OptionsConstraints =

Check failure on line 827 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (18.x, examples/custom-receiver)

Type 'RegExp | OptionsConstraints<SlackOptions> | { action_id: string | RegExp | OptionsConstraints<SlackOptions>; }' is not assignable to type 'OptionsConstraints<SlackOptions>'.

Check failure on line 827 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (20.x, examples/getting-started-typescript)

Type 'RegExp | OptionsConstraints<SlackOptions> | { action_id: string | RegExp | OptionsConstraints<SlackOptions>; }' is not assignable to type 'OptionsConstraints<SlackOptions>'.

Check failure on line 827 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (22.x, examples/custom-receiver)

Type 'RegExp | OptionsConstraints<SlackOptions> | { action_id: string | RegExp | OptionsConstraints<SlackOptions>; }' is not assignable to type 'OptionsConstraints<SlackOptions>'.

Check failure on line 827 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (20.x, examples/custom-receiver)

Type 'RegExp | OptionsConstraints<SlackOptions> | { action_id: string | RegExp | OptionsConstraints<SlackOptions>; }' is not assignable to type 'OptionsConstraints<SlackOptions>'.

Check failure on line 827 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (18.x, examples/getting-started-typescript)

Type 'RegExp | OptionsConstraints<SlackOptions> | { action_id: string | RegExp | OptionsConstraints<SlackOptions>; }' is not assignable to type 'OptionsConstraints<SlackOptions>'.

Check failure on line 827 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Type 'RegExp | OptionsConstraints<SlackOptions> | { action_id: string | RegExp | OptionsConstraints<SlackOptions>; }' is not assignable to type 'OptionsConstraints<SlackOptions>'.

Check failure on line 827 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Type 'RegExp | OptionsConstraints<SlackOptions> | { action_id: string | RegExp | OptionsConstraints<SlackOptions>; }' is not assignable to type 'OptionsConstraints<SlackOptions>'.

Check failure on line 827 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (22.x, examples/getting-started-typescript)

Type 'RegExp | OptionsConstraints<SlackOptions> | { action_id: string | RegExp | OptionsConstraints<SlackOptions>; }' is not assignable to type 'OptionsConstraints<SlackOptions>'.

Check failure on line 827 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Type 'RegExp | OptionsConstraints<SlackOptions> | { action_id: string | RegExp | OptionsConstraints<SlackOptions>; }' is not assignable to type 'OptionsConstraints<SlackOptions>'.
typeof actionIdOrConstraints === 'string' || util.types.isRegExp(actionIdOrConstraints)
? { action_id: actionIdOrConstraints }
: actionIdOrConstraints;
Expand Down Expand Up @@ -871,7 +856,7 @@
callbackIdOrConstraints: string | RegExp | ViewConstraints,
...listeners: Middleware<SlackViewMiddlewareArgs<ViewActionType>, AppCustomContext & MiddlewareCustomContext>[]
): void {
const constraints: ViewConstraints =

Check failure on line 859 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (18.x, examples/custom-receiver)

Type 'RegExp | ViewConstraints | { callback_id: string | RegExp | ViewConstraints; type: "view_submission"; }' is not assignable to type 'ViewConstraints'.

Check failure on line 859 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (20.x, examples/getting-started-typescript)

Type 'RegExp | ViewConstraints | { callback_id: string | RegExp | ViewConstraints; type: "view_submission"; }' is not assignable to type 'ViewConstraints'.

Check failure on line 859 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (22.x, examples/custom-receiver)

Type 'RegExp | ViewConstraints | { callback_id: string | RegExp | ViewConstraints; type: "view_submission"; }' is not assignable to type 'ViewConstraints'.

Check failure on line 859 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (20.x, examples/custom-receiver)

Type 'RegExp | ViewConstraints | { callback_id: string | RegExp | ViewConstraints; type: "view_submission"; }' is not assignable to type 'ViewConstraints'.

Check failure on line 859 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (18.x, examples/getting-started-typescript)

Type 'RegExp | ViewConstraints | { callback_id: string | RegExp | ViewConstraints; type: "view_submission"; }' is not assignable to type 'ViewConstraints'.

Check failure on line 859 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Type 'RegExp | ViewConstraints | { callback_id: string | RegExp | ViewConstraints; type: "view_submission"; }' is not assignable to type 'ViewConstraints'.

Check failure on line 859 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Type 'RegExp | ViewConstraints | { callback_id: string | RegExp | ViewConstraints; type: "view_submission"; }' is not assignable to type 'ViewConstraints'.

Check failure on line 859 in src/App.ts

View workflow job for this annotation

GitHub Actions / examples (22.x, examples/getting-started-typescript)

Type 'RegExp | ViewConstraints | { callback_id: string | RegExp | ViewConstraints; type: "view_submission"; }' is not assignable to type 'ViewConstraints'.

Check failure on line 859 in src/App.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Type 'RegExp | ViewConstraints | { callback_id: string | RegExp | ViewConstraints; type: "view_submission"; }' is not assignable to type 'ViewConstraints'.
typeof callbackIdOrConstraints === 'string' || util.types.isRegExp(callbackIdOrConstraints)
? { callback_id: callbackIdOrConstraints, type: 'view_submission' }
: callbackIdOrConstraints;
Expand Down Expand Up @@ -1022,11 +1007,9 @@

// Set body and payload
// TODO: this value should eventually conform to AnyMiddlewareArgs
// TODO: remove workflow step stuff in bolt v5
// TODO: can we instead use type predicates in these switch cases to allow for narrowing of the body simultaneously? we have isEvent, isView, isShortcut, isAction already in types/utilities / helpers
let payload:
| DialogSubmitAction
| WorkflowStepEdit
| SlackShortcut
| KnownEventFromType<string>
| SlashCommand
Expand Down
Loading
Loading