/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { QueryClient, QueryFunctionContext, QueryKey, } from "@tanstack/react-query"; import { GustoEmbeddedCore } from "../core.js"; import { employeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatuses } from "../funcs/employeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatuses.js"; import { combineSignals } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { GetV1EmployeesEmployeeUuidSection603HighEarnerStatusesHeaderXGustoAPIVersion, GetV1EmployeesEmployeeUuidSection603HighEarnerStatusesRequest, GetV1EmployeesEmployeeUuidSection603HighEarnerStatusesResponse, } from "../models/operations/getv1employeesemployeeuuidsection603highearnerstatuses.js"; import { unwrapAsync } from "../types/fp.js"; export type EmployeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatusesQueryData = GetV1EmployeesEmployeeUuidSection603HighEarnerStatusesResponse; export function prefetchEmployeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatuses( queryClient: QueryClient, client$: GustoEmbeddedCore, request: GetV1EmployeesEmployeeUuidSection603HighEarnerStatusesRequest, options?: RequestOptions, ): Promise { return queryClient.prefetchQuery({ ...buildEmployeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatusesQuery( client$, request, options, ), }); } export function buildEmployeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatusesQuery( client$: GustoEmbeddedCore, request: GetV1EmployeesEmployeeUuidSection603HighEarnerStatusesRequest, options?: RequestOptions, ): { queryKey: QueryKey; queryFn: ( context: QueryFunctionContext, ) => Promise< EmployeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatusesQueryData >; } { return { queryKey: queryKeyEmployeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatuses( request.employeeUuid, { xGustoAPIVersion: request.xGustoAPIVersion }, ), queryFn: async function employeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatusesQueryFn( ctx, ): Promise< EmployeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatusesQueryData > { const sig = combineSignals( ctx.signal, options?.signal, options?.fetchOptions?.signal, ); const mergedOptions = { ...options?.fetchOptions, ...options, signal: sig, }; return unwrapAsync( employeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatuses( client$, request, mergedOptions, ), ); }, }; } export function queryKeyEmployeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatuses( employeeUuid: string, parameters: { xGustoAPIVersion?: | GetV1EmployeesEmployeeUuidSection603HighEarnerStatusesHeaderXGustoAPIVersion | undefined; }, ): QueryKey { return [ "@gusto/embedded-api", "employeeBenefits", "getV1EmployeesEmployeeUuidSection603HighEarnerStatuses", employeeUuid, parameters, ]; }