/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { InvalidateQueryFilters, QueryClient, useQuery, UseQueryResult, useSuspenseQuery, UseSuspenseQueryResult, } from "@tanstack/react-query"; import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { useSDKContext } from "./_context.js"; import { QueryHookOptions, SuspenseQueryHookOptions } from "./_types.js"; import { buildLlmModelsGetClusterCurrencyQuery, LlmModelsGetClusterCurrencyQueryData, prefetchLlmModelsGetClusterCurrency, queryKeyLlmModelsGetClusterCurrency, } from "./llmModelsGetClusterCurrency.core.js"; export { buildLlmModelsGetClusterCurrencyQuery, type LlmModelsGetClusterCurrencyQueryData, prefetchLlmModelsGetClusterCurrency, queryKeyLlmModelsGetClusterCurrency, }; export type LlmModelsGetClusterCurrencyQueryError = | SDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError; /** * Get the cluster currency * * @remarks * Returns the single cluster-wide ISO-4217 currency code (null if not set). */ export function useLlmModelsGetClusterCurrency( options?: QueryHookOptions< LlmModelsGetClusterCurrencyQueryData, LlmModelsGetClusterCurrencyQueryError >, ): UseQueryResult< LlmModelsGetClusterCurrencyQueryData, LlmModelsGetClusterCurrencyQueryError > { const client = useSDKContext(); return useQuery({ ...buildLlmModelsGetClusterCurrencyQuery( client, options, ), ...options, }); } /** * Get the cluster currency * * @remarks * Returns the single cluster-wide ISO-4217 currency code (null if not set). */ export function useLlmModelsGetClusterCurrencySuspense( options?: SuspenseQueryHookOptions< LlmModelsGetClusterCurrencyQueryData, LlmModelsGetClusterCurrencyQueryError >, ): UseSuspenseQueryResult< LlmModelsGetClusterCurrencyQueryData, LlmModelsGetClusterCurrencyQueryError > { const client = useSDKContext(); return useSuspenseQuery({ ...buildLlmModelsGetClusterCurrencyQuery( client, options, ), ...options, }); } export function setLlmModelsGetClusterCurrencyData( client: QueryClient, data: LlmModelsGetClusterCurrencyQueryData, ): LlmModelsGetClusterCurrencyQueryData | undefined { const key = queryKeyLlmModelsGetClusterCurrency(); return client.setQueryData(key, data); } export function invalidateAllLlmModelsGetClusterCurrency( client: QueryClient, filters?: Omit, ): Promise { return client.invalidateQueries({ ...filters, queryKey: ["@meetkai/mka1", "models", "getClusterCurrency"], }); }