UNPKG

ctan-openapi-fetch

Version:
26 lines (25 loc) 1.13 kB
import { type Client, type ClientOptions, type PathBasedClient } from 'openapi-fetch'; import type { MediaType } from 'openapi-typescript-helpers'; import type * as openapi from '../dist/openapi/search.d.ts'; /** * The default value of {@link ClientOptions.baseUrl}. */ export declare const baseUrl: "https://ctan.org"; export interface CtanClientOptions extends ClientOptions { /** * @defaultValue `'https://ctan.org'` */ baseUrl?: Required<ClientOptions>['baseUrl']; } /** * openapi-fetch's `createClient` function * with default `Paths` type and `baseUrl` for CTAN. */ export declare function createClient<Paths extends {} = openapi.paths, Media extends MediaType = MediaType>(options?: Readonly<CtanClientOptions>): Client<Paths, Media>; /** * openapi-fetch's `createPathBasedClient` function * with default `Paths` type and `baseUrl` for CTAN. */ export declare function createPathBasedClient<Paths extends {} = openapi.paths, Media extends MediaType = MediaType>(options?: Readonly<CtanClientOptions>): PathBasedClient<Paths, Media>; export type { openapi }; export type * from 'openapi-fetch';