@slack/interactive-messages
Advanced tools
Comparing version 1.7.0 to 1.7.1
@@ -6,3 +6,2 @@ /// <reference types="node" /> | ||
* An adapter for Slack's interactive message components such as buttons, menus, and dialogs. | ||
* @typicalname slackInteractions | ||
*/ | ||
@@ -149,3 +148,3 @@ export declare class SlackMessageAdapter { | ||
/** Some HTTP response statuses. */ | ||
declare enum ResponseStatus { | ||
export declare enum ResponseStatus { | ||
Ok = 200, | ||
@@ -157,3 +156,3 @@ Failure = 500 | ||
*/ | ||
interface DispatchResult { | ||
export interface DispatchResult { | ||
status: ResponseStatus; | ||
@@ -248,3 +247,28 @@ content?: any; | ||
} | ||
export declare type AnyConstraints = ActionConstraints | OptionsConstraints | ViewConstraints | ShortcutConstraints; | ||
/** | ||
* The type of stored constraints. | ||
*/ | ||
declare const enum StoredConstraintsType { | ||
Action = "action", | ||
Shortcut = "shortcut", | ||
Options = "options", | ||
ViewSubmission = "view_submission", | ||
ViewClosed = "view_closed" | ||
} | ||
/** | ||
* Internal storage type that describes the constraints of an ActionHandler or OptionsHandler. | ||
*/ | ||
export declare type StoredConstraints = ({ | ||
handlerType: StoredConstraintsType.Action; | ||
} & ActionConstraints) | ({ | ||
handlerType: StoredConstraintsType.Shortcut; | ||
} & ShortcutConstraints) | ({ | ||
handlerType: StoredConstraintsType.Options; | ||
} & OptionsConstraints) | ({ | ||
handlerType: StoredConstraintsType.ViewSubmission; | ||
} & ViewConstraints) | ({ | ||
handlerType: StoredConstraintsType.ViewClosed; | ||
} & ViewConstraints); | ||
/** | ||
* A function used to send message updates after an action is handled. This function can be used | ||
@@ -258,3 +282,3 @@ * up to 5 times in 30 minutes. | ||
*/ | ||
declare type Respond = (message: any) => Promise<unknown>; | ||
export declare type Respond = (message: any) => Promise<unknown>; | ||
/** | ||
@@ -282,3 +306,3 @@ * A handler function for action requests (block actions, button presses, menu selections, | ||
*/ | ||
declare type ActionHandler = (payload: any, respond: Respond) => any | Promise<any> | undefined; | ||
export declare type ActionHandler = (payload: any, respond: Respond) => any | Promise<any> | undefined; | ||
/** | ||
@@ -289,3 +313,3 @@ * A handler function for global shortcuts. | ||
*/ | ||
declare type ShortcutHandler = (payload: any) => any | Promise<any> | undefined; | ||
export declare type ShortcutHandler = (payload: any) => any | Promise<any> | undefined; | ||
/** | ||
@@ -304,3 +328,3 @@ * A handler function for menu options requests. | ||
*/ | ||
declare type OptionsHandler = (payload: any) => any | Promise<any> | undefined; | ||
export declare type OptionsHandler = (payload: any) => any | Promise<any> | undefined; | ||
/** | ||
@@ -311,3 +335,3 @@ * A handler function for view submission requests. | ||
*/ | ||
declare type ViewSubmissionHandler = (payload: any) => any | Promise<any> | undefined; | ||
export declare type ViewSubmissionHandler = (payload: any) => any | Promise<any> | undefined; | ||
/** | ||
@@ -318,3 +342,3 @@ * A handler function for view closed requests. | ||
*/ | ||
declare type ViewClosedHandler = (payload: any) => void; | ||
export declare type ViewClosedHandler = (payload: any) => void; | ||
//# sourceMappingURL=adapter.d.ts.map |
@@ -131,3 +131,2 @@ "use strict"; | ||
* An adapter for Slack's interactive message components such as buttons, menus, and dialogs. | ||
* @typicalname slackInteractions | ||
*/ | ||
@@ -601,3 +600,3 @@ var SlackMessageAdapter = /** @class */ (function () { | ||
ResponseStatus[ResponseStatus["Failure"] = 500] = "Failure"; | ||
})(ResponseStatus || (ResponseStatus = {})); | ||
})(ResponseStatus = exports.ResponseStatus || (exports.ResponseStatus = {})); | ||
function hasBlockRelatedConstraints(constraints) { | ||
@@ -604,0 +603,0 @@ var asBlockRelatedConstraints = constraints; |
import { SlackMessageAdapter, MessageAdapterOptions } from './adapter'; | ||
import { ErrorCode } from './errors'; | ||
export { ActionConstraints, ActionHandler, DispatchResult, MessageAdapterOptions, OptionsConstraints, OptionsHandler, Respond, ResponseStatus, ShortcutConstraints, ShortcutHandler, SlackMessageAdapter, ViewClosedHandler, ViewConstraints, ViewSubmissionHandler, } from './adapter'; | ||
export { ErrorCode } from './errors'; | ||
/** | ||
@@ -4,0 +6,0 @@ * Dictionary of error codes that may appear on errors emitted from this package's objects |
@@ -5,2 +5,7 @@ "use strict"; | ||
var errors_1 = require("./errors"); | ||
var adapter_2 = require("./adapter"); | ||
exports.ResponseStatus = adapter_2.ResponseStatus; | ||
exports.SlackMessageAdapter = adapter_2.SlackMessageAdapter; | ||
var errors_2 = require("./errors"); | ||
exports.ErrorCode = errors_2.ErrorCode; | ||
/** | ||
@@ -7,0 +12,0 @@ * Dictionary of error codes that may appear on errors emitted from this package's objects |
{ | ||
"name": "@slack/interactive-messages", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"description": "Official library for using the Slack Platform's Interactive Buttons, Menus, Dialogs, Actions, and Block Actions", | ||
@@ -48,3 +48,4 @@ "author": "Slack Technologies, Inc.", | ||
"test": "nyc mocha --config .mocharc.json src/*.spec.js", | ||
"coverage": "codecov -F interactivemessages --root=$PWD" | ||
"coverage": "codecov -F interactivemessages --root=$PWD", | ||
"ref-docs:model": "api-extractor run" | ||
}, | ||
@@ -55,6 +56,7 @@ "dependencies": { | ||
"@types/lodash.isfunction": "^3.0.6", | ||
"@types/lodash.isplainobject": "^4.0.6", | ||
"@types/lodash.isregexp": "^4.0.6", | ||
"@types/lodash.isstring": "^4.0.6", | ||
"@types/node": ">=4.2.0", | ||
"axios": "^0.19.0", | ||
"axios": "^0.21.1", | ||
"debug": "^3.1.0", | ||
@@ -69,3 +71,3 @@ "lodash.isfunction": "^3.0.9", | ||
"devDependencies": { | ||
"@types/lodash.isplainobject": "^4.0.6", | ||
"@microsoft/api-extractor": "^7.3.4", | ||
"body-parser": "^1.18.2", | ||
@@ -72,0 +74,0 @@ "chai": "^4.2.0", |
# Slack Interactive Messages for Node | ||
<!-- TODO: per-job badge https://github.com/bjfish/travis-matrix-badges/issues/4 --> | ||
[![Build Status](https://travis-ci.org/slackapi/node-slack-sdk.svg?branch=master)](https://travis-ci.org/slackapi/node-slack-sdk) | ||
[![build-ci](https://github.com/slackapi/node-slack-sdk/workflows/CI%20Build/badge.svg)](https://github.com/slackapi/node-slack-sdk/actions?query=workflow%3A%22CI+Build%22) | ||
<!-- TODO: per-flag badge https://docs.codecov.io/docs/flags#section-flag-badges-and-graphs --> | ||
@@ -6,0 +5,0 @@ [![codecov](https://codecov.io/gh/slackapi/node-slack-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/slackapi/node-slack-sdk) |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123313
1286
15
693
+ Added@types/lodash.isplainobject@4.0.9(transitive)
+ Addedaxios@0.21.4(transitive)
+ Addedfollow-redirects@1.15.9(transitive)
- Removedaxios@0.19.2(transitive)
- Removedfollow-redirects@1.5.10(transitive)
Updatedaxios@^0.21.1