@7nohe/openapi-react-query-codegen
Version:
OpenAPI React Query Codegen
17 lines (16 loc) • 869 B
text/typescript
import type { GenerationContext, OperationInfo } from "../types.mjs";
/**
* Resolve the generated Data type name for an operation, falling back to
* unknown when the SDK signature exposes no Data type.
* See OperationInfo.dataTypeName for why the name is read from the signature
* instead of derived from the method name (#213).
*/
export declare function getDataTypeName(op: OperationInfo): string;
/**
* Get the error type string based on client type.
* The Error type shares its stem with the Data type — hey-api mints both from
* the operationId (see OperationInfo.dataTypeName, #213) — so the stem comes
* from `dataTypeName` rather than the method name. The modelNames probe stays
* because operations without error responses have no generated Error type.
*/
export declare function getErrorType(op: OperationInfo, ctx: GenerationContext): string;