/** * Example endpoint configurations that work with polling strategies * These show how to properly configure endpoints for different polling scenarios */ export declare const pollingEndpoints: { readonly getJobStatus: { readonly url: "/jobs/:jobId"; readonly method: "GET"; }; readonly startJob: { readonly url: "/jobs"; readonly method: "POST"; }; readonly cancelJob: { readonly url: "/jobs/:jobId/cancel"; readonly method: "POST"; }; readonly healthCheck: { readonly url: "/health"; readonly method: "GET"; }; readonly getLiveData: { readonly url: "/live-data"; readonly method: "GET"; }; readonly getDashboardMetrics: { readonly url: "/dashboard/metrics"; readonly method: "GET"; }; readonly startSync: { readonly url: "/sync"; readonly method: "POST"; }; readonly getSyncStatus: { readonly url: "/sync/:syncId"; readonly method: "GET"; }; readonly getResourceStatus: { readonly url: "/resources/:resourceId"; readonly method: "GET"; }; readonly reserveResource: { readonly url: "/resources/:resourceId/reserve"; readonly method: "POST"; }; }; /** * Example usage with fetchff and polling: * * ```typescript * import { createApiFetcher } from 'fetchff'; * import type { PollingEndpointTypes } from './polling'; * * const api = createApiFetcher({ * baseURL: 'https://api.example.com', * endpoints: pollingEndpoints, * }); * * // Start a job and poll for completion * const { data: job } = await api.startJob({ * body: { type: 'export', parameters: { format: 'csv' } } * }); * * // Poll job status using the jobStatus strategy * const { data: result } = await api.getJobStatus({ * urlPathParams: { jobId: job.jobId }, * polling: 'jobStatus', // Uses our preset strategy * }); * * // Or with custom polling * const { data: result } = await api.getJobStatus({ * urlPathParams: { jobId: job.jobId }, * polling: { * interval: 3000, * shouldStop: (response) => { * const status = response.data?.status; * return status === 'completed' || status === 'failed'; * } * } * }); * ``` */ //# sourceMappingURL=polling.d.ts.map