| import type { QueryKey, UseQueryOptions, UseQueryResult } from "@tanstack/react-query"; |
| import type { HealthStatus } from "./api.schemas"; |
| import { customFetch } from "../custom-fetch"; |
| import type { ErrorType } from "../custom-fetch"; |
| type AwaitedInput<T> = PromiseLike<T> | T; |
| type Awaited<O> = O extends AwaitedInput<infer T> ? T : never; |
| type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1]; |
| |
| |
| |
| |
| export declare const getHealthCheckUrl: () => string; |
| export declare const healthCheck: (options?: RequestInit) => Promise<HealthStatus>; |
| export declare const getHealthCheckQueryKey: () => readonly ["/api/healthz"]; |
| export declare const getHealthCheckQueryOptions: <TData = Awaited<ReturnType<typeof healthCheck>>, TError = ErrorType<unknown>>(options?: { |
| query?: UseQueryOptions<Awaited<ReturnType<typeof healthCheck>>, TError, TData>; |
| request?: SecondParameter<typeof customFetch>; |
| }) => UseQueryOptions<Awaited<ReturnType<typeof healthCheck>>, TError, TData> & { |
| queryKey: QueryKey; |
| }; |
| export type HealthCheckQueryResult = NonNullable<Awaited<ReturnType<typeof healthCheck>>>; |
| export type HealthCheckQueryError = ErrorType<unknown>; |
| |
| |
| |
| export declare function useHealthCheck<TData = Awaited<ReturnType<typeof healthCheck>>, TError = ErrorType<unknown>>(options?: { |
| query?: UseQueryOptions<Awaited<ReturnType<typeof healthCheck>>, TError, TData>; |
| request?: SecondParameter<typeof customFetch>; |
| }): UseQueryResult<TData, TError> & { |
| queryKey: QueryKey; |
| }; |
| export {}; |
| |