import { LanguageClient } from 'vscode-languageclient';
import { GenerationResults, IFileSystem, AutoRest as IAutoRest } from 'autorest-core';
export { Message, Artifact, GenerationResults, IFileSystem } from 'autorest-core';
/**
 * The Channel that a message is registered with.
 */
export declare enum Channel {
    /** Information is considered the mildest of responses; not necesarily actionable. */
    Information,
    /** Warnings are considered important for best practices, but not catastrophic in nature. */
    Warning,
    /** Errors are considered blocking issues that block a successful operation.  */
    Error,
    /** Debug messages are designed for the developer to communicate internal autorest implementation details. */
    Debug,
    /** Verbose messages give the user additional clarity on the process. */
    Verbose,
    /** Catastrophic failure, likely abending the process.  */
    Fatal,
    /** Hint messages offer guidance or support without forcing action. */
    Hint,
    /** File represents a file output from an extension. Details are a Artifact and are required.  */
    File,
    /** content represents an update/creation of a configuration file. The final uri will be in the same folder as the primary config file. */
    Configuration
}
export declare enum DocumentType {
    OpenAPI2,
    OpenAPI3,
    LiterateConfiguration,
    Unknown
}
export declare type AutoRest = IAutoRest;
export declare const AutoRest: Promise<IAutoRest>;
/**
 * Returns the language service entrypoint for autorest-core, bootstrapping the core if necessary
 *
 * If initialize has already been called, then it returns the version that was initialized, regardless of parameters
 *
 * @param requestedVersion an npm package reference for the version requested @see {@link https://docs.npmjs.com/cli/install#description}
 *
 * @param minimumVersion - a semver string representing the lowest autorest- core version that is considered acceptable.
 *
 * @see { @link initialize }
 */
export declare function getLanguageServiceEntrypoint(requestedVersion?: string, minimumVersion?: string): Promise<string>;
/**
 * Returns the command-line application entrypoint for autorest-core, bootstrapping the core if necessary
 *
 * If initialize has already been called, then it returns the version that was initialized, regardless of parameters
 *
 * @param requestedVersion an npm package reference for the version requested @see {@link https://docs.npmjs.com/cli/install#description}
 *
 * @param minimumVersion - a semver string representing the lowest autorest-core version that is considered acceptable.
 *
 * @see {@link initialize}
 * */
export declare function getApplicationEntrypoint(requestedVersion?: string, minimumVersion?: string): Promise<string>;
/**
 * Initializes the AutoRest-core module, bootstrapping the core from npm if required.
 *
 * @param requestedVersion an npm package reference for the version requested @see {@link https://docs.npmjs.com/cli/install#description}
 *
 * a) a folder containing a program described by a package.json file
 * b) a gzipped tarball containing (a)
 * c) a url that resolves to (b)
 * d) a <name>@<version> that is published on the registry {@link https://docs.npmjs.com/misc/registry}) with (c)
 * e) a <name>@<tag> (see npm-dist-tag) that points to (d)
 * f) a <name> that has a "latest" tag satisfying (e)
 * g) a <git remote url> that resolves to (a)
 *
 * @param minimumVersion - a semver string representing the lowest autorest-core version that is considered acceptable.
 */
export declare function initialize(requestedVersion?: string, minimumVersion?: string): Promise<void>;
/**
 * Creates an instance of the AutoRest engine. Will call {@link initialize} with default values to bootstrap AutoRest core if necessary.
 *
 * @param fileSystem - the {@link IFileSystem} implementation that will be used to acquire files
 *
 * Note: http:/https:/mem: schemes are handled internally in AutoRest and the IFilesystem will not call
 * the IFileSystem methods.
 *
 *
 * @param configFileOrFolderUri - a URI pointing to the folder or autorest configuration file
 */
export declare function create(fileSystem?: IFileSystem, configFileOrFolderUri?: string): Promise<AutoRest>;
/**
  *  Given a document's content, does this represent a openapi document of some sort?
  *
  * @param content - the document content to evaluate
  */
export declare function isOpenApiDocument(content: string): Promise<boolean>;
/**
 * Checks to see if the document is a literate configuation document.
 *
 * @param content the document content to check
 */
export declare function isConfigurationDocument(content: string): Promise<boolean>;
/** Determines the document type based on the content of the document
 *
 * @returns Promise<DocumentType> one of:
 *  -  DocumentType.LiterateConfiguration - contains the magic string '\n> see https://aka.ms/autorest'
 *  -  DocumentType.OpenAPI2 - $.swagger === "2.0"
 *  -  DocumentType.OpenAPI3 - $.openapi === "3.0.0"
 *  -  DocumentType.Unknown - content does not match a known document type
 *
 * @see {@link DocumentType}
 */
export declare function identifyDocument(content: string): Promise<DocumentType>;
/**
 * Processes a document (yaml, markdown or JSON) and returns the document as a JSON-encoded document text
 * @param content - the document content
 *
 * @returns the content as a JSON string (not a JSON DOM)
 */
export declare function toJSON(content: string): Promise<string>;
/** This is a convenience class for accessing the requests supported by AutoRest when used as a language service */
export declare class AutoRestLanguageService {
    private languageClient;
    /**
     * Represents a convenience layer on the remote language service functions (on top of LSP-defined functions)
     *
     * @constructor
     *
     * this requires a reference to the language client so that the methods can await the onReady signal
     * before attempting to send requests.
     */
    constructor(languageClient: LanguageClient);
    /**
     * Runs autorest to process a file
     *
     * @param documentUri The OpenApi document or AutoRest configuration file to use for the generation
     *
     * @param language The language to generate code for. (This is a convenience; it could have been expressed in the configuration)
     *
     * @param configuration Additional configuration to pass to AutoRest -- this overrides any defaults or content in the configuration file
     * @returns async: a 'generated' object containg the output from the generation run.
     *    @see generated
     *
     */
    generate(documentUri: string, language: string, configuration: any): Promise<GenerationResults>;
    /**
     * Determines if a file is an OpenAPI document (2.0)
     *
     * @param contentOrUri either a URL to a file on disk or http/s, or the content of a file itself.
     * @returns async:
     *     true - the file is an OpenAPI 2.0 document
     *     false - the file was not recognized.
     */
    isOpenApiDocument(contentOrUri: string): Promise<boolean>;
    /**
     * Determines if a file is an AutoRest configuration file (checks for the magic string `\n> see https://aka.ms/autorest` )
     *
     * @param contentOrUri either a URL to a file on disk or http/s, or the content of a file itself.
     * @returns async:
     *     true - the file is an autorest configuration file
     *     false - the file was not recognized.
     */
    isConfigurationDocument(contentOrUri: string): Promise<boolean>;
    /**
    * Returns the file as a JSON string. This can be a .YAML, .MD or .JSON file to begin with.
    *
    * @param contentOrUri either a URL to a file on disk or http/s, or the content of a file itself.
    * @returns async: string containing the file as JSON
    */
    toJSON(contentOrUri: string): Promise<string>;
    /**
    * Finds the configuration file for a given document URI.
    *
    * @param documentUri the URL to a file on disk or http/s.  The passed in file can be an OpenAPI file or an AutoRest configuration file.
    * @returns async: the URI to the configuration file or an empty string if no configuration could be found.
    *
    */
    detectConfigurationFile(documentUri: string): Promise<string>;
    /**
    * Determines if a file is an OpenAPI document or a configuration file in one attempt.
    *
    * @param contentOrUri either a URL to a file on disk or http/s, or the content of a file itself.
    * @returns async:
    *     true - the file is a configuration file or OpenAPI (2.0) file
    *     false - the file was not recognized.
    */
    isSupportedDocument(languageId: string, contentOrUri: string): Promise<boolean>;
    identifyDocument(contentOrUri: string): Promise<DocumentType>;
}
