import type { ApiVersion, Parameter, Response } from "@autorest/codemodel"; import { Aspect, Metadata } from "@autorest/codemodel"; import type { DeepPartial } from "@azure-tools/codegen"; import type { LongRunningMetadata } from "./long-running-metadata.js"; /** represents a single callable endpoint with a discrete set of inputs, and any number of output possibilities (responses or exceptions) */ export interface Operation extends Aspect { /** * Original Operation ID if present. * This can be used to identify the original id of an operation before it is styled. * THIS IS NOT the name of the operation that should be used in the generator. Use `.language.default.name` for this */ operationId?: string; /** common parameters when there are multiple requests */ parameters?: Array; /** a common filtered list of parameters that is (assumably) the actual method signature parameters */ signatureParameters?: Array; /** * Mapping of all the content types available for this operation to the coresponding request. */ requestMediaTypes?: Record; /** * List of headers that parameters should not handle as parameters but with special logic. * See https://github.com/Azure/autorest/tree/main/packages/extensions/modelerfour for configuration `skip-special-headers` to exclude headers. */ specialHeaders?: string[]; /** the different possibilities to build the request. */ requests?: Array; /** responses that indicate a successful call */ responses?: Array; /** responses that indicate a failed call */ exceptions?: Array; /** the apiVersion to use for a given profile name */ profile?: Record; /** the name of convenience API */ convenienceApi?: ConvenienceApi; /** generate protocol api or not */ generateProtocolApi?: boolean; /** genrate as internal API */ internalApi?: boolean; /** the long-running operation metadata */ lroMetadata?: LongRunningMetadata; } export declare class ConvenienceApi extends Metadata { constructor(name: string, initializer?: DeepPartial); requests?: Array; /** * Whether the convenience method returns the significant response headers as a strongly-typed model * (opt-in via the "responseHeadersAsModel" client option). Only applicable to data-plane operations * that have response headers but no response body. */ responseHeadersAsModel?: boolean; } export interface Request extends Metadata { /** the parameter inputs to the operation */ parameters?: Array; /** a filtered list of parameters that is (assumably) the actual method signature parameters */ signatureParameters?: Array; } export declare class Request extends Metadata implements Request { constructor(initializer?: DeepPartial); addParameter(parameter: Parameter): Parameter; updateSignatureParameters(): void; } export declare class Operation extends Aspect implements Operation { constructor($key: string, description: string, initializer?: DeepPartial); /** add a request to the operation */ addRequest(request: Request): Request; addParameter(parameter: Parameter): Parameter; updateSignatureParameters(): void; addResponse(response: Response): Response; addException(exception: Response): Response; addProfile(profileName: string, apiVersion: ApiVersion): this; } /** an operation group represents a container around set of operations */ export interface OperationGroup extends Metadata { $key: string; operations: Array; } export declare class OperationGroup extends Metadata implements OperationGroup { constructor(name: string, objectInitializer?: DeepPartial); addOperation(operation: Operation): Operation; } //# sourceMappingURL=operation.d.ts.map