@orq-ai/node 4.12.0-rc.34 → 4.12.0-rc.37
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/README.md +55 -36
- package/funcs/knowledgeListDatasources.js +1 -0
- package/funcs/knowledgeListDatasources.js.map +1 -1
- package/funcs/webhooksCount.d.ts +17 -0
- package/funcs/webhooksCount.d.ts.map +1 -0
- package/funcs/webhooksCount.js +105 -0
- package/funcs/webhooksCount.js.map +1 -0
- package/funcs/webhooksCreate.d.ts +17 -0
- package/funcs/webhooksCreate.d.ts.map +1 -0
- package/funcs/webhooksCreate.js +115 -0
- package/funcs/webhooksCreate.js.map +1 -0
- package/funcs/webhooksDelete.d.ts +18 -0
- package/funcs/webhooksDelete.d.ts.map +1 -0
- package/funcs/webhooksDelete.js +121 -0
- package/funcs/webhooksDelete.js.map +1 -0
- package/funcs/webhooksGenerateSecret.d.ts +17 -0
- package/funcs/webhooksGenerateSecret.d.ts.map +1 -0
- package/funcs/webhooksGenerateSecret.js +105 -0
- package/funcs/webhooksGenerateSecret.js.map +1 -0
- package/funcs/webhooksGet.d.ts +18 -0
- package/funcs/webhooksGet.d.ts.map +1 -0
- package/funcs/webhooksGet.js +121 -0
- package/funcs/webhooksGet.js.map +1 -0
- package/funcs/webhooksList.d.ts +18 -0
- package/funcs/webhooksList.d.ts.map +1 -0
- package/funcs/webhooksList.js +126 -0
- package/funcs/webhooksList.js.map +1 -0
- package/funcs/webhooksQuery.d.ts +19 -0
- package/funcs/webhooksQuery.d.ts.map +1 -0
- package/funcs/webhooksQuery.js +117 -0
- package/funcs/webhooksQuery.js.map +1 -0
- package/funcs/webhooksUpdate.d.ts +17 -0
- package/funcs/webhooksUpdate.d.ts.map +1 -0
- package/funcs/webhooksUpdate.js +121 -0
- package/funcs/webhooksUpdate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/countwebhooksresponse.d.ts +16 -0
- package/models/components/countwebhooksresponse.d.ts.map +1 -0
- package/models/components/countwebhooksresponse.js +50 -0
- package/models/components/countwebhooksresponse.js.map +1 -0
- package/models/components/createwebhookrequest.d.ts +62 -0
- package/models/components/createwebhookrequest.d.ts.map +1 -0
- package/models/components/createwebhookrequest.js +71 -0
- package/models/components/createwebhookrequest.js.map +1 -0
- package/models/components/deletewebhookresponse.d.ts +13 -0
- package/models/components/deletewebhookresponse.d.ts.map +1 -0
- package/models/components/deletewebhookresponse.js +50 -0
- package/models/components/deletewebhookresponse.js.map +1 -0
- 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/generatewebhooksecretresponse.d.ts +16 -0
- package/models/components/generatewebhooksecretresponse.d.ts.map +1 -0
- package/models/components/generatewebhooksecretresponse.js +50 -0
- package/models/components/generatewebhooksecretresponse.js.map +1 -0
- package/models/components/index.d.ts +10 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +10 -0
- package/models/components/index.js.map +1 -1
- package/models/components/listwebhooksresponse.d.ts +25 -0
- package/models/components/listwebhooksresponse.d.ts.map +1 -0
- package/models/components/listwebhooksresponse.js +58 -0
- package/models/components/listwebhooksresponse.js.map +1 -0
- package/models/components/queryparamspagination.d.ts +18 -0
- package/models/components/queryparamspagination.d.ts.map +1 -0
- package/models/components/queryparamspagination.js +52 -0
- package/models/components/queryparamspagination.js.map +1 -0
- package/models/components/queryparamssort.d.ts +14 -0
- package/models/components/queryparamssort.d.ts.map +1 -0
- package/models/components/queryparamssort.js +50 -0
- package/models/components/queryparamssort.js.map +1 -0
- package/models/components/querywebhooksrequest.d.ts +38 -0
- package/models/components/querywebhooksrequest.d.ts.map +1 -0
- package/models/components/querywebhooksrequest.js +67 -0
- package/models/components/querywebhooksrequest.js.map +1 -0
- package/models/components/querywebhooksresponse.d.ts +12 -0
- package/models/components/querywebhooksresponse.d.ts.map +1 -0
- package/models/components/querywebhooksresponse.js +52 -0
- package/models/components/querywebhooksresponse.js.map +1 -0
- package/models/components/reasoningpart.js +1 -1
- package/models/components/webhook.d.ts +74 -0
- package/models/components/webhook.d.ts.map +1 -0
- package/models/components/webhook.js +81 -0
- package/models/components/webhook.js.map +1 -0
- package/models/operations/createagentrequest.d.ts +1 -1
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +1 -1
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +5 -5
- package/models/operations/createdatasource.d.ts +42 -0
- package/models/operations/createdatasource.d.ts.map +1 -1
- package/models/operations/createdatasource.js +26 -2
- package/models/operations/createdatasource.js.map +1 -1
- package/models/operations/createrouterresponse.d.ts +34 -4
- package/models/operations/createrouterresponse.d.ts.map +1 -1
- package/models/operations/createrouterresponse.js +18 -3
- package/models/operations/createrouterresponse.js.map +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/index.d.ts +4 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +4 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listagents.d.ts +1 -1
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +1 -1
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +5 -5
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.d.ts +48 -0
- package/models/operations/listdatasources.d.ts.map +1 -1
- package/models/operations/listdatasources.js +33 -2
- package/models/operations/listdatasources.js.map +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/retrieveagentrequest.d.ts +1 -1
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +1 -1
- package/models/operations/retrieveagentrequest.js.map +1 -1
- package/models/operations/retrievedatapoint.js +5 -5
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.d.ts +33 -0
- package/models/operations/retrievedatasource.d.ts.map +1 -1
- package/models/operations/retrievedatasource.js +25 -2
- package/models/operations/retrievedatasource.js.map +1 -1
- package/models/operations/retrieveresponse.d.ts +4 -4
- package/models/operations/retrieveresponse.d.ts.map +1 -1
- package/models/operations/retrieveresponse.js +4 -4
- package/models/operations/retrieveresponse.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/updateagent.d.ts +1 -1
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +1 -1
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatedatapoint.js +5 -5
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.d.ts +33 -0
- package/models/operations/updatedatasource.d.ts.map +1 -1
- package/models/operations/updatedatasource.js +25 -2
- package/models/operations/updatedatasource.js.map +1 -1
- package/models/operations/updatetool.js +7 -7
- package/models/operations/webhookdelete.d.ts +12 -0
- package/models/operations/webhookdelete.d.ts.map +1 -0
- package/models/operations/webhookdelete.js +49 -0
- package/models/operations/webhookdelete.js.map +1 -0
- package/models/operations/webhookget.d.ts +12 -0
- package/models/operations/webhookget.d.ts.map +1 -0
- package/models/operations/webhookget.js +49 -0
- package/models/operations/webhookget.js.map +1 -0
- package/models/operations/webhooklist.d.ts +70 -0
- package/models/operations/webhooklist.d.ts.map +1 -0
- package/models/operations/webhooklist.js +61 -0
- package/models/operations/webhooklist.js.map +1 -0
- package/models/operations/webhookupdate.d.ts +29 -0
- package/models/operations/webhookupdate.d.ts.map +1 -0
- package/models/operations/webhookupdate.js +68 -0
- package/models/operations/webhookupdate.js.map +1 -0
- package/package.json +5 -5
- package/sdk/feedback.d.ts +2 -2
- package/sdk/feedback.js +2 -2
- package/sdk/humanreviewsets.d.ts +1 -4
- package/sdk/humanreviewsets.d.ts.map +1 -1
- package/sdk/humanreviewsets.js +1 -4
- package/sdk/humanreviewsets.js.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/webhooks.d.ts +64 -0
- package/sdk/webhooks.d.ts.map +1 -0
- package/sdk/webhooks.js +94 -0
- package/sdk/webhooks.js.map +1 -0
- package/src/funcs/knowledgeListDatasources.ts +1 -0
- package/src/funcs/webhooksCount.ts +144 -0
- package/src/funcs/webhooksCreate.ts +162 -0
- package/src/funcs/webhooksDelete.ts +168 -0
- package/src/funcs/webhooksGenerateSecret.ts +144 -0
- package/src/funcs/webhooksGet.ts +168 -0
- package/src/funcs/webhooksList.ts +175 -0
- package/src/funcs/webhooksQuery.ts +164 -0
- package/src/funcs/webhooksUpdate.ts +168 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/countwebhooksresponse.ts +37 -0
- package/src/models/components/createwebhookrequest.ts +100 -0
- package/src/models/components/deletewebhookresponse.ts +34 -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/generatewebhooksecretresponse.ts +37 -0
- package/src/models/components/index.ts +10 -0
- package/src/models/components/listwebhooksresponse.ts +53 -0
- package/src/models/components/queryparamspagination.ts +40 -0
- package/src/models/components/queryparamssort.ts +32 -0
- package/src/models/components/querywebhooksrequest.ts +85 -0
- package/src/models/components/querywebhooksresponse.ts +34 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/webhook.ts +116 -0
- package/src/models/operations/createagentrequest.ts +2 -2
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +5 -5
- package/src/models/operations/createdatasource.ts +78 -2
- package/src/models/operations/createrouterresponse.ts +41 -5
- 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/index.ts +4 -0
- package/src/models/operations/listagents.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +5 -5
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +99 -2
- 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/retrieveagentrequest.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +5 -5
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +72 -2
- package/src/models/operations/retrieveresponse.ts +8 -8
- 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/updateagent.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +5 -5
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +72 -2
- package/src/models/operations/updatetool.ts +7 -7
- package/src/models/operations/webhookdelete.ts +31 -0
- package/src/models/operations/webhookget.ts +31 -0
- package/src/models/operations/webhooklist.ts +101 -0
- package/src/models/operations/webhookupdate.ts +84 -0
- package/src/sdk/feedback.ts +2 -2
- package/src/sdk/humanreviewsets.ts +1 -4
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/webhooks.ts +152 -0
|
@@ -766,7 +766,7 @@ export const DataCodeExecutionTool$inboundSchema: z.ZodType<
|
|
|
766
766
|
z.ZodTypeDef,
|
|
767
767
|
unknown
|
|
768
768
|
> = z.object({
|
|
769
|
-
_id: z.string().default("
|
|
769
|
+
_id: z.string().default("tool_01KXQVMWH54T812X0VQ64NHGA4"),
|
|
770
770
|
path: z.string(),
|
|
771
771
|
key: z.string(),
|
|
772
772
|
display_name: z.string().optional(),
|
|
@@ -863,7 +863,7 @@ export const DataTools$inboundSchema: z.ZodType<
|
|
|
863
863
|
z.ZodTypeDef,
|
|
864
864
|
unknown
|
|
865
865
|
> = z.object({
|
|
866
|
-
id: z.string().default("
|
|
866
|
+
id: z.string().default("01KXQVMWH30E2HE9Z2QXBGTR8D"),
|
|
867
867
|
name: z.string(),
|
|
868
868
|
description: z.string().optional(),
|
|
869
869
|
schema: z.lazy(() => GetAllToolsDataSchema$inboundSchema),
|
|
@@ -916,7 +916,7 @@ export const DataMCPTool$inboundSchema: z.ZodType<
|
|
|
916
916
|
z.ZodTypeDef,
|
|
917
917
|
unknown
|
|
918
918
|
> = z.object({
|
|
919
|
-
_id: z.string().default("
|
|
919
|
+
_id: z.string().default("tool_01KXQVMWH22B1HJ9D7N1NQR86S"),
|
|
920
920
|
path: z.string(),
|
|
921
921
|
key: z.string(),
|
|
922
922
|
display_name: z.string().optional(),
|
|
@@ -1100,7 +1100,7 @@ export const DataHTTPTool$inboundSchema: z.ZodType<
|
|
|
1100
1100
|
z.ZodTypeDef,
|
|
1101
1101
|
unknown
|
|
1102
1102
|
> = z.object({
|
|
1103
|
-
_id: z.string().default("
|
|
1103
|
+
_id: z.string().default("tool_01KXQVMWH0H6AED8H5EWNX4F3V"),
|
|
1104
1104
|
path: z.string(),
|
|
1105
1105
|
key: z.string(),
|
|
1106
1106
|
display_name: z.string().optional(),
|
|
@@ -1193,7 +1193,7 @@ export const DataJSONSchemaTool$inboundSchema: z.ZodType<
|
|
|
1193
1193
|
z.ZodTypeDef,
|
|
1194
1194
|
unknown
|
|
1195
1195
|
> = z.object({
|
|
1196
|
-
_id: z.string().default("
|
|
1196
|
+
_id: z.string().default("tool_01KXQVMWGYJ9R9PTCN8RCT0PSD"),
|
|
1197
1197
|
path: z.string(),
|
|
1198
1198
|
key: z.string(),
|
|
1199
1199
|
display_name: z.string().optional(),
|
|
@@ -1291,7 +1291,7 @@ export const DataFunctionTool$inboundSchema: z.ZodType<
|
|
|
1291
1291
|
z.ZodTypeDef,
|
|
1292
1292
|
unknown
|
|
1293
1293
|
> = z.object({
|
|
1294
|
-
_id: z.string().default("
|
|
1294
|
+
_id: z.string().default("tool_01KXQVMWGVBDFHPHGRP2H6Z0PW"),
|
|
1295
1295
|
path: z.string(),
|
|
1296
1296
|
key: z.string(),
|
|
1297
1297
|
display_name: z.string().optional(),
|
|
@@ -140,7 +140,7 @@ export const GetV2HumanEvalSetsResponseBody2$inboundSchema: z.ZodType<
|
|
|
140
140
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
141
141
|
.optional(),
|
|
142
142
|
updated: z.string().datetime({ offset: true }).default(
|
|
143
|
-
"2026-07-
|
|
143
|
+
"2026-07-17T10:58:19.597Z",
|
|
144
144
|
).transform(v => new Date(v)),
|
|
145
145
|
filter_type: z.literal("name"),
|
|
146
146
|
filter_value: z.string(),
|
|
@@ -185,7 +185,7 @@ export const GetV2HumanEvalSetsResponseBody1$inboundSchema: z.ZodType<
|
|
|
185
185
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
186
186
|
.optional(),
|
|
187
187
|
updated: z.string().datetime({ offset: true }).default(
|
|
188
|
-
"2026-07-
|
|
188
|
+
"2026-07-17T10:58:19.597Z",
|
|
189
189
|
).transform(v => new Date(v)),
|
|
190
190
|
filter_type: z.literal("span_type"),
|
|
191
191
|
filter_values: z.array(z.string()),
|
|
@@ -141,7 +141,7 @@ export const GetV2HumanEvalSetsIdResponseBody2$inboundSchema: z.ZodType<
|
|
|
141
141
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
142
142
|
.optional(),
|
|
143
143
|
updated: z.string().datetime({ offset: true }).default(
|
|
144
|
-
"2026-07-
|
|
144
|
+
"2026-07-17T10:58:19.597Z",
|
|
145
145
|
).transform(v => new Date(v)),
|
|
146
146
|
filter_type: z.literal("name"),
|
|
147
147
|
filter_value: z.string(),
|
|
@@ -186,7 +186,7 @@ export const GetV2HumanEvalSetsIdResponseBody1$inboundSchema: z.ZodType<
|
|
|
186
186
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
187
187
|
.optional(),
|
|
188
188
|
updated: z.string().datetime({ offset: true }).default(
|
|
189
|
-
"2026-07-
|
|
189
|
+
"2026-07-17T10:58:19.597Z",
|
|
190
190
|
).transform(v => new Date(v)),
|
|
191
191
|
filter_type: z.literal("span_type"),
|
|
192
192
|
filter_values: z.array(z.string()),
|
|
@@ -187,3 +187,7 @@ export * from "./updatememorydocument.js";
|
|
|
187
187
|
export * from "./updatememorystore.js";
|
|
188
188
|
export * from "./updateprompt.js";
|
|
189
189
|
export * from "./updatetool.js";
|
|
190
|
+
export * from "./webhookdelete.js";
|
|
191
|
+
export * from "./webhookget.js";
|
|
192
|
+
export * from "./webhooklist.js";
|
|
193
|
+
export * from "./webhookupdate.js";
|
|
@@ -1282,7 +1282,7 @@ export type ListAgentsData = {
|
|
|
1282
1282
|
/**
|
|
1283
1283
|
* List of skills that the agent can utilize. This field allows you to specify which skills the agent has access to, enabling more complex and dynamic behavior.
|
|
1284
1284
|
*/
|
|
1285
|
-
skills
|
|
1285
|
+
skills?: Array<string> | undefined;
|
|
1286
1286
|
metrics?: ListAgentsMetrics | undefined;
|
|
1287
1287
|
/**
|
|
1288
1288
|
* Extracted variables from agent instructions
|
|
@@ -2957,7 +2957,7 @@ export const ListAgentsData$inboundSchema: z.ZodType<
|
|
|
2957
2957
|
memory_stores: z.array(z.string()).optional(),
|
|
2958
2958
|
team_of_agents: z.array(z.lazy(() => ListAgentsTeamOfAgents$inboundSchema))
|
|
2959
2959
|
.optional(),
|
|
2960
|
-
skills: z.array(z.string()),
|
|
2960
|
+
skills: z.array(z.string()).optional(),
|
|
2961
2961
|
metrics: z.lazy(() => ListAgentsMetrics$inboundSchema).optional(),
|
|
2962
2962
|
variables: z.record(z.any()).optional(),
|
|
2963
2963
|
knowledge_bases: z.array(z.lazy(() => ListAgentsKnowledgeBases$inboundSchema))
|
|
@@ -1647,7 +1647,7 @@ export const ListDatasetDatapointsEvaluations4$inboundSchema: z.ZodType<
|
|
|
1647
1647
|
explanation: z.string().optional(),
|
|
1648
1648
|
reviewed_by_id: z.string(),
|
|
1649
1649
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
1650
|
-
"2026-07-
|
|
1650
|
+
"2026-07-17T10:58:38.013Z",
|
|
1651
1651
|
).transform(v => new Date(v)),
|
|
1652
1652
|
type: z.literal("string_array"),
|
|
1653
1653
|
values: z.array(z.string()),
|
|
@@ -1743,7 +1743,7 @@ export const ListDatasetDatapointsEvaluations3$inboundSchema: z.ZodType<
|
|
|
1743
1743
|
explanation: z.string().optional(),
|
|
1744
1744
|
reviewed_by_id: z.string(),
|
|
1745
1745
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
1746
|
-
"2026-07-
|
|
1746
|
+
"2026-07-17T10:58:38.012Z",
|
|
1747
1747
|
).transform(v => new Date(v)),
|
|
1748
1748
|
type: z.literal("boolean"),
|
|
1749
1749
|
value: z.boolean(),
|
|
@@ -1847,7 +1847,7 @@ export const ListDatasetDatapointsEvaluations2$inboundSchema: z.ZodType<
|
|
|
1847
1847
|
explanation: z.string().optional(),
|
|
1848
1848
|
reviewed_by_id: z.string(),
|
|
1849
1849
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
1850
|
-
"2026-07-
|
|
1850
|
+
"2026-07-17T10:58:38.011Z",
|
|
1851
1851
|
).transform(v => new Date(v)),
|
|
1852
1852
|
type: z.literal("number"),
|
|
1853
1853
|
value: z.number(),
|
|
@@ -1953,7 +1953,7 @@ export const ListDatasetDatapointsEvaluations1$inboundSchema: z.ZodType<
|
|
|
1953
1953
|
explanation: z.string().optional(),
|
|
1954
1954
|
reviewed_by_id: z.string(),
|
|
1955
1955
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
1956
|
-
"2026-07-
|
|
1956
|
+
"2026-07-17T10:58:38.009Z",
|
|
1957
1957
|
).transform(v => new Date(v)),
|
|
1958
1958
|
type: z.literal("string"),
|
|
1959
1959
|
value: z.string(),
|
|
@@ -2036,7 +2036,7 @@ export const ListDatasetDatapointsData$inboundSchema: z.ZodType<
|
|
|
2036
2036
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
2037
2037
|
.optional(),
|
|
2038
2038
|
updated: z.string().datetime({ offset: true }).default(
|
|
2039
|
-
"2026-07-
|
|
2039
|
+
"2026-07-17T10:58:19.597Z",
|
|
2040
2040
|
).transform(v => new Date(v)),
|
|
2041
2041
|
}).transform((v) => {
|
|
2042
2042
|
return remap$(v, {
|
|
@@ -169,7 +169,7 @@ export const ListDatasetsData$inboundSchema: z.ZodType<
|
|
|
169
169
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
170
170
|
.optional(),
|
|
171
171
|
updated: z.string().datetime({ offset: true }).default(
|
|
172
|
-
"2026-07-
|
|
172
|
+
"2026-07-17T10:58:19.597Z",
|
|
173
173
|
).transform(v => new Date(v)),
|
|
174
174
|
}).transform((v) => {
|
|
175
175
|
return remap$(v, {
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
collectExtraKeys as collectExtraKeys$,
|
|
9
|
+
safeParse,
|
|
10
|
+
} from "../../lib/schemas.js";
|
|
8
11
|
import { ClosedEnum } from "../../types/enums.js";
|
|
9
12
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
13
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
@@ -14,6 +17,8 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
14
17
|
*/
|
|
15
18
|
export type ListDatasourcesQueryParamStatus = Array<string> | string;
|
|
16
19
|
|
|
20
|
+
export type QueryParamMetadata = string | number | boolean;
|
|
21
|
+
|
|
17
22
|
export type ListDatasourcesRequest = {
|
|
18
23
|
/**
|
|
19
24
|
* Unique identifier of the knowledge base
|
|
@@ -39,6 +44,10 @@ export type ListDatasourcesRequest = {
|
|
|
39
44
|
* Filter datasources by status.
|
|
40
45
|
*/
|
|
41
46
|
status?: Array<string> | string | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Filter datasources by exact metadata key/value pairs. Provide a JSON-encoded object when calling this endpoint over HTTP.
|
|
49
|
+
*/
|
|
50
|
+
metadata?: { [k: string]: string | number | boolean | null } | undefined;
|
|
42
51
|
};
|
|
43
52
|
|
|
44
53
|
export const ListDatasourcesObject = {
|
|
@@ -55,6 +64,34 @@ export const ListDatasourcesStatus = {
|
|
|
55
64
|
} as const;
|
|
56
65
|
export type ListDatasourcesStatus = ClosedEnum<typeof ListDatasourcesStatus>;
|
|
57
66
|
|
|
67
|
+
export type ListDatasourcesMetadata = {
|
|
68
|
+
/**
|
|
69
|
+
* Number of words in the text
|
|
70
|
+
*/
|
|
71
|
+
wordsCount?: number | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Number of sentences in the text
|
|
74
|
+
*/
|
|
75
|
+
sentencesCount?: number | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Number of paragraphs in the text
|
|
78
|
+
*/
|
|
79
|
+
paragraphsCount?: number | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Number of tokens in the text
|
|
82
|
+
*/
|
|
83
|
+
tokensCount?: number | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Number of characters in the text
|
|
86
|
+
*/
|
|
87
|
+
charactersCount?: number | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Number of total chunks
|
|
90
|
+
*/
|
|
91
|
+
chunksCount?: number | undefined;
|
|
92
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
93
|
+
};
|
|
94
|
+
|
|
58
95
|
export type ListDatasourcesData = {
|
|
59
96
|
/**
|
|
60
97
|
* The unique identifier of the data source
|
|
@@ -97,6 +134,7 @@ export type ListDatasourcesData = {
|
|
|
97
134
|
* The number of chunks in the datasource
|
|
98
135
|
*/
|
|
99
136
|
chunksCount: number;
|
|
137
|
+
metadata: ListDatasourcesMetadata;
|
|
100
138
|
};
|
|
101
139
|
|
|
102
140
|
/**
|
|
@@ -128,6 +166,24 @@ export function listDatasourcesQueryParamStatusToJSON(
|
|
|
128
166
|
);
|
|
129
167
|
}
|
|
130
168
|
|
|
169
|
+
/** @internal */
|
|
170
|
+
export type QueryParamMetadata$Outbound = string | number | boolean;
|
|
171
|
+
|
|
172
|
+
/** @internal */
|
|
173
|
+
export const QueryParamMetadata$outboundSchema: z.ZodType<
|
|
174
|
+
QueryParamMetadata$Outbound,
|
|
175
|
+
z.ZodTypeDef,
|
|
176
|
+
QueryParamMetadata
|
|
177
|
+
> = z.union([z.string(), z.number(), z.boolean()]);
|
|
178
|
+
|
|
179
|
+
export function queryParamMetadataToJSON(
|
|
180
|
+
queryParamMetadata: QueryParamMetadata,
|
|
181
|
+
): string {
|
|
182
|
+
return JSON.stringify(
|
|
183
|
+
QueryParamMetadata$outboundSchema.parse(queryParamMetadata),
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
131
187
|
/** @internal */
|
|
132
188
|
export type ListDatasourcesRequest$Outbound = {
|
|
133
189
|
knowledge_id: string;
|
|
@@ -136,6 +192,7 @@ export type ListDatasourcesRequest$Outbound = {
|
|
|
136
192
|
q?: string | undefined;
|
|
137
193
|
limit: number;
|
|
138
194
|
status?: Array<string> | string | undefined;
|
|
195
|
+
metadata?: { [k: string]: string | number | boolean | null } | undefined;
|
|
139
196
|
};
|
|
140
197
|
|
|
141
198
|
/** @internal */
|
|
@@ -150,6 +207,8 @@ export const ListDatasourcesRequest$outboundSchema: z.ZodType<
|
|
|
150
207
|
q: z.string().optional(),
|
|
151
208
|
limit: z.number().default(50),
|
|
152
209
|
status: z.union([z.array(z.string()), z.string()]).optional(),
|
|
210
|
+
metadata: z.record(z.nullable(z.union([z.string(), z.number(), z.boolean()])))
|
|
211
|
+
.optional(),
|
|
153
212
|
}).transform((v) => {
|
|
154
213
|
return remap$(v, {
|
|
155
214
|
knowledgeId: "knowledge_id",
|
|
@@ -176,13 +235,50 @@ export const ListDatasourcesStatus$inboundSchema: z.ZodNativeEnum<
|
|
|
176
235
|
typeof ListDatasourcesStatus
|
|
177
236
|
> = z.nativeEnum(ListDatasourcesStatus);
|
|
178
237
|
|
|
238
|
+
/** @internal */
|
|
239
|
+
export const ListDatasourcesMetadata$inboundSchema: z.ZodType<
|
|
240
|
+
ListDatasourcesMetadata,
|
|
241
|
+
z.ZodTypeDef,
|
|
242
|
+
unknown
|
|
243
|
+
> = collectExtraKeys$(
|
|
244
|
+
z.object({
|
|
245
|
+
words_count: z.number().optional(),
|
|
246
|
+
sentences_count: z.number().optional(),
|
|
247
|
+
paragraphs_count: z.number().optional(),
|
|
248
|
+
tokens_count: z.number().optional(),
|
|
249
|
+
characters_count: z.number().optional(),
|
|
250
|
+
chunks_count: z.number().optional(),
|
|
251
|
+
}).catchall(z.any()),
|
|
252
|
+
"additionalProperties",
|
|
253
|
+
true,
|
|
254
|
+
).transform((v) => {
|
|
255
|
+
return remap$(v, {
|
|
256
|
+
"words_count": "wordsCount",
|
|
257
|
+
"sentences_count": "sentencesCount",
|
|
258
|
+
"paragraphs_count": "paragraphsCount",
|
|
259
|
+
"tokens_count": "tokensCount",
|
|
260
|
+
"characters_count": "charactersCount",
|
|
261
|
+
"chunks_count": "chunksCount",
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
export function listDatasourcesMetadataFromJSON(
|
|
266
|
+
jsonString: string,
|
|
267
|
+
): SafeParseResult<ListDatasourcesMetadata, SDKValidationError> {
|
|
268
|
+
return safeParse(
|
|
269
|
+
jsonString,
|
|
270
|
+
(x) => ListDatasourcesMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
271
|
+
`Failed to parse 'ListDatasourcesMetadata' from JSON`,
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
|
|
179
275
|
/** @internal */
|
|
180
276
|
export const ListDatasourcesData$inboundSchema: z.ZodType<
|
|
181
277
|
ListDatasourcesData,
|
|
182
278
|
z.ZodTypeDef,
|
|
183
279
|
unknown
|
|
184
280
|
> = z.object({
|
|
185
|
-
_id: z.string().default("
|
|
281
|
+
_id: z.string().default("01KXQVMWQDXW6JEJ1JQW9C6WPW"),
|
|
186
282
|
display_name: z.string(),
|
|
187
283
|
description: z.nullable(z.string()).optional(),
|
|
188
284
|
status: ListDatasourcesStatus$inboundSchema,
|
|
@@ -193,6 +289,7 @@ export const ListDatasourcesData$inboundSchema: z.ZodType<
|
|
|
193
289
|
update_by_id: z.nullable(z.string()).optional(),
|
|
194
290
|
knowledge_id: z.string(),
|
|
195
291
|
chunks_count: z.number(),
|
|
292
|
+
metadata: z.lazy(() => ListDatasourcesMetadata$inboundSchema),
|
|
196
293
|
}).transform((v) => {
|
|
197
294
|
return remap$(v, {
|
|
198
295
|
"_id": "id",
|
|
@@ -318,7 +318,7 @@ export const PatchV2HumanEvalSetsIdResponseBody2$inboundSchema: z.ZodType<
|
|
|
318
318
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
319
319
|
.optional(),
|
|
320
320
|
updated: z.string().datetime({ offset: true }).default(
|
|
321
|
-
"2026-07-
|
|
321
|
+
"2026-07-17T10:58:19.597Z",
|
|
322
322
|
).transform(v => new Date(v)),
|
|
323
323
|
filter_type: z.literal("name"),
|
|
324
324
|
filter_value: z.string(),
|
|
@@ -364,7 +364,7 @@ export const PatchV2HumanEvalSetsIdResponseBody1$inboundSchema: z.ZodType<
|
|
|
364
364
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
365
365
|
.optional(),
|
|
366
366
|
updated: z.string().datetime({ offset: true }).default(
|
|
367
|
-
"2026-07-
|
|
367
|
+
"2026-07-17T10:58:19.597Z",
|
|
368
368
|
).transform(v => new Date(v)),
|
|
369
369
|
filter_type: z.literal("span_type"),
|
|
370
370
|
filter_values: z.array(z.string()),
|
|
@@ -245,7 +245,7 @@ export const RequestBody4$outboundSchema: z.ZodType<
|
|
|
245
245
|
PostV2FeedbackEvaluationRequestBodyFeedbackRequestSource$outboundSchema
|
|
246
246
|
.default("orq"),
|
|
247
247
|
explanation: z.string().optional(),
|
|
248
|
-
reviewedAt: z.date().default(() => new Date("2026-07-
|
|
248
|
+
reviewedAt: z.date().default(() => new Date("2026-07-17T10:58:38.198Z"))
|
|
249
249
|
.transform(v => v.toISOString()),
|
|
250
250
|
type: z.literal("string_array"),
|
|
251
251
|
values: z.array(z.string()),
|
|
@@ -299,7 +299,7 @@ export const RequestBody3$outboundSchema: z.ZodType<
|
|
|
299
299
|
source: PostV2FeedbackEvaluationRequestBodyFeedbackSource$outboundSchema
|
|
300
300
|
.default("orq"),
|
|
301
301
|
explanation: z.string().optional(),
|
|
302
|
-
reviewedAt: z.date().default(() => new Date("2026-07-
|
|
302
|
+
reviewedAt: z.date().default(() => new Date("2026-07-17T10:58:38.198Z"))
|
|
303
303
|
.transform(v => v.toISOString()),
|
|
304
304
|
type: z.literal("boolean"),
|
|
305
305
|
value: z.boolean(),
|
|
@@ -353,7 +353,7 @@ export const PostV2FeedbackEvaluationRequestBody2$outboundSchema: z.ZodType<
|
|
|
353
353
|
"orq",
|
|
354
354
|
),
|
|
355
355
|
explanation: z.string().optional(),
|
|
356
|
-
reviewedAt: z.date().default(() => new Date("2026-07-
|
|
356
|
+
reviewedAt: z.date().default(() => new Date("2026-07-17T10:58:38.197Z"))
|
|
357
357
|
.transform(v => v.toISOString()),
|
|
358
358
|
type: z.literal("number"),
|
|
359
359
|
value: z.number(),
|
|
@@ -411,7 +411,7 @@ export const PostV2FeedbackEvaluationRequestBody1$outboundSchema: z.ZodType<
|
|
|
411
411
|
humanReviewId: z.string().optional(),
|
|
412
412
|
source: RequestBodySource$outboundSchema.default("orq"),
|
|
413
413
|
explanation: z.string().optional(),
|
|
414
|
-
reviewedAt: z.date().default(() => new Date("2026-07-
|
|
414
|
+
reviewedAt: z.date().default(() => new Date("2026-07-17T10:58:38.196Z"))
|
|
415
415
|
.transform(v => v.toISOString()),
|
|
416
416
|
type: z.literal("string"),
|
|
417
417
|
value: z.string(),
|
|
@@ -271,7 +271,7 @@ export const PostV2HumanEvalSetsResponseBody2$inboundSchema: z.ZodType<
|
|
|
271
271
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
272
272
|
.optional(),
|
|
273
273
|
updated: z.string().datetime({ offset: true }).default(
|
|
274
|
-
"2026-07-
|
|
274
|
+
"2026-07-17T10:58:19.597Z",
|
|
275
275
|
).transform(v => new Date(v)),
|
|
276
276
|
filter_type: z.literal("name"),
|
|
277
277
|
filter_value: z.string(),
|
|
@@ -316,7 +316,7 @@ export const PostV2HumanEvalSetsResponseBody1$inboundSchema: z.ZodType<
|
|
|
316
316
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
317
317
|
.optional(),
|
|
318
318
|
updated: z.string().datetime({ offset: true }).default(
|
|
319
|
-
"2026-07-
|
|
319
|
+
"2026-07-17T10:58:19.597Z",
|
|
320
320
|
).transform(v => new Date(v)),
|
|
321
321
|
filter_type: z.literal("span_type"),
|
|
322
322
|
filter_values: z.array(z.string()),
|
|
@@ -1290,7 +1290,7 @@ export type RetrieveAgentRequestResponseBody = {
|
|
|
1290
1290
|
/**
|
|
1291
1291
|
* List of skills that the agent can utilize. This field allows you to specify which skills the agent has access to, enabling more complex and dynamic behavior.
|
|
1292
1292
|
*/
|
|
1293
|
-
skills
|
|
1293
|
+
skills?: Array<string> | undefined;
|
|
1294
1294
|
metrics?: RetrieveAgentRequestMetrics | undefined;
|
|
1295
1295
|
/**
|
|
1296
1296
|
* Extracted variables from agent instructions
|
|
@@ -3042,7 +3042,7 @@ export const RetrieveAgentRequestResponseBody$inboundSchema: z.ZodType<
|
|
|
3042
3042
|
team_of_agents: z.array(
|
|
3043
3043
|
z.lazy(() => RetrieveAgentRequestTeamOfAgents$inboundSchema),
|
|
3044
3044
|
).optional(),
|
|
3045
|
-
skills: z.array(z.string()),
|
|
3045
|
+
skills: z.array(z.string()).optional(),
|
|
3046
3046
|
metrics: z.lazy(() => RetrieveAgentRequestMetrics$inboundSchema).optional(),
|
|
3047
3047
|
variables: z.record(z.any()).optional(),
|
|
3048
3048
|
knowledge_bases: z.array(
|
|
@@ -1579,7 +1579,7 @@ export const RetrieveDatapointEvaluations4$inboundSchema: z.ZodType<
|
|
|
1579
1579
|
explanation: z.string().optional(),
|
|
1580
1580
|
reviewed_by_id: z.string(),
|
|
1581
1581
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
1582
|
-
"2026-07-
|
|
1582
|
+
"2026-07-17T10:58:38.025Z",
|
|
1583
1583
|
).transform(v => new Date(v)),
|
|
1584
1584
|
type: z.literal("string_array"),
|
|
1585
1585
|
values: z.array(z.string()),
|
|
@@ -1679,7 +1679,7 @@ export const RetrieveDatapointEvaluations3$inboundSchema: z.ZodType<
|
|
|
1679
1679
|
explanation: z.string().optional(),
|
|
1680
1680
|
reviewed_by_id: z.string(),
|
|
1681
1681
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
1682
|
-
"2026-07-
|
|
1682
|
+
"2026-07-17T10:58:38.024Z",
|
|
1683
1683
|
).transform(v => new Date(v)),
|
|
1684
1684
|
type: z.literal("boolean"),
|
|
1685
1685
|
value: z.boolean(),
|
|
@@ -1777,7 +1777,7 @@ export const RetrieveDatapointEvaluations2$inboundSchema: z.ZodType<
|
|
|
1777
1777
|
explanation: z.string().optional(),
|
|
1778
1778
|
reviewed_by_id: z.string(),
|
|
1779
1779
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
1780
|
-
"2026-07-
|
|
1780
|
+
"2026-07-17T10:58:38.023Z",
|
|
1781
1781
|
).transform(v => new Date(v)),
|
|
1782
1782
|
type: z.literal("number"),
|
|
1783
1783
|
value: z.number(),
|
|
@@ -1865,7 +1865,7 @@ export const RetrieveDatapointEvaluations1$inboundSchema: z.ZodType<
|
|
|
1865
1865
|
explanation: z.string().optional(),
|
|
1866
1866
|
reviewed_by_id: z.string(),
|
|
1867
1867
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
1868
|
-
"2026-07-
|
|
1868
|
+
"2026-07-17T10:58:38.022Z",
|
|
1869
1869
|
).transform(v => new Date(v)),
|
|
1870
1870
|
type: z.literal("string"),
|
|
1871
1871
|
value: z.string(),
|
|
@@ -1946,7 +1946,7 @@ export const RetrieveDatapointResponseBody$inboundSchema: z.ZodType<
|
|
|
1946
1946
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
1947
1947
|
.optional(),
|
|
1948
1948
|
updated: z.string().datetime({ offset: true }).default(
|
|
1949
|
-
"2026-07-
|
|
1949
|
+
"2026-07-17T10:58:19.597Z",
|
|
1950
1950
|
).transform(v => new Date(v)),
|
|
1951
1951
|
}).transform((v) => {
|
|
1952
1952
|
return remap$(v, {
|
|
@@ -126,7 +126,7 @@ export const RetrieveDatasetResponseBody$inboundSchema: z.ZodType<
|
|
|
126
126
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
127
127
|
.optional(),
|
|
128
128
|
updated: z.string().datetime({ offset: true }).default(
|
|
129
|
-
"2026-07-
|
|
129
|
+
"2026-07-17T10:58:19.597Z",
|
|
130
130
|
).transform(v => new Date(v)),
|
|
131
131
|
}).transform((v) => {
|
|
132
132
|
return remap$(v, {
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
collectExtraKeys as collectExtraKeys$,
|
|
9
|
+
safeParse,
|
|
10
|
+
} from "../../lib/schemas.js";
|
|
8
11
|
import { ClosedEnum } from "../../types/enums.js";
|
|
9
12
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
13
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
@@ -31,6 +34,34 @@ export type RetrieveDatasourceStatus = ClosedEnum<
|
|
|
31
34
|
typeof RetrieveDatasourceStatus
|
|
32
35
|
>;
|
|
33
36
|
|
|
37
|
+
export type RetrieveDatasourceMetadata = {
|
|
38
|
+
/**
|
|
39
|
+
* Number of words in the text
|
|
40
|
+
*/
|
|
41
|
+
wordsCount?: number | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Number of sentences in the text
|
|
44
|
+
*/
|
|
45
|
+
sentencesCount?: number | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Number of paragraphs in the text
|
|
48
|
+
*/
|
|
49
|
+
paragraphsCount?: number | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Number of tokens in the text
|
|
52
|
+
*/
|
|
53
|
+
tokensCount?: number | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Number of characters in the text
|
|
56
|
+
*/
|
|
57
|
+
charactersCount?: number | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Number of total chunks
|
|
60
|
+
*/
|
|
61
|
+
chunksCount?: number | undefined;
|
|
62
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
63
|
+
};
|
|
64
|
+
|
|
34
65
|
/**
|
|
35
66
|
* Datasource successfully retrieved
|
|
36
67
|
*/
|
|
@@ -76,6 +107,7 @@ export type RetrieveDatasourceResponseBody = {
|
|
|
76
107
|
* The number of chunks in the datasource
|
|
77
108
|
*/
|
|
78
109
|
chunksCount: number;
|
|
110
|
+
metadata: RetrieveDatasourceMetadata;
|
|
79
111
|
};
|
|
80
112
|
|
|
81
113
|
/** @internal */
|
|
@@ -112,13 +144,50 @@ export const RetrieveDatasourceStatus$inboundSchema: z.ZodNativeEnum<
|
|
|
112
144
|
typeof RetrieveDatasourceStatus
|
|
113
145
|
> = z.nativeEnum(RetrieveDatasourceStatus);
|
|
114
146
|
|
|
147
|
+
/** @internal */
|
|
148
|
+
export const RetrieveDatasourceMetadata$inboundSchema: z.ZodType<
|
|
149
|
+
RetrieveDatasourceMetadata,
|
|
150
|
+
z.ZodTypeDef,
|
|
151
|
+
unknown
|
|
152
|
+
> = collectExtraKeys$(
|
|
153
|
+
z.object({
|
|
154
|
+
words_count: z.number().optional(),
|
|
155
|
+
sentences_count: z.number().optional(),
|
|
156
|
+
paragraphs_count: z.number().optional(),
|
|
157
|
+
tokens_count: z.number().optional(),
|
|
158
|
+
characters_count: z.number().optional(),
|
|
159
|
+
chunks_count: z.number().optional(),
|
|
160
|
+
}).catchall(z.any()),
|
|
161
|
+
"additionalProperties",
|
|
162
|
+
true,
|
|
163
|
+
).transform((v) => {
|
|
164
|
+
return remap$(v, {
|
|
165
|
+
"words_count": "wordsCount",
|
|
166
|
+
"sentences_count": "sentencesCount",
|
|
167
|
+
"paragraphs_count": "paragraphsCount",
|
|
168
|
+
"tokens_count": "tokensCount",
|
|
169
|
+
"characters_count": "charactersCount",
|
|
170
|
+
"chunks_count": "chunksCount",
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
export function retrieveDatasourceMetadataFromJSON(
|
|
175
|
+
jsonString: string,
|
|
176
|
+
): SafeParseResult<RetrieveDatasourceMetadata, SDKValidationError> {
|
|
177
|
+
return safeParse(
|
|
178
|
+
jsonString,
|
|
179
|
+
(x) => RetrieveDatasourceMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
180
|
+
`Failed to parse 'RetrieveDatasourceMetadata' from JSON`,
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
|
|
115
184
|
/** @internal */
|
|
116
185
|
export const RetrieveDatasourceResponseBody$inboundSchema: z.ZodType<
|
|
117
186
|
RetrieveDatasourceResponseBody,
|
|
118
187
|
z.ZodTypeDef,
|
|
119
188
|
unknown
|
|
120
189
|
> = z.object({
|
|
121
|
-
_id: z.string().default("
|
|
190
|
+
_id: z.string().default("01KXQVMWQF3DHFT0TN4NQY97C5"),
|
|
122
191
|
display_name: z.string(),
|
|
123
192
|
description: z.nullable(z.string()).optional(),
|
|
124
193
|
status: RetrieveDatasourceStatus$inboundSchema,
|
|
@@ -129,6 +198,7 @@ export const RetrieveDatasourceResponseBody$inboundSchema: z.ZodType<
|
|
|
129
198
|
update_by_id: z.nullable(z.string()).optional(),
|
|
130
199
|
knowledge_id: z.string(),
|
|
131
200
|
chunks_count: z.number(),
|
|
201
|
+
metadata: z.lazy(() => RetrieveDatasourceMetadata$inboundSchema),
|
|
132
202
|
}).transform((v) => {
|
|
133
203
|
return remap$(v, {
|
|
134
204
|
"_id": "id",
|
|
@@ -53,10 +53,10 @@ export type RetrieveResponseResponseBody = {
|
|
|
53
53
|
completedAt: number | null;
|
|
54
54
|
conversation?: components.ConversationParam | undefined;
|
|
55
55
|
createdAt: number;
|
|
56
|
-
error: components.ResponseError;
|
|
56
|
+
error: components.ResponseError | null;
|
|
57
57
|
frequencyPenalty: number;
|
|
58
58
|
id: string;
|
|
59
|
-
incompleteDetails: components.IncompleteDetails;
|
|
59
|
+
incompleteDetails: components.IncompleteDetails | null;
|
|
60
60
|
/**
|
|
61
61
|
* Array of input items (messages, function call outputs, etc.)
|
|
62
62
|
*/
|
|
@@ -83,7 +83,7 @@ export type RetrieveResponseResponseBody = {
|
|
|
83
83
|
previousResponseId: string | null;
|
|
84
84
|
promptCacheKey: string | null;
|
|
85
85
|
promptCacheRetention: string | null;
|
|
86
|
-
reasoning: components.Reasoning;
|
|
86
|
+
reasoning: components.Reasoning | null;
|
|
87
87
|
safetyIdentifier: string | null;
|
|
88
88
|
serviceTier: RetrieveResponseServiceTier;
|
|
89
89
|
status: RetrieveResponseStatus;
|
|
@@ -104,7 +104,7 @@ export type RetrieveResponseResponseBody = {
|
|
|
104
104
|
topLogprobs: number;
|
|
105
105
|
topP: number;
|
|
106
106
|
truncation: RetrieveResponseTruncation;
|
|
107
|
-
usage: components.PublicUsage;
|
|
107
|
+
usage: components.PublicUsage | null;
|
|
108
108
|
user: string | null;
|
|
109
109
|
variables?: { [k: string]: any } | undefined;
|
|
110
110
|
};
|
|
@@ -160,10 +160,10 @@ export const RetrieveResponseResponseBody$inboundSchema: z.ZodType<
|
|
|
160
160
|
completed_at: z.nullable(z.number().int()),
|
|
161
161
|
conversation: components.ConversationParam$inboundSchema.optional(),
|
|
162
162
|
created_at: z.number().int(),
|
|
163
|
-
error: components.ResponseError$inboundSchema,
|
|
163
|
+
error: z.nullable(components.ResponseError$inboundSchema),
|
|
164
164
|
frequency_penalty: z.number(),
|
|
165
165
|
id: z.string(),
|
|
166
|
-
incomplete_details: components.IncompleteDetails$inboundSchema,
|
|
166
|
+
incomplete_details: z.nullable(components.IncompleteDetails$inboundSchema),
|
|
167
167
|
input: z.nullable(z.array(z.any())),
|
|
168
168
|
instructions: z.nullable(z.string()),
|
|
169
169
|
max_output_tokens: z.nullable(z.number().int()),
|
|
@@ -178,7 +178,7 @@ export const RetrieveResponseResponseBody$inboundSchema: z.ZodType<
|
|
|
178
178
|
previous_response_id: z.nullable(z.string()),
|
|
179
179
|
prompt_cache_key: z.nullable(z.string()),
|
|
180
180
|
prompt_cache_retention: z.nullable(z.string()),
|
|
181
|
-
reasoning: components.Reasoning$inboundSchema,
|
|
181
|
+
reasoning: z.nullable(components.Reasoning$inboundSchema),
|
|
182
182
|
safety_identifier: z.nullable(z.string()),
|
|
183
183
|
service_tier: RetrieveResponseServiceTier$inboundSchema,
|
|
184
184
|
status: RetrieveResponseStatus$inboundSchema,
|
|
@@ -190,7 +190,7 @@ export const RetrieveResponseResponseBody$inboundSchema: z.ZodType<
|
|
|
190
190
|
top_logprobs: z.number().int(),
|
|
191
191
|
top_p: z.number(),
|
|
192
192
|
truncation: RetrieveResponseTruncation$inboundSchema,
|
|
193
|
-
usage: components.PublicUsage$inboundSchema,
|
|
193
|
+
usage: z.nullable(components.PublicUsage$inboundSchema),
|
|
194
194
|
user: z.nullable(z.string()),
|
|
195
195
|
variables: z.record(z.any()).optional(),
|
|
196
196
|
}).transform((v) => {
|