import type { CollectionProp, GetAppActionParams, GetAppActionsForEnvParams, GetAppDefinitionParams, QueryParams } from '../../common-types'; import type { AppActionProps, CreateAppActionProps } from '../../entities/app-action'; import type { OptionalDefaults } from '../wrappers/wrap'; export type AppActionPlainClientAPI = { /** * Fetches the App Action * @param params entity IDs to identify the App Action * @returns the App Action * @throws if the request fails, or the App Action is not found * @example * ```javascript * const appAction = await client.appAction.get({ * organizationId: "", * appDefinitionId: "", * appActionId: "", * }); * ``` */ get(params: OptionalDefaults): Promise; /** * Fetches all App Actions for the given App * @param params entity IDs to identify the App * @returns an object containing an array of App Actions * @throws if the request fails, or the App is not found * @example * ```javascript * const appActions = await client.appAction.getMany({ * organizationId: "", * appDefinitionId: "", * }); * ``` */ getMany(params: OptionalDefaults): Promise>; /** * Fetches all App Actions for the given environment * @param params entity IDs to identify the Environment * @returns an object containing an array of App Actions * @throws if the request fails, or the Environment is not found * @example * ```javascript * const appActions = await client.appAction.getManyForEnvironment({ * spaceId: "", * environmentId: "", * }); * ``` */ getManyForEnvironment(params: OptionalDefaults): Promise>; /** * Deletes the App Action * @param params entity IDs to identify the App Action to delete * @returns void * @throws if the request fails, or the App Action is not found * @example * ```javascript * await client.appAction.delete({ * organizationId: "", * appDefinitionId: "", * appActionId: "", * }); * ``` */ delete(params: OptionalDefaults): Promise; /** * Creates an App Action * @param params entity IDs to scope where to create the App Action * @param payload the App Action details * @returns the created App Action and its metadata * @throws if the request fails, an entity is not found, or the payload is malformed * @example * ```javascript * const appAction = await client.appAction.create( * { * organizationId: "", * appDefinitionId: "", * appActionId: "", * }, * { * category: "Notification.v1.0", * url: "https://www.somewhere-else.com/action", * description: "sends a notification", * name: "My Notification", * } * ); * ``` */ create(params: OptionalDefaults, payload: CreateAppActionProps): Promise; /** * Updates an App Action * @param params entity IDs to identify the App Action * @param payload the App Action update * @returns the updated App Action and its metadata * @throws if the request fails, the App Action is not found, or the payload is malformed * @example * ```javascript * const appAction = await client.appAction.update( * { * organizationId: "", * appDefinitionId: "", * appActionId: "", * }, * { * category: "Notification.v1.0", * url: "https://www.somewhere-else.com/action", * description: "sends a notification", * name: "My Notification", * } * ); * ``` */ update(params: OptionalDefaults, payload: CreateAppActionProps): Promise; };