/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: eb38bbf9a06b */ import { InvalidateQueryFilters, QueryClient, useQuery, UseQueryResult, useSuspenseQuery, UseSuspenseQueryResult, } from "@tanstack/react-query"; import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { useGleanContext } from "./_context.js"; import { QueryHookOptions, SuspenseQueryHookOptions } from "./_types.js"; import { buildGovernanceListfindingsexportsQuery, GovernanceListfindingsexportsQueryData, prefetchGovernanceListfindingsexports, queryKeyGovernanceListfindingsexports, } from "./governanceListfindingsexports.core.js"; export { buildGovernanceListfindingsexportsQuery, type GovernanceListfindingsexportsQueryData, prefetchGovernanceListfindingsexports, queryKeyGovernanceListfindingsexports, }; export type GovernanceListfindingsexportsQueryError = | GleanBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError; /** * Lists findings exports * * @remarks * Lists all DLP findings exports. */ export function useGovernanceListfindingsexports( options?: QueryHookOptions< GovernanceListfindingsexportsQueryData, GovernanceListfindingsexportsQueryError >, ): UseQueryResult< GovernanceListfindingsexportsQueryData, GovernanceListfindingsexportsQueryError > { const client = useGleanContext(); return useQuery({ ...buildGovernanceListfindingsexportsQuery( client, options, ), ...options, }); } /** * Lists findings exports * * @remarks * Lists all DLP findings exports. */ export function useGovernanceListfindingsexportsSuspense( options?: SuspenseQueryHookOptions< GovernanceListfindingsexportsQueryData, GovernanceListfindingsexportsQueryError >, ): UseSuspenseQueryResult< GovernanceListfindingsexportsQueryData, GovernanceListfindingsexportsQueryError > { const client = useGleanContext(); return useSuspenseQuery({ ...buildGovernanceListfindingsexportsQuery( client, options, ), ...options, }); } export function setGovernanceListfindingsexportsData( client: QueryClient, data: GovernanceListfindingsexportsQueryData, ): GovernanceListfindingsexportsQueryData | undefined { const key = queryKeyGovernanceListfindingsexports(); return client.setQueryData(key, data); } export function invalidateAllGovernanceListfindingsexports( client: QueryClient, filters?: Omit, ): Promise { return client.invalidateQueries({ ...filters, queryKey: ["@gleanwork/api-client", "Governance", "listfindingsexports"], }); }