import type { Except } from 'type-fest'; import type { BasicMetaSysProps, DefaultElements, MakeRequest, SysLink } from '../common-types'; type AppEventSubscriptionSys = Except & { appDefinition: SysLink; organization: SysLink; }; export type AppEventSubscriptionProps = { /** * System metadata */ sys: AppEventSubscriptionSys; /** Subscription url that will receive events */ targetUrl: string; /** List of topics to subscribe to */ topics: string[]; }; export type CreateAppEventSubscriptionProps = Except; export interface AppEventSubscription extends AppEventSubscriptionProps, DefaultElements { /** * 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.getOrganization('') * .then((organization) => organization.getAppEventSubscription()) * .then((eventSubscription) => eventSubscription.delete()) * .then(() => console.log('eventSubscription deleted')) * .catch(console.error) * ``` */ delete(): Promise; } /** * @private * @param http - HTTP client instance * @param data - Raw AppEventSubscription data * @return Wrapped AppEventSubscription data */ export declare function wrapAppEventSubscription(makeRequest: MakeRequest, data: AppEventSubscriptionProps): AppEventSubscription; export {};