import type { BasicCursorPaginationOptions, MakeRequest } from './common-types';
import type { EnvironmentTemplateProps } from './entities/environment-template';
import type { CreateEnvironmentTemplateInstallationProps, ValidateEnvironmentTemplateInstallationProps } from './entities/environment-template-installation';
/**
 * @internal
 */
export type ContentfulEnvironmentTemplateAPI = ReturnType<typeof createEnvironmentTemplateApi>;
/**
 * @internal
 */
export declare function createEnvironmentTemplateApi(makeRequest: MakeRequest, organizationId: string): {
    /**
     * Updates a environment template
     * @returns Promise for new version of the template
     * ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getEnvironmentTemplate('<organization_id>', '<environment_template_id>')
     * .then((environmentTemplate) => {
     *   environmentTemplate.name = 'New name'
     *   return environmentTemplate.update()
     * })
     * .then((environmentTemplate) =>
     *   console.log(`Environment template ${environmentTemplate.sys.id} renamed.`)
     * ).catch(console.error)
     * ```
     */
    update: () => Promise<import("./export-types").EnvironmentTemplate>;
    /**
     * Updates environment template version data
     * @param version.versionName - Name of the environment template version
     * @param version.versionDescription - Description of the environment template version
     * @returns Promise for an updated EnvironmentTemplate
     * ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getEnvironmentTemplate('<organization_id>', '<environment_template_id>')
     * .then((environmentTemplate) => {
     *   return environmentTemplate.updateVersion({
     *     versionName: 'New Name',
     *     versionDescription: 'New Description',
     *   })
     * })
     * .then((environmentTemplate) =>
     *   console.log(`Environment template version ${environmentTemplate.sys.id} renamed.`)
     * ).catch(console.error)
     * ```
     */
    updateVersion: ({ versionName, versionDescription, }: {
        versionName: string;
        versionDescription: string;
    }) => Promise<import("./export-types").EnvironmentTemplate>;
    /**
     * Deletes the environment template
     * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled.
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getEnvironmentTemplate('<organization_id>', '<environment_template_id>')
     *   .then((environmentTemplate) => environmentTemplate.delete())
     *   .then(() => console.log('Environment template deleted.'))
     *   .catch(console.error)
     * ```
     */
    delete: () => Promise<void>;
    /**
     * Gets a collection of all versions for the environment template
     * @returns Promise for a EnvironmentTemplate
     * ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     * client.getEnvironmentTemplate('<organization_id>', '<environment_template_id>')
     * .then((environmentTemplate) => environmentTemplate.getVersions())
     * .then((environmentTemplateVersions) => console.log(environmentTemplateVersions.items))
     * .catch(console.error)
     * ```
     */
    getVersions: () => Promise<import("./common-types").CursorPaginatedCollection<import("./export-types").EnvironmentTemplate, EnvironmentTemplateProps>>;
    /**
     * Gets a collection of all installations for the environment template
     * @param [installationParams.spaceId] - Space ID to filter installations by space and environment
     * @param [installationParams.environmentId] - Environment ID to filter installations by space and environment
     * @param [installationParams.latestOnly] - Boolean flag to only return the latest installation per environment
     * @returns Promise for a collection of EnvironmentTemplateInstallations
     * ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getEnvironmentTemplate('<organization_id>', '<environment_template_id>')
     * .then((environmentTemplate) => environmentTemplate.getInstallations())
     * .then((environmentTemplateInstallations) =>
     *   console.log(environmentTemplateInstallations.items)
     * )
     * .catch(console.error)
     * ```
     */
    getInstallations: ({ spaceId, environmentId, latestOnly, ...query }?: {
        spaceId?: string;
        environmentId?: string;
        latestOnly?: boolean;
    } & BasicCursorPaginationOptions) => Promise<import("./common-types").CursorPaginatedCollection<import("./export-types").EnvironmentTemplateInstallation, import("./export-types").EnvironmentTemplateInstallationProps>>;
    /**
     * Validates an environment template against a given space and environment
     * @param params.spaceId - Space ID where the template should be installed into
     * @param params.environmentId - Environment ID where the template should be installed into
     * @param [params.version] - Version of the template
     * @param [params.installation.takeover] - Already existing Content types to takeover in the target environment
     * @param [params.changeSet] - Change set which should be applied
     * @returns Promise for a EnvironmentTemplateValidation
     * ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getEnvironmentTemplate('<organization_id>', '<environment_template_id>')
     * .then((environmentTemplate) => environmentTemplate.validate({
     *   spaceId: '<space_id>',
     *   environmentId: '<environment_id>',
     *   version: <version>,
     * }))
     * .then((validationResult) => console.log(validationResult))
     * .catch(console.error)
     * ```
     */
    validate: ({ spaceId, environmentId, version, takeover, changeSet, }: {
        spaceId: string;
        environmentId: string;
        version?: number;
    } & ValidateEnvironmentTemplateInstallationProps) => Promise<import("./export-types").EnvironmentTemplateValidationProps>;
    /**
     * Installs a template against a given space and environment
     * @param params.spaceId - Space ID where the template should be installed into
     * @param params.environmentId - Environment ID where the template should be installed into
     * @param params.installation.version- Template version which should be installed
     * @param [params.installation.takeover] - Already existing Content types tp takeover in the target environment
     * @param [params.changeSet] - Change set which should be applied
     * @returns Promise for a EnvironmentTemplateInstallation
     * ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getEnvironmentTemplate('<organization_id>', '<environment_template_id>')
     * .then((environmentTemplate) => environmentTemplate.validate({
     *   spaceId: '<space_id>',
     *   environmentId: '<environment_id>',
     *   installation: {
     *     version: <version>,
     *   }
     * }))
     * .then((installation) => console.log(installation))
     * .catch(console.error)
     * ```
     */
    install: ({ spaceId, environmentId, installation, }: {
        spaceId: string;
        environmentId: string;
        installation: CreateEnvironmentTemplateInstallationProps;
    }) => Promise<import("./export-types").EnvironmentTemplateInstallationProps>;
    /**
     * Disconnects the template from a given environment
     * @param params.spaceId - Space ID where the template should be installed into
     * @param params.environmentId - Environment ID where the template should be installed into
     * @returns Promise for the disconnection with no data
     * ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getEnvironmentTemplate('<organization_id>', '<environment_template_id>')
     * .then(environmentTemplate) => environmentTemplate.disconnected())
     * .then(() => console.log('Template disconnected'))
     * .catch(console.error)
     * ```
     */
    disconnect: ({ spaceId, environmentId, }: {
        spaceId: string;
        environmentId: string;
    }) => Promise<void>;
};
