@@ -7,13 +7,21 @@ import {
77
88import type { ShellProcess } from '../../types/shell' ;
99
10+ type AuthLoginNoPromptArguments = SlackCLIHostTargetOptions & Pick < SlackCLIGlobalOptions , 'verbose' > ;
11+ type AuthLoginChallengeExchangeArugments = SlackCLIHostTargetOptions & {
12+ /** @description Challenge string extracted from the Slack client UI after submitting the auth slash command. */
13+ challenge : string ;
14+ /** @description The `authTicket` output from `loginNoPrompt`; required to complete the login flow. */
15+ authTicket : string ;
16+ } & Pick < SlackCLIGlobalOptions , 'verbose' > ;
17+
1018export default {
1119 /**
1220 * `slack login --no-prompt`; initiates a CLI login flow. The `authTicketSlashCommand` returned should be entered
1321 * into the Slack client, and the challenge code retrieved and fed into the `loginChallengeExchange` method to
1422 * complete the CLI login flow.
1523 */
16- loginNoPrompt : async function loginNoPrompt ( args ?: SlackCLIHostTargetOptions ) : Promise < {
24+ loginNoPrompt : async function loginNoPrompt ( args ?: AuthLoginNoPromptArguments ) : Promise < {
1725 /** @description Command output */
1826 output : ShellProcess [ 'output' ] ;
1927 /**
@@ -57,12 +65,7 @@ export default {
5765 * @returns
5866 */
5967 loginChallengeExchange : async function loginChallengeExchange (
60- args : SlackCLIHostTargetOptions & {
61- /** @description Challenge string extracted from the Slack client UI after submitting the auth slash command. */
62- challenge : string ;
63- /** @description The `authTicket` output from `loginNoPrompt`; required to complete the login flow. */
64- authTicket : string ;
65- } ,
68+ args : AuthLoginChallengeExchangeArugments ,
6669 ) : Promise < string > {
6770 const cmd = new SlackCLIProcess ( [ 'login' ] , args , {
6871 '--no-prompt' : true ,
0 commit comments