@eigenpal/sdk 0.9.1 → 0.10.0
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.
- package/CHANGELOG.md +4 -4
- package/README.md +8 -8
- package/package.json +1 -1
- package/src/generated/index.ts +2 -2
- package/src/generated/sdk.gen.ts +74 -63
- package/src/generated/types.gen.ts +451 -239
- package/src/index.ts +7 -7
- package/src/resources/automations.ts +29 -0
- package/src/resources/runs.ts +36 -36
- package/src/telemetry.ts +1 -1
package/src/index.ts
CHANGED
|
@@ -67,15 +67,15 @@ export type {
|
|
|
67
67
|
RunUsage,
|
|
68
68
|
RunUsageResponse,
|
|
69
69
|
RunsCancelResponse,
|
|
70
|
-
RunsFeedbackClearResponse,
|
|
71
|
-
RunsFeedbackExpectedCreateResponse,
|
|
72
|
-
RunsFeedbackExpectedFileDeleteResponse,
|
|
73
|
-
RunsFeedbackExpectedFileUpdateResponse,
|
|
74
|
-
RunsFeedbackExpectedGetResponse,
|
|
75
|
-
RunsFeedbackGetResponse,
|
|
76
|
-
RunsFeedbackUpdateResponse,
|
|
77
70
|
RunsGetResponse,
|
|
78
71
|
RunsListResponse,
|
|
79
72
|
RunsRerunResponse,
|
|
73
|
+
RunsReviewsClearResponse,
|
|
74
|
+
RunsReviewsExpectedCreateResponse,
|
|
75
|
+
RunsReviewsExpectedFileDeleteResponse,
|
|
76
|
+
RunsReviewsExpectedFileUpdateResponse,
|
|
77
|
+
RunsReviewsExpectedGetResponse,
|
|
78
|
+
RunsReviewsGetResponse,
|
|
79
|
+
RunsReviewsUpdateResponse,
|
|
80
80
|
RunsTraceGetResponse,
|
|
81
81
|
} from './generated/types.gen';
|
|
@@ -20,10 +20,12 @@ import {
|
|
|
20
20
|
automationsExperimentsList,
|
|
21
21
|
automationsGet,
|
|
22
22
|
automationsList,
|
|
23
|
+
automationsReviewsHealth,
|
|
23
24
|
automationsSync,
|
|
24
25
|
automationsTriggersGet,
|
|
25
26
|
automationsVersionsList,
|
|
26
27
|
} from '../generated/sdk.gen';
|
|
28
|
+
import type { AutomationsReviewsHealthData } from '../generated/types.gen';
|
|
27
29
|
|
|
28
30
|
type Dispatch = <T>(call: () => Promise<OperationResult<T>>) => Promise<T>;
|
|
29
31
|
type SignalOptions = { signal?: AbortSignal };
|
|
@@ -34,6 +36,7 @@ export class AutomationsResource {
|
|
|
34
36
|
public readonly examples: AutomationExamplesResource;
|
|
35
37
|
public readonly evaluators: AutomationEvaluatorsResource;
|
|
36
38
|
public readonly experiments: AutomationExperimentsResource;
|
|
39
|
+
public readonly reviews: AutomationReviewsResource;
|
|
37
40
|
|
|
38
41
|
constructor(
|
|
39
42
|
private readonly client: Client,
|
|
@@ -43,6 +46,7 @@ export class AutomationsResource {
|
|
|
43
46
|
this.examples = new AutomationExamplesResource(client, dispatch);
|
|
44
47
|
this.evaluators = new AutomationEvaluatorsResource(client, dispatch);
|
|
45
48
|
this.experiments = new AutomationExperimentsResource(client, dispatch);
|
|
49
|
+
this.reviews = new AutomationReviewsResource(client, dispatch);
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
async list(
|
|
@@ -83,6 +87,31 @@ export class AutomationsResource {
|
|
|
83
87
|
}
|
|
84
88
|
}
|
|
85
89
|
|
|
90
|
+
type AutomationReviewHealthOptions = NonNullable<AutomationsReviewsHealthData['query']> &
|
|
91
|
+
SignalOptions;
|
|
92
|
+
|
|
93
|
+
export class AutomationReviewsResource {
|
|
94
|
+
constructor(
|
|
95
|
+
private readonly client: Client,
|
|
96
|
+
private readonly dispatch: Dispatch
|
|
97
|
+
) {}
|
|
98
|
+
|
|
99
|
+
async health(
|
|
100
|
+
automationId: string,
|
|
101
|
+
options: AutomationReviewHealthOptions = {}
|
|
102
|
+
): Promise<AnyResponse> {
|
|
103
|
+
const { signal, ...query } = options;
|
|
104
|
+
return this.dispatch(() =>
|
|
105
|
+
automationsReviewsHealth({
|
|
106
|
+
client: this.client,
|
|
107
|
+
path: { id: automationId },
|
|
108
|
+
query,
|
|
109
|
+
signal,
|
|
110
|
+
})
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
86
115
|
export class AutomationDatasetResource {
|
|
87
116
|
constructor(
|
|
88
117
|
private readonly client: Client,
|
package/src/resources/runs.ts
CHANGED
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
runsArtifactsList,
|
|
6
6
|
runsCancel,
|
|
7
7
|
runsEventsList,
|
|
8
|
-
runsFeedbackClear,
|
|
9
|
-
runsFeedbackExpectedCreate,
|
|
10
|
-
runsFeedbackExpectedFileDelete,
|
|
11
|
-
runsFeedbackExpectedFileGet,
|
|
12
|
-
runsFeedbackExpectedFileUpdate,
|
|
13
|
-
runsFeedbackExpectedGet,
|
|
14
|
-
runsFeedbackGet,
|
|
15
|
-
runsFeedbackUpdate,
|
|
16
8
|
runsGet,
|
|
17
9
|
runsList,
|
|
18
10
|
runsPromote,
|
|
19
11
|
runsRerun,
|
|
12
|
+
runsReviewsClear,
|
|
13
|
+
runsReviewsExpectedCreate,
|
|
14
|
+
runsReviewsExpectedFileDelete,
|
|
15
|
+
runsReviewsExpectedFileGet,
|
|
16
|
+
runsReviewsExpectedFileUpdate,
|
|
17
|
+
runsReviewsExpectedGet,
|
|
18
|
+
runsReviewsGet,
|
|
19
|
+
runsReviewsUpdate,
|
|
20
20
|
runsScoresList,
|
|
21
21
|
runsStepsList,
|
|
22
22
|
runsTraceGet,
|
|
@@ -26,18 +26,18 @@ import type {
|
|
|
26
26
|
RunsArtifactsListResponse,
|
|
27
27
|
RunsCancelResponse,
|
|
28
28
|
RunsEventsListResponse,
|
|
29
|
-
RunsFeedbackClearResponse,
|
|
30
|
-
RunsFeedbackExpectedCreateResponse,
|
|
31
|
-
RunsFeedbackExpectedFileDeleteResponse,
|
|
32
|
-
RunsFeedbackExpectedFileUpdateResponse,
|
|
33
|
-
RunsFeedbackExpectedGetResponse,
|
|
34
|
-
RunsFeedbackGetResponse,
|
|
35
|
-
RunsFeedbackUpdateResponse,
|
|
36
29
|
RunsGetResponse,
|
|
37
30
|
RunsListData,
|
|
38
31
|
RunsListResponse,
|
|
39
32
|
RunsPromoteResponse,
|
|
40
33
|
RunsRerunResponse,
|
|
34
|
+
RunsReviewsClearResponse,
|
|
35
|
+
RunsReviewsExpectedCreateResponse,
|
|
36
|
+
RunsReviewsExpectedFileDeleteResponse,
|
|
37
|
+
RunsReviewsExpectedFileUpdateResponse,
|
|
38
|
+
RunsReviewsExpectedGetResponse,
|
|
39
|
+
RunsReviewsGetResponse,
|
|
40
|
+
RunsReviewsUpdateResponse,
|
|
41
41
|
RunsScoresListResponse,
|
|
42
42
|
RunsStepsListResponse,
|
|
43
43
|
RunsTraceGetResponse,
|
|
@@ -62,7 +62,7 @@ function formatExpand(expand: RunExpand | undefined): string | undefined {
|
|
|
62
62
|
export class RunsResource {
|
|
63
63
|
public readonly artifacts: RunsArtifactsResource;
|
|
64
64
|
public readonly scores: RunsScoresResource;
|
|
65
|
-
public readonly
|
|
65
|
+
public readonly reviews: RunsReviewsResource;
|
|
66
66
|
public readonly trace: RunsTraceResource;
|
|
67
67
|
|
|
68
68
|
constructor(
|
|
@@ -71,7 +71,7 @@ export class RunsResource {
|
|
|
71
71
|
) {
|
|
72
72
|
this.artifacts = new RunsArtifactsResource(client, dispatch);
|
|
73
73
|
this.scores = new RunsScoresResource(client, dispatch);
|
|
74
|
-
this.
|
|
74
|
+
this.reviews = new RunsReviewsResource(client, dispatch);
|
|
75
75
|
this.trace = new RunsTraceResource(client, dispatch);
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -181,15 +181,15 @@ export class RunsArtifactsResource {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
export class
|
|
184
|
+
export class RunsReviewsResource {
|
|
185
185
|
constructor(
|
|
186
186
|
private readonly client: Client,
|
|
187
187
|
private readonly dispatch: Dispatch
|
|
188
188
|
) {}
|
|
189
189
|
|
|
190
|
-
async get(runId: string, options: SignalOptions = {}): Promise<
|
|
190
|
+
async get(runId: string, options: SignalOptions = {}): Promise<RunsReviewsGetResponse> {
|
|
191
191
|
return this.dispatch(() =>
|
|
192
|
-
|
|
192
|
+
runsReviewsGet({ client: this.client, path: { id: runId }, signal: options.signal })
|
|
193
193
|
);
|
|
194
194
|
}
|
|
195
195
|
|
|
@@ -197,9 +197,9 @@ export class RunsFeedbackResource {
|
|
|
197
197
|
runId: string,
|
|
198
198
|
body: Record<string, unknown>,
|
|
199
199
|
options: SignalOptions = {}
|
|
200
|
-
): Promise<
|
|
200
|
+
): Promise<RunsReviewsUpdateResponse> {
|
|
201
201
|
return this.dispatch(() =>
|
|
202
|
-
|
|
202
|
+
runsReviewsUpdate({
|
|
203
203
|
client: this.client,
|
|
204
204
|
path: { id: runId },
|
|
205
205
|
body: body as never,
|
|
@@ -208,18 +208,18 @@ export class RunsFeedbackResource {
|
|
|
208
208
|
);
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
async clear(runId: string, options: SignalOptions = {}): Promise<
|
|
211
|
+
async clear(runId: string, options: SignalOptions = {}): Promise<RunsReviewsClearResponse> {
|
|
212
212
|
return this.dispatch(() =>
|
|
213
|
-
|
|
213
|
+
runsReviewsClear({ client: this.client, path: { id: runId }, signal: options.signal })
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
async listExpected(
|
|
218
218
|
runId: string,
|
|
219
219
|
options: SignalOptions = {}
|
|
220
|
-
): Promise<
|
|
220
|
+
): Promise<RunsReviewsExpectedGetResponse> {
|
|
221
221
|
return this.dispatch(() =>
|
|
222
|
-
|
|
222
|
+
runsReviewsExpectedGet({ client: this.client, path: { id: runId }, signal: options.signal })
|
|
223
223
|
);
|
|
224
224
|
}
|
|
225
225
|
|
|
@@ -227,9 +227,9 @@ export class RunsFeedbackResource {
|
|
|
227
227
|
runId: string,
|
|
228
228
|
outputFileName: string,
|
|
229
229
|
options: { expectedName?: string; signal?: AbortSignal } = {}
|
|
230
|
-
): Promise<
|
|
230
|
+
): Promise<RunsReviewsExpectedCreateResponse> {
|
|
231
231
|
return this.dispatch(() =>
|
|
232
|
-
|
|
232
|
+
runsReviewsExpectedCreate({
|
|
233
233
|
client: this.client,
|
|
234
234
|
path: { id: runId },
|
|
235
235
|
body: {
|
|
@@ -245,18 +245,18 @@ export class RunsFeedbackResource {
|
|
|
245
245
|
runId: string,
|
|
246
246
|
file: FileInput,
|
|
247
247
|
options: { name?: string; signal?: AbortSignal } = {}
|
|
248
|
-
): Promise<
|
|
248
|
+
): Promise<RunsReviewsExpectedCreateResponse> {
|
|
249
249
|
const formData = await buildSingleFileMultipart(file, options.name);
|
|
250
250
|
return this.dispatch(
|
|
251
251
|
() =>
|
|
252
252
|
this.client.post({
|
|
253
|
-
url: '/api/v1/runs/{id}/
|
|
253
|
+
url: '/api/v1/runs/{id}/reviews/expected',
|
|
254
254
|
path: { id: runId },
|
|
255
255
|
body: formData,
|
|
256
256
|
bodySerializer: null,
|
|
257
257
|
headers: { 'Content-Type': null },
|
|
258
258
|
signal: options.signal,
|
|
259
|
-
}) as Promise<OperationResult<
|
|
259
|
+
}) as Promise<OperationResult<RunsReviewsExpectedCreateResponse>>
|
|
260
260
|
);
|
|
261
261
|
}
|
|
262
262
|
|
|
@@ -266,7 +266,7 @@ export class RunsFeedbackResource {
|
|
|
266
266
|
options: SignalOptions = {}
|
|
267
267
|
): Promise<Blob> {
|
|
268
268
|
return this.dispatch(async () => {
|
|
269
|
-
const response = await
|
|
269
|
+
const response = await runsReviewsExpectedFileGet({
|
|
270
270
|
client: this.client,
|
|
271
271
|
path: { id: runId, filename },
|
|
272
272
|
signal: options.signal,
|
|
@@ -280,9 +280,9 @@ export class RunsFeedbackResource {
|
|
|
280
280
|
filename: string,
|
|
281
281
|
newFilename: string,
|
|
282
282
|
options: SignalOptions = {}
|
|
283
|
-
): Promise<
|
|
283
|
+
): Promise<RunsReviewsExpectedFileUpdateResponse> {
|
|
284
284
|
return this.dispatch(() =>
|
|
285
|
-
|
|
285
|
+
runsReviewsExpectedFileUpdate({
|
|
286
286
|
client: this.client,
|
|
287
287
|
path: { id: runId, filename },
|
|
288
288
|
body: { name: newFilename },
|
|
@@ -295,9 +295,9 @@ export class RunsFeedbackResource {
|
|
|
295
295
|
runId: string,
|
|
296
296
|
filename: string,
|
|
297
297
|
options: SignalOptions = {}
|
|
298
|
-
): Promise<
|
|
298
|
+
): Promise<RunsReviewsExpectedFileDeleteResponse> {
|
|
299
299
|
return this.dispatch(() =>
|
|
300
|
-
|
|
300
|
+
runsReviewsExpectedFileDelete({
|
|
301
301
|
client: this.client,
|
|
302
302
|
path: { id: runId, filename },
|
|
303
303
|
signal: options.signal,
|
package/src/telemetry.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
export const SDK_LANGUAGE = 'typescript';
|
|
20
20
|
// Rewritten at publish time by scripts/render-sdk-versions.sh.
|
|
21
21
|
// Keep this string literal exactly stable — sed matches on it.
|
|
22
|
-
export const SDK_VERSION = '0.
|
|
22
|
+
export const SDK_VERSION = '0.10.0';
|
|
23
23
|
|
|
24
24
|
function detectRuntime(): string {
|
|
25
25
|
const g = globalThis as unknown as {
|