// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../resource'; import { isRequestOptions } from '../core'; import * as Core from '../core'; import * as RootAPI from './root'; export class Root extends APIResource { /** * Say hello! */ hello(params?: RootHelloParams, options?: Core.RequestOptions): Core.APIPromise; hello(options?: Core.RequestOptions): Core.APIPromise; hello( params: RootHelloParams | Core.RequestOptions = {}, options?: Core.RequestOptions, ): Core.APIPromise { if (isRequestOptions(params)) { return this.hello({}, params); } const { 'x-prefect-api-version': xPrefectAPIVersion } = params; return this._client.get('/api/hello', { ...options, headers: { ...(xPrefectAPIVersion != null ? { 'x-prefect-api-version': xPrefectAPIVersion } : undefined), ...options?.headers, }, }); } /** * Health Check */ retrieveHealth(options?: Core.RequestOptions): Core.APIPromise { return this._client.get('/api/health', options); } /** * Perform Readiness Check */ retrieveReady(params?: RootRetrieveReadyParams, options?: Core.RequestOptions): Core.APIPromise; retrieveReady(options?: Core.RequestOptions): Core.APIPromise; retrieveReady( params: RootRetrieveReadyParams | Core.RequestOptions = {}, options?: Core.RequestOptions, ): Core.APIPromise { if (isRequestOptions(params)) { return this.retrieveReady({}, params); } const { 'x-prefect-api-version': xPrefectAPIVersion } = params; return this._client.get('/api/ready', { ...options, headers: { ...(xPrefectAPIVersion != null ? { 'x-prefect-api-version': xPrefectAPIVersion } : undefined), ...options?.headers, }, }); } /** * Server Version */ version(options?: Core.RequestOptions): Core.APIPromise { return this._client.get('/api/version', options); } } export type RootHelloResponse = unknown; export type RootRetrieveHealthResponse = unknown; export type RootRetrieveReadyResponse = unknown; export type RootVersionResponse = unknown; export interface RootHelloParams { 'x-prefect-api-version'?: string; } export interface RootRetrieveReadyParams { 'x-prefect-api-version'?: string; } export namespace Root { export import RootHelloResponse = RootAPI.RootHelloResponse; export import RootRetrieveHealthResponse = RootAPI.RootRetrieveHealthResponse; export import RootRetrieveReadyResponse = RootAPI.RootRetrieveReadyResponse; export import RootVersionResponse = RootAPI.RootVersionResponse; export import RootHelloParams = RootAPI.RootHelloParams; export import RootRetrieveReadyParams = RootAPI.RootRetrieveReadyParams; }