@orq-ai/node 4.17.0-rc.0 → 4.17.0-rc.10

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 (217) hide show
  1. package/README.md +5 -3
  2. package/funcs/responsesCompact.d.ts +1 -1
  3. package/funcs/responsesCompact.js +1 -1
  4. package/funcs/routerClassifyCreate.d.ts +10 -2
  5. package/funcs/routerClassifyCreate.d.ts.map +1 -1
  6. package/funcs/routerClassifyCreate.js +10 -2
  7. package/funcs/routerClassifyCreate.js.map +1 -1
  8. package/funcs/routerDecisionsCreate.d.ts +10 -2
  9. package/funcs/routerDecisionsCreate.d.ts.map +1 -1
  10. package/funcs/routerDecisionsCreate.js +11 -2
  11. package/funcs/routerDecisionsCreate.js.map +1 -1
  12. package/jsr.json +1 -1
  13. package/lib/config.d.ts +2 -2
  14. package/lib/config.js +2 -2
  15. package/lib/config.js.map +1 -1
  16. package/models/components/classifycacheconfig.d.ts +33 -0
  17. package/models/components/classifycacheconfig.d.ts.map +1 -0
  18. package/models/components/classifycacheconfig.js +58 -0
  19. package/models/components/classifycacheconfig.js.map +1 -0
  20. package/models/components/classifytimeoutconfig.d.ts +15 -0
  21. package/models/components/classifytimeoutconfig.d.ts.map +1 -0
  22. package/models/components/classifytimeoutconfig.js +54 -0
  23. package/models/components/classifytimeoutconfig.js.map +1 -0
  24. package/models/components/environment.d.ts +1 -1
  25. package/models/components/index.d.ts +8 -1
  26. package/models/components/index.d.ts.map +1 -1
  27. package/models/components/index.js +8 -1
  28. package/models/components/index.js.map +1 -1
  29. package/models/components/reasoningpart.js +1 -1
  30. package/models/components/responsefunctioncallargumentsdonestreamevent.d.ts +4 -0
  31. package/models/components/responsefunctioncallargumentsdonestreamevent.d.ts.map +1 -1
  32. package/models/components/responsefunctioncallargumentsdonestreamevent.js +1 -0
  33. package/models/components/responsefunctioncallargumentsdonestreamevent.js.map +1 -1
  34. package/models/components/responseimagegenerationcallpartialimagestreamevent.d.ts +16 -0
  35. package/models/components/responseimagegenerationcallpartialimagestreamevent.d.ts.map +1 -1
  36. package/models/components/responseimagegenerationcallpartialimagestreamevent.js +5 -0
  37. package/models/components/responseimagegenerationcallpartialimagestreamevent.js.map +1 -1
  38. package/models/components/responsereasoningsummarypartaddedstreamevent.d.ts +4 -0
  39. package/models/components/responsereasoningsummarypartaddedstreamevent.d.ts.map +1 -1
  40. package/models/components/responsereasoningsummarypartaddedstreamevent.js +1 -0
  41. package/models/components/responsereasoningsummarypartaddedstreamevent.js.map +1 -1
  42. package/models/components/responsereasoningsummarypartdonestreamevent.d.ts +4 -0
  43. package/models/components/responsereasoningsummarypartdonestreamevent.d.ts.map +1 -1
  44. package/models/components/responsereasoningsummarypartdonestreamevent.js +1 -0
  45. package/models/components/responsereasoningsummarypartdonestreamevent.js.map +1 -1
  46. package/models/components/responseshellcallcommandaddedstreamevent.d.ts +35 -0
  47. package/models/components/responseshellcallcommandaddedstreamevent.d.ts.map +1 -0
  48. package/models/components/{publiccompactionitem.js → responseshellcallcommandaddedstreamevent.js} +15 -22
  49. package/models/components/responseshellcallcommandaddedstreamevent.js.map +1 -0
  50. package/models/components/responseshellcallcommanddeltastreamevent.d.ts +39 -0
  51. package/models/components/responseshellcallcommanddeltastreamevent.d.ts.map +1 -0
  52. package/models/components/responseshellcallcommanddeltastreamevent.js +62 -0
  53. package/models/components/responseshellcallcommanddeltastreamevent.js.map +1 -0
  54. package/models/components/responseshellcallcommanddonestreamevent.d.ts +35 -0
  55. package/models/components/responseshellcallcommanddonestreamevent.d.ts.map +1 -0
  56. package/models/components/responseshellcallcommanddonestreamevent.js +61 -0
  57. package/models/components/responseshellcallcommanddonestreamevent.js.map +1 -0
  58. package/models/components/responseshellcalloutputcontentdeltastreamevent.d.ts +41 -0
  59. package/models/components/responseshellcalloutputcontentdeltastreamevent.d.ts.map +1 -0
  60. package/models/components/responseshellcalloutputcontentdeltastreamevent.js +63 -0
  61. package/models/components/responseshellcalloutputcontentdeltastreamevent.js.map +1 -0
  62. package/models/components/responseshellcalloutputcontentdonestreamevent.d.ts +38 -0
  63. package/models/components/responseshellcalloutputcontentdonestreamevent.d.ts.map +1 -0
  64. package/models/components/responseshellcalloutputcontentdonestreamevent.js +63 -0
  65. package/models/components/responseshellcalloutputcontentdonestreamevent.js.map +1 -0
  66. package/models/components/responsestreamevent.d.ts +6 -1
  67. package/models/components/responsestreamevent.d.ts.map +1 -1
  68. package/models/components/responsestreamevent.js +10 -0
  69. package/models/components/responsestreamevent.js.map +1 -1
  70. package/models/components/routingruleplugin.d.ts +10 -0
  71. package/models/components/routingruleplugin.d.ts.map +1 -1
  72. package/models/components/routingruleplugin.js +8 -0
  73. package/models/components/routingruleplugin.js.map +1 -1
  74. package/models/components/signalscheck.d.ts +19 -0
  75. package/models/components/signalscheck.d.ts.map +1 -0
  76. package/models/components/signalscheck.js +60 -0
  77. package/models/components/signalscheck.js.map +1 -0
  78. package/models/components/updateworkspacerequest.d.ts +2 -0
  79. package/models/components/updateworkspacerequest.d.ts.map +1 -1
  80. package/models/components/updateworkspacerequest.js +2 -0
  81. package/models/components/updateworkspacerequest.js.map +1 -1
  82. package/models/errors/createclassify.d.ts +23 -2
  83. package/models/errors/createclassify.d.ts.map +1 -1
  84. package/models/errors/createclassify.js +30 -2
  85. package/models/errors/createclassify.js.map +1 -1
  86. package/models/errors/createdecisions.d.ts +23 -2
  87. package/models/errors/createdecisions.d.ts.map +1 -1
  88. package/models/errors/createdecisions.js +30 -2
  89. package/models/errors/createdecisions.js.map +1 -1
  90. package/models/operations/compactresponse.d.ts +3 -3
  91. package/models/operations/compactresponse.d.ts.map +1 -1
  92. package/models/operations/compactresponse.js +1 -1
  93. package/models/operations/compactresponse.js.map +1 -1
  94. package/models/operations/createclassify.d.ts +4 -0
  95. package/models/operations/createclassify.d.ts.map +1 -1
  96. package/models/operations/createclassify.js +2 -0
  97. package/models/operations/createclassify.js.map +1 -1
  98. package/models/operations/createdecisions.d.ts +4 -0
  99. package/models/operations/createdecisions.d.ts.map +1 -1
  100. package/models/operations/createdecisions.js +2 -0
  101. package/models/operations/createdecisions.js.map +1 -1
  102. package/models/operations/createprompt.d.ts +2 -0
  103. package/models/operations/createprompt.d.ts.map +1 -1
  104. package/models/operations/createprompt.js +2 -0
  105. package/models/operations/createprompt.js.map +1 -1
  106. package/models/operations/createtool.js +4 -4
  107. package/models/operations/deploymentinvoke.d.ts +2 -0
  108. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  109. package/models/operations/deploymentinvoke.js +2 -0
  110. package/models/operations/deploymentinvoke.js.map +1 -1
  111. package/models/operations/deployments.d.ts +2 -0
  112. package/models/operations/deployments.d.ts.map +1 -1
  113. package/models/operations/deployments.js +2 -0
  114. package/models/operations/deployments.js.map +1 -1
  115. package/models/operations/deploymentstream.d.ts +2 -0
  116. package/models/operations/deploymentstream.d.ts.map +1 -1
  117. package/models/operations/deploymentstream.js +2 -0
  118. package/models/operations/deploymentstream.js.map +1 -1
  119. package/models/operations/getallprompts.d.ts +2 -0
  120. package/models/operations/getallprompts.d.ts.map +1 -1
  121. package/models/operations/getallprompts.js +2 -0
  122. package/models/operations/getallprompts.js.map +1 -1
  123. package/models/operations/getalltools.js +4 -4
  124. package/models/operations/getoneprompt.d.ts +2 -0
  125. package/models/operations/getoneprompt.d.ts.map +1 -1
  126. package/models/operations/getoneprompt.js +2 -0
  127. package/models/operations/getoneprompt.js.map +1 -1
  128. package/models/operations/getpromptversion.d.ts +2 -0
  129. package/models/operations/getpromptversion.d.ts.map +1 -1
  130. package/models/operations/getpromptversion.js +2 -0
  131. package/models/operations/getpromptversion.js.map +1 -1
  132. package/models/operations/getv2humanevalsets.js +2 -2
  133. package/models/operations/getv2humanevalsetsid.js +2 -2
  134. package/models/operations/listpromptversions.d.ts +2 -0
  135. package/models/operations/listpromptversions.d.ts.map +1 -1
  136. package/models/operations/listpromptversions.js +2 -0
  137. package/models/operations/listpromptversions.js.map +1 -1
  138. package/models/operations/patchv2humanevalsetsid.js +2 -2
  139. package/models/operations/postv2feedbackevaluation.js +4 -4
  140. package/models/operations/postv2humanevalsets.js +2 -2
  141. package/models/operations/retrievetool.js +4 -4
  142. package/models/operations/runagent.js +1 -1
  143. package/models/operations/streamrunagent.js +1 -1
  144. package/models/operations/tracesgetspan.d.ts +3 -0
  145. package/models/operations/tracesgetspan.d.ts.map +1 -1
  146. package/models/operations/tracesgetspan.js.map +1 -1
  147. package/models/operations/updateprompt.d.ts +2 -0
  148. package/models/operations/updateprompt.d.ts.map +1 -1
  149. package/models/operations/updateprompt.js +2 -0
  150. package/models/operations/updateprompt.js.map +1 -1
  151. package/models/operations/updatetool.js +4 -4
  152. package/package.json +7 -7
  153. package/sdk/classify.d.ts +9 -1
  154. package/sdk/classify.d.ts.map +1 -1
  155. package/sdk/classify.js +9 -1
  156. package/sdk/classify.js.map +1 -1
  157. package/sdk/decisions.d.ts +9 -1
  158. package/sdk/decisions.d.ts.map +1 -1
  159. package/sdk/decisions.js +9 -1
  160. package/sdk/decisions.js.map +1 -1
  161. package/sdk/responses.d.ts +1 -1
  162. package/sdk/responses.js +1 -1
  163. package/src/funcs/responsesCompact.ts +1 -1
  164. package/src/funcs/routerClassifyCreate.ts +16 -1
  165. package/src/funcs/routerDecisionsCreate.ts +17 -1
  166. package/src/lib/config.ts +2 -2
  167. package/src/models/components/classifycacheconfig.ts +59 -0
  168. package/src/models/components/classifytimeoutconfig.ts +39 -0
  169. package/src/models/components/environment.ts +1 -1
  170. package/src/models/components/index.ts +8 -1
  171. package/src/models/components/reasoningpart.ts +1 -1
  172. package/src/models/components/responsefunctioncallargumentsdonestreamevent.ts +5 -0
  173. package/src/models/components/responseimagegenerationcallpartialimagestreamevent.ts +21 -0
  174. package/src/models/components/responsereasoningsummarypartaddedstreamevent.ts +5 -0
  175. package/src/models/components/responsereasoningsummarypartdonestreamevent.ts +5 -0
  176. package/src/models/components/responseshellcallcommandaddedstreamevent.ts +78 -0
  177. package/src/models/components/responseshellcallcommanddeltastreamevent.ts +83 -0
  178. package/src/models/components/responseshellcallcommanddonestreamevent.ts +78 -0
  179. package/src/models/components/responseshellcalloutputcontentdeltastreamevent.ts +85 -0
  180. package/src/models/components/responseshellcalloutputcontentdonestreamevent.ts +82 -0
  181. package/src/models/components/responsestreamevent.ts +30 -0
  182. package/src/models/components/routingruleplugin.ts +22 -0
  183. package/src/models/components/signalscheck.ts +51 -0
  184. package/src/models/components/updateworkspacerequest.ts +4 -0
  185. package/src/models/errors/createclassify.ts +54 -2
  186. package/src/models/errors/createdecisions.ts +54 -2
  187. package/src/models/operations/compactresponse.ts +4 -4
  188. package/src/models/operations/createclassify.ts +6 -0
  189. package/src/models/operations/createdecisions.ts +6 -0
  190. package/src/models/operations/createprompt.ts +2 -0
  191. package/src/models/operations/createtool.ts +4 -4
  192. package/src/models/operations/deploymentinvoke.ts +2 -0
  193. package/src/models/operations/deployments.ts +2 -0
  194. package/src/models/operations/deploymentstream.ts +2 -0
  195. package/src/models/operations/getallprompts.ts +2 -0
  196. package/src/models/operations/getalltools.ts +4 -4
  197. package/src/models/operations/getoneprompt.ts +2 -0
  198. package/src/models/operations/getpromptversion.ts +2 -0
  199. package/src/models/operations/getv2humanevalsets.ts +2 -2
  200. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  201. package/src/models/operations/listpromptversions.ts +2 -0
  202. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  203. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  204. package/src/models/operations/postv2humanevalsets.ts +2 -2
  205. package/src/models/operations/retrievetool.ts +4 -4
  206. package/src/models/operations/runagent.ts +1 -1
  207. package/src/models/operations/streamrunagent.ts +1 -1
  208. package/src/models/operations/tracesgetspan.ts +3 -0
  209. package/src/models/operations/updateprompt.ts +2 -0
  210. package/src/models/operations/updatetool.ts +4 -4
  211. package/src/sdk/classify.ts +9 -1
  212. package/src/sdk/decisions.ts +9 -1
  213. package/src/sdk/responses.ts +1 -1
  214. package/models/components/publiccompactionitem.d.ts +0 -42
  215. package/models/components/publiccompactionitem.d.ts.map +0 -1
  216. package/models/components/publiccompactionitem.js.map +0 -1
  217. package/src/models/components/publiccompactionitem.ts +0 -79
@@ -0,0 +1,82 @@
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 {
8
+ collectExtraKeys as collectExtraKeys$,
9
+ safeParse,
10
+ } from "../../lib/schemas.js";
11
+ import { Result as SafeParseResult } from "../../types/fp.js";
12
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
13
+
14
+ /**
15
+ * A `response.shell_call_output_content.done` server-sent event.
16
+ */
17
+ export type ResponseShellCallOutputContentDoneStreamEvent = {
18
+ /**
19
+ * Index of the shell command.
20
+ */
21
+ commandIndex: number;
22
+ /**
23
+ * ID of the output item this event refers to.
24
+ */
25
+ itemId: string;
26
+ output: Array<{ [k: string]: any }>;
27
+ /**
28
+ * Index of the output item in the response output array.
29
+ */
30
+ outputIndex: number;
31
+ /**
32
+ * Monotonically increasing sequence number for ordering events.
33
+ */
34
+ sequenceNumber: number;
35
+ /**
36
+ * The event type. Discriminates the payload.
37
+ */
38
+ type: "response.shell_call_output_content.done";
39
+ additionalProperties?: { [k: string]: any } | undefined;
40
+ };
41
+
42
+ /** @internal */
43
+ export const ResponseShellCallOutputContentDoneStreamEvent$inboundSchema:
44
+ z.ZodType<
45
+ ResponseShellCallOutputContentDoneStreamEvent,
46
+ z.ZodTypeDef,
47
+ unknown
48
+ > = collectExtraKeys$(
49
+ z.object({
50
+ command_index: z.number().int(),
51
+ item_id: z.string(),
52
+ output: z.array(z.record(z.any())),
53
+ output_index: z.number().int(),
54
+ sequence_number: z.number().int(),
55
+ type: z.literal("response.shell_call_output_content.done"),
56
+ }).catchall(z.any()),
57
+ "additionalProperties",
58
+ true,
59
+ ).transform((v) => {
60
+ return remap$(v, {
61
+ "command_index": "commandIndex",
62
+ "item_id": "itemId",
63
+ "output_index": "outputIndex",
64
+ "sequence_number": "sequenceNumber",
65
+ });
66
+ });
67
+
68
+ export function responseShellCallOutputContentDoneStreamEventFromJSON(
69
+ jsonString: string,
70
+ ): SafeParseResult<
71
+ ResponseShellCallOutputContentDoneStreamEvent,
72
+ SDKValidationError
73
+ > {
74
+ return safeParse(
75
+ jsonString,
76
+ (x) =>
77
+ ResponseShellCallOutputContentDoneStreamEvent$inboundSchema.parse(
78
+ JSON.parse(x),
79
+ ),
80
+ `Failed to parse 'ResponseShellCallOutputContentDoneStreamEvent' from JSON`,
81
+ );
82
+ }
@@ -198,6 +198,26 @@ import {
198
198
  ResponseRefusalDoneStreamEvent,
199
199
  ResponseRefusalDoneStreamEvent$inboundSchema,
200
200
  } from "./responserefusaldonestreamevent.js";
201
+ import {
202
+ ResponseShellCallCommandAddedStreamEvent,
203
+ ResponseShellCallCommandAddedStreamEvent$inboundSchema,
204
+ } from "./responseshellcallcommandaddedstreamevent.js";
205
+ import {
206
+ ResponseShellCallCommandDeltaStreamEvent,
207
+ ResponseShellCallCommandDeltaStreamEvent$inboundSchema,
208
+ } from "./responseshellcallcommanddeltastreamevent.js";
209
+ import {
210
+ ResponseShellCallCommandDoneStreamEvent,
211
+ ResponseShellCallCommandDoneStreamEvent$inboundSchema,
212
+ } from "./responseshellcallcommanddonestreamevent.js";
213
+ import {
214
+ ResponseShellCallOutputContentDeltaStreamEvent,
215
+ ResponseShellCallOutputContentDeltaStreamEvent$inboundSchema,
216
+ } from "./responseshellcalloutputcontentdeltastreamevent.js";
217
+ import {
218
+ ResponseShellCallOutputContentDoneStreamEvent,
219
+ ResponseShellCallOutputContentDoneStreamEvent$inboundSchema,
220
+ } from "./responseshellcalloutputcontentdonestreamevent.js";
201
221
  import {
202
222
  ResponseWebSearchCallCompletedStreamEvent,
203
223
  ResponseWebSearchCallCompletedStreamEvent$inboundSchema,
@@ -263,6 +283,11 @@ export type ResponseStreamEvent =
263
283
  | ResponseReasoningTextDoneStreamEvent
264
284
  | ResponseRefusalDeltaStreamEvent
265
285
  | ResponseRefusalDoneStreamEvent
286
+ | ResponseShellCallCommandAddedStreamEvent
287
+ | ResponseShellCallCommandDeltaStreamEvent
288
+ | ResponseShellCallCommandDoneStreamEvent
289
+ | ResponseShellCallOutputContentDeltaStreamEvent
290
+ | ResponseShellCallOutputContentDoneStreamEvent
266
291
  | ResponseWebSearchCallCompletedStreamEvent
267
292
  | ResponseWebSearchCallInProgressStreamEvent
268
293
  | ResponseWebSearchCallSearchingStreamEvent;
@@ -321,6 +346,11 @@ export const ResponseStreamEvent$inboundSchema: z.ZodType<
321
346
  ResponseReasoningTextDoneStreamEvent$inboundSchema,
322
347
  ResponseRefusalDeltaStreamEvent$inboundSchema,
323
348
  ResponseRefusalDoneStreamEvent$inboundSchema,
349
+ ResponseShellCallCommandAddedStreamEvent$inboundSchema,
350
+ ResponseShellCallCommandDeltaStreamEvent$inboundSchema,
351
+ ResponseShellCallCommandDoneStreamEvent$inboundSchema,
352
+ ResponseShellCallOutputContentDeltaStreamEvent$inboundSchema,
353
+ ResponseShellCallOutputContentDoneStreamEvent$inboundSchema,
324
354
  ResponseWebSearchCallCompletedStreamEvent$inboundSchema,
325
355
  ResponseWebSearchCallInProgressStreamEvent$inboundSchema,
326
356
  ResponseWebSearchCallSearchingStreamEvent$inboundSchema,
@@ -7,6 +7,18 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ RoutingRuleModelsConfig,
12
+ RoutingRuleModelsConfig$inboundSchema,
13
+ RoutingRuleModelsConfig$Outbound,
14
+ RoutingRuleModelsConfig$outboundSchema,
15
+ } from "./routingrulemodelsconfig.js";
16
+ import {
17
+ SignalsCheck,
18
+ SignalsCheck$inboundSchema,
19
+ SignalsCheck$Outbound,
20
+ SignalsCheck$outboundSchema,
21
+ } from "./signalscheck.js";
10
22
 
11
23
  export type RoutingRulePlugin = {
12
24
  /**
@@ -37,6 +49,8 @@ export type RoutingRulePlugin = {
37
49
  * Per-entity-type confidence cutoff. Every key must also appear in entities.
38
50
  */
39
51
  entityThresholds?: { [k: string]: number } | undefined;
52
+ modelsConfig?: RoutingRuleModelsConfig | undefined;
53
+ checks?: { [k: string]: SignalsCheck } | undefined;
40
54
  };
41
55
 
42
56
  /** @internal */
@@ -53,10 +67,13 @@ export const RoutingRulePlugin$inboundSchema: z.ZodType<
53
67
  mask: z.array(z.string()).optional(),
54
68
  regions: z.array(z.string()).optional(),
55
69
  entity_thresholds: z.record(z.number()).optional(),
70
+ models_config: RoutingRuleModelsConfig$inboundSchema.optional(),
71
+ checks: z.record(SignalsCheck$inboundSchema).optional(),
56
72
  }).transform((v) => {
57
73
  return remap$(v, {
58
74
  "on_failure": "onFailure",
59
75
  "entity_thresholds": "entityThresholds",
76
+ "models_config": "modelsConfig",
60
77
  });
61
78
  });
62
79
  /** @internal */
@@ -69,6 +86,8 @@ export type RoutingRulePlugin$Outbound = {
69
86
  mask?: Array<string> | undefined;
70
87
  regions?: Array<string> | undefined;
71
88
  entity_thresholds?: { [k: string]: number } | undefined;
89
+ models_config?: RoutingRuleModelsConfig$Outbound | undefined;
90
+ checks?: { [k: string]: SignalsCheck$Outbound } | undefined;
72
91
  };
73
92
 
74
93
  /** @internal */
@@ -85,10 +104,13 @@ export const RoutingRulePlugin$outboundSchema: z.ZodType<
85
104
  mask: z.array(z.string()).optional(),
86
105
  regions: z.array(z.string()).optional(),
87
106
  entityThresholds: z.record(z.number()).optional(),
107
+ modelsConfig: RoutingRuleModelsConfig$outboundSchema.optional(),
108
+ checks: z.record(SignalsCheck$outboundSchema).optional(),
88
109
  }).transform((v) => {
89
110
  return remap$(v, {
90
111
  onFailure: "on_failure",
91
112
  entityThresholds: "entity_thresholds",
113
+ modelsConfig: "models_config",
92
114
  });
93
115
  });
94
116
 
@@ -0,0 +1,51 @@
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
+
10
+ export type SignalsCheck = {
11
+ enabled?: boolean | undefined;
12
+ threshold?: number | undefined;
13
+ };
14
+
15
+ /** @internal */
16
+ export const SignalsCheck$inboundSchema: z.ZodType<
17
+ SignalsCheck,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ enabled: z.boolean().optional(),
22
+ threshold: z.number().optional(),
23
+ });
24
+ /** @internal */
25
+ export type SignalsCheck$Outbound = {
26
+ enabled?: boolean | undefined;
27
+ threshold?: number | undefined;
28
+ };
29
+
30
+ /** @internal */
31
+ export const SignalsCheck$outboundSchema: z.ZodType<
32
+ SignalsCheck$Outbound,
33
+ z.ZodTypeDef,
34
+ SignalsCheck
35
+ > = z.object({
36
+ enabled: z.boolean().optional(),
37
+ threshold: z.number().optional(),
38
+ });
39
+
40
+ export function signalsCheckToJSON(signalsCheck: SignalsCheck): string {
41
+ return JSON.stringify(SignalsCheck$outboundSchema.parse(signalsCheck));
42
+ }
43
+ export function signalsCheckFromJSON(
44
+ jsonString: string,
45
+ ): SafeParseResult<SignalsCheck, SDKValidationError> {
46
+ return safeParse(
47
+ jsonString,
48
+ (x) => SignalsCheck$inboundSchema.parse(JSON.parse(x)),
49
+ `Failed to parse 'SignalsCheck' from JSON`,
50
+ );
51
+ }
@@ -25,6 +25,7 @@ export type UpdateWorkspaceRequest = {
25
25
  metadata?: UpdateWorkspaceRequestMetadata | undefined;
26
26
  enforceEnabledModels?: boolean | undefined;
27
27
  chatKit?: ChatKitResources | undefined;
28
+ tracingEnabled?: boolean | undefined;
28
29
  };
29
30
 
30
31
  /** @internal */
@@ -56,6 +57,7 @@ export type UpdateWorkspaceRequest$Outbound = {
56
57
  metadata?: UpdateWorkspaceRequestMetadata$Outbound | undefined;
57
58
  enforce_enabled_models?: boolean | undefined;
58
59
  chat_kit?: ChatKitResources$Outbound | undefined;
60
+ tracing_enabled?: boolean | undefined;
59
61
  };
60
62
 
61
63
  /** @internal */
@@ -72,12 +74,14 @@ export const UpdateWorkspaceRequest$outboundSchema: z.ZodType<
72
74
  .optional(),
73
75
  enforceEnabledModels: z.boolean().optional(),
74
76
  chatKit: ChatKitResources$outboundSchema.optional(),
77
+ tracingEnabled: z.boolean().optional(),
75
78
  }).transform((v) => {
76
79
  return remap$(v, {
77
80
  displayName: "display_name",
78
81
  logoUrl: "logo_url",
79
82
  enforceEnabledModels: "enforce_enabled_models",
80
83
  chatKit: "chat_kit",
84
+ tracingEnabled: "tracing_enabled",
81
85
  });
82
86
  });
83
87
 
@@ -134,6 +134,38 @@ export class CreateClassifyRouterClassifyResponse422ResponseBody
134
134
  }
135
135
  }
136
136
 
137
+ /**
138
+ * The final model call exceeded its timeout after available retries and fallbacks were exhausted.
139
+ */
140
+ export type CreateClassifyRouterClassifyResponse408ResponseBodyData = {
141
+ error: components.APIError;
142
+ };
143
+
144
+ /**
145
+ * The final model call exceeded its timeout after available retries and fallbacks were exhausted.
146
+ */
147
+ export class CreateClassifyRouterClassifyResponse408ResponseBody
148
+ extends OrqError
149
+ {
150
+ error: components.APIError;
151
+
152
+ /** The original data that was passed to this error instance. */
153
+ data$: CreateClassifyRouterClassifyResponse408ResponseBodyData;
154
+
155
+ constructor(
156
+ err: CreateClassifyRouterClassifyResponse408ResponseBodyData,
157
+ httpMeta: { response: Response; request: Request; body: string },
158
+ ) {
159
+ const message = err.error?.message
160
+ || `API error occurred: ${JSON.stringify(err)}`;
161
+ super(message, httpMeta);
162
+ this.data$ = err;
163
+ this.error = err.error;
164
+
165
+ this.name = "CreateClassifyRouterClassifyResponse408ResponseBody";
166
+ }
167
+ }
168
+
137
169
  /**
138
170
  * The API key lacks classify permission, or the workspace or project cannot access the model.
139
171
  */
@@ -195,14 +227,14 @@ export class CreateClassifyRouterClassifyResponseBody extends OrqError {
195
227
  }
196
228
 
197
229
  /**
198
- * Malformed JSON, missing or unsupported model, or invalid retry/fallback fields.
230
+ * Malformed JSON, missing or unsupported model, or invalid retry, timeout, or fallback fields.
199
231
  */
200
232
  export type CreateClassifyResponseBodyData = {
201
233
  error: components.APIError;
202
234
  };
203
235
 
204
236
  /**
205
- * Malformed JSON, missing or unsupported model, or invalid retry/fallback fields.
237
+ * Malformed JSON, missing or unsupported model, or invalid retry, timeout, or fallback fields.
206
238
  */
207
239
  export class CreateClassifyResponseBody extends OrqError {
208
240
  error: components.APIError;
@@ -304,6 +336,26 @@ export const CreateClassifyRouterClassifyResponse422ResponseBody$inboundSchema:
304
336
  });
305
337
  });
306
338
 
339
+ /** @internal */
340
+ export const CreateClassifyRouterClassifyResponse408ResponseBody$inboundSchema:
341
+ z.ZodType<
342
+ CreateClassifyRouterClassifyResponse408ResponseBody,
343
+ z.ZodTypeDef,
344
+ unknown
345
+ > = z.object({
346
+ error: components.APIError$inboundSchema,
347
+ request$: z.instanceof(Request),
348
+ response$: z.instanceof(Response),
349
+ body$: z.string(),
350
+ })
351
+ .transform((v) => {
352
+ return new CreateClassifyRouterClassifyResponse408ResponseBody(v, {
353
+ request: v.request$,
354
+ response: v.response$,
355
+ body: v.body$,
356
+ });
357
+ });
358
+
307
359
  /** @internal */
308
360
  export const CreateClassifyRouterClassifyResponseResponseBody$inboundSchema:
309
361
  z.ZodType<
@@ -134,6 +134,38 @@ export class CreateDecisionsRouterDecisionsResponse422ResponseBody
134
134
  }
135
135
  }
136
136
 
137
+ /**
138
+ * The final model call exceeded its timeout after available retries and fallbacks were exhausted.
139
+ */
140
+ export type CreateDecisionsRouterDecisionsResponse408ResponseBodyData = {
141
+ error: components.APIError;
142
+ };
143
+
144
+ /**
145
+ * The final model call exceeded its timeout after available retries and fallbacks were exhausted.
146
+ */
147
+ export class CreateDecisionsRouterDecisionsResponse408ResponseBody
148
+ extends OrqError
149
+ {
150
+ error: components.APIError;
151
+
152
+ /** The original data that was passed to this error instance. */
153
+ data$: CreateDecisionsRouterDecisionsResponse408ResponseBodyData;
154
+
155
+ constructor(
156
+ err: CreateDecisionsRouterDecisionsResponse408ResponseBodyData,
157
+ httpMeta: { response: Response; request: Request; body: string },
158
+ ) {
159
+ const message = err.error?.message
160
+ || `API error occurred: ${JSON.stringify(err)}`;
161
+ super(message, httpMeta);
162
+ this.data$ = err;
163
+ this.error = err.error;
164
+
165
+ this.name = "CreateDecisionsRouterDecisionsResponse408ResponseBody";
166
+ }
167
+ }
168
+
137
169
  /**
138
170
  * The API key lacks classify permission, or the workspace or project cannot access the model.
139
171
  */
@@ -197,14 +229,14 @@ export class CreateDecisionsRouterDecisionsResponseBody extends OrqError {
197
229
  }
198
230
 
199
231
  /**
200
- * Malformed JSON, missing or unsupported model, or invalid retry/fallback fields.
232
+ * Malformed JSON, missing or unsupported model, or invalid retry, timeout, or fallback fields.
201
233
  */
202
234
  export type CreateDecisionsResponseBodyData = {
203
235
  error: components.APIError;
204
236
  };
205
237
 
206
238
  /**
207
- * Malformed JSON, missing or unsupported model, or invalid retry/fallback fields.
239
+ * Malformed JSON, missing or unsupported model, or invalid retry, timeout, or fallback fields.
208
240
  */
209
241
  export class CreateDecisionsResponseBody extends OrqError {
210
242
  error: components.APIError;
@@ -306,6 +338,26 @@ export const CreateDecisionsRouterDecisionsResponse422ResponseBody$inboundSchema
306
338
  });
307
339
  });
308
340
 
341
+ /** @internal */
342
+ export const CreateDecisionsRouterDecisionsResponse408ResponseBody$inboundSchema:
343
+ z.ZodType<
344
+ CreateDecisionsRouterDecisionsResponse408ResponseBody,
345
+ z.ZodTypeDef,
346
+ unknown
347
+ > = z.object({
348
+ error: components.APIError$inboundSchema,
349
+ request$: z.instanceof(Request),
350
+ response$: z.instanceof(Response),
351
+ body$: z.string(),
352
+ })
353
+ .transform((v) => {
354
+ return new CreateDecisionsRouterDecisionsResponse408ResponseBody(v, {
355
+ request: v.request$,
356
+ response: v.response$,
357
+ body: v.body$,
358
+ });
359
+ });
360
+
309
361
  /** @internal */
310
362
  export const CreateDecisionsRouterDecisionsResponseResponseBody$inboundSchema:
311
363
  z.ZodType<
@@ -82,7 +82,7 @@ export type CompactResponseRequestBody = {
82
82
  */
83
83
  model?: string | undefined;
84
84
  /**
85
- * The ID of a previous response to continue from.
85
+ * The ID of a stored response whose conversation is compacted; input is appended after it.
86
86
  */
87
87
  previousResponseId?: string | undefined;
88
88
  /**
@@ -119,9 +119,9 @@ export type CompactResponseResponseBody = {
119
119
  */
120
120
  object: CompactResponseObject;
121
121
  /**
122
- * The compacted list of output items.
122
+ * The next context window: a compaction item summarizing older items, followed by the most recent items verbatim. Pass it as the input of the next request, without previous_response_id.
123
123
  */
124
- output: Array<components.PublicCompactionItem> | null;
124
+ output: Array<any> | null;
125
125
  usage: components.PublicUsage;
126
126
  };
127
127
 
@@ -225,7 +225,7 @@ export const CompactResponseResponseBody$inboundSchema: z.ZodType<
225
225
  created_at: z.number().int(),
226
226
  id: z.string(),
227
227
  object: CompactResponseObject$inboundSchema,
228
- output: z.nullable(z.array(components.PublicCompactionItem$inboundSchema)),
228
+ output: z.nullable(z.array(z.any())),
229
229
  usage: components.PublicUsage$inboundSchema,
230
230
  }).transform((v) => {
231
231
  return remap$(v, {
@@ -87,6 +87,7 @@ export type Questions = NoulQuestion | ChoiceQuestion | ScoreQuestion;
87
87
  export type State = string | { [k: string]: any } | Array<any>;
88
88
 
89
89
  export type CreateClassifyRequestBody = {
90
+ cache?: components.ClassifyCacheConfig | undefined;
90
91
  /**
91
92
  * Up to 10 fallback models in order. The gateway retries a model for matching error codes before trying the next model. Every model must support classification and satisfy access checks. Image requests require native OpenAI image-capable fallbacks.
92
93
  */
@@ -113,6 +114,7 @@ export type CreateClassifyRequestBody = {
113
114
  * The content to evaluate. A string, an object or an array. For OpenAI GPT-6 Luna, strings are passed as text and objects or ordinary JSON arrays are serialized as text. User-message arrays accept string content or input_text/input_image parts. Images must be inline base64 data URLs, with at most 128 images across the request. Remote image URLs, file IDs, audio, non-user roles, bare content parts and tool items are rejected.
114
115
  */
115
116
  state: string | { [k: string]: any } | Array<any>;
117
+ timeout?: components.ClassifyTimeoutConfig | undefined;
116
118
  };
117
119
 
118
120
  /**
@@ -311,6 +313,7 @@ export function stateToJSON(state: State): string {
311
313
 
312
314
  /** @internal */
313
315
  export type CreateClassifyRequestBody$Outbound = {
316
+ cache?: components.ClassifyCacheConfig$Outbound | undefined;
314
317
  fallbacks?: Array<components.FallbackConfig$Outbound> | null | undefined;
315
318
  identity?: components.ResponseIdentity$Outbound | undefined;
316
319
  metadata?: { [k: string]: string } | undefined;
@@ -324,6 +327,7 @@ export type CreateClassifyRequestBody$Outbound = {
324
327
  };
325
328
  retry?: components.ClassifyRetryConfig$Outbound | undefined;
326
329
  state: string | { [k: string]: any } | Array<any>;
330
+ timeout?: components.ClassifyTimeoutConfig$Outbound | undefined;
327
331
  };
328
332
 
329
333
  /** @internal */
@@ -332,6 +336,7 @@ export const CreateClassifyRequestBody$outboundSchema: z.ZodType<
332
336
  z.ZodTypeDef,
333
337
  CreateClassifyRequestBody
334
338
  > = z.object({
339
+ cache: components.ClassifyCacheConfig$outboundSchema.optional(),
335
340
  fallbacks: z.nullable(z.array(components.FallbackConfig$outboundSchema))
336
341
  .optional(),
337
342
  identity: components.ResponseIdentity$outboundSchema.optional(),
@@ -347,6 +352,7 @@ export const CreateClassifyRequestBody$outboundSchema: z.ZodType<
347
352
  ),
348
353
  retry: components.ClassifyRetryConfig$outboundSchema.optional(),
349
354
  state: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
355
+ timeout: components.ClassifyTimeoutConfig$outboundSchema.optional(),
350
356
  });
351
357
 
352
358
  export function createClassifyRequestBodyToJSON(
@@ -95,6 +95,7 @@ export type CreateDecisionsQuestions =
95
95
  export type CreateDecisionsState = string | { [k: string]: any } | Array<any>;
96
96
 
97
97
  export type CreateDecisionsRequestBody = {
98
+ cache?: components.ClassifyCacheConfig | undefined;
98
99
  /**
99
100
  * Up to 10 fallback models in order. The gateway retries a model for matching error codes before trying the next model. Every model must support classification and satisfy access checks. Image requests require native OpenAI image-capable fallbacks.
100
101
  */
@@ -126,6 +127,7 @@ export type CreateDecisionsRequestBody = {
126
127
  * The content to evaluate. A string, an object or an array. For OpenAI GPT-6 Luna, strings are passed as text and objects or ordinary JSON arrays are serialized as text. User-message arrays accept string content or input_text/input_image parts. Images must be inline base64 data URLs, with at most 128 images across the request. Remote image URLs, file IDs, audio, non-user roles, bare content parts and tool items are rejected.
127
128
  */
128
129
  state: string | { [k: string]: any } | Array<any>;
130
+ timeout?: components.ClassifyTimeoutConfig | undefined;
129
131
  };
130
132
 
131
133
  /**
@@ -365,6 +367,7 @@ export function createDecisionsStateToJSON(
365
367
 
366
368
  /** @internal */
367
369
  export type CreateDecisionsRequestBody$Outbound = {
370
+ cache?: components.ClassifyCacheConfig$Outbound | undefined;
368
371
  fallbacks?: Array<components.FallbackConfig$Outbound> | null | undefined;
369
372
  identity?: components.ResponseIdentity$Outbound | undefined;
370
373
  metadata?: { [k: string]: string } | undefined;
@@ -378,6 +381,7 @@ export type CreateDecisionsRequestBody$Outbound = {
378
381
  };
379
382
  retry?: components.ClassifyRetryConfig$Outbound | undefined;
380
383
  state: string | { [k: string]: any } | Array<any>;
384
+ timeout?: components.ClassifyTimeoutConfig$Outbound | undefined;
381
385
  };
382
386
 
383
387
  /** @internal */
@@ -386,6 +390,7 @@ export const CreateDecisionsRequestBody$outboundSchema: z.ZodType<
386
390
  z.ZodTypeDef,
387
391
  CreateDecisionsRequestBody
388
392
  > = z.object({
393
+ cache: components.ClassifyCacheConfig$outboundSchema.optional(),
389
394
  fallbacks: z.nullable(z.array(components.FallbackConfig$outboundSchema))
390
395
  .optional(),
391
396
  identity: components.ResponseIdentity$outboundSchema.optional(),
@@ -401,6 +406,7 @@ export const CreateDecisionsRequestBody$outboundSchema: z.ZodType<
401
406
  ),
402
407
  retry: components.ClassifyRetryConfig$outboundSchema.optional(),
403
408
  state: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
409
+ timeout: components.ClassifyTimeoutConfig$outboundSchema.optional(),
404
410
  });
405
411
 
406
412
  export function createDecisionsRequestBodyToJSON(
@@ -1416,8 +1416,10 @@ export const CreatePromptProvider = {
1416
1416
  Reson8: "reson8",
1417
1417
  Meta: "meta",
1418
1418
  Greenpt: "greenpt",
1419
+ Liquid: "liquid",
1419
1420
  Typesafe: "typesafe",
1420
1421
  Berget: "berget",
1422
+ Cloudflare: "cloudflare",
1421
1423
  Slack: "slack",
1422
1424
  Orq: "orq",
1423
1425
  } as const;
@@ -1575,7 +1575,7 @@ export const ResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
1575
1575
  z.ZodTypeDef,
1576
1576
  unknown
1577
1577
  > = z.object({
1578
- _id: z.string().default("tool_01M4DBVKTVXW6EYE8P082X1JP4"),
1578
+ _id: z.string().default("tool_01M4N9E9N6B5N7YRY4G8Y9XNSX"),
1579
1579
  path: z.string(),
1580
1580
  key: z.string(),
1581
1581
  display_name: z.string().optional(),
@@ -1761,7 +1761,7 @@ export const ResponseBodyHTTPTool$inboundSchema: z.ZodType<
1761
1761
  z.ZodTypeDef,
1762
1762
  unknown
1763
1763
  > = z.object({
1764
- _id: z.string().default("tool_01M4DBVKTTQ33T1VR9YHP4MRPW"),
1764
+ _id: z.string().default("tool_01M4N9E9N6YE7MA4CHSC7MF0NS"),
1765
1765
  path: z.string(),
1766
1766
  key: z.string(),
1767
1767
  display_name: z.string().optional(),
@@ -1854,7 +1854,7 @@ export const ResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
1854
1854
  z.ZodTypeDef,
1855
1855
  unknown
1856
1856
  > = z.object({
1857
- _id: z.string().default("tool_01M4DBVKTTPCHSVP2RFTNFGZ4T"),
1857
+ _id: z.string().default("tool_01M4N9E9N6WFGEA2X0GQJ0PH01"),
1858
1858
  path: z.string(),
1859
1859
  key: z.string(),
1860
1860
  display_name: z.string().optional(),
@@ -1955,7 +1955,7 @@ export const ResponseBodyFunctionTool$inboundSchema: z.ZodType<
1955
1955
  z.ZodTypeDef,
1956
1956
  unknown
1957
1957
  > = z.object({
1958
- _id: z.string().default("tool_01M4DBVKTS25ZXRS4H1ZSCC96Y"),
1958
+ _id: z.string().default("tool_01M4N9E9N54XZ8XRMHM61N9BMK"),
1959
1959
  path: z.string(),
1960
1960
  key: z.string(),
1961
1961
  display_name: z.string().optional(),
@@ -66,8 +66,10 @@ export const DeploymentInvokeProvider = {
66
66
  Reson8: "reson8",
67
67
  Meta: "meta",
68
68
  Greenpt: "greenpt",
69
+ Liquid: "liquid",
69
70
  Typesafe: "typesafe",
70
71
  Berget: "berget",
72
+ Cloudflare: "cloudflare",
71
73
  Slack: "slack",
72
74
  Orq: "orq",
73
75
  } as const;
@@ -498,8 +498,10 @@ export const DeploymentsProvider = {
498
498
  Reson8: "reson8",
499
499
  Meta: "meta",
500
500
  Greenpt: "greenpt",
501
+ Liquid: "liquid",
501
502
  Typesafe: "typesafe",
502
503
  Berget: "berget",
504
+ Cloudflare: "cloudflare",
503
505
  Slack: "slack",
504
506
  Orq: "orq",
505
507
  } as const;
@@ -1171,8 +1171,10 @@ export const DeploymentStreamProvider = {
1171
1171
  Reson8: "reson8",
1172
1172
  Meta: "meta",
1173
1173
  Greenpt: "greenpt",
1174
+ Liquid: "liquid",
1174
1175
  Typesafe: "typesafe",
1175
1176
  Berget: "berget",
1177
+ Cloudflare: "cloudflare",
1176
1178
  Slack: "slack",
1177
1179
  Orq: "orq",
1178
1180
  } as const;
@@ -449,8 +449,10 @@ export const GetAllPromptsProvider = {
449
449
  Reson8: "reson8",
450
450
  Meta: "meta",
451
451
  Greenpt: "greenpt",
452
+ Liquid: "liquid",
452
453
  Typesafe: "typesafe",
453
454
  Berget: "berget",
455
+ Cloudflare: "cloudflare",
454
456
  Slack: "slack",
455
457
  Orq: "orq",
456
458
  } as const;