File size: 7,864 Bytes
63ed3a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
// 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, ListPoliciesPoliciesGetError, ListPoliciesPoliciesGetResponse, ListSessionsSessionsGetError, ListSessionsSessionsGetResponse, CreateSessionSessionsPostData, CreateSessionSessionsPostError, CreateSessionSessionsPostResponse, GetSessionStatusSessionsSessionIdGetData, GetSessionStatusSessionsSessionIdGetError, GetSessionStatusSessionsSessionIdGetResponse, DeleteSessionSessionsSessionIdDeleteData, DeleteSessionSessionsSessionIdDeleteError, DeleteSessionSessionsSessionIdDeleteResponse, StartInferenceSessionsSessionIdStartPostData, StartInferenceSessionsSessionIdStartPostError, StartInferenceSessionsSessionIdStartPostResponse, StopInferenceSessionsSessionIdStopPostData, StopInferenceSessionsSessionIdStopPostError, StopInferenceSessionsSessionIdStopPostResponse, RestartInferenceSessionsSessionIdRestartPostData, RestartInferenceSessionsSessionIdRestartPostError, RestartInferenceSessionsSessionIdRestartPostResponse, GetSystemInfoDebugSystemGetError, GetSystemInfoDebugSystemGetResponse, GetRecentLogsDebugLogsGetError, GetRecentLogsDebugLogsGetResponse, DebugResetSessionDebugSessionsSessionIdResetPostData, DebugResetSessionDebugSessionsSessionIdResetPostError, DebugResetSessionDebugSessionsSessionIdResetPostResponse, GetSessionQueueInfoDebugSessionsSessionIdQueueGetData, GetSessionQueueInfoDebugSessionsSessionIdQueueGetError, GetSessionQueueInfoDebugSessionsSessionIdQueueGetResponse } 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 Policies
 * List supported policy types.
 */
export const listPoliciesPoliciesGet = <ThrowOnError extends boolean = false>(options?: Options<unknown, ThrowOnError>) => {
    return (options?.client ?? client).get<ListPoliciesPoliciesGetResponse, ListPoliciesPoliciesGetError, ThrowOnError>({
        ...options,
        url: '/policies'
    });
};

/**
 * 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'
    });
};

/**
 * Get Session Status
 * Get status of a specific session.
 */
export const getSessionStatusSessionsSessionIdGet = <ThrowOnError extends boolean = false>(options: Options<GetSessionStatusSessionsSessionIdGetData, ThrowOnError>) => {
    return (options?.client ?? client).get<GetSessionStatusSessionsSessionIdGetResponse, GetSessionStatusSessionsSessionIdGetError, ThrowOnError>({
        ...options,
        url: '/sessions/{session_id}'
    });
};

/**
 * 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}'
    });
};

/**
 * 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'
    });
};

/**
 * Get System Info
 * Get system information for debugging.
 */
export const getSystemInfoDebugSystemGet = <ThrowOnError extends boolean = false>(options?: Options<unknown, ThrowOnError>) => {
    return (options?.client ?? client).get<GetSystemInfoDebugSystemGetResponse, GetSystemInfoDebugSystemGetError, ThrowOnError>({
        ...options,
        url: '/debug/system'
    });
};

/**
 * Get Recent Logs
 * Get recent log entries for debugging.
 */
export const getRecentLogsDebugLogsGet = <ThrowOnError extends boolean = false>(options?: Options<unknown, ThrowOnError>) => {
    return (options?.client ?? client).get<GetRecentLogsDebugLogsGetResponse, GetRecentLogsDebugLogsGetError, ThrowOnError>({
        ...options,
        url: '/debug/logs'
    });
};

/**
 * Debug Reset Session
 * Reset a session's internal state for debugging.
 */
export const debugResetSessionDebugSessionsSessionIdResetPost = <ThrowOnError extends boolean = false>(options: Options<DebugResetSessionDebugSessionsSessionIdResetPostData, ThrowOnError>) => {
    return (options?.client ?? client).post<DebugResetSessionDebugSessionsSessionIdResetPostResponse, DebugResetSessionDebugSessionsSessionIdResetPostError, ThrowOnError>({
        ...options,
        url: '/debug/sessions/{session_id}/reset'
    });
};

/**
 * Get Session Queue Info
 * Get detailed information about a session's action queue.
 */
export const getSessionQueueInfoDebugSessionsSessionIdQueueGet = <ThrowOnError extends boolean = false>(options: Options<GetSessionQueueInfoDebugSessionsSessionIdQueueGetData, ThrowOnError>) => {
    return (options?.client ?? client).get<GetSessionQueueInfoDebugSessionsSessionIdQueueGetResponse, GetSessionQueueInfoDebugSessionsSessionIdQueueGetError, ThrowOnError>({
        ...options,
        url: '/debug/sessions/{session_id}/queue'
    });
};