#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere
TypeScript dockerhacktoberfestjavapdfpdf-converterpdf-editorpdf-manipulationpdf-mergerpdf-ocrpdf-toolspdf-web-appspdfmergerself-hosted
import { useQuery } from "@tanstack/react-query";
import { qk } from "@processor/queries/keys";
import { toAsyncState } from "@processor/queries/adapters";
import type { AsyncState } from "@processor/hooks/useAsync";
import {
fetchPipelines,
type PipelinesOverviewResponse,
} from "@processor/api/pipelines";
/** Base query: the pipelines overview (GET /api/v1/policies/overview). */
export function usePipelines(): AsyncState<PipelinesOverviewResponse> {
return toAsyncState(
useQuery({ queryKey: qk.pipelines(), queryFn: fetchPipelines }),
);
}