/* * 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 { buildLlmModelsListCatalogQuery, LlmModelsListCatalogQueryData, prefetchLlmModelsListCatalog, queryKeyLlmModelsListCatalog, } from "./llmModelsListCatalog.core.js"; export { buildLlmModelsListCatalogQuery, type LlmModelsListCatalogQueryData, prefetchLlmModelsListCatalog, queryKeyLlmModelsListCatalog, }; export type LlmModelsListCatalogQueryError = | SDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError; /** * List the organization's model catalog * * @remarks * Lists all BYO, serving, and cluster-access definitions with activation state, blocker, health, and price preview. */ export function useLlmModelsListCatalog( options?: QueryHookOptions< LlmModelsListCatalogQueryData, LlmModelsListCatalogQueryError >, ): UseQueryResult< LlmModelsListCatalogQueryData, LlmModelsListCatalogQueryError > { const client = useSDKContext(); return useQuery({ ...buildLlmModelsListCatalogQuery( client, options, ), ...options, }); } /** * List the organization's model catalog * * @remarks * Lists all BYO, serving, and cluster-access definitions with activation state, blocker, health, and price preview. */ export function useLlmModelsListCatalogSuspense( options?: SuspenseQueryHookOptions< LlmModelsListCatalogQueryData, LlmModelsListCatalogQueryError >, ): UseSuspenseQueryResult< LlmModelsListCatalogQueryData, LlmModelsListCatalogQueryError > { const client = useSDKContext(); return useSuspenseQuery({ ...buildLlmModelsListCatalogQuery( client, options, ), ...options, }); } export function setLlmModelsListCatalogData( client: QueryClient, data: LlmModelsListCatalogQueryData, ): LlmModelsListCatalogQueryData | undefined { const key = queryKeyLlmModelsListCatalog(); return client.setQueryData(key, data); } export function invalidateAllLlmModelsListCatalog( client: QueryClient, filters?: Omit, ): Promise { return client.invalidateQueries({ ...filters, queryKey: ["@meetkai/mka1", "models", "listCatalog"], }); }