@orq-ai/node 3.5.12 → 3.6.0-rc.10

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