Socket
Socket
Sign inDemoInstall

@slack/web-api

Package Overview
Dependencies
22
Maintainers
13
Versions
60
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.2.0-rc.0 to 6.2.0

dist/response/AdminAppsUninstallResponse.d.ts

120

dist/methods.js

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

this.admin = {
// TODO: admin.analytics.getFile
apps: {

@@ -45,2 +46,3 @@ approve: bindApiCall(this, 'admin.apps.approve'),

},
clearResolution: bindApiCall(this, 'admin.apps.clearResolution'),
requests: {

@@ -53,2 +55,3 @@ list: bindApiCall(this, 'admin.apps.requests.list'),

},
uninstall: bindApiCall(this, 'admin.apps.uninstall'),
},

@@ -179,19 +182,2 @@ barriers: {

};
this.channels = {
archive: bindApiCall(this, 'channels.archive'),
create: bindApiCall(this, 'channels.create'),
history: bindApiCall(this, 'channels.history'),
info: bindApiCall(this, 'channels.info'),
invite: bindApiCall(this, 'channels.invite'),
join: bindApiCall(this, 'channels.join'),
kick: bindApiCall(this, 'channels.kick'),
leave: bindApiCall(this, 'channels.leave'),
list: bindApiCall(this, 'channels.list'),
mark: bindApiCall(this, 'channels.mark'),
rename: bindApiCall(this, 'channels.rename'),
replies: bindApiCall(this, 'channels.replies'),
setPurpose: bindApiCall(this, 'channels.setPurpose'),
setTopic: bindApiCall(this, 'channels.setTopic'),
unarchive: bindApiCall(this, 'channels.unarchive'),
};
this.chat = {

@@ -231,8 +217,2 @@ delete: bindApiCall(this, 'chat.delete'),

};
this.views = {
open: bindApiCall(this, 'views.open'),
publish: bindApiCall(this, 'views.publish'),
push: bindApiCall(this, 'views.push'),
update: bindApiCall(this, 'views.update'),
};
this.dialog = {

@@ -270,39 +250,5 @@ open: bindApiCall(this, 'dialog.open'),

};
this.groups = {
archive: bindApiCall(this, 'groups.archive'),
create: bindApiCall(this, 'groups.create'),
createChild: bindApiCall(this, 'groups.createChild'),
history: bindApiCall(this, 'groups.history'),
info: bindApiCall(this, 'groups.info'),
invite: bindApiCall(this, 'groups.invite'),
kick: bindApiCall(this, 'groups.kick'),
leave: bindApiCall(this, 'groups.leave'),
list: bindApiCall(this, 'groups.list'),
mark: bindApiCall(this, 'groups.mark'),
open: bindApiCall(this, 'groups.open'),
rename: bindApiCall(this, 'groups.rename'),
replies: bindApiCall(this, 'groups.replies'),
setPurpose: bindApiCall(this, 'groups.setPurpose'),
setTopic: bindApiCall(this, 'groups.setTopic'),
unarchive: bindApiCall(this, 'groups.unarchive'),
};
this.im = {
close: bindApiCall(this, 'im.close'),
history: bindApiCall(this, 'im.history'),
list: bindApiCall(this, 'im.list'),
mark: bindApiCall(this, 'im.mark'),
open: bindApiCall(this, 'im.open'),
replies: bindApiCall(this, 'im.replies'),
};
this.migration = {
exchange: bindApiCall(this, 'migration.exchange'),
};
this.mpim = {
close: bindApiCall(this, 'mpim.close'),
history: bindApiCall(this, 'mpim.history'),
list: bindApiCall(this, 'mpim.list'),
mark: bindApiCall(this, 'mpim.mark'),
open: bindApiCall(this, 'mpim.open'),
replies: bindApiCall(this, 'mpim.replies'),
};
this.oauth = {

@@ -381,2 +327,8 @@ access: bindApiCall(this, 'oauth.access'),

};
this.views = {
open: bindApiCall(this, 'views.open'),
publish: bindApiCall(this, 'views.publish'),
push: bindApiCall(this, 'views.push'),
update: bindApiCall(this, 'views.update'),
};
this.workflows = {

@@ -387,2 +339,56 @@ stepCompleted: bindApiCall(this, 'workflows.stepCompleted'),

};
// ---------------------------------
// Deprecated methods
// ---------------------------------
this.channels = {
archive: bindApiCall(this, 'channels.archive'),
create: bindApiCall(this, 'channels.create'),
history: bindApiCall(this, 'channels.history'),
info: bindApiCall(this, 'channels.info'),
invite: bindApiCall(this, 'channels.invite'),
join: bindApiCall(this, 'channels.join'),
kick: bindApiCall(this, 'channels.kick'),
leave: bindApiCall(this, 'channels.leave'),
list: bindApiCall(this, 'channels.list'),
mark: bindApiCall(this, 'channels.mark'),
rename: bindApiCall(this, 'channels.rename'),
replies: bindApiCall(this, 'channels.replies'),
setPurpose: bindApiCall(this, 'channels.setPurpose'),
setTopic: bindApiCall(this, 'channels.setTopic'),
unarchive: bindApiCall(this, 'channels.unarchive'),
};
this.groups = {
archive: bindApiCall(this, 'groups.archive'),
create: bindApiCall(this, 'groups.create'),
createChild: bindApiCall(this, 'groups.createChild'),
history: bindApiCall(this, 'groups.history'),
info: bindApiCall(this, 'groups.info'),
invite: bindApiCall(this, 'groups.invite'),
kick: bindApiCall(this, 'groups.kick'),
leave: bindApiCall(this, 'groups.leave'),
list: bindApiCall(this, 'groups.list'),
mark: bindApiCall(this, 'groups.mark'),
open: bindApiCall(this, 'groups.open'),
rename: bindApiCall(this, 'groups.rename'),
replies: bindApiCall(this, 'groups.replies'),
setPurpose: bindApiCall(this, 'groups.setPurpose'),
setTopic: bindApiCall(this, 'groups.setTopic'),
unarchive: bindApiCall(this, 'groups.unarchive'),
};
this.im = {
close: bindApiCall(this, 'im.close'),
history: bindApiCall(this, 'im.history'),
list: bindApiCall(this, 'im.list'),
mark: bindApiCall(this, 'im.mark'),
open: bindApiCall(this, 'im.open'),
replies: bindApiCall(this, 'im.replies'),
};
this.mpim = {
close: bindApiCall(this, 'mpim.close'),
history: bindApiCall(this, 'mpim.history'),
list: bindApiCall(this, 'mpim.list'),
mark: bindApiCall(this, 'mpim.mark'),
open: bindApiCall(this, 'mpim.open'),
replies: bindApiCall(this, 'mpim.replies'),
};
// Check that the class being created extends from `WebClient` rather than this class

@@ -389,0 +395,0 @@ if (new.target !== WebClient_1.WebClient && !(new.target.prototype instanceof WebClient_1.WebClient)) {

@@ -33,3 +33,4 @@ import { WebAPICallResult } from '../WebClient';

conversation_host_id?: string;
channel_email_addresses?: string[];
}
//# sourceMappingURL=AdminConversationsSearchResponse.d.ts.map
import { WebAPICallResult } from '../WebClient';
export declare type ConversationsCloseResponse = WebAPICallResult & {
ok?: boolean;
already_closed?: boolean;
no_op?: boolean;
error?: string;

@@ -5,0 +7,0 @@ needed?: string;

@@ -47,2 +47,3 @@ import { WebAPICallResult } from '../WebClient';

is_org_mandatory?: boolean;
connected_limited_team_ids?: string[];
}

@@ -49,0 +50,0 @@ export interface Purpose {

@@ -5,2 +5,4 @@ import { WebAPICallResult } from '../WebClient';

channel?: Channel;
no_op?: boolean;
already_open?: boolean;
error?: string;

@@ -7,0 +9,0 @@ needed?: string;

@@ -8,2 +8,3 @@ export { AdminAnalyticsGetFileResponse } from './AdminAnalyticsGetFileResponse';

export { AdminAppsRestrictedListResponse } from './AdminAppsRestrictedListResponse';
export { AdminAppsUninstallResponse } from './AdminAppsUninstallResponse';
export { AdminBarriersCreateResponse } from './AdminBarriersCreateResponse';

@@ -10,0 +11,0 @@ export { AdminBarriersDeleteResponse } from './AdminBarriersDeleteResponse';

@@ -134,2 +134,3 @@ import { WebAPICallResult } from '../WebClient';

is_mpim?: boolean;
score?: number;
}

@@ -136,0 +137,0 @@ export interface MatchAttachment {

@@ -32,2 +32,3 @@ import { WebAPICallResult } from '../WebClient';

is_mpim?: boolean;
score?: number;
}

@@ -34,0 +35,0 @@ export interface MatchAttachment {

@@ -31,3 +31,12 @@ import { WebAPICallResult } from '../WebClient';

is_email_confirmed?: boolean;
enterprise_user?: EnterpriseUser;
}
export interface EnterpriseUser {
id?: string;
enterprise_id?: string;
enterprise_name?: string;
is_admin?: boolean;
is_owner?: boolean;
teams?: string[];
}
export interface Profile {

@@ -34,0 +43,0 @@ title?: string;

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

const form_data_1 = __importDefault(require("form-data")); // tslint:disable-line:import-name
const is_electron_1 = __importDefault(require("is-electron"));
const methods_1 = require("./methods");

@@ -97,5 +98,3 @@ const instrument_1 = require("./instrument");

baseURL: slackApiUrl,
headers: Object.assign({
'User-Agent': instrument_1.getUserAgent(),
}, headers),
headers: is_electron_1.default() ? headers : Object.assign({ 'User-Agent': instrument_1.getUserAgent() }, headers),
httpAgent: agent,

@@ -126,2 +125,3 @@ httpsAgent: agent,

warnIfFallbackIsMissing(method, this.logger, options);
warnIfThreadTsIsNotString(method, this.logger, options);
if (typeof options === 'string' || typeof options === 'number' || typeof options === 'boolean') {

@@ -464,2 +464,3 @@ throw new TypeError(`Expected an options argument but instead received a ${typeof options}`);

* @param logger instance of we clients logger
* @param options arguments for the Web API method
*/

@@ -485,2 +486,15 @@ function warnIfFallbackIsMissing(method, logger, options) {

}
/**
* Log a warning when thread_ts is not a string
* @param method api method being called
* @param logger instance of web clients logger
* @param options arguments for the Web API method
*/
function warnIfThreadTsIsNotString(method, logger, options) {
const targetMethods = ['chat.postEphemeral', 'chat.postMessage', 'chat.scheduleMessage', 'files.upload'];
const isTargetMethod = targetMethods.includes(method);
if (isTargetMethod && (options === null || options === void 0 ? void 0 : options.thread_ts) !== undefined && typeof (options === null || options === void 0 ? void 0 : options.thread_ts) !== 'string') {
logger.warn(`The given thread_ts value in the request payload for a ${method} call is a float value. We highly recommend using a string value instead.`);
}
}
//# sourceMappingURL=WebClient.js.map
{
"name": "@slack/web-api",
"version": "6.2.0-rc.0",
"version": "6.2.0",
"description": "Official library for using the Slack Platform's Web API",

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

"p-queue": "^6.6.1",
"p-retry": "^4.0.0"
"p-retry": "^4.0.0",
"is-electron": "^2.2.0"
},

@@ -60,0 +61,0 @@ "devDependencies": {

Sorry, the diff of this file is too big to display

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

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc