@adinsure-ops/ops-cli
Version:
Operations CLI for working with AdInsure
37 lines (36 loc) • 2 kB
TypeScript
import { AxiosResponse } from 'axios';
import CommandBase from '../command.base.js';
export default class Translate extends CommandBase<typeof Translate> {
static description: string;
static usage: string;
static examples: string[];
static args: {
language: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
};
static flags: {
format: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
module: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
output: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
filename: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
respectServerFilename: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
};
getFormat(format: string): string;
/**
* Gets resources, checks a response and returns a response stream.
* @param languages list of translations to download
* @param format format of translations
* @param modules list of modules to download
* @returns arhive as an byte array response stream
*/
getTranslations(languages: string, format: string, modules: string | undefined): Promise<AxiosResponse<any, any>>;
/**
* Read from response stream and extract files into output directory.
* @param content zip file or a stream
* @param destinationDir final destination to extract files
* @param {string} [xmlFilename=false] XML filename
* @returns {Promise<void>} Void
* @throws Error message
*/
extractFiles(content: any, destinationDir: string, xmlFilename?: string): Promise<any>;
run(): Promise<void>;
}