@orq-ai/node 4.11.0-rc.56 → 4.11.0-rc.58
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/funcs/apiKeysGet.js +4 -0
- package/funcs/apiKeysGet.js.map +1 -1
- package/funcs/apiKeysList.js +1 -0
- package/funcs/apiKeysList.js.map +1 -1
- package/funcs/identitiesList.js +1 -0
- package/funcs/identitiesList.js.map +1 -1
- package/funcs/identitiesRetrieve.js +1 -0
- package/funcs/identitiesRetrieve.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/apikey.d.ts +79 -0
- package/models/components/apikey.d.ts.map +1 -1
- package/models/components/apikey.js +36 -1
- package/models/components/apikey.js.map +1 -1
- 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/identity.d.ts +79 -0
- package/models/components/identity.d.ts.map +1 -1
- package/models/components/identity.js +36 -1
- package/models/components/identity.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/operations/apikeyget.d.ts +8 -0
- package/models/operations/apikeyget.d.ts.map +1 -1
- package/models/operations/apikeyget.js +2 -0
- package/models/operations/apikeyget.js.map +1 -1
- package/models/operations/apikeylist.d.ts +9 -0
- package/models/operations/apikeylist.d.ts.map +1 -1
- package/models/operations/apikeylist.js +2 -0
- package/models/operations/apikeylist.js.map +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/listidentities.d.ts +9 -0
- package/models/operations/listidentities.d.ts.map +1 -1
- package/models/operations/listidentities.js +2 -0
- package/models/operations/listidentities.js.map +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +3 -3
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrieveidentity.d.ts +8 -0
- package/models/operations/retrieveidentity.d.ts.map +1 -1
- package/models/operations/retrieveidentity.js +2 -0
- package/models/operations/retrieveidentity.js.map +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +5 -5
- package/sdk/feedback.d.ts +2 -2
- package/sdk/feedback.js +2 -2
- package/src/funcs/apiKeysGet.ts +6 -1
- package/src/funcs/apiKeysList.ts +1 -0
- package/src/funcs/identitiesList.ts +1 -0
- package/src/funcs/identitiesRetrieve.ts +1 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/apikey.ts +118 -0
- 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/identity.ts +118 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/operations/apikeyget.ts +10 -0
- package/src/models/operations/apikeylist.ts +11 -0
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/listidentities.ts +11 -0
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrieveidentity.ts +10 -0
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/feedback.ts +2 -2
|
@@ -187,7 +187,7 @@ function retrieveToolResponseBodyCodeToolFromJSON(jsonString) {
|
|
|
187
187
|
}
|
|
188
188
|
/** @internal */
|
|
189
189
|
exports.RetrieveToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
|
|
190
|
-
_id: z.string().default("
|
|
190
|
+
_id: z.string().default("tool_01KWBJ47XCE5V9EXK2JS44T7CG"),
|
|
191
191
|
path: z.string(),
|
|
192
192
|
key: z.string(),
|
|
193
193
|
display_name: z.string().optional(),
|
|
@@ -240,7 +240,7 @@ function retrieveToolResponseBodyToolsSchemaFromJSON(jsonString) {
|
|
|
240
240
|
}
|
|
241
241
|
/** @internal */
|
|
242
242
|
exports.RetrieveToolResponseBodyTools$inboundSchema = z.object({
|
|
243
|
-
id: z.string().default("
|
|
243
|
+
id: z.string().default("01KWBJ47XBGFZT9TFMCP7PPQ11"),
|
|
244
244
|
name: z.string(),
|
|
245
245
|
description: z.string().optional(),
|
|
246
246
|
schema: z.lazy(() => exports.RetrieveToolResponseBodyToolsSchema$inboundSchema),
|
|
@@ -270,7 +270,7 @@ function retrieveToolResponseBodyMcpFromJSON(jsonString) {
|
|
|
270
270
|
}
|
|
271
271
|
/** @internal */
|
|
272
272
|
exports.RetrieveToolResponseBodyMCPTool$inboundSchema = z.object({
|
|
273
|
-
_id: z.string().default("
|
|
273
|
+
_id: z.string().default("tool_01KWBJ47XAG403BMZMYAXK2H0H"),
|
|
274
274
|
path: z.string(),
|
|
275
275
|
key: z.string(),
|
|
276
276
|
display_name: z.string().optional(),
|
|
@@ -357,7 +357,7 @@ function retrieveToolResponseBodyHttpFromJSON(jsonString) {
|
|
|
357
357
|
}
|
|
358
358
|
/** @internal */
|
|
359
359
|
exports.RetrieveToolResponseBodyHTTPTool$inboundSchema = z.object({
|
|
360
|
-
_id: z.string().default("
|
|
360
|
+
_id: z.string().default("tool_01KWBJ47X80GCS08J4A3XNXJHK"),
|
|
361
361
|
path: z.string(),
|
|
362
362
|
key: z.string(),
|
|
363
363
|
display_name: z.string().optional(),
|
|
@@ -407,7 +407,7 @@ function retrieveToolResponseBodyJsonSchemaFromJSON(jsonString) {
|
|
|
407
407
|
}
|
|
408
408
|
/** @internal */
|
|
409
409
|
exports.RetrieveToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
|
|
410
|
-
_id: z.string().default("
|
|
410
|
+
_id: z.string().default("tool_01KWBJ47X6M45PYVBKV7VPCX08"),
|
|
411
411
|
path: z.string(),
|
|
412
412
|
key: z.string(),
|
|
413
413
|
display_name: z.string().optional(),
|
|
@@ -461,7 +461,7 @@ function retrieveToolResponseBodyFunctionFromJSON(jsonString) {
|
|
|
461
461
|
}
|
|
462
462
|
/** @internal */
|
|
463
463
|
exports.RetrieveToolResponseBodyFunctionTool$inboundSchema = z.object({
|
|
464
|
-
_id: z.string().default("
|
|
464
|
+
_id: z.string().default("tool_01KWBJ47X4YYGWCYKTFREWR7JS"),
|
|
465
465
|
path: z.string(),
|
|
466
466
|
key: z.string(),
|
|
467
467
|
display_name: z.string().optional(),
|
|
@@ -1105,7 +1105,7 @@ function agentToolInputRunSchemaToJSON(agentToolInputRunSchema) {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
/** @internal */
|
|
1107
1107
|
exports.Tools$outboundSchema = z.object({
|
|
1108
|
-
id: z.string().default("
|
|
1108
|
+
id: z.string().default("01KWBJ47M8H4T8BT9RCYMQGT20"),
|
|
1109
1109
|
name: z.string(),
|
|
1110
1110
|
description: z.string().optional(),
|
|
1111
1111
|
schema: z.lazy(() => exports.AgentToolInputRunSchema$outboundSchema),
|
|
@@ -1071,7 +1071,7 @@ function streamRunAgentAgentToolInputRunAgentsSchemaToJSON(streamRunAgentAgentTo
|
|
|
1071
1071
|
}
|
|
1072
1072
|
/** @internal */
|
|
1073
1073
|
exports.AgentToolInputRunTools$outboundSchema = z.object({
|
|
1074
|
-
id: z.string().default("
|
|
1074
|
+
id: z.string().default("01KWBJ47PDHGC9KR6JFT3XJGK9"),
|
|
1075
1075
|
name: z.string(),
|
|
1076
1076
|
description: z.string().optional(),
|
|
1077
1077
|
schema: z.lazy(() => exports.StreamRunAgentAgentToolInputRunAgentsSchema$outboundSchema),
|
|
@@ -831,7 +831,7 @@ exports.UpdateDatapointEvaluations3$inboundSchema = z.object({
|
|
|
831
831
|
parent_annotation_id: z.string().optional(),
|
|
832
832
|
explanation: z.string().optional(),
|
|
833
833
|
reviewed_by_id: z.string(),
|
|
834
|
-
reviewed_at: z.string().datetime({ offset: true }).default("2026-06-
|
|
834
|
+
reviewed_at: z.string().datetime({ offset: true }).default("2026-06-30T06:05:40.353Z").transform(v => new Date(v)),
|
|
835
835
|
type: z.literal("string_array"),
|
|
836
836
|
values: z.array(z.string()),
|
|
837
837
|
}).transform((v) => {
|
|
@@ -882,7 +882,7 @@ exports.UpdateDatapointEvaluations2$inboundSchema = z.object({
|
|
|
882
882
|
parent_annotation_id: z.string().optional(),
|
|
883
883
|
explanation: z.string().optional(),
|
|
884
884
|
reviewed_by_id: z.string(),
|
|
885
|
-
reviewed_at: z.string().datetime({ offset: true }).default("2026-06-
|
|
885
|
+
reviewed_at: z.string().datetime({ offset: true }).default("2026-06-30T06:05:40.352Z").transform(v => new Date(v)),
|
|
886
886
|
type: z.literal("number"),
|
|
887
887
|
value: z.number(),
|
|
888
888
|
}).transform((v) => {
|
|
@@ -932,7 +932,7 @@ exports.UpdateDatapointEvaluations1$inboundSchema = z.object({
|
|
|
932
932
|
parent_annotation_id: z.string().optional(),
|
|
933
933
|
explanation: z.string().optional(),
|
|
934
934
|
reviewed_by_id: z.string(),
|
|
935
|
-
reviewed_at: z.string().datetime({ offset: true }).default("2026-06-
|
|
935
|
+
reviewed_at: z.string().datetime({ offset: true }).default("2026-06-30T06:05:40.351Z").transform(v => new Date(v)),
|
|
936
936
|
type: z.literal("string"),
|
|
937
937
|
value: z.string(),
|
|
938
938
|
}).transform((v) => {
|
|
@@ -981,7 +981,7 @@ exports.UpdateDatapointResponseBody$inboundSchema = z.object({
|
|
|
981
981
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
982
982
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
983
983
|
.optional(),
|
|
984
|
-
updated: z.string().datetime({ offset: true }).default("2026-06-
|
|
984
|
+
updated: z.string().datetime({ offset: true }).default("2026-06-30T06:05:20.131Z").transform(v => new Date(v)),
|
|
985
985
|
}).transform((v) => {
|
|
986
986
|
return (0, primitives_js_1.remap)(v, {
|
|
987
987
|
"_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-06-
|
|
98
|
+
updated: z.string().datetime({ offset: true }).default("2026-06-30T06:05:20.131Z").transform(v => new Date(v)),
|
|
99
99
|
}).transform((v) => {
|
|
100
100
|
return (0, primitives_js_1.remap)(v, {
|
|
101
101
|
"_id": "id",
|
|
@@ -80,7 +80,7 @@ function updateDatasourceRequestToJSON(updateDatasourceRequest) {
|
|
|
80
80
|
exports.UpdateDatasourceStatus$inboundSchema = z.nativeEnum(exports.UpdateDatasourceStatus);
|
|
81
81
|
/** @internal */
|
|
82
82
|
exports.UpdateDatasourceResponseBody$inboundSchema = z.object({
|
|
83
|
-
_id: z.string().default("
|
|
83
|
+
_id: z.string().default("01KWBJ480A92Z2QD2NKGWNZV83"),
|
|
84
84
|
display_name: z.string(),
|
|
85
85
|
description: z.nullable(z.string()).optional(),
|
|
86
86
|
status: exports.UpdateDatasourceStatus$inboundSchema,
|
|
@@ -371,7 +371,7 @@ function updateToolRequestBodyToolsSchemaToJSON(updateToolRequestBodyToolsSchema
|
|
|
371
371
|
}
|
|
372
372
|
/** @internal */
|
|
373
373
|
exports.RequestBodyTools$outboundSchema = z.object({
|
|
374
|
-
id: z.string().default("
|
|
374
|
+
id: z.string().default("01KWBJ47WQSMF89DZS5K4EAN1X"),
|
|
375
375
|
name: z.string(),
|
|
376
376
|
description: z.string().optional(),
|
|
377
377
|
schema: z.lazy(() => exports.UpdateToolRequestBodyToolsSchema$outboundSchema),
|
|
@@ -666,7 +666,7 @@ function updateToolResponseBodyCodeToolFromJSON(jsonString) {
|
|
|
666
666
|
}
|
|
667
667
|
/** @internal */
|
|
668
668
|
exports.UpdateToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
|
|
669
|
-
_id: z.string().default("
|
|
669
|
+
_id: z.string().default("tool_01KWBJ47WG888MB2JXZWFBSXDP"),
|
|
670
670
|
path: z.string(),
|
|
671
671
|
key: z.string(),
|
|
672
672
|
display_name: z.string().optional(),
|
|
@@ -719,7 +719,7 @@ function updateToolResponseBodyToolsSchemaFromJSON(jsonString) {
|
|
|
719
719
|
}
|
|
720
720
|
/** @internal */
|
|
721
721
|
exports.UpdateToolResponseBodyTools$inboundSchema = z.object({
|
|
722
|
-
id: z.string().default("
|
|
722
|
+
id: z.string().default("01KWBJ47WFGGRA0Q5PSZJ50ZBB"),
|
|
723
723
|
name: z.string(),
|
|
724
724
|
description: z.string().optional(),
|
|
725
725
|
schema: z.lazy(() => exports.UpdateToolResponseBodyToolsSchema$inboundSchema),
|
|
@@ -749,7 +749,7 @@ function updateToolResponseBodyMcpFromJSON(jsonString) {
|
|
|
749
749
|
}
|
|
750
750
|
/** @internal */
|
|
751
751
|
exports.UpdateToolResponseBodyMCPTool$inboundSchema = z.object({
|
|
752
|
-
_id: z.string().default("
|
|
752
|
+
_id: z.string().default("tool_01KWBJ47WEWVXJD99DH9SVR6JC"),
|
|
753
753
|
path: z.string(),
|
|
754
754
|
key: z.string(),
|
|
755
755
|
display_name: z.string().optional(),
|
|
@@ -836,7 +836,7 @@ function updateToolResponseBodyHttpFromJSON(jsonString) {
|
|
|
836
836
|
}
|
|
837
837
|
/** @internal */
|
|
838
838
|
exports.UpdateToolResponseBodyHTTPTool$inboundSchema = z.object({
|
|
839
|
-
_id: z.string().default("
|
|
839
|
+
_id: z.string().default("tool_01KWBJ47WB9WT4BTHG0ZCWF3YT"),
|
|
840
840
|
path: z.string(),
|
|
841
841
|
key: z.string(),
|
|
842
842
|
display_name: z.string().optional(),
|
|
@@ -886,7 +886,7 @@ function updateToolResponseBodyJsonSchemaFromJSON(jsonString) {
|
|
|
886
886
|
}
|
|
887
887
|
/** @internal */
|
|
888
888
|
exports.UpdateToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
|
|
889
|
-
_id: z.string().default("
|
|
889
|
+
_id: z.string().default("tool_01KWBJ47WAC906HYMABQTCYRKW"),
|
|
890
890
|
path: z.string(),
|
|
891
891
|
key: z.string(),
|
|
892
892
|
display_name: z.string().optional(),
|
|
@@ -940,7 +940,7 @@ function updateToolResponseBodyFunctionFromJSON(jsonString) {
|
|
|
940
940
|
}
|
|
941
941
|
/** @internal */
|
|
942
942
|
exports.UpdateToolResponseBodyFunctionTool$inboundSchema = z.object({
|
|
943
|
-
_id: z.string().default("
|
|
943
|
+
_id: z.string().default("tool_01KWBJ47W8XM0GM84EX3SV5H0F"),
|
|
944
944
|
path: z.string(),
|
|
945
945
|
key: z.string(),
|
|
946
946
|
display_name: z.string().optional(),
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orq-ai/node",
|
|
3
|
-
"version": "4.11.0-rc.
|
|
3
|
+
"version": "4.11.0-rc.58",
|
|
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": {
|
|
13
|
+
"types": "./langchain/index.d.mts",
|
|
13
14
|
"import": "./langchain/index.mjs",
|
|
14
|
-
"require": "./langchain/index.js"
|
|
15
|
-
"types": "./langchain/index.d.mts"
|
|
15
|
+
"require": "./langchain/index.js"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"main": "./index.js",
|
package/sdk/feedback.d.ts
CHANGED
|
@@ -5,10 +5,10 @@ export declare class Feedback extends ClientSDK {
|
|
|
5
5
|
createEvaluation(request?: operations.PostV2FeedbackEvaluationRequestBody | undefined, options?: RequestOptions): Promise<void>;
|
|
6
6
|
remove(request?: operations.PostV2FeedbackRemoveRequestBody | undefined, options?: RequestOptions): Promise<operations.PostV2FeedbackRemoveResponseBody>;
|
|
7
7
|
/**
|
|
8
|
-
* Create
|
|
8
|
+
* Create routing rule
|
|
9
9
|
*
|
|
10
10
|
* @remarks
|
|
11
|
-
* Creates a
|
|
11
|
+
* Creates a new routing rule with expression, models configuration, and priority settings.
|
|
12
12
|
*/
|
|
13
13
|
create(request?: operations.PostV2FeedbackRequestBody | undefined, options?: RequestOptions): Promise<operations.PostV2FeedbackResponseBody>;
|
|
14
14
|
}
|
package/sdk/feedback.js
CHANGED
|
@@ -21,10 +21,10 @@ class Feedback extends sdks_js_1.ClientSDK {
|
|
|
21
21
|
return (0, fp_js_1.unwrapAsync)((0, feedbackRemove_js_1.feedbackRemove)(this, request, options));
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Create
|
|
24
|
+
* Create routing rule
|
|
25
25
|
*
|
|
26
26
|
* @remarks
|
|
27
|
-
* Creates a
|
|
27
|
+
* Creates a new routing rule with expression, models configuration, and priority settings.
|
|
28
28
|
*/
|
|
29
29
|
async create(request, options) {
|
|
30
30
|
return (0, fp_js_1.unwrapAsync)((0, feedbackCreate_js_1.feedbackCreate)(this, request, options));
|
package/src/funcs/apiKeysGet.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
7
|
import { matchStatusCode } from "../lib/http.js";
|
|
8
8
|
import * as M from "../lib/matchers.js";
|
|
9
9
|
import { compactMap } from "../lib/primitives.js";
|
|
@@ -95,6 +95,10 @@ async function $do(
|
|
|
95
95
|
};
|
|
96
96
|
const path = pathToFunc("/v2/api-keys/{api_key_id}")(pathParams);
|
|
97
97
|
|
|
98
|
+
const query = encodeFormQuery({
|
|
99
|
+
"include_budget": payload.include_budget,
|
|
100
|
+
});
|
|
101
|
+
|
|
98
102
|
const headers = new Headers(compactMap({
|
|
99
103
|
Accept: "application/json",
|
|
100
104
|
}));
|
|
@@ -124,6 +128,7 @@ async function $do(
|
|
|
124
128
|
baseURL: options?.serverURL,
|
|
125
129
|
path: path,
|
|
126
130
|
headers: headers,
|
|
131
|
+
query: query,
|
|
127
132
|
body: body,
|
|
128
133
|
userAgent: client._options.userAgent,
|
|
129
134
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
package/src/funcs/apiKeysList.ts
CHANGED
|
@@ -93,6 +93,7 @@ async function $do(
|
|
|
93
93
|
const query = encodeFormQuery({
|
|
94
94
|
"ending_before": payload?.ending_before,
|
|
95
95
|
"filter_by.tags": payload?.["filter_by.tags"],
|
|
96
|
+
"include_budget": payload?.include_budget,
|
|
96
97
|
"include_metrics": payload?.include_metrics,
|
|
97
98
|
"limit": payload?.limit,
|
|
98
99
|
"search": payload?.search,
|
package/src/lib/config.ts
CHANGED
|
@@ -58,7 +58,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
58
58
|
export const SDK_METADATA = {
|
|
59
59
|
language: "typescript",
|
|
60
60
|
openapiDocVersion: "2.0",
|
|
61
|
-
sdkVersion: "4.11.0-rc.
|
|
61
|
+
sdkVersion: "4.11.0-rc.58",
|
|
62
62
|
genVersion: "2.913.3",
|
|
63
|
-
userAgent: "speakeasy-sdk/typescript 4.11.0-rc.
|
|
63
|
+
userAgent: "speakeasy-sdk/typescript 4.11.0-rc.58 2.913.3 2.0 @orq-ai/node",
|
|
64
64
|
} as const;
|
|
@@ -9,6 +9,10 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import { ApiKeyOwner, ApiKeyOwner$inboundSchema } from "./apikeyowner.js";
|
|
11
11
|
import { ApiKeyStatus, ApiKeyStatus$inboundSchema } from "./apikeystatus.js";
|
|
12
|
+
import { BudgetLimits, BudgetLimits$inboundSchema } from "./budgetlimits.js";
|
|
13
|
+
import { BudgetMatch, BudgetMatch$inboundSchema } from "./budgetmatch.js";
|
|
14
|
+
import { BudgetScope, BudgetScope$inboundSchema } from "./budgetscope.js";
|
|
15
|
+
import { BudgetUsage, BudgetUsage$inboundSchema } from "./budgetusage.js";
|
|
12
16
|
import {
|
|
13
17
|
LegacyTokenFamily,
|
|
14
18
|
LegacyTokenFamily$inboundSchema,
|
|
@@ -18,6 +22,69 @@ import {
|
|
|
18
22
|
PermissionMode$inboundSchema,
|
|
19
23
|
} from "./permissionmode.js";
|
|
20
24
|
import { ProjectScope, ProjectScope$inboundSchema } from "./projectscope.js";
|
|
25
|
+
import { RateLimit, RateLimit$inboundSchema } from "./ratelimit.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The budget scoped to this api-key, if one exists. Read-only here:
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* budgets are created and managed through the Budgets API
|
|
32
|
+
* (scope.api_key). Populated only when the read request sets
|
|
33
|
+
* `include_budget`. Live consumption (`usage`) is not attached on this
|
|
34
|
+
* path — call the Budgets API for current spend.
|
|
35
|
+
*/
|
|
36
|
+
export type ApiKeyBudget = {
|
|
37
|
+
budgetId?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Denormalized metadata for UI rendering, list filters, and the
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* resolver's prefilter index. Never consulted for matching — the
|
|
43
|
+
* `match` expression is the single source of matching semantics.
|
|
44
|
+
* Unset for budgets created from a raw CEL expression ("custom").
|
|
45
|
+
*/
|
|
46
|
+
scope?: BudgetScope | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* The matching semantics of the budget. The enforcement resolver
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
* evaluates `match.cel` against the request context; a budget
|
|
52
|
+
* applies to a request if and only if the expression evaluates to
|
|
53
|
+
* true. Scoped creates derive a canonical expression (e.g.
|
|
54
|
+
* `provider == "openai"`); an empty expression always matches
|
|
55
|
+
* (workspace-wide).
|
|
56
|
+
*/
|
|
57
|
+
match?: BudgetMatch | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* BudgetLimits is the per-period spend and token ceiling. At least one
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* of `amount`, `token_limit`, or RateLimit.requests_per_minute MUST be
|
|
63
|
+
* set on a Budget; that invariant is enforced by the handler.
|
|
64
|
+
*/
|
|
65
|
+
limits?: BudgetLimits | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* RateLimit is the per-minute request ceiling. Enforced via atomic
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* increment-first semantics in the enforcement middleware.
|
|
71
|
+
*/
|
|
72
|
+
rateLimit?: RateLimit | undefined;
|
|
73
|
+
isActive?: boolean | undefined;
|
|
74
|
+
expiresAt?: Date | undefined;
|
|
75
|
+
createdAt?: Date | undefined;
|
|
76
|
+
updatedAt?: Date | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Live consumption for the current period, read from the Redis
|
|
79
|
+
*
|
|
80
|
+
* @remarks
|
|
81
|
+
* counters the enforcement gate maintains. Populated by read paths
|
|
82
|
+
* (Get / List); omitted on write responses (Create / Update / Reset)
|
|
83
|
+
* where it carries no signal. Absent or all-zero for a budget that
|
|
84
|
+
* has not been spent against in the current period.
|
|
85
|
+
*/
|
|
86
|
+
usage?: BudgetUsage | undefined;
|
|
87
|
+
};
|
|
21
88
|
|
|
22
89
|
/**
|
|
23
90
|
* ApiKey is the canonical record stored in MongoDB `auth.apiKeys`.
|
|
@@ -112,8 +179,58 @@ export type ApiKey = {
|
|
|
112
179
|
* Used by the adapter to resolve a JWT back to this canonical record.
|
|
113
180
|
*/
|
|
114
181
|
legacyKeyId?: string | undefined;
|
|
182
|
+
/**
|
|
183
|
+
* The budget scoped to this api-key, if one exists. Read-only here:
|
|
184
|
+
*
|
|
185
|
+
* @remarks
|
|
186
|
+
* budgets are created and managed through the Budgets API
|
|
187
|
+
* (scope.api_key). Populated only when the read request sets
|
|
188
|
+
* `include_budget`. Live consumption (`usage`) is not attached on this
|
|
189
|
+
* path — call the Budgets API for current spend.
|
|
190
|
+
*/
|
|
191
|
+
budget?: ApiKeyBudget | undefined;
|
|
115
192
|
};
|
|
116
193
|
|
|
194
|
+
/** @internal */
|
|
195
|
+
export const ApiKeyBudget$inboundSchema: z.ZodType<
|
|
196
|
+
ApiKeyBudget,
|
|
197
|
+
z.ZodTypeDef,
|
|
198
|
+
unknown
|
|
199
|
+
> = z.object({
|
|
200
|
+
budget_id: z.string().optional(),
|
|
201
|
+
scope: BudgetScope$inboundSchema.optional(),
|
|
202
|
+
match: BudgetMatch$inboundSchema.optional(),
|
|
203
|
+
limits: BudgetLimits$inboundSchema.optional(),
|
|
204
|
+
rate_limit: RateLimit$inboundSchema.optional(),
|
|
205
|
+
is_active: z.boolean().optional(),
|
|
206
|
+
expires_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
207
|
+
.optional(),
|
|
208
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
209
|
+
.optional(),
|
|
210
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
211
|
+
.optional(),
|
|
212
|
+
usage: BudgetUsage$inboundSchema.optional(),
|
|
213
|
+
}).transform((v) => {
|
|
214
|
+
return remap$(v, {
|
|
215
|
+
"budget_id": "budgetId",
|
|
216
|
+
"rate_limit": "rateLimit",
|
|
217
|
+
"is_active": "isActive",
|
|
218
|
+
"expires_at": "expiresAt",
|
|
219
|
+
"created_at": "createdAt",
|
|
220
|
+
"updated_at": "updatedAt",
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
export function apiKeyBudgetFromJSON(
|
|
225
|
+
jsonString: string,
|
|
226
|
+
): SafeParseResult<ApiKeyBudget, SDKValidationError> {
|
|
227
|
+
return safeParse(
|
|
228
|
+
jsonString,
|
|
229
|
+
(x) => ApiKeyBudget$inboundSchema.parse(JSON.parse(x)),
|
|
230
|
+
`Failed to parse 'ApiKeyBudget' from JSON`,
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
|
|
117
234
|
/** @internal */
|
|
118
235
|
export const ApiKey$inboundSchema: z.ZodType<ApiKey, z.ZodTypeDef, unknown> = z
|
|
119
236
|
.object({
|
|
@@ -141,6 +258,7 @@ export const ApiKey$inboundSchema: z.ZodType<ApiKey, z.ZodTypeDef, unknown> = z
|
|
|
141
258
|
).optional(),
|
|
142
259
|
legacy_token_family: LegacyTokenFamily$inboundSchema.optional(),
|
|
143
260
|
legacy_key_id: z.string().optional(),
|
|
261
|
+
budget: z.lazy(() => ApiKeyBudget$inboundSchema).optional(),
|
|
144
262
|
}).transform((v) => {
|
|
145
263
|
return remap$(v, {
|
|
146
264
|
"api_key_id": "apiKeyId",
|
|
@@ -1035,8 +1035,8 @@ export const EvaluatorResponseFunction$inboundSchema: z.ZodType<
|
|
|
1035
1035
|
> = z.object({
|
|
1036
1036
|
_id: z.string(),
|
|
1037
1037
|
description: z.string(),
|
|
1038
|
-
created: z.string().default("2026-06-
|
|
1039
|
-
updated: z.string().default("2026-06-
|
|
1038
|
+
created: z.string().default("2026-06-30T06:05:21.250Z"),
|
|
1039
|
+
updated: z.string().default("2026-06-30T06:05:21.250Z"),
|
|
1040
1040
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
1041
1041
|
guardrail_config: z.nullable(
|
|
1042
1042
|
z.union([
|
|
@@ -210,8 +210,8 @@ export const EvaluatorResponseHttp$inboundSchema: z.ZodType<
|
|
|
210
210
|
> = z.object({
|
|
211
211
|
_id: z.string(),
|
|
212
212
|
description: z.string(),
|
|
213
|
-
created: z.string().default("2026-06-
|
|
214
|
-
updated: z.string().default("2026-06-
|
|
213
|
+
created: z.string().default("2026-06-30T06:05:21.250Z"),
|
|
214
|
+
updated: z.string().default("2026-06-30T06:05:21.250Z"),
|
|
215
215
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
216
216
|
guardrail_config: z.nullable(
|
|
217
217
|
z.union([
|
|
@@ -182,8 +182,8 @@ export const EvaluatorResponseJsonSchema$inboundSchema: z.ZodType<
|
|
|
182
182
|
> = z.object({
|
|
183
183
|
_id: z.string(),
|
|
184
184
|
description: z.string(),
|
|
185
|
-
created: z.string().default("2026-06-
|
|
186
|
-
updated: z.string().default("2026-06-
|
|
185
|
+
created: z.string().default("2026-06-30T06:05:21.250Z"),
|
|
186
|
+
updated: z.string().default("2026-06-30T06:05:21.250Z"),
|
|
187
187
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
188
188
|
guardrail_config: z.nullable(
|
|
189
189
|
z.union([
|
|
@@ -399,8 +399,8 @@ export const EvaluatorResponseLlm$inboundSchema: z.ZodType<
|
|
|
399
399
|
> = z.object({
|
|
400
400
|
_id: z.string(),
|
|
401
401
|
description: z.string(),
|
|
402
|
-
created: z.string().default("2026-06-
|
|
403
|
-
updated: z.string().default("2026-06-
|
|
402
|
+
created: z.string().default("2026-06-30T06:05:21.250Z"),
|
|
403
|
+
updated: z.string().default("2026-06-30T06:05:21.250Z"),
|
|
404
404
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
405
405
|
guardrail_config: z.nullable(
|
|
406
406
|
z.union([
|
|
@@ -200,8 +200,8 @@ export const EvaluatorResponsePython$inboundSchema: z.ZodType<
|
|
|
200
200
|
> = z.object({
|
|
201
201
|
_id: z.string(),
|
|
202
202
|
description: z.string(),
|
|
203
|
-
created: z.string().default("2026-06-
|
|
204
|
-
updated: z.string().default("2026-06-
|
|
203
|
+
created: z.string().default("2026-06-30T06:05:21.250Z"),
|
|
204
|
+
updated: z.string().default("2026-06-30T06:05:21.250Z"),
|
|
205
205
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
206
206
|
guardrail_config: z.nullable(
|
|
207
207
|
z.union([
|
|
@@ -221,8 +221,8 @@ export const EvaluatorResponseRagas$inboundSchema: z.ZodType<
|
|
|
221
221
|
> = z.object({
|
|
222
222
|
_id: z.string(),
|
|
223
223
|
description: z.string(),
|
|
224
|
-
created: z.string().default("2026-06-
|
|
225
|
-
updated: z.string().default("2026-06-
|
|
224
|
+
created: z.string().default("2026-06-30T06:05:21.250Z"),
|
|
225
|
+
updated: z.string().default("2026-06-30T06:05:21.250Z"),
|
|
226
226
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
227
227
|
guardrail_config: z.nullable(
|
|
228
228
|
z.union([
|
|
@@ -209,8 +209,8 @@ export const EvaluatorResponseTypescript$inboundSchema: z.ZodType<
|
|
|
209
209
|
> = z.object({
|
|
210
210
|
_id: z.string(),
|
|
211
211
|
description: z.string(),
|
|
212
|
-
created: z.string().default("2026-06-
|
|
213
|
-
updated: z.string().default("2026-06-
|
|
212
|
+
created: z.string().default("2026-06-30T06:05:21.250Z"),
|
|
213
|
+
updated: z.string().default("2026-06-30T06:05:21.250Z"),
|
|
214
214
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
215
215
|
guardrail_config: z.nullable(
|
|
216
216
|
z.union([
|