Files
Memoh/packages/sdk/src/@pinia/colada.gen.ts
T
BBQ 60517bc2a6 feat(acl): add bot security policy presets
Initialize new bots with preset ACL templates and an allow-by-default fallback so common access setups can be selected during bot creation instead of being configured manually afterward.
2026-04-14 05:51:38 +08:00

3286 lines
125 KiB
TypeScript

// This file is auto-generated by @hey-api/openapi-ts
import { type _JSONValue, defineQueryOptions, type UseMutationOptions } from '@pinia/colada';
import { serializeQueryKeyValue } from '../client';
import { client } from '../client.gen';
import { deleteBotsByBotIdAclRulesByRuleId, deleteBotsByBotIdCompactionLogs, deleteBotsByBotIdContainer, deleteBotsByBotIdContainerSkills, deleteBotsByBotIdEmailBindingsById, deleteBotsByBotIdHeartbeatLogs, deleteBotsByBotIdMcpById, deleteBotsByBotIdMcpByIdOauthToken, deleteBotsByBotIdMemory, deleteBotsByBotIdMemoryById, deleteBotsByBotIdMessages, deleteBotsByBotIdScheduleById, deleteBotsByBotIdScheduleLogs, deleteBotsByBotIdSessionsBySessionId, deleteBotsByBotIdSettings, deleteBotsById, deleteBotsByIdChannelByPlatform, deleteBrowserContextsById, deleteEmailProvidersById, deleteEmailProvidersByIdOauthToken, deleteMemoryProvidersById, deleteModelsById, deleteModelsModelByModelId, deleteProvidersById, deleteProvidersByIdOauthToken, deleteSearchProvidersById, getBots, getBotsByBotIdAclChannelIdentities, getBotsByBotIdAclChannelIdentitiesByChannelIdentityIdConversations, getBotsByBotIdAclChannelTypesByChannelTypeConversations, getBotsByBotIdAclDefaultEffect, getBotsByBotIdAclRules, getBotsByBotIdCompactionLogs, getBotsByBotIdContainer, getBotsByBotIdContainerFs, getBotsByBotIdContainerFsDownload, getBotsByBotIdContainerFsList, getBotsByBotIdContainerFsRead, getBotsByBotIdContainerSkills, getBotsByBotIdContainerSnapshots, getBotsByBotIdContainerTerminal, getBotsByBotIdContainerTerminalWs, getBotsByBotIdEmailBindings, getBotsByBotIdEmailOutbox, getBotsByBotIdEmailOutboxById, getBotsByBotIdHeartbeatLogs, getBotsByBotIdLocalWs, getBotsByBotIdMcp, getBotsByBotIdMcpById, getBotsByBotIdMcpByIdOauthStatus, getBotsByBotIdMcpExport, getBotsByBotIdMemory, getBotsByBotIdMemoryStatus, getBotsByBotIdMemoryUsage, getBotsByBotIdMessages, getBotsByBotIdSchedule, getBotsByBotIdScheduleById, getBotsByBotIdScheduleByIdLogs, getBotsByBotIdScheduleLogs, getBotsByBotIdSessions, getBotsByBotIdSessionsBySessionId, getBotsByBotIdSessionsBySessionIdStatus, getBotsByBotIdSettings, getBotsByBotIdTokenUsage, getBotsById, getBotsByIdChannelByPlatform, getBotsByIdChecks, getBrowserContexts, getBrowserContextsById, getBrowserContextsCores, getChannels, getChannelsByPlatform, getEmailOauthCallback, getEmailProviders, getEmailProvidersById, getEmailProvidersByIdOauthAuthorize, getEmailProvidersByIdOauthStatus, getEmailProvidersMeta, getMemoryProviders, getMemoryProvidersById, getMemoryProvidersByIdStatus, getMemoryProvidersMeta, getModels, getModelsById, getModelsCount, getModelsModelByModelId, getPing, getProviders, getProvidersById, getProvidersByIdModels, getProvidersByIdOauthAuthorize, getProvidersByIdOauthStatus, getProvidersCount, getProvidersNameByName, getProvidersOauthCallback, getSearchProviders, getSearchProvidersById, getSearchProvidersMeta, getSpeechModels, getSpeechModelsById, getSpeechModelsByIdCapabilities, getSpeechProviders, getSpeechProvidersMeta, getSupermarketMcps, getSupermarketMcpsById, getSupermarketSkills, getSupermarketSkillsById, getSupermarketTags, getUsers, getUsersById, getUsersMe, getUsersMeChannelsByPlatform, getUsersMeIdentities, type Options, patchBotsByBotIdSessionsBySessionId, patchBotsByIdChannelByPlatformStatus, postAuthLogin, postAuthRefresh, postBots, postBotsByBotIdAclRules, postBotsByBotIdContainer, postBotsByBotIdContainerDataExport, postBotsByBotIdContainerDataImport, postBotsByBotIdContainerDataRestore, postBotsByBotIdContainerFsDelete, postBotsByBotIdContainerFsMkdir, postBotsByBotIdContainerFsRename, postBotsByBotIdContainerFsUpload, postBotsByBotIdContainerFsWrite, postBotsByBotIdContainerSkills, postBotsByBotIdContainerSnapshots, postBotsByBotIdContainerSnapshotsRollback, postBotsByBotIdContainerStart, postBotsByBotIdContainerStop, postBotsByBotIdEmailBindings, postBotsByBotIdLocalMessages, postBotsByBotIdMcp, postBotsByBotIdMcpByIdOauthAuthorize, postBotsByBotIdMcpByIdOauthDiscover, postBotsByBotIdMcpByIdOauthExchange, postBotsByBotIdMcpByIdProbe, postBotsByBotIdMcpOpsBatchDelete, postBotsByBotIdMcpStdio, postBotsByBotIdMcpStdioByConnectionId, postBotsByBotIdMemory, postBotsByBotIdMemoryCompact, postBotsByBotIdMemoryRebuild, postBotsByBotIdMemorySearch, postBotsByBotIdSchedule, postBotsByBotIdSessions, postBotsByBotIdSettings, postBotsByBotIdSupermarketInstallMcp, postBotsByBotIdSupermarketInstallSkill, postBotsByBotIdTools, postBotsByBotIdTtsSynthesize, postBotsByIdChannelByPlatformSend, postBotsByIdChannelByPlatformSendChat, postBrowserContexts, postEmailMailgunWebhookByConfigId, postEmailProviders, postMemoryProviders, postModels, postModelsByIdTest, postProviders, postProvidersByIdImportModels, postProvidersByIdOauthPoll, postProvidersByIdTest, postSearchProviders, postSpeechModelsByIdTest, postUsers, putBotsByBotIdAclDefaultEffect, putBotsByBotIdAclRulesByRuleId, putBotsByBotIdAclRulesReorder, putBotsByBotIdEmailBindingsById, putBotsByBotIdMcpById, putBotsByBotIdMcpImport, putBotsByBotIdScheduleById, putBotsByBotIdSettings, putBotsById, putBotsByIdChannelByPlatform, putBotsByIdOwner, putBrowserContextsById, putEmailProvidersById, putMemoryProvidersById, putModelsById, putModelsModelByModelId, putProvidersById, putSearchProvidersById, putUsersById, putUsersByIdPassword, putUsersMe, putUsersMeChannelsByPlatform, putUsersMePassword } from '../sdk.gen';
import type { DeleteBotsByBotIdAclRulesByRuleIdData, DeleteBotsByBotIdAclRulesByRuleIdError, DeleteBotsByBotIdCompactionLogsData, DeleteBotsByBotIdCompactionLogsError, DeleteBotsByBotIdContainerData, DeleteBotsByBotIdContainerError, DeleteBotsByBotIdContainerSkillsData, DeleteBotsByBotIdContainerSkillsError, DeleteBotsByBotIdContainerSkillsResponse, DeleteBotsByBotIdEmailBindingsByIdData, DeleteBotsByBotIdEmailBindingsByIdError, DeleteBotsByBotIdHeartbeatLogsData, DeleteBotsByBotIdHeartbeatLogsError, DeleteBotsByBotIdMcpByIdData, DeleteBotsByBotIdMcpByIdError, DeleteBotsByBotIdMcpByIdOauthTokenData, DeleteBotsByBotIdMcpByIdOauthTokenError, DeleteBotsByBotIdMemoryByIdData, DeleteBotsByBotIdMemoryByIdError, DeleteBotsByBotIdMemoryByIdResponse, DeleteBotsByBotIdMemoryData, DeleteBotsByBotIdMemoryError, DeleteBotsByBotIdMemoryResponse, DeleteBotsByBotIdMessagesData, DeleteBotsByBotIdMessagesError, DeleteBotsByBotIdScheduleByIdData, DeleteBotsByBotIdScheduleByIdError, DeleteBotsByBotIdScheduleLogsData, DeleteBotsByBotIdScheduleLogsError, DeleteBotsByBotIdSessionsBySessionIdData, DeleteBotsByBotIdSessionsBySessionIdError, DeleteBotsByBotIdSettingsData, DeleteBotsByBotIdSettingsError, DeleteBotsByIdChannelByPlatformData, DeleteBotsByIdChannelByPlatformError, DeleteBotsByIdData, DeleteBotsByIdError, DeleteBotsByIdResponse, DeleteBrowserContextsByIdData, DeleteBrowserContextsByIdError, DeleteEmailProvidersByIdData, DeleteEmailProvidersByIdError, DeleteEmailProvidersByIdOauthTokenData, DeleteEmailProvidersByIdOauthTokenError, DeleteMemoryProvidersByIdData, DeleteMemoryProvidersByIdError, DeleteModelsByIdData, DeleteModelsByIdError, DeleteModelsModelByModelIdData, DeleteModelsModelByModelIdError, DeleteProvidersByIdData, DeleteProvidersByIdError, DeleteProvidersByIdOauthTokenData, DeleteProvidersByIdOauthTokenError, DeleteSearchProvidersByIdData, DeleteSearchProvidersByIdError, GetBotsByBotIdAclChannelIdentitiesByChannelIdentityIdConversationsData, GetBotsByBotIdAclChannelIdentitiesData, GetBotsByBotIdAclChannelTypesByChannelTypeConversationsData, GetBotsByBotIdAclDefaultEffectData, GetBotsByBotIdAclRulesData, GetBotsByBotIdCompactionLogsData, GetBotsByBotIdContainerData, GetBotsByBotIdContainerFsData, GetBotsByBotIdContainerFsDownloadData, GetBotsByBotIdContainerFsListData, GetBotsByBotIdContainerFsReadData, GetBotsByBotIdContainerSkillsData, GetBotsByBotIdContainerSnapshotsData, GetBotsByBotIdContainerTerminalData, GetBotsByBotIdContainerTerminalWsData, GetBotsByBotIdEmailBindingsData, GetBotsByBotIdEmailOutboxByIdData, GetBotsByBotIdEmailOutboxData, GetBotsByBotIdHeartbeatLogsData, GetBotsByBotIdLocalWsData, GetBotsByBotIdMcpByIdData, GetBotsByBotIdMcpByIdOauthStatusData, GetBotsByBotIdMcpData, GetBotsByBotIdMcpExportData, GetBotsByBotIdMemoryData, GetBotsByBotIdMemoryStatusData, GetBotsByBotIdMemoryUsageData, GetBotsByBotIdMessagesData, GetBotsByBotIdScheduleByIdData, GetBotsByBotIdScheduleByIdLogsData, GetBotsByBotIdScheduleData, GetBotsByBotIdScheduleLogsData, GetBotsByBotIdSessionsBySessionIdData, GetBotsByBotIdSessionsBySessionIdStatusData, GetBotsByBotIdSessionsData, GetBotsByBotIdSettingsData, GetBotsByBotIdTokenUsageData, GetBotsByIdChannelByPlatformData, GetBotsByIdChecksData, GetBotsByIdData, GetBotsData, GetBrowserContextsByIdData, GetBrowserContextsCoresData, GetBrowserContextsData, GetChannelsByPlatformData, GetChannelsData, GetEmailOauthCallbackData, GetEmailProvidersByIdData, GetEmailProvidersByIdOauthAuthorizeData, GetEmailProvidersByIdOauthStatusData, GetEmailProvidersData, GetEmailProvidersMetaData, GetMemoryProvidersByIdData, GetMemoryProvidersByIdStatusData, GetMemoryProvidersData, GetMemoryProvidersMetaData, GetModelsByIdData, GetModelsCountData, GetModelsData, GetModelsModelByModelIdData, GetPingData, GetProvidersByIdData, GetProvidersByIdModelsData, GetProvidersByIdOauthAuthorizeData, GetProvidersByIdOauthStatusData, GetProvidersCountData, GetProvidersData, GetProvidersNameByNameData, GetProvidersOauthCallbackData, GetSearchProvidersByIdData, GetSearchProvidersData, GetSearchProvidersMetaData, GetSpeechModelsByIdCapabilitiesData, GetSpeechModelsByIdData, GetSpeechModelsData, GetSpeechProvidersData, GetSpeechProvidersMetaData, GetSupermarketMcpsByIdData, GetSupermarketMcpsData, GetSupermarketSkillsByIdData, GetSupermarketSkillsData, GetSupermarketTagsData, GetUsersByIdData, GetUsersData, GetUsersMeChannelsByPlatformData, GetUsersMeData, GetUsersMeIdentitiesData, PatchBotsByBotIdSessionsBySessionIdData, PatchBotsByBotIdSessionsBySessionIdError, PatchBotsByBotIdSessionsBySessionIdResponse, PatchBotsByIdChannelByPlatformStatusData, PatchBotsByIdChannelByPlatformStatusError, PatchBotsByIdChannelByPlatformStatusResponse, PostAuthLoginData, PostAuthLoginError, PostAuthLoginResponse, PostAuthRefreshData, PostAuthRefreshError, PostAuthRefreshResponse, PostBotsByBotIdAclRulesData, PostBotsByBotIdAclRulesError, PostBotsByBotIdAclRulesResponse, PostBotsByBotIdContainerData, PostBotsByBotIdContainerDataExportData, PostBotsByBotIdContainerDataExportError, PostBotsByBotIdContainerDataImportData, PostBotsByBotIdContainerDataImportError, PostBotsByBotIdContainerDataImportResponse, PostBotsByBotIdContainerDataRestoreData, PostBotsByBotIdContainerDataRestoreError, PostBotsByBotIdContainerDataRestoreResponse, PostBotsByBotIdContainerError, PostBotsByBotIdContainerFsDeleteData, PostBotsByBotIdContainerFsDeleteError, PostBotsByBotIdContainerFsDeleteResponse, PostBotsByBotIdContainerFsMkdirData, PostBotsByBotIdContainerFsMkdirError, PostBotsByBotIdContainerFsMkdirResponse, PostBotsByBotIdContainerFsRenameData, PostBotsByBotIdContainerFsRenameError, PostBotsByBotIdContainerFsRenameResponse, PostBotsByBotIdContainerFsUploadData, PostBotsByBotIdContainerFsUploadError, PostBotsByBotIdContainerFsUploadResponse, PostBotsByBotIdContainerFsWriteData, PostBotsByBotIdContainerFsWriteError, PostBotsByBotIdContainerFsWriteResponse, PostBotsByBotIdContainerResponse, PostBotsByBotIdContainerSkillsData, PostBotsByBotIdContainerSkillsError, PostBotsByBotIdContainerSkillsResponse, PostBotsByBotIdContainerSnapshotsData, PostBotsByBotIdContainerSnapshotsError, PostBotsByBotIdContainerSnapshotsResponse, PostBotsByBotIdContainerSnapshotsRollbackData, PostBotsByBotIdContainerSnapshotsRollbackError, PostBotsByBotIdContainerSnapshotsRollbackResponse, PostBotsByBotIdContainerStartData, PostBotsByBotIdContainerStartError, PostBotsByBotIdContainerStartResponse, PostBotsByBotIdContainerStopData, PostBotsByBotIdContainerStopError, PostBotsByBotIdContainerStopResponse, PostBotsByBotIdEmailBindingsData, PostBotsByBotIdEmailBindingsError, PostBotsByBotIdEmailBindingsResponse, PostBotsByBotIdLocalMessagesData, PostBotsByBotIdLocalMessagesError, PostBotsByBotIdLocalMessagesResponse, PostBotsByBotIdMcpByIdOauthAuthorizeData, PostBotsByBotIdMcpByIdOauthAuthorizeError, PostBotsByBotIdMcpByIdOauthAuthorizeResponse, PostBotsByBotIdMcpByIdOauthDiscoverData, PostBotsByBotIdMcpByIdOauthDiscoverError, PostBotsByBotIdMcpByIdOauthDiscoverResponse, PostBotsByBotIdMcpByIdOauthExchangeData, PostBotsByBotIdMcpByIdOauthExchangeError, PostBotsByBotIdMcpByIdOauthExchangeResponse, PostBotsByBotIdMcpByIdProbeData, PostBotsByBotIdMcpByIdProbeError, PostBotsByBotIdMcpByIdProbeResponse, PostBotsByBotIdMcpData, PostBotsByBotIdMcpError, PostBotsByBotIdMcpOpsBatchDeleteData, PostBotsByBotIdMcpOpsBatchDeleteError, PostBotsByBotIdMcpResponse, PostBotsByBotIdMcpStdioByConnectionIdData, PostBotsByBotIdMcpStdioByConnectionIdError, PostBotsByBotIdMcpStdioByConnectionIdResponse, PostBotsByBotIdMcpStdioData, PostBotsByBotIdMcpStdioError, PostBotsByBotIdMcpStdioResponse, PostBotsByBotIdMemoryCompactData, PostBotsByBotIdMemoryCompactError, PostBotsByBotIdMemoryCompactResponse, PostBotsByBotIdMemoryData, PostBotsByBotIdMemoryError, PostBotsByBotIdMemoryRebuildData, PostBotsByBotIdMemoryRebuildError, PostBotsByBotIdMemoryRebuildResponse, PostBotsByBotIdMemoryResponse, PostBotsByBotIdMemorySearchData, PostBotsByBotIdMemorySearchError, PostBotsByBotIdMemorySearchResponse, PostBotsByBotIdScheduleData, PostBotsByBotIdScheduleError, PostBotsByBotIdScheduleResponse, PostBotsByBotIdSessionsData, PostBotsByBotIdSessionsError, PostBotsByBotIdSessionsResponse, PostBotsByBotIdSettingsData, PostBotsByBotIdSettingsError, PostBotsByBotIdSettingsResponse, PostBotsByBotIdSupermarketInstallMcpData, PostBotsByBotIdSupermarketInstallMcpError, PostBotsByBotIdSupermarketInstallMcpResponse, PostBotsByBotIdSupermarketInstallSkillData, PostBotsByBotIdSupermarketInstallSkillError, PostBotsByBotIdSupermarketInstallSkillResponse, PostBotsByBotIdToolsData, PostBotsByBotIdToolsError, PostBotsByBotIdToolsResponse, PostBotsByBotIdTtsSynthesizeData, PostBotsByBotIdTtsSynthesizeError, PostBotsByBotIdTtsSynthesizeResponse, PostBotsByIdChannelByPlatformSendChatData, PostBotsByIdChannelByPlatformSendChatError, PostBotsByIdChannelByPlatformSendChatResponse, PostBotsByIdChannelByPlatformSendData, PostBotsByIdChannelByPlatformSendError, PostBotsByIdChannelByPlatformSendResponse, PostBotsData, PostBotsError, PostBotsResponse, PostBrowserContextsData, PostBrowserContextsError, PostBrowserContextsResponse, PostEmailMailgunWebhookByConfigIdData, PostEmailMailgunWebhookByConfigIdError, PostEmailMailgunWebhookByConfigIdResponse, PostEmailProvidersData, PostEmailProvidersError, PostEmailProvidersResponse, PostMemoryProvidersData, PostMemoryProvidersError, PostMemoryProvidersResponse, PostModelsByIdTestData, PostModelsByIdTestError, PostModelsByIdTestResponse, PostModelsData, PostModelsError, PostModelsResponse, PostProvidersByIdImportModelsData, PostProvidersByIdImportModelsError, PostProvidersByIdImportModelsResponse, PostProvidersByIdOauthPollData, PostProvidersByIdOauthPollError, PostProvidersByIdOauthPollResponse, PostProvidersByIdTestData, PostProvidersByIdTestError, PostProvidersByIdTestResponse, PostProvidersData, PostProvidersError, PostProvidersResponse, PostSearchProvidersData, PostSearchProvidersError, PostSearchProvidersResponse, PostSpeechModelsByIdTestData, PostSpeechModelsByIdTestError, PostUsersData, PostUsersError, PostUsersResponse, PutBotsByBotIdAclDefaultEffectData, PutBotsByBotIdAclDefaultEffectError, PutBotsByBotIdAclRulesByRuleIdData, PutBotsByBotIdAclRulesByRuleIdError, PutBotsByBotIdAclRulesByRuleIdResponse, PutBotsByBotIdAclRulesReorderData, PutBotsByBotIdAclRulesReorderError, PutBotsByBotIdEmailBindingsByIdData, PutBotsByBotIdEmailBindingsByIdError, PutBotsByBotIdEmailBindingsByIdResponse, PutBotsByBotIdMcpByIdData, PutBotsByBotIdMcpByIdError, PutBotsByBotIdMcpByIdResponse, PutBotsByBotIdMcpImportData, PutBotsByBotIdMcpImportError, PutBotsByBotIdMcpImportResponse, PutBotsByBotIdScheduleByIdData, PutBotsByBotIdScheduleByIdError, PutBotsByBotIdScheduleByIdResponse, PutBotsByBotIdSettingsData, PutBotsByBotIdSettingsError, PutBotsByBotIdSettingsResponse, PutBotsByIdChannelByPlatformData, PutBotsByIdChannelByPlatformError, PutBotsByIdChannelByPlatformResponse, PutBotsByIdData, PutBotsByIdError, PutBotsByIdOwnerData, PutBotsByIdOwnerError, PutBotsByIdOwnerResponse, PutBotsByIdResponse, PutBrowserContextsByIdData, PutBrowserContextsByIdError, PutBrowserContextsByIdResponse, PutEmailProvidersByIdData, PutEmailProvidersByIdError, PutEmailProvidersByIdResponse, PutMemoryProvidersByIdData, PutMemoryProvidersByIdError, PutMemoryProvidersByIdResponse, PutModelsByIdData, PutModelsByIdError, PutModelsByIdResponse, PutModelsModelByModelIdData, PutModelsModelByModelIdError, PutModelsModelByModelIdResponse, PutProvidersByIdData, PutProvidersByIdError, PutProvidersByIdResponse, PutSearchProvidersByIdData, PutSearchProvidersByIdError, PutSearchProvidersByIdResponse, PutUsersByIdData, PutUsersByIdError, PutUsersByIdPasswordData, PutUsersByIdPasswordError, PutUsersByIdResponse, PutUsersMeChannelsByPlatformData, PutUsersMeChannelsByPlatformError, PutUsersMeChannelsByPlatformResponse, PutUsersMeData, PutUsersMeError, PutUsersMePasswordData, PutUsersMePasswordError, PutUsersMeResponse } from '../types.gen';
/**
* Login
*
* Validate user credentials and issue a JWT
*/
export const postAuthLoginMutation = (options?: Partial<Options<PostAuthLoginData>>): UseMutationOptions<PostAuthLoginResponse, Options<PostAuthLoginData>, PostAuthLoginError> => ({
mutation: async (vars) => {
const { data } = await postAuthLogin({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Refresh Token
*
* Issue a new JWT using the existing claims with updated expiration
*/
export const postAuthRefreshMutation = (options?: Partial<Options<PostAuthRefreshData>>): UseMutationOptions<PostAuthRefreshResponse, Options<PostAuthRefreshData>, PostAuthRefreshError> => ({
mutation: async (vars) => {
const { data } = await postAuthRefresh({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export type QueryKey<TOptions extends Options> = [
Pick<TOptions, 'path'> & {
_id: string;
baseUrl?: _JSONValue;
body?: _JSONValue;
query?: _JSONValue;
tags?: _JSONValue;
}
];
const createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, tags?: ReadonlyArray<string>): [
QueryKey<TOptions>[0]
] => {
const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];
if (tags) {
params.tags = tags as unknown as _JSONValue;
}
if (options?.body !== undefined) {
const normalizedBody = serializeQueryKeyValue(options.body);
if (normalizedBody !== undefined) {
params.body = normalizedBody;
}
}
if (options?.path) {
params.path = options.path;
}
if (options?.query !== undefined) {
const normalizedQuery = serializeQueryKeyValue(options.query);
if (normalizedQuery !== undefined) {
params.query = normalizedQuery;
}
}
return [params];
};
export const getBotsQueryKey = (options?: Options<GetBotsData>) => createQueryKey('getBots', options);
/**
* List bots
*
* List bots accessible to current user (admin can specify owner_id)
*/
export const getBotsQuery = defineQueryOptions((options?: Options<GetBotsData>) => ({
key: getBotsQueryKey(options),
query: async (context) => {
const { data } = await getBots({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create bot user
*
* Create a bot user owned by current user (or admin-specified owner)
*/
export const postBotsMutation = (options?: Partial<Options<PostBotsData>>): UseMutationOptions<PostBotsResponse, Options<PostBotsData>, PostBotsError> => ({
mutation: async (vars) => {
const { data } = await postBots({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdAclChannelIdentitiesQueryKey = (options: Options<GetBotsByBotIdAclChannelIdentitiesData>) => createQueryKey('getBotsByBotIdAclChannelIdentities', options);
/**
* Search ACL channel identity candidates
*
* Search locally observed channel identities for building ACL rules
*/
export const getBotsByBotIdAclChannelIdentitiesQuery = defineQueryOptions((options: Options<GetBotsByBotIdAclChannelIdentitiesData>) => ({
key: getBotsByBotIdAclChannelIdentitiesQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdAclChannelIdentities({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getBotsByBotIdAclChannelIdentitiesByChannelIdentityIdConversationsQueryKey = (options: Options<GetBotsByBotIdAclChannelIdentitiesByChannelIdentityIdConversationsData>) => createQueryKey('getBotsByBotIdAclChannelIdentitiesByChannelIdentityIdConversations', options);
/**
* List observed conversations for a channel identity
*
* List previously observed conversation candidates for a channel identity, for scoped rule building
*/
export const getBotsByBotIdAclChannelIdentitiesByChannelIdentityIdConversationsQuery = defineQueryOptions((options: Options<GetBotsByBotIdAclChannelIdentitiesByChannelIdentityIdConversationsData>) => ({
key: getBotsByBotIdAclChannelIdentitiesByChannelIdentityIdConversationsQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdAclChannelIdentitiesByChannelIdentityIdConversations({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getBotsByBotIdAclChannelTypesByChannelTypeConversationsQueryKey = (options: Options<GetBotsByBotIdAclChannelTypesByChannelTypeConversationsData>) => createQueryKey('getBotsByBotIdAclChannelTypesByChannelTypeConversations', options);
/**
* List observed conversations for a platform type
*
* List previously observed group/thread conversation candidates for a channel type under this bot
*/
export const getBotsByBotIdAclChannelTypesByChannelTypeConversationsQuery = defineQueryOptions((options: Options<GetBotsByBotIdAclChannelTypesByChannelTypeConversationsData>) => ({
key: getBotsByBotIdAclChannelTypesByChannelTypeConversationsQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdAclChannelTypesByChannelTypeConversations({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getBotsByBotIdAclDefaultEffectQueryKey = (options: Options<GetBotsByBotIdAclDefaultEffectData>) => createQueryKey('getBotsByBotIdAclDefaultEffect', options);
/**
* Get bot ACL default effect
*
* Get the fallback effect when no rule matches
*/
export const getBotsByBotIdAclDefaultEffectQuery = defineQueryOptions((options: Options<GetBotsByBotIdAclDefaultEffectData>) => ({
key: getBotsByBotIdAclDefaultEffectQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdAclDefaultEffect({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Set bot ACL default effect
*
* Set the fallback effect when no rule matches (allow or deny)
*/
export const putBotsByBotIdAclDefaultEffectMutation = (options?: Partial<Options<PutBotsByBotIdAclDefaultEffectData>>): UseMutationOptions<unknown, Options<PutBotsByBotIdAclDefaultEffectData>, PutBotsByBotIdAclDefaultEffectError> => ({
mutation: async (vars) => {
const { data } = await putBotsByBotIdAclDefaultEffect({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdAclRulesQueryKey = (options: Options<GetBotsByBotIdAclRulesData>) => createQueryKey('getBotsByBotIdAclRules', options);
/**
* List bot ACL rules
*
* List all ACL rules for a bot ordered by priority
*/
export const getBotsByBotIdAclRulesQuery = defineQueryOptions((options: Options<GetBotsByBotIdAclRulesData>) => ({
key: getBotsByBotIdAclRulesQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdAclRules({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create ACL rule
*
* Create a new priority-ordered ACL rule for chat.trigger
*/
export const postBotsByBotIdAclRulesMutation = (options?: Partial<Options<PostBotsByBotIdAclRulesData>>): UseMutationOptions<PostBotsByBotIdAclRulesResponse, Options<PostBotsByBotIdAclRulesData>, PostBotsByBotIdAclRulesError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdAclRules({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Reorder ACL rules
*
* Batch-update priorities for multiple ACL rules
*/
export const putBotsByBotIdAclRulesReorderMutation = (options?: Partial<Options<PutBotsByBotIdAclRulesReorderData>>): UseMutationOptions<unknown, Options<PutBotsByBotIdAclRulesReorderData>, PutBotsByBotIdAclRulesReorderError> => ({
mutation: async (vars) => {
const { data } = await putBotsByBotIdAclRulesReorder({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Delete ACL rule
*
* Delete an ACL rule by ID
*/
export const deleteBotsByBotIdAclRulesByRuleIdMutation = (options?: Partial<Options<DeleteBotsByBotIdAclRulesByRuleIdData>>): UseMutationOptions<unknown, Options<DeleteBotsByBotIdAclRulesByRuleIdData>, DeleteBotsByBotIdAclRulesByRuleIdError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdAclRulesByRuleId({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Update ACL rule
*
* Update an existing ACL rule
*/
export const putBotsByBotIdAclRulesByRuleIdMutation = (options?: Partial<Options<PutBotsByBotIdAclRulesByRuleIdData>>): UseMutationOptions<PutBotsByBotIdAclRulesByRuleIdResponse, Options<PutBotsByBotIdAclRulesByRuleIdData>, PutBotsByBotIdAclRulesByRuleIdError> => ({
mutation: async (vars) => {
const { data } = await putBotsByBotIdAclRulesByRuleId({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Delete compaction logs
*
* Delete all compaction logs for a bot
*/
export const deleteBotsByBotIdCompactionLogsMutation = (options?: Partial<Options<DeleteBotsByBotIdCompactionLogsData>>): UseMutationOptions<unknown, Options<DeleteBotsByBotIdCompactionLogsData>, DeleteBotsByBotIdCompactionLogsError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdCompactionLogs({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdCompactionLogsQueryKey = (options: Options<GetBotsByBotIdCompactionLogsData>) => createQueryKey('getBotsByBotIdCompactionLogs', options);
/**
* List compaction logs
*
* List compaction logs for a bot
*/
export const getBotsByBotIdCompactionLogsQuery = defineQueryOptions((options: Options<GetBotsByBotIdCompactionLogsData>) => ({
key: getBotsByBotIdCompactionLogsQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdCompactionLogs({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Delete MCP container for bot
*/
export const deleteBotsByBotIdContainerMutation = (options?: Partial<Options<DeleteBotsByBotIdContainerData>>): UseMutationOptions<unknown, Options<DeleteBotsByBotIdContainerData>, DeleteBotsByBotIdContainerError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdContainer({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdContainerQueryKey = (options: Options<GetBotsByBotIdContainerData>) => createQueryKey('getBotsByBotIdContainer', options);
/**
* Get container info for bot
*/
export const getBotsByBotIdContainerQuery = defineQueryOptions((options: Options<GetBotsByBotIdContainerData>) => ({
key: getBotsByBotIdContainerQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdContainer({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create and start MCP container for bot
*/
export const postBotsByBotIdContainerMutation = (options?: Partial<Options<PostBotsByBotIdContainerData>>): UseMutationOptions<PostBotsByBotIdContainerResponse, Options<PostBotsByBotIdContainerData>, PostBotsByBotIdContainerError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdContainer({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Export container /data as a tar.gz archive
*/
export const postBotsByBotIdContainerDataExportMutation = (options?: Partial<Options<PostBotsByBotIdContainerDataExportData>>): UseMutationOptions<unknown, Options<PostBotsByBotIdContainerDataExportData>, PostBotsByBotIdContainerDataExportError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdContainerDataExport({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Import a tar.gz archive into container /data
*/
export const postBotsByBotIdContainerDataImportMutation = (options?: Partial<Options<PostBotsByBotIdContainerDataImportData>>): UseMutationOptions<PostBotsByBotIdContainerDataImportResponse, Options<PostBotsByBotIdContainerDataImportData>, PostBotsByBotIdContainerDataImportError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdContainerDataImport({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Restore previously preserved data into container
*/
export const postBotsByBotIdContainerDataRestoreMutation = (options?: Partial<Options<PostBotsByBotIdContainerDataRestoreData>>): UseMutationOptions<PostBotsByBotIdContainerDataRestoreResponse, Options<PostBotsByBotIdContainerDataRestoreData>, PostBotsByBotIdContainerDataRestoreError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdContainerDataRestore({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdContainerFsQueryKey = (options: Options<GetBotsByBotIdContainerFsData>) => createQueryKey('getBotsByBotIdContainerFs', options);
/**
* Get file or directory info
*
* Returns metadata about a file or directory at the given container path
*/
export const getBotsByBotIdContainerFsQuery = defineQueryOptions((options: Options<GetBotsByBotIdContainerFsData>) => ({
key: getBotsByBotIdContainerFsQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdContainerFs({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Delete a file or directory
*
* Deletes a file or directory at the given container path
*/
export const postBotsByBotIdContainerFsDeleteMutation = (options?: Partial<Options<PostBotsByBotIdContainerFsDeleteData>>): UseMutationOptions<PostBotsByBotIdContainerFsDeleteResponse, Options<PostBotsByBotIdContainerFsDeleteData>, PostBotsByBotIdContainerFsDeleteError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdContainerFsDelete({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdContainerFsDownloadQueryKey = (options: Options<GetBotsByBotIdContainerFsDownloadData>) => createQueryKey('getBotsByBotIdContainerFsDownload', options);
/**
* Download a file as binary stream
*
* Downloads a file from the container with appropriate Content-Type
*/
export const getBotsByBotIdContainerFsDownloadQuery = defineQueryOptions((options: Options<GetBotsByBotIdContainerFsDownloadData>) => ({
key: getBotsByBotIdContainerFsDownloadQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdContainerFsDownload({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getBotsByBotIdContainerFsListQueryKey = (options: Options<GetBotsByBotIdContainerFsListData>) => createQueryKey('getBotsByBotIdContainerFsList', options);
/**
* List directory contents
*
* Lists files and directories at the given container path
*/
export const getBotsByBotIdContainerFsListQuery = defineQueryOptions((options: Options<GetBotsByBotIdContainerFsListData>) => ({
key: getBotsByBotIdContainerFsListQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdContainerFsList({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create a directory
*
* Creates a directory (and parents) at the given container path
*/
export const postBotsByBotIdContainerFsMkdirMutation = (options?: Partial<Options<PostBotsByBotIdContainerFsMkdirData>>): UseMutationOptions<PostBotsByBotIdContainerFsMkdirResponse, Options<PostBotsByBotIdContainerFsMkdirData>, PostBotsByBotIdContainerFsMkdirError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdContainerFsMkdir({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdContainerFsReadQueryKey = (options: Options<GetBotsByBotIdContainerFsReadData>) => createQueryKey('getBotsByBotIdContainerFsRead', options);
/**
* Read file content as text
*
* Reads the content of a file and returns it as a JSON string
*/
export const getBotsByBotIdContainerFsReadQuery = defineQueryOptions((options: Options<GetBotsByBotIdContainerFsReadData>) => ({
key: getBotsByBotIdContainerFsReadQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdContainerFsRead({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Rename or move a file/directory
*
* Renames or moves a file/directory from oldPath to newPath
*/
export const postBotsByBotIdContainerFsRenameMutation = (options?: Partial<Options<PostBotsByBotIdContainerFsRenameData>>): UseMutationOptions<PostBotsByBotIdContainerFsRenameResponse, Options<PostBotsByBotIdContainerFsRenameData>, PostBotsByBotIdContainerFsRenameError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdContainerFsRename({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Upload a file via multipart form
*
* Uploads a binary file to the given container path
*/
export const postBotsByBotIdContainerFsUploadMutation = (options?: Partial<Options<PostBotsByBotIdContainerFsUploadData>>): UseMutationOptions<PostBotsByBotIdContainerFsUploadResponse, Options<PostBotsByBotIdContainerFsUploadData>, PostBotsByBotIdContainerFsUploadError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdContainerFsUpload({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Write text content to a file
*
* Creates or overwrites a file with the provided text content
*/
export const postBotsByBotIdContainerFsWriteMutation = (options?: Partial<Options<PostBotsByBotIdContainerFsWriteData>>): UseMutationOptions<PostBotsByBotIdContainerFsWriteResponse, Options<PostBotsByBotIdContainerFsWriteData>, PostBotsByBotIdContainerFsWriteError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdContainerFsWrite({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Delete skills from data directory
*/
export const deleteBotsByBotIdContainerSkillsMutation = (options?: Partial<Options<DeleteBotsByBotIdContainerSkillsData>>): UseMutationOptions<DeleteBotsByBotIdContainerSkillsResponse, Options<DeleteBotsByBotIdContainerSkillsData>, DeleteBotsByBotIdContainerSkillsError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdContainerSkills({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdContainerSkillsQueryKey = (options: Options<GetBotsByBotIdContainerSkillsData>) => createQueryKey('getBotsByBotIdContainerSkills', options);
/**
* List skills from data directory
*/
export const getBotsByBotIdContainerSkillsQuery = defineQueryOptions((options: Options<GetBotsByBotIdContainerSkillsData>) => ({
key: getBotsByBotIdContainerSkillsQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdContainerSkills({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Upload skills into data directory
*/
export const postBotsByBotIdContainerSkillsMutation = (options?: Partial<Options<PostBotsByBotIdContainerSkillsData>>): UseMutationOptions<PostBotsByBotIdContainerSkillsResponse, Options<PostBotsByBotIdContainerSkillsData>, PostBotsByBotIdContainerSkillsError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdContainerSkills({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdContainerSnapshotsQueryKey = (options: Options<GetBotsByBotIdContainerSnapshotsData>) => createQueryKey('getBotsByBotIdContainerSnapshots', options);
/**
* List snapshots
*/
export const getBotsByBotIdContainerSnapshotsQuery = defineQueryOptions((options: Options<GetBotsByBotIdContainerSnapshotsData>) => ({
key: getBotsByBotIdContainerSnapshotsQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdContainerSnapshots({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create container snapshot for bot
*/
export const postBotsByBotIdContainerSnapshotsMutation = (options?: Partial<Options<PostBotsByBotIdContainerSnapshotsData>>): UseMutationOptions<PostBotsByBotIdContainerSnapshotsResponse, Options<PostBotsByBotIdContainerSnapshotsData>, PostBotsByBotIdContainerSnapshotsError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdContainerSnapshots({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Rollback container to a previous snapshot version
*/
export const postBotsByBotIdContainerSnapshotsRollbackMutation = (options?: Partial<Options<PostBotsByBotIdContainerSnapshotsRollbackData>>): UseMutationOptions<PostBotsByBotIdContainerSnapshotsRollbackResponse, Options<PostBotsByBotIdContainerSnapshotsRollbackData>, PostBotsByBotIdContainerSnapshotsRollbackError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdContainerSnapshotsRollback({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Start container task for bot
*/
export const postBotsByBotIdContainerStartMutation = (options?: Partial<Options<PostBotsByBotIdContainerStartData>>): UseMutationOptions<PostBotsByBotIdContainerStartResponse, Options<PostBotsByBotIdContainerStartData>, PostBotsByBotIdContainerStartError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdContainerStart({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Stop container task for bot
*/
export const postBotsByBotIdContainerStopMutation = (options?: Partial<Options<PostBotsByBotIdContainerStopData>>): UseMutationOptions<PostBotsByBotIdContainerStopResponse, Options<PostBotsByBotIdContainerStopData>, PostBotsByBotIdContainerStopError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdContainerStop({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdContainerTerminalQueryKey = (options: Options<GetBotsByBotIdContainerTerminalData>) => createQueryKey('getBotsByBotIdContainerTerminal', options);
/**
* Check terminal availability for bot container
*/
export const getBotsByBotIdContainerTerminalQuery = defineQueryOptions((options: Options<GetBotsByBotIdContainerTerminalData>) => ({
key: getBotsByBotIdContainerTerminalQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdContainerTerminal({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getBotsByBotIdContainerTerminalWsQueryKey = (options: Options<GetBotsByBotIdContainerTerminalWsData>) => createQueryKey('getBotsByBotIdContainerTerminalWs', options);
/**
* Interactive WebSocket terminal for bot container
*/
export const getBotsByBotIdContainerTerminalWsQuery = defineQueryOptions((options: Options<GetBotsByBotIdContainerTerminalWsData>) => ({
key: getBotsByBotIdContainerTerminalWsQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdContainerTerminalWs({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getBotsByBotIdEmailBindingsQueryKey = (options: Options<GetBotsByBotIdEmailBindingsData>) => createQueryKey('getBotsByBotIdEmailBindings', options);
/**
* List email bindings for a bot
*/
export const getBotsByBotIdEmailBindingsQuery = defineQueryOptions((options: Options<GetBotsByBotIdEmailBindingsData>) => ({
key: getBotsByBotIdEmailBindingsQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdEmailBindings({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Bind an email provider to a bot
*/
export const postBotsByBotIdEmailBindingsMutation = (options?: Partial<Options<PostBotsByBotIdEmailBindingsData>>): UseMutationOptions<PostBotsByBotIdEmailBindingsResponse, Options<PostBotsByBotIdEmailBindingsData>, PostBotsByBotIdEmailBindingsError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdEmailBindings({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Remove an email binding
*/
export const deleteBotsByBotIdEmailBindingsByIdMutation = (options?: Partial<Options<DeleteBotsByBotIdEmailBindingsByIdData>>): UseMutationOptions<unknown, Options<DeleteBotsByBotIdEmailBindingsByIdData>, DeleteBotsByBotIdEmailBindingsByIdError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdEmailBindingsById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Update an email binding
*/
export const putBotsByBotIdEmailBindingsByIdMutation = (options?: Partial<Options<PutBotsByBotIdEmailBindingsByIdData>>): UseMutationOptions<PutBotsByBotIdEmailBindingsByIdResponse, Options<PutBotsByBotIdEmailBindingsByIdData>, PutBotsByBotIdEmailBindingsByIdError> => ({
mutation: async (vars) => {
const { data } = await putBotsByBotIdEmailBindingsById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdEmailOutboxQueryKey = (options: Options<GetBotsByBotIdEmailOutboxData>) => createQueryKey('getBotsByBotIdEmailOutbox', options);
/**
* List outbox emails for a bot (audit)
*/
export const getBotsByBotIdEmailOutboxQuery = defineQueryOptions((options: Options<GetBotsByBotIdEmailOutboxData>) => ({
key: getBotsByBotIdEmailOutboxQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdEmailOutbox({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getBotsByBotIdEmailOutboxByIdQueryKey = (options: Options<GetBotsByBotIdEmailOutboxByIdData>) => createQueryKey('getBotsByBotIdEmailOutboxById', options);
/**
* Get outbox email detail
*/
export const getBotsByBotIdEmailOutboxByIdQuery = defineQueryOptions((options: Options<GetBotsByBotIdEmailOutboxByIdData>) => ({
key: getBotsByBotIdEmailOutboxByIdQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdEmailOutboxById({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Delete heartbeat logs
*
* Delete all heartbeat execution logs for a bot
*/
export const deleteBotsByBotIdHeartbeatLogsMutation = (options?: Partial<Options<DeleteBotsByBotIdHeartbeatLogsData>>): UseMutationOptions<unknown, Options<DeleteBotsByBotIdHeartbeatLogsData>, DeleteBotsByBotIdHeartbeatLogsError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdHeartbeatLogs({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdHeartbeatLogsQueryKey = (options: Options<GetBotsByBotIdHeartbeatLogsData>) => createQueryKey('getBotsByBotIdHeartbeatLogs', options);
/**
* List heartbeat logs
*
* List heartbeat execution logs for a bot
*/
export const getBotsByBotIdHeartbeatLogsQuery = defineQueryOptions((options: Options<GetBotsByBotIdHeartbeatLogsData>) => ({
key: getBotsByBotIdHeartbeatLogsQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdHeartbeatLogs({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Send a message to a local channel
*
* Post a user message (with optional attachments) through the local channel pipeline.
*/
export const postBotsByBotIdLocalMessagesMutation = (options?: Partial<Options<PostBotsByBotIdLocalMessagesData>>): UseMutationOptions<PostBotsByBotIdLocalMessagesResponse, Options<PostBotsByBotIdLocalMessagesData>, PostBotsByBotIdLocalMessagesError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdLocalMessages({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdLocalWsQueryKey = (options: Options<GetBotsByBotIdLocalWsData>) => createQueryKey('getBotsByBotIdLocalWs', options);
/**
* WebSocket chat endpoint
*
* Upgrade to WebSocket for bidirectional chat streaming with abort support.
*/
export const getBotsByBotIdLocalWsQuery = defineQueryOptions((options: Options<GetBotsByBotIdLocalWsData>) => ({
key: getBotsByBotIdLocalWsQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdLocalWs({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getBotsByBotIdMcpQueryKey = (options?: Options<GetBotsByBotIdMcpData>) => createQueryKey('getBotsByBotIdMcp', options);
/**
* List MCP connections
*
* List MCP connections for a bot
*/
export const getBotsByBotIdMcpQuery = defineQueryOptions((options?: Options<GetBotsByBotIdMcpData>) => ({
key: getBotsByBotIdMcpQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdMcp({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create MCP connection
*
* Create a MCP connection for a bot
*/
export const postBotsByBotIdMcpMutation = (options?: Partial<Options<PostBotsByBotIdMcpData>>): UseMutationOptions<PostBotsByBotIdMcpResponse, Options<PostBotsByBotIdMcpData>, PostBotsByBotIdMcpError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdMcp({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Batch delete MCP connections
*
* Delete multiple MCP connections by IDs.
*/
export const postBotsByBotIdMcpOpsBatchDeleteMutation = (options?: Partial<Options<PostBotsByBotIdMcpOpsBatchDeleteData>>): UseMutationOptions<unknown, Options<PostBotsByBotIdMcpOpsBatchDeleteData>, PostBotsByBotIdMcpOpsBatchDeleteError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdMcpOpsBatchDelete({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Create MCP stdio proxy
*
* Start a stdio MCP process in the bot container and expose it as MCP HTTP endpoint.
*/
export const postBotsByBotIdMcpStdioMutation = (options?: Partial<Options<PostBotsByBotIdMcpStdioData>>): UseMutationOptions<PostBotsByBotIdMcpStdioResponse, Options<PostBotsByBotIdMcpStdioData>, PostBotsByBotIdMcpStdioError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdMcpStdio({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* MCP stdio proxy (JSON-RPC)
*
* Proxies MCP JSON-RPC requests to a stdio MCP process in the container.
*/
export const postBotsByBotIdMcpStdioByConnectionIdMutation = (options?: Partial<Options<PostBotsByBotIdMcpStdioByConnectionIdData>>): UseMutationOptions<PostBotsByBotIdMcpStdioByConnectionIdResponse, Options<PostBotsByBotIdMcpStdioByConnectionIdData>, PostBotsByBotIdMcpStdioByConnectionIdError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdMcpStdioByConnectionId({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdMcpExportQueryKey = (options?: Options<GetBotsByBotIdMcpExportData>) => createQueryKey('getBotsByBotIdMcpExport', options);
/**
* Export MCP connections
*
* Export all MCP connections for a bot in standard mcpServers format.
*/
export const getBotsByBotIdMcpExportQuery = defineQueryOptions((options?: Options<GetBotsByBotIdMcpExportData>) => ({
key: getBotsByBotIdMcpExportQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdMcpExport({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Import MCP connections
*
* Batch import MCP connections from standard mcpServers format. Existing connections (matched by name) get config updated with is_active preserved. New connections are created as active.
*/
export const putBotsByBotIdMcpImportMutation = (options?: Partial<Options<PutBotsByBotIdMcpImportData>>): UseMutationOptions<PutBotsByBotIdMcpImportResponse, Options<PutBotsByBotIdMcpImportData>, PutBotsByBotIdMcpImportError> => ({
mutation: async (vars) => {
const { data } = await putBotsByBotIdMcpImport({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Delete MCP connection
*
* Delete a MCP connection by ID
*/
export const deleteBotsByBotIdMcpByIdMutation = (options?: Partial<Options<DeleteBotsByBotIdMcpByIdData>>): UseMutationOptions<unknown, Options<DeleteBotsByBotIdMcpByIdData>, DeleteBotsByBotIdMcpByIdError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdMcpById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdMcpByIdQueryKey = (options: Options<GetBotsByBotIdMcpByIdData>) => createQueryKey('getBotsByBotIdMcpById', options);
/**
* Get MCP connection
*
* Get a MCP connection by ID
*/
export const getBotsByBotIdMcpByIdQuery = defineQueryOptions((options: Options<GetBotsByBotIdMcpByIdData>) => ({
key: getBotsByBotIdMcpByIdQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdMcpById({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update MCP connection
*
* Update a MCP connection by ID
*/
export const putBotsByBotIdMcpByIdMutation = (options?: Partial<Options<PutBotsByBotIdMcpByIdData>>): UseMutationOptions<PutBotsByBotIdMcpByIdResponse, Options<PutBotsByBotIdMcpByIdData>, PutBotsByBotIdMcpByIdError> => ({
mutation: async (vars) => {
const { data } = await putBotsByBotIdMcpById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Start OAuth authorization flow
*
* Generate PKCE and return authorization URL for the user to authorize
*/
export const postBotsByBotIdMcpByIdOauthAuthorizeMutation = (options?: Partial<Options<PostBotsByBotIdMcpByIdOauthAuthorizeData>>): UseMutationOptions<PostBotsByBotIdMcpByIdOauthAuthorizeResponse, Options<PostBotsByBotIdMcpByIdOauthAuthorizeData>, PostBotsByBotIdMcpByIdOauthAuthorizeError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdMcpByIdOauthAuthorize({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Discover OAuth configuration for MCP server
*
* Probe MCP server URL for OAuth requirements and discover authorization server metadata
*/
export const postBotsByBotIdMcpByIdOauthDiscoverMutation = (options?: Partial<Options<PostBotsByBotIdMcpByIdOauthDiscoverData>>): UseMutationOptions<PostBotsByBotIdMcpByIdOauthDiscoverResponse, Options<PostBotsByBotIdMcpByIdOauthDiscoverData>, PostBotsByBotIdMcpByIdOauthDiscoverError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdMcpByIdOauthDiscover({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Exchange OAuth authorization code for tokens
*
* Frontend callback page calls this to exchange the authorization code for access/refresh tokens
*/
export const postBotsByBotIdMcpByIdOauthExchangeMutation = (options?: Partial<Options<PostBotsByBotIdMcpByIdOauthExchangeData>>): UseMutationOptions<PostBotsByBotIdMcpByIdOauthExchangeResponse, Options<PostBotsByBotIdMcpByIdOauthExchangeData>, PostBotsByBotIdMcpByIdOauthExchangeError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdMcpByIdOauthExchange({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdMcpByIdOauthStatusQueryKey = (options: Options<GetBotsByBotIdMcpByIdOauthStatusData>) => createQueryKey('getBotsByBotIdMcpByIdOauthStatus', options);
/**
* Get OAuth status for MCP connection
*
* Returns the current OAuth status including whether tokens are available
*/
export const getBotsByBotIdMcpByIdOauthStatusQuery = defineQueryOptions((options: Options<GetBotsByBotIdMcpByIdOauthStatusData>) => ({
key: getBotsByBotIdMcpByIdOauthStatusQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdMcpByIdOauthStatus({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Revoke OAuth tokens for MCP connection
*
* Clears stored OAuth tokens
*/
export const deleteBotsByBotIdMcpByIdOauthTokenMutation = (options?: Partial<Options<DeleteBotsByBotIdMcpByIdOauthTokenData>>): UseMutationOptions<unknown, Options<DeleteBotsByBotIdMcpByIdOauthTokenData>, DeleteBotsByBotIdMcpByIdOauthTokenError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdMcpByIdOauthToken({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Probe MCP connection
*
* Probe a MCP connection to discover tools and verify connectivity
*/
export const postBotsByBotIdMcpByIdProbeMutation = (options?: Partial<Options<PostBotsByBotIdMcpByIdProbeData>>): UseMutationOptions<PostBotsByBotIdMcpByIdProbeResponse, Options<PostBotsByBotIdMcpByIdProbeData>, PostBotsByBotIdMcpByIdProbeError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdMcpByIdProbe({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Delete memories
*
* Delete specific memories by IDs, or delete all memories if no IDs are provided
*/
export const deleteBotsByBotIdMemoryMutation = (options?: Partial<Options<DeleteBotsByBotIdMemoryData>>): UseMutationOptions<DeleteBotsByBotIdMemoryResponse, Options<DeleteBotsByBotIdMemoryData>, DeleteBotsByBotIdMemoryError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdMemory({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdMemoryQueryKey = (options: Options<GetBotsByBotIdMemoryData>) => createQueryKey('getBotsByBotIdMemory', options);
/**
* Get all memories
*
* List all memories in the bot-shared namespace
*/
export const getBotsByBotIdMemoryQuery = defineQueryOptions((options: Options<GetBotsByBotIdMemoryData>) => ({
key: getBotsByBotIdMemoryQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdMemory({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Add memory
*
* Add memory into the bot-shared namespace
*/
export const postBotsByBotIdMemoryMutation = (options?: Partial<Options<PostBotsByBotIdMemoryData>>): UseMutationOptions<PostBotsByBotIdMemoryResponse, Options<PostBotsByBotIdMemoryData>, PostBotsByBotIdMemoryError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdMemory({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Compact memories
*
* Consolidate memories by merging similar/redundant entries using LLM.
*
* **ratio** (required, range (0,1]):
* - 0.8 = light compression, mostly dedup, keep ~80% of entries
* - 0.5 = moderate compression, merge similar facts, keep ~50%
* - 0.3 = aggressive compression, heavily consolidate, keep ~30%
*
* **decay_days** (optional): enable time decay — memories older than N days are treated as low priority and more likely to be merged/dropped.
*/
export const postBotsByBotIdMemoryCompactMutation = (options?: Partial<Options<PostBotsByBotIdMemoryCompactData>>): UseMutationOptions<PostBotsByBotIdMemoryCompactResponse, Options<PostBotsByBotIdMemoryCompactData>, PostBotsByBotIdMemoryCompactError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdMemoryCompact({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Rebuild memories from filesystem
*
* Read memory files from the container filesystem (source of truth) and restore missing entries to memory storage
*/
export const postBotsByBotIdMemoryRebuildMutation = (options?: Partial<Options<PostBotsByBotIdMemoryRebuildData>>): UseMutationOptions<PostBotsByBotIdMemoryRebuildResponse, Options<PostBotsByBotIdMemoryRebuildData>, PostBotsByBotIdMemoryRebuildError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdMemoryRebuild({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Search memory
*
* Search memory in the bot-shared namespace
*/
export const postBotsByBotIdMemorySearchMutation = (options?: Partial<Options<PostBotsByBotIdMemorySearchData>>): UseMutationOptions<PostBotsByBotIdMemorySearchResponse, Options<PostBotsByBotIdMemorySearchData>, PostBotsByBotIdMemorySearchError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdMemorySearch({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdMemoryStatusQueryKey = (options: Options<GetBotsByBotIdMemoryStatusData>) => createQueryKey('getBotsByBotIdMemoryStatus', options);
/**
* Get memory runtime status
*
* Get the resolved memory runtime status for a bot, including index health and source counts
*/
export const getBotsByBotIdMemoryStatusQuery = defineQueryOptions((options: Options<GetBotsByBotIdMemoryStatusData>) => ({
key: getBotsByBotIdMemoryStatusQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdMemoryStatus({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getBotsByBotIdMemoryUsageQueryKey = (options: Options<GetBotsByBotIdMemoryUsageData>) => createQueryKey('getBotsByBotIdMemoryUsage', options);
/**
* Get memory usage
*
* Query the estimated storage usage of current memories
*/
export const getBotsByBotIdMemoryUsageQuery = defineQueryOptions((options: Options<GetBotsByBotIdMemoryUsageData>) => ({
key: getBotsByBotIdMemoryUsageQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdMemoryUsage({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Delete a single memory
*
* Delete a single memory by its ID
*/
export const deleteBotsByBotIdMemoryByIdMutation = (options?: Partial<Options<DeleteBotsByBotIdMemoryByIdData>>): UseMutationOptions<DeleteBotsByBotIdMemoryByIdResponse, Options<DeleteBotsByBotIdMemoryByIdData>, DeleteBotsByBotIdMemoryByIdError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdMemoryById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Delete all bot history messages
*
* Clear all persisted bot-level history messages
*/
export const deleteBotsByBotIdMessagesMutation = (options?: Partial<Options<DeleteBotsByBotIdMessagesData>>): UseMutationOptions<unknown, Options<DeleteBotsByBotIdMessagesData>, DeleteBotsByBotIdMessagesError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdMessages({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdMessagesQueryKey = (options: Options<GetBotsByBotIdMessagesData>) => createQueryKey('getBotsByBotIdMessages', options);
/**
* List bot history messages
*
* List messages for a bot history with optional pagination
*/
export const getBotsByBotIdMessagesQuery = defineQueryOptions((options: Options<GetBotsByBotIdMessagesData>) => ({
key: getBotsByBotIdMessagesQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdMessages({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getBotsByBotIdScheduleQueryKey = (options?: Options<GetBotsByBotIdScheduleData>) => createQueryKey('getBotsByBotIdSchedule', options);
/**
* List schedules
*
* List schedules for current user
*/
export const getBotsByBotIdScheduleQuery = defineQueryOptions((options?: Options<GetBotsByBotIdScheduleData>) => ({
key: getBotsByBotIdScheduleQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdSchedule({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create schedule
*
* Create a schedule for current user
*/
export const postBotsByBotIdScheduleMutation = (options?: Partial<Options<PostBotsByBotIdScheduleData>>): UseMutationOptions<PostBotsByBotIdScheduleResponse, Options<PostBotsByBotIdScheduleData>, PostBotsByBotIdScheduleError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdSchedule({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Delete schedule logs
*
* Delete all schedule execution logs for a bot
*/
export const deleteBotsByBotIdScheduleLogsMutation = (options?: Partial<Options<DeleteBotsByBotIdScheduleLogsData>>): UseMutationOptions<unknown, Options<DeleteBotsByBotIdScheduleLogsData>, DeleteBotsByBotIdScheduleLogsError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdScheduleLogs({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdScheduleLogsQueryKey = (options: Options<GetBotsByBotIdScheduleLogsData>) => createQueryKey('getBotsByBotIdScheduleLogs', options);
/**
* List schedule logs
*
* List schedule execution logs for a bot
*/
export const getBotsByBotIdScheduleLogsQuery = defineQueryOptions((options: Options<GetBotsByBotIdScheduleLogsData>) => ({
key: getBotsByBotIdScheduleLogsQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdScheduleLogs({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Delete schedule
*
* Delete a schedule by ID
*/
export const deleteBotsByBotIdScheduleByIdMutation = (options?: Partial<Options<DeleteBotsByBotIdScheduleByIdData>>): UseMutationOptions<unknown, Options<DeleteBotsByBotIdScheduleByIdData>, DeleteBotsByBotIdScheduleByIdError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdScheduleById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdScheduleByIdQueryKey = (options: Options<GetBotsByBotIdScheduleByIdData>) => createQueryKey('getBotsByBotIdScheduleById', options);
/**
* Get schedule
*
* Get a schedule by ID
*/
export const getBotsByBotIdScheduleByIdQuery = defineQueryOptions((options: Options<GetBotsByBotIdScheduleByIdData>) => ({
key: getBotsByBotIdScheduleByIdQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdScheduleById({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update schedule
*
* Update a schedule by ID
*/
export const putBotsByBotIdScheduleByIdMutation = (options?: Partial<Options<PutBotsByBotIdScheduleByIdData>>): UseMutationOptions<PutBotsByBotIdScheduleByIdResponse, Options<PutBotsByBotIdScheduleByIdData>, PutBotsByBotIdScheduleByIdError> => ({
mutation: async (vars) => {
const { data } = await putBotsByBotIdScheduleById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdScheduleByIdLogsQueryKey = (options: Options<GetBotsByBotIdScheduleByIdLogsData>) => createQueryKey('getBotsByBotIdScheduleByIdLogs', options);
/**
* List schedule logs by schedule
*
* List execution logs for a specific schedule
*/
export const getBotsByBotIdScheduleByIdLogsQuery = defineQueryOptions((options: Options<GetBotsByBotIdScheduleByIdLogsData>) => ({
key: getBotsByBotIdScheduleByIdLogsQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdScheduleByIdLogs({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getBotsByBotIdSessionsQueryKey = (options: Options<GetBotsByBotIdSessionsData>) => createQueryKey('getBotsByBotIdSessions', options);
/**
* List bot sessions
*/
export const getBotsByBotIdSessionsQuery = defineQueryOptions((options: Options<GetBotsByBotIdSessionsData>) => ({
key: getBotsByBotIdSessionsQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdSessions({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create a new chat session
*/
export const postBotsByBotIdSessionsMutation = (options?: Partial<Options<PostBotsByBotIdSessionsData>>): UseMutationOptions<PostBotsByBotIdSessionsResponse, Options<PostBotsByBotIdSessionsData>, PostBotsByBotIdSessionsError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdSessions({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Soft-delete a session
*/
export const deleteBotsByBotIdSessionsBySessionIdMutation = (options?: Partial<Options<DeleteBotsByBotIdSessionsBySessionIdData>>): UseMutationOptions<unknown, Options<DeleteBotsByBotIdSessionsBySessionIdData>, DeleteBotsByBotIdSessionsBySessionIdError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdSessionsBySessionId({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdSessionsBySessionIdQueryKey = (options: Options<GetBotsByBotIdSessionsBySessionIdData>) => createQueryKey('getBotsByBotIdSessionsBySessionId', options);
/**
* Get a session by ID
*/
export const getBotsByBotIdSessionsBySessionIdQuery = defineQueryOptions((options: Options<GetBotsByBotIdSessionsBySessionIdData>) => ({
key: getBotsByBotIdSessionsBySessionIdQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdSessionsBySessionId({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update a session
*/
export const patchBotsByBotIdSessionsBySessionIdMutation = (options?: Partial<Options<PatchBotsByBotIdSessionsBySessionIdData>>): UseMutationOptions<PatchBotsByBotIdSessionsBySessionIdResponse, Options<PatchBotsByBotIdSessionsBySessionIdData>, PatchBotsByBotIdSessionsBySessionIdError> => ({
mutation: async (vars) => {
const { data } = await patchBotsByBotIdSessionsBySessionId({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdSessionsBySessionIdStatusQueryKey = (options: Options<GetBotsByBotIdSessionsBySessionIdStatusData>) => createQueryKey('getBotsByBotIdSessionsBySessionIdStatus', options);
/**
* Get session info
*
* Get aggregated info for a chat session including message count, context usage, cache stats, and used skills
*/
export const getBotsByBotIdSessionsBySessionIdStatusQuery = defineQueryOptions((options: Options<GetBotsByBotIdSessionsBySessionIdStatusData>) => ({
key: getBotsByBotIdSessionsBySessionIdStatusQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdSessionsBySessionIdStatus({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Delete user settings
*
* Remove agent settings for current user
*/
export const deleteBotsByBotIdSettingsMutation = (options?: Partial<Options<DeleteBotsByBotIdSettingsData>>): UseMutationOptions<unknown, Options<DeleteBotsByBotIdSettingsData>, DeleteBotsByBotIdSettingsError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByBotIdSettings({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdSettingsQueryKey = (options?: Options<GetBotsByBotIdSettingsData>) => createQueryKey('getBotsByBotIdSettings', options);
/**
* Get user settings
*
* Get agent settings for current user
*/
export const getBotsByBotIdSettingsQuery = defineQueryOptions((options?: Options<GetBotsByBotIdSettingsData>) => ({
key: getBotsByBotIdSettingsQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdSettings({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update user settings
*
* Update or create agent settings for current user
*/
export const postBotsByBotIdSettingsMutation = (options?: Partial<Options<PostBotsByBotIdSettingsData>>): UseMutationOptions<PostBotsByBotIdSettingsResponse, Options<PostBotsByBotIdSettingsData>, PostBotsByBotIdSettingsError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdSettings({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Update user settings
*
* Update or create agent settings for current user
*/
export const putBotsByBotIdSettingsMutation = (options?: Partial<Options<PutBotsByBotIdSettingsData>>): UseMutationOptions<PutBotsByBotIdSettingsResponse, Options<PutBotsByBotIdSettingsData>, PutBotsByBotIdSettingsError> => ({
mutation: async (vars) => {
const { data } = await putBotsByBotIdSettings({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Install MCP from supermarket to bot
*/
export const postBotsByBotIdSupermarketInstallMcpMutation = (options?: Partial<Options<PostBotsByBotIdSupermarketInstallMcpData>>): UseMutationOptions<PostBotsByBotIdSupermarketInstallMcpResponse, Options<PostBotsByBotIdSupermarketInstallMcpData>, PostBotsByBotIdSupermarketInstallMcpError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdSupermarketInstallMcp({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Install skill from supermarket to bot container
*/
export const postBotsByBotIdSupermarketInstallSkillMutation = (options?: Partial<Options<PostBotsByBotIdSupermarketInstallSkillData>>): UseMutationOptions<PostBotsByBotIdSupermarketInstallSkillResponse, Options<PostBotsByBotIdSupermarketInstallSkillData>, PostBotsByBotIdSupermarketInstallSkillError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdSupermarketInstallSkill({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByBotIdTokenUsageQueryKey = (options: Options<GetBotsByBotIdTokenUsageData>) => createQueryKey('getBotsByBotIdTokenUsage', options);
/**
* Get token usage statistics
*
* Get daily aggregated token usage for a bot, split by chat, heartbeat, and schedule session types, with optional model filter and per-model breakdown
*/
export const getBotsByBotIdTokenUsageQuery = defineQueryOptions((options: Options<GetBotsByBotIdTokenUsageData>) => ({
key: getBotsByBotIdTokenUsageQueryKey(options),
query: async (context) => {
const { data } = await getBotsByBotIdTokenUsage({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Unified MCP tools gateway
*
* MCP endpoint for tool discovery and invocation.
*/
export const postBotsByBotIdToolsMutation = (options?: Partial<Options<PostBotsByBotIdToolsData>>): UseMutationOptions<PostBotsByBotIdToolsResponse, Options<PostBotsByBotIdToolsData>, PostBotsByBotIdToolsError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdTools({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Synthesize speech for a bot
*
* Stream-synthesize text using the bot's configured TTS model, write to temp file
*/
export const postBotsByBotIdTtsSynthesizeMutation = (options?: Partial<Options<PostBotsByBotIdTtsSynthesizeData>>): UseMutationOptions<PostBotsByBotIdTtsSynthesizeResponse, Options<PostBotsByBotIdTtsSynthesizeData>, PostBotsByBotIdTtsSynthesizeError> => ({
mutation: async (vars) => {
const { data } = await postBotsByBotIdTtsSynthesize({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Delete bot
*
* Delete a bot user (owner/admin only)
*/
export const deleteBotsByIdMutation = (options?: Partial<Options<DeleteBotsByIdData>>): UseMutationOptions<DeleteBotsByIdResponse, Options<DeleteBotsByIdData>, DeleteBotsByIdError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByIdQueryKey = (options: Options<GetBotsByIdData>) => createQueryKey('getBotsById', options);
/**
* Get bot details
*
* Get a bot by ID (owner/admin only)
*/
export const getBotsByIdQuery = defineQueryOptions((options: Options<GetBotsByIdData>) => ({
key: getBotsByIdQueryKey(options),
query: async (context) => {
const { data } = await getBotsById({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update bot details
*
* Update bot profile (owner/admin only)
*/
export const putBotsByIdMutation = (options?: Partial<Options<PutBotsByIdData>>): UseMutationOptions<PutBotsByIdResponse, Options<PutBotsByIdData>, PutBotsByIdError> => ({
mutation: async (vars) => {
const { data } = await putBotsById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Delete bot channel config
*
* Remove bot channel configuration
*/
export const deleteBotsByIdChannelByPlatformMutation = (options?: Partial<Options<DeleteBotsByIdChannelByPlatformData>>): UseMutationOptions<unknown, Options<DeleteBotsByIdChannelByPlatformData>, DeleteBotsByIdChannelByPlatformError> => ({
mutation: async (vars) => {
const { data } = await deleteBotsByIdChannelByPlatform({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByIdChannelByPlatformQueryKey = (options: Options<GetBotsByIdChannelByPlatformData>) => createQueryKey('getBotsByIdChannelByPlatform', options);
/**
* Get bot channel config
*
* Get bot channel configuration
*/
export const getBotsByIdChannelByPlatformQuery = defineQueryOptions((options: Options<GetBotsByIdChannelByPlatformData>) => ({
key: getBotsByIdChannelByPlatformQueryKey(options),
query: async (context) => {
const { data } = await getBotsByIdChannelByPlatform({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update bot channel config
*
* Update bot channel configuration
*/
export const putBotsByIdChannelByPlatformMutation = (options?: Partial<Options<PutBotsByIdChannelByPlatformData>>): UseMutationOptions<PutBotsByIdChannelByPlatformResponse, Options<PutBotsByIdChannelByPlatformData>, PutBotsByIdChannelByPlatformError> => ({
mutation: async (vars) => {
const { data } = await putBotsByIdChannelByPlatform({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Send message via bot channel
*
* Send a message using bot channel configuration
*/
export const postBotsByIdChannelByPlatformSendMutation = (options?: Partial<Options<PostBotsByIdChannelByPlatformSendData>>): UseMutationOptions<PostBotsByIdChannelByPlatformSendResponse, Options<PostBotsByIdChannelByPlatformSendData>, PostBotsByIdChannelByPlatformSendError> => ({
mutation: async (vars) => {
const { data } = await postBotsByIdChannelByPlatformSend({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Send message via bot channel session token
*
* Send a message using a session-scoped token (reply only)
*/
export const postBotsByIdChannelByPlatformSendChatMutation = (options?: Partial<Options<PostBotsByIdChannelByPlatformSendChatData>>): UseMutationOptions<PostBotsByIdChannelByPlatformSendChatResponse, Options<PostBotsByIdChannelByPlatformSendChatData>, PostBotsByIdChannelByPlatformSendChatError> => ({
mutation: async (vars) => {
const { data } = await postBotsByIdChannelByPlatformSendChat({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Update bot channel status
*
* Update bot channel enabled/disabled status
*/
export const patchBotsByIdChannelByPlatformStatusMutation = (options?: Partial<Options<PatchBotsByIdChannelByPlatformStatusData>>): UseMutationOptions<PatchBotsByIdChannelByPlatformStatusResponse, Options<PatchBotsByIdChannelByPlatformStatusData>, PatchBotsByIdChannelByPlatformStatusError> => ({
mutation: async (vars) => {
const { data } = await patchBotsByIdChannelByPlatformStatus({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBotsByIdChecksQueryKey = (options: Options<GetBotsByIdChecksData>) => createQueryKey('getBotsByIdChecks', options);
/**
* List bot runtime checks
*
* Evaluate bot attached resource checks in runtime
*/
export const getBotsByIdChecksQuery = defineQueryOptions((options: Options<GetBotsByIdChecksData>) => ({
key: getBotsByIdChecksQueryKey(options),
query: async (context) => {
const { data } = await getBotsByIdChecks({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Transfer bot owner (admin only)
*
* Transfer bot ownership to another human user
*/
export const putBotsByIdOwnerMutation = (options?: Partial<Options<PutBotsByIdOwnerData>>): UseMutationOptions<PutBotsByIdOwnerResponse, Options<PutBotsByIdOwnerData>, PutBotsByIdOwnerError> => ({
mutation: async (vars) => {
const { data } = await putBotsByIdOwner({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBrowserContextsQueryKey = (options?: Options<GetBrowserContextsData>) => createQueryKey('getBrowserContexts', options);
/**
* List browser contexts
*
* List all browser context configurations
*/
export const getBrowserContextsQuery = defineQueryOptions((options?: Options<GetBrowserContextsData>) => ({
key: getBrowserContextsQueryKey(options),
query: async (context) => {
const { data } = await getBrowserContexts({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create a browser context
*
* Create a browser context configuration
*/
export const postBrowserContextsMutation = (options?: Partial<Options<PostBrowserContextsData>>): UseMutationOptions<PostBrowserContextsResponse, Options<PostBrowserContextsData>, PostBrowserContextsError> => ({
mutation: async (vars) => {
const { data } = await postBrowserContexts({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBrowserContextsCoresQueryKey = (options?: Options<GetBrowserContextsCoresData>) => createQueryKey('getBrowserContextsCores', options);
/**
* Get available browser cores
*
* Get the list of browser cores available in the Browser Gateway container
*/
export const getBrowserContextsCoresQuery = defineQueryOptions((options?: Options<GetBrowserContextsCoresData>) => ({
key: getBrowserContextsCoresQueryKey(options),
query: async (context) => {
const { data } = await getBrowserContextsCores({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Delete a browser context
*
* Delete browser context by ID
*/
export const deleteBrowserContextsByIdMutation = (options?: Partial<Options<DeleteBrowserContextsByIdData>>): UseMutationOptions<unknown, Options<DeleteBrowserContextsByIdData>, DeleteBrowserContextsByIdError> => ({
mutation: async (vars) => {
const { data } = await deleteBrowserContextsById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getBrowserContextsByIdQueryKey = (options: Options<GetBrowserContextsByIdData>) => createQueryKey('getBrowserContextsById', options);
/**
* Get a browser context
*
* Get browser context by ID
*/
export const getBrowserContextsByIdQuery = defineQueryOptions((options: Options<GetBrowserContextsByIdData>) => ({
key: getBrowserContextsByIdQueryKey(options),
query: async (context) => {
const { data } = await getBrowserContextsById({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update a browser context
*
* Update browser context by ID
*/
export const putBrowserContextsByIdMutation = (options?: Partial<Options<PutBrowserContextsByIdData>>): UseMutationOptions<PutBrowserContextsByIdResponse, Options<PutBrowserContextsByIdData>, PutBrowserContextsByIdError> => ({
mutation: async (vars) => {
const { data } = await putBrowserContextsById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getChannelsQueryKey = (options?: Options<GetChannelsData>) => createQueryKey('getChannels', options);
/**
* List channel capabilities and schemas
*
* List channel meta information including capabilities and schemas
*/
export const getChannelsQuery = defineQueryOptions((options?: Options<GetChannelsData>) => ({
key: getChannelsQueryKey(options),
query: async (context) => {
const { data } = await getChannels({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getChannelsByPlatformQueryKey = (options: Options<GetChannelsByPlatformData>) => createQueryKey('getChannelsByPlatform', options);
/**
* Get channel capabilities and schemas
*
* Get channel meta information including capabilities and schemas
*/
export const getChannelsByPlatformQuery = defineQueryOptions((options: Options<GetChannelsByPlatformData>) => ({
key: getChannelsByPlatformQueryKey(options),
query: async (context) => {
const { data } = await getChannelsByPlatform({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getEmailProvidersQueryKey = (options?: Options<GetEmailProvidersData>) => createQueryKey('getEmailProviders', options);
/**
* List email providers
*/
export const getEmailProvidersQuery = defineQueryOptions((options?: Options<GetEmailProvidersData>) => ({
key: getEmailProvidersQueryKey(options),
query: async (context) => {
const { data } = await getEmailProviders({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create an email provider
*/
export const postEmailProvidersMutation = (options?: Partial<Options<PostEmailProvidersData>>): UseMutationOptions<PostEmailProvidersResponse, Options<PostEmailProvidersData>, PostEmailProvidersError> => ({
mutation: async (vars) => {
const { data } = await postEmailProviders({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getEmailProvidersMetaQueryKey = (options?: Options<GetEmailProvidersMetaData>) => createQueryKey('getEmailProvidersMeta', options);
/**
* List email provider metadata
*
* List available email provider types and config schemas
*/
export const getEmailProvidersMetaQuery = defineQueryOptions((options?: Options<GetEmailProvidersMetaData>) => ({
key: getEmailProvidersMetaQueryKey(options),
query: async (context) => {
const { data } = await getEmailProvidersMeta({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Delete an email provider
*/
export const deleteEmailProvidersByIdMutation = (options?: Partial<Options<DeleteEmailProvidersByIdData>>): UseMutationOptions<unknown, Options<DeleteEmailProvidersByIdData>, DeleteEmailProvidersByIdError> => ({
mutation: async (vars) => {
const { data } = await deleteEmailProvidersById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getEmailProvidersByIdQueryKey = (options: Options<GetEmailProvidersByIdData>) => createQueryKey('getEmailProvidersById', options);
/**
* Get an email provider
*/
export const getEmailProvidersByIdQuery = defineQueryOptions((options: Options<GetEmailProvidersByIdData>) => ({
key: getEmailProvidersByIdQueryKey(options),
query: async (context) => {
const { data } = await getEmailProvidersById({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update an email provider
*/
export const putEmailProvidersByIdMutation = (options?: Partial<Options<PutEmailProvidersByIdData>>): UseMutationOptions<PutEmailProvidersByIdResponse, Options<PutEmailProvidersByIdData>, PutEmailProvidersByIdError> => ({
mutation: async (vars) => {
const { data } = await putEmailProvidersById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getEmailProvidersByIdOauthAuthorizeQueryKey = (options: Options<GetEmailProvidersByIdOauthAuthorizeData>) => createQueryKey('getEmailProvidersByIdOauthAuthorize', options);
/**
* Start OAuth2 authorization for an email provider
*
* Returns the authorization URL to redirect the user to
*/
export const getEmailProvidersByIdOauthAuthorizeQuery = defineQueryOptions((options: Options<GetEmailProvidersByIdOauthAuthorizeData>) => ({
key: getEmailProvidersByIdOauthAuthorizeQueryKey(options),
query: async (context) => {
const { data } = await getEmailProvidersByIdOauthAuthorize({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getEmailProvidersByIdOauthStatusQueryKey = (options: Options<GetEmailProvidersByIdOauthStatusData>) => createQueryKey('getEmailProvidersByIdOauthStatus', options);
/**
* Get OAuth2 status for an email provider
*/
export const getEmailProvidersByIdOauthStatusQuery = defineQueryOptions((options: Options<GetEmailProvidersByIdOauthStatusData>) => ({
key: getEmailProvidersByIdOauthStatusQueryKey(options),
query: async (context) => {
const { data } = await getEmailProvidersByIdOauthStatus({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Revoke stored OAuth2 tokens for an email provider
*/
export const deleteEmailProvidersByIdOauthTokenMutation = (options?: Partial<Options<DeleteEmailProvidersByIdOauthTokenData>>): UseMutationOptions<unknown, Options<DeleteEmailProvidersByIdOauthTokenData>, DeleteEmailProvidersByIdOauthTokenError> => ({
mutation: async (vars) => {
const { data } = await deleteEmailProvidersByIdOauthToken({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Mailgun inbound email webhook
*
* Receives inbound emails from Mailgun
*/
export const postEmailMailgunWebhookByConfigIdMutation = (options?: Partial<Options<PostEmailMailgunWebhookByConfigIdData>>): UseMutationOptions<PostEmailMailgunWebhookByConfigIdResponse, Options<PostEmailMailgunWebhookByConfigIdData>, PostEmailMailgunWebhookByConfigIdError> => ({
mutation: async (vars) => {
const { data } = await postEmailMailgunWebhookByConfigId({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getEmailOauthCallbackQueryKey = (options: Options<GetEmailOauthCallbackData>) => createQueryKey('getEmailOauthCallback', options);
/**
* OAuth2 callback for email providers
*
* Handles the OAuth2 callback, exchanges the code for tokens
*/
export const getEmailOauthCallbackQuery = defineQueryOptions((options: Options<GetEmailOauthCallbackData>) => ({
key: getEmailOauthCallbackQueryKey(options),
query: async (context) => {
const { data } = await getEmailOauthCallback({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getMemoryProvidersQueryKey = (options?: Options<GetMemoryProvidersData>) => createQueryKey('getMemoryProviders', options);
/**
* List memory providers
*
* List configured memory providers
*/
export const getMemoryProvidersQuery = defineQueryOptions((options?: Options<GetMemoryProvidersData>) => ({
key: getMemoryProvidersQueryKey(options),
query: async (context) => {
const { data } = await getMemoryProviders({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create a memory provider
*
* Create a memory provider configuration
*/
export const postMemoryProvidersMutation = (options?: Partial<Options<PostMemoryProvidersData>>): UseMutationOptions<PostMemoryProvidersResponse, Options<PostMemoryProvidersData>, PostMemoryProvidersError> => ({
mutation: async (vars) => {
const { data } = await postMemoryProviders({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getMemoryProvidersMetaQueryKey = (options?: Options<GetMemoryProvidersMetaData>) => createQueryKey('getMemoryProvidersMeta', options);
/**
* List memory provider metadata
*
* List available memory provider types and config schemas
*/
export const getMemoryProvidersMetaQuery = defineQueryOptions((options?: Options<GetMemoryProvidersMetaData>) => ({
key: getMemoryProvidersMetaQueryKey(options),
query: async (context) => {
const { data } = await getMemoryProvidersMeta({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Delete a memory provider
*
* Delete memory provider by ID
*/
export const deleteMemoryProvidersByIdMutation = (options?: Partial<Options<DeleteMemoryProvidersByIdData>>): UseMutationOptions<unknown, Options<DeleteMemoryProvidersByIdData>, DeleteMemoryProvidersByIdError> => ({
mutation: async (vars) => {
const { data } = await deleteMemoryProvidersById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getMemoryProvidersByIdQueryKey = (options: Options<GetMemoryProvidersByIdData>) => createQueryKey('getMemoryProvidersById', options);
/**
* Get a memory provider
*
* Get memory provider by ID
*/
export const getMemoryProvidersByIdQuery = defineQueryOptions((options: Options<GetMemoryProvidersByIdData>) => ({
key: getMemoryProvidersByIdQueryKey(options),
query: async (context) => {
const { data } = await getMemoryProvidersById({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update a memory provider
*
* Update memory provider by ID
*/
export const putMemoryProvidersByIdMutation = (options?: Partial<Options<PutMemoryProvidersByIdData>>): UseMutationOptions<PutMemoryProvidersByIdResponse, Options<PutMemoryProvidersByIdData>, PutMemoryProvidersByIdError> => ({
mutation: async (vars) => {
const { data } = await putMemoryProvidersById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getMemoryProvidersByIdStatusQueryKey = (options: Options<GetMemoryProvidersByIdStatusData>) => createQueryKey('getMemoryProvidersByIdStatus', options);
/**
* Get memory provider status
*
* Get runtime status data for a memory provider
*/
export const getMemoryProvidersByIdStatusQuery = defineQueryOptions((options: Options<GetMemoryProvidersByIdStatusData>) => ({
key: getMemoryProvidersByIdStatusQueryKey(options),
query: async (context) => {
const { data } = await getMemoryProvidersByIdStatus({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getModelsQueryKey = (options?: Options<GetModelsData>) => createQueryKey('getModels', options);
/**
* List all models
*
* Get a list of all configured models, optionally filtered by type or provider client type
*/
export const getModelsQuery = defineQueryOptions((options?: Options<GetModelsData>) => ({
key: getModelsQueryKey(options),
query: async (context) => {
const { data } = await getModels({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create a new model
*
* Create a new model configuration
*/
export const postModelsMutation = (options?: Partial<Options<PostModelsData>>): UseMutationOptions<PostModelsResponse, Options<PostModelsData>, PostModelsError> => ({
mutation: async (vars) => {
const { data } = await postModels({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getModelsCountQueryKey = (options?: Options<GetModelsCountData>) => createQueryKey('getModelsCount', options);
/**
* Get model count
*
* Get the total count of models, optionally filtered by type
*/
export const getModelsCountQuery = defineQueryOptions((options?: Options<GetModelsCountData>) => ({
key: getModelsCountQueryKey(options),
query: async (context) => {
const { data } = await getModelsCount({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Delete model by model ID
*
* Delete a model configuration by its model_id field (e.g., gpt-4)
*/
export const deleteModelsModelByModelIdMutation = (options?: Partial<Options<DeleteModelsModelByModelIdData>>): UseMutationOptions<unknown, Options<DeleteModelsModelByModelIdData>, DeleteModelsModelByModelIdError> => ({
mutation: async (vars) => {
const { data } = await deleteModelsModelByModelId({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getModelsModelByModelIdQueryKey = (options: Options<GetModelsModelByModelIdData>) => createQueryKey('getModelsModelByModelId', options);
/**
* Get model by model ID
*
* Get a model configuration by its model_id field (e.g., gpt-4)
*/
export const getModelsModelByModelIdQuery = defineQueryOptions((options: Options<GetModelsModelByModelIdData>) => ({
key: getModelsModelByModelIdQueryKey(options),
query: async (context) => {
const { data } = await getModelsModelByModelId({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update model by model ID
*
* Update a model configuration by its model_id field (e.g., gpt-4)
*/
export const putModelsModelByModelIdMutation = (options?: Partial<Options<PutModelsModelByModelIdData>>): UseMutationOptions<PutModelsModelByModelIdResponse, Options<PutModelsModelByModelIdData>, PutModelsModelByModelIdError> => ({
mutation: async (vars) => {
const { data } = await putModelsModelByModelId({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Delete model by internal ID
*
* Delete a model configuration by its internal UUID
*/
export const deleteModelsByIdMutation = (options?: Partial<Options<DeleteModelsByIdData>>): UseMutationOptions<unknown, Options<DeleteModelsByIdData>, DeleteModelsByIdError> => ({
mutation: async (vars) => {
const { data } = await deleteModelsById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getModelsByIdQueryKey = (options: Options<GetModelsByIdData>) => createQueryKey('getModelsById', options);
/**
* Get model by internal ID
*
* Get a model configuration by its internal UUID
*/
export const getModelsByIdQuery = defineQueryOptions((options: Options<GetModelsByIdData>) => ({
key: getModelsByIdQueryKey(options),
query: async (context) => {
const { data } = await getModelsById({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update model by internal ID
*
* Update a model configuration by its internal UUID
*/
export const putModelsByIdMutation = (options?: Partial<Options<PutModelsByIdData>>): UseMutationOptions<PutModelsByIdResponse, Options<PutModelsByIdData>, PutModelsByIdError> => ({
mutation: async (vars) => {
const { data } = await putModelsById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Test model connectivity
*
* Probe a model's provider endpoint using the model's real model_id and client_type to verify configuration
*/
export const postModelsByIdTestMutation = (options?: Partial<Options<PostModelsByIdTestData>>): UseMutationOptions<PostModelsByIdTestResponse, Options<PostModelsByIdTestData>, PostModelsByIdTestError> => ({
mutation: async (vars) => {
const { data } = await postModelsByIdTest({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getPingQueryKey = (options?: Options<GetPingData>) => createQueryKey('getPing', options);
/**
* Health check with server capabilities
*/
export const getPingQuery = defineQueryOptions((options?: Options<GetPingData>) => ({
key: getPingQueryKey(options),
query: async (context) => {
const { data } = await getPing({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getProvidersQueryKey = (options?: Options<GetProvidersData>) => createQueryKey('getProviders', options);
/**
* List all LLM providers
*
* Get a list of all configured LLM providers
*/
export const getProvidersQuery = defineQueryOptions((options?: Options<GetProvidersData>) => ({
key: getProvidersQueryKey(options),
query: async (context) => {
const { data } = await getProviders({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create a new LLM provider
*
* Create a new LLM provider configuration
*/
export const postProvidersMutation = (options?: Partial<Options<PostProvidersData>>): UseMutationOptions<PostProvidersResponse, Options<PostProvidersData>, PostProvidersError> => ({
mutation: async (vars) => {
const { data } = await postProviders({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getProvidersCountQueryKey = (options?: Options<GetProvidersCountData>) => createQueryKey('getProvidersCount', options);
/**
* Count providers
*
* Get the total count of providers
*/
export const getProvidersCountQuery = defineQueryOptions((options?: Options<GetProvidersCountData>) => ({
key: getProvidersCountQueryKey(options),
query: async (context) => {
const { data } = await getProvidersCount({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getProvidersNameByNameQueryKey = (options: Options<GetProvidersNameByNameData>) => createQueryKey('getProvidersNameByName', options);
/**
* Get provider by name
*
* Get a provider configuration by its name
*/
export const getProvidersNameByNameQuery = defineQueryOptions((options: Options<GetProvidersNameByNameData>) => ({
key: getProvidersNameByNameQueryKey(options),
query: async (context) => {
const { data } = await getProvidersNameByName({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getProvidersOauthCallbackQueryKey = (options: Options<GetProvidersOauthCallbackData>) => createQueryKey('getProvidersOauthCallback', options);
/**
* OAuth2 callback for LLM providers
*/
export const getProvidersOauthCallbackQuery = defineQueryOptions((options: Options<GetProvidersOauthCallbackData>) => ({
key: getProvidersOauthCallbackQueryKey(options),
query: async (context) => {
const { data } = await getProvidersOauthCallback({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Delete provider
*
* Delete a provider configuration
*/
export const deleteProvidersByIdMutation = (options?: Partial<Options<DeleteProvidersByIdData>>): UseMutationOptions<unknown, Options<DeleteProvidersByIdData>, DeleteProvidersByIdError> => ({
mutation: async (vars) => {
const { data } = await deleteProvidersById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getProvidersByIdQueryKey = (options: Options<GetProvidersByIdData>) => createQueryKey('getProvidersById', options);
/**
* Get provider by ID
*
* Get a provider configuration by its ID
*/
export const getProvidersByIdQuery = defineQueryOptions((options: Options<GetProvidersByIdData>) => ({
key: getProvidersByIdQueryKey(options),
query: async (context) => {
const { data } = await getProvidersById({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update provider
*
* Update an existing provider configuration
*/
export const putProvidersByIdMutation = (options?: Partial<Options<PutProvidersByIdData>>): UseMutationOptions<PutProvidersByIdResponse, Options<PutProvidersByIdData>, PutProvidersByIdError> => ({
mutation: async (vars) => {
const { data } = await putProvidersById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Import models from provider
*
* Fetch models from provider's /v1/models endpoint and import them
*/
export const postProvidersByIdImportModelsMutation = (options?: Partial<Options<PostProvidersByIdImportModelsData>>): UseMutationOptions<PostProvidersByIdImportModelsResponse, Options<PostProvidersByIdImportModelsData>, PostProvidersByIdImportModelsError> => ({
mutation: async (vars) => {
const { data } = await postProvidersByIdImportModels({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getProvidersByIdModelsQueryKey = (options: Options<GetProvidersByIdModelsData>) => createQueryKey('getProvidersByIdModels', options);
/**
* List provider models
*
* Get models for a provider by id, optionally filtered by type
*/
export const getProvidersByIdModelsQuery = defineQueryOptions((options: Options<GetProvidersByIdModelsData>) => ({
key: getProvidersByIdModelsQueryKey(options),
query: async (context) => {
const { data } = await getProvidersByIdModels({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getProvidersByIdOauthAuthorizeQueryKey = (options: Options<GetProvidersByIdOauthAuthorizeData>) => createQueryKey('getProvidersByIdOauthAuthorize', options);
/**
* Start OAuth2 authorization for an LLM provider
*/
export const getProvidersByIdOauthAuthorizeQuery = defineQueryOptions((options: Options<GetProvidersByIdOauthAuthorizeData>) => ({
key: getProvidersByIdOauthAuthorizeQueryKey(options),
query: async (context) => {
const { data } = await getProvidersByIdOauthAuthorize({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Poll OAuth device authorization for an LLM provider
*/
export const postProvidersByIdOauthPollMutation = (options?: Partial<Options<PostProvidersByIdOauthPollData>>): UseMutationOptions<PostProvidersByIdOauthPollResponse, Options<PostProvidersByIdOauthPollData>, PostProvidersByIdOauthPollError> => ({
mutation: async (vars) => {
const { data } = await postProvidersByIdOauthPoll({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getProvidersByIdOauthStatusQueryKey = (options: Options<GetProvidersByIdOauthStatusData>) => createQueryKey('getProvidersByIdOauthStatus', options);
/**
* Get OAuth2 status for an LLM provider
*/
export const getProvidersByIdOauthStatusQuery = defineQueryOptions((options: Options<GetProvidersByIdOauthStatusData>) => ({
key: getProvidersByIdOauthStatusQueryKey(options),
query: async (context) => {
const { data } = await getProvidersByIdOauthStatus({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Revoke stored OAuth2 tokens for an LLM provider
*/
export const deleteProvidersByIdOauthTokenMutation = (options?: Partial<Options<DeleteProvidersByIdOauthTokenData>>): UseMutationOptions<unknown, Options<DeleteProvidersByIdOauthTokenData>, DeleteProvidersByIdOauthTokenError> => ({
mutation: async (vars) => {
const { data } = await deleteProvidersByIdOauthToken({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Test provider connectivity
*
* Probe a provider's base URL to check reachability, supported client types, and embedding support
*/
export const postProvidersByIdTestMutation = (options?: Partial<Options<PostProvidersByIdTestData>>): UseMutationOptions<PostProvidersByIdTestResponse, Options<PostProvidersByIdTestData>, PostProvidersByIdTestError> => ({
mutation: async (vars) => {
const { data } = await postProvidersByIdTest({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getSearchProvidersQueryKey = (options?: Options<GetSearchProvidersData>) => createQueryKey('getSearchProviders', options);
/**
* List search providers
*
* List configured search providers
*/
export const getSearchProvidersQuery = defineQueryOptions((options?: Options<GetSearchProvidersData>) => ({
key: getSearchProvidersQueryKey(options),
query: async (context) => {
const { data } = await getSearchProviders({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create a search provider
*
* Create a search provider configuration
*/
export const postSearchProvidersMutation = (options?: Partial<Options<PostSearchProvidersData>>): UseMutationOptions<PostSearchProvidersResponse, Options<PostSearchProvidersData>, PostSearchProvidersError> => ({
mutation: async (vars) => {
const { data } = await postSearchProviders({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getSearchProvidersMetaQueryKey = (options?: Options<GetSearchProvidersMetaData>) => createQueryKey('getSearchProvidersMeta', options);
/**
* List search provider metadata
*
* List available search provider types and config schemas
*/
export const getSearchProvidersMetaQuery = defineQueryOptions((options?: Options<GetSearchProvidersMetaData>) => ({
key: getSearchProvidersMetaQueryKey(options),
query: async (context) => {
const { data } = await getSearchProvidersMeta({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Delete a search provider
*
* Delete search provider by ID
*/
export const deleteSearchProvidersByIdMutation = (options?: Partial<Options<DeleteSearchProvidersByIdData>>): UseMutationOptions<unknown, Options<DeleteSearchProvidersByIdData>, DeleteSearchProvidersByIdError> => ({
mutation: async (vars) => {
const { data } = await deleteSearchProvidersById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getSearchProvidersByIdQueryKey = (options: Options<GetSearchProvidersByIdData>) => createQueryKey('getSearchProvidersById', options);
/**
* Get a search provider
*
* Get search provider by ID
*/
export const getSearchProvidersByIdQuery = defineQueryOptions((options: Options<GetSearchProvidersByIdData>) => ({
key: getSearchProvidersByIdQueryKey(options),
query: async (context) => {
const { data } = await getSearchProvidersById({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update a search provider
*
* Update search provider by ID
*/
export const putSearchProvidersByIdMutation = (options?: Partial<Options<PutSearchProvidersByIdData>>): UseMutationOptions<PutSearchProvidersByIdResponse, Options<PutSearchProvidersByIdData>, PutSearchProvidersByIdError> => ({
mutation: async (vars) => {
const { data } = await putSearchProvidersById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getSpeechModelsQueryKey = (options?: Options<GetSpeechModelsData>) => createQueryKey('getSpeechModels', options);
/**
* List all speech models
*
* List all models of type 'speech' (filtered view of unified models table)
*/
export const getSpeechModelsQuery = defineQueryOptions((options?: Options<GetSpeechModelsData>) => ({
key: getSpeechModelsQueryKey(options),
query: async (context) => {
const { data } = await getSpeechModels({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getSpeechModelsByIdQueryKey = (options: Options<GetSpeechModelsByIdData>) => createQueryKey('getSpeechModelsById', options);
/**
* Get a speech model
*/
export const getSpeechModelsByIdQuery = defineQueryOptions((options: Options<GetSpeechModelsByIdData>) => ({
key: getSpeechModelsByIdQueryKey(options),
query: async (context) => {
const { data } = await getSpeechModelsById({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getSpeechModelsByIdCapabilitiesQueryKey = (options: Options<GetSpeechModelsByIdCapabilitiesData>) => createQueryKey('getSpeechModelsByIdCapabilities', options);
/**
* Get speech model capabilities
*/
export const getSpeechModelsByIdCapabilitiesQuery = defineQueryOptions((options: Options<GetSpeechModelsByIdCapabilitiesData>) => ({
key: getSpeechModelsByIdCapabilitiesQueryKey(options),
query: async (context) => {
const { data } = await getSpeechModelsByIdCapabilities({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Test speech model synthesis
*
* Synthesize text using a specific model's config and return audio
*/
export const postSpeechModelsByIdTestMutation = (options?: Partial<Options<PostSpeechModelsByIdTestData>>): UseMutationOptions<unknown, Options<PostSpeechModelsByIdTestData>, PostSpeechModelsByIdTestError> => ({
mutation: async (vars) => {
const { data } = await postSpeechModelsByIdTest({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getSpeechProvidersQueryKey = (options?: Options<GetSpeechProvidersData>) => createQueryKey('getSpeechProviders', options);
/**
* List speech providers
*
* List providers that support speech (filtered view of unified providers table)
*/
export const getSpeechProvidersQuery = defineQueryOptions((options?: Options<GetSpeechProvidersData>) => ({
key: getSpeechProvidersQueryKey(options),
query: async (context) => {
const { data } = await getSpeechProviders({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getSpeechProvidersMetaQueryKey = (options?: Options<GetSpeechProvidersMetaData>) => createQueryKey('getSpeechProvidersMeta', options);
/**
* List speech provider metadata
*
* List available speech provider types with their models and capabilities
*/
export const getSpeechProvidersMetaQuery = defineQueryOptions((options?: Options<GetSpeechProvidersMetaData>) => ({
key: getSpeechProvidersMetaQueryKey(options),
query: async (context) => {
const { data } = await getSpeechProvidersMeta({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getSupermarketMcpsQueryKey = (options?: Options<GetSupermarketMcpsData>) => createQueryKey('getSupermarketMcps', options);
/**
* List MCPs from supermarket
*/
export const getSupermarketMcpsQuery = defineQueryOptions((options?: Options<GetSupermarketMcpsData>) => ({
key: getSupermarketMcpsQueryKey(options),
query: async (context) => {
const { data } = await getSupermarketMcps({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getSupermarketMcpsByIdQueryKey = (options: Options<GetSupermarketMcpsByIdData>) => createQueryKey('getSupermarketMcpsById', options);
/**
* Get MCP detail from supermarket
*/
export const getSupermarketMcpsByIdQuery = defineQueryOptions((options: Options<GetSupermarketMcpsByIdData>) => ({
key: getSupermarketMcpsByIdQueryKey(options),
query: async (context) => {
const { data } = await getSupermarketMcpsById({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getSupermarketSkillsQueryKey = (options?: Options<GetSupermarketSkillsData>) => createQueryKey('getSupermarketSkills', options);
/**
* List skills from supermarket
*/
export const getSupermarketSkillsQuery = defineQueryOptions((options?: Options<GetSupermarketSkillsData>) => ({
key: getSupermarketSkillsQueryKey(options),
query: async (context) => {
const { data } = await getSupermarketSkills({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getSupermarketSkillsByIdQueryKey = (options: Options<GetSupermarketSkillsByIdData>) => createQueryKey('getSupermarketSkillsById', options);
/**
* Get skill detail from supermarket
*/
export const getSupermarketSkillsByIdQuery = defineQueryOptions((options: Options<GetSupermarketSkillsByIdData>) => ({
key: getSupermarketSkillsByIdQueryKey(options),
query: async (context) => {
const { data } = await getSupermarketSkillsById({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getSupermarketTagsQueryKey = (options?: Options<GetSupermarketTagsData>) => createQueryKey('getSupermarketTags', options);
/**
* List all tags from supermarket
*/
export const getSupermarketTagsQuery = defineQueryOptions((options?: Options<GetSupermarketTagsData>) => ({
key: getSupermarketTagsQueryKey(options),
query: async (context) => {
const { data } = await getSupermarketTags({
...options,
...context,
throwOnError: true
});
return data;
}
}));
export const getUsersQueryKey = (options?: Options<GetUsersData>) => createQueryKey('getUsers', options);
/**
* List users (admin only)
*
* List users
*/
export const getUsersQuery = defineQueryOptions((options?: Options<GetUsersData>) => ({
key: getUsersQueryKey(options),
query: async (context) => {
const { data } = await getUsers({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Create human user (admin only)
*
* Create a new human user account
*/
export const postUsersMutation = (options?: Partial<Options<PostUsersData>>): UseMutationOptions<PostUsersResponse, Options<PostUsersData>, PostUsersError> => ({
mutation: async (vars) => {
const { data } = await postUsers({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getUsersMeQueryKey = (options?: Options<GetUsersMeData>) => createQueryKey('getUsersMe', options);
/**
* Get current user
*
* Get current user profile
*/
export const getUsersMeQuery = defineQueryOptions((options?: Options<GetUsersMeData>) => ({
key: getUsersMeQueryKey(options),
query: async (context) => {
const { data } = await getUsersMe({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update current user profile
*
* Update current user display name or avatar
*/
export const putUsersMeMutation = (options?: Partial<Options<PutUsersMeData>>): UseMutationOptions<PutUsersMeResponse, Options<PutUsersMeData>, PutUsersMeError> => ({
mutation: async (vars) => {
const { data } = await putUsersMe({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getUsersMeChannelsByPlatformQueryKey = (options: Options<GetUsersMeChannelsByPlatformData>) => createQueryKey('getUsersMeChannelsByPlatform', options);
/**
* Get channel user config
*
* Get channel binding configuration for current user
*/
export const getUsersMeChannelsByPlatformQuery = defineQueryOptions((options: Options<GetUsersMeChannelsByPlatformData>) => ({
key: getUsersMeChannelsByPlatformQueryKey(options),
query: async (context) => {
const { data } = await getUsersMeChannelsByPlatform({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update channel user config
*
* Update channel binding configuration for current user
*/
export const putUsersMeChannelsByPlatformMutation = (options?: Partial<Options<PutUsersMeChannelsByPlatformData>>): UseMutationOptions<PutUsersMeChannelsByPlatformResponse, Options<PutUsersMeChannelsByPlatformData>, PutUsersMeChannelsByPlatformError> => ({
mutation: async (vars) => {
const { data } = await putUsersMeChannelsByPlatform({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getUsersMeIdentitiesQueryKey = (options?: Options<GetUsersMeIdentitiesData>) => createQueryKey('getUsersMeIdentities', options);
/**
* List current user's channel identities
*
* List all channel identities linked to current user
*/
export const getUsersMeIdentitiesQuery = defineQueryOptions((options?: Options<GetUsersMeIdentitiesData>) => ({
key: getUsersMeIdentitiesQueryKey(options),
query: async (context) => {
const { data } = await getUsersMeIdentities({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update current user password
*
* Update current user password with current password check
*/
export const putUsersMePasswordMutation = (options?: Partial<Options<PutUsersMePasswordData>>): UseMutationOptions<unknown, Options<PutUsersMePasswordData>, PutUsersMePasswordError> => ({
mutation: async (vars) => {
const { data } = await putUsersMePassword({
...options,
...vars,
throwOnError: true
});
return data;
}
});
export const getUsersByIdQueryKey = (options: Options<GetUsersByIdData>) => createQueryKey('getUsersById', options);
/**
* Get user by ID
*
* Get user details (self or admin only)
*/
export const getUsersByIdQuery = defineQueryOptions((options: Options<GetUsersByIdData>) => ({
key: getUsersByIdQueryKey(options),
query: async (context) => {
const { data } = await getUsersById({
...options,
...context,
throwOnError: true
});
return data;
}
}));
/**
* Update user (admin only)
*
* Update user profile and status
*/
export const putUsersByIdMutation = (options?: Partial<Options<PutUsersByIdData>>): UseMutationOptions<PutUsersByIdResponse, Options<PutUsersByIdData>, PutUsersByIdError> => ({
mutation: async (vars) => {
const { data } = await putUsersById({
...options,
...vars,
throwOnError: true
});
return data;
}
});
/**
* Reset user password (admin only)
*
* Reset a user password
*/
export const putUsersByIdPasswordMutation = (options?: Partial<Options<PutUsersByIdPasswordData>>): UseMutationOptions<unknown, Options<PutUsersByIdPasswordData>, PutUsersByIdPasswordError> => ({
mutation: async (vars) => {
const { data } = await putUsersByIdPassword({
...options,
...vars,
throwOnError: true
});
return data;
}
});