/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
libs/internal-sdk/src/react-query/agentsIntegrationsDelete.ts
119 строк
3 KB
AdemDev
feat(providers): add LINE Messaging API chat provider fixes NV-7614 (#11148)
13 июл 2026, 11:20
Не верифицирован
13 июл 2026, 11:20
51e40a8
Код
Авторство
О чём код?
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { MutationKey, useMutation, UseMutationResult, } from "@tanstack/react-query"; import { NovuCore } from "../core.js"; import { agentsIntegrationsDelete } from "../funcs/agentsIntegrationsDelete.js"; import { combineSignals } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { NovuError } from "../models/errors/novuerror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { useNovuContext } from "./_context.js"; import { MutationHookOptions } from "./_types.js"; export type AgentsIntegrationsDeleteMutationVariables = { identifier: string; agentIntegrationId: string; idempotencyKey?: string | undefined; options?: RequestOptions; }; export type AgentsIntegrationsDeleteMutationData = | operations.AgentIntegrationsControllerRemoveAgentIntegrationResponse | undefined; export type AgentsIntegrationsDeleteMutationError = | errors.ErrorDto | errors.ValidationErrorDto | NovuError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError; /** * Delete an agent integration * * @remarks * Delete a specific agent-integration link by its document id. */ export function useAgentsIntegrationsDeleteMutation( options?: MutationHookOptions< AgentsIntegrationsDeleteMutationData, AgentsIntegrationsDeleteMutationError, AgentsIntegrationsDeleteMutationVariables >, ): UseMutationResult< AgentsIntegrationsDeleteMutationData, AgentsIntegrationsDeleteMutationError, AgentsIntegrationsDeleteMutationVariables > { const client = useNovuContext(); return useMutation({ ...buildAgentsIntegrationsDeleteMutation(client, options), ...options, }); } export function mutationKeyAgentsIntegrationsDelete(): MutationKey { return ["@novu/api", "Integrations", "delete"]; } export function buildAgentsIntegrationsDeleteMutation( client$: NovuCore, hookOptions?: RequestOptions, ): { mutationKey: MutationKey; mutationFn: ( variables: AgentsIntegrationsDeleteMutationVariables, ) => Promise<AgentsIntegrationsDeleteMutationData>; } { return { mutationKey: mutationKeyAgentsIntegrationsDelete(), mutationFn: function agentsIntegrationsDeleteMutationFn({ identifier, agentIntegrationId, idempotencyKey, options, }): Promise<AgentsIntegrationsDeleteMutationData> { const mergedOptions = { ...hookOptions, ...options, fetchOptions: { ...hookOptions?.fetchOptions, ...options?.fetchOptions, signal: combineSignals( hookOptions?.fetchOptions?.signal, options?.fetchOptions?.signal, ), }, }; return unwrapAsync(agentsIntegrationsDelete( client$, identifier, agentIntegrationId, idempotencyKey, mergedOptions, )); }, }; }