@orq-ai/node 3.5.13 → 3.6.0-rc.11

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 (394) 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/src/lib/config.ts +2 -2
  127. package/src/mcp-server/mcp-server.ts +1 -1
  128. package/src/mcp-server/server.ts +7 -1
  129. package/src/models/components/deployments.ts +3655 -165
  130. package/src/models/operations/bulkcreatedatapoints.ts +2 -2
  131. package/src/models/operations/createchunk.ts +65 -35
  132. package/src/models/operations/createcontact.ts +2 -2
  133. package/src/models/operations/createdataset.ts +2 -2
  134. package/src/models/operations/createdatasetitem.ts +2 -2
  135. package/src/models/operations/createdatasource.ts +2 -2
  136. package/src/models/operations/deploymentcreatemetric.ts +517 -40
  137. package/src/models/operations/deploymentgetconfig.ts +3656 -118
  138. package/src/models/operations/deploymentinvoke.ts +64 -8
  139. package/src/models/operations/deploymentstream.ts +3997 -116
  140. package/src/models/operations/fileget.ts +2 -2
  141. package/src/models/operations/filelist.ts +2 -2
  142. package/src/models/operations/fileupload.ts +37 -34
  143. package/src/models/operations/getonechunk.ts +55 -5
  144. package/src/models/operations/index.ts +3 -0
  145. package/src/models/operations/listchunks.ts +55 -5
  146. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  147. package/src/models/operations/listdatasets.ts +2 -2
  148. package/src/models/operations/listdatasources.ts +2 -2
  149. package/src/models/operations/retrievedatapoint.ts +2 -2
  150. package/src/models/operations/retrievedataset.ts +2 -2
  151. package/src/models/operations/retrievedatasource.ts +2 -2
  152. package/src/models/operations/updatechunk.ts +65 -35
  153. package/src/models/operations/updatedatapoint.ts +2 -2
  154. package/src/models/operations/updatedataset.ts +2 -2
  155. package/src/models/operations/updatedatasource.ts +2 -2
  156. package/src/sdk/datasets.ts +18 -0
  157. package/src/sdk/deployments.ts +18 -0
  158. package/src/sdk/knowledge.ts +18 -0
  159. package/packages/orq-rc/FUNCTIONS.md +0 -106
  160. package/packages/orq-rc/README.md +0 -707
  161. package/packages/orq-rc/RUNTIMES.md +0 -48
  162. package/packages/orq-rc/docs/sdks/contacts/README.md +0 -84
  163. package/packages/orq-rc/docs/sdks/datasets/README.md +0 -1027
  164. package/packages/orq-rc/docs/sdks/deployments/README.md +0 -405
  165. package/packages/orq-rc/docs/sdks/feedback/README.md +0 -92
  166. package/packages/orq-rc/docs/sdks/files/README.md +0 -311
  167. package/packages/orq-rc/docs/sdks/knowledge/README.md +0 -1273
  168. package/packages/orq-rc/docs/sdks/metrics/README.md +0 -86
  169. package/packages/orq-rc/docs/sdks/models/README.md +0 -79
  170. package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
  171. package/packages/orq-rc/docs/sdks/prompts/README.md +0 -576
  172. package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +0 -80
  173. package/packages/orq-rc/jsr.json +0 -28
  174. package/packages/orq-rc/package-lock.json +0 -3217
  175. package/packages/orq-rc/package.json +0 -45
  176. package/packages/orq-rc/src/core.ts +0 -13
  177. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -154
  178. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -161
  179. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -159
  180. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -161
  181. package/packages/orq-rc/src/funcs/datasetsCreateDatapoints.ts +0 -165
  182. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -161
  183. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -176
  184. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -161
  185. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -168
  186. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -169
  187. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -175
  188. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -170
  189. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -173
  190. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -162
  191. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -170
  192. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -170
  193. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -162
  194. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -178
  195. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -154
  196. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -174
  197. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -158
  198. package/packages/orq-rc/src/funcs/filesGet.ts +0 -160
  199. package/packages/orq-rc/src/funcs/filesList.ts +0 -161
  200. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +0 -152
  201. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -165
  202. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -160
  203. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -161
  204. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -168
  205. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -167
  206. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -163
  207. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -172
  208. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -168
  209. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -160
  210. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -167
  211. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -163
  212. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -158
  213. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -168
  214. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -164
  215. package/packages/orq-rc/src/funcs/modelsList.ts +0 -136
  216. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -154
  217. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -158
  218. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -175
  219. package/packages/orq-rc/src/funcs/promptsList.ts +0 -161
  220. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -167
  221. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -160
  222. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -167
  223. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -155
  224. package/packages/orq-rc/src/hooks/global.ts +0 -44
  225. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  226. package/packages/orq-rc/src/hooks/index.ts +0 -6
  227. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  228. package/packages/orq-rc/src/hooks/types.ts +0 -110
  229. package/packages/orq-rc/src/index.ts +0 -7
  230. package/packages/orq-rc/src/lib/base64.ts +0 -37
  231. package/packages/orq-rc/src/lib/config.ts +0 -70
  232. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  233. package/packages/orq-rc/src/lib/encodings.ts +0 -483
  234. package/packages/orq-rc/src/lib/env.ts +0 -73
  235. package/packages/orq-rc/src/lib/event-streams.ts +0 -264
  236. package/packages/orq-rc/src/lib/files.ts +0 -40
  237. package/packages/orq-rc/src/lib/http.ts +0 -323
  238. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  239. package/packages/orq-rc/src/lib/logger.ts +0 -9
  240. package/packages/orq-rc/src/lib/matchers.ts +0 -345
  241. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  242. package/packages/orq-rc/src/lib/retries.ts +0 -218
  243. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  244. package/packages/orq-rc/src/lib/sdks.ts +0 -401
  245. package/packages/orq-rc/src/lib/security.ts +0 -261
  246. package/packages/orq-rc/src/lib/url.ts +0 -33
  247. package/packages/orq-rc/src/mcp-server/cli/start/command.ts +0 -125
  248. package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +0 -140
  249. package/packages/orq-rc/src/mcp-server/cli.ts +0 -13
  250. package/packages/orq-rc/src/mcp-server/console-logger.ts +0 -71
  251. package/packages/orq-rc/src/mcp-server/extensions.ts +0 -17
  252. package/packages/orq-rc/src/mcp-server/mcp-server.ts +0 -26
  253. package/packages/orq-rc/src/mcp-server/prompts.ts +0 -117
  254. package/packages/orq-rc/src/mcp-server/resources.ts +0 -172
  255. package/packages/orq-rc/src/mcp-server/scopes.ts +0 -7
  256. package/packages/orq-rc/src/mcp-server/server.ts +0 -163
  257. package/packages/orq-rc/src/mcp-server/shared.ts +0 -75
  258. package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +0 -37
  259. package/packages/orq-rc/src/mcp-server/tools/datasetsClear.ts +0 -35
  260. package/packages/orq-rc/src/mcp-server/tools/datasetsCreate.ts +0 -37
  261. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoint.ts +0 -37
  262. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoints.ts +0 -37
  263. package/packages/orq-rc/src/mcp-server/tools/datasetsDelete.ts +0 -35
  264. package/packages/orq-rc/src/mcp-server/tools/datasetsDeleteDatapoint.ts +0 -35
  265. package/packages/orq-rc/src/mcp-server/tools/datasetsList.ts +0 -37
  266. package/packages/orq-rc/src/mcp-server/tools/datasetsListDatapoints.ts +0 -37
  267. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieve.ts +0 -37
  268. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieveDatapoint.ts +0 -37
  269. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdate.ts +0 -37
  270. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdateDatapoint.ts +0 -35
  271. package/packages/orq-rc/src/mcp-server/tools/deploymentsGetConfig.ts +0 -37
  272. package/packages/orq-rc/src/mcp-server/tools/deploymentsInvoke.ts +0 -37
  273. package/packages/orq-rc/src/mcp-server/tools/deploymentsList.ts +0 -37
  274. package/packages/orq-rc/src/mcp-server/tools/deploymentsMetricsCreate.ts +0 -37
  275. package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +0 -37
  276. package/packages/orq-rc/src/mcp-server/tools/feedbackCreate.ts +0 -37
  277. package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +0 -37
  278. package/packages/orq-rc/src/mcp-server/tools/filesDelete.ts +0 -33
  279. package/packages/orq-rc/src/mcp-server/tools/filesGet.ts +0 -37
  280. package/packages/orq-rc/src/mcp-server/tools/filesList.ts +0 -37
  281. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreate.ts +0 -35
  282. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateChunks.ts +0 -35
  283. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateDatasource.ts +0 -35
  284. package/packages/orq-rc/src/mcp-server/tools/knowledgeDelete.ts +0 -35
  285. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunk.ts +0 -33
  286. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteDatasource.ts +0 -35
  287. package/packages/orq-rc/src/mcp-server/tools/knowledgeList.ts +0 -37
  288. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunks.ts +0 -35
  289. package/packages/orq-rc/src/mcp-server/tools/knowledgeListDatasources.ts +0 -35
  290. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieve.ts +0 -37
  291. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveChunk.ts +0 -35
  292. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveDatasource.ts +0 -35
  293. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdate.ts +0 -35
  294. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateChunk.ts +0 -35
  295. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateDatasource.ts +0 -35
  296. package/packages/orq-rc/src/mcp-server/tools/modelsList.ts +0 -30
  297. package/packages/orq-rc/src/mcp-server/tools/promptsCreate.ts +0 -35
  298. package/packages/orq-rc/src/mcp-server/tools/promptsDelete.ts +0 -33
  299. package/packages/orq-rc/src/mcp-server/tools/promptsGetVersion.ts +0 -37
  300. package/packages/orq-rc/src/mcp-server/tools/promptsList.ts +0 -37
  301. package/packages/orq-rc/src/mcp-server/tools/promptsListVersions.ts +0 -37
  302. package/packages/orq-rc/src/mcp-server/tools/promptsRetrieve.ts +0 -37
  303. package/packages/orq-rc/src/mcp-server/tools/promptsUpdate.ts +0 -35
  304. package/packages/orq-rc/src/mcp-server/tools/remoteconfigsRetrieve.ts +0 -36
  305. package/packages/orq-rc/src/mcp-server/tools.ts +0 -129
  306. package/packages/orq-rc/src/models/components/deployments.ts +0 -7749
  307. package/packages/orq-rc/src/models/components/index.ts +0 -6
  308. package/packages/orq-rc/src/models/components/security.ts +0 -71
  309. package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
  310. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -71
  311. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
  312. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  313. package/packages/orq-rc/src/models/errors/index.ts +0 -10
  314. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
  315. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
  316. package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +0 -1828
  317. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -75
  318. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -432
  319. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
  320. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -296
  321. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -1752
  322. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -852
  323. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  324. package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -846
  325. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3691
  326. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -96
  327. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -81
  328. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -75
  329. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -87
  330. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -78
  331. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  332. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -5435
  333. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -9694
  334. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1255
  335. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2128
  336. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -9946
  337. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
  338. package/packages/orq-rc/src/models/operations/fileget.ts +0 -223
  339. package/packages/orq-rc/src/models/operations/filelist.ts +0 -337
  340. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -327
  341. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2100
  342. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -315
  343. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -537
  344. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1966
  345. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -1962
  346. package/packages/orq-rc/src/models/operations/index.ts +0 -54
  347. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -494
  348. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -1077
  349. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -406
  350. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -447
  351. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -663
  352. package/packages/orq-rc/src/models/operations/listmodels.ts +0 -273
  353. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2096
  354. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  355. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -930
  356. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -288
  357. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -273
  358. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -448
  359. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -1741
  360. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -393
  361. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -345
  362. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -980
  363. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -3873
  364. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  365. package/packages/orq-rc/src/sdk/datasets.ts +0 -240
  366. package/packages/orq-rc/src/sdk/deployments.ts +0 -107
  367. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  368. package/packages/orq-rc/src/sdk/files.ts +0 -78
  369. package/packages/orq-rc/src/sdk/index.ts +0 -5
  370. package/packages/orq-rc/src/sdk/knowledge.ts +0 -264
  371. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  372. package/packages/orq-rc/src/sdk/models.ts +0 -25
  373. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  374. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  375. package/packages/orq-rc/src/sdk/sdk.ts +0 -61
  376. package/packages/orq-rc/src/types/async.ts +0 -68
  377. package/packages/orq-rc/src/types/blobs.ts +0 -31
  378. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  379. package/packages/orq-rc/src/types/enums.ts +0 -16
  380. package/packages/orq-rc/src/types/fp.ts +0 -50
  381. package/packages/orq-rc/src/types/index.ts +0 -11
  382. package/packages/orq-rc/src/types/operations.ts +0 -105
  383. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  384. package/packages/orq-rc/src/types/streams.ts +0 -21
  385. package/packages/orq-rc/tsconfig.json +0 -41
  386. /package/{packages/orq-rc/src → src}/funcs/datasetsCreateExperiment.ts +0 -0
  387. /package/{packages/orq-rc/src → src}/funcs/deploymentsCreateExperiment.ts +0 -0
  388. /package/{packages/orq-rc/src → src}/funcs/knowledgeSearch.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}/mcp-server/tools/knowledgeSearch.ts +0 -0
  392. /package/{packages/orq-rc/src → src}/models/operations/createdatasetexperiment.ts +0 -0
  393. /package/{packages/orq-rc/src → src}/models/operations/createdeploymentexperiment.ts +0 -0
  394. /package/{packages/orq-rc/src → src}/models/operations/searchknowledge.ts +0 -0
@@ -1,1962 +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 GetPromptVersionRequest = {
13
- /**
14
- * The unique identifier of the prompt
15
- */
16
- promptId: string;
17
- /**
18
- * The unique identifier of the prompt version
19
- */
20
- versionId: string;
21
- };
22
-
23
- /**
24
- * The modality of the model
25
- */
26
- export const GetPromptVersionModelType = {
27
- Chat: "chat",
28
- Completion: "completion",
29
- Embedding: "embedding",
30
- Vision: "vision",
31
- Image: "image",
32
- Tts: "tts",
33
- Stt: "stt",
34
- Rerank: "rerank",
35
- Moderations: "moderations",
36
- } as const;
37
- /**
38
- * The modality of the model
39
- */
40
- export type GetPromptVersionModelType = ClosedEnum<
41
- typeof GetPromptVersionModelType
42
- >;
43
-
44
- /**
45
- * Only supported on `image` models.
46
- */
47
- export const GetPromptVersionFormat = {
48
- Url: "url",
49
- B64Json: "b64_json",
50
- Text: "text",
51
- JsonObject: "json_object",
52
- } as const;
53
- /**
54
- * Only supported on `image` models.
55
- */
56
- export type GetPromptVersionFormat = ClosedEnum<typeof GetPromptVersionFormat>;
57
-
58
- export const GetPromptVersionResponseFormatPromptsType = {
59
- JsonObject: "json_object",
60
- } as const;
61
- export type GetPromptVersionResponseFormatPromptsType = ClosedEnum<
62
- typeof GetPromptVersionResponseFormatPromptsType
63
- >;
64
-
65
- export type GetPromptVersionResponseFormat2 = {
66
- type: GetPromptVersionResponseFormatPromptsType;
67
- };
68
-
69
- export const GetPromptVersionResponseFormatType = {
70
- JsonSchema: "json_schema",
71
- } as const;
72
- export type GetPromptVersionResponseFormatType = ClosedEnum<
73
- typeof GetPromptVersionResponseFormatType
74
- >;
75
-
76
- export type GetPromptVersionResponseFormatJsonSchema = {
77
- name: string;
78
- strict: boolean;
79
- schema: { [k: string]: any };
80
- };
81
-
82
- export type GetPromptVersionResponseFormat1 = {
83
- type: GetPromptVersionResponseFormatType;
84
- jsonSchema: GetPromptVersionResponseFormatJsonSchema;
85
- };
86
-
87
- /**
88
- * An object specifying the format that the model must output.
89
- *
90
- * @remarks
91
- *
92
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
93
- *
94
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
95
- *
96
- * Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
97
- */
98
- export type GetPromptVersionResponseFormat =
99
- | GetPromptVersionResponseFormat2
100
- | GetPromptVersionResponseFormat1;
101
-
102
- /**
103
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
104
- */
105
- export const GetPromptVersionPhotoRealVersion = {
106
- V1: "v1",
107
- V2: "v2",
108
- } as const;
109
- /**
110
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
111
- */
112
- export type GetPromptVersionPhotoRealVersion = ClosedEnum<
113
- typeof GetPromptVersionPhotoRealVersion
114
- >;
115
-
116
- /**
117
- * The format to return the embeddings
118
- */
119
- export const GetPromptVersionEncodingFormat = {
120
- Float: "float",
121
- Base64: "base64",
122
- } as const;
123
- /**
124
- * The format to return the embeddings
125
- */
126
- export type GetPromptVersionEncodingFormat = ClosedEnum<
127
- typeof GetPromptVersionEncodingFormat
128
- >;
129
-
130
- /**
131
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
132
- */
133
- export const GetPromptVersionReasoningEffort = {
134
- Low: "low",
135
- Medium: "medium",
136
- High: "high",
137
- } as const;
138
- /**
139
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
140
- */
141
- export type GetPromptVersionReasoningEffort = ClosedEnum<
142
- typeof GetPromptVersionReasoningEffort
143
- >;
144
-
145
- /**
146
- * Model Parameters: Not all parameters apply to every model
147
- */
148
- export type GetPromptVersionModelParameters = {
149
- /**
150
- * Only supported on `chat` and `completion` models.
151
- */
152
- temperature?: number | undefined;
153
- /**
154
- * Only supported on `chat` and `completion` models.
155
- */
156
- maxTokens?: number | undefined;
157
- /**
158
- * Only supported on `chat` and `completion` models.
159
- */
160
- topK?: number | undefined;
161
- /**
162
- * Only supported on `chat` and `completion` models.
163
- */
164
- topP?: number | undefined;
165
- /**
166
- * Only supported on `chat` and `completion` models.
167
- */
168
- frequencyPenalty?: number | undefined;
169
- /**
170
- * Only supported on `chat` and `completion` models.
171
- */
172
- presencePenalty?: number | undefined;
173
- /**
174
- * Only supported on `image` models.
175
- */
176
- numImages?: number | undefined;
177
- /**
178
- * Best effort deterministic seed for the model. Currently only OpenAI models support these
179
- */
180
- seed?: number | undefined;
181
- /**
182
- * Only supported on `image` models.
183
- */
184
- format?: GetPromptVersionFormat | undefined;
185
- /**
186
- * Only supported on `image` models.
187
- */
188
- dimensions?: string | undefined;
189
- /**
190
- * Only supported on `image` models.
191
- */
192
- quality?: string | undefined;
193
- /**
194
- * Only supported on `image` models.
195
- */
196
- style?: string | undefined;
197
- /**
198
- * An object specifying the format that the model must output.
199
- *
200
- * @remarks
201
- *
202
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
203
- *
204
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
205
- *
206
- * Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
207
- */
208
- responseFormat?:
209
- | GetPromptVersionResponseFormat2
210
- | GetPromptVersionResponseFormat1
211
- | null
212
- | undefined;
213
- /**
214
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
215
- */
216
- photoRealVersion?: GetPromptVersionPhotoRealVersion | undefined;
217
- /**
218
- * The format to return the embeddings
219
- */
220
- encodingFormat?: GetPromptVersionEncodingFormat | undefined;
221
- /**
222
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
223
- */
224
- reasoningEffort?: GetPromptVersionReasoningEffort | undefined;
225
- /**
226
- * Gives the model enhanced reasoning capabilities for complex tasks. A value of 0 disables thinking. The minimum budget tokens for thinking are 1024. The Budget Tokens should never exceed the Max Tokens parameter. Only supported by `Anthropic`
227
- */
228
- budgetTokens?: number | undefined;
229
- };
230
-
231
- export const GetPromptVersionProvider = {
232
- Cohere: "cohere",
233
- Openai: "openai",
234
- Anthropic: "anthropic",
235
- Huggingface: "huggingface",
236
- Replicate: "replicate",
237
- Google: "google",
238
- GoogleAi: "google-ai",
239
- Azure: "azure",
240
- Aws: "aws",
241
- Anyscale: "anyscale",
242
- Perplexity: "perplexity",
243
- Groq: "groq",
244
- Fal: "fal",
245
- Leonardoai: "leonardoai",
246
- Nvidia: "nvidia",
247
- Jina: "jina",
248
- Togetherai: "togetherai",
249
- Elevenlabs: "elevenlabs",
250
- } as const;
251
- export type GetPromptVersionProvider = ClosedEnum<
252
- typeof GetPromptVersionProvider
253
- >;
254
-
255
- /**
256
- * The role of the prompt message
257
- */
258
- export const GetPromptVersionRole = {
259
- System: "system",
260
- Assistant: "assistant",
261
- User: "user",
262
- Exception: "exception",
263
- Tool: "tool",
264
- Prompt: "prompt",
265
- Correction: "correction",
266
- ExpectedOutput: "expected_output",
267
- } as const;
268
- /**
269
- * The role of the prompt message
270
- */
271
- export type GetPromptVersionRole = ClosedEnum<typeof GetPromptVersionRole>;
272
-
273
- export const GetPromptVersion2PromptsType = {
274
- ImageUrl: "image_url",
275
- } as const;
276
- export type GetPromptVersion2PromptsType = ClosedEnum<
277
- typeof GetPromptVersion2PromptsType
278
- >;
279
-
280
- export type GetPromptVersion2ImageUrl = {
281
- /**
282
- * The orq.ai id of the image
283
- */
284
- id?: string | undefined;
285
- /**
286
- * Either a URL of the image or the base64 encoded data URI.
287
- */
288
- url: string;
289
- /**
290
- * Specifies the detail level of the image. Currently only supported with OpenAI models
291
- */
292
- detail?: string | undefined;
293
- };
294
-
295
- /**
296
- * The image part of the prompt message. Only supported with vision models.
297
- */
298
- export type GetPromptVersion22 = {
299
- type: GetPromptVersion2PromptsType;
300
- imageUrl: GetPromptVersion2ImageUrl;
301
- };
302
-
303
- export const GetPromptVersion2Type = {
304
- Text: "text",
305
- } as const;
306
- export type GetPromptVersion2Type = ClosedEnum<typeof GetPromptVersion2Type>;
307
-
308
- /**
309
- * Text content part of a prompt message
310
- */
311
- export type GetPromptVersion21 = {
312
- type: GetPromptVersion2Type;
313
- text: string;
314
- };
315
-
316
- export type GetPromptVersionContent2 = GetPromptVersion21 | GetPromptVersion22;
317
-
318
- /**
319
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
320
- */
321
- export type GetPromptVersionContent =
322
- | string
323
- | Array<GetPromptVersion21 | GetPromptVersion22>;
324
-
325
- export const GetPromptVersionType = {
326
- Function: "function",
327
- } as const;
328
- export type GetPromptVersionType = ClosedEnum<typeof GetPromptVersionType>;
329
-
330
- export type GetPromptVersionFunction = {
331
- name: string;
332
- /**
333
- * JSON string arguments for the functions
334
- */
335
- arguments: string;
336
- };
337
-
338
- export type GetPromptVersionToolCalls = {
339
- id?: string | undefined;
340
- index?: number | undefined;
341
- type: GetPromptVersionType;
342
- function: GetPromptVersionFunction;
343
- };
344
-
345
- export type GetPromptVersionMessages = {
346
- /**
347
- * The role of the prompt message
348
- */
349
- role: GetPromptVersionRole;
350
- /**
351
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
352
- */
353
- content: string | Array<GetPromptVersion21 | GetPromptVersion22>;
354
- toolCalls?: Array<GetPromptVersionToolCalls> | undefined;
355
- toolCallId?: string | undefined;
356
- };
357
-
358
- /**
359
- * A list of messages compatible with the openAI schema
360
- */
361
- export type GetPromptVersionPromptConfig = {
362
- stream?: boolean | undefined;
363
- model?: string | undefined;
364
- /**
365
- * The id of the resource
366
- */
367
- modelDbId?: string | undefined;
368
- /**
369
- * The modality of the model
370
- */
371
- modelType?: GetPromptVersionModelType | undefined;
372
- /**
373
- * Model Parameters: Not all parameters apply to every model
374
- */
375
- modelParameters?: GetPromptVersionModelParameters | undefined;
376
- provider?: GetPromptVersionProvider | undefined;
377
- /**
378
- * The id of the resource
379
- */
380
- integrationId?: string | null | undefined;
381
- version?: string | undefined;
382
- messages: Array<GetPromptVersionMessages>;
383
- };
384
-
385
- export const GetPromptVersionUseCases = {
386
- AgentsSimulations: "Agents simulations",
387
- Agents: "Agents",
388
- APIInteraction: "API interaction",
389
- AutonomousAgents: "Autonomous Agents",
390
- Chatbots: "Chatbots",
391
- Classification: "Classification",
392
- CodeUnderstanding: "Code understanding",
393
- CodeWriting: "Code writing",
394
- Conversation: "Conversation",
395
- DocumentsQA: "Documents QA",
396
- Evaluation: "Evaluation",
397
- Extraction: "Extraction",
398
- MultiModal: "Multi-modal",
399
- SelfChecking: "Self-checking",
400
- SentimentAnalysis: "Sentiment analysis",
401
- Sql: "SQL",
402
- Summarization: "Summarization",
403
- Tagging: "Tagging",
404
- TranslationDocument: "Translation (document)",
405
- TranslationSentences: "Translation (sentences)",
406
- } as const;
407
- export type GetPromptVersionUseCases = ClosedEnum<
408
- typeof GetPromptVersionUseCases
409
- >;
410
-
411
- /**
412
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
413
- */
414
- export const GetPromptVersionLanguage = {
415
- Chinese: "Chinese",
416
- Dutch: "Dutch",
417
- English: "English",
418
- French: "French",
419
- German: "German",
420
- Russian: "Russian",
421
- Spanish: "Spanish",
422
- } as const;
423
- /**
424
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
425
- */
426
- export type GetPromptVersionLanguage = ClosedEnum<
427
- typeof GetPromptVersionLanguage
428
- >;
429
-
430
- export type GetPromptVersionMetadata = {
431
- /**
432
- * A list of use cases that the prompt is meant to be used for. Use this field to categorize the prompt for your own purpose
433
- */
434
- useCases?: Array<GetPromptVersionUseCases> | undefined;
435
- /**
436
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
437
- */
438
- language?: GetPromptVersionLanguage | null | undefined;
439
- };
440
-
441
- /**
442
- * Prompt version retrieved successfully.
443
- */
444
- export type GetPromptVersionResponseBody = {
445
- id: string;
446
- createdById?: string | null | undefined;
447
- updatedById?: string | null | undefined;
448
- /**
449
- * The prompt’s description, meant to be displayable in the UI. Use this field to optionally store a long form explanation of the prompt for your own purpose
450
- */
451
- description?: string | null | undefined;
452
- /**
453
- * A list of messages compatible with the openAI schema
454
- */
455
- promptConfig: GetPromptVersionPromptConfig;
456
- metadata?: GetPromptVersionMetadata | undefined;
457
- timestamp: string;
458
- };
459
-
460
- /** @internal */
461
- export const GetPromptVersionRequest$inboundSchema: z.ZodType<
462
- GetPromptVersionRequest,
463
- z.ZodTypeDef,
464
- unknown
465
- > = z.object({
466
- prompt_id: z.string(),
467
- version_id: z.string(),
468
- }).transform((v) => {
469
- return remap$(v, {
470
- "prompt_id": "promptId",
471
- "version_id": "versionId",
472
- });
473
- });
474
-
475
- /** @internal */
476
- export type GetPromptVersionRequest$Outbound = {
477
- prompt_id: string;
478
- version_id: string;
479
- };
480
-
481
- /** @internal */
482
- export const GetPromptVersionRequest$outboundSchema: z.ZodType<
483
- GetPromptVersionRequest$Outbound,
484
- z.ZodTypeDef,
485
- GetPromptVersionRequest
486
- > = z.object({
487
- promptId: z.string(),
488
- versionId: z.string(),
489
- }).transform((v) => {
490
- return remap$(v, {
491
- promptId: "prompt_id",
492
- versionId: "version_id",
493
- });
494
- });
495
-
496
- /**
497
- * @internal
498
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
499
- */
500
- export namespace GetPromptVersionRequest$ {
501
- /** @deprecated use `GetPromptVersionRequest$inboundSchema` instead. */
502
- export const inboundSchema = GetPromptVersionRequest$inboundSchema;
503
- /** @deprecated use `GetPromptVersionRequest$outboundSchema` instead. */
504
- export const outboundSchema = GetPromptVersionRequest$outboundSchema;
505
- /** @deprecated use `GetPromptVersionRequest$Outbound` instead. */
506
- export type Outbound = GetPromptVersionRequest$Outbound;
507
- }
508
-
509
- export function getPromptVersionRequestToJSON(
510
- getPromptVersionRequest: GetPromptVersionRequest,
511
- ): string {
512
- return JSON.stringify(
513
- GetPromptVersionRequest$outboundSchema.parse(getPromptVersionRequest),
514
- );
515
- }
516
-
517
- export function getPromptVersionRequestFromJSON(
518
- jsonString: string,
519
- ): SafeParseResult<GetPromptVersionRequest, SDKValidationError> {
520
- return safeParse(
521
- jsonString,
522
- (x) => GetPromptVersionRequest$inboundSchema.parse(JSON.parse(x)),
523
- `Failed to parse 'GetPromptVersionRequest' from JSON`,
524
- );
525
- }
526
-
527
- /** @internal */
528
- export const GetPromptVersionModelType$inboundSchema: z.ZodNativeEnum<
529
- typeof GetPromptVersionModelType
530
- > = z.nativeEnum(GetPromptVersionModelType);
531
-
532
- /** @internal */
533
- export const GetPromptVersionModelType$outboundSchema: z.ZodNativeEnum<
534
- typeof GetPromptVersionModelType
535
- > = GetPromptVersionModelType$inboundSchema;
536
-
537
- /**
538
- * @internal
539
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
540
- */
541
- export namespace GetPromptVersionModelType$ {
542
- /** @deprecated use `GetPromptVersionModelType$inboundSchema` instead. */
543
- export const inboundSchema = GetPromptVersionModelType$inboundSchema;
544
- /** @deprecated use `GetPromptVersionModelType$outboundSchema` instead. */
545
- export const outboundSchema = GetPromptVersionModelType$outboundSchema;
546
- }
547
-
548
- /** @internal */
549
- export const GetPromptVersionFormat$inboundSchema: z.ZodNativeEnum<
550
- typeof GetPromptVersionFormat
551
- > = z.nativeEnum(GetPromptVersionFormat);
552
-
553
- /** @internal */
554
- export const GetPromptVersionFormat$outboundSchema: z.ZodNativeEnum<
555
- typeof GetPromptVersionFormat
556
- > = GetPromptVersionFormat$inboundSchema;
557
-
558
- /**
559
- * @internal
560
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
561
- */
562
- export namespace GetPromptVersionFormat$ {
563
- /** @deprecated use `GetPromptVersionFormat$inboundSchema` instead. */
564
- export const inboundSchema = GetPromptVersionFormat$inboundSchema;
565
- /** @deprecated use `GetPromptVersionFormat$outboundSchema` instead. */
566
- export const outboundSchema = GetPromptVersionFormat$outboundSchema;
567
- }
568
-
569
- /** @internal */
570
- export const GetPromptVersionResponseFormatPromptsType$inboundSchema:
571
- z.ZodNativeEnum<typeof GetPromptVersionResponseFormatPromptsType> = z
572
- .nativeEnum(GetPromptVersionResponseFormatPromptsType);
573
-
574
- /** @internal */
575
- export const GetPromptVersionResponseFormatPromptsType$outboundSchema:
576
- z.ZodNativeEnum<typeof GetPromptVersionResponseFormatPromptsType> =
577
- GetPromptVersionResponseFormatPromptsType$inboundSchema;
578
-
579
- /**
580
- * @internal
581
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
582
- */
583
- export namespace GetPromptVersionResponseFormatPromptsType$ {
584
- /** @deprecated use `GetPromptVersionResponseFormatPromptsType$inboundSchema` instead. */
585
- export const inboundSchema =
586
- GetPromptVersionResponseFormatPromptsType$inboundSchema;
587
- /** @deprecated use `GetPromptVersionResponseFormatPromptsType$outboundSchema` instead. */
588
- export const outboundSchema =
589
- GetPromptVersionResponseFormatPromptsType$outboundSchema;
590
- }
591
-
592
- /** @internal */
593
- export const GetPromptVersionResponseFormat2$inboundSchema: z.ZodType<
594
- GetPromptVersionResponseFormat2,
595
- z.ZodTypeDef,
596
- unknown
597
- > = z.object({
598
- type: GetPromptVersionResponseFormatPromptsType$inboundSchema,
599
- });
600
-
601
- /** @internal */
602
- export type GetPromptVersionResponseFormat2$Outbound = {
603
- type: string;
604
- };
605
-
606
- /** @internal */
607
- export const GetPromptVersionResponseFormat2$outboundSchema: z.ZodType<
608
- GetPromptVersionResponseFormat2$Outbound,
609
- z.ZodTypeDef,
610
- GetPromptVersionResponseFormat2
611
- > = z.object({
612
- type: GetPromptVersionResponseFormatPromptsType$outboundSchema,
613
- });
614
-
615
- /**
616
- * @internal
617
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
618
- */
619
- export namespace GetPromptVersionResponseFormat2$ {
620
- /** @deprecated use `GetPromptVersionResponseFormat2$inboundSchema` instead. */
621
- export const inboundSchema = GetPromptVersionResponseFormat2$inboundSchema;
622
- /** @deprecated use `GetPromptVersionResponseFormat2$outboundSchema` instead. */
623
- export const outboundSchema = GetPromptVersionResponseFormat2$outboundSchema;
624
- /** @deprecated use `GetPromptVersionResponseFormat2$Outbound` instead. */
625
- export type Outbound = GetPromptVersionResponseFormat2$Outbound;
626
- }
627
-
628
- export function getPromptVersionResponseFormat2ToJSON(
629
- getPromptVersionResponseFormat2: GetPromptVersionResponseFormat2,
630
- ): string {
631
- return JSON.stringify(
632
- GetPromptVersionResponseFormat2$outboundSchema.parse(
633
- getPromptVersionResponseFormat2,
634
- ),
635
- );
636
- }
637
-
638
- export function getPromptVersionResponseFormat2FromJSON(
639
- jsonString: string,
640
- ): SafeParseResult<GetPromptVersionResponseFormat2, SDKValidationError> {
641
- return safeParse(
642
- jsonString,
643
- (x) => GetPromptVersionResponseFormat2$inboundSchema.parse(JSON.parse(x)),
644
- `Failed to parse 'GetPromptVersionResponseFormat2' from JSON`,
645
- );
646
- }
647
-
648
- /** @internal */
649
- export const GetPromptVersionResponseFormatType$inboundSchema: z.ZodNativeEnum<
650
- typeof GetPromptVersionResponseFormatType
651
- > = z.nativeEnum(GetPromptVersionResponseFormatType);
652
-
653
- /** @internal */
654
- export const GetPromptVersionResponseFormatType$outboundSchema: z.ZodNativeEnum<
655
- typeof GetPromptVersionResponseFormatType
656
- > = GetPromptVersionResponseFormatType$inboundSchema;
657
-
658
- /**
659
- * @internal
660
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
661
- */
662
- export namespace GetPromptVersionResponseFormatType$ {
663
- /** @deprecated use `GetPromptVersionResponseFormatType$inboundSchema` instead. */
664
- export const inboundSchema = GetPromptVersionResponseFormatType$inboundSchema;
665
- /** @deprecated use `GetPromptVersionResponseFormatType$outboundSchema` instead. */
666
- export const outboundSchema =
667
- GetPromptVersionResponseFormatType$outboundSchema;
668
- }
669
-
670
- /** @internal */
671
- export const GetPromptVersionResponseFormatJsonSchema$inboundSchema: z.ZodType<
672
- GetPromptVersionResponseFormatJsonSchema,
673
- z.ZodTypeDef,
674
- unknown
675
- > = z.object({
676
- name: z.string(),
677
- strict: z.boolean(),
678
- schema: z.record(z.any()),
679
- });
680
-
681
- /** @internal */
682
- export type GetPromptVersionResponseFormatJsonSchema$Outbound = {
683
- name: string;
684
- strict: boolean;
685
- schema: { [k: string]: any };
686
- };
687
-
688
- /** @internal */
689
- export const GetPromptVersionResponseFormatJsonSchema$outboundSchema: z.ZodType<
690
- GetPromptVersionResponseFormatJsonSchema$Outbound,
691
- z.ZodTypeDef,
692
- GetPromptVersionResponseFormatJsonSchema
693
- > = z.object({
694
- name: z.string(),
695
- strict: z.boolean(),
696
- schema: z.record(z.any()),
697
- });
698
-
699
- /**
700
- * @internal
701
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
702
- */
703
- export namespace GetPromptVersionResponseFormatJsonSchema$ {
704
- /** @deprecated use `GetPromptVersionResponseFormatJsonSchema$inboundSchema` instead. */
705
- export const inboundSchema =
706
- GetPromptVersionResponseFormatJsonSchema$inboundSchema;
707
- /** @deprecated use `GetPromptVersionResponseFormatJsonSchema$outboundSchema` instead. */
708
- export const outboundSchema =
709
- GetPromptVersionResponseFormatJsonSchema$outboundSchema;
710
- /** @deprecated use `GetPromptVersionResponseFormatJsonSchema$Outbound` instead. */
711
- export type Outbound = GetPromptVersionResponseFormatJsonSchema$Outbound;
712
- }
713
-
714
- export function getPromptVersionResponseFormatJsonSchemaToJSON(
715
- getPromptVersionResponseFormatJsonSchema:
716
- GetPromptVersionResponseFormatJsonSchema,
717
- ): string {
718
- return JSON.stringify(
719
- GetPromptVersionResponseFormatJsonSchema$outboundSchema.parse(
720
- getPromptVersionResponseFormatJsonSchema,
721
- ),
722
- );
723
- }
724
-
725
- export function getPromptVersionResponseFormatJsonSchemaFromJSON(
726
- jsonString: string,
727
- ): SafeParseResult<
728
- GetPromptVersionResponseFormatJsonSchema,
729
- SDKValidationError
730
- > {
731
- return safeParse(
732
- jsonString,
733
- (x) =>
734
- GetPromptVersionResponseFormatJsonSchema$inboundSchema.parse(
735
- JSON.parse(x),
736
- ),
737
- `Failed to parse 'GetPromptVersionResponseFormatJsonSchema' from JSON`,
738
- );
739
- }
740
-
741
- /** @internal */
742
- export const GetPromptVersionResponseFormat1$inboundSchema: z.ZodType<
743
- GetPromptVersionResponseFormat1,
744
- z.ZodTypeDef,
745
- unknown
746
- > = z.object({
747
- type: GetPromptVersionResponseFormatType$inboundSchema,
748
- json_schema: z.lazy(() =>
749
- GetPromptVersionResponseFormatJsonSchema$inboundSchema
750
- ),
751
- }).transform((v) => {
752
- return remap$(v, {
753
- "json_schema": "jsonSchema",
754
- });
755
- });
756
-
757
- /** @internal */
758
- export type GetPromptVersionResponseFormat1$Outbound = {
759
- type: string;
760
- json_schema: GetPromptVersionResponseFormatJsonSchema$Outbound;
761
- };
762
-
763
- /** @internal */
764
- export const GetPromptVersionResponseFormat1$outboundSchema: z.ZodType<
765
- GetPromptVersionResponseFormat1$Outbound,
766
- z.ZodTypeDef,
767
- GetPromptVersionResponseFormat1
768
- > = z.object({
769
- type: GetPromptVersionResponseFormatType$outboundSchema,
770
- jsonSchema: z.lazy(() =>
771
- GetPromptVersionResponseFormatJsonSchema$outboundSchema
772
- ),
773
- }).transform((v) => {
774
- return remap$(v, {
775
- jsonSchema: "json_schema",
776
- });
777
- });
778
-
779
- /**
780
- * @internal
781
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
782
- */
783
- export namespace GetPromptVersionResponseFormat1$ {
784
- /** @deprecated use `GetPromptVersionResponseFormat1$inboundSchema` instead. */
785
- export const inboundSchema = GetPromptVersionResponseFormat1$inboundSchema;
786
- /** @deprecated use `GetPromptVersionResponseFormat1$outboundSchema` instead. */
787
- export const outboundSchema = GetPromptVersionResponseFormat1$outboundSchema;
788
- /** @deprecated use `GetPromptVersionResponseFormat1$Outbound` instead. */
789
- export type Outbound = GetPromptVersionResponseFormat1$Outbound;
790
- }
791
-
792
- export function getPromptVersionResponseFormat1ToJSON(
793
- getPromptVersionResponseFormat1: GetPromptVersionResponseFormat1,
794
- ): string {
795
- return JSON.stringify(
796
- GetPromptVersionResponseFormat1$outboundSchema.parse(
797
- getPromptVersionResponseFormat1,
798
- ),
799
- );
800
- }
801
-
802
- export function getPromptVersionResponseFormat1FromJSON(
803
- jsonString: string,
804
- ): SafeParseResult<GetPromptVersionResponseFormat1, SDKValidationError> {
805
- return safeParse(
806
- jsonString,
807
- (x) => GetPromptVersionResponseFormat1$inboundSchema.parse(JSON.parse(x)),
808
- `Failed to parse 'GetPromptVersionResponseFormat1' from JSON`,
809
- );
810
- }
811
-
812
- /** @internal */
813
- export const GetPromptVersionResponseFormat$inboundSchema: z.ZodType<
814
- GetPromptVersionResponseFormat,
815
- z.ZodTypeDef,
816
- unknown
817
- > = z.union([
818
- z.lazy(() => GetPromptVersionResponseFormat2$inboundSchema),
819
- z.lazy(() => GetPromptVersionResponseFormat1$inboundSchema),
820
- ]);
821
-
822
- /** @internal */
823
- export type GetPromptVersionResponseFormat$Outbound =
824
- | GetPromptVersionResponseFormat2$Outbound
825
- | GetPromptVersionResponseFormat1$Outbound;
826
-
827
- /** @internal */
828
- export const GetPromptVersionResponseFormat$outboundSchema: z.ZodType<
829
- GetPromptVersionResponseFormat$Outbound,
830
- z.ZodTypeDef,
831
- GetPromptVersionResponseFormat
832
- > = z.union([
833
- z.lazy(() => GetPromptVersionResponseFormat2$outboundSchema),
834
- z.lazy(() => GetPromptVersionResponseFormat1$outboundSchema),
835
- ]);
836
-
837
- /**
838
- * @internal
839
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
840
- */
841
- export namespace GetPromptVersionResponseFormat$ {
842
- /** @deprecated use `GetPromptVersionResponseFormat$inboundSchema` instead. */
843
- export const inboundSchema = GetPromptVersionResponseFormat$inboundSchema;
844
- /** @deprecated use `GetPromptVersionResponseFormat$outboundSchema` instead. */
845
- export const outboundSchema = GetPromptVersionResponseFormat$outboundSchema;
846
- /** @deprecated use `GetPromptVersionResponseFormat$Outbound` instead. */
847
- export type Outbound = GetPromptVersionResponseFormat$Outbound;
848
- }
849
-
850
- export function getPromptVersionResponseFormatToJSON(
851
- getPromptVersionResponseFormat: GetPromptVersionResponseFormat,
852
- ): string {
853
- return JSON.stringify(
854
- GetPromptVersionResponseFormat$outboundSchema.parse(
855
- getPromptVersionResponseFormat,
856
- ),
857
- );
858
- }
859
-
860
- export function getPromptVersionResponseFormatFromJSON(
861
- jsonString: string,
862
- ): SafeParseResult<GetPromptVersionResponseFormat, SDKValidationError> {
863
- return safeParse(
864
- jsonString,
865
- (x) => GetPromptVersionResponseFormat$inboundSchema.parse(JSON.parse(x)),
866
- `Failed to parse 'GetPromptVersionResponseFormat' from JSON`,
867
- );
868
- }
869
-
870
- /** @internal */
871
- export const GetPromptVersionPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
872
- typeof GetPromptVersionPhotoRealVersion
873
- > = z.nativeEnum(GetPromptVersionPhotoRealVersion);
874
-
875
- /** @internal */
876
- export const GetPromptVersionPhotoRealVersion$outboundSchema: z.ZodNativeEnum<
877
- typeof GetPromptVersionPhotoRealVersion
878
- > = GetPromptVersionPhotoRealVersion$inboundSchema;
879
-
880
- /**
881
- * @internal
882
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
883
- */
884
- export namespace GetPromptVersionPhotoRealVersion$ {
885
- /** @deprecated use `GetPromptVersionPhotoRealVersion$inboundSchema` instead. */
886
- export const inboundSchema = GetPromptVersionPhotoRealVersion$inboundSchema;
887
- /** @deprecated use `GetPromptVersionPhotoRealVersion$outboundSchema` instead. */
888
- export const outboundSchema = GetPromptVersionPhotoRealVersion$outboundSchema;
889
- }
890
-
891
- /** @internal */
892
- export const GetPromptVersionEncodingFormat$inboundSchema: z.ZodNativeEnum<
893
- typeof GetPromptVersionEncodingFormat
894
- > = z.nativeEnum(GetPromptVersionEncodingFormat);
895
-
896
- /** @internal */
897
- export const GetPromptVersionEncodingFormat$outboundSchema: z.ZodNativeEnum<
898
- typeof GetPromptVersionEncodingFormat
899
- > = GetPromptVersionEncodingFormat$inboundSchema;
900
-
901
- /**
902
- * @internal
903
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
904
- */
905
- export namespace GetPromptVersionEncodingFormat$ {
906
- /** @deprecated use `GetPromptVersionEncodingFormat$inboundSchema` instead. */
907
- export const inboundSchema = GetPromptVersionEncodingFormat$inboundSchema;
908
- /** @deprecated use `GetPromptVersionEncodingFormat$outboundSchema` instead. */
909
- export const outboundSchema = GetPromptVersionEncodingFormat$outboundSchema;
910
- }
911
-
912
- /** @internal */
913
- export const GetPromptVersionReasoningEffort$inboundSchema: z.ZodNativeEnum<
914
- typeof GetPromptVersionReasoningEffort
915
- > = z.nativeEnum(GetPromptVersionReasoningEffort);
916
-
917
- /** @internal */
918
- export const GetPromptVersionReasoningEffort$outboundSchema: z.ZodNativeEnum<
919
- typeof GetPromptVersionReasoningEffort
920
- > = GetPromptVersionReasoningEffort$inboundSchema;
921
-
922
- /**
923
- * @internal
924
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
925
- */
926
- export namespace GetPromptVersionReasoningEffort$ {
927
- /** @deprecated use `GetPromptVersionReasoningEffort$inboundSchema` instead. */
928
- export const inboundSchema = GetPromptVersionReasoningEffort$inboundSchema;
929
- /** @deprecated use `GetPromptVersionReasoningEffort$outboundSchema` instead. */
930
- export const outboundSchema = GetPromptVersionReasoningEffort$outboundSchema;
931
- }
932
-
933
- /** @internal */
934
- export const GetPromptVersionModelParameters$inboundSchema: z.ZodType<
935
- GetPromptVersionModelParameters,
936
- z.ZodTypeDef,
937
- unknown
938
- > = z.object({
939
- temperature: z.number().optional(),
940
- maxTokens: z.number().optional(),
941
- topK: z.number().optional(),
942
- topP: z.number().optional(),
943
- frequencyPenalty: z.number().optional(),
944
- presencePenalty: z.number().optional(),
945
- numImages: z.number().optional(),
946
- seed: z.number().optional(),
947
- format: GetPromptVersionFormat$inboundSchema.optional(),
948
- dimensions: z.string().optional(),
949
- quality: z.string().optional(),
950
- style: z.string().optional(),
951
- responseFormat: z.nullable(
952
- z.union([
953
- z.lazy(() => GetPromptVersionResponseFormat2$inboundSchema),
954
- z.lazy(() => GetPromptVersionResponseFormat1$inboundSchema),
955
- ]),
956
- ).optional(),
957
- photoRealVersion: GetPromptVersionPhotoRealVersion$inboundSchema.optional(),
958
- encoding_format: GetPromptVersionEncodingFormat$inboundSchema.optional(),
959
- reasoningEffort: GetPromptVersionReasoningEffort$inboundSchema.optional(),
960
- budgetTokens: z.number().optional(),
961
- }).transform((v) => {
962
- return remap$(v, {
963
- "encoding_format": "encodingFormat",
964
- });
965
- });
966
-
967
- /** @internal */
968
- export type GetPromptVersionModelParameters$Outbound = {
969
- temperature?: number | undefined;
970
- maxTokens?: number | undefined;
971
- topK?: number | undefined;
972
- topP?: number | undefined;
973
- frequencyPenalty?: number | undefined;
974
- presencePenalty?: number | undefined;
975
- numImages?: number | undefined;
976
- seed?: number | undefined;
977
- format?: string | undefined;
978
- dimensions?: string | undefined;
979
- quality?: string | undefined;
980
- style?: string | undefined;
981
- responseFormat?:
982
- | GetPromptVersionResponseFormat2$Outbound
983
- | GetPromptVersionResponseFormat1$Outbound
984
- | null
985
- | undefined;
986
- photoRealVersion?: string | undefined;
987
- encoding_format?: string | undefined;
988
- reasoningEffort?: string | undefined;
989
- budgetTokens?: number | undefined;
990
- };
991
-
992
- /** @internal */
993
- export const GetPromptVersionModelParameters$outboundSchema: z.ZodType<
994
- GetPromptVersionModelParameters$Outbound,
995
- z.ZodTypeDef,
996
- GetPromptVersionModelParameters
997
- > = z.object({
998
- temperature: z.number().optional(),
999
- maxTokens: z.number().optional(),
1000
- topK: z.number().optional(),
1001
- topP: z.number().optional(),
1002
- frequencyPenalty: z.number().optional(),
1003
- presencePenalty: z.number().optional(),
1004
- numImages: z.number().optional(),
1005
- seed: z.number().optional(),
1006
- format: GetPromptVersionFormat$outboundSchema.optional(),
1007
- dimensions: z.string().optional(),
1008
- quality: z.string().optional(),
1009
- style: z.string().optional(),
1010
- responseFormat: z.nullable(
1011
- z.union([
1012
- z.lazy(() => GetPromptVersionResponseFormat2$outboundSchema),
1013
- z.lazy(() => GetPromptVersionResponseFormat1$outboundSchema),
1014
- ]),
1015
- ).optional(),
1016
- photoRealVersion: GetPromptVersionPhotoRealVersion$outboundSchema.optional(),
1017
- encodingFormat: GetPromptVersionEncodingFormat$outboundSchema.optional(),
1018
- reasoningEffort: GetPromptVersionReasoningEffort$outboundSchema.optional(),
1019
- budgetTokens: z.number().optional(),
1020
- }).transform((v) => {
1021
- return remap$(v, {
1022
- encodingFormat: "encoding_format",
1023
- });
1024
- });
1025
-
1026
- /**
1027
- * @internal
1028
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1029
- */
1030
- export namespace GetPromptVersionModelParameters$ {
1031
- /** @deprecated use `GetPromptVersionModelParameters$inboundSchema` instead. */
1032
- export const inboundSchema = GetPromptVersionModelParameters$inboundSchema;
1033
- /** @deprecated use `GetPromptVersionModelParameters$outboundSchema` instead. */
1034
- export const outboundSchema = GetPromptVersionModelParameters$outboundSchema;
1035
- /** @deprecated use `GetPromptVersionModelParameters$Outbound` instead. */
1036
- export type Outbound = GetPromptVersionModelParameters$Outbound;
1037
- }
1038
-
1039
- export function getPromptVersionModelParametersToJSON(
1040
- getPromptVersionModelParameters: GetPromptVersionModelParameters,
1041
- ): string {
1042
- return JSON.stringify(
1043
- GetPromptVersionModelParameters$outboundSchema.parse(
1044
- getPromptVersionModelParameters,
1045
- ),
1046
- );
1047
- }
1048
-
1049
- export function getPromptVersionModelParametersFromJSON(
1050
- jsonString: string,
1051
- ): SafeParseResult<GetPromptVersionModelParameters, SDKValidationError> {
1052
- return safeParse(
1053
- jsonString,
1054
- (x) => GetPromptVersionModelParameters$inboundSchema.parse(JSON.parse(x)),
1055
- `Failed to parse 'GetPromptVersionModelParameters' from JSON`,
1056
- );
1057
- }
1058
-
1059
- /** @internal */
1060
- export const GetPromptVersionProvider$inboundSchema: z.ZodNativeEnum<
1061
- typeof GetPromptVersionProvider
1062
- > = z.nativeEnum(GetPromptVersionProvider);
1063
-
1064
- /** @internal */
1065
- export const GetPromptVersionProvider$outboundSchema: z.ZodNativeEnum<
1066
- typeof GetPromptVersionProvider
1067
- > = GetPromptVersionProvider$inboundSchema;
1068
-
1069
- /**
1070
- * @internal
1071
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1072
- */
1073
- export namespace GetPromptVersionProvider$ {
1074
- /** @deprecated use `GetPromptVersionProvider$inboundSchema` instead. */
1075
- export const inboundSchema = GetPromptVersionProvider$inboundSchema;
1076
- /** @deprecated use `GetPromptVersionProvider$outboundSchema` instead. */
1077
- export const outboundSchema = GetPromptVersionProvider$outboundSchema;
1078
- }
1079
-
1080
- /** @internal */
1081
- export const GetPromptVersionRole$inboundSchema: z.ZodNativeEnum<
1082
- typeof GetPromptVersionRole
1083
- > = z.nativeEnum(GetPromptVersionRole);
1084
-
1085
- /** @internal */
1086
- export const GetPromptVersionRole$outboundSchema: z.ZodNativeEnum<
1087
- typeof GetPromptVersionRole
1088
- > = GetPromptVersionRole$inboundSchema;
1089
-
1090
- /**
1091
- * @internal
1092
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1093
- */
1094
- export namespace GetPromptVersionRole$ {
1095
- /** @deprecated use `GetPromptVersionRole$inboundSchema` instead. */
1096
- export const inboundSchema = GetPromptVersionRole$inboundSchema;
1097
- /** @deprecated use `GetPromptVersionRole$outboundSchema` instead. */
1098
- export const outboundSchema = GetPromptVersionRole$outboundSchema;
1099
- }
1100
-
1101
- /** @internal */
1102
- export const GetPromptVersion2PromptsType$inboundSchema: z.ZodNativeEnum<
1103
- typeof GetPromptVersion2PromptsType
1104
- > = z.nativeEnum(GetPromptVersion2PromptsType);
1105
-
1106
- /** @internal */
1107
- export const GetPromptVersion2PromptsType$outboundSchema: z.ZodNativeEnum<
1108
- typeof GetPromptVersion2PromptsType
1109
- > = GetPromptVersion2PromptsType$inboundSchema;
1110
-
1111
- /**
1112
- * @internal
1113
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1114
- */
1115
- export namespace GetPromptVersion2PromptsType$ {
1116
- /** @deprecated use `GetPromptVersion2PromptsType$inboundSchema` instead. */
1117
- export const inboundSchema = GetPromptVersion2PromptsType$inboundSchema;
1118
- /** @deprecated use `GetPromptVersion2PromptsType$outboundSchema` instead. */
1119
- export const outboundSchema = GetPromptVersion2PromptsType$outboundSchema;
1120
- }
1121
-
1122
- /** @internal */
1123
- export const GetPromptVersion2ImageUrl$inboundSchema: z.ZodType<
1124
- GetPromptVersion2ImageUrl,
1125
- z.ZodTypeDef,
1126
- unknown
1127
- > = z.object({
1128
- id: z.string().optional(),
1129
- url: z.string(),
1130
- detail: z.string().optional(),
1131
- });
1132
-
1133
- /** @internal */
1134
- export type GetPromptVersion2ImageUrl$Outbound = {
1135
- id?: string | undefined;
1136
- url: string;
1137
- detail?: string | undefined;
1138
- };
1139
-
1140
- /** @internal */
1141
- export const GetPromptVersion2ImageUrl$outboundSchema: z.ZodType<
1142
- GetPromptVersion2ImageUrl$Outbound,
1143
- z.ZodTypeDef,
1144
- GetPromptVersion2ImageUrl
1145
- > = z.object({
1146
- id: z.string().optional(),
1147
- url: z.string(),
1148
- detail: z.string().optional(),
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 GetPromptVersion2ImageUrl$ {
1156
- /** @deprecated use `GetPromptVersion2ImageUrl$inboundSchema` instead. */
1157
- export const inboundSchema = GetPromptVersion2ImageUrl$inboundSchema;
1158
- /** @deprecated use `GetPromptVersion2ImageUrl$outboundSchema` instead. */
1159
- export const outboundSchema = GetPromptVersion2ImageUrl$outboundSchema;
1160
- /** @deprecated use `GetPromptVersion2ImageUrl$Outbound` instead. */
1161
- export type Outbound = GetPromptVersion2ImageUrl$Outbound;
1162
- }
1163
-
1164
- export function getPromptVersion2ImageUrlToJSON(
1165
- getPromptVersion2ImageUrl: GetPromptVersion2ImageUrl,
1166
- ): string {
1167
- return JSON.stringify(
1168
- GetPromptVersion2ImageUrl$outboundSchema.parse(getPromptVersion2ImageUrl),
1169
- );
1170
- }
1171
-
1172
- export function getPromptVersion2ImageUrlFromJSON(
1173
- jsonString: string,
1174
- ): SafeParseResult<GetPromptVersion2ImageUrl, SDKValidationError> {
1175
- return safeParse(
1176
- jsonString,
1177
- (x) => GetPromptVersion2ImageUrl$inboundSchema.parse(JSON.parse(x)),
1178
- `Failed to parse 'GetPromptVersion2ImageUrl' from JSON`,
1179
- );
1180
- }
1181
-
1182
- /** @internal */
1183
- export const GetPromptVersion22$inboundSchema: z.ZodType<
1184
- GetPromptVersion22,
1185
- z.ZodTypeDef,
1186
- unknown
1187
- > = z.object({
1188
- type: GetPromptVersion2PromptsType$inboundSchema,
1189
- image_url: z.lazy(() => GetPromptVersion2ImageUrl$inboundSchema),
1190
- }).transform((v) => {
1191
- return remap$(v, {
1192
- "image_url": "imageUrl",
1193
- });
1194
- });
1195
-
1196
- /** @internal */
1197
- export type GetPromptVersion22$Outbound = {
1198
- type: string;
1199
- image_url: GetPromptVersion2ImageUrl$Outbound;
1200
- };
1201
-
1202
- /** @internal */
1203
- export const GetPromptVersion22$outboundSchema: z.ZodType<
1204
- GetPromptVersion22$Outbound,
1205
- z.ZodTypeDef,
1206
- GetPromptVersion22
1207
- > = z.object({
1208
- type: GetPromptVersion2PromptsType$outboundSchema,
1209
- imageUrl: z.lazy(() => GetPromptVersion2ImageUrl$outboundSchema),
1210
- }).transform((v) => {
1211
- return remap$(v, {
1212
- imageUrl: "image_url",
1213
- });
1214
- });
1215
-
1216
- /**
1217
- * @internal
1218
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1219
- */
1220
- export namespace GetPromptVersion22$ {
1221
- /** @deprecated use `GetPromptVersion22$inboundSchema` instead. */
1222
- export const inboundSchema = GetPromptVersion22$inboundSchema;
1223
- /** @deprecated use `GetPromptVersion22$outboundSchema` instead. */
1224
- export const outboundSchema = GetPromptVersion22$outboundSchema;
1225
- /** @deprecated use `GetPromptVersion22$Outbound` instead. */
1226
- export type Outbound = GetPromptVersion22$Outbound;
1227
- }
1228
-
1229
- export function getPromptVersion22ToJSON(
1230
- getPromptVersion22: GetPromptVersion22,
1231
- ): string {
1232
- return JSON.stringify(
1233
- GetPromptVersion22$outboundSchema.parse(getPromptVersion22),
1234
- );
1235
- }
1236
-
1237
- export function getPromptVersion22FromJSON(
1238
- jsonString: string,
1239
- ): SafeParseResult<GetPromptVersion22, SDKValidationError> {
1240
- return safeParse(
1241
- jsonString,
1242
- (x) => GetPromptVersion22$inboundSchema.parse(JSON.parse(x)),
1243
- `Failed to parse 'GetPromptVersion22' from JSON`,
1244
- );
1245
- }
1246
-
1247
- /** @internal */
1248
- export const GetPromptVersion2Type$inboundSchema: z.ZodNativeEnum<
1249
- typeof GetPromptVersion2Type
1250
- > = z.nativeEnum(GetPromptVersion2Type);
1251
-
1252
- /** @internal */
1253
- export const GetPromptVersion2Type$outboundSchema: z.ZodNativeEnum<
1254
- typeof GetPromptVersion2Type
1255
- > = GetPromptVersion2Type$inboundSchema;
1256
-
1257
- /**
1258
- * @internal
1259
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1260
- */
1261
- export namespace GetPromptVersion2Type$ {
1262
- /** @deprecated use `GetPromptVersion2Type$inboundSchema` instead. */
1263
- export const inboundSchema = GetPromptVersion2Type$inboundSchema;
1264
- /** @deprecated use `GetPromptVersion2Type$outboundSchema` instead. */
1265
- export const outboundSchema = GetPromptVersion2Type$outboundSchema;
1266
- }
1267
-
1268
- /** @internal */
1269
- export const GetPromptVersion21$inboundSchema: z.ZodType<
1270
- GetPromptVersion21,
1271
- z.ZodTypeDef,
1272
- unknown
1273
- > = z.object({
1274
- type: GetPromptVersion2Type$inboundSchema,
1275
- text: z.string(),
1276
- });
1277
-
1278
- /** @internal */
1279
- export type GetPromptVersion21$Outbound = {
1280
- type: string;
1281
- text: string;
1282
- };
1283
-
1284
- /** @internal */
1285
- export const GetPromptVersion21$outboundSchema: z.ZodType<
1286
- GetPromptVersion21$Outbound,
1287
- z.ZodTypeDef,
1288
- GetPromptVersion21
1289
- > = z.object({
1290
- type: GetPromptVersion2Type$outboundSchema,
1291
- text: z.string(),
1292
- });
1293
-
1294
- /**
1295
- * @internal
1296
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1297
- */
1298
- export namespace GetPromptVersion21$ {
1299
- /** @deprecated use `GetPromptVersion21$inboundSchema` instead. */
1300
- export const inboundSchema = GetPromptVersion21$inboundSchema;
1301
- /** @deprecated use `GetPromptVersion21$outboundSchema` instead. */
1302
- export const outboundSchema = GetPromptVersion21$outboundSchema;
1303
- /** @deprecated use `GetPromptVersion21$Outbound` instead. */
1304
- export type Outbound = GetPromptVersion21$Outbound;
1305
- }
1306
-
1307
- export function getPromptVersion21ToJSON(
1308
- getPromptVersion21: GetPromptVersion21,
1309
- ): string {
1310
- return JSON.stringify(
1311
- GetPromptVersion21$outboundSchema.parse(getPromptVersion21),
1312
- );
1313
- }
1314
-
1315
- export function getPromptVersion21FromJSON(
1316
- jsonString: string,
1317
- ): SafeParseResult<GetPromptVersion21, SDKValidationError> {
1318
- return safeParse(
1319
- jsonString,
1320
- (x) => GetPromptVersion21$inboundSchema.parse(JSON.parse(x)),
1321
- `Failed to parse 'GetPromptVersion21' from JSON`,
1322
- );
1323
- }
1324
-
1325
- /** @internal */
1326
- export const GetPromptVersionContent2$inboundSchema: z.ZodType<
1327
- GetPromptVersionContent2,
1328
- z.ZodTypeDef,
1329
- unknown
1330
- > = z.union([
1331
- z.lazy(() => GetPromptVersion21$inboundSchema),
1332
- z.lazy(() => GetPromptVersion22$inboundSchema),
1333
- ]);
1334
-
1335
- /** @internal */
1336
- export type GetPromptVersionContent2$Outbound =
1337
- | GetPromptVersion21$Outbound
1338
- | GetPromptVersion22$Outbound;
1339
-
1340
- /** @internal */
1341
- export const GetPromptVersionContent2$outboundSchema: z.ZodType<
1342
- GetPromptVersionContent2$Outbound,
1343
- z.ZodTypeDef,
1344
- GetPromptVersionContent2
1345
- > = z.union([
1346
- z.lazy(() => GetPromptVersion21$outboundSchema),
1347
- z.lazy(() => GetPromptVersion22$outboundSchema),
1348
- ]);
1349
-
1350
- /**
1351
- * @internal
1352
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1353
- */
1354
- export namespace GetPromptVersionContent2$ {
1355
- /** @deprecated use `GetPromptVersionContent2$inboundSchema` instead. */
1356
- export const inboundSchema = GetPromptVersionContent2$inboundSchema;
1357
- /** @deprecated use `GetPromptVersionContent2$outboundSchema` instead. */
1358
- export const outboundSchema = GetPromptVersionContent2$outboundSchema;
1359
- /** @deprecated use `GetPromptVersionContent2$Outbound` instead. */
1360
- export type Outbound = GetPromptVersionContent2$Outbound;
1361
- }
1362
-
1363
- export function getPromptVersionContent2ToJSON(
1364
- getPromptVersionContent2: GetPromptVersionContent2,
1365
- ): string {
1366
- return JSON.stringify(
1367
- GetPromptVersionContent2$outboundSchema.parse(getPromptVersionContent2),
1368
- );
1369
- }
1370
-
1371
- export function getPromptVersionContent2FromJSON(
1372
- jsonString: string,
1373
- ): SafeParseResult<GetPromptVersionContent2, SDKValidationError> {
1374
- return safeParse(
1375
- jsonString,
1376
- (x) => GetPromptVersionContent2$inboundSchema.parse(JSON.parse(x)),
1377
- `Failed to parse 'GetPromptVersionContent2' from JSON`,
1378
- );
1379
- }
1380
-
1381
- /** @internal */
1382
- export const GetPromptVersionContent$inboundSchema: z.ZodType<
1383
- GetPromptVersionContent,
1384
- z.ZodTypeDef,
1385
- unknown
1386
- > = z.union([
1387
- z.string(),
1388
- z.array(z.union([
1389
- z.lazy(() => GetPromptVersion21$inboundSchema),
1390
- z.lazy(() => GetPromptVersion22$inboundSchema),
1391
- ])),
1392
- ]);
1393
-
1394
- /** @internal */
1395
- export type GetPromptVersionContent$Outbound =
1396
- | string
1397
- | Array<GetPromptVersion21$Outbound | GetPromptVersion22$Outbound>;
1398
-
1399
- /** @internal */
1400
- export const GetPromptVersionContent$outboundSchema: z.ZodType<
1401
- GetPromptVersionContent$Outbound,
1402
- z.ZodTypeDef,
1403
- GetPromptVersionContent
1404
- > = z.union([
1405
- z.string(),
1406
- z.array(z.union([
1407
- z.lazy(() => GetPromptVersion21$outboundSchema),
1408
- z.lazy(() => GetPromptVersion22$outboundSchema),
1409
- ])),
1410
- ]);
1411
-
1412
- /**
1413
- * @internal
1414
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1415
- */
1416
- export namespace GetPromptVersionContent$ {
1417
- /** @deprecated use `GetPromptVersionContent$inboundSchema` instead. */
1418
- export const inboundSchema = GetPromptVersionContent$inboundSchema;
1419
- /** @deprecated use `GetPromptVersionContent$outboundSchema` instead. */
1420
- export const outboundSchema = GetPromptVersionContent$outboundSchema;
1421
- /** @deprecated use `GetPromptVersionContent$Outbound` instead. */
1422
- export type Outbound = GetPromptVersionContent$Outbound;
1423
- }
1424
-
1425
- export function getPromptVersionContentToJSON(
1426
- getPromptVersionContent: GetPromptVersionContent,
1427
- ): string {
1428
- return JSON.stringify(
1429
- GetPromptVersionContent$outboundSchema.parse(getPromptVersionContent),
1430
- );
1431
- }
1432
-
1433
- export function getPromptVersionContentFromJSON(
1434
- jsonString: string,
1435
- ): SafeParseResult<GetPromptVersionContent, SDKValidationError> {
1436
- return safeParse(
1437
- jsonString,
1438
- (x) => GetPromptVersionContent$inboundSchema.parse(JSON.parse(x)),
1439
- `Failed to parse 'GetPromptVersionContent' from JSON`,
1440
- );
1441
- }
1442
-
1443
- /** @internal */
1444
- export const GetPromptVersionType$inboundSchema: z.ZodNativeEnum<
1445
- typeof GetPromptVersionType
1446
- > = z.nativeEnum(GetPromptVersionType);
1447
-
1448
- /** @internal */
1449
- export const GetPromptVersionType$outboundSchema: z.ZodNativeEnum<
1450
- typeof GetPromptVersionType
1451
- > = GetPromptVersionType$inboundSchema;
1452
-
1453
- /**
1454
- * @internal
1455
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1456
- */
1457
- export namespace GetPromptVersionType$ {
1458
- /** @deprecated use `GetPromptVersionType$inboundSchema` instead. */
1459
- export const inboundSchema = GetPromptVersionType$inboundSchema;
1460
- /** @deprecated use `GetPromptVersionType$outboundSchema` instead. */
1461
- export const outboundSchema = GetPromptVersionType$outboundSchema;
1462
- }
1463
-
1464
- /** @internal */
1465
- export const GetPromptVersionFunction$inboundSchema: z.ZodType<
1466
- GetPromptVersionFunction,
1467
- z.ZodTypeDef,
1468
- unknown
1469
- > = z.object({
1470
- name: z.string(),
1471
- arguments: z.string(),
1472
- });
1473
-
1474
- /** @internal */
1475
- export type GetPromptVersionFunction$Outbound = {
1476
- name: string;
1477
- arguments: string;
1478
- };
1479
-
1480
- /** @internal */
1481
- export const GetPromptVersionFunction$outboundSchema: z.ZodType<
1482
- GetPromptVersionFunction$Outbound,
1483
- z.ZodTypeDef,
1484
- GetPromptVersionFunction
1485
- > = z.object({
1486
- name: z.string(),
1487
- arguments: z.string(),
1488
- });
1489
-
1490
- /**
1491
- * @internal
1492
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1493
- */
1494
- export namespace GetPromptVersionFunction$ {
1495
- /** @deprecated use `GetPromptVersionFunction$inboundSchema` instead. */
1496
- export const inboundSchema = GetPromptVersionFunction$inboundSchema;
1497
- /** @deprecated use `GetPromptVersionFunction$outboundSchema` instead. */
1498
- export const outboundSchema = GetPromptVersionFunction$outboundSchema;
1499
- /** @deprecated use `GetPromptVersionFunction$Outbound` instead. */
1500
- export type Outbound = GetPromptVersionFunction$Outbound;
1501
- }
1502
-
1503
- export function getPromptVersionFunctionToJSON(
1504
- getPromptVersionFunction: GetPromptVersionFunction,
1505
- ): string {
1506
- return JSON.stringify(
1507
- GetPromptVersionFunction$outboundSchema.parse(getPromptVersionFunction),
1508
- );
1509
- }
1510
-
1511
- export function getPromptVersionFunctionFromJSON(
1512
- jsonString: string,
1513
- ): SafeParseResult<GetPromptVersionFunction, SDKValidationError> {
1514
- return safeParse(
1515
- jsonString,
1516
- (x) => GetPromptVersionFunction$inboundSchema.parse(JSON.parse(x)),
1517
- `Failed to parse 'GetPromptVersionFunction' from JSON`,
1518
- );
1519
- }
1520
-
1521
- /** @internal */
1522
- export const GetPromptVersionToolCalls$inboundSchema: z.ZodType<
1523
- GetPromptVersionToolCalls,
1524
- z.ZodTypeDef,
1525
- unknown
1526
- > = z.object({
1527
- id: z.string().optional(),
1528
- index: z.number().optional(),
1529
- type: GetPromptVersionType$inboundSchema,
1530
- function: z.lazy(() => GetPromptVersionFunction$inboundSchema),
1531
- });
1532
-
1533
- /** @internal */
1534
- export type GetPromptVersionToolCalls$Outbound = {
1535
- id?: string | undefined;
1536
- index?: number | undefined;
1537
- type: string;
1538
- function: GetPromptVersionFunction$Outbound;
1539
- };
1540
-
1541
- /** @internal */
1542
- export const GetPromptVersionToolCalls$outboundSchema: z.ZodType<
1543
- GetPromptVersionToolCalls$Outbound,
1544
- z.ZodTypeDef,
1545
- GetPromptVersionToolCalls
1546
- > = z.object({
1547
- id: z.string().optional(),
1548
- index: z.number().optional(),
1549
- type: GetPromptVersionType$outboundSchema,
1550
- function: z.lazy(() => GetPromptVersionFunction$outboundSchema),
1551
- });
1552
-
1553
- /**
1554
- * @internal
1555
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1556
- */
1557
- export namespace GetPromptVersionToolCalls$ {
1558
- /** @deprecated use `GetPromptVersionToolCalls$inboundSchema` instead. */
1559
- export const inboundSchema = GetPromptVersionToolCalls$inboundSchema;
1560
- /** @deprecated use `GetPromptVersionToolCalls$outboundSchema` instead. */
1561
- export const outboundSchema = GetPromptVersionToolCalls$outboundSchema;
1562
- /** @deprecated use `GetPromptVersionToolCalls$Outbound` instead. */
1563
- export type Outbound = GetPromptVersionToolCalls$Outbound;
1564
- }
1565
-
1566
- export function getPromptVersionToolCallsToJSON(
1567
- getPromptVersionToolCalls: GetPromptVersionToolCalls,
1568
- ): string {
1569
- return JSON.stringify(
1570
- GetPromptVersionToolCalls$outboundSchema.parse(getPromptVersionToolCalls),
1571
- );
1572
- }
1573
-
1574
- export function getPromptVersionToolCallsFromJSON(
1575
- jsonString: string,
1576
- ): SafeParseResult<GetPromptVersionToolCalls, SDKValidationError> {
1577
- return safeParse(
1578
- jsonString,
1579
- (x) => GetPromptVersionToolCalls$inboundSchema.parse(JSON.parse(x)),
1580
- `Failed to parse 'GetPromptVersionToolCalls' from JSON`,
1581
- );
1582
- }
1583
-
1584
- /** @internal */
1585
- export const GetPromptVersionMessages$inboundSchema: z.ZodType<
1586
- GetPromptVersionMessages,
1587
- z.ZodTypeDef,
1588
- unknown
1589
- > = z.object({
1590
- role: GetPromptVersionRole$inboundSchema,
1591
- content: z.union([
1592
- z.string(),
1593
- z.array(z.union([
1594
- z.lazy(() => GetPromptVersion21$inboundSchema),
1595
- z.lazy(() => GetPromptVersion22$inboundSchema),
1596
- ])),
1597
- ]),
1598
- tool_calls: z.array(z.lazy(() => GetPromptVersionToolCalls$inboundSchema))
1599
- .optional(),
1600
- tool_call_id: z.string().optional(),
1601
- }).transform((v) => {
1602
- return remap$(v, {
1603
- "tool_calls": "toolCalls",
1604
- "tool_call_id": "toolCallId",
1605
- });
1606
- });
1607
-
1608
- /** @internal */
1609
- export type GetPromptVersionMessages$Outbound = {
1610
- role: string;
1611
- content:
1612
- | string
1613
- | Array<GetPromptVersion21$Outbound | GetPromptVersion22$Outbound>;
1614
- tool_calls?: Array<GetPromptVersionToolCalls$Outbound> | undefined;
1615
- tool_call_id?: string | undefined;
1616
- };
1617
-
1618
- /** @internal */
1619
- export const GetPromptVersionMessages$outboundSchema: z.ZodType<
1620
- GetPromptVersionMessages$Outbound,
1621
- z.ZodTypeDef,
1622
- GetPromptVersionMessages
1623
- > = z.object({
1624
- role: GetPromptVersionRole$outboundSchema,
1625
- content: z.union([
1626
- z.string(),
1627
- z.array(z.union([
1628
- z.lazy(() => GetPromptVersion21$outboundSchema),
1629
- z.lazy(() => GetPromptVersion22$outboundSchema),
1630
- ])),
1631
- ]),
1632
- toolCalls: z.array(z.lazy(() => GetPromptVersionToolCalls$outboundSchema))
1633
- .optional(),
1634
- toolCallId: z.string().optional(),
1635
- }).transform((v) => {
1636
- return remap$(v, {
1637
- toolCalls: "tool_calls",
1638
- toolCallId: "tool_call_id",
1639
- });
1640
- });
1641
-
1642
- /**
1643
- * @internal
1644
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1645
- */
1646
- export namespace GetPromptVersionMessages$ {
1647
- /** @deprecated use `GetPromptVersionMessages$inboundSchema` instead. */
1648
- export const inboundSchema = GetPromptVersionMessages$inboundSchema;
1649
- /** @deprecated use `GetPromptVersionMessages$outboundSchema` instead. */
1650
- export const outboundSchema = GetPromptVersionMessages$outboundSchema;
1651
- /** @deprecated use `GetPromptVersionMessages$Outbound` instead. */
1652
- export type Outbound = GetPromptVersionMessages$Outbound;
1653
- }
1654
-
1655
- export function getPromptVersionMessagesToJSON(
1656
- getPromptVersionMessages: GetPromptVersionMessages,
1657
- ): string {
1658
- return JSON.stringify(
1659
- GetPromptVersionMessages$outboundSchema.parse(getPromptVersionMessages),
1660
- );
1661
- }
1662
-
1663
- export function getPromptVersionMessagesFromJSON(
1664
- jsonString: string,
1665
- ): SafeParseResult<GetPromptVersionMessages, SDKValidationError> {
1666
- return safeParse(
1667
- jsonString,
1668
- (x) => GetPromptVersionMessages$inboundSchema.parse(JSON.parse(x)),
1669
- `Failed to parse 'GetPromptVersionMessages' from JSON`,
1670
- );
1671
- }
1672
-
1673
- /** @internal */
1674
- export const GetPromptVersionPromptConfig$inboundSchema: z.ZodType<
1675
- GetPromptVersionPromptConfig,
1676
- z.ZodTypeDef,
1677
- unknown
1678
- > = z.object({
1679
- stream: z.boolean().optional(),
1680
- model: z.string().optional(),
1681
- model_db_id: z.string().optional(),
1682
- model_type: GetPromptVersionModelType$inboundSchema.optional(),
1683
- model_parameters: z.lazy(() => GetPromptVersionModelParameters$inboundSchema)
1684
- .optional(),
1685
- provider: GetPromptVersionProvider$inboundSchema.optional(),
1686
- integration_id: z.nullable(z.string()).optional(),
1687
- version: z.string().optional(),
1688
- messages: z.array(z.lazy(() => GetPromptVersionMessages$inboundSchema)),
1689
- }).transform((v) => {
1690
- return remap$(v, {
1691
- "model_db_id": "modelDbId",
1692
- "model_type": "modelType",
1693
- "model_parameters": "modelParameters",
1694
- "integration_id": "integrationId",
1695
- });
1696
- });
1697
-
1698
- /** @internal */
1699
- export type GetPromptVersionPromptConfig$Outbound = {
1700
- stream?: boolean | undefined;
1701
- model?: string | undefined;
1702
- model_db_id?: string | undefined;
1703
- model_type?: string | undefined;
1704
- model_parameters?: GetPromptVersionModelParameters$Outbound | undefined;
1705
- provider?: string | undefined;
1706
- integration_id?: string | null | undefined;
1707
- version?: string | undefined;
1708
- messages: Array<GetPromptVersionMessages$Outbound>;
1709
- };
1710
-
1711
- /** @internal */
1712
- export const GetPromptVersionPromptConfig$outboundSchema: z.ZodType<
1713
- GetPromptVersionPromptConfig$Outbound,
1714
- z.ZodTypeDef,
1715
- GetPromptVersionPromptConfig
1716
- > = z.object({
1717
- stream: z.boolean().optional(),
1718
- model: z.string().optional(),
1719
- modelDbId: z.string().optional(),
1720
- modelType: GetPromptVersionModelType$outboundSchema.optional(),
1721
- modelParameters: z.lazy(() => GetPromptVersionModelParameters$outboundSchema)
1722
- .optional(),
1723
- provider: GetPromptVersionProvider$outboundSchema.optional(),
1724
- integrationId: z.nullable(z.string()).optional(),
1725
- version: z.string().optional(),
1726
- messages: z.array(z.lazy(() => GetPromptVersionMessages$outboundSchema)),
1727
- }).transform((v) => {
1728
- return remap$(v, {
1729
- modelDbId: "model_db_id",
1730
- modelType: "model_type",
1731
- modelParameters: "model_parameters",
1732
- integrationId: "integration_id",
1733
- });
1734
- });
1735
-
1736
- /**
1737
- * @internal
1738
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1739
- */
1740
- export namespace GetPromptVersionPromptConfig$ {
1741
- /** @deprecated use `GetPromptVersionPromptConfig$inboundSchema` instead. */
1742
- export const inboundSchema = GetPromptVersionPromptConfig$inboundSchema;
1743
- /** @deprecated use `GetPromptVersionPromptConfig$outboundSchema` instead. */
1744
- export const outboundSchema = GetPromptVersionPromptConfig$outboundSchema;
1745
- /** @deprecated use `GetPromptVersionPromptConfig$Outbound` instead. */
1746
- export type Outbound = GetPromptVersionPromptConfig$Outbound;
1747
- }
1748
-
1749
- export function getPromptVersionPromptConfigToJSON(
1750
- getPromptVersionPromptConfig: GetPromptVersionPromptConfig,
1751
- ): string {
1752
- return JSON.stringify(
1753
- GetPromptVersionPromptConfig$outboundSchema.parse(
1754
- getPromptVersionPromptConfig,
1755
- ),
1756
- );
1757
- }
1758
-
1759
- export function getPromptVersionPromptConfigFromJSON(
1760
- jsonString: string,
1761
- ): SafeParseResult<GetPromptVersionPromptConfig, SDKValidationError> {
1762
- return safeParse(
1763
- jsonString,
1764
- (x) => GetPromptVersionPromptConfig$inboundSchema.parse(JSON.parse(x)),
1765
- `Failed to parse 'GetPromptVersionPromptConfig' from JSON`,
1766
- );
1767
- }
1768
-
1769
- /** @internal */
1770
- export const GetPromptVersionUseCases$inboundSchema: z.ZodNativeEnum<
1771
- typeof GetPromptVersionUseCases
1772
- > = z.nativeEnum(GetPromptVersionUseCases);
1773
-
1774
- /** @internal */
1775
- export const GetPromptVersionUseCases$outboundSchema: z.ZodNativeEnum<
1776
- typeof GetPromptVersionUseCases
1777
- > = GetPromptVersionUseCases$inboundSchema;
1778
-
1779
- /**
1780
- * @internal
1781
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1782
- */
1783
- export namespace GetPromptVersionUseCases$ {
1784
- /** @deprecated use `GetPromptVersionUseCases$inboundSchema` instead. */
1785
- export const inboundSchema = GetPromptVersionUseCases$inboundSchema;
1786
- /** @deprecated use `GetPromptVersionUseCases$outboundSchema` instead. */
1787
- export const outboundSchema = GetPromptVersionUseCases$outboundSchema;
1788
- }
1789
-
1790
- /** @internal */
1791
- export const GetPromptVersionLanguage$inboundSchema: z.ZodNativeEnum<
1792
- typeof GetPromptVersionLanguage
1793
- > = z.nativeEnum(GetPromptVersionLanguage);
1794
-
1795
- /** @internal */
1796
- export const GetPromptVersionLanguage$outboundSchema: z.ZodNativeEnum<
1797
- typeof GetPromptVersionLanguage
1798
- > = GetPromptVersionLanguage$inboundSchema;
1799
-
1800
- /**
1801
- * @internal
1802
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1803
- */
1804
- export namespace GetPromptVersionLanguage$ {
1805
- /** @deprecated use `GetPromptVersionLanguage$inboundSchema` instead. */
1806
- export const inboundSchema = GetPromptVersionLanguage$inboundSchema;
1807
- /** @deprecated use `GetPromptVersionLanguage$outboundSchema` instead. */
1808
- export const outboundSchema = GetPromptVersionLanguage$outboundSchema;
1809
- }
1810
-
1811
- /** @internal */
1812
- export const GetPromptVersionMetadata$inboundSchema: z.ZodType<
1813
- GetPromptVersionMetadata,
1814
- z.ZodTypeDef,
1815
- unknown
1816
- > = z.object({
1817
- use_cases: z.array(GetPromptVersionUseCases$inboundSchema).optional(),
1818
- language: z.nullable(GetPromptVersionLanguage$inboundSchema).optional(),
1819
- }).transform((v) => {
1820
- return remap$(v, {
1821
- "use_cases": "useCases",
1822
- });
1823
- });
1824
-
1825
- /** @internal */
1826
- export type GetPromptVersionMetadata$Outbound = {
1827
- use_cases?: Array<string> | undefined;
1828
- language?: string | null | undefined;
1829
- };
1830
-
1831
- /** @internal */
1832
- export const GetPromptVersionMetadata$outboundSchema: z.ZodType<
1833
- GetPromptVersionMetadata$Outbound,
1834
- z.ZodTypeDef,
1835
- GetPromptVersionMetadata
1836
- > = z.object({
1837
- useCases: z.array(GetPromptVersionUseCases$outboundSchema).optional(),
1838
- language: z.nullable(GetPromptVersionLanguage$outboundSchema).optional(),
1839
- }).transform((v) => {
1840
- return remap$(v, {
1841
- useCases: "use_cases",
1842
- });
1843
- });
1844
-
1845
- /**
1846
- * @internal
1847
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1848
- */
1849
- export namespace GetPromptVersionMetadata$ {
1850
- /** @deprecated use `GetPromptVersionMetadata$inboundSchema` instead. */
1851
- export const inboundSchema = GetPromptVersionMetadata$inboundSchema;
1852
- /** @deprecated use `GetPromptVersionMetadata$outboundSchema` instead. */
1853
- export const outboundSchema = GetPromptVersionMetadata$outboundSchema;
1854
- /** @deprecated use `GetPromptVersionMetadata$Outbound` instead. */
1855
- export type Outbound = GetPromptVersionMetadata$Outbound;
1856
- }
1857
-
1858
- export function getPromptVersionMetadataToJSON(
1859
- getPromptVersionMetadata: GetPromptVersionMetadata,
1860
- ): string {
1861
- return JSON.stringify(
1862
- GetPromptVersionMetadata$outboundSchema.parse(getPromptVersionMetadata),
1863
- );
1864
- }
1865
-
1866
- export function getPromptVersionMetadataFromJSON(
1867
- jsonString: string,
1868
- ): SafeParseResult<GetPromptVersionMetadata, SDKValidationError> {
1869
- return safeParse(
1870
- jsonString,
1871
- (x) => GetPromptVersionMetadata$inboundSchema.parse(JSON.parse(x)),
1872
- `Failed to parse 'GetPromptVersionMetadata' from JSON`,
1873
- );
1874
- }
1875
-
1876
- /** @internal */
1877
- export const GetPromptVersionResponseBody$inboundSchema: z.ZodType<
1878
- GetPromptVersionResponseBody,
1879
- z.ZodTypeDef,
1880
- unknown
1881
- > = z.object({
1882
- _id: z.string(),
1883
- created_by_id: z.nullable(z.string()).optional(),
1884
- updated_by_id: z.nullable(z.string()).optional(),
1885
- description: z.nullable(z.string()).optional(),
1886
- prompt_config: z.lazy(() => GetPromptVersionPromptConfig$inboundSchema),
1887
- metadata: z.lazy(() => GetPromptVersionMetadata$inboundSchema).optional(),
1888
- timestamp: z.string(),
1889
- }).transform((v) => {
1890
- return remap$(v, {
1891
- "_id": "id",
1892
- "created_by_id": "createdById",
1893
- "updated_by_id": "updatedById",
1894
- "prompt_config": "promptConfig",
1895
- });
1896
- });
1897
-
1898
- /** @internal */
1899
- export type GetPromptVersionResponseBody$Outbound = {
1900
- _id: string;
1901
- created_by_id?: string | null | undefined;
1902
- updated_by_id?: string | null | undefined;
1903
- description?: string | null | undefined;
1904
- prompt_config: GetPromptVersionPromptConfig$Outbound;
1905
- metadata?: GetPromptVersionMetadata$Outbound | undefined;
1906
- timestamp: string;
1907
- };
1908
-
1909
- /** @internal */
1910
- export const GetPromptVersionResponseBody$outboundSchema: z.ZodType<
1911
- GetPromptVersionResponseBody$Outbound,
1912
- z.ZodTypeDef,
1913
- GetPromptVersionResponseBody
1914
- > = z.object({
1915
- id: z.string(),
1916
- createdById: z.nullable(z.string()).optional(),
1917
- updatedById: z.nullable(z.string()).optional(),
1918
- description: z.nullable(z.string()).optional(),
1919
- promptConfig: z.lazy(() => GetPromptVersionPromptConfig$outboundSchema),
1920
- metadata: z.lazy(() => GetPromptVersionMetadata$outboundSchema).optional(),
1921
- timestamp: z.string(),
1922
- }).transform((v) => {
1923
- return remap$(v, {
1924
- id: "_id",
1925
- createdById: "created_by_id",
1926
- updatedById: "updated_by_id",
1927
- promptConfig: "prompt_config",
1928
- });
1929
- });
1930
-
1931
- /**
1932
- * @internal
1933
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1934
- */
1935
- export namespace GetPromptVersionResponseBody$ {
1936
- /** @deprecated use `GetPromptVersionResponseBody$inboundSchema` instead. */
1937
- export const inboundSchema = GetPromptVersionResponseBody$inboundSchema;
1938
- /** @deprecated use `GetPromptVersionResponseBody$outboundSchema` instead. */
1939
- export const outboundSchema = GetPromptVersionResponseBody$outboundSchema;
1940
- /** @deprecated use `GetPromptVersionResponseBody$Outbound` instead. */
1941
- export type Outbound = GetPromptVersionResponseBody$Outbound;
1942
- }
1943
-
1944
- export function getPromptVersionResponseBodyToJSON(
1945
- getPromptVersionResponseBody: GetPromptVersionResponseBody,
1946
- ): string {
1947
- return JSON.stringify(
1948
- GetPromptVersionResponseBody$outboundSchema.parse(
1949
- getPromptVersionResponseBody,
1950
- ),
1951
- );
1952
- }
1953
-
1954
- export function getPromptVersionResponseBodyFromJSON(
1955
- jsonString: string,
1956
- ): SafeParseResult<GetPromptVersionResponseBody, SDKValidationError> {
1957
- return safeParse(
1958
- jsonString,
1959
- (x) => GetPromptVersionResponseBody$inboundSchema.parse(JSON.parse(x)),
1960
- `Failed to parse 'GetPromptVersionResponseBody' from JSON`,
1961
- );
1962
- }