Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@slack/bolt

Package Overview
Dependencies
Maintainers
10
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slack/bolt - npm Package Compare versions

Comparing version 3.14.0 to 3.15.0

12

dist/App.d.ts

@@ -11,3 +11,3 @@ /// <reference types="node" />

import { WorkflowStep } from './WorkflowStep';
import { Middleware, AnyMiddlewareArgs, SlackActionMiddlewareArgs, SlackCommandMiddlewareArgs, SlackEventMiddlewareArgs, SlackOptionsMiddlewareArgs, SlackShortcutMiddlewareArgs, SlackViewMiddlewareArgs, SlackAction, SlackShortcut, Context, OptionsSource, BlockAction, SlackViewAction, Receiver, ReceiverEvent } from './types';
import { Middleware, AnyMiddlewareArgs, SlackActionMiddlewareArgs, SlackCommandMiddlewareArgs, SlackEventMiddlewareArgs, SlackOptionsMiddlewareArgs, SlackShortcutMiddlewareArgs, SlackViewMiddlewareArgs, SlackAction, SlackShortcut, Context, OptionsSource, BlockAction, SlackViewAction, Receiver, ReceiverEvent, SlackOptions } from './types';
import { CodedError } from './errors';

@@ -81,2 +81,10 @@ import { StringIndexed } from './types/helpers';

}
export interface OptionsConstraints<A extends SlackOptions = SlackOptions> {
type?: A['type'];
block_id?: A extends SlackOptions ? string | RegExp : never;
action_id?: A extends SlackOptions ? string | RegExp : never;
callback_id?: Extract<A, {
callback_id?: string;
}> extends any ? string | RegExp : never;
}
export interface ShortcutConstraints<S extends SlackShortcut = SlackShortcut> {

@@ -210,3 +218,3 @@ type?: S['type'];

options<Source extends OptionsSource = 'block_suggestion', MiddlewareCustomContext extends StringIndexed = StringIndexed>(actionId: string | RegExp, ...listeners: Middleware<SlackOptionsMiddlewareArgs<Source>, AppCustomContext & MiddlewareCustomContext>[]): void;
options<Source extends OptionsSource = OptionsSource, MiddlewareCustomContext extends StringIndexed = StringIndexed>(constraints: ActionConstraints, ...listeners: Middleware<SlackOptionsMiddlewareArgs<Source>, AppCustomContext & MiddlewareCustomContext>[]): void;
options<Source extends OptionsSource = OptionsSource, MiddlewareCustomContext extends StringIndexed = StringIndexed>(constraints: OptionsConstraints, ...listeners: Middleware<SlackOptionsMiddlewareArgs<Source>, AppCustomContext & MiddlewareCustomContext>[]): void;
view<ViewActionType extends SlackViewAction = SlackViewAction, MiddlewareCustomContext extends StringIndexed = StringIndexed>(callbackId: string | RegExp, ...listeners: Middleware<SlackViewMiddlewareArgs<ViewActionType>, AppCustomContext & MiddlewareCustomContext>[]): void;

@@ -213,0 +221,0 @@ view<ViewActionType extends SlackViewAction = SlackViewAction, MiddlewareCustomContext extends StringIndexed = StringIndexed>(constraints: ViewConstraints, ...listeners: Middleware<SlackViewMiddlewareArgs<ViewActionType>, AppCustomContext & MiddlewareCustomContext>[]): void;

8

dist/App.js

@@ -328,3 +328,4 @@ "use strict";

options(actionIdOrConstraints, ...listeners) {
const constraints = typeof actionIdOrConstraints === 'string' || util_1.default.types.isRegExp(actionIdOrConstraints) ?
const constraints = typeof actionIdOrConstraints === 'string' ||
util_1.default.types.isRegExp(actionIdOrConstraints) ?
{ action_id: actionIdOrConstraints } :

@@ -620,6 +621,3 @@ actionIdOrConstraints;

// Custom receiver supplied
if (this.socketMode === true) {
// socketMode = true should result in SocketModeReceiver being used as receiver
// TODO: Add case for when socketMode = true and receiver = SocketModeReceiver
// as this should not result in an error
if (this.socketMode === true && !(receiver instanceof SocketModeReceiver_1.default)) {
throw new errors_1.AppInitializationError('You cannot supply a custom receiver when socketMode is set to true.');

@@ -626,0 +624,0 @@ }

import { Middleware, AnyMiddlewareArgs, SlackActionMiddlewareArgs, SlackCommandMiddlewareArgs, SlackEventMiddlewareArgs, SlackOptionsMiddlewareArgs, SlackViewMiddlewareArgs, SlackEvent, SlackAction, SlackShortcut, SlashCommand, SlackOptions, EventTypePattern, ViewOutput } from '../types';
import { ActionConstraints, ViewConstraints, ShortcutConstraints } from '../App';
import { ActionConstraints, ViewConstraints, ShortcutConstraints, OptionsConstraints } from '../App';
/**

@@ -42,3 +42,3 @@ * Middleware that filters out any event that isn't an action

*/
export declare function matchConstraints(constraints: ActionConstraints | ViewConstraints | ShortcutConstraints): Middleware<SlackActionMiddlewareArgs | SlackOptionsMiddlewareArgs | SlackViewMiddlewareArgs>;
export declare function matchConstraints(constraints: ActionConstraints | ViewConstraints | ShortcutConstraints | OptionsConstraints): Middleware<SlackActionMiddlewareArgs | SlackOptionsMiddlewareArgs | SlackViewMiddlewareArgs>;
export declare function matchMessage(pattern: string | RegExp): Middleware<SlackEventMiddlewareArgs<'message' | 'app_mention'>>;

@@ -45,0 +45,0 @@ /**

@@ -1,2 +0,2 @@

import { PlainTextElement, Confirmation, Option } from '@slack/types';
import { PlainTextElement, Confirmation, Option, RichTextBlock } from '@slack/types';
import { StringIndexed } from '../helpers';

@@ -9,3 +9,3 @@ import { ViewOutput, ViewStateValue } from '../view';

*/
export declare type BlockElementAction = ButtonAction | UsersSelectAction | MultiUsersSelectAction | StaticSelectAction | MultiStaticSelectAction | ConversationsSelectAction | MultiConversationsSelectAction | ChannelsSelectAction | MultiChannelsSelectAction | ExternalSelectAction | MultiExternalSelectAction | OverflowAction | DatepickerAction | TimepickerAction | RadioButtonsAction | CheckboxesAction | PlainTextInputAction;
export declare type BlockElementAction = ButtonAction | UsersSelectAction | MultiUsersSelectAction | StaticSelectAction | MultiStaticSelectAction | ConversationsSelectAction | MultiConversationsSelectAction | ChannelsSelectAction | MultiChannelsSelectAction | ExternalSelectAction | MultiExternalSelectAction | OverflowAction | DatepickerAction | TimepickerAction | RadioButtonsAction | CheckboxesAction | PlainTextInputAction | RichTextInputAction;
/**

@@ -175,3 +175,3 @@ * Any action from Slack's interactive elements

/**
* An action from a plain_text_input element (must use dispatch_action: true)
* An action from a plain_text_input element (must use dispatch_action: true)
*/

@@ -182,2 +182,8 @@ export interface PlainTextInputAction extends BasicElementAction<'plain_text_input'> {

/**
* An action from a rich_text_input element (must use dispatch_action: true)
*/
export interface RichTextInputAction extends BasicElementAction<'rich_text_input'> {
rich_text_value: RichTextBlock;
}
/**
* A Slack Block Kit element action wrapped in the standard metadata.

@@ -184,0 +190,0 @@ *

@@ -1,2 +0,2 @@

import { Block, KnownBlock, PlainTextElement, View } from '@slack/types';
import { Block, KnownBlock, PlainTextElement, RichTextBlock, View } from '@slack/types';
import { AckFn, RespondFn } from '../utilities';

@@ -115,2 +115,128 @@ /**

}
export interface UploadedFile {
id: string;
created: number;
timestamp: number;
name: string;
title: string;
filetype: string;
mimetype: string;
permalink: string;
url_private: string;
url_private_download: string;
user: string;
user_team: string;
username?: string;
access?: string;
alt_txt?: string;
app_id?: string;
app_name?: string;
bot_id?: string;
channel_actions_count?: number;
channel_actions_ts?: string;
channels?: string[];
comments_count?: number;
converted_pdf?: string;
deanimate?: string;
deanimate_gif?: string;
display_as_bot?: boolean;
duration_ms?: number;
edit_link?: string;
editable?: boolean;
editor?: string;
external_id?: string;
external_type?: string;
external_url?: string;
file_access?: string;
groups?: string[];
has_more?: boolean;
has_more_shares?: boolean;
has_rich_preview?: boolean;
hls?: string;
hls_embed?: string;
image_exif_rotation?: number;
ims?: string[];
is_channel_space?: boolean;
is_external?: boolean;
is_public?: boolean;
is_starred?: boolean;
last_editor?: string;
last_read?: number;
lines?: number;
lines_more?: number;
linked_channel_id?: string;
media_display_type?: string;
mode?: string;
mp4?: string;
mp4_low?: string;
non_owner_editable?: boolean;
num_stars?: number;
org_or_workspace_access?: string;
original_attachment_count?: number;
original_h?: string;
original_w?: string;
permalink_public?: string;
pinned_to?: string[];
pjpeg?: string;
plain_text?: string;
pretty_type?: string;
preview?: string;
preview_highlight?: string;
preview_is_truncated?: boolean;
preview_plain_text?: string;
private_channels_with_file_access_count?: number;
public_url_shared?: boolean;
simplified_html?: string;
size?: number;
source_team?: string;
subject?: string;
subtype?: string;
thumb_1024?: string;
thumb_1024_gif?: string;
thumb_1024_h?: string;
thumb_1024_w?: string;
thumb_160?: string;
thumb_160_gif?: string;
thumb_160_h?: string;
thumb_160_w?: string;
thumb_360?: string;
thumb_360_gif?: string;
thumb_360_h?: string;
thumb_360_w?: string;
thumb_480?: string;
thumb_480_gif?: string;
thumb_480_h?: string;
thumb_480_w?: string;
thumb_64?: string;
thumb_64_gif?: string;
thumb_64_h?: string;
thumb_64_w?: string;
thumb_720?: string;
thumb_720_gif?: string;
thumb_720_h?: string;
thumb_720_w?: string;
thumb_80?: string;
thumb_800?: string;
thumb_800_gif?: string;
thumb_800_h?: string;
thumb_800_w?: string;
thumb_80_gif?: string;
thumb_80_h?: string;
thumb_80_w?: string;
thumb_960?: string;
thumb_960_gif?: string;
thumb_960_h?: string;
thumb_960_w?: string;
thumb_gif?: string;
thumb_pdf?: string;
thumb_pdf_h?: string;
thumb_pdf_w?: string;
thumb_tiny?: string;
thumb_video?: string;
thumb_video_h?: number;
thumb_video_w?: number;
updated?: number;
url_static_preview?: string;
vtt?: string;
}
export interface ViewStateValue {

@@ -130,2 +256,4 @@ type: string;

selected_options?: ViewStateSelectedOption[];
rich_text_value?: RichTextBlock;
files?: UploadedFile[];
}

@@ -132,0 +260,0 @@ export interface ViewOutput {

{
"name": "@slack/bolt",
"version": "3.14.0",
"version": "3.15.0",
"description": "A framework for building Slack apps, fast.",

@@ -46,8 +46,8 @@ "author": "Slack Technologies, LLC",

"@slack/socket-mode": "^1.3.2",
"@slack/types": "^2.8.0",
"@slack/web-api": "^6.7.1",
"@slack/types": "^2.9.0",
"@slack/web-api": "^6.10.0",
"@types/express": "^4.16.1",
"@types/promise.allsettled": "^1.0.3",
"@types/tsscmp": "^1.0.0",
"axios": "^0.27.2",
"axios": "^1.6.0",
"express": "^4.16.4",

@@ -62,4 +62,4 @@ "path-to-regexp": "^6.2.1",

"@types/chai": "^4.1.7",
"@types/mocha": "^5.2.6",
"@types/node": "20.6.2",
"@types/mocha": "^10.0.1",
"@types/node": "20.9.0",
"@types/sinon": "^7.0.11",

@@ -78,3 +78,3 @@ "@typescript-eslint/eslint-plugin": "^4.4.1",

"eslint-plugin-react-hooks": "^4.3.0",
"mocha": "^9.1.3",
"mocha": "^10.2.0",
"nyc": "^15.1.0",

@@ -81,0 +81,0 @@ "rewiremock": "^3.13.4",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc