import type { MakeRequest, QueryOptions, SpaceQueryOptions } from './common-types';
import type { CreateAppBundleProps } from './entities/app-bundle';
import type { UpsertResourceProviderProps } from './entities/resource-provider';
/**
 * @internal
 */
export type ContentfulAppDefinitionAPI = ReturnType<typeof createAppDefinitionApi>;
/**
 * @internal
 */
export default function createAppDefinitionApi(makeRequest: MakeRequest): {
    /**
     * Sends an update to the server with any changes made to the object's properties
     * @returns Object returned from the server with updated changes.
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getOrganization('<org_id>')
     * .then((org) => org.getAppDefinition('<app_def_id>'))
     * .then((appDefinition) => {
     *   appDefinition.name = 'New App Definition name'
     *   return appDefinition.update()
     * })
     * .then((appDefinition) => console.log(`App Definition ${appDefinition.sys.id} updated.`))
     * .catch(console.error)
     * ```
     */
    update: () => Promise<import("./export-types").AppDefinition>;
    /**
     * Deletes this object on the server.
     * @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.getOrganization('<org_id>')
     * .then((org) => org.getAppDefinition('<app_def_id>'))
     * .then((appDefinition) => appDefinition.delete())
     * .then(() => console.log(`App Definition deleted.`))
     * .catch(console.error)
     * ```
     */
    delete: () => Promise<any>;
    /**
     * Gets an app bundle
     * @param id - AppBundle ID
     * @returns Promise for an AppBundle
     * @example ```javascript
     * const contentful = require('contentful-management')
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getOrganization('<org_id>')
     * .then((org) => org.getAppDefinition('<app_def_id>'))
     * .then((appDefinition) => appDefinition.getAppBundle('<app_upload_id>'))
     * .then((appBundle) => console.log(appBundle))
     * .catch(console.error)
     * ```
     */
    getAppBundle(id: string): Promise<import("./export-types").AppBundle>;
    /**
     * Gets a collection of AppBundles
     * @returns Promise for a collection of AppBundles
     * @example ```javascript
     * const contentful = require('contentful-management')
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getOrganization('<org_id>')
     * .then((org) => org.getAppDefinition('<app_def_id>'))
     * .then((appDefinition) => appDefinition.getAppBundles())
     * .then((response) => console.log(response.items))
     * .catch(console.error)
     * ```
     */
    getAppBundles(query?: QueryOptions): Promise<import("./common-types").Collection<import("./export-types").AppBundle, import("./export-types").AppBundleProps>>;
    /**
     * Creates an app bundle
     * @param Object representation of the App Bundle to be created
     * @returns Promise for the newly created AppBundle
     * @example ```javascript
     * const contentful = require('contentful-management')
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     * client.getOrganization('<org_id>')
     * .then((org) => org.getAppDefinition('<app_def_id>'))
     * .then((appDefinition) => appDefinition.createAppBundle('<app_upload_id>'))
     * .then((appBundle) => console.log(appBundle))
     * .catch(console.error)
     * ```
     */
    createAppBundle(data: CreateAppBundleProps): Promise<import("./export-types").AppBundle>;
    /**
     * Gets a list of App Installations across an org for given organization and App Definition
     * If a spaceId is provided in the query object, it will return the App Installations for that specific space.
     * @returns Promise for the newly created AppBundle
     * @example ```javascript
     * const contentful = require('contentful-management')
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     * client.getAppDefinition('<organization_id>', '<app_definition_id>')
     * .then((appDefinition) => appDefinition.getInstallationsForOrg(
     *   { spaceId: '<space_id>' } // optional
     * ))
     * .then((appInstallationsForOrg) => console.log(appInstallationsForOrg.items))
     * .catch(console.error)
     * ```
     */
    getInstallationsForOrg(query?: SpaceQueryOptions): Promise<import("./entities/app-definition").AppInstallationsForOrganizationProps>;
    /**
     * Creates or updates a resource provider
     * @param data representation of the ResourceProvider
     * @returns Promise for the newly created or updated ResourceProvider
     * @example ```javascript
     * const contentful = require('contentful-management')
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * // You need a valid AppDefinition with an activated AppBundle that has a contentful function configured
     * client.getOrganization('<org_id>')
     * .then((org) => org.getAppDefinition('<app_def_id>'))
     * .then((appDefinition) => appDefinition.upsertResourceProvider({
     *    sys: {
     *      id: '<resource_provider_id>'
     *    },
     *    type: 'function',
     *    function: {
     *      sys: {
     *        id: '<contentful_function_id>',
     *        type: 'Link'
     *        linkType: 'Function'
     *      }
     *    }
     * }))
     * .then((resourceProvider) => console.log(resourceProvider))
     * .catch(console.error)
     * ```
     */
    upsertResourceProvider(data: UpsertResourceProviderProps): Promise<import("./export-types").ResourceProvider>;
    /**
     * Gets a Resource Provider
     * @returns Promise for a Resource Provider
     * @example ```javascript
     * const contentful = require('contentful-management')
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getOrganization('<org_id>')
     * .then((org) => org.getAppDefinition('<app_def_id>'))
     * .then((appDefinition) => appDefinition.getResourceProvider())
     * .then((resourceProvider) => console.log(resourceProvider))
     * .catch(console.error)
     * ```
     */
    getResourceProvider(): Promise<import("./export-types").ResourceProvider>;
};
