Files
Temp_MSSPLASHPage/src/SplashPage.Web.Ui/src/api/hooks/useGetApiServicesAppSplashlocationscanningGetstatistics.ts

60 lines
3.2 KiB
TypeScript

/**
* Generated by Kubb (https://kubb.dev/).
* Do not edit manually.
*/
import fetch from "@/lib/api-client/abp-axios";
import type { RequestConfig, ResponseErrorConfig } from "@/lib/api-client/abp-axios";
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryResult } from "@tanstack/react-query";
import type { GetApiServicesAppSplashlocationscanningGetstatisticsQueryResponse } from "../types/GetApiServicesAppSplashlocationscanningGetstatistics.ts";
import { queryOptions, useQuery } from "@tanstack/react-query";
export const getApiServicesAppSplashlocationscanningGetstatisticsQueryKey = () => [{ url: '/api/services/app/SplashLocationScanning/GetStatistics' }] as const
export type GetApiServicesAppSplashlocationscanningGetstatisticsQueryKey = ReturnType<typeof getApiServicesAppSplashlocationscanningGetstatisticsQueryKey>
/**
* {@link /api/services/app/SplashLocationScanning/GetStatistics}
*/
export async function getApiServicesAppSplashlocationscanningGetstatistics(config: Partial<RequestConfig> & { client?: typeof fetch } = {}) {
const { client: request = fetch, ...requestConfig } = config
const res = await request<GetApiServicesAppSplashlocationscanningGetstatisticsQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : "GET", url : `/api/services/app/SplashLocationScanning/GetStatistics`, ... requestConfig })
return res.data
}
export function getApiServicesAppSplashlocationscanningGetstatisticsQueryOptions(config: Partial<RequestConfig> & { client?: typeof fetch } = {}) {
const queryKey = getApiServicesAppSplashlocationscanningGetstatisticsQueryKey()
return queryOptions<GetApiServicesAppSplashlocationscanningGetstatisticsQueryResponse, ResponseErrorConfig<Error>, GetApiServicesAppSplashlocationscanningGetstatisticsQueryResponse, typeof queryKey>({
queryKey,
queryFn: async ({ signal }) => {
config.signal = signal
return getApiServicesAppSplashlocationscanningGetstatistics(config)
},
})
}
/**
* {@link /api/services/app/SplashLocationScanning/GetStatistics}
*/
export function useGetApiServicesAppSplashlocationscanningGetstatistics<TData = GetApiServicesAppSplashlocationscanningGetstatisticsQueryResponse, TQueryData = GetApiServicesAppSplashlocationscanningGetstatisticsQueryResponse, TQueryKey extends QueryKey = GetApiServicesAppSplashlocationscanningGetstatisticsQueryKey>(options:
{
query?: Partial<QueryObserverOptions<GetApiServicesAppSplashlocationscanningGetstatisticsQueryResponse, ResponseErrorConfig<Error>, TData, TQueryData, TQueryKey>> & { client?: QueryClient },
client?: Partial<RequestConfig> & { client?: typeof fetch }
}
= {}) {
const { query: queryConfig = {}, client: config = {} } = options ?? {}
const { client: queryClient, ...queryOptions } = queryConfig
const queryKey = queryOptions?.queryKey ?? getApiServicesAppSplashlocationscanningGetstatisticsQueryKey()
const query = useQuery({
...getApiServicesAppSplashlocationscanningGetstatisticsQueryOptions(config),
queryKey,
...queryOptions
} as unknown as QueryObserverOptions, queryClient) as UseQueryResult<TData, ResponseErrorConfig<Error>> & { queryKey: TQueryKey }
query.queryKey = queryKey as TQueryKey
return query
}