import type { DefaultElements, BasicMetaSysProps, SysLink, MakeRequest } from '../common-types'; import type { Except } from 'type-fest'; import type { FreeFormParameters } from './widget-parameters'; export type AppInstallationProps = { sys: Omit & { appDefinition: SysLink; environment: SysLink; space: SysLink; }; /** * Free-form installation parameters (API limits stringified length to 32KB) */ parameters?: FreeFormParameters; }; export type CreateAppInstallationProps = Except; export interface AppInstallation extends AppInstallationProps, DefaultElements { /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. * @example ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ * accessToken: '' * }) * * client.getSpace('') * .then((space) => space.getEnvironment('')) * .then((environment) => environment.getAppInstallation('')) * .then((appInstallation) => { * appInstallation.parameters.someParameter = 'New Value' * return appInstallation.update() * }) * .then((appInstallation) => console.log(`App installation ${appInstallation.sys.id} was updated`)) * .catch(console.error) * ``` */ update(): Promise; /** * Deletes this object on the server. * @return 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: '' * }) * * client.getSpace('') * .then((space) => space.getEnvironment('')) * .then((environment) => environment.getAppInstallation('')) * .then((appInstallation) => appInstallation.delete()) * .then(() => console.log(`App installation deleted.`)) * .catch(console.error) * ``` */ delete(): Promise; } /** * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw App Installation data * @return Wrapped App installation data */ export declare function wrapAppInstallation(makeRequest: MakeRequest, data: AppInstallationProps): AppInstallation; /** * @private */ export declare const wrapAppInstallationCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp) => import("../common-types").Collection;