import EventEmitter from 'events'; import { ApolloClient } from '@apollo/client/core'; import { Command } from '@contentstack/cli-command'; import { FlagInput, Interfaces, ContentstackClient } from '@contentstack/cli-utilities'; import { Logger } from './util'; import { ConfigType, LogFn } from './types'; export type Flags = Interfaces.InferredFlags<(typeof BaseCommand)['baseFlags'] & T['flags']>; export type Args = Interfaces.InferredArgs; export declare abstract class BaseCommand extends Command { log: LogFn; logger: Logger; protected $event: EventEmitter; protected sharedConfig: ConfigType; protected apolloClient: ApolloClient; protected managementSdk: ContentstackClient; protected apolloLogsClient: ApolloClient; protected flags: Flags; protected args: Args; static baseFlags: FlagInput; init(): Promise; checkAuthenticated(): void; protected catch(err: Error & { exitCode?: number; }): Promise; protected finally(_: Error | undefined): Promise; /** * @method prepareConfig - init default Config data * * @memberof BaseCommand */ prepareConfig(): Promise; /** * @method getConfig - Get a config from list of existing .cs-launch.json file * * @return {*} {Promise} * @memberof BaseCommand */ getConfig(): Promise; private handleBranchSelection; /** * @methods prepareApiClients - Prepare Api Clients (Management SDK and apollo client) * * @return {*} {Promise} * @memberof BaseCommand */ prepareApiClients(): Promise; /** * @method initCmaSDK * * @memberof BaseCommand */ initCmaSDK(): Promise; }