import type { RawAxiosRequestHeaders } from 'axios'; import type { CollectionProp, GetSpaceEnvAliasParams, GetSpaceParams, PaginationQueryParams } from '../../common-types'; import type { CreateEnvironmentAliasProps, EnvironmentAliasProps } from '../../entities/environment-alias'; import type { OptionalDefaults } from '../wrappers/wrap'; export type EnvironmentAliasPlainClientAPI = { /** * Fetch an environment alias * @param params a space and environment alias id * @returns the environment alias\ * @throws if the environment alias does not exist * @example * ```javascript * const environmentAlias = await client.environmentAlias.get({ * spaceId: '', * environmentAliasId: '' * }) * ``` */ get(params: OptionalDefaults): Promise; /** * Fetch all environment aliases in a space * @param params a space Id and optional pagination parameters * @returns a collection of environment aliases * @throws if the space does not exist * @example * ```javascript * const environmentAliases = await client.environmentAlias.getMany({ * spaceId: '' * }) * ``` */ getMany(params: OptionalDefaults): Promise>; /** * Create an environment alias * @param params a space ID to create the environment alias in * @param rawData the environment alias metadata * @param headers optional custom headers * @returns the created environment alias * @throws if the space does not exist, or `rawData` is invalid * @example * ```javascript * const environmentAlias = await client.environmentAlias.createWithId( * { * spaceId: '', * environmentAliasId: '', * }, * { * environment: { * sys: { * type: 'Link', * linkType: 'Environment', * id: '', * }, * }, * } * ); * ``` */ createWithId(params: OptionalDefaults, rawData: CreateEnvironmentAliasProps, headers?: RawAxiosRequestHeaders): Promise; /** * Update an environment alias * @param params a space and environment alias id * @param rawData the updated environment alias metadata * @param headers optional custom headers * @returns the updated environment alias * @throws if the environment alias does not exist, or `rawData` is invalid * @example * ```javascript * const environmentAlias = await client.environmentAlias.update( * { * spaceId: '', * environmentAliasId: '', * }, * { * environment: { * sys: { * type: 'Link', * linkType: 'Environment', * id: '', * }, * } * ); */ update(params: OptionalDefaults, rawData: EnvironmentAliasProps, headers?: RawAxiosRequestHeaders): Promise; /** * Delete an environment alias * @param params a space and environment alias id * @returns an empty object * @throws if the environment alias does not exist * @example * ```javascript * await client.environmentAlias.delete({ * spaceId: '', * environmentAliasId: '', * }) * ``` */ delete(params: OptionalDefaults): Promise; };