import type { DefaultElements, BasicMetaSysProps, SysLink, MakeRequest, Link } from '../common-types';
import type { ContentfulAppDefinitionAPI } from '../create-app-definition-api';
import type { SetOptional, Except } from 'type-fest';
import type { FieldType } from './field-type';
import type { InstallationParameterType, ParameterDefinition } from './widget-parameters';
import type { AppInstallationProps } from './app-installation';
import type { EnvironmentProps } from './environment';
export interface NavigationItem {
    name: string;
    path: string;
}
export interface AppDefinitionAgent {
    id: string;
}
/**
 * These locations are currently restricted to internal Contentful apps only.
 * If you are interested in using these locations for your app,
 * please reach out to Contentful Support (https://www.contentful.com/support/).
 */
type InternalLocationType = 'agent';
type LocationType = 'app-config' | 'entry-sidebar' | 'entry-editor' | 'dialog' | 'page' | 'home' | InternalLocationType;
export interface SimpleLocation {
    location: LocationType;
}
export interface EntryFieldLocation {
    location: 'entry-field';
    fieldTypes: FieldType[];
}
export interface PageLocation {
    location: 'page';
    navigationItem?: NavigationItem;
}
export type AppLocation = SimpleLocation | EntryFieldLocation | PageLocation;
export type AppDefinitionProps = {
    /**
     * System metadata
     */
    sys: BasicMetaSysProps & {
        organization: SysLink;
        shared: boolean;
    };
    /**
     * App name
     */
    name: string;
    /**
     * This property is currently restricted to internal Contentful apps only.
     * If you are interested in building agents using the App Framework,
     * please reach out to Contentful Support (https://www.contentful.com/support/).
     */
    agent?: AppDefinitionAgent;
    /**
     * URL where the root HTML document of the app can be found
     */
    src?: string;
    /**
     * Link to an AppBundle
     */
    bundle?: Link<'AppBundle'>;
    /**
     * Locations where the app can be installed
     */
    locations?: AppLocation[];
    /**
     * Instance parameter definitions
     */
    parameters?: {
        instance?: ParameterDefinition[];
        installation?: ParameterDefinition<InstallationParameterType>[];
    };
};
export type CreateAppDefinitionProps = SetOptional<Except<AppDefinitionProps, 'sys' | 'bundle'>, 'src' | 'locations'>;
export type AppDefinition = ContentfulAppDefinitionAPI & AppDefinitionProps & DefaultElements<AppDefinitionProps>;
export type AppInstallationsForOrganizationProps = {
    sys: {
        type: 'Array';
    };
    items: AppInstallationProps[];
    includes: {
        Environment: EnvironmentProps[];
    };
};
/**
 * @internal
 * @param makeRequest - function to make requests via an adapter
 * @param data - Raw App Definition data
 * @returns Wrapped App Definition data
 */
export declare function wrapAppDefinition(makeRequest: MakeRequest, data: AppDefinitionProps): AppDefinition;
/**
 * @internal
 * @param makeRequest - function to make requests via an adapter
 * @param data - Raw App Definition collection data
 * @returns Wrapped App Definition collection data
 */
export declare const wrapAppDefinitionCollection: (makeRequest: MakeRequest, data: import("..").CollectionProp<AppDefinitionProps>) => import("..").Collection<AppDefinition, AppDefinitionProps>;
export {};
