@orq-ai/node 4.14.13 → 4.14.15
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/evaluatorresponsefunction.js +2 -2
- package/models/components/evaluatorresponsehttp.js +2 -2
- package/models/components/evaluatorresponsejsonschema.js +2 -2
- package/models/components/evaluatorresponsellm.js +2 -2
- package/models/components/evaluatorresponsepython.js +2 -2
- package/models/components/evaluatorresponseragas.js +2 -2
- package/models/components/evaluatorresponsetypescript.js +2 -2
- package/models/components/reasoningpart.js +1 -1
- package/models/operations/createannotationqueue.js +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +5 -5
- package/models/operations/createtool.js +4 -4
- package/models/operations/getalltools.js +4 -4
- package/models/operations/geteval.js +16 -16
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/listannotationqueues.js +1 -1
- package/models/operations/listdatasetdatapoints.js +5 -5
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +4 -4
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrieveannotationqueue.js +1 -1
- package/models/operations/retrievedatapoint.js +5 -5
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievetool.js +4 -4
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updateannotationqueue.js +1 -1
- package/models/operations/updatedatapoint.js +5 -5
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatetool.js +4 -4
- package/package.json +3 -3
- package/packages/orq-rc/src/funcs/budgetsCreate.ts +1 -1
- package/packages/orq-rc/src/funcs/budgetsDelete.ts +1 -1
- package/packages/orq-rc/src/funcs/budgetsGet.ts +1 -1
- package/packages/orq-rc/src/funcs/budgetsList.ts +1 -1
- package/packages/orq-rc/src/funcs/budgetsResetConsumption.ts +1 -1
- package/packages/orq-rc/src/funcs/budgetsUpdate.ts +1 -1
- package/packages/orq-rc/src/funcs/evalsCreate.ts +4 -5
- package/packages/orq-rc/src/funcs/evalsGet.ts +4 -5
- package/packages/orq-rc/src/funcs/evalsGetVersion.ts +4 -5
- package/packages/orq-rc/src/funcs/evalsInvoke.ts +4 -4
- package/packages/orq-rc/src/funcs/evalsUpdate.ts +4 -5
- package/packages/orq-rc/src/funcs/hubGet.ts +168 -0
- package/packages/orq-rc/src/funcs/hubSearch.ts +169 -0
- package/packages/orq-rc/src/funcs/sessionsCreate.ts +162 -0
- package/packages/orq-rc/src/funcs/sessionsDelete.ts +168 -0
- package/packages/orq-rc/src/funcs/sessionsGet.ts +168 -0
- package/packages/orq-rc/src/funcs/sessionsGetCount.ts +162 -0
- package/packages/orq-rc/src/funcs/sessionsList.ts +162 -0
- package/packages/orq-rc/src/funcs/sessionsListTags.ts +144 -0
- package/packages/orq-rc/src/funcs/sessionsUpdate.ts +171 -0
- package/packages/orq-rc/src/lib/config.ts +2 -2
- package/packages/orq-rc/src/models/components/agentresponserequest.ts +14 -10
- package/packages/orq-rc/src/models/components/budgetlimit.ts +11 -9
- package/packages/orq-rc/src/models/components/createthreadrequest.ts +91 -0
- package/packages/orq-rc/src/models/components/filter.ts +7 -9
- package/packages/orq-rc/src/models/components/gethubitemresponse.ts +37 -0
- package/packages/orq-rc/src/models/components/getthreadcountrequest.ts +42 -0
- package/packages/orq-rc/src/models/components/getthreadcountresponse.ts +31 -0
- package/packages/orq-rc/src/models/components/hubitem.ts +136 -0
- package/packages/orq-rc/src/models/components/hubitemsummary.ts +60 -0
- package/packages/orq-rc/src/models/components/hubsearchhit.ts +35 -0
- package/packages/orq-rc/src/models/components/index.ts +18 -3
- package/packages/orq-rc/src/models/components/listthreadsrequest.ts +42 -0
- package/packages/orq-rc/src/models/components/listthreadsresponse.ts +41 -0
- package/packages/orq-rc/src/models/components/managementkey.ts +3 -4
- package/packages/orq-rc/src/models/components/modelmetadata.ts +6 -0
- package/packages/orq-rc/src/models/components/modelsconfig.ts +11 -10
- package/packages/orq-rc/src/models/components/monitorfilter.ts +11 -7
- package/packages/orq-rc/src/models/components/openaipromptcacheoptions.ts +84 -0
- package/packages/orq-rc/src/models/components/publicresponseresource.ts +7 -0
- package/packages/orq-rc/src/models/components/queryreportrequest.ts +10 -11
- package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
- package/packages/orq-rc/src/models/components/responsemeta.ts +6 -7
- package/packages/orq-rc/src/models/components/searchhubitemsresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/sessioninterval.ts +26 -0
- package/packages/orq-rc/src/models/components/textcontentpartschema.ts +13 -8
- package/packages/orq-rc/src/models/components/thread.ts +101 -0
- package/packages/orq-rc/src/models/components/threadbilling.ts +68 -0
- package/packages/orq-rc/src/models/components/threadfilters.ts +66 -0
- package/packages/orq-rc/src/models/components/threadkind.ts +20 -0
- package/packages/orq-rc/src/models/components/threadusage.ts +68 -0
- package/packages/orq-rc/src/models/components/updatethreadrequest.ts +105 -0
- package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +5 -5
- package/packages/orq-rc/src/models/operations/createeval.ts +25 -0
- package/packages/orq-rc/src/models/operations/createrouterresponse.ts +128 -9
- package/packages/orq-rc/src/models/operations/createtool.ts +4 -4
- package/packages/orq-rc/src/models/operations/deletesession.ts +36 -0
- package/packages/orq-rc/src/models/operations/getalltools.ts +4 -4
- package/packages/orq-rc/src/models/operations/geteval.ts +25 -0
- package/packages/orq-rc/src/models/operations/getevalversion.ts +25 -0
- package/packages/orq-rc/src/models/operations/getsession.ts +36 -0
- package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/hubget.ts +27 -0
- package/packages/orq-rc/src/models/operations/hubsearch.ts +34 -0
- package/packages/orq-rc/src/models/operations/index.ts +5 -0
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +5 -5
- package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
- package/packages/orq-rc/src/models/operations/modelcreateopenailike.ts +8 -0
- package/packages/orq-rc/src/models/operations/modelupdateopenailike.ts +8 -0
- package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/postv2routerocr.ts +36 -0
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +5 -5
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrieveresponse.ts +5 -0
- 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/updatedatapoint.ts +5 -5
- package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/updateeval.ts +25 -0
- package/packages/orq-rc/src/models/operations/updatesession.ts +41 -0
- package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
- package/packages/orq-rc/src/sdk/budgets.ts +6 -6
- package/packages/orq-rc/src/sdk/evals.ts +5 -5
- package/packages/orq-rc/src/sdk/hub.ts +46 -0
- package/packages/orq-rc/src/sdk/sdk.ts +27 -15
- package/packages/orq-rc/src/sdk/sessions.ts +134 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/evaluatorresponsefunction.ts +2 -2
- package/src/models/components/evaluatorresponsehttp.ts +2 -2
- package/src/models/components/evaluatorresponsejsonschema.ts +2 -2
- package/src/models/components/evaluatorresponsellm.ts +2 -2
- package/src/models/components/evaluatorresponsepython.ts +2 -2
- package/src/models/components/evaluatorresponseragas.ts +2 -2
- package/src/models/components/evaluatorresponsetypescript.ts +2 -2
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/operations/createannotationqueue.ts +1 -1
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +5 -5
- package/src/models/operations/createtool.ts +4 -4
- package/src/models/operations/getalltools.ts +4 -4
- package/src/models/operations/geteval.ts +16 -16
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/listannotationqueues.ts +1 -1
- package/src/models/operations/listdatasetdatapoints.ts +5 -5
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrieveannotationqueue.ts +1 -1
- package/src/models/operations/retrievedatapoint.ts +5 -5
- package/src/models/operations/retrievedataset.ts +1 -1
- 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/updateannotationqueue.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +5 -5
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatetool.ts +4 -4
- package/packages/orq-rc/src/models/components/evaluatordocumentresponse.ts +0 -50
- package/packages/orq-rc/src/models/components/getevaluatorversionresponse.ts +0 -58
- package/packages/orq-rc/src/models/components/invokeevaluatorresponse.ts +0 -47
|
@@ -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_01M21M7QVZHCMPS6H0M2CRPEX2"),
|
|
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_01M21M7QVX17PBZRXHBKKM8WYQ"),
|
|
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_01M21M7QVW9697JCTRATS6NAEM"),
|
|
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_01M21M7QVVTWDA3A43TKSHTHD6"),
|
|
361
361
|
path: z.string(),
|
|
362
362
|
key: z.string(),
|
|
363
363
|
display_name: z.string().optional(),
|
|
@@ -1106,7 +1106,7 @@ function agentToolInputRunSchemaToJSON(agentToolInputRunSchema) {
|
|
|
1106
1106
|
}
|
|
1107
1107
|
/** @internal */
|
|
1108
1108
|
exports.Tools$outboundSchema = z.object({
|
|
1109
|
-
id: z.string().default("
|
|
1109
|
+
id: z.string().default("01M21M7QP7Q9VQT7CCK5H7651B"),
|
|
1110
1110
|
name: z.string(),
|
|
1111
1111
|
description: z.string().optional(),
|
|
1112
1112
|
schema: z.lazy(() => exports.AgentToolInputRunSchema$outboundSchema),
|
|
@@ -1072,7 +1072,7 @@ function streamRunAgentAgentToolInputRunAgentsSchemaToJSON(streamRunAgentAgentTo
|
|
|
1072
1072
|
}
|
|
1073
1073
|
/** @internal */
|
|
1074
1074
|
exports.AgentToolInputRunTools$outboundSchema = z.object({
|
|
1075
|
-
id: z.string().default("
|
|
1075
|
+
id: z.string().default("01M21M7QQDMP71BPB3CXM7WK8Y"),
|
|
1076
1076
|
name: z.string(),
|
|
1077
1077
|
description: z.string().optional(),
|
|
1078
1078
|
schema: z.lazy(() => exports.StreamRunAgentAgentToolInputRunAgentsSchema$outboundSchema),
|
|
@@ -98,7 +98,7 @@ exports.UpdateAnnotationQueueResponseBody$inboundSchema = z.object({
|
|
|
98
98
|
updated_by_id: z.nullable(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-09-
|
|
101
|
+
updated: z.string().datetime({ offset: true }).default("2026-09-08T23:04:08.153Z").transform(v => new Date(v)),
|
|
102
102
|
}).transform((v) => {
|
|
103
103
|
return (0, primitives_js_1.remap)(v, {
|
|
104
104
|
"_id": "id",
|
|
@@ -866,7 +866,7 @@ exports.UpdateDatapointEvaluations4$inboundSchema = z.object({
|
|
|
866
866
|
parent_annotation_id: z.string().optional(),
|
|
867
867
|
explanation: z.string().optional(),
|
|
868
868
|
reviewed_by_id: z.string(),
|
|
869
|
-
reviewed_at: z.string().datetime({ offset: true }).default("2026-09-
|
|
869
|
+
reviewed_at: z.string().datetime({ offset: true }).default("2026-09-08T23:04:18.621Z").transform(v => new Date(v)),
|
|
870
870
|
type: z.literal("string_array"),
|
|
871
871
|
values: z.array(z.string()),
|
|
872
872
|
}).transform((v) => {
|
|
@@ -917,7 +917,7 @@ exports.UpdateDatapointEvaluations3$inboundSchema = z.object({
|
|
|
917
917
|
parent_annotation_id: z.string().optional(),
|
|
918
918
|
explanation: z.string().optional(),
|
|
919
919
|
reviewed_by_id: z.string(),
|
|
920
|
-
reviewed_at: z.string().datetime({ offset: true }).default("2026-09-
|
|
920
|
+
reviewed_at: z.string().datetime({ offset: true }).default("2026-09-08T23:04:18.620Z").transform(v => new Date(v)),
|
|
921
921
|
type: z.literal("boolean"),
|
|
922
922
|
value: z.boolean(),
|
|
923
923
|
}).transform((v) => {
|
|
@@ -968,7 +968,7 @@ exports.UpdateDatapointEvaluations2$inboundSchema = z.object({
|
|
|
968
968
|
parent_annotation_id: z.string().optional(),
|
|
969
969
|
explanation: z.string().optional(),
|
|
970
970
|
reviewed_by_id: z.string(),
|
|
971
|
-
reviewed_at: z.string().datetime({ offset: true }).default("2026-09-
|
|
971
|
+
reviewed_at: z.string().datetime({ offset: true }).default("2026-09-08T23:04:18.620Z").transform(v => new Date(v)),
|
|
972
972
|
type: z.literal("number"),
|
|
973
973
|
value: z.number(),
|
|
974
974
|
}).transform((v) => {
|
|
@@ -1018,7 +1018,7 @@ exports.UpdateDatapointEvaluations1$inboundSchema = z.object({
|
|
|
1018
1018
|
parent_annotation_id: z.string().optional(),
|
|
1019
1019
|
explanation: z.string().optional(),
|
|
1020
1020
|
reviewed_by_id: z.string(),
|
|
1021
|
-
reviewed_at: z.string().datetime({ offset: true }).default("2026-09-
|
|
1021
|
+
reviewed_at: z.string().datetime({ offset: true }).default("2026-09-08T23:04:18.619Z").transform(v => new Date(v)),
|
|
1022
1022
|
type: z.literal("string"),
|
|
1023
1023
|
value: z.string(),
|
|
1024
1024
|
}).transform((v) => {
|
|
@@ -1069,7 +1069,7 @@ exports.UpdateDatapointResponseBody$inboundSchema = z.object({
|
|
|
1069
1069
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
1070
1070
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
1071
1071
|
.optional(),
|
|
1072
|
-
updated: z.string().datetime({ offset: true }).default("2026-09-
|
|
1072
|
+
updated: z.string().datetime({ offset: true }).default("2026-09-08T23:04:08.153Z").transform(v => new Date(v)),
|
|
1073
1073
|
}).transform((v) => {
|
|
1074
1074
|
return (0, primitives_js_1.remap)(v, {
|
|
1075
1075
|
"_id": "id",
|
|
@@ -95,7 +95,7 @@ exports.UpdateDatasetResponseBody$inboundSchema = z.object({
|
|
|
95
95
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
96
96
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
97
97
|
.optional(),
|
|
98
|
-
updated: z.string().datetime({ offset: true }).default("2026-09-
|
|
98
|
+
updated: z.string().datetime({ offset: true }).default("2026-09-08T23:04:08.153Z").transform(v => new Date(v)),
|
|
99
99
|
}).transform((v) => {
|
|
100
100
|
return (0, primitives_js_1.remap)(v, {
|
|
101
101
|
"_id": "id",
|
|
@@ -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_01M21M7QVAANEETVJ5VM41YVN0"),
|
|
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_01M21M7QV919ASN3NHENRN92RA"),
|
|
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_01M21M7QV84SR0TYJ243K7V8RE"),
|
|
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_01M21M7QV6VT3ZTC1R8QRSHXBF"),
|
|
733
733
|
path: z.string(),
|
|
734
734
|
key: z.string(),
|
|
735
735
|
display_name: z.string().optional(),
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orq-ai/node",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.15",
|
|
4
4
|
"author": "Orq",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
|
-
"import": "./index.js",
|
|
8
7
|
"require": "./index.js",
|
|
9
|
-
"types": "./index.d.ts"
|
|
8
|
+
"types": "./index.d.ts",
|
|
9
|
+
"import": "./index.js"
|
|
10
10
|
},
|
|
11
11
|
"./*": "./*",
|
|
12
12
|
"./langchain": {
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Create a new budget
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Creates a new budget in the workspace. Exactly one scope variant must be set (workspace / project / identity / api_key / provider / model). At least one of `limits.amount`, `limits.token_limit`, or `rate_limit.requests_per_minute` MUST be provided. Uniqueness is enforced across (workspace_id, scope_kind, scope_target_id).
|
|
32
|
+
* Creates a new budget in the workspace. Exactly one scope variant must be set (workspace / project / identity / api_key / provider / model). At least one of `limits.amount`, `limits.token_limit`, or `rate_limit.requests_per_minute` MUST be provided. Uniqueness is enforced across (workspace_id, scope_kind, scope_target_id). Requires a Management Key with the Budgets permission; project-scoped API keys cannot manage budgets.
|
|
33
33
|
*/
|
|
34
34
|
export function budgetsCreate(
|
|
35
35
|
client: OrqCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Delete a budget
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Permanently deletes a budget. Its consumption counters are cleared immediately. The response body is empty on success.
|
|
33
|
+
* Permanently deletes a budget. Its consumption counters are cleared immediately. The response body is empty on success. Requires a Management Key with the Budgets permission; project-scoped API keys cannot manage budgets.
|
|
34
34
|
*/
|
|
35
35
|
export function budgetsDelete(
|
|
36
36
|
client: OrqCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Retrieve a budget
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieves the metadata for an existing budget by its unique identifier. Returns `NotFound` when the budget does not exist in the caller's workspace.
|
|
33
|
+
* Retrieves the metadata for an existing budget by its unique identifier. Returns `NotFound` when the budget does not exist in the caller's workspace. Requires a Management Key with the Budgets permission; project-scoped API keys cannot manage budgets.
|
|
34
34
|
*/
|
|
35
35
|
export function budgetsGet(
|
|
36
36
|
client: OrqCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* List budgets
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Returns budgets visible to the current workspace, ordered by creation time with the newest first. Supports filtering by scope kind, scope target id, period, and active state, plus an optional free-text query that searches across denormalized target names via Typesense.
|
|
33
|
+
* Returns budgets visible to the current workspace, ordered by creation time with the newest first. Supports filtering by scope kind, scope target id, period, and active state, plus an optional free-text query that searches across denormalized target names via Typesense. Requires a Management Key with the Budgets permission; project-scoped API keys cannot manage budgets.
|
|
34
34
|
*/
|
|
35
35
|
export function budgetsList(
|
|
36
36
|
client: OrqCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Reset budget consumption
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Clears the current-period cost, token, and request counters for the budget. The budget record itself is preserved.
|
|
33
|
+
* Clears the current-period cost, token, and request counters for the budget. The budget record itself is preserved. Requires a Management Key with the Budgets permission; project-scoped API keys cannot manage budgets.
|
|
34
34
|
*/
|
|
35
35
|
export function budgetsResetConsumption(
|
|
36
36
|
client: OrqCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Update a budget
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Updates mutable fields of a budget: limits, rate limit, activation, and expiration. The scope is immutable — to change a budget's target, delete and recreate it. Omitted fields keep their current values.
|
|
33
|
+
* Updates mutable fields of a budget: limits, rate limit, activation, and expiration. The scope is immutable — to change a budget's target, delete and recreate it. Omitted fields keep their current values. Requires a Management Key with the Budgets permission; project-scoped API keys cannot manage budgets.
|
|
34
34
|
*/
|
|
35
35
|
export function budgetsUpdate(
|
|
36
36
|
client: OrqCore,
|
|
@@ -9,7 +9,6 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { RequestOptions } from "../lib/sdks.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import * as components from "../models/components/index.js";
|
|
13
12
|
import {
|
|
14
13
|
ConnectionError,
|
|
15
14
|
InvalidRequestError,
|
|
@@ -36,7 +35,7 @@ export function evalsCreate(
|
|
|
36
35
|
options?: RequestOptions,
|
|
37
36
|
): APIPromise<
|
|
38
37
|
Result<
|
|
39
|
-
|
|
38
|
+
operations.CreateEvalResponseBody,
|
|
40
39
|
| OrqError
|
|
41
40
|
| ResponseValidationError
|
|
42
41
|
| ConnectionError
|
|
@@ -61,7 +60,7 @@ async function $do(
|
|
|
61
60
|
): Promise<
|
|
62
61
|
[
|
|
63
62
|
Result<
|
|
64
|
-
|
|
63
|
+
operations.CreateEvalResponseBody,
|
|
65
64
|
| OrqError
|
|
66
65
|
| ResponseValidationError
|
|
67
66
|
| ConnectionError
|
|
@@ -127,7 +126,7 @@ async function $do(
|
|
|
127
126
|
const response = doResult.value;
|
|
128
127
|
|
|
129
128
|
const [result] = await M.match<
|
|
130
|
-
|
|
129
|
+
operations.CreateEvalResponseBody,
|
|
131
130
|
| OrqError
|
|
132
131
|
| ResponseValidationError
|
|
133
132
|
| ConnectionError
|
|
@@ -137,7 +136,7 @@ async function $do(
|
|
|
137
136
|
| UnexpectedClientError
|
|
138
137
|
| SDKValidationError
|
|
139
138
|
>(
|
|
140
|
-
M.json(200,
|
|
139
|
+
M.json(200, operations.CreateEvalResponseBody$inboundSchema),
|
|
141
140
|
M.fail("4XX"),
|
|
142
141
|
M.fail("5XX"),
|
|
143
142
|
)(response, req);
|
|
@@ -11,7 +11,6 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
11
11
|
import { RequestOptions } from "../lib/sdks.js";
|
|
12
12
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
13
|
import { pathToFunc } from "../lib/url.js";
|
|
14
|
-
import * as components from "../models/components/index.js";
|
|
15
14
|
import {
|
|
16
15
|
ConnectionError,
|
|
17
16
|
InvalidRequestError,
|
|
@@ -38,7 +37,7 @@ export function evalsGet(
|
|
|
38
37
|
options?: RequestOptions,
|
|
39
38
|
): APIPromise<
|
|
40
39
|
Result<
|
|
41
|
-
|
|
40
|
+
operations.GetEvalResponseBody,
|
|
42
41
|
| OrqError
|
|
43
42
|
| ResponseValidationError
|
|
44
43
|
| ConnectionError
|
|
@@ -63,7 +62,7 @@ async function $do(
|
|
|
63
62
|
): Promise<
|
|
64
63
|
[
|
|
65
64
|
Result<
|
|
66
|
-
|
|
65
|
+
operations.GetEvalResponseBody,
|
|
67
66
|
| OrqError
|
|
68
67
|
| ResponseValidationError
|
|
69
68
|
| ConnectionError
|
|
@@ -146,7 +145,7 @@ async function $do(
|
|
|
146
145
|
const response = doResult.value;
|
|
147
146
|
|
|
148
147
|
const [result] = await M.match<
|
|
149
|
-
|
|
148
|
+
operations.GetEvalResponseBody,
|
|
150
149
|
| OrqError
|
|
151
150
|
| ResponseValidationError
|
|
152
151
|
| ConnectionError
|
|
@@ -156,7 +155,7 @@ async function $do(
|
|
|
156
155
|
| UnexpectedClientError
|
|
157
156
|
| SDKValidationError
|
|
158
157
|
>(
|
|
159
|
-
M.json(200,
|
|
158
|
+
M.json(200, operations.GetEvalResponseBody$inboundSchema),
|
|
160
159
|
M.fail("4XX"),
|
|
161
160
|
M.fail("5XX"),
|
|
162
161
|
)(response, req);
|
|
@@ -11,7 +11,6 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
11
11
|
import { RequestOptions } from "../lib/sdks.js";
|
|
12
12
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
13
|
import { pathToFunc } from "../lib/url.js";
|
|
14
|
-
import * as components from "../models/components/index.js";
|
|
15
14
|
import {
|
|
16
15
|
ConnectionError,
|
|
17
16
|
InvalidRequestError,
|
|
@@ -38,7 +37,7 @@ export function evalsGetVersion(
|
|
|
38
37
|
options?: RequestOptions,
|
|
39
38
|
): APIPromise<
|
|
40
39
|
Result<
|
|
41
|
-
|
|
40
|
+
operations.GetEvalVersionResponseBody,
|
|
42
41
|
| OrqError
|
|
43
42
|
| ResponseValidationError
|
|
44
43
|
| ConnectionError
|
|
@@ -63,7 +62,7 @@ async function $do(
|
|
|
63
62
|
): Promise<
|
|
64
63
|
[
|
|
65
64
|
Result<
|
|
66
|
-
|
|
65
|
+
operations.GetEvalVersionResponseBody,
|
|
67
66
|
| OrqError
|
|
68
67
|
| ResponseValidationError
|
|
69
68
|
| ConnectionError
|
|
@@ -152,7 +151,7 @@ async function $do(
|
|
|
152
151
|
const response = doResult.value;
|
|
153
152
|
|
|
154
153
|
const [result] = await M.match<
|
|
155
|
-
|
|
154
|
+
operations.GetEvalVersionResponseBody,
|
|
156
155
|
| OrqError
|
|
157
156
|
| ResponseValidationError
|
|
158
157
|
| ConnectionError
|
|
@@ -162,7 +161,7 @@ async function $do(
|
|
|
162
161
|
| UnexpectedClientError
|
|
163
162
|
| SDKValidationError
|
|
164
163
|
>(
|
|
165
|
-
M.json(200,
|
|
164
|
+
M.json(200, operations.GetEvalVersionResponseBody$inboundSchema),
|
|
166
165
|
M.fail("4XX"),
|
|
167
166
|
M.fail("5XX"),
|
|
168
167
|
)(response, req);
|
|
@@ -38,7 +38,7 @@ export function evalsInvoke(
|
|
|
38
38
|
options?: RequestOptions,
|
|
39
39
|
): APIPromise<
|
|
40
40
|
Result<
|
|
41
|
-
components.
|
|
41
|
+
components.EvaluationResult,
|
|
42
42
|
| OrqError
|
|
43
43
|
| ResponseValidationError
|
|
44
44
|
| ConnectionError
|
|
@@ -63,7 +63,7 @@ async function $do(
|
|
|
63
63
|
): Promise<
|
|
64
64
|
[
|
|
65
65
|
Result<
|
|
66
|
-
components.
|
|
66
|
+
components.EvaluationResult,
|
|
67
67
|
| OrqError
|
|
68
68
|
| ResponseValidationError
|
|
69
69
|
| ConnectionError
|
|
@@ -149,7 +149,7 @@ async function $do(
|
|
|
149
149
|
const response = doResult.value;
|
|
150
150
|
|
|
151
151
|
const [result] = await M.match<
|
|
152
|
-
components.
|
|
152
|
+
components.EvaluationResult,
|
|
153
153
|
| OrqError
|
|
154
154
|
| ResponseValidationError
|
|
155
155
|
| ConnectionError
|
|
@@ -159,7 +159,7 @@ async function $do(
|
|
|
159
159
|
| UnexpectedClientError
|
|
160
160
|
| SDKValidationError
|
|
161
161
|
>(
|
|
162
|
-
M.json(200, components.
|
|
162
|
+
M.json(200, components.EvaluationResult$inboundSchema),
|
|
163
163
|
M.fail("4XX"),
|
|
164
164
|
M.fail("5XX"),
|
|
165
165
|
)(response, req);
|
|
@@ -11,7 +11,6 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
11
11
|
import { RequestOptions } from "../lib/sdks.js";
|
|
12
12
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
13
|
import { pathToFunc } from "../lib/url.js";
|
|
14
|
-
import * as components from "../models/components/index.js";
|
|
15
14
|
import {
|
|
16
15
|
ConnectionError,
|
|
17
16
|
InvalidRequestError,
|
|
@@ -38,7 +37,7 @@ export function evalsUpdate(
|
|
|
38
37
|
options?: RequestOptions,
|
|
39
38
|
): APIPromise<
|
|
40
39
|
Result<
|
|
41
|
-
|
|
40
|
+
operations.UpdateEvalResponseBody,
|
|
42
41
|
| OrqError
|
|
43
42
|
| ResponseValidationError
|
|
44
43
|
| ConnectionError
|
|
@@ -63,7 +62,7 @@ async function $do(
|
|
|
63
62
|
): Promise<
|
|
64
63
|
[
|
|
65
64
|
Result<
|
|
66
|
-
|
|
65
|
+
operations.UpdateEvalResponseBody,
|
|
67
66
|
| OrqError
|
|
68
67
|
| ResponseValidationError
|
|
69
68
|
| ConnectionError
|
|
@@ -147,7 +146,7 @@ async function $do(
|
|
|
147
146
|
const response = doResult.value;
|
|
148
147
|
|
|
149
148
|
const [result] = await M.match<
|
|
150
|
-
|
|
149
|
+
operations.UpdateEvalResponseBody,
|
|
151
150
|
| OrqError
|
|
152
151
|
| ResponseValidationError
|
|
153
152
|
| ConnectionError
|
|
@@ -157,7 +156,7 @@ async function $do(
|
|
|
157
156
|
| UnexpectedClientError
|
|
158
157
|
| SDKValidationError
|
|
159
158
|
>(
|
|
160
|
-
M.json(200,
|
|
159
|
+
M.json(200, operations.UpdateEvalResponseBody$inboundSchema),
|
|
161
160
|
M.fail("4XX"),
|
|
162
161
|
M.fail("5XX"),
|
|
163
162
|
)(response, req);
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OrqCore } from "../core.js";
|
|
6
|
+
import { 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 { OrqError } from "../models/errors/orqerror.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get a hub item
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Retrieves a hub item available to the current workspace.
|
|
34
|
+
*/
|
|
35
|
+
export function hubGet(
|
|
36
|
+
client: OrqCore,
|
|
37
|
+
request: operations.HubGetRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<
|
|
40
|
+
Result<
|
|
41
|
+
components.GetHubItemResponse,
|
|
42
|
+
| OrqError
|
|
43
|
+
| ResponseValidationError
|
|
44
|
+
| ConnectionError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| SDKValidationError
|
|
50
|
+
>
|
|
51
|
+
> {
|
|
52
|
+
return new APIPromise($do(
|
|
53
|
+
client,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function $do(
|
|
60
|
+
client: OrqCore,
|
|
61
|
+
request: operations.HubGetRequest,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): Promise<
|
|
64
|
+
[
|
|
65
|
+
Result<
|
|
66
|
+
components.GetHubItemResponse,
|
|
67
|
+
| OrqError
|
|
68
|
+
| ResponseValidationError
|
|
69
|
+
| ConnectionError
|
|
70
|
+
| RequestAbortedError
|
|
71
|
+
| RequestTimeoutError
|
|
72
|
+
| InvalidRequestError
|
|
73
|
+
| UnexpectedClientError
|
|
74
|
+
| SDKValidationError
|
|
75
|
+
>,
|
|
76
|
+
APICall,
|
|
77
|
+
]
|
|
78
|
+
> {
|
|
79
|
+
const parsed = safeParse(
|
|
80
|
+
request,
|
|
81
|
+
(value) => operations.HubGetRequest$outboundSchema.parse(value),
|
|
82
|
+
"Input validation failed",
|
|
83
|
+
);
|
|
84
|
+
if (!parsed.ok) {
|
|
85
|
+
return [parsed, { status: "invalid" }];
|
|
86
|
+
}
|
|
87
|
+
const payload = parsed.value;
|
|
88
|
+
const body = null;
|
|
89
|
+
|
|
90
|
+
const pathParams = {
|
|
91
|
+
id: encodeSimple("id", payload.id, {
|
|
92
|
+
explode: false,
|
|
93
|
+
charEncoding: "percent",
|
|
94
|
+
}),
|
|
95
|
+
};
|
|
96
|
+
const path = pathToFunc("/v2/hub/{id}")(pathParams);
|
|
97
|
+
|
|
98
|
+
const headers = new Headers(compactMap({
|
|
99
|
+
Accept: "application/json",
|
|
100
|
+
}));
|
|
101
|
+
|
|
102
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
103
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
104
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
105
|
+
|
|
106
|
+
const context = {
|
|
107
|
+
options: client._options,
|
|
108
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
109
|
+
operationID: "HubGet",
|
|
110
|
+
oAuth2Scopes: null,
|
|
111
|
+
|
|
112
|
+
resolvedSecurity: requestSecurity,
|
|
113
|
+
|
|
114
|
+
securitySource: client._options.apiKey,
|
|
115
|
+
retryConfig: options?.retries
|
|
116
|
+
|| client._options.retryConfig
|
|
117
|
+
|| { strategy: "none" },
|
|
118
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const requestRes = client._createRequest(context, {
|
|
122
|
+
security: requestSecurity,
|
|
123
|
+
method: "GET",
|
|
124
|
+
baseURL: options?.serverURL,
|
|
125
|
+
path: path,
|
|
126
|
+
headers: headers,
|
|
127
|
+
body: body,
|
|
128
|
+
userAgent: client._options.userAgent,
|
|
129
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
130
|
+
}, options);
|
|
131
|
+
if (!requestRes.ok) {
|
|
132
|
+
return [requestRes, { status: "invalid" }];
|
|
133
|
+
}
|
|
134
|
+
const req = requestRes.value;
|
|
135
|
+
|
|
136
|
+
const doResult = await client._do(req, {
|
|
137
|
+
context,
|
|
138
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
139
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
140
|
+
retryConfig: context.retryConfig,
|
|
141
|
+
retryCodes: context.retryCodes,
|
|
142
|
+
});
|
|
143
|
+
if (!doResult.ok) {
|
|
144
|
+
return [doResult, { status: "request-error", request: req }];
|
|
145
|
+
}
|
|
146
|
+
const response = doResult.value;
|
|
147
|
+
|
|
148
|
+
const [result] = await M.match<
|
|
149
|
+
components.GetHubItemResponse,
|
|
150
|
+
| OrqError
|
|
151
|
+
| ResponseValidationError
|
|
152
|
+
| ConnectionError
|
|
153
|
+
| RequestAbortedError
|
|
154
|
+
| RequestTimeoutError
|
|
155
|
+
| InvalidRequestError
|
|
156
|
+
| UnexpectedClientError
|
|
157
|
+
| SDKValidationError
|
|
158
|
+
>(
|
|
159
|
+
M.json(200, components.GetHubItemResponse$inboundSchema),
|
|
160
|
+
M.fail("4XX"),
|
|
161
|
+
M.fail("5XX"),
|
|
162
|
+
)(response, req);
|
|
163
|
+
if (!result.ok) {
|
|
164
|
+
return [result, { status: "complete", request: req, response }];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return [result, { status: "complete", request: req, response }];
|
|
168
|
+
}
|