@shixinde/apifox-swagger
Version:
从 Apifox 导出 Swagger/OpenAPI 文档并生成 TypeScript 类型定义的工具
18 lines (17 loc) • 1.03 kB
TypeScript
/**
* API Types - 类型安全的 API 调用系统
*
* 这个模块提供了一套完整的类型安全 API 调用解决方案,支持:
* - OpenAPI/Swagger 类型定义
* - makeURL 函数用于类型安全的 URL 构建
* - Axios 适配器
* - React Query 适配器
*/
export * from './types.js';
export * from './makeURL.js';
export * from './axios-adapter.js';
export * from './react-query-adapter.js';
export type { HttpMethod, PathParams, QueryParams, RequestBody, ApiResponse, ApiError, PathConfig, Paths } from './types.js';
export { makeURL, makeURLGeneric, buildURL, buildQueryString, buildFullURL, createEndpoint, createSafeCall } from './makeURL.js';
export { TypedAxiosClient, createTypedAxiosClient, createTypedAxiosClientWithConfig, createTypedAxiosClientSync, callApi, createApiFactory } from './axios-adapter.js';
export { ReactQueryFactory, createReactQueryFactory, createQueryConfig, createMutationConfig, createQueryKey, createQueryFunction, createMutationFunction } from './react-query-adapter.js';