@oro-ai/sdk 0.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,481 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import { createClient, createConfig, type OptionsLegacyParser, formDataBodySerializer } from '@hey-api/client-fetch';
4
+ import type { HealthCheckError, HealthCheckResponse, GetCurrentSuiteError, GetCurrentSuiteResponse, GetSuiteProblemsData, GetSuiteProblemsError, GetSuiteProblemsResponse, GetLeaderboardData, GetLeaderboardError, GetLeaderboardResponse, GetTopAgentError, GetTopAgentResponse, GetAgentVersionStatusData, GetAgentVersionStatusError, GetAgentVersionStatusResponse, GetAgentVersionRunsData, GetAgentVersionRunsError, GetAgentVersionRunsResponse, GetAgentVersionProblemsData, GetAgentVersionProblemsError, GetAgentVersionProblemsResponse, GetAgentVersionData, GetAgentVersionError, GetAgentVersionResponse, GetArtifactDownloadUrlData, GetArtifactDownloadUrlError, GetArtifactDownloadUrlResponse, GetEvaluationRunData, GetEvaluationRunError, GetEvaluationRunResponse, GetValidatorsError, GetValidatorsResponse, GetRunningEvaluationsError, GetRunningEvaluationsResponse, GetPendingEvaluationsData, GetPendingEvaluationsError, GetPendingEvaluationsResponse, RequestChallengeData, RequestChallengeError, RequestChallengeResponse, CreateSessionEndpointData, CreateSessionEndpointError, CreateSessionEndpointResponse, LogoutData, LogoutError, LogoutResponse2, SubmitAgentData, SubmitAgentError, SubmitAgentResponse2, ListMinerAgentsError, ListMinerAgentsResponse, ListAgentVersionsData, ListAgentVersionsError, ListAgentVersionsResponse, GetOwnedAgentVersionStatusData, GetOwnedAgentVersionStatusError, GetOwnedAgentVersionStatusResponse, ClaimWorkError, ClaimWorkResponse2, HeartbeatData, HeartbeatError, HeartbeatResponse2, UpdateProgressData, UpdateProgressError, UpdateProgressResponse, PresignUploadData, PresignUploadError, PresignUploadResponse2, CompleteRunData, CompleteRunError, CompleteRunResponse2, BanMinerData, BanMinerError, BanMinerResponse, UnbanMinerData, UnbanMinerError, UnbanMinerResponse, BanValidatorData, BanValidatorError, BanValidatorResponse, UnbanValidatorData, UnbanValidatorError, UnbanValidatorResponse, DiscardAgentVersionData, DiscardAgentVersionError, DiscardAgentVersionResponse, ReinstateAgentVersionData, ReinstateAgentVersionError, ReinstateAgentVersionResponse, SetTopAgentData, SetTopAgentError, SetTopAgentResponse, InvalidateEvaluationRunData, InvalidateEvaluationRunError, InvalidateEvaluationRunResponse, ReevaluateAgentVersionData, ReevaluateAgentVersionError, ReevaluateAgentVersionResponse, CancelAgentVersionData, CancelAgentVersionError, CancelAgentVersionResponse, CreateSuiteData, CreateSuiteError, CreateSuiteResponse2, ActivateSuiteData, ActivateSuiteError, ActivateSuiteResponse2, GetAuditEventsData, GetAuditEventsError, GetAuditEventsResponse, GetReaperStatsError, GetReaperStatsResponse } from './types.gen';
5
+
6
+ export const client = createClient(createConfig());
7
+
8
+ /**
9
+ * Health Check
10
+ * Health check endpoint (no auth required).
11
+ */
12
+ export const healthCheck = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
13
+ return (options?.client ?? client).get<HealthCheckResponse, HealthCheckError, ThrowOnError>({
14
+ ...options,
15
+ url: '/health'
16
+ });
17
+ };
18
+
19
+ /**
20
+ * Get current active suite
21
+ * Fetch the currently active problem suite.
22
+ */
23
+ export const getCurrentSuite = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
24
+ return (options?.client ?? client).get<GetCurrentSuiteResponse, GetCurrentSuiteError, ThrowOnError>({
25
+ ...options,
26
+ url: '/v1/public/suites/current'
27
+ });
28
+ };
29
+
30
+ /**
31
+ * Get suite problems
32
+ * Get the list of problems for a specific suite.
33
+ */
34
+ export const getSuiteProblems = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetSuiteProblemsData, ThrowOnError>) => {
35
+ return (options?.client ?? client).get<GetSuiteProblemsResponse, GetSuiteProblemsError, ThrowOnError>({
36
+ ...options,
37
+ url: '/v1/public/suites/{suite_id}/problems'
38
+ });
39
+ };
40
+
41
+ /**
42
+ * Get leaderboard
43
+ * Get the eligible agent leaderboard for a suite.
44
+ */
45
+ export const getLeaderboard = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetLeaderboardData, ThrowOnError>) => {
46
+ return (options?.client ?? client).get<GetLeaderboardResponse, GetLeaderboardError, ThrowOnError>({
47
+ ...options,
48
+ url: '/v1/public/leaderboard'
49
+ });
50
+ };
51
+
52
+ /**
53
+ * Get top agent for emissions
54
+ * Get the canonical top miner for emissions calculation.
55
+ */
56
+ export const getTopAgent = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
57
+ return (options?.client ?? client).get<GetTopAgentResponse, GetTopAgentError, ThrowOnError>({
58
+ ...options,
59
+ url: '/v1/public/top'
60
+ });
61
+ };
62
+
63
+ /**
64
+ * Get agent version status
65
+ * Get live status and counters for an agent version.
66
+ */
67
+ export const getAgentVersionStatus = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAgentVersionStatusData, ThrowOnError>) => {
68
+ return (options?.client ?? client).get<GetAgentVersionStatusResponse, GetAgentVersionStatusError, ThrowOnError>({
69
+ ...options,
70
+ url: '/v1/public/agent-versions/{agent_version_id}/status'
71
+ });
72
+ };
73
+
74
+ /**
75
+ * Get agent version runs
76
+ * Get evaluation runs for an agent version.
77
+ */
78
+ export const getAgentVersionRuns = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAgentVersionRunsData, ThrowOnError>) => {
79
+ return (options?.client ?? client).get<GetAgentVersionRunsResponse, GetAgentVersionRunsError, ThrowOnError>({
80
+ ...options,
81
+ url: '/v1/public/agent-versions/{agent_version_id}/runs'
82
+ });
83
+ };
84
+
85
+ /**
86
+ * Get agent version problem progress
87
+ * Get per-problem progress matrix across validators.
88
+ */
89
+ export const getAgentVersionProblems = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAgentVersionProblemsData, ThrowOnError>) => {
90
+ return (options?.client ?? client).get<GetAgentVersionProblemsResponse, GetAgentVersionProblemsError, ThrowOnError>({
91
+ ...options,
92
+ url: '/v1/public/agent-versions/{agent_version_id}/problems'
93
+ });
94
+ };
95
+
96
+ /**
97
+ * Get agent version details
98
+ * Get released public details for an agent version.
99
+ */
100
+ export const getAgentVersion = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAgentVersionData, ThrowOnError>) => {
101
+ return (options?.client ?? client).get<GetAgentVersionResponse, GetAgentVersionError, ThrowOnError>({
102
+ ...options,
103
+ url: '/v1/public/agent-versions/{agent_version_id}'
104
+ });
105
+ };
106
+
107
+ /**
108
+ * Get artifact download URL
109
+ * Get a presigned URL to download released artifacts.
110
+ */
111
+ export const getArtifactDownloadUrl = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetArtifactDownloadUrlData, ThrowOnError>) => {
112
+ return (options?.client ?? client).post<GetArtifactDownloadUrlResponse, GetArtifactDownloadUrlError, ThrowOnError>({
113
+ ...options,
114
+ url: '/v1/public/artifacts/download-url'
115
+ });
116
+ };
117
+
118
+ /**
119
+ * Get evaluation run details
120
+ * Get detailed information about a specific evaluation run.
121
+ */
122
+ export const getEvaluationRun = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetEvaluationRunData, ThrowOnError>) => {
123
+ return (options?.client ?? client).get<GetEvaluationRunResponse, GetEvaluationRunError, ThrowOnError>({
124
+ ...options,
125
+ url: '/v1/public/evaluation-runs/{eval_run_id}'
126
+ });
127
+ };
128
+
129
+ /**
130
+ * Get list of validators
131
+ * Get all non-banned validators with their current status.
132
+ */
133
+ export const getValidators = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
134
+ return (options?.client ?? client).get<GetValidatorsResponse, GetValidatorsError, ThrowOnError>({
135
+ ...options,
136
+ url: '/v1/public/validators'
137
+ });
138
+ };
139
+
140
+ /**
141
+ * Get running evaluations
142
+ * Get all currently running or claimed evaluations.
143
+ */
144
+ export const getRunningEvaluations = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
145
+ return (options?.client ?? client).get<GetRunningEvaluationsResponse, GetRunningEvaluationsError, ThrowOnError>({
146
+ ...options,
147
+ url: '/v1/public/evaluations/running'
148
+ });
149
+ };
150
+
151
+ /**
152
+ * Get pending evaluations
153
+ * Get all open work items awaiting validator evaluations, with queue summary.
154
+ */
155
+ export const getPendingEvaluations = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetPendingEvaluationsData, ThrowOnError>) => {
156
+ return (options?.client ?? client).get<GetPendingEvaluationsResponse, GetPendingEvaluationsError, ThrowOnError>({
157
+ ...options,
158
+ url: '/v1/public/evaluations/pending'
159
+ });
160
+ };
161
+
162
+ /**
163
+ * Request Challenge
164
+ * Request a challenge for wallet authentication.
165
+ *
166
+ * The challenge must be signed by the wallet and submitted to /session
167
+ * within 60 seconds.
168
+ *
169
+ * Rate limited to 10 requests per minute per IP to prevent abuse.
170
+ */
171
+ export const requestChallenge = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RequestChallengeData, ThrowOnError>) => {
172
+ return (options?.client ?? client).post<RequestChallengeResponse, RequestChallengeError, ThrowOnError>({
173
+ ...options,
174
+ url: '/v1/auth/challenge'
175
+ });
176
+ };
177
+
178
+ /**
179
+ * Create Session Endpoint
180
+ * Create a session by verifying a signed challenge.
181
+ *
182
+ * The challenge must have been requested within the last 60 seconds
183
+ * and the signature must be valid for the challenge message.
184
+ *
185
+ * Rate limited to 5 requests per minute per IP to prevent brute force.
186
+ */
187
+ export const createSessionEndpoint = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateSessionEndpointData, ThrowOnError>) => {
188
+ return (options?.client ?? client).post<CreateSessionEndpointResponse, CreateSessionEndpointError, ThrowOnError>({
189
+ ...options,
190
+ url: '/v1/auth/session'
191
+ });
192
+ };
193
+
194
+ /**
195
+ * Logout
196
+ * Logout and invalidate the current session.
197
+ */
198
+ export const logout = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<LogoutData, ThrowOnError>) => {
199
+ return (options?.client ?? client).post<LogoutResponse2, LogoutError, ThrowOnError>({
200
+ ...options,
201
+ url: '/v1/auth/logout'
202
+ });
203
+ };
204
+
205
+ /**
206
+ * Submit agent
207
+ * Submit an agent file for evaluation. Creates new agent if needed.
208
+ */
209
+ export const submitAgent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SubmitAgentData, ThrowOnError>) => {
210
+ return (options?.client ?? client).post<SubmitAgentResponse2, SubmitAgentError, ThrowOnError>({
211
+ ...options,
212
+ ...formDataBodySerializer,
213
+ headers: {
214
+ 'Content-Type': null,
215
+ ...options?.headers
216
+ },
217
+ url: '/v1/miner/submit'
218
+ });
219
+ };
220
+
221
+ /**
222
+ * List miner's agents
223
+ * List all agents owned by the authenticated miner, with cooldown status.
224
+ */
225
+ export const listMinerAgents = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
226
+ return (options?.client ?? client).get<ListMinerAgentsResponse, ListMinerAgentsError, ThrowOnError>({
227
+ ...options,
228
+ url: '/v1/miner/agents'
229
+ });
230
+ };
231
+
232
+ /**
233
+ * List agent versions
234
+ * List all versions of a specific agent owned by the miner.
235
+ */
236
+ export const listAgentVersions = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListAgentVersionsData, ThrowOnError>) => {
237
+ return (options?.client ?? client).get<ListAgentVersionsResponse, ListAgentVersionsError, ThrowOnError>({
238
+ ...options,
239
+ url: '/v1/miner/agents/{agent_id}/versions'
240
+ });
241
+ };
242
+
243
+ /**
244
+ * Get agent version status
245
+ * Get detailed status of a specific agent version owned by the miner.
246
+ */
247
+ export const getOwnedAgentVersionStatus = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetOwnedAgentVersionStatusData, ThrowOnError>) => {
248
+ return (options?.client ?? client).get<GetOwnedAgentVersionStatusResponse, GetOwnedAgentVersionStatusError, ThrowOnError>({
249
+ ...options,
250
+ url: '/v1/miner/agent-versions/{agent_version_id}'
251
+ });
252
+ };
253
+
254
+ /**
255
+ * Claim evaluation work
256
+ * FIFO claim of next available evaluation work item.
257
+ */
258
+ export const claimWork = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
259
+ return (options?.client ?? client).post<ClaimWorkResponse2, ClaimWorkError, ThrowOnError>({
260
+ ...options,
261
+ url: '/v1/validator/work/claim'
262
+ });
263
+ };
264
+
265
+ /**
266
+ * Extend lease
267
+ * Heartbeat to extend lease and mark run as RUNNING.
268
+ */
269
+ export const heartbeat = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HeartbeatData, ThrowOnError>) => {
270
+ return (options?.client ?? client).post<HeartbeatResponse2, HeartbeatError, ThrowOnError>({
271
+ ...options,
272
+ url: '/v1/validator/evaluation-runs/{eval_run_id}/heartbeat'
273
+ });
274
+ };
275
+
276
+ /**
277
+ * Update progress
278
+ * Report per-problem progress during evaluation.
279
+ */
280
+ export const updateProgress = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateProgressData, ThrowOnError>) => {
281
+ return (options?.client ?? client).post<UpdateProgressResponse, UpdateProgressError, ThrowOnError>({
282
+ ...options,
283
+ url: '/v1/validator/evaluation-runs/{eval_run_id}/progress'
284
+ });
285
+ };
286
+
287
+ /**
288
+ * Get upload URL
289
+ * Get a presigned URL for uploading per-problem evaluation logs.
290
+ */
291
+ export const presignUpload = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<PresignUploadData, ThrowOnError>) => {
292
+ return (options?.client ?? client).post<PresignUploadResponse2, PresignUploadError, ThrowOnError>({
293
+ ...options,
294
+ url: '/v1/validator/uploads/presign'
295
+ });
296
+ };
297
+
298
+ /**
299
+ * Complete evaluation run
300
+ * Finalize an evaluation run with terminal status and score.
301
+ */
302
+ export const completeRun = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CompleteRunData, ThrowOnError>) => {
303
+ return (options?.client ?? client).post<CompleteRunResponse2, CompleteRunError, ThrowOnError>({
304
+ ...options,
305
+ url: '/v1/validator/evaluation-runs/{eval_run_id}/complete'
306
+ });
307
+ };
308
+
309
+ /**
310
+ * Ban a miner
311
+ * Ban a miner from submitting agents.
312
+ */
313
+ export const banMiner = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<BanMinerData, ThrowOnError>) => {
314
+ return (options?.client ?? client).post<BanMinerResponse, BanMinerError, ThrowOnError>({
315
+ ...options,
316
+ url: '/v1/admin/miners/{miner_hotkey}/ban'
317
+ });
318
+ };
319
+
320
+ /**
321
+ * Unban a miner
322
+ * Unban a miner, allowing them to submit agents again.
323
+ */
324
+ export const unbanMiner = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UnbanMinerData, ThrowOnError>) => {
325
+ return (options?.client ?? client).post<UnbanMinerResponse, UnbanMinerError, ThrowOnError>({
326
+ ...options,
327
+ url: '/v1/admin/miners/{miner_hotkey}/unban'
328
+ });
329
+ };
330
+
331
+ /**
332
+ * Ban a validator
333
+ * Ban a validator from claiming work.
334
+ */
335
+ export const banValidator = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<BanValidatorData, ThrowOnError>) => {
336
+ return (options?.client ?? client).post<BanValidatorResponse, BanValidatorError, ThrowOnError>({
337
+ ...options,
338
+ url: '/v1/admin/validators/{validator_hotkey}/ban'
339
+ });
340
+ };
341
+
342
+ /**
343
+ * Unban a validator
344
+ * Unban a validator, allowing them to claim work again.
345
+ */
346
+ export const unbanValidator = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UnbanValidatorData, ThrowOnError>) => {
347
+ return (options?.client ?? client).post<UnbanValidatorResponse, UnbanValidatorError, ThrowOnError>({
348
+ ...options,
349
+ url: '/v1/admin/validators/{validator_hotkey}/unban'
350
+ });
351
+ };
352
+
353
+ /**
354
+ * Discard an agent version from leaderboard
355
+ * Discard an agent version from the leaderboard (reversible tombstone).
356
+ */
357
+ export const discardAgentVersion = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DiscardAgentVersionData, ThrowOnError>) => {
358
+ return (options?.client ?? client).post<DiscardAgentVersionResponse, DiscardAgentVersionError, ThrowOnError>({
359
+ ...options,
360
+ url: '/v1/admin/agent-versions/{agent_version_id}/discard'
361
+ });
362
+ };
363
+
364
+ /**
365
+ * Reinstate a discarded agent version
366
+ * Reinstate a previously discarded agent version.
367
+ */
368
+ export const reinstateAgentVersion = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ReinstateAgentVersionData, ThrowOnError>) => {
369
+ return (options?.client ?? client).post<ReinstateAgentVersionResponse, ReinstateAgentVersionError, ThrowOnError>({
370
+ ...options,
371
+ url: '/v1/admin/agent-versions/{agent_version_id}/reinstate'
372
+ });
373
+ };
374
+
375
+ /**
376
+ * Set an agent version as the top agent for emissions
377
+ * Designate an agent version as the top agent for emissions.
378
+ *
379
+ * The top agent is the one that receives emissions. Setting a new top agent
380
+ * automatically marks the previous top agent as was_top=True.
381
+ *
382
+ * Requirements:
383
+ * - Agent version must exist and have an aggregate for the suite
384
+ * - Only one agent can be is_current_top=True per suite (enforced by DB index)
385
+ */
386
+ export const setTopAgent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SetTopAgentData, ThrowOnError>) => {
387
+ return (options?.client ?? client).post<SetTopAgentResponse, SetTopAgentError, ThrowOnError>({
388
+ ...options,
389
+ url: '/v1/admin/agent-versions/{agent_version_id}/set-top'
390
+ });
391
+ };
392
+
393
+ /**
394
+ * Invalidate an evaluation run
395
+ * Invalidate an evaluation run (irreversible).
396
+ *
397
+ * Marks the run as excluded from scoring and adjusts the work item's
398
+ * included_success_count. Reopens the work item to allow validators
399
+ * to claim replacement work.
400
+ */
401
+ export const invalidateEvaluationRun = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<InvalidateEvaluationRunData, ThrowOnError>) => {
402
+ return (options?.client ?? client).post<InvalidateEvaluationRunResponse, InvalidateEvaluationRunError, ThrowOnError>({
403
+ ...options,
404
+ url: '/v1/admin/evaluation-runs/{eval_run_id}/invalidate'
405
+ });
406
+ };
407
+
408
+ /**
409
+ * Re-evaluate an agent version
410
+ * Create a new work item for an agent version to be re-evaluated.
411
+ */
412
+ export const reevaluateAgentVersion = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ReevaluateAgentVersionData, ThrowOnError>) => {
413
+ return (options?.client ?? client).post<ReevaluateAgentVersionResponse, ReevaluateAgentVersionError, ThrowOnError>({
414
+ ...options,
415
+ url: '/v1/admin/agent-versions/{agent_version_id}/reevaluate'
416
+ });
417
+ };
418
+
419
+ /**
420
+ * Cancel evaluation of an agent version
421
+ * Cancel active evaluation runs for an agent version.
422
+ */
423
+ export const cancelAgentVersion = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CancelAgentVersionData, ThrowOnError>) => {
424
+ return (options?.client ?? client).post<CancelAgentVersionResponse, CancelAgentVersionError, ThrowOnError>({
425
+ ...options,
426
+ url: '/v1/admin/agent-versions/{agent_version_id}/cancel'
427
+ });
428
+ };
429
+
430
+ /**
431
+ * Create a new problem suite
432
+ * Create a new problem suite version.
433
+ *
434
+ * Downloads and parses the problem suite JSON from S3, then creates
435
+ * Problem records for each problem in the suite.
436
+ */
437
+ export const createSuite = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateSuiteData, ThrowOnError>) => {
438
+ return (options?.client ?? client).post<CreateSuiteResponse2, CreateSuiteError, ThrowOnError>({
439
+ ...options,
440
+ url: '/v1/admin/suites'
441
+ });
442
+ };
443
+
444
+ /**
445
+ * Activate a problem suite
446
+ * Activate a suite, making it the current active suite (deactivates others).
447
+ */
448
+ export const activateSuite = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ActivateSuiteData, ThrowOnError>) => {
449
+ return (options?.client ?? client).post<ActivateSuiteResponse2, ActivateSuiteError, ThrowOnError>({
450
+ ...options,
451
+ url: '/v1/admin/suites/{suite_id}/activate'
452
+ });
453
+ };
454
+
455
+ /**
456
+ * Get audit events
457
+ * Retrieve audit events with optional filtering and pagination.
458
+ */
459
+ export const getAuditEvents = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetAuditEventsData, ThrowOnError>) => {
460
+ return (options?.client ?? client).get<GetAuditEventsResponse, GetAuditEventsError, ThrowOnError>({
461
+ ...options,
462
+ url: '/v1/admin/audit-events'
463
+ });
464
+ };
465
+
466
+ /**
467
+ * Get reaper service statistics
468
+ * Get statistics about the background reaper service.
469
+ *
470
+ * The reaper service runs periodically to clean up orphaned evaluation runs
471
+ * where validators have stopped reporting (crashed or disconnected).
472
+ *
473
+ * Stats are read from Redis (persisted by the active reaper instance) to ensure
474
+ * consistent visibility across all replicas.
475
+ */
476
+ export const getReaperStats = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
477
+ return (options?.client ?? client).get<GetReaperStatsResponse, GetReaperStatsError, ThrowOnError>({
478
+ ...options,
479
+ url: '/v1/admin/reaper/stats'
480
+ });
481
+ };