/* * 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 * as operations from "../models/operations/index.js"; import { useSDKContext } from "./_context.js"; import { QueryHookOptions, SuspenseQueryHookOptions, TupleToPrefixes, } from "./_types.js"; import { buildLlmVectorStoresGetFileBatchQuery, LlmVectorStoresGetFileBatchQueryData, prefetchLlmVectorStoresGetFileBatch, queryKeyLlmVectorStoresGetFileBatch, } from "./llmVectorStoresGetFileBatch.core.js"; export { buildLlmVectorStoresGetFileBatchQuery, type LlmVectorStoresGetFileBatchQueryData, prefetchLlmVectorStoresGetFileBatch, queryKeyLlmVectorStoresGetFileBatch, }; export type LlmVectorStoresGetFileBatchQueryError = | SDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError; /** * Retrieve file batch status * * @remarks * Retrieves the status of a specific file batch operation within a vector store. */ export function useLlmVectorStoresGetFileBatch( request: operations.GetVectorStoreFileBatchRequest, options?: QueryHookOptions< LlmVectorStoresGetFileBatchQueryData, LlmVectorStoresGetFileBatchQueryError >, ): UseQueryResult< LlmVectorStoresGetFileBatchQueryData, LlmVectorStoresGetFileBatchQueryError > { const client = useSDKContext(); return useQuery({ ...buildLlmVectorStoresGetFileBatchQuery( client, request, options, ), ...options, }); } /** * Retrieve file batch status * * @remarks * Retrieves the status of a specific file batch operation within a vector store. */ export function useLlmVectorStoresGetFileBatchSuspense( request: operations.GetVectorStoreFileBatchRequest, options?: SuspenseQueryHookOptions< LlmVectorStoresGetFileBatchQueryData, LlmVectorStoresGetFileBatchQueryError >, ): UseSuspenseQueryResult< LlmVectorStoresGetFileBatchQueryData, LlmVectorStoresGetFileBatchQueryError > { const client = useSDKContext(); return useSuspenseQuery({ ...buildLlmVectorStoresGetFileBatchQuery( client, request, options, ), ...options, }); } export function setLlmVectorStoresGetFileBatchData( client: QueryClient, queryKeyBase: [ vectorStoreId: string, batchId: string, parameters: { xOnBehalfOf?: string | undefined }, ], data: LlmVectorStoresGetFileBatchQueryData, ): LlmVectorStoresGetFileBatchQueryData | undefined { const key = queryKeyLlmVectorStoresGetFileBatch(...queryKeyBase); return client.setQueryData(key, data); } export function invalidateLlmVectorStoresGetFileBatch( client: QueryClient, queryKeyBase: TupleToPrefixes< [ vectorStoreId: string, batchId: string, parameters: { xOnBehalfOf?: string | undefined }, ] >, filters?: Omit, ): Promise { return client.invalidateQueries({ ...filters, queryKey: [ "@meetkai/mka1", "vectorStores", "getFileBatch", ...queryKeyBase, ], }); } export function invalidateAllLlmVectorStoresGetFileBatch( client: QueryClient, filters?: Omit, ): Promise { return client.invalidateQueries({ ...filters, queryKey: ["@meetkai/mka1", "vectorStores", "getFileBatch"], }); }