import type { Combine, StrictOmit } from 'ts-gems'; import { OpraSchema } from '../../schema/index.js'; import type { ApiDocument } from '../api-document.js'; import { HttpMediaType } from './http-media-type.js'; import { HttpOperation } from './http-operation.js'; import type { HttpParameter } from './http-parameter.js'; import { HttpStatusRange } from './http-status-range.js'; /** * @namespace HttpOperationResponse */ export declare namespace HttpOperationResponse { interface Metadata extends Combine<{ statusCode: number | string | (number | string)[]; parameters?: HttpParameter.Metadata[]; partial?: boolean | 'deep'; }, HttpMediaType.Metadata> { } interface Options extends HttpMediaType.Options { partial?: boolean | 'deep'; } interface InitArguments extends Combine<{ statusCode: number | string | HttpStatusRange | OpraSchema.HttpStatusRange | (number | string | HttpStatusRange | OpraSchema.HttpStatusRange)[]; }, HttpMediaType.InitArguments, StrictOmit> { } } /** * @class HttpOperationResponse */ export declare class HttpOperationResponse extends HttpMediaType { readonly owner: HttpOperation; statusCode: HttpStatusRange[]; parameters: HttpParameter[]; partial?: boolean | 'deep'; constructor(owner: HttpOperation, init: HttpOperationResponse.InitArguments); findParameter(paramName: string, location?: OpraSchema.HttpParameterLocation): HttpParameter | undefined; /** Responses live in an array and have no name — the status code is * their identity. A range or a multi-status response (or two responses * sharing a status but differing in content type) is exactly the case * `docKey` exists for. */ /** A response keys off its status code, which is always declared — the * media-type rule it would otherwise inherit (keyed by an optional * `contentType`) doesn't apply here. */ get docKeyUnstable(): boolean; protected get docKeySegment(): string[]; toJSON(options?: ApiDocument.ExportOptions): OpraSchema.HttpOperationResponse; }