/* * 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 { buildLlmMcpVaultListCredentialsQuery, LlmMcpVaultListCredentialsQueryData, prefetchLlmMcpVaultListCredentials, queryKeyLlmMcpVaultListCredentials, } from "./llmMcpVaultListCredentials.core.js"; export { buildLlmMcpVaultListCredentialsQuery, type LlmMcpVaultListCredentialsQueryData, prefetchLlmMcpVaultListCredentials, queryKeyLlmMcpVaultListCredentials, }; export type LlmMcpVaultListCredentialsQueryError = | SDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError; /** * List MCP credentials * * @remarks * Lists encrypted credential metadata for a user-owned MCP server. */ export function useLlmMcpVaultListCredentials( request: operations.ListMcpCredentialsRequest, options?: QueryHookOptions< LlmMcpVaultListCredentialsQueryData, LlmMcpVaultListCredentialsQueryError >, ): UseQueryResult< LlmMcpVaultListCredentialsQueryData, LlmMcpVaultListCredentialsQueryError > { const client = useSDKContext(); return useQuery({ ...buildLlmMcpVaultListCredentialsQuery( client, request, options, ), ...options, }); } /** * List MCP credentials * * @remarks * Lists encrypted credential metadata for a user-owned MCP server. */ export function useLlmMcpVaultListCredentialsSuspense( request: operations.ListMcpCredentialsRequest, options?: SuspenseQueryHookOptions< LlmMcpVaultListCredentialsQueryData, LlmMcpVaultListCredentialsQueryError >, ): UseSuspenseQueryResult< LlmMcpVaultListCredentialsQueryData, LlmMcpVaultListCredentialsQueryError > { const client = useSDKContext(); return useSuspenseQuery({ ...buildLlmMcpVaultListCredentialsQuery( client, request, options, ), ...options, }); } export function setLlmMcpVaultListCredentialsData( client: QueryClient, queryKeyBase: [ serverId: string, parameters: { limit?: number | undefined; after?: string | undefined; order?: operations.ListMcpCredentialsQueryParamOrder | undefined; includeRevoked?: operations.IncludeRevoked | undefined; xOnBehalfOf?: string | undefined; }, ], data: LlmMcpVaultListCredentialsQueryData, ): LlmMcpVaultListCredentialsQueryData | undefined { const key = queryKeyLlmMcpVaultListCredentials(...queryKeyBase); return client.setQueryData(key, data); } export function invalidateLlmMcpVaultListCredentials( client: QueryClient, queryKeyBase: TupleToPrefixes< [ serverId: string, parameters: { limit?: number | undefined; after?: string | undefined; order?: operations.ListMcpCredentialsQueryParamOrder | undefined; includeRevoked?: operations.IncludeRevoked | undefined; xOnBehalfOf?: string | undefined; }, ] >, filters?: Omit, ): Promise { return client.invalidateQueries({ ...filters, queryKey: ["@meetkai/mka1", "mcpVault", "listCredentials", ...queryKeyBase], }); } export function invalidateAllLlmMcpVaultListCredentials( client: QueryClient, filters?: Omit, ): Promise { return client.invalidateQueries({ ...filters, queryKey: ["@meetkai/mka1", "mcpVault", "listCredentials"], }); }