import type { ApiCtx } from './types'; import type { SagaApi } from './pipe'; import type { SagaQueryApi } from './api-types'; /** * Creates a middleware pipeline for HTTP requests. * * @remarks * It uses {@link createPipe} under the hood. * * @example * ```ts * import { createApi, requestMonitor, fetcher } from 'saga-query'; * * const api = createApi(); * api.use(requestMonitor()); * api.use(api.routes()); * api.use(fetcher({ baseUrl: 'https://api.com' })); * * const fetchUsers = api.get('/users', function*(ctx, next) { * yield next(); * }); * * store.dispatch(fetchUsers()); * ``` */ export declare function createApi(basePipe?: SagaApi): SagaQueryApi;