UNPKG

@squiz/dxp-plugin-core

Version:

The non public core commands for dxp

45 lines (44 loc) 1.6 kB
/*! * @license * Copyright Squiz Australia Pty Ltd. All Rights Reserved. */ import { BaseCommand, Commandable, CommandContext } from '@squiz/dxp'; import { Observable } from 'rxjs'; /** * Attempt to login to the `dxp`. * @export * @class LoginCommand * @extends {BaseCommand} * @implements {Commandable} */ export declare class LoginCommand extends BaseCommand implements Commandable { /** * Get AuthEntity object from the cli input. * @private * @param {CommandContext} context The command context object * @returns {Observable<CommandContext['entities']['EntityAuth']>} The auth entity to user. * @memberof LoginCommand */ private _getLoginSource; /** * Get the list of example commands * @param {CommandContext} context The command context object * @returns {Array<string>} The list of example commands. * @memberof PluginAddCommand */ examples(context: CommandContext): Array<string>; /** * Handles the command executes. * @param {CommandContext} context The command context object * @returns {(Observable<unknown> | Promise<unknown> | unknown)} The result of the command. * @memberof LoginCommand */ execute(context: CommandContext): Observable<unknown> | Promise<unknown> | unknown; /** * Get the list of usage text * @param {CommandContext} context The command context object * @returns {Array<string>} The list of usage text. * @memberof LoginCommand */ usages(context: CommandContext): Array<string>; }