/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
libs/internal-sdk/src/react-query/integrationsGenerateLinkUserOAuthUrl.ts
118 строк
4 KB
Dima Grossman
feat(api-service): expose agent reply OpenAPI shapes and SDK examples fixes NV-8285 (#11927)
15 июл 2026, 11:37
Не верифицирован
15 июл 2026, 11:37
59f9cbd
Код
Авторство
О чём код?
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { MutationKey, useMutation, UseMutationResult, } from "@tanstack/react-query"; import { NovuCore } from "../core.js"; import { integrationsGenerateLinkUserOAuthUrl } from "../funcs/integrationsGenerateLinkUserOAuthUrl.js"; import { combineSignals } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.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 IntegrationsGenerateLinkUserOAuthUrlMutationVariables = { generateLinkUserOauthUrlRequestDto: components.GenerateLinkUserOauthUrlRequestDto; idempotencyKey?: string | undefined; options?: RequestOptions; }; export type IntegrationsGenerateLinkUserOAuthUrlMutationData = operations.IntegrationsControllerGenerateLinkUserOAuthUrlResponse; export type IntegrationsGenerateLinkUserOAuthUrlMutationError = | errors.ErrorDto | errors.ValidationErrorDto | NovuError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError; /** * Generate OAuth URL to link a subscriber user identity * * @remarks * Generate an OAuth URL that links a specific subscriber to their chat identity (Slack user ID, MS Teams user OID, or Webex person). * The generated URL expires after 5 minutes. */ export function useIntegrationsGenerateLinkUserOAuthUrlMutation( options?: MutationHookOptions< IntegrationsGenerateLinkUserOAuthUrlMutationData, IntegrationsGenerateLinkUserOAuthUrlMutationError, IntegrationsGenerateLinkUserOAuthUrlMutationVariables >, ): UseMutationResult< IntegrationsGenerateLinkUserOAuthUrlMutationData, IntegrationsGenerateLinkUserOAuthUrlMutationError, IntegrationsGenerateLinkUserOAuthUrlMutationVariables > { const client = useNovuContext(); return useMutation({ ...buildIntegrationsGenerateLinkUserOAuthUrlMutation(client, options), ...options, }); } export function mutationKeyIntegrationsGenerateLinkUserOAuthUrl(): MutationKey { return ["@novu/api", "Integrations", "generateLinkUserOAuthUrl"]; } export function buildIntegrationsGenerateLinkUserOAuthUrlMutation( client$: NovuCore, hookOptions?: RequestOptions, ): { mutationKey: MutationKey; mutationFn: ( variables: IntegrationsGenerateLinkUserOAuthUrlMutationVariables, ) => Promise<IntegrationsGenerateLinkUserOAuthUrlMutationData>; } { return { mutationKey: mutationKeyIntegrationsGenerateLinkUserOAuthUrl(), mutationFn: function integrationsGenerateLinkUserOAuthUrlMutationFn({ generateLinkUserOauthUrlRequestDto, idempotencyKey, options, }): Promise<IntegrationsGenerateLinkUserOAuthUrlMutationData> { const mergedOptions = { ...hookOptions, ...options, fetchOptions: { ...hookOptions?.fetchOptions, ...options?.fetchOptions, signal: combineSignals( hookOptions?.fetchOptions?.signal, options?.fetchOptions?.signal, ), }, }; return unwrapAsync(integrationsGenerateLinkUserOAuthUrl( client$, generateLinkUserOauthUrlRequestDto, idempotencyKey, mergedOptions, )); }, }; }