import type { RawAxiosRequestHeaders } from 'axios'; import type { CollectionProp, GetAppDefinitionParams, GetOrganizationParams, QueryParams } from '../../common-types'; import type { AppDefinitionProps, AppInstallationsForOrganizationProps, CreateAppDefinitionProps } from '../../entities/app-definition'; import type { OptionalDefaults } from '../wrappers/wrap'; export type AppDefinitionPlainClientAPI = { /** * Fetch an App Definition * @param params entity IDs to identify the App Definition * @returns the App Definition config * @throws if the request fails, or the App Definition is not found * @example * ```javascript * const appDefinition = await client.appDefinition.get({ * organizationId: '', * appDefinitionId: '', * }); * ``` */ get(params: OptionalDefaults): Promise; /** * Fetch all App Definitions for the given Organization * @param params entity IDs to identify the Organization from which to fetch App Definitions * @returns an object containing an array of App Definitions * @throws if the request fails, or the Organization is not found * @example * ```javascript * const results = await client.appDefinition.getMany({ * organizationId: '', * }); * ``` */ getMany(params: OptionalDefaults): Promise>; /** * Create an App Definition * @param params entity IDs to identify the Organization where the App Definition will be created * @param rawData the new App Definition * @returns the new App Definition * @throws if the request fails, the Organization is not found, or the update payload is malformed * @example * ```javascript * const appDefinition = await client.appDefinition.create( * { * organizationId: '', * }, * { * name: "Hello world!", * parameters: {}, * src: "https://example.com/app.html", * locations: [ * { * location: "entry-sidebar", * }, * ], * } * ); * ``` */ create(params: OptionalDefaults, rawData: CreateAppDefinitionProps): Promise; /** * Update an App Definition * @param params entity IDs to identify the App Definition * @param rawData the updated App Definition config * @returns the updated App Definition config * @throws if the request fails, the App Definition is not found, or the update payload is malformed * @example * ```javascript * const updatedAppDefinition = await client.appDefinition.update( * { * organizationId: '', * appDefinitionId: '', * }, * { * ...currentAppDefinition, * name: "New App Definition name", * } * ); * ``` */ update(params: OptionalDefaults, rawData: AppDefinitionProps, headers?: RawAxiosRequestHeaders): Promise; /** * Delete an App Definition * @param params entity IDs to identify the App Definition * @throws if the request fails, or the App Definition is not found * @example * ```javascript * await client.appDefinition.delete({ * organizationId: '', * appDefinitionId: '', * }); * ``` */ delete(params: OptionalDefaults): Promise; /** * @deprecated * Please use please use appInstallations.getForOrganization instead */ getInstallationsForOrg(params: OptionalDefaults): Promise; };