Skip to main content

Variable: SlackCLI

const SlackCLI: object;

Set of functions to spawn and interact with Slack Platform CLI processes and commands

Type declaration

app

app: object;

app.delete()

delete: (args) => Promise<string> = del;

slack app delete

Parameters

args: ProjectCommandArguments

Returns

Promise<string>

command output

app.install()

install: (args) => Promise<string>;

slack app install

Parameters

args: ProjectCommandArguments

Returns

Promise<string>

command output

app.list()

list: (args) => Promise<string>;

slack app list

Parameters

args: ProjectCommandArguments

Returns

Promise<string>

command output

auth

auth: object;

auth.loginChallengeExchange()

loginChallengeExchange: (args) => Promise<string>;

slack login --no-prompt --challenge --ticket

Parameters

args: SlackCLIHostTargetOptions & object

Returns

Promise<string>

auth.loginNoPrompt()

loginNoPrompt: (args?) => Promise<object>;

slack login --no-prompt; initiates a CLI login flow. The authTicketSlashCommand returned should be entered into the Slack client, and the challenge code retrieved and fed into the loginChallengeExchange method to complete the CLI login flow.

Parameters

args?: SlackCLIHostTargetOptions

Returns

Promise<object>

authTicket
authTicket: string;

An auth ticket is a A UUID sequence granted by Slack to a CLI auth requestor. That ticket must then be submitted via slash command by a user logged in to Slack and permissions accepted to be granted a token for use. This authTicket is included in the authTicketSlashCommand.

authTicketSlashCommand
authTicketSlashCommand: string;
Description

Slash command that a Slack client user must enter into the message composer in order to initiate login flow.

Example
`/slackauthticket MTMxNjgxMDUtYTYwOC00NzRhLWE3M2YtMjVmZTQyMjc1MDg4`
output
output: string;
Description

Command output

auth.logout()

logout: (args?) => Promise<string>;

slack logout

Parameters

args?: Omit<SlackCLIGlobalOptions, "team"> & Pick<SlackCLIGlobalOptions, "team"> | object

Returns

Promise<string>

command output

collaborator

collaborator: object;

collaborator.add()

add: (args) => Promise<string>;

slack collaborators add

Parameters

args: ProjectCommandArguments & CollaboratorEmail

Returns

Promise<string>

command output

collaborator.list()

list: (args) => Promise<string>;

slack collaborators list

Parameters

args: ProjectCommandArguments

Returns

Promise<string>

command output

collaborator.remove()

remove: (args) => Promise<string>;

slack collaborators remove

Parameters

args: ProjectCommandArguments & CollaboratorEmail

Returns

Promise<string>

command output

create()

create: (args) => Promise<string>;

slack create

Parameters

args: ProjectCommandArguments & object

Returns

Promise<string>

command output

datastore

datastore: object;

datastore.datastoreDelete()

datastoreDelete: (args) => Promise<string>;

slack datastore delete

Parameters

args: ProjectCommandArguments & Pick<DatastoreCommandArguments, "datastoreName" | "primaryKeyValue">

Returns

Promise<string>

command output

datastore.datastoreGet()

datastoreGet: (args) => Promise<string>;

slack datastore get

Parameters

args: ProjectCommandArguments & Pick<DatastoreCommandArguments, "datastoreName" | "primaryKeyValue">

Returns

Promise<string>

command output

datastore.datastorePut()

datastorePut: (args) => Promise<string>;

slack datastore put

Parameters

args: ProjectCommandArguments & Pick<DatastoreCommandArguments, "datastoreName" | "putItem">

Returns

Promise<string>

command output

datastore.datastoreQuery()

datastoreQuery: (args) => Promise<string>;

slack datastore query

Parameters

args: ProjectCommandArguments & Pick<DatastoreCommandArguments, "datastoreName" | "queryExpression" | "queryExpressionValues">

Returns

Promise<string>

command output

env

env: object;

env.add()

add: (args) => Promise<string>;

slack env add

Parameters

args: ProjectCommandArguments & EnvCommandArguments

Returns

Promise<string>

command output

env.list()

list: (args) => Promise<string>;

slack env list

Parameters

args: ProjectCommandArguments

Returns

Promise<string>

command output

env.remove()

remove: (args) => Promise<string>;

slack env remove

Parameters

args: ProjectCommandArguments & Pick<EnvCommandArguments, "secretKey">

Returns

Promise<string>

command output

externalAuth

externalAuth: object;

externalAuth.add()

add: (args) => Promise<string>;

slack external-auth add

Parameters

args: ProjectCommandArguments & Pick<ExternalAuthCommandArguments, "provider">

Returns

Promise<string>

command output

externalAuth.addSecret()

addSecret: (args) => Promise<string>;

slack external-auth add-secret

Parameters

args: ProjectCommandArguments & Omit<ExternalAuthCommandArguments, "all">

Returns

Promise<string>

command output

externalAuth.remove()

remove: (args) => Promise<string>;

slack external-auth remove

Parameters

args: ProjectCommandArguments & Omit<ExternalAuthCommandArguments, "secret">

Returns

Promise<string>

command output

externalAuth.selectAuth()

selectAuth: (args) => Promise<string>;

slack external-auth select-auth

Parameters

args: ProjectCommandArguments & Pick<ExternalAuthCommandArguments, "provider"> & object

Returns

Promise<string>

command output

function

function: object = func;

function.access()

access: (args) => Promise<string>;

slack function access

Parameters

args: ProjectCommandArguments & FunctionAccessArguments

Returns

Promise<string>

command output

manifest

manifest: object;

manifest.info()

info: (args) => Promise<string>;

slack manifest info

Parameters

args: ProjectCommandArguments & object

Returns

Promise<string>

command output

manifest.validate()

validate: (args) => Promise<string>;

slack manifest validate

Parameters

args: ProjectCommandArguments

Returns

Promise<string>

command output

platform

platform: object;

platform.activity()

activity: (args) => Promise<string>;

slack platform activity

Parameters

args: ProjectCommandArguments & object

Returns

Promise<string>

command output

platform.activityTailStart()

activityTailStart: (args) => Promise<ShellProcess>;

slack platform activity but waits for a specified sequence then returns the shell At the specific point where the sequence is found to continue with test

Parameters

args: ProjectCommandArguments & StringWaitArgument & TimeoutArgument

Returns

Promise<ShellProcess>

command output

platform.activityTailStop()

activityTailStop: (args) => Promise<string>;

Waits for a specified string in the provided activityTailStart process output, kills the process then returns the output

Parameters

args: StringWaitArgument & ProcessArgument & TimeoutArgument

Returns

Promise<string>

command output

platform.deploy()

deploy: (args) => Promise<string>;

slack deploy

Parameters

args: ProjectCommandArguments & Omit<RunDeployArguments, "cleanup">

Returns

Promise<string>

command output

platform.runStart()

runStart: (args) => Promise<ShellProcess>;

start slack run. runStop must be used to stop the run process returned by this method.

Parameters

args: ProjectCommandArguments & RunDeployArguments & TimeoutArgument

Returns

Promise<ShellProcess>

shell object to kill it explicitly in the test case via runStop

platform.runStop()

runStop: (args) => Promise<void>;

stop slack run

Parameters

args: ProcessArgument & TimeoutArgument & object

Returns

Promise<void>

stopSession()

stopSession: (args) => Promise<void>;

Delete app and Log out of current team session

Parameters

args: Partial<ProjectCommandArguments> & object

Returns

Promise<void>

trigger

trigger: object;

trigger.access()

access: (args) => Promise<string>;

slack trigger access

Parameters

args: ProjectCommandArguments & TriggerAccessArguments

Returns

Promise<string>

command output

trigger.create()

create: (args) => Promise<string>;

slack trigger create

Parameters

args: ProjectCommandArguments & CreateArguments

Returns

Promise<string>

command output

trigger.delete()

delete: (args) => Promise<string> = del;

slack trigger delete

Parameters

args: ProjectCommandArguments & TriggerIdArgument

Returns

Promise<string>

command output

trigger.info()

info: (args) => Promise<string>;

slack trigger info

Parameters

args: ProjectCommandArguments & TriggerIdArgument

Returns

Promise<string>

command output

trigger.list()

list: (args) => Promise<string>;

slack trigger list

Parameters

args: ProjectCommandArguments & object

Returns

Promise<string>

command output

trigger.update()

update: (args) => Promise<string>;

slack trigger update

Parameters

args: ProjectCommandArguments & TriggerIdArgument & CreateFromFile | Partial<CreateFromArguments>

Returns

Promise<string>

command output

Defined in

cli/index.ts:21