@orq-ai/node 4.5.0-rc.9 → 4.5.2

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