@orq-ai/node 4.6.0-rc.6 → 4.6.3

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 (1073) hide show
  1. package/FUNCTIONS.md +3 -19
  2. package/README.md +165 -131
  3. package/examples/postV2Feedback.example.ts +26 -0
  4. package/funcs/agentsDelete.js.map +1 -1
  5. package/funcs/agentsInvoke.js.map +1 -1
  6. package/funcs/agentsPostV2AgentsKeyCardRefresh.js.map +1 -1
  7. package/funcs/agentsResponsesCreate.js.map +1 -1
  8. package/funcs/agentsResponsesGet.js.map +1 -1
  9. package/funcs/agentsRetrieve.js.map +1 -1
  10. package/funcs/agentsStream.js.map +1 -1
  11. package/funcs/agentsUpdate.js.map +1 -1
  12. package/funcs/annotationsCreate.js.map +1 -1
  13. package/funcs/annotationsDelete.js.map +1 -1
  14. package/funcs/datasetsClear.js.map +1 -1
  15. package/funcs/datasetsCreateDatapoint.js.map +1 -1
  16. package/funcs/datasetsDelete.js.map +1 -1
  17. package/funcs/datasetsDeleteDatapoint.js.map +1 -1
  18. package/funcs/datasetsListDatapoints.js.map +1 -1
  19. package/funcs/datasetsRetrieve.js.map +1 -1
  20. package/funcs/datasetsRetrieveDatapoint.js.map +1 -1
  21. package/funcs/datasetsUpdate.js.map +1 -1
  22. package/funcs/datasetsUpdateDatapoint.js.map +1 -1
  23. package/funcs/deleteV2HumanEvalsId.d.ts +12 -0
  24. package/funcs/deleteV2HumanEvalsId.d.ts.map +1 -0
  25. package/funcs/deleteV2HumanEvalsId.js +117 -0
  26. package/funcs/deleteV2HumanEvalsId.js.map +1 -0
  27. package/funcs/deploymentsMetricsCreate.d.ts +2 -0
  28. package/funcs/deploymentsMetricsCreate.d.ts.map +1 -1
  29. package/funcs/deploymentsMetricsCreate.js +2 -0
  30. package/funcs/deploymentsMetricsCreate.js.map +1 -1
  31. package/funcs/evalsDelete.js.map +1 -1
  32. package/funcs/evalsInvoke.js.map +1 -1
  33. package/funcs/evalsUpdate.js.map +1 -1
  34. package/funcs/evaluatorsGetV2EvaluatorsIdVersions.js.map +1 -1
  35. package/funcs/filesCreate.d.ts +1 -1
  36. package/funcs/filesCreate.d.ts.map +1 -1
  37. package/funcs/filesCreate.js +6 -12
  38. package/funcs/filesCreate.js.map +1 -1
  39. package/funcs/filesDelete.js.map +1 -1
  40. package/funcs/filesGet.d.ts +1 -1
  41. package/funcs/filesGet.js +1 -1
  42. package/funcs/filesGet.js.map +1 -1
  43. package/funcs/filesGetContent.d.ts +17 -0
  44. package/funcs/filesGetContent.d.ts.map +1 -0
  45. package/funcs/filesGetContent.js +120 -0
  46. package/funcs/filesGetContent.js.map +1 -0
  47. package/funcs/filesList.js +1 -1
  48. package/funcs/filesList.js.map +1 -1
  49. package/funcs/filesUpdate.d.ts +17 -0
  50. package/funcs/filesUpdate.d.ts.map +1 -0
  51. package/funcs/filesUpdate.js +120 -0
  52. package/funcs/filesUpdate.js.map +1 -0
  53. package/funcs/getV2HumanEvals.d.ts +12 -0
  54. package/funcs/getV2HumanEvals.d.ts.map +1 -0
  55. package/funcs/getV2HumanEvals.js +116 -0
  56. package/funcs/getV2HumanEvals.js.map +1 -0
  57. package/funcs/getV2HumanEvalsId.d.ts +12 -0
  58. package/funcs/getV2HumanEvalsId.d.ts.map +1 -0
  59. package/funcs/getV2HumanEvalsId.js +117 -0
  60. package/funcs/getV2HumanEvalsId.js.map +1 -0
  61. package/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.d.ts +14 -0
  62. package/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.d.ts.map +1 -0
  63. package/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.js +117 -0
  64. package/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.js.map +1 -0
  65. package/funcs/humanReviewSetsGetV2HumanEvalSets.d.ts +14 -0
  66. package/funcs/humanReviewSetsGetV2HumanEvalSets.d.ts.map +1 -0
  67. package/funcs/humanReviewSetsGetV2HumanEvalSets.js +115 -0
  68. package/funcs/humanReviewSetsGetV2HumanEvalSets.js.map +1 -0
  69. package/funcs/humanReviewSetsGetV2HumanEvalSetsId.d.ts +14 -0
  70. package/funcs/humanReviewSetsGetV2HumanEvalSetsId.d.ts.map +1 -0
  71. package/funcs/humanReviewSetsGetV2HumanEvalSetsId.js +116 -0
  72. package/funcs/humanReviewSetsGetV2HumanEvalSetsId.js.map +1 -0
  73. package/funcs/humanReviewSetsPatchV2HumanEvalSetsId.d.ts +14 -0
  74. package/funcs/humanReviewSetsPatchV2HumanEvalSetsId.d.ts.map +1 -0
  75. package/funcs/humanReviewSetsPatchV2HumanEvalSetsId.js +117 -0
  76. package/funcs/humanReviewSetsPatchV2HumanEvalSetsId.js.map +1 -0
  77. package/funcs/humanReviewSetsPostV2HumanEvalSets.d.ts +14 -0
  78. package/funcs/humanReviewSetsPostV2HumanEvalSets.d.ts.map +1 -0
  79. package/funcs/humanReviewSetsPostV2HumanEvalSets.js +113 -0
  80. package/funcs/humanReviewSetsPostV2HumanEvalSets.js.map +1 -0
  81. package/funcs/identitiesDelete.js.map +1 -1
  82. package/funcs/identitiesRetrieve.js.map +1 -1
  83. package/funcs/identitiesUpdate.js.map +1 -1
  84. package/funcs/knowledgeCreateChunks.d.ts +1 -1
  85. package/funcs/knowledgeCreateChunks.d.ts.map +1 -1
  86. package/funcs/knowledgeCreateChunks.js +1 -1
  87. package/funcs/knowledgeCreateChunks.js.map +1 -1
  88. package/funcs/knowledgeCreateDatasource.js.map +1 -1
  89. package/funcs/knowledgeDelete.js.map +1 -1
  90. package/funcs/knowledgeDeleteChunk.js.map +1 -1
  91. package/funcs/knowledgeDeleteChunks.js.map +1 -1
  92. package/funcs/knowledgeDeleteDatasource.js.map +1 -1
  93. package/funcs/knowledgeGetChunksCount.js.map +1 -1
  94. package/funcs/knowledgeListChunks.js.map +1 -1
  95. package/funcs/knowledgeListChunksPaginated.js.map +1 -1
  96. package/funcs/knowledgeListDatasources.js.map +1 -1
  97. package/funcs/knowledgeRetrieve.js.map +1 -1
  98. package/funcs/knowledgeRetrieveChunk.js.map +1 -1
  99. package/funcs/knowledgeRetrieveDatasource.js.map +1 -1
  100. package/funcs/knowledgeSearch.js.map +1 -1
  101. package/funcs/knowledgeUpdate.js.map +1 -1
  102. package/funcs/knowledgeUpdateChunk.js.map +1 -1
  103. package/funcs/knowledgeUpdateDatasource.js.map +1 -1
  104. package/funcs/memoryStoresCreateDocument.js.map +1 -1
  105. package/funcs/memoryStoresCreateMemory.js.map +1 -1
  106. package/funcs/memoryStoresDelete.js.map +1 -1
  107. package/funcs/memoryStoresDeleteDocument.js.map +1 -1
  108. package/funcs/memoryStoresDeleteMemory.js.map +1 -1
  109. package/funcs/memoryStoresListDocuments.js.map +1 -1
  110. package/funcs/memoryStoresListMemories.js.map +1 -1
  111. package/funcs/memoryStoresRetrieve.js.map +1 -1
  112. package/funcs/memoryStoresRetrieveDocument.js.map +1 -1
  113. package/funcs/memoryStoresRetrieveMemory.js.map +1 -1
  114. package/funcs/memoryStoresUpdate.js.map +1 -1
  115. package/funcs/memoryStoresUpdateDocument.js.map +1 -1
  116. package/funcs/memoryStoresUpdateMemory.js.map +1 -1
  117. package/funcs/modelsList.d.ts +1 -1
  118. package/funcs/modelsList.d.ts.map +1 -1
  119. package/funcs/modelsList.js +16 -3
  120. package/funcs/modelsList.js.map +1 -1
  121. package/funcs/patchV2HumanEvalsId.d.ts +12 -0
  122. package/funcs/patchV2HumanEvalsId.d.ts.map +1 -0
  123. package/funcs/patchV2HumanEvalsId.js +118 -0
  124. package/funcs/patchV2HumanEvalsId.js.map +1 -0
  125. package/funcs/postV2Feedback.d.ts +12 -0
  126. package/funcs/postV2Feedback.d.ts.map +1 -0
  127. package/funcs/postV2Feedback.js +114 -0
  128. package/funcs/postV2Feedback.js.map +1 -0
  129. package/funcs/{feedbackCreate.d.ts → postV2FeedbackEvaluation.d.ts} +2 -8
  130. package/funcs/postV2FeedbackEvaluation.d.ts.map +1 -0
  131. package/funcs/{feedbackCreate.js → postV2FeedbackEvaluation.js} +13 -15
  132. package/funcs/postV2FeedbackEvaluation.js.map +1 -0
  133. package/funcs/postV2FeedbackEvaluationRemove.d.ts +11 -0
  134. package/funcs/postV2FeedbackEvaluationRemove.d.ts.map +1 -0
  135. package/funcs/postV2FeedbackEvaluationRemove.js +112 -0
  136. package/funcs/postV2FeedbackEvaluationRemove.js.map +1 -0
  137. package/funcs/postV2FeedbackRemove.d.ts +12 -0
  138. package/funcs/postV2FeedbackRemove.d.ts.map +1 -0
  139. package/funcs/postV2FeedbackRemove.js +115 -0
  140. package/funcs/postV2FeedbackRemove.js.map +1 -0
  141. package/funcs/postV2HumanEvals.d.ts +12 -0
  142. package/funcs/postV2HumanEvals.d.ts.map +1 -0
  143. package/funcs/postV2HumanEvals.js +114 -0
  144. package/funcs/postV2HumanEvals.js.map +1 -0
  145. package/funcs/promptsDelete.js.map +1 -1
  146. package/funcs/promptsGetVersion.js.map +1 -1
  147. package/funcs/promptsListVersions.js.map +1 -1
  148. package/funcs/promptsRetrieve.js.map +1 -1
  149. package/funcs/promptsUpdate.js.map +1 -1
  150. package/funcs/routerAudioTranscriptionsCreate.d.ts.map +1 -1
  151. package/funcs/routerAudioTranscriptionsCreate.js +5 -11
  152. package/funcs/routerAudioTranscriptionsCreate.js.map +1 -1
  153. package/funcs/routerAudioTranslationsCreate.d.ts.map +1 -1
  154. package/funcs/routerAudioTranslationsCreate.js +5 -11
  155. package/funcs/routerAudioTranslationsCreate.js.map +1 -1
  156. package/funcs/toolsDelete.js.map +1 -1
  157. package/funcs/toolsGetV2ToolsToolIdVersions.js.map +1 -1
  158. package/funcs/toolsGetV2ToolsToolIdVersionsVersionId.js.map +1 -1
  159. package/funcs/toolsRetrieve.js.map +1 -1
  160. package/funcs/toolsUpdate.js.map +1 -1
  161. package/jsr.json +1 -1
  162. package/lib/config.d.ts +3 -3
  163. package/lib/config.js +3 -3
  164. package/lib/config.js.map +1 -1
  165. package/lib/encodings.d.ts.map +1 -1
  166. package/lib/encodings.js +20 -5
  167. package/lib/encodings.js.map +1 -1
  168. package/lib/files.d.ts +13 -0
  169. package/lib/files.d.ts.map +1 -1
  170. package/lib/files.js +19 -0
  171. package/lib/files.js.map +1 -1
  172. package/lib/sdks.d.ts.map +1 -1
  173. package/lib/sdks.js +8 -4
  174. package/lib/sdks.js.map +1 -1
  175. package/lib/url.d.ts.map +1 -1
  176. package/lib/url.js +4 -2
  177. package/lib/url.js.map +1 -1
  178. package/models/components/filedocument.d.ts +15 -0
  179. package/models/components/filedocument.d.ts.map +1 -0
  180. package/models/components/filedocument.js +62 -0
  181. package/models/components/filedocument.js.map +1 -0
  182. package/models/components/index.d.ts +2 -0
  183. package/models/components/index.d.ts.map +1 -1
  184. package/models/components/index.js +2 -0
  185. package/models/components/index.js.map +1 -1
  186. package/models/components/reasoningpart.js +1 -1
  187. package/models/components/thinkingconfigadaptiveschema.d.ts +23 -0
  188. package/models/components/thinkingconfigadaptiveschema.d.ts.map +1 -0
  189. package/models/components/thinkingconfigadaptiveschema.js +58 -0
  190. package/models/components/thinkingconfigadaptiveschema.js.map +1 -0
  191. package/models/errors/deletev2humanevalsid.d.ts +23 -0
  192. package/models/errors/deletev2humanevalsid.d.ts.map +1 -0
  193. package/models/errors/deletev2humanevalsid.js +68 -0
  194. package/models/errors/deletev2humanevalsid.js.map +1 -0
  195. package/models/errors/getv2humanevals.d.ts +23 -0
  196. package/models/errors/getv2humanevals.d.ts.map +1 -0
  197. package/models/errors/getv2humanevals.js +68 -0
  198. package/models/errors/getv2humanevals.js.map +1 -0
  199. package/models/errors/getv2humanevalsid.d.ts +23 -0
  200. package/models/errors/getv2humanevalsid.d.ts.map +1 -0
  201. package/models/errors/getv2humanevalsid.js +68 -0
  202. package/models/errors/getv2humanevalsid.js.map +1 -0
  203. package/models/errors/index.d.ts +7 -0
  204. package/models/errors/index.d.ts.map +1 -1
  205. package/models/errors/index.js +7 -0
  206. package/models/errors/index.js.map +1 -1
  207. package/models/errors/patchv2humanevalsid.d.ts +23 -0
  208. package/models/errors/patchv2humanevalsid.d.ts.map +1 -0
  209. package/models/errors/patchv2humanevalsid.js +68 -0
  210. package/models/errors/patchv2humanevalsid.js.map +1 -0
  211. package/models/errors/postv2feedback.d.ts +43 -0
  212. package/models/errors/postv2feedback.d.ts.map +1 -0
  213. package/models/errors/postv2feedback.js +94 -0
  214. package/models/errors/postv2feedback.js.map +1 -0
  215. package/models/errors/postv2feedbackremove.d.ts +23 -0
  216. package/models/errors/postv2feedbackremove.d.ts.map +1 -0
  217. package/models/errors/postv2feedbackremove.js +68 -0
  218. package/models/errors/postv2feedbackremove.js.map +1 -0
  219. package/models/errors/postv2humanevals.d.ts +23 -0
  220. package/models/errors/postv2humanevals.d.ts.map +1 -0
  221. package/models/errors/postv2humanevals.js +68 -0
  222. package/models/errors/postv2humanevals.js.map +1 -0
  223. package/models/operations/createagentrequest.d.ts +28 -24
  224. package/models/operations/createagentrequest.d.ts.map +1 -1
  225. package/models/operations/createagentrequest.js +21 -11
  226. package/models/operations/createagentrequest.js.map +1 -1
  227. package/models/operations/createchatcompletion.d.ts +4 -4
  228. package/models/operations/createchatcompletion.d.ts.map +1 -1
  229. package/models/operations/createchatcompletion.js +2 -0
  230. package/models/operations/createchatcompletion.js.map +1 -1
  231. package/models/operations/createchunk.d.ts +3 -3
  232. package/models/operations/createchunk.d.ts.map +1 -1
  233. package/models/operations/createchunk.js +5 -5
  234. package/models/operations/createchunk.js.map +1 -1
  235. package/models/operations/createcompletion.d.ts +14 -0
  236. package/models/operations/createcompletion.d.ts.map +1 -1
  237. package/models/operations/createcompletion.js +18 -2
  238. package/models/operations/createcompletion.js.map +1 -1
  239. package/models/operations/createcontact.js +1 -1
  240. package/models/operations/createdataset.js +1 -1
  241. package/models/operations/createdatasetitem.d.ts +4 -4
  242. package/models/operations/createdatasetitem.d.ts.map +1 -1
  243. package/models/operations/createdatasetitem.js +10 -9
  244. package/models/operations/createdatasetitem.js.map +1 -1
  245. package/models/operations/createdatasource.js +1 -1
  246. package/models/operations/createeval.d.ts +26 -26
  247. package/models/operations/createeval.d.ts.map +1 -1
  248. package/models/operations/createeval.js +46 -48
  249. package/models/operations/createeval.js.map +1 -1
  250. package/models/operations/createidentity.js +1 -1
  251. package/models/operations/createknowledge.d.ts +17 -17
  252. package/models/operations/createknowledge.d.ts.map +1 -1
  253. package/models/operations/createknowledge.js +21 -21
  254. package/models/operations/createknowledge.js.map +1 -1
  255. package/models/operations/createprompt.d.ts +8 -6
  256. package/models/operations/createprompt.d.ts.map +1 -1
  257. package/models/operations/createprompt.js +6 -0
  258. package/models/operations/createprompt.js.map +1 -1
  259. package/models/operations/createresponse.d.ts +15 -0
  260. package/models/operations/createresponse.d.ts.map +1 -1
  261. package/models/operations/createresponse.js +19 -3
  262. package/models/operations/createresponse.js.map +1 -1
  263. package/models/operations/createtool.js +6 -6
  264. package/models/operations/deletev2humanevalsetsid.d.ts +15 -0
  265. package/models/operations/deletev2humanevalsetsid.d.ts.map +1 -0
  266. package/models/operations/deletev2humanevalsetsid.js +49 -0
  267. package/models/operations/deletev2humanevalsetsid.js.map +1 -0
  268. package/models/operations/deletev2humanevalsid.d.ts +27 -0
  269. package/models/operations/deletev2humanevalsid.d.ts.map +1 -0
  270. package/models/operations/deletev2humanevalsid.js +59 -0
  271. package/models/operations/deletev2humanevalsid.js.map +1 -0
  272. package/models/operations/deploymentgetconfig.d.ts +1 -0
  273. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  274. package/models/operations/deploymentgetconfig.js +1 -0
  275. package/models/operations/deploymentgetconfig.js.map +1 -1
  276. package/models/operations/deploymentinvoke.d.ts +4 -0
  277. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  278. package/models/operations/deploymentinvoke.js +4 -0
  279. package/models/operations/deploymentinvoke.js.map +1 -1
  280. package/models/operations/deployments.d.ts +2 -0
  281. package/models/operations/deployments.d.ts.map +1 -1
  282. package/models/operations/deployments.js +2 -0
  283. package/models/operations/deployments.js.map +1 -1
  284. package/models/operations/deploymentstream.d.ts +4 -0
  285. package/models/operations/deploymentstream.d.ts.map +1 -1
  286. package/models/operations/deploymentstream.js +4 -0
  287. package/models/operations/deploymentstream.js.map +1 -1
  288. package/models/operations/filecontent.d.ts +15 -0
  289. package/models/operations/filecontent.d.ts.map +1 -0
  290. package/models/operations/filecontent.js +54 -0
  291. package/models/operations/filecontent.js.map +1 -0
  292. package/models/operations/fileget.d.ts +2 -30
  293. package/models/operations/fileget.d.ts.map +1 -1
  294. package/models/operations/fileget.js +4 -16
  295. package/models/operations/fileget.js.map +1 -1
  296. package/models/operations/filelist.d.ts +5 -52
  297. package/models/operations/filelist.d.ts.map +1 -1
  298. package/models/operations/filelist.js +4 -39
  299. package/models/operations/filelist.js.map +1 -1
  300. package/models/operations/fileupdate.d.ts +43 -0
  301. package/models/operations/fileupdate.d.ts.map +1 -0
  302. package/models/operations/{createfeedback.js → fileupdate.js} +33 -30
  303. package/models/operations/fileupdate.js.map +1 -0
  304. package/models/operations/fileupload.d.ts +2 -29
  305. package/models/operations/fileupload.d.ts.map +1 -1
  306. package/models/operations/fileupload.js +4 -16
  307. package/models/operations/fileupload.js.map +1 -1
  308. package/models/operations/getallprompts.d.ts +4 -2
  309. package/models/operations/getallprompts.d.ts.map +1 -1
  310. package/models/operations/getallprompts.js +4 -0
  311. package/models/operations/getallprompts.js.map +1 -1
  312. package/models/operations/getalltools.js +6 -6
  313. package/models/operations/getevals.js +16 -16
  314. package/models/operations/getoneprompt.d.ts +4 -2
  315. package/models/operations/getoneprompt.d.ts.map +1 -1
  316. package/models/operations/getoneprompt.js +4 -0
  317. package/models/operations/getoneprompt.js.map +1 -1
  318. package/models/operations/getpromptversion.d.ts +4 -2
  319. package/models/operations/getpromptversion.d.ts.map +1 -1
  320. package/models/operations/getpromptversion.js +4 -0
  321. package/models/operations/getpromptversion.js.map +1 -1
  322. package/models/operations/getv2humanevals.d.ts +356 -0
  323. package/models/operations/getv2humanevals.d.ts.map +1 -0
  324. package/models/operations/getv2humanevals.js +274 -0
  325. package/models/operations/getv2humanevals.js.map +1 -0
  326. package/models/operations/getv2humanevalsets.d.ts +103 -0
  327. package/models/operations/getv2humanevalsets.d.ts.map +1 -0
  328. package/models/operations/getv2humanevalsets.js +128 -0
  329. package/models/operations/getv2humanevalsets.js.map +1 -0
  330. package/models/operations/getv2humanevalsetsid.d.ts +106 -0
  331. package/models/operations/getv2humanevalsetsid.d.ts.map +1 -0
  332. package/models/operations/getv2humanevalsetsid.js +124 -0
  333. package/models/operations/getv2humanevalsetsid.js.map +1 -0
  334. package/models/operations/getv2humanevalsid.d.ts +359 -0
  335. package/models/operations/getv2humanevalsid.d.ts.map +1 -0
  336. package/models/operations/getv2humanevalsid.js +271 -0
  337. package/models/operations/getv2humanevalsid.js.map +1 -0
  338. package/models/operations/index.d.ts +16 -1
  339. package/models/operations/index.d.ts.map +1 -1
  340. package/models/operations/index.js +16 -1
  341. package/models/operations/index.js.map +1 -1
  342. package/models/operations/invokeeval.d.ts +1 -0
  343. package/models/operations/invokeeval.d.ts.map +1 -1
  344. package/models/operations/invokeeval.js +1 -0
  345. package/models/operations/invokeeval.js.map +1 -1
  346. package/models/operations/listagents.d.ts +8 -4
  347. package/models/operations/listagents.d.ts.map +1 -1
  348. package/models/operations/listagents.js +5 -0
  349. package/models/operations/listagents.js.map +1 -1
  350. package/models/operations/listdatasetdatapoints.js +4 -4
  351. package/models/operations/listdatasets.js +1 -1
  352. package/models/operations/listdatasources.js +1 -1
  353. package/models/operations/listidentities.js +1 -1
  354. package/models/operations/listmodels.d.ts +10 -0
  355. package/models/operations/listmodels.d.ts.map +1 -1
  356. package/models/operations/listmodels.js +9 -1
  357. package/models/operations/listmodels.js.map +1 -1
  358. package/models/operations/listpromptversions.d.ts +4 -2
  359. package/models/operations/listpromptversions.d.ts.map +1 -1
  360. package/models/operations/listpromptversions.js +4 -0
  361. package/models/operations/listpromptversions.js.map +1 -1
  362. package/models/operations/parse.d.ts +4 -4
  363. package/models/operations/parse.d.ts.map +1 -1
  364. package/models/operations/parse.js +4 -4
  365. package/models/operations/parse.js.map +1 -1
  366. package/models/operations/patchv2humanevalsetsid.d.ts +184 -0
  367. package/models/operations/patchv2humanevalsetsid.d.ts.map +1 -0
  368. package/models/operations/patchv2humanevalsetsid.js +183 -0
  369. package/models/operations/patchv2humanevalsetsid.js.map +1 -0
  370. package/models/operations/patchv2humanevalsid.d.ts +703 -0
  371. package/models/operations/patchv2humanevalsid.d.ts.map +1 -0
  372. package/models/operations/patchv2humanevalsid.js +474 -0
  373. package/models/operations/patchv2humanevalsid.js.map +1 -0
  374. package/models/operations/postv2feedback.d.ts +120 -0
  375. package/models/operations/postv2feedback.d.ts.map +1 -0
  376. package/models/operations/postv2feedback.js +131 -0
  377. package/models/operations/postv2feedback.js.map +1 -0
  378. package/models/operations/postv2feedbackevaluation.d.ts +174 -0
  379. package/models/operations/postv2feedbackevaluation.d.ts.map +1 -0
  380. package/models/operations/postv2feedbackevaluation.js +167 -0
  381. package/models/operations/postv2feedbackevaluation.js.map +1 -0
  382. package/models/operations/postv2feedbackevaluationremove.d.ts +14 -0
  383. package/models/operations/postv2feedbackevaluationremove.d.ts.map +1 -0
  384. package/models/operations/postv2feedbackevaluationremove.js +55 -0
  385. package/models/operations/postv2feedbackevaluationremove.js.map +1 -0
  386. package/models/operations/postv2feedbackremove.d.ts +74 -0
  387. package/models/operations/postv2feedbackremove.d.ts.map +1 -0
  388. package/models/operations/postv2feedbackremove.js +113 -0
  389. package/models/operations/postv2feedbackremove.js.map +1 -0
  390. package/models/operations/postv2humanevals.d.ts +628 -0
  391. package/models/operations/postv2humanevals.d.ts.map +1 -0
  392. package/models/operations/postv2humanevals.js +427 -0
  393. package/models/operations/postv2humanevals.js.map +1 -0
  394. package/models/operations/postv2humanevalsets.d.ts +169 -0
  395. package/models/operations/postv2humanevalsets.d.ts.map +1 -0
  396. package/models/operations/postv2humanevalsets.js +167 -0
  397. package/models/operations/postv2humanevalsets.js.map +1 -0
  398. package/models/operations/retrieveagentrequest.d.ts +8 -4
  399. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  400. package/models/operations/retrieveagentrequest.js +5 -0
  401. package/models/operations/retrieveagentrequest.js.map +1 -1
  402. package/models/operations/retrievedatapoint.js +4 -4
  403. package/models/operations/retrievedataset.js +1 -1
  404. package/models/operations/retrievedatasource.js +1 -1
  405. package/models/operations/retrieveidentity.js +1 -1
  406. package/models/operations/retrievetool.js +6 -6
  407. package/models/operations/runagent.d.ts +8 -8
  408. package/models/operations/runagent.d.ts.map +1 -1
  409. package/models/operations/runagent.js +5 -1
  410. package/models/operations/runagent.js.map +1 -1
  411. package/models/operations/streamrunagent.d.ts +8 -8
  412. package/models/operations/streamrunagent.d.ts.map +1 -1
  413. package/models/operations/streamrunagent.js +5 -1
  414. package/models/operations/streamrunagent.js.map +1 -1
  415. package/models/operations/updateagent.d.ts +32 -28
  416. package/models/operations/updateagent.d.ts.map +1 -1
  417. package/models/operations/updateagent.js +26 -17
  418. package/models/operations/updateagent.js.map +1 -1
  419. package/models/operations/updatedatapoint.js +4 -4
  420. package/models/operations/updatedataset.js +1 -1
  421. package/models/operations/updatedatasource.js +1 -1
  422. package/models/operations/updateeval.d.ts +144 -536
  423. package/models/operations/updateeval.d.ts.map +1 -1
  424. package/models/operations/updateeval.js +156 -520
  425. package/models/operations/updateeval.js.map +1 -1
  426. package/models/operations/updateidentity.js +1 -1
  427. package/models/operations/updateprompt.d.ts +8 -6
  428. package/models/operations/updateprompt.d.ts.map +1 -1
  429. package/models/operations/updateprompt.js +6 -0
  430. package/models/operations/updateprompt.js.map +1 -1
  431. package/models/operations/updatetool.d.ts +16 -16
  432. package/models/operations/updatetool.d.ts.map +1 -1
  433. package/models/operations/updatetool.js +24 -26
  434. package/models/operations/updatetool.js.map +1 -1
  435. package/package.json +3 -4
  436. package/packages/orq-rc/examples/postV2Feedback.example.ts +26 -0
  437. package/packages/orq-rc/src/core.ts +13 -0
  438. package/packages/orq-rc/src/funcs/agentsCreate.ts +161 -0
  439. package/packages/orq-rc/src/funcs/agentsDelete.ts +179 -0
  440. package/packages/orq-rc/src/funcs/agentsInvoke.ts +176 -0
  441. package/packages/orq-rc/src/funcs/agentsList.ts +184 -0
  442. package/packages/orq-rc/src/funcs/agentsPostV2AgentsA2a.ts +178 -0
  443. package/packages/orq-rc/src/funcs/agentsPostV2AgentsKeyCardRefresh.ts +186 -0
  444. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +182 -0
  445. package/packages/orq-rc/src/funcs/agentsResponsesGet.ts +181 -0
  446. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +179 -0
  447. package/packages/orq-rc/src/funcs/agentsRun.ts +162 -0
  448. package/packages/orq-rc/src/funcs/agentsStream.ts +203 -0
  449. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +189 -0
  450. package/packages/orq-rc/src/funcs/agentsUpdate.ts +183 -0
  451. package/packages/orq-rc/src/funcs/annotationsCreate.ts +170 -0
  452. package/packages/orq-rc/src/funcs/annotationsDelete.ts +170 -0
  453. package/packages/orq-rc/src/funcs/chunkingParse.ts +160 -0
  454. package/{src/funcs/feedbackCreate.ts → packages/orq-rc/src/funcs/contactsCreate.ts} +12 -12
  455. package/packages/orq-rc/src/funcs/datasetsClear.ts +166 -0
  456. package/packages/orq-rc/src/funcs/datasetsCreate.ts +165 -0
  457. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +170 -0
  458. package/packages/orq-rc/src/funcs/datasetsDelete.ts +166 -0
  459. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +181 -0
  460. package/packages/orq-rc/src/funcs/datasetsList.ts +167 -0
  461. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +173 -0
  462. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +174 -0
  463. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +180 -0
  464. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +175 -0
  465. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +178 -0
  466. package/packages/orq-rc/src/funcs/deleteV2HumanEvalsId.ts +169 -0
  467. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +168 -0
  468. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +176 -0
  469. package/packages/orq-rc/src/funcs/deploymentsList.ts +176 -0
  470. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +169 -0
  471. package/packages/orq-rc/src/funcs/deploymentsStream.ts +186 -0
  472. package/packages/orq-rc/src/funcs/evalsAll.ts +173 -0
  473. package/packages/orq-rc/src/funcs/evalsCreate.ts +169 -0
  474. package/packages/orq-rc/src/funcs/evalsDelete.ts +172 -0
  475. package/packages/orq-rc/src/funcs/evalsInvoke.ts +180 -0
  476. package/packages/orq-rc/src/funcs/evalsUpdate.ts +172 -0
  477. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +182 -0
  478. package/packages/orq-rc/src/funcs/filesCreate.ts +194 -0
  479. package/packages/orq-rc/src/funcs/filesDelete.ts +163 -0
  480. package/packages/orq-rc/src/funcs/filesGet.ts +165 -0
  481. package/packages/orq-rc/src/funcs/filesGetContent.ts +166 -0
  482. package/packages/orq-rc/src/funcs/filesList.ts +167 -0
  483. package/packages/orq-rc/src/funcs/filesUpdate.ts +166 -0
  484. package/packages/orq-rc/src/funcs/getV2HumanEvals.ts +169 -0
  485. package/packages/orq-rc/src/funcs/getV2HumanEvalsId.ts +168 -0
  486. package/packages/orq-rc/src/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.ts +164 -0
  487. package/packages/orq-rc/src/funcs/humanReviewSetsGetV2HumanEvalSets.ts +168 -0
  488. package/packages/orq-rc/src/funcs/humanReviewSetsGetV2HumanEvalSetsId.ts +163 -0
  489. package/packages/orq-rc/src/funcs/humanReviewSetsPatchV2HumanEvalSetsId.ts +164 -0
  490. package/packages/orq-rc/src/funcs/humanReviewSetsPostV2HumanEvalSets.ts +162 -0
  491. package/packages/orq-rc/src/funcs/identitiesCreate.ts +165 -0
  492. package/packages/orq-rc/src/funcs/identitiesDelete.ts +175 -0
  493. package/packages/orq-rc/src/funcs/identitiesList.ts +170 -0
  494. package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +174 -0
  495. package/packages/orq-rc/src/funcs/identitiesUpdate.ts +175 -0
  496. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +158 -0
  497. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +170 -0
  498. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +165 -0
  499. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +166 -0
  500. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +173 -0
  501. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +169 -0
  502. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +172 -0
  503. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +169 -0
  504. package/packages/orq-rc/src/funcs/knowledgeList.ts +169 -0
  505. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +177 -0
  506. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +170 -0
  507. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +173 -0
  508. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +165 -0
  509. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +172 -0
  510. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +168 -0
  511. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +166 -0
  512. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +163 -0
  513. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +173 -0
  514. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +169 -0
  515. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +162 -0
  516. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +175 -0
  517. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +169 -0
  518. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +167 -0
  519. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +184 -0
  520. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +179 -0
  521. package/packages/orq-rc/src/funcs/memoryStoresList.ts +178 -0
  522. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +183 -0
  523. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +176 -0
  524. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +176 -0
  525. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +178 -0
  526. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +173 -0
  527. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +167 -0
  528. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +179 -0
  529. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +174 -0
  530. package/packages/orq-rc/src/funcs/modelsList.ts +165 -0
  531. package/packages/orq-rc/src/funcs/patchV2HumanEvalsId.ts +170 -0
  532. package/packages/orq-rc/src/funcs/postV2Feedback.ts +172 -0
  533. package/packages/orq-rc/src/funcs/postV2FeedbackEvaluation.ts +159 -0
  534. package/packages/orq-rc/src/funcs/postV2FeedbackEvaluationRemove.ts +159 -0
  535. package/packages/orq-rc/src/funcs/postV2FeedbackRemove.ts +167 -0
  536. package/packages/orq-rc/src/funcs/postV2HumanEvals.ts +168 -0
  537. package/packages/orq-rc/src/funcs/promptsCreate.ts +160 -0
  538. package/packages/orq-rc/src/funcs/promptsDelete.ts +172 -0
  539. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +180 -0
  540. package/packages/orq-rc/src/funcs/promptsList.ts +167 -0
  541. package/packages/orq-rc/src/funcs/promptsListVersions.ts +172 -0
  542. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +165 -0
  543. package/packages/orq-rc/src/funcs/promptsUpdate.ts +172 -0
  544. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +161 -0
  545. package/packages/orq-rc/src/funcs/routerAudioSpeechCreate.ts +161 -0
  546. package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +269 -0
  547. package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +259 -0
  548. package/packages/orq-rc/src/funcs/routerChatCompletionsCreate.ts +168 -0
  549. package/packages/orq-rc/src/funcs/routerCompletionsCreate.ts +168 -0
  550. package/packages/orq-rc/src/funcs/routerEmbeddingsCreate.ts +161 -0
  551. package/packages/orq-rc/src/funcs/routerImagesEditsCreate.ts +222 -0
  552. package/packages/orq-rc/src/funcs/routerImagesGenerationsCreate.ts +160 -0
  553. package/packages/orq-rc/src/funcs/routerImagesVariationsCreate.ts +218 -0
  554. package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +167 -0
  555. package/packages/orq-rc/src/funcs/routerOcr.ts +158 -0
  556. package/packages/orq-rc/src/funcs/routerRerankCreate.ts +160 -0
  557. package/packages/orq-rc/src/funcs/routerResponsesCreate.ts +167 -0
  558. package/packages/orq-rc/src/funcs/toolsCreate.ts +163 -0
  559. package/packages/orq-rc/src/funcs/toolsDelete.ts +166 -0
  560. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +182 -0
  561. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +189 -0
  562. package/packages/orq-rc/src/funcs/toolsList.ts +176 -0
  563. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +165 -0
  564. package/packages/orq-rc/src/funcs/toolsUpdate.ts +175 -0
  565. package/packages/orq-rc/src/hooks/global.ts +44 -0
  566. package/packages/orq-rc/src/hooks/hooks.ts +132 -0
  567. package/packages/orq-rc/src/hooks/index.ts +6 -0
  568. package/packages/orq-rc/src/hooks/registration.ts +15 -0
  569. package/packages/orq-rc/src/hooks/types.ts +112 -0
  570. package/packages/orq-rc/src/index.ts +9 -0
  571. package/packages/orq-rc/src/lib/base64.ts +37 -0
  572. package/packages/orq-rc/src/lib/config.ts +74 -0
  573. package/packages/orq-rc/src/lib/dlv.ts +53 -0
  574. package/packages/orq-rc/src/lib/encodings.ts +516 -0
  575. package/packages/orq-rc/src/lib/env.ts +89 -0
  576. package/packages/orq-rc/src/lib/event-streams.ts +165 -0
  577. package/packages/orq-rc/src/lib/files.ts +104 -0
  578. package/packages/orq-rc/src/lib/http.ts +323 -0
  579. package/packages/orq-rc/src/lib/is-plain-object.ts +43 -0
  580. package/packages/orq-rc/src/lib/logger.ts +9 -0
  581. package/packages/orq-rc/src/lib/matchers.ts +346 -0
  582. package/packages/orq-rc/src/lib/primitives.ts +150 -0
  583. package/packages/orq-rc/src/lib/retries.ts +218 -0
  584. package/packages/orq-rc/src/lib/schemas.ts +91 -0
  585. package/packages/orq-rc/src/lib/sdks.ts +409 -0
  586. package/packages/orq-rc/src/lib/security.ts +263 -0
  587. package/packages/orq-rc/src/lib/url.ts +35 -0
  588. package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +99 -0
  589. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +185 -0
  590. package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +73 -0
  591. package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +91 -0
  592. package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +71 -0
  593. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +507 -0
  594. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +165 -0
  595. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +103 -0
  596. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +517 -0
  597. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +807 -0
  598. package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +136 -0
  599. package/packages/orq-rc/src/models/components/createagentresponse.ts +305 -0
  600. package/packages/orq-rc/src/models/components/datapart.ts +38 -0
  601. package/packages/orq-rc/src/models/components/errorpart.ts +58 -0
  602. package/packages/orq-rc/src/models/components/errorstreamingevent.ts +66 -0
  603. package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +71 -0
  604. package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +61 -0
  605. package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +67 -0
  606. package/packages/orq-rc/src/models/components/extendedmessage.ts +146 -0
  607. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +87 -0
  608. package/packages/orq-rc/src/models/components/filedocument.ts +48 -0
  609. package/packages/orq-rc/src/models/components/filepart.ts +218 -0
  610. package/packages/orq-rc/src/models/components/getagentresponse.ts +348 -0
  611. package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +268 -0
  612. package/packages/orq-rc/src/models/components/index.ts +61 -0
  613. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +3450 -0
  614. package/packages/orq-rc/src/models/components/partdelta.ts +39 -0
  615. package/packages/orq-rc/src/models/components/partdeltaevent.ts +73 -0
  616. package/packages/orq-rc/src/models/components/partdoneevent.ts +70 -0
  617. package/packages/orq-rc/src/models/components/publiccontact.ts +71 -0
  618. package/packages/orq-rc/src/models/components/publicidentity.ts +69 -0
  619. package/packages/orq-rc/src/models/components/reasoningpart.ts +62 -0
  620. package/packages/orq-rc/src/models/components/reasoningpartschema.ts +71 -0
  621. package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +66 -0
  622. package/packages/orq-rc/src/models/components/refusalpartschema.ts +64 -0
  623. package/packages/orq-rc/src/models/components/responsedoneevent.ts +324 -0
  624. package/packages/orq-rc/src/models/components/responsefailedevent.ts +72 -0
  625. package/packages/orq-rc/src/models/components/responsestartedevent.ts +97 -0
  626. package/packages/orq-rc/src/models/components/responsestreamingevent.ts +85 -0
  627. package/packages/orq-rc/src/models/components/reviewoutcome.ts +23 -0
  628. package/packages/orq-rc/src/models/components/security.ts +32 -0
  629. package/packages/orq-rc/src/models/components/telemetry.ts +48 -0
  630. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +207 -0
  631. package/packages/orq-rc/src/models/components/textpart.ts +54 -0
  632. package/packages/orq-rc/src/models/components/thinkingconfigadaptiveschema.ts +59 -0
  633. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +59 -0
  634. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +106 -0
  635. package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +64 -0
  636. package/packages/orq-rc/src/models/components/toolcallpart.ts +51 -0
  637. package/packages/orq-rc/src/models/components/tooldoneevent.ts +77 -0
  638. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +230 -0
  639. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +214 -0
  640. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +200 -0
  641. package/packages/orq-rc/src/models/components/toolfailedevent.ts +77 -0
  642. package/packages/orq-rc/src/models/components/toolresultpart.ts +71 -0
  643. package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +78 -0
  644. package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +87 -0
  645. package/packages/orq-rc/src/models/components/toolstartedevent.ts +82 -0
  646. package/packages/orq-rc/src/models/errors/apierror.ts +40 -0
  647. package/packages/orq-rc/src/models/errors/createeval.ts +51 -0
  648. package/packages/orq-rc/src/models/errors/createmoderation.ts +84 -0
  649. package/packages/orq-rc/src/models/errors/createtranscription.ts +87 -0
  650. package/packages/orq-rc/src/models/errors/createtranslation.ts +87 -0
  651. package/packages/orq-rc/src/models/errors/deleteagent.ts +51 -0
  652. package/packages/orq-rc/src/models/errors/deleteeval.ts +51 -0
  653. package/packages/orq-rc/src/models/errors/deleteidentity.ts +62 -0
  654. package/packages/orq-rc/src/models/errors/deleteprompt.ts +51 -0
  655. package/packages/orq-rc/src/models/errors/deletev2humanevalsid.ts +51 -0
  656. package/packages/orq-rc/src/models/errors/getevals.ts +51 -0
  657. package/packages/orq-rc/src/models/errors/getpromptversion.ts +51 -0
  658. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +51 -0
  659. package/packages/orq-rc/src/models/errors/getv2humanevals.ts +51 -0
  660. package/packages/orq-rc/src/models/errors/getv2humanevalsid.ts +51 -0
  661. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +51 -0
  662. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +52 -0
  663. package/packages/orq-rc/src/models/errors/honoapierror.ts +59 -0
  664. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +62 -0
  665. package/packages/orq-rc/src/models/errors/index.ts +42 -0
  666. package/packages/orq-rc/src/models/errors/invokeeval.ts +141 -0
  667. package/packages/orq-rc/src/models/errors/orqerror.ts +35 -0
  668. package/packages/orq-rc/src/models/errors/patchv2humanevalsid.ts +51 -0
  669. package/packages/orq-rc/src/models/errors/postv2agentsa2a.ts +96 -0
  670. package/packages/orq-rc/src/models/errors/postv2agentskeycardrefresh.ts +97 -0
  671. package/packages/orq-rc/src/models/errors/postv2feedback.ts +96 -0
  672. package/packages/orq-rc/src/models/errors/postv2feedbackremove.ts +51 -0
  673. package/packages/orq-rc/src/models/errors/postv2humanevals.ts +51 -0
  674. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +50 -0
  675. package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +51 -0
  676. package/packages/orq-rc/src/models/errors/retrieveidentity.ts +62 -0
  677. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +109 -0
  678. package/packages/orq-rc/src/models/errors/streamagent.ts +51 -0
  679. package/packages/orq-rc/src/models/errors/streamrunagent.ts +51 -0
  680. package/packages/orq-rc/src/models/errors/updateagent.ts +51 -0
  681. package/packages/orq-rc/src/models/errors/updateeval.ts +51 -0
  682. package/packages/orq-rc/src/models/errors/updateidentity.ts +54 -0
  683. package/packages/orq-rc/src/models/errors/updateprompt.ts +51 -0
  684. package/packages/orq-rc/src/models/errors/updatetool.ts +62 -0
  685. package/packages/orq-rc/src/models/operations/cleardataset.ts +39 -0
  686. package/packages/orq-rc/src/models/operations/createagentrequest.ts +6459 -0
  687. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +670 -0
  688. package/packages/orq-rc/src/models/operations/createannotation.ts +166 -0
  689. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +6398 -0
  690. package/packages/orq-rc/src/models/operations/createchunk.ts +222 -0
  691. package/packages/orq-rc/src/models/operations/createcompletion.ts +3473 -0
  692. package/packages/orq-rc/src/models/operations/createcontact.ts +156 -0
  693. package/packages/orq-rc/src/models/operations/createdataset.ts +162 -0
  694. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2554 -0
  695. package/packages/orq-rc/src/models/operations/createdatasource.ts +437 -0
  696. package/packages/orq-rc/src/models/operations/createembedding.ts +947 -0
  697. package/packages/orq-rc/src/models/operations/createeval.ts +4178 -0
  698. package/packages/orq-rc/src/models/operations/createidentity.ts +162 -0
  699. package/packages/orq-rc/src/models/operations/createimage.ts +1034 -0
  700. package/packages/orq-rc/src/models/operations/createimageedit.ts +1045 -0
  701. package/packages/orq-rc/src/models/operations/createimagevariation.ts +1067 -0
  702. package/packages/orq-rc/src/models/operations/createknowledge.ts +960 -0
  703. package/packages/orq-rc/src/models/operations/creatememory.ts +142 -0
  704. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +152 -0
  705. package/packages/orq-rc/src/models/operations/creatememorystore.ts +199 -0
  706. package/packages/orq-rc/src/models/operations/createmoderation.ts +664 -0
  707. package/packages/orq-rc/src/models/operations/createprompt.ts +5403 -0
  708. package/packages/orq-rc/src/models/operations/creatererank.ts +890 -0
  709. package/packages/orq-rc/src/models/operations/createresponse.ts +3381 -0
  710. package/packages/orq-rc/src/models/operations/createspeech.ts +700 -0
  711. package/packages/orq-rc/src/models/operations/createtool.ts +2499 -0
  712. package/packages/orq-rc/src/models/operations/createtranscription.ts +955 -0
  713. package/packages/orq-rc/src/models/operations/createtranslation.ts +930 -0
  714. package/packages/orq-rc/src/models/operations/deleteagent.ts +39 -0
  715. package/packages/orq-rc/src/models/operations/deleteannotation.ts +82 -0
  716. package/packages/orq-rc/src/models/operations/deletechunk.ts +53 -0
  717. package/packages/orq-rc/src/models/operations/deletechunks.ts +125 -0
  718. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +46 -0
  719. package/packages/orq-rc/src/models/operations/deletedataset.ts +39 -0
  720. package/packages/orq-rc/src/models/operations/deletedatasource.ts +46 -0
  721. package/packages/orq-rc/src/models/operations/deleteeval.ts +31 -0
  722. package/packages/orq-rc/src/models/operations/deleteidentity.ts +34 -0
  723. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +39 -0
  724. package/packages/orq-rc/src/models/operations/deletememory.ts +46 -0
  725. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +55 -0
  726. package/packages/orq-rc/src/models/operations/deletememorystore.ts +39 -0
  727. package/packages/orq-rc/src/models/operations/deleteprompt.ts +34 -0
  728. package/packages/orq-rc/src/models/operations/deletetool.ts +36 -0
  729. package/packages/orq-rc/src/models/operations/deletev2humanevalsetsid.ts +36 -0
  730. package/packages/orq-rc/src/models/operations/deletev2humanevalsid.ts +67 -0
  731. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +2370 -0
  732. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +4526 -0
  733. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +733 -0
  734. package/packages/orq-rc/src/models/operations/deployments.ts +1271 -0
  735. package/packages/orq-rc/src/models/operations/deploymentstream.ts +4657 -0
  736. package/packages/orq-rc/src/models/operations/filecontent.ts +39 -0
  737. package/packages/orq-rc/src/models/operations/filedelete.ts +39 -0
  738. package/packages/orq-rc/src/models/operations/fileget.ts +80 -0
  739. package/packages/orq-rc/src/models/operations/filelist.ts +85 -0
  740. package/packages/orq-rc/src/models/operations/fileupdate.ts +118 -0
  741. package/packages/orq-rc/src/models/operations/fileupload.ts +135 -0
  742. package/packages/orq-rc/src/models/operations/getagentresponse.ts +46 -0
  743. package/packages/orq-rc/src/models/operations/getallmemories.ts +173 -0
  744. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +188 -0
  745. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +200 -0
  746. package/packages/orq-rc/src/models/operations/getallprompts.ts +3171 -0
  747. package/packages/orq-rc/src/models/operations/getalltools.ts +1398 -0
  748. package/packages/orq-rc/src/models/operations/getchunkscount.ts +121 -0
  749. package/packages/orq-rc/src/models/operations/getevals.ts +2842 -0
  750. package/packages/orq-rc/src/models/operations/getonechunk.ts +171 -0
  751. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +652 -0
  752. package/packages/orq-rc/src/models/operations/getoneprompt.ts +3096 -0
  753. package/packages/orq-rc/src/models/operations/getpromptversion.ts +3141 -0
  754. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +162 -0
  755. package/packages/orq-rc/src/models/operations/getv2humanevals.ts +696 -0
  756. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +234 -0
  757. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +235 -0
  758. package/packages/orq-rc/src/models/operations/getv2humanevalsid.ts +707 -0
  759. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +163 -0
  760. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +110 -0
  761. package/packages/orq-rc/src/models/operations/index.ts +131 -0
  762. package/packages/orq-rc/src/models/operations/invokeagent.ts +801 -0
  763. package/packages/orq-rc/src/models/operations/invokeeval.ts +1254 -0
  764. package/packages/orq-rc/src/models/operations/listagents.ts +2781 -0
  765. package/packages/orq-rc/src/models/operations/listchunks.ts +260 -0
  766. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +263 -0
  767. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +1498 -0
  768. package/packages/orq-rc/src/models/operations/listdatasets.ts +205 -0
  769. package/packages/orq-rc/src/models/operations/listdatasources.ts +235 -0
  770. package/packages/orq-rc/src/models/operations/listidentities.ts +275 -0
  771. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +642 -0
  772. package/packages/orq-rc/src/models/operations/listmodels.ts +169 -0
  773. package/packages/orq-rc/src/models/operations/listpromptversions.ts +3216 -0
  774. package/packages/orq-rc/src/models/operations/parse.ts +784 -0
  775. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +415 -0
  776. package/packages/orq-rc/src/models/operations/patchv2humanevalsid.ts +1362 -0
  777. package/packages/orq-rc/src/models/operations/postv2agentsa2a.ts +252 -0
  778. package/packages/orq-rc/src/models/operations/postv2agentskeycardrefresh.ts +100 -0
  779. package/packages/orq-rc/src/models/operations/postv2feedback.ts +207 -0
  780. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +321 -0
  781. package/packages/orq-rc/src/models/operations/postv2feedbackevaluationremove.ts +43 -0
  782. package/packages/orq-rc/src/models/operations/postv2feedbackremove.ts +138 -0
  783. package/packages/orq-rc/src/models/operations/postv2humanevals.ts +1193 -0
  784. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +365 -0
  785. package/packages/orq-rc/src/models/operations/postv2routerocr.ts +478 -0
  786. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +108 -0
  787. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +2843 -0
  788. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +1402 -0
  789. package/packages/orq-rc/src/models/operations/retrievedataset.ts +150 -0
  790. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +152 -0
  791. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +117 -0
  792. package/packages/orq-rc/src/models/operations/retrievememory.ts +112 -0
  793. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +118 -0
  794. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +144 -0
  795. package/packages/orq-rc/src/models/operations/retrievetool.ts +1379 -0
  796. package/packages/orq-rc/src/models/operations/runagent.ts +4963 -0
  797. package/packages/orq-rc/src/models/operations/searchknowledge.ts +1762 -0
  798. package/packages/orq-rc/src/models/operations/streamagent.ts +692 -0
  799. package/packages/orq-rc/src/models/operations/streamrunagent.ts +5125 -0
  800. package/packages/orq-rc/src/models/operations/updateagent.ts +6889 -0
  801. package/packages/orq-rc/src/models/operations/updatechunk.ts +236 -0
  802. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2555 -0
  803. package/packages/orq-rc/src/models/operations/updatedataset.ts +206 -0
  804. package/packages/orq-rc/src/models/operations/updatedatasource.ts +186 -0
  805. package/packages/orq-rc/src/models/operations/updateeval.ts +3134 -0
  806. package/packages/orq-rc/src/models/operations/updateidentity.ts +189 -0
  807. package/packages/orq-rc/src/models/operations/updateknowledge.ts +1231 -0
  808. package/packages/orq-rc/src/models/operations/updatememory.ts +142 -0
  809. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +159 -0
  810. package/packages/orq-rc/src/models/operations/updatememorystore.ts +188 -0
  811. package/packages/orq-rc/src/models/operations/updateprompt.ts +5485 -0
  812. package/packages/orq-rc/src/models/operations/updatetool.ts +2806 -0
  813. package/packages/orq-rc/src/sdk/agents.ts +234 -0
  814. package/packages/orq-rc/src/sdk/annotations.ts +39 -0
  815. package/packages/orq-rc/src/sdk/audio.ts +25 -0
  816. package/packages/orq-rc/src/sdk/chat.ts +13 -0
  817. package/packages/orq-rc/src/sdk/chunking.ts +27 -0
  818. package/packages/orq-rc/src/sdk/completions.ts +32 -0
  819. package/{src/sdk/feedback.ts → packages/orq-rc/src/sdk/contacts.ts} +7 -7
  820. package/packages/orq-rc/src/sdk/datasets.ts +204 -0
  821. package/packages/orq-rc/src/sdk/deployments.ts +89 -0
  822. package/packages/orq-rc/src/sdk/edits.ts +27 -0
  823. package/packages/orq-rc/src/sdk/embeddings.ts +27 -0
  824. package/packages/orq-rc/src/sdk/evals.ts +84 -0
  825. package/packages/orq-rc/src/sdk/evaluators.ts +27 -0
  826. package/packages/orq-rc/src/sdk/files.ts +114 -0
  827. package/packages/orq-rc/src/sdk/generations.ts +27 -0
  828. package/packages/orq-rc/src/sdk/humanreviewsets.ts +84 -0
  829. package/packages/orq-rc/src/sdk/identities.ts +99 -0
  830. package/packages/orq-rc/src/sdk/images.ts +25 -0
  831. package/packages/orq-rc/src/sdk/index.ts +5 -0
  832. package/packages/orq-rc/src/sdk/knowledge.ts +309 -0
  833. package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
  834. package/packages/orq-rc/src/sdk/metrics.ts +29 -0
  835. package/packages/orq-rc/src/sdk/models.ts +27 -0
  836. package/packages/orq-rc/src/sdk/moderations.ts +24 -0
  837. package/packages/orq-rc/src/sdk/orqcompletions.ts +32 -0
  838. package/packages/orq-rc/src/sdk/orqresponses.ts +32 -0
  839. package/packages/orq-rc/src/sdk/prompts.ts +126 -0
  840. package/packages/orq-rc/src/sdk/remoteconfigs.ts +24 -0
  841. package/packages/orq-rc/src/sdk/rerank.ts +27 -0
  842. package/packages/orq-rc/src/sdk/responses.ts +53 -0
  843. package/packages/orq-rc/src/sdk/router.ts +72 -0
  844. package/packages/orq-rc/src/sdk/sdk.ts +225 -0
  845. package/packages/orq-rc/src/sdk/speech.ts +27 -0
  846. package/packages/orq-rc/src/sdk/tools.ts +135 -0
  847. package/packages/orq-rc/src/sdk/transcriptions.ts +24 -0
  848. package/packages/orq-rc/src/sdk/translations.ts +24 -0
  849. package/packages/orq-rc/src/sdk/variations.ts +27 -0
  850. package/packages/orq-rc/src/types/async.ts +68 -0
  851. package/packages/orq-rc/src/types/blobs.ts +32 -0
  852. package/packages/orq-rc/src/types/constdatetime.ts +15 -0
  853. package/packages/orq-rc/src/types/enums.ts +45 -0
  854. package/packages/orq-rc/src/types/fp.ts +50 -0
  855. package/packages/orq-rc/src/types/index.ts +11 -0
  856. package/packages/orq-rc/src/types/operations.ts +105 -0
  857. package/packages/orq-rc/src/types/rfcdate.ts +54 -0
  858. package/packages/orq-rc/src/types/streams.ts +21 -0
  859. package/packages/orq-rc/src/types/unrecognized.ts +35 -0
  860. package/sdk/files.d.ts +23 -9
  861. package/sdk/files.d.ts.map +1 -1
  862. package/sdk/files.js +31 -11
  863. package/sdk/files.js.map +1 -1
  864. package/sdk/humanreviewsets.d.ts +25 -0
  865. package/sdk/humanreviewsets.d.ts.map +1 -0
  866. package/sdk/humanreviewsets.js +47 -0
  867. package/sdk/humanreviewsets.js.map +1 -0
  868. package/sdk/knowledge.d.ts +1 -1
  869. package/sdk/knowledge.d.ts.map +1 -1
  870. package/sdk/metrics.d.ts +2 -0
  871. package/sdk/metrics.d.ts.map +1 -1
  872. package/sdk/metrics.js +2 -0
  873. package/sdk/metrics.js.map +1 -1
  874. package/sdk/models.d.ts +1 -1
  875. package/sdk/models.d.ts.map +1 -1
  876. package/sdk/models.js +2 -2
  877. package/sdk/models.js.map +1 -1
  878. package/sdk/sdk.d.ts +16 -6
  879. package/sdk/sdk.d.ts.map +1 -1
  880. package/sdk/sdk.js +44 -7
  881. package/sdk/sdk.js.map +1 -1
  882. package/src/funcs/agentsDelete.ts +0 -1
  883. package/src/funcs/agentsInvoke.ts +0 -1
  884. package/src/funcs/agentsPostV2AgentsKeyCardRefresh.ts +0 -1
  885. package/src/funcs/agentsResponsesCreate.ts +0 -1
  886. package/src/funcs/agentsResponsesGet.ts +0 -1
  887. package/src/funcs/agentsRetrieve.ts +0 -1
  888. package/src/funcs/agentsStream.ts +0 -1
  889. package/src/funcs/agentsUpdate.ts +0 -1
  890. package/src/funcs/annotationsCreate.ts +0 -1
  891. package/src/funcs/annotationsDelete.ts +0 -1
  892. package/src/funcs/datasetsClear.ts +0 -1
  893. package/src/funcs/datasetsCreateDatapoint.ts +0 -1
  894. package/src/funcs/datasetsDelete.ts +0 -1
  895. package/src/funcs/datasetsDeleteDatapoint.ts +0 -1
  896. package/src/funcs/datasetsListDatapoints.ts +0 -1
  897. package/src/funcs/datasetsRetrieve.ts +0 -1
  898. package/src/funcs/datasetsRetrieveDatapoint.ts +0 -1
  899. package/src/funcs/datasetsUpdate.ts +0 -1
  900. package/src/funcs/datasetsUpdateDatapoint.ts +0 -1
  901. package/src/funcs/deleteV2HumanEvalsId.ts +169 -0
  902. package/src/funcs/deploymentsMetricsCreate.ts +2 -1
  903. package/src/funcs/evalsDelete.ts +0 -1
  904. package/src/funcs/evalsInvoke.ts +0 -1
  905. package/src/funcs/evalsUpdate.ts +0 -1
  906. package/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +0 -1
  907. package/src/funcs/filesCreate.ts +7 -11
  908. package/src/funcs/filesDelete.ts +0 -1
  909. package/src/funcs/filesGet.ts +1 -2
  910. package/src/funcs/filesGetContent.ts +166 -0
  911. package/src/funcs/filesList.ts +1 -1
  912. package/src/funcs/filesUpdate.ts +166 -0
  913. package/src/funcs/getV2HumanEvals.ts +169 -0
  914. package/src/funcs/getV2HumanEvalsId.ts +168 -0
  915. package/src/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.ts +164 -0
  916. package/src/funcs/humanReviewSetsGetV2HumanEvalSets.ts +168 -0
  917. package/src/funcs/humanReviewSetsGetV2HumanEvalSetsId.ts +163 -0
  918. package/src/funcs/humanReviewSetsPatchV2HumanEvalSetsId.ts +164 -0
  919. package/src/funcs/humanReviewSetsPostV2HumanEvalSets.ts +162 -0
  920. package/src/funcs/identitiesDelete.ts +0 -1
  921. package/src/funcs/identitiesRetrieve.ts +0 -1
  922. package/src/funcs/identitiesUpdate.ts +0 -1
  923. package/src/funcs/knowledgeCreateChunks.ts +4 -5
  924. package/src/funcs/knowledgeCreateDatasource.ts +0 -1
  925. package/src/funcs/knowledgeDelete.ts +0 -1
  926. package/src/funcs/knowledgeDeleteChunk.ts +0 -1
  927. package/src/funcs/knowledgeDeleteChunks.ts +0 -1
  928. package/src/funcs/knowledgeDeleteDatasource.ts +0 -1
  929. package/src/funcs/knowledgeGetChunksCount.ts +0 -1
  930. package/src/funcs/knowledgeListChunks.ts +0 -1
  931. package/src/funcs/knowledgeListChunksPaginated.ts +0 -1
  932. package/src/funcs/knowledgeListDatasources.ts +0 -1
  933. package/src/funcs/knowledgeRetrieve.ts +0 -1
  934. package/src/funcs/knowledgeRetrieveChunk.ts +0 -1
  935. package/src/funcs/knowledgeRetrieveDatasource.ts +0 -1
  936. package/src/funcs/knowledgeSearch.ts +0 -1
  937. package/src/funcs/knowledgeUpdate.ts +0 -1
  938. package/src/funcs/knowledgeUpdateChunk.ts +0 -1
  939. package/src/funcs/knowledgeUpdateDatasource.ts +0 -1
  940. package/src/funcs/memoryStoresCreateDocument.ts +0 -1
  941. package/src/funcs/memoryStoresCreateMemory.ts +0 -1
  942. package/src/funcs/memoryStoresDelete.ts +0 -1
  943. package/src/funcs/memoryStoresDeleteDocument.ts +0 -1
  944. package/src/funcs/memoryStoresDeleteMemory.ts +0 -1
  945. package/src/funcs/memoryStoresListDocuments.ts +0 -1
  946. package/src/funcs/memoryStoresListMemories.ts +0 -1
  947. package/src/funcs/memoryStoresRetrieve.ts +0 -1
  948. package/src/funcs/memoryStoresRetrieveDocument.ts +0 -1
  949. package/src/funcs/memoryStoresRetrieveMemory.ts +0 -1
  950. package/src/funcs/memoryStoresUpdate.ts +0 -1
  951. package/src/funcs/memoryStoresUpdateDocument.ts +0 -1
  952. package/src/funcs/memoryStoresUpdateMemory.ts +0 -1
  953. package/src/funcs/modelsList.ts +23 -0
  954. package/src/funcs/patchV2HumanEvalsId.ts +170 -0
  955. package/src/funcs/postV2Feedback.ts +172 -0
  956. package/src/funcs/postV2FeedbackEvaluation.ts +159 -0
  957. package/src/funcs/postV2FeedbackEvaluationRemove.ts +159 -0
  958. package/src/funcs/postV2FeedbackRemove.ts +167 -0
  959. package/src/funcs/postV2HumanEvals.ts +168 -0
  960. package/src/funcs/promptsDelete.ts +0 -1
  961. package/src/funcs/promptsGetVersion.ts +0 -1
  962. package/src/funcs/promptsListVersions.ts +0 -1
  963. package/src/funcs/promptsRetrieve.ts +0 -1
  964. package/src/funcs/promptsUpdate.ts +0 -1
  965. package/src/funcs/routerAudioTranscriptionsCreate.ts +6 -10
  966. package/src/funcs/routerAudioTranslationsCreate.ts +6 -10
  967. package/src/funcs/toolsDelete.ts +0 -1
  968. package/src/funcs/toolsGetV2ToolsToolIdVersions.ts +0 -1
  969. package/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +0 -1
  970. package/src/funcs/toolsRetrieve.ts +0 -1
  971. package/src/funcs/toolsUpdate.ts +0 -1
  972. package/src/lib/config.ts +3 -3
  973. package/src/lib/encodings.ts +23 -4
  974. package/src/lib/files.ts +22 -0
  975. package/src/lib/sdks.ts +7 -5
  976. package/src/lib/url.ts +16 -14
  977. package/src/models/components/filedocument.ts +48 -0
  978. package/src/models/components/index.ts +2 -0
  979. package/src/models/components/reasoningpart.ts +1 -1
  980. package/src/models/components/thinkingconfigadaptiveschema.ts +59 -0
  981. package/src/models/errors/deletev2humanevalsid.ts +51 -0
  982. package/src/models/errors/getv2humanevals.ts +51 -0
  983. package/src/models/errors/getv2humanevalsid.ts +51 -0
  984. package/src/models/errors/index.ts +7 -0
  985. package/src/models/errors/patchv2humanevalsid.ts +51 -0
  986. package/src/models/errors/postv2feedback.ts +96 -0
  987. package/src/models/errors/postv2feedbackremove.ts +51 -0
  988. package/src/models/errors/postv2humanevals.ts +51 -0
  989. package/src/models/operations/createagentrequest.ts +62 -26
  990. package/src/models/operations/createchatcompletion.ts +8 -2
  991. package/src/models/operations/createchunk.ts +7 -7
  992. package/src/models/operations/createcompletion.ts +55 -0
  993. package/src/models/operations/createcontact.ts +1 -1
  994. package/src/models/operations/createdataset.ts +1 -1
  995. package/src/models/operations/createdatasetitem.ts +14 -11
  996. package/src/models/operations/createdatasource.ts +1 -1
  997. package/src/models/operations/createeval.ts +86 -78
  998. package/src/models/operations/createidentity.ts +1 -1
  999. package/src/models/operations/createknowledge.ts +52 -36
  1000. package/src/models/operations/createprompt.ts +15 -3
  1001. package/src/models/operations/createresponse.ts +56 -0
  1002. package/src/models/operations/createtool.ts +6 -6
  1003. package/src/models/operations/deletev2humanevalsetsid.ts +36 -0
  1004. package/src/models/operations/deletev2humanevalsid.ts +67 -0
  1005. package/src/models/operations/deploymentgetconfig.ts +1 -0
  1006. package/src/models/operations/deploymentinvoke.ts +4 -0
  1007. package/src/models/operations/deployments.ts +2 -0
  1008. package/src/models/operations/deploymentstream.ts +4 -0
  1009. package/src/models/operations/filecontent.ts +39 -0
  1010. package/src/models/operations/fileget.ts +5 -41
  1011. package/src/models/operations/filelist.ts +7 -94
  1012. package/src/models/operations/fileupdate.ts +118 -0
  1013. package/src/models/operations/fileupload.ts +5 -40
  1014. package/src/models/operations/getallprompts.ts +7 -1
  1015. package/src/models/operations/getalltools.ts +6 -6
  1016. package/src/models/operations/getevals.ts +16 -16
  1017. package/src/models/operations/getoneprompt.ts +7 -1
  1018. package/src/models/operations/getpromptversion.ts +7 -1
  1019. package/src/models/operations/getv2humanevals.ts +696 -0
  1020. package/src/models/operations/getv2humanevalsets.ts +234 -0
  1021. package/src/models/operations/getv2humanevalsetsid.ts +235 -0
  1022. package/src/models/operations/getv2humanevalsid.ts +707 -0
  1023. package/src/models/operations/index.ts +16 -1
  1024. package/src/models/operations/invokeeval.ts +1 -0
  1025. package/src/models/operations/listagents.ts +15 -2
  1026. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  1027. package/src/models/operations/listdatasets.ts +1 -1
  1028. package/src/models/operations/listdatasources.ts +1 -1
  1029. package/src/models/operations/listidentities.ts +1 -1
  1030. package/src/models/operations/listmodels.ts +26 -0
  1031. package/src/models/operations/listpromptversions.ts +7 -1
  1032. package/src/models/operations/parse.ts +7 -7
  1033. package/src/models/operations/patchv2humanevalsetsid.ts +415 -0
  1034. package/src/models/operations/patchv2humanevalsid.ts +1362 -0
  1035. package/src/models/operations/postv2feedback.ts +207 -0
  1036. package/src/models/operations/postv2feedbackevaluation.ts +321 -0
  1037. package/src/models/operations/postv2feedbackevaluationremove.ts +43 -0
  1038. package/src/models/operations/postv2feedbackremove.ts +138 -0
  1039. package/src/models/operations/postv2humanevals.ts +1193 -0
  1040. package/src/models/operations/postv2humanevalsets.ts +365 -0
  1041. package/src/models/operations/retrieveagentrequest.ts +15 -2
  1042. package/src/models/operations/retrievedatapoint.ts +4 -4
  1043. package/src/models/operations/retrievedataset.ts +1 -1
  1044. package/src/models/operations/retrievedatasource.ts +1 -1
  1045. package/src/models/operations/retrieveidentity.ts +1 -1
  1046. package/src/models/operations/retrievetool.ts +6 -6
  1047. package/src/models/operations/runagent.ts +17 -5
  1048. package/src/models/operations/streamrunagent.ts +17 -5
  1049. package/src/models/operations/updateagent.ts +71 -37
  1050. package/src/models/operations/updatedatapoint.ts +4 -4
  1051. package/src/models/operations/updatedataset.ts +1 -1
  1052. package/src/models/operations/updatedatasource.ts +1 -1
  1053. package/src/models/operations/updateeval.ts +495 -1513
  1054. package/src/models/operations/updateidentity.ts +1 -1
  1055. package/src/models/operations/updateprompt.ts +15 -3
  1056. package/src/models/operations/updatetool.ts +41 -45
  1057. package/src/sdk/files.ts +50 -14
  1058. package/src/sdk/humanreviewsets.ts +84 -0
  1059. package/src/sdk/knowledge.ts +1 -1
  1060. package/src/sdk/metrics.ts +2 -0
  1061. package/src/sdk/models.ts +2 -0
  1062. package/src/sdk/sdk.ts +122 -12
  1063. package/examples/contactsCreate.example.ts +0 -42
  1064. package/funcs/feedbackCreate.d.ts.map +0 -1
  1065. package/funcs/feedbackCreate.js.map +0 -1
  1066. package/models/operations/createfeedback.d.ts +0 -67
  1067. package/models/operations/createfeedback.d.ts.map +0 -1
  1068. package/models/operations/createfeedback.js.map +0 -1
  1069. package/sdk/feedback.d.ts +0 -12
  1070. package/sdk/feedback.d.ts.map +0 -1
  1071. package/sdk/feedback.js +0 -22
  1072. package/sdk/feedback.js.map +0 -1
  1073. package/src/models/operations/createfeedback.ts +0 -144
@@ -0,0 +1,4657 @@
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 * as components from "../components/index.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+
13
+ export type DeploymentStreamGlobals = {
14
+ environment?: string | undefined;
15
+ contactId?: string | undefined;
16
+ };
17
+
18
+ export type DeploymentStreamContentDeploymentsRequest2 =
19
+ components.TextContentPartSchema;
20
+
21
+ /**
22
+ * The contents of the tool message.
23
+ */
24
+ export type DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content =
25
+ | string
26
+ | Array<components.TextContentPartSchema>;
27
+
28
+ /**
29
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
30
+ */
31
+ export const DeploymentStreamPrefixMessagesDeploymentsType = {
32
+ Ephemeral: "ephemeral",
33
+ } as const;
34
+ /**
35
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
36
+ */
37
+ export type DeploymentStreamPrefixMessagesDeploymentsType = ClosedEnum<
38
+ typeof DeploymentStreamPrefixMessagesDeploymentsType
39
+ >;
40
+
41
+ /**
42
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
43
+ *
44
+ * @remarks
45
+ *
46
+ * - `5m`: 5 minutes
47
+ * - `1h`: 1 hour
48
+ *
49
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
50
+ */
51
+ export const DeploymentStreamPrefixMessagesTtl = {
52
+ Fivem: "5m",
53
+ Oneh: "1h",
54
+ } as const;
55
+ /**
56
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
57
+ *
58
+ * @remarks
59
+ *
60
+ * - `5m`: 5 minutes
61
+ * - `1h`: 1 hour
62
+ *
63
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
64
+ */
65
+ export type DeploymentStreamPrefixMessagesTtl = ClosedEnum<
66
+ typeof DeploymentStreamPrefixMessagesTtl
67
+ >;
68
+
69
+ export type DeploymentStreamPrefixMessagesCacheControl = {
70
+ /**
71
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
72
+ */
73
+ type: DeploymentStreamPrefixMessagesDeploymentsType;
74
+ /**
75
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
76
+ *
77
+ * @remarks
78
+ *
79
+ * - `5m`: 5 minutes
80
+ * - `1h`: 1 hour
81
+ *
82
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
83
+ */
84
+ ttl?: DeploymentStreamPrefixMessagesTtl | undefined;
85
+ };
86
+
87
+ export type PrefixMessagesToolMessage = {
88
+ /**
89
+ * The role of the messages author, in this case tool.
90
+ */
91
+ role: "tool";
92
+ /**
93
+ * The contents of the tool message.
94
+ */
95
+ content: string | Array<components.TextContentPartSchema>;
96
+ /**
97
+ * Tool call that this message is responding to.
98
+ */
99
+ toolCallId: string | null;
100
+ cacheControl?: DeploymentStreamPrefixMessagesCacheControl | undefined;
101
+ };
102
+
103
+ export type DeploymentStreamContentDeployments2 =
104
+ | (components.TextContentPartSchema & { type: "text" })
105
+ | components.RefusalPartSchema
106
+ | components.ReasoningPartSchema
107
+ | components.RedactedReasoningPartSchema;
108
+
109
+ /**
110
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
111
+ */
112
+ export type DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent =
113
+ | string
114
+ | Array<
115
+ | (components.TextContentPartSchema & { type: "text" })
116
+ | components.RefusalPartSchema
117
+ | components.ReasoningPartSchema
118
+ | components.RedactedReasoningPartSchema
119
+ >;
120
+
121
+ /**
122
+ * Data about a previous audio response from the model.
123
+ */
124
+ export type PrefixMessagesAudio = {
125
+ /**
126
+ * Unique identifier for a previous audio response from the model.
127
+ */
128
+ id: string;
129
+ };
130
+
131
+ /**
132
+ * The type of the tool. Currently, only `function` is supported.
133
+ */
134
+ export const DeploymentStreamPrefixMessagesType = {
135
+ Function: "function",
136
+ } as const;
137
+ /**
138
+ * The type of the tool. Currently, only `function` is supported.
139
+ */
140
+ export type DeploymentStreamPrefixMessagesType = ClosedEnum<
141
+ typeof DeploymentStreamPrefixMessagesType
142
+ >;
143
+
144
+ export type DeploymentStreamPrefixMessagesFunction = {
145
+ /**
146
+ * The name of the function to call.
147
+ */
148
+ name?: string | undefined;
149
+ /**
150
+ * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
151
+ */
152
+ arguments?: string | undefined;
153
+ };
154
+
155
+ export type DeploymentStreamPrefixMessagesToolCalls = {
156
+ /**
157
+ * The ID of the tool call.
158
+ */
159
+ id: string;
160
+ /**
161
+ * The type of the tool. Currently, only `function` is supported.
162
+ */
163
+ type: DeploymentStreamPrefixMessagesType;
164
+ function: DeploymentStreamPrefixMessagesFunction;
165
+ /**
166
+ * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
167
+ */
168
+ thoughtSignature?: string | undefined;
169
+ };
170
+
171
+ export type PrefixMessagesAssistantMessage = {
172
+ /**
173
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
174
+ */
175
+ content?:
176
+ | string
177
+ | Array<
178
+ | (components.TextContentPartSchema & { type: "text" })
179
+ | components.RefusalPartSchema
180
+ | components.ReasoningPartSchema
181
+ | components.RedactedReasoningPartSchema
182
+ >
183
+ | null
184
+ | undefined;
185
+ /**
186
+ * The refusal message by the assistant.
187
+ */
188
+ refusal?: string | null | undefined;
189
+ /**
190
+ * The role of the messages author, in this case `assistant`.
191
+ */
192
+ role: "assistant";
193
+ /**
194
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
195
+ */
196
+ name?: string | undefined;
197
+ /**
198
+ * Data about a previous audio response from the model.
199
+ */
200
+ audio?: PrefixMessagesAudio | null | undefined;
201
+ /**
202
+ * The tool calls generated by the model, such as function calls.
203
+ */
204
+ toolCalls?: Array<DeploymentStreamPrefixMessagesToolCalls> | undefined;
205
+ };
206
+
207
+ /**
208
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
209
+ */
210
+ export const DeploymentStream2DeploymentsType = {
211
+ Ephemeral: "ephemeral",
212
+ } as const;
213
+ /**
214
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
215
+ */
216
+ export type DeploymentStream2DeploymentsType = ClosedEnum<
217
+ typeof DeploymentStream2DeploymentsType
218
+ >;
219
+
220
+ /**
221
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
222
+ *
223
+ * @remarks
224
+ *
225
+ * - `5m`: 5 minutes
226
+ * - `1h`: 1 hour
227
+ *
228
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
229
+ */
230
+ export const DeploymentStream2Ttl = {
231
+ Fivem: "5m",
232
+ Oneh: "1h",
233
+ } as const;
234
+ /**
235
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
236
+ *
237
+ * @remarks
238
+ *
239
+ * - `5m`: 5 minutes
240
+ * - `1h`: 1 hour
241
+ *
242
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
243
+ */
244
+ export type DeploymentStream2Ttl = ClosedEnum<typeof DeploymentStream2Ttl>;
245
+
246
+ export type DeploymentStream2CacheControl = {
247
+ /**
248
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
249
+ */
250
+ type: DeploymentStream2DeploymentsType;
251
+ /**
252
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
253
+ *
254
+ * @remarks
255
+ *
256
+ * - `5m`: 5 minutes
257
+ * - `1h`: 1 hour
258
+ *
259
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
260
+ */
261
+ ttl?: DeploymentStream2Ttl | undefined;
262
+ };
263
+
264
+ export type DeploymentStream24 = {
265
+ /**
266
+ * The type of the content part. Always `file`.
267
+ */
268
+ type: "file";
269
+ cacheControl?: DeploymentStream2CacheControl | undefined;
270
+ /**
271
+ * File data for the content part. Must contain either file_data or uri, but not both.
272
+ */
273
+ file: components.FileContentPartSchema;
274
+ };
275
+
276
+ export type DeploymentStreamContent2 =
277
+ | (components.TextContentPartSchema & { type: "text" })
278
+ | components.ImageContentPartSchema
279
+ | components.AudioContentPartSchema
280
+ | DeploymentStream24;
281
+
282
+ /**
283
+ * The contents of the user message.
284
+ */
285
+ export type DeploymentStreamPrefixMessagesDeploymentsRequestContent =
286
+ | string
287
+ | Array<
288
+ | (components.TextContentPartSchema & { type: "text" })
289
+ | components.ImageContentPartSchema
290
+ | components.AudioContentPartSchema
291
+ | DeploymentStream24
292
+ >;
293
+
294
+ export type PrefixMessagesUserMessage = {
295
+ /**
296
+ * The role of the messages author, in this case `user`.
297
+ */
298
+ role: "user";
299
+ /**
300
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
301
+ */
302
+ name?: string | undefined;
303
+ /**
304
+ * The contents of the user message.
305
+ */
306
+ content:
307
+ | string
308
+ | Array<
309
+ | (components.TextContentPartSchema & { type: "text" })
310
+ | components.ImageContentPartSchema
311
+ | components.AudioContentPartSchema
312
+ | DeploymentStream24
313
+ >;
314
+ };
315
+
316
+ /**
317
+ * The contents of the developer message.
318
+ */
319
+ export type DeploymentStreamPrefixMessagesDeploymentsContent =
320
+ | string
321
+ | Array<components.TextContentPartSchema>;
322
+
323
+ export type PrefixMessagesDeveloperMessage = {
324
+ /**
325
+ * The role of the messages author, in this case `developer`.
326
+ */
327
+ role: "developer";
328
+ /**
329
+ * The contents of the developer message.
330
+ */
331
+ content: string | Array<components.TextContentPartSchema>;
332
+ /**
333
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
334
+ */
335
+ name?: string | undefined;
336
+ };
337
+
338
+ /**
339
+ * The contents of the system message.
340
+ */
341
+ export type DeploymentStreamPrefixMessagesContent =
342
+ | string
343
+ | Array<components.TextContentPartSchema>;
344
+
345
+ /**
346
+ * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
347
+ */
348
+ export type PrefixMessagesSystemMessage = {
349
+ /**
350
+ * The role of the messages author, in this case `system`.
351
+ */
352
+ role: "system";
353
+ /**
354
+ * The contents of the system message.
355
+ */
356
+ content: string | Array<components.TextContentPartSchema>;
357
+ /**
358
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
359
+ */
360
+ name?: string | undefined;
361
+ };
362
+
363
+ export type DeploymentStreamPrefixMessages =
364
+ | PrefixMessagesSystemMessage
365
+ | PrefixMessagesDeveloperMessage
366
+ | PrefixMessagesUserMessage
367
+ | PrefixMessagesAssistantMessage
368
+ | PrefixMessagesToolMessage;
369
+
370
+ export type DeploymentStreamContentDeploymentsRequestRequestBodyMessages52 =
371
+ components.TextContentPartSchema;
372
+
373
+ /**
374
+ * The contents of the tool message.
375
+ */
376
+ export type DeploymentStreamMessagesDeploymentsRequestRequestBody5Content =
377
+ | string
378
+ | Array<components.TextContentPartSchema>;
379
+
380
+ /**
381
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
382
+ */
383
+ export const DeploymentStreamMessagesDeploymentsType = {
384
+ Ephemeral: "ephemeral",
385
+ } as const;
386
+ /**
387
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
388
+ */
389
+ export type DeploymentStreamMessagesDeploymentsType = ClosedEnum<
390
+ typeof DeploymentStreamMessagesDeploymentsType
391
+ >;
392
+
393
+ /**
394
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
395
+ *
396
+ * @remarks
397
+ *
398
+ * - `5m`: 5 minutes
399
+ * - `1h`: 1 hour
400
+ *
401
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
402
+ */
403
+ export const DeploymentStreamMessagesTtl = {
404
+ Fivem: "5m",
405
+ Oneh: "1h",
406
+ } as const;
407
+ /**
408
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
409
+ *
410
+ * @remarks
411
+ *
412
+ * - `5m`: 5 minutes
413
+ * - `1h`: 1 hour
414
+ *
415
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
416
+ */
417
+ export type DeploymentStreamMessagesTtl = ClosedEnum<
418
+ typeof DeploymentStreamMessagesTtl
419
+ >;
420
+
421
+ export type DeploymentStreamMessagesCacheControl = {
422
+ /**
423
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
424
+ */
425
+ type: DeploymentStreamMessagesDeploymentsType;
426
+ /**
427
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
428
+ *
429
+ * @remarks
430
+ *
431
+ * - `5m`: 5 minutes
432
+ * - `1h`: 1 hour
433
+ *
434
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
435
+ */
436
+ ttl?: DeploymentStreamMessagesTtl | undefined;
437
+ };
438
+
439
+ export type DeploymentStreamMessagesToolMessage = {
440
+ /**
441
+ * The role of the messages author, in this case tool.
442
+ */
443
+ role: "tool";
444
+ /**
445
+ * The contents of the tool message.
446
+ */
447
+ content: string | Array<components.TextContentPartSchema>;
448
+ /**
449
+ * Tool call that this message is responding to.
450
+ */
451
+ toolCallId: string | null;
452
+ cacheControl?: DeploymentStreamMessagesCacheControl | undefined;
453
+ };
454
+
455
+ export type DeploymentStreamContentDeploymentsRequestRequestBodyMessages2 =
456
+ | (components.TextContentPartSchema & { type: "text" })
457
+ | components.RefusalPartSchema
458
+ | components.ReasoningPartSchema
459
+ | components.RedactedReasoningPartSchema;
460
+
461
+ /**
462
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
463
+ */
464
+ export type DeploymentStreamMessagesDeploymentsRequestRequestBodyContent =
465
+ | string
466
+ | Array<
467
+ | (components.TextContentPartSchema & { type: "text" })
468
+ | components.RefusalPartSchema
469
+ | components.ReasoningPartSchema
470
+ | components.RedactedReasoningPartSchema
471
+ >;
472
+
473
+ /**
474
+ * Data about a previous audio response from the model.
475
+ */
476
+ export type DeploymentStreamMessagesAudio = {
477
+ /**
478
+ * Unique identifier for a previous audio response from the model.
479
+ */
480
+ id: string;
481
+ };
482
+
483
+ /**
484
+ * The type of the tool. Currently, only `function` is supported.
485
+ */
486
+ export const DeploymentStreamMessagesType = {
487
+ Function: "function",
488
+ } as const;
489
+ /**
490
+ * The type of the tool. Currently, only `function` is supported.
491
+ */
492
+ export type DeploymentStreamMessagesType = ClosedEnum<
493
+ typeof DeploymentStreamMessagesType
494
+ >;
495
+
496
+ export type DeploymentStreamMessagesFunction = {
497
+ /**
498
+ * The name of the function to call.
499
+ */
500
+ name?: string | undefined;
501
+ /**
502
+ * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
503
+ */
504
+ arguments?: string | undefined;
505
+ };
506
+
507
+ export type DeploymentStreamMessagesToolCalls = {
508
+ /**
509
+ * The ID of the tool call.
510
+ */
511
+ id: string;
512
+ /**
513
+ * The type of the tool. Currently, only `function` is supported.
514
+ */
515
+ type: DeploymentStreamMessagesType;
516
+ function: DeploymentStreamMessagesFunction;
517
+ /**
518
+ * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
519
+ */
520
+ thoughtSignature?: string | undefined;
521
+ };
522
+
523
+ export type DeploymentStreamMessagesAssistantMessage = {
524
+ /**
525
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
526
+ */
527
+ content?:
528
+ | string
529
+ | Array<
530
+ | (components.TextContentPartSchema & { type: "text" })
531
+ | components.RefusalPartSchema
532
+ | components.ReasoningPartSchema
533
+ | components.RedactedReasoningPartSchema
534
+ >
535
+ | null
536
+ | undefined;
537
+ /**
538
+ * The refusal message by the assistant.
539
+ */
540
+ refusal?: string | null | undefined;
541
+ /**
542
+ * The role of the messages author, in this case `assistant`.
543
+ */
544
+ role: "assistant";
545
+ /**
546
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
547
+ */
548
+ name?: string | undefined;
549
+ /**
550
+ * Data about a previous audio response from the model.
551
+ */
552
+ audio?: DeploymentStreamMessagesAudio | null | undefined;
553
+ /**
554
+ * The tool calls generated by the model, such as function calls.
555
+ */
556
+ toolCalls?: Array<DeploymentStreamMessagesToolCalls> | undefined;
557
+ };
558
+
559
+ /**
560
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
561
+ */
562
+ export const DeploymentStream2DeploymentsRequestRequestBodyType = {
563
+ Ephemeral: "ephemeral",
564
+ } as const;
565
+ /**
566
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
567
+ */
568
+ export type DeploymentStream2DeploymentsRequestRequestBodyType = ClosedEnum<
569
+ typeof DeploymentStream2DeploymentsRequestRequestBodyType
570
+ >;
571
+
572
+ /**
573
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
574
+ *
575
+ * @remarks
576
+ *
577
+ * - `5m`: 5 minutes
578
+ * - `1h`: 1 hour
579
+ *
580
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
581
+ */
582
+ export const DeploymentStream2DeploymentsTtl = {
583
+ Fivem: "5m",
584
+ Oneh: "1h",
585
+ } as const;
586
+ /**
587
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
588
+ *
589
+ * @remarks
590
+ *
591
+ * - `5m`: 5 minutes
592
+ * - `1h`: 1 hour
593
+ *
594
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
595
+ */
596
+ export type DeploymentStream2DeploymentsTtl = ClosedEnum<
597
+ typeof DeploymentStream2DeploymentsTtl
598
+ >;
599
+
600
+ export type DeploymentStream2DeploymentsCacheControl = {
601
+ /**
602
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
603
+ */
604
+ type: DeploymentStream2DeploymentsRequestRequestBodyType;
605
+ /**
606
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
607
+ *
608
+ * @remarks
609
+ *
610
+ * - `5m`: 5 minutes
611
+ * - `1h`: 1 hour
612
+ *
613
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
614
+ */
615
+ ttl?: DeploymentStream2DeploymentsTtl | undefined;
616
+ };
617
+
618
+ export type DeploymentStream2Deployments4 = {
619
+ /**
620
+ * The type of the content part. Always `file`.
621
+ */
622
+ type: "file";
623
+ cacheControl?: DeploymentStream2DeploymentsCacheControl | undefined;
624
+ /**
625
+ * File data for the content part. Must contain either file_data or uri, but not both.
626
+ */
627
+ file: components.FileContentPartSchema;
628
+ };
629
+
630
+ export type DeploymentStreamContentDeploymentsRequestRequestBody2 =
631
+ | (components.TextContentPartSchema & { type: "text" })
632
+ | components.ImageContentPartSchema
633
+ | components.AudioContentPartSchema
634
+ | DeploymentStream2Deployments4;
635
+
636
+ /**
637
+ * The contents of the user message.
638
+ */
639
+ export type DeploymentStreamMessagesDeploymentsRequestContent =
640
+ | string
641
+ | Array<
642
+ | (components.TextContentPartSchema & { type: "text" })
643
+ | components.ImageContentPartSchema
644
+ | components.AudioContentPartSchema
645
+ | DeploymentStream2Deployments4
646
+ >;
647
+
648
+ export type DeploymentStreamMessagesUserMessage = {
649
+ /**
650
+ * The role of the messages author, in this case `user`.
651
+ */
652
+ role: "user";
653
+ /**
654
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
655
+ */
656
+ name?: string | undefined;
657
+ /**
658
+ * The contents of the user message.
659
+ */
660
+ content:
661
+ | string
662
+ | Array<
663
+ | (components.TextContentPartSchema & { type: "text" })
664
+ | components.ImageContentPartSchema
665
+ | components.AudioContentPartSchema
666
+ | DeploymentStream2Deployments4
667
+ >;
668
+ };
669
+
670
+ /**
671
+ * The contents of the developer message.
672
+ */
673
+ export type DeploymentStreamMessagesDeploymentsContent =
674
+ | string
675
+ | Array<components.TextContentPartSchema>;
676
+
677
+ export type DeploymentStreamMessagesDeveloperMessage = {
678
+ /**
679
+ * The role of the messages author, in this case `developer`.
680
+ */
681
+ role: "developer";
682
+ /**
683
+ * The contents of the developer message.
684
+ */
685
+ content: string | Array<components.TextContentPartSchema>;
686
+ /**
687
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
688
+ */
689
+ name?: string | undefined;
690
+ };
691
+
692
+ /**
693
+ * The contents of the system message.
694
+ */
695
+ export type DeploymentStreamMessagesContent =
696
+ | string
697
+ | Array<components.TextContentPartSchema>;
698
+
699
+ /**
700
+ * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
701
+ */
702
+ export type DeploymentStreamMessagesSystemMessage = {
703
+ /**
704
+ * The role of the messages author, in this case `system`.
705
+ */
706
+ role: "system";
707
+ /**
708
+ * The contents of the system message.
709
+ */
710
+ content: string | Array<components.TextContentPartSchema>;
711
+ /**
712
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
713
+ */
714
+ name?: string | undefined;
715
+ };
716
+
717
+ export type DeploymentStreamMessages =
718
+ | DeploymentStreamMessagesSystemMessage
719
+ | DeploymentStreamMessagesDeveloperMessage
720
+ | DeploymentStreamMessagesUserMessage
721
+ | DeploymentStreamMessagesAssistantMessage
722
+ | DeploymentStreamMessagesToolMessage;
723
+
724
+ /**
725
+ * Metadata about the document
726
+ */
727
+ export type DeploymentStreamMetadata = {
728
+ /**
729
+ * Name of the file the text is from.
730
+ */
731
+ fileName?: string | undefined;
732
+ /**
733
+ * Content type of the file the text is from.
734
+ */
735
+ fileType?: string | undefined;
736
+ /**
737
+ * The page number the text is from.
738
+ */
739
+ pageNumber?: number | undefined;
740
+ };
741
+
742
+ export type DeploymentStreamDocuments = {
743
+ /**
744
+ * The text content of the document
745
+ */
746
+ text: string;
747
+ /**
748
+ * Metadata about the document
749
+ */
750
+ metadata?: DeploymentStreamMetadata | undefined;
751
+ };
752
+
753
+ export type DeploymentStreamInvokeOptions = {
754
+ /**
755
+ * Whether to include the retrieved knowledge chunks in the response.
756
+ */
757
+ includeRetrievals?: boolean | undefined;
758
+ /**
759
+ * Whether to include the usage metrics in the response.
760
+ */
761
+ includeUsage?: boolean | undefined;
762
+ /**
763
+ * A mock response to use instead of calling the LLM API. This is useful for testing purposes. When provided, the system will return a response object with this content as the completion, without making an actual API call to the LLM provider. This works for both streaming and non-streaming requests. Mock responses will not generate logs, traces or be counted for your plan usage.
764
+ */
765
+ mockResponse?: string | undefined;
766
+ };
767
+
768
+ export type DeploymentStreamThread = {
769
+ /**
770
+ * Unique thread identifier to group related invocations.
771
+ */
772
+ id: string;
773
+ /**
774
+ * Optional tags to differentiate or categorize threads
775
+ */
776
+ tags?: Array<string> | undefined;
777
+ };
778
+
779
+ /**
780
+ * Exists
781
+ */
782
+ export type DeploymentStreamOrExists = {
783
+ exists: boolean;
784
+ };
785
+
786
+ export type DeploymentStreamOrDeploymentsNin = string | number | boolean;
787
+
788
+ /**
789
+ * Not in
790
+ */
791
+ export type DeploymentStreamOrNin = {
792
+ nin: Array<string | number | boolean>;
793
+ };
794
+
795
+ export type DeploymentStreamOrDeploymentsIn = string | number | boolean;
796
+
797
+ /**
798
+ * In
799
+ */
800
+ export type DeploymentStreamOrIn = {
801
+ in: Array<string | number | boolean>;
802
+ };
803
+
804
+ /**
805
+ * Less than or equal to
806
+ */
807
+ export type DeploymentStreamOrLte = {
808
+ lte: number;
809
+ };
810
+
811
+ /**
812
+ * Less than
813
+ */
814
+ export type DeploymentStreamOrLt = {
815
+ lt: number;
816
+ };
817
+
818
+ /**
819
+ * Greater than or equal to
820
+ */
821
+ export type DeploymentStreamOrGte = {
822
+ gte: number;
823
+ };
824
+
825
+ /**
826
+ * Greater than
827
+ */
828
+ export type DeploymentStreamOrGt = {
829
+ gt: number;
830
+ };
831
+
832
+ export type DeploymentStreamOrDeploymentsNe = string | number | boolean;
833
+
834
+ /**
835
+ * Not equal to
836
+ */
837
+ export type DeploymentStreamOrNe = {
838
+ ne: string | number | boolean;
839
+ };
840
+
841
+ export type DeploymentStreamOrDeploymentsEq = string | number | boolean;
842
+
843
+ /**
844
+ * Equal to
845
+ */
846
+ export type DeploymentStreamOrEq = {
847
+ eq: string | number | boolean;
848
+ };
849
+
850
+ export type DeploymentStreamKnowledgeFilterDeploymentsOr =
851
+ | DeploymentStreamOrEq
852
+ | DeploymentStreamOrNe
853
+ | DeploymentStreamOrGt
854
+ | DeploymentStreamOrGte
855
+ | DeploymentStreamOrLt
856
+ | DeploymentStreamOrLte
857
+ | DeploymentStreamOrIn
858
+ | DeploymentStreamOrNin
859
+ | DeploymentStreamOrExists;
860
+
861
+ /**
862
+ * Or
863
+ */
864
+ export type DeploymentStreamKnowledgeFilterOr = {
865
+ or: Array<
866
+ {
867
+ [k: string]:
868
+ | DeploymentStreamOrEq
869
+ | DeploymentStreamOrNe
870
+ | DeploymentStreamOrGt
871
+ | DeploymentStreamOrGte
872
+ | DeploymentStreamOrLt
873
+ | DeploymentStreamOrLte
874
+ | DeploymentStreamOrIn
875
+ | DeploymentStreamOrNin
876
+ | DeploymentStreamOrExists;
877
+ }
878
+ >;
879
+ };
880
+
881
+ /**
882
+ * Exists
883
+ */
884
+ export type DeploymentStreamAndExists = {
885
+ exists: boolean;
886
+ };
887
+
888
+ export type DeploymentStreamAndDeploymentsNin = string | number | boolean;
889
+
890
+ /**
891
+ * Not in
892
+ */
893
+ export type DeploymentStreamAndNin = {
894
+ nin: Array<string | number | boolean>;
895
+ };
896
+
897
+ export type DeploymentStreamAndDeploymentsIn = string | number | boolean;
898
+
899
+ /**
900
+ * In
901
+ */
902
+ export type DeploymentStreamAndIn = {
903
+ in: Array<string | number | boolean>;
904
+ };
905
+
906
+ /**
907
+ * Less than or equal to
908
+ */
909
+ export type DeploymentStreamAndLte = {
910
+ lte: number;
911
+ };
912
+
913
+ /**
914
+ * Less than
915
+ */
916
+ export type DeploymentStreamAndLt = {
917
+ lt: number;
918
+ };
919
+
920
+ /**
921
+ * Greater than or equal to
922
+ */
923
+ export type DeploymentStreamAndGte = {
924
+ gte: number;
925
+ };
926
+
927
+ /**
928
+ * Greater than
929
+ */
930
+ export type DeploymentStreamAndGt = {
931
+ gt: number;
932
+ };
933
+
934
+ export type DeploymentStreamAndDeploymentsNe = string | number | boolean;
935
+
936
+ /**
937
+ * Not equal to
938
+ */
939
+ export type DeploymentStreamAndNe = {
940
+ ne: string | number | boolean;
941
+ };
942
+
943
+ export type DeploymentStreamAndDeploymentsEq = string | number | boolean;
944
+
945
+ /**
946
+ * Equal to
947
+ */
948
+ export type DeploymentStreamAndEq = {
949
+ eq: string | number | boolean;
950
+ };
951
+
952
+ export type DeploymentStreamKnowledgeFilterDeploymentsAnd =
953
+ | DeploymentStreamAndEq
954
+ | DeploymentStreamAndNe
955
+ | DeploymentStreamAndGt
956
+ | DeploymentStreamAndGte
957
+ | DeploymentStreamAndLt
958
+ | DeploymentStreamAndLte
959
+ | DeploymentStreamAndIn
960
+ | DeploymentStreamAndNin
961
+ | DeploymentStreamAndExists;
962
+
963
+ /**
964
+ * And
965
+ */
966
+ export type DeploymentStreamKnowledgeFilterAnd = {
967
+ and: Array<
968
+ {
969
+ [k: string]:
970
+ | DeploymentStreamAndEq
971
+ | DeploymentStreamAndNe
972
+ | DeploymentStreamAndGt
973
+ | DeploymentStreamAndGte
974
+ | DeploymentStreamAndLt
975
+ | DeploymentStreamAndLte
976
+ | DeploymentStreamAndIn
977
+ | DeploymentStreamAndNin
978
+ | DeploymentStreamAndExists;
979
+ }
980
+ >;
981
+ };
982
+
983
+ /**
984
+ * Exists
985
+ */
986
+ export type OneExists = {
987
+ exists: boolean;
988
+ };
989
+
990
+ export type DeploymentStream1DeploymentsNin = string | number | boolean;
991
+
992
+ /**
993
+ * Not in
994
+ */
995
+ export type DeploymentStream1Nin = {
996
+ nin: Array<string | number | boolean>;
997
+ };
998
+
999
+ export type DeploymentStream1DeploymentsIn = string | number | boolean;
1000
+
1001
+ /**
1002
+ * In
1003
+ */
1004
+ export type DeploymentStream1In = {
1005
+ in: Array<string | number | boolean>;
1006
+ };
1007
+
1008
+ /**
1009
+ * Less than or equal to
1010
+ */
1011
+ export type OneLte = {
1012
+ lte: number;
1013
+ };
1014
+
1015
+ /**
1016
+ * Less than
1017
+ */
1018
+ export type OneLt = {
1019
+ lt: number;
1020
+ };
1021
+
1022
+ /**
1023
+ * Greater than or equal to
1024
+ */
1025
+ export type OneGte = {
1026
+ gte: number;
1027
+ };
1028
+
1029
+ /**
1030
+ * Greater than
1031
+ */
1032
+ export type OneGt = {
1033
+ gt: number;
1034
+ };
1035
+
1036
+ export type DeploymentStream1DeploymentsNe = string | number | boolean;
1037
+
1038
+ /**
1039
+ * Not equal to
1040
+ */
1041
+ export type DeploymentStream1Ne = {
1042
+ ne: string | number | boolean;
1043
+ };
1044
+
1045
+ export type DeploymentStream1DeploymentsEq = string | number | boolean;
1046
+
1047
+ /**
1048
+ * Equal to
1049
+ */
1050
+ export type DeploymentStream1Eq = {
1051
+ eq: string | number | boolean;
1052
+ };
1053
+
1054
+ export type DeploymentStreamKnowledgeFilter1 =
1055
+ | DeploymentStream1Eq
1056
+ | DeploymentStream1Ne
1057
+ | OneGt
1058
+ | OneGte
1059
+ | OneLt
1060
+ | OneLte
1061
+ | DeploymentStream1In
1062
+ | DeploymentStream1Nin
1063
+ | OneExists;
1064
+
1065
+ /**
1066
+ * A filter to apply to the knowledge base chunk metadata when using knowledge bases in the deployment.
1067
+ */
1068
+ export type DeploymentStreamKnowledgeFilter =
1069
+ | DeploymentStreamKnowledgeFilterAnd
1070
+ | DeploymentStreamKnowledgeFilterOr
1071
+ | {
1072
+ [k: string]:
1073
+ | DeploymentStream1Eq
1074
+ | DeploymentStream1Ne
1075
+ | OneGt
1076
+ | OneGte
1077
+ | OneLt
1078
+ | OneLte
1079
+ | DeploymentStream1In
1080
+ | DeploymentStream1Nin
1081
+ | OneExists;
1082
+ };
1083
+
1084
+ export type DeploymentStreamRequestBody = {
1085
+ /**
1086
+ * The deployment key to invoke
1087
+ */
1088
+ key: string;
1089
+ /**
1090
+ * Key-value pairs variables to replace in your prompts. If a variable is not provided that is defined in the prompt, the default variables are used.
1091
+ */
1092
+ inputs?: { [k: string]: any } | undefined;
1093
+ /**
1094
+ * Key-value pairs that match your data model and fields declared in your deployment routing configuration
1095
+ */
1096
+ context?: { [k: string]: any } | undefined;
1097
+ /**
1098
+ * A list of messages to include after the `System` message, but before the `User` and `Assistant` pairs configured in your deployment.
1099
+ */
1100
+ prefixMessages?:
1101
+ | Array<
1102
+ | PrefixMessagesSystemMessage
1103
+ | PrefixMessagesDeveloperMessage
1104
+ | PrefixMessagesUserMessage
1105
+ | PrefixMessagesAssistantMessage
1106
+ | PrefixMessagesToolMessage
1107
+ >
1108
+ | undefined;
1109
+ /**
1110
+ * A list of messages to send to the deployment.
1111
+ */
1112
+ messages?:
1113
+ | Array<
1114
+ | DeploymentStreamMessagesSystemMessage
1115
+ | DeploymentStreamMessagesDeveloperMessage
1116
+ | DeploymentStreamMessagesUserMessage
1117
+ | DeploymentStreamMessagesAssistantMessage
1118
+ | DeploymentStreamMessagesToolMessage
1119
+ >
1120
+ | undefined;
1121
+ /**
1122
+ * Information about the identity making the request. If the identity does not exist, it will be created automatically.
1123
+ */
1124
+ identity?: components.PublicIdentity | undefined;
1125
+ /**
1126
+ * A list of file IDs that are associated with the deployment request.
1127
+ */
1128
+ fileIds?: Array<string> | undefined;
1129
+ /**
1130
+ * Key-value pairs that you want to attach to the log generated by this request.
1131
+ */
1132
+ metadata?: { [k: string]: any } | undefined;
1133
+ /**
1134
+ * Utilized for passing additional parameters to the model provider. Exercise caution when using this feature, as the included parameters will overwrite any parameters specified in the deployment prompt configuration.
1135
+ */
1136
+ extraParams?: { [k: string]: any } | undefined;
1137
+ /**
1138
+ * A list of documents from your external knowledge base (e.g., chunks retrieved from your own vector database or RAG pipeline) that provide context for the model response. These documents can be used by evaluators and guardrails to assess the relevance and accuracy of the model output against the provided context.
1139
+ */
1140
+ documents?: Array<DeploymentStreamDocuments> | undefined;
1141
+ invokeOptions?: DeploymentStreamInvokeOptions | undefined;
1142
+ thread?: DeploymentStreamThread | undefined;
1143
+ /**
1144
+ * A filter to apply to the knowledge base chunk metadata when using knowledge bases in the deployment.
1145
+ */
1146
+ knowledgeFilter?:
1147
+ | DeploymentStreamKnowledgeFilterAnd
1148
+ | DeploymentStreamKnowledgeFilterOr
1149
+ | {
1150
+ [k: string]:
1151
+ | DeploymentStream1Eq
1152
+ | DeploymentStream1Ne
1153
+ | OneGt
1154
+ | OneGte
1155
+ | OneLt
1156
+ | OneLte
1157
+ | DeploymentStream1In
1158
+ | DeploymentStream1Nin
1159
+ | OneExists;
1160
+ }
1161
+ | undefined;
1162
+ };
1163
+
1164
+ /**
1165
+ * Indicates the type of model used to generate the response
1166
+ */
1167
+ export const DeploymentStreamObject = {
1168
+ Chat: "chat",
1169
+ Completion: "completion",
1170
+ Image: "image",
1171
+ } as const;
1172
+ /**
1173
+ * Indicates the type of model used to generate the response
1174
+ */
1175
+ export type DeploymentStreamObject = ClosedEnum<typeof DeploymentStreamObject>;
1176
+
1177
+ /**
1178
+ * The provider used to generate the response
1179
+ */
1180
+ export const DeploymentStreamProvider = {
1181
+ Openai: "openai",
1182
+ Groq: "groq",
1183
+ Cohere: "cohere",
1184
+ Azure: "azure",
1185
+ Aws: "aws",
1186
+ Google: "google",
1187
+ GoogleAi: "google-ai",
1188
+ Huggingface: "huggingface",
1189
+ Togetherai: "togetherai",
1190
+ Perplexity: "perplexity",
1191
+ Anthropic: "anthropic",
1192
+ Leonardoai: "leonardoai",
1193
+ Fal: "fal",
1194
+ Nvidia: "nvidia",
1195
+ Jina: "jina",
1196
+ Elevenlabs: "elevenlabs",
1197
+ Litellm: "litellm",
1198
+ Cerebras: "cerebras",
1199
+ Openailike: "openailike",
1200
+ Bytedance: "bytedance",
1201
+ Mistral: "mistral",
1202
+ Deepseek: "deepseek",
1203
+ Contextualai: "contextualai",
1204
+ Moonshotai: "moonshotai",
1205
+ Zai: "zai",
1206
+ Minimax: "minimax",
1207
+ Xai: "xai",
1208
+ Alibaba: "alibaba",
1209
+ Slack: "slack",
1210
+ Orq: "orq",
1211
+ } as const;
1212
+ /**
1213
+ * The provider used to generate the response
1214
+ */
1215
+ export type DeploymentStreamProvider = ClosedEnum<
1216
+ typeof DeploymentStreamProvider
1217
+ >;
1218
+
1219
+ export type DeploymentStreamTelemetry = {
1220
+ /**
1221
+ * The trace id for the request that generated this response
1222
+ */
1223
+ traceId: string;
1224
+ /**
1225
+ * The span id for the request that generated this response
1226
+ */
1227
+ spanId: string;
1228
+ };
1229
+
1230
+ /**
1231
+ * Metadata of the retrieved chunk from the knowledge base
1232
+ */
1233
+ export type DeploymentStreamDeploymentsMetadata = {
1234
+ /**
1235
+ * Name of the file
1236
+ */
1237
+ fileName: string;
1238
+ /**
1239
+ * Page number of the chunk
1240
+ */
1241
+ pageNumber: number | null;
1242
+ /**
1243
+ * Type of the file
1244
+ */
1245
+ fileType: string;
1246
+ /**
1247
+ * Rerank scores are normalized to be in the range [0, 1]. Scores close to 1 indicate a high relevance to the query, and scores closer to 0 indicate low relevance. It is not accurate to assume a score of 0.9 means the document is 2x more relevant than a document with a score of 0.45
1248
+ */
1249
+ rerankScore?: number | undefined;
1250
+ /**
1251
+ * Search scores are normalized to be in the range [0, 1]. Search score is calculated based on `[Cosine Similarity](https://en.wikipedia.org/wiki/Cosine_similarity)` algorithm. Scores close to 1 indicate the document is closer to the query, and scores closer to 0 indicate the document is farther from the query.
1252
+ */
1253
+ searchScore: number;
1254
+ };
1255
+
1256
+ export type DeploymentStreamRetrievals = {
1257
+ /**
1258
+ * Content of the retrieved chunk from the knowledge base
1259
+ */
1260
+ document: string;
1261
+ /**
1262
+ * Metadata of the retrieved chunk from the knowledge base
1263
+ */
1264
+ metadata: DeploymentStreamDeploymentsMetadata;
1265
+ };
1266
+
1267
+ export type DeploymentStreamPromptTokensDetails = {
1268
+ cachedTokens?: number | null | undefined;
1269
+ };
1270
+
1271
+ export type DeploymentStreamCompletionTokensDetails = {
1272
+ reasoningTokens?: number | null | undefined;
1273
+ };
1274
+
1275
+ /**
1276
+ * Usage metrics for the response
1277
+ */
1278
+ export type DeploymentStreamUsage = {
1279
+ totalTokens?: number | undefined;
1280
+ promptTokens?: number | undefined;
1281
+ completionTokens?: number | undefined;
1282
+ promptTokensDetails?: DeploymentStreamPromptTokensDetails | undefined;
1283
+ completionTokensDetails?:
1284
+ | DeploymentStreamCompletionTokensDetails
1285
+ | null
1286
+ | undefined;
1287
+ };
1288
+
1289
+ /**
1290
+ * The role of the prompt message
1291
+ */
1292
+ export const DeploymentStreamMessageDeploymentsResponseRole = {
1293
+ System: "system",
1294
+ Developer: "developer",
1295
+ Assistant: "assistant",
1296
+ User: "user",
1297
+ Exception: "exception",
1298
+ Tool: "tool",
1299
+ Prompt: "prompt",
1300
+ Correction: "correction",
1301
+ ExpectedOutput: "expected_output",
1302
+ } as const;
1303
+ /**
1304
+ * The role of the prompt message
1305
+ */
1306
+ export type DeploymentStreamMessageDeploymentsResponseRole = ClosedEnum<
1307
+ typeof DeploymentStreamMessageDeploymentsResponseRole
1308
+ >;
1309
+
1310
+ export type DeploymentStreamMessage3 = {
1311
+ type: "image";
1312
+ /**
1313
+ * The role of the prompt message
1314
+ */
1315
+ role: DeploymentStreamMessageDeploymentsResponseRole;
1316
+ url: string;
1317
+ };
1318
+
1319
+ /**
1320
+ * The role of the prompt message
1321
+ */
1322
+ export const DeploymentStreamMessageDeploymentsRole = {
1323
+ System: "system",
1324
+ Developer: "developer",
1325
+ Assistant: "assistant",
1326
+ User: "user",
1327
+ Exception: "exception",
1328
+ Tool: "tool",
1329
+ Prompt: "prompt",
1330
+ Correction: "correction",
1331
+ ExpectedOutput: "expected_output",
1332
+ } as const;
1333
+ /**
1334
+ * The role of the prompt message
1335
+ */
1336
+ export type DeploymentStreamMessageDeploymentsRole = ClosedEnum<
1337
+ typeof DeploymentStreamMessageDeploymentsRole
1338
+ >;
1339
+
1340
+ export type DeploymentStreamMessage2 = {
1341
+ type: "content";
1342
+ /**
1343
+ * The role of the prompt message
1344
+ */
1345
+ role: DeploymentStreamMessageDeploymentsRole;
1346
+ content: string | null;
1347
+ /**
1348
+ * Internal thought process of the model
1349
+ */
1350
+ reasoning?: string | undefined;
1351
+ /**
1352
+ * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
1353
+ */
1354
+ reasoningSignature?: string | undefined;
1355
+ /**
1356
+ * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
1357
+ */
1358
+ redactedReasoning?: string | undefined;
1359
+ };
1360
+
1361
+ /**
1362
+ * The role of the prompt message
1363
+ */
1364
+ export const DeploymentStreamMessageRole = {
1365
+ System: "system",
1366
+ Developer: "developer",
1367
+ Assistant: "assistant",
1368
+ User: "user",
1369
+ Exception: "exception",
1370
+ Tool: "tool",
1371
+ Prompt: "prompt",
1372
+ Correction: "correction",
1373
+ ExpectedOutput: "expected_output",
1374
+ } as const;
1375
+ /**
1376
+ * The role of the prompt message
1377
+ */
1378
+ export type DeploymentStreamMessageRole = ClosedEnum<
1379
+ typeof DeploymentStreamMessageRole
1380
+ >;
1381
+
1382
+ export const DeploymentStreamMessageDeploymentsResponse200Type = {
1383
+ Function: "function",
1384
+ } as const;
1385
+ export type DeploymentStreamMessageDeploymentsResponse200Type = ClosedEnum<
1386
+ typeof DeploymentStreamMessageDeploymentsResponse200Type
1387
+ >;
1388
+
1389
+ export type DeploymentStreamMessageFunction = {
1390
+ name: string;
1391
+ /**
1392
+ * JSON string arguments for the functions
1393
+ */
1394
+ arguments: string;
1395
+ };
1396
+
1397
+ export type DeploymentStreamMessageToolCalls = {
1398
+ id?: string | undefined;
1399
+ index?: number | undefined;
1400
+ type: DeploymentStreamMessageDeploymentsResponse200Type;
1401
+ function: DeploymentStreamMessageFunction;
1402
+ };
1403
+
1404
+ export type DeploymentStreamMessage1 = {
1405
+ type: "tool_calls";
1406
+ /**
1407
+ * The role of the prompt message
1408
+ */
1409
+ role: DeploymentStreamMessageRole;
1410
+ content?: string | null | undefined;
1411
+ toolCalls: Array<DeploymentStreamMessageToolCalls>;
1412
+ /**
1413
+ * Internal thought process of the model
1414
+ */
1415
+ reasoning?: string | undefined;
1416
+ /**
1417
+ * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
1418
+ */
1419
+ reasoningSignature?: string | undefined;
1420
+ /**
1421
+ * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
1422
+ */
1423
+ redactedReasoning?: string | undefined;
1424
+ };
1425
+
1426
+ export type DeploymentStreamMessage =
1427
+ | DeploymentStreamMessage1
1428
+ | DeploymentStreamMessage2
1429
+ | DeploymentStreamMessage3;
1430
+
1431
+ export type DeploymentStreamChoices = {
1432
+ index: number;
1433
+ message:
1434
+ | DeploymentStreamMessage1
1435
+ | DeploymentStreamMessage2
1436
+ | DeploymentStreamMessage3;
1437
+ finishReason?: string | null | undefined;
1438
+ };
1439
+
1440
+ export type DeploymentStreamData = {
1441
+ /**
1442
+ * A unique identifier for the response. Can be used to add metrics to the transaction.
1443
+ */
1444
+ id: string;
1445
+ /**
1446
+ * A timestamp indicating when the object was created. Usually in a standardized format like ISO 8601
1447
+ */
1448
+ created: Date;
1449
+ /**
1450
+ * Indicates the type of model used to generate the response
1451
+ */
1452
+ object: DeploymentStreamObject;
1453
+ /**
1454
+ * The model used to generate the response
1455
+ */
1456
+ model: string;
1457
+ /**
1458
+ * The provider used to generate the response
1459
+ */
1460
+ provider: DeploymentStreamProvider;
1461
+ /**
1462
+ * Indicates if the response is the final response
1463
+ */
1464
+ isFinal: boolean;
1465
+ /**
1466
+ * Indicates integration id used to generate the response
1467
+ */
1468
+ integrationId?: string | undefined;
1469
+ telemetry: DeploymentStreamTelemetry;
1470
+ /**
1471
+ * A timestamp indicating when the object was finalized. Usually in a standardized format like ISO 8601
1472
+ */
1473
+ finalized?: Date | undefined;
1474
+ /**
1475
+ * Provider backed system fingerprint.
1476
+ */
1477
+ systemFingerprint?: string | null | undefined;
1478
+ /**
1479
+ * List of documents retrieved from the knowledge base. This property is only available when the `include_retrievals` flag is set to `true` in the invoke settings. When stream is set to true, the `retrievals` property will be returned in the last streamed chunk where the property `is_final` is set to `true`.
1480
+ */
1481
+ retrievals?: Array<DeploymentStreamRetrievals> | undefined;
1482
+ /**
1483
+ * Response returned by the model provider. This functionality is only supported when streaming is not used. If streaming is used, the `provider_response` property will be set to `null`.
1484
+ */
1485
+ providerResponse?: any | undefined;
1486
+ /**
1487
+ * Usage metrics for the response
1488
+ */
1489
+ usage?: DeploymentStreamUsage | null | undefined;
1490
+ /**
1491
+ * A list of choices generated by the model
1492
+ */
1493
+ choices: Array<DeploymentStreamChoices>;
1494
+ };
1495
+
1496
+ /**
1497
+ * Successful operation
1498
+ */
1499
+ export type DeploymentStreamResponseBody = {
1500
+ data?: DeploymentStreamData | undefined;
1501
+ };
1502
+
1503
+ /** @internal */
1504
+ export type DeploymentStreamContentDeploymentsRequest2$Outbound =
1505
+ components.TextContentPartSchema$Outbound;
1506
+
1507
+ /** @internal */
1508
+ export const DeploymentStreamContentDeploymentsRequest2$outboundSchema:
1509
+ z.ZodType<
1510
+ DeploymentStreamContentDeploymentsRequest2$Outbound,
1511
+ z.ZodTypeDef,
1512
+ DeploymentStreamContentDeploymentsRequest2
1513
+ > = components.TextContentPartSchema$outboundSchema;
1514
+
1515
+ export function deploymentStreamContentDeploymentsRequest2ToJSON(
1516
+ deploymentStreamContentDeploymentsRequest2:
1517
+ DeploymentStreamContentDeploymentsRequest2,
1518
+ ): string {
1519
+ return JSON.stringify(
1520
+ DeploymentStreamContentDeploymentsRequest2$outboundSchema.parse(
1521
+ deploymentStreamContentDeploymentsRequest2,
1522
+ ),
1523
+ );
1524
+ }
1525
+
1526
+ /** @internal */
1527
+ export type DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$Outbound =
1528
+ | string
1529
+ | Array<components.TextContentPartSchema$Outbound>;
1530
+
1531
+ /** @internal */
1532
+ export const DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$outboundSchema:
1533
+ z.ZodType<
1534
+ DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$Outbound,
1535
+ z.ZodTypeDef,
1536
+ DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content
1537
+ > = z.union([
1538
+ z.string(),
1539
+ z.array(components.TextContentPartSchema$outboundSchema),
1540
+ ]);
1541
+
1542
+ export function deploymentStreamPrefixMessagesDeploymentsRequestRequestBody5ContentToJSON(
1543
+ deploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content:
1544
+ DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content,
1545
+ ): string {
1546
+ return JSON.stringify(
1547
+ DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$outboundSchema
1548
+ .parse(
1549
+ deploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content,
1550
+ ),
1551
+ );
1552
+ }
1553
+
1554
+ /** @internal */
1555
+ export const DeploymentStreamPrefixMessagesDeploymentsType$outboundSchema:
1556
+ z.ZodNativeEnum<typeof DeploymentStreamPrefixMessagesDeploymentsType> = z
1557
+ .nativeEnum(DeploymentStreamPrefixMessagesDeploymentsType);
1558
+
1559
+ /** @internal */
1560
+ export const DeploymentStreamPrefixMessagesTtl$outboundSchema: z.ZodNativeEnum<
1561
+ typeof DeploymentStreamPrefixMessagesTtl
1562
+ > = z.nativeEnum(DeploymentStreamPrefixMessagesTtl);
1563
+
1564
+ /** @internal */
1565
+ export type DeploymentStreamPrefixMessagesCacheControl$Outbound = {
1566
+ type: string;
1567
+ ttl: string;
1568
+ };
1569
+
1570
+ /** @internal */
1571
+ export const DeploymentStreamPrefixMessagesCacheControl$outboundSchema:
1572
+ z.ZodType<
1573
+ DeploymentStreamPrefixMessagesCacheControl$Outbound,
1574
+ z.ZodTypeDef,
1575
+ DeploymentStreamPrefixMessagesCacheControl
1576
+ > = z.object({
1577
+ type: DeploymentStreamPrefixMessagesDeploymentsType$outboundSchema,
1578
+ ttl: DeploymentStreamPrefixMessagesTtl$outboundSchema.default("5m"),
1579
+ });
1580
+
1581
+ export function deploymentStreamPrefixMessagesCacheControlToJSON(
1582
+ deploymentStreamPrefixMessagesCacheControl:
1583
+ DeploymentStreamPrefixMessagesCacheControl,
1584
+ ): string {
1585
+ return JSON.stringify(
1586
+ DeploymentStreamPrefixMessagesCacheControl$outboundSchema.parse(
1587
+ deploymentStreamPrefixMessagesCacheControl,
1588
+ ),
1589
+ );
1590
+ }
1591
+
1592
+ /** @internal */
1593
+ export type PrefixMessagesToolMessage$Outbound = {
1594
+ role: "tool";
1595
+ content: string | Array<components.TextContentPartSchema$Outbound>;
1596
+ tool_call_id: string | null;
1597
+ cache_control?:
1598
+ | DeploymentStreamPrefixMessagesCacheControl$Outbound
1599
+ | undefined;
1600
+ };
1601
+
1602
+ /** @internal */
1603
+ export const PrefixMessagesToolMessage$outboundSchema: z.ZodType<
1604
+ PrefixMessagesToolMessage$Outbound,
1605
+ z.ZodTypeDef,
1606
+ PrefixMessagesToolMessage
1607
+ > = z.object({
1608
+ role: z.literal("tool"),
1609
+ content: z.union([
1610
+ z.string(),
1611
+ z.array(components.TextContentPartSchema$outboundSchema),
1612
+ ]),
1613
+ toolCallId: z.nullable(z.string()),
1614
+ cacheControl: z.lazy(() =>
1615
+ DeploymentStreamPrefixMessagesCacheControl$outboundSchema
1616
+ ).optional(),
1617
+ }).transform((v) => {
1618
+ return remap$(v, {
1619
+ toolCallId: "tool_call_id",
1620
+ cacheControl: "cache_control",
1621
+ });
1622
+ });
1623
+
1624
+ export function prefixMessagesToolMessageToJSON(
1625
+ prefixMessagesToolMessage: PrefixMessagesToolMessage,
1626
+ ): string {
1627
+ return JSON.stringify(
1628
+ PrefixMessagesToolMessage$outboundSchema.parse(prefixMessagesToolMessage),
1629
+ );
1630
+ }
1631
+
1632
+ /** @internal */
1633
+ export type DeploymentStreamContentDeployments2$Outbound =
1634
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
1635
+ | components.RefusalPartSchema$Outbound
1636
+ | components.ReasoningPartSchema$Outbound
1637
+ | components.RedactedReasoningPartSchema$Outbound;
1638
+
1639
+ /** @internal */
1640
+ export const DeploymentStreamContentDeployments2$outboundSchema: z.ZodType<
1641
+ DeploymentStreamContentDeployments2$Outbound,
1642
+ z.ZodTypeDef,
1643
+ DeploymentStreamContentDeployments2
1644
+ > = z.union([
1645
+ components.TextContentPartSchema$outboundSchema.and(
1646
+ z.object({ type: z.literal("text") }),
1647
+ ),
1648
+ components.RefusalPartSchema$outboundSchema,
1649
+ components.ReasoningPartSchema$outboundSchema,
1650
+ components.RedactedReasoningPartSchema$outboundSchema,
1651
+ ]);
1652
+
1653
+ export function deploymentStreamContentDeployments2ToJSON(
1654
+ deploymentStreamContentDeployments2: DeploymentStreamContentDeployments2,
1655
+ ): string {
1656
+ return JSON.stringify(
1657
+ DeploymentStreamContentDeployments2$outboundSchema.parse(
1658
+ deploymentStreamContentDeployments2,
1659
+ ),
1660
+ );
1661
+ }
1662
+
1663
+ /** @internal */
1664
+ export type DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$Outbound =
1665
+ | string
1666
+ | Array<
1667
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
1668
+ | components.RefusalPartSchema$Outbound
1669
+ | components.ReasoningPartSchema$Outbound
1670
+ | components.RedactedReasoningPartSchema$Outbound
1671
+ >;
1672
+
1673
+ /** @internal */
1674
+ export const DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema:
1675
+ z.ZodType<
1676
+ DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$Outbound,
1677
+ z.ZodTypeDef,
1678
+ DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent
1679
+ > = z.union([
1680
+ z.string(),
1681
+ z.array(
1682
+ z.union([
1683
+ components.TextContentPartSchema$outboundSchema.and(
1684
+ z.object({ type: z.literal("text") }),
1685
+ ),
1686
+ components.RefusalPartSchema$outboundSchema,
1687
+ components.ReasoningPartSchema$outboundSchema,
1688
+ components.RedactedReasoningPartSchema$outboundSchema,
1689
+ ]),
1690
+ ),
1691
+ ]);
1692
+
1693
+ export function deploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContentToJSON(
1694
+ deploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent:
1695
+ DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent,
1696
+ ): string {
1697
+ return JSON.stringify(
1698
+ DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema
1699
+ .parse(
1700
+ deploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent,
1701
+ ),
1702
+ );
1703
+ }
1704
+
1705
+ /** @internal */
1706
+ export type PrefixMessagesAudio$Outbound = {
1707
+ id: string;
1708
+ };
1709
+
1710
+ /** @internal */
1711
+ export const PrefixMessagesAudio$outboundSchema: z.ZodType<
1712
+ PrefixMessagesAudio$Outbound,
1713
+ z.ZodTypeDef,
1714
+ PrefixMessagesAudio
1715
+ > = z.object({
1716
+ id: z.string(),
1717
+ });
1718
+
1719
+ export function prefixMessagesAudioToJSON(
1720
+ prefixMessagesAudio: PrefixMessagesAudio,
1721
+ ): string {
1722
+ return JSON.stringify(
1723
+ PrefixMessagesAudio$outboundSchema.parse(prefixMessagesAudio),
1724
+ );
1725
+ }
1726
+
1727
+ /** @internal */
1728
+ export const DeploymentStreamPrefixMessagesType$outboundSchema: z.ZodNativeEnum<
1729
+ typeof DeploymentStreamPrefixMessagesType
1730
+ > = z.nativeEnum(DeploymentStreamPrefixMessagesType);
1731
+
1732
+ /** @internal */
1733
+ export type DeploymentStreamPrefixMessagesFunction$Outbound = {
1734
+ name?: string | undefined;
1735
+ arguments?: string | undefined;
1736
+ };
1737
+
1738
+ /** @internal */
1739
+ export const DeploymentStreamPrefixMessagesFunction$outboundSchema: z.ZodType<
1740
+ DeploymentStreamPrefixMessagesFunction$Outbound,
1741
+ z.ZodTypeDef,
1742
+ DeploymentStreamPrefixMessagesFunction
1743
+ > = z.object({
1744
+ name: z.string().optional(),
1745
+ arguments: z.string().optional(),
1746
+ });
1747
+
1748
+ export function deploymentStreamPrefixMessagesFunctionToJSON(
1749
+ deploymentStreamPrefixMessagesFunction:
1750
+ DeploymentStreamPrefixMessagesFunction,
1751
+ ): string {
1752
+ return JSON.stringify(
1753
+ DeploymentStreamPrefixMessagesFunction$outboundSchema.parse(
1754
+ deploymentStreamPrefixMessagesFunction,
1755
+ ),
1756
+ );
1757
+ }
1758
+
1759
+ /** @internal */
1760
+ export type DeploymentStreamPrefixMessagesToolCalls$Outbound = {
1761
+ id: string;
1762
+ type: string;
1763
+ function: DeploymentStreamPrefixMessagesFunction$Outbound;
1764
+ thought_signature?: string | undefined;
1765
+ };
1766
+
1767
+ /** @internal */
1768
+ export const DeploymentStreamPrefixMessagesToolCalls$outboundSchema: z.ZodType<
1769
+ DeploymentStreamPrefixMessagesToolCalls$Outbound,
1770
+ z.ZodTypeDef,
1771
+ DeploymentStreamPrefixMessagesToolCalls
1772
+ > = z.object({
1773
+ id: z.string(),
1774
+ type: DeploymentStreamPrefixMessagesType$outboundSchema,
1775
+ function: z.lazy(() => DeploymentStreamPrefixMessagesFunction$outboundSchema),
1776
+ thoughtSignature: z.string().optional(),
1777
+ }).transform((v) => {
1778
+ return remap$(v, {
1779
+ thoughtSignature: "thought_signature",
1780
+ });
1781
+ });
1782
+
1783
+ export function deploymentStreamPrefixMessagesToolCallsToJSON(
1784
+ deploymentStreamPrefixMessagesToolCalls:
1785
+ DeploymentStreamPrefixMessagesToolCalls,
1786
+ ): string {
1787
+ return JSON.stringify(
1788
+ DeploymentStreamPrefixMessagesToolCalls$outboundSchema.parse(
1789
+ deploymentStreamPrefixMessagesToolCalls,
1790
+ ),
1791
+ );
1792
+ }
1793
+
1794
+ /** @internal */
1795
+ export type PrefixMessagesAssistantMessage$Outbound = {
1796
+ content?:
1797
+ | string
1798
+ | Array<
1799
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
1800
+ | components.RefusalPartSchema$Outbound
1801
+ | components.ReasoningPartSchema$Outbound
1802
+ | components.RedactedReasoningPartSchema$Outbound
1803
+ >
1804
+ | null
1805
+ | undefined;
1806
+ refusal?: string | null | undefined;
1807
+ role: "assistant";
1808
+ name?: string | undefined;
1809
+ audio?: PrefixMessagesAudio$Outbound | null | undefined;
1810
+ tool_calls?:
1811
+ | Array<DeploymentStreamPrefixMessagesToolCalls$Outbound>
1812
+ | undefined;
1813
+ };
1814
+
1815
+ /** @internal */
1816
+ export const PrefixMessagesAssistantMessage$outboundSchema: z.ZodType<
1817
+ PrefixMessagesAssistantMessage$Outbound,
1818
+ z.ZodTypeDef,
1819
+ PrefixMessagesAssistantMessage
1820
+ > = z.object({
1821
+ content: z.nullable(
1822
+ z.union([
1823
+ z.string(),
1824
+ z.array(
1825
+ z.union([
1826
+ components.TextContentPartSchema$outboundSchema.and(
1827
+ z.object({ type: z.literal("text") }),
1828
+ ),
1829
+ components.RefusalPartSchema$outboundSchema,
1830
+ components.ReasoningPartSchema$outboundSchema,
1831
+ components.RedactedReasoningPartSchema$outboundSchema,
1832
+ ]),
1833
+ ),
1834
+ ]),
1835
+ ).optional(),
1836
+ refusal: z.nullable(z.string()).optional(),
1837
+ role: z.literal("assistant"),
1838
+ name: z.string().optional(),
1839
+ audio: z.nullable(z.lazy(() => PrefixMessagesAudio$outboundSchema))
1840
+ .optional(),
1841
+ toolCalls: z.array(
1842
+ z.lazy(() => DeploymentStreamPrefixMessagesToolCalls$outboundSchema),
1843
+ ).optional(),
1844
+ }).transform((v) => {
1845
+ return remap$(v, {
1846
+ toolCalls: "tool_calls",
1847
+ });
1848
+ });
1849
+
1850
+ export function prefixMessagesAssistantMessageToJSON(
1851
+ prefixMessagesAssistantMessage: PrefixMessagesAssistantMessage,
1852
+ ): string {
1853
+ return JSON.stringify(
1854
+ PrefixMessagesAssistantMessage$outboundSchema.parse(
1855
+ prefixMessagesAssistantMessage,
1856
+ ),
1857
+ );
1858
+ }
1859
+
1860
+ /** @internal */
1861
+ export const DeploymentStream2DeploymentsType$outboundSchema: z.ZodNativeEnum<
1862
+ typeof DeploymentStream2DeploymentsType
1863
+ > = z.nativeEnum(DeploymentStream2DeploymentsType);
1864
+
1865
+ /** @internal */
1866
+ export const DeploymentStream2Ttl$outboundSchema: z.ZodNativeEnum<
1867
+ typeof DeploymentStream2Ttl
1868
+ > = z.nativeEnum(DeploymentStream2Ttl);
1869
+
1870
+ /** @internal */
1871
+ export type DeploymentStream2CacheControl$Outbound = {
1872
+ type: string;
1873
+ ttl: string;
1874
+ };
1875
+
1876
+ /** @internal */
1877
+ export const DeploymentStream2CacheControl$outboundSchema: z.ZodType<
1878
+ DeploymentStream2CacheControl$Outbound,
1879
+ z.ZodTypeDef,
1880
+ DeploymentStream2CacheControl
1881
+ > = z.object({
1882
+ type: DeploymentStream2DeploymentsType$outboundSchema,
1883
+ ttl: DeploymentStream2Ttl$outboundSchema.default("5m"),
1884
+ });
1885
+
1886
+ export function deploymentStream2CacheControlToJSON(
1887
+ deploymentStream2CacheControl: DeploymentStream2CacheControl,
1888
+ ): string {
1889
+ return JSON.stringify(
1890
+ DeploymentStream2CacheControl$outboundSchema.parse(
1891
+ deploymentStream2CacheControl,
1892
+ ),
1893
+ );
1894
+ }
1895
+
1896
+ /** @internal */
1897
+ export type DeploymentStream24$Outbound = {
1898
+ type: "file";
1899
+ cache_control?: DeploymentStream2CacheControl$Outbound | undefined;
1900
+ file: components.FileContentPartSchema$Outbound;
1901
+ };
1902
+
1903
+ /** @internal */
1904
+ export const DeploymentStream24$outboundSchema: z.ZodType<
1905
+ DeploymentStream24$Outbound,
1906
+ z.ZodTypeDef,
1907
+ DeploymentStream24
1908
+ > = z.object({
1909
+ type: z.literal("file"),
1910
+ cacheControl: z.lazy(() => DeploymentStream2CacheControl$outboundSchema)
1911
+ .optional(),
1912
+ file: components.FileContentPartSchema$outboundSchema,
1913
+ }).transform((v) => {
1914
+ return remap$(v, {
1915
+ cacheControl: "cache_control",
1916
+ });
1917
+ });
1918
+
1919
+ export function deploymentStream24ToJSON(
1920
+ deploymentStream24: DeploymentStream24,
1921
+ ): string {
1922
+ return JSON.stringify(
1923
+ DeploymentStream24$outboundSchema.parse(deploymentStream24),
1924
+ );
1925
+ }
1926
+
1927
+ /** @internal */
1928
+ export type DeploymentStreamContent2$Outbound =
1929
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
1930
+ | components.ImageContentPartSchema$Outbound
1931
+ | components.AudioContentPartSchema$Outbound
1932
+ | DeploymentStream24$Outbound;
1933
+
1934
+ /** @internal */
1935
+ export const DeploymentStreamContent2$outboundSchema: z.ZodType<
1936
+ DeploymentStreamContent2$Outbound,
1937
+ z.ZodTypeDef,
1938
+ DeploymentStreamContent2
1939
+ > = z.union([
1940
+ components.TextContentPartSchema$outboundSchema.and(
1941
+ z.object({ type: z.literal("text") }),
1942
+ ),
1943
+ components.ImageContentPartSchema$outboundSchema,
1944
+ components.AudioContentPartSchema$outboundSchema,
1945
+ z.lazy(() => DeploymentStream24$outboundSchema),
1946
+ ]);
1947
+
1948
+ export function deploymentStreamContent2ToJSON(
1949
+ deploymentStreamContent2: DeploymentStreamContent2,
1950
+ ): string {
1951
+ return JSON.stringify(
1952
+ DeploymentStreamContent2$outboundSchema.parse(deploymentStreamContent2),
1953
+ );
1954
+ }
1955
+
1956
+ /** @internal */
1957
+ export type DeploymentStreamPrefixMessagesDeploymentsRequestContent$Outbound =
1958
+ | string
1959
+ | Array<
1960
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
1961
+ | components.ImageContentPartSchema$Outbound
1962
+ | components.AudioContentPartSchema$Outbound
1963
+ | DeploymentStream24$Outbound
1964
+ >;
1965
+
1966
+ /** @internal */
1967
+ export const DeploymentStreamPrefixMessagesDeploymentsRequestContent$outboundSchema:
1968
+ z.ZodType<
1969
+ DeploymentStreamPrefixMessagesDeploymentsRequestContent$Outbound,
1970
+ z.ZodTypeDef,
1971
+ DeploymentStreamPrefixMessagesDeploymentsRequestContent
1972
+ > = z.union([
1973
+ z.string(),
1974
+ z.array(
1975
+ z.union([
1976
+ components.TextContentPartSchema$outboundSchema.and(
1977
+ z.object({ type: z.literal("text") }),
1978
+ ),
1979
+ components.ImageContentPartSchema$outboundSchema,
1980
+ components.AudioContentPartSchema$outboundSchema,
1981
+ z.lazy(() => DeploymentStream24$outboundSchema),
1982
+ ]),
1983
+ ),
1984
+ ]);
1985
+
1986
+ export function deploymentStreamPrefixMessagesDeploymentsRequestContentToJSON(
1987
+ deploymentStreamPrefixMessagesDeploymentsRequestContent:
1988
+ DeploymentStreamPrefixMessagesDeploymentsRequestContent,
1989
+ ): string {
1990
+ return JSON.stringify(
1991
+ DeploymentStreamPrefixMessagesDeploymentsRequestContent$outboundSchema
1992
+ .parse(deploymentStreamPrefixMessagesDeploymentsRequestContent),
1993
+ );
1994
+ }
1995
+
1996
+ /** @internal */
1997
+ export type PrefixMessagesUserMessage$Outbound = {
1998
+ role: "user";
1999
+ name?: string | undefined;
2000
+ content:
2001
+ | string
2002
+ | Array<
2003
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2004
+ | components.ImageContentPartSchema$Outbound
2005
+ | components.AudioContentPartSchema$Outbound
2006
+ | DeploymentStream24$Outbound
2007
+ >;
2008
+ };
2009
+
2010
+ /** @internal */
2011
+ export const PrefixMessagesUserMessage$outboundSchema: z.ZodType<
2012
+ PrefixMessagesUserMessage$Outbound,
2013
+ z.ZodTypeDef,
2014
+ PrefixMessagesUserMessage
2015
+ > = z.object({
2016
+ role: z.literal("user"),
2017
+ name: z.string().optional(),
2018
+ content: z.union([
2019
+ z.string(),
2020
+ z.array(
2021
+ z.union([
2022
+ components.TextContentPartSchema$outboundSchema.and(
2023
+ z.object({ type: z.literal("text") }),
2024
+ ),
2025
+ components.ImageContentPartSchema$outboundSchema,
2026
+ components.AudioContentPartSchema$outboundSchema,
2027
+ z.lazy(() => DeploymentStream24$outboundSchema),
2028
+ ]),
2029
+ ),
2030
+ ]),
2031
+ });
2032
+
2033
+ export function prefixMessagesUserMessageToJSON(
2034
+ prefixMessagesUserMessage: PrefixMessagesUserMessage,
2035
+ ): string {
2036
+ return JSON.stringify(
2037
+ PrefixMessagesUserMessage$outboundSchema.parse(prefixMessagesUserMessage),
2038
+ );
2039
+ }
2040
+
2041
+ /** @internal */
2042
+ export type DeploymentStreamPrefixMessagesDeploymentsContent$Outbound =
2043
+ | string
2044
+ | Array<components.TextContentPartSchema$Outbound>;
2045
+
2046
+ /** @internal */
2047
+ export const DeploymentStreamPrefixMessagesDeploymentsContent$outboundSchema:
2048
+ z.ZodType<
2049
+ DeploymentStreamPrefixMessagesDeploymentsContent$Outbound,
2050
+ z.ZodTypeDef,
2051
+ DeploymentStreamPrefixMessagesDeploymentsContent
2052
+ > = z.union([
2053
+ z.string(),
2054
+ z.array(components.TextContentPartSchema$outboundSchema),
2055
+ ]);
2056
+
2057
+ export function deploymentStreamPrefixMessagesDeploymentsContentToJSON(
2058
+ deploymentStreamPrefixMessagesDeploymentsContent:
2059
+ DeploymentStreamPrefixMessagesDeploymentsContent,
2060
+ ): string {
2061
+ return JSON.stringify(
2062
+ DeploymentStreamPrefixMessagesDeploymentsContent$outboundSchema.parse(
2063
+ deploymentStreamPrefixMessagesDeploymentsContent,
2064
+ ),
2065
+ );
2066
+ }
2067
+
2068
+ /** @internal */
2069
+ export type PrefixMessagesDeveloperMessage$Outbound = {
2070
+ role: "developer";
2071
+ content: string | Array<components.TextContentPartSchema$Outbound>;
2072
+ name?: string | undefined;
2073
+ };
2074
+
2075
+ /** @internal */
2076
+ export const PrefixMessagesDeveloperMessage$outboundSchema: z.ZodType<
2077
+ PrefixMessagesDeveloperMessage$Outbound,
2078
+ z.ZodTypeDef,
2079
+ PrefixMessagesDeveloperMessage
2080
+ > = z.object({
2081
+ role: z.literal("developer"),
2082
+ content: z.union([
2083
+ z.string(),
2084
+ z.array(components.TextContentPartSchema$outboundSchema),
2085
+ ]),
2086
+ name: z.string().optional(),
2087
+ });
2088
+
2089
+ export function prefixMessagesDeveloperMessageToJSON(
2090
+ prefixMessagesDeveloperMessage: PrefixMessagesDeveloperMessage,
2091
+ ): string {
2092
+ return JSON.stringify(
2093
+ PrefixMessagesDeveloperMessage$outboundSchema.parse(
2094
+ prefixMessagesDeveloperMessage,
2095
+ ),
2096
+ );
2097
+ }
2098
+
2099
+ /** @internal */
2100
+ export type DeploymentStreamPrefixMessagesContent$Outbound =
2101
+ | string
2102
+ | Array<components.TextContentPartSchema$Outbound>;
2103
+
2104
+ /** @internal */
2105
+ export const DeploymentStreamPrefixMessagesContent$outboundSchema: z.ZodType<
2106
+ DeploymentStreamPrefixMessagesContent$Outbound,
2107
+ z.ZodTypeDef,
2108
+ DeploymentStreamPrefixMessagesContent
2109
+ > = z.union([
2110
+ z.string(),
2111
+ z.array(components.TextContentPartSchema$outboundSchema),
2112
+ ]);
2113
+
2114
+ export function deploymentStreamPrefixMessagesContentToJSON(
2115
+ deploymentStreamPrefixMessagesContent: DeploymentStreamPrefixMessagesContent,
2116
+ ): string {
2117
+ return JSON.stringify(
2118
+ DeploymentStreamPrefixMessagesContent$outboundSchema.parse(
2119
+ deploymentStreamPrefixMessagesContent,
2120
+ ),
2121
+ );
2122
+ }
2123
+
2124
+ /** @internal */
2125
+ export type PrefixMessagesSystemMessage$Outbound = {
2126
+ role: "system";
2127
+ content: string | Array<components.TextContentPartSchema$Outbound>;
2128
+ name?: string | undefined;
2129
+ };
2130
+
2131
+ /** @internal */
2132
+ export const PrefixMessagesSystemMessage$outboundSchema: z.ZodType<
2133
+ PrefixMessagesSystemMessage$Outbound,
2134
+ z.ZodTypeDef,
2135
+ PrefixMessagesSystemMessage
2136
+ > = z.object({
2137
+ role: z.literal("system"),
2138
+ content: z.union([
2139
+ z.string(),
2140
+ z.array(components.TextContentPartSchema$outboundSchema),
2141
+ ]),
2142
+ name: z.string().optional(),
2143
+ });
2144
+
2145
+ export function prefixMessagesSystemMessageToJSON(
2146
+ prefixMessagesSystemMessage: PrefixMessagesSystemMessage,
2147
+ ): string {
2148
+ return JSON.stringify(
2149
+ PrefixMessagesSystemMessage$outboundSchema.parse(
2150
+ prefixMessagesSystemMessage,
2151
+ ),
2152
+ );
2153
+ }
2154
+
2155
+ /** @internal */
2156
+ export type DeploymentStreamPrefixMessages$Outbound =
2157
+ | PrefixMessagesSystemMessage$Outbound
2158
+ | PrefixMessagesDeveloperMessage$Outbound
2159
+ | PrefixMessagesUserMessage$Outbound
2160
+ | PrefixMessagesAssistantMessage$Outbound
2161
+ | PrefixMessagesToolMessage$Outbound;
2162
+
2163
+ /** @internal */
2164
+ export const DeploymentStreamPrefixMessages$outboundSchema: z.ZodType<
2165
+ DeploymentStreamPrefixMessages$Outbound,
2166
+ z.ZodTypeDef,
2167
+ DeploymentStreamPrefixMessages
2168
+ > = z.union([
2169
+ z.lazy(() => PrefixMessagesSystemMessage$outboundSchema),
2170
+ z.lazy(() => PrefixMessagesDeveloperMessage$outboundSchema),
2171
+ z.lazy(() => PrefixMessagesUserMessage$outboundSchema),
2172
+ z.lazy(() => PrefixMessagesAssistantMessage$outboundSchema),
2173
+ z.lazy(() => PrefixMessagesToolMessage$outboundSchema),
2174
+ ]);
2175
+
2176
+ export function deploymentStreamPrefixMessagesToJSON(
2177
+ deploymentStreamPrefixMessages: DeploymentStreamPrefixMessages,
2178
+ ): string {
2179
+ return JSON.stringify(
2180
+ DeploymentStreamPrefixMessages$outboundSchema.parse(
2181
+ deploymentStreamPrefixMessages,
2182
+ ),
2183
+ );
2184
+ }
2185
+
2186
+ /** @internal */
2187
+ export type DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$Outbound =
2188
+ components.TextContentPartSchema$Outbound;
2189
+
2190
+ /** @internal */
2191
+ export const DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$outboundSchema:
2192
+ z.ZodType<
2193
+ DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$Outbound,
2194
+ z.ZodTypeDef,
2195
+ DeploymentStreamContentDeploymentsRequestRequestBodyMessages52
2196
+ > = components.TextContentPartSchema$outboundSchema;
2197
+
2198
+ export function deploymentStreamContentDeploymentsRequestRequestBodyMessages52ToJSON(
2199
+ deploymentStreamContentDeploymentsRequestRequestBodyMessages52:
2200
+ DeploymentStreamContentDeploymentsRequestRequestBodyMessages52,
2201
+ ): string {
2202
+ return JSON.stringify(
2203
+ DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$outboundSchema
2204
+ .parse(deploymentStreamContentDeploymentsRequestRequestBodyMessages52),
2205
+ );
2206
+ }
2207
+
2208
+ /** @internal */
2209
+ export type DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$Outbound =
2210
+ | string
2211
+ | Array<components.TextContentPartSchema$Outbound>;
2212
+
2213
+ /** @internal */
2214
+ export const DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$outboundSchema:
2215
+ z.ZodType<
2216
+ DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$Outbound,
2217
+ z.ZodTypeDef,
2218
+ DeploymentStreamMessagesDeploymentsRequestRequestBody5Content
2219
+ > = z.union([
2220
+ z.string(),
2221
+ z.array(components.TextContentPartSchema$outboundSchema),
2222
+ ]);
2223
+
2224
+ export function deploymentStreamMessagesDeploymentsRequestRequestBody5ContentToJSON(
2225
+ deploymentStreamMessagesDeploymentsRequestRequestBody5Content:
2226
+ DeploymentStreamMessagesDeploymentsRequestRequestBody5Content,
2227
+ ): string {
2228
+ return JSON.stringify(
2229
+ DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$outboundSchema
2230
+ .parse(deploymentStreamMessagesDeploymentsRequestRequestBody5Content),
2231
+ );
2232
+ }
2233
+
2234
+ /** @internal */
2235
+ export const DeploymentStreamMessagesDeploymentsType$outboundSchema:
2236
+ z.ZodNativeEnum<typeof DeploymentStreamMessagesDeploymentsType> = z
2237
+ .nativeEnum(DeploymentStreamMessagesDeploymentsType);
2238
+
2239
+ /** @internal */
2240
+ export const DeploymentStreamMessagesTtl$outboundSchema: z.ZodNativeEnum<
2241
+ typeof DeploymentStreamMessagesTtl
2242
+ > = z.nativeEnum(DeploymentStreamMessagesTtl);
2243
+
2244
+ /** @internal */
2245
+ export type DeploymentStreamMessagesCacheControl$Outbound = {
2246
+ type: string;
2247
+ ttl: string;
2248
+ };
2249
+
2250
+ /** @internal */
2251
+ export const DeploymentStreamMessagesCacheControl$outboundSchema: z.ZodType<
2252
+ DeploymentStreamMessagesCacheControl$Outbound,
2253
+ z.ZodTypeDef,
2254
+ DeploymentStreamMessagesCacheControl
2255
+ > = z.object({
2256
+ type: DeploymentStreamMessagesDeploymentsType$outboundSchema,
2257
+ ttl: DeploymentStreamMessagesTtl$outboundSchema.default("5m"),
2258
+ });
2259
+
2260
+ export function deploymentStreamMessagesCacheControlToJSON(
2261
+ deploymentStreamMessagesCacheControl: DeploymentStreamMessagesCacheControl,
2262
+ ): string {
2263
+ return JSON.stringify(
2264
+ DeploymentStreamMessagesCacheControl$outboundSchema.parse(
2265
+ deploymentStreamMessagesCacheControl,
2266
+ ),
2267
+ );
2268
+ }
2269
+
2270
+ /** @internal */
2271
+ export type DeploymentStreamMessagesToolMessage$Outbound = {
2272
+ role: "tool";
2273
+ content: string | Array<components.TextContentPartSchema$Outbound>;
2274
+ tool_call_id: string | null;
2275
+ cache_control?: DeploymentStreamMessagesCacheControl$Outbound | undefined;
2276
+ };
2277
+
2278
+ /** @internal */
2279
+ export const DeploymentStreamMessagesToolMessage$outboundSchema: z.ZodType<
2280
+ DeploymentStreamMessagesToolMessage$Outbound,
2281
+ z.ZodTypeDef,
2282
+ DeploymentStreamMessagesToolMessage
2283
+ > = z.object({
2284
+ role: z.literal("tool"),
2285
+ content: z.union([
2286
+ z.string(),
2287
+ z.array(components.TextContentPartSchema$outboundSchema),
2288
+ ]),
2289
+ toolCallId: z.nullable(z.string()),
2290
+ cacheControl: z.lazy(() =>
2291
+ DeploymentStreamMessagesCacheControl$outboundSchema
2292
+ ).optional(),
2293
+ }).transform((v) => {
2294
+ return remap$(v, {
2295
+ toolCallId: "tool_call_id",
2296
+ cacheControl: "cache_control",
2297
+ });
2298
+ });
2299
+
2300
+ export function deploymentStreamMessagesToolMessageToJSON(
2301
+ deploymentStreamMessagesToolMessage: DeploymentStreamMessagesToolMessage,
2302
+ ): string {
2303
+ return JSON.stringify(
2304
+ DeploymentStreamMessagesToolMessage$outboundSchema.parse(
2305
+ deploymentStreamMessagesToolMessage,
2306
+ ),
2307
+ );
2308
+ }
2309
+
2310
+ /** @internal */
2311
+ export type DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$Outbound =
2312
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2313
+ | components.RefusalPartSchema$Outbound
2314
+ | components.ReasoningPartSchema$Outbound
2315
+ | components.RedactedReasoningPartSchema$Outbound;
2316
+
2317
+ /** @internal */
2318
+ export const DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$outboundSchema:
2319
+ z.ZodType<
2320
+ DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$Outbound,
2321
+ z.ZodTypeDef,
2322
+ DeploymentStreamContentDeploymentsRequestRequestBodyMessages2
2323
+ > = z.union([
2324
+ components.TextContentPartSchema$outboundSchema.and(
2325
+ z.object({ type: z.literal("text") }),
2326
+ ),
2327
+ components.RefusalPartSchema$outboundSchema,
2328
+ components.ReasoningPartSchema$outboundSchema,
2329
+ components.RedactedReasoningPartSchema$outboundSchema,
2330
+ ]);
2331
+
2332
+ export function deploymentStreamContentDeploymentsRequestRequestBodyMessages2ToJSON(
2333
+ deploymentStreamContentDeploymentsRequestRequestBodyMessages2:
2334
+ DeploymentStreamContentDeploymentsRequestRequestBodyMessages2,
2335
+ ): string {
2336
+ return JSON.stringify(
2337
+ DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$outboundSchema
2338
+ .parse(deploymentStreamContentDeploymentsRequestRequestBodyMessages2),
2339
+ );
2340
+ }
2341
+
2342
+ /** @internal */
2343
+ export type DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$Outbound =
2344
+ | string
2345
+ | Array<
2346
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2347
+ | components.RefusalPartSchema$Outbound
2348
+ | components.ReasoningPartSchema$Outbound
2349
+ | components.RedactedReasoningPartSchema$Outbound
2350
+ >;
2351
+
2352
+ /** @internal */
2353
+ export const DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$outboundSchema:
2354
+ z.ZodType<
2355
+ DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$Outbound,
2356
+ z.ZodTypeDef,
2357
+ DeploymentStreamMessagesDeploymentsRequestRequestBodyContent
2358
+ > = z.union([
2359
+ z.string(),
2360
+ z.array(
2361
+ z.union([
2362
+ components.TextContentPartSchema$outboundSchema.and(
2363
+ z.object({ type: z.literal("text") }),
2364
+ ),
2365
+ components.RefusalPartSchema$outboundSchema,
2366
+ components.ReasoningPartSchema$outboundSchema,
2367
+ components.RedactedReasoningPartSchema$outboundSchema,
2368
+ ]),
2369
+ ),
2370
+ ]);
2371
+
2372
+ export function deploymentStreamMessagesDeploymentsRequestRequestBodyContentToJSON(
2373
+ deploymentStreamMessagesDeploymentsRequestRequestBodyContent:
2374
+ DeploymentStreamMessagesDeploymentsRequestRequestBodyContent,
2375
+ ): string {
2376
+ return JSON.stringify(
2377
+ DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$outboundSchema
2378
+ .parse(deploymentStreamMessagesDeploymentsRequestRequestBodyContent),
2379
+ );
2380
+ }
2381
+
2382
+ /** @internal */
2383
+ export type DeploymentStreamMessagesAudio$Outbound = {
2384
+ id: string;
2385
+ };
2386
+
2387
+ /** @internal */
2388
+ export const DeploymentStreamMessagesAudio$outboundSchema: z.ZodType<
2389
+ DeploymentStreamMessagesAudio$Outbound,
2390
+ z.ZodTypeDef,
2391
+ DeploymentStreamMessagesAudio
2392
+ > = z.object({
2393
+ id: z.string(),
2394
+ });
2395
+
2396
+ export function deploymentStreamMessagesAudioToJSON(
2397
+ deploymentStreamMessagesAudio: DeploymentStreamMessagesAudio,
2398
+ ): string {
2399
+ return JSON.stringify(
2400
+ DeploymentStreamMessagesAudio$outboundSchema.parse(
2401
+ deploymentStreamMessagesAudio,
2402
+ ),
2403
+ );
2404
+ }
2405
+
2406
+ /** @internal */
2407
+ export const DeploymentStreamMessagesType$outboundSchema: z.ZodNativeEnum<
2408
+ typeof DeploymentStreamMessagesType
2409
+ > = z.nativeEnum(DeploymentStreamMessagesType);
2410
+
2411
+ /** @internal */
2412
+ export type DeploymentStreamMessagesFunction$Outbound = {
2413
+ name?: string | undefined;
2414
+ arguments?: string | undefined;
2415
+ };
2416
+
2417
+ /** @internal */
2418
+ export const DeploymentStreamMessagesFunction$outboundSchema: z.ZodType<
2419
+ DeploymentStreamMessagesFunction$Outbound,
2420
+ z.ZodTypeDef,
2421
+ DeploymentStreamMessagesFunction
2422
+ > = z.object({
2423
+ name: z.string().optional(),
2424
+ arguments: z.string().optional(),
2425
+ });
2426
+
2427
+ export function deploymentStreamMessagesFunctionToJSON(
2428
+ deploymentStreamMessagesFunction: DeploymentStreamMessagesFunction,
2429
+ ): string {
2430
+ return JSON.stringify(
2431
+ DeploymentStreamMessagesFunction$outboundSchema.parse(
2432
+ deploymentStreamMessagesFunction,
2433
+ ),
2434
+ );
2435
+ }
2436
+
2437
+ /** @internal */
2438
+ export type DeploymentStreamMessagesToolCalls$Outbound = {
2439
+ id: string;
2440
+ type: string;
2441
+ function: DeploymentStreamMessagesFunction$Outbound;
2442
+ thought_signature?: string | undefined;
2443
+ };
2444
+
2445
+ /** @internal */
2446
+ export const DeploymentStreamMessagesToolCalls$outboundSchema: z.ZodType<
2447
+ DeploymentStreamMessagesToolCalls$Outbound,
2448
+ z.ZodTypeDef,
2449
+ DeploymentStreamMessagesToolCalls
2450
+ > = z.object({
2451
+ id: z.string(),
2452
+ type: DeploymentStreamMessagesType$outboundSchema,
2453
+ function: z.lazy(() => DeploymentStreamMessagesFunction$outboundSchema),
2454
+ thoughtSignature: z.string().optional(),
2455
+ }).transform((v) => {
2456
+ return remap$(v, {
2457
+ thoughtSignature: "thought_signature",
2458
+ });
2459
+ });
2460
+
2461
+ export function deploymentStreamMessagesToolCallsToJSON(
2462
+ deploymentStreamMessagesToolCalls: DeploymentStreamMessagesToolCalls,
2463
+ ): string {
2464
+ return JSON.stringify(
2465
+ DeploymentStreamMessagesToolCalls$outboundSchema.parse(
2466
+ deploymentStreamMessagesToolCalls,
2467
+ ),
2468
+ );
2469
+ }
2470
+
2471
+ /** @internal */
2472
+ export type DeploymentStreamMessagesAssistantMessage$Outbound = {
2473
+ content?:
2474
+ | string
2475
+ | Array<
2476
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2477
+ | components.RefusalPartSchema$Outbound
2478
+ | components.ReasoningPartSchema$Outbound
2479
+ | components.RedactedReasoningPartSchema$Outbound
2480
+ >
2481
+ | null
2482
+ | undefined;
2483
+ refusal?: string | null | undefined;
2484
+ role: "assistant";
2485
+ name?: string | undefined;
2486
+ audio?: DeploymentStreamMessagesAudio$Outbound | null | undefined;
2487
+ tool_calls?: Array<DeploymentStreamMessagesToolCalls$Outbound> | undefined;
2488
+ };
2489
+
2490
+ /** @internal */
2491
+ export const DeploymentStreamMessagesAssistantMessage$outboundSchema: z.ZodType<
2492
+ DeploymentStreamMessagesAssistantMessage$Outbound,
2493
+ z.ZodTypeDef,
2494
+ DeploymentStreamMessagesAssistantMessage
2495
+ > = z.object({
2496
+ content: z.nullable(
2497
+ z.union([
2498
+ z.string(),
2499
+ z.array(
2500
+ z.union([
2501
+ components.TextContentPartSchema$outboundSchema.and(
2502
+ z.object({ type: z.literal("text") }),
2503
+ ),
2504
+ components.RefusalPartSchema$outboundSchema,
2505
+ components.ReasoningPartSchema$outboundSchema,
2506
+ components.RedactedReasoningPartSchema$outboundSchema,
2507
+ ]),
2508
+ ),
2509
+ ]),
2510
+ ).optional(),
2511
+ refusal: z.nullable(z.string()).optional(),
2512
+ role: z.literal("assistant"),
2513
+ name: z.string().optional(),
2514
+ audio: z.nullable(z.lazy(() => DeploymentStreamMessagesAudio$outboundSchema))
2515
+ .optional(),
2516
+ toolCalls: z.array(
2517
+ z.lazy(() => DeploymentStreamMessagesToolCalls$outboundSchema),
2518
+ ).optional(),
2519
+ }).transform((v) => {
2520
+ return remap$(v, {
2521
+ toolCalls: "tool_calls",
2522
+ });
2523
+ });
2524
+
2525
+ export function deploymentStreamMessagesAssistantMessageToJSON(
2526
+ deploymentStreamMessagesAssistantMessage:
2527
+ DeploymentStreamMessagesAssistantMessage,
2528
+ ): string {
2529
+ return JSON.stringify(
2530
+ DeploymentStreamMessagesAssistantMessage$outboundSchema.parse(
2531
+ deploymentStreamMessagesAssistantMessage,
2532
+ ),
2533
+ );
2534
+ }
2535
+
2536
+ /** @internal */
2537
+ export const DeploymentStream2DeploymentsRequestRequestBodyType$outboundSchema:
2538
+ z.ZodNativeEnum<typeof DeploymentStream2DeploymentsRequestRequestBodyType> = z
2539
+ .nativeEnum(DeploymentStream2DeploymentsRequestRequestBodyType);
2540
+
2541
+ /** @internal */
2542
+ export const DeploymentStream2DeploymentsTtl$outboundSchema: z.ZodNativeEnum<
2543
+ typeof DeploymentStream2DeploymentsTtl
2544
+ > = z.nativeEnum(DeploymentStream2DeploymentsTtl);
2545
+
2546
+ /** @internal */
2547
+ export type DeploymentStream2DeploymentsCacheControl$Outbound = {
2548
+ type: string;
2549
+ ttl: string;
2550
+ };
2551
+
2552
+ /** @internal */
2553
+ export const DeploymentStream2DeploymentsCacheControl$outboundSchema: z.ZodType<
2554
+ DeploymentStream2DeploymentsCacheControl$Outbound,
2555
+ z.ZodTypeDef,
2556
+ DeploymentStream2DeploymentsCacheControl
2557
+ > = z.object({
2558
+ type: DeploymentStream2DeploymentsRequestRequestBodyType$outboundSchema,
2559
+ ttl: DeploymentStream2DeploymentsTtl$outboundSchema.default("5m"),
2560
+ });
2561
+
2562
+ export function deploymentStream2DeploymentsCacheControlToJSON(
2563
+ deploymentStream2DeploymentsCacheControl:
2564
+ DeploymentStream2DeploymentsCacheControl,
2565
+ ): string {
2566
+ return JSON.stringify(
2567
+ DeploymentStream2DeploymentsCacheControl$outboundSchema.parse(
2568
+ deploymentStream2DeploymentsCacheControl,
2569
+ ),
2570
+ );
2571
+ }
2572
+
2573
+ /** @internal */
2574
+ export type DeploymentStream2Deployments4$Outbound = {
2575
+ type: "file";
2576
+ cache_control?: DeploymentStream2DeploymentsCacheControl$Outbound | undefined;
2577
+ file: components.FileContentPartSchema$Outbound;
2578
+ };
2579
+
2580
+ /** @internal */
2581
+ export const DeploymentStream2Deployments4$outboundSchema: z.ZodType<
2582
+ DeploymentStream2Deployments4$Outbound,
2583
+ z.ZodTypeDef,
2584
+ DeploymentStream2Deployments4
2585
+ > = z.object({
2586
+ type: z.literal("file"),
2587
+ cacheControl: z.lazy(() =>
2588
+ DeploymentStream2DeploymentsCacheControl$outboundSchema
2589
+ ).optional(),
2590
+ file: components.FileContentPartSchema$outboundSchema,
2591
+ }).transform((v) => {
2592
+ return remap$(v, {
2593
+ cacheControl: "cache_control",
2594
+ });
2595
+ });
2596
+
2597
+ export function deploymentStream2Deployments4ToJSON(
2598
+ deploymentStream2Deployments4: DeploymentStream2Deployments4,
2599
+ ): string {
2600
+ return JSON.stringify(
2601
+ DeploymentStream2Deployments4$outboundSchema.parse(
2602
+ deploymentStream2Deployments4,
2603
+ ),
2604
+ );
2605
+ }
2606
+
2607
+ /** @internal */
2608
+ export type DeploymentStreamContentDeploymentsRequestRequestBody2$Outbound =
2609
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2610
+ | components.ImageContentPartSchema$Outbound
2611
+ | components.AudioContentPartSchema$Outbound
2612
+ | DeploymentStream2Deployments4$Outbound;
2613
+
2614
+ /** @internal */
2615
+ export const DeploymentStreamContentDeploymentsRequestRequestBody2$outboundSchema:
2616
+ z.ZodType<
2617
+ DeploymentStreamContentDeploymentsRequestRequestBody2$Outbound,
2618
+ z.ZodTypeDef,
2619
+ DeploymentStreamContentDeploymentsRequestRequestBody2
2620
+ > = z.union([
2621
+ components.TextContentPartSchema$outboundSchema.and(
2622
+ z.object({ type: z.literal("text") }),
2623
+ ),
2624
+ components.ImageContentPartSchema$outboundSchema,
2625
+ components.AudioContentPartSchema$outboundSchema,
2626
+ z.lazy(() => DeploymentStream2Deployments4$outboundSchema),
2627
+ ]);
2628
+
2629
+ export function deploymentStreamContentDeploymentsRequestRequestBody2ToJSON(
2630
+ deploymentStreamContentDeploymentsRequestRequestBody2:
2631
+ DeploymentStreamContentDeploymentsRequestRequestBody2,
2632
+ ): string {
2633
+ return JSON.stringify(
2634
+ DeploymentStreamContentDeploymentsRequestRequestBody2$outboundSchema.parse(
2635
+ deploymentStreamContentDeploymentsRequestRequestBody2,
2636
+ ),
2637
+ );
2638
+ }
2639
+
2640
+ /** @internal */
2641
+ export type DeploymentStreamMessagesDeploymentsRequestContent$Outbound =
2642
+ | string
2643
+ | Array<
2644
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2645
+ | components.ImageContentPartSchema$Outbound
2646
+ | components.AudioContentPartSchema$Outbound
2647
+ | DeploymentStream2Deployments4$Outbound
2648
+ >;
2649
+
2650
+ /** @internal */
2651
+ export const DeploymentStreamMessagesDeploymentsRequestContent$outboundSchema:
2652
+ z.ZodType<
2653
+ DeploymentStreamMessagesDeploymentsRequestContent$Outbound,
2654
+ z.ZodTypeDef,
2655
+ DeploymentStreamMessagesDeploymentsRequestContent
2656
+ > = z.union([
2657
+ z.string(),
2658
+ z.array(
2659
+ z.union([
2660
+ components.TextContentPartSchema$outboundSchema.and(
2661
+ z.object({ type: z.literal("text") }),
2662
+ ),
2663
+ components.ImageContentPartSchema$outboundSchema,
2664
+ components.AudioContentPartSchema$outboundSchema,
2665
+ z.lazy(() => DeploymentStream2Deployments4$outboundSchema),
2666
+ ]),
2667
+ ),
2668
+ ]);
2669
+
2670
+ export function deploymentStreamMessagesDeploymentsRequestContentToJSON(
2671
+ deploymentStreamMessagesDeploymentsRequestContent:
2672
+ DeploymentStreamMessagesDeploymentsRequestContent,
2673
+ ): string {
2674
+ return JSON.stringify(
2675
+ DeploymentStreamMessagesDeploymentsRequestContent$outboundSchema.parse(
2676
+ deploymentStreamMessagesDeploymentsRequestContent,
2677
+ ),
2678
+ );
2679
+ }
2680
+
2681
+ /** @internal */
2682
+ export type DeploymentStreamMessagesUserMessage$Outbound = {
2683
+ role: "user";
2684
+ name?: string | undefined;
2685
+ content:
2686
+ | string
2687
+ | Array<
2688
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2689
+ | components.ImageContentPartSchema$Outbound
2690
+ | components.AudioContentPartSchema$Outbound
2691
+ | DeploymentStream2Deployments4$Outbound
2692
+ >;
2693
+ };
2694
+
2695
+ /** @internal */
2696
+ export const DeploymentStreamMessagesUserMessage$outboundSchema: z.ZodType<
2697
+ DeploymentStreamMessagesUserMessage$Outbound,
2698
+ z.ZodTypeDef,
2699
+ DeploymentStreamMessagesUserMessage
2700
+ > = z.object({
2701
+ role: z.literal("user"),
2702
+ name: z.string().optional(),
2703
+ content: z.union([
2704
+ z.string(),
2705
+ z.array(
2706
+ z.union([
2707
+ components.TextContentPartSchema$outboundSchema.and(
2708
+ z.object({ type: z.literal("text") }),
2709
+ ),
2710
+ components.ImageContentPartSchema$outboundSchema,
2711
+ components.AudioContentPartSchema$outboundSchema,
2712
+ z.lazy(() => DeploymentStream2Deployments4$outboundSchema),
2713
+ ]),
2714
+ ),
2715
+ ]),
2716
+ });
2717
+
2718
+ export function deploymentStreamMessagesUserMessageToJSON(
2719
+ deploymentStreamMessagesUserMessage: DeploymentStreamMessagesUserMessage,
2720
+ ): string {
2721
+ return JSON.stringify(
2722
+ DeploymentStreamMessagesUserMessage$outboundSchema.parse(
2723
+ deploymentStreamMessagesUserMessage,
2724
+ ),
2725
+ );
2726
+ }
2727
+
2728
+ /** @internal */
2729
+ export type DeploymentStreamMessagesDeploymentsContent$Outbound =
2730
+ | string
2731
+ | Array<components.TextContentPartSchema$Outbound>;
2732
+
2733
+ /** @internal */
2734
+ export const DeploymentStreamMessagesDeploymentsContent$outboundSchema:
2735
+ z.ZodType<
2736
+ DeploymentStreamMessagesDeploymentsContent$Outbound,
2737
+ z.ZodTypeDef,
2738
+ DeploymentStreamMessagesDeploymentsContent
2739
+ > = z.union([
2740
+ z.string(),
2741
+ z.array(components.TextContentPartSchema$outboundSchema),
2742
+ ]);
2743
+
2744
+ export function deploymentStreamMessagesDeploymentsContentToJSON(
2745
+ deploymentStreamMessagesDeploymentsContent:
2746
+ DeploymentStreamMessagesDeploymentsContent,
2747
+ ): string {
2748
+ return JSON.stringify(
2749
+ DeploymentStreamMessagesDeploymentsContent$outboundSchema.parse(
2750
+ deploymentStreamMessagesDeploymentsContent,
2751
+ ),
2752
+ );
2753
+ }
2754
+
2755
+ /** @internal */
2756
+ export type DeploymentStreamMessagesDeveloperMessage$Outbound = {
2757
+ role: "developer";
2758
+ content: string | Array<components.TextContentPartSchema$Outbound>;
2759
+ name?: string | undefined;
2760
+ };
2761
+
2762
+ /** @internal */
2763
+ export const DeploymentStreamMessagesDeveloperMessage$outboundSchema: z.ZodType<
2764
+ DeploymentStreamMessagesDeveloperMessage$Outbound,
2765
+ z.ZodTypeDef,
2766
+ DeploymentStreamMessagesDeveloperMessage
2767
+ > = z.object({
2768
+ role: z.literal("developer"),
2769
+ content: z.union([
2770
+ z.string(),
2771
+ z.array(components.TextContentPartSchema$outboundSchema),
2772
+ ]),
2773
+ name: z.string().optional(),
2774
+ });
2775
+
2776
+ export function deploymentStreamMessagesDeveloperMessageToJSON(
2777
+ deploymentStreamMessagesDeveloperMessage:
2778
+ DeploymentStreamMessagesDeveloperMessage,
2779
+ ): string {
2780
+ return JSON.stringify(
2781
+ DeploymentStreamMessagesDeveloperMessage$outboundSchema.parse(
2782
+ deploymentStreamMessagesDeveloperMessage,
2783
+ ),
2784
+ );
2785
+ }
2786
+
2787
+ /** @internal */
2788
+ export type DeploymentStreamMessagesContent$Outbound =
2789
+ | string
2790
+ | Array<components.TextContentPartSchema$Outbound>;
2791
+
2792
+ /** @internal */
2793
+ export const DeploymentStreamMessagesContent$outboundSchema: z.ZodType<
2794
+ DeploymentStreamMessagesContent$Outbound,
2795
+ z.ZodTypeDef,
2796
+ DeploymentStreamMessagesContent
2797
+ > = z.union([
2798
+ z.string(),
2799
+ z.array(components.TextContentPartSchema$outboundSchema),
2800
+ ]);
2801
+
2802
+ export function deploymentStreamMessagesContentToJSON(
2803
+ deploymentStreamMessagesContent: DeploymentStreamMessagesContent,
2804
+ ): string {
2805
+ return JSON.stringify(
2806
+ DeploymentStreamMessagesContent$outboundSchema.parse(
2807
+ deploymentStreamMessagesContent,
2808
+ ),
2809
+ );
2810
+ }
2811
+
2812
+ /** @internal */
2813
+ export type DeploymentStreamMessagesSystemMessage$Outbound = {
2814
+ role: "system";
2815
+ content: string | Array<components.TextContentPartSchema$Outbound>;
2816
+ name?: string | undefined;
2817
+ };
2818
+
2819
+ /** @internal */
2820
+ export const DeploymentStreamMessagesSystemMessage$outboundSchema: z.ZodType<
2821
+ DeploymentStreamMessagesSystemMessage$Outbound,
2822
+ z.ZodTypeDef,
2823
+ DeploymentStreamMessagesSystemMessage
2824
+ > = z.object({
2825
+ role: z.literal("system"),
2826
+ content: z.union([
2827
+ z.string(),
2828
+ z.array(components.TextContentPartSchema$outboundSchema),
2829
+ ]),
2830
+ name: z.string().optional(),
2831
+ });
2832
+
2833
+ export function deploymentStreamMessagesSystemMessageToJSON(
2834
+ deploymentStreamMessagesSystemMessage: DeploymentStreamMessagesSystemMessage,
2835
+ ): string {
2836
+ return JSON.stringify(
2837
+ DeploymentStreamMessagesSystemMessage$outboundSchema.parse(
2838
+ deploymentStreamMessagesSystemMessage,
2839
+ ),
2840
+ );
2841
+ }
2842
+
2843
+ /** @internal */
2844
+ export type DeploymentStreamMessages$Outbound =
2845
+ | DeploymentStreamMessagesSystemMessage$Outbound
2846
+ | DeploymentStreamMessagesDeveloperMessage$Outbound
2847
+ | DeploymentStreamMessagesUserMessage$Outbound
2848
+ | DeploymentStreamMessagesAssistantMessage$Outbound
2849
+ | DeploymentStreamMessagesToolMessage$Outbound;
2850
+
2851
+ /** @internal */
2852
+ export const DeploymentStreamMessages$outboundSchema: z.ZodType<
2853
+ DeploymentStreamMessages$Outbound,
2854
+ z.ZodTypeDef,
2855
+ DeploymentStreamMessages
2856
+ > = z.union([
2857
+ z.lazy(() => DeploymentStreamMessagesSystemMessage$outboundSchema),
2858
+ z.lazy(() => DeploymentStreamMessagesDeveloperMessage$outboundSchema),
2859
+ z.lazy(() => DeploymentStreamMessagesUserMessage$outboundSchema),
2860
+ z.lazy(() => DeploymentStreamMessagesAssistantMessage$outboundSchema),
2861
+ z.lazy(() => DeploymentStreamMessagesToolMessage$outboundSchema),
2862
+ ]);
2863
+
2864
+ export function deploymentStreamMessagesToJSON(
2865
+ deploymentStreamMessages: DeploymentStreamMessages,
2866
+ ): string {
2867
+ return JSON.stringify(
2868
+ DeploymentStreamMessages$outboundSchema.parse(deploymentStreamMessages),
2869
+ );
2870
+ }
2871
+
2872
+ /** @internal */
2873
+ export type DeploymentStreamMetadata$Outbound = {
2874
+ file_name?: string | undefined;
2875
+ file_type?: string | undefined;
2876
+ page_number?: number | undefined;
2877
+ };
2878
+
2879
+ /** @internal */
2880
+ export const DeploymentStreamMetadata$outboundSchema: z.ZodType<
2881
+ DeploymentStreamMetadata$Outbound,
2882
+ z.ZodTypeDef,
2883
+ DeploymentStreamMetadata
2884
+ > = z.object({
2885
+ fileName: z.string().optional(),
2886
+ fileType: z.string().optional(),
2887
+ pageNumber: z.number().optional(),
2888
+ }).transform((v) => {
2889
+ return remap$(v, {
2890
+ fileName: "file_name",
2891
+ fileType: "file_type",
2892
+ pageNumber: "page_number",
2893
+ });
2894
+ });
2895
+
2896
+ export function deploymentStreamMetadataToJSON(
2897
+ deploymentStreamMetadata: DeploymentStreamMetadata,
2898
+ ): string {
2899
+ return JSON.stringify(
2900
+ DeploymentStreamMetadata$outboundSchema.parse(deploymentStreamMetadata),
2901
+ );
2902
+ }
2903
+
2904
+ /** @internal */
2905
+ export type DeploymentStreamDocuments$Outbound = {
2906
+ text: string;
2907
+ metadata?: DeploymentStreamMetadata$Outbound | undefined;
2908
+ };
2909
+
2910
+ /** @internal */
2911
+ export const DeploymentStreamDocuments$outboundSchema: z.ZodType<
2912
+ DeploymentStreamDocuments$Outbound,
2913
+ z.ZodTypeDef,
2914
+ DeploymentStreamDocuments
2915
+ > = z.object({
2916
+ text: z.string(),
2917
+ metadata: z.lazy(() => DeploymentStreamMetadata$outboundSchema).optional(),
2918
+ });
2919
+
2920
+ export function deploymentStreamDocumentsToJSON(
2921
+ deploymentStreamDocuments: DeploymentStreamDocuments,
2922
+ ): string {
2923
+ return JSON.stringify(
2924
+ DeploymentStreamDocuments$outboundSchema.parse(deploymentStreamDocuments),
2925
+ );
2926
+ }
2927
+
2928
+ /** @internal */
2929
+ export type DeploymentStreamInvokeOptions$Outbound = {
2930
+ include_retrievals: boolean;
2931
+ include_usage: boolean;
2932
+ mock_response?: string | undefined;
2933
+ };
2934
+
2935
+ /** @internal */
2936
+ export const DeploymentStreamInvokeOptions$outboundSchema: z.ZodType<
2937
+ DeploymentStreamInvokeOptions$Outbound,
2938
+ z.ZodTypeDef,
2939
+ DeploymentStreamInvokeOptions
2940
+ > = z.object({
2941
+ includeRetrievals: z.boolean().default(false),
2942
+ includeUsage: z.boolean().default(false),
2943
+ mockResponse: z.string().optional(),
2944
+ }).transform((v) => {
2945
+ return remap$(v, {
2946
+ includeRetrievals: "include_retrievals",
2947
+ includeUsage: "include_usage",
2948
+ mockResponse: "mock_response",
2949
+ });
2950
+ });
2951
+
2952
+ export function deploymentStreamInvokeOptionsToJSON(
2953
+ deploymentStreamInvokeOptions: DeploymentStreamInvokeOptions,
2954
+ ): string {
2955
+ return JSON.stringify(
2956
+ DeploymentStreamInvokeOptions$outboundSchema.parse(
2957
+ deploymentStreamInvokeOptions,
2958
+ ),
2959
+ );
2960
+ }
2961
+
2962
+ /** @internal */
2963
+ export type DeploymentStreamThread$Outbound = {
2964
+ id: string;
2965
+ tags?: Array<string> | undefined;
2966
+ };
2967
+
2968
+ /** @internal */
2969
+ export const DeploymentStreamThread$outboundSchema: z.ZodType<
2970
+ DeploymentStreamThread$Outbound,
2971
+ z.ZodTypeDef,
2972
+ DeploymentStreamThread
2973
+ > = z.object({
2974
+ id: z.string(),
2975
+ tags: z.array(z.string()).optional(),
2976
+ });
2977
+
2978
+ export function deploymentStreamThreadToJSON(
2979
+ deploymentStreamThread: DeploymentStreamThread,
2980
+ ): string {
2981
+ return JSON.stringify(
2982
+ DeploymentStreamThread$outboundSchema.parse(deploymentStreamThread),
2983
+ );
2984
+ }
2985
+
2986
+ /** @internal */
2987
+ export type DeploymentStreamOrExists$Outbound = {
2988
+ exists: boolean;
2989
+ };
2990
+
2991
+ /** @internal */
2992
+ export const DeploymentStreamOrExists$outboundSchema: z.ZodType<
2993
+ DeploymentStreamOrExists$Outbound,
2994
+ z.ZodTypeDef,
2995
+ DeploymentStreamOrExists
2996
+ > = z.object({
2997
+ exists: z.boolean(),
2998
+ });
2999
+
3000
+ export function deploymentStreamOrExistsToJSON(
3001
+ deploymentStreamOrExists: DeploymentStreamOrExists,
3002
+ ): string {
3003
+ return JSON.stringify(
3004
+ DeploymentStreamOrExists$outboundSchema.parse(deploymentStreamOrExists),
3005
+ );
3006
+ }
3007
+
3008
+ /** @internal */
3009
+ export type DeploymentStreamOrDeploymentsNin$Outbound =
3010
+ | string
3011
+ | number
3012
+ | boolean;
3013
+
3014
+ /** @internal */
3015
+ export const DeploymentStreamOrDeploymentsNin$outboundSchema: z.ZodType<
3016
+ DeploymentStreamOrDeploymentsNin$Outbound,
3017
+ z.ZodTypeDef,
3018
+ DeploymentStreamOrDeploymentsNin
3019
+ > = z.union([z.string(), z.number(), z.boolean()]);
3020
+
3021
+ export function deploymentStreamOrDeploymentsNinToJSON(
3022
+ deploymentStreamOrDeploymentsNin: DeploymentStreamOrDeploymentsNin,
3023
+ ): string {
3024
+ return JSON.stringify(
3025
+ DeploymentStreamOrDeploymentsNin$outboundSchema.parse(
3026
+ deploymentStreamOrDeploymentsNin,
3027
+ ),
3028
+ );
3029
+ }
3030
+
3031
+ /** @internal */
3032
+ export type DeploymentStreamOrNin$Outbound = {
3033
+ nin: Array<string | number | boolean>;
3034
+ };
3035
+
3036
+ /** @internal */
3037
+ export const DeploymentStreamOrNin$outboundSchema: z.ZodType<
3038
+ DeploymentStreamOrNin$Outbound,
3039
+ z.ZodTypeDef,
3040
+ DeploymentStreamOrNin
3041
+ > = z.object({
3042
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3043
+ });
3044
+
3045
+ export function deploymentStreamOrNinToJSON(
3046
+ deploymentStreamOrNin: DeploymentStreamOrNin,
3047
+ ): string {
3048
+ return JSON.stringify(
3049
+ DeploymentStreamOrNin$outboundSchema.parse(deploymentStreamOrNin),
3050
+ );
3051
+ }
3052
+
3053
+ /** @internal */
3054
+ export type DeploymentStreamOrDeploymentsIn$Outbound =
3055
+ | string
3056
+ | number
3057
+ | boolean;
3058
+
3059
+ /** @internal */
3060
+ export const DeploymentStreamOrDeploymentsIn$outboundSchema: z.ZodType<
3061
+ DeploymentStreamOrDeploymentsIn$Outbound,
3062
+ z.ZodTypeDef,
3063
+ DeploymentStreamOrDeploymentsIn
3064
+ > = z.union([z.string(), z.number(), z.boolean()]);
3065
+
3066
+ export function deploymentStreamOrDeploymentsInToJSON(
3067
+ deploymentStreamOrDeploymentsIn: DeploymentStreamOrDeploymentsIn,
3068
+ ): string {
3069
+ return JSON.stringify(
3070
+ DeploymentStreamOrDeploymentsIn$outboundSchema.parse(
3071
+ deploymentStreamOrDeploymentsIn,
3072
+ ),
3073
+ );
3074
+ }
3075
+
3076
+ /** @internal */
3077
+ export type DeploymentStreamOrIn$Outbound = {
3078
+ in: Array<string | number | boolean>;
3079
+ };
3080
+
3081
+ /** @internal */
3082
+ export const DeploymentStreamOrIn$outboundSchema: z.ZodType<
3083
+ DeploymentStreamOrIn$Outbound,
3084
+ z.ZodTypeDef,
3085
+ DeploymentStreamOrIn
3086
+ > = z.object({
3087
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3088
+ });
3089
+
3090
+ export function deploymentStreamOrInToJSON(
3091
+ deploymentStreamOrIn: DeploymentStreamOrIn,
3092
+ ): string {
3093
+ return JSON.stringify(
3094
+ DeploymentStreamOrIn$outboundSchema.parse(deploymentStreamOrIn),
3095
+ );
3096
+ }
3097
+
3098
+ /** @internal */
3099
+ export type DeploymentStreamOrLte$Outbound = {
3100
+ lte: number;
3101
+ };
3102
+
3103
+ /** @internal */
3104
+ export const DeploymentStreamOrLte$outboundSchema: z.ZodType<
3105
+ DeploymentStreamOrLte$Outbound,
3106
+ z.ZodTypeDef,
3107
+ DeploymentStreamOrLte
3108
+ > = z.object({
3109
+ lte: z.number(),
3110
+ });
3111
+
3112
+ export function deploymentStreamOrLteToJSON(
3113
+ deploymentStreamOrLte: DeploymentStreamOrLte,
3114
+ ): string {
3115
+ return JSON.stringify(
3116
+ DeploymentStreamOrLte$outboundSchema.parse(deploymentStreamOrLte),
3117
+ );
3118
+ }
3119
+
3120
+ /** @internal */
3121
+ export type DeploymentStreamOrLt$Outbound = {
3122
+ lt: number;
3123
+ };
3124
+
3125
+ /** @internal */
3126
+ export const DeploymentStreamOrLt$outboundSchema: z.ZodType<
3127
+ DeploymentStreamOrLt$Outbound,
3128
+ z.ZodTypeDef,
3129
+ DeploymentStreamOrLt
3130
+ > = z.object({
3131
+ lt: z.number(),
3132
+ });
3133
+
3134
+ export function deploymentStreamOrLtToJSON(
3135
+ deploymentStreamOrLt: DeploymentStreamOrLt,
3136
+ ): string {
3137
+ return JSON.stringify(
3138
+ DeploymentStreamOrLt$outboundSchema.parse(deploymentStreamOrLt),
3139
+ );
3140
+ }
3141
+
3142
+ /** @internal */
3143
+ export type DeploymentStreamOrGte$Outbound = {
3144
+ gte: number;
3145
+ };
3146
+
3147
+ /** @internal */
3148
+ export const DeploymentStreamOrGte$outboundSchema: z.ZodType<
3149
+ DeploymentStreamOrGte$Outbound,
3150
+ z.ZodTypeDef,
3151
+ DeploymentStreamOrGte
3152
+ > = z.object({
3153
+ gte: z.number(),
3154
+ });
3155
+
3156
+ export function deploymentStreamOrGteToJSON(
3157
+ deploymentStreamOrGte: DeploymentStreamOrGte,
3158
+ ): string {
3159
+ return JSON.stringify(
3160
+ DeploymentStreamOrGte$outboundSchema.parse(deploymentStreamOrGte),
3161
+ );
3162
+ }
3163
+
3164
+ /** @internal */
3165
+ export type DeploymentStreamOrGt$Outbound = {
3166
+ gt: number;
3167
+ };
3168
+
3169
+ /** @internal */
3170
+ export const DeploymentStreamOrGt$outboundSchema: z.ZodType<
3171
+ DeploymentStreamOrGt$Outbound,
3172
+ z.ZodTypeDef,
3173
+ DeploymentStreamOrGt
3174
+ > = z.object({
3175
+ gt: z.number(),
3176
+ });
3177
+
3178
+ export function deploymentStreamOrGtToJSON(
3179
+ deploymentStreamOrGt: DeploymentStreamOrGt,
3180
+ ): string {
3181
+ return JSON.stringify(
3182
+ DeploymentStreamOrGt$outboundSchema.parse(deploymentStreamOrGt),
3183
+ );
3184
+ }
3185
+
3186
+ /** @internal */
3187
+ export type DeploymentStreamOrDeploymentsNe$Outbound =
3188
+ | string
3189
+ | number
3190
+ | boolean;
3191
+
3192
+ /** @internal */
3193
+ export const DeploymentStreamOrDeploymentsNe$outboundSchema: z.ZodType<
3194
+ DeploymentStreamOrDeploymentsNe$Outbound,
3195
+ z.ZodTypeDef,
3196
+ DeploymentStreamOrDeploymentsNe
3197
+ > = z.union([z.string(), z.number(), z.boolean()]);
3198
+
3199
+ export function deploymentStreamOrDeploymentsNeToJSON(
3200
+ deploymentStreamOrDeploymentsNe: DeploymentStreamOrDeploymentsNe,
3201
+ ): string {
3202
+ return JSON.stringify(
3203
+ DeploymentStreamOrDeploymentsNe$outboundSchema.parse(
3204
+ deploymentStreamOrDeploymentsNe,
3205
+ ),
3206
+ );
3207
+ }
3208
+
3209
+ /** @internal */
3210
+ export type DeploymentStreamOrNe$Outbound = {
3211
+ ne: string | number | boolean;
3212
+ };
3213
+
3214
+ /** @internal */
3215
+ export const DeploymentStreamOrNe$outboundSchema: z.ZodType<
3216
+ DeploymentStreamOrNe$Outbound,
3217
+ z.ZodTypeDef,
3218
+ DeploymentStreamOrNe
3219
+ > = z.object({
3220
+ ne: z.union([z.string(), z.number(), z.boolean()]),
3221
+ });
3222
+
3223
+ export function deploymentStreamOrNeToJSON(
3224
+ deploymentStreamOrNe: DeploymentStreamOrNe,
3225
+ ): string {
3226
+ return JSON.stringify(
3227
+ DeploymentStreamOrNe$outboundSchema.parse(deploymentStreamOrNe),
3228
+ );
3229
+ }
3230
+
3231
+ /** @internal */
3232
+ export type DeploymentStreamOrDeploymentsEq$Outbound =
3233
+ | string
3234
+ | number
3235
+ | boolean;
3236
+
3237
+ /** @internal */
3238
+ export const DeploymentStreamOrDeploymentsEq$outboundSchema: z.ZodType<
3239
+ DeploymentStreamOrDeploymentsEq$Outbound,
3240
+ z.ZodTypeDef,
3241
+ DeploymentStreamOrDeploymentsEq
3242
+ > = z.union([z.string(), z.number(), z.boolean()]);
3243
+
3244
+ export function deploymentStreamOrDeploymentsEqToJSON(
3245
+ deploymentStreamOrDeploymentsEq: DeploymentStreamOrDeploymentsEq,
3246
+ ): string {
3247
+ return JSON.stringify(
3248
+ DeploymentStreamOrDeploymentsEq$outboundSchema.parse(
3249
+ deploymentStreamOrDeploymentsEq,
3250
+ ),
3251
+ );
3252
+ }
3253
+
3254
+ /** @internal */
3255
+ export type DeploymentStreamOrEq$Outbound = {
3256
+ eq: string | number | boolean;
3257
+ };
3258
+
3259
+ /** @internal */
3260
+ export const DeploymentStreamOrEq$outboundSchema: z.ZodType<
3261
+ DeploymentStreamOrEq$Outbound,
3262
+ z.ZodTypeDef,
3263
+ DeploymentStreamOrEq
3264
+ > = z.object({
3265
+ eq: z.union([z.string(), z.number(), z.boolean()]),
3266
+ });
3267
+
3268
+ export function deploymentStreamOrEqToJSON(
3269
+ deploymentStreamOrEq: DeploymentStreamOrEq,
3270
+ ): string {
3271
+ return JSON.stringify(
3272
+ DeploymentStreamOrEq$outboundSchema.parse(deploymentStreamOrEq),
3273
+ );
3274
+ }
3275
+
3276
+ /** @internal */
3277
+ export type DeploymentStreamKnowledgeFilterDeploymentsOr$Outbound =
3278
+ | DeploymentStreamOrEq$Outbound
3279
+ | DeploymentStreamOrNe$Outbound
3280
+ | DeploymentStreamOrGt$Outbound
3281
+ | DeploymentStreamOrGte$Outbound
3282
+ | DeploymentStreamOrLt$Outbound
3283
+ | DeploymentStreamOrLte$Outbound
3284
+ | DeploymentStreamOrIn$Outbound
3285
+ | DeploymentStreamOrNin$Outbound
3286
+ | DeploymentStreamOrExists$Outbound;
3287
+
3288
+ /** @internal */
3289
+ export const DeploymentStreamKnowledgeFilterDeploymentsOr$outboundSchema:
3290
+ z.ZodType<
3291
+ DeploymentStreamKnowledgeFilterDeploymentsOr$Outbound,
3292
+ z.ZodTypeDef,
3293
+ DeploymentStreamKnowledgeFilterDeploymentsOr
3294
+ > = z.union([
3295
+ z.lazy(() => DeploymentStreamOrEq$outboundSchema),
3296
+ z.lazy(() => DeploymentStreamOrNe$outboundSchema),
3297
+ z.lazy(() => DeploymentStreamOrGt$outboundSchema),
3298
+ z.lazy(() => DeploymentStreamOrGte$outboundSchema),
3299
+ z.lazy(() => DeploymentStreamOrLt$outboundSchema),
3300
+ z.lazy(() => DeploymentStreamOrLte$outboundSchema),
3301
+ z.lazy(() => DeploymentStreamOrIn$outboundSchema),
3302
+ z.lazy(() => DeploymentStreamOrNin$outboundSchema),
3303
+ z.lazy(() => DeploymentStreamOrExists$outboundSchema),
3304
+ ]);
3305
+
3306
+ export function deploymentStreamKnowledgeFilterDeploymentsOrToJSON(
3307
+ deploymentStreamKnowledgeFilterDeploymentsOr:
3308
+ DeploymentStreamKnowledgeFilterDeploymentsOr,
3309
+ ): string {
3310
+ return JSON.stringify(
3311
+ DeploymentStreamKnowledgeFilterDeploymentsOr$outboundSchema.parse(
3312
+ deploymentStreamKnowledgeFilterDeploymentsOr,
3313
+ ),
3314
+ );
3315
+ }
3316
+
3317
+ /** @internal */
3318
+ export type DeploymentStreamKnowledgeFilterOr$Outbound = {
3319
+ or: Array<
3320
+ {
3321
+ [k: string]:
3322
+ | DeploymentStreamOrEq$Outbound
3323
+ | DeploymentStreamOrNe$Outbound
3324
+ | DeploymentStreamOrGt$Outbound
3325
+ | DeploymentStreamOrGte$Outbound
3326
+ | DeploymentStreamOrLt$Outbound
3327
+ | DeploymentStreamOrLte$Outbound
3328
+ | DeploymentStreamOrIn$Outbound
3329
+ | DeploymentStreamOrNin$Outbound
3330
+ | DeploymentStreamOrExists$Outbound;
3331
+ }
3332
+ >;
3333
+ };
3334
+
3335
+ /** @internal */
3336
+ export const DeploymentStreamKnowledgeFilterOr$outboundSchema: z.ZodType<
3337
+ DeploymentStreamKnowledgeFilterOr$Outbound,
3338
+ z.ZodTypeDef,
3339
+ DeploymentStreamKnowledgeFilterOr
3340
+ > = z.object({
3341
+ or: z.array(
3342
+ z.record(z.union([
3343
+ z.lazy(() => DeploymentStreamOrEq$outboundSchema),
3344
+ z.lazy(() =>
3345
+ DeploymentStreamOrNe$outboundSchema
3346
+ ),
3347
+ z.lazy(() => DeploymentStreamOrGt$outboundSchema),
3348
+ z.lazy(() => DeploymentStreamOrGte$outboundSchema),
3349
+ z.lazy(() => DeploymentStreamOrLt$outboundSchema),
3350
+ z.lazy(() => DeploymentStreamOrLte$outboundSchema),
3351
+ z.lazy(() => DeploymentStreamOrIn$outboundSchema),
3352
+ z.lazy(() => DeploymentStreamOrNin$outboundSchema),
3353
+ z.lazy(() => DeploymentStreamOrExists$outboundSchema),
3354
+ ])),
3355
+ ),
3356
+ });
3357
+
3358
+ export function deploymentStreamKnowledgeFilterOrToJSON(
3359
+ deploymentStreamKnowledgeFilterOr: DeploymentStreamKnowledgeFilterOr,
3360
+ ): string {
3361
+ return JSON.stringify(
3362
+ DeploymentStreamKnowledgeFilterOr$outboundSchema.parse(
3363
+ deploymentStreamKnowledgeFilterOr,
3364
+ ),
3365
+ );
3366
+ }
3367
+
3368
+ /** @internal */
3369
+ export type DeploymentStreamAndExists$Outbound = {
3370
+ exists: boolean;
3371
+ };
3372
+
3373
+ /** @internal */
3374
+ export const DeploymentStreamAndExists$outboundSchema: z.ZodType<
3375
+ DeploymentStreamAndExists$Outbound,
3376
+ z.ZodTypeDef,
3377
+ DeploymentStreamAndExists
3378
+ > = z.object({
3379
+ exists: z.boolean(),
3380
+ });
3381
+
3382
+ export function deploymentStreamAndExistsToJSON(
3383
+ deploymentStreamAndExists: DeploymentStreamAndExists,
3384
+ ): string {
3385
+ return JSON.stringify(
3386
+ DeploymentStreamAndExists$outboundSchema.parse(deploymentStreamAndExists),
3387
+ );
3388
+ }
3389
+
3390
+ /** @internal */
3391
+ export type DeploymentStreamAndDeploymentsNin$Outbound =
3392
+ | string
3393
+ | number
3394
+ | boolean;
3395
+
3396
+ /** @internal */
3397
+ export const DeploymentStreamAndDeploymentsNin$outboundSchema: z.ZodType<
3398
+ DeploymentStreamAndDeploymentsNin$Outbound,
3399
+ z.ZodTypeDef,
3400
+ DeploymentStreamAndDeploymentsNin
3401
+ > = z.union([z.string(), z.number(), z.boolean()]);
3402
+
3403
+ export function deploymentStreamAndDeploymentsNinToJSON(
3404
+ deploymentStreamAndDeploymentsNin: DeploymentStreamAndDeploymentsNin,
3405
+ ): string {
3406
+ return JSON.stringify(
3407
+ DeploymentStreamAndDeploymentsNin$outboundSchema.parse(
3408
+ deploymentStreamAndDeploymentsNin,
3409
+ ),
3410
+ );
3411
+ }
3412
+
3413
+ /** @internal */
3414
+ export type DeploymentStreamAndNin$Outbound = {
3415
+ nin: Array<string | number | boolean>;
3416
+ };
3417
+
3418
+ /** @internal */
3419
+ export const DeploymentStreamAndNin$outboundSchema: z.ZodType<
3420
+ DeploymentStreamAndNin$Outbound,
3421
+ z.ZodTypeDef,
3422
+ DeploymentStreamAndNin
3423
+ > = z.object({
3424
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3425
+ });
3426
+
3427
+ export function deploymentStreamAndNinToJSON(
3428
+ deploymentStreamAndNin: DeploymentStreamAndNin,
3429
+ ): string {
3430
+ return JSON.stringify(
3431
+ DeploymentStreamAndNin$outboundSchema.parse(deploymentStreamAndNin),
3432
+ );
3433
+ }
3434
+
3435
+ /** @internal */
3436
+ export type DeploymentStreamAndDeploymentsIn$Outbound =
3437
+ | string
3438
+ | number
3439
+ | boolean;
3440
+
3441
+ /** @internal */
3442
+ export const DeploymentStreamAndDeploymentsIn$outboundSchema: z.ZodType<
3443
+ DeploymentStreamAndDeploymentsIn$Outbound,
3444
+ z.ZodTypeDef,
3445
+ DeploymentStreamAndDeploymentsIn
3446
+ > = z.union([z.string(), z.number(), z.boolean()]);
3447
+
3448
+ export function deploymentStreamAndDeploymentsInToJSON(
3449
+ deploymentStreamAndDeploymentsIn: DeploymentStreamAndDeploymentsIn,
3450
+ ): string {
3451
+ return JSON.stringify(
3452
+ DeploymentStreamAndDeploymentsIn$outboundSchema.parse(
3453
+ deploymentStreamAndDeploymentsIn,
3454
+ ),
3455
+ );
3456
+ }
3457
+
3458
+ /** @internal */
3459
+ export type DeploymentStreamAndIn$Outbound = {
3460
+ in: Array<string | number | boolean>;
3461
+ };
3462
+
3463
+ /** @internal */
3464
+ export const DeploymentStreamAndIn$outboundSchema: z.ZodType<
3465
+ DeploymentStreamAndIn$Outbound,
3466
+ z.ZodTypeDef,
3467
+ DeploymentStreamAndIn
3468
+ > = z.object({
3469
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3470
+ });
3471
+
3472
+ export function deploymentStreamAndInToJSON(
3473
+ deploymentStreamAndIn: DeploymentStreamAndIn,
3474
+ ): string {
3475
+ return JSON.stringify(
3476
+ DeploymentStreamAndIn$outboundSchema.parse(deploymentStreamAndIn),
3477
+ );
3478
+ }
3479
+
3480
+ /** @internal */
3481
+ export type DeploymentStreamAndLte$Outbound = {
3482
+ lte: number;
3483
+ };
3484
+
3485
+ /** @internal */
3486
+ export const DeploymentStreamAndLte$outboundSchema: z.ZodType<
3487
+ DeploymentStreamAndLte$Outbound,
3488
+ z.ZodTypeDef,
3489
+ DeploymentStreamAndLte
3490
+ > = z.object({
3491
+ lte: z.number(),
3492
+ });
3493
+
3494
+ export function deploymentStreamAndLteToJSON(
3495
+ deploymentStreamAndLte: DeploymentStreamAndLte,
3496
+ ): string {
3497
+ return JSON.stringify(
3498
+ DeploymentStreamAndLte$outboundSchema.parse(deploymentStreamAndLte),
3499
+ );
3500
+ }
3501
+
3502
+ /** @internal */
3503
+ export type DeploymentStreamAndLt$Outbound = {
3504
+ lt: number;
3505
+ };
3506
+
3507
+ /** @internal */
3508
+ export const DeploymentStreamAndLt$outboundSchema: z.ZodType<
3509
+ DeploymentStreamAndLt$Outbound,
3510
+ z.ZodTypeDef,
3511
+ DeploymentStreamAndLt
3512
+ > = z.object({
3513
+ lt: z.number(),
3514
+ });
3515
+
3516
+ export function deploymentStreamAndLtToJSON(
3517
+ deploymentStreamAndLt: DeploymentStreamAndLt,
3518
+ ): string {
3519
+ return JSON.stringify(
3520
+ DeploymentStreamAndLt$outboundSchema.parse(deploymentStreamAndLt),
3521
+ );
3522
+ }
3523
+
3524
+ /** @internal */
3525
+ export type DeploymentStreamAndGte$Outbound = {
3526
+ gte: number;
3527
+ };
3528
+
3529
+ /** @internal */
3530
+ export const DeploymentStreamAndGte$outboundSchema: z.ZodType<
3531
+ DeploymentStreamAndGte$Outbound,
3532
+ z.ZodTypeDef,
3533
+ DeploymentStreamAndGte
3534
+ > = z.object({
3535
+ gte: z.number(),
3536
+ });
3537
+
3538
+ export function deploymentStreamAndGteToJSON(
3539
+ deploymentStreamAndGte: DeploymentStreamAndGte,
3540
+ ): string {
3541
+ return JSON.stringify(
3542
+ DeploymentStreamAndGte$outboundSchema.parse(deploymentStreamAndGte),
3543
+ );
3544
+ }
3545
+
3546
+ /** @internal */
3547
+ export type DeploymentStreamAndGt$Outbound = {
3548
+ gt: number;
3549
+ };
3550
+
3551
+ /** @internal */
3552
+ export const DeploymentStreamAndGt$outboundSchema: z.ZodType<
3553
+ DeploymentStreamAndGt$Outbound,
3554
+ z.ZodTypeDef,
3555
+ DeploymentStreamAndGt
3556
+ > = z.object({
3557
+ gt: z.number(),
3558
+ });
3559
+
3560
+ export function deploymentStreamAndGtToJSON(
3561
+ deploymentStreamAndGt: DeploymentStreamAndGt,
3562
+ ): string {
3563
+ return JSON.stringify(
3564
+ DeploymentStreamAndGt$outboundSchema.parse(deploymentStreamAndGt),
3565
+ );
3566
+ }
3567
+
3568
+ /** @internal */
3569
+ export type DeploymentStreamAndDeploymentsNe$Outbound =
3570
+ | string
3571
+ | number
3572
+ | boolean;
3573
+
3574
+ /** @internal */
3575
+ export const DeploymentStreamAndDeploymentsNe$outboundSchema: z.ZodType<
3576
+ DeploymentStreamAndDeploymentsNe$Outbound,
3577
+ z.ZodTypeDef,
3578
+ DeploymentStreamAndDeploymentsNe
3579
+ > = z.union([z.string(), z.number(), z.boolean()]);
3580
+
3581
+ export function deploymentStreamAndDeploymentsNeToJSON(
3582
+ deploymentStreamAndDeploymentsNe: DeploymentStreamAndDeploymentsNe,
3583
+ ): string {
3584
+ return JSON.stringify(
3585
+ DeploymentStreamAndDeploymentsNe$outboundSchema.parse(
3586
+ deploymentStreamAndDeploymentsNe,
3587
+ ),
3588
+ );
3589
+ }
3590
+
3591
+ /** @internal */
3592
+ export type DeploymentStreamAndNe$Outbound = {
3593
+ ne: string | number | boolean;
3594
+ };
3595
+
3596
+ /** @internal */
3597
+ export const DeploymentStreamAndNe$outboundSchema: z.ZodType<
3598
+ DeploymentStreamAndNe$Outbound,
3599
+ z.ZodTypeDef,
3600
+ DeploymentStreamAndNe
3601
+ > = z.object({
3602
+ ne: z.union([z.string(), z.number(), z.boolean()]),
3603
+ });
3604
+
3605
+ export function deploymentStreamAndNeToJSON(
3606
+ deploymentStreamAndNe: DeploymentStreamAndNe,
3607
+ ): string {
3608
+ return JSON.stringify(
3609
+ DeploymentStreamAndNe$outboundSchema.parse(deploymentStreamAndNe),
3610
+ );
3611
+ }
3612
+
3613
+ /** @internal */
3614
+ export type DeploymentStreamAndDeploymentsEq$Outbound =
3615
+ | string
3616
+ | number
3617
+ | boolean;
3618
+
3619
+ /** @internal */
3620
+ export const DeploymentStreamAndDeploymentsEq$outboundSchema: z.ZodType<
3621
+ DeploymentStreamAndDeploymentsEq$Outbound,
3622
+ z.ZodTypeDef,
3623
+ DeploymentStreamAndDeploymentsEq
3624
+ > = z.union([z.string(), z.number(), z.boolean()]);
3625
+
3626
+ export function deploymentStreamAndDeploymentsEqToJSON(
3627
+ deploymentStreamAndDeploymentsEq: DeploymentStreamAndDeploymentsEq,
3628
+ ): string {
3629
+ return JSON.stringify(
3630
+ DeploymentStreamAndDeploymentsEq$outboundSchema.parse(
3631
+ deploymentStreamAndDeploymentsEq,
3632
+ ),
3633
+ );
3634
+ }
3635
+
3636
+ /** @internal */
3637
+ export type DeploymentStreamAndEq$Outbound = {
3638
+ eq: string | number | boolean;
3639
+ };
3640
+
3641
+ /** @internal */
3642
+ export const DeploymentStreamAndEq$outboundSchema: z.ZodType<
3643
+ DeploymentStreamAndEq$Outbound,
3644
+ z.ZodTypeDef,
3645
+ DeploymentStreamAndEq
3646
+ > = z.object({
3647
+ eq: z.union([z.string(), z.number(), z.boolean()]),
3648
+ });
3649
+
3650
+ export function deploymentStreamAndEqToJSON(
3651
+ deploymentStreamAndEq: DeploymentStreamAndEq,
3652
+ ): string {
3653
+ return JSON.stringify(
3654
+ DeploymentStreamAndEq$outboundSchema.parse(deploymentStreamAndEq),
3655
+ );
3656
+ }
3657
+
3658
+ /** @internal */
3659
+ export type DeploymentStreamKnowledgeFilterDeploymentsAnd$Outbound =
3660
+ | DeploymentStreamAndEq$Outbound
3661
+ | DeploymentStreamAndNe$Outbound
3662
+ | DeploymentStreamAndGt$Outbound
3663
+ | DeploymentStreamAndGte$Outbound
3664
+ | DeploymentStreamAndLt$Outbound
3665
+ | DeploymentStreamAndLte$Outbound
3666
+ | DeploymentStreamAndIn$Outbound
3667
+ | DeploymentStreamAndNin$Outbound
3668
+ | DeploymentStreamAndExists$Outbound;
3669
+
3670
+ /** @internal */
3671
+ export const DeploymentStreamKnowledgeFilterDeploymentsAnd$outboundSchema:
3672
+ z.ZodType<
3673
+ DeploymentStreamKnowledgeFilterDeploymentsAnd$Outbound,
3674
+ z.ZodTypeDef,
3675
+ DeploymentStreamKnowledgeFilterDeploymentsAnd
3676
+ > = z.union([
3677
+ z.lazy(() => DeploymentStreamAndEq$outboundSchema),
3678
+ z.lazy(() => DeploymentStreamAndNe$outboundSchema),
3679
+ z.lazy(() => DeploymentStreamAndGt$outboundSchema),
3680
+ z.lazy(() => DeploymentStreamAndGte$outboundSchema),
3681
+ z.lazy(() => DeploymentStreamAndLt$outboundSchema),
3682
+ z.lazy(() => DeploymentStreamAndLte$outboundSchema),
3683
+ z.lazy(() => DeploymentStreamAndIn$outboundSchema),
3684
+ z.lazy(() => DeploymentStreamAndNin$outboundSchema),
3685
+ z.lazy(() => DeploymentStreamAndExists$outboundSchema),
3686
+ ]);
3687
+
3688
+ export function deploymentStreamKnowledgeFilterDeploymentsAndToJSON(
3689
+ deploymentStreamKnowledgeFilterDeploymentsAnd:
3690
+ DeploymentStreamKnowledgeFilterDeploymentsAnd,
3691
+ ): string {
3692
+ return JSON.stringify(
3693
+ DeploymentStreamKnowledgeFilterDeploymentsAnd$outboundSchema.parse(
3694
+ deploymentStreamKnowledgeFilterDeploymentsAnd,
3695
+ ),
3696
+ );
3697
+ }
3698
+
3699
+ /** @internal */
3700
+ export type DeploymentStreamKnowledgeFilterAnd$Outbound = {
3701
+ and: Array<
3702
+ {
3703
+ [k: string]:
3704
+ | DeploymentStreamAndEq$Outbound
3705
+ | DeploymentStreamAndNe$Outbound
3706
+ | DeploymentStreamAndGt$Outbound
3707
+ | DeploymentStreamAndGte$Outbound
3708
+ | DeploymentStreamAndLt$Outbound
3709
+ | DeploymentStreamAndLte$Outbound
3710
+ | DeploymentStreamAndIn$Outbound
3711
+ | DeploymentStreamAndNin$Outbound
3712
+ | DeploymentStreamAndExists$Outbound;
3713
+ }
3714
+ >;
3715
+ };
3716
+
3717
+ /** @internal */
3718
+ export const DeploymentStreamKnowledgeFilterAnd$outboundSchema: z.ZodType<
3719
+ DeploymentStreamKnowledgeFilterAnd$Outbound,
3720
+ z.ZodTypeDef,
3721
+ DeploymentStreamKnowledgeFilterAnd
3722
+ > = z.object({
3723
+ and: z.array(
3724
+ z.record(z.union([
3725
+ z.lazy(() => DeploymentStreamAndEq$outboundSchema),
3726
+ z.lazy(() =>
3727
+ DeploymentStreamAndNe$outboundSchema
3728
+ ),
3729
+ z.lazy(() => DeploymentStreamAndGt$outboundSchema),
3730
+ z.lazy(() => DeploymentStreamAndGte$outboundSchema),
3731
+ z.lazy(() => DeploymentStreamAndLt$outboundSchema),
3732
+ z.lazy(() => DeploymentStreamAndLte$outboundSchema),
3733
+ z.lazy(() => DeploymentStreamAndIn$outboundSchema),
3734
+ z.lazy(() => DeploymentStreamAndNin$outboundSchema),
3735
+ z.lazy(() => DeploymentStreamAndExists$outboundSchema),
3736
+ ])),
3737
+ ),
3738
+ });
3739
+
3740
+ export function deploymentStreamKnowledgeFilterAndToJSON(
3741
+ deploymentStreamKnowledgeFilterAnd: DeploymentStreamKnowledgeFilterAnd,
3742
+ ): string {
3743
+ return JSON.stringify(
3744
+ DeploymentStreamKnowledgeFilterAnd$outboundSchema.parse(
3745
+ deploymentStreamKnowledgeFilterAnd,
3746
+ ),
3747
+ );
3748
+ }
3749
+
3750
+ /** @internal */
3751
+ export type OneExists$Outbound = {
3752
+ exists: boolean;
3753
+ };
3754
+
3755
+ /** @internal */
3756
+ export const OneExists$outboundSchema: z.ZodType<
3757
+ OneExists$Outbound,
3758
+ z.ZodTypeDef,
3759
+ OneExists
3760
+ > = z.object({
3761
+ exists: z.boolean(),
3762
+ });
3763
+
3764
+ export function oneExistsToJSON(oneExists: OneExists): string {
3765
+ return JSON.stringify(OneExists$outboundSchema.parse(oneExists));
3766
+ }
3767
+
3768
+ /** @internal */
3769
+ export type DeploymentStream1DeploymentsNin$Outbound =
3770
+ | string
3771
+ | number
3772
+ | boolean;
3773
+
3774
+ /** @internal */
3775
+ export const DeploymentStream1DeploymentsNin$outboundSchema: z.ZodType<
3776
+ DeploymentStream1DeploymentsNin$Outbound,
3777
+ z.ZodTypeDef,
3778
+ DeploymentStream1DeploymentsNin
3779
+ > = z.union([z.string(), z.number(), z.boolean()]);
3780
+
3781
+ export function deploymentStream1DeploymentsNinToJSON(
3782
+ deploymentStream1DeploymentsNin: DeploymentStream1DeploymentsNin,
3783
+ ): string {
3784
+ return JSON.stringify(
3785
+ DeploymentStream1DeploymentsNin$outboundSchema.parse(
3786
+ deploymentStream1DeploymentsNin,
3787
+ ),
3788
+ );
3789
+ }
3790
+
3791
+ /** @internal */
3792
+ export type DeploymentStream1Nin$Outbound = {
3793
+ nin: Array<string | number | boolean>;
3794
+ };
3795
+
3796
+ /** @internal */
3797
+ export const DeploymentStream1Nin$outboundSchema: z.ZodType<
3798
+ DeploymentStream1Nin$Outbound,
3799
+ z.ZodTypeDef,
3800
+ DeploymentStream1Nin
3801
+ > = z.object({
3802
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3803
+ });
3804
+
3805
+ export function deploymentStream1NinToJSON(
3806
+ deploymentStream1Nin: DeploymentStream1Nin,
3807
+ ): string {
3808
+ return JSON.stringify(
3809
+ DeploymentStream1Nin$outboundSchema.parse(deploymentStream1Nin),
3810
+ );
3811
+ }
3812
+
3813
+ /** @internal */
3814
+ export type DeploymentStream1DeploymentsIn$Outbound = string | number | boolean;
3815
+
3816
+ /** @internal */
3817
+ export const DeploymentStream1DeploymentsIn$outboundSchema: z.ZodType<
3818
+ DeploymentStream1DeploymentsIn$Outbound,
3819
+ z.ZodTypeDef,
3820
+ DeploymentStream1DeploymentsIn
3821
+ > = z.union([z.string(), z.number(), z.boolean()]);
3822
+
3823
+ export function deploymentStream1DeploymentsInToJSON(
3824
+ deploymentStream1DeploymentsIn: DeploymentStream1DeploymentsIn,
3825
+ ): string {
3826
+ return JSON.stringify(
3827
+ DeploymentStream1DeploymentsIn$outboundSchema.parse(
3828
+ deploymentStream1DeploymentsIn,
3829
+ ),
3830
+ );
3831
+ }
3832
+
3833
+ /** @internal */
3834
+ export type DeploymentStream1In$Outbound = {
3835
+ in: Array<string | number | boolean>;
3836
+ };
3837
+
3838
+ /** @internal */
3839
+ export const DeploymentStream1In$outboundSchema: z.ZodType<
3840
+ DeploymentStream1In$Outbound,
3841
+ z.ZodTypeDef,
3842
+ DeploymentStream1In
3843
+ > = z.object({
3844
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3845
+ });
3846
+
3847
+ export function deploymentStream1InToJSON(
3848
+ deploymentStream1In: DeploymentStream1In,
3849
+ ): string {
3850
+ return JSON.stringify(
3851
+ DeploymentStream1In$outboundSchema.parse(deploymentStream1In),
3852
+ );
3853
+ }
3854
+
3855
+ /** @internal */
3856
+ export type OneLte$Outbound = {
3857
+ lte: number;
3858
+ };
3859
+
3860
+ /** @internal */
3861
+ export const OneLte$outboundSchema: z.ZodType<
3862
+ OneLte$Outbound,
3863
+ z.ZodTypeDef,
3864
+ OneLte
3865
+ > = z.object({
3866
+ lte: z.number(),
3867
+ });
3868
+
3869
+ export function oneLteToJSON(oneLte: OneLte): string {
3870
+ return JSON.stringify(OneLte$outboundSchema.parse(oneLte));
3871
+ }
3872
+
3873
+ /** @internal */
3874
+ export type OneLt$Outbound = {
3875
+ lt: number;
3876
+ };
3877
+
3878
+ /** @internal */
3879
+ export const OneLt$outboundSchema: z.ZodType<
3880
+ OneLt$Outbound,
3881
+ z.ZodTypeDef,
3882
+ OneLt
3883
+ > = z.object({
3884
+ lt: z.number(),
3885
+ });
3886
+
3887
+ export function oneLtToJSON(oneLt: OneLt): string {
3888
+ return JSON.stringify(OneLt$outboundSchema.parse(oneLt));
3889
+ }
3890
+
3891
+ /** @internal */
3892
+ export type OneGte$Outbound = {
3893
+ gte: number;
3894
+ };
3895
+
3896
+ /** @internal */
3897
+ export const OneGte$outboundSchema: z.ZodType<
3898
+ OneGte$Outbound,
3899
+ z.ZodTypeDef,
3900
+ OneGte
3901
+ > = z.object({
3902
+ gte: z.number(),
3903
+ });
3904
+
3905
+ export function oneGteToJSON(oneGte: OneGte): string {
3906
+ return JSON.stringify(OneGte$outboundSchema.parse(oneGte));
3907
+ }
3908
+
3909
+ /** @internal */
3910
+ export type OneGt$Outbound = {
3911
+ gt: number;
3912
+ };
3913
+
3914
+ /** @internal */
3915
+ export const OneGt$outboundSchema: z.ZodType<
3916
+ OneGt$Outbound,
3917
+ z.ZodTypeDef,
3918
+ OneGt
3919
+ > = z.object({
3920
+ gt: z.number(),
3921
+ });
3922
+
3923
+ export function oneGtToJSON(oneGt: OneGt): string {
3924
+ return JSON.stringify(OneGt$outboundSchema.parse(oneGt));
3925
+ }
3926
+
3927
+ /** @internal */
3928
+ export type DeploymentStream1DeploymentsNe$Outbound = string | number | boolean;
3929
+
3930
+ /** @internal */
3931
+ export const DeploymentStream1DeploymentsNe$outboundSchema: z.ZodType<
3932
+ DeploymentStream1DeploymentsNe$Outbound,
3933
+ z.ZodTypeDef,
3934
+ DeploymentStream1DeploymentsNe
3935
+ > = z.union([z.string(), z.number(), z.boolean()]);
3936
+
3937
+ export function deploymentStream1DeploymentsNeToJSON(
3938
+ deploymentStream1DeploymentsNe: DeploymentStream1DeploymentsNe,
3939
+ ): string {
3940
+ return JSON.stringify(
3941
+ DeploymentStream1DeploymentsNe$outboundSchema.parse(
3942
+ deploymentStream1DeploymentsNe,
3943
+ ),
3944
+ );
3945
+ }
3946
+
3947
+ /** @internal */
3948
+ export type DeploymentStream1Ne$Outbound = {
3949
+ ne: string | number | boolean;
3950
+ };
3951
+
3952
+ /** @internal */
3953
+ export const DeploymentStream1Ne$outboundSchema: z.ZodType<
3954
+ DeploymentStream1Ne$Outbound,
3955
+ z.ZodTypeDef,
3956
+ DeploymentStream1Ne
3957
+ > = z.object({
3958
+ ne: z.union([z.string(), z.number(), z.boolean()]),
3959
+ });
3960
+
3961
+ export function deploymentStream1NeToJSON(
3962
+ deploymentStream1Ne: DeploymentStream1Ne,
3963
+ ): string {
3964
+ return JSON.stringify(
3965
+ DeploymentStream1Ne$outboundSchema.parse(deploymentStream1Ne),
3966
+ );
3967
+ }
3968
+
3969
+ /** @internal */
3970
+ export type DeploymentStream1DeploymentsEq$Outbound = string | number | boolean;
3971
+
3972
+ /** @internal */
3973
+ export const DeploymentStream1DeploymentsEq$outboundSchema: z.ZodType<
3974
+ DeploymentStream1DeploymentsEq$Outbound,
3975
+ z.ZodTypeDef,
3976
+ DeploymentStream1DeploymentsEq
3977
+ > = z.union([z.string(), z.number(), z.boolean()]);
3978
+
3979
+ export function deploymentStream1DeploymentsEqToJSON(
3980
+ deploymentStream1DeploymentsEq: DeploymentStream1DeploymentsEq,
3981
+ ): string {
3982
+ return JSON.stringify(
3983
+ DeploymentStream1DeploymentsEq$outboundSchema.parse(
3984
+ deploymentStream1DeploymentsEq,
3985
+ ),
3986
+ );
3987
+ }
3988
+
3989
+ /** @internal */
3990
+ export type DeploymentStream1Eq$Outbound = {
3991
+ eq: string | number | boolean;
3992
+ };
3993
+
3994
+ /** @internal */
3995
+ export const DeploymentStream1Eq$outboundSchema: z.ZodType<
3996
+ DeploymentStream1Eq$Outbound,
3997
+ z.ZodTypeDef,
3998
+ DeploymentStream1Eq
3999
+ > = z.object({
4000
+ eq: z.union([z.string(), z.number(), z.boolean()]),
4001
+ });
4002
+
4003
+ export function deploymentStream1EqToJSON(
4004
+ deploymentStream1Eq: DeploymentStream1Eq,
4005
+ ): string {
4006
+ return JSON.stringify(
4007
+ DeploymentStream1Eq$outboundSchema.parse(deploymentStream1Eq),
4008
+ );
4009
+ }
4010
+
4011
+ /** @internal */
4012
+ export type DeploymentStreamKnowledgeFilter1$Outbound =
4013
+ | DeploymentStream1Eq$Outbound
4014
+ | DeploymentStream1Ne$Outbound
4015
+ | OneGt$Outbound
4016
+ | OneGte$Outbound
4017
+ | OneLt$Outbound
4018
+ | OneLte$Outbound
4019
+ | DeploymentStream1In$Outbound
4020
+ | DeploymentStream1Nin$Outbound
4021
+ | OneExists$Outbound;
4022
+
4023
+ /** @internal */
4024
+ export const DeploymentStreamKnowledgeFilter1$outboundSchema: z.ZodType<
4025
+ DeploymentStreamKnowledgeFilter1$Outbound,
4026
+ z.ZodTypeDef,
4027
+ DeploymentStreamKnowledgeFilter1
4028
+ > = z.union([
4029
+ z.lazy(() => DeploymentStream1Eq$outboundSchema),
4030
+ z.lazy(() => DeploymentStream1Ne$outboundSchema),
4031
+ z.lazy(() => OneGt$outboundSchema),
4032
+ z.lazy(() => OneGte$outboundSchema),
4033
+ z.lazy(() => OneLt$outboundSchema),
4034
+ z.lazy(() => OneLte$outboundSchema),
4035
+ z.lazy(() => DeploymentStream1In$outboundSchema),
4036
+ z.lazy(() => DeploymentStream1Nin$outboundSchema),
4037
+ z.lazy(() => OneExists$outboundSchema),
4038
+ ]);
4039
+
4040
+ export function deploymentStreamKnowledgeFilter1ToJSON(
4041
+ deploymentStreamKnowledgeFilter1: DeploymentStreamKnowledgeFilter1,
4042
+ ): string {
4043
+ return JSON.stringify(
4044
+ DeploymentStreamKnowledgeFilter1$outboundSchema.parse(
4045
+ deploymentStreamKnowledgeFilter1,
4046
+ ),
4047
+ );
4048
+ }
4049
+
4050
+ /** @internal */
4051
+ export type DeploymentStreamKnowledgeFilter$Outbound =
4052
+ | DeploymentStreamKnowledgeFilterAnd$Outbound
4053
+ | DeploymentStreamKnowledgeFilterOr$Outbound
4054
+ | {
4055
+ [k: string]:
4056
+ | DeploymentStream1Eq$Outbound
4057
+ | DeploymentStream1Ne$Outbound
4058
+ | OneGt$Outbound
4059
+ | OneGte$Outbound
4060
+ | OneLt$Outbound
4061
+ | OneLte$Outbound
4062
+ | DeploymentStream1In$Outbound
4063
+ | DeploymentStream1Nin$Outbound
4064
+ | OneExists$Outbound;
4065
+ };
4066
+
4067
+ /** @internal */
4068
+ export const DeploymentStreamKnowledgeFilter$outboundSchema: z.ZodType<
4069
+ DeploymentStreamKnowledgeFilter$Outbound,
4070
+ z.ZodTypeDef,
4071
+ DeploymentStreamKnowledgeFilter
4072
+ > = z.union([
4073
+ z.lazy(() => DeploymentStreamKnowledgeFilterAnd$outboundSchema),
4074
+ z.lazy(() => DeploymentStreamKnowledgeFilterOr$outboundSchema),
4075
+ z.record(z.union([
4076
+ z.lazy(() => DeploymentStream1Eq$outboundSchema),
4077
+ z.lazy(() => DeploymentStream1Ne$outboundSchema),
4078
+ z.lazy(() => OneGt$outboundSchema),
4079
+ z.lazy(() => OneGte$outboundSchema),
4080
+ z.lazy(() => OneLt$outboundSchema),
4081
+ z.lazy(() => OneLte$outboundSchema),
4082
+ z.lazy(() => DeploymentStream1In$outboundSchema),
4083
+ z.lazy(() => DeploymentStream1Nin$outboundSchema),
4084
+ z.lazy(() => OneExists$outboundSchema),
4085
+ ])),
4086
+ ]);
4087
+
4088
+ export function deploymentStreamKnowledgeFilterToJSON(
4089
+ deploymentStreamKnowledgeFilter: DeploymentStreamKnowledgeFilter,
4090
+ ): string {
4091
+ return JSON.stringify(
4092
+ DeploymentStreamKnowledgeFilter$outboundSchema.parse(
4093
+ deploymentStreamKnowledgeFilter,
4094
+ ),
4095
+ );
4096
+ }
4097
+
4098
+ /** @internal */
4099
+ export type DeploymentStreamRequestBody$Outbound = {
4100
+ key: string;
4101
+ inputs?: { [k: string]: any } | undefined;
4102
+ context?: { [k: string]: any } | undefined;
4103
+ prefix_messages?:
4104
+ | Array<
4105
+ | PrefixMessagesSystemMessage$Outbound
4106
+ | PrefixMessagesDeveloperMessage$Outbound
4107
+ | PrefixMessagesUserMessage$Outbound
4108
+ | PrefixMessagesAssistantMessage$Outbound
4109
+ | PrefixMessagesToolMessage$Outbound
4110
+ >
4111
+ | undefined;
4112
+ messages?:
4113
+ | Array<
4114
+ | DeploymentStreamMessagesSystemMessage$Outbound
4115
+ | DeploymentStreamMessagesDeveloperMessage$Outbound
4116
+ | DeploymentStreamMessagesUserMessage$Outbound
4117
+ | DeploymentStreamMessagesAssistantMessage$Outbound
4118
+ | DeploymentStreamMessagesToolMessage$Outbound
4119
+ >
4120
+ | undefined;
4121
+ identity?: components.PublicIdentity$Outbound | undefined;
4122
+ file_ids?: Array<string> | undefined;
4123
+ metadata?: { [k: string]: any } | undefined;
4124
+ extra_params?: { [k: string]: any } | undefined;
4125
+ documents?: Array<DeploymentStreamDocuments$Outbound> | undefined;
4126
+ invoke_options?: DeploymentStreamInvokeOptions$Outbound | undefined;
4127
+ thread?: DeploymentStreamThread$Outbound | undefined;
4128
+ knowledge_filter?:
4129
+ | DeploymentStreamKnowledgeFilterAnd$Outbound
4130
+ | DeploymentStreamKnowledgeFilterOr$Outbound
4131
+ | {
4132
+ [k: string]:
4133
+ | DeploymentStream1Eq$Outbound
4134
+ | DeploymentStream1Ne$Outbound
4135
+ | OneGt$Outbound
4136
+ | OneGte$Outbound
4137
+ | OneLt$Outbound
4138
+ | OneLte$Outbound
4139
+ | DeploymentStream1In$Outbound
4140
+ | DeploymentStream1Nin$Outbound
4141
+ | OneExists$Outbound;
4142
+ }
4143
+ | undefined;
4144
+ };
4145
+
4146
+ /** @internal */
4147
+ export const DeploymentStreamRequestBody$outboundSchema: z.ZodType<
4148
+ DeploymentStreamRequestBody$Outbound,
4149
+ z.ZodTypeDef,
4150
+ DeploymentStreamRequestBody
4151
+ > = z.object({
4152
+ key: z.string(),
4153
+ inputs: z.record(z.any()).optional(),
4154
+ context: z.record(z.any()).optional(),
4155
+ prefixMessages: z.array(
4156
+ z.union([
4157
+ z.lazy(() => PrefixMessagesSystemMessage$outboundSchema),
4158
+ z.lazy(() => PrefixMessagesDeveloperMessage$outboundSchema),
4159
+ z.lazy(() => PrefixMessagesUserMessage$outboundSchema),
4160
+ z.lazy(() => PrefixMessagesAssistantMessage$outboundSchema),
4161
+ z.lazy(() => PrefixMessagesToolMessage$outboundSchema),
4162
+ ]),
4163
+ ).optional(),
4164
+ messages: z.array(
4165
+ z.union([
4166
+ z.lazy(() => DeploymentStreamMessagesSystemMessage$outboundSchema),
4167
+ z.lazy(() => DeploymentStreamMessagesDeveloperMessage$outboundSchema),
4168
+ z.lazy(() => DeploymentStreamMessagesUserMessage$outboundSchema),
4169
+ z.lazy(() => DeploymentStreamMessagesAssistantMessage$outboundSchema),
4170
+ z.lazy(() => DeploymentStreamMessagesToolMessage$outboundSchema),
4171
+ ]),
4172
+ ).optional(),
4173
+ identity: components.PublicIdentity$outboundSchema.optional(),
4174
+ fileIds: z.array(z.string()).optional(),
4175
+ metadata: z.record(z.any()).optional(),
4176
+ extraParams: z.record(z.any()).optional(),
4177
+ documents: z.array(z.lazy(() => DeploymentStreamDocuments$outboundSchema))
4178
+ .optional(),
4179
+ invokeOptions: z.lazy(() => DeploymentStreamInvokeOptions$outboundSchema)
4180
+ .optional(),
4181
+ thread: z.lazy(() => DeploymentStreamThread$outboundSchema).optional(),
4182
+ knowledgeFilter: z.union([
4183
+ z.lazy(() => DeploymentStreamKnowledgeFilterAnd$outboundSchema),
4184
+ z.lazy(() => DeploymentStreamKnowledgeFilterOr$outboundSchema),
4185
+ z.record(
4186
+ z.union([
4187
+ z.lazy(() => DeploymentStream1Eq$outboundSchema),
4188
+ z.lazy(() => DeploymentStream1Ne$outboundSchema),
4189
+ z.lazy(() => OneGt$outboundSchema),
4190
+ z.lazy(() => OneGte$outboundSchema),
4191
+ z.lazy(() => OneLt$outboundSchema),
4192
+ z.lazy(() => OneLte$outboundSchema),
4193
+ z.lazy(() => DeploymentStream1In$outboundSchema),
4194
+ z.lazy(() => DeploymentStream1Nin$outboundSchema),
4195
+ z.lazy(() => OneExists$outboundSchema),
4196
+ ]),
4197
+ ),
4198
+ ]).optional(),
4199
+ }).transform((v) => {
4200
+ return remap$(v, {
4201
+ prefixMessages: "prefix_messages",
4202
+ fileIds: "file_ids",
4203
+ extraParams: "extra_params",
4204
+ invokeOptions: "invoke_options",
4205
+ knowledgeFilter: "knowledge_filter",
4206
+ });
4207
+ });
4208
+
4209
+ export function deploymentStreamRequestBodyToJSON(
4210
+ deploymentStreamRequestBody: DeploymentStreamRequestBody,
4211
+ ): string {
4212
+ return JSON.stringify(
4213
+ DeploymentStreamRequestBody$outboundSchema.parse(
4214
+ deploymentStreamRequestBody,
4215
+ ),
4216
+ );
4217
+ }
4218
+
4219
+ /** @internal */
4220
+ export const DeploymentStreamObject$inboundSchema: z.ZodNativeEnum<
4221
+ typeof DeploymentStreamObject
4222
+ > = z.nativeEnum(DeploymentStreamObject);
4223
+
4224
+ /** @internal */
4225
+ export const DeploymentStreamProvider$inboundSchema: z.ZodNativeEnum<
4226
+ typeof DeploymentStreamProvider
4227
+ > = z.nativeEnum(DeploymentStreamProvider);
4228
+
4229
+ /** @internal */
4230
+ export const DeploymentStreamTelemetry$inboundSchema: z.ZodType<
4231
+ DeploymentStreamTelemetry,
4232
+ z.ZodTypeDef,
4233
+ unknown
4234
+ > = z.object({
4235
+ trace_id: z.string(),
4236
+ span_id: z.string(),
4237
+ }).transform((v) => {
4238
+ return remap$(v, {
4239
+ "trace_id": "traceId",
4240
+ "span_id": "spanId",
4241
+ });
4242
+ });
4243
+
4244
+ export function deploymentStreamTelemetryFromJSON(
4245
+ jsonString: string,
4246
+ ): SafeParseResult<DeploymentStreamTelemetry, SDKValidationError> {
4247
+ return safeParse(
4248
+ jsonString,
4249
+ (x) => DeploymentStreamTelemetry$inboundSchema.parse(JSON.parse(x)),
4250
+ `Failed to parse 'DeploymentStreamTelemetry' from JSON`,
4251
+ );
4252
+ }
4253
+
4254
+ /** @internal */
4255
+ export const DeploymentStreamDeploymentsMetadata$inboundSchema: z.ZodType<
4256
+ DeploymentStreamDeploymentsMetadata,
4257
+ z.ZodTypeDef,
4258
+ unknown
4259
+ > = z.object({
4260
+ file_name: z.string(),
4261
+ page_number: z.nullable(z.number()),
4262
+ file_type: z.string(),
4263
+ rerank_score: z.number().optional(),
4264
+ search_score: z.number(),
4265
+ }).transform((v) => {
4266
+ return remap$(v, {
4267
+ "file_name": "fileName",
4268
+ "page_number": "pageNumber",
4269
+ "file_type": "fileType",
4270
+ "rerank_score": "rerankScore",
4271
+ "search_score": "searchScore",
4272
+ });
4273
+ });
4274
+
4275
+ export function deploymentStreamDeploymentsMetadataFromJSON(
4276
+ jsonString: string,
4277
+ ): SafeParseResult<DeploymentStreamDeploymentsMetadata, SDKValidationError> {
4278
+ return safeParse(
4279
+ jsonString,
4280
+ (x) =>
4281
+ DeploymentStreamDeploymentsMetadata$inboundSchema.parse(JSON.parse(x)),
4282
+ `Failed to parse 'DeploymentStreamDeploymentsMetadata' from JSON`,
4283
+ );
4284
+ }
4285
+
4286
+ /** @internal */
4287
+ export const DeploymentStreamRetrievals$inboundSchema: z.ZodType<
4288
+ DeploymentStreamRetrievals,
4289
+ z.ZodTypeDef,
4290
+ unknown
4291
+ > = z.object({
4292
+ document: z.string(),
4293
+ metadata: z.lazy(() => DeploymentStreamDeploymentsMetadata$inboundSchema),
4294
+ });
4295
+
4296
+ export function deploymentStreamRetrievalsFromJSON(
4297
+ jsonString: string,
4298
+ ): SafeParseResult<DeploymentStreamRetrievals, SDKValidationError> {
4299
+ return safeParse(
4300
+ jsonString,
4301
+ (x) => DeploymentStreamRetrievals$inboundSchema.parse(JSON.parse(x)),
4302
+ `Failed to parse 'DeploymentStreamRetrievals' from JSON`,
4303
+ );
4304
+ }
4305
+
4306
+ /** @internal */
4307
+ export const DeploymentStreamPromptTokensDetails$inboundSchema: z.ZodType<
4308
+ DeploymentStreamPromptTokensDetails,
4309
+ z.ZodTypeDef,
4310
+ unknown
4311
+ > = z.object({
4312
+ cached_tokens: z.nullable(z.number()).optional(),
4313
+ }).transform((v) => {
4314
+ return remap$(v, {
4315
+ "cached_tokens": "cachedTokens",
4316
+ });
4317
+ });
4318
+
4319
+ export function deploymentStreamPromptTokensDetailsFromJSON(
4320
+ jsonString: string,
4321
+ ): SafeParseResult<DeploymentStreamPromptTokensDetails, SDKValidationError> {
4322
+ return safeParse(
4323
+ jsonString,
4324
+ (x) =>
4325
+ DeploymentStreamPromptTokensDetails$inboundSchema.parse(JSON.parse(x)),
4326
+ `Failed to parse 'DeploymentStreamPromptTokensDetails' from JSON`,
4327
+ );
4328
+ }
4329
+
4330
+ /** @internal */
4331
+ export const DeploymentStreamCompletionTokensDetails$inboundSchema: z.ZodType<
4332
+ DeploymentStreamCompletionTokensDetails,
4333
+ z.ZodTypeDef,
4334
+ unknown
4335
+ > = z.object({
4336
+ reasoning_tokens: z.nullable(z.number()).optional(),
4337
+ }).transform((v) => {
4338
+ return remap$(v, {
4339
+ "reasoning_tokens": "reasoningTokens",
4340
+ });
4341
+ });
4342
+
4343
+ export function deploymentStreamCompletionTokensDetailsFromJSON(
4344
+ jsonString: string,
4345
+ ): SafeParseResult<
4346
+ DeploymentStreamCompletionTokensDetails,
4347
+ SDKValidationError
4348
+ > {
4349
+ return safeParse(
4350
+ jsonString,
4351
+ (x) =>
4352
+ DeploymentStreamCompletionTokensDetails$inboundSchema.parse(
4353
+ JSON.parse(x),
4354
+ ),
4355
+ `Failed to parse 'DeploymentStreamCompletionTokensDetails' from JSON`,
4356
+ );
4357
+ }
4358
+
4359
+ /** @internal */
4360
+ export const DeploymentStreamUsage$inboundSchema: z.ZodType<
4361
+ DeploymentStreamUsage,
4362
+ z.ZodTypeDef,
4363
+ unknown
4364
+ > = z.object({
4365
+ total_tokens: z.number().optional(),
4366
+ prompt_tokens: z.number().optional(),
4367
+ completion_tokens: z.number().optional(),
4368
+ prompt_tokens_details: z.lazy(() =>
4369
+ DeploymentStreamPromptTokensDetails$inboundSchema
4370
+ ).optional(),
4371
+ completion_tokens_details: z.nullable(
4372
+ z.lazy(() => DeploymentStreamCompletionTokensDetails$inboundSchema),
4373
+ ).optional(),
4374
+ }).transform((v) => {
4375
+ return remap$(v, {
4376
+ "total_tokens": "totalTokens",
4377
+ "prompt_tokens": "promptTokens",
4378
+ "completion_tokens": "completionTokens",
4379
+ "prompt_tokens_details": "promptTokensDetails",
4380
+ "completion_tokens_details": "completionTokensDetails",
4381
+ });
4382
+ });
4383
+
4384
+ export function deploymentStreamUsageFromJSON(
4385
+ jsonString: string,
4386
+ ): SafeParseResult<DeploymentStreamUsage, SDKValidationError> {
4387
+ return safeParse(
4388
+ jsonString,
4389
+ (x) => DeploymentStreamUsage$inboundSchema.parse(JSON.parse(x)),
4390
+ `Failed to parse 'DeploymentStreamUsage' from JSON`,
4391
+ );
4392
+ }
4393
+
4394
+ /** @internal */
4395
+ export const DeploymentStreamMessageDeploymentsResponseRole$inboundSchema:
4396
+ z.ZodNativeEnum<typeof DeploymentStreamMessageDeploymentsResponseRole> = z
4397
+ .nativeEnum(DeploymentStreamMessageDeploymentsResponseRole);
4398
+
4399
+ /** @internal */
4400
+ export const DeploymentStreamMessage3$inboundSchema: z.ZodType<
4401
+ DeploymentStreamMessage3,
4402
+ z.ZodTypeDef,
4403
+ unknown
4404
+ > = z.object({
4405
+ type: z.literal("image"),
4406
+ role: DeploymentStreamMessageDeploymentsResponseRole$inboundSchema,
4407
+ url: z.string(),
4408
+ });
4409
+
4410
+ export function deploymentStreamMessage3FromJSON(
4411
+ jsonString: string,
4412
+ ): SafeParseResult<DeploymentStreamMessage3, SDKValidationError> {
4413
+ return safeParse(
4414
+ jsonString,
4415
+ (x) => DeploymentStreamMessage3$inboundSchema.parse(JSON.parse(x)),
4416
+ `Failed to parse 'DeploymentStreamMessage3' from JSON`,
4417
+ );
4418
+ }
4419
+
4420
+ /** @internal */
4421
+ export const DeploymentStreamMessageDeploymentsRole$inboundSchema:
4422
+ z.ZodNativeEnum<typeof DeploymentStreamMessageDeploymentsRole> = z.nativeEnum(
4423
+ DeploymentStreamMessageDeploymentsRole,
4424
+ );
4425
+
4426
+ /** @internal */
4427
+ export const DeploymentStreamMessage2$inboundSchema: z.ZodType<
4428
+ DeploymentStreamMessage2,
4429
+ z.ZodTypeDef,
4430
+ unknown
4431
+ > = z.object({
4432
+ type: z.literal("content"),
4433
+ role: DeploymentStreamMessageDeploymentsRole$inboundSchema,
4434
+ content: z.nullable(z.string()),
4435
+ reasoning: z.string().optional(),
4436
+ reasoning_signature: z.string().optional(),
4437
+ redacted_reasoning: z.string().optional(),
4438
+ }).transform((v) => {
4439
+ return remap$(v, {
4440
+ "reasoning_signature": "reasoningSignature",
4441
+ "redacted_reasoning": "redactedReasoning",
4442
+ });
4443
+ });
4444
+
4445
+ export function deploymentStreamMessage2FromJSON(
4446
+ jsonString: string,
4447
+ ): SafeParseResult<DeploymentStreamMessage2, SDKValidationError> {
4448
+ return safeParse(
4449
+ jsonString,
4450
+ (x) => DeploymentStreamMessage2$inboundSchema.parse(JSON.parse(x)),
4451
+ `Failed to parse 'DeploymentStreamMessage2' from JSON`,
4452
+ );
4453
+ }
4454
+
4455
+ /** @internal */
4456
+ export const DeploymentStreamMessageRole$inboundSchema: z.ZodNativeEnum<
4457
+ typeof DeploymentStreamMessageRole
4458
+ > = z.nativeEnum(DeploymentStreamMessageRole);
4459
+
4460
+ /** @internal */
4461
+ export const DeploymentStreamMessageDeploymentsResponse200Type$inboundSchema:
4462
+ z.ZodNativeEnum<typeof DeploymentStreamMessageDeploymentsResponse200Type> = z
4463
+ .nativeEnum(DeploymentStreamMessageDeploymentsResponse200Type);
4464
+
4465
+ /** @internal */
4466
+ export const DeploymentStreamMessageFunction$inboundSchema: z.ZodType<
4467
+ DeploymentStreamMessageFunction,
4468
+ z.ZodTypeDef,
4469
+ unknown
4470
+ > = z.object({
4471
+ name: z.string(),
4472
+ arguments: z.string(),
4473
+ });
4474
+
4475
+ export function deploymentStreamMessageFunctionFromJSON(
4476
+ jsonString: string,
4477
+ ): SafeParseResult<DeploymentStreamMessageFunction, SDKValidationError> {
4478
+ return safeParse(
4479
+ jsonString,
4480
+ (x) => DeploymentStreamMessageFunction$inboundSchema.parse(JSON.parse(x)),
4481
+ `Failed to parse 'DeploymentStreamMessageFunction' from JSON`,
4482
+ );
4483
+ }
4484
+
4485
+ /** @internal */
4486
+ export const DeploymentStreamMessageToolCalls$inboundSchema: z.ZodType<
4487
+ DeploymentStreamMessageToolCalls,
4488
+ z.ZodTypeDef,
4489
+ unknown
4490
+ > = z.object({
4491
+ id: z.string().optional(),
4492
+ index: z.number().optional(),
4493
+ type: DeploymentStreamMessageDeploymentsResponse200Type$inboundSchema,
4494
+ function: z.lazy(() => DeploymentStreamMessageFunction$inboundSchema),
4495
+ });
4496
+
4497
+ export function deploymentStreamMessageToolCallsFromJSON(
4498
+ jsonString: string,
4499
+ ): SafeParseResult<DeploymentStreamMessageToolCalls, SDKValidationError> {
4500
+ return safeParse(
4501
+ jsonString,
4502
+ (x) => DeploymentStreamMessageToolCalls$inboundSchema.parse(JSON.parse(x)),
4503
+ `Failed to parse 'DeploymentStreamMessageToolCalls' from JSON`,
4504
+ );
4505
+ }
4506
+
4507
+ /** @internal */
4508
+ export const DeploymentStreamMessage1$inboundSchema: z.ZodType<
4509
+ DeploymentStreamMessage1,
4510
+ z.ZodTypeDef,
4511
+ unknown
4512
+ > = z.object({
4513
+ type: z.literal("tool_calls"),
4514
+ role: DeploymentStreamMessageRole$inboundSchema,
4515
+ content: z.nullable(z.string()).optional(),
4516
+ tool_calls: z.array(
4517
+ z.lazy(() => DeploymentStreamMessageToolCalls$inboundSchema),
4518
+ ),
4519
+ reasoning: z.string().optional(),
4520
+ reasoning_signature: z.string().optional(),
4521
+ redacted_reasoning: z.string().optional(),
4522
+ }).transform((v) => {
4523
+ return remap$(v, {
4524
+ "tool_calls": "toolCalls",
4525
+ "reasoning_signature": "reasoningSignature",
4526
+ "redacted_reasoning": "redactedReasoning",
4527
+ });
4528
+ });
4529
+
4530
+ export function deploymentStreamMessage1FromJSON(
4531
+ jsonString: string,
4532
+ ): SafeParseResult<DeploymentStreamMessage1, SDKValidationError> {
4533
+ return safeParse(
4534
+ jsonString,
4535
+ (x) => DeploymentStreamMessage1$inboundSchema.parse(JSON.parse(x)),
4536
+ `Failed to parse 'DeploymentStreamMessage1' from JSON`,
4537
+ );
4538
+ }
4539
+
4540
+ /** @internal */
4541
+ export const DeploymentStreamMessage$inboundSchema: z.ZodType<
4542
+ DeploymentStreamMessage,
4543
+ z.ZodTypeDef,
4544
+ unknown
4545
+ > = z.union([
4546
+ z.lazy(() => DeploymentStreamMessage1$inboundSchema),
4547
+ z.lazy(() => DeploymentStreamMessage2$inboundSchema),
4548
+ z.lazy(() => DeploymentStreamMessage3$inboundSchema),
4549
+ ]);
4550
+
4551
+ export function deploymentStreamMessageFromJSON(
4552
+ jsonString: string,
4553
+ ): SafeParseResult<DeploymentStreamMessage, SDKValidationError> {
4554
+ return safeParse(
4555
+ jsonString,
4556
+ (x) => DeploymentStreamMessage$inboundSchema.parse(JSON.parse(x)),
4557
+ `Failed to parse 'DeploymentStreamMessage' from JSON`,
4558
+ );
4559
+ }
4560
+
4561
+ /** @internal */
4562
+ export const DeploymentStreamChoices$inboundSchema: z.ZodType<
4563
+ DeploymentStreamChoices,
4564
+ z.ZodTypeDef,
4565
+ unknown
4566
+ > = z.object({
4567
+ index: z.number(),
4568
+ message: z.union([
4569
+ z.lazy(() => DeploymentStreamMessage1$inboundSchema),
4570
+ z.lazy(() => DeploymentStreamMessage2$inboundSchema),
4571
+ z.lazy(() => DeploymentStreamMessage3$inboundSchema),
4572
+ ]),
4573
+ finish_reason: z.nullable(z.string()).optional(),
4574
+ }).transform((v) => {
4575
+ return remap$(v, {
4576
+ "finish_reason": "finishReason",
4577
+ });
4578
+ });
4579
+
4580
+ export function deploymentStreamChoicesFromJSON(
4581
+ jsonString: string,
4582
+ ): SafeParseResult<DeploymentStreamChoices, SDKValidationError> {
4583
+ return safeParse(
4584
+ jsonString,
4585
+ (x) => DeploymentStreamChoices$inboundSchema.parse(JSON.parse(x)),
4586
+ `Failed to parse 'DeploymentStreamChoices' from JSON`,
4587
+ );
4588
+ }
4589
+
4590
+ /** @internal */
4591
+ export const DeploymentStreamData$inboundSchema: z.ZodType<
4592
+ DeploymentStreamData,
4593
+ z.ZodTypeDef,
4594
+ unknown
4595
+ > = z.object({
4596
+ id: z.string(),
4597
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
4598
+ object: DeploymentStreamObject$inboundSchema,
4599
+ model: z.string(),
4600
+ provider: DeploymentStreamProvider$inboundSchema,
4601
+ is_final: z.boolean(),
4602
+ integration_id: z.string().optional(),
4603
+ telemetry: z.lazy(() => DeploymentStreamTelemetry$inboundSchema),
4604
+ finalized: z.string().datetime({ offset: true }).transform(v => new Date(v))
4605
+ .optional(),
4606
+ system_fingerprint: z.nullable(z.string()).optional(),
4607
+ retrievals: z.array(z.lazy(() => DeploymentStreamRetrievals$inboundSchema))
4608
+ .optional(),
4609
+ provider_response: z.any().optional(),
4610
+ usage: z.nullable(z.lazy(() => DeploymentStreamUsage$inboundSchema))
4611
+ .optional(),
4612
+ choices: z.array(z.lazy(() => DeploymentStreamChoices$inboundSchema)),
4613
+ }).transform((v) => {
4614
+ return remap$(v, {
4615
+ "is_final": "isFinal",
4616
+ "integration_id": "integrationId",
4617
+ "system_fingerprint": "systemFingerprint",
4618
+ "provider_response": "providerResponse",
4619
+ });
4620
+ });
4621
+
4622
+ export function deploymentStreamDataFromJSON(
4623
+ jsonString: string,
4624
+ ): SafeParseResult<DeploymentStreamData, SDKValidationError> {
4625
+ return safeParse(
4626
+ jsonString,
4627
+ (x) => DeploymentStreamData$inboundSchema.parse(JSON.parse(x)),
4628
+ `Failed to parse 'DeploymentStreamData' from JSON`,
4629
+ );
4630
+ }
4631
+
4632
+ /** @internal */
4633
+ export const DeploymentStreamResponseBody$inboundSchema: z.ZodType<
4634
+ DeploymentStreamResponseBody,
4635
+ z.ZodTypeDef,
4636
+ unknown
4637
+ > = z.object({
4638
+ data: z.string().optional().transform((v, ctx) => {
4639
+ if (v === undefined) return undefined;
4640
+ try {
4641
+ return JSON.parse(v);
4642
+ } catch (err) {
4643
+ ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
4644
+ return z.NEVER;
4645
+ }
4646
+ }).pipe(z.lazy(() => DeploymentStreamData$inboundSchema).optional()),
4647
+ });
4648
+
4649
+ export function deploymentStreamResponseBodyFromJSON(
4650
+ jsonString: string,
4651
+ ): SafeParseResult<DeploymentStreamResponseBody, SDKValidationError> {
4652
+ return safeParse(
4653
+ jsonString,
4654
+ (x) => DeploymentStreamResponseBody$inboundSchema.parse(JSON.parse(x)),
4655
+ `Failed to parse 'DeploymentStreamResponseBody' from JSON`,
4656
+ );
4657
+ }