Socket
Socket
Sign inDemoInstall

@slack/web-api

Package Overview
Dependencies
Maintainers
10
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slack/web-api - npm Package Compare versions

Comparing version 5.2.1 to 5.3.0

LICENSE

5

dist/methods.d.ts

@@ -662,2 +662,7 @@ /// <reference types="node" />

}
export interface ViewsPublishArguments extends WebAPICallOptions, TokenOverridable {
user_id: string;
view: View;
hash?: string;
}
export interface ViewsUpdateArguments extends WebAPICallOptions, TokenOverridable {

@@ -664,0 +669,0 @@ view_id: string;

1

dist/WebClient.d.ts

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

open: Method<methods.ViewsOpenArguments>;
publish: Method<methods.ViewsPublishArguments>;
push: Method<methods.ViewsPushArguments>;

@@ -189,0 +190,0 @@ update: Method<methods.ViewsUpdateArguments>;

3

dist/WebClient.js

@@ -164,2 +164,3 @@ "use strict";

open: (this.apiCall.bind(this, 'views.open')),
publish: (this.apiCall.bind(this, 'views.publish')),
push: (this.apiCall.bind(this, 'views.push')),

@@ -639,2 +640,3 @@ update: (this.apiCall.bind(this, 'views.update')),

}
exports.WebClient = WebClient;
/**

@@ -644,3 +646,2 @@ * The name used to prefix all logging generated from this object

WebClient.loggerName = 'WebClient';
exports.WebClient = WebClient;
exports.default = WebClient;

@@ -647,0 +648,0 @@ var WebClientEvent;

{
"name": "@slack/web-api",
"version": "5.2.1",
"version": "5.3.0",
"description": "Official library for using the Slack Platform's Web API",

@@ -44,4 +44,4 @@ "author": "Slack Technologies, Inc.",

"dependencies": {
"@slack/logger": "^1.0.0",
"@slack/types": "^1.1.0",
"@slack/logger": ">=1.0.0 <3.0.0",
"@slack/types": "^1.2.1",
"@types/is-stream": "^1.1.0",

@@ -75,3 +75,4 @@ "@types/node": ">=8.9.0",

"typescript": "^3.3.3333"
}
},
"gitHead": "b63136447de12dc1c309b847168fe1e753fce2bb"
}

@@ -52,3 +52,3 @@ # Slack Web API

Alternatively, you can create a client without an token, and use it with multiple workspaces as long as you supply a
Alternatively, you can create a client without a token, and use it with multiple workspaces as long as you supply a
`token` when you call a method.

@@ -78,5 +78,5 @@

The client instance has a named method for each of the public methods in the Web API. The most popular one is
called `chat.postMessage`, and its used to send a message to a conversation. For every method, you pass arguments as
properties of an options object. This helps with the readablility of your code since every argument has a name. All
named methods return a `Promise` which resolves with the response data, or rejects with an error.
called `chat.postMessage`, and it's used to send a message to a conversation. For every method, you pass arguments as
properties of an options object. This helps with the readability of your code since every argument has a name. All
named methods return a `Promise` which resolves with the response data or rejects with an error.

@@ -114,3 +114,3 @@ ```javascript

If you want to provide the method name as a string, so that you can decide which method to call dynamically, or to call
If you want to provide the method name as a string so that you can decide which method to call dynamically or to call
a method that might not be available in your version of the client, use the `WebClient.apiCall(methodName, [options])`

@@ -182,3 +182,3 @@ method. The API method call above can also be written as follows:

* `ErrorCode.HTTPError`: The HTTP response contained an unfamiliar status code. The Web API only responds with `200`
(yes, even for errors) or `429` (rate limiting). If you receive this error, its likely due to a problem with a proxy,
(yes, even for errors) or `429` (rate limiting). If you receive this error, it's likely due to a problem with a proxy,
a custom TLS configuration, or a custom API URL. This error has the `statusCode`, `statusMessage`, `headers`, and

@@ -195,3 +195,3 @@ `body` properties containing more details.

the list, or a page, and also provide you with information on how to continue to the next page on a subsequent API call.
Instead of calling many times manually, the `WebClient` can manage getting each page, allowing you to determine when to
Instead of calling many times manually, the `WebClient` can manage to get each page, allowing you to determine when to
stop, and help you process the results.

@@ -201,3 +201,3 @@

you're processing items in a collection, but getting each item is an asynchronous operation. Fortunately, JavaScript
has this concept built in, and in newer versions of the language there's syntax to make it even simpler:
has this concept built-in, and in newer versions of the language there's a syntax to make it even simpler:
[`for await...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of).

@@ -277,3 +277,3 @@

All the log levels, in order of most to least information are: `DEBUG`, `INFO`, `WARN`, and `ERROR`.
All the log levels, in order of most to least information, are: `DEBUG`, `INFO`, `WARN`, and `ERROR`.

@@ -323,4 +323,4 @@ <details>

problem usually involves building a queuing system that handles retrying failed tasks. The `WebClient` comes with this
queuing system out of the box, and its on by default! The client will retry a failed API method call up to 10 times,
spaced out over about 30 minutes. If the request doesn't succeed in that time, then the returned `Promise` will reject.
queuing system out of the box, and it's on by default! The client will retry a failed API method call up to 10 times,
spaced out over about 30 minutes. If the request doesn't succeed within that time, then the returned `Promise` will reject.
You can observe each of the retries in your logs by [setting the log level to DEBUG](#logging). Try running the

@@ -327,0 +327,0 @@ following code with your network disconnected, and then re-connect after you see a couple of log messages:

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