Spaces:
Sleeping
Sleeping
// This file is auto-generated by @hey-api/openapi-ts | |
import { createClient, createConfig, type Options } from '@hey-api/client-fetch'; | |
import type { RootGetError, RootGetResponse, HealthCheckHealthGetError, HealthCheckHealthGetResponse, ListSessionsSessionsGetError, ListSessionsSessionsGetResponse, CreateSessionSessionsPostData, CreateSessionSessionsPostError, CreateSessionSessionsPostResponse, StartInferenceSessionsSessionIdStartPostData, StartInferenceSessionsSessionIdStartPostError, StartInferenceSessionsSessionIdStartPostResponse, StopInferenceSessionsSessionIdStopPostData, StopInferenceSessionsSessionIdStopPostError, StopInferenceSessionsSessionIdStopPostResponse, RestartInferenceSessionsSessionIdRestartPostData, RestartInferenceSessionsSessionIdRestartPostError, RestartInferenceSessionsSessionIdRestartPostResponse, DeleteSessionSessionsSessionIdDeleteData, DeleteSessionSessionsSessionIdDeleteError, DeleteSessionSessionsSessionIdDeleteResponse } from './types.gen'; | |
export const client = createClient(createConfig()); | |
/** | |
* Root | |
* Health check endpoint. | |
*/ | |
export const rootGet = <ThrowOnError extends boolean = false>(options?: Options<unknown, ThrowOnError>) => { | |
return (options?.client ?? client).get<RootGetResponse, RootGetError, ThrowOnError>({ | |
...options, | |
url: '/' | |
}); | |
}; | |
/** | |
* Health Check | |
* Detailed health check. | |
*/ | |
export const healthCheckHealthGet = <ThrowOnError extends boolean = false>(options?: Options<unknown, ThrowOnError>) => { | |
return (options?.client ?? client).get<HealthCheckHealthGetResponse, HealthCheckHealthGetError, ThrowOnError>({ | |
...options, | |
url: '/health' | |
}); | |
}; | |
/** | |
* List Sessions | |
* List all sessions. | |
*/ | |
export const listSessionsSessionsGet = <ThrowOnError extends boolean = false>(options?: Options<unknown, ThrowOnError>) => { | |
return (options?.client ?? client).get<ListSessionsSessionsGetResponse, ListSessionsSessionsGetError, ThrowOnError>({ | |
...options, | |
url: '/sessions' | |
}); | |
}; | |
/** | |
* Create Session | |
* Create a new inference session. | |
* | |
* If workspace_id is provided, all rooms will be created in that workspace. | |
* If workspace_id is not provided, a new workspace will be generated automatically. | |
* All rooms for a session (cameras + joints) are always created in the same workspace. | |
*/ | |
export const createSessionSessionsPost = <ThrowOnError extends boolean = false>(options: Options<CreateSessionSessionsPostData, ThrowOnError>) => { | |
return (options?.client ?? client).post<CreateSessionSessionsPostResponse, CreateSessionSessionsPostError, ThrowOnError>({ | |
...options, | |
url: '/sessions' | |
}); | |
}; | |
/** | |
* Start Inference | |
* Start inference for a session. | |
*/ | |
export const startInferenceSessionsSessionIdStartPost = <ThrowOnError extends boolean = false>(options: Options<StartInferenceSessionsSessionIdStartPostData, ThrowOnError>) => { | |
return (options?.client ?? client).post<StartInferenceSessionsSessionIdStartPostResponse, StartInferenceSessionsSessionIdStartPostError, ThrowOnError>({ | |
...options, | |
url: '/sessions/{session_id}/start' | |
}); | |
}; | |
/** | |
* Stop Inference | |
* Stop inference for a session. | |
*/ | |
export const stopInferenceSessionsSessionIdStopPost = <ThrowOnError extends boolean = false>(options: Options<StopInferenceSessionsSessionIdStopPostData, ThrowOnError>) => { | |
return (options?.client ?? client).post<StopInferenceSessionsSessionIdStopPostResponse, StopInferenceSessionsSessionIdStopPostError, ThrowOnError>({ | |
...options, | |
url: '/sessions/{session_id}/stop' | |
}); | |
}; | |
/** | |
* Restart Inference | |
* Restart inference for a session. | |
*/ | |
export const restartInferenceSessionsSessionIdRestartPost = <ThrowOnError extends boolean = false>(options: Options<RestartInferenceSessionsSessionIdRestartPostData, ThrowOnError>) => { | |
return (options?.client ?? client).post<RestartInferenceSessionsSessionIdRestartPostResponse, RestartInferenceSessionsSessionIdRestartPostError, ThrowOnError>({ | |
...options, | |
url: '/sessions/{session_id}/restart' | |
}); | |
}; | |
/** | |
* Delete Session | |
* Delete a session. | |
*/ | |
export const deleteSessionSessionsSessionIdDelete = <ThrowOnError extends boolean = false>(options: Options<DeleteSessionSessionsSessionIdDeleteData, ThrowOnError>) => { | |
return (options?.client ?? client).delete<DeleteSessionSessionsSessionIdDeleteResponse, DeleteSessionSessionsSessionIdDeleteError, ThrowOnError>({ | |
...options, | |
url: '/sessions/{session_id}' | |
}); | |
}; |