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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (461) hide show
  1. package/README.md +42 -18
  2. package/bin/mcp-server.js +4959 -5404
  3. package/bin/mcp-server.js.map +126 -82
  4. package/examples/package-lock.json +1 -1
  5. package/funcs/agentsResponsesCreate.d.ts +7 -1
  6. package/funcs/agentsResponsesCreate.d.ts.map +1 -1
  7. package/funcs/agentsResponsesCreate.js +9 -2
  8. package/funcs/agentsResponsesCreate.js.map +1 -1
  9. package/funcs/budgetsCreate.d.ts +1 -1
  10. package/funcs/budgetsCreate.js +1 -1
  11. package/funcs/contactsList.js +1 -0
  12. package/funcs/contactsList.js.map +1 -1
  13. package/funcs/conversationsCreate.d.ts +17 -0
  14. package/funcs/conversationsCreate.d.ts.map +1 -0
  15. package/funcs/conversationsCreate.js +114 -0
  16. package/funcs/conversationsCreate.js.map +1 -0
  17. package/funcs/conversationsDelete.d.ts +17 -0
  18. package/funcs/conversationsDelete.d.ts.map +1 -0
  19. package/funcs/conversationsDelete.js +127 -0
  20. package/funcs/conversationsDelete.js.map +1 -0
  21. package/funcs/conversationsGenerateName.d.ts +18 -0
  22. package/funcs/conversationsGenerateName.d.ts.map +1 -0
  23. package/funcs/conversationsGenerateName.js +128 -0
  24. package/funcs/conversationsGenerateName.js.map +1 -0
  25. package/funcs/conversationsList.d.ts +17 -0
  26. package/funcs/conversationsList.d.ts.map +1 -0
  27. package/funcs/conversationsList.js +124 -0
  28. package/funcs/conversationsList.js.map +1 -0
  29. package/funcs/conversationsRetrieve.d.ts +18 -0
  30. package/funcs/conversationsRetrieve.d.ts.map +1 -0
  31. package/funcs/conversationsRetrieve.js +126 -0
  32. package/funcs/conversationsRetrieve.js.map +1 -0
  33. package/funcs/conversationsUpdate.d.ts +18 -0
  34. package/funcs/conversationsUpdate.d.ts.map +1 -0
  35. package/funcs/conversationsUpdate.js +128 -0
  36. package/funcs/conversationsUpdate.js.map +1 -0
  37. package/funcs/evalsInvoke.d.ts +15 -0
  38. package/funcs/evalsInvoke.d.ts.map +1 -0
  39. package/funcs/evalsInvoke.js +121 -0
  40. package/funcs/evalsInvoke.js.map +1 -0
  41. package/funcs/memoryStoresListDocuments.js +2 -0
  42. package/funcs/memoryStoresListDocuments.js.map +1 -1
  43. package/funcs/memoryStoresListMemories.js +1 -0
  44. package/funcs/memoryStoresListMemories.js.map +1 -1
  45. package/jsr.json +1 -1
  46. package/lib/config.d.ts +3 -3
  47. package/lib/config.js +3 -3
  48. package/mcp-server/mcp-server.js +1 -1
  49. package/mcp-server/server.d.ts.map +1 -1
  50. package/mcp-server/server.js +15 -1
  51. package/mcp-server/server.js.map +1 -1
  52. package/mcp-server/tools/budgetsCreate.js +1 -1
  53. package/mcp-server/tools/budgetsCreate.js.map +1 -1
  54. package/mcp-server/tools/conversationsCreate.d.ts +8 -0
  55. package/mcp-server/tools/conversationsCreate.d.ts.map +1 -0
  56. package/mcp-server/tools/conversationsCreate.js +64 -0
  57. package/mcp-server/tools/conversationsCreate.js.map +1 -0
  58. package/mcp-server/tools/conversationsDelete.d.ts +8 -0
  59. package/mcp-server/tools/conversationsDelete.d.ts.map +1 -0
  60. package/mcp-server/tools/conversationsDelete.js +63 -0
  61. package/mcp-server/tools/conversationsDelete.js.map +1 -0
  62. package/mcp-server/tools/conversationsGenerateName.d.ts +10 -0
  63. package/mcp-server/tools/conversationsGenerateName.d.ts.map +1 -0
  64. package/mcp-server/tools/conversationsGenerateName.js +66 -0
  65. package/mcp-server/tools/conversationsGenerateName.js.map +1 -0
  66. package/mcp-server/tools/conversationsList.d.ts +10 -0
  67. package/mcp-server/tools/conversationsList.d.ts.map +1 -0
  68. package/mcp-server/tools/conversationsList.js +66 -0
  69. package/mcp-server/tools/conversationsList.js.map +1 -0
  70. package/mcp-server/tools/conversationsRetrieve.d.ts +8 -0
  71. package/mcp-server/tools/conversationsRetrieve.d.ts.map +1 -0
  72. package/mcp-server/tools/conversationsRetrieve.js +64 -0
  73. package/mcp-server/tools/conversationsRetrieve.js.map +1 -0
  74. package/mcp-server/tools/conversationsUpdate.d.ts +10 -0
  75. package/mcp-server/tools/conversationsUpdate.d.ts.map +1 -0
  76. package/mcp-server/tools/conversationsUpdate.js +66 -0
  77. package/mcp-server/tools/conversationsUpdate.js.map +1 -0
  78. package/mcp-server/tools/evalsInvoke.d.ts +8 -0
  79. package/mcp-server/tools/evalsInvoke.d.ts.map +1 -0
  80. package/mcp-server/tools/evalsInvoke.js +62 -0
  81. package/mcp-server/tools/evalsInvoke.js.map +1 -0
  82. package/models/components/agentexecutionstartedstreamingevent.d.ts +8 -8
  83. package/models/components/agentexecutionstartedstreamingevent.d.ts.map +1 -1
  84. package/models/components/agentexecutionstartedstreamingevent.js +11 -12
  85. package/models/components/agentexecutionstartedstreamingevent.js.map +1 -1
  86. package/models/components/agentinactivestreamingevent.d.ts +21 -21
  87. package/models/components/agentinactivestreamingevent.d.ts.map +1 -1
  88. package/models/components/agentinactivestreamingevent.js +27 -28
  89. package/models/components/agentinactivestreamingevent.js.map +1 -1
  90. package/models/components/agentresponsemessage.d.ts +56 -0
  91. package/models/components/agentresponsemessage.d.ts.map +1 -0
  92. package/models/components/agentresponsemessage.js +116 -0
  93. package/models/components/agentresponsemessage.js.map +1 -0
  94. package/models/components/agentstartedstreamingevent.d.ts +6 -6
  95. package/models/components/agentstartedstreamingevent.d.ts.map +1 -1
  96. package/models/components/agentstartedstreamingevent.js +11 -12
  97. package/models/components/agentstartedstreamingevent.js.map +1 -1
  98. package/models/components/agentthoughtstreamingevent.d.ts +26 -24
  99. package/models/components/agentthoughtstreamingevent.d.ts.map +1 -1
  100. package/models/components/agentthoughtstreamingevent.js +34 -32
  101. package/models/components/agentthoughtstreamingevent.js.map +1 -1
  102. package/models/components/conversationresponse.d.ts +39 -5
  103. package/models/components/conversationresponse.d.ts.map +1 -1
  104. package/models/components/conversationresponse.js +52 -8
  105. package/models/components/conversationresponse.js.map +1 -1
  106. package/models/components/createagentresponse.d.ts +124 -0
  107. package/models/components/createagentresponse.d.ts.map +1 -0
  108. package/models/components/createagentresponse.js +191 -0
  109. package/models/components/createagentresponse.js.map +1 -0
  110. package/models/components/imagecontentpartschema.d.ts +18 -18
  111. package/models/components/imagecontentpartschema.d.ts.map +1 -1
  112. package/models/components/imagecontentpartschema.js +23 -21
  113. package/models/components/imagecontentpartschema.js.map +1 -1
  114. package/models/components/index.d.ts +18 -0
  115. package/models/components/index.d.ts.map +1 -1
  116. package/models/components/index.js +18 -0
  117. package/models/components/index.js.map +1 -1
  118. package/models/components/invokedeploymentrequest.d.ts +161 -1040
  119. package/models/components/invokedeploymentrequest.d.ts.map +1 -1
  120. package/models/components/invokedeploymentrequest.js +161 -1015
  121. package/models/components/invokedeploymentrequest.js.map +1 -1
  122. package/models/components/partdoneevent.js +2 -2
  123. package/models/components/reasoningpart.js +2 -2
  124. package/models/components/responsedoneevent.d.ts +24 -24
  125. package/models/components/responsedoneevent.d.ts.map +1 -1
  126. package/models/components/responsedoneevent.js +31 -32
  127. package/models/components/responsedoneevent.js.map +1 -1
  128. package/models/components/toolexecutionfailedstreamingevent.d.ts +2 -0
  129. package/models/components/toolexecutionfailedstreamingevent.d.ts.map +1 -1
  130. package/models/components/toolexecutionfailedstreamingevent.js +2 -0
  131. package/models/components/toolexecutionfailedstreamingevent.js.map +1 -1
  132. package/models/components/toolexecutionfinishedstreamingevent.d.ts +2 -0
  133. package/models/components/toolexecutionfinishedstreamingevent.d.ts.map +1 -1
  134. package/models/components/toolexecutionfinishedstreamingevent.js +2 -0
  135. package/models/components/toolexecutionfinishedstreamingevent.js.map +1 -1
  136. package/models/components/toolexecutionstartedstreamingevent.d.ts +2 -0
  137. package/models/components/toolexecutionstartedstreamingevent.d.ts.map +1 -1
  138. package/models/components/toolexecutionstartedstreamingevent.js +2 -0
  139. package/models/components/toolexecutionstartedstreamingevent.js.map +1 -1
  140. package/models/errors/generateconversationname.d.ts +55 -0
  141. package/models/errors/generateconversationname.d.ts.map +1 -0
  142. package/models/errors/generateconversationname.js +106 -0
  143. package/models/errors/generateconversationname.js.map +1 -0
  144. package/models/errors/index.d.ts +5 -0
  145. package/models/errors/index.d.ts.map +1 -1
  146. package/models/errors/index.js +5 -0
  147. package/models/errors/index.js.map +1 -1
  148. package/models/operations/createagentrequest.d.ts +3 -0
  149. package/models/operations/createagentrequest.d.ts.map +1 -1
  150. package/models/operations/createagentrequest.js +4 -4
  151. package/models/operations/createagentrequest.js.map +1 -1
  152. package/models/operations/createagentresponserequest.d.ts +37 -147
  153. package/models/operations/createagentresponserequest.d.ts.map +1 -1
  154. package/models/operations/createagentresponserequest.js +64 -205
  155. package/models/operations/createagentresponserequest.js.map +1 -1
  156. package/models/operations/createbudget.d.ts +69 -13
  157. package/models/operations/createbudget.d.ts.map +1 -1
  158. package/models/operations/createbudget.js +61 -12
  159. package/models/operations/createbudget.js.map +1 -1
  160. package/models/operations/createcontact.js +2 -2
  161. package/models/operations/createconversation.d.ts +62 -8
  162. package/models/operations/createconversation.d.ts.map +1 -1
  163. package/models/operations/createconversation.js +94 -10
  164. package/models/operations/createconversation.js.map +1 -1
  165. package/models/operations/createdataset.js +2 -2
  166. package/models/operations/createdatasetitem.d.ts +154 -1034
  167. package/models/operations/createdatasetitem.d.ts.map +1 -1
  168. package/models/operations/createdatasetitem.js +149 -959
  169. package/models/operations/createdatasetitem.js.map +1 -1
  170. package/models/operations/createdatasource.js +2 -2
  171. package/models/operations/createeval.js +28 -28
  172. package/models/operations/creatememory.d.ts +10 -5
  173. package/models/operations/creatememory.d.ts.map +1 -1
  174. package/models/operations/creatememory.js +6 -2
  175. package/models/operations/creatememory.js.map +1 -1
  176. package/models/operations/creatememorydocument.d.ts +4 -4
  177. package/models/operations/creatememorydocument.d.ts.map +1 -1
  178. package/models/operations/creatememorydocument.js +2 -2
  179. package/models/operations/creatememorydocument.js.map +1 -1
  180. package/models/operations/createprompt.d.ts +136 -479
  181. package/models/operations/createprompt.d.ts.map +1 -1
  182. package/models/operations/createprompt.js +158 -473
  183. package/models/operations/createprompt.js.map +1 -1
  184. package/models/operations/createtool.js +12 -12
  185. package/models/operations/deploymentcreatemetric.d.ts +154 -1034
  186. package/models/operations/deploymentcreatemetric.d.ts.map +1 -1
  187. package/models/operations/deploymentcreatemetric.js +140 -975
  188. package/models/operations/deploymentcreatemetric.js.map +1 -1
  189. package/models/operations/deploymentgetconfig.d.ts +222 -1102
  190. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  191. package/models/operations/deploymentgetconfig.js +263 -1059
  192. package/models/operations/deploymentgetconfig.js.map +1 -1
  193. package/models/operations/deploymentinvoke.d.ts +27 -26
  194. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  195. package/models/operations/deploymentinvoke.js +29 -28
  196. package/models/operations/deploymentinvoke.js.map +1 -1
  197. package/models/operations/deployments.d.ts +14 -13
  198. package/models/operations/deployments.d.ts.map +1 -1
  199. package/models/operations/deployments.js +14 -13
  200. package/models/operations/deployments.js.map +1 -1
  201. package/models/operations/deploymentstream.d.ts +187 -1066
  202. package/models/operations/deploymentstream.d.ts.map +1 -1
  203. package/models/operations/deploymentstream.js +163 -989
  204. package/models/operations/deploymentstream.js.map +1 -1
  205. package/models/operations/fileget.js +2 -2
  206. package/models/operations/filelist.js +2 -2
  207. package/models/operations/fileupload.d.ts +8 -8
  208. package/models/operations/fileupload.d.ts.map +1 -1
  209. package/models/operations/fileupload.js +13 -14
  210. package/models/operations/fileupload.js.map +1 -1
  211. package/models/operations/generateconversationname.d.ts +136 -0
  212. package/models/operations/generateconversationname.d.ts.map +1 -0
  213. package/models/operations/generateconversationname.js +179 -0
  214. package/models/operations/generateconversationname.js.map +1 -0
  215. package/models/operations/getallmemories.d.ts +10 -0
  216. package/models/operations/getallmemories.d.ts.map +1 -1
  217. package/models/operations/getallmemories.js +6 -0
  218. package/models/operations/getallmemories.js.map +1 -1
  219. package/models/operations/getallmemorydocuments.d.ts +10 -0
  220. package/models/operations/getallmemorydocuments.d.ts.map +1 -1
  221. package/models/operations/getallmemorydocuments.js +8 -0
  222. package/models/operations/getallmemorydocuments.js.map +1 -1
  223. package/models/operations/getallprompts.d.ts +14 -13
  224. package/models/operations/getallprompts.d.ts.map +1 -1
  225. package/models/operations/getallprompts.js +14 -13
  226. package/models/operations/getallprompts.js.map +1 -1
  227. package/models/operations/getalltools.js +12 -12
  228. package/models/operations/getbudget.d.ts +5 -0
  229. package/models/operations/getbudget.d.ts.map +1 -1
  230. package/models/operations/getbudget.js +6 -2
  231. package/models/operations/getbudget.js.map +1 -1
  232. package/models/operations/getevals.js +28 -28
  233. package/models/operations/getoneprompt.d.ts +14 -13
  234. package/models/operations/getoneprompt.d.ts.map +1 -1
  235. package/models/operations/getoneprompt.js +14 -13
  236. package/models/operations/getoneprompt.js.map +1 -1
  237. package/models/operations/getpromptversion.d.ts +14 -13
  238. package/models/operations/getpromptversion.d.ts.map +1 -1
  239. package/models/operations/getpromptversion.js +14 -13
  240. package/models/operations/getpromptversion.js.map +1 -1
  241. package/models/operations/index.d.ts +7 -0
  242. package/models/operations/index.d.ts.map +1 -1
  243. package/models/operations/index.js +7 -0
  244. package/models/operations/index.js.map +1 -1
  245. package/models/operations/invokeagent.d.ts +6 -6
  246. package/models/operations/invokeagent.d.ts.map +1 -1
  247. package/models/operations/invokeagent.js +10 -9
  248. package/models/operations/invokeagent.js.map +1 -1
  249. package/models/operations/listagents.d.ts +3 -0
  250. package/models/operations/listagents.d.ts.map +1 -1
  251. package/models/operations/listagents.js +2 -2
  252. package/models/operations/listagents.js.map +1 -1
  253. package/models/operations/listbudgets.d.ts +5 -0
  254. package/models/operations/listbudgets.d.ts.map +1 -1
  255. package/models/operations/listbudgets.js +6 -2
  256. package/models/operations/listbudgets.js.map +1 -1
  257. package/models/operations/listcontacts.d.ts +5 -0
  258. package/models/operations/listcontacts.d.ts.map +1 -1
  259. package/models/operations/listcontacts.js +4 -2
  260. package/models/operations/listcontacts.js.map +1 -1
  261. package/models/operations/listconversations.d.ts +60 -0
  262. package/models/operations/listconversations.d.ts.map +1 -0
  263. package/models/operations/listconversations.js +109 -0
  264. package/models/operations/listconversations.js.map +1 -0
  265. package/models/operations/listdatasetdatapoints.d.ts +76 -516
  266. package/models/operations/listdatasetdatapoints.d.ts.map +1 -1
  267. package/models/operations/listdatasetdatapoints.js +75 -475
  268. package/models/operations/listdatasetdatapoints.js.map +1 -1
  269. package/models/operations/listdatasets.js +2 -2
  270. package/models/operations/listdatasources.js +2 -2
  271. package/models/operations/listpromptversions.d.ts +14 -13
  272. package/models/operations/listpromptversions.d.ts.map +1 -1
  273. package/models/operations/listpromptversions.js +14 -13
  274. package/models/operations/listpromptversions.js.map +1 -1
  275. package/models/operations/retrieveagentrequest.d.ts +3 -0
  276. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  277. package/models/operations/retrieveagentrequest.js +2 -2
  278. package/models/operations/retrieveagentrequest.js.map +1 -1
  279. package/models/operations/retrievecontact.js +2 -2
  280. package/models/operations/retrieveconversation.d.ts +39 -5
  281. package/models/operations/retrieveconversation.d.ts.map +1 -1
  282. package/models/operations/retrieveconversation.js +53 -8
  283. package/models/operations/retrieveconversation.js.map +1 -1
  284. package/models/operations/retrievedatapoint.d.ts +76 -516
  285. package/models/operations/retrievedatapoint.d.ts.map +1 -1
  286. package/models/operations/retrievedatapoint.js +75 -473
  287. package/models/operations/retrievedatapoint.js.map +1 -1
  288. package/models/operations/retrievedataset.js +2 -2
  289. package/models/operations/retrievedatasource.js +2 -2
  290. package/models/operations/retrievememory.d.ts +5 -0
  291. package/models/operations/retrievememory.d.ts.map +1 -1
  292. package/models/operations/retrievememory.js +4 -0
  293. package/models/operations/retrievememory.js.map +1 -1
  294. package/models/operations/retrievetool.js +12 -12
  295. package/models/operations/runagent.js +4 -4
  296. package/models/operations/streamrunagent.js +4 -4
  297. package/models/operations/updateagent.d.ts +3 -0
  298. package/models/operations/updateagent.d.ts.map +1 -1
  299. package/models/operations/updateagent.js +4 -4
  300. package/models/operations/updateagent.js.map +1 -1
  301. package/models/operations/updatebudget.d.ts +5 -0
  302. package/models/operations/updatebudget.d.ts.map +1 -1
  303. package/models/operations/updatebudget.js +6 -2
  304. package/models/operations/updatebudget.js.map +1 -1
  305. package/models/operations/updatecontact.js +2 -2
  306. package/models/operations/updateconversation.d.ts +63 -6
  307. package/models/operations/updateconversation.d.ts.map +1 -1
  308. package/models/operations/updateconversation.js +93 -9
  309. package/models/operations/updateconversation.js.map +1 -1
  310. package/models/operations/updatedatapoint.d.ts +154 -1034
  311. package/models/operations/updatedatapoint.d.ts.map +1 -1
  312. package/models/operations/updatedatapoint.js +147 -955
  313. package/models/operations/updatedatapoint.js.map +1 -1
  314. package/models/operations/updatedataset.js +2 -2
  315. package/models/operations/updatedatasource.js +2 -2
  316. package/models/operations/updateeval.js +28 -28
  317. package/models/operations/updatememory.d.ts +10 -5
  318. package/models/operations/updatememory.d.ts.map +1 -1
  319. package/models/operations/updatememory.js +6 -2
  320. package/models/operations/updatememory.js.map +1 -1
  321. package/models/operations/updatememorydocument.d.ts +4 -4
  322. package/models/operations/updatememorydocument.d.ts.map +1 -1
  323. package/models/operations/updatememorydocument.js +2 -2
  324. package/models/operations/updatememorydocument.js.map +1 -1
  325. package/models/operations/updatememorystore.d.ts +24 -59
  326. package/models/operations/updatememorystore.d.ts.map +1 -1
  327. package/models/operations/updatememorystore.js +27 -55
  328. package/models/operations/updatememorystore.js.map +1 -1
  329. package/models/operations/updateprompt.d.ts +149 -486
  330. package/models/operations/updateprompt.d.ts.map +1 -1
  331. package/models/operations/updateprompt.js +156 -466
  332. package/models/operations/updateprompt.js.map +1 -1
  333. package/models/operations/updatetool.js +14 -14
  334. package/package.json +1 -1
  335. package/sdk/budgets.d.ts +1 -1
  336. package/sdk/budgets.js +1 -1
  337. package/sdk/conversations.d.ts +47 -0
  338. package/sdk/conversations.d.ts.map +1 -0
  339. package/sdk/conversations.js +72 -0
  340. package/sdk/conversations.js.map +1 -0
  341. package/sdk/evals.d.ts +4 -0
  342. package/sdk/evals.d.ts.map +1 -1
  343. package/sdk/evals.js +7 -0
  344. package/sdk/evals.js.map +1 -1
  345. package/sdk/responses.d.ts +5 -1
  346. package/sdk/responses.d.ts.map +1 -1
  347. package/sdk/responses.js +3 -1
  348. package/sdk/responses.js.map +1 -1
  349. package/sdk/sdk.d.ts +3 -0
  350. package/sdk/sdk.d.ts.map +1 -1
  351. package/sdk/sdk.js +4 -0
  352. package/sdk/sdk.js.map +1 -1
  353. package/src/funcs/agentsResponsesCreate.ts +14 -10
  354. package/src/funcs/budgetsCreate.ts +1 -1
  355. package/src/funcs/contactsList.ts +1 -0
  356. package/src/funcs/conversationsCreate.ts +161 -0
  357. package/src/funcs/conversationsDelete.ts +180 -0
  358. package/src/funcs/conversationsGenerateName.ts +194 -0
  359. package/src/funcs/conversationsList.ts +181 -0
  360. package/src/funcs/conversationsRetrieve.ts +180 -0
  361. package/src/funcs/conversationsUpdate.ts +184 -0
  362. package/src/funcs/evalsInvoke.ts +177 -0
  363. package/src/funcs/memoryStoresListDocuments.ts +2 -0
  364. package/src/funcs/memoryStoresListMemories.ts +1 -0
  365. package/src/lib/config.ts +3 -3
  366. package/src/mcp-server/mcp-server.ts +1 -1
  367. package/src/mcp-server/server.ts +15 -1
  368. package/src/mcp-server/tools/budgetsCreate.ts +1 -1
  369. package/src/mcp-server/tools/conversationsCreate.ts +37 -0
  370. package/src/mcp-server/tools/conversationsDelete.ts +35 -0
  371. package/src/mcp-server/tools/conversationsGenerateName.ts +40 -0
  372. package/src/mcp-server/tools/conversationsList.ts +41 -0
  373. package/src/mcp-server/tools/conversationsRetrieve.ts +37 -0
  374. package/src/mcp-server/tools/conversationsUpdate.ts +40 -0
  375. package/src/mcp-server/tools/evalsInvoke.ts +35 -0
  376. package/src/models/components/agentexecutionstartedstreamingevent.ts +53 -34
  377. package/src/models/components/agentinactivestreamingevent.ts +85 -57
  378. package/src/models/components/agentresponsemessage.ts +185 -0
  379. package/src/models/components/agentstartedstreamingevent.ts +30 -21
  380. package/src/models/components/agentthoughtstreamingevent.ts +167 -118
  381. package/src/models/components/conversationresponse.ts +100 -12
  382. package/src/models/components/createagentresponse.ts +340 -0
  383. package/src/models/components/imagecontentpartschema.ts +52 -37
  384. package/src/models/components/index.ts +18 -0
  385. package/src/models/components/invokedeploymentrequest.ts +515 -2564
  386. package/src/models/components/partdoneevent.ts +2 -2
  387. package/src/models/components/reasoningpart.ts +2 -2
  388. package/src/models/components/responsedoneevent.ts +93 -68
  389. package/src/models/components/toolexecutionfailedstreamingevent.ts +4 -0
  390. package/src/models/components/toolexecutionfinishedstreamingevent.ts +4 -0
  391. package/src/models/components/toolexecutionstartedstreamingevent.ts +4 -0
  392. package/src/models/errors/generateconversationname.ts +132 -0
  393. package/src/models/errors/index.ts +5 -0
  394. package/src/models/operations/createagentrequest.ts +7 -4
  395. package/src/models/operations/createagentresponserequest.ts +126 -435
  396. package/src/models/operations/createbudget.ts +143 -28
  397. package/src/models/operations/createcontact.ts +2 -2
  398. package/src/models/operations/createconversation.ts +192 -17
  399. package/src/models/operations/createdataset.ts +2 -2
  400. package/src/models/operations/createdatasetitem.ts +601 -2786
  401. package/src/models/operations/createdatasource.ts +2 -2
  402. package/src/models/operations/createeval.ts +28 -28
  403. package/src/models/operations/creatememory.ts +14 -5
  404. package/src/models/operations/creatememorydocument.ts +4 -4
  405. package/src/models/operations/createprompt.ts +397 -1201
  406. package/src/models/operations/createtool.ts +12 -12
  407. package/src/models/operations/deploymentcreatemetric.ts +601 -3040
  408. package/src/models/operations/deploymentgetconfig.ts +824 -2901
  409. package/src/models/operations/deploymentinvoke.ts +47 -46
  410. package/src/models/operations/deployments.ts +16 -15
  411. package/src/models/operations/deploymentstream.ts +727 -2977
  412. package/src/models/operations/fileget.ts +2 -2
  413. package/src/models/operations/filelist.ts +2 -2
  414. package/src/models/operations/fileupload.ts +30 -27
  415. package/src/models/operations/generateconversationname.ts +341 -0
  416. package/src/models/operations/getallmemories.ts +16 -0
  417. package/src/models/operations/getallmemorydocuments.ts +22 -0
  418. package/src/models/operations/getallprompts.ts +16 -15
  419. package/src/models/operations/getalltools.ts +12 -12
  420. package/src/models/operations/getbudget.ts +11 -2
  421. package/src/models/operations/getevals.ts +28 -28
  422. package/src/models/operations/getoneprompt.ts +16 -15
  423. package/src/models/operations/getpromptversion.ts +16 -15
  424. package/src/models/operations/index.ts +7 -0
  425. package/src/models/operations/invokeagent.ts +19 -26
  426. package/src/models/operations/listagents.ts +5 -2
  427. package/src/models/operations/listbudgets.ts +11 -2
  428. package/src/models/operations/listcontacts.ts +9 -2
  429. package/src/models/operations/listconversations.ts +161 -0
  430. package/src/models/operations/listdatasetdatapoints.ts +288 -1355
  431. package/src/models/operations/listdatasets.ts +2 -2
  432. package/src/models/operations/listdatasources.ts +2 -2
  433. package/src/models/operations/listpromptversions.ts +16 -15
  434. package/src/models/operations/retrieveagentrequest.ts +5 -2
  435. package/src/models/operations/retrievecontact.ts +2 -2
  436. package/src/models/operations/retrieveconversation.ts +107 -12
  437. package/src/models/operations/retrievedatapoint.ts +263 -1288
  438. package/src/models/operations/retrievedataset.ts +2 -2
  439. package/src/models/operations/retrievedatasource.ts +2 -2
  440. package/src/models/operations/retrievememory.ts +9 -0
  441. package/src/models/operations/retrievetool.ts +12 -12
  442. package/src/models/operations/runagent.ts +4 -4
  443. package/src/models/operations/streamrunagent.ts +4 -4
  444. package/src/models/operations/updateagent.ts +7 -4
  445. package/src/models/operations/updatebudget.ts +11 -2
  446. package/src/models/operations/updatecontact.ts +2 -2
  447. package/src/models/operations/updateconversation.ts +192 -14
  448. package/src/models/operations/updatedatapoint.ts +556 -2717
  449. package/src/models/operations/updatedataset.ts +2 -2
  450. package/src/models/operations/updatedatasource.ts +2 -2
  451. package/src/models/operations/updateeval.ts +28 -28
  452. package/src/models/operations/updatememory.ts +14 -5
  453. package/src/models/operations/updatememorydocument.ts +4 -4
  454. package/src/models/operations/updatememorystore.ts +64 -154
  455. package/src/models/operations/updateprompt.ts +385 -1144
  456. package/src/models/operations/updatetool.ts +14 -14
  457. package/src/sdk/budgets.ts +1 -1
  458. package/src/sdk/conversations.ts +125 -0
  459. package/src/sdk/evals.ts +15 -0
  460. package/src/sdk/responses.ts +8 -3
  461. package/src/sdk/sdk.ts +6 -0
@@ -44,90 +44,21 @@ import {
44
44
  RefusalPartSchema$Outbound,
45
45
  RefusalPartSchema$outboundSchema,
46
46
  } from "./refusalpartschema.js";
47
+ import {
48
+ TextContentPartSchema,
49
+ TextContentPartSchema$inboundSchema,
50
+ TextContentPartSchema$Outbound,
51
+ TextContentPartSchema$outboundSchema,
52
+ } from "./textcontentpartschema.js";
47
53
 
48
- export const InvokeDeploymentRequest2PrefixMessages5Type = {
49
- Text: "text",
50
- } as const;
51
- export type InvokeDeploymentRequest2PrefixMessages5Type = ClosedEnum<
52
- typeof InvokeDeploymentRequest2PrefixMessages5Type
53
- >;
54
-
55
- /**
56
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
57
- */
58
- export const InvokeDeploymentRequest2PrefixMessages5ContentType = {
59
- Ephemeral: "ephemeral",
60
- } as const;
61
- /**
62
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
63
- */
64
- export type InvokeDeploymentRequest2PrefixMessages5ContentType = ClosedEnum<
65
- typeof InvokeDeploymentRequest2PrefixMessages5ContentType
66
- >;
67
-
68
- /**
69
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
70
- *
71
- * @remarks
72
- *
73
- * - `5m`: 5 minutes
74
- * - `1h`: 1 hour
75
- *
76
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
77
- */
78
- export const InvokeDeploymentRequest2PrefixMessages5Ttl = {
79
- Fivem: "5m",
80
- Oneh: "1h",
81
- } as const;
82
- /**
83
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
84
- *
85
- * @remarks
86
- *
87
- * - `5m`: 5 minutes
88
- * - `1h`: 1 hour
89
- *
90
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
91
- */
92
- export type InvokeDeploymentRequest2PrefixMessages5Ttl = ClosedEnum<
93
- typeof InvokeDeploymentRequest2PrefixMessages5Ttl
94
- >;
95
-
96
- export type InvokeDeploymentRequest2PrefixMessages5CacheControl = {
97
- /**
98
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
99
- */
100
- type: InvokeDeploymentRequest2PrefixMessages5ContentType;
101
- /**
102
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
103
- *
104
- * @remarks
105
- *
106
- * - `5m`: 5 minutes
107
- * - `1h`: 1 hour
108
- *
109
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
110
- */
111
- ttl?: InvokeDeploymentRequest2PrefixMessages5Ttl | undefined;
112
- };
113
-
114
- export type InvokeDeploymentRequest21 = {
115
- type: InvokeDeploymentRequest2PrefixMessages5Type;
116
- text: string;
117
- cacheControl?:
118
- | InvokeDeploymentRequest2PrefixMessages5CacheControl
119
- | undefined;
120
- };
121
-
122
- export type InvokeDeploymentRequestContentPrefixMessages52 =
123
- InvokeDeploymentRequest21;
54
+ export type InvokeDeploymentRequestContent2 = TextContentPartSchema;
124
55
 
125
56
  /**
126
57
  * The contents of the tool message.
127
58
  */
128
59
  export type InvokeDeploymentRequestPrefixMessages5Content =
129
60
  | string
130
- | Array<InvokeDeploymentRequest21>;
61
+ | Array<TextContentPartSchema>;
131
62
 
132
63
  /**
133
64
  * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
@@ -194,7 +125,7 @@ export type ToolMessage = {
194
125
  /**
195
126
  * The contents of the tool message.
196
127
  */
197
- content: string | Array<InvokeDeploymentRequest21>;
128
+ content: string | Array<TextContentPartSchema>;
198
129
  /**
199
130
  * Tool call that this message is responding to.
200
131
  */
@@ -202,73 +133,8 @@ export type ToolMessage = {
202
133
  cacheControl?: PrefixMessagesCacheControl | undefined;
203
134
  };
204
135
 
205
- /**
206
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
207
- */
208
- export const InvokeDeploymentRequest2PrefixMessages4Type = {
209
- Ephemeral: "ephemeral",
210
- } as const;
211
- /**
212
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
213
- */
214
- export type InvokeDeploymentRequest2PrefixMessages4Type = ClosedEnum<
215
- typeof InvokeDeploymentRequest2PrefixMessages4Type
216
- >;
217
-
218
- /**
219
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
220
- *
221
- * @remarks
222
- *
223
- * - `5m`: 5 minutes
224
- * - `1h`: 1 hour
225
- *
226
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
227
- */
228
- export const InvokeDeploymentRequest2PrefixMessagesTtl = {
229
- Fivem: "5m",
230
- Oneh: "1h",
231
- } as const;
232
- /**
233
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
234
- *
235
- * @remarks
236
- *
237
- * - `5m`: 5 minutes
238
- * - `1h`: 1 hour
239
- *
240
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
241
- */
242
- export type InvokeDeploymentRequest2PrefixMessagesTtl = ClosedEnum<
243
- typeof InvokeDeploymentRequest2PrefixMessagesTtl
244
- >;
245
-
246
- export type InvokeDeploymentRequest2PrefixMessagesCacheControl = {
247
- /**
248
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
249
- */
250
- type: InvokeDeploymentRequest2PrefixMessages4Type;
251
- /**
252
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
253
- *
254
- * @remarks
255
- *
256
- * - `5m`: 5 minutes
257
- * - `1h`: 1 hour
258
- *
259
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
260
- */
261
- ttl?: InvokeDeploymentRequest2PrefixMessagesTtl | undefined;
262
- };
263
-
264
- export type Two1 = {
265
- type: "text";
266
- text: string;
267
- cacheControl?: InvokeDeploymentRequest2PrefixMessagesCacheControl | undefined;
268
- };
269
-
270
- export type InvokeDeploymentRequestContentPrefixMessages2 =
271
- | Two1
136
+ export type Content2 =
137
+ | (TextContentPartSchema & { type: "text" })
272
138
  | RefusalPartSchema
273
139
  | ReasoningPartSchema
274
140
  | RedactedReasoningPartSchema;
@@ -279,7 +145,10 @@ export type InvokeDeploymentRequestContentPrefixMessages2 =
279
145
  export type InvokeDeploymentRequestPrefixMessages4Content =
280
146
  | string
281
147
  | Array<
282
- Two1 | RefusalPartSchema | ReasoningPartSchema | RedactedReasoningPartSchema
148
+ | (TextContentPartSchema & { type: "text" })
149
+ | RefusalPartSchema
150
+ | ReasoningPartSchema
151
+ | RedactedReasoningPartSchema
283
152
  >;
284
153
 
285
154
  /**
@@ -337,7 +206,7 @@ export type AssistantMessage = {
337
206
  content?:
338
207
  | string
339
208
  | Array<
340
- | Two1
209
+ | (TextContentPartSchema & { type: "text" })
341
210
  | RefusalPartSchema
342
211
  | ReasoningPartSchema
343
212
  | RedactedReasoningPartSchema
@@ -369,14 +238,14 @@ export type AssistantMessage = {
369
238
  /**
370
239
  * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
371
240
  */
372
- export const InvokeDeploymentRequest2PrefixMessages3Type = {
241
+ export const InvokeDeploymentRequest2PrefixMessagesType = {
373
242
  Ephemeral: "ephemeral",
374
243
  } as const;
375
244
  /**
376
245
  * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
377
246
  */
378
- export type InvokeDeploymentRequest2PrefixMessages3Type = ClosedEnum<
379
- typeof InvokeDeploymentRequest2PrefixMessages3Type
247
+ export type InvokeDeploymentRequest2PrefixMessagesType = ClosedEnum<
248
+ typeof InvokeDeploymentRequest2PrefixMessagesType
380
249
  >;
381
250
 
382
251
  /**
@@ -389,7 +258,7 @@ export type InvokeDeploymentRequest2PrefixMessages3Type = ClosedEnum<
389
258
  *
390
259
  * Defaults to `5m`. Only supported by `Anthropic` Claude models.
391
260
  */
392
- export const InvokeDeploymentRequest2Ttl = {
261
+ export const TwoTtl = {
393
262
  Fivem: "5m",
394
263
  Oneh: "1h",
395
264
  } as const;
@@ -403,15 +272,13 @@ export const InvokeDeploymentRequest2Ttl = {
403
272
  *
404
273
  * Defaults to `5m`. Only supported by `Anthropic` Claude models.
405
274
  */
406
- export type InvokeDeploymentRequest2Ttl = ClosedEnum<
407
- typeof InvokeDeploymentRequest2Ttl
408
- >;
275
+ export type TwoTtl = ClosedEnum<typeof TwoTtl>;
409
276
 
410
- export type InvokeDeploymentRequest2CacheControl = {
277
+ export type TwoCacheControl = {
411
278
  /**
412
279
  * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
413
280
  */
414
- type: InvokeDeploymentRequest2PrefixMessages3Type;
281
+ type: InvokeDeploymentRequest2PrefixMessagesType;
415
282
  /**
416
283
  * The time-to-live for the cache control breakpoint. This may be one of the following values:
417
284
  *
@@ -422,7 +289,7 @@ export type InvokeDeploymentRequest2CacheControl = {
422
289
  *
423
290
  * Defaults to `5m`. Only supported by `Anthropic` Claude models.
424
291
  */
425
- ttl?: InvokeDeploymentRequest2Ttl | undefined;
292
+ ttl?: TwoTtl | undefined;
426
293
  };
427
294
 
428
295
  export type Four = {
@@ -430,78 +297,15 @@ export type Four = {
430
297
  * The type of the content part. Always `file`.
431
298
  */
432
299
  type: "file";
433
- cacheControl?: InvokeDeploymentRequest2CacheControl | undefined;
300
+ cacheControl?: TwoCacheControl | undefined;
434
301
  /**
435
302
  * File data for the content part. Must contain either file_data or uri, but not both.
436
303
  */
437
304
  file: FileContentPartSchema;
438
305
  };
439
306
 
440
- /**
441
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
442
- */
443
- export const InvokeDeploymentRequest2PrefixMessages3ContentType = {
444
- Ephemeral: "ephemeral",
445
- } as const;
446
- /**
447
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
448
- */
449
- export type InvokeDeploymentRequest2PrefixMessages3ContentType = ClosedEnum<
450
- typeof InvokeDeploymentRequest2PrefixMessages3ContentType
451
- >;
452
-
453
- /**
454
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
455
- *
456
- * @remarks
457
- *
458
- * - `5m`: 5 minutes
459
- * - `1h`: 1 hour
460
- *
461
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
462
- */
463
- export const TwoTtl = {
464
- Fivem: "5m",
465
- Oneh: "1h",
466
- } as const;
467
- /**
468
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
469
- *
470
- * @remarks
471
- *
472
- * - `5m`: 5 minutes
473
- * - `1h`: 1 hour
474
- *
475
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
476
- */
477
- export type TwoTtl = ClosedEnum<typeof TwoTtl>;
478
-
479
- export type TwoCacheControl = {
480
- /**
481
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
482
- */
483
- type: InvokeDeploymentRequest2PrefixMessages3ContentType;
484
- /**
485
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
486
- *
487
- * @remarks
488
- *
489
- * - `5m`: 5 minutes
490
- * - `1h`: 1 hour
491
- *
492
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
493
- */
494
- ttl?: TwoTtl | undefined;
495
- };
496
-
497
- export type InvokeDeploymentRequest2PrefixMessages1 = {
498
- type: "text";
499
- text: string;
500
- cacheControl?: TwoCacheControl | undefined;
501
- };
502
-
503
- export type InvokeDeploymentRequestContent2 =
504
- | InvokeDeploymentRequest2PrefixMessages1
307
+ export type Two =
308
+ | (TextContentPartSchema & { type: "text" })
505
309
  | ImageContentPartSchema
506
310
  | AudioContentPartSchema
507
311
  | Four;
@@ -512,7 +316,7 @@ export type InvokeDeploymentRequestContent2 =
512
316
  export type InvokeDeploymentRequestPrefixMessagesContent =
513
317
  | string
514
318
  | Array<
515
- | InvokeDeploymentRequest2PrefixMessages1
319
+ | (TextContentPartSchema & { type: "text" })
516
320
  | ImageContentPartSchema
517
321
  | AudioContentPartSchema
518
322
  | Four
@@ -533,29 +337,83 @@ export type UserMessage = {
533
337
  content:
534
338
  | string
535
339
  | Array<
536
- | InvokeDeploymentRequest2PrefixMessages1
340
+ | (TextContentPartSchema & { type: "text" })
537
341
  | ImageContentPartSchema
538
342
  | AudioContentPartSchema
539
343
  | Four
540
344
  >;
541
345
  };
542
346
 
543
- export const ContentType = {
544
- Text: "text",
545
- } as const;
546
- export type ContentType = ClosedEnum<typeof ContentType>;
347
+ /**
348
+ * The contents of the developer message.
349
+ */
350
+ export type PrefixMessagesContent = string | Array<TextContentPartSchema>;
351
+
352
+ export type DeveloperMessage = {
353
+ /**
354
+ * The role of the messages author, in this case `developer`.
355
+ */
356
+ role: "developer";
357
+ /**
358
+ * The contents of the developer message.
359
+ */
360
+ content: string | Array<TextContentPartSchema>;
361
+ /**
362
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
363
+ */
364
+ name?: string | undefined;
365
+ };
366
+
367
+ /**
368
+ * The contents of the system message.
369
+ */
370
+ export type Content = string | Array<TextContentPartSchema>;
371
+
372
+ /**
373
+ * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
374
+ */
375
+ export type SystemMessage = {
376
+ /**
377
+ * The role of the messages author, in this case `system`.
378
+ */
379
+ role: "system";
380
+ /**
381
+ * The contents of the system message.
382
+ */
383
+ content: string | Array<TextContentPartSchema>;
384
+ /**
385
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
386
+ */
387
+ name?: string | undefined;
388
+ };
389
+
390
+ export type PrefixMessages =
391
+ | SystemMessage
392
+ | DeveloperMessage
393
+ | UserMessage
394
+ | AssistantMessage
395
+ | ToolMessage;
396
+
397
+ export type InvokeDeploymentRequestContentMessages52 = TextContentPartSchema;
398
+
399
+ /**
400
+ * The contents of the tool message.
401
+ */
402
+ export type InvokeDeploymentRequestMessages5Content =
403
+ | string
404
+ | Array<TextContentPartSchema>;
547
405
 
548
406
  /**
549
407
  * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
550
408
  */
551
- export const InvokeDeploymentRequestContentPrefixMessagesType = {
409
+ export const InvokeDeploymentRequestMessagesType = {
552
410
  Ephemeral: "ephemeral",
553
411
  } as const;
554
412
  /**
555
413
  * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
556
414
  */
557
- export type InvokeDeploymentRequestContentPrefixMessagesType = ClosedEnum<
558
- typeof InvokeDeploymentRequestContentPrefixMessagesType
415
+ export type InvokeDeploymentRequestMessagesType = ClosedEnum<
416
+ typeof InvokeDeploymentRequestMessagesType
559
417
  >;
560
418
 
561
419
  /**
@@ -568,7 +426,7 @@ export type InvokeDeploymentRequestContentPrefixMessagesType = ClosedEnum<
568
426
  *
569
427
  * Defaults to `5m`. Only supported by `Anthropic` Claude models.
570
428
  */
571
- export const ContentTtl = {
429
+ export const MessagesTtl = {
572
430
  Fivem: "5m",
573
431
  Oneh: "1h",
574
432
  } as const;
@@ -582,13 +440,13 @@ export const ContentTtl = {
582
440
  *
583
441
  * Defaults to `5m`. Only supported by `Anthropic` Claude models.
584
442
  */
585
- export type ContentTtl = ClosedEnum<typeof ContentTtl>;
443
+ export type MessagesTtl = ClosedEnum<typeof MessagesTtl>;
586
444
 
587
- export type ContentCacheControl = {
445
+ export type MessagesCacheControl = {
588
446
  /**
589
447
  * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
590
448
  */
591
- type: InvokeDeploymentRequestContentPrefixMessagesType;
449
+ type: InvokeDeploymentRequestMessagesType;
592
450
  /**
593
451
  * The time-to-live for the cache control breakpoint. This may be one of the following values:
594
452
  *
@@ -599,285 +457,18 @@ export type ContentCacheControl = {
599
457
  *
600
458
  * Defaults to `5m`. Only supported by `Anthropic` Claude models.
601
459
  */
602
- ttl?: ContentTtl | undefined;
603
- };
604
-
605
- export type Content2 = {
606
- type: ContentType;
607
- text: string;
608
- cacheControl?: ContentCacheControl | undefined;
460
+ ttl?: MessagesTtl | undefined;
609
461
  };
610
462
 
611
- /**
612
- * The contents of the developer message.
613
- */
614
- export type PrefixMessagesContent = string | Array<Content2>;
615
-
616
- export type DeveloperMessage = {
463
+ export type MessagesToolMessage = {
617
464
  /**
618
- * The role of the messages author, in this case `developer`.
619
- */
620
- role: "developer";
621
- /**
622
- * The contents of the developer message.
623
- */
624
- content: string | Array<Content2>;
625
- /**
626
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
627
- */
628
- name?: string | undefined;
629
- };
630
-
631
- export const InvokeDeploymentRequestContentType = {
632
- Text: "text",
633
- } as const;
634
- export type InvokeDeploymentRequestContentType = ClosedEnum<
635
- typeof InvokeDeploymentRequestContentType
636
- >;
637
-
638
- /**
639
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
640
- */
641
- export const InvokeDeploymentRequestContentPrefixMessages1Type = {
642
- Ephemeral: "ephemeral",
643
- } as const;
644
- /**
645
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
646
- */
647
- export type InvokeDeploymentRequestContentPrefixMessages1Type = ClosedEnum<
648
- typeof InvokeDeploymentRequestContentPrefixMessages1Type
649
- >;
650
-
651
- /**
652
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
653
- *
654
- * @remarks
655
- *
656
- * - `5m`: 5 minutes
657
- * - `1h`: 1 hour
658
- *
659
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
660
- */
661
- export const InvokeDeploymentRequestContentTtl = {
662
- Fivem: "5m",
663
- Oneh: "1h",
664
- } as const;
665
- /**
666
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
667
- *
668
- * @remarks
669
- *
670
- * - `5m`: 5 minutes
671
- * - `1h`: 1 hour
672
- *
673
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
674
- */
675
- export type InvokeDeploymentRequestContentTtl = ClosedEnum<
676
- typeof InvokeDeploymentRequestContentTtl
677
- >;
678
-
679
- export type InvokeDeploymentRequestContentCacheControl = {
680
- /**
681
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
682
- */
683
- type: InvokeDeploymentRequestContentPrefixMessages1Type;
684
- /**
685
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
686
- *
687
- * @remarks
688
- *
689
- * - `5m`: 5 minutes
690
- * - `1h`: 1 hour
691
- *
692
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
693
- */
694
- ttl?: InvokeDeploymentRequestContentTtl | undefined;
695
- };
696
-
697
- export type Two = {
698
- type: InvokeDeploymentRequestContentType;
699
- text: string;
700
- cacheControl?: InvokeDeploymentRequestContentCacheControl | undefined;
701
- };
702
-
703
- /**
704
- * The contents of the system message.
705
- */
706
- export type Content = string | Array<Two>;
707
-
708
- /**
709
- * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
710
- */
711
- export type SystemMessage = {
712
- /**
713
- * The role of the messages author, in this case `system`.
714
- */
715
- role: "system";
716
- /**
717
- * The contents of the system message.
718
- */
719
- content: string | Array<Two>;
720
- /**
721
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
722
- */
723
- name?: string | undefined;
724
- };
725
-
726
- export type PrefixMessages =
727
- | SystemMessage
728
- | DeveloperMessage
729
- | UserMessage
730
- | AssistantMessage
731
- | ToolMessage;
732
-
733
- export const InvokeDeploymentRequest2Messages5Type = {
734
- Text: "text",
735
- } as const;
736
- export type InvokeDeploymentRequest2Messages5Type = ClosedEnum<
737
- typeof InvokeDeploymentRequest2Messages5Type
738
- >;
739
-
740
- /**
741
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
742
- */
743
- export const InvokeDeploymentRequest2Messages5ContentType = {
744
- Ephemeral: "ephemeral",
745
- } as const;
746
- /**
747
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
748
- */
749
- export type InvokeDeploymentRequest2Messages5ContentType = ClosedEnum<
750
- typeof InvokeDeploymentRequest2Messages5ContentType
751
- >;
752
-
753
- /**
754
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
755
- *
756
- * @remarks
757
- *
758
- * - `5m`: 5 minutes
759
- * - `1h`: 1 hour
760
- *
761
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
762
- */
763
- export const InvokeDeploymentRequest2Messages5Ttl = {
764
- Fivem: "5m",
765
- Oneh: "1h",
766
- } as const;
767
- /**
768
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
769
- *
770
- * @remarks
771
- *
772
- * - `5m`: 5 minutes
773
- * - `1h`: 1 hour
774
- *
775
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
776
- */
777
- export type InvokeDeploymentRequest2Messages5Ttl = ClosedEnum<
778
- typeof InvokeDeploymentRequest2Messages5Ttl
779
- >;
780
-
781
- export type InvokeDeploymentRequest2Messages5CacheControl = {
782
- /**
783
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
784
- */
785
- type: InvokeDeploymentRequest2Messages5ContentType;
786
- /**
787
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
788
- *
789
- * @remarks
790
- *
791
- * - `5m`: 5 minutes
792
- * - `1h`: 1 hour
793
- *
794
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
795
- */
796
- ttl?: InvokeDeploymentRequest2Messages5Ttl | undefined;
797
- };
798
-
799
- export type InvokeDeploymentRequest2Messages51 = {
800
- type: InvokeDeploymentRequest2Messages5Type;
801
- text: string;
802
- cacheControl?: InvokeDeploymentRequest2Messages5CacheControl | undefined;
803
- };
804
-
805
- export type InvokeDeploymentRequestContentMessages52 =
806
- InvokeDeploymentRequest2Messages51;
807
-
808
- /**
809
- * The contents of the tool message.
810
- */
811
- export type InvokeDeploymentRequestMessages5Content =
812
- | string
813
- | Array<InvokeDeploymentRequest2Messages51>;
814
-
815
- /**
816
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
817
- */
818
- export const InvokeDeploymentRequestMessagesType = {
819
- Ephemeral: "ephemeral",
820
- } as const;
821
- /**
822
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
823
- */
824
- export type InvokeDeploymentRequestMessagesType = ClosedEnum<
825
- typeof InvokeDeploymentRequestMessagesType
826
- >;
827
-
828
- /**
829
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
830
- *
831
- * @remarks
832
- *
833
- * - `5m`: 5 minutes
834
- * - `1h`: 1 hour
835
- *
836
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
837
- */
838
- export const MessagesTtl = {
839
- Fivem: "5m",
840
- Oneh: "1h",
841
- } as const;
842
- /**
843
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
844
- *
845
- * @remarks
846
- *
847
- * - `5m`: 5 minutes
848
- * - `1h`: 1 hour
849
- *
850
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
851
- */
852
- export type MessagesTtl = ClosedEnum<typeof MessagesTtl>;
853
-
854
- export type MessagesCacheControl = {
855
- /**
856
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
857
- */
858
- type: InvokeDeploymentRequestMessagesType;
859
- /**
860
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
861
- *
862
- * @remarks
863
- *
864
- * - `5m`: 5 minutes
865
- * - `1h`: 1 hour
866
- *
867
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
868
- */
869
- ttl?: MessagesTtl | undefined;
870
- };
871
-
872
- export type MessagesToolMessage = {
873
- /**
874
- * The role of the messages author, in this case tool.
465
+ * The role of the messages author, in this case tool.
875
466
  */
876
467
  role: "tool";
877
468
  /**
878
469
  * The contents of the tool message.
879
470
  */
880
- content: string | Array<InvokeDeploymentRequest2Messages51>;
471
+ content: string | Array<TextContentPartSchema>;
881
472
  /**
882
473
  * Tool call that this message is responding to.
883
474
  */
@@ -885,73 +476,8 @@ export type MessagesToolMessage = {
885
476
  cacheControl?: MessagesCacheControl | undefined;
886
477
  };
887
478
 
888
- /**
889
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
890
- */
891
- export const InvokeDeploymentRequest2Messages4ContentType = {
892
- Ephemeral: "ephemeral",
893
- } as const;
894
- /**
895
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
896
- */
897
- export type InvokeDeploymentRequest2Messages4ContentType = ClosedEnum<
898
- typeof InvokeDeploymentRequest2Messages4ContentType
899
- >;
900
-
901
- /**
902
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
903
- *
904
- * @remarks
905
- *
906
- * - `5m`: 5 minutes
907
- * - `1h`: 1 hour
908
- *
909
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
910
- */
911
- export const InvokeDeploymentRequest2Messages4Ttl = {
912
- Fivem: "5m",
913
- Oneh: "1h",
914
- } as const;
915
- /**
916
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
917
- *
918
- * @remarks
919
- *
920
- * - `5m`: 5 minutes
921
- * - `1h`: 1 hour
922
- *
923
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
924
- */
925
- export type InvokeDeploymentRequest2Messages4Ttl = ClosedEnum<
926
- typeof InvokeDeploymentRequest2Messages4Ttl
927
- >;
928
-
929
- export type InvokeDeploymentRequest2Messages4CacheControl = {
930
- /**
931
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
932
- */
933
- type: InvokeDeploymentRequest2Messages4ContentType;
934
- /**
935
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
936
- *
937
- * @remarks
938
- *
939
- * - `5m`: 5 minutes
940
- * - `1h`: 1 hour
941
- *
942
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
943
- */
944
- ttl?: InvokeDeploymentRequest2Messages4Ttl | undefined;
945
- };
946
-
947
- export type InvokeDeploymentRequest2Messages41 = {
948
- type: "text";
949
- text: string;
950
- cacheControl?: InvokeDeploymentRequest2Messages4CacheControl | undefined;
951
- };
952
-
953
479
  export type InvokeDeploymentRequestContentMessages42 =
954
- | InvokeDeploymentRequest2Messages41
480
+ | (TextContentPartSchema & { type: "text" })
955
481
  | RefusalPartSchema
956
482
  | ReasoningPartSchema
957
483
  | RedactedReasoningPartSchema;
@@ -962,7 +488,7 @@ export type InvokeDeploymentRequestContentMessages42 =
962
488
  export type InvokeDeploymentRequestMessages4Content =
963
489
  | string
964
490
  | Array<
965
- | InvokeDeploymentRequest2Messages41
491
+ | (TextContentPartSchema & { type: "text" })
966
492
  | RefusalPartSchema
967
493
  | ReasoningPartSchema
968
494
  | RedactedReasoningPartSchema
@@ -1023,7 +549,7 @@ export type MessagesAssistantMessage = {
1023
549
  content?:
1024
550
  | string
1025
551
  | Array<
1026
- | InvokeDeploymentRequest2Messages41
552
+ | (TextContentPartSchema & { type: "text" })
1027
553
  | RefusalPartSchema
1028
554
  | ReasoningPartSchema
1029
555
  | RedactedReasoningPartSchema
@@ -1055,14 +581,14 @@ export type MessagesAssistantMessage = {
1055
581
  /**
1056
582
  * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1057
583
  */
1058
- export const InvokeDeploymentRequest2Messages3Content4Type = {
584
+ export const InvokeDeploymentRequest2MessagesType = {
1059
585
  Ephemeral: "ephemeral",
1060
586
  } as const;
1061
587
  /**
1062
588
  * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1063
589
  */
1064
- export type InvokeDeploymentRequest2Messages3Content4Type = ClosedEnum<
1065
- typeof InvokeDeploymentRequest2Messages3Content4Type
590
+ export type InvokeDeploymentRequest2MessagesType = ClosedEnum<
591
+ typeof InvokeDeploymentRequest2MessagesType
1066
592
  >;
1067
593
 
1068
594
  /**
@@ -1075,7 +601,7 @@ export type InvokeDeploymentRequest2Messages3Content4Type = ClosedEnum<
1075
601
  *
1076
602
  * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1077
603
  */
1078
- export const InvokeDeploymentRequest2Messages3Ttl = {
604
+ export const InvokeDeploymentRequest2Ttl = {
1079
605
  Fivem: "5m",
1080
606
  Oneh: "1h",
1081
607
  } as const;
@@ -1089,15 +615,15 @@ export const InvokeDeploymentRequest2Messages3Ttl = {
1089
615
  *
1090
616
  * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1091
617
  */
1092
- export type InvokeDeploymentRequest2Messages3Ttl = ClosedEnum<
1093
- typeof InvokeDeploymentRequest2Messages3Ttl
618
+ export type InvokeDeploymentRequest2Ttl = ClosedEnum<
619
+ typeof InvokeDeploymentRequest2Ttl
1094
620
  >;
1095
621
 
1096
- export type InvokeDeploymentRequest2Messages3CacheControl = {
622
+ export type InvokeDeploymentRequest2CacheControl = {
1097
623
  /**
1098
624
  * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1099
625
  */
1100
- type: InvokeDeploymentRequest2Messages3Content4Type;
626
+ type: InvokeDeploymentRequest2MessagesType;
1101
627
  /**
1102
628
  * The time-to-live for the cache control breakpoint. This may be one of the following values:
1103
629
  *
@@ -1108,7 +634,7 @@ export type InvokeDeploymentRequest2Messages3CacheControl = {
1108
634
  *
1109
635
  * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1110
636
  */
1111
- ttl?: InvokeDeploymentRequest2Messages3Ttl | undefined;
637
+ ttl?: InvokeDeploymentRequest2Ttl | undefined;
1112
638
  };
1113
639
 
1114
640
  export type Two4 = {
@@ -1116,80 +642,15 @@ export type Two4 = {
1116
642
  * The type of the content part. Always `file`.
1117
643
  */
1118
644
  type: "file";
1119
- cacheControl?: InvokeDeploymentRequest2Messages3CacheControl | undefined;
645
+ cacheControl?: InvokeDeploymentRequest2CacheControl | undefined;
1120
646
  /**
1121
647
  * File data for the content part. Must contain either file_data or uri, but not both.
1122
648
  */
1123
649
  file: FileContentPartSchema;
1124
650
  };
1125
651
 
1126
- /**
1127
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1128
- */
1129
- export const InvokeDeploymentRequest2Messages3ContentType = {
1130
- Ephemeral: "ephemeral",
1131
- } as const;
1132
- /**
1133
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1134
- */
1135
- export type InvokeDeploymentRequest2Messages3ContentType = ClosedEnum<
1136
- typeof InvokeDeploymentRequest2Messages3ContentType
1137
- >;
1138
-
1139
- /**
1140
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
1141
- *
1142
- * @remarks
1143
- *
1144
- * - `5m`: 5 minutes
1145
- * - `1h`: 1 hour
1146
- *
1147
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1148
- */
1149
- export const InvokeDeploymentRequest2MessagesTtl = {
1150
- Fivem: "5m",
1151
- Oneh: "1h",
1152
- } as const;
1153
- /**
1154
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
1155
- *
1156
- * @remarks
1157
- *
1158
- * - `5m`: 5 minutes
1159
- * - `1h`: 1 hour
1160
- *
1161
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1162
- */
1163
- export type InvokeDeploymentRequest2MessagesTtl = ClosedEnum<
1164
- typeof InvokeDeploymentRequest2MessagesTtl
1165
- >;
1166
-
1167
- export type InvokeDeploymentRequest2MessagesCacheControl = {
1168
- /**
1169
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1170
- */
1171
- type: InvokeDeploymentRequest2Messages3ContentType;
1172
- /**
1173
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
1174
- *
1175
- * @remarks
1176
- *
1177
- * - `5m`: 5 minutes
1178
- * - `1h`: 1 hour
1179
- *
1180
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1181
- */
1182
- ttl?: InvokeDeploymentRequest2MessagesTtl | undefined;
1183
- };
1184
-
1185
- export type InvokeDeploymentRequest2Messages1 = {
1186
- type: "text";
1187
- text: string;
1188
- cacheControl?: InvokeDeploymentRequest2MessagesCacheControl | undefined;
1189
- };
1190
-
1191
- export type InvokeDeploymentRequestContentMessages32 =
1192
- | InvokeDeploymentRequest2Messages1
652
+ export type InvokeDeploymentRequestContentMessages2 =
653
+ | (TextContentPartSchema & { type: "text" })
1193
654
  | ImageContentPartSchema
1194
655
  | AudioContentPartSchema
1195
656
  | Two4;
@@ -1200,7 +661,7 @@ export type InvokeDeploymentRequestContentMessages32 =
1200
661
  export type InvokeDeploymentRequestMessages3Content =
1201
662
  | string
1202
663
  | Array<
1203
- | InvokeDeploymentRequest2Messages1
664
+ | (TextContentPartSchema & { type: "text" })
1204
665
  | ImageContentPartSchema
1205
666
  | AudioContentPartSchema
1206
667
  | Two4
@@ -1214,92 +675,18 @@ export type MessagesUserMessage = {
1214
675
  /**
1215
676
  * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
1216
677
  */
1217
- name?: string | undefined;
1218
- /**
1219
- * The contents of the user message.
1220
- */
1221
- content:
1222
- | string
1223
- | Array<
1224
- | InvokeDeploymentRequest2Messages1
1225
- | ImageContentPartSchema
1226
- | AudioContentPartSchema
1227
- | Two4
1228
- >;
1229
- };
1230
-
1231
- export const InvokeDeploymentRequestContentMessages2Type = {
1232
- Text: "text",
1233
- } as const;
1234
- export type InvokeDeploymentRequestContentMessages2Type = ClosedEnum<
1235
- typeof InvokeDeploymentRequestContentMessages2Type
1236
- >;
1237
-
1238
- /**
1239
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1240
- */
1241
- export const InvokeDeploymentRequestContentMessages22Type = {
1242
- Ephemeral: "ephemeral",
1243
- } as const;
1244
- /**
1245
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1246
- */
1247
- export type InvokeDeploymentRequestContentMessages22Type = ClosedEnum<
1248
- typeof InvokeDeploymentRequestContentMessages22Type
1249
- >;
1250
-
1251
- /**
1252
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
1253
- *
1254
- * @remarks
1255
- *
1256
- * - `5m`: 5 minutes
1257
- * - `1h`: 1 hour
1258
- *
1259
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1260
- */
1261
- export const InvokeDeploymentRequestContentMessages2Ttl = {
1262
- Fivem: "5m",
1263
- Oneh: "1h",
1264
- } as const;
1265
- /**
1266
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
1267
- *
1268
- * @remarks
1269
- *
1270
- * - `5m`: 5 minutes
1271
- * - `1h`: 1 hour
1272
- *
1273
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1274
- */
1275
- export type InvokeDeploymentRequestContentMessages2Ttl = ClosedEnum<
1276
- typeof InvokeDeploymentRequestContentMessages2Ttl
1277
- >;
1278
-
1279
- export type InvokeDeploymentRequestContentMessages2CacheControl = {
1280
- /**
1281
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1282
- */
1283
- type: InvokeDeploymentRequestContentMessages22Type;
1284
- /**
1285
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
1286
- *
1287
- * @remarks
1288
- *
1289
- * - `5m`: 5 minutes
1290
- * - `1h`: 1 hour
1291
- *
1292
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
678
+ name?: string | undefined;
679
+ /**
680
+ * The contents of the user message.
1293
681
  */
1294
- ttl?: InvokeDeploymentRequestContentMessages2Ttl | undefined;
1295
- };
1296
-
1297
- export type InvokeDeploymentRequestContentMessages22 = {
1298
- type: InvokeDeploymentRequestContentMessages2Type;
1299
- text: string;
1300
- cacheControl?:
1301
- | InvokeDeploymentRequestContentMessages2CacheControl
1302
- | undefined;
682
+ content:
683
+ | string
684
+ | Array<
685
+ | (TextContentPartSchema & { type: "text" })
686
+ | ImageContentPartSchema
687
+ | AudioContentPartSchema
688
+ | Two4
689
+ >;
1303
690
  };
1304
691
 
1305
692
  /**
@@ -1307,7 +694,7 @@ export type InvokeDeploymentRequestContentMessages22 = {
1307
694
  */
1308
695
  export type InvokeDeploymentRequestMessagesContent =
1309
696
  | string
1310
- | Array<InvokeDeploymentRequestContentMessages22>;
697
+ | Array<TextContentPartSchema>;
1311
698
 
1312
699
  export type MessagesDeveloperMessage = {
1313
700
  /**
@@ -1317,91 +704,17 @@ export type MessagesDeveloperMessage = {
1317
704
  /**
1318
705
  * The contents of the developer message.
1319
706
  */
1320
- content: string | Array<InvokeDeploymentRequestContentMessages22>;
707
+ content: string | Array<TextContentPartSchema>;
1321
708
  /**
1322
709
  * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
1323
710
  */
1324
711
  name?: string | undefined;
1325
712
  };
1326
713
 
1327
- export const InvokeDeploymentRequestContentMessagesType = {
1328
- Text: "text",
1329
- } as const;
1330
- export type InvokeDeploymentRequestContentMessagesType = ClosedEnum<
1331
- typeof InvokeDeploymentRequestContentMessagesType
1332
- >;
1333
-
1334
- /**
1335
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1336
- */
1337
- export const InvokeDeploymentRequestContentMessages1Type = {
1338
- Ephemeral: "ephemeral",
1339
- } as const;
1340
- /**
1341
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1342
- */
1343
- export type InvokeDeploymentRequestContentMessages1Type = ClosedEnum<
1344
- typeof InvokeDeploymentRequestContentMessages1Type
1345
- >;
1346
-
1347
- /**
1348
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
1349
- *
1350
- * @remarks
1351
- *
1352
- * - `5m`: 5 minutes
1353
- * - `1h`: 1 hour
1354
- *
1355
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1356
- */
1357
- export const InvokeDeploymentRequestContentMessagesTtl = {
1358
- Fivem: "5m",
1359
- Oneh: "1h",
1360
- } as const;
1361
- /**
1362
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
1363
- *
1364
- * @remarks
1365
- *
1366
- * - `5m`: 5 minutes
1367
- * - `1h`: 1 hour
1368
- *
1369
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1370
- */
1371
- export type InvokeDeploymentRequestContentMessagesTtl = ClosedEnum<
1372
- typeof InvokeDeploymentRequestContentMessagesTtl
1373
- >;
1374
-
1375
- export type InvokeDeploymentRequestContentMessagesCacheControl = {
1376
- /**
1377
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1378
- */
1379
- type: InvokeDeploymentRequestContentMessages1Type;
1380
- /**
1381
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
1382
- *
1383
- * @remarks
1384
- *
1385
- * - `5m`: 5 minutes
1386
- * - `1h`: 1 hour
1387
- *
1388
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1389
- */
1390
- ttl?: InvokeDeploymentRequestContentMessagesTtl | undefined;
1391
- };
1392
-
1393
- export type InvokeDeploymentRequestContentMessages2 = {
1394
- type: InvokeDeploymentRequestContentMessagesType;
1395
- text: string;
1396
- cacheControl?: InvokeDeploymentRequestContentMessagesCacheControl | undefined;
1397
- };
1398
-
1399
714
  /**
1400
715
  * The contents of the system message.
1401
716
  */
1402
- export type MessagesContent =
1403
- | string
1404
- | Array<InvokeDeploymentRequestContentMessages2>;
717
+ export type MessagesContent = string | Array<TextContentPartSchema>;
1405
718
 
1406
719
  /**
1407
720
  * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
@@ -1414,7 +727,7 @@ export type MessagesSystemMessage = {
1414
727
  /**
1415
728
  * The contents of the system message.
1416
729
  */
1417
- content: string | Array<InvokeDeploymentRequestContentMessages2>;
730
+ content: string | Array<TextContentPartSchema>;
1418
731
  /**
1419
732
  * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
1420
733
  */
@@ -1431,7 +744,7 @@ export type Messages =
1431
744
  /**
1432
745
  * Metadata about the document
1433
746
  */
1434
- export type Metadata = {
747
+ export type InvokeDeploymentRequestMetadata = {
1435
748
  /**
1436
749
  * Name of the file the text is from.
1437
750
  */
@@ -1454,7 +767,7 @@ export type Documents = {
1454
767
  /**
1455
768
  * Metadata about the document
1456
769
  */
1457
- metadata?: Metadata | undefined;
770
+ metadata?: InvokeDeploymentRequestMetadata | undefined;
1458
771
  };
1459
772
 
1460
773
  export type InvokeOptions = {
@@ -1838,188 +1151,38 @@ export type InvokeDeploymentRequest = {
1838
1151
  };
1839
1152
 
1840
1153
  /** @internal */
1841
- export const InvokeDeploymentRequest2PrefixMessages5Type$inboundSchema:
1842
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessages5Type> = z
1843
- .nativeEnum(InvokeDeploymentRequest2PrefixMessages5Type);
1844
- /** @internal */
1845
- export const InvokeDeploymentRequest2PrefixMessages5Type$outboundSchema:
1846
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessages5Type> =
1847
- InvokeDeploymentRequest2PrefixMessages5Type$inboundSchema;
1848
-
1849
- /** @internal */
1850
- export const InvokeDeploymentRequest2PrefixMessages5ContentType$inboundSchema:
1851
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessages5ContentType> = z
1852
- .nativeEnum(InvokeDeploymentRequest2PrefixMessages5ContentType);
1853
- /** @internal */
1854
- export const InvokeDeploymentRequest2PrefixMessages5ContentType$outboundSchema:
1855
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessages5ContentType> =
1856
- InvokeDeploymentRequest2PrefixMessages5ContentType$inboundSchema;
1857
-
1858
- /** @internal */
1859
- export const InvokeDeploymentRequest2PrefixMessages5Ttl$inboundSchema:
1860
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessages5Ttl> = z
1861
- .nativeEnum(InvokeDeploymentRequest2PrefixMessages5Ttl);
1862
- /** @internal */
1863
- export const InvokeDeploymentRequest2PrefixMessages5Ttl$outboundSchema:
1864
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessages5Ttl> =
1865
- InvokeDeploymentRequest2PrefixMessages5Ttl$inboundSchema;
1866
-
1867
- /** @internal */
1868
- export const InvokeDeploymentRequest2PrefixMessages5CacheControl$inboundSchema:
1869
- z.ZodType<
1870
- InvokeDeploymentRequest2PrefixMessages5CacheControl,
1871
- z.ZodTypeDef,
1872
- unknown
1873
- > = z.object({
1874
- type: InvokeDeploymentRequest2PrefixMessages5ContentType$inboundSchema,
1875
- ttl: InvokeDeploymentRequest2PrefixMessages5Ttl$inboundSchema.default("5m"),
1876
- });
1877
- /** @internal */
1878
- export type InvokeDeploymentRequest2PrefixMessages5CacheControl$Outbound = {
1879
- type: string;
1880
- ttl: string;
1881
- };
1882
-
1883
- /** @internal */
1884
- export const InvokeDeploymentRequest2PrefixMessages5CacheControl$outboundSchema:
1885
- z.ZodType<
1886
- InvokeDeploymentRequest2PrefixMessages5CacheControl$Outbound,
1887
- z.ZodTypeDef,
1888
- InvokeDeploymentRequest2PrefixMessages5CacheControl
1889
- > = z.object({
1890
- type: InvokeDeploymentRequest2PrefixMessages5ContentType$outboundSchema,
1891
- ttl: InvokeDeploymentRequest2PrefixMessages5Ttl$outboundSchema.default(
1892
- "5m",
1893
- ),
1894
- });
1895
-
1896
- export function invokeDeploymentRequest2PrefixMessages5CacheControlToJSON(
1897
- invokeDeploymentRequest2PrefixMessages5CacheControl:
1898
- InvokeDeploymentRequest2PrefixMessages5CacheControl,
1899
- ): string {
1900
- return JSON.stringify(
1901
- InvokeDeploymentRequest2PrefixMessages5CacheControl$outboundSchema.parse(
1902
- invokeDeploymentRequest2PrefixMessages5CacheControl,
1903
- ),
1904
- );
1905
- }
1906
- export function invokeDeploymentRequest2PrefixMessages5CacheControlFromJSON(
1907
- jsonString: string,
1908
- ): SafeParseResult<
1909
- InvokeDeploymentRequest2PrefixMessages5CacheControl,
1910
- SDKValidationError
1911
- > {
1912
- return safeParse(
1913
- jsonString,
1914
- (x) =>
1915
- InvokeDeploymentRequest2PrefixMessages5CacheControl$inboundSchema.parse(
1916
- JSON.parse(x),
1917
- ),
1918
- `Failed to parse 'InvokeDeploymentRequest2PrefixMessages5CacheControl' from JSON`,
1919
- );
1920
- }
1921
-
1922
- /** @internal */
1923
- export const InvokeDeploymentRequest21$inboundSchema: z.ZodType<
1924
- InvokeDeploymentRequest21,
1154
+ export const InvokeDeploymentRequestContent2$inboundSchema: z.ZodType<
1155
+ InvokeDeploymentRequestContent2,
1925
1156
  z.ZodTypeDef,
1926
1157
  unknown
1927
- > = z.object({
1928
- type: InvokeDeploymentRequest2PrefixMessages5Type$inboundSchema,
1929
- text: z.string(),
1930
- cache_control: z.lazy(() =>
1931
- InvokeDeploymentRequest2PrefixMessages5CacheControl$inboundSchema
1932
- ).optional(),
1933
- }).transform((v) => {
1934
- return remap$(v, {
1935
- "cache_control": "cacheControl",
1936
- });
1937
- });
1158
+ > = TextContentPartSchema$inboundSchema;
1938
1159
  /** @internal */
1939
- export type InvokeDeploymentRequest21$Outbound = {
1940
- type: string;
1941
- text: string;
1942
- cache_control?:
1943
- | InvokeDeploymentRequest2PrefixMessages5CacheControl$Outbound
1944
- | undefined;
1945
- };
1160
+ export type InvokeDeploymentRequestContent2$Outbound =
1161
+ TextContentPartSchema$Outbound;
1946
1162
 
1947
1163
  /** @internal */
1948
- export const InvokeDeploymentRequest21$outboundSchema: z.ZodType<
1949
- InvokeDeploymentRequest21$Outbound,
1164
+ export const InvokeDeploymentRequestContent2$outboundSchema: z.ZodType<
1165
+ InvokeDeploymentRequestContent2$Outbound,
1950
1166
  z.ZodTypeDef,
1951
- InvokeDeploymentRequest21
1952
- > = z.object({
1953
- type: InvokeDeploymentRequest2PrefixMessages5Type$outboundSchema,
1954
- text: z.string(),
1955
- cacheControl: z.lazy(() =>
1956
- InvokeDeploymentRequest2PrefixMessages5CacheControl$outboundSchema
1957
- ).optional(),
1958
- }).transform((v) => {
1959
- return remap$(v, {
1960
- cacheControl: "cache_control",
1961
- });
1962
- });
1963
-
1964
- export function invokeDeploymentRequest21ToJSON(
1965
- invokeDeploymentRequest21: InvokeDeploymentRequest21,
1966
- ): string {
1967
- return JSON.stringify(
1968
- InvokeDeploymentRequest21$outboundSchema.parse(invokeDeploymentRequest21),
1969
- );
1970
- }
1971
- export function invokeDeploymentRequest21FromJSON(
1972
- jsonString: string,
1973
- ): SafeParseResult<InvokeDeploymentRequest21, SDKValidationError> {
1974
- return safeParse(
1975
- jsonString,
1976
- (x) => InvokeDeploymentRequest21$inboundSchema.parse(JSON.parse(x)),
1977
- `Failed to parse 'InvokeDeploymentRequest21' from JSON`,
1978
- );
1979
- }
1980
-
1981
- /** @internal */
1982
- export const InvokeDeploymentRequestContentPrefixMessages52$inboundSchema:
1983
- z.ZodType<
1984
- InvokeDeploymentRequestContentPrefixMessages52,
1985
- z.ZodTypeDef,
1986
- unknown
1987
- > = z.lazy(() => InvokeDeploymentRequest21$inboundSchema);
1988
- /** @internal */
1989
- export type InvokeDeploymentRequestContentPrefixMessages52$Outbound =
1990
- InvokeDeploymentRequest21$Outbound;
1991
-
1992
- /** @internal */
1993
- export const InvokeDeploymentRequestContentPrefixMessages52$outboundSchema:
1994
- z.ZodType<
1995
- InvokeDeploymentRequestContentPrefixMessages52$Outbound,
1996
- z.ZodTypeDef,
1997
- InvokeDeploymentRequestContentPrefixMessages52
1998
- > = z.lazy(() => InvokeDeploymentRequest21$outboundSchema);
1167
+ InvokeDeploymentRequestContent2
1168
+ > = TextContentPartSchema$outboundSchema;
1999
1169
 
2000
- export function invokeDeploymentRequestContentPrefixMessages52ToJSON(
2001
- invokeDeploymentRequestContentPrefixMessages52:
2002
- InvokeDeploymentRequestContentPrefixMessages52,
1170
+ export function invokeDeploymentRequestContent2ToJSON(
1171
+ invokeDeploymentRequestContent2: InvokeDeploymentRequestContent2,
2003
1172
  ): string {
2004
1173
  return JSON.stringify(
2005
- InvokeDeploymentRequestContentPrefixMessages52$outboundSchema.parse(
2006
- invokeDeploymentRequestContentPrefixMessages52,
1174
+ InvokeDeploymentRequestContent2$outboundSchema.parse(
1175
+ invokeDeploymentRequestContent2,
2007
1176
  ),
2008
1177
  );
2009
1178
  }
2010
- export function invokeDeploymentRequestContentPrefixMessages52FromJSON(
1179
+ export function invokeDeploymentRequestContent2FromJSON(
2011
1180
  jsonString: string,
2012
- ): SafeParseResult<
2013
- InvokeDeploymentRequestContentPrefixMessages52,
2014
- SDKValidationError
2015
- > {
1181
+ ): SafeParseResult<InvokeDeploymentRequestContent2, SDKValidationError> {
2016
1182
  return safeParse(
2017
1183
  jsonString,
2018
- (x) =>
2019
- InvokeDeploymentRequestContentPrefixMessages52$inboundSchema.parse(
2020
- JSON.parse(x),
2021
- ),
2022
- `Failed to parse 'InvokeDeploymentRequestContentPrefixMessages52' from JSON`,
1184
+ (x) => InvokeDeploymentRequestContent2$inboundSchema.parse(JSON.parse(x)),
1185
+ `Failed to parse 'InvokeDeploymentRequestContent2' from JSON`,
2023
1186
  );
2024
1187
  }
2025
1188
 
@@ -2029,14 +1192,11 @@ export const InvokeDeploymentRequestPrefixMessages5Content$inboundSchema:
2029
1192
  InvokeDeploymentRequestPrefixMessages5Content,
2030
1193
  z.ZodTypeDef,
2031
1194
  unknown
2032
- > = z.union([
2033
- z.string(),
2034
- z.array(z.lazy(() => InvokeDeploymentRequest21$inboundSchema)),
2035
- ]);
1195
+ > = z.union([z.string(), z.array(TextContentPartSchema$inboundSchema)]);
2036
1196
  /** @internal */
2037
1197
  export type InvokeDeploymentRequestPrefixMessages5Content$Outbound =
2038
1198
  | string
2039
- | Array<InvokeDeploymentRequest21$Outbound>;
1199
+ | Array<TextContentPartSchema$Outbound>;
2040
1200
 
2041
1201
  /** @internal */
2042
1202
  export const InvokeDeploymentRequestPrefixMessages5Content$outboundSchema:
@@ -2044,10 +1204,7 @@ export const InvokeDeploymentRequestPrefixMessages5Content$outboundSchema:
2044
1204
  InvokeDeploymentRequestPrefixMessages5Content$Outbound,
2045
1205
  z.ZodTypeDef,
2046
1206
  InvokeDeploymentRequestPrefixMessages5Content
2047
- > = z.union([
2048
- z.string(),
2049
- z.array(z.lazy(() => InvokeDeploymentRequest21$outboundSchema)),
2050
- ]);
1207
+ > = z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]);
2051
1208
 
2052
1209
  export function invokeDeploymentRequestPrefixMessages5ContentToJSON(
2053
1210
  invokeDeploymentRequestPrefixMessages5Content:
@@ -2142,10 +1299,7 @@ export const ToolMessage$inboundSchema: z.ZodType<
2142
1299
  unknown
2143
1300
  > = z.object({
2144
1301
  role: z.literal("tool"),
2145
- content: z.union([
2146
- z.string(),
2147
- z.array(z.lazy(() => InvokeDeploymentRequest21$inboundSchema)),
2148
- ]),
1302
+ content: z.union([z.string(), z.array(TextContentPartSchema$inboundSchema)]),
2149
1303
  tool_call_id: z.string(),
2150
1304
  cache_control: z.lazy(() => PrefixMessagesCacheControl$inboundSchema)
2151
1305
  .optional(),
@@ -2158,7 +1312,7 @@ export const ToolMessage$inboundSchema: z.ZodType<
2158
1312
  /** @internal */
2159
1313
  export type ToolMessage$Outbound = {
2160
1314
  role: "tool";
2161
- content: string | Array<InvokeDeploymentRequest21$Outbound>;
1315
+ content: string | Array<TextContentPartSchema$Outbound>;
2162
1316
  tool_call_id: string;
2163
1317
  cache_control?: PrefixMessagesCacheControl$Outbound | undefined;
2164
1318
  };
@@ -2170,10 +1324,7 @@ export const ToolMessage$outboundSchema: z.ZodType<
2170
1324
  ToolMessage
2171
1325
  > = z.object({
2172
1326
  role: z.literal("tool"),
2173
- content: z.union([
2174
- z.string(),
2175
- z.array(z.lazy(() => InvokeDeploymentRequest21$outboundSchema)),
2176
- ]),
1327
+ content: z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]),
2177
1328
  toolCallId: z.string(),
2178
1329
  cacheControl: z.lazy(() => PrefixMessagesCacheControl$outboundSchema)
2179
1330
  .optional(),
@@ -2192,186 +1343,55 @@ export function toolMessageFromJSON(
2192
1343
  ): SafeParseResult<ToolMessage, SDKValidationError> {
2193
1344
  return safeParse(
2194
1345
  jsonString,
2195
- (x) => ToolMessage$inboundSchema.parse(JSON.parse(x)),
2196
- `Failed to parse 'ToolMessage' from JSON`,
2197
- );
2198
- }
2199
-
2200
- /** @internal */
2201
- export const InvokeDeploymentRequest2PrefixMessages4Type$inboundSchema:
2202
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessages4Type> = z
2203
- .nativeEnum(InvokeDeploymentRequest2PrefixMessages4Type);
2204
- /** @internal */
2205
- export const InvokeDeploymentRequest2PrefixMessages4Type$outboundSchema:
2206
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessages4Type> =
2207
- InvokeDeploymentRequest2PrefixMessages4Type$inboundSchema;
2208
-
2209
- /** @internal */
2210
- export const InvokeDeploymentRequest2PrefixMessagesTtl$inboundSchema:
2211
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessagesTtl> = z
2212
- .nativeEnum(InvokeDeploymentRequest2PrefixMessagesTtl);
2213
- /** @internal */
2214
- export const InvokeDeploymentRequest2PrefixMessagesTtl$outboundSchema:
2215
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessagesTtl> =
2216
- InvokeDeploymentRequest2PrefixMessagesTtl$inboundSchema;
2217
-
2218
- /** @internal */
2219
- export const InvokeDeploymentRequest2PrefixMessagesCacheControl$inboundSchema:
2220
- z.ZodType<
2221
- InvokeDeploymentRequest2PrefixMessagesCacheControl,
2222
- z.ZodTypeDef,
2223
- unknown
2224
- > = z.object({
2225
- type: InvokeDeploymentRequest2PrefixMessages4Type$inboundSchema,
2226
- ttl: InvokeDeploymentRequest2PrefixMessagesTtl$inboundSchema.default("5m"),
2227
- });
2228
- /** @internal */
2229
- export type InvokeDeploymentRequest2PrefixMessagesCacheControl$Outbound = {
2230
- type: string;
2231
- ttl: string;
2232
- };
2233
-
2234
- /** @internal */
2235
- export const InvokeDeploymentRequest2PrefixMessagesCacheControl$outboundSchema:
2236
- z.ZodType<
2237
- InvokeDeploymentRequest2PrefixMessagesCacheControl$Outbound,
2238
- z.ZodTypeDef,
2239
- InvokeDeploymentRequest2PrefixMessagesCacheControl
2240
- > = z.object({
2241
- type: InvokeDeploymentRequest2PrefixMessages4Type$outboundSchema,
2242
- ttl: InvokeDeploymentRequest2PrefixMessagesTtl$outboundSchema.default("5m"),
2243
- });
2244
-
2245
- export function invokeDeploymentRequest2PrefixMessagesCacheControlToJSON(
2246
- invokeDeploymentRequest2PrefixMessagesCacheControl:
2247
- InvokeDeploymentRequest2PrefixMessagesCacheControl,
2248
- ): string {
2249
- return JSON.stringify(
2250
- InvokeDeploymentRequest2PrefixMessagesCacheControl$outboundSchema.parse(
2251
- invokeDeploymentRequest2PrefixMessagesCacheControl,
2252
- ),
2253
- );
2254
- }
2255
- export function invokeDeploymentRequest2PrefixMessagesCacheControlFromJSON(
2256
- jsonString: string,
2257
- ): SafeParseResult<
2258
- InvokeDeploymentRequest2PrefixMessagesCacheControl,
2259
- SDKValidationError
2260
- > {
2261
- return safeParse(
2262
- jsonString,
2263
- (x) =>
2264
- InvokeDeploymentRequest2PrefixMessagesCacheControl$inboundSchema.parse(
2265
- JSON.parse(x),
2266
- ),
2267
- `Failed to parse 'InvokeDeploymentRequest2PrefixMessagesCacheControl' from JSON`,
2268
- );
2269
- }
2270
-
2271
- /** @internal */
2272
- export const Two1$inboundSchema: z.ZodType<Two1, z.ZodTypeDef, unknown> = z
2273
- .object({
2274
- type: z.literal("text"),
2275
- text: z.string(),
2276
- cache_control: z.lazy(() =>
2277
- InvokeDeploymentRequest2PrefixMessagesCacheControl$inboundSchema
2278
- ).optional(),
2279
- }).transform((v) => {
2280
- return remap$(v, {
2281
- "cache_control": "cacheControl",
2282
- });
2283
- });
2284
- /** @internal */
2285
- export type Two1$Outbound = {
2286
- type: "text";
2287
- text: string;
2288
- cache_control?:
2289
- | InvokeDeploymentRequest2PrefixMessagesCacheControl$Outbound
2290
- | undefined;
2291
- };
2292
-
2293
- /** @internal */
2294
- export const Two1$outboundSchema: z.ZodType<Two1$Outbound, z.ZodTypeDef, Two1> =
2295
- z.object({
2296
- type: z.literal("text"),
2297
- text: z.string(),
2298
- cacheControl: z.lazy(() =>
2299
- InvokeDeploymentRequest2PrefixMessagesCacheControl$outboundSchema
2300
- ).optional(),
2301
- }).transform((v) => {
2302
- return remap$(v, {
2303
- cacheControl: "cache_control",
2304
- });
2305
- });
2306
-
2307
- export function two1ToJSON(two1: Two1): string {
2308
- return JSON.stringify(Two1$outboundSchema.parse(two1));
2309
- }
2310
- export function two1FromJSON(
2311
- jsonString: string,
2312
- ): SafeParseResult<Two1, SDKValidationError> {
2313
- return safeParse(
2314
- jsonString,
2315
- (x) => Two1$inboundSchema.parse(JSON.parse(x)),
2316
- `Failed to parse 'Two1' from JSON`,
1346
+ (x) => ToolMessage$inboundSchema.parse(JSON.parse(x)),
1347
+ `Failed to parse 'ToolMessage' from JSON`,
2317
1348
  );
2318
1349
  }
2319
1350
 
2320
1351
  /** @internal */
2321
- export const InvokeDeploymentRequestContentPrefixMessages2$inboundSchema:
2322
- z.ZodType<
2323
- InvokeDeploymentRequestContentPrefixMessages2,
2324
- z.ZodTypeDef,
2325
- unknown
2326
- > = z.union([
2327
- z.lazy(() => Two1$inboundSchema),
2328
- RefusalPartSchema$inboundSchema,
2329
- ReasoningPartSchema$inboundSchema,
2330
- RedactedReasoningPartSchema$inboundSchema,
2331
- ]);
1352
+ export const Content2$inboundSchema: z.ZodType<
1353
+ Content2,
1354
+ z.ZodTypeDef,
1355
+ unknown
1356
+ > = z.union([
1357
+ TextContentPartSchema$inboundSchema.and(
1358
+ z.object({ type: z.literal("text") }),
1359
+ ),
1360
+ RefusalPartSchema$inboundSchema,
1361
+ ReasoningPartSchema$inboundSchema,
1362
+ RedactedReasoningPartSchema$inboundSchema,
1363
+ ]);
2332
1364
  /** @internal */
2333
- export type InvokeDeploymentRequestContentPrefixMessages2$Outbound =
2334
- | Two1$Outbound
1365
+ export type Content2$Outbound =
1366
+ | (TextContentPartSchema$Outbound & { type: "text" })
2335
1367
  | RefusalPartSchema$Outbound
2336
1368
  | ReasoningPartSchema$Outbound
2337
1369
  | RedactedReasoningPartSchema$Outbound;
2338
1370
 
2339
1371
  /** @internal */
2340
- export const InvokeDeploymentRequestContentPrefixMessages2$outboundSchema:
2341
- z.ZodType<
2342
- InvokeDeploymentRequestContentPrefixMessages2$Outbound,
2343
- z.ZodTypeDef,
2344
- InvokeDeploymentRequestContentPrefixMessages2
2345
- > = z.union([
2346
- z.lazy(() => Two1$outboundSchema),
2347
- RefusalPartSchema$outboundSchema,
2348
- ReasoningPartSchema$outboundSchema,
2349
- RedactedReasoningPartSchema$outboundSchema,
2350
- ]);
1372
+ export const Content2$outboundSchema: z.ZodType<
1373
+ Content2$Outbound,
1374
+ z.ZodTypeDef,
1375
+ Content2
1376
+ > = z.union([
1377
+ TextContentPartSchema$outboundSchema.and(
1378
+ z.object({ type: z.literal("text") }),
1379
+ ),
1380
+ RefusalPartSchema$outboundSchema,
1381
+ ReasoningPartSchema$outboundSchema,
1382
+ RedactedReasoningPartSchema$outboundSchema,
1383
+ ]);
2351
1384
 
2352
- export function invokeDeploymentRequestContentPrefixMessages2ToJSON(
2353
- invokeDeploymentRequestContentPrefixMessages2:
2354
- InvokeDeploymentRequestContentPrefixMessages2,
2355
- ): string {
2356
- return JSON.stringify(
2357
- InvokeDeploymentRequestContentPrefixMessages2$outboundSchema.parse(
2358
- invokeDeploymentRequestContentPrefixMessages2,
2359
- ),
2360
- );
1385
+ export function content2ToJSON(content2: Content2): string {
1386
+ return JSON.stringify(Content2$outboundSchema.parse(content2));
2361
1387
  }
2362
- export function invokeDeploymentRequestContentPrefixMessages2FromJSON(
1388
+ export function content2FromJSON(
2363
1389
  jsonString: string,
2364
- ): SafeParseResult<
2365
- InvokeDeploymentRequestContentPrefixMessages2,
2366
- SDKValidationError
2367
- > {
1390
+ ): SafeParseResult<Content2, SDKValidationError> {
2368
1391
  return safeParse(
2369
1392
  jsonString,
2370
- (x) =>
2371
- InvokeDeploymentRequestContentPrefixMessages2$inboundSchema.parse(
2372
- JSON.parse(x),
2373
- ),
2374
- `Failed to parse 'InvokeDeploymentRequestContentPrefixMessages2' from JSON`,
1393
+ (x) => Content2$inboundSchema.parse(JSON.parse(x)),
1394
+ `Failed to parse 'Content2' from JSON`,
2375
1395
  );
2376
1396
  }
2377
1397
 
@@ -2383,18 +1403,22 @@ export const InvokeDeploymentRequestPrefixMessages4Content$inboundSchema:
2383
1403
  unknown
2384
1404
  > = z.union([
2385
1405
  z.string(),
2386
- z.array(z.union([
2387
- z.lazy(() => Two1$inboundSchema),
2388
- RefusalPartSchema$inboundSchema,
2389
- ReasoningPartSchema$inboundSchema,
2390
- RedactedReasoningPartSchema$inboundSchema,
2391
- ])),
1406
+ z.array(
1407
+ z.union([
1408
+ TextContentPartSchema$inboundSchema.and(
1409
+ z.object({ type: z.literal("text") }),
1410
+ ),
1411
+ RefusalPartSchema$inboundSchema,
1412
+ ReasoningPartSchema$inboundSchema,
1413
+ RedactedReasoningPartSchema$inboundSchema,
1414
+ ]),
1415
+ ),
2392
1416
  ]);
2393
1417
  /** @internal */
2394
1418
  export type InvokeDeploymentRequestPrefixMessages4Content$Outbound =
2395
1419
  | string
2396
1420
  | Array<
2397
- | Two1$Outbound
1421
+ | (TextContentPartSchema$Outbound & { type: "text" })
2398
1422
  | RefusalPartSchema$Outbound
2399
1423
  | ReasoningPartSchema$Outbound
2400
1424
  | RedactedReasoningPartSchema$Outbound
@@ -2408,12 +1432,16 @@ export const InvokeDeploymentRequestPrefixMessages4Content$outboundSchema:
2408
1432
  InvokeDeploymentRequestPrefixMessages4Content
2409
1433
  > = z.union([
2410
1434
  z.string(),
2411
- z.array(z.union([
2412
- z.lazy(() => Two1$outboundSchema),
2413
- RefusalPartSchema$outboundSchema,
2414
- ReasoningPartSchema$outboundSchema,
2415
- RedactedReasoningPartSchema$outboundSchema,
2416
- ])),
1435
+ z.array(
1436
+ z.union([
1437
+ TextContentPartSchema$outboundSchema.and(
1438
+ z.object({ type: z.literal("text") }),
1439
+ ),
1440
+ RefusalPartSchema$outboundSchema,
1441
+ ReasoningPartSchema$outboundSchema,
1442
+ RedactedReasoningPartSchema$outboundSchema,
1443
+ ]),
1444
+ ),
2417
1445
  ]);
2418
1446
 
2419
1447
  export function invokeDeploymentRequestPrefixMessages4ContentToJSON(
@@ -2588,7 +1616,9 @@ export const AssistantMessage$inboundSchema: z.ZodType<
2588
1616
  z.string(),
2589
1617
  z.array(
2590
1618
  z.union([
2591
- z.lazy(() => Two1$inboundSchema),
1619
+ TextContentPartSchema$inboundSchema.and(
1620
+ z.object({ type: z.literal("text") }),
1621
+ ),
2592
1622
  RefusalPartSchema$inboundSchema,
2593
1623
  ReasoningPartSchema$inboundSchema,
2594
1624
  RedactedReasoningPartSchema$inboundSchema,
@@ -2611,7 +1641,7 @@ export type AssistantMessage$Outbound = {
2611
1641
  content?:
2612
1642
  | string
2613
1643
  | Array<
2614
- | Two1$Outbound
1644
+ | (TextContentPartSchema$Outbound & { type: "text" })
2615
1645
  | RefusalPartSchema$Outbound
2616
1646
  | ReasoningPartSchema$Outbound
2617
1647
  | RedactedReasoningPartSchema$Outbound
@@ -2636,7 +1666,9 @@ export const AssistantMessage$outboundSchema: z.ZodType<
2636
1666
  z.string(),
2637
1667
  z.array(
2638
1668
  z.union([
2639
- z.lazy(() => Two1$outboundSchema),
1669
+ TextContentPartSchema$outboundSchema.and(
1670
+ z.object({ type: z.literal("text") }),
1671
+ ),
2640
1672
  RefusalPartSchema$outboundSchema,
2641
1673
  ReasoningPartSchema$outboundSchema,
2642
1674
  RedactedReasoningPartSchema$outboundSchema,
@@ -2673,65 +1705,58 @@ export function assistantMessageFromJSON(
2673
1705
  }
2674
1706
 
2675
1707
  /** @internal */
2676
- export const InvokeDeploymentRequest2PrefixMessages3Type$inboundSchema:
2677
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessages3Type> = z
2678
- .nativeEnum(InvokeDeploymentRequest2PrefixMessages3Type);
1708
+ export const InvokeDeploymentRequest2PrefixMessagesType$inboundSchema:
1709
+ z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessagesType> = z
1710
+ .nativeEnum(InvokeDeploymentRequest2PrefixMessagesType);
2679
1711
  /** @internal */
2680
- export const InvokeDeploymentRequest2PrefixMessages3Type$outboundSchema:
2681
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessages3Type> =
2682
- InvokeDeploymentRequest2PrefixMessages3Type$inboundSchema;
1712
+ export const InvokeDeploymentRequest2PrefixMessagesType$outboundSchema:
1713
+ z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessagesType> =
1714
+ InvokeDeploymentRequest2PrefixMessagesType$inboundSchema;
2683
1715
 
2684
1716
  /** @internal */
2685
- export const InvokeDeploymentRequest2Ttl$inboundSchema: z.ZodNativeEnum<
2686
- typeof InvokeDeploymentRequest2Ttl
2687
- > = z.nativeEnum(InvokeDeploymentRequest2Ttl);
1717
+ export const TwoTtl$inboundSchema: z.ZodNativeEnum<typeof TwoTtl> = z
1718
+ .nativeEnum(TwoTtl);
2688
1719
  /** @internal */
2689
- export const InvokeDeploymentRequest2Ttl$outboundSchema: z.ZodNativeEnum<
2690
- typeof InvokeDeploymentRequest2Ttl
2691
- > = InvokeDeploymentRequest2Ttl$inboundSchema;
1720
+ export const TwoTtl$outboundSchema: z.ZodNativeEnum<typeof TwoTtl> =
1721
+ TwoTtl$inboundSchema;
2692
1722
 
2693
1723
  /** @internal */
2694
- export const InvokeDeploymentRequest2CacheControl$inboundSchema: z.ZodType<
2695
- InvokeDeploymentRequest2CacheControl,
1724
+ export const TwoCacheControl$inboundSchema: z.ZodType<
1725
+ TwoCacheControl,
2696
1726
  z.ZodTypeDef,
2697
1727
  unknown
2698
1728
  > = z.object({
2699
- type: InvokeDeploymentRequest2PrefixMessages3Type$inboundSchema,
2700
- ttl: InvokeDeploymentRequest2Ttl$inboundSchema.default("5m"),
1729
+ type: InvokeDeploymentRequest2PrefixMessagesType$inboundSchema,
1730
+ ttl: TwoTtl$inboundSchema.default("5m"),
2701
1731
  });
2702
1732
  /** @internal */
2703
- export type InvokeDeploymentRequest2CacheControl$Outbound = {
1733
+ export type TwoCacheControl$Outbound = {
2704
1734
  type: string;
2705
1735
  ttl: string;
2706
1736
  };
2707
1737
 
2708
1738
  /** @internal */
2709
- export const InvokeDeploymentRequest2CacheControl$outboundSchema: z.ZodType<
2710
- InvokeDeploymentRequest2CacheControl$Outbound,
1739
+ export const TwoCacheControl$outboundSchema: z.ZodType<
1740
+ TwoCacheControl$Outbound,
2711
1741
  z.ZodTypeDef,
2712
- InvokeDeploymentRequest2CacheControl
1742
+ TwoCacheControl
2713
1743
  > = z.object({
2714
- type: InvokeDeploymentRequest2PrefixMessages3Type$outboundSchema,
2715
- ttl: InvokeDeploymentRequest2Ttl$outboundSchema.default("5m"),
1744
+ type: InvokeDeploymentRequest2PrefixMessagesType$outboundSchema,
1745
+ ttl: TwoTtl$outboundSchema.default("5m"),
2716
1746
  });
2717
1747
 
2718
- export function invokeDeploymentRequest2CacheControlToJSON(
2719
- invokeDeploymentRequest2CacheControl: InvokeDeploymentRequest2CacheControl,
1748
+ export function twoCacheControlToJSON(
1749
+ twoCacheControl: TwoCacheControl,
2720
1750
  ): string {
2721
- return JSON.stringify(
2722
- InvokeDeploymentRequest2CacheControl$outboundSchema.parse(
2723
- invokeDeploymentRequest2CacheControl,
2724
- ),
2725
- );
1751
+ return JSON.stringify(TwoCacheControl$outboundSchema.parse(twoCacheControl));
2726
1752
  }
2727
- export function invokeDeploymentRequest2CacheControlFromJSON(
1753
+ export function twoCacheControlFromJSON(
2728
1754
  jsonString: string,
2729
- ): SafeParseResult<InvokeDeploymentRequest2CacheControl, SDKValidationError> {
1755
+ ): SafeParseResult<TwoCacheControl, SDKValidationError> {
2730
1756
  return safeParse(
2731
1757
  jsonString,
2732
- (x) =>
2733
- InvokeDeploymentRequest2CacheControl$inboundSchema.parse(JSON.parse(x)),
2734
- `Failed to parse 'InvokeDeploymentRequest2CacheControl' from JSON`,
1758
+ (x) => TwoCacheControl$inboundSchema.parse(JSON.parse(x)),
1759
+ `Failed to parse 'TwoCacheControl' from JSON`,
2735
1760
  );
2736
1761
  }
2737
1762
 
@@ -2739,9 +1764,7 @@ export function invokeDeploymentRequest2CacheControlFromJSON(
2739
1764
  export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
2740
1765
  .object({
2741
1766
  type: z.literal("file"),
2742
- cache_control: z.lazy(() =>
2743
- InvokeDeploymentRequest2CacheControl$inboundSchema
2744
- ).optional(),
1767
+ cache_control: z.lazy(() => TwoCacheControl$inboundSchema).optional(),
2745
1768
  file: FileContentPartSchema$inboundSchema,
2746
1769
  }).transform((v) => {
2747
1770
  return remap$(v, {
@@ -2751,7 +1774,7 @@ export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
2751
1774
  /** @internal */
2752
1775
  export type Four$Outbound = {
2753
1776
  type: "file";
2754
- cache_control?: InvokeDeploymentRequest2CacheControl$Outbound | undefined;
1777
+ cache_control?: TwoCacheControl$Outbound | undefined;
2755
1778
  file: FileContentPartSchema$Outbound;
2756
1779
  };
2757
1780
 
@@ -2759,9 +1782,7 @@ export type Four$Outbound = {
2759
1782
  export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
2760
1783
  z.object({
2761
1784
  type: z.literal("file"),
2762
- cacheControl: z.lazy(() =>
2763
- InvokeDeploymentRequest2CacheControl$outboundSchema
2764
- ).optional(),
1785
+ cacheControl: z.lazy(() => TwoCacheControl$outboundSchema).optional(),
2765
1786
  file: FileContentPartSchema$outboundSchema,
2766
1787
  }).transform((v) => {
2767
1788
  return remap$(v, {
@@ -2783,169 +1804,44 @@ export function fourFromJSON(
2783
1804
  }
2784
1805
 
2785
1806
  /** @internal */
2786
- export const InvokeDeploymentRequest2PrefixMessages3ContentType$inboundSchema:
2787
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessages3ContentType> = z
2788
- .nativeEnum(InvokeDeploymentRequest2PrefixMessages3ContentType);
2789
- /** @internal */
2790
- export const InvokeDeploymentRequest2PrefixMessages3ContentType$outboundSchema:
2791
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessages3ContentType> =
2792
- InvokeDeploymentRequest2PrefixMessages3ContentType$inboundSchema;
2793
-
2794
- /** @internal */
2795
- export const TwoTtl$inboundSchema: z.ZodNativeEnum<typeof TwoTtl> = z
2796
- .nativeEnum(TwoTtl);
2797
- /** @internal */
2798
- export const TwoTtl$outboundSchema: z.ZodNativeEnum<typeof TwoTtl> =
2799
- TwoTtl$inboundSchema;
2800
-
2801
- /** @internal */
2802
- export const TwoCacheControl$inboundSchema: z.ZodType<
2803
- TwoCacheControl,
2804
- z.ZodTypeDef,
2805
- unknown
2806
- > = z.object({
2807
- type: InvokeDeploymentRequest2PrefixMessages3ContentType$inboundSchema,
2808
- ttl: TwoTtl$inboundSchema.default("5m"),
2809
- });
2810
- /** @internal */
2811
- export type TwoCacheControl$Outbound = {
2812
- type: string;
2813
- ttl: string;
2814
- };
2815
-
2816
- /** @internal */
2817
- export const TwoCacheControl$outboundSchema: z.ZodType<
2818
- TwoCacheControl$Outbound,
2819
- z.ZodTypeDef,
2820
- TwoCacheControl
2821
- > = z.object({
2822
- type: InvokeDeploymentRequest2PrefixMessages3ContentType$outboundSchema,
2823
- ttl: TwoTtl$outboundSchema.default("5m"),
2824
- });
2825
-
2826
- export function twoCacheControlToJSON(
2827
- twoCacheControl: TwoCacheControl,
2828
- ): string {
2829
- return JSON.stringify(TwoCacheControl$outboundSchema.parse(twoCacheControl));
2830
- }
2831
- export function twoCacheControlFromJSON(
2832
- jsonString: string,
2833
- ): SafeParseResult<TwoCacheControl, SDKValidationError> {
2834
- return safeParse(
2835
- jsonString,
2836
- (x) => TwoCacheControl$inboundSchema.parse(JSON.parse(x)),
2837
- `Failed to parse 'TwoCacheControl' from JSON`,
2838
- );
2839
- }
2840
-
2841
- /** @internal */
2842
- export const InvokeDeploymentRequest2PrefixMessages1$inboundSchema: z.ZodType<
2843
- InvokeDeploymentRequest2PrefixMessages1,
2844
- z.ZodTypeDef,
2845
- unknown
2846
- > = z.object({
2847
- type: z.literal("text"),
2848
- text: z.string(),
2849
- cache_control: z.lazy(() => TwoCacheControl$inboundSchema).optional(),
2850
- }).transform((v) => {
2851
- return remap$(v, {
2852
- "cache_control": "cacheControl",
2853
- });
2854
- });
2855
- /** @internal */
2856
- export type InvokeDeploymentRequest2PrefixMessages1$Outbound = {
2857
- type: "text";
2858
- text: string;
2859
- cache_control?: TwoCacheControl$Outbound | undefined;
2860
- };
2861
-
2862
- /** @internal */
2863
- export const InvokeDeploymentRequest2PrefixMessages1$outboundSchema: z.ZodType<
2864
- InvokeDeploymentRequest2PrefixMessages1$Outbound,
2865
- z.ZodTypeDef,
2866
- InvokeDeploymentRequest2PrefixMessages1
2867
- > = z.object({
2868
- type: z.literal("text"),
2869
- text: z.string(),
2870
- cacheControl: z.lazy(() => TwoCacheControl$outboundSchema).optional(),
2871
- }).transform((v) => {
2872
- return remap$(v, {
2873
- cacheControl: "cache_control",
2874
- });
2875
- });
2876
-
2877
- export function invokeDeploymentRequest2PrefixMessages1ToJSON(
2878
- invokeDeploymentRequest2PrefixMessages1:
2879
- InvokeDeploymentRequest2PrefixMessages1,
2880
- ): string {
2881
- return JSON.stringify(
2882
- InvokeDeploymentRequest2PrefixMessages1$outboundSchema.parse(
2883
- invokeDeploymentRequest2PrefixMessages1,
1807
+ export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z.union(
1808
+ [
1809
+ TextContentPartSchema$inboundSchema.and(
1810
+ z.object({ type: z.literal("text") }),
2884
1811
  ),
2885
- );
2886
- }
2887
- export function invokeDeploymentRequest2PrefixMessages1FromJSON(
2888
- jsonString: string,
2889
- ): SafeParseResult<
2890
- InvokeDeploymentRequest2PrefixMessages1,
2891
- SDKValidationError
2892
- > {
2893
- return safeParse(
2894
- jsonString,
2895
- (x) =>
2896
- InvokeDeploymentRequest2PrefixMessages1$inboundSchema.parse(
2897
- JSON.parse(x),
2898
- ),
2899
- `Failed to parse 'InvokeDeploymentRequest2PrefixMessages1' from JSON`,
2900
- );
2901
- }
2902
-
2903
- /** @internal */
2904
- export const InvokeDeploymentRequestContent2$inboundSchema: z.ZodType<
2905
- InvokeDeploymentRequestContent2,
2906
- z.ZodTypeDef,
2907
- unknown
2908
- > = z.union([
2909
- z.lazy(() => InvokeDeploymentRequest2PrefixMessages1$inboundSchema),
2910
- ImageContentPartSchema$inboundSchema,
2911
- AudioContentPartSchema$inboundSchema,
2912
- z.lazy(() => Four$inboundSchema),
2913
- ]);
1812
+ ImageContentPartSchema$inboundSchema,
1813
+ AudioContentPartSchema$inboundSchema,
1814
+ z.lazy(() => Four$inboundSchema),
1815
+ ],
1816
+ );
2914
1817
  /** @internal */
2915
- export type InvokeDeploymentRequestContent2$Outbound =
2916
- | InvokeDeploymentRequest2PrefixMessages1$Outbound
1818
+ export type Two$Outbound =
1819
+ | (TextContentPartSchema$Outbound & { type: "text" })
2917
1820
  | ImageContentPartSchema$Outbound
2918
1821
  | AudioContentPartSchema$Outbound
2919
1822
  | Four$Outbound;
2920
1823
 
2921
1824
  /** @internal */
2922
- export const InvokeDeploymentRequestContent2$outboundSchema: z.ZodType<
2923
- InvokeDeploymentRequestContent2$Outbound,
2924
- z.ZodTypeDef,
2925
- InvokeDeploymentRequestContent2
2926
- > = z.union([
2927
- z.lazy(() => InvokeDeploymentRequest2PrefixMessages1$outboundSchema),
2928
- ImageContentPartSchema$outboundSchema,
2929
- AudioContentPartSchema$outboundSchema,
2930
- z.lazy(() => Four$outboundSchema),
2931
- ]);
2932
-
2933
- export function invokeDeploymentRequestContent2ToJSON(
2934
- invokeDeploymentRequestContent2: InvokeDeploymentRequestContent2,
2935
- ): string {
2936
- return JSON.stringify(
2937
- InvokeDeploymentRequestContent2$outboundSchema.parse(
2938
- invokeDeploymentRequestContent2,
1825
+ export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
1826
+ .union([
1827
+ TextContentPartSchema$outboundSchema.and(
1828
+ z.object({ type: z.literal("text") }),
2939
1829
  ),
2940
- );
1830
+ ImageContentPartSchema$outboundSchema,
1831
+ AudioContentPartSchema$outboundSchema,
1832
+ z.lazy(() => Four$outboundSchema),
1833
+ ]);
1834
+
1835
+ export function twoToJSON(two: Two): string {
1836
+ return JSON.stringify(Two$outboundSchema.parse(two));
2941
1837
  }
2942
- export function invokeDeploymentRequestContent2FromJSON(
1838
+ export function twoFromJSON(
2943
1839
  jsonString: string,
2944
- ): SafeParseResult<InvokeDeploymentRequestContent2, SDKValidationError> {
1840
+ ): SafeParseResult<Two, SDKValidationError> {
2945
1841
  return safeParse(
2946
1842
  jsonString,
2947
- (x) => InvokeDeploymentRequestContent2$inboundSchema.parse(JSON.parse(x)),
2948
- `Failed to parse 'InvokeDeploymentRequestContent2' from JSON`,
1843
+ (x) => Two$inboundSchema.parse(JSON.parse(x)),
1844
+ `Failed to parse 'Two' from JSON`,
2949
1845
  );
2950
1846
  }
2951
1847
 
@@ -2957,18 +1853,22 @@ export const InvokeDeploymentRequestPrefixMessagesContent$inboundSchema:
2957
1853
  unknown
2958
1854
  > = z.union([
2959
1855
  z.string(),
2960
- z.array(z.union([
2961
- z.lazy(() => InvokeDeploymentRequest2PrefixMessages1$inboundSchema),
2962
- ImageContentPartSchema$inboundSchema,
2963
- AudioContentPartSchema$inboundSchema,
2964
- z.lazy(() => Four$inboundSchema),
2965
- ])),
1856
+ z.array(
1857
+ z.union([
1858
+ TextContentPartSchema$inboundSchema.and(
1859
+ z.object({ type: z.literal("text") }),
1860
+ ),
1861
+ ImageContentPartSchema$inboundSchema,
1862
+ AudioContentPartSchema$inboundSchema,
1863
+ z.lazy(() => Four$inboundSchema),
1864
+ ]),
1865
+ ),
2966
1866
  ]);
2967
1867
  /** @internal */
2968
1868
  export type InvokeDeploymentRequestPrefixMessagesContent$Outbound =
2969
1869
  | string
2970
1870
  | Array<
2971
- | InvokeDeploymentRequest2PrefixMessages1$Outbound
1871
+ | (TextContentPartSchema$Outbound & { type: "text" })
2972
1872
  | ImageContentPartSchema$Outbound
2973
1873
  | AudioContentPartSchema$Outbound
2974
1874
  | Four$Outbound
@@ -2981,13 +1881,17 @@ export const InvokeDeploymentRequestPrefixMessagesContent$outboundSchema:
2981
1881
  z.ZodTypeDef,
2982
1882
  InvokeDeploymentRequestPrefixMessagesContent
2983
1883
  > = z.union([
2984
- z.string(),
2985
- z.array(z.union([
2986
- z.lazy(() => InvokeDeploymentRequest2PrefixMessages1$outboundSchema),
2987
- ImageContentPartSchema$outboundSchema,
2988
- AudioContentPartSchema$outboundSchema,
2989
- z.lazy(() => Four$outboundSchema),
2990
- ])),
1884
+ z.string(),
1885
+ z.array(
1886
+ z.union([
1887
+ TextContentPartSchema$outboundSchema.and(
1888
+ z.object({ type: z.literal("text") }),
1889
+ ),
1890
+ ImageContentPartSchema$outboundSchema,
1891
+ AudioContentPartSchema$outboundSchema,
1892
+ z.lazy(() => Four$outboundSchema),
1893
+ ]),
1894
+ ),
2991
1895
  ]);
2992
1896
 
2993
1897
  export function invokeDeploymentRequestPrefixMessagesContentToJSON(
@@ -3026,12 +1930,16 @@ export const UserMessage$inboundSchema: z.ZodType<
3026
1930
  name: z.string().optional(),
3027
1931
  content: z.union([
3028
1932
  z.string(),
3029
- z.array(z.union([
3030
- z.lazy(() => InvokeDeploymentRequest2PrefixMessages1$inboundSchema),
3031
- ImageContentPartSchema$inboundSchema,
3032
- AudioContentPartSchema$inboundSchema,
3033
- z.lazy(() => Four$inboundSchema),
3034
- ])),
1933
+ z.array(
1934
+ z.union([
1935
+ TextContentPartSchema$inboundSchema.and(
1936
+ z.object({ type: z.literal("text") }),
1937
+ ),
1938
+ ImageContentPartSchema$inboundSchema,
1939
+ AudioContentPartSchema$inboundSchema,
1940
+ z.lazy(() => Four$inboundSchema),
1941
+ ]),
1942
+ ),
3035
1943
  ]),
3036
1944
  });
3037
1945
  /** @internal */
@@ -3041,7 +1949,7 @@ export type UserMessage$Outbound = {
3041
1949
  content:
3042
1950
  | string
3043
1951
  | Array<
3044
- | InvokeDeploymentRequest2PrefixMessages1$Outbound
1952
+ | (TextContentPartSchema$Outbound & { type: "text" })
3045
1953
  | ImageContentPartSchema$Outbound
3046
1954
  | AudioContentPartSchema$Outbound
3047
1955
  | Four$Outbound
@@ -3058,12 +1966,16 @@ export const UserMessage$outboundSchema: z.ZodType<
3058
1966
  name: z.string().optional(),
3059
1967
  content: z.union([
3060
1968
  z.string(),
3061
- z.array(z.union([
3062
- z.lazy(() => InvokeDeploymentRequest2PrefixMessages1$outboundSchema),
3063
- ImageContentPartSchema$outboundSchema,
3064
- AudioContentPartSchema$outboundSchema,
3065
- z.lazy(() => Four$outboundSchema),
3066
- ])),
1969
+ z.array(
1970
+ z.union([
1971
+ TextContentPartSchema$outboundSchema.and(
1972
+ z.object({ type: z.literal("text") }),
1973
+ ),
1974
+ ImageContentPartSchema$outboundSchema,
1975
+ AudioContentPartSchema$outboundSchema,
1976
+ z.lazy(() => Four$outboundSchema),
1977
+ ]),
1978
+ ),
3067
1979
  ]),
3068
1980
  });
3069
1981
 
@@ -3080,135 +1992,23 @@ export function userMessageFromJSON(
3080
1992
  );
3081
1993
  }
3082
1994
 
3083
- /** @internal */
3084
- export const ContentType$inboundSchema: z.ZodNativeEnum<typeof ContentType> = z
3085
- .nativeEnum(ContentType);
3086
- /** @internal */
3087
- export const ContentType$outboundSchema: z.ZodNativeEnum<typeof ContentType> =
3088
- ContentType$inboundSchema;
3089
-
3090
- /** @internal */
3091
- export const InvokeDeploymentRequestContentPrefixMessagesType$inboundSchema:
3092
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentPrefixMessagesType> = z
3093
- .nativeEnum(InvokeDeploymentRequestContentPrefixMessagesType);
3094
- /** @internal */
3095
- export const InvokeDeploymentRequestContentPrefixMessagesType$outboundSchema:
3096
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentPrefixMessagesType> =
3097
- InvokeDeploymentRequestContentPrefixMessagesType$inboundSchema;
3098
-
3099
- /** @internal */
3100
- export const ContentTtl$inboundSchema: z.ZodNativeEnum<typeof ContentTtl> = z
3101
- .nativeEnum(ContentTtl);
3102
- /** @internal */
3103
- export const ContentTtl$outboundSchema: z.ZodNativeEnum<typeof ContentTtl> =
3104
- ContentTtl$inboundSchema;
3105
-
3106
- /** @internal */
3107
- export const ContentCacheControl$inboundSchema: z.ZodType<
3108
- ContentCacheControl,
3109
- z.ZodTypeDef,
3110
- unknown
3111
- > = z.object({
3112
- type: InvokeDeploymentRequestContentPrefixMessagesType$inboundSchema,
3113
- ttl: ContentTtl$inboundSchema.default("5m"),
3114
- });
3115
- /** @internal */
3116
- export type ContentCacheControl$Outbound = {
3117
- type: string;
3118
- ttl: string;
3119
- };
3120
-
3121
- /** @internal */
3122
- export const ContentCacheControl$outboundSchema: z.ZodType<
3123
- ContentCacheControl$Outbound,
3124
- z.ZodTypeDef,
3125
- ContentCacheControl
3126
- > = z.object({
3127
- type: InvokeDeploymentRequestContentPrefixMessagesType$outboundSchema,
3128
- ttl: ContentTtl$outboundSchema.default("5m"),
3129
- });
3130
-
3131
- export function contentCacheControlToJSON(
3132
- contentCacheControl: ContentCacheControl,
3133
- ): string {
3134
- return JSON.stringify(
3135
- ContentCacheControl$outboundSchema.parse(contentCacheControl),
3136
- );
3137
- }
3138
- export function contentCacheControlFromJSON(
3139
- jsonString: string,
3140
- ): SafeParseResult<ContentCacheControl, SDKValidationError> {
3141
- return safeParse(
3142
- jsonString,
3143
- (x) => ContentCacheControl$inboundSchema.parse(JSON.parse(x)),
3144
- `Failed to parse 'ContentCacheControl' from JSON`,
3145
- );
3146
- }
3147
-
3148
- /** @internal */
3149
- export const Content2$inboundSchema: z.ZodType<
3150
- Content2,
3151
- z.ZodTypeDef,
3152
- unknown
3153
- > = z.object({
3154
- type: ContentType$inboundSchema,
3155
- text: z.string(),
3156
- cache_control: z.lazy(() => ContentCacheControl$inboundSchema).optional(),
3157
- }).transform((v) => {
3158
- return remap$(v, {
3159
- "cache_control": "cacheControl",
3160
- });
3161
- });
3162
- /** @internal */
3163
- export type Content2$Outbound = {
3164
- type: string;
3165
- text: string;
3166
- cache_control?: ContentCacheControl$Outbound | undefined;
3167
- };
3168
-
3169
- /** @internal */
3170
- export const Content2$outboundSchema: z.ZodType<
3171
- Content2$Outbound,
3172
- z.ZodTypeDef,
3173
- Content2
3174
- > = z.object({
3175
- type: ContentType$outboundSchema,
3176
- text: z.string(),
3177
- cacheControl: z.lazy(() => ContentCacheControl$outboundSchema).optional(),
3178
- }).transform((v) => {
3179
- return remap$(v, {
3180
- cacheControl: "cache_control",
3181
- });
3182
- });
3183
-
3184
- export function content2ToJSON(content2: Content2): string {
3185
- return JSON.stringify(Content2$outboundSchema.parse(content2));
3186
- }
3187
- export function content2FromJSON(
3188
- jsonString: string,
3189
- ): SafeParseResult<Content2, SDKValidationError> {
3190
- return safeParse(
3191
- jsonString,
3192
- (x) => Content2$inboundSchema.parse(JSON.parse(x)),
3193
- `Failed to parse 'Content2' from JSON`,
3194
- );
3195
- }
3196
-
3197
1995
  /** @internal */
3198
1996
  export const PrefixMessagesContent$inboundSchema: z.ZodType<
3199
1997
  PrefixMessagesContent,
3200
1998
  z.ZodTypeDef,
3201
1999
  unknown
3202
- > = z.union([z.string(), z.array(z.lazy(() => Content2$inboundSchema))]);
2000
+ > = z.union([z.string(), z.array(TextContentPartSchema$inboundSchema)]);
3203
2001
  /** @internal */
3204
- export type PrefixMessagesContent$Outbound = string | Array<Content2$Outbound>;
2002
+ export type PrefixMessagesContent$Outbound =
2003
+ | string
2004
+ | Array<TextContentPartSchema$Outbound>;
3205
2005
 
3206
2006
  /** @internal */
3207
2007
  export const PrefixMessagesContent$outboundSchema: z.ZodType<
3208
2008
  PrefixMessagesContent$Outbound,
3209
2009
  z.ZodTypeDef,
3210
2010
  PrefixMessagesContent
3211
- > = z.union([z.string(), z.array(z.lazy(() => Content2$outboundSchema))]);
2011
+ > = z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]);
3212
2012
 
3213
2013
  export function prefixMessagesContentToJSON(
3214
2014
  prefixMessagesContent: PrefixMessagesContent,
@@ -3234,13 +2034,13 @@ export const DeveloperMessage$inboundSchema: z.ZodType<
3234
2034
  unknown
3235
2035
  > = z.object({
3236
2036
  role: z.literal("developer"),
3237
- content: z.union([z.string(), z.array(z.lazy(() => Content2$inboundSchema))]),
2037
+ content: z.union([z.string(), z.array(TextContentPartSchema$inboundSchema)]),
3238
2038
  name: z.string().optional(),
3239
2039
  });
3240
2040
  /** @internal */
3241
2041
  export type DeveloperMessage$Outbound = {
3242
2042
  role: "developer";
3243
- content: string | Array<Content2$Outbound>;
2043
+ content: string | Array<TextContentPartSchema$Outbound>;
3244
2044
  name?: string | undefined;
3245
2045
  };
3246
2046
 
@@ -3251,10 +2051,7 @@ export const DeveloperMessage$outboundSchema: z.ZodType<
3251
2051
  DeveloperMessage
3252
2052
  > = z.object({
3253
2053
  role: z.literal("developer"),
3254
- content: z.union([
3255
- z.string(),
3256
- z.array(z.lazy(() => Content2$outboundSchema)),
3257
- ]),
2054
+ content: z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]),
3258
2055
  name: z.string().optional(),
3259
2056
  });
3260
2057
 
@@ -3275,144 +2072,18 @@ export function developerMessageFromJSON(
3275
2072
  );
3276
2073
  }
3277
2074
 
3278
- /** @internal */
3279
- export const InvokeDeploymentRequestContentType$inboundSchema: z.ZodNativeEnum<
3280
- typeof InvokeDeploymentRequestContentType
3281
- > = z.nativeEnum(InvokeDeploymentRequestContentType);
3282
- /** @internal */
3283
- export const InvokeDeploymentRequestContentType$outboundSchema: z.ZodNativeEnum<
3284
- typeof InvokeDeploymentRequestContentType
3285
- > = InvokeDeploymentRequestContentType$inboundSchema;
3286
-
3287
- /** @internal */
3288
- export const InvokeDeploymentRequestContentPrefixMessages1Type$inboundSchema:
3289
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentPrefixMessages1Type> = z
3290
- .nativeEnum(InvokeDeploymentRequestContentPrefixMessages1Type);
3291
- /** @internal */
3292
- export const InvokeDeploymentRequestContentPrefixMessages1Type$outboundSchema:
3293
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentPrefixMessages1Type> =
3294
- InvokeDeploymentRequestContentPrefixMessages1Type$inboundSchema;
3295
-
3296
- /** @internal */
3297
- export const InvokeDeploymentRequestContentTtl$inboundSchema: z.ZodNativeEnum<
3298
- typeof InvokeDeploymentRequestContentTtl
3299
- > = z.nativeEnum(InvokeDeploymentRequestContentTtl);
3300
- /** @internal */
3301
- export const InvokeDeploymentRequestContentTtl$outboundSchema: z.ZodNativeEnum<
3302
- typeof InvokeDeploymentRequestContentTtl
3303
- > = InvokeDeploymentRequestContentTtl$inboundSchema;
3304
-
3305
- /** @internal */
3306
- export const InvokeDeploymentRequestContentCacheControl$inboundSchema:
3307
- z.ZodType<InvokeDeploymentRequestContentCacheControl, z.ZodTypeDef, unknown> =
3308
- z.object({
3309
- type: InvokeDeploymentRequestContentPrefixMessages1Type$inboundSchema,
3310
- ttl: InvokeDeploymentRequestContentTtl$inboundSchema.default("5m"),
3311
- });
3312
- /** @internal */
3313
- export type InvokeDeploymentRequestContentCacheControl$Outbound = {
3314
- type: string;
3315
- ttl: string;
3316
- };
3317
-
3318
- /** @internal */
3319
- export const InvokeDeploymentRequestContentCacheControl$outboundSchema:
3320
- z.ZodType<
3321
- InvokeDeploymentRequestContentCacheControl$Outbound,
3322
- z.ZodTypeDef,
3323
- InvokeDeploymentRequestContentCacheControl
3324
- > = z.object({
3325
- type: InvokeDeploymentRequestContentPrefixMessages1Type$outboundSchema,
3326
- ttl: InvokeDeploymentRequestContentTtl$outboundSchema.default("5m"),
3327
- });
3328
-
3329
- export function invokeDeploymentRequestContentCacheControlToJSON(
3330
- invokeDeploymentRequestContentCacheControl:
3331
- InvokeDeploymentRequestContentCacheControl,
3332
- ): string {
3333
- return JSON.stringify(
3334
- InvokeDeploymentRequestContentCacheControl$outboundSchema.parse(
3335
- invokeDeploymentRequestContentCacheControl,
3336
- ),
3337
- );
3338
- }
3339
- export function invokeDeploymentRequestContentCacheControlFromJSON(
3340
- jsonString: string,
3341
- ): SafeParseResult<
3342
- InvokeDeploymentRequestContentCacheControl,
3343
- SDKValidationError
3344
- > {
3345
- return safeParse(
3346
- jsonString,
3347
- (x) =>
3348
- InvokeDeploymentRequestContentCacheControl$inboundSchema.parse(
3349
- JSON.parse(x),
3350
- ),
3351
- `Failed to parse 'InvokeDeploymentRequestContentCacheControl' from JSON`,
3352
- );
3353
- }
3354
-
3355
- /** @internal */
3356
- export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z
3357
- .object({
3358
- type: InvokeDeploymentRequestContentType$inboundSchema,
3359
- text: z.string(),
3360
- cache_control: z.lazy(() =>
3361
- InvokeDeploymentRequestContentCacheControl$inboundSchema
3362
- ).optional(),
3363
- }).transform((v) => {
3364
- return remap$(v, {
3365
- "cache_control": "cacheControl",
3366
- });
3367
- });
3368
- /** @internal */
3369
- export type Two$Outbound = {
3370
- type: string;
3371
- text: string;
3372
- cache_control?:
3373
- | InvokeDeploymentRequestContentCacheControl$Outbound
3374
- | undefined;
3375
- };
3376
-
3377
- /** @internal */
3378
- export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
3379
- .object({
3380
- type: InvokeDeploymentRequestContentType$outboundSchema,
3381
- text: z.string(),
3382
- cacheControl: z.lazy(() =>
3383
- InvokeDeploymentRequestContentCacheControl$outboundSchema
3384
- ).optional(),
3385
- }).transform((v) => {
3386
- return remap$(v, {
3387
- cacheControl: "cache_control",
3388
- });
3389
- });
3390
-
3391
- export function twoToJSON(two: Two): string {
3392
- return JSON.stringify(Two$outboundSchema.parse(two));
3393
- }
3394
- export function twoFromJSON(
3395
- jsonString: string,
3396
- ): SafeParseResult<Two, SDKValidationError> {
3397
- return safeParse(
3398
- jsonString,
3399
- (x) => Two$inboundSchema.parse(JSON.parse(x)),
3400
- `Failed to parse 'Two' from JSON`,
3401
- );
3402
- }
3403
-
3404
2075
  /** @internal */
3405
2076
  export const Content$inboundSchema: z.ZodType<Content, z.ZodTypeDef, unknown> =
3406
- z.union([z.string(), z.array(z.lazy(() => Two$inboundSchema))]);
2077
+ z.union([z.string(), z.array(TextContentPartSchema$inboundSchema)]);
3407
2078
  /** @internal */
3408
- export type Content$Outbound = string | Array<Two$Outbound>;
2079
+ export type Content$Outbound = string | Array<TextContentPartSchema$Outbound>;
3409
2080
 
3410
2081
  /** @internal */
3411
2082
  export const Content$outboundSchema: z.ZodType<
3412
2083
  Content$Outbound,
3413
2084
  z.ZodTypeDef,
3414
2085
  Content
3415
- > = z.union([z.string(), z.array(z.lazy(() => Two$outboundSchema))]);
2086
+ > = z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]);
3416
2087
 
3417
2088
  export function contentToJSON(content: Content): string {
3418
2089
  return JSON.stringify(Content$outboundSchema.parse(content));
@@ -3434,13 +2105,13 @@ export const SystemMessage$inboundSchema: z.ZodType<
3434
2105
  unknown
3435
2106
  > = z.object({
3436
2107
  role: z.literal("system"),
3437
- content: z.union([z.string(), z.array(z.lazy(() => Two$inboundSchema))]),
2108
+ content: z.union([z.string(), z.array(TextContentPartSchema$inboundSchema)]),
3438
2109
  name: z.string().optional(),
3439
2110
  });
3440
2111
  /** @internal */
3441
2112
  export type SystemMessage$Outbound = {
3442
2113
  role: "system";
3443
- content: string | Array<Two$Outbound>;
2114
+ content: string | Array<TextContentPartSchema$Outbound>;
3444
2115
  name?: string | undefined;
3445
2116
  };
3446
2117
 
@@ -3451,7 +2122,7 @@ export const SystemMessage$outboundSchema: z.ZodType<
3451
2122
  SystemMessage
3452
2123
  > = z.object({
3453
2124
  role: z.literal("system"),
3454
- content: z.union([z.string(), z.array(z.lazy(() => Two$outboundSchema))]),
2125
+ content: z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]),
3455
2126
  name: z.string().optional(),
3456
2127
  });
3457
2128
 
@@ -3509,152 +2180,8 @@ export function prefixMessagesFromJSON(
3509
2180
  ): SafeParseResult<PrefixMessages, SDKValidationError> {
3510
2181
  return safeParse(
3511
2182
  jsonString,
3512
- (x) => PrefixMessages$inboundSchema.parse(JSON.parse(x)),
3513
- `Failed to parse 'PrefixMessages' from JSON`,
3514
- );
3515
- }
3516
-
3517
- /** @internal */
3518
- export const InvokeDeploymentRequest2Messages5Type$inboundSchema:
3519
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages5Type> = z.nativeEnum(
3520
- InvokeDeploymentRequest2Messages5Type,
3521
- );
3522
- /** @internal */
3523
- export const InvokeDeploymentRequest2Messages5Type$outboundSchema:
3524
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages5Type> =
3525
- InvokeDeploymentRequest2Messages5Type$inboundSchema;
3526
-
3527
- /** @internal */
3528
- export const InvokeDeploymentRequest2Messages5ContentType$inboundSchema:
3529
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages5ContentType> = z
3530
- .nativeEnum(InvokeDeploymentRequest2Messages5ContentType);
3531
- /** @internal */
3532
- export const InvokeDeploymentRequest2Messages5ContentType$outboundSchema:
3533
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages5ContentType> =
3534
- InvokeDeploymentRequest2Messages5ContentType$inboundSchema;
3535
-
3536
- /** @internal */
3537
- export const InvokeDeploymentRequest2Messages5Ttl$inboundSchema:
3538
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages5Ttl> = z.nativeEnum(
3539
- InvokeDeploymentRequest2Messages5Ttl,
3540
- );
3541
- /** @internal */
3542
- export const InvokeDeploymentRequest2Messages5Ttl$outboundSchema:
3543
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages5Ttl> =
3544
- InvokeDeploymentRequest2Messages5Ttl$inboundSchema;
3545
-
3546
- /** @internal */
3547
- export const InvokeDeploymentRequest2Messages5CacheControl$inboundSchema:
3548
- z.ZodType<
3549
- InvokeDeploymentRequest2Messages5CacheControl,
3550
- z.ZodTypeDef,
3551
- unknown
3552
- > = z.object({
3553
- type: InvokeDeploymentRequest2Messages5ContentType$inboundSchema,
3554
- ttl: InvokeDeploymentRequest2Messages5Ttl$inboundSchema.default("5m"),
3555
- });
3556
- /** @internal */
3557
- export type InvokeDeploymentRequest2Messages5CacheControl$Outbound = {
3558
- type: string;
3559
- ttl: string;
3560
- };
3561
-
3562
- /** @internal */
3563
- export const InvokeDeploymentRequest2Messages5CacheControl$outboundSchema:
3564
- z.ZodType<
3565
- InvokeDeploymentRequest2Messages5CacheControl$Outbound,
3566
- z.ZodTypeDef,
3567
- InvokeDeploymentRequest2Messages5CacheControl
3568
- > = z.object({
3569
- type: InvokeDeploymentRequest2Messages5ContentType$outboundSchema,
3570
- ttl: InvokeDeploymentRequest2Messages5Ttl$outboundSchema.default("5m"),
3571
- });
3572
-
3573
- export function invokeDeploymentRequest2Messages5CacheControlToJSON(
3574
- invokeDeploymentRequest2Messages5CacheControl:
3575
- InvokeDeploymentRequest2Messages5CacheControl,
3576
- ): string {
3577
- return JSON.stringify(
3578
- InvokeDeploymentRequest2Messages5CacheControl$outboundSchema.parse(
3579
- invokeDeploymentRequest2Messages5CacheControl,
3580
- ),
3581
- );
3582
- }
3583
- export function invokeDeploymentRequest2Messages5CacheControlFromJSON(
3584
- jsonString: string,
3585
- ): SafeParseResult<
3586
- InvokeDeploymentRequest2Messages5CacheControl,
3587
- SDKValidationError
3588
- > {
3589
- return safeParse(
3590
- jsonString,
3591
- (x) =>
3592
- InvokeDeploymentRequest2Messages5CacheControl$inboundSchema.parse(
3593
- JSON.parse(x),
3594
- ),
3595
- `Failed to parse 'InvokeDeploymentRequest2Messages5CacheControl' from JSON`,
3596
- );
3597
- }
3598
-
3599
- /** @internal */
3600
- export const InvokeDeploymentRequest2Messages51$inboundSchema: z.ZodType<
3601
- InvokeDeploymentRequest2Messages51,
3602
- z.ZodTypeDef,
3603
- unknown
3604
- > = z.object({
3605
- type: InvokeDeploymentRequest2Messages5Type$inboundSchema,
3606
- text: z.string(),
3607
- cache_control: z.lazy(() =>
3608
- InvokeDeploymentRequest2Messages5CacheControl$inboundSchema
3609
- ).optional(),
3610
- }).transform((v) => {
3611
- return remap$(v, {
3612
- "cache_control": "cacheControl",
3613
- });
3614
- });
3615
- /** @internal */
3616
- export type InvokeDeploymentRequest2Messages51$Outbound = {
3617
- type: string;
3618
- text: string;
3619
- cache_control?:
3620
- | InvokeDeploymentRequest2Messages5CacheControl$Outbound
3621
- | undefined;
3622
- };
3623
-
3624
- /** @internal */
3625
- export const InvokeDeploymentRequest2Messages51$outboundSchema: z.ZodType<
3626
- InvokeDeploymentRequest2Messages51$Outbound,
3627
- z.ZodTypeDef,
3628
- InvokeDeploymentRequest2Messages51
3629
- > = z.object({
3630
- type: InvokeDeploymentRequest2Messages5Type$outboundSchema,
3631
- text: z.string(),
3632
- cacheControl: z.lazy(() =>
3633
- InvokeDeploymentRequest2Messages5CacheControl$outboundSchema
3634
- ).optional(),
3635
- }).transform((v) => {
3636
- return remap$(v, {
3637
- cacheControl: "cache_control",
3638
- });
3639
- });
3640
-
3641
- export function invokeDeploymentRequest2Messages51ToJSON(
3642
- invokeDeploymentRequest2Messages51: InvokeDeploymentRequest2Messages51,
3643
- ): string {
3644
- return JSON.stringify(
3645
- InvokeDeploymentRequest2Messages51$outboundSchema.parse(
3646
- invokeDeploymentRequest2Messages51,
3647
- ),
3648
- );
3649
- }
3650
- export function invokeDeploymentRequest2Messages51FromJSON(
3651
- jsonString: string,
3652
- ): SafeParseResult<InvokeDeploymentRequest2Messages51, SDKValidationError> {
3653
- return safeParse(
3654
- jsonString,
3655
- (x) =>
3656
- InvokeDeploymentRequest2Messages51$inboundSchema.parse(JSON.parse(x)),
3657
- `Failed to parse 'InvokeDeploymentRequest2Messages51' from JSON`,
2183
+ (x) => PrefixMessages$inboundSchema.parse(JSON.parse(x)),
2184
+ `Failed to parse 'PrefixMessages' from JSON`,
3658
2185
  );
3659
2186
  }
3660
2187
 
@@ -3663,17 +2190,17 @@ export const InvokeDeploymentRequestContentMessages52$inboundSchema: z.ZodType<
3663
2190
  InvokeDeploymentRequestContentMessages52,
3664
2191
  z.ZodTypeDef,
3665
2192
  unknown
3666
- > = z.lazy(() => InvokeDeploymentRequest2Messages51$inboundSchema);
2193
+ > = TextContentPartSchema$inboundSchema;
3667
2194
  /** @internal */
3668
2195
  export type InvokeDeploymentRequestContentMessages52$Outbound =
3669
- InvokeDeploymentRequest2Messages51$Outbound;
2196
+ TextContentPartSchema$Outbound;
3670
2197
 
3671
2198
  /** @internal */
3672
2199
  export const InvokeDeploymentRequestContentMessages52$outboundSchema: z.ZodType<
3673
2200
  InvokeDeploymentRequestContentMessages52$Outbound,
3674
2201
  z.ZodTypeDef,
3675
2202
  InvokeDeploymentRequestContentMessages52
3676
- > = z.lazy(() => InvokeDeploymentRequest2Messages51$outboundSchema);
2203
+ > = TextContentPartSchema$outboundSchema;
3677
2204
 
3678
2205
  export function invokeDeploymentRequestContentMessages52ToJSON(
3679
2206
  invokeDeploymentRequestContentMessages52:
@@ -3706,24 +2233,18 @@ export const InvokeDeploymentRequestMessages5Content$inboundSchema: z.ZodType<
3706
2233
  InvokeDeploymentRequestMessages5Content,
3707
2234
  z.ZodTypeDef,
3708
2235
  unknown
3709
- > = z.union([
3710
- z.string(),
3711
- z.array(z.lazy(() => InvokeDeploymentRequest2Messages51$inboundSchema)),
3712
- ]);
2236
+ > = z.union([z.string(), z.array(TextContentPartSchema$inboundSchema)]);
3713
2237
  /** @internal */
3714
2238
  export type InvokeDeploymentRequestMessages5Content$Outbound =
3715
2239
  | string
3716
- | Array<InvokeDeploymentRequest2Messages51$Outbound>;
2240
+ | Array<TextContentPartSchema$Outbound>;
3717
2241
 
3718
2242
  /** @internal */
3719
2243
  export const InvokeDeploymentRequestMessages5Content$outboundSchema: z.ZodType<
3720
2244
  InvokeDeploymentRequestMessages5Content$Outbound,
3721
2245
  z.ZodTypeDef,
3722
2246
  InvokeDeploymentRequestMessages5Content
3723
- > = z.union([
3724
- z.string(),
3725
- z.array(z.lazy(() => InvokeDeploymentRequest2Messages51$outboundSchema)),
3726
- ]);
2247
+ > = z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]);
3727
2248
 
3728
2249
  export function invokeDeploymentRequestMessages5ContentToJSON(
3729
2250
  invokeDeploymentRequestMessages5Content:
@@ -3816,10 +2337,7 @@ export const MessagesToolMessage$inboundSchema: z.ZodType<
3816
2337
  unknown
3817
2338
  > = z.object({
3818
2339
  role: z.literal("tool"),
3819
- content: z.union([
3820
- z.string(),
3821
- z.array(z.lazy(() => InvokeDeploymentRequest2Messages51$inboundSchema)),
3822
- ]),
2340
+ content: z.union([z.string(), z.array(TextContentPartSchema$inboundSchema)]),
3823
2341
  tool_call_id: z.string(),
3824
2342
  cache_control: z.lazy(() => MessagesCacheControl$inboundSchema).optional(),
3825
2343
  }).transform((v) => {
@@ -3831,7 +2349,7 @@ export const MessagesToolMessage$inboundSchema: z.ZodType<
3831
2349
  /** @internal */
3832
2350
  export type MessagesToolMessage$Outbound = {
3833
2351
  role: "tool";
3834
- content: string | Array<InvokeDeploymentRequest2Messages51$Outbound>;
2352
+ content: string | Array<TextContentPartSchema$Outbound>;
3835
2353
  tool_call_id: string;
3836
2354
  cache_control?: MessagesCacheControl$Outbound | undefined;
3837
2355
  };
@@ -3843,10 +2361,7 @@ export const MessagesToolMessage$outboundSchema: z.ZodType<
3843
2361
  MessagesToolMessage
3844
2362
  > = z.object({
3845
2363
  role: z.literal("tool"),
3846
- content: z.union([
3847
- z.string(),
3848
- z.array(z.lazy(() => InvokeDeploymentRequest2Messages51$outboundSchema)),
3849
- ]),
2364
+ content: z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]),
3850
2365
  toolCallId: z.string(),
3851
2366
  cacheControl: z.lazy(() => MessagesCacheControl$outboundSchema).optional(),
3852
2367
  }).transform((v) => {
@@ -3873,154 +2388,22 @@ export function messagesToolMessageFromJSON(
3873
2388
  );
3874
2389
  }
3875
2390
 
3876
- /** @internal */
3877
- export const InvokeDeploymentRequest2Messages4ContentType$inboundSchema:
3878
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages4ContentType> = z
3879
- .nativeEnum(InvokeDeploymentRequest2Messages4ContentType);
3880
- /** @internal */
3881
- export const InvokeDeploymentRequest2Messages4ContentType$outboundSchema:
3882
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages4ContentType> =
3883
- InvokeDeploymentRequest2Messages4ContentType$inboundSchema;
3884
-
3885
- /** @internal */
3886
- export const InvokeDeploymentRequest2Messages4Ttl$inboundSchema:
3887
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages4Ttl> = z.nativeEnum(
3888
- InvokeDeploymentRequest2Messages4Ttl,
3889
- );
3890
- /** @internal */
3891
- export const InvokeDeploymentRequest2Messages4Ttl$outboundSchema:
3892
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages4Ttl> =
3893
- InvokeDeploymentRequest2Messages4Ttl$inboundSchema;
3894
-
3895
- /** @internal */
3896
- export const InvokeDeploymentRequest2Messages4CacheControl$inboundSchema:
3897
- z.ZodType<
3898
- InvokeDeploymentRequest2Messages4CacheControl,
3899
- z.ZodTypeDef,
3900
- unknown
3901
- > = z.object({
3902
- type: InvokeDeploymentRequest2Messages4ContentType$inboundSchema,
3903
- ttl: InvokeDeploymentRequest2Messages4Ttl$inboundSchema.default("5m"),
3904
- });
3905
- /** @internal */
3906
- export type InvokeDeploymentRequest2Messages4CacheControl$Outbound = {
3907
- type: string;
3908
- ttl: string;
3909
- };
3910
-
3911
- /** @internal */
3912
- export const InvokeDeploymentRequest2Messages4CacheControl$outboundSchema:
3913
- z.ZodType<
3914
- InvokeDeploymentRequest2Messages4CacheControl$Outbound,
3915
- z.ZodTypeDef,
3916
- InvokeDeploymentRequest2Messages4CacheControl
3917
- > = z.object({
3918
- type: InvokeDeploymentRequest2Messages4ContentType$outboundSchema,
3919
- ttl: InvokeDeploymentRequest2Messages4Ttl$outboundSchema.default("5m"),
3920
- });
3921
-
3922
- export function invokeDeploymentRequest2Messages4CacheControlToJSON(
3923
- invokeDeploymentRequest2Messages4CacheControl:
3924
- InvokeDeploymentRequest2Messages4CacheControl,
3925
- ): string {
3926
- return JSON.stringify(
3927
- InvokeDeploymentRequest2Messages4CacheControl$outboundSchema.parse(
3928
- invokeDeploymentRequest2Messages4CacheControl,
3929
- ),
3930
- );
3931
- }
3932
- export function invokeDeploymentRequest2Messages4CacheControlFromJSON(
3933
- jsonString: string,
3934
- ): SafeParseResult<
3935
- InvokeDeploymentRequest2Messages4CacheControl,
3936
- SDKValidationError
3937
- > {
3938
- return safeParse(
3939
- jsonString,
3940
- (x) =>
3941
- InvokeDeploymentRequest2Messages4CacheControl$inboundSchema.parse(
3942
- JSON.parse(x),
3943
- ),
3944
- `Failed to parse 'InvokeDeploymentRequest2Messages4CacheControl' from JSON`,
3945
- );
3946
- }
3947
-
3948
- /** @internal */
3949
- export const InvokeDeploymentRequest2Messages41$inboundSchema: z.ZodType<
3950
- InvokeDeploymentRequest2Messages41,
3951
- z.ZodTypeDef,
3952
- unknown
3953
- > = z.object({
3954
- type: z.literal("text"),
3955
- text: z.string(),
3956
- cache_control: z.lazy(() =>
3957
- InvokeDeploymentRequest2Messages4CacheControl$inboundSchema
3958
- ).optional(),
3959
- }).transform((v) => {
3960
- return remap$(v, {
3961
- "cache_control": "cacheControl",
3962
- });
3963
- });
3964
- /** @internal */
3965
- export type InvokeDeploymentRequest2Messages41$Outbound = {
3966
- type: "text";
3967
- text: string;
3968
- cache_control?:
3969
- | InvokeDeploymentRequest2Messages4CacheControl$Outbound
3970
- | undefined;
3971
- };
3972
-
3973
- /** @internal */
3974
- export const InvokeDeploymentRequest2Messages41$outboundSchema: z.ZodType<
3975
- InvokeDeploymentRequest2Messages41$Outbound,
3976
- z.ZodTypeDef,
3977
- InvokeDeploymentRequest2Messages41
3978
- > = z.object({
3979
- type: z.literal("text"),
3980
- text: z.string(),
3981
- cacheControl: z.lazy(() =>
3982
- InvokeDeploymentRequest2Messages4CacheControl$outboundSchema
3983
- ).optional(),
3984
- }).transform((v) => {
3985
- return remap$(v, {
3986
- cacheControl: "cache_control",
3987
- });
3988
- });
3989
-
3990
- export function invokeDeploymentRequest2Messages41ToJSON(
3991
- invokeDeploymentRequest2Messages41: InvokeDeploymentRequest2Messages41,
3992
- ): string {
3993
- return JSON.stringify(
3994
- InvokeDeploymentRequest2Messages41$outboundSchema.parse(
3995
- invokeDeploymentRequest2Messages41,
3996
- ),
3997
- );
3998
- }
3999
- export function invokeDeploymentRequest2Messages41FromJSON(
4000
- jsonString: string,
4001
- ): SafeParseResult<InvokeDeploymentRequest2Messages41, SDKValidationError> {
4002
- return safeParse(
4003
- jsonString,
4004
- (x) =>
4005
- InvokeDeploymentRequest2Messages41$inboundSchema.parse(JSON.parse(x)),
4006
- `Failed to parse 'InvokeDeploymentRequest2Messages41' from JSON`,
4007
- );
4008
- }
4009
-
4010
2391
  /** @internal */
4011
2392
  export const InvokeDeploymentRequestContentMessages42$inboundSchema: z.ZodType<
4012
2393
  InvokeDeploymentRequestContentMessages42,
4013
2394
  z.ZodTypeDef,
4014
2395
  unknown
4015
2396
  > = z.union([
4016
- z.lazy(() => InvokeDeploymentRequest2Messages41$inboundSchema),
2397
+ TextContentPartSchema$inboundSchema.and(
2398
+ z.object({ type: z.literal("text") }),
2399
+ ),
4017
2400
  RefusalPartSchema$inboundSchema,
4018
2401
  ReasoningPartSchema$inboundSchema,
4019
2402
  RedactedReasoningPartSchema$inboundSchema,
4020
2403
  ]);
4021
2404
  /** @internal */
4022
2405
  export type InvokeDeploymentRequestContentMessages42$Outbound =
4023
- | InvokeDeploymentRequest2Messages41$Outbound
2406
+ | (TextContentPartSchema$Outbound & { type: "text" })
4024
2407
  | RefusalPartSchema$Outbound
4025
2408
  | ReasoningPartSchema$Outbound
4026
2409
  | RedactedReasoningPartSchema$Outbound;
@@ -4031,7 +2414,9 @@ export const InvokeDeploymentRequestContentMessages42$outboundSchema: z.ZodType<
4031
2414
  z.ZodTypeDef,
4032
2415
  InvokeDeploymentRequestContentMessages42
4033
2416
  > = z.union([
4034
- z.lazy(() => InvokeDeploymentRequest2Messages41$outboundSchema),
2417
+ TextContentPartSchema$outboundSchema.and(
2418
+ z.object({ type: z.literal("text") }),
2419
+ ),
4035
2420
  RefusalPartSchema$outboundSchema,
4036
2421
  ReasoningPartSchema$outboundSchema,
4037
2422
  RedactedReasoningPartSchema$outboundSchema,
@@ -4070,18 +2455,22 @@ export const InvokeDeploymentRequestMessages4Content$inboundSchema: z.ZodType<
4070
2455
  unknown
4071
2456
  > = z.union([
4072
2457
  z.string(),
4073
- z.array(z.union([
4074
- z.lazy(() => InvokeDeploymentRequest2Messages41$inboundSchema),
4075
- RefusalPartSchema$inboundSchema,
4076
- ReasoningPartSchema$inboundSchema,
4077
- RedactedReasoningPartSchema$inboundSchema,
4078
- ])),
2458
+ z.array(
2459
+ z.union([
2460
+ TextContentPartSchema$inboundSchema.and(
2461
+ z.object({ type: z.literal("text") }),
2462
+ ),
2463
+ RefusalPartSchema$inboundSchema,
2464
+ ReasoningPartSchema$inboundSchema,
2465
+ RedactedReasoningPartSchema$inboundSchema,
2466
+ ]),
2467
+ ),
4079
2468
  ]);
4080
2469
  /** @internal */
4081
2470
  export type InvokeDeploymentRequestMessages4Content$Outbound =
4082
2471
  | string
4083
2472
  | Array<
4084
- | InvokeDeploymentRequest2Messages41$Outbound
2473
+ | (TextContentPartSchema$Outbound & { type: "text" })
4085
2474
  | RefusalPartSchema$Outbound
4086
2475
  | ReasoningPartSchema$Outbound
4087
2476
  | RedactedReasoningPartSchema$Outbound
@@ -4094,12 +2483,16 @@ export const InvokeDeploymentRequestMessages4Content$outboundSchema: z.ZodType<
4094
2483
  InvokeDeploymentRequestMessages4Content
4095
2484
  > = z.union([
4096
2485
  z.string(),
4097
- z.array(z.union([
4098
- z.lazy(() => InvokeDeploymentRequest2Messages41$outboundSchema),
4099
- RefusalPartSchema$outboundSchema,
4100
- ReasoningPartSchema$outboundSchema,
4101
- RedactedReasoningPartSchema$outboundSchema,
4102
- ])),
2486
+ z.array(
2487
+ z.union([
2488
+ TextContentPartSchema$outboundSchema.and(
2489
+ z.object({ type: z.literal("text") }),
2490
+ ),
2491
+ RefusalPartSchema$outboundSchema,
2492
+ ReasoningPartSchema$outboundSchema,
2493
+ RedactedReasoningPartSchema$outboundSchema,
2494
+ ]),
2495
+ ),
4103
2496
  ]);
4104
2497
 
4105
2498
  export function invokeDeploymentRequestMessages4ContentToJSON(
@@ -4279,7 +2672,9 @@ export const MessagesAssistantMessage$inboundSchema: z.ZodType<
4279
2672
  z.string(),
4280
2673
  z.array(
4281
2674
  z.union([
4282
- z.lazy(() => InvokeDeploymentRequest2Messages41$inboundSchema),
2675
+ TextContentPartSchema$inboundSchema.and(
2676
+ z.object({ type: z.literal("text") }),
2677
+ ),
4283
2678
  RefusalPartSchema$inboundSchema,
4284
2679
  ReasoningPartSchema$inboundSchema,
4285
2680
  RedactedReasoningPartSchema$inboundSchema,
@@ -4302,7 +2697,7 @@ export type MessagesAssistantMessage$Outbound = {
4302
2697
  content?:
4303
2698
  | string
4304
2699
  | Array<
4305
- | InvokeDeploymentRequest2Messages41$Outbound
2700
+ | (TextContentPartSchema$Outbound & { type: "text" })
4306
2701
  | RefusalPartSchema$Outbound
4307
2702
  | ReasoningPartSchema$Outbound
4308
2703
  | RedactedReasoningPartSchema$Outbound
@@ -4327,7 +2722,9 @@ export const MessagesAssistantMessage$outboundSchema: z.ZodType<
4327
2722
  z.string(),
4328
2723
  z.array(
4329
2724
  z.union([
4330
- z.lazy(() => InvokeDeploymentRequest2Messages41$outboundSchema),
2725
+ TextContentPartSchema$outboundSchema.and(
2726
+ z.object({ type: z.literal("text") }),
2727
+ ),
4331
2728
  RefusalPartSchema$outboundSchema,
4332
2729
  ReasoningPartSchema$outboundSchema,
4333
2730
  RedactedReasoningPartSchema$outboundSchema,
@@ -4364,74 +2761,66 @@ export function messagesAssistantMessageFromJSON(
4364
2761
  }
4365
2762
 
4366
2763
  /** @internal */
4367
- export const InvokeDeploymentRequest2Messages3Content4Type$inboundSchema:
4368
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages3Content4Type> = z
4369
- .nativeEnum(InvokeDeploymentRequest2Messages3Content4Type);
2764
+ export const InvokeDeploymentRequest2MessagesType$inboundSchema:
2765
+ z.ZodNativeEnum<typeof InvokeDeploymentRequest2MessagesType> = z.nativeEnum(
2766
+ InvokeDeploymentRequest2MessagesType,
2767
+ );
4370
2768
  /** @internal */
4371
- export const InvokeDeploymentRequest2Messages3Content4Type$outboundSchema:
4372
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages3Content4Type> =
4373
- InvokeDeploymentRequest2Messages3Content4Type$inboundSchema;
2769
+ export const InvokeDeploymentRequest2MessagesType$outboundSchema:
2770
+ z.ZodNativeEnum<typeof InvokeDeploymentRequest2MessagesType> =
2771
+ InvokeDeploymentRequest2MessagesType$inboundSchema;
4374
2772
 
4375
2773
  /** @internal */
4376
- export const InvokeDeploymentRequest2Messages3Ttl$inboundSchema:
4377
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages3Ttl> = z.nativeEnum(
4378
- InvokeDeploymentRequest2Messages3Ttl,
4379
- );
2774
+ export const InvokeDeploymentRequest2Ttl$inboundSchema: z.ZodNativeEnum<
2775
+ typeof InvokeDeploymentRequest2Ttl
2776
+ > = z.nativeEnum(InvokeDeploymentRequest2Ttl);
4380
2777
  /** @internal */
4381
- export const InvokeDeploymentRequest2Messages3Ttl$outboundSchema:
4382
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages3Ttl> =
4383
- InvokeDeploymentRequest2Messages3Ttl$inboundSchema;
2778
+ export const InvokeDeploymentRequest2Ttl$outboundSchema: z.ZodNativeEnum<
2779
+ typeof InvokeDeploymentRequest2Ttl
2780
+ > = InvokeDeploymentRequest2Ttl$inboundSchema;
4384
2781
 
4385
2782
  /** @internal */
4386
- export const InvokeDeploymentRequest2Messages3CacheControl$inboundSchema:
4387
- z.ZodType<
4388
- InvokeDeploymentRequest2Messages3CacheControl,
4389
- z.ZodTypeDef,
4390
- unknown
4391
- > = z.object({
4392
- type: InvokeDeploymentRequest2Messages3Content4Type$inboundSchema,
4393
- ttl: InvokeDeploymentRequest2Messages3Ttl$inboundSchema.default("5m"),
4394
- });
2783
+ export const InvokeDeploymentRequest2CacheControl$inboundSchema: z.ZodType<
2784
+ InvokeDeploymentRequest2CacheControl,
2785
+ z.ZodTypeDef,
2786
+ unknown
2787
+ > = z.object({
2788
+ type: InvokeDeploymentRequest2MessagesType$inboundSchema,
2789
+ ttl: InvokeDeploymentRequest2Ttl$inboundSchema.default("5m"),
2790
+ });
4395
2791
  /** @internal */
4396
- export type InvokeDeploymentRequest2Messages3CacheControl$Outbound = {
2792
+ export type InvokeDeploymentRequest2CacheControl$Outbound = {
4397
2793
  type: string;
4398
2794
  ttl: string;
4399
2795
  };
4400
2796
 
4401
2797
  /** @internal */
4402
- export const InvokeDeploymentRequest2Messages3CacheControl$outboundSchema:
4403
- z.ZodType<
4404
- InvokeDeploymentRequest2Messages3CacheControl$Outbound,
4405
- z.ZodTypeDef,
4406
- InvokeDeploymentRequest2Messages3CacheControl
4407
- > = z.object({
4408
- type: InvokeDeploymentRequest2Messages3Content4Type$outboundSchema,
4409
- ttl: InvokeDeploymentRequest2Messages3Ttl$outboundSchema.default("5m"),
4410
- });
2798
+ export const InvokeDeploymentRequest2CacheControl$outboundSchema: z.ZodType<
2799
+ InvokeDeploymentRequest2CacheControl$Outbound,
2800
+ z.ZodTypeDef,
2801
+ InvokeDeploymentRequest2CacheControl
2802
+ > = z.object({
2803
+ type: InvokeDeploymentRequest2MessagesType$outboundSchema,
2804
+ ttl: InvokeDeploymentRequest2Ttl$outboundSchema.default("5m"),
2805
+ });
4411
2806
 
4412
- export function invokeDeploymentRequest2Messages3CacheControlToJSON(
4413
- invokeDeploymentRequest2Messages3CacheControl:
4414
- InvokeDeploymentRequest2Messages3CacheControl,
2807
+ export function invokeDeploymentRequest2CacheControlToJSON(
2808
+ invokeDeploymentRequest2CacheControl: InvokeDeploymentRequest2CacheControl,
4415
2809
  ): string {
4416
2810
  return JSON.stringify(
4417
- InvokeDeploymentRequest2Messages3CacheControl$outboundSchema.parse(
4418
- invokeDeploymentRequest2Messages3CacheControl,
2811
+ InvokeDeploymentRequest2CacheControl$outboundSchema.parse(
2812
+ invokeDeploymentRequest2CacheControl,
4419
2813
  ),
4420
2814
  );
4421
2815
  }
4422
- export function invokeDeploymentRequest2Messages3CacheControlFromJSON(
2816
+ export function invokeDeploymentRequest2CacheControlFromJSON(
4423
2817
  jsonString: string,
4424
- ): SafeParseResult<
4425
- InvokeDeploymentRequest2Messages3CacheControl,
4426
- SDKValidationError
4427
- > {
2818
+ ): SafeParseResult<InvokeDeploymentRequest2CacheControl, SDKValidationError> {
4428
2819
  return safeParse(
4429
2820
  jsonString,
4430
2821
  (x) =>
4431
- InvokeDeploymentRequest2Messages3CacheControl$inboundSchema.parse(
4432
- JSON.parse(x),
4433
- ),
4434
- `Failed to parse 'InvokeDeploymentRequest2Messages3CacheControl' from JSON`,
2822
+ InvokeDeploymentRequest2CacheControl$inboundSchema.parse(JSON.parse(x)),
2823
+ `Failed to parse 'InvokeDeploymentRequest2CacheControl' from JSON`,
4435
2824
  );
4436
2825
  }
4437
2826
 
@@ -4440,7 +2829,7 @@ export const Two4$inboundSchema: z.ZodType<Two4, z.ZodTypeDef, unknown> = z
4440
2829
  .object({
4441
2830
  type: z.literal("file"),
4442
2831
  cache_control: z.lazy(() =>
4443
- InvokeDeploymentRequest2Messages3CacheControl$inboundSchema
2832
+ InvokeDeploymentRequest2CacheControl$inboundSchema
4444
2833
  ).optional(),
4445
2834
  file: FileContentPartSchema$inboundSchema,
4446
2835
  }).transform((v) => {
@@ -4451,9 +2840,7 @@ export const Two4$inboundSchema: z.ZodType<Two4, z.ZodTypeDef, unknown> = z
4451
2840
  /** @internal */
4452
2841
  export type Two4$Outbound = {
4453
2842
  type: "file";
4454
- cache_control?:
4455
- | InvokeDeploymentRequest2Messages3CacheControl$Outbound
4456
- | undefined;
2843
+ cache_control?: InvokeDeploymentRequest2CacheControl$Outbound | undefined;
4457
2844
  file: FileContentPartSchema$Outbound;
4458
2845
  };
4459
2846
 
@@ -4462,7 +2849,7 @@ export const Two4$outboundSchema: z.ZodType<Two4$Outbound, z.ZodTypeDef, Two4> =
4462
2849
  z.object({
4463
2850
  type: z.literal("file"),
4464
2851
  cacheControl: z.lazy(() =>
4465
- InvokeDeploymentRequest2Messages3CacheControl$outboundSchema
2852
+ InvokeDeploymentRequest2CacheControl$outboundSchema
4466
2853
  ).optional(),
4467
2854
  file: FileContentPartSchema$outboundSchema,
4468
2855
  }).transform((v) => {
@@ -4485,190 +2872,62 @@ export function two4FromJSON(
4485
2872
  }
4486
2873
 
4487
2874
  /** @internal */
4488
- export const InvokeDeploymentRequest2Messages3ContentType$inboundSchema:
4489
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages3ContentType> = z
4490
- .nativeEnum(InvokeDeploymentRequest2Messages3ContentType);
4491
- /** @internal */
4492
- export const InvokeDeploymentRequest2Messages3ContentType$outboundSchema:
4493
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2Messages3ContentType> =
4494
- InvokeDeploymentRequest2Messages3ContentType$inboundSchema;
4495
-
4496
- /** @internal */
4497
- export const InvokeDeploymentRequest2MessagesTtl$inboundSchema: z.ZodNativeEnum<
4498
- typeof InvokeDeploymentRequest2MessagesTtl
4499
- > = z.nativeEnum(InvokeDeploymentRequest2MessagesTtl);
4500
- /** @internal */
4501
- export const InvokeDeploymentRequest2MessagesTtl$outboundSchema:
4502
- z.ZodNativeEnum<typeof InvokeDeploymentRequest2MessagesTtl> =
4503
- InvokeDeploymentRequest2MessagesTtl$inboundSchema;
4504
-
4505
- /** @internal */
4506
- export const InvokeDeploymentRequest2MessagesCacheControl$inboundSchema:
4507
- z.ZodType<
4508
- InvokeDeploymentRequest2MessagesCacheControl,
4509
- z.ZodTypeDef,
4510
- unknown
4511
- > = z.object({
4512
- type: InvokeDeploymentRequest2Messages3ContentType$inboundSchema,
4513
- ttl: InvokeDeploymentRequest2MessagesTtl$inboundSchema.default("5m"),
4514
- });
4515
- /** @internal */
4516
- export type InvokeDeploymentRequest2MessagesCacheControl$Outbound = {
4517
- type: string;
4518
- ttl: string;
4519
- };
4520
-
4521
- /** @internal */
4522
- export const InvokeDeploymentRequest2MessagesCacheControl$outboundSchema:
4523
- z.ZodType<
4524
- InvokeDeploymentRequest2MessagesCacheControl$Outbound,
4525
- z.ZodTypeDef,
4526
- InvokeDeploymentRequest2MessagesCacheControl
4527
- > = z.object({
4528
- type: InvokeDeploymentRequest2Messages3ContentType$outboundSchema,
4529
- ttl: InvokeDeploymentRequest2MessagesTtl$outboundSchema.default("5m"),
4530
- });
4531
-
4532
- export function invokeDeploymentRequest2MessagesCacheControlToJSON(
4533
- invokeDeploymentRequest2MessagesCacheControl:
4534
- InvokeDeploymentRequest2MessagesCacheControl,
4535
- ): string {
4536
- return JSON.stringify(
4537
- InvokeDeploymentRequest2MessagesCacheControl$outboundSchema.parse(
4538
- invokeDeploymentRequest2MessagesCacheControl,
4539
- ),
4540
- );
4541
- }
4542
- export function invokeDeploymentRequest2MessagesCacheControlFromJSON(
4543
- jsonString: string,
4544
- ): SafeParseResult<
4545
- InvokeDeploymentRequest2MessagesCacheControl,
4546
- SDKValidationError
4547
- > {
4548
- return safeParse(
4549
- jsonString,
4550
- (x) =>
4551
- InvokeDeploymentRequest2MessagesCacheControl$inboundSchema.parse(
4552
- JSON.parse(x),
4553
- ),
4554
- `Failed to parse 'InvokeDeploymentRequest2MessagesCacheControl' from JSON`,
4555
- );
4556
- }
4557
-
4558
- /** @internal */
4559
- export const InvokeDeploymentRequest2Messages1$inboundSchema: z.ZodType<
4560
- InvokeDeploymentRequest2Messages1,
4561
- z.ZodTypeDef,
4562
- unknown
4563
- > = z.object({
4564
- type: z.literal("text"),
4565
- text: z.string(),
4566
- cache_control: z.lazy(() =>
4567
- InvokeDeploymentRequest2MessagesCacheControl$inboundSchema
4568
- ).optional(),
4569
- }).transform((v) => {
4570
- return remap$(v, {
4571
- "cache_control": "cacheControl",
4572
- });
4573
- });
4574
- /** @internal */
4575
- export type InvokeDeploymentRequest2Messages1$Outbound = {
4576
- type: "text";
4577
- text: string;
4578
- cache_control?:
4579
- | InvokeDeploymentRequest2MessagesCacheControl$Outbound
4580
- | undefined;
4581
- };
4582
-
4583
- /** @internal */
4584
- export const InvokeDeploymentRequest2Messages1$outboundSchema: z.ZodType<
4585
- InvokeDeploymentRequest2Messages1$Outbound,
4586
- z.ZodTypeDef,
4587
- InvokeDeploymentRequest2Messages1
4588
- > = z.object({
4589
- type: z.literal("text"),
4590
- text: z.string(),
4591
- cacheControl: z.lazy(() =>
4592
- InvokeDeploymentRequest2MessagesCacheControl$outboundSchema
4593
- ).optional(),
4594
- }).transform((v) => {
4595
- return remap$(v, {
4596
- cacheControl: "cache_control",
4597
- });
4598
- });
4599
-
4600
- export function invokeDeploymentRequest2Messages1ToJSON(
4601
- invokeDeploymentRequest2Messages1: InvokeDeploymentRequest2Messages1,
4602
- ): string {
4603
- return JSON.stringify(
4604
- InvokeDeploymentRequest2Messages1$outboundSchema.parse(
4605
- invokeDeploymentRequest2Messages1,
4606
- ),
4607
- );
4608
- }
4609
- export function invokeDeploymentRequest2Messages1FromJSON(
4610
- jsonString: string,
4611
- ): SafeParseResult<InvokeDeploymentRequest2Messages1, SDKValidationError> {
4612
- return safeParse(
4613
- jsonString,
4614
- (x) => InvokeDeploymentRequest2Messages1$inboundSchema.parse(JSON.parse(x)),
4615
- `Failed to parse 'InvokeDeploymentRequest2Messages1' from JSON`,
4616
- );
4617
- }
4618
-
4619
- /** @internal */
4620
- export const InvokeDeploymentRequestContentMessages32$inboundSchema: z.ZodType<
4621
- InvokeDeploymentRequestContentMessages32,
2875
+ export const InvokeDeploymentRequestContentMessages2$inboundSchema: z.ZodType<
2876
+ InvokeDeploymentRequestContentMessages2,
4622
2877
  z.ZodTypeDef,
4623
2878
  unknown
4624
2879
  > = z.union([
4625
- z.lazy(() => InvokeDeploymentRequest2Messages1$inboundSchema),
2880
+ TextContentPartSchema$inboundSchema.and(
2881
+ z.object({ type: z.literal("text") }),
2882
+ ),
4626
2883
  ImageContentPartSchema$inboundSchema,
4627
2884
  AudioContentPartSchema$inboundSchema,
4628
2885
  z.lazy(() => Two4$inboundSchema),
4629
2886
  ]);
4630
2887
  /** @internal */
4631
- export type InvokeDeploymentRequestContentMessages32$Outbound =
4632
- | InvokeDeploymentRequest2Messages1$Outbound
2888
+ export type InvokeDeploymentRequestContentMessages2$Outbound =
2889
+ | (TextContentPartSchema$Outbound & { type: "text" })
4633
2890
  | ImageContentPartSchema$Outbound
4634
2891
  | AudioContentPartSchema$Outbound
4635
2892
  | Two4$Outbound;
4636
2893
 
4637
2894
  /** @internal */
4638
- export const InvokeDeploymentRequestContentMessages32$outboundSchema: z.ZodType<
4639
- InvokeDeploymentRequestContentMessages32$Outbound,
2895
+ export const InvokeDeploymentRequestContentMessages2$outboundSchema: z.ZodType<
2896
+ InvokeDeploymentRequestContentMessages2$Outbound,
4640
2897
  z.ZodTypeDef,
4641
- InvokeDeploymentRequestContentMessages32
2898
+ InvokeDeploymentRequestContentMessages2
4642
2899
  > = z.union([
4643
- z.lazy(() => InvokeDeploymentRequest2Messages1$outboundSchema),
2900
+ TextContentPartSchema$outboundSchema.and(
2901
+ z.object({ type: z.literal("text") }),
2902
+ ),
4644
2903
  ImageContentPartSchema$outboundSchema,
4645
2904
  AudioContentPartSchema$outboundSchema,
4646
2905
  z.lazy(() => Two4$outboundSchema),
4647
2906
  ]);
4648
2907
 
4649
- export function invokeDeploymentRequestContentMessages32ToJSON(
4650
- invokeDeploymentRequestContentMessages32:
4651
- InvokeDeploymentRequestContentMessages32,
2908
+ export function invokeDeploymentRequestContentMessages2ToJSON(
2909
+ invokeDeploymentRequestContentMessages2:
2910
+ InvokeDeploymentRequestContentMessages2,
4652
2911
  ): string {
4653
2912
  return JSON.stringify(
4654
- InvokeDeploymentRequestContentMessages32$outboundSchema.parse(
4655
- invokeDeploymentRequestContentMessages32,
2913
+ InvokeDeploymentRequestContentMessages2$outboundSchema.parse(
2914
+ invokeDeploymentRequestContentMessages2,
4656
2915
  ),
4657
2916
  );
4658
2917
  }
4659
- export function invokeDeploymentRequestContentMessages32FromJSON(
2918
+ export function invokeDeploymentRequestContentMessages2FromJSON(
4660
2919
  jsonString: string,
4661
2920
  ): SafeParseResult<
4662
- InvokeDeploymentRequestContentMessages32,
2921
+ InvokeDeploymentRequestContentMessages2,
4663
2922
  SDKValidationError
4664
2923
  > {
4665
2924
  return safeParse(
4666
2925
  jsonString,
4667
2926
  (x) =>
4668
- InvokeDeploymentRequestContentMessages32$inboundSchema.parse(
2927
+ InvokeDeploymentRequestContentMessages2$inboundSchema.parse(
4669
2928
  JSON.parse(x),
4670
2929
  ),
4671
- `Failed to parse 'InvokeDeploymentRequestContentMessages32' from JSON`,
2930
+ `Failed to parse 'InvokeDeploymentRequestContentMessages2' from JSON`,
4672
2931
  );
4673
2932
  }
4674
2933
 
@@ -4679,18 +2938,22 @@ export const InvokeDeploymentRequestMessages3Content$inboundSchema: z.ZodType<
4679
2938
  unknown
4680
2939
  > = z.union([
4681
2940
  z.string(),
4682
- z.array(z.union([
4683
- z.lazy(() => InvokeDeploymentRequest2Messages1$inboundSchema),
4684
- ImageContentPartSchema$inboundSchema,
4685
- AudioContentPartSchema$inboundSchema,
4686
- z.lazy(() => Two4$inboundSchema),
4687
- ])),
2941
+ z.array(
2942
+ z.union([
2943
+ TextContentPartSchema$inboundSchema.and(
2944
+ z.object({ type: z.literal("text") }),
2945
+ ),
2946
+ ImageContentPartSchema$inboundSchema,
2947
+ AudioContentPartSchema$inboundSchema,
2948
+ z.lazy(() => Two4$inboundSchema),
2949
+ ]),
2950
+ ),
4688
2951
  ]);
4689
2952
  /** @internal */
4690
2953
  export type InvokeDeploymentRequestMessages3Content$Outbound =
4691
2954
  | string
4692
2955
  | Array<
4693
- | InvokeDeploymentRequest2Messages1$Outbound
2956
+ | (TextContentPartSchema$Outbound & { type: "text" })
4694
2957
  | ImageContentPartSchema$Outbound
4695
2958
  | AudioContentPartSchema$Outbound
4696
2959
  | Two4$Outbound
@@ -4703,12 +2966,16 @@ export const InvokeDeploymentRequestMessages3Content$outboundSchema: z.ZodType<
4703
2966
  InvokeDeploymentRequestMessages3Content
4704
2967
  > = z.union([
4705
2968
  z.string(),
4706
- z.array(z.union([
4707
- z.lazy(() => InvokeDeploymentRequest2Messages1$outboundSchema),
4708
- ImageContentPartSchema$outboundSchema,
4709
- AudioContentPartSchema$outboundSchema,
4710
- z.lazy(() => Two4$outboundSchema),
4711
- ])),
2969
+ z.array(
2970
+ z.union([
2971
+ TextContentPartSchema$outboundSchema.and(
2972
+ z.object({ type: z.literal("text") }),
2973
+ ),
2974
+ ImageContentPartSchema$outboundSchema,
2975
+ AudioContentPartSchema$outboundSchema,
2976
+ z.lazy(() => Two4$outboundSchema),
2977
+ ]),
2978
+ ),
4712
2979
  ]);
4713
2980
 
4714
2981
  export function invokeDeploymentRequestMessages3ContentToJSON(
@@ -4747,12 +3014,16 @@ export const MessagesUserMessage$inboundSchema: z.ZodType<
4747
3014
  name: z.string().optional(),
4748
3015
  content: z.union([
4749
3016
  z.string(),
4750
- z.array(z.union([
4751
- z.lazy(() => InvokeDeploymentRequest2Messages1$inboundSchema),
4752
- ImageContentPartSchema$inboundSchema,
4753
- AudioContentPartSchema$inboundSchema,
4754
- z.lazy(() => Two4$inboundSchema),
4755
- ])),
3017
+ z.array(
3018
+ z.union([
3019
+ TextContentPartSchema$inboundSchema.and(
3020
+ z.object({ type: z.literal("text") }),
3021
+ ),
3022
+ ImageContentPartSchema$inboundSchema,
3023
+ AudioContentPartSchema$inboundSchema,
3024
+ z.lazy(() => Two4$inboundSchema),
3025
+ ]),
3026
+ ),
4756
3027
  ]),
4757
3028
  });
4758
3029
  /** @internal */
@@ -4762,7 +3033,7 @@ export type MessagesUserMessage$Outbound = {
4762
3033
  content:
4763
3034
  | string
4764
3035
  | Array<
4765
- | InvokeDeploymentRequest2Messages1$Outbound
3036
+ | (TextContentPartSchema$Outbound & { type: "text" })
4766
3037
  | ImageContentPartSchema$Outbound
4767
3038
  | AudioContentPartSchema$Outbound
4768
3039
  | Two4$Outbound
@@ -4779,12 +3050,16 @@ export const MessagesUserMessage$outboundSchema: z.ZodType<
4779
3050
  name: z.string().optional(),
4780
3051
  content: z.union([
4781
3052
  z.string(),
4782
- z.array(z.union([
4783
- z.lazy(() => InvokeDeploymentRequest2Messages1$outboundSchema),
4784
- ImageContentPartSchema$outboundSchema,
4785
- AudioContentPartSchema$outboundSchema,
4786
- z.lazy(() => Two4$outboundSchema),
4787
- ])),
3053
+ z.array(
3054
+ z.union([
3055
+ TextContentPartSchema$outboundSchema.and(
3056
+ z.object({ type: z.literal("text") }),
3057
+ ),
3058
+ ImageContentPartSchema$outboundSchema,
3059
+ AudioContentPartSchema$outboundSchema,
3060
+ z.lazy(() => Two4$outboundSchema),
3061
+ ]),
3062
+ ),
4788
3063
  ]),
4789
3064
  });
4790
3065
 
@@ -4805,181 +3080,23 @@ export function messagesUserMessageFromJSON(
4805
3080
  );
4806
3081
  }
4807
3082
 
4808
- /** @internal */
4809
- export const InvokeDeploymentRequestContentMessages2Type$inboundSchema:
4810
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentMessages2Type> = z
4811
- .nativeEnum(InvokeDeploymentRequestContentMessages2Type);
4812
- /** @internal */
4813
- export const InvokeDeploymentRequestContentMessages2Type$outboundSchema:
4814
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentMessages2Type> =
4815
- InvokeDeploymentRequestContentMessages2Type$inboundSchema;
4816
-
4817
- /** @internal */
4818
- export const InvokeDeploymentRequestContentMessages22Type$inboundSchema:
4819
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentMessages22Type> = z
4820
- .nativeEnum(InvokeDeploymentRequestContentMessages22Type);
4821
- /** @internal */
4822
- export const InvokeDeploymentRequestContentMessages22Type$outboundSchema:
4823
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentMessages22Type> =
4824
- InvokeDeploymentRequestContentMessages22Type$inboundSchema;
4825
-
4826
- /** @internal */
4827
- export const InvokeDeploymentRequestContentMessages2Ttl$inboundSchema:
4828
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentMessages2Ttl> = z
4829
- .nativeEnum(InvokeDeploymentRequestContentMessages2Ttl);
4830
- /** @internal */
4831
- export const InvokeDeploymentRequestContentMessages2Ttl$outboundSchema:
4832
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentMessages2Ttl> =
4833
- InvokeDeploymentRequestContentMessages2Ttl$inboundSchema;
4834
-
4835
- /** @internal */
4836
- export const InvokeDeploymentRequestContentMessages2CacheControl$inboundSchema:
4837
- z.ZodType<
4838
- InvokeDeploymentRequestContentMessages2CacheControl,
4839
- z.ZodTypeDef,
4840
- unknown
4841
- > = z.object({
4842
- type: InvokeDeploymentRequestContentMessages22Type$inboundSchema,
4843
- ttl: InvokeDeploymentRequestContentMessages2Ttl$inboundSchema.default("5m"),
4844
- });
4845
- /** @internal */
4846
- export type InvokeDeploymentRequestContentMessages2CacheControl$Outbound = {
4847
- type: string;
4848
- ttl: string;
4849
- };
4850
-
4851
- /** @internal */
4852
- export const InvokeDeploymentRequestContentMessages2CacheControl$outboundSchema:
4853
- z.ZodType<
4854
- InvokeDeploymentRequestContentMessages2CacheControl$Outbound,
4855
- z.ZodTypeDef,
4856
- InvokeDeploymentRequestContentMessages2CacheControl
4857
- > = z.object({
4858
- type: InvokeDeploymentRequestContentMessages22Type$outboundSchema,
4859
- ttl: InvokeDeploymentRequestContentMessages2Ttl$outboundSchema.default(
4860
- "5m",
4861
- ),
4862
- });
4863
-
4864
- export function invokeDeploymentRequestContentMessages2CacheControlToJSON(
4865
- invokeDeploymentRequestContentMessages2CacheControl:
4866
- InvokeDeploymentRequestContentMessages2CacheControl,
4867
- ): string {
4868
- return JSON.stringify(
4869
- InvokeDeploymentRequestContentMessages2CacheControl$outboundSchema.parse(
4870
- invokeDeploymentRequestContentMessages2CacheControl,
4871
- ),
4872
- );
4873
- }
4874
- export function invokeDeploymentRequestContentMessages2CacheControlFromJSON(
4875
- jsonString: string,
4876
- ): SafeParseResult<
4877
- InvokeDeploymentRequestContentMessages2CacheControl,
4878
- SDKValidationError
4879
- > {
4880
- return safeParse(
4881
- jsonString,
4882
- (x) =>
4883
- InvokeDeploymentRequestContentMessages2CacheControl$inboundSchema.parse(
4884
- JSON.parse(x),
4885
- ),
4886
- `Failed to parse 'InvokeDeploymentRequestContentMessages2CacheControl' from JSON`,
4887
- );
4888
- }
4889
-
4890
- /** @internal */
4891
- export const InvokeDeploymentRequestContentMessages22$inboundSchema: z.ZodType<
4892
- InvokeDeploymentRequestContentMessages22,
4893
- z.ZodTypeDef,
4894
- unknown
4895
- > = z.object({
4896
- type: InvokeDeploymentRequestContentMessages2Type$inboundSchema,
4897
- text: z.string(),
4898
- cache_control: z.lazy(() =>
4899
- InvokeDeploymentRequestContentMessages2CacheControl$inboundSchema
4900
- ).optional(),
4901
- }).transform((v) => {
4902
- return remap$(v, {
4903
- "cache_control": "cacheControl",
4904
- });
4905
- });
4906
- /** @internal */
4907
- export type InvokeDeploymentRequestContentMessages22$Outbound = {
4908
- type: string;
4909
- text: string;
4910
- cache_control?:
4911
- | InvokeDeploymentRequestContentMessages2CacheControl$Outbound
4912
- | undefined;
4913
- };
4914
-
4915
- /** @internal */
4916
- export const InvokeDeploymentRequestContentMessages22$outboundSchema: z.ZodType<
4917
- InvokeDeploymentRequestContentMessages22$Outbound,
4918
- z.ZodTypeDef,
4919
- InvokeDeploymentRequestContentMessages22
4920
- > = z.object({
4921
- type: InvokeDeploymentRequestContentMessages2Type$outboundSchema,
4922
- text: z.string(),
4923
- cacheControl: z.lazy(() =>
4924
- InvokeDeploymentRequestContentMessages2CacheControl$outboundSchema
4925
- ).optional(),
4926
- }).transform((v) => {
4927
- return remap$(v, {
4928
- cacheControl: "cache_control",
4929
- });
4930
- });
4931
-
4932
- export function invokeDeploymentRequestContentMessages22ToJSON(
4933
- invokeDeploymentRequestContentMessages22:
4934
- InvokeDeploymentRequestContentMessages22,
4935
- ): string {
4936
- return JSON.stringify(
4937
- InvokeDeploymentRequestContentMessages22$outboundSchema.parse(
4938
- invokeDeploymentRequestContentMessages22,
4939
- ),
4940
- );
4941
- }
4942
- export function invokeDeploymentRequestContentMessages22FromJSON(
4943
- jsonString: string,
4944
- ): SafeParseResult<
4945
- InvokeDeploymentRequestContentMessages22,
4946
- SDKValidationError
4947
- > {
4948
- return safeParse(
4949
- jsonString,
4950
- (x) =>
4951
- InvokeDeploymentRequestContentMessages22$inboundSchema.parse(
4952
- JSON.parse(x),
4953
- ),
4954
- `Failed to parse 'InvokeDeploymentRequestContentMessages22' from JSON`,
4955
- );
4956
- }
4957
-
4958
3083
  /** @internal */
4959
3084
  export const InvokeDeploymentRequestMessagesContent$inboundSchema: z.ZodType<
4960
3085
  InvokeDeploymentRequestMessagesContent,
4961
3086
  z.ZodTypeDef,
4962
3087
  unknown
4963
- > = z.union([
4964
- z.string(),
4965
- z.array(z.lazy(() => InvokeDeploymentRequestContentMessages22$inboundSchema)),
4966
- ]);
3088
+ > = z.union([z.string(), z.array(TextContentPartSchema$inboundSchema)]);
4967
3089
  /** @internal */
4968
3090
  export type InvokeDeploymentRequestMessagesContent$Outbound =
4969
3091
  | string
4970
- | Array<InvokeDeploymentRequestContentMessages22$Outbound>;
3092
+ | Array<TextContentPartSchema$Outbound>;
4971
3093
 
4972
3094
  /** @internal */
4973
3095
  export const InvokeDeploymentRequestMessagesContent$outboundSchema: z.ZodType<
4974
3096
  InvokeDeploymentRequestMessagesContent$Outbound,
4975
3097
  z.ZodTypeDef,
4976
3098
  InvokeDeploymentRequestMessagesContent
4977
- > = z.union([
4978
- z.string(),
4979
- z.array(
4980
- z.lazy(() => InvokeDeploymentRequestContentMessages22$outboundSchema),
4981
- ),
4982
- ]);
3099
+ > = z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]);
4983
3100
 
4984
3101
  export function invokeDeploymentRequestMessagesContentToJSON(
4985
3102
  invokeDeploymentRequestMessagesContent:
@@ -5009,18 +3126,13 @@ export const MessagesDeveloperMessage$inboundSchema: z.ZodType<
5009
3126
  unknown
5010
3127
  > = z.object({
5011
3128
  role: z.literal("developer"),
5012
- content: z.union([
5013
- z.string(),
5014
- z.array(
5015
- z.lazy(() => InvokeDeploymentRequestContentMessages22$inboundSchema),
5016
- ),
5017
- ]),
3129
+ content: z.union([z.string(), z.array(TextContentPartSchema$inboundSchema)]),
5018
3130
  name: z.string().optional(),
5019
3131
  });
5020
3132
  /** @internal */
5021
3133
  export type MessagesDeveloperMessage$Outbound = {
5022
3134
  role: "developer";
5023
- content: string | Array<InvokeDeploymentRequestContentMessages22$Outbound>;
3135
+ content: string | Array<TextContentPartSchema$Outbound>;
5024
3136
  name?: string | undefined;
5025
3137
  };
5026
3138
 
@@ -5031,12 +3143,7 @@ export const MessagesDeveloperMessage$outboundSchema: z.ZodType<
5031
3143
  MessagesDeveloperMessage
5032
3144
  > = z.object({
5033
3145
  role: z.literal("developer"),
5034
- content: z.union([
5035
- z.string(),
5036
- z.array(
5037
- z.lazy(() => InvokeDeploymentRequestContentMessages22$outboundSchema),
5038
- ),
5039
- ]),
3146
+ content: z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]),
5040
3147
  name: z.string().optional(),
5041
3148
  });
5042
3149
 
@@ -5057,177 +3164,23 @@ export function messagesDeveloperMessageFromJSON(
5057
3164
  );
5058
3165
  }
5059
3166
 
5060
- /** @internal */
5061
- export const InvokeDeploymentRequestContentMessagesType$inboundSchema:
5062
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentMessagesType> = z
5063
- .nativeEnum(InvokeDeploymentRequestContentMessagesType);
5064
- /** @internal */
5065
- export const InvokeDeploymentRequestContentMessagesType$outboundSchema:
5066
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentMessagesType> =
5067
- InvokeDeploymentRequestContentMessagesType$inboundSchema;
5068
-
5069
- /** @internal */
5070
- export const InvokeDeploymentRequestContentMessages1Type$inboundSchema:
5071
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentMessages1Type> = z
5072
- .nativeEnum(InvokeDeploymentRequestContentMessages1Type);
5073
- /** @internal */
5074
- export const InvokeDeploymentRequestContentMessages1Type$outboundSchema:
5075
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentMessages1Type> =
5076
- InvokeDeploymentRequestContentMessages1Type$inboundSchema;
5077
-
5078
- /** @internal */
5079
- export const InvokeDeploymentRequestContentMessagesTtl$inboundSchema:
5080
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentMessagesTtl> = z
5081
- .nativeEnum(InvokeDeploymentRequestContentMessagesTtl);
5082
- /** @internal */
5083
- export const InvokeDeploymentRequestContentMessagesTtl$outboundSchema:
5084
- z.ZodNativeEnum<typeof InvokeDeploymentRequestContentMessagesTtl> =
5085
- InvokeDeploymentRequestContentMessagesTtl$inboundSchema;
5086
-
5087
- /** @internal */
5088
- export const InvokeDeploymentRequestContentMessagesCacheControl$inboundSchema:
5089
- z.ZodType<
5090
- InvokeDeploymentRequestContentMessagesCacheControl,
5091
- z.ZodTypeDef,
5092
- unknown
5093
- > = z.object({
5094
- type: InvokeDeploymentRequestContentMessages1Type$inboundSchema,
5095
- ttl: InvokeDeploymentRequestContentMessagesTtl$inboundSchema.default("5m"),
5096
- });
5097
- /** @internal */
5098
- export type InvokeDeploymentRequestContentMessagesCacheControl$Outbound = {
5099
- type: string;
5100
- ttl: string;
5101
- };
5102
-
5103
- /** @internal */
5104
- export const InvokeDeploymentRequestContentMessagesCacheControl$outboundSchema:
5105
- z.ZodType<
5106
- InvokeDeploymentRequestContentMessagesCacheControl$Outbound,
5107
- z.ZodTypeDef,
5108
- InvokeDeploymentRequestContentMessagesCacheControl
5109
- > = z.object({
5110
- type: InvokeDeploymentRequestContentMessages1Type$outboundSchema,
5111
- ttl: InvokeDeploymentRequestContentMessagesTtl$outboundSchema.default("5m"),
5112
- });
5113
-
5114
- export function invokeDeploymentRequestContentMessagesCacheControlToJSON(
5115
- invokeDeploymentRequestContentMessagesCacheControl:
5116
- InvokeDeploymentRequestContentMessagesCacheControl,
5117
- ): string {
5118
- return JSON.stringify(
5119
- InvokeDeploymentRequestContentMessagesCacheControl$outboundSchema.parse(
5120
- invokeDeploymentRequestContentMessagesCacheControl,
5121
- ),
5122
- );
5123
- }
5124
- export function invokeDeploymentRequestContentMessagesCacheControlFromJSON(
5125
- jsonString: string,
5126
- ): SafeParseResult<
5127
- InvokeDeploymentRequestContentMessagesCacheControl,
5128
- SDKValidationError
5129
- > {
5130
- return safeParse(
5131
- jsonString,
5132
- (x) =>
5133
- InvokeDeploymentRequestContentMessagesCacheControl$inboundSchema.parse(
5134
- JSON.parse(x),
5135
- ),
5136
- `Failed to parse 'InvokeDeploymentRequestContentMessagesCacheControl' from JSON`,
5137
- );
5138
- }
5139
-
5140
- /** @internal */
5141
- export const InvokeDeploymentRequestContentMessages2$inboundSchema: z.ZodType<
5142
- InvokeDeploymentRequestContentMessages2,
5143
- z.ZodTypeDef,
5144
- unknown
5145
- > = z.object({
5146
- type: InvokeDeploymentRequestContentMessagesType$inboundSchema,
5147
- text: z.string(),
5148
- cache_control: z.lazy(() =>
5149
- InvokeDeploymentRequestContentMessagesCacheControl$inboundSchema
5150
- ).optional(),
5151
- }).transform((v) => {
5152
- return remap$(v, {
5153
- "cache_control": "cacheControl",
5154
- });
5155
- });
5156
- /** @internal */
5157
- export type InvokeDeploymentRequestContentMessages2$Outbound = {
5158
- type: string;
5159
- text: string;
5160
- cache_control?:
5161
- | InvokeDeploymentRequestContentMessagesCacheControl$Outbound
5162
- | undefined;
5163
- };
5164
-
5165
- /** @internal */
5166
- export const InvokeDeploymentRequestContentMessages2$outboundSchema: z.ZodType<
5167
- InvokeDeploymentRequestContentMessages2$Outbound,
5168
- z.ZodTypeDef,
5169
- InvokeDeploymentRequestContentMessages2
5170
- > = z.object({
5171
- type: InvokeDeploymentRequestContentMessagesType$outboundSchema,
5172
- text: z.string(),
5173
- cacheControl: z.lazy(() =>
5174
- InvokeDeploymentRequestContentMessagesCacheControl$outboundSchema
5175
- ).optional(),
5176
- }).transform((v) => {
5177
- return remap$(v, {
5178
- cacheControl: "cache_control",
5179
- });
5180
- });
5181
-
5182
- export function invokeDeploymentRequestContentMessages2ToJSON(
5183
- invokeDeploymentRequestContentMessages2:
5184
- InvokeDeploymentRequestContentMessages2,
5185
- ): string {
5186
- return JSON.stringify(
5187
- InvokeDeploymentRequestContentMessages2$outboundSchema.parse(
5188
- invokeDeploymentRequestContentMessages2,
5189
- ),
5190
- );
5191
- }
5192
- export function invokeDeploymentRequestContentMessages2FromJSON(
5193
- jsonString: string,
5194
- ): SafeParseResult<
5195
- InvokeDeploymentRequestContentMessages2,
5196
- SDKValidationError
5197
- > {
5198
- return safeParse(
5199
- jsonString,
5200
- (x) =>
5201
- InvokeDeploymentRequestContentMessages2$inboundSchema.parse(
5202
- JSON.parse(x),
5203
- ),
5204
- `Failed to parse 'InvokeDeploymentRequestContentMessages2' from JSON`,
5205
- );
5206
- }
5207
-
5208
3167
  /** @internal */
5209
3168
  export const MessagesContent$inboundSchema: z.ZodType<
5210
3169
  MessagesContent,
5211
3170
  z.ZodTypeDef,
5212
3171
  unknown
5213
- > = z.union([
5214
- z.string(),
5215
- z.array(z.lazy(() => InvokeDeploymentRequestContentMessages2$inboundSchema)),
5216
- ]);
3172
+ > = z.union([z.string(), z.array(TextContentPartSchema$inboundSchema)]);
5217
3173
  /** @internal */
5218
3174
  export type MessagesContent$Outbound =
5219
3175
  | string
5220
- | Array<InvokeDeploymentRequestContentMessages2$Outbound>;
3176
+ | Array<TextContentPartSchema$Outbound>;
5221
3177
 
5222
3178
  /** @internal */
5223
3179
  export const MessagesContent$outboundSchema: z.ZodType<
5224
3180
  MessagesContent$Outbound,
5225
3181
  z.ZodTypeDef,
5226
3182
  MessagesContent
5227
- > = z.union([
5228
- z.string(),
5229
- z.array(z.lazy(() => InvokeDeploymentRequestContentMessages2$outboundSchema)),
5230
- ]);
3183
+ > = z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]);
5231
3184
 
5232
3185
  export function messagesContentToJSON(
5233
3186
  messagesContent: MessagesContent,
@@ -5251,18 +3204,13 @@ export const MessagesSystemMessage$inboundSchema: z.ZodType<
5251
3204
  unknown
5252
3205
  > = z.object({
5253
3206
  role: z.literal("system"),
5254
- content: z.union([
5255
- z.string(),
5256
- z.array(
5257
- z.lazy(() => InvokeDeploymentRequestContentMessages2$inboundSchema),
5258
- ),
5259
- ]),
3207
+ content: z.union([z.string(), z.array(TextContentPartSchema$inboundSchema)]),
5260
3208
  name: z.string().optional(),
5261
3209
  });
5262
3210
  /** @internal */
5263
3211
  export type MessagesSystemMessage$Outbound = {
5264
3212
  role: "system";
5265
- content: string | Array<InvokeDeploymentRequestContentMessages2$Outbound>;
3213
+ content: string | Array<TextContentPartSchema$Outbound>;
5266
3214
  name?: string | undefined;
5267
3215
  };
5268
3216
 
@@ -5273,12 +3221,7 @@ export const MessagesSystemMessage$outboundSchema: z.ZodType<
5273
3221
  MessagesSystemMessage
5274
3222
  > = z.object({
5275
3223
  role: z.literal("system"),
5276
- content: z.union([
5277
- z.string(),
5278
- z.array(
5279
- z.lazy(() => InvokeDeploymentRequestContentMessages2$outboundSchema),
5280
- ),
5281
- ]),
3224
+ content: z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]),
5282
3225
  name: z.string().optional(),
5283
3226
  });
5284
3227
 
@@ -5346,8 +3289,8 @@ export function messagesFromJSON(
5346
3289
  }
5347
3290
 
5348
3291
  /** @internal */
5349
- export const Metadata$inboundSchema: z.ZodType<
5350
- Metadata,
3292
+ export const InvokeDeploymentRequestMetadata$inboundSchema: z.ZodType<
3293
+ InvokeDeploymentRequestMetadata,
5351
3294
  z.ZodTypeDef,
5352
3295
  unknown
5353
3296
  > = z.object({
@@ -5362,17 +3305,17 @@ export const Metadata$inboundSchema: z.ZodType<
5362
3305
  });
5363
3306
  });
5364
3307
  /** @internal */
5365
- export type Metadata$Outbound = {
3308
+ export type InvokeDeploymentRequestMetadata$Outbound = {
5366
3309
  file_name?: string | undefined;
5367
3310
  file_type?: string | undefined;
5368
3311
  page_number?: number | undefined;
5369
3312
  };
5370
3313
 
5371
3314
  /** @internal */
5372
- export const Metadata$outboundSchema: z.ZodType<
5373
- Metadata$Outbound,
3315
+ export const InvokeDeploymentRequestMetadata$outboundSchema: z.ZodType<
3316
+ InvokeDeploymentRequestMetadata$Outbound,
5374
3317
  z.ZodTypeDef,
5375
- Metadata
3318
+ InvokeDeploymentRequestMetadata
5376
3319
  > = z.object({
5377
3320
  fileName: z.string().optional(),
5378
3321
  fileType: z.string().optional(),
@@ -5385,16 +3328,22 @@ export const Metadata$outboundSchema: z.ZodType<
5385
3328
  });
5386
3329
  });
5387
3330
 
5388
- export function metadataToJSON(metadata: Metadata): string {
5389
- return JSON.stringify(Metadata$outboundSchema.parse(metadata));
3331
+ export function invokeDeploymentRequestMetadataToJSON(
3332
+ invokeDeploymentRequestMetadata: InvokeDeploymentRequestMetadata,
3333
+ ): string {
3334
+ return JSON.stringify(
3335
+ InvokeDeploymentRequestMetadata$outboundSchema.parse(
3336
+ invokeDeploymentRequestMetadata,
3337
+ ),
3338
+ );
5390
3339
  }
5391
- export function metadataFromJSON(
3340
+ export function invokeDeploymentRequestMetadataFromJSON(
5392
3341
  jsonString: string,
5393
- ): SafeParseResult<Metadata, SDKValidationError> {
3342
+ ): SafeParseResult<InvokeDeploymentRequestMetadata, SDKValidationError> {
5394
3343
  return safeParse(
5395
3344
  jsonString,
5396
- (x) => Metadata$inboundSchema.parse(JSON.parse(x)),
5397
- `Failed to parse 'Metadata' from JSON`,
3345
+ (x) => InvokeDeploymentRequestMetadata$inboundSchema.parse(JSON.parse(x)),
3346
+ `Failed to parse 'InvokeDeploymentRequestMetadata' from JSON`,
5398
3347
  );
5399
3348
  }
5400
3349
 
@@ -5405,12 +3354,13 @@ export const Documents$inboundSchema: z.ZodType<
5405
3354
  unknown
5406
3355
  > = z.object({
5407
3356
  text: z.string(),
5408
- metadata: z.lazy(() => Metadata$inboundSchema).optional(),
3357
+ metadata: z.lazy(() => InvokeDeploymentRequestMetadata$inboundSchema)
3358
+ .optional(),
5409
3359
  });
5410
3360
  /** @internal */
5411
3361
  export type Documents$Outbound = {
5412
3362
  text: string;
5413
- metadata?: Metadata$Outbound | undefined;
3363
+ metadata?: InvokeDeploymentRequestMetadata$Outbound | undefined;
5414
3364
  };
5415
3365
 
5416
3366
  /** @internal */
@@ -5420,7 +3370,8 @@ export const Documents$outboundSchema: z.ZodType<
5420
3370
  Documents
5421
3371
  > = z.object({
5422
3372
  text: z.string(),
5423
- metadata: z.lazy(() => Metadata$outboundSchema).optional(),
3373
+ metadata: z.lazy(() => InvokeDeploymentRequestMetadata$outboundSchema)
3374
+ .optional(),
5424
3375
  });
5425
3376
 
5426
3377
  export function documentsToJSON(documents: Documents): string {