@orq-ai/node 4.12.0-rc.34 → 4.12.0-rc.36

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.
Files changed (251) hide show
  1. package/README.md +55 -36
  2. package/funcs/knowledgeListDatasources.js +1 -0
  3. package/funcs/knowledgeListDatasources.js.map +1 -1
  4. package/funcs/webhooksCount.d.ts +17 -0
  5. package/funcs/webhooksCount.d.ts.map +1 -0
  6. package/funcs/webhooksCount.js +105 -0
  7. package/funcs/webhooksCount.js.map +1 -0
  8. package/funcs/webhooksCreate.d.ts +17 -0
  9. package/funcs/webhooksCreate.d.ts.map +1 -0
  10. package/funcs/webhooksCreate.js +115 -0
  11. package/funcs/webhooksCreate.js.map +1 -0
  12. package/funcs/webhooksDelete.d.ts +18 -0
  13. package/funcs/webhooksDelete.d.ts.map +1 -0
  14. package/funcs/webhooksDelete.js +121 -0
  15. package/funcs/webhooksDelete.js.map +1 -0
  16. package/funcs/webhooksGenerateSecret.d.ts +17 -0
  17. package/funcs/webhooksGenerateSecret.d.ts.map +1 -0
  18. package/funcs/webhooksGenerateSecret.js +105 -0
  19. package/funcs/webhooksGenerateSecret.js.map +1 -0
  20. package/funcs/webhooksGet.d.ts +18 -0
  21. package/funcs/webhooksGet.d.ts.map +1 -0
  22. package/funcs/webhooksGet.js +121 -0
  23. package/funcs/webhooksGet.js.map +1 -0
  24. package/funcs/webhooksList.d.ts +18 -0
  25. package/funcs/webhooksList.d.ts.map +1 -0
  26. package/funcs/webhooksList.js +126 -0
  27. package/funcs/webhooksList.js.map +1 -0
  28. package/funcs/webhooksQuery.d.ts +19 -0
  29. package/funcs/webhooksQuery.d.ts.map +1 -0
  30. package/funcs/webhooksQuery.js +117 -0
  31. package/funcs/webhooksQuery.js.map +1 -0
  32. package/funcs/webhooksUpdate.d.ts +17 -0
  33. package/funcs/webhooksUpdate.d.ts.map +1 -0
  34. package/funcs/webhooksUpdate.js +121 -0
  35. package/funcs/webhooksUpdate.js.map +1 -0
  36. package/jsr.json +1 -1
  37. package/lib/config.d.ts +2 -2
  38. package/lib/config.js +2 -2
  39. package/models/components/countwebhooksresponse.d.ts +16 -0
  40. package/models/components/countwebhooksresponse.d.ts.map +1 -0
  41. package/models/components/countwebhooksresponse.js +50 -0
  42. package/models/components/countwebhooksresponse.js.map +1 -0
  43. package/models/components/createwebhookrequest.d.ts +62 -0
  44. package/models/components/createwebhookrequest.d.ts.map +1 -0
  45. package/models/components/createwebhookrequest.js +71 -0
  46. package/models/components/createwebhookrequest.js.map +1 -0
  47. package/models/components/deletewebhookresponse.d.ts +13 -0
  48. package/models/components/deletewebhookresponse.d.ts.map +1 -0
  49. package/models/components/deletewebhookresponse.js +50 -0
  50. package/models/components/deletewebhookresponse.js.map +1 -0
  51. package/models/components/evaluatorresponsefunction.js +2 -2
  52. package/models/components/evaluatorresponsehttp.js +2 -2
  53. package/models/components/evaluatorresponsejsonschema.js +2 -2
  54. package/models/components/evaluatorresponsellm.js +2 -2
  55. package/models/components/evaluatorresponsepython.js +2 -2
  56. package/models/components/evaluatorresponseragas.js +2 -2
  57. package/models/components/evaluatorresponsetypescript.js +2 -2
  58. package/models/components/generatewebhooksecretresponse.d.ts +16 -0
  59. package/models/components/generatewebhooksecretresponse.d.ts.map +1 -0
  60. package/models/components/generatewebhooksecretresponse.js +50 -0
  61. package/models/components/generatewebhooksecretresponse.js.map +1 -0
  62. package/models/components/index.d.ts +10 -0
  63. package/models/components/index.d.ts.map +1 -1
  64. package/models/components/index.js +10 -0
  65. package/models/components/index.js.map +1 -1
  66. package/models/components/listwebhooksresponse.d.ts +25 -0
  67. package/models/components/listwebhooksresponse.d.ts.map +1 -0
  68. package/models/components/listwebhooksresponse.js +58 -0
  69. package/models/components/listwebhooksresponse.js.map +1 -0
  70. package/models/components/queryparamspagination.d.ts +18 -0
  71. package/models/components/queryparamspagination.d.ts.map +1 -0
  72. package/models/components/queryparamspagination.js +52 -0
  73. package/models/components/queryparamspagination.js.map +1 -0
  74. package/models/components/queryparamssort.d.ts +14 -0
  75. package/models/components/queryparamssort.d.ts.map +1 -0
  76. package/models/components/queryparamssort.js +50 -0
  77. package/models/components/queryparamssort.js.map +1 -0
  78. package/models/components/querywebhooksrequest.d.ts +38 -0
  79. package/models/components/querywebhooksrequest.d.ts.map +1 -0
  80. package/models/components/querywebhooksrequest.js +67 -0
  81. package/models/components/querywebhooksrequest.js.map +1 -0
  82. package/models/components/querywebhooksresponse.d.ts +12 -0
  83. package/models/components/querywebhooksresponse.d.ts.map +1 -0
  84. package/models/components/querywebhooksresponse.js +52 -0
  85. package/models/components/querywebhooksresponse.js.map +1 -0
  86. package/models/components/reasoningpart.js +1 -1
  87. package/models/components/webhook.d.ts +74 -0
  88. package/models/components/webhook.d.ts.map +1 -0
  89. package/models/components/webhook.js +81 -0
  90. package/models/components/webhook.js.map +1 -0
  91. package/models/operations/createagentrequest.d.ts +1 -1
  92. package/models/operations/createagentrequest.d.ts.map +1 -1
  93. package/models/operations/createagentrequest.js +1 -1
  94. package/models/operations/createagentrequest.js.map +1 -1
  95. package/models/operations/createdataset.js +1 -1
  96. package/models/operations/createdatasetitem.js +5 -5
  97. package/models/operations/createdatasource.d.ts +42 -0
  98. package/models/operations/createdatasource.d.ts.map +1 -1
  99. package/models/operations/createdatasource.js +26 -2
  100. package/models/operations/createdatasource.js.map +1 -1
  101. package/models/operations/createrouterresponse.d.ts +34 -4
  102. package/models/operations/createrouterresponse.d.ts.map +1 -1
  103. package/models/operations/createrouterresponse.js +18 -3
  104. package/models/operations/createrouterresponse.js.map +1 -1
  105. package/models/operations/createtool.js +6 -6
  106. package/models/operations/getalltools.js +6 -6
  107. package/models/operations/getv2humanevalsets.js +2 -2
  108. package/models/operations/getv2humanevalsetsid.js +2 -2
  109. package/models/operations/index.d.ts +4 -0
  110. package/models/operations/index.d.ts.map +1 -1
  111. package/models/operations/index.js +4 -0
  112. package/models/operations/index.js.map +1 -1
  113. package/models/operations/listagents.d.ts +1 -1
  114. package/models/operations/listagents.d.ts.map +1 -1
  115. package/models/operations/listagents.js +1 -1
  116. package/models/operations/listagents.js.map +1 -1
  117. package/models/operations/listdatasetdatapoints.js +5 -5
  118. package/models/operations/listdatasets.js +1 -1
  119. package/models/operations/listdatasources.d.ts +48 -0
  120. package/models/operations/listdatasources.d.ts.map +1 -1
  121. package/models/operations/listdatasources.js +33 -2
  122. package/models/operations/listdatasources.js.map +1 -1
  123. package/models/operations/patchv2humanevalsetsid.js +2 -2
  124. package/models/operations/postv2feedbackevaluation.js +4 -4
  125. package/models/operations/postv2humanevalsets.js +2 -2
  126. package/models/operations/retrieveagentrequest.d.ts +1 -1
  127. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  128. package/models/operations/retrieveagentrequest.js +1 -1
  129. package/models/operations/retrieveagentrequest.js.map +1 -1
  130. package/models/operations/retrievedatapoint.js +5 -5
  131. package/models/operations/retrievedataset.js +1 -1
  132. package/models/operations/retrievedatasource.d.ts +33 -0
  133. package/models/operations/retrievedatasource.d.ts.map +1 -1
  134. package/models/operations/retrievedatasource.js +25 -2
  135. package/models/operations/retrievedatasource.js.map +1 -1
  136. package/models/operations/retrieveresponse.d.ts +4 -4
  137. package/models/operations/retrieveresponse.d.ts.map +1 -1
  138. package/models/operations/retrieveresponse.js +4 -4
  139. package/models/operations/retrieveresponse.js.map +1 -1
  140. package/models/operations/retrievetool.js +6 -6
  141. package/models/operations/runagent.js +1 -1
  142. package/models/operations/streamrunagent.js +1 -1
  143. package/models/operations/updateagent.d.ts +1 -1
  144. package/models/operations/updateagent.d.ts.map +1 -1
  145. package/models/operations/updateagent.js +1 -1
  146. package/models/operations/updateagent.js.map +1 -1
  147. package/models/operations/updatedatapoint.js +5 -5
  148. package/models/operations/updatedataset.js +1 -1
  149. package/models/operations/updatedatasource.d.ts +33 -0
  150. package/models/operations/updatedatasource.d.ts.map +1 -1
  151. package/models/operations/updatedatasource.js +25 -2
  152. package/models/operations/updatedatasource.js.map +1 -1
  153. package/models/operations/updatetool.js +7 -7
  154. package/models/operations/webhookdelete.d.ts +12 -0
  155. package/models/operations/webhookdelete.d.ts.map +1 -0
  156. package/models/operations/webhookdelete.js +49 -0
  157. package/models/operations/webhookdelete.js.map +1 -0
  158. package/models/operations/webhookget.d.ts +12 -0
  159. package/models/operations/webhookget.d.ts.map +1 -0
  160. package/models/operations/webhookget.js +49 -0
  161. package/models/operations/webhookget.js.map +1 -0
  162. package/models/operations/webhooklist.d.ts +70 -0
  163. package/models/operations/webhooklist.d.ts.map +1 -0
  164. package/models/operations/webhooklist.js +61 -0
  165. package/models/operations/webhooklist.js.map +1 -0
  166. package/models/operations/webhookupdate.d.ts +29 -0
  167. package/models/operations/webhookupdate.d.ts.map +1 -0
  168. package/models/operations/webhookupdate.js +68 -0
  169. package/models/operations/webhookupdate.js.map +1 -0
  170. package/package.json +7 -7
  171. package/sdk/feedback.d.ts +2 -2
  172. package/sdk/feedback.js +2 -2
  173. package/sdk/humanreviewsets.d.ts +1 -4
  174. package/sdk/humanreviewsets.d.ts.map +1 -1
  175. package/sdk/humanreviewsets.js +1 -4
  176. package/sdk/humanreviewsets.js.map +1 -1
  177. package/sdk/sdk.d.ts +3 -0
  178. package/sdk/sdk.d.ts.map +1 -1
  179. package/sdk/sdk.js +4 -0
  180. package/sdk/sdk.js.map +1 -1
  181. package/sdk/webhooks.d.ts +64 -0
  182. package/sdk/webhooks.d.ts.map +1 -0
  183. package/sdk/webhooks.js +94 -0
  184. package/sdk/webhooks.js.map +1 -0
  185. package/src/funcs/knowledgeListDatasources.ts +1 -0
  186. package/src/funcs/webhooksCount.ts +144 -0
  187. package/src/funcs/webhooksCreate.ts +162 -0
  188. package/src/funcs/webhooksDelete.ts +168 -0
  189. package/src/funcs/webhooksGenerateSecret.ts +144 -0
  190. package/src/funcs/webhooksGet.ts +168 -0
  191. package/src/funcs/webhooksList.ts +175 -0
  192. package/src/funcs/webhooksQuery.ts +164 -0
  193. package/src/funcs/webhooksUpdate.ts +168 -0
  194. package/src/lib/config.ts +2 -2
  195. package/src/models/components/countwebhooksresponse.ts +37 -0
  196. package/src/models/components/createwebhookrequest.ts +100 -0
  197. package/src/models/components/deletewebhookresponse.ts +34 -0
  198. package/src/models/components/evaluatorresponsefunction.ts +2 -2
  199. package/src/models/components/evaluatorresponsehttp.ts +2 -2
  200. package/src/models/components/evaluatorresponsejsonschema.ts +2 -2
  201. package/src/models/components/evaluatorresponsellm.ts +2 -2
  202. package/src/models/components/evaluatorresponsepython.ts +2 -2
  203. package/src/models/components/evaluatorresponseragas.ts +2 -2
  204. package/src/models/components/evaluatorresponsetypescript.ts +2 -2
  205. package/src/models/components/generatewebhooksecretresponse.ts +37 -0
  206. package/src/models/components/index.ts +10 -0
  207. package/src/models/components/listwebhooksresponse.ts +53 -0
  208. package/src/models/components/queryparamspagination.ts +40 -0
  209. package/src/models/components/queryparamssort.ts +32 -0
  210. package/src/models/components/querywebhooksrequest.ts +85 -0
  211. package/src/models/components/querywebhooksresponse.ts +34 -0
  212. package/src/models/components/reasoningpart.ts +1 -1
  213. package/src/models/components/webhook.ts +116 -0
  214. package/src/models/operations/createagentrequest.ts +2 -2
  215. package/src/models/operations/createdataset.ts +1 -1
  216. package/src/models/operations/createdatasetitem.ts +5 -5
  217. package/src/models/operations/createdatasource.ts +78 -2
  218. package/src/models/operations/createrouterresponse.ts +41 -5
  219. package/src/models/operations/createtool.ts +6 -6
  220. package/src/models/operations/getalltools.ts +6 -6
  221. package/src/models/operations/getv2humanevalsets.ts +2 -2
  222. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  223. package/src/models/operations/index.ts +4 -0
  224. package/src/models/operations/listagents.ts +2 -2
  225. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  226. package/src/models/operations/listdatasets.ts +1 -1
  227. package/src/models/operations/listdatasources.ts +99 -2
  228. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  229. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  230. package/src/models/operations/postv2humanevalsets.ts +2 -2
  231. package/src/models/operations/retrieveagentrequest.ts +2 -2
  232. package/src/models/operations/retrievedatapoint.ts +5 -5
  233. package/src/models/operations/retrievedataset.ts +1 -1
  234. package/src/models/operations/retrievedatasource.ts +72 -2
  235. package/src/models/operations/retrieveresponse.ts +8 -8
  236. package/src/models/operations/retrievetool.ts +6 -6
  237. package/src/models/operations/runagent.ts +1 -1
  238. package/src/models/operations/streamrunagent.ts +1 -1
  239. package/src/models/operations/updateagent.ts +2 -2
  240. package/src/models/operations/updatedatapoint.ts +5 -5
  241. package/src/models/operations/updatedataset.ts +1 -1
  242. package/src/models/operations/updatedatasource.ts +72 -2
  243. package/src/models/operations/updatetool.ts +7 -7
  244. package/src/models/operations/webhookdelete.ts +31 -0
  245. package/src/models/operations/webhookget.ts +31 -0
  246. package/src/models/operations/webhooklist.ts +101 -0
  247. package/src/models/operations/webhookupdate.ts +84 -0
  248. package/src/sdk/feedback.ts +2 -2
  249. package/src/sdk/humanreviewsets.ts +1 -4
  250. package/src/sdk/sdk.ts +6 -0
  251. package/src/sdk/webhooks.ts +152 -0
@@ -0,0 +1,85 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import {
7
+ QueryParamsPagination,
8
+ QueryParamsPagination$Outbound,
9
+ QueryParamsPagination$outboundSchema,
10
+ } from "./queryparamspagination.js";
11
+ import {
12
+ QueryParamsSort,
13
+ QueryParamsSort$Outbound,
14
+ QueryParamsSort$outboundSchema,
15
+ } from "./queryparamssort.js";
16
+
17
+ export type Query = {};
18
+
19
+ export type Filters = {};
20
+
21
+ export type QueryWebhooksRequest = {
22
+ pagination?: QueryParamsPagination | undefined;
23
+ sortingProps?: Array<QueryParamsSort> | undefined;
24
+ query?: Query | undefined;
25
+ filters?: Array<Filters> | undefined;
26
+ includedFields?: { [k: string]: string } | undefined;
27
+ };
28
+
29
+ /** @internal */
30
+ export type Query$Outbound = {};
31
+
32
+ /** @internal */
33
+ export const Query$outboundSchema: z.ZodType<
34
+ Query$Outbound,
35
+ z.ZodTypeDef,
36
+ Query
37
+ > = z.object({});
38
+
39
+ export function queryToJSON(query: Query): string {
40
+ return JSON.stringify(Query$outboundSchema.parse(query));
41
+ }
42
+
43
+ /** @internal */
44
+ export type Filters$Outbound = {};
45
+
46
+ /** @internal */
47
+ export const Filters$outboundSchema: z.ZodType<
48
+ Filters$Outbound,
49
+ z.ZodTypeDef,
50
+ Filters
51
+ > = z.object({});
52
+
53
+ export function filtersToJSON(filters: Filters): string {
54
+ return JSON.stringify(Filters$outboundSchema.parse(filters));
55
+ }
56
+
57
+ /** @internal */
58
+ export type QueryWebhooksRequest$Outbound = {
59
+ pagination?: QueryParamsPagination$Outbound | undefined;
60
+ sortingProps?: Array<QueryParamsSort$Outbound> | undefined;
61
+ query?: Query$Outbound | undefined;
62
+ filters?: Array<Filters$Outbound> | undefined;
63
+ includedFields?: { [k: string]: string } | undefined;
64
+ };
65
+
66
+ /** @internal */
67
+ export const QueryWebhooksRequest$outboundSchema: z.ZodType<
68
+ QueryWebhooksRequest$Outbound,
69
+ z.ZodTypeDef,
70
+ QueryWebhooksRequest
71
+ > = z.object({
72
+ pagination: QueryParamsPagination$outboundSchema.optional(),
73
+ sortingProps: z.array(QueryParamsSort$outboundSchema).optional(),
74
+ query: z.lazy(() => Query$outboundSchema).optional(),
75
+ filters: z.array(z.lazy(() => Filters$outboundSchema)).optional(),
76
+ includedFields: z.record(z.string()).optional(),
77
+ });
78
+
79
+ export function queryWebhooksRequestToJSON(
80
+ queryWebhooksRequest: QueryWebhooksRequest,
81
+ ): string {
82
+ return JSON.stringify(
83
+ QueryWebhooksRequest$outboundSchema.parse(queryWebhooksRequest),
84
+ );
85
+ }
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import { Webhook, Webhook$inboundSchema } from "./webhook.js";
10
+
11
+ export type QueryWebhooksResponse = {
12
+ count: number;
13
+ items: Array<Webhook>;
14
+ };
15
+
16
+ /** @internal */
17
+ export const QueryWebhooksResponse$inboundSchema: z.ZodType<
18
+ QueryWebhooksResponse,
19
+ z.ZodTypeDef,
20
+ unknown
21
+ > = z.object({
22
+ count: z.number().int(),
23
+ items: z.array(Webhook$inboundSchema),
24
+ });
25
+
26
+ export function queryWebhooksResponseFromJSON(
27
+ jsonString: string,
28
+ ): SafeParseResult<QueryWebhooksResponse, SDKValidationError> {
29
+ return safeParse(
30
+ jsonString,
31
+ (x) => QueryWebhooksResponse$inboundSchema.parse(JSON.parse(x)),
32
+ `Failed to parse 'QueryWebhooksResponse' from JSON`,
33
+ );
34
+ }
@@ -40,7 +40,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
40
40
  z.ZodTypeDef,
41
41
  unknown
42
42
  > = z.object({
43
- _id: z.string().default("reasoning_01kxn9ffrh2qhr537yc5agezgm"),
43
+ _id: z.string().default("reasoning_01kxpyt7qhyapwtw2fkwb76wt6"),
44
44
  metadata: z.record(z.any()).optional(),
45
45
  kind: z.literal("reasoning"),
46
46
  reasoning: z.string(),
@@ -0,0 +1,116 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * Content type sent with webhook deliveries.
14
+ */
15
+ export const ContentType = {
16
+ ApplicationJson: "application/json",
17
+ ApplicationXWwwFormUrlencoded: "application/x-www-form-urlencoded",
18
+ } as const;
19
+ /**
20
+ * Content type sent with webhook deliveries.
21
+ */
22
+ export type ContentType = ClosedEnum<typeof ContentType>;
23
+
24
+ /**
25
+ * A webhook subscription and its delivery configuration. Responses include the signing secret; treat it as sensitive.
26
+ */
27
+ export type Webhook = {
28
+ /**
29
+ * Unique webhook ID.
30
+ */
31
+ id: string;
32
+ /**
33
+ * HTTPS endpoint that receives webhook deliveries.
34
+ */
35
+ url: string;
36
+ /**
37
+ * Content type sent with webhook deliveries.
38
+ */
39
+ contentType: ContentType;
40
+ /**
41
+ * Human-readable webhook name.
42
+ */
43
+ displayName: string;
44
+ /**
45
+ * Workspace event slugs that trigger a delivery, for example `deployment.invoked` or `llm.response`.
46
+ */
47
+ events: Array<string>;
48
+ /**
49
+ * Signing secret used to verify webhook delivery signatures. Treat this value as sensitive.
50
+ */
51
+ secret: string;
52
+ /**
53
+ * Whether webhook deliveries are enabled.
54
+ */
55
+ enabled?: boolean | undefined;
56
+ /**
57
+ * Server-managed number of consecutive delivery failures.
58
+ */
59
+ failureCount?: number | undefined;
60
+ /**
61
+ * Account ID that created the webhook.
62
+ */
63
+ createdById: string;
64
+ /**
65
+ * Account ID that most recently updated the webhook.
66
+ */
67
+ updatedById: string;
68
+ /**
69
+ * Creation time in RFC 3339 format.
70
+ */
71
+ created: Date;
72
+ /**
73
+ * Most recent update time in RFC 3339 format.
74
+ */
75
+ updated: Date;
76
+ };
77
+
78
+ /** @internal */
79
+ export const ContentType$inboundSchema: z.ZodNativeEnum<typeof ContentType> = z
80
+ .nativeEnum(ContentType);
81
+
82
+ /** @internal */
83
+ export const Webhook$inboundSchema: z.ZodType<Webhook, z.ZodTypeDef, unknown> =
84
+ z.object({
85
+ _id: z.string(),
86
+ url: z.string(),
87
+ content_type: ContentType$inboundSchema,
88
+ display_name: z.string(),
89
+ events: z.array(z.string()),
90
+ secret: z.string(),
91
+ enabled: z.boolean().optional(),
92
+ failure_count: z.number().int().optional(),
93
+ created_by_id: z.string(),
94
+ updated_by_id: z.string(),
95
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
96
+ updated: z.string().datetime({ offset: true }).transform(v => new Date(v)),
97
+ }).transform((v) => {
98
+ return remap$(v, {
99
+ "_id": "id",
100
+ "content_type": "contentType",
101
+ "display_name": "displayName",
102
+ "failure_count": "failureCount",
103
+ "created_by_id": "createdById",
104
+ "updated_by_id": "updatedById",
105
+ });
106
+ });
107
+
108
+ export function webhookFromJSON(
109
+ jsonString: string,
110
+ ): SafeParseResult<Webhook, SDKValidationError> {
111
+ return safeParse(
112
+ jsonString,
113
+ (x) => Webhook$inboundSchema.parse(JSON.parse(x)),
114
+ `Failed to parse 'Webhook' from JSON`,
115
+ );
116
+ }
@@ -2997,7 +2997,7 @@ export type CreateAgentRequestResponseBody = {
2997
2997
  /**
2998
2998
  * 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.
2999
2999
  */
3000
- skills: Array<string>;
3000
+ skills?: Array<string> | undefined;
3001
3001
  metrics?: Metrics | undefined;
3002
3002
  /**
3003
3003
  * Extracted variables from agent instructions
@@ -7155,7 +7155,7 @@ export const CreateAgentRequestResponseBody$inboundSchema: z.ZodType<
7155
7155
  team_of_agents: z.array(
7156
7156
  z.lazy(() => CreateAgentRequestTeamOfAgents$inboundSchema),
7157
7157
  ).optional(),
7158
- skills: z.array(z.string()),
7158
+ skills: z.array(z.string()).optional(),
7159
7159
  metrics: z.lazy(() => Metrics$inboundSchema).optional(),
7160
7160
  variables: z.record(z.any()).optional(),
7161
7161
  knowledge_bases: z.array(
@@ -138,7 +138,7 @@ export const CreateDatasetResponseBody$inboundSchema: z.ZodType<
138
138
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
139
139
  .optional(),
140
140
  updated: z.string().datetime({ offset: true }).default(
141
- "2026-07-16T11:02:21.951Z",
141
+ "2026-07-17T02:34:22.765Z",
142
142
  ).transform(v => new Date(v)),
143
143
  }).transform((v) => {
144
144
  return remap$(v, {
@@ -2732,7 +2732,7 @@ export const Evaluations4$inboundSchema: z.ZodType<
2732
2732
  explanation: z.string().optional(),
2733
2733
  reviewed_by_id: z.string(),
2734
2734
  reviewed_at: z.string().datetime({ offset: true }).default(
2735
- "2026-07-16T11:02:38.202Z",
2735
+ "2026-07-17T02:34:44.968Z",
2736
2736
  ).transform(v => new Date(v)),
2737
2737
  type: z.literal("string_array"),
2738
2738
  values: z.array(z.string()),
@@ -2822,7 +2822,7 @@ export const Evaluations3$inboundSchema: z.ZodType<
2822
2822
  explanation: z.string().optional(),
2823
2823
  reviewed_by_id: z.string(),
2824
2824
  reviewed_at: z.string().datetime({ offset: true }).default(
2825
- "2026-07-16T11:02:38.201Z",
2825
+ "2026-07-17T02:34:44.967Z",
2826
2826
  ).transform(v => new Date(v)),
2827
2827
  type: z.literal("boolean"),
2828
2828
  value: z.boolean(),
@@ -2907,7 +2907,7 @@ export const Evaluations2$inboundSchema: z.ZodType<
2907
2907
  explanation: z.string().optional(),
2908
2908
  reviewed_by_id: z.string(),
2909
2909
  reviewed_at: z.string().datetime({ offset: true }).default(
2910
- "2026-07-16T11:02:38.200Z",
2910
+ "2026-07-17T02:34:44.966Z",
2911
2911
  ).transform(v => new Date(v)),
2912
2912
  type: z.literal("number"),
2913
2913
  value: z.number(),
@@ -2993,7 +2993,7 @@ export const Evaluations1$inboundSchema: z.ZodType<
2993
2993
  explanation: z.string().optional(),
2994
2994
  reviewed_by_id: z.string(),
2995
2995
  reviewed_at: z.string().datetime({ offset: true }).default(
2996
- "2026-07-16T11:02:38.199Z",
2996
+ "2026-07-17T02:34:44.965Z",
2997
2997
  ).transform(v => new Date(v)),
2998
2998
  type: z.literal("string"),
2999
2999
  value: z.string(),
@@ -3080,7 +3080,7 @@ export const CreateDatasetItemResponseBody$inboundSchema: z.ZodType<
3080
3080
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
3081
3081
  .optional(),
3082
3082
  updated: z.string().datetime({ offset: true }).default(
3083
- "2026-07-16T11:02:21.951Z",
3083
+ "2026-07-17T02:34:22.765Z",
3084
3084
  ).transform(v => new Date(v)),
3085
3085
  }).transform((v) => {
3086
3086
  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 { safeParse } from "../../lib/schemas.js";
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";
@@ -105,6 +108,10 @@ export type CreateDatasourceRequestBody = {
105
108
  * The description of the knowledge base
106
109
  */
107
110
  description?: string | null | undefined;
111
+ /**
112
+ * Client-defined metadata associated with the datasource.
113
+ */
114
+ metadata?: { [k: string]: any } | undefined;
108
115
  /**
109
116
  * The unique identifier of the file used for datasource creation. If provided, the file is immediately queued for chunking.
110
117
  */
@@ -132,6 +139,34 @@ export const CreateDatasourceStatus = {
132
139
  } as const;
133
140
  export type CreateDatasourceStatus = ClosedEnum<typeof CreateDatasourceStatus>;
134
141
 
142
+ export type CreateDatasourceMetadata = {
143
+ /**
144
+ * Number of words in the text
145
+ */
146
+ wordsCount?: number | undefined;
147
+ /**
148
+ * Number of sentences in the text
149
+ */
150
+ sentencesCount?: number | undefined;
151
+ /**
152
+ * Number of paragraphs in the text
153
+ */
154
+ paragraphsCount?: number | undefined;
155
+ /**
156
+ * Number of tokens in the text
157
+ */
158
+ tokensCount?: number | undefined;
159
+ /**
160
+ * Number of characters in the text
161
+ */
162
+ charactersCount?: number | undefined;
163
+ /**
164
+ * Number of total chunks
165
+ */
166
+ chunksCount?: number | undefined;
167
+ additionalProperties?: { [k: string]: any } | undefined;
168
+ };
169
+
135
170
  /**
136
171
  * Datasource successfully created
137
172
  */
@@ -177,6 +212,7 @@ export type CreateDatasourceResponseBody = {
177
212
  * The number of chunks in the datasource
178
213
  */
179
214
  chunksCount: number;
215
+ metadata: CreateDatasourceMetadata;
180
216
  };
181
217
 
182
218
  /** @internal */
@@ -340,6 +376,7 @@ export function chunkingOptionsToJSON(
340
376
  export type CreateDatasourceRequestBody$Outbound = {
341
377
  display_name?: string | undefined;
342
378
  description?: string | null | undefined;
379
+ metadata?: { [k: string]: any } | undefined;
343
380
  file_id?: string | undefined;
344
381
  chunking_options?: ChunkingOptions$Outbound | undefined;
345
382
  };
@@ -352,6 +389,7 @@ export const CreateDatasourceRequestBody$outboundSchema: z.ZodType<
352
389
  > = z.object({
353
390
  displayName: z.string().optional(),
354
391
  description: z.nullable(z.string()).optional(),
392
+ metadata: z.record(z.any()).optional(),
355
393
  fileId: z.string().optional(),
356
394
  chunkingOptions: z.lazy(() => ChunkingOptions$outboundSchema).optional(),
357
395
  }).transform((v) => {
@@ -406,13 +444,50 @@ export const CreateDatasourceStatus$inboundSchema: z.ZodNativeEnum<
406
444
  typeof CreateDatasourceStatus
407
445
  > = z.nativeEnum(CreateDatasourceStatus);
408
446
 
447
+ /** @internal */
448
+ export const CreateDatasourceMetadata$inboundSchema: z.ZodType<
449
+ CreateDatasourceMetadata,
450
+ z.ZodTypeDef,
451
+ unknown
452
+ > = collectExtraKeys$(
453
+ z.object({
454
+ words_count: z.number().optional(),
455
+ sentences_count: z.number().optional(),
456
+ paragraphs_count: z.number().optional(),
457
+ tokens_count: z.number().optional(),
458
+ characters_count: z.number().optional(),
459
+ chunks_count: z.number().optional(),
460
+ }).catchall(z.any()),
461
+ "additionalProperties",
462
+ true,
463
+ ).transform((v) => {
464
+ return remap$(v, {
465
+ "words_count": "wordsCount",
466
+ "sentences_count": "sentencesCount",
467
+ "paragraphs_count": "paragraphsCount",
468
+ "tokens_count": "tokensCount",
469
+ "characters_count": "charactersCount",
470
+ "chunks_count": "chunksCount",
471
+ });
472
+ });
473
+
474
+ export function createDatasourceMetadataFromJSON(
475
+ jsonString: string,
476
+ ): SafeParseResult<CreateDatasourceMetadata, SDKValidationError> {
477
+ return safeParse(
478
+ jsonString,
479
+ (x) => CreateDatasourceMetadata$inboundSchema.parse(JSON.parse(x)),
480
+ `Failed to parse 'CreateDatasourceMetadata' from JSON`,
481
+ );
482
+ }
483
+
409
484
  /** @internal */
410
485
  export const CreateDatasourceResponseBody$inboundSchema: z.ZodType<
411
486
  CreateDatasourceResponseBody,
412
487
  z.ZodTypeDef,
413
488
  unknown
414
489
  > = z.object({
415
- _id: z.string().default("01KXN9FG896EN3GC7NKGTFKC8A"),
490
+ _id: z.string().default("01KXPYT88RN6X70GR4ZXBJV7SY"),
416
491
  display_name: z.string(),
417
492
  description: z.nullable(z.string()).optional(),
418
493
  status: CreateDatasourceStatus$inboundSchema,
@@ -423,6 +498,7 @@ export const CreateDatasourceResponseBody$inboundSchema: z.ZodType<
423
498
  update_by_id: z.nullable(z.string()).optional(),
424
499
  knowledge_id: z.string(),
425
500
  chunks_count: z.number(),
501
+ metadata: z.lazy(() => CreateDatasourceMetadata$inboundSchema),
426
502
  }).transform((v) => {
427
503
  return remap$(v, {
428
504
  "_id": "id",
@@ -346,11 +346,25 @@ export const InputRole = {
346
346
  */
347
347
  export type InputRole = ClosedEnum<typeof InputRole>;
348
348
 
349
+ /**
350
+ * The status of a model-generated input item.
351
+ */
352
+ export const InputStatus = {
353
+ InProgress: "in_progress",
354
+ Completed: "completed",
355
+ Incomplete: "incomplete",
356
+ } as const;
357
+ /**
358
+ * The status of a model-generated input item.
359
+ */
360
+ export type InputStatus = ClosedEnum<typeof InputStatus>;
361
+
349
362
  /**
350
363
  * The type of item.
351
364
  */
352
365
  export const InputType = {
353
366
  Message: "message",
367
+ FunctionCall: "function_call",
354
368
  FunctionCallOutput: "function_call_output",
355
369
  ItemReference: "item_reference",
356
370
  } as const;
@@ -360,11 +374,15 @@ export const InputType = {
360
374
  export type InputType = ClosedEnum<typeof InputType>;
361
375
 
362
376
  /**
363
- * An input item. The "type" field determines the item kind: "message", "function_call_output", "item_reference", etc.
377
+ * An input item. The "type" field determines the item kind: "message", "function_call", "function_call_output", "item_reference", etc.
364
378
  */
365
379
  export type CreateRouterResponseInput2 = {
366
380
  /**
367
- * The ID of the function call being responded to (for function_call_output type).
381
+ * The function arguments as a JSON string (for function_call items).
382
+ */
383
+ arguments?: string | undefined;
384
+ /**
385
+ * The function call identifier (for function_call and function_call_output items).
368
386
  */
369
387
  callId?: string | undefined;
370
388
  /**
@@ -372,9 +390,13 @@ export type CreateRouterResponseInput2 = {
372
390
  */
373
391
  content?: string | Array<TwoText | Image | TwoFile> | undefined;
374
392
  /**
375
- * The ID of the item (for item_reference type).
393
+ * The ID of the item. For item_reference items, this identifies the referenced item.
376
394
  */
377
395
  id?: string | undefined;
396
+ /**
397
+ * The name of the function that was called (for function_call items).
398
+ */
399
+ name?: string | undefined;
378
400
  /**
379
401
  * The output of the function call (for function_call_output type).
380
402
  */
@@ -383,6 +405,10 @@ export type CreateRouterResponseInput2 = {
383
405
  * The role of the message sender (for message items).
384
406
  */
385
407
  role?: InputRole | undefined;
408
+ /**
409
+ * The status of a model-generated input item.
410
+ */
411
+ status?: InputStatus | undefined;
386
412
  /**
387
413
  * The type of item.
388
414
  */
@@ -938,7 +964,7 @@ export type CreateRouterResponseResponseBody = {
938
964
  topLogprobs: number;
939
965
  topP: number;
940
966
  truncation: Truncation;
941
- usage: components.PublicUsage;
967
+ usage: components.PublicUsage | null;
942
968
  user: string | null;
943
969
  variables?: { [k: string]: any } | undefined;
944
970
  };
@@ -1260,20 +1286,27 @@ export function inputContentToJSON(inputContent: InputContent): string {
1260
1286
  export const InputRole$outboundSchema: z.ZodNativeEnum<typeof InputRole> = z
1261
1287
  .nativeEnum(InputRole);
1262
1288
 
1289
+ /** @internal */
1290
+ export const InputStatus$outboundSchema: z.ZodNativeEnum<typeof InputStatus> = z
1291
+ .nativeEnum(InputStatus);
1292
+
1263
1293
  /** @internal */
1264
1294
  export const InputType$outboundSchema: z.ZodNativeEnum<typeof InputType> = z
1265
1295
  .nativeEnum(InputType);
1266
1296
 
1267
1297
  /** @internal */
1268
1298
  export type CreateRouterResponseInput2$Outbound = {
1299
+ arguments?: string | undefined;
1269
1300
  call_id?: string | undefined;
1270
1301
  content?:
1271
1302
  | string
1272
1303
  | Array<TwoText$Outbound | Image$Outbound | TwoFile$Outbound>
1273
1304
  | undefined;
1274
1305
  id?: string | undefined;
1306
+ name?: string | undefined;
1275
1307
  output?: string | undefined;
1276
1308
  role?: string | undefined;
1309
+ status?: string | undefined;
1277
1310
  type?: string | undefined;
1278
1311
  };
1279
1312
 
@@ -1283,6 +1316,7 @@ export const CreateRouterResponseInput2$outboundSchema: z.ZodType<
1283
1316
  z.ZodTypeDef,
1284
1317
  CreateRouterResponseInput2
1285
1318
  > = z.object({
1319
+ arguments: z.string().optional(),
1286
1320
  callId: z.string().optional(),
1287
1321
  content: z.union([
1288
1322
  z.string(),
@@ -1293,8 +1327,10 @@ export const CreateRouterResponseInput2$outboundSchema: z.ZodType<
1293
1327
  ])),
1294
1328
  ]).optional(),
1295
1329
  id: z.string().optional(),
1330
+ name: z.string().optional(),
1296
1331
  output: z.string().optional(),
1297
1332
  role: InputRole$outboundSchema.optional(),
1333
+ status: InputStatus$outboundSchema.optional(),
1298
1334
  type: InputType$outboundSchema.optional(),
1299
1335
  }).transform((v) => {
1300
1336
  return remap$(v, {
@@ -1999,7 +2035,7 @@ export const CreateRouterResponseResponseBody$inboundSchema: z.ZodType<
1999
2035
  top_logprobs: z.number().int(),
2000
2036
  top_p: z.number(),
2001
2037
  truncation: Truncation$inboundSchema,
2002
- usage: components.PublicUsage$inboundSchema,
2038
+ usage: z.nullable(components.PublicUsage$inboundSchema),
2003
2039
  user: z.nullable(z.string()),
2004
2040
  variables: z.record(z.any()).optional(),
2005
2041
  }).transform((v) => {
@@ -1896,7 +1896,7 @@ export const ResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
1896
1896
  z.ZodTypeDef,
1897
1897
  unknown
1898
1898
  > = z.object({
1899
- _id: z.string().default("tool_01KXN9FG3Q0ZSA1QNBVRK6R859"),
1899
+ _id: z.string().default("tool_01KXPYT8485RCSVCQQ0CP2VTD9"),
1900
1900
  path: z.string(),
1901
1901
  key: z.string(),
1902
1902
  display_name: z.string().optional(),
@@ -1993,7 +1993,7 @@ export const ResponseBodyTools$inboundSchema: z.ZodType<
1993
1993
  z.ZodTypeDef,
1994
1994
  unknown
1995
1995
  > = z.object({
1996
- id: z.string().default("01KXN9FG3PGT9RTXE0R7P58X6X"),
1996
+ id: z.string().default("01KXPYT8466D6PXMTASYJ166EN"),
1997
1997
  name: z.string(),
1998
1998
  description: z.string().optional(),
1999
1999
  schema: z.lazy(() => CreateToolResponseBodySchema$inboundSchema),
@@ -2049,7 +2049,7 @@ export const ResponseBodyMCPTool$inboundSchema: z.ZodType<
2049
2049
  z.ZodTypeDef,
2050
2050
  unknown
2051
2051
  > = z.object({
2052
- _id: z.string().default("tool_01KXN9FG3NMP16F4HAPW65SRRB"),
2052
+ _id: z.string().default("tool_01KXPYT8450M8SJ1HZBE7MX7MK"),
2053
2053
  path: z.string(),
2054
2054
  key: z.string(),
2055
2055
  display_name: z.string().optional(),
@@ -2235,7 +2235,7 @@ export const ResponseBodyHTTPTool$inboundSchema: z.ZodType<
2235
2235
  z.ZodTypeDef,
2236
2236
  unknown
2237
2237
  > = z.object({
2238
- _id: z.string().default("tool_01KXN9FG3KA1ESPQWMN1VMM0RQ"),
2238
+ _id: z.string().default("tool_01KXPYT8436SDDM0Y80JXRG4BY"),
2239
2239
  path: z.string(),
2240
2240
  key: z.string(),
2241
2241
  display_name: z.string().optional(),
@@ -2328,7 +2328,7 @@ export const ResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
2328
2328
  z.ZodTypeDef,
2329
2329
  unknown
2330
2330
  > = z.object({
2331
- _id: z.string().default("tool_01KXN9FG3HX9WHEEZN5Y1FJBJW"),
2331
+ _id: z.string().default("tool_01KXPYT8411WW6PCX9TADQ77TQ"),
2332
2332
  path: z.string(),
2333
2333
  key: z.string(),
2334
2334
  display_name: z.string().optional(),
@@ -2429,7 +2429,7 @@ export const ResponseBodyFunctionTool$inboundSchema: z.ZodType<
2429
2429
  z.ZodTypeDef,
2430
2430
  unknown
2431
2431
  > = z.object({
2432
- _id: z.string().default("tool_01KXN9FG3GQGYRZA9Y93RT26TN"),
2432
+ _id: z.string().default("tool_01KXPYT83Y4W5Z1Z63GZ13B76P"),
2433
2433
  path: z.string(),
2434
2434
  key: z.string(),
2435
2435
  display_name: z.string().optional(),