import type * as Latest from "./latest"; /** * Visitor for API definitions. * This is used to traverse the API definition and apply functions to each node. */ export interface ApiDefinitionVisitor { EndpointDefinition(endpoint: Latest.EndpointDefinition, key: string): Latest.EndpointDefinition; HttpRequest(request: Latest.HttpRequest, key: string): Latest.HttpRequest; HttpResponse(response: Latest.HttpResponse, key: string): Latest.HttpResponse; ErrorResponse(error: Latest.ErrorResponse, key: string): Latest.ErrorResponse; ExampleEndpointCall(example: Latest.ExampleEndpointCall, key: string): Latest.ExampleEndpointCall; CodeSnippet(snippet: Latest.CodeSnippet, key: string): Latest.CodeSnippet; ErrorExample(error: Latest.ErrorExample, key: string): Latest.ErrorExample; WebhookDefinition(webhook: Latest.WebhookDefinition, key: string): Latest.WebhookDefinition; WebhookPayload(payload: Latest.WebhookPayload, key: string): Latest.WebhookPayload; WebSocketChannel(channel: Latest.WebSocketChannel, key: string): Latest.WebSocketChannel; WebSocketMessage(message: Latest.WebSocketMessage, key: string): Latest.WebSocketMessage; ExampleWebSocketSession(session: Latest.ExampleWebSocketSession, key: string): Latest.ExampleWebSocketSession; TypeDefinition(type: Latest.TypeDefinition, key: string): Latest.TypeDefinition; TypeShape(shape: Latest.TypeShape, key: string): Latest.TypeShape; WebhookPayloadShape(shape: Latest.WebhookPayloadShape, key: string): Latest.WebhookPayloadShape; ObjectType(property: Latest.ObjectType, key: string): Latest.ObjectType; ObjectProperty(property: Latest.ObjectProperty, key: string): Latest.ObjectProperty; EnumValue(value: Latest.EnumValue, key: string): Latest.EnumValue; UndiscriminatedUnionVariant(variant: Latest.UndiscriminatedUnionVariant, key: string): Latest.UndiscriminatedUnionVariant; DiscriminatedUnionVariant(variant: Latest.DiscriminatedUnionVariant, key: string): Latest.DiscriminatedUnionVariant; FormDataRequest(request: Latest.FormDataRequest, key: string): Latest.FormDataRequest; FormDataField(field: Latest.FormDataField, key: string): Latest.FormDataField; FormDataFile(file: Latest.FormDataFile, key: string): Latest.FormDataFile; FormDataFiles(files: Latest.FormDataFiles, key: string): Latest.FormDataFiles; } export declare class Transformer { #private; static with(visitor: Partial): Transformer; static descriptions(transformer: (description: string, key: string) => string): Transformer; /** * @internal visible for testing only */ static keys(collect: (key: string) => void): Transformer; private visitor; private constructor(); /** * Visits an API definition and applies the visitor transformations to each node. * * This function treats the API Definition as an AST. The purpose is to apply transformations to the "description" field of each node. * * @param api the API definition to visit * @param visitor the visitor to apply to the API definition * @returns the API definition with the visitor transformations applied */ apiDefinition: (api: Latest.ApiDefinition) => Latest.ApiDefinition; endpoint: (endpoint: Latest.EndpointDefinition, parentKey: string) => Latest.EndpointDefinition; httpRequest: (request: Latest.HttpRequest, parentKey: string) => Latest.HttpRequest; formDataField: (field: Latest.FormDataField, parentKey: string) => Latest.FormDataField; httpResponse: (response: Latest.HttpResponse, parentKey: string) => Latest.HttpResponse; objectType: (type: T, parentKey: string) => T; errorResponse: (error: Latest.ErrorResponse, parentKey: string) => Latest.ErrorResponse; exampleEndpointCall: (example: Latest.ExampleEndpointCall, parentKey: string) => Latest.ExampleEndpointCall; webhookDefinition: (webhook: Latest.WebhookDefinition, parentKey: string) => Latest.WebhookDefinition; webhookPayload: (payload: Latest.WebhookPayload, parentKey: string) => Latest.WebhookPayload; webhookPayloadShape: (shape: Latest.WebhookPayloadShape, parentKey: string) => Latest.WebhookPayloadShape; webSocketChannel: (channel: Latest.WebSocketChannel, parentKey: string) => Latest.WebSocketChannel; webSocketMessage: (message: Latest.WebSocketMessage, parentKey: string) => Latest.WebSocketMessage; typeShape: (shape: Latest.TypeShape, parentKey: string) => Latest.TypeShape; formDataRequest: (request: Latest.FormDataRequest, parentKey: string) => Latest.FormDataRequest; typeDefinition: (type: Latest.TypeDefinition, parentKey: string) => Latest.TypeDefinition; } //# sourceMappingURL=transformer.d.ts.map