/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: b55cc8372801 */ import { QueryClient, QueryFunctionContext, QueryKey, } from "@tanstack/react-query"; import { GleanCore } from "../core.js"; import { governanceListfindingsexports } from "../funcs/governanceListfindingsexports.js"; import { combineSignals } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export type GovernanceListfindingsexportsQueryData = components.ListDlpFindingsExportsResponse; export function prefetchGovernanceListfindingsexports( queryClient: QueryClient, client$: GleanCore, options?: RequestOptions, ): Promise { return queryClient.prefetchQuery({ ...buildGovernanceListfindingsexportsQuery( client$, options, ), }); } export function buildGovernanceListfindingsexportsQuery( client$: GleanCore, options?: RequestOptions, ): { queryKey: QueryKey; queryFn: ( context: QueryFunctionContext, ) => Promise; } { return { queryKey: queryKeyGovernanceListfindingsexports(), queryFn: async function governanceListfindingsexportsQueryFn( ctx, ): Promise { const sig = combineSignals( ctx.signal, options?.signal, options?.fetchOptions?.signal, ); const mergedOptions = { ...options?.fetchOptions, ...options, signal: sig, }; return unwrapAsync(governanceListfindingsexports( client$, mergedOptions, )); }, }; } export function queryKeyGovernanceListfindingsexports(): QueryKey { return ["@gleanwork/api-client", "Governance", "listfindingsexports"]; }