import type { GetAppDefinitionParams } from '../../common-types'; import type { AppEventSubscriptionProps, CreateAppEventSubscriptionProps } from '../../entities/app-event-subscription'; import type { OptionalDefaults } from '../wrappers/wrap'; export type AppEventSubscriptionPlainClientAPI = { /** * Creates or updates an App Event Subscription * @param params entity IDs to identify the App that the Event Subscription belongs to * @param payload the new or updated Event Subscription * @returns the App Event Subscription and its metadata * @throws if the request fails, the App or Event Subscription is not found, or the payload is malformed * @example * ```javascript * const eventSubscription = await client.appEventSubscription.upsert({ * organizationId: '', * appDefinitionId: '', * }, { * targetUrl: ``, * topics: [''], * }) * ``` */ upsert(params: OptionalDefaults, payload: CreateAppEventSubscriptionProps): Promise; /** * Fetches the current App Event Subscription for the given App * @param params entity IDs to identify the App that the Event Subscription belongs to * @returns the App Event Subscription * @throws if the request fails, or the App or the Event Subscription is not found * @example * ```javascript * const eventSubscription = await client.appEventSubscription.get({ * organizationId: '', * appDefinitionId: '', * }) * ``` */ get(params: OptionalDefaults): Promise; /** * Removes the current App Event Subscription for the given App * @param params entity IDs to identify the App that the Event Subscription belongs to * @throws if the request fails, or the App or the Event Subscription is not found * @example * ```javascript * await client.appEventSubscription.delete({ * organizationId: '', * appDefinitionId: '', * }) * ``` */ delete(params: OptionalDefaults): Promise; };