/** * Generated by orval v8.8.1 🍺 * Do not edit manually. * Veza Backend API * Backend API for Veza platform. * OpenAPI spec version: 1.2.0 */ import { useQuery } from '@tanstack/react-query'; import type { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryFunction, QueryKey, UndefinedInitialDataOptions, UseQueryOptions, UseQueryResult } from '@tanstack/react-query'; import type { InternalHandlersWebRTCConfigResponse } from '../model'; import { vezaMutator } from '../../api/orval-mutator'; type SecondParameter unknown> = Parameters[1]; /** * Public — returns the ICE-server set the SPA feeds to RTCPeerConnection. STUN-only when no TURN is configured. TURN credentials are always emitted as static (REST shared-secret rotation deferred to v1.1). * @summary WebRTC ICE configuration */ export const getGetConfigWebrtcUrl = () => { return `/config/webrtc` } export const getConfigWebrtc = async ( options?: RequestInit): Promise => { return vezaMutator(getGetConfigWebrtcUrl(), { ...options, method: 'GET' } );} export const getGetConfigWebrtcQueryKey = () => { return [ `/config/webrtc` ] as const; } export const getGetConfigWebrtcQueryOptions = >, TError = unknown>( options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} ) => { const {query: queryOptions, request: requestOptions} = options ?? {}; const queryKey = queryOptions?.queryKey ?? getGetConfigWebrtcQueryKey(); const queryFn: QueryFunction>> = ({ signal }) => getConfigWebrtc({ signal, ...requestOptions }); return { queryKey, queryFn, ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } } export type GetConfigWebrtcQueryResult = NonNullable>> export type GetConfigWebrtcQueryError = unknown export function useGetConfigWebrtc>, TError = unknown>( options: { query:Partial>, TError, TData>> & Pick< DefinedInitialDataOptions< Awaited>, TError, Awaited> > , 'initialData' >, request?: SecondParameter} , queryClient?: QueryClient ): DefinedUseQueryResult & { queryKey: DataTag } export function useGetConfigWebrtc>, TError = unknown>( options?: { query?:Partial>, TError, TData>> & Pick< UndefinedInitialDataOptions< Awaited>, TError, Awaited> > , 'initialData' >, request?: SecondParameter} , queryClient?: QueryClient ): UseQueryResult & { queryKey: DataTag } export function useGetConfigWebrtc>, TError = unknown>( options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} , queryClient?: QueryClient ): UseQueryResult & { queryKey: DataTag } /** * @summary WebRTC ICE configuration */ export function useGetConfigWebrtc>, TError = unknown>( options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} , queryClient?: QueryClient ): UseQueryResult & { queryKey: DataTag } { const queryOptions = getGetConfigWebrtcQueryOptions(options) const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; return { ...query, queryKey: queryOptions.queryKey }; }