Skip to main content
Module

x/slack_web_api/src/methods.ts

Slack Developer Kit for Node.js
Go to Latest
File
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709
// deno-lint-ignore-file camelcaseimport { Block, CallUser, Dialog, KnownBlock, LinkUnfurls, MessageAttachment, View } from "../deps.ts"import { WebAPICallOptions, WebAPICallResult, WebClient } from "./WebClient.ts"
// NOTE: could create a named type alias like data types like `SlackUserID: string`
/** * Binds a certain `method` and its arguments and result types to the `apiCall` method in `WebClient`. */function bindApiCall<Arguments extends WebAPICallOptions, Result extends WebAPICallResult>( self: Methods, method: string,): Method<Arguments, Result> { // We have to "assert" that the bound method does indeed return the more specific `Result` type instead of just // `WebAPICallResult` return self.apiCall.bind(self, method) as Method<Arguments, Result>}
/** * A class that defines all Web API methods, their arguments type, their response type, and binds those methods to the * `apiCall` class method. */export abstract class Methods extends EventTarget { // TODO: As of writing, `WebClient` already extends EventEmitter... // and I want WebClient to extend this class... // and multiple inheritance in JS is cursed... // so I'm just making this class extend EventEmitter. // // It shouldn't be here, indeed. Nothing here uses it, indeed. But it must be here for the sake of sanity.
protected constructor() { super()
// Check that the class being created extends from `WebClient` rather than this class if (new.target !== WebClient && !(new.target.prototype instanceof WebClient)) { throw new Error("Attempt to inherit from WebClient methods without inheriting from WebClient") } }
public abstract apiCall(method: string, options?: WebAPICallOptions): Promise<WebAPICallResult>
public readonly admin = { apps: { approve: bindApiCall<AdminAppsApproveArguments, WebAPICallResult>(this, "admin.apps.approve"), approved: { list: bindApiCall<AdminAppsApprovedListArguments, WebAPICallResult>(this, "admin.apps.approved.list"), }, requests: { list: bindApiCall<AdminAppsRequestsListArguments, WebAPICallResult>(this, "admin.apps.requests.list"), }, restrict: bindApiCall<AdminAppsRestrictArguments, WebAPICallResult>(this, "admin.apps.restrict"), restricted: { list: bindApiCall<AdminAppsRestrictedListArguments, WebAPICallResult>( this, "admin.apps.restricted.list", ), }, }, barriers: { create: bindApiCall<AdminBarriersCreateArguments, WebAPICallResult>(this, "admin.barriers.create"), delete: bindApiCall<AdminBarriersDeleteArguments, WebAPICallResult>(this, "admin.barriers.delete"), list: bindApiCall<AdminBarriersListArguments, WebAPICallResult>(this, "admin.barriers.list"), update: bindApiCall<AdminBarriersUpdateArguments, WebAPICallResult>(this, "admin.barriers.update"), }, conversations: { archive: bindApiCall<AdminConversationsArchiveArguments, WebAPICallResult>( this, "admin.conversations.archive", ), convertToPrivate: bindApiCall<AdminConversationsConvertToPrivateArguments, WebAPICallResult>( this, "admin.conversations.convertToPrivate", ), create: bindApiCall<AdminConversationsCreateArguments, WebAPICallResult>( this, "admin.conversations.create", ), delete: bindApiCall<AdminConversationsDeleteArguments, WebAPICallResult>( this, "admin.conversations.delete", ), disconnectShared: bindApiCall<AdminConversationsDisconnectSharedArguments, WebAPICallResult>( this, "admin.conversations.disconnectShared", ), ekm: { listOriginalConnectedChannelInfo: bindApiCall< AdminConversationsEKMListOriginalConnectedChannelInfoArguments, WebAPICallResult >( this, "admin.conversations.ekm.listOriginalConnectedChannelInfo", ), }, getConversationPrefs: bindApiCall<AdminConversationsGetConversationPrefsArguments, WebAPICallResult>( this, "admin.conversations.getConversationPrefs", ), getTeams: bindApiCall<AdminConversationsGetTeamsArguments, WebAPICallResult>( this, "admin.conversations.getTeams", ), invite: bindApiCall<AdminConversationsInviteArguments, WebAPICallResult>( this, "admin.conversations.invite", ), rename: bindApiCall<AdminConversationsRenameArguments, WebAPICallResult>( this, "admin.conversations.rename", ), restrictAccess: { addGroup: bindApiCall<AdminConversationsRestrictAccessAddGroupArguments, WebAPICallResult>( this, "admin.conversations.restrictAccess.addGroup", ), listGroups: bindApiCall<AdminConversationsRestrictAccessListGroupsArguments, WebAPICallResult>( this, "admin.conversations.restrictAccess.listGroups", ), removeGroup: bindApiCall<AdminConversationsRestrictAccessRemoveGroupArguments, WebAPICallResult>( this, "admin.conversations.restrictAccess.removeGroup", ), }, search: bindApiCall<AdminConversationsSearchArguments, WebAPICallResult>( this, "admin.conversations.search", ), setConversationPrefs: bindApiCall<AdminConversationsSetConversationPrefsArguments, WebAPICallResult>( this, "admin.conversations.setConversationPrefs", ), setTeams: bindApiCall<AdminConversationsSetTeamsArguments, WebAPICallResult>( this, "admin.conversations.setTeams", ), unarchive: bindApiCall<AdminConversationsUnarchiveArguments, WebAPICallResult>( this, "admin.conversations.unarchive", ), }, emoji: { add: bindApiCall<AdminEmojiAddArguments, WebAPICallResult>(this, "admin.emoji.add"), addAlias: bindApiCall<AdminEmojiAddAliasArguments, WebAPICallResult>(this, "admin.emoji.addAlias"), list: bindApiCall<AdminEmojiListArguments, WebAPICallResult>(this, "admin.emoji.list"), remove: bindApiCall<AdminEmojiRemoveArguments, WebAPICallResult>(this, "admin.emoji.remove"), rename: bindApiCall<AdminEmojiRenameArguments, WebAPICallResult>(this, "admin.emoji.rename"), }, inviteRequests: { approve: bindApiCall<AdminInviteRequestsApproveArguments, WebAPICallResult>( this, "admin.inviteRequests.approve", ), approved: { list: bindApiCall<AdminInviteRequestsApprovedListArguments, WebAPICallResult>( this, "admin.inviteRequests.approved.list", ), }, denied: { list: bindApiCall<AdminInviteRequestsDeniedListArguments, WebAPICallResult>( this, "admin.inviteRequests.denied.list", ), }, deny: bindApiCall<AdminInviteRequestsDenyArguments, WebAPICallResult>(this, "admin.inviteRequests.deny"), list: bindApiCall<AdminInviteRequestsListArguments, WebAPICallResult>(this, "admin.inviteRequests.list"), }, teams: { admins: { list: bindApiCall<AdminTeamsAdminsListArguments, WebAPICallResult>(this, "admin.teams.admins.list"), }, create: bindApiCall<AdminTeamsCreateArguments, WebAPICallResult>(this, "admin.teams.create"), list: bindApiCall<AdminTeamsListArguments, WebAPICallResult>(this, "admin.teams.list"), owners: { list: bindApiCall<AdminTeamsOwnersListArguments, WebAPICallResult>(this, "admin.teams.owners.list"), }, settings: { info: bindApiCall<AdminTeamsSettingsInfoArguments, WebAPICallResult>(this, "admin.teams.settings.info"), setDefaultChannels: bindApiCall<AdminTeamsSettingsSetDefaultChannelsArguments, WebAPICallResult>( this, "admin.teams.settings.setDefaultChannels", ), setDescription: bindApiCall<AdminTeamsSettingsSetDescriptionArguments, WebAPICallResult>( this, "admin.teams.settings.setDescription", ), setDiscoverability: bindApiCall<AdminTeamsSettingsSetDiscoverabilityArguments, WebAPICallResult>( this, "admin.teams.settings.setDiscoverability", ), setIcon: bindApiCall<AdminTeamsSettingsSetIconArguments, WebAPICallResult>( this, "admin.teams.settings.setIcon", ), setName: bindApiCall<AdminTeamsSettingsSetNameArguments, WebAPICallResult>( this, "admin.teams.settings.setName", ), }, }, usergroups: { addChannels: bindApiCall<AdminUsergroupsAddChannelsArguments, WebAPICallResult>( this, "admin.usergroups.addChannels", ), addTeams: bindApiCall<AdminUsergroupsAddTeamsArguments, WebAPICallResult>( this, "admin.usergroups.addTeams", ), listChannels: bindApiCall<AdminUsergroupsListChannelsArguments, WebAPICallResult>( this, "admin.usergroups.listChannels", ), removeChannels: bindApiCall<AdminUsergroupsRemoveChannelsArguments, WebAPICallResult>( this, "admin.usergroups.removeChannels", ), }, users: { assign: bindApiCall<AdminUsersAssignArguments, WebAPICallResult>(this, "admin.users.assign"), invite: bindApiCall<AdminUsersInviteArguments, WebAPICallResult>(this, "admin.users.invite"), list: bindApiCall<AdminUsersListArguments, WebAPICallResult>(this, "admin.users.list"), remove: bindApiCall<AdminUsersRemoveArguments, WebAPICallResult>(this, "admin.users.remove"), session: { list: bindApiCall<AdminUsersSessionListArguments, WebAPICallResult>(this, "admin.users.session.list"), reset: bindApiCall<AdminUsersSessionResetArguments, WebAPICallResult>( this, "admin.users.session.reset", ), invalidate: bindApiCall<AdminUsersSessionInvalidateArguments, WebAPICallResult>( this, "admin.users.session.invalidate", ), }, setAdmin: bindApiCall<AdminUsersSetAdminArguments, WebAPICallResult>(this, "admin.users.setAdmin"), setExpiration: bindApiCall<AdminUsersSetExpirationArguments, WebAPICallResult>( this, "admin.users.setExpiration", ), setOwner: bindApiCall<AdminUsersSetOwnerArguments, WebAPICallResult>(this, "admin.users.setOwner"), setRegular: bindApiCall<AdminUsersSetRegularArguments, WebAPICallResult>(this, "admin.users.setRegular"), }, }
public readonly api = { test: bindApiCall<WebAPICallOptions, WebAPICallResult>(this, "api.test"), }
public readonly apps = { connections: { open: bindApiCall<WebAPICallOptions, WebAPICallResult>(this, "apps.connections.open"), }, event: { authorizations: { list: bindApiCall<AppsEventAuthorizationsListArguments, WebAPICallResult>( this, "apps.event.authorizations.list", ), }, }, uninstall: bindApiCall<AppsUninstallArguments, WebAPICallResult>(this, "apps.uninstall"), }
public readonly auth = { revoke: bindApiCall<AuthRevokeArguments, WebAPICallResult>(this, "auth.revoke"), teams: { list: bindApiCall<AuthTeamsListArguments, WebAPICallResult>(this, "auth.teams.list"), }, test: bindApiCall<AuthTestArguments, WebAPICallResult>(this, "auth.test"), }
public readonly bots = { info: bindApiCall<BotsInfoArguments, WebAPICallResult>(this, "bots.info"), }
public readonly calls = { add: bindApiCall<CallsAddArguments, WebAPICallResult>(this, "calls.add"), end: bindApiCall<CallsEndArguments, WebAPICallResult>(this, "calls.end"), info: bindApiCall<CallsInfoArguments, WebAPICallResult>(this, "calls.info"), update: bindApiCall<CallsUpdateArguments, WebAPICallResult>(this, "calls.update"), participants: { add: bindApiCall<CallsParticipantsAddArguments, WebAPICallResult>(this, "calls.participants.add"), remove: bindApiCall<CallsParticipantsRemoveArguments, WebAPICallResult>(this, "calls.participants.remove"), }, }
public readonly channels = { archive: bindApiCall<ChannelsArchiveArguments, WebAPICallResult>(this, "channels.archive"), create: bindApiCall<ChannelsCreateArguments, WebAPICallResult>(this, "channels.create"), history: bindApiCall<ChannelsHistoryArguments, WebAPICallResult>(this, "channels.history"), info: bindApiCall<ChannelsInfoArguments, WebAPICallResult>(this, "channels.info"), invite: bindApiCall<ChannelsInviteArguments, WebAPICallResult>(this, "channels.invite"), join: bindApiCall<ChannelsJoinArguments, WebAPICallResult>(this, "channels.join"), kick: bindApiCall<ChannelsKickArguments, WebAPICallResult>(this, "channels.kick"), leave: bindApiCall<ChannelsLeaveArguments, WebAPICallResult>(this, "channels.leave"), list: bindApiCall<ChannelsListArguments, WebAPICallResult>(this, "channels.list"), mark: bindApiCall<ChannelsMarkArguments, WebAPICallResult>(this, "channels.mark"), rename: bindApiCall<ChannelsRenameArguments, WebAPICallResult>(this, "channels.rename"), replies: bindApiCall<ChannelsRepliesArguments, WebAPICallResult>(this, "channels.replies"), setPurpose: bindApiCall<ChannelsSetPurposeArguments, WebAPICallResult>(this, "channels.setPurpose"), setTopic: bindApiCall<ChannelsSetTopicArguments, WebAPICallResult>(this, "channels.setTopic"), unarchive: bindApiCall<ChannelsUnarchiveArguments, WebAPICallResult>(this, "channels.unarchive"), }
public readonly chat = { delete: bindApiCall<ChatDeleteArguments, WebAPICallResult>(this, "chat.delete"), deleteScheduledMessage: bindApiCall<ChatDeleteScheduledMessageArguments, WebAPICallResult>( this, "chat.deleteScheduledMessage", ), getPermalink: bindApiCall<ChatGetPermalinkArguments, WebAPICallResult>(this, "chat.getPermalink"), meMessage: bindApiCall<ChatMeMessageArguments, WebAPICallResult>(this, "chat.meMessage"), postEphemeral: bindApiCall<ChatPostEphemeralArguments, WebAPICallResult>(this, "chat.postEphemeral"), postMessage: bindApiCall<ChatPostMessageArguments, WebAPICallResult>(this, "chat.postMessage"), scheduleMessage: bindApiCall<ChatScheduleMessageArguments, WebAPICallResult>(this, "chat.scheduleMessage"), scheduledMessages: { list: bindApiCall<ChatScheduledMessagesListArguments, WebAPICallResult>( this, "chat.scheduledMessages.list", ), }, unfurl: bindApiCall<ChatUnfurlArguments, WebAPICallResult>(this, "chat.unfurl"), update: bindApiCall<ChatUpdateArguments, WebAPICallResult>(this, "chat.update"), }
public readonly conversations = { archive: bindApiCall<ConversationsArchiveArguments, WebAPICallResult>(this, "conversations.archive"), close: bindApiCall<ConversationsCloseArguments, WebAPICallResult>(this, "conversations.close"), create: bindApiCall<ConversationsCreateArguments, WebAPICallResult>(this, "conversations.create"), history: bindApiCall<ConversationsHistoryArguments, WebAPICallResult>(this, "conversations.history"), info: bindApiCall<ConversationsInfoArguments, WebAPICallResult>(this, "conversations.info"), invite: bindApiCall<ConversationsInviteArguments, WebAPICallResult>(this, "conversations.invite"), join: bindApiCall<ConversationsJoinArguments, WebAPICallResult>(this, "conversations.join"), kick: bindApiCall<ConversationsKickArguments, WebAPICallResult>(this, "conversations.kick"), leave: bindApiCall<ConversationsLeaveArguments, WebAPICallResult>(this, "conversations.leave"), list: bindApiCall<ConversationsListArguments, WebAPICallResult>(this, "conversations.list"), mark: bindApiCall<ConversationsMarkArguments, WebAPICallResult>(this, "conversations.mark"), members: bindApiCall<ConversationsMembersArguments, WebAPICallResult>(this, "conversations.members"), open: bindApiCall<ConversationsOpenArguments, WebAPICallResult>(this, "conversations.open"), rename: bindApiCall<ConversationsRenameArguments, WebAPICallResult>(this, "conversations.rename"), replies: bindApiCall<ConversationsRepliesArguments, WebAPICallResult>(this, "conversations.replies"), setPurpose: bindApiCall<ConversationsSetPurposeArguments, WebAPICallResult>(this, "conversations.setPurpose"), setTopic: bindApiCall<ConversationsSetTopicArguments, WebAPICallResult>(this, "conversations.setTopic"), unarchive: bindApiCall<ConversationsUnarchiveArguments, WebAPICallResult>(this, "conversations.unarchive"), }
public readonly views = { open: bindApiCall<ViewsOpenArguments, WebAPICallResult>(this, "views.open"), publish: bindApiCall<ViewsPublishArguments, WebAPICallResult>(this, "views.publish"), push: bindApiCall<ViewsPushArguments, WebAPICallResult>(this, "views.push"), update: bindApiCall<ViewsUpdateArguments, WebAPICallResult>(this, "views.update"), }
public readonly dialog = { open: bindApiCall<DialogOpenArguments, WebAPICallResult>(this, "dialog.open"), }
public readonly dnd = { endDnd: bindApiCall<DndEndDndArguments, WebAPICallResult>(this, "dnd.endDnd"), endSnooze: bindApiCall<DndEndSnoozeArguments, WebAPICallResult>(this, "dnd.endSnooze"), info: bindApiCall<DndInfoArguments, WebAPICallResult>(this, "dnd.info"), setSnooze: bindApiCall<DndSetSnoozeArguments, WebAPICallResult>(this, "dnd.setSnooze"), teamInfo: bindApiCall<DndTeamInfoArguments, WebAPICallResult>(this, "dnd.teamInfo"), }
public readonly emoji = { list: bindApiCall<EmojiListArguments, WebAPICallResult>(this, "emoji.list"), }
public readonly files = { delete: bindApiCall<FilesDeleteArguments, WebAPICallResult>(this, "files.delete"), info: bindApiCall<FilesInfoArguments, WebAPICallResult>(this, "files.info"), list: bindApiCall<FilesListArguments, WebAPICallResult>(this, "files.list"), revokePublicURL: bindApiCall<FilesRevokePublicURLArguments, WebAPICallResult>(this, "files.revokePublicURL"), sharedPublicURL: bindApiCall<FilesSharedPublicURLArguments, WebAPICallResult>(this, "files.sharedPublicURL"), upload: bindApiCall<FilesUploadArguments, WebAPICallResult>(this, "files.upload"), comments: { delete: bindApiCall<FilesCommentsDeleteArguments, WebAPICallResult>(this, "files.comments.delete"), }, remote: { info: bindApiCall<FilesRemoteInfoArguments, WebAPICallResult>(this, "files.remote.info"), list: bindApiCall<FilesRemoteListArguments, WebAPICallResult>(this, "files.remote.list"), add: bindApiCall<FilesRemoteAddArguments, WebAPICallResult>(this, "files.remote.add"), update: bindApiCall<FilesRemoteUpdateArguments, WebAPICallResult>(this, "files.remote.update"), remove: bindApiCall<FilesRemoteRemoveArguments, WebAPICallResult>(this, "files.remote.remove"), share: bindApiCall<FilesRemoteShareArguments, WebAPICallResult>(this, "files.remote.share"), }, }
public readonly groups = { archive: bindApiCall<GroupsArchiveArguments, WebAPICallResult>(this, "groups.archive"), create: bindApiCall<GroupsCreateArguments, WebAPICallResult>(this, "groups.create"), createChild: bindApiCall<GroupsCreateChildArguments, WebAPICallResult>(this, "groups.createChild"), history: bindApiCall<GroupsHistoryArguments, WebAPICallResult>(this, "groups.history"), info: bindApiCall<GroupsInfoArguments, WebAPICallResult>(this, "groups.info"), invite: bindApiCall<GroupsInviteArguments, WebAPICallResult>(this, "groups.invite"), kick: bindApiCall<GroupsKickArguments, WebAPICallResult>(this, "groups.kick"), leave: bindApiCall<GroupsLeaveArguments, WebAPICallResult>(this, "groups.leave"), list: bindApiCall<GroupsListArguments, WebAPICallResult>(this, "groups.list"), mark: bindApiCall<GroupsMarkArguments, WebAPICallResult>(this, "groups.mark"), open: bindApiCall<GroupsOpenArguments, WebAPICallResult>(this, "groups.open"), rename: bindApiCall<GroupsRenameArguments, WebAPICallResult>(this, "groups.rename"), replies: bindApiCall<GroupsRepliesArguments, WebAPICallResult>(this, "groups.replies"), setPurpose: bindApiCall<GroupsSetPurposeArguments, WebAPICallResult>(this, "groups.setPurpose"), setTopic: bindApiCall<GroupsSetTopicArguments, WebAPICallResult>(this, "groups.setTopic"), unarchive: bindApiCall<GroupsUnarchiveArguments, WebAPICallResult>(this, "groups.unarchive"), }
public readonly im = { close: bindApiCall<IMCloseArguments, WebAPICallResult>(this, "im.close"), history: bindApiCall<IMHistoryArguments, WebAPICallResult>(this, "im.history"), list: bindApiCall<IMListArguments, WebAPICallResult>(this, "im.list"), mark: bindApiCall<IMMarkArguments, WebAPICallResult>(this, "im.mark"), open: bindApiCall<IMOpenArguments, WebAPICallResult>(this, "im.open"), replies: bindApiCall<IMRepliesArguments, WebAPICallResult>(this, "im.replies"), }
public readonly migration = { exchange: bindApiCall<MigrationExchangeArguments, WebAPICallResult>(this, "migration.exchange"), }
public readonly mpim = { close: bindApiCall<MPIMCloseArguments, WebAPICallResult>(this, "mpim.close"), history: bindApiCall<MPIMHistoryArguments, WebAPICallResult>(this, "mpim.history"), list: bindApiCall<MPIMListArguments, WebAPICallResult>(this, "mpim.list"), mark: bindApiCall<MPIMMarkArguments, WebAPICallResult>(this, "mpim.mark"), open: bindApiCall<MPIMOpenArguments, WebAPICallResult>(this, "mpim.open"), replies: bindApiCall<MPIMRepliesArguments, WebAPICallResult>(this, "mpim.replies"), }
public readonly oauth = { access: bindApiCall<OAuthAccessArguments, WebAPICallResult>(this, "oauth.access"), v2: { access: bindApiCall<OAuthV2AccessArguments, WebAPICallResult>(this, "oauth.v2.access"), }, }
public readonly pins = { add: bindApiCall<PinsAddArguments, WebAPICallResult>(this, "pins.add"), list: bindApiCall<PinsListArguments, WebAPICallResult>(this, "pins.list"), remove: bindApiCall<PinsRemoveArguments, WebAPICallResult>(this, "pins.remove"), }
public readonly reactions = { add: bindApiCall<ReactionsAddArguments, WebAPICallResult>(this, "reactions.add"), get: bindApiCall<ReactionsGetArguments, WebAPICallResult>(this, "reactions.get"), list: bindApiCall<ReactionsListArguments, WebAPICallResult>(this, "reactions.list"), remove: bindApiCall<ReactionsRemoveArguments, WebAPICallResult>(this, "reactions.remove"), }
public readonly reminders = { add: bindApiCall<RemindersAddArguments, WebAPICallResult>(this, "reminders.add"), complete: bindApiCall<RemindersCompleteArguments, WebAPICallResult>(this, "reminders.complete"), delete: bindApiCall<RemindersDeleteArguments, WebAPICallResult>(this, "reminders.delete"), info: bindApiCall<RemindersInfoArguments, WebAPICallResult>(this, "reminders.info"), list: bindApiCall<RemindersListArguments, WebAPICallResult>(this, "reminders.list"), }
public readonly rtm = { connect: bindApiCall<RTMConnectArguments, WebAPICallResult>(this, "rtm.connect"), start: bindApiCall<RTMStartArguments, WebAPICallResult>(this, "rtm.start"), }
public readonly search = { all: bindApiCall<SearchAllArguments, WebAPICallResult>(this, "search.all"), files: bindApiCall<SearchFilesArguments, WebAPICallResult>(this, "search.files"), messages: bindApiCall<SearchMessagesArguments, WebAPICallResult>(this, "search.messages"), }
public readonly stars = { add: bindApiCall<StarsAddArguments, WebAPICallResult>(this, "stars.add"), list: bindApiCall<StarsListArguments, WebAPICallResult>(this, "stars.list"), remove: bindApiCall<StarsRemoveArguments, WebAPICallResult>(this, "stars.remove"), }
public readonly team = { accessLogs: bindApiCall<TeamAccessLogsArguments, WebAPICallResult>(this, "team.accessLogs"), billableInfo: bindApiCall<TeamBillableInfoArguments, WebAPICallResult>(this, "team.billableInfo"), info: bindApiCall<TeamInfoArguments, WebAPICallResult>(this, "team.info"), integrationLogs: bindApiCall<TeamIntegrationLogsArguments, WebAPICallResult>(this, "team.integrationLogs"), profile: { get: bindApiCall<TeamProfileGetArguments, WebAPICallResult>(this, "team.profile.get"), }, }
public readonly usergroups = { create: bindApiCall<UsergroupsCreateArguments, WebAPICallResult>(this, "usergroups.create"), disable: bindApiCall<UsergroupsDisableArguments, WebAPICallResult>(this, "usergroups.disable"), enable: bindApiCall<UsergroupsEnableArguments, WebAPICallResult>(this, "usergroups.enable"), list: bindApiCall<UsergroupsListArguments, WebAPICallResult>(this, "usergroups.list"), update: bindApiCall<UsergroupsUpdateArguments, WebAPICallResult>(this, "usergroups.update"), users: { list: bindApiCall<UsergroupsUsersListArguments, WebAPICallResult>(this, "usergroups.users.list"), update: bindApiCall<UsergroupsUsersUpdateArguments, WebAPICallResult>(this, "usergroups.users.update"), }, }
public readonly users = { conversations: bindApiCall<UsersConversationsArguments, WebAPICallResult>(this, "users.conversations"), deletePhoto: bindApiCall<UsersDeletePhotoArguments, WebAPICallResult>(this, "users.deletePhoto"), getPresence: bindApiCall<UsersGetPresenceArguments, WebAPICallResult>(this, "users.getPresence"), identity: bindApiCall<UsersIdentityArguments, WebAPICallResult>(this, "users.identity"), info: bindApiCall<UsersInfoArguments, WebAPICallResult>(this, "users.info"), list: bindApiCall<UsersListArguments, WebAPICallResult>(this, "users.list"), lookupByEmail: bindApiCall<UsersLookupByEmailArguments, WebAPICallResult>(this, "users.lookupByEmail"), setPhoto: bindApiCall<UsersSetPhotoArguments, WebAPICallResult>(this, "users.setPhoto"), setPresence: bindApiCall<UsersSetPresenceArguments, WebAPICallResult>(this, "users.setPresence"), profile: { get: bindApiCall<UsersProfileGetArguments, WebAPICallResult>(this, "users.profile.get"), set: bindApiCall<UsersProfileSetArguments, WebAPICallResult>(this, "users.profile.set"), }, }
public readonly workflows = { stepCompleted: bindApiCall<WorkflowsStepCompletedArguments, WebAPICallResult>(this, "workflows.stepCompleted"), stepFailed: bindApiCall<WorkflowsStepFailedArguments, WebAPICallResult>(this, "workflows.stepFailed"), updateStep: bindApiCall<WorkflowsUpdateStepArguments, WebAPICallResult>(this, "workflows.updateStep"), }}
/** * Generic method definition */export default interface Method< MethodArguments extends WebAPICallOptions, MethodResult extends WebAPICallResult = WebAPICallResult,> { (options?: MethodArguments): Promise<MethodResult>}
/* * Reusable "protocols" that some MethodArguments types can conform to */export interface TokenOverridable { token?: string}
export interface LocaleAware { include_locale?: boolean}
export interface Searchable { query: string highlight?: boolean sort: "score" | "timestamp" sort_dir: "asc" | "desc" team_id?: string}
// A set of method names is initialized here and added to each time an argument type extends the CursorPaginationEnabled// interface, so that methods are checked against this set when using the pagination helper. If the method name is not// found, a warning is emitted to guide the developer to using the method correctly.export const cursorPaginationEnabledMethods: Set<string> = new Set()export interface CursorPaginationEnabled { limit?: number // natural integer, max of 1000 cursor?: string // find this in a response's `response_metadata.next_cursor`}
export interface TimelinePaginationEnabled { oldest?: string latest?: string inclusive?: boolean}
export interface TraditionalPagingEnabled { page?: number // default: 1 count?: number // default: 100}
/* * MethodArguments types (no formal relationship other than the generic constraint in Method<>) */
/* * `admin.*` */export interface AdminAppsApproveArguments extends WebAPICallOptions, TokenOverridable { app_id?: string request_id?: string team_id?: string}export interface AdminAppsApprovedListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { team_id?: string enterprise_id?: string}cursorPaginationEnabledMethods.add("admin.apps.approved.list")export interface AdminAppsRequestsListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { team_id?: string}cursorPaginationEnabledMethods.add("admin.apps.requests.list")export interface AdminAppsRestrictArguments extends WebAPICallOptions, TokenOverridable { app_id?: string request_id?: string team_id?: string}export interface AdminAppsRestrictedListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { team_id?: string enterprise_id?: string}cursorPaginationEnabledMethods.add("admin.apps.restricted.list")
export interface AdminBarriersCreateArguments extends WebAPICallOptions, TokenOverridable { barriered_from_usergroup_ids: string[] primary_usergroup_id: string restricted_subjects: string[]}
export interface AdminBarriersDeleteArguments extends WebAPICallOptions, TokenOverridable { barrier_id: string}
export interface AdminBarriersListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled {}cursorPaginationEnabledMethods.add("admin.barriers.list")
export interface AdminBarriersUpdateArguments extends WebAPICallOptions, TokenOverridable { barrier_id: string barriered_from_usergroup_ids: string[] primary_usergroup_id: string restricted_subjects: string[]}
export interface AdminConversationsArchiveArguments extends WebAPICallOptions, TokenOverridable { channel_id: string}export interface AdminConversationsConvertToPrivateArguments extends WebAPICallOptions, TokenOverridable { channel_id: string}export interface AdminConversationsCreateArguments extends WebAPICallOptions, TokenOverridable { is_private: boolean name: string description?: string org_wide?: boolean team_id?: string}export interface AdminConversationsDeleteArguments extends WebAPICallOptions, TokenOverridable { channel_id: string}export interface AdminConversationsDisconnectSharedArguments extends WebAPICallOptions, TokenOverridable { channel_id: string leaving_team_ids?: string[]}export interface AdminConversationsEKMListOriginalConnectedChannelInfoArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled{ channel_ids?: string[] team_ids?: string[]}cursorPaginationEnabledMethods.add("admin.conversations.ekm.listOriginalConnectedChannelInfo")export interface AdminConversationsGetConversationPrefsArguments extends WebAPICallOptions, TokenOverridable { channel_id: string}export interface AdminConversationsGetTeamsArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled{ channel_id: string}cursorPaginationEnabledMethods.add("admin.conversations.getTeams")export interface AdminConversationsInviteArguments extends WebAPICallOptions, TokenOverridable { channel_id: string user_ids: string[]}export interface AdminConversationsRenameArguments extends WebAPICallOptions, TokenOverridable { channel_id: string name: string}export interface AdminConversationsRestrictAccessAddGroupArguments extends WebAPICallOptions, TokenOverridable { channel_id: string group_id: string team_id?: string}export interface AdminConversationsRestrictAccessListGroupsArguments extends WebAPICallOptions, TokenOverridable { channel_id: string team_id?: string}export interface AdminConversationsRestrictAccessRemoveGroupArguments extends WebAPICallOptions, TokenOverridable { channel_id: string group_id: string team_id: string}export interface AdminConversationsSearchArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled{ query?: string search_channel_types?: string[] sort?: "relevant" | "name" | "member_count" | "created" sort_dir?: "asc" | "desc" team_ids?: string[]}cursorPaginationEnabledMethods.add("admin.conversations.search")export interface AdminConversationsSetConversationPrefsArguments extends WebAPICallOptions, TokenOverridable { channel_id: string prefs: Record<string, unknown> // TODO: we should be more specific here}export interface AdminConversationsSetTeamsArguments extends WebAPICallOptions, TokenOverridable { channel_id: string team_id?: string target_team_ids?: string[] org_channel?: boolean}export interface AdminConversationsUnarchiveArguments extends WebAPICallOptions, TokenOverridable { channel_id: string}export interface AdminEmojiAddArguments extends WebAPICallOptions, TokenOverridable { name: string url: string}export interface AdminEmojiAddAliasArguments extends WebAPICallOptions, TokenOverridable { name: string alias_for: string}export interface AdminEmojiListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled {}cursorPaginationEnabledMethods.add("admin.emoji.list")export interface AdminEmojiRemoveArguments extends WebAPICallOptions, TokenOverridable { name: string}export interface AdminEmojiRenameArguments extends WebAPICallOptions, TokenOverridable { name: string new_name: string}export interface AdminInviteRequestsApproveArguments extends WebAPICallOptions, TokenOverridable { invite_request_id: string team_id: string}export interface AdminInviteRequestsApprovedListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled{ team_id: string}cursorPaginationEnabledMethods.add("admin.inviteRequests.approved.list")export interface AdminInviteRequestsDenyArguments extends WebAPICallOptions, TokenOverridable { invite_request_id: string team_id: string}export interface AdminInviteRequestsDeniedListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled{ team_id: string}cursorPaginationEnabledMethods.add("admin.inviteRequests.denied.list")export interface AdminInviteRequestsListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { team_id: string}cursorPaginationEnabledMethods.add("admin.inviteRequests.list")export interface AdminTeamsAdminsListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { team_id: string}cursorPaginationEnabledMethods.add("admin.teams.admins.list")export interface AdminTeamsCreateArguments extends WebAPICallOptions, TokenOverridable { team_domain: string team_name: string team_description?: string team_discoverability?: string}export interface AdminTeamsListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled {}cursorPaginationEnabledMethods.add("admin.teams.list")export interface AdminTeamsOwnersListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { team_id: string}cursorPaginationEnabledMethods.add("admin.teams.owners.list")export interface AdminTeamsSettingsInfoArguments extends WebAPICallOptions, TokenOverridable { team_id: string}export interface AdminTeamsSettingsSetDefaultChannelsArguments extends WebAPICallOptions, TokenOverridable { team_id: string channel_ids: string[]}export interface AdminTeamsSettingsSetDescriptionArguments extends WebAPICallOptions, TokenOverridable { team_id: string description: string}export interface AdminTeamsSettingsSetDiscoverabilityArguments extends WebAPICallOptions, TokenOverridable { team_id: string discoverability: "open" | "invite_only" | "closed" | "unlisted"}export interface AdminTeamsSettingsSetIconArguments extends WebAPICallOptions, TokenOverridable { team_id: string image_url: string}export interface AdminTeamsSettingsSetNameArguments extends WebAPICallOptions, TokenOverridable { team_id: string name: string}export interface AdminUsergroupsAddChannelsArguments extends WebAPICallOptions, TokenOverridable { usergroup_id: string team_id?: string channel_ids: string | string[]}export interface AdminUsergroupsAddTeamsArguments extends WebAPICallOptions, TokenOverridable { usergroup_id: string team_ids: string | string[] auto_provision?: boolean}export interface AdminUsergroupsListChannelsArguments extends WebAPICallOptions, TokenOverridable { usergroup_id: string include_num_members?: boolean team_id?: string}export interface AdminUsergroupsRemoveChannelsArguments extends WebAPICallOptions, TokenOverridable { usergroup_id: string channel_ids: string | string[]}export interface AdminUsersAssignArguments extends WebAPICallOptions, TokenOverridable { team_id: string user_id: string is_restricted?: boolean is_ultra_restricted?: boolean}export interface AdminUsersInviteArguments extends WebAPICallOptions, TokenOverridable { channel_ids: string email: string team_id: string custom_message?: string guest_expiration_ts?: string is_restricted?: boolean is_ultra_restricted?: boolean real_name?: string resend?: boolean}export interface AdminUsersListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { team_id: string}cursorPaginationEnabledMethods.add("admin.users.list")export interface AdminUsersRemoveArguments extends WebAPICallOptions, TokenOverridable { team_id: string user_id: string}export interface AdminUsersSetAdminArguments extends WebAPICallOptions, TokenOverridable { team_id: string user_id: string}export interface AdminUsersSetExpirationArguments extends WebAPICallOptions, TokenOverridable { team_id: string user_id: string expiration_ts: number}export interface AdminUsersSetOwnerArguments extends WebAPICallOptions, TokenOverridable { team_id: string user_id: string}export interface AdminUsersSetRegularArguments extends WebAPICallOptions, TokenOverridable { team_id: string user_id: string}cursorPaginationEnabledMethods.add("admin.users.session.list")export interface AdminUsersSessionListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { user_id?: string team_id?: string}export interface AdminUsersSessionResetArguments extends WebAPICallOptions, TokenOverridable { user_id: string mobile_only?: boolean web_only?: boolean}export interface AdminUsersSessionInvalidateArguments extends WebAPICallOptions, TokenOverridable { session_id: string team_id: string}export interface AppsEventAuthorizationsListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled{ event_context: string}cursorPaginationEnabledMethods.add("apps.event.authorizations.list")export interface AppsUninstallArguments extends WebAPICallOptions { client_id: string client_secret: string}
/* * `auth.*` */export interface AuthRevokeArguments extends WebAPICallOptions, TokenOverridable { test: boolean}export interface AuthTeamsListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { include_icon?: boolean}cursorPaginationEnabledMethods.add("auth.teams.list")export interface AuthTestArguments extends WebAPICallOptions, TokenOverridable {}
/* * `bots.*` */export interface BotsInfoArguments extends WebAPICallOptions, TokenOverridable { bot?: string team_id?: string}
/** `calls.*`*/export interface CallsAddArguments extends WebAPICallOptions, TokenOverridable { external_unique_id: string join_url: string created_by?: string date_start?: number desktop_app_join_url?: string external_display_id?: string title?: string users?: CallUser[]}
export interface CallsEndArguments extends WebAPICallOptions, TokenOverridable { id: string duration?: number}
export interface CallsInfoArguments extends WebAPICallOptions, TokenOverridable { id: string}
export interface CallsUpdateArguments extends WebAPICallOptions, TokenOverridable { id: string join_url?: string desktop_app_join_url?: string title?: string}
export interface CallsParticipantsAddArguments extends WebAPICallOptions, TokenOverridable { id: string users: CallUser[]}
export interface CallsParticipantsRemoveArguments extends WebAPICallOptions, TokenOverridable { id: string users: CallUser[]}
/* * `channels.*` */export interface ChannelsArchiveArguments extends WebAPICallOptions, TokenOverridable { channel: string}
export interface ChannelsCreateArguments extends WebAPICallOptions, TokenOverridable { name: string validate?: boolean team_id?: string}export interface ChannelsHistoryArguments extends WebAPICallOptions, TokenOverridable, TimelinePaginationEnabled { channel: string count?: number unreads?: boolean}export interface ChannelsInfoArguments extends WebAPICallOptions, TokenOverridable, LocaleAware { channel: string}export interface ChannelsInviteArguments extends WebAPICallOptions, TokenOverridable { channel: string user: string}export interface ChannelsJoinArguments extends WebAPICallOptions, TokenOverridable { name: string validate?: boolean}export interface ChannelsKickArguments extends WebAPICallOptions, TokenOverridable { channel: string user: string}export interface ChannelsLeaveArguments extends WebAPICallOptions, TokenOverridable { channel: string}export interface ChannelsListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { exclude_archived?: boolean exclude_members?: boolean team_id?: string}cursorPaginationEnabledMethods.add("channels.list")export interface ChannelsMarkArguments extends WebAPICallOptions, TokenOverridable { channel: string ts: string}export interface ChannelsRenameArguments extends WebAPICallOptions, TokenOverridable { channel: string name: string validate?: boolean}export interface ChannelsRepliesArguments extends WebAPICallOptions, TokenOverridable { channel: string thread_ts: string}export interface ChannelsSetPurposeArguments extends WebAPICallOptions, TokenOverridable { channel: string purpose: string}export interface ChannelsSetTopicArguments extends WebAPICallOptions, TokenOverridable { channel: string topic: string}export interface ChannelsUnarchiveArguments extends WebAPICallOptions, TokenOverridable { channel: string}
/* * `chat.*` */export interface ChatDeleteArguments extends WebAPICallOptions, TokenOverridable { channel: string ts: string as_user?: boolean}export interface ChatDeleteScheduledMessageArguments extends WebAPICallOptions, TokenOverridable { channel: string scheduled_message_id: string as_user?: boolean}export interface ChatGetPermalinkArguments extends WebAPICallOptions, TokenOverridable { channel: string message_ts: string}export interface ChatMeMessageArguments extends WebAPICallOptions, TokenOverridable { channel: string text: string}export interface ChatPostEphemeralArguments extends WebAPICallOptions, TokenOverridable { channel: string text: string user: string as_user?: boolean attachments?: MessageAttachment[] blocks?: (KnownBlock | Block)[] link_names?: boolean parse?: "full" | "none"}export interface ChatPostMessageArguments extends WebAPICallOptions, TokenOverridable { channel: string text: string as_user?: boolean attachments?: MessageAttachment[] blocks?: (KnownBlock | Block)[] icon_emoji?: string // if specified, as_user must be false icon_url?: string link_names?: boolean mrkdwn?: boolean parse?: "full" | "none" reply_broadcast?: boolean // if specified, thread_ts must be set thread_ts?: string unfurl_links?: boolean unfurl_media?: boolean username?: string // if specified, as_user must be false}export interface ChatScheduleMessageArguments extends WebAPICallOptions, TokenOverridable { channel: string text: string post_at: string as_user?: boolean attachments?: MessageAttachment[] blocks?: (KnownBlock | Block)[] link_names?: boolean parse?: "full" | "none" reply_broadcast?: boolean // if specified, thread_ts must be set thread_ts?: string unfurl_links?: boolean unfurl_media?: boolean team_id?: string}export interface ChatScheduledMessagesListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled{ channel: string latest: number oldest: number}cursorPaginationEnabledMethods.add("chat.scheduledMessages.list")export interface ChatUnfurlArguments extends WebAPICallOptions, TokenOverridable { channel: string ts: string unfurls: LinkUnfurls user_auth_message?: string user_auth_required?: boolean user_auth_url?: string}export interface ChatUpdateArguments extends WebAPICallOptions, TokenOverridable { channel: string text: string ts: string as_user?: boolean attachments?: MessageAttachment[] blocks?: (KnownBlock | Block)[] link_names?: boolean parse?: "full" | "none"}
/* * `conversations.*` */export interface ConversationsArchiveArguments extends WebAPICallOptions, TokenOverridable { channel: string}export interface ConversationsCloseArguments extends WebAPICallOptions, TokenOverridable { channel: string}export interface ConversationsCreateArguments extends WebAPICallOptions, TokenOverridable { name: string is_private?: boolean team_id?: string}export interface ConversationsHistoryArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled, TimelinePaginationEnabled{ channel: string}cursorPaginationEnabledMethods.add("conversations.history")export interface ConversationsInfoArguments extends WebAPICallOptions, TokenOverridable, LocaleAware { channel: string}export interface ConversationsInviteArguments extends WebAPICallOptions, TokenOverridable { channel: string users: string // comma-separated list of users}export interface ConversationsJoinArguments extends WebAPICallOptions, TokenOverridable { channel: string}export interface ConversationsKickArguments extends WebAPICallOptions, TokenOverridable { channel: string user: string}export interface ConversationsLeaveArguments extends WebAPICallOptions, TokenOverridable { channel: string}export interface ConversationsListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { exclude_archived?: boolean types?: string // comma-separated list of conversation types team_id?: string}cursorPaginationEnabledMethods.add("conversations.list")export interface ConversationsMarkArguments extends WebAPICallOptions, TokenOverridable { channel: string ts: string}export interface ConversationsMembersArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { channel: string}cursorPaginationEnabledMethods.add("conversations.members")export interface ConversationsOpenArguments extends WebAPICallOptions, TokenOverridable { channel?: string users?: string // comma-separated list of users return_im?: boolean}export interface ConversationsRenameArguments extends WebAPICallOptions, TokenOverridable { channel: string name: string}export interface ConversationsRepliesArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled, TimelinePaginationEnabled{ channel: string ts: string}cursorPaginationEnabledMethods.add("conversations.replies")export interface ConversationsSetPurposeArguments extends WebAPICallOptions, TokenOverridable { channel: string purpose: string}export interface ConversationsSetTopicArguments extends WebAPICallOptions, TokenOverridable { channel: string topic: string}export interface ConversationsUnarchiveArguments extends WebAPICallOptions, TokenOverridable { channel: string}
/* * `dialog.*` */export interface DialogOpenArguments extends WebAPICallOptions, TokenOverridable { trigger_id: string dialog: Dialog}
/* * `dnd.*` */export interface DndEndDndArguments extends WebAPICallOptions, TokenOverridable {}export interface DndEndSnoozeArguments extends WebAPICallOptions, TokenOverridable {}export interface DndInfoArguments extends WebAPICallOptions, TokenOverridable { user: string}export interface DndSetSnoozeArguments extends WebAPICallOptions, TokenOverridable { num_minutes: number}export interface DndTeamInfoArguments extends WebAPICallOptions, TokenOverridable { users?: string // comma-separated list of users}
/* * `emoji.*` */export interface EmojiListArguments extends WebAPICallOptions, TokenOverridable {}
/* * `files.*` */export interface FilesDeleteArguments extends WebAPICallOptions, TokenOverridable { file: string // file id}export interface FilesInfoArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { file: string // file id count?: number page?: number}cursorPaginationEnabledMethods.add("files.info")export interface FilesListArguments extends WebAPICallOptions, TokenOverridable, TraditionalPagingEnabled { channel?: string user?: string ts_from?: string ts_to?: string types?: string // comma-separated list of file types team_id?: string}export interface FilesRevokePublicURLArguments extends WebAPICallOptions, TokenOverridable { file: string // file id}export interface FilesSharedPublicURLArguments extends WebAPICallOptions, TokenOverridable { file: string // file id}export interface FilesUploadArguments extends WebAPICallOptions, TokenOverridable { channels?: string // comma-separated list of channels content?: string // if absent, must provide `file` file?: File // if absent, must provide `content` filename?: string filetype?: string initial_comment?: string title?: string thread_ts?: string // if specified, `channels` must be set}export interface FilesCommentsDeleteArguments extends WebAPICallOptions, TokenOverridable { file: string // file id id: string // comment id}// either file or external_id is requiredexport interface FilesRemoteInfoArguments extends WebAPICallOptions, TokenOverridable { // either one of the file or external_id arguments are required file?: string external_id?: string}export interface FilesRemoteListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { ts_from?: string ts_to?: string channel?: string}cursorPaginationEnabledMethods.add("files.remote.list")export interface FilesRemoteAddArguments extends WebAPICallOptions, TokenOverridable { title: string external_url: string external_id: string // a unique identifier for the file in your system filetype: string // possible values (except for 'auto'): https://api.slack.com/types/file#file_types preview_image?: Blob indexable_file_contents?: Blob}export interface FilesRemoteUpdateArguments extends WebAPICallOptions, TokenOverridable { title?: string external_url?: string filetype?: string // possible values (except for 'auto'): https://api.slack.com/types/file#file_types preview_image?: Blob indexable_file_contents?: Blob
// either one of the file or external_id arguments are required file?: string external_id?: string}export interface FilesRemoteRemoveArguments extends WebAPICallOptions, TokenOverridable { // either one of the file or external_id arguments are required file?: string external_id?: string}export interface FilesRemoteShareArguments extends WebAPICallOptions, TokenOverridable { channels: string // comma-separated list of channel ids
// either one of the file or external_id arguments are required file?: string external_id?: string}
/* * `groups.*` */export interface GroupsArchiveArguments extends WebAPICallOptions, TokenOverridable { channel: string}export interface GroupsCreateArguments extends WebAPICallOptions, TokenOverridable { name: string validate?: boolean team_id?: string}export interface GroupsCreateChildArguments extends WebAPICallOptions, TokenOverridable { channel: string}export interface GroupsHistoryArguments extends WebAPICallOptions, TokenOverridable, TimelinePaginationEnabled { channel: string unreads?: boolean count?: number}export interface GroupsInfoArguments extends WebAPICallOptions, TokenOverridable, LocaleAware { channel: string}export interface GroupsInviteArguments extends WebAPICallOptions, TokenOverridable { channel: string user: string}export interface GroupsKickArguments extends WebAPICallOptions, TokenOverridable { channel: string user: string}export interface GroupsLeaveArguments extends WebAPICallOptions, TokenOverridable { channel: string}export interface GroupsListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { exclude_archived?: boolean exclude_members?: boolean team_id?: string}cursorPaginationEnabledMethods.add("groups.list")export interface GroupsMarkArguments extends WebAPICallOptions, TokenOverridable { channel: string ts: string}export interface GroupsOpenArguments extends WebAPICallOptions, TokenOverridable { channel: string}export interface GroupsRenameArguments extends WebAPICallOptions, TokenOverridable { channel: string name: string validate?: boolean}export interface GroupsRepliesArguments extends WebAPICallOptions, TokenOverridable { channel: string thread_ts: boolean}export interface GroupsSetPurposeArguments extends WebAPICallOptions, TokenOverridable { channel: string purpose: string}export interface GroupsSetTopicArguments extends WebAPICallOptions, TokenOverridable { channel: string topic: string}export interface GroupsUnarchiveArguments extends WebAPICallOptions, TokenOverridable { channel: string}
/* * `im.*` */export interface IMCloseArguments extends WebAPICallOptions, TokenOverridable { channel: string}export interface IMHistoryArguments extends WebAPICallOptions, TokenOverridable, TimelinePaginationEnabled { channel: string count?: number unreads?: boolean}export interface IMListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled {}cursorPaginationEnabledMethods.add("im.list")export interface IMMarkArguments extends WebAPICallOptions, TokenOverridable { channel: string ts: string}export interface IMOpenArguments extends WebAPICallOptions, TokenOverridable, LocaleAware { user: string return_im?: boolean}export interface IMRepliesArguments extends WebAPICallOptions, TokenOverridable { channel: string thread_ts?: string}
/* * `migration.*` */export interface MigrationExchangeArguments extends WebAPICallOptions, TokenOverridable { users: string // comma-separated list of users to_old?: boolean team_id?: string}
/* * `mpim.*` */export interface MPIMCloseArguments extends WebAPICallOptions, TokenOverridable { channel: string}export interface MPIMHistoryArguments extends WebAPICallOptions, TokenOverridable, TimelinePaginationEnabled { channel: string count?: number unreads?: boolean}export interface MPIMListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled {}cursorPaginationEnabledMethods.add("mpim.list")export interface MPIMMarkArguments extends WebAPICallOptions, TokenOverridable { channel: string ts: string}export interface MPIMOpenArguments extends WebAPICallOptions, TokenOverridable { users: string // comma-separated list of users}export interface MPIMRepliesArguments extends WebAPICallOptions, TokenOverridable { channel: string thread_ts: string}
/* * `oauth.*` */export interface OAuthAccessArguments extends WebAPICallOptions { client_id: string client_secret: string code: string redirect_uri?: string single_channel?: string}export interface OAuthV2AccessArguments extends WebAPICallOptions { client_id: string client_secret: string code: string redirect_uri?: string}/* * `pins.*` */export interface PinsAddArguments extends WebAPICallOptions, TokenOverridable { channel: string // must supply one of: file?: string // file id file_comment?: string timestamp?: string}export interface PinsListArguments extends WebAPICallOptions, TokenOverridable { channel: string}export interface PinsRemoveArguments extends WebAPICallOptions, TokenOverridable { channel: string // must supply one of: file?: string // file id file_comment?: string timestamp?: string}
/* * `reactions.*` */export interface ReactionsAddArguments extends WebAPICallOptions, TokenOverridable { name: string // must supply one of: channel?: string // paired with timestamp timestamp?: string // paired with channel file?: string // file id file_comment?: string}export interface ReactionsGetArguments extends WebAPICallOptions, TokenOverridable { full?: boolean // must supply one of: channel?: string // paired with timestamp timestamp?: string // paired with channel file?: string // file id file_comment?: string}export interface ReactionsListArguments extends WebAPICallOptions, TokenOverridable, TraditionalPagingEnabled, CursorPaginationEnabled{ user?: string full?: boolean team_id?: string}cursorPaginationEnabledMethods.add("reactions.list")export interface ReactionsRemoveArguments extends WebAPICallOptions, TokenOverridable { name: string // must supply one of: channel?: string // paired with timestamp timestamp?: string // paired with channel file?: string // file id file_comment?: string}
/* * `reminders.*` */export interface RemindersAddArguments extends WebAPICallOptions, TokenOverridable { text: string time: string | number user?: string}export interface RemindersCompleteArguments extends WebAPICallOptions, TokenOverridable { reminder: string}export interface RemindersDeleteArguments extends WebAPICallOptions, TokenOverridable { reminder: string}export interface RemindersInfoArguments extends WebAPICallOptions, TokenOverridable { reminder: string}export interface RemindersListArguments extends WebAPICallOptions, TokenOverridable {}
/* * `rtm.*` */export interface RTMConnectArguments extends WebAPICallOptions, TokenOverridable { batch_presence_aware?: boolean presence_sub?: boolean}export interface RTMStartArguments extends WebAPICallOptions, TokenOverridable, LocaleAware { batch_presence_aware?: boolean mpim_aware?: boolean no_latest?: "0" | "1" no_unreads?: string presence_sub?: boolean simple_latest?: boolean}
/* * `search.*` */export interface SearchAllArguments extends WebAPICallOptions, TokenOverridable, TraditionalPagingEnabled, Searchable {}export interface SearchFilesArguments extends WebAPICallOptions, TokenOverridable, TraditionalPagingEnabled, Searchable{}export interface SearchMessagesArguments extends WebAPICallOptions, TokenOverridable, TraditionalPagingEnabled, Searchable{}
/* * `stars.*` */export interface StarsAddArguments extends WebAPICallOptions, TokenOverridable { // must supply one of: channel?: string // paired with `timestamp` timestamp?: string // paired with `channel` file?: string // file id file_comment?: string}export interface StarsListArguments extends WebAPICallOptions, TokenOverridable, TraditionalPagingEnabled, CursorPaginationEnabled{}cursorPaginationEnabledMethods.add("stars.list")export interface StarsRemoveArguments extends WebAPICallOptions, TokenOverridable { // must supply one of: channel?: string // paired with `timestamp` timestamp?: string // paired with `channel` file?: string // file id file_comment?: string}
/* * `team.*` */export interface TeamAccessLogsArguments extends WebAPICallOptions, TokenOverridable { before?: number count?: number page?: number team_id?: string}export interface TeamBillableInfoArguments extends WebAPICallOptions, TokenOverridable { user?: string team_id?: string}export interface TeamInfoArguments extends WebAPICallOptions, TokenOverridable {}export interface TeamIntegrationLogsArguments extends WebAPICallOptions, TokenOverridable { app_id?: string change_type?: string // TODO: list types: 'x' | 'y' | 'z' count?: number page?: number service_id?: string user?: string team_id?: string}export interface TeamProfileGetArguments extends WebAPICallOptions, TokenOverridable { visibility?: "all" | "visible" | "hidden" team_id?: string}
/* * `usergroups.*` */export interface UsergroupsCreateArguments extends WebAPICallOptions, TokenOverridable { name: string channels?: string // comma-separated list of channels description?: string handle?: string include_count?: boolean}export interface UsergroupsDisableArguments extends WebAPICallOptions, TokenOverridable { usergroup: string include_count?: boolean}export interface UsergroupsEnableArguments extends WebAPICallOptions, TokenOverridable { usergroup: string include_count?: boolean}export interface UsergroupsListArguments extends WebAPICallOptions, TokenOverridable { include_count?: boolean include_disabled?: boolean include_users?: boolean}export interface UsergroupsUpdateArguments extends WebAPICallOptions, TokenOverridable { usergroup: string channels?: string // comma-separated list of channels description?: string handle?: string include_count?: boolean name?: string}export interface UsergroupsUsersListArguments extends WebAPICallOptions, TokenOverridable { usergroup: string include_disabled?: boolean}export interface UsergroupsUsersUpdateArguments extends WebAPICallOptions, TokenOverridable { usergroup: string users: string // comma-separated list of users include_count?: boolean}
/* * `users.*` */export interface UsersConversationsArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled { exclude_archived?: boolean types?: string // comma-separated list of conversation types user?: string team_id?: string}cursorPaginationEnabledMethods.add("users.conversations")export interface UsersDeletePhotoArguments extends WebAPICallOptions, TokenOverridable {}export interface UsersGetPresenceArguments extends WebAPICallOptions, TokenOverridable { user: string}export interface UsersIdentityArguments extends WebAPICallOptions, TokenOverridable {}export interface UsersInfoArguments extends WebAPICallOptions, TokenOverridable, LocaleAware { user: string}export interface UsersListArguments extends WebAPICallOptions, TokenOverridable, CursorPaginationEnabled, LocaleAware { presence?: boolean // deprecated, defaults to false team_id?: string}cursorPaginationEnabledMethods.add("users.list")export interface UsersLookupByEmailArguments extends WebAPICallOptions, TokenOverridable { email: string}export interface UsersSetPhotoArguments extends WebAPICallOptions, TokenOverridable { image: Blob crop_w?: number crop_x?: number crop_y?: number}export interface UsersSetPresenceArguments extends WebAPICallOptions, TokenOverridable { presence: "auto" | "away"}export interface UsersProfileGetArguments extends WebAPICallOptions, TokenOverridable { include_labels?: boolean user?: string}export interface UsersProfileSetArguments extends WebAPICallOptions, TokenOverridable { profile?: string // url-encoded json user?: string name?: string // usable if `profile` is not passed value?: string // usable if `profile` is not passed}
export interface ViewsOpenArguments extends WebAPICallOptions, TokenOverridable { trigger_id: string view: View}
export interface ViewsPushArguments extends WebAPICallOptions, TokenOverridable { trigger_id: string view: View}
export interface ViewsPublishArguments extends WebAPICallOptions, TokenOverridable { user_id: string view: View hash?: string}
export interface ViewsUpdateArguments extends WebAPICallOptions, TokenOverridable { view_id?: string view: View external_id?: string hash?: string}
/* * `workflows.*` */export interface WorkflowsStepCompletedArguments extends WebAPICallOptions, TokenOverridable { workflow_step_execute_id: string outputs?: Record<string, unknown>}
export interface WorkflowsStepFailedArguments extends WebAPICallOptions, TokenOverridable { workflow_step_execute_id: string error: { message: string }}
export interface WorkflowsUpdateStepArguments extends WebAPICallOptions, TokenOverridable { workflow_step_edit_id: string inputs?: Record<string, unknown> outputs?: { type: string name: string label: string }[]}
export * from "https://deno.land/x/slack_types@3.0.0/mod.ts"