/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
libs/internal-sdk/src/react-query/integrationsIntegrationsControllerConfigureIntegrationWebhook.ts
134 строки
4 KB
Pawan Jain
feat(api-service): add SdkMethodName decorator for mobile link creation in integrations controller fixes NV-8203 (#11801)
06 июл 2026, 21:07
Не верифицирован
06 июл 2026, 21:07
a315536
Код
Авторство
О чём код?
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { MutationKey, useMutation, UseMutationResult, } from "@tanstack/react-query"; import { NovuCore } from "../core.js"; import { integrationsIntegrationsControllerConfigureIntegrationWebhook } from "../funcs/integrationsIntegrationsControllerConfigureIntegrationWebhook.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 IntegrationsIntegrationsControllerConfigureIntegrationWebhookMutationVariables = { integrationIdentifier: string; idempotencyKey?: string | undefined; options?: RequestOptions; }; export type IntegrationsIntegrationsControllerConfigureIntegrationWebhookMutationData = operations.IntegrationsControllerConfigureIntegrationWebhookResponse; export type IntegrationsIntegrationsControllerConfigureIntegrationWebhookMutationError = | errors.ErrorDto | errors.ValidationErrorDto | NovuError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError; /** * Configure a chat integration webhook * * @remarks * Registers the Novu webhook URL with the chat provider for the specified integration. Telegram is the only supported provider initially. */ export function useIntegrationsIntegrationsControllerConfigureIntegrationWebhookMutation( options?: MutationHookOptions< IntegrationsIntegrationsControllerConfigureIntegrationWebhookMutationData, IntegrationsIntegrationsControllerConfigureIntegrationWebhookMutationError, IntegrationsIntegrationsControllerConfigureIntegrationWebhookMutationVariables >, ): UseMutationResult< IntegrationsIntegrationsControllerConfigureIntegrationWebhookMutationData, IntegrationsIntegrationsControllerConfigureIntegrationWebhookMutationError, IntegrationsIntegrationsControllerConfigureIntegrationWebhookMutationVariables > { const client = useNovuContext(); return useMutation({ ...buildIntegrationsIntegrationsControllerConfigureIntegrationWebhookMutation( client, options, ), ...options, }); } export function mutationKeyIntegrationsIntegrationsControllerConfigureIntegrationWebhook(): MutationKey { return [ "@novu/api", "Integrations", "integrationsControllerConfigureIntegrationWebhook", ]; } export function buildIntegrationsIntegrationsControllerConfigureIntegrationWebhookMutation( client$: NovuCore, hookOptions?: RequestOptions, ): { mutationKey: MutationKey; mutationFn: ( variables: IntegrationsIntegrationsControllerConfigureIntegrationWebhookMutationVariables, ) => Promise< IntegrationsIntegrationsControllerConfigureIntegrationWebhookMutationData >; } { return { mutationKey: mutationKeyIntegrationsIntegrationsControllerConfigureIntegrationWebhook(), mutationFn: function integrationsIntegrationsControllerConfigureIntegrationWebhookMutationFn( { integrationIdentifier, idempotencyKey, options, }, ): Promise< IntegrationsIntegrationsControllerConfigureIntegrationWebhookMutationData > { const mergedOptions = { ...hookOptions, ...options, fetchOptions: { ...hookOptions?.fetchOptions, ...options?.fetchOptions, signal: combineSignals( hookOptions?.fetchOptions?.signal, options?.fetchOptions?.signal, ), }, }; return unwrapAsync( integrationsIntegrationsControllerConfigureIntegrationWebhook( client$, integrationIdentifier, idempotencyKey, mergedOptions, ), ); }, }; }