@orq-ai/node 4.17.20 → 4.17.22
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/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/reasoningpart.js +1 -1
- package/models/operations/createtool.js +4 -4
- package/models/operations/getalltools.js +4 -4
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/listdeploymentversions.js +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievetool.js +4 -4
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatetool.js +4 -4
- package/package.json +1 -1
- package/packages/orq-rc/src/funcs/experimentsCancelRun.ts +187 -0
- package/packages/orq-rc/src/funcs/experimentsCreate.ts +171 -0
- package/packages/orq-rc/src/funcs/experimentsCreateEval.ts +187 -0
- package/packages/orq-rc/src/funcs/experimentsCreateReview.ts +184 -0
- package/packages/orq-rc/src/funcs/experimentsCreateRun.ts +179 -0
- package/packages/orq-rc/src/funcs/experimentsCreateTask.ts +187 -0
- package/packages/orq-rc/src/funcs/experimentsDelete.ts +177 -0
- package/packages/orq-rc/src/funcs/experimentsDeleteEval.ts +185 -0
- package/packages/orq-rc/src/funcs/experimentsDeleteReview.ts +185 -0
- package/packages/orq-rc/src/funcs/experimentsDeleteRows.ts +185 -0
- package/packages/orq-rc/src/funcs/experimentsDeleteRun.ts +184 -0
- package/packages/orq-rc/src/funcs/experimentsDeleteTask.ts +185 -0
- package/packages/orq-rc/src/funcs/experimentsDuplicateRow.ts +191 -0
- package/packages/orq-rc/src/funcs/experimentsExecuteRun.ts +185 -0
- package/packages/orq-rc/src/funcs/experimentsExportRun.ts +203 -0
- package/packages/orq-rc/src/funcs/experimentsGet.ts +177 -0
- package/packages/orq-rc/src/funcs/experimentsGetRun.ts +183 -0
- package/packages/orq-rc/src/funcs/experimentsGetRunMetrics.ts +189 -0
- package/packages/orq-rc/src/funcs/experimentsList.ts +180 -0
- package/packages/orq-rc/src/funcs/experimentsListEvals.ts +180 -0
- package/packages/orq-rc/src/funcs/experimentsListReviews.ts +181 -0
- package/packages/orq-rc/src/funcs/experimentsListRuns.ts +185 -0
- package/packages/orq-rc/src/funcs/experimentsListTasks.ts +180 -0
- package/packages/orq-rc/src/funcs/experimentsPatchEvalCell.ts +195 -0
- package/packages/orq-rc/src/funcs/experimentsPatchReviewCell.ts +192 -0
- package/packages/orq-rc/src/funcs/experimentsPatchTaskCell.ts +195 -0
- package/packages/orq-rc/src/funcs/experimentsQueryRun.ts +184 -0
- package/packages/orq-rc/src/funcs/experimentsUpdate.ts +180 -0
- package/packages/orq-rc/src/funcs/experimentsUpdateReview.ts +191 -0
- package/packages/orq-rc/src/funcs/experimentsUpdateRun.ts +185 -0
- package/packages/orq-rc/src/funcs/experimentsUpdateRunCell.ts +195 -0
- package/packages/orq-rc/src/funcs/experimentsUpdateRunColumnLayout.ts +189 -0
- package/packages/orq-rc/src/funcs/experimentsUpdateTask.ts +191 -0
- package/packages/orq-rc/src/funcs/filesList.ts +2 -1
- package/packages/orq-rc/src/lib/config.ts +2 -2
- package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +34 -30
- package/packages/orq-rc/src/models/components/agenttaskconfig.ts +126 -0
- package/packages/orq-rc/src/models/components/artifactrefs.ts +86 -0
- package/packages/orq-rc/src/models/components/booleanmetricsummary.ts +38 -0
- package/packages/orq-rc/src/models/components/cancelexperimentrunrequest.ts +36 -0
- package/packages/orq-rc/src/models/components/categoricalmetricsummary.ts +33 -0
- package/packages/orq-rc/src/models/components/cell.ts +108 -0
- package/packages/orq-rc/src/models/components/cellprogress.ts +40 -0
- package/packages/orq-rc/src/models/components/cellstatus.ts +21 -0
- package/packages/orq-rc/src/models/components/cellstatuscounts.ts +46 -0
- package/packages/orq-rc/src/models/components/celltype.ts +25 -0
- package/packages/orq-rc/src/models/components/column.ts +102 -0
- package/packages/orq-rc/src/models/components/columnlayout.ts +41 -0
- package/packages/orq-rc/src/models/components/createevalcolumnrequest.ts +39 -0
- package/packages/orq-rc/src/models/components/createexperimentrequest.ts +62 -0
- package/packages/orq-rc/src/models/components/createreviewcolumnrequest.ts +47 -0
- package/packages/orq-rc/src/models/components/createrunrequest.ts +39 -0
- package/packages/orq-rc/src/models/components/createtaskcolumnrequest.ts +71 -0
- package/packages/orq-rc/src/models/components/datasetcolumnconfig.ts +36 -0
- package/packages/orq-rc/src/models/components/deleterowsrequest.ts +36 -0
- package/packages/orq-rc/src/models/components/duplicaterowrequest.ts +25 -0
- package/packages/orq-rc/src/models/components/evalcolumnconfig.ts +45 -0
- package/packages/orq-rc/src/models/components/executeconstraints.ts +44 -0
- package/packages/orq-rc/src/models/components/executerunrequest.ts +56 -0
- package/packages/orq-rc/src/models/components/executescope.ts +20 -0
- package/packages/orq-rc/src/models/components/executetarget.ts +44 -0
- package/packages/orq-rc/src/models/components/experiment.ts +77 -0
- package/packages/orq-rc/src/models/components/getrunmetricsresponse.ts +35 -0
- package/packages/orq-rc/src/models/components/harnessconstraints.ts +55 -0
- package/packages/orq-rc/src/models/components/harnesstaskconfig.ts +60 -0
- package/packages/orq-rc/src/models/components/index.ts +64 -0
- package/packages/orq-rc/src/models/components/joboutputcolumnconfig.ts +39 -0
- package/packages/orq-rc/src/models/components/listevalcolumnsresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/listexperimentrunsresponse.ts +39 -0
- package/packages/orq-rc/src/models/components/listexperimentsresponse.ts +39 -0
- package/packages/orq-rc/src/models/components/listreviewcolumnsresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/listtaskcolumnsresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/llmconstraints.ts +38 -0
- package/packages/orq-rc/src/models/components/messagessource.ts +23 -0
- package/packages/orq-rc/src/models/components/metricbaseline.ts +45 -0
- package/packages/orq-rc/src/models/components/metriccolumnconfig.ts +36 -0
- package/packages/orq-rc/src/models/components/metricsummary.ts +53 -0
- package/packages/orq-rc/src/models/components/numbermetricsummary.ts +50 -0
- package/packages/orq-rc/src/models/components/openresponsetaskconfig.ts +43 -0
- package/packages/orq-rc/src/models/components/patchevalcellrequest.ts +47 -0
- package/packages/orq-rc/src/models/components/patchreviewcellrequest.ts +53 -0
- package/packages/orq-rc/src/models/components/patchtaskcellrequest.ts +67 -0
- package/packages/orq-rc/src/models/components/prompttaskconfig.ts +259 -0
- package/packages/orq-rc/src/models/components/queryrow.ts +53 -0
- package/packages/orq-rc/src/models/components/queryrunrequest.ts +65 -0
- package/packages/orq-rc/src/models/components/queryrunresponse.ts +47 -0
- package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
- package/packages/orq-rc/src/models/components/reviewcolumnconfig.ts +42 -0
- package/packages/orq-rc/src/models/components/rowstatus.ts +21 -0
- package/packages/orq-rc/src/models/components/run.ts +97 -0
- package/packages/orq-rc/src/models/components/runref.ts +36 -0
- package/packages/orq-rc/src/models/components/runsettings.ts +70 -0
- package/packages/orq-rc/src/models/components/runstats.ts +45 -0
- package/packages/orq-rc/src/models/components/runstatus.ts +21 -0
- package/packages/orq-rc/src/models/components/uniqueevaluator.ts +45 -0
- package/packages/orq-rc/src/models/components/updateexperimentrequest.ts +48 -0
- package/packages/orq-rc/src/models/components/updatereviewcolumnrequest.ts +36 -0
- package/packages/orq-rc/src/models/components/updateruncellrequest.ts +51 -0
- package/packages/orq-rc/src/models/components/updateruncolumnlayoutrequest.ts +38 -0
- package/packages/orq-rc/src/models/components/updaterunrequest.ts +39 -0
- package/packages/orq-rc/src/models/components/updatetaskcolumnrequest.ts +60 -0
- package/packages/orq-rc/src/models/components/wallclockunit.ts +18 -0
- package/packages/orq-rc/src/models/operations/createtool.ts +4 -4
- package/packages/orq-rc/src/models/operations/experimentdelete.ts +36 -0
- package/packages/orq-rc/src/models/operations/experimentevalcellpatch.ts +55 -0
- package/packages/orq-rc/src/models/operations/experimentevalcreate.ts +47 -0
- package/packages/orq-rc/src/models/operations/experimentevaldelete.ts +46 -0
- package/packages/orq-rc/src/models/operations/experimentevallist.ts +40 -0
- package/packages/orq-rc/src/models/operations/experimentget.ts +36 -0
- package/packages/orq-rc/src/models/operations/experimentlist.ts +47 -0
- package/packages/orq-rc/src/models/operations/experimentreviewcellpatch.ts +55 -0
- package/packages/orq-rc/src/models/operations/experimentreviewcreate.ts +48 -0
- package/packages/orq-rc/src/models/operations/experimentreviewdelete.ts +46 -0
- package/packages/orq-rc/src/models/operations/experimentreviewlist.ts +42 -0
- package/packages/orq-rc/src/models/operations/experimentreviewupdate.ts +52 -0
- package/packages/orq-rc/src/models/operations/experimentruncancel.ts +46 -0
- package/packages/orq-rc/src/models/operations/experimentruncellupdate.ts +55 -0
- package/packages/orq-rc/src/models/operations/experimentruncolumnlayoutupdate.ts +50 -0
- package/packages/orq-rc/src/models/operations/experimentruncreate.ts +41 -0
- package/packages/orq-rc/src/models/operations/experimentrundelete.ts +40 -0
- package/packages/orq-rc/src/models/operations/experimentrunexecute.ts +47 -0
- package/packages/orq-rc/src/models/operations/experimentrunexport.ts +85 -0
- package/packages/orq-rc/src/models/operations/experimentrunget.ts +40 -0
- package/packages/orq-rc/src/models/operations/experimentrunlist.ts +51 -0
- package/packages/orq-rc/src/models/operations/experimentrunmetricsget.ts +46 -0
- package/packages/orq-rc/src/models/operations/experimentrunquery.ts +45 -0
- package/packages/orq-rc/src/models/operations/experimentrunrowduplicate.ts +51 -0
- package/packages/orq-rc/src/models/operations/experimentrunrowsdelete.ts +47 -0
- package/packages/orq-rc/src/models/operations/experimentrunupdate.ts +45 -0
- package/packages/orq-rc/src/models/operations/experimenttaskcellpatch.ts +55 -0
- package/packages/orq-rc/src/models/operations/experimenttaskcreate.ts +47 -0
- package/packages/orq-rc/src/models/operations/experimenttaskdelete.ts +46 -0
- package/packages/orq-rc/src/models/operations/experimenttasklist.ts +40 -0
- package/packages/orq-rc/src/models/operations/experimenttaskupdate.ts +51 -0
- package/packages/orq-rc/src/models/operations/experimentupdate.ts +41 -0
- package/packages/orq-rc/src/models/operations/filelist.ts +6 -0
- package/packages/orq-rc/src/models/operations/getalltools.ts +4 -4
- package/packages/orq-rc/src/models/operations/index.ts +32 -0
- package/packages/orq-rc/src/models/operations/listdeploymentversions.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
- package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
- package/packages/orq-rc/src/sdk/experiments.ts +585 -0
- package/packages/orq-rc/src/sdk/files.ts +1 -1
- package/packages/orq-rc/src/sdk/sdk.ts +6 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/operations/createtool.ts +4 -4
- package/src/models/operations/getalltools.ts +4 -4
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/listdeploymentversions.ts +1 -1
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievetool.ts +4 -4
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatetool.ts +4 -4
package/jsr.json
CHANGED
package/lib/config.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
31
31
|
export declare const SDK_METADATA: {
|
|
32
32
|
readonly language: "typescript";
|
|
33
33
|
readonly openapiDocVersion: "2.0";
|
|
34
|
-
readonly sdkVersion: "4.17.
|
|
34
|
+
readonly sdkVersion: "4.17.22";
|
|
35
35
|
readonly genVersion: "2.954.8";
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 4.17.
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 4.17.22 2.954.8 2.0 @orq-ai/node";
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.d.ts.map
|
package/lib/config.js
CHANGED
|
@@ -28,8 +28,8 @@ function serverURLFromOptions(options) {
|
|
|
28
28
|
exports.SDK_METADATA = {
|
|
29
29
|
language: "typescript",
|
|
30
30
|
openapiDocVersion: "2.0",
|
|
31
|
-
sdkVersion: "4.17.
|
|
31
|
+
sdkVersion: "4.17.22",
|
|
32
32
|
genVersion: "2.954.8",
|
|
33
|
-
userAgent: "speakeasy-sdk/typescript 4.17.
|
|
33
|
+
userAgent: "speakeasy-sdk/typescript 4.17.22 2.954.8 2.0 @orq-ai/node",
|
|
34
34
|
};
|
|
35
35
|
//# sourceMappingURL=config.js.map
|
|
@@ -43,7 +43,7 @@ const primitives_js_1 = require("../../lib/primitives.js");
|
|
|
43
43
|
const schemas_js_1 = require("../../lib/schemas.js");
|
|
44
44
|
/** @internal */
|
|
45
45
|
exports.ReasoningPart$inboundSchema = z.object({
|
|
46
|
-
_id: z.string().default("
|
|
46
|
+
_id: z.string().default("reasoning_01m6dnzxhxrk81x8c3ypxet1xf"),
|
|
47
47
|
metadata: z.record(z.any()).optional(),
|
|
48
48
|
kind: z.literal("reasoning"),
|
|
49
49
|
reasoning: z.string(),
|
|
@@ -472,7 +472,7 @@ function responseBodyCodeToolFromJSON(jsonString) {
|
|
|
472
472
|
}
|
|
473
473
|
/** @internal */
|
|
474
474
|
exports.ResponseBodyCodeExecutionTool$inboundSchema = z.object({
|
|
475
|
-
_id: z.string().default("
|
|
475
|
+
_id: z.string().default("tool_01M6DNZXN77Z9RZ1SMKP5TGRAZ"),
|
|
476
476
|
path: z.string(),
|
|
477
477
|
key: z.string(),
|
|
478
478
|
display_name: z.string().optional(),
|
|
@@ -562,7 +562,7 @@ function responseBodyHttpFromJSON(jsonString) {
|
|
|
562
562
|
}
|
|
563
563
|
/** @internal */
|
|
564
564
|
exports.ResponseBodyHTTPTool$inboundSchema = z.object({
|
|
565
|
-
_id: z.string().default("
|
|
565
|
+
_id: z.string().default("tool_01M6DNZXN6MK71GGZEDHMFNXDV"),
|
|
566
566
|
path: z.string(),
|
|
567
567
|
key: z.string(),
|
|
568
568
|
display_name: z.string().optional(),
|
|
@@ -612,7 +612,7 @@ function responseBodyJsonSchemaFromJSON(jsonString) {
|
|
|
612
612
|
}
|
|
613
613
|
/** @internal */
|
|
614
614
|
exports.ResponseBodyJSONSchemaTool$inboundSchema = z.object({
|
|
615
|
-
_id: z.string().default("
|
|
615
|
+
_id: z.string().default("tool_01M6DNZXN6AYYH3VT911DD04HB"),
|
|
616
616
|
path: z.string(),
|
|
617
617
|
key: z.string(),
|
|
618
618
|
display_name: z.string().optional(),
|
|
@@ -665,7 +665,7 @@ function responseBodyFunctionFromJSON(jsonString) {
|
|
|
665
665
|
}
|
|
666
666
|
/** @internal */
|
|
667
667
|
exports.ResponseBodyFunctionTool$inboundSchema = z.object({
|
|
668
|
-
_id: z.string().default("
|
|
668
|
+
_id: z.string().default("tool_01M6DNZXN5FQF9CANW8EPXZ1EW"),
|
|
669
669
|
path: z.string(),
|
|
670
670
|
key: z.string(),
|
|
671
671
|
display_name: z.string().optional(),
|
|
@@ -172,7 +172,7 @@ function dataCodeToolFromJSON(jsonString) {
|
|
|
172
172
|
}
|
|
173
173
|
/** @internal */
|
|
174
174
|
exports.DataCodeExecutionTool$inboundSchema = z.object({
|
|
175
|
-
_id: z.string().default("
|
|
175
|
+
_id: z.string().default("tool_01M6DNZXN20JA4773W2Z50ZHR6"),
|
|
176
176
|
path: z.string(),
|
|
177
177
|
key: z.string(),
|
|
178
178
|
display_name: z.string().optional(),
|
|
@@ -261,7 +261,7 @@ function dataHttpFromJSON(jsonString) {
|
|
|
261
261
|
}
|
|
262
262
|
/** @internal */
|
|
263
263
|
exports.DataHTTPTool$inboundSchema = z.object({
|
|
264
|
-
_id: z.string().default("
|
|
264
|
+
_id: z.string().default("tool_01M6DNZXN1QW62KVA23A1QZWD6"),
|
|
265
265
|
path: z.string(),
|
|
266
266
|
key: z.string(),
|
|
267
267
|
display_name: z.string().optional(),
|
|
@@ -311,7 +311,7 @@ function dataJsonSchemaFromJSON(jsonString) {
|
|
|
311
311
|
}
|
|
312
312
|
/** @internal */
|
|
313
313
|
exports.DataJSONSchemaTool$inboundSchema = z.object({
|
|
314
|
-
_id: z.string().default("
|
|
314
|
+
_id: z.string().default("tool_01M6DNZXN1YCBX44J3XV3QB1M4"),
|
|
315
315
|
path: z.string(),
|
|
316
316
|
key: z.string(),
|
|
317
317
|
display_name: z.string().optional(),
|
|
@@ -366,7 +366,7 @@ function dataFunctionFromJSON(jsonString) {
|
|
|
366
366
|
}
|
|
367
367
|
/** @internal */
|
|
368
368
|
exports.DataFunctionTool$inboundSchema = z.object({
|
|
369
|
-
_id: z.string().default("
|
|
369
|
+
_id: z.string().default("tool_01M6DNZXN0E59N0XMA9XVR2ESF"),
|
|
370
370
|
path: z.string(),
|
|
371
371
|
key: z.string(),
|
|
372
372
|
display_name: z.string().optional(),
|
|
@@ -67,7 +67,7 @@ exports.GetV2HumanEvalSetsResponseBody2$inboundSchema = z.object({
|
|
|
67
67
|
updated_by_id: z.string().optional(),
|
|
68
68
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
69
69
|
.optional(),
|
|
70
|
-
updated: z.string().datetime({ offset: true }).default("2026-
|
|
70
|
+
updated: z.string().datetime({ offset: true }).default("2026-11-02T08:28:33.595Z").transform(v => new Date(v)),
|
|
71
71
|
filter_type: z.literal("name"),
|
|
72
72
|
filter_value: z.string(),
|
|
73
73
|
}).transform((v) => {
|
|
@@ -98,7 +98,7 @@ exports.GetV2HumanEvalSetsResponseBody1$inboundSchema = z.object({
|
|
|
98
98
|
updated_by_id: z.string().optional(),
|
|
99
99
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
100
100
|
.optional(),
|
|
101
|
-
updated: z.string().datetime({ offset: true }).default("2026-
|
|
101
|
+
updated: z.string().datetime({ offset: true }).default("2026-11-02T08:28:33.595Z").transform(v => new Date(v)),
|
|
102
102
|
filter_type: z.literal("span_type"),
|
|
103
103
|
filter_values: z.array(z.string()),
|
|
104
104
|
}).transform((v) => {
|
|
@@ -63,7 +63,7 @@ exports.GetV2HumanEvalSetsIdResponseBody2$inboundSchema = z.object({
|
|
|
63
63
|
updated_by_id: z.string().optional(),
|
|
64
64
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
65
65
|
.optional(),
|
|
66
|
-
updated: z.string().datetime({ offset: true }).default("2026-
|
|
66
|
+
updated: z.string().datetime({ offset: true }).default("2026-11-02T08:28:33.595Z").transform(v => new Date(v)),
|
|
67
67
|
filter_type: z.literal("name"),
|
|
68
68
|
filter_value: z.string(),
|
|
69
69
|
}).transform((v) => {
|
|
@@ -94,7 +94,7 @@ exports.GetV2HumanEvalSetsIdResponseBody1$inboundSchema = z.object({
|
|
|
94
94
|
updated_by_id: z.string().optional(),
|
|
95
95
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
96
96
|
.optional(),
|
|
97
|
-
updated: z.string().datetime({ offset: true }).default("2026-
|
|
97
|
+
updated: z.string().datetime({ offset: true }).default("2026-11-02T08:28:33.595Z").transform(v => new Date(v)),
|
|
98
98
|
filter_type: z.literal("span_type"),
|
|
99
99
|
filter_values: z.array(z.string()),
|
|
100
100
|
}).transform((v) => {
|
|
@@ -1013,7 +1013,7 @@ function knowledgeBaseConfigurationFromJSON(jsonString) {
|
|
|
1013
1013
|
}
|
|
1014
1014
|
/** @internal */
|
|
1015
1015
|
exports.ListDeploymentVersionsKnowledgeBases$inboundSchema = z.object({
|
|
1016
|
-
id: z.string().default("
|
|
1016
|
+
id: z.string().default("01M6DNZXGZW5RQP5QAV69HHA7S"),
|
|
1017
1017
|
knowledge_id: z.string(),
|
|
1018
1018
|
configuration: z.union([
|
|
1019
1019
|
z.lazy(() => exports.KnowledgeBaseLastUserMessage$inboundSchema),
|
|
@@ -122,7 +122,7 @@ exports.PatchV2HumanEvalSetsIdResponseBody2$inboundSchema = z.object({
|
|
|
122
122
|
updated_by_id: z.string().optional(),
|
|
123
123
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
124
124
|
.optional(),
|
|
125
|
-
updated: z.string().datetime({ offset: true }).default("2026-
|
|
125
|
+
updated: z.string().datetime({ offset: true }).default("2026-11-02T08:28:33.595Z").transform(v => new Date(v)),
|
|
126
126
|
filter_type: z.literal("name"),
|
|
127
127
|
filter_value: z.string(),
|
|
128
128
|
}).transform((v) => {
|
|
@@ -153,7 +153,7 @@ exports.PatchV2HumanEvalSetsIdResponseBody1$inboundSchema = z.object({
|
|
|
153
153
|
updated_by_id: z.string().optional(),
|
|
154
154
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
155
155
|
.optional(),
|
|
156
|
-
updated: z.string().datetime({ offset: true }).default("2026-
|
|
156
|
+
updated: z.string().datetime({ offset: true }).default("2026-11-02T08:28:33.595Z").transform(v => new Date(v)),
|
|
157
157
|
filter_type: z.literal("span_type"),
|
|
158
158
|
filter_values: z.array(z.string()),
|
|
159
159
|
}).transform((v) => {
|
|
@@ -106,7 +106,7 @@ exports.PostV2HumanEvalSetsResponseBody2$inboundSchema = z.object({
|
|
|
106
106
|
updated_by_id: z.string().optional(),
|
|
107
107
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
108
108
|
.optional(),
|
|
109
|
-
updated: z.string().datetime({ offset: true }).default("2026-
|
|
109
|
+
updated: z.string().datetime({ offset: true }).default("2026-11-02T08:28:33.595Z").transform(v => new Date(v)),
|
|
110
110
|
filter_type: z.literal("name"),
|
|
111
111
|
filter_value: z.string(),
|
|
112
112
|
}).transform((v) => {
|
|
@@ -137,7 +137,7 @@ exports.PostV2HumanEvalSetsResponseBody1$inboundSchema = z.object({
|
|
|
137
137
|
updated_by_id: z.string().optional(),
|
|
138
138
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
139
139
|
.optional(),
|
|
140
|
-
updated: z.string().datetime({ offset: true }).default("2026-
|
|
140
|
+
updated: z.string().datetime({ offset: true }).default("2026-11-02T08:28:33.595Z").transform(v => new Date(v)),
|
|
141
141
|
filter_type: z.literal("span_type"),
|
|
142
142
|
filter_values: z.array(z.string()),
|
|
143
143
|
}).transform((v) => {
|
|
@@ -164,7 +164,7 @@ function retrieveToolResponseBodyCodeToolFromJSON(jsonString) {
|
|
|
164
164
|
}
|
|
165
165
|
/** @internal */
|
|
166
166
|
exports.RetrieveToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
|
|
167
|
-
_id: z.string().default("
|
|
167
|
+
_id: z.string().default("tool_01M6DNZXNKJASJDD096JCHTGM3"),
|
|
168
168
|
path: z.string(),
|
|
169
169
|
key: z.string(),
|
|
170
170
|
display_name: z.string().optional(),
|
|
@@ -253,7 +253,7 @@ function retrieveToolResponseBodyHttpFromJSON(jsonString) {
|
|
|
253
253
|
}
|
|
254
254
|
/** @internal */
|
|
255
255
|
exports.RetrieveToolResponseBodyHTTPTool$inboundSchema = z.object({
|
|
256
|
-
_id: z.string().default("
|
|
256
|
+
_id: z.string().default("tool_01M6DNZXNK4HZFPG84CM1D5J00"),
|
|
257
257
|
path: z.string(),
|
|
258
258
|
key: z.string(),
|
|
259
259
|
display_name: z.string().optional(),
|
|
@@ -303,7 +303,7 @@ function retrieveToolResponseBodyJsonSchemaFromJSON(jsonString) {
|
|
|
303
303
|
}
|
|
304
304
|
/** @internal */
|
|
305
305
|
exports.RetrieveToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
|
|
306
|
-
_id: z.string().default("
|
|
306
|
+
_id: z.string().default("tool_01M6DNZXNJ9T8KXB2G7RMG8YSX"),
|
|
307
307
|
path: z.string(),
|
|
308
308
|
key: z.string(),
|
|
309
309
|
display_name: z.string().optional(),
|
|
@@ -357,7 +357,7 @@ function retrieveToolResponseBodyFunctionFromJSON(jsonString) {
|
|
|
357
357
|
}
|
|
358
358
|
/** @internal */
|
|
359
359
|
exports.RetrieveToolResponseBodyFunctionTool$inboundSchema = z.object({
|
|
360
|
-
_id: z.string().default("
|
|
360
|
+
_id: z.string().default("tool_01M6DNZXNJMT8BWHSSY231YMK8"),
|
|
361
361
|
path: z.string(),
|
|
362
362
|
key: z.string(),
|
|
363
363
|
display_name: z.string().optional(),
|
|
@@ -1104,7 +1104,7 @@ function agentToolInputRunSchemaToJSON(agentToolInputRunSchema) {
|
|
|
1104
1104
|
}
|
|
1105
1105
|
/** @internal */
|
|
1106
1106
|
exports.Tools$outboundSchema = z.object({
|
|
1107
|
-
id: z.string().default("
|
|
1107
|
+
id: z.string().default("01M6DNZXK8X605P4SGDBCMNEYE"),
|
|
1108
1108
|
name: z.string(),
|
|
1109
1109
|
description: z.string().optional(),
|
|
1110
1110
|
schema: z.lazy(() => exports.AgentToolInputRunSchema$outboundSchema),
|
|
@@ -1070,7 +1070,7 @@ function streamRunAgentAgentToolInputRunAgentsSchemaToJSON(streamRunAgentAgentTo
|
|
|
1070
1070
|
}
|
|
1071
1071
|
/** @internal */
|
|
1072
1072
|
exports.AgentToolInputRunTools$outboundSchema = z.object({
|
|
1073
|
-
id: z.string().default("
|
|
1073
|
+
id: z.string().default("01M6DNZXKSC110Y2EX1HQMNT4H"),
|
|
1074
1074
|
name: z.string(),
|
|
1075
1075
|
description: z.string().optional(),
|
|
1076
1076
|
schema: z.lazy(() => exports.StreamRunAgentAgentToolInputRunAgentsSchema$outboundSchema),
|
|
@@ -536,7 +536,7 @@ function updateToolResponseBodyCodeToolFromJSON(jsonString) {
|
|
|
536
536
|
}
|
|
537
537
|
/** @internal */
|
|
538
538
|
exports.UpdateToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
|
|
539
|
-
_id: z.string().default("
|
|
539
|
+
_id: z.string().default("tool_01M6DNZXNBAR2VGM055FHCHSBT"),
|
|
540
540
|
path: z.string(),
|
|
541
541
|
key: z.string(),
|
|
542
542
|
display_name: z.string().optional(),
|
|
@@ -625,7 +625,7 @@ function updateToolResponseBodyHttpFromJSON(jsonString) {
|
|
|
625
625
|
}
|
|
626
626
|
/** @internal */
|
|
627
627
|
exports.UpdateToolResponseBodyHTTPTool$inboundSchema = z.object({
|
|
628
|
-
_id: z.string().default("
|
|
628
|
+
_id: z.string().default("tool_01M6DNZXNAWQ436S2HR069VHPH"),
|
|
629
629
|
path: z.string(),
|
|
630
630
|
key: z.string(),
|
|
631
631
|
display_name: z.string().optional(),
|
|
@@ -675,7 +675,7 @@ function updateToolResponseBodyJsonSchemaFromJSON(jsonString) {
|
|
|
675
675
|
}
|
|
676
676
|
/** @internal */
|
|
677
677
|
exports.UpdateToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
|
|
678
|
-
_id: z.string().default("
|
|
678
|
+
_id: z.string().default("tool_01M6DNZXNA0MQX1S5APVZ57SD3"),
|
|
679
679
|
path: z.string(),
|
|
680
680
|
key: z.string(),
|
|
681
681
|
display_name: z.string().optional(),
|
|
@@ -729,7 +729,7 @@ function updateToolResponseBodyFunctionFromJSON(jsonString) {
|
|
|
729
729
|
}
|
|
730
730
|
/** @internal */
|
|
731
731
|
exports.UpdateToolResponseBodyFunctionTool$inboundSchema = z.object({
|
|
732
|
-
_id: z.string().default("
|
|
732
|
+
_id: z.string().default("tool_01M6DNZXN94P2RQ1HV5533EETG"),
|
|
733
733
|
path: z.string(),
|
|
734
734
|
key: z.string(),
|
|
735
735
|
display_name: z.string().optional(),
|
package/package.json
CHANGED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OrqCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { OrqError } from "../models/errors/orqerror.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Cancel a run
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Stops queued and running cells and moves the run to canceled. A cell whose execution is already in flight may still write its result.
|
|
35
|
+
*/
|
|
36
|
+
export function experimentsCancelRun(
|
|
37
|
+
client: OrqCore,
|
|
38
|
+
request: operations.ExperimentRunCancelRequest,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<
|
|
41
|
+
Result<
|
|
42
|
+
components.Run,
|
|
43
|
+
| errors.ErrorResponse
|
|
44
|
+
| OrqError
|
|
45
|
+
| ResponseValidationError
|
|
46
|
+
| ConnectionError
|
|
47
|
+
| RequestAbortedError
|
|
48
|
+
| RequestTimeoutError
|
|
49
|
+
| InvalidRequestError
|
|
50
|
+
| UnexpectedClientError
|
|
51
|
+
| SDKValidationError
|
|
52
|
+
>
|
|
53
|
+
> {
|
|
54
|
+
return new APIPromise($do(
|
|
55
|
+
client,
|
|
56
|
+
request,
|
|
57
|
+
options,
|
|
58
|
+
));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function $do(
|
|
62
|
+
client: OrqCore,
|
|
63
|
+
request: operations.ExperimentRunCancelRequest,
|
|
64
|
+
options?: RequestOptions,
|
|
65
|
+
): Promise<
|
|
66
|
+
[
|
|
67
|
+
Result<
|
|
68
|
+
components.Run,
|
|
69
|
+
| errors.ErrorResponse
|
|
70
|
+
| OrqError
|
|
71
|
+
| ResponseValidationError
|
|
72
|
+
| ConnectionError
|
|
73
|
+
| RequestAbortedError
|
|
74
|
+
| RequestTimeoutError
|
|
75
|
+
| InvalidRequestError
|
|
76
|
+
| UnexpectedClientError
|
|
77
|
+
| SDKValidationError
|
|
78
|
+
>,
|
|
79
|
+
APICall,
|
|
80
|
+
]
|
|
81
|
+
> {
|
|
82
|
+
const parsed = safeParse(
|
|
83
|
+
request,
|
|
84
|
+
(value) =>
|
|
85
|
+
operations.ExperimentRunCancelRequest$outboundSchema.parse(value),
|
|
86
|
+
"Input validation failed",
|
|
87
|
+
);
|
|
88
|
+
if (!parsed.ok) {
|
|
89
|
+
return [parsed, { status: "invalid" }];
|
|
90
|
+
}
|
|
91
|
+
const payload = parsed.value;
|
|
92
|
+
const body = encodeJSON("body", payload.CancelExperimentRunRequest, {
|
|
93
|
+
explode: true,
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
const pathParams = {
|
|
97
|
+
experiment_id: encodeSimple("experiment_id", payload.experiment_id, {
|
|
98
|
+
explode: false,
|
|
99
|
+
charEncoding: "percent",
|
|
100
|
+
}),
|
|
101
|
+
run_id: encodeSimple("run_id", payload.run_id, {
|
|
102
|
+
explode: false,
|
|
103
|
+
charEncoding: "percent",
|
|
104
|
+
}),
|
|
105
|
+
};
|
|
106
|
+
const path = pathToFunc(
|
|
107
|
+
"/v3/experiments/{experiment_id}/runs/{run_id}/cancel",
|
|
108
|
+
)(pathParams);
|
|
109
|
+
|
|
110
|
+
const headers = new Headers(compactMap({
|
|
111
|
+
"Content-Type": "application/json",
|
|
112
|
+
Accept: "application/json",
|
|
113
|
+
}));
|
|
114
|
+
|
|
115
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
116
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
117
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
118
|
+
|
|
119
|
+
const context = {
|
|
120
|
+
options: client._options,
|
|
121
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
122
|
+
operationID: "ExperimentRunCancel",
|
|
123
|
+
oAuth2Scopes: null,
|
|
124
|
+
|
|
125
|
+
resolvedSecurity: requestSecurity,
|
|
126
|
+
|
|
127
|
+
securitySource: client._options.apiKey,
|
|
128
|
+
retryConfig: options?.retries
|
|
129
|
+
|| client._options.retryConfig
|
|
130
|
+
|| { strategy: "none" },
|
|
131
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const requestRes = client._createRequest(context, {
|
|
135
|
+
security: requestSecurity,
|
|
136
|
+
method: "POST",
|
|
137
|
+
baseURL: options?.serverURL,
|
|
138
|
+
path: path,
|
|
139
|
+
headers: headers,
|
|
140
|
+
body: body,
|
|
141
|
+
userAgent: client._options.userAgent,
|
|
142
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
143
|
+
}, options);
|
|
144
|
+
if (!requestRes.ok) {
|
|
145
|
+
return [requestRes, { status: "invalid" }];
|
|
146
|
+
}
|
|
147
|
+
const req = requestRes.value;
|
|
148
|
+
|
|
149
|
+
const doResult = await client._do(req, {
|
|
150
|
+
context,
|
|
151
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
152
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
153
|
+
retryConfig: context.retryConfig,
|
|
154
|
+
retryCodes: context.retryCodes,
|
|
155
|
+
});
|
|
156
|
+
if (!doResult.ok) {
|
|
157
|
+
return [doResult, { status: "request-error", request: req }];
|
|
158
|
+
}
|
|
159
|
+
const response = doResult.value;
|
|
160
|
+
|
|
161
|
+
const responseFields = {
|
|
162
|
+
HttpMeta: { Response: response, Request: req },
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const [result] = await M.match<
|
|
166
|
+
components.Run,
|
|
167
|
+
| errors.ErrorResponse
|
|
168
|
+
| OrqError
|
|
169
|
+
| ResponseValidationError
|
|
170
|
+
| ConnectionError
|
|
171
|
+
| RequestAbortedError
|
|
172
|
+
| RequestTimeoutError
|
|
173
|
+
| InvalidRequestError
|
|
174
|
+
| UnexpectedClientError
|
|
175
|
+
| SDKValidationError
|
|
176
|
+
>(
|
|
177
|
+
M.json(200, components.Run$inboundSchema),
|
|
178
|
+
M.jsonErr(401, errors.ErrorResponse$inboundSchema),
|
|
179
|
+
M.fail("4XX"),
|
|
180
|
+
M.fail("5XX"),
|
|
181
|
+
)(response, req, { extraFields: responseFields });
|
|
182
|
+
if (!result.ok) {
|
|
183
|
+
return [result, { status: "complete", request: req, response }];
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return [result, { status: "complete", request: req, response }];
|
|
187
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OrqCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { OrqError } from "../models/errors/orqerror.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Create an experiment
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Creates an experiment. project_id defaults to the API key's project and is required for keys that span several projects. When dataset_id is set, a draft run is created with rows from that dataset.
|
|
34
|
+
*/
|
|
35
|
+
export function experimentsCreate(
|
|
36
|
+
client: OrqCore,
|
|
37
|
+
request: components.CreateExperimentRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<
|
|
40
|
+
Result<
|
|
41
|
+
components.Experiment,
|
|
42
|
+
| errors.ErrorResponse
|
|
43
|
+
| OrqError
|
|
44
|
+
| ResponseValidationError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| InvalidRequestError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| SDKValidationError
|
|
51
|
+
>
|
|
52
|
+
> {
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client,
|
|
55
|
+
request,
|
|
56
|
+
options,
|
|
57
|
+
));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function $do(
|
|
61
|
+
client: OrqCore,
|
|
62
|
+
request: components.CreateExperimentRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
components.Experiment,
|
|
68
|
+
| errors.ErrorResponse
|
|
69
|
+
| OrqError
|
|
70
|
+
| ResponseValidationError
|
|
71
|
+
| ConnectionError
|
|
72
|
+
| RequestAbortedError
|
|
73
|
+
| RequestTimeoutError
|
|
74
|
+
| InvalidRequestError
|
|
75
|
+
| UnexpectedClientError
|
|
76
|
+
| SDKValidationError
|
|
77
|
+
>,
|
|
78
|
+
APICall,
|
|
79
|
+
]
|
|
80
|
+
> {
|
|
81
|
+
const parsed = safeParse(
|
|
82
|
+
request,
|
|
83
|
+
(value) => components.CreateExperimentRequest$outboundSchema.parse(value),
|
|
84
|
+
"Input validation failed",
|
|
85
|
+
);
|
|
86
|
+
if (!parsed.ok) {
|
|
87
|
+
return [parsed, { status: "invalid" }];
|
|
88
|
+
}
|
|
89
|
+
const payload = parsed.value;
|
|
90
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
91
|
+
|
|
92
|
+
const path = pathToFunc("/v3/experiments")();
|
|
93
|
+
|
|
94
|
+
const headers = new Headers(compactMap({
|
|
95
|
+
"Content-Type": "application/json",
|
|
96
|
+
Accept: "application/json",
|
|
97
|
+
}));
|
|
98
|
+
|
|
99
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
100
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
101
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
102
|
+
|
|
103
|
+
const context = {
|
|
104
|
+
options: client._options,
|
|
105
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
106
|
+
operationID: "ExperimentCreate",
|
|
107
|
+
oAuth2Scopes: null,
|
|
108
|
+
|
|
109
|
+
resolvedSecurity: requestSecurity,
|
|
110
|
+
|
|
111
|
+
securitySource: client._options.apiKey,
|
|
112
|
+
retryConfig: options?.retries
|
|
113
|
+
|| client._options.retryConfig
|
|
114
|
+
|| { strategy: "none" },
|
|
115
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const requestRes = client._createRequest(context, {
|
|
119
|
+
security: requestSecurity,
|
|
120
|
+
method: "POST",
|
|
121
|
+
baseURL: options?.serverURL,
|
|
122
|
+
path: path,
|
|
123
|
+
headers: headers,
|
|
124
|
+
body: body,
|
|
125
|
+
userAgent: client._options.userAgent,
|
|
126
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
127
|
+
}, options);
|
|
128
|
+
if (!requestRes.ok) {
|
|
129
|
+
return [requestRes, { status: "invalid" }];
|
|
130
|
+
}
|
|
131
|
+
const req = requestRes.value;
|
|
132
|
+
|
|
133
|
+
const doResult = await client._do(req, {
|
|
134
|
+
context,
|
|
135
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
136
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
137
|
+
retryConfig: context.retryConfig,
|
|
138
|
+
retryCodes: context.retryCodes,
|
|
139
|
+
});
|
|
140
|
+
if (!doResult.ok) {
|
|
141
|
+
return [doResult, { status: "request-error", request: req }];
|
|
142
|
+
}
|
|
143
|
+
const response = doResult.value;
|
|
144
|
+
|
|
145
|
+
const responseFields = {
|
|
146
|
+
HttpMeta: { Response: response, Request: req },
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const [result] = await M.match<
|
|
150
|
+
components.Experiment,
|
|
151
|
+
| errors.ErrorResponse
|
|
152
|
+
| OrqError
|
|
153
|
+
| ResponseValidationError
|
|
154
|
+
| ConnectionError
|
|
155
|
+
| RequestAbortedError
|
|
156
|
+
| RequestTimeoutError
|
|
157
|
+
| InvalidRequestError
|
|
158
|
+
| UnexpectedClientError
|
|
159
|
+
| SDKValidationError
|
|
160
|
+
>(
|
|
161
|
+
M.json(200, components.Experiment$inboundSchema),
|
|
162
|
+
M.jsonErr(401, errors.ErrorResponse$inboundSchema),
|
|
163
|
+
M.fail("4XX"),
|
|
164
|
+
M.fail("5XX"),
|
|
165
|
+
)(response, req, { extraFields: responseFields });
|
|
166
|
+
if (!result.ok) {
|
|
167
|
+
return [result, { status: "complete", request: req, response }];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return [result, { status: "complete", request: req, response }];
|
|
171
|
+
}
|