import { BaseAppFetch } from './types'; /** * * Fetch function that handles token refresh and other common use cases. * * @description * This is a **BaseApp** feature. * * If you believe your changes should be in the BaseApp, please read the **CONTRIBUTING.md** guide. * * @example Fetching data with params * ```ts * const data = await baseAppFetch('/users', { * params: { * search: 'John Doe', * }, * }) * ``` * * @example Fetching data with a POST request * ```ts * const data = await baseAppFetch('/users', { * method: 'POST', * body: { * firstName: 'John', * lastName: 'Doe', * }, * }) * ``` * * @example Turning off common utilities * ```ts * const data = await baseAppFetch('/users', { * decamelizeRequestBodyKeys: false, * decamelizeRequestParamsKeys: false, * camelizeResponseDataKeys: false, * stringifyBody: false, * setContentType: false, * }) * ``` * * @example Altering defaults * * Consider creating an instance of `baseAppFetch` with your custom defaults to reuse, so you don't have to pass them every time. * * ```ts * export const customBaseAppFetch = (props: BaseAppFetchOptions) => baseAppFetch('/not/authenticated/api/route', { * baseUrl: 'https://another.api.io', * servicesWithoutToken: [/^\/not\/authenticated\/api\/route/, /\/another\/public\/route/], * accessKeyName: "My Custom Access Cookie", * refreshKeyName: "My Custom Refresh Cookie", * ...props, * }) * ``` */ export declare const baseAppFetch: BaseAppFetch; //# sourceMappingURL=index.d.ts.map