@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,3691 +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
- /**
13
- * The modality of the model
14
- */
15
- export const ModelType = {
16
- Chat: "chat",
17
- Completion: "completion",
18
- Embedding: "embedding",
19
- Vision: "vision",
20
- Image: "image",
21
- Tts: "tts",
22
- Stt: "stt",
23
- Rerank: "rerank",
24
- Moderations: "moderations",
25
- } as const;
26
- /**
27
- * The modality of the model
28
- */
29
- export type ModelType = ClosedEnum<typeof ModelType>;
30
-
31
- /**
32
- * Only supported on `image` models.
33
- */
34
- export const CreatePromptFormat = {
35
- Url: "url",
36
- B64Json: "b64_json",
37
- Text: "text",
38
- JsonObject: "json_object",
39
- } as const;
40
- /**
41
- * Only supported on `image` models.
42
- */
43
- export type CreatePromptFormat = ClosedEnum<typeof CreatePromptFormat>;
44
-
45
- export const CreatePromptResponseFormatType = {
46
- JsonObject: "json_object",
47
- } as const;
48
- export type CreatePromptResponseFormatType = ClosedEnum<
49
- typeof CreatePromptResponseFormatType
50
- >;
51
-
52
- export type ResponseFormat2 = {
53
- type: CreatePromptResponseFormatType;
54
- };
55
-
56
- export const ResponseFormatType = {
57
- JsonSchema: "json_schema",
58
- } as const;
59
- export type ResponseFormatType = ClosedEnum<typeof ResponseFormatType>;
60
-
61
- export type JsonSchema = {
62
- name: string;
63
- strict: boolean;
64
- schema: { [k: string]: any };
65
- };
66
-
67
- export type ResponseFormat1 = {
68
- type: ResponseFormatType;
69
- jsonSchema: JsonSchema;
70
- };
71
-
72
- /**
73
- * An object specifying the format that the model must output.
74
- *
75
- * @remarks
76
- *
77
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
78
- *
79
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
80
- *
81
- * 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.
82
- */
83
- export type ResponseFormat = ResponseFormat2 | ResponseFormat1;
84
-
85
- /**
86
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
87
- */
88
- export const PhotoRealVersion = {
89
- V1: "v1",
90
- V2: "v2",
91
- } as const;
92
- /**
93
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
94
- */
95
- export type PhotoRealVersion = ClosedEnum<typeof PhotoRealVersion>;
96
-
97
- /**
98
- * The format to return the embeddings
99
- */
100
- export const EncodingFormat = {
101
- Float: "float",
102
- Base64: "base64",
103
- } as const;
104
- /**
105
- * The format to return the embeddings
106
- */
107
- export type EncodingFormat = ClosedEnum<typeof EncodingFormat>;
108
-
109
- /**
110
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
111
- */
112
- export const ReasoningEffort = {
113
- Low: "low",
114
- Medium: "medium",
115
- High: "high",
116
- } as const;
117
- /**
118
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
119
- */
120
- export type ReasoningEffort = ClosedEnum<typeof ReasoningEffort>;
121
-
122
- /**
123
- * Model Parameters: Not all parameters apply to every model
124
- */
125
- export type ModelParameters = {
126
- /**
127
- * Only supported on `chat` and `completion` models.
128
- */
129
- temperature?: number | undefined;
130
- /**
131
- * Only supported on `chat` and `completion` models.
132
- */
133
- maxTokens?: number | undefined;
134
- /**
135
- * Only supported on `chat` and `completion` models.
136
- */
137
- topK?: number | undefined;
138
- /**
139
- * Only supported on `chat` and `completion` models.
140
- */
141
- topP?: number | undefined;
142
- /**
143
- * Only supported on `chat` and `completion` models.
144
- */
145
- frequencyPenalty?: number | undefined;
146
- /**
147
- * Only supported on `chat` and `completion` models.
148
- */
149
- presencePenalty?: number | undefined;
150
- /**
151
- * Only supported on `image` models.
152
- */
153
- numImages?: number | undefined;
154
- /**
155
- * Best effort deterministic seed for the model. Currently only OpenAI models support these
156
- */
157
- seed?: number | undefined;
158
- /**
159
- * Only supported on `image` models.
160
- */
161
- format?: CreatePromptFormat | undefined;
162
- /**
163
- * Only supported on `image` models.
164
- */
165
- dimensions?: string | undefined;
166
- /**
167
- * Only supported on `image` models.
168
- */
169
- quality?: string | undefined;
170
- /**
171
- * Only supported on `image` models.
172
- */
173
- style?: string | undefined;
174
- /**
175
- * An object specifying the format that the model must output.
176
- *
177
- * @remarks
178
- *
179
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
180
- *
181
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
182
- *
183
- * 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.
184
- */
185
- responseFormat?: ResponseFormat2 | ResponseFormat1 | null | undefined;
186
- /**
187
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
188
- */
189
- photoRealVersion?: PhotoRealVersion | undefined;
190
- /**
191
- * The format to return the embeddings
192
- */
193
- encodingFormat?: EncodingFormat | undefined;
194
- /**
195
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
196
- */
197
- reasoningEffort?: ReasoningEffort | undefined;
198
- /**
199
- * 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`
200
- */
201
- budgetTokens?: number | undefined;
202
- };
203
-
204
- export const Provider = {
205
- Cohere: "cohere",
206
- Openai: "openai",
207
- Anthropic: "anthropic",
208
- Huggingface: "huggingface",
209
- Replicate: "replicate",
210
- Google: "google",
211
- GoogleAi: "google-ai",
212
- Azure: "azure",
213
- Aws: "aws",
214
- Anyscale: "anyscale",
215
- Perplexity: "perplexity",
216
- Groq: "groq",
217
- Fal: "fal",
218
- Leonardoai: "leonardoai",
219
- Nvidia: "nvidia",
220
- Jina: "jina",
221
- Togetherai: "togetherai",
222
- Elevenlabs: "elevenlabs",
223
- } as const;
224
- export type Provider = ClosedEnum<typeof Provider>;
225
-
226
- /**
227
- * The role of the prompt message
228
- */
229
- export const CreatePromptRole = {
230
- System: "system",
231
- Assistant: "assistant",
232
- User: "user",
233
- Exception: "exception",
234
- Tool: "tool",
235
- Prompt: "prompt",
236
- Correction: "correction",
237
- ExpectedOutput: "expected_output",
238
- } as const;
239
- /**
240
- * The role of the prompt message
241
- */
242
- export type CreatePromptRole = ClosedEnum<typeof CreatePromptRole>;
243
-
244
- export const CreatePrompt2PromptsType = {
245
- ImageUrl: "image_url",
246
- } as const;
247
- export type CreatePrompt2PromptsType = ClosedEnum<
248
- typeof CreatePrompt2PromptsType
249
- >;
250
-
251
- export type CreatePrompt2ImageUrl = {
252
- /**
253
- * Either a URL of the image or the base64 encoded data URI.
254
- */
255
- url: string;
256
- /**
257
- * Specifies the detail level of the image. Currently only supported with OpenAI models
258
- */
259
- detail?: string | undefined;
260
- };
261
-
262
- /**
263
- * The image part of the prompt message. Only supported with vision models.
264
- */
265
- export type CreatePrompt22 = {
266
- type: CreatePrompt2PromptsType;
267
- imageUrl: CreatePrompt2ImageUrl;
268
- };
269
-
270
- export const CreatePrompt2Type = {
271
- Text: "text",
272
- } as const;
273
- export type CreatePrompt2Type = ClosedEnum<typeof CreatePrompt2Type>;
274
-
275
- /**
276
- * Text content part of a prompt message
277
- */
278
- export type CreatePrompt21 = {
279
- type: CreatePrompt2Type;
280
- text: string;
281
- };
282
-
283
- export type CreatePromptContent2 = CreatePrompt21 | CreatePrompt22;
284
-
285
- /**
286
- * 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.
287
- */
288
- export type CreatePromptContent =
289
- | string
290
- | Array<CreatePrompt21 | CreatePrompt22>;
291
-
292
- export const CreatePromptType = {
293
- Function: "function",
294
- } as const;
295
- export type CreatePromptType = ClosedEnum<typeof CreatePromptType>;
296
-
297
- export type CreatePromptFunction = {
298
- name: string;
299
- /**
300
- * JSON string arguments for the functions
301
- */
302
- arguments: string;
303
- };
304
-
305
- export type CreatePromptToolCalls = {
306
- id?: string | undefined;
307
- index?: number | undefined;
308
- type: CreatePromptType;
309
- function: CreatePromptFunction;
310
- };
311
-
312
- export type CreatePromptMessages = {
313
- /**
314
- * The role of the prompt message
315
- */
316
- role: CreatePromptRole;
317
- /**
318
- * 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.
319
- */
320
- content: string | Array<CreatePrompt21 | CreatePrompt22>;
321
- toolCalls?: Array<CreatePromptToolCalls> | undefined;
322
- toolCallId?: string | undefined;
323
- };
324
-
325
- /**
326
- * A list of messages compatible with the openAI schema
327
- */
328
- export type PromptConfig = {
329
- stream?: boolean | undefined;
330
- model?: string | undefined;
331
- /**
332
- * The modality of the model
333
- */
334
- modelType?: ModelType | undefined;
335
- /**
336
- * Model Parameters: Not all parameters apply to every model
337
- */
338
- modelParameters?: ModelParameters | undefined;
339
- provider?: Provider | undefined;
340
- version?: string | undefined;
341
- messages: Array<CreatePromptMessages>;
342
- };
343
-
344
- export const UseCases = {
345
- AgentsSimulations: "Agents simulations",
346
- Agents: "Agents",
347
- APIInteraction: "API interaction",
348
- AutonomousAgents: "Autonomous Agents",
349
- Chatbots: "Chatbots",
350
- Classification: "Classification",
351
- CodeUnderstanding: "Code understanding",
352
- CodeWriting: "Code writing",
353
- Conversation: "Conversation",
354
- DocumentsQA: "Documents QA",
355
- Evaluation: "Evaluation",
356
- Extraction: "Extraction",
357
- MultiModal: "Multi-modal",
358
- SelfChecking: "Self-checking",
359
- SentimentAnalysis: "Sentiment analysis",
360
- Sql: "SQL",
361
- Summarization: "Summarization",
362
- Tagging: "Tagging",
363
- TranslationDocument: "Translation (document)",
364
- TranslationSentences: "Translation (sentences)",
365
- } as const;
366
- export type UseCases = ClosedEnum<typeof UseCases>;
367
-
368
- /**
369
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
370
- */
371
- export const Language = {
372
- Chinese: "Chinese",
373
- Dutch: "Dutch",
374
- English: "English",
375
- French: "French",
376
- German: "German",
377
- Russian: "Russian",
378
- Spanish: "Spanish",
379
- } as const;
380
- /**
381
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
382
- */
383
- export type Language = ClosedEnum<typeof Language>;
384
-
385
- export type CreatePromptMetadata = {
386
- /**
387
- * 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
388
- */
389
- useCases?: Array<UseCases> | undefined;
390
- /**
391
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
392
- */
393
- language?: Language | null | undefined;
394
- };
395
-
396
- export type CreatePromptRequestBody = {
397
- /**
398
- * The prompt’s name, meant to be displayable in the UI.
399
- */
400
- displayName: string;
401
- /**
402
- * 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
403
- */
404
- description?: string | null | undefined;
405
- /**
406
- * A list of messages compatible with the openAI schema
407
- */
408
- promptConfig: PromptConfig;
409
- metadata?: CreatePromptMetadata | undefined;
410
- /**
411
- * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
412
- */
413
- path: string;
414
- };
415
-
416
- export const CreatePromptPromptsType = {
417
- Prompt: "prompt",
418
- } as const;
419
- export type CreatePromptPromptsType = ClosedEnum<
420
- typeof CreatePromptPromptsType
421
- >;
422
-
423
- /**
424
- * The modality of the model
425
- */
426
- export const CreatePromptModelType = {
427
- Chat: "chat",
428
- Completion: "completion",
429
- Embedding: "embedding",
430
- Vision: "vision",
431
- Image: "image",
432
- Tts: "tts",
433
- Stt: "stt",
434
- Rerank: "rerank",
435
- Moderations: "moderations",
436
- } as const;
437
- /**
438
- * The modality of the model
439
- */
440
- export type CreatePromptModelType = ClosedEnum<typeof CreatePromptModelType>;
441
-
442
- /**
443
- * Only supported on `image` models.
444
- */
445
- export const CreatePromptPromptsFormat = {
446
- Url: "url",
447
- B64Json: "b64_json",
448
- Text: "text",
449
- JsonObject: "json_object",
450
- } as const;
451
- /**
452
- * Only supported on `image` models.
453
- */
454
- export type CreatePromptPromptsFormat = ClosedEnum<
455
- typeof CreatePromptPromptsFormat
456
- >;
457
-
458
- export const CreatePromptResponseFormatPromptsResponseType = {
459
- JsonObject: "json_object",
460
- } as const;
461
- export type CreatePromptResponseFormatPromptsResponseType = ClosedEnum<
462
- typeof CreatePromptResponseFormatPromptsResponseType
463
- >;
464
-
465
- export type CreatePromptResponseFormat2 = {
466
- type: CreatePromptResponseFormatPromptsResponseType;
467
- };
468
-
469
- export const CreatePromptResponseFormatPromptsType = {
470
- JsonSchema: "json_schema",
471
- } as const;
472
- export type CreatePromptResponseFormatPromptsType = ClosedEnum<
473
- typeof CreatePromptResponseFormatPromptsType
474
- >;
475
-
476
- export type CreatePromptResponseFormatJsonSchema = {
477
- name: string;
478
- strict: boolean;
479
- schema: { [k: string]: any };
480
- };
481
-
482
- export type CreatePromptResponseFormat1 = {
483
- type: CreatePromptResponseFormatPromptsType;
484
- jsonSchema: CreatePromptResponseFormatJsonSchema;
485
- };
486
-
487
- /**
488
- * An object specifying the format that the model must output.
489
- *
490
- * @remarks
491
- *
492
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
493
- *
494
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
495
- *
496
- * 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.
497
- */
498
- export type CreatePromptResponseFormat =
499
- | CreatePromptResponseFormat2
500
- | CreatePromptResponseFormat1;
501
-
502
- /**
503
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
504
- */
505
- export const CreatePromptPhotoRealVersion = {
506
- V1: "v1",
507
- V2: "v2",
508
- } as const;
509
- /**
510
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
511
- */
512
- export type CreatePromptPhotoRealVersion = ClosedEnum<
513
- typeof CreatePromptPhotoRealVersion
514
- >;
515
-
516
- /**
517
- * The format to return the embeddings
518
- */
519
- export const CreatePromptEncodingFormat = {
520
- Float: "float",
521
- Base64: "base64",
522
- } as const;
523
- /**
524
- * The format to return the embeddings
525
- */
526
- export type CreatePromptEncodingFormat = ClosedEnum<
527
- typeof CreatePromptEncodingFormat
528
- >;
529
-
530
- /**
531
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
532
- */
533
- export const CreatePromptReasoningEffort = {
534
- Low: "low",
535
- Medium: "medium",
536
- High: "high",
537
- } as const;
538
- /**
539
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
540
- */
541
- export type CreatePromptReasoningEffort = ClosedEnum<
542
- typeof CreatePromptReasoningEffort
543
- >;
544
-
545
- /**
546
- * Model Parameters: Not all parameters apply to every model
547
- */
548
- export type CreatePromptModelParameters = {
549
- /**
550
- * Only supported on `chat` and `completion` models.
551
- */
552
- temperature?: number | undefined;
553
- /**
554
- * Only supported on `chat` and `completion` models.
555
- */
556
- maxTokens?: number | undefined;
557
- /**
558
- * Only supported on `chat` and `completion` models.
559
- */
560
- topK?: number | undefined;
561
- /**
562
- * Only supported on `chat` and `completion` models.
563
- */
564
- topP?: number | undefined;
565
- /**
566
- * Only supported on `chat` and `completion` models.
567
- */
568
- frequencyPenalty?: number | undefined;
569
- /**
570
- * Only supported on `chat` and `completion` models.
571
- */
572
- presencePenalty?: number | undefined;
573
- /**
574
- * Only supported on `image` models.
575
- */
576
- numImages?: number | undefined;
577
- /**
578
- * Best effort deterministic seed for the model. Currently only OpenAI models support these
579
- */
580
- seed?: number | undefined;
581
- /**
582
- * Only supported on `image` models.
583
- */
584
- format?: CreatePromptPromptsFormat | undefined;
585
- /**
586
- * Only supported on `image` models.
587
- */
588
- dimensions?: string | undefined;
589
- /**
590
- * Only supported on `image` models.
591
- */
592
- quality?: string | undefined;
593
- /**
594
- * Only supported on `image` models.
595
- */
596
- style?: string | undefined;
597
- /**
598
- * An object specifying the format that the model must output.
599
- *
600
- * @remarks
601
- *
602
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
603
- *
604
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
605
- *
606
- * 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.
607
- */
608
- responseFormat?:
609
- | CreatePromptResponseFormat2
610
- | CreatePromptResponseFormat1
611
- | null
612
- | undefined;
613
- /**
614
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
615
- */
616
- photoRealVersion?: CreatePromptPhotoRealVersion | undefined;
617
- /**
618
- * The format to return the embeddings
619
- */
620
- encodingFormat?: CreatePromptEncodingFormat | undefined;
621
- /**
622
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
623
- */
624
- reasoningEffort?: CreatePromptReasoningEffort | undefined;
625
- /**
626
- * 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`
627
- */
628
- budgetTokens?: number | undefined;
629
- };
630
-
631
- export const CreatePromptProvider = {
632
- Cohere: "cohere",
633
- Openai: "openai",
634
- Anthropic: "anthropic",
635
- Huggingface: "huggingface",
636
- Replicate: "replicate",
637
- Google: "google",
638
- GoogleAi: "google-ai",
639
- Azure: "azure",
640
- Aws: "aws",
641
- Anyscale: "anyscale",
642
- Perplexity: "perplexity",
643
- Groq: "groq",
644
- Fal: "fal",
645
- Leonardoai: "leonardoai",
646
- Nvidia: "nvidia",
647
- Jina: "jina",
648
- Togetherai: "togetherai",
649
- Elevenlabs: "elevenlabs",
650
- } as const;
651
- export type CreatePromptProvider = ClosedEnum<typeof CreatePromptProvider>;
652
-
653
- /**
654
- * The role of the prompt message
655
- */
656
- export const CreatePromptPromptsRole = {
657
- System: "system",
658
- Assistant: "assistant",
659
- User: "user",
660
- Exception: "exception",
661
- Tool: "tool",
662
- Prompt: "prompt",
663
- Correction: "correction",
664
- ExpectedOutput: "expected_output",
665
- } as const;
666
- /**
667
- * The role of the prompt message
668
- */
669
- export type CreatePromptPromptsRole = ClosedEnum<
670
- typeof CreatePromptPromptsRole
671
- >;
672
-
673
- export const CreatePrompt2PromptsResponse200Type = {
674
- ImageUrl: "image_url",
675
- } as const;
676
- export type CreatePrompt2PromptsResponse200Type = ClosedEnum<
677
- typeof CreatePrompt2PromptsResponse200Type
678
- >;
679
-
680
- export type CreatePrompt2PromptsImageUrl = {
681
- /**
682
- * The orq.ai id of the image
683
- */
684
- id?: string | undefined;
685
- /**
686
- * Either a URL of the image or the base64 encoded data URI.
687
- */
688
- url: string;
689
- /**
690
- * Specifies the detail level of the image. Currently only supported with OpenAI models
691
- */
692
- detail?: string | undefined;
693
- };
694
-
695
- /**
696
- * The image part of the prompt message. Only supported with vision models.
697
- */
698
- export type CreatePrompt2Prompts2 = {
699
- type: CreatePrompt2PromptsResponse200Type;
700
- imageUrl: CreatePrompt2PromptsImageUrl;
701
- };
702
-
703
- export const CreatePrompt2PromptsResponseType = {
704
- Text: "text",
705
- } as const;
706
- export type CreatePrompt2PromptsResponseType = ClosedEnum<
707
- typeof CreatePrompt2PromptsResponseType
708
- >;
709
-
710
- /**
711
- * Text content part of a prompt message
712
- */
713
- export type CreatePrompt2Prompts1 = {
714
- type: CreatePrompt2PromptsResponseType;
715
- text: string;
716
- };
717
-
718
- export type CreatePromptContentPrompts2 =
719
- | CreatePrompt2Prompts1
720
- | CreatePrompt2Prompts2;
721
-
722
- /**
723
- * 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.
724
- */
725
- export type CreatePromptPromptsContent =
726
- | string
727
- | Array<CreatePrompt2Prompts1 | CreatePrompt2Prompts2>;
728
-
729
- export const CreatePromptPromptsResponseType = {
730
- Function: "function",
731
- } as const;
732
- export type CreatePromptPromptsResponseType = ClosedEnum<
733
- typeof CreatePromptPromptsResponseType
734
- >;
735
-
736
- export type CreatePromptPromptsFunction = {
737
- name: string;
738
- /**
739
- * JSON string arguments for the functions
740
- */
741
- arguments: string;
742
- };
743
-
744
- export type CreatePromptPromptsToolCalls = {
745
- id?: string | undefined;
746
- index?: number | undefined;
747
- type: CreatePromptPromptsResponseType;
748
- function: CreatePromptPromptsFunction;
749
- };
750
-
751
- export type CreatePromptPromptsMessages = {
752
- /**
753
- * The role of the prompt message
754
- */
755
- role: CreatePromptPromptsRole;
756
- /**
757
- * 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.
758
- */
759
- content: string | Array<CreatePrompt2Prompts1 | CreatePrompt2Prompts2>;
760
- toolCalls?: Array<CreatePromptPromptsToolCalls> | undefined;
761
- toolCallId?: string | undefined;
762
- };
763
-
764
- /**
765
- * A list of messages compatible with the openAI schema
766
- */
767
- export type CreatePromptPromptConfig = {
768
- stream?: boolean | undefined;
769
- model?: string | undefined;
770
- /**
771
- * The id of the resource
772
- */
773
- modelDbId?: string | undefined;
774
- /**
775
- * The modality of the model
776
- */
777
- modelType?: CreatePromptModelType | undefined;
778
- /**
779
- * Model Parameters: Not all parameters apply to every model
780
- */
781
- modelParameters?: CreatePromptModelParameters | undefined;
782
- provider?: CreatePromptProvider | undefined;
783
- /**
784
- * The id of the resource
785
- */
786
- integrationId?: string | null | undefined;
787
- version?: string | undefined;
788
- messages: Array<CreatePromptPromptsMessages>;
789
- };
790
-
791
- export const CreatePromptUseCases = {
792
- AgentsSimulations: "Agents simulations",
793
- Agents: "Agents",
794
- APIInteraction: "API interaction",
795
- AutonomousAgents: "Autonomous Agents",
796
- Chatbots: "Chatbots",
797
- Classification: "Classification",
798
- CodeUnderstanding: "Code understanding",
799
- CodeWriting: "Code writing",
800
- Conversation: "Conversation",
801
- DocumentsQA: "Documents QA",
802
- Evaluation: "Evaluation",
803
- Extraction: "Extraction",
804
- MultiModal: "Multi-modal",
805
- SelfChecking: "Self-checking",
806
- SentimentAnalysis: "Sentiment analysis",
807
- Sql: "SQL",
808
- Summarization: "Summarization",
809
- Tagging: "Tagging",
810
- TranslationDocument: "Translation (document)",
811
- TranslationSentences: "Translation (sentences)",
812
- } as const;
813
- export type CreatePromptUseCases = ClosedEnum<typeof CreatePromptUseCases>;
814
-
815
- /**
816
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
817
- */
818
- export const CreatePromptLanguage = {
819
- Chinese: "Chinese",
820
- Dutch: "Dutch",
821
- English: "English",
822
- French: "French",
823
- German: "German",
824
- Russian: "Russian",
825
- Spanish: "Spanish",
826
- } as const;
827
- /**
828
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
829
- */
830
- export type CreatePromptLanguage = ClosedEnum<typeof CreatePromptLanguage>;
831
-
832
- export type CreatePromptPromptsMetadata = {
833
- /**
834
- * 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
835
- */
836
- useCases?: Array<CreatePromptUseCases> | undefined;
837
- /**
838
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
839
- */
840
- language?: CreatePromptLanguage | null | undefined;
841
- };
842
-
843
- /**
844
- * Prompt created.
845
- */
846
- export type CreatePromptResponseBody = {
847
- id: string;
848
- type: CreatePromptPromptsType;
849
- owner: string;
850
- domainId: string;
851
- created: string;
852
- updated: string;
853
- createdById?: string | null | undefined;
854
- updatedById?: string | null | undefined;
855
- /**
856
- * The prompt’s name, meant to be displayable in the UI.
857
- */
858
- displayName: string;
859
- /**
860
- * 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
861
- */
862
- description?: string | null | undefined;
863
- /**
864
- * A list of messages compatible with the openAI schema
865
- */
866
- promptConfig: CreatePromptPromptConfig;
867
- metadata?: CreatePromptPromptsMetadata | undefined;
868
- };
869
-
870
- /** @internal */
871
- export const ModelType$inboundSchema: z.ZodNativeEnum<typeof ModelType> = z
872
- .nativeEnum(ModelType);
873
-
874
- /** @internal */
875
- export const ModelType$outboundSchema: z.ZodNativeEnum<typeof ModelType> =
876
- ModelType$inboundSchema;
877
-
878
- /**
879
- * @internal
880
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
881
- */
882
- export namespace ModelType$ {
883
- /** @deprecated use `ModelType$inboundSchema` instead. */
884
- export const inboundSchema = ModelType$inboundSchema;
885
- /** @deprecated use `ModelType$outboundSchema` instead. */
886
- export const outboundSchema = ModelType$outboundSchema;
887
- }
888
-
889
- /** @internal */
890
- export const CreatePromptFormat$inboundSchema: z.ZodNativeEnum<
891
- typeof CreatePromptFormat
892
- > = z.nativeEnum(CreatePromptFormat);
893
-
894
- /** @internal */
895
- export const CreatePromptFormat$outboundSchema: z.ZodNativeEnum<
896
- typeof CreatePromptFormat
897
- > = CreatePromptFormat$inboundSchema;
898
-
899
- /**
900
- * @internal
901
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
902
- */
903
- export namespace CreatePromptFormat$ {
904
- /** @deprecated use `CreatePromptFormat$inboundSchema` instead. */
905
- export const inboundSchema = CreatePromptFormat$inboundSchema;
906
- /** @deprecated use `CreatePromptFormat$outboundSchema` instead. */
907
- export const outboundSchema = CreatePromptFormat$outboundSchema;
908
- }
909
-
910
- /** @internal */
911
- export const CreatePromptResponseFormatType$inboundSchema: z.ZodNativeEnum<
912
- typeof CreatePromptResponseFormatType
913
- > = z.nativeEnum(CreatePromptResponseFormatType);
914
-
915
- /** @internal */
916
- export const CreatePromptResponseFormatType$outboundSchema: z.ZodNativeEnum<
917
- typeof CreatePromptResponseFormatType
918
- > = CreatePromptResponseFormatType$inboundSchema;
919
-
920
- /**
921
- * @internal
922
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
923
- */
924
- export namespace CreatePromptResponseFormatType$ {
925
- /** @deprecated use `CreatePromptResponseFormatType$inboundSchema` instead. */
926
- export const inboundSchema = CreatePromptResponseFormatType$inboundSchema;
927
- /** @deprecated use `CreatePromptResponseFormatType$outboundSchema` instead. */
928
- export const outboundSchema = CreatePromptResponseFormatType$outboundSchema;
929
- }
930
-
931
- /** @internal */
932
- export const ResponseFormat2$inboundSchema: z.ZodType<
933
- ResponseFormat2,
934
- z.ZodTypeDef,
935
- unknown
936
- > = z.object({
937
- type: CreatePromptResponseFormatType$inboundSchema,
938
- });
939
-
940
- /** @internal */
941
- export type ResponseFormat2$Outbound = {
942
- type: string;
943
- };
944
-
945
- /** @internal */
946
- export const ResponseFormat2$outboundSchema: z.ZodType<
947
- ResponseFormat2$Outbound,
948
- z.ZodTypeDef,
949
- ResponseFormat2
950
- > = z.object({
951
- type: CreatePromptResponseFormatType$outboundSchema,
952
- });
953
-
954
- /**
955
- * @internal
956
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
957
- */
958
- export namespace ResponseFormat2$ {
959
- /** @deprecated use `ResponseFormat2$inboundSchema` instead. */
960
- export const inboundSchema = ResponseFormat2$inboundSchema;
961
- /** @deprecated use `ResponseFormat2$outboundSchema` instead. */
962
- export const outboundSchema = ResponseFormat2$outboundSchema;
963
- /** @deprecated use `ResponseFormat2$Outbound` instead. */
964
- export type Outbound = ResponseFormat2$Outbound;
965
- }
966
-
967
- export function responseFormat2ToJSON(
968
- responseFormat2: ResponseFormat2,
969
- ): string {
970
- return JSON.stringify(ResponseFormat2$outboundSchema.parse(responseFormat2));
971
- }
972
-
973
- export function responseFormat2FromJSON(
974
- jsonString: string,
975
- ): SafeParseResult<ResponseFormat2, SDKValidationError> {
976
- return safeParse(
977
- jsonString,
978
- (x) => ResponseFormat2$inboundSchema.parse(JSON.parse(x)),
979
- `Failed to parse 'ResponseFormat2' from JSON`,
980
- );
981
- }
982
-
983
- /** @internal */
984
- export const ResponseFormatType$inboundSchema: z.ZodNativeEnum<
985
- typeof ResponseFormatType
986
- > = z.nativeEnum(ResponseFormatType);
987
-
988
- /** @internal */
989
- export const ResponseFormatType$outboundSchema: z.ZodNativeEnum<
990
- typeof ResponseFormatType
991
- > = ResponseFormatType$inboundSchema;
992
-
993
- /**
994
- * @internal
995
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
996
- */
997
- export namespace ResponseFormatType$ {
998
- /** @deprecated use `ResponseFormatType$inboundSchema` instead. */
999
- export const inboundSchema = ResponseFormatType$inboundSchema;
1000
- /** @deprecated use `ResponseFormatType$outboundSchema` instead. */
1001
- export const outboundSchema = ResponseFormatType$outboundSchema;
1002
- }
1003
-
1004
- /** @internal */
1005
- export const JsonSchema$inboundSchema: z.ZodType<
1006
- JsonSchema,
1007
- z.ZodTypeDef,
1008
- unknown
1009
- > = z.object({
1010
- name: z.string(),
1011
- strict: z.boolean(),
1012
- schema: z.record(z.any()),
1013
- });
1014
-
1015
- /** @internal */
1016
- export type JsonSchema$Outbound = {
1017
- name: string;
1018
- strict: boolean;
1019
- schema: { [k: string]: any };
1020
- };
1021
-
1022
- /** @internal */
1023
- export const JsonSchema$outboundSchema: z.ZodType<
1024
- JsonSchema$Outbound,
1025
- z.ZodTypeDef,
1026
- JsonSchema
1027
- > = z.object({
1028
- name: z.string(),
1029
- strict: z.boolean(),
1030
- schema: z.record(z.any()),
1031
- });
1032
-
1033
- /**
1034
- * @internal
1035
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1036
- */
1037
- export namespace JsonSchema$ {
1038
- /** @deprecated use `JsonSchema$inboundSchema` instead. */
1039
- export const inboundSchema = JsonSchema$inboundSchema;
1040
- /** @deprecated use `JsonSchema$outboundSchema` instead. */
1041
- export const outboundSchema = JsonSchema$outboundSchema;
1042
- /** @deprecated use `JsonSchema$Outbound` instead. */
1043
- export type Outbound = JsonSchema$Outbound;
1044
- }
1045
-
1046
- export function jsonSchemaToJSON(jsonSchema: JsonSchema): string {
1047
- return JSON.stringify(JsonSchema$outboundSchema.parse(jsonSchema));
1048
- }
1049
-
1050
- export function jsonSchemaFromJSON(
1051
- jsonString: string,
1052
- ): SafeParseResult<JsonSchema, SDKValidationError> {
1053
- return safeParse(
1054
- jsonString,
1055
- (x) => JsonSchema$inboundSchema.parse(JSON.parse(x)),
1056
- `Failed to parse 'JsonSchema' from JSON`,
1057
- );
1058
- }
1059
-
1060
- /** @internal */
1061
- export const ResponseFormat1$inboundSchema: z.ZodType<
1062
- ResponseFormat1,
1063
- z.ZodTypeDef,
1064
- unknown
1065
- > = z.object({
1066
- type: ResponseFormatType$inboundSchema,
1067
- json_schema: z.lazy(() => JsonSchema$inboundSchema),
1068
- }).transform((v) => {
1069
- return remap$(v, {
1070
- "json_schema": "jsonSchema",
1071
- });
1072
- });
1073
-
1074
- /** @internal */
1075
- export type ResponseFormat1$Outbound = {
1076
- type: string;
1077
- json_schema: JsonSchema$Outbound;
1078
- };
1079
-
1080
- /** @internal */
1081
- export const ResponseFormat1$outboundSchema: z.ZodType<
1082
- ResponseFormat1$Outbound,
1083
- z.ZodTypeDef,
1084
- ResponseFormat1
1085
- > = z.object({
1086
- type: ResponseFormatType$outboundSchema,
1087
- jsonSchema: z.lazy(() => JsonSchema$outboundSchema),
1088
- }).transform((v) => {
1089
- return remap$(v, {
1090
- jsonSchema: "json_schema",
1091
- });
1092
- });
1093
-
1094
- /**
1095
- * @internal
1096
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1097
- */
1098
- export namespace ResponseFormat1$ {
1099
- /** @deprecated use `ResponseFormat1$inboundSchema` instead. */
1100
- export const inboundSchema = ResponseFormat1$inboundSchema;
1101
- /** @deprecated use `ResponseFormat1$outboundSchema` instead. */
1102
- export const outboundSchema = ResponseFormat1$outboundSchema;
1103
- /** @deprecated use `ResponseFormat1$Outbound` instead. */
1104
- export type Outbound = ResponseFormat1$Outbound;
1105
- }
1106
-
1107
- export function responseFormat1ToJSON(
1108
- responseFormat1: ResponseFormat1,
1109
- ): string {
1110
- return JSON.stringify(ResponseFormat1$outboundSchema.parse(responseFormat1));
1111
- }
1112
-
1113
- export function responseFormat1FromJSON(
1114
- jsonString: string,
1115
- ): SafeParseResult<ResponseFormat1, SDKValidationError> {
1116
- return safeParse(
1117
- jsonString,
1118
- (x) => ResponseFormat1$inboundSchema.parse(JSON.parse(x)),
1119
- `Failed to parse 'ResponseFormat1' from JSON`,
1120
- );
1121
- }
1122
-
1123
- /** @internal */
1124
- export const ResponseFormat$inboundSchema: z.ZodType<
1125
- ResponseFormat,
1126
- z.ZodTypeDef,
1127
- unknown
1128
- > = z.union([
1129
- z.lazy(() => ResponseFormat2$inboundSchema),
1130
- z.lazy(() => ResponseFormat1$inboundSchema),
1131
- ]);
1132
-
1133
- /** @internal */
1134
- export type ResponseFormat$Outbound =
1135
- | ResponseFormat2$Outbound
1136
- | ResponseFormat1$Outbound;
1137
-
1138
- /** @internal */
1139
- export const ResponseFormat$outboundSchema: z.ZodType<
1140
- ResponseFormat$Outbound,
1141
- z.ZodTypeDef,
1142
- ResponseFormat
1143
- > = z.union([
1144
- z.lazy(() => ResponseFormat2$outboundSchema),
1145
- z.lazy(() => ResponseFormat1$outboundSchema),
1146
- ]);
1147
-
1148
- /**
1149
- * @internal
1150
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1151
- */
1152
- export namespace ResponseFormat$ {
1153
- /** @deprecated use `ResponseFormat$inboundSchema` instead. */
1154
- export const inboundSchema = ResponseFormat$inboundSchema;
1155
- /** @deprecated use `ResponseFormat$outboundSchema` instead. */
1156
- export const outboundSchema = ResponseFormat$outboundSchema;
1157
- /** @deprecated use `ResponseFormat$Outbound` instead. */
1158
- export type Outbound = ResponseFormat$Outbound;
1159
- }
1160
-
1161
- export function responseFormatToJSON(responseFormat: ResponseFormat): string {
1162
- return JSON.stringify(ResponseFormat$outboundSchema.parse(responseFormat));
1163
- }
1164
-
1165
- export function responseFormatFromJSON(
1166
- jsonString: string,
1167
- ): SafeParseResult<ResponseFormat, SDKValidationError> {
1168
- return safeParse(
1169
- jsonString,
1170
- (x) => ResponseFormat$inboundSchema.parse(JSON.parse(x)),
1171
- `Failed to parse 'ResponseFormat' from JSON`,
1172
- );
1173
- }
1174
-
1175
- /** @internal */
1176
- export const PhotoRealVersion$inboundSchema: z.ZodNativeEnum<
1177
- typeof PhotoRealVersion
1178
- > = z.nativeEnum(PhotoRealVersion);
1179
-
1180
- /** @internal */
1181
- export const PhotoRealVersion$outboundSchema: z.ZodNativeEnum<
1182
- typeof PhotoRealVersion
1183
- > = PhotoRealVersion$inboundSchema;
1184
-
1185
- /**
1186
- * @internal
1187
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1188
- */
1189
- export namespace PhotoRealVersion$ {
1190
- /** @deprecated use `PhotoRealVersion$inboundSchema` instead. */
1191
- export const inboundSchema = PhotoRealVersion$inboundSchema;
1192
- /** @deprecated use `PhotoRealVersion$outboundSchema` instead. */
1193
- export const outboundSchema = PhotoRealVersion$outboundSchema;
1194
- }
1195
-
1196
- /** @internal */
1197
- export const EncodingFormat$inboundSchema: z.ZodNativeEnum<
1198
- typeof EncodingFormat
1199
- > = z.nativeEnum(EncodingFormat);
1200
-
1201
- /** @internal */
1202
- export const EncodingFormat$outboundSchema: z.ZodNativeEnum<
1203
- typeof EncodingFormat
1204
- > = EncodingFormat$inboundSchema;
1205
-
1206
- /**
1207
- * @internal
1208
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1209
- */
1210
- export namespace EncodingFormat$ {
1211
- /** @deprecated use `EncodingFormat$inboundSchema` instead. */
1212
- export const inboundSchema = EncodingFormat$inboundSchema;
1213
- /** @deprecated use `EncodingFormat$outboundSchema` instead. */
1214
- export const outboundSchema = EncodingFormat$outboundSchema;
1215
- }
1216
-
1217
- /** @internal */
1218
- export const ReasoningEffort$inboundSchema: z.ZodNativeEnum<
1219
- typeof ReasoningEffort
1220
- > = z.nativeEnum(ReasoningEffort);
1221
-
1222
- /** @internal */
1223
- export const ReasoningEffort$outboundSchema: z.ZodNativeEnum<
1224
- typeof ReasoningEffort
1225
- > = ReasoningEffort$inboundSchema;
1226
-
1227
- /**
1228
- * @internal
1229
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1230
- */
1231
- export namespace ReasoningEffort$ {
1232
- /** @deprecated use `ReasoningEffort$inboundSchema` instead. */
1233
- export const inboundSchema = ReasoningEffort$inboundSchema;
1234
- /** @deprecated use `ReasoningEffort$outboundSchema` instead. */
1235
- export const outboundSchema = ReasoningEffort$outboundSchema;
1236
- }
1237
-
1238
- /** @internal */
1239
- export const ModelParameters$inboundSchema: z.ZodType<
1240
- ModelParameters,
1241
- z.ZodTypeDef,
1242
- unknown
1243
- > = z.object({
1244
- temperature: z.number().optional(),
1245
- maxTokens: z.number().optional(),
1246
- topK: z.number().optional(),
1247
- topP: z.number().optional(),
1248
- frequencyPenalty: z.number().optional(),
1249
- presencePenalty: z.number().optional(),
1250
- numImages: z.number().optional(),
1251
- seed: z.number().optional(),
1252
- format: CreatePromptFormat$inboundSchema.optional(),
1253
- dimensions: z.string().optional(),
1254
- quality: z.string().optional(),
1255
- style: z.string().optional(),
1256
- responseFormat: z.nullable(
1257
- z.union([
1258
- z.lazy(() => ResponseFormat2$inboundSchema),
1259
- z.lazy(() => ResponseFormat1$inboundSchema),
1260
- ]),
1261
- ).optional(),
1262
- photoRealVersion: PhotoRealVersion$inboundSchema.optional(),
1263
- encoding_format: EncodingFormat$inboundSchema.optional(),
1264
- reasoningEffort: ReasoningEffort$inboundSchema.optional(),
1265
- budgetTokens: z.number().optional(),
1266
- }).transform((v) => {
1267
- return remap$(v, {
1268
- "encoding_format": "encodingFormat",
1269
- });
1270
- });
1271
-
1272
- /** @internal */
1273
- export type ModelParameters$Outbound = {
1274
- temperature?: number | undefined;
1275
- maxTokens?: number | undefined;
1276
- topK?: number | undefined;
1277
- topP?: number | undefined;
1278
- frequencyPenalty?: number | undefined;
1279
- presencePenalty?: number | undefined;
1280
- numImages?: number | undefined;
1281
- seed?: number | undefined;
1282
- format?: string | undefined;
1283
- dimensions?: string | undefined;
1284
- quality?: string | undefined;
1285
- style?: string | undefined;
1286
- responseFormat?:
1287
- | ResponseFormat2$Outbound
1288
- | ResponseFormat1$Outbound
1289
- | null
1290
- | undefined;
1291
- photoRealVersion?: string | undefined;
1292
- encoding_format?: string | undefined;
1293
- reasoningEffort?: string | undefined;
1294
- budgetTokens?: number | undefined;
1295
- };
1296
-
1297
- /** @internal */
1298
- export const ModelParameters$outboundSchema: z.ZodType<
1299
- ModelParameters$Outbound,
1300
- z.ZodTypeDef,
1301
- ModelParameters
1302
- > = z.object({
1303
- temperature: z.number().optional(),
1304
- maxTokens: z.number().optional(),
1305
- topK: z.number().optional(),
1306
- topP: z.number().optional(),
1307
- frequencyPenalty: z.number().optional(),
1308
- presencePenalty: z.number().optional(),
1309
- numImages: z.number().optional(),
1310
- seed: z.number().optional(),
1311
- format: CreatePromptFormat$outboundSchema.optional(),
1312
- dimensions: z.string().optional(),
1313
- quality: z.string().optional(),
1314
- style: z.string().optional(),
1315
- responseFormat: z.nullable(
1316
- z.union([
1317
- z.lazy(() => ResponseFormat2$outboundSchema),
1318
- z.lazy(() => ResponseFormat1$outboundSchema),
1319
- ]),
1320
- ).optional(),
1321
- photoRealVersion: PhotoRealVersion$outboundSchema.optional(),
1322
- encodingFormat: EncodingFormat$outboundSchema.optional(),
1323
- reasoningEffort: ReasoningEffort$outboundSchema.optional(),
1324
- budgetTokens: z.number().optional(),
1325
- }).transform((v) => {
1326
- return remap$(v, {
1327
- encodingFormat: "encoding_format",
1328
- });
1329
- });
1330
-
1331
- /**
1332
- * @internal
1333
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1334
- */
1335
- export namespace ModelParameters$ {
1336
- /** @deprecated use `ModelParameters$inboundSchema` instead. */
1337
- export const inboundSchema = ModelParameters$inboundSchema;
1338
- /** @deprecated use `ModelParameters$outboundSchema` instead. */
1339
- export const outboundSchema = ModelParameters$outboundSchema;
1340
- /** @deprecated use `ModelParameters$Outbound` instead. */
1341
- export type Outbound = ModelParameters$Outbound;
1342
- }
1343
-
1344
- export function modelParametersToJSON(
1345
- modelParameters: ModelParameters,
1346
- ): string {
1347
- return JSON.stringify(ModelParameters$outboundSchema.parse(modelParameters));
1348
- }
1349
-
1350
- export function modelParametersFromJSON(
1351
- jsonString: string,
1352
- ): SafeParseResult<ModelParameters, SDKValidationError> {
1353
- return safeParse(
1354
- jsonString,
1355
- (x) => ModelParameters$inboundSchema.parse(JSON.parse(x)),
1356
- `Failed to parse 'ModelParameters' from JSON`,
1357
- );
1358
- }
1359
-
1360
- /** @internal */
1361
- export const Provider$inboundSchema: z.ZodNativeEnum<typeof Provider> = z
1362
- .nativeEnum(Provider);
1363
-
1364
- /** @internal */
1365
- export const Provider$outboundSchema: z.ZodNativeEnum<typeof Provider> =
1366
- Provider$inboundSchema;
1367
-
1368
- /**
1369
- * @internal
1370
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1371
- */
1372
- export namespace Provider$ {
1373
- /** @deprecated use `Provider$inboundSchema` instead. */
1374
- export const inboundSchema = Provider$inboundSchema;
1375
- /** @deprecated use `Provider$outboundSchema` instead. */
1376
- export const outboundSchema = Provider$outboundSchema;
1377
- }
1378
-
1379
- /** @internal */
1380
- export const CreatePromptRole$inboundSchema: z.ZodNativeEnum<
1381
- typeof CreatePromptRole
1382
- > = z.nativeEnum(CreatePromptRole);
1383
-
1384
- /** @internal */
1385
- export const CreatePromptRole$outboundSchema: z.ZodNativeEnum<
1386
- typeof CreatePromptRole
1387
- > = CreatePromptRole$inboundSchema;
1388
-
1389
- /**
1390
- * @internal
1391
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1392
- */
1393
- export namespace CreatePromptRole$ {
1394
- /** @deprecated use `CreatePromptRole$inboundSchema` instead. */
1395
- export const inboundSchema = CreatePromptRole$inboundSchema;
1396
- /** @deprecated use `CreatePromptRole$outboundSchema` instead. */
1397
- export const outboundSchema = CreatePromptRole$outboundSchema;
1398
- }
1399
-
1400
- /** @internal */
1401
- export const CreatePrompt2PromptsType$inboundSchema: z.ZodNativeEnum<
1402
- typeof CreatePrompt2PromptsType
1403
- > = z.nativeEnum(CreatePrompt2PromptsType);
1404
-
1405
- /** @internal */
1406
- export const CreatePrompt2PromptsType$outboundSchema: z.ZodNativeEnum<
1407
- typeof CreatePrompt2PromptsType
1408
- > = CreatePrompt2PromptsType$inboundSchema;
1409
-
1410
- /**
1411
- * @internal
1412
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1413
- */
1414
- export namespace CreatePrompt2PromptsType$ {
1415
- /** @deprecated use `CreatePrompt2PromptsType$inboundSchema` instead. */
1416
- export const inboundSchema = CreatePrompt2PromptsType$inboundSchema;
1417
- /** @deprecated use `CreatePrompt2PromptsType$outboundSchema` instead. */
1418
- export const outboundSchema = CreatePrompt2PromptsType$outboundSchema;
1419
- }
1420
-
1421
- /** @internal */
1422
- export const CreatePrompt2ImageUrl$inboundSchema: z.ZodType<
1423
- CreatePrompt2ImageUrl,
1424
- z.ZodTypeDef,
1425
- unknown
1426
- > = z.object({
1427
- url: z.string(),
1428
- detail: z.string().optional(),
1429
- });
1430
-
1431
- /** @internal */
1432
- export type CreatePrompt2ImageUrl$Outbound = {
1433
- url: string;
1434
- detail?: string | undefined;
1435
- };
1436
-
1437
- /** @internal */
1438
- export const CreatePrompt2ImageUrl$outboundSchema: z.ZodType<
1439
- CreatePrompt2ImageUrl$Outbound,
1440
- z.ZodTypeDef,
1441
- CreatePrompt2ImageUrl
1442
- > = z.object({
1443
- url: z.string(),
1444
- detail: z.string().optional(),
1445
- });
1446
-
1447
- /**
1448
- * @internal
1449
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1450
- */
1451
- export namespace CreatePrompt2ImageUrl$ {
1452
- /** @deprecated use `CreatePrompt2ImageUrl$inboundSchema` instead. */
1453
- export const inboundSchema = CreatePrompt2ImageUrl$inboundSchema;
1454
- /** @deprecated use `CreatePrompt2ImageUrl$outboundSchema` instead. */
1455
- export const outboundSchema = CreatePrompt2ImageUrl$outboundSchema;
1456
- /** @deprecated use `CreatePrompt2ImageUrl$Outbound` instead. */
1457
- export type Outbound = CreatePrompt2ImageUrl$Outbound;
1458
- }
1459
-
1460
- export function createPrompt2ImageUrlToJSON(
1461
- createPrompt2ImageUrl: CreatePrompt2ImageUrl,
1462
- ): string {
1463
- return JSON.stringify(
1464
- CreatePrompt2ImageUrl$outboundSchema.parse(createPrompt2ImageUrl),
1465
- );
1466
- }
1467
-
1468
- export function createPrompt2ImageUrlFromJSON(
1469
- jsonString: string,
1470
- ): SafeParseResult<CreatePrompt2ImageUrl, SDKValidationError> {
1471
- return safeParse(
1472
- jsonString,
1473
- (x) => CreatePrompt2ImageUrl$inboundSchema.parse(JSON.parse(x)),
1474
- `Failed to parse 'CreatePrompt2ImageUrl' from JSON`,
1475
- );
1476
- }
1477
-
1478
- /** @internal */
1479
- export const CreatePrompt22$inboundSchema: z.ZodType<
1480
- CreatePrompt22,
1481
- z.ZodTypeDef,
1482
- unknown
1483
- > = z.object({
1484
- type: CreatePrompt2PromptsType$inboundSchema,
1485
- image_url: z.lazy(() => CreatePrompt2ImageUrl$inboundSchema),
1486
- }).transform((v) => {
1487
- return remap$(v, {
1488
- "image_url": "imageUrl",
1489
- });
1490
- });
1491
-
1492
- /** @internal */
1493
- export type CreatePrompt22$Outbound = {
1494
- type: string;
1495
- image_url: CreatePrompt2ImageUrl$Outbound;
1496
- };
1497
-
1498
- /** @internal */
1499
- export const CreatePrompt22$outboundSchema: z.ZodType<
1500
- CreatePrompt22$Outbound,
1501
- z.ZodTypeDef,
1502
- CreatePrompt22
1503
- > = z.object({
1504
- type: CreatePrompt2PromptsType$outboundSchema,
1505
- imageUrl: z.lazy(() => CreatePrompt2ImageUrl$outboundSchema),
1506
- }).transform((v) => {
1507
- return remap$(v, {
1508
- imageUrl: "image_url",
1509
- });
1510
- });
1511
-
1512
- /**
1513
- * @internal
1514
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1515
- */
1516
- export namespace CreatePrompt22$ {
1517
- /** @deprecated use `CreatePrompt22$inboundSchema` instead. */
1518
- export const inboundSchema = CreatePrompt22$inboundSchema;
1519
- /** @deprecated use `CreatePrompt22$outboundSchema` instead. */
1520
- export const outboundSchema = CreatePrompt22$outboundSchema;
1521
- /** @deprecated use `CreatePrompt22$Outbound` instead. */
1522
- export type Outbound = CreatePrompt22$Outbound;
1523
- }
1524
-
1525
- export function createPrompt22ToJSON(createPrompt22: CreatePrompt22): string {
1526
- return JSON.stringify(CreatePrompt22$outboundSchema.parse(createPrompt22));
1527
- }
1528
-
1529
- export function createPrompt22FromJSON(
1530
- jsonString: string,
1531
- ): SafeParseResult<CreatePrompt22, SDKValidationError> {
1532
- return safeParse(
1533
- jsonString,
1534
- (x) => CreatePrompt22$inboundSchema.parse(JSON.parse(x)),
1535
- `Failed to parse 'CreatePrompt22' from JSON`,
1536
- );
1537
- }
1538
-
1539
- /** @internal */
1540
- export const CreatePrompt2Type$inboundSchema: z.ZodNativeEnum<
1541
- typeof CreatePrompt2Type
1542
- > = z.nativeEnum(CreatePrompt2Type);
1543
-
1544
- /** @internal */
1545
- export const CreatePrompt2Type$outboundSchema: z.ZodNativeEnum<
1546
- typeof CreatePrompt2Type
1547
- > = CreatePrompt2Type$inboundSchema;
1548
-
1549
- /**
1550
- * @internal
1551
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1552
- */
1553
- export namespace CreatePrompt2Type$ {
1554
- /** @deprecated use `CreatePrompt2Type$inboundSchema` instead. */
1555
- export const inboundSchema = CreatePrompt2Type$inboundSchema;
1556
- /** @deprecated use `CreatePrompt2Type$outboundSchema` instead. */
1557
- export const outboundSchema = CreatePrompt2Type$outboundSchema;
1558
- }
1559
-
1560
- /** @internal */
1561
- export const CreatePrompt21$inboundSchema: z.ZodType<
1562
- CreatePrompt21,
1563
- z.ZodTypeDef,
1564
- unknown
1565
- > = z.object({
1566
- type: CreatePrompt2Type$inboundSchema,
1567
- text: z.string(),
1568
- });
1569
-
1570
- /** @internal */
1571
- export type CreatePrompt21$Outbound = {
1572
- type: string;
1573
- text: string;
1574
- };
1575
-
1576
- /** @internal */
1577
- export const CreatePrompt21$outboundSchema: z.ZodType<
1578
- CreatePrompt21$Outbound,
1579
- z.ZodTypeDef,
1580
- CreatePrompt21
1581
- > = z.object({
1582
- type: CreatePrompt2Type$outboundSchema,
1583
- text: z.string(),
1584
- });
1585
-
1586
- /**
1587
- * @internal
1588
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1589
- */
1590
- export namespace CreatePrompt21$ {
1591
- /** @deprecated use `CreatePrompt21$inboundSchema` instead. */
1592
- export const inboundSchema = CreatePrompt21$inboundSchema;
1593
- /** @deprecated use `CreatePrompt21$outboundSchema` instead. */
1594
- export const outboundSchema = CreatePrompt21$outboundSchema;
1595
- /** @deprecated use `CreatePrompt21$Outbound` instead. */
1596
- export type Outbound = CreatePrompt21$Outbound;
1597
- }
1598
-
1599
- export function createPrompt21ToJSON(createPrompt21: CreatePrompt21): string {
1600
- return JSON.stringify(CreatePrompt21$outboundSchema.parse(createPrompt21));
1601
- }
1602
-
1603
- export function createPrompt21FromJSON(
1604
- jsonString: string,
1605
- ): SafeParseResult<CreatePrompt21, SDKValidationError> {
1606
- return safeParse(
1607
- jsonString,
1608
- (x) => CreatePrompt21$inboundSchema.parse(JSON.parse(x)),
1609
- `Failed to parse 'CreatePrompt21' from JSON`,
1610
- );
1611
- }
1612
-
1613
- /** @internal */
1614
- export const CreatePromptContent2$inboundSchema: z.ZodType<
1615
- CreatePromptContent2,
1616
- z.ZodTypeDef,
1617
- unknown
1618
- > = z.union([
1619
- z.lazy(() => CreatePrompt21$inboundSchema),
1620
- z.lazy(() => CreatePrompt22$inboundSchema),
1621
- ]);
1622
-
1623
- /** @internal */
1624
- export type CreatePromptContent2$Outbound =
1625
- | CreatePrompt21$Outbound
1626
- | CreatePrompt22$Outbound;
1627
-
1628
- /** @internal */
1629
- export const CreatePromptContent2$outboundSchema: z.ZodType<
1630
- CreatePromptContent2$Outbound,
1631
- z.ZodTypeDef,
1632
- CreatePromptContent2
1633
- > = z.union([
1634
- z.lazy(() => CreatePrompt21$outboundSchema),
1635
- z.lazy(() => CreatePrompt22$outboundSchema),
1636
- ]);
1637
-
1638
- /**
1639
- * @internal
1640
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1641
- */
1642
- export namespace CreatePromptContent2$ {
1643
- /** @deprecated use `CreatePromptContent2$inboundSchema` instead. */
1644
- export const inboundSchema = CreatePromptContent2$inboundSchema;
1645
- /** @deprecated use `CreatePromptContent2$outboundSchema` instead. */
1646
- export const outboundSchema = CreatePromptContent2$outboundSchema;
1647
- /** @deprecated use `CreatePromptContent2$Outbound` instead. */
1648
- export type Outbound = CreatePromptContent2$Outbound;
1649
- }
1650
-
1651
- export function createPromptContent2ToJSON(
1652
- createPromptContent2: CreatePromptContent2,
1653
- ): string {
1654
- return JSON.stringify(
1655
- CreatePromptContent2$outboundSchema.parse(createPromptContent2),
1656
- );
1657
- }
1658
-
1659
- export function createPromptContent2FromJSON(
1660
- jsonString: string,
1661
- ): SafeParseResult<CreatePromptContent2, SDKValidationError> {
1662
- return safeParse(
1663
- jsonString,
1664
- (x) => CreatePromptContent2$inboundSchema.parse(JSON.parse(x)),
1665
- `Failed to parse 'CreatePromptContent2' from JSON`,
1666
- );
1667
- }
1668
-
1669
- /** @internal */
1670
- export const CreatePromptContent$inboundSchema: z.ZodType<
1671
- CreatePromptContent,
1672
- z.ZodTypeDef,
1673
- unknown
1674
- > = z.union([
1675
- z.string(),
1676
- z.array(z.union([
1677
- z.lazy(() => CreatePrompt21$inboundSchema),
1678
- z.lazy(() => CreatePrompt22$inboundSchema),
1679
- ])),
1680
- ]);
1681
-
1682
- /** @internal */
1683
- export type CreatePromptContent$Outbound =
1684
- | string
1685
- | Array<CreatePrompt21$Outbound | CreatePrompt22$Outbound>;
1686
-
1687
- /** @internal */
1688
- export const CreatePromptContent$outboundSchema: z.ZodType<
1689
- CreatePromptContent$Outbound,
1690
- z.ZodTypeDef,
1691
- CreatePromptContent
1692
- > = z.union([
1693
- z.string(),
1694
- z.array(z.union([
1695
- z.lazy(() => CreatePrompt21$outboundSchema),
1696
- z.lazy(() => CreatePrompt22$outboundSchema),
1697
- ])),
1698
- ]);
1699
-
1700
- /**
1701
- * @internal
1702
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1703
- */
1704
- export namespace CreatePromptContent$ {
1705
- /** @deprecated use `CreatePromptContent$inboundSchema` instead. */
1706
- export const inboundSchema = CreatePromptContent$inboundSchema;
1707
- /** @deprecated use `CreatePromptContent$outboundSchema` instead. */
1708
- export const outboundSchema = CreatePromptContent$outboundSchema;
1709
- /** @deprecated use `CreatePromptContent$Outbound` instead. */
1710
- export type Outbound = CreatePromptContent$Outbound;
1711
- }
1712
-
1713
- export function createPromptContentToJSON(
1714
- createPromptContent: CreatePromptContent,
1715
- ): string {
1716
- return JSON.stringify(
1717
- CreatePromptContent$outboundSchema.parse(createPromptContent),
1718
- );
1719
- }
1720
-
1721
- export function createPromptContentFromJSON(
1722
- jsonString: string,
1723
- ): SafeParseResult<CreatePromptContent, SDKValidationError> {
1724
- return safeParse(
1725
- jsonString,
1726
- (x) => CreatePromptContent$inboundSchema.parse(JSON.parse(x)),
1727
- `Failed to parse 'CreatePromptContent' from JSON`,
1728
- );
1729
- }
1730
-
1731
- /** @internal */
1732
- export const CreatePromptType$inboundSchema: z.ZodNativeEnum<
1733
- typeof CreatePromptType
1734
- > = z.nativeEnum(CreatePromptType);
1735
-
1736
- /** @internal */
1737
- export const CreatePromptType$outboundSchema: z.ZodNativeEnum<
1738
- typeof CreatePromptType
1739
- > = CreatePromptType$inboundSchema;
1740
-
1741
- /**
1742
- * @internal
1743
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1744
- */
1745
- export namespace CreatePromptType$ {
1746
- /** @deprecated use `CreatePromptType$inboundSchema` instead. */
1747
- export const inboundSchema = CreatePromptType$inboundSchema;
1748
- /** @deprecated use `CreatePromptType$outboundSchema` instead. */
1749
- export const outboundSchema = CreatePromptType$outboundSchema;
1750
- }
1751
-
1752
- /** @internal */
1753
- export const CreatePromptFunction$inboundSchema: z.ZodType<
1754
- CreatePromptFunction,
1755
- z.ZodTypeDef,
1756
- unknown
1757
- > = z.object({
1758
- name: z.string(),
1759
- arguments: z.string(),
1760
- });
1761
-
1762
- /** @internal */
1763
- export type CreatePromptFunction$Outbound = {
1764
- name: string;
1765
- arguments: string;
1766
- };
1767
-
1768
- /** @internal */
1769
- export const CreatePromptFunction$outboundSchema: z.ZodType<
1770
- CreatePromptFunction$Outbound,
1771
- z.ZodTypeDef,
1772
- CreatePromptFunction
1773
- > = z.object({
1774
- name: z.string(),
1775
- arguments: z.string(),
1776
- });
1777
-
1778
- /**
1779
- * @internal
1780
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1781
- */
1782
- export namespace CreatePromptFunction$ {
1783
- /** @deprecated use `CreatePromptFunction$inboundSchema` instead. */
1784
- export const inboundSchema = CreatePromptFunction$inboundSchema;
1785
- /** @deprecated use `CreatePromptFunction$outboundSchema` instead. */
1786
- export const outboundSchema = CreatePromptFunction$outboundSchema;
1787
- /** @deprecated use `CreatePromptFunction$Outbound` instead. */
1788
- export type Outbound = CreatePromptFunction$Outbound;
1789
- }
1790
-
1791
- export function createPromptFunctionToJSON(
1792
- createPromptFunction: CreatePromptFunction,
1793
- ): string {
1794
- return JSON.stringify(
1795
- CreatePromptFunction$outboundSchema.parse(createPromptFunction),
1796
- );
1797
- }
1798
-
1799
- export function createPromptFunctionFromJSON(
1800
- jsonString: string,
1801
- ): SafeParseResult<CreatePromptFunction, SDKValidationError> {
1802
- return safeParse(
1803
- jsonString,
1804
- (x) => CreatePromptFunction$inboundSchema.parse(JSON.parse(x)),
1805
- `Failed to parse 'CreatePromptFunction' from JSON`,
1806
- );
1807
- }
1808
-
1809
- /** @internal */
1810
- export const CreatePromptToolCalls$inboundSchema: z.ZodType<
1811
- CreatePromptToolCalls,
1812
- z.ZodTypeDef,
1813
- unknown
1814
- > = z.object({
1815
- id: z.string().optional(),
1816
- index: z.number().optional(),
1817
- type: CreatePromptType$inboundSchema,
1818
- function: z.lazy(() => CreatePromptFunction$inboundSchema),
1819
- });
1820
-
1821
- /** @internal */
1822
- export type CreatePromptToolCalls$Outbound = {
1823
- id?: string | undefined;
1824
- index?: number | undefined;
1825
- type: string;
1826
- function: CreatePromptFunction$Outbound;
1827
- };
1828
-
1829
- /** @internal */
1830
- export const CreatePromptToolCalls$outboundSchema: z.ZodType<
1831
- CreatePromptToolCalls$Outbound,
1832
- z.ZodTypeDef,
1833
- CreatePromptToolCalls
1834
- > = z.object({
1835
- id: z.string().optional(),
1836
- index: z.number().optional(),
1837
- type: CreatePromptType$outboundSchema,
1838
- function: z.lazy(() => CreatePromptFunction$outboundSchema),
1839
- });
1840
-
1841
- /**
1842
- * @internal
1843
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1844
- */
1845
- export namespace CreatePromptToolCalls$ {
1846
- /** @deprecated use `CreatePromptToolCalls$inboundSchema` instead. */
1847
- export const inboundSchema = CreatePromptToolCalls$inboundSchema;
1848
- /** @deprecated use `CreatePromptToolCalls$outboundSchema` instead. */
1849
- export const outboundSchema = CreatePromptToolCalls$outboundSchema;
1850
- /** @deprecated use `CreatePromptToolCalls$Outbound` instead. */
1851
- export type Outbound = CreatePromptToolCalls$Outbound;
1852
- }
1853
-
1854
- export function createPromptToolCallsToJSON(
1855
- createPromptToolCalls: CreatePromptToolCalls,
1856
- ): string {
1857
- return JSON.stringify(
1858
- CreatePromptToolCalls$outboundSchema.parse(createPromptToolCalls),
1859
- );
1860
- }
1861
-
1862
- export function createPromptToolCallsFromJSON(
1863
- jsonString: string,
1864
- ): SafeParseResult<CreatePromptToolCalls, SDKValidationError> {
1865
- return safeParse(
1866
- jsonString,
1867
- (x) => CreatePromptToolCalls$inboundSchema.parse(JSON.parse(x)),
1868
- `Failed to parse 'CreatePromptToolCalls' from JSON`,
1869
- );
1870
- }
1871
-
1872
- /** @internal */
1873
- export const CreatePromptMessages$inboundSchema: z.ZodType<
1874
- CreatePromptMessages,
1875
- z.ZodTypeDef,
1876
- unknown
1877
- > = z.object({
1878
- role: CreatePromptRole$inboundSchema,
1879
- content: z.union([
1880
- z.string(),
1881
- z.array(z.union([
1882
- z.lazy(() => CreatePrompt21$inboundSchema),
1883
- z.lazy(() => CreatePrompt22$inboundSchema),
1884
- ])),
1885
- ]),
1886
- tool_calls: z.array(z.lazy(() => CreatePromptToolCalls$inboundSchema))
1887
- .optional(),
1888
- tool_call_id: z.string().optional(),
1889
- }).transform((v) => {
1890
- return remap$(v, {
1891
- "tool_calls": "toolCalls",
1892
- "tool_call_id": "toolCallId",
1893
- });
1894
- });
1895
-
1896
- /** @internal */
1897
- export type CreatePromptMessages$Outbound = {
1898
- role: string;
1899
- content: string | Array<CreatePrompt21$Outbound | CreatePrompt22$Outbound>;
1900
- tool_calls?: Array<CreatePromptToolCalls$Outbound> | undefined;
1901
- tool_call_id?: string | undefined;
1902
- };
1903
-
1904
- /** @internal */
1905
- export const CreatePromptMessages$outboundSchema: z.ZodType<
1906
- CreatePromptMessages$Outbound,
1907
- z.ZodTypeDef,
1908
- CreatePromptMessages
1909
- > = z.object({
1910
- role: CreatePromptRole$outboundSchema,
1911
- content: z.union([
1912
- z.string(),
1913
- z.array(z.union([
1914
- z.lazy(() => CreatePrompt21$outboundSchema),
1915
- z.lazy(() => CreatePrompt22$outboundSchema),
1916
- ])),
1917
- ]),
1918
- toolCalls: z.array(z.lazy(() => CreatePromptToolCalls$outboundSchema))
1919
- .optional(),
1920
- toolCallId: z.string().optional(),
1921
- }).transform((v) => {
1922
- return remap$(v, {
1923
- toolCalls: "tool_calls",
1924
- toolCallId: "tool_call_id",
1925
- });
1926
- });
1927
-
1928
- /**
1929
- * @internal
1930
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1931
- */
1932
- export namespace CreatePromptMessages$ {
1933
- /** @deprecated use `CreatePromptMessages$inboundSchema` instead. */
1934
- export const inboundSchema = CreatePromptMessages$inboundSchema;
1935
- /** @deprecated use `CreatePromptMessages$outboundSchema` instead. */
1936
- export const outboundSchema = CreatePromptMessages$outboundSchema;
1937
- /** @deprecated use `CreatePromptMessages$Outbound` instead. */
1938
- export type Outbound = CreatePromptMessages$Outbound;
1939
- }
1940
-
1941
- export function createPromptMessagesToJSON(
1942
- createPromptMessages: CreatePromptMessages,
1943
- ): string {
1944
- return JSON.stringify(
1945
- CreatePromptMessages$outboundSchema.parse(createPromptMessages),
1946
- );
1947
- }
1948
-
1949
- export function createPromptMessagesFromJSON(
1950
- jsonString: string,
1951
- ): SafeParseResult<CreatePromptMessages, SDKValidationError> {
1952
- return safeParse(
1953
- jsonString,
1954
- (x) => CreatePromptMessages$inboundSchema.parse(JSON.parse(x)),
1955
- `Failed to parse 'CreatePromptMessages' from JSON`,
1956
- );
1957
- }
1958
-
1959
- /** @internal */
1960
- export const PromptConfig$inboundSchema: z.ZodType<
1961
- PromptConfig,
1962
- z.ZodTypeDef,
1963
- unknown
1964
- > = z.object({
1965
- stream: z.boolean().optional(),
1966
- model: z.string().optional(),
1967
- model_type: ModelType$inboundSchema.optional(),
1968
- model_parameters: z.lazy(() => ModelParameters$inboundSchema).optional(),
1969
- provider: Provider$inboundSchema.optional(),
1970
- version: z.string().optional(),
1971
- messages: z.array(z.lazy(() => CreatePromptMessages$inboundSchema)),
1972
- }).transform((v) => {
1973
- return remap$(v, {
1974
- "model_type": "modelType",
1975
- "model_parameters": "modelParameters",
1976
- });
1977
- });
1978
-
1979
- /** @internal */
1980
- export type PromptConfig$Outbound = {
1981
- stream?: boolean | undefined;
1982
- model?: string | undefined;
1983
- model_type?: string | undefined;
1984
- model_parameters?: ModelParameters$Outbound | undefined;
1985
- provider?: string | undefined;
1986
- version?: string | undefined;
1987
- messages: Array<CreatePromptMessages$Outbound>;
1988
- };
1989
-
1990
- /** @internal */
1991
- export const PromptConfig$outboundSchema: z.ZodType<
1992
- PromptConfig$Outbound,
1993
- z.ZodTypeDef,
1994
- PromptConfig
1995
- > = z.object({
1996
- stream: z.boolean().optional(),
1997
- model: z.string().optional(),
1998
- modelType: ModelType$outboundSchema.optional(),
1999
- modelParameters: z.lazy(() => ModelParameters$outboundSchema).optional(),
2000
- provider: Provider$outboundSchema.optional(),
2001
- version: z.string().optional(),
2002
- messages: z.array(z.lazy(() => CreatePromptMessages$outboundSchema)),
2003
- }).transform((v) => {
2004
- return remap$(v, {
2005
- modelType: "model_type",
2006
- modelParameters: "model_parameters",
2007
- });
2008
- });
2009
-
2010
- /**
2011
- * @internal
2012
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2013
- */
2014
- export namespace PromptConfig$ {
2015
- /** @deprecated use `PromptConfig$inboundSchema` instead. */
2016
- export const inboundSchema = PromptConfig$inboundSchema;
2017
- /** @deprecated use `PromptConfig$outboundSchema` instead. */
2018
- export const outboundSchema = PromptConfig$outboundSchema;
2019
- /** @deprecated use `PromptConfig$Outbound` instead. */
2020
- export type Outbound = PromptConfig$Outbound;
2021
- }
2022
-
2023
- export function promptConfigToJSON(promptConfig: PromptConfig): string {
2024
- return JSON.stringify(PromptConfig$outboundSchema.parse(promptConfig));
2025
- }
2026
-
2027
- export function promptConfigFromJSON(
2028
- jsonString: string,
2029
- ): SafeParseResult<PromptConfig, SDKValidationError> {
2030
- return safeParse(
2031
- jsonString,
2032
- (x) => PromptConfig$inboundSchema.parse(JSON.parse(x)),
2033
- `Failed to parse 'PromptConfig' from JSON`,
2034
- );
2035
- }
2036
-
2037
- /** @internal */
2038
- export const UseCases$inboundSchema: z.ZodNativeEnum<typeof UseCases> = z
2039
- .nativeEnum(UseCases);
2040
-
2041
- /** @internal */
2042
- export const UseCases$outboundSchema: z.ZodNativeEnum<typeof UseCases> =
2043
- UseCases$inboundSchema;
2044
-
2045
- /**
2046
- * @internal
2047
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2048
- */
2049
- export namespace UseCases$ {
2050
- /** @deprecated use `UseCases$inboundSchema` instead. */
2051
- export const inboundSchema = UseCases$inboundSchema;
2052
- /** @deprecated use `UseCases$outboundSchema` instead. */
2053
- export const outboundSchema = UseCases$outboundSchema;
2054
- }
2055
-
2056
- /** @internal */
2057
- export const Language$inboundSchema: z.ZodNativeEnum<typeof Language> = z
2058
- .nativeEnum(Language);
2059
-
2060
- /** @internal */
2061
- export const Language$outboundSchema: z.ZodNativeEnum<typeof Language> =
2062
- Language$inboundSchema;
2063
-
2064
- /**
2065
- * @internal
2066
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2067
- */
2068
- export namespace Language$ {
2069
- /** @deprecated use `Language$inboundSchema` instead. */
2070
- export const inboundSchema = Language$inboundSchema;
2071
- /** @deprecated use `Language$outboundSchema` instead. */
2072
- export const outboundSchema = Language$outboundSchema;
2073
- }
2074
-
2075
- /** @internal */
2076
- export const CreatePromptMetadata$inboundSchema: z.ZodType<
2077
- CreatePromptMetadata,
2078
- z.ZodTypeDef,
2079
- unknown
2080
- > = z.object({
2081
- use_cases: z.array(UseCases$inboundSchema).optional(),
2082
- language: z.nullable(Language$inboundSchema).optional(),
2083
- }).transform((v) => {
2084
- return remap$(v, {
2085
- "use_cases": "useCases",
2086
- });
2087
- });
2088
-
2089
- /** @internal */
2090
- export type CreatePromptMetadata$Outbound = {
2091
- use_cases?: Array<string> | undefined;
2092
- language?: string | null | undefined;
2093
- };
2094
-
2095
- /** @internal */
2096
- export const CreatePromptMetadata$outboundSchema: z.ZodType<
2097
- CreatePromptMetadata$Outbound,
2098
- z.ZodTypeDef,
2099
- CreatePromptMetadata
2100
- > = z.object({
2101
- useCases: z.array(UseCases$outboundSchema).optional(),
2102
- language: z.nullable(Language$outboundSchema).optional(),
2103
- }).transform((v) => {
2104
- return remap$(v, {
2105
- useCases: "use_cases",
2106
- });
2107
- });
2108
-
2109
- /**
2110
- * @internal
2111
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2112
- */
2113
- export namespace CreatePromptMetadata$ {
2114
- /** @deprecated use `CreatePromptMetadata$inboundSchema` instead. */
2115
- export const inboundSchema = CreatePromptMetadata$inboundSchema;
2116
- /** @deprecated use `CreatePromptMetadata$outboundSchema` instead. */
2117
- export const outboundSchema = CreatePromptMetadata$outboundSchema;
2118
- /** @deprecated use `CreatePromptMetadata$Outbound` instead. */
2119
- export type Outbound = CreatePromptMetadata$Outbound;
2120
- }
2121
-
2122
- export function createPromptMetadataToJSON(
2123
- createPromptMetadata: CreatePromptMetadata,
2124
- ): string {
2125
- return JSON.stringify(
2126
- CreatePromptMetadata$outboundSchema.parse(createPromptMetadata),
2127
- );
2128
- }
2129
-
2130
- export function createPromptMetadataFromJSON(
2131
- jsonString: string,
2132
- ): SafeParseResult<CreatePromptMetadata, SDKValidationError> {
2133
- return safeParse(
2134
- jsonString,
2135
- (x) => CreatePromptMetadata$inboundSchema.parse(JSON.parse(x)),
2136
- `Failed to parse 'CreatePromptMetadata' from JSON`,
2137
- );
2138
- }
2139
-
2140
- /** @internal */
2141
- export const CreatePromptRequestBody$inboundSchema: z.ZodType<
2142
- CreatePromptRequestBody,
2143
- z.ZodTypeDef,
2144
- unknown
2145
- > = z.object({
2146
- display_name: z.string(),
2147
- description: z.nullable(z.string()).optional(),
2148
- prompt_config: z.lazy(() => PromptConfig$inboundSchema),
2149
- metadata: z.lazy(() => CreatePromptMetadata$inboundSchema).optional(),
2150
- path: z.string(),
2151
- }).transform((v) => {
2152
- return remap$(v, {
2153
- "display_name": "displayName",
2154
- "prompt_config": "promptConfig",
2155
- });
2156
- });
2157
-
2158
- /** @internal */
2159
- export type CreatePromptRequestBody$Outbound = {
2160
- display_name: string;
2161
- description?: string | null | undefined;
2162
- prompt_config: PromptConfig$Outbound;
2163
- metadata?: CreatePromptMetadata$Outbound | undefined;
2164
- path: string;
2165
- };
2166
-
2167
- /** @internal */
2168
- export const CreatePromptRequestBody$outboundSchema: z.ZodType<
2169
- CreatePromptRequestBody$Outbound,
2170
- z.ZodTypeDef,
2171
- CreatePromptRequestBody
2172
- > = z.object({
2173
- displayName: z.string(),
2174
- description: z.nullable(z.string()).optional(),
2175
- promptConfig: z.lazy(() => PromptConfig$outboundSchema),
2176
- metadata: z.lazy(() => CreatePromptMetadata$outboundSchema).optional(),
2177
- path: z.string(),
2178
- }).transform((v) => {
2179
- return remap$(v, {
2180
- displayName: "display_name",
2181
- promptConfig: "prompt_config",
2182
- });
2183
- });
2184
-
2185
- /**
2186
- * @internal
2187
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2188
- */
2189
- export namespace CreatePromptRequestBody$ {
2190
- /** @deprecated use `CreatePromptRequestBody$inboundSchema` instead. */
2191
- export const inboundSchema = CreatePromptRequestBody$inboundSchema;
2192
- /** @deprecated use `CreatePromptRequestBody$outboundSchema` instead. */
2193
- export const outboundSchema = CreatePromptRequestBody$outboundSchema;
2194
- /** @deprecated use `CreatePromptRequestBody$Outbound` instead. */
2195
- export type Outbound = CreatePromptRequestBody$Outbound;
2196
- }
2197
-
2198
- export function createPromptRequestBodyToJSON(
2199
- createPromptRequestBody: CreatePromptRequestBody,
2200
- ): string {
2201
- return JSON.stringify(
2202
- CreatePromptRequestBody$outboundSchema.parse(createPromptRequestBody),
2203
- );
2204
- }
2205
-
2206
- export function createPromptRequestBodyFromJSON(
2207
- jsonString: string,
2208
- ): SafeParseResult<CreatePromptRequestBody, SDKValidationError> {
2209
- return safeParse(
2210
- jsonString,
2211
- (x) => CreatePromptRequestBody$inboundSchema.parse(JSON.parse(x)),
2212
- `Failed to parse 'CreatePromptRequestBody' from JSON`,
2213
- );
2214
- }
2215
-
2216
- /** @internal */
2217
- export const CreatePromptPromptsType$inboundSchema: z.ZodNativeEnum<
2218
- typeof CreatePromptPromptsType
2219
- > = z.nativeEnum(CreatePromptPromptsType);
2220
-
2221
- /** @internal */
2222
- export const CreatePromptPromptsType$outboundSchema: z.ZodNativeEnum<
2223
- typeof CreatePromptPromptsType
2224
- > = CreatePromptPromptsType$inboundSchema;
2225
-
2226
- /**
2227
- * @internal
2228
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2229
- */
2230
- export namespace CreatePromptPromptsType$ {
2231
- /** @deprecated use `CreatePromptPromptsType$inboundSchema` instead. */
2232
- export const inboundSchema = CreatePromptPromptsType$inboundSchema;
2233
- /** @deprecated use `CreatePromptPromptsType$outboundSchema` instead. */
2234
- export const outboundSchema = CreatePromptPromptsType$outboundSchema;
2235
- }
2236
-
2237
- /** @internal */
2238
- export const CreatePromptModelType$inboundSchema: z.ZodNativeEnum<
2239
- typeof CreatePromptModelType
2240
- > = z.nativeEnum(CreatePromptModelType);
2241
-
2242
- /** @internal */
2243
- export const CreatePromptModelType$outboundSchema: z.ZodNativeEnum<
2244
- typeof CreatePromptModelType
2245
- > = CreatePromptModelType$inboundSchema;
2246
-
2247
- /**
2248
- * @internal
2249
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2250
- */
2251
- export namespace CreatePromptModelType$ {
2252
- /** @deprecated use `CreatePromptModelType$inboundSchema` instead. */
2253
- export const inboundSchema = CreatePromptModelType$inboundSchema;
2254
- /** @deprecated use `CreatePromptModelType$outboundSchema` instead. */
2255
- export const outboundSchema = CreatePromptModelType$outboundSchema;
2256
- }
2257
-
2258
- /** @internal */
2259
- export const CreatePromptPromptsFormat$inboundSchema: z.ZodNativeEnum<
2260
- typeof CreatePromptPromptsFormat
2261
- > = z.nativeEnum(CreatePromptPromptsFormat);
2262
-
2263
- /** @internal */
2264
- export const CreatePromptPromptsFormat$outboundSchema: z.ZodNativeEnum<
2265
- typeof CreatePromptPromptsFormat
2266
- > = CreatePromptPromptsFormat$inboundSchema;
2267
-
2268
- /**
2269
- * @internal
2270
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2271
- */
2272
- export namespace CreatePromptPromptsFormat$ {
2273
- /** @deprecated use `CreatePromptPromptsFormat$inboundSchema` instead. */
2274
- export const inboundSchema = CreatePromptPromptsFormat$inboundSchema;
2275
- /** @deprecated use `CreatePromptPromptsFormat$outboundSchema` instead. */
2276
- export const outboundSchema = CreatePromptPromptsFormat$outboundSchema;
2277
- }
2278
-
2279
- /** @internal */
2280
- export const CreatePromptResponseFormatPromptsResponseType$inboundSchema:
2281
- z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsResponseType> = z
2282
- .nativeEnum(CreatePromptResponseFormatPromptsResponseType);
2283
-
2284
- /** @internal */
2285
- export const CreatePromptResponseFormatPromptsResponseType$outboundSchema:
2286
- z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsResponseType> =
2287
- CreatePromptResponseFormatPromptsResponseType$inboundSchema;
2288
-
2289
- /**
2290
- * @internal
2291
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2292
- */
2293
- export namespace CreatePromptResponseFormatPromptsResponseType$ {
2294
- /** @deprecated use `CreatePromptResponseFormatPromptsResponseType$inboundSchema` instead. */
2295
- export const inboundSchema =
2296
- CreatePromptResponseFormatPromptsResponseType$inboundSchema;
2297
- /** @deprecated use `CreatePromptResponseFormatPromptsResponseType$outboundSchema` instead. */
2298
- export const outboundSchema =
2299
- CreatePromptResponseFormatPromptsResponseType$outboundSchema;
2300
- }
2301
-
2302
- /** @internal */
2303
- export const CreatePromptResponseFormat2$inboundSchema: z.ZodType<
2304
- CreatePromptResponseFormat2,
2305
- z.ZodTypeDef,
2306
- unknown
2307
- > = z.object({
2308
- type: CreatePromptResponseFormatPromptsResponseType$inboundSchema,
2309
- });
2310
-
2311
- /** @internal */
2312
- export type CreatePromptResponseFormat2$Outbound = {
2313
- type: string;
2314
- };
2315
-
2316
- /** @internal */
2317
- export const CreatePromptResponseFormat2$outboundSchema: z.ZodType<
2318
- CreatePromptResponseFormat2$Outbound,
2319
- z.ZodTypeDef,
2320
- CreatePromptResponseFormat2
2321
- > = z.object({
2322
- type: CreatePromptResponseFormatPromptsResponseType$outboundSchema,
2323
- });
2324
-
2325
- /**
2326
- * @internal
2327
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2328
- */
2329
- export namespace CreatePromptResponseFormat2$ {
2330
- /** @deprecated use `CreatePromptResponseFormat2$inboundSchema` instead. */
2331
- export const inboundSchema = CreatePromptResponseFormat2$inboundSchema;
2332
- /** @deprecated use `CreatePromptResponseFormat2$outboundSchema` instead. */
2333
- export const outboundSchema = CreatePromptResponseFormat2$outboundSchema;
2334
- /** @deprecated use `CreatePromptResponseFormat2$Outbound` instead. */
2335
- export type Outbound = CreatePromptResponseFormat2$Outbound;
2336
- }
2337
-
2338
- export function createPromptResponseFormat2ToJSON(
2339
- createPromptResponseFormat2: CreatePromptResponseFormat2,
2340
- ): string {
2341
- return JSON.stringify(
2342
- CreatePromptResponseFormat2$outboundSchema.parse(
2343
- createPromptResponseFormat2,
2344
- ),
2345
- );
2346
- }
2347
-
2348
- export function createPromptResponseFormat2FromJSON(
2349
- jsonString: string,
2350
- ): SafeParseResult<CreatePromptResponseFormat2, SDKValidationError> {
2351
- return safeParse(
2352
- jsonString,
2353
- (x) => CreatePromptResponseFormat2$inboundSchema.parse(JSON.parse(x)),
2354
- `Failed to parse 'CreatePromptResponseFormat2' from JSON`,
2355
- );
2356
- }
2357
-
2358
- /** @internal */
2359
- export const CreatePromptResponseFormatPromptsType$inboundSchema:
2360
- z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsType> = z.nativeEnum(
2361
- CreatePromptResponseFormatPromptsType,
2362
- );
2363
-
2364
- /** @internal */
2365
- export const CreatePromptResponseFormatPromptsType$outboundSchema:
2366
- z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsType> =
2367
- CreatePromptResponseFormatPromptsType$inboundSchema;
2368
-
2369
- /**
2370
- * @internal
2371
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2372
- */
2373
- export namespace CreatePromptResponseFormatPromptsType$ {
2374
- /** @deprecated use `CreatePromptResponseFormatPromptsType$inboundSchema` instead. */
2375
- export const inboundSchema =
2376
- CreatePromptResponseFormatPromptsType$inboundSchema;
2377
- /** @deprecated use `CreatePromptResponseFormatPromptsType$outboundSchema` instead. */
2378
- export const outboundSchema =
2379
- CreatePromptResponseFormatPromptsType$outboundSchema;
2380
- }
2381
-
2382
- /** @internal */
2383
- export const CreatePromptResponseFormatJsonSchema$inboundSchema: z.ZodType<
2384
- CreatePromptResponseFormatJsonSchema,
2385
- z.ZodTypeDef,
2386
- unknown
2387
- > = z.object({
2388
- name: z.string(),
2389
- strict: z.boolean(),
2390
- schema: z.record(z.any()),
2391
- });
2392
-
2393
- /** @internal */
2394
- export type CreatePromptResponseFormatJsonSchema$Outbound = {
2395
- name: string;
2396
- strict: boolean;
2397
- schema: { [k: string]: any };
2398
- };
2399
-
2400
- /** @internal */
2401
- export const CreatePromptResponseFormatJsonSchema$outboundSchema: z.ZodType<
2402
- CreatePromptResponseFormatJsonSchema$Outbound,
2403
- z.ZodTypeDef,
2404
- CreatePromptResponseFormatJsonSchema
2405
- > = z.object({
2406
- name: z.string(),
2407
- strict: z.boolean(),
2408
- schema: z.record(z.any()),
2409
- });
2410
-
2411
- /**
2412
- * @internal
2413
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2414
- */
2415
- export namespace CreatePromptResponseFormatJsonSchema$ {
2416
- /** @deprecated use `CreatePromptResponseFormatJsonSchema$inboundSchema` instead. */
2417
- export const inboundSchema =
2418
- CreatePromptResponseFormatJsonSchema$inboundSchema;
2419
- /** @deprecated use `CreatePromptResponseFormatJsonSchema$outboundSchema` instead. */
2420
- export const outboundSchema =
2421
- CreatePromptResponseFormatJsonSchema$outboundSchema;
2422
- /** @deprecated use `CreatePromptResponseFormatJsonSchema$Outbound` instead. */
2423
- export type Outbound = CreatePromptResponseFormatJsonSchema$Outbound;
2424
- }
2425
-
2426
- export function createPromptResponseFormatJsonSchemaToJSON(
2427
- createPromptResponseFormatJsonSchema: CreatePromptResponseFormatJsonSchema,
2428
- ): string {
2429
- return JSON.stringify(
2430
- CreatePromptResponseFormatJsonSchema$outboundSchema.parse(
2431
- createPromptResponseFormatJsonSchema,
2432
- ),
2433
- );
2434
- }
2435
-
2436
- export function createPromptResponseFormatJsonSchemaFromJSON(
2437
- jsonString: string,
2438
- ): SafeParseResult<CreatePromptResponseFormatJsonSchema, SDKValidationError> {
2439
- return safeParse(
2440
- jsonString,
2441
- (x) =>
2442
- CreatePromptResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)),
2443
- `Failed to parse 'CreatePromptResponseFormatJsonSchema' from JSON`,
2444
- );
2445
- }
2446
-
2447
- /** @internal */
2448
- export const CreatePromptResponseFormat1$inboundSchema: z.ZodType<
2449
- CreatePromptResponseFormat1,
2450
- z.ZodTypeDef,
2451
- unknown
2452
- > = z.object({
2453
- type: CreatePromptResponseFormatPromptsType$inboundSchema,
2454
- json_schema: z.lazy(() => CreatePromptResponseFormatJsonSchema$inboundSchema),
2455
- }).transform((v) => {
2456
- return remap$(v, {
2457
- "json_schema": "jsonSchema",
2458
- });
2459
- });
2460
-
2461
- /** @internal */
2462
- export type CreatePromptResponseFormat1$Outbound = {
2463
- type: string;
2464
- json_schema: CreatePromptResponseFormatJsonSchema$Outbound;
2465
- };
2466
-
2467
- /** @internal */
2468
- export const CreatePromptResponseFormat1$outboundSchema: z.ZodType<
2469
- CreatePromptResponseFormat1$Outbound,
2470
- z.ZodTypeDef,
2471
- CreatePromptResponseFormat1
2472
- > = z.object({
2473
- type: CreatePromptResponseFormatPromptsType$outboundSchema,
2474
- jsonSchema: z.lazy(() => CreatePromptResponseFormatJsonSchema$outboundSchema),
2475
- }).transform((v) => {
2476
- return remap$(v, {
2477
- jsonSchema: "json_schema",
2478
- });
2479
- });
2480
-
2481
- /**
2482
- * @internal
2483
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2484
- */
2485
- export namespace CreatePromptResponseFormat1$ {
2486
- /** @deprecated use `CreatePromptResponseFormat1$inboundSchema` instead. */
2487
- export const inboundSchema = CreatePromptResponseFormat1$inboundSchema;
2488
- /** @deprecated use `CreatePromptResponseFormat1$outboundSchema` instead. */
2489
- export const outboundSchema = CreatePromptResponseFormat1$outboundSchema;
2490
- /** @deprecated use `CreatePromptResponseFormat1$Outbound` instead. */
2491
- export type Outbound = CreatePromptResponseFormat1$Outbound;
2492
- }
2493
-
2494
- export function createPromptResponseFormat1ToJSON(
2495
- createPromptResponseFormat1: CreatePromptResponseFormat1,
2496
- ): string {
2497
- return JSON.stringify(
2498
- CreatePromptResponseFormat1$outboundSchema.parse(
2499
- createPromptResponseFormat1,
2500
- ),
2501
- );
2502
- }
2503
-
2504
- export function createPromptResponseFormat1FromJSON(
2505
- jsonString: string,
2506
- ): SafeParseResult<CreatePromptResponseFormat1, SDKValidationError> {
2507
- return safeParse(
2508
- jsonString,
2509
- (x) => CreatePromptResponseFormat1$inboundSchema.parse(JSON.parse(x)),
2510
- `Failed to parse 'CreatePromptResponseFormat1' from JSON`,
2511
- );
2512
- }
2513
-
2514
- /** @internal */
2515
- export const CreatePromptResponseFormat$inboundSchema: z.ZodType<
2516
- CreatePromptResponseFormat,
2517
- z.ZodTypeDef,
2518
- unknown
2519
- > = z.union([
2520
- z.lazy(() => CreatePromptResponseFormat2$inboundSchema),
2521
- z.lazy(() => CreatePromptResponseFormat1$inboundSchema),
2522
- ]);
2523
-
2524
- /** @internal */
2525
- export type CreatePromptResponseFormat$Outbound =
2526
- | CreatePromptResponseFormat2$Outbound
2527
- | CreatePromptResponseFormat1$Outbound;
2528
-
2529
- /** @internal */
2530
- export const CreatePromptResponseFormat$outboundSchema: z.ZodType<
2531
- CreatePromptResponseFormat$Outbound,
2532
- z.ZodTypeDef,
2533
- CreatePromptResponseFormat
2534
- > = z.union([
2535
- z.lazy(() => CreatePromptResponseFormat2$outboundSchema),
2536
- z.lazy(() => CreatePromptResponseFormat1$outboundSchema),
2537
- ]);
2538
-
2539
- /**
2540
- * @internal
2541
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2542
- */
2543
- export namespace CreatePromptResponseFormat$ {
2544
- /** @deprecated use `CreatePromptResponseFormat$inboundSchema` instead. */
2545
- export const inboundSchema = CreatePromptResponseFormat$inboundSchema;
2546
- /** @deprecated use `CreatePromptResponseFormat$outboundSchema` instead. */
2547
- export const outboundSchema = CreatePromptResponseFormat$outboundSchema;
2548
- /** @deprecated use `CreatePromptResponseFormat$Outbound` instead. */
2549
- export type Outbound = CreatePromptResponseFormat$Outbound;
2550
- }
2551
-
2552
- export function createPromptResponseFormatToJSON(
2553
- createPromptResponseFormat: CreatePromptResponseFormat,
2554
- ): string {
2555
- return JSON.stringify(
2556
- CreatePromptResponseFormat$outboundSchema.parse(createPromptResponseFormat),
2557
- );
2558
- }
2559
-
2560
- export function createPromptResponseFormatFromJSON(
2561
- jsonString: string,
2562
- ): SafeParseResult<CreatePromptResponseFormat, SDKValidationError> {
2563
- return safeParse(
2564
- jsonString,
2565
- (x) => CreatePromptResponseFormat$inboundSchema.parse(JSON.parse(x)),
2566
- `Failed to parse 'CreatePromptResponseFormat' from JSON`,
2567
- );
2568
- }
2569
-
2570
- /** @internal */
2571
- export const CreatePromptPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
2572
- typeof CreatePromptPhotoRealVersion
2573
- > = z.nativeEnum(CreatePromptPhotoRealVersion);
2574
-
2575
- /** @internal */
2576
- export const CreatePromptPhotoRealVersion$outboundSchema: z.ZodNativeEnum<
2577
- typeof CreatePromptPhotoRealVersion
2578
- > = CreatePromptPhotoRealVersion$inboundSchema;
2579
-
2580
- /**
2581
- * @internal
2582
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2583
- */
2584
- export namespace CreatePromptPhotoRealVersion$ {
2585
- /** @deprecated use `CreatePromptPhotoRealVersion$inboundSchema` instead. */
2586
- export const inboundSchema = CreatePromptPhotoRealVersion$inboundSchema;
2587
- /** @deprecated use `CreatePromptPhotoRealVersion$outboundSchema` instead. */
2588
- export const outboundSchema = CreatePromptPhotoRealVersion$outboundSchema;
2589
- }
2590
-
2591
- /** @internal */
2592
- export const CreatePromptEncodingFormat$inboundSchema: z.ZodNativeEnum<
2593
- typeof CreatePromptEncodingFormat
2594
- > = z.nativeEnum(CreatePromptEncodingFormat);
2595
-
2596
- /** @internal */
2597
- export const CreatePromptEncodingFormat$outboundSchema: z.ZodNativeEnum<
2598
- typeof CreatePromptEncodingFormat
2599
- > = CreatePromptEncodingFormat$inboundSchema;
2600
-
2601
- /**
2602
- * @internal
2603
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2604
- */
2605
- export namespace CreatePromptEncodingFormat$ {
2606
- /** @deprecated use `CreatePromptEncodingFormat$inboundSchema` instead. */
2607
- export const inboundSchema = CreatePromptEncodingFormat$inboundSchema;
2608
- /** @deprecated use `CreatePromptEncodingFormat$outboundSchema` instead. */
2609
- export const outboundSchema = CreatePromptEncodingFormat$outboundSchema;
2610
- }
2611
-
2612
- /** @internal */
2613
- export const CreatePromptReasoningEffort$inboundSchema: z.ZodNativeEnum<
2614
- typeof CreatePromptReasoningEffort
2615
- > = z.nativeEnum(CreatePromptReasoningEffort);
2616
-
2617
- /** @internal */
2618
- export const CreatePromptReasoningEffort$outboundSchema: z.ZodNativeEnum<
2619
- typeof CreatePromptReasoningEffort
2620
- > = CreatePromptReasoningEffort$inboundSchema;
2621
-
2622
- /**
2623
- * @internal
2624
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2625
- */
2626
- export namespace CreatePromptReasoningEffort$ {
2627
- /** @deprecated use `CreatePromptReasoningEffort$inboundSchema` instead. */
2628
- export const inboundSchema = CreatePromptReasoningEffort$inboundSchema;
2629
- /** @deprecated use `CreatePromptReasoningEffort$outboundSchema` instead. */
2630
- export const outboundSchema = CreatePromptReasoningEffort$outboundSchema;
2631
- }
2632
-
2633
- /** @internal */
2634
- export const CreatePromptModelParameters$inboundSchema: z.ZodType<
2635
- CreatePromptModelParameters,
2636
- z.ZodTypeDef,
2637
- unknown
2638
- > = z.object({
2639
- temperature: z.number().optional(),
2640
- maxTokens: z.number().optional(),
2641
- topK: z.number().optional(),
2642
- topP: z.number().optional(),
2643
- frequencyPenalty: z.number().optional(),
2644
- presencePenalty: z.number().optional(),
2645
- numImages: z.number().optional(),
2646
- seed: z.number().optional(),
2647
- format: CreatePromptPromptsFormat$inboundSchema.optional(),
2648
- dimensions: z.string().optional(),
2649
- quality: z.string().optional(),
2650
- style: z.string().optional(),
2651
- responseFormat: z.nullable(
2652
- z.union([
2653
- z.lazy(() => CreatePromptResponseFormat2$inboundSchema),
2654
- z.lazy(() => CreatePromptResponseFormat1$inboundSchema),
2655
- ]),
2656
- ).optional(),
2657
- photoRealVersion: CreatePromptPhotoRealVersion$inboundSchema.optional(),
2658
- encoding_format: CreatePromptEncodingFormat$inboundSchema.optional(),
2659
- reasoningEffort: CreatePromptReasoningEffort$inboundSchema.optional(),
2660
- budgetTokens: z.number().optional(),
2661
- }).transform((v) => {
2662
- return remap$(v, {
2663
- "encoding_format": "encodingFormat",
2664
- });
2665
- });
2666
-
2667
- /** @internal */
2668
- export type CreatePromptModelParameters$Outbound = {
2669
- temperature?: number | undefined;
2670
- maxTokens?: number | undefined;
2671
- topK?: number | undefined;
2672
- topP?: number | undefined;
2673
- frequencyPenalty?: number | undefined;
2674
- presencePenalty?: number | undefined;
2675
- numImages?: number | undefined;
2676
- seed?: number | undefined;
2677
- format?: string | undefined;
2678
- dimensions?: string | undefined;
2679
- quality?: string | undefined;
2680
- style?: string | undefined;
2681
- responseFormat?:
2682
- | CreatePromptResponseFormat2$Outbound
2683
- | CreatePromptResponseFormat1$Outbound
2684
- | null
2685
- | undefined;
2686
- photoRealVersion?: string | undefined;
2687
- encoding_format?: string | undefined;
2688
- reasoningEffort?: string | undefined;
2689
- budgetTokens?: number | undefined;
2690
- };
2691
-
2692
- /** @internal */
2693
- export const CreatePromptModelParameters$outboundSchema: z.ZodType<
2694
- CreatePromptModelParameters$Outbound,
2695
- z.ZodTypeDef,
2696
- CreatePromptModelParameters
2697
- > = z.object({
2698
- temperature: z.number().optional(),
2699
- maxTokens: z.number().optional(),
2700
- topK: z.number().optional(),
2701
- topP: z.number().optional(),
2702
- frequencyPenalty: z.number().optional(),
2703
- presencePenalty: z.number().optional(),
2704
- numImages: z.number().optional(),
2705
- seed: z.number().optional(),
2706
- format: CreatePromptPromptsFormat$outboundSchema.optional(),
2707
- dimensions: z.string().optional(),
2708
- quality: z.string().optional(),
2709
- style: z.string().optional(),
2710
- responseFormat: z.nullable(
2711
- z.union([
2712
- z.lazy(() => CreatePromptResponseFormat2$outboundSchema),
2713
- z.lazy(() => CreatePromptResponseFormat1$outboundSchema),
2714
- ]),
2715
- ).optional(),
2716
- photoRealVersion: CreatePromptPhotoRealVersion$outboundSchema.optional(),
2717
- encodingFormat: CreatePromptEncodingFormat$outboundSchema.optional(),
2718
- reasoningEffort: CreatePromptReasoningEffort$outboundSchema.optional(),
2719
- budgetTokens: z.number().optional(),
2720
- }).transform((v) => {
2721
- return remap$(v, {
2722
- encodingFormat: "encoding_format",
2723
- });
2724
- });
2725
-
2726
- /**
2727
- * @internal
2728
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2729
- */
2730
- export namespace CreatePromptModelParameters$ {
2731
- /** @deprecated use `CreatePromptModelParameters$inboundSchema` instead. */
2732
- export const inboundSchema = CreatePromptModelParameters$inboundSchema;
2733
- /** @deprecated use `CreatePromptModelParameters$outboundSchema` instead. */
2734
- export const outboundSchema = CreatePromptModelParameters$outboundSchema;
2735
- /** @deprecated use `CreatePromptModelParameters$Outbound` instead. */
2736
- export type Outbound = CreatePromptModelParameters$Outbound;
2737
- }
2738
-
2739
- export function createPromptModelParametersToJSON(
2740
- createPromptModelParameters: CreatePromptModelParameters,
2741
- ): string {
2742
- return JSON.stringify(
2743
- CreatePromptModelParameters$outboundSchema.parse(
2744
- createPromptModelParameters,
2745
- ),
2746
- );
2747
- }
2748
-
2749
- export function createPromptModelParametersFromJSON(
2750
- jsonString: string,
2751
- ): SafeParseResult<CreatePromptModelParameters, SDKValidationError> {
2752
- return safeParse(
2753
- jsonString,
2754
- (x) => CreatePromptModelParameters$inboundSchema.parse(JSON.parse(x)),
2755
- `Failed to parse 'CreatePromptModelParameters' from JSON`,
2756
- );
2757
- }
2758
-
2759
- /** @internal */
2760
- export const CreatePromptProvider$inboundSchema: z.ZodNativeEnum<
2761
- typeof CreatePromptProvider
2762
- > = z.nativeEnum(CreatePromptProvider);
2763
-
2764
- /** @internal */
2765
- export const CreatePromptProvider$outboundSchema: z.ZodNativeEnum<
2766
- typeof CreatePromptProvider
2767
- > = CreatePromptProvider$inboundSchema;
2768
-
2769
- /**
2770
- * @internal
2771
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2772
- */
2773
- export namespace CreatePromptProvider$ {
2774
- /** @deprecated use `CreatePromptProvider$inboundSchema` instead. */
2775
- export const inboundSchema = CreatePromptProvider$inboundSchema;
2776
- /** @deprecated use `CreatePromptProvider$outboundSchema` instead. */
2777
- export const outboundSchema = CreatePromptProvider$outboundSchema;
2778
- }
2779
-
2780
- /** @internal */
2781
- export const CreatePromptPromptsRole$inboundSchema: z.ZodNativeEnum<
2782
- typeof CreatePromptPromptsRole
2783
- > = z.nativeEnum(CreatePromptPromptsRole);
2784
-
2785
- /** @internal */
2786
- export const CreatePromptPromptsRole$outboundSchema: z.ZodNativeEnum<
2787
- typeof CreatePromptPromptsRole
2788
- > = CreatePromptPromptsRole$inboundSchema;
2789
-
2790
- /**
2791
- * @internal
2792
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2793
- */
2794
- export namespace CreatePromptPromptsRole$ {
2795
- /** @deprecated use `CreatePromptPromptsRole$inboundSchema` instead. */
2796
- export const inboundSchema = CreatePromptPromptsRole$inboundSchema;
2797
- /** @deprecated use `CreatePromptPromptsRole$outboundSchema` instead. */
2798
- export const outboundSchema = CreatePromptPromptsRole$outboundSchema;
2799
- }
2800
-
2801
- /** @internal */
2802
- export const CreatePrompt2PromptsResponse200Type$inboundSchema: z.ZodNativeEnum<
2803
- typeof CreatePrompt2PromptsResponse200Type
2804
- > = z.nativeEnum(CreatePrompt2PromptsResponse200Type);
2805
-
2806
- /** @internal */
2807
- export const CreatePrompt2PromptsResponse200Type$outboundSchema:
2808
- z.ZodNativeEnum<typeof CreatePrompt2PromptsResponse200Type> =
2809
- CreatePrompt2PromptsResponse200Type$inboundSchema;
2810
-
2811
- /**
2812
- * @internal
2813
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2814
- */
2815
- export namespace CreatePrompt2PromptsResponse200Type$ {
2816
- /** @deprecated use `CreatePrompt2PromptsResponse200Type$inboundSchema` instead. */
2817
- export const inboundSchema =
2818
- CreatePrompt2PromptsResponse200Type$inboundSchema;
2819
- /** @deprecated use `CreatePrompt2PromptsResponse200Type$outboundSchema` instead. */
2820
- export const outboundSchema =
2821
- CreatePrompt2PromptsResponse200Type$outboundSchema;
2822
- }
2823
-
2824
- /** @internal */
2825
- export const CreatePrompt2PromptsImageUrl$inboundSchema: z.ZodType<
2826
- CreatePrompt2PromptsImageUrl,
2827
- z.ZodTypeDef,
2828
- unknown
2829
- > = z.object({
2830
- id: z.string().optional(),
2831
- url: z.string(),
2832
- detail: z.string().optional(),
2833
- });
2834
-
2835
- /** @internal */
2836
- export type CreatePrompt2PromptsImageUrl$Outbound = {
2837
- id?: string | undefined;
2838
- url: string;
2839
- detail?: string | undefined;
2840
- };
2841
-
2842
- /** @internal */
2843
- export const CreatePrompt2PromptsImageUrl$outboundSchema: z.ZodType<
2844
- CreatePrompt2PromptsImageUrl$Outbound,
2845
- z.ZodTypeDef,
2846
- CreatePrompt2PromptsImageUrl
2847
- > = z.object({
2848
- id: z.string().optional(),
2849
- url: z.string(),
2850
- detail: z.string().optional(),
2851
- });
2852
-
2853
- /**
2854
- * @internal
2855
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2856
- */
2857
- export namespace CreatePrompt2PromptsImageUrl$ {
2858
- /** @deprecated use `CreatePrompt2PromptsImageUrl$inboundSchema` instead. */
2859
- export const inboundSchema = CreatePrompt2PromptsImageUrl$inboundSchema;
2860
- /** @deprecated use `CreatePrompt2PromptsImageUrl$outboundSchema` instead. */
2861
- export const outboundSchema = CreatePrompt2PromptsImageUrl$outboundSchema;
2862
- /** @deprecated use `CreatePrompt2PromptsImageUrl$Outbound` instead. */
2863
- export type Outbound = CreatePrompt2PromptsImageUrl$Outbound;
2864
- }
2865
-
2866
- export function createPrompt2PromptsImageUrlToJSON(
2867
- createPrompt2PromptsImageUrl: CreatePrompt2PromptsImageUrl,
2868
- ): string {
2869
- return JSON.stringify(
2870
- CreatePrompt2PromptsImageUrl$outboundSchema.parse(
2871
- createPrompt2PromptsImageUrl,
2872
- ),
2873
- );
2874
- }
2875
-
2876
- export function createPrompt2PromptsImageUrlFromJSON(
2877
- jsonString: string,
2878
- ): SafeParseResult<CreatePrompt2PromptsImageUrl, SDKValidationError> {
2879
- return safeParse(
2880
- jsonString,
2881
- (x) => CreatePrompt2PromptsImageUrl$inboundSchema.parse(JSON.parse(x)),
2882
- `Failed to parse 'CreatePrompt2PromptsImageUrl' from JSON`,
2883
- );
2884
- }
2885
-
2886
- /** @internal */
2887
- export const CreatePrompt2Prompts2$inboundSchema: z.ZodType<
2888
- CreatePrompt2Prompts2,
2889
- z.ZodTypeDef,
2890
- unknown
2891
- > = z.object({
2892
- type: CreatePrompt2PromptsResponse200Type$inboundSchema,
2893
- image_url: z.lazy(() => CreatePrompt2PromptsImageUrl$inboundSchema),
2894
- }).transform((v) => {
2895
- return remap$(v, {
2896
- "image_url": "imageUrl",
2897
- });
2898
- });
2899
-
2900
- /** @internal */
2901
- export type CreatePrompt2Prompts2$Outbound = {
2902
- type: string;
2903
- image_url: CreatePrompt2PromptsImageUrl$Outbound;
2904
- };
2905
-
2906
- /** @internal */
2907
- export const CreatePrompt2Prompts2$outboundSchema: z.ZodType<
2908
- CreatePrompt2Prompts2$Outbound,
2909
- z.ZodTypeDef,
2910
- CreatePrompt2Prompts2
2911
- > = z.object({
2912
- type: CreatePrompt2PromptsResponse200Type$outboundSchema,
2913
- imageUrl: z.lazy(() => CreatePrompt2PromptsImageUrl$outboundSchema),
2914
- }).transform((v) => {
2915
- return remap$(v, {
2916
- imageUrl: "image_url",
2917
- });
2918
- });
2919
-
2920
- /**
2921
- * @internal
2922
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2923
- */
2924
- export namespace CreatePrompt2Prompts2$ {
2925
- /** @deprecated use `CreatePrompt2Prompts2$inboundSchema` instead. */
2926
- export const inboundSchema = CreatePrompt2Prompts2$inboundSchema;
2927
- /** @deprecated use `CreatePrompt2Prompts2$outboundSchema` instead. */
2928
- export const outboundSchema = CreatePrompt2Prompts2$outboundSchema;
2929
- /** @deprecated use `CreatePrompt2Prompts2$Outbound` instead. */
2930
- export type Outbound = CreatePrompt2Prompts2$Outbound;
2931
- }
2932
-
2933
- export function createPrompt2Prompts2ToJSON(
2934
- createPrompt2Prompts2: CreatePrompt2Prompts2,
2935
- ): string {
2936
- return JSON.stringify(
2937
- CreatePrompt2Prompts2$outboundSchema.parse(createPrompt2Prompts2),
2938
- );
2939
- }
2940
-
2941
- export function createPrompt2Prompts2FromJSON(
2942
- jsonString: string,
2943
- ): SafeParseResult<CreatePrompt2Prompts2, SDKValidationError> {
2944
- return safeParse(
2945
- jsonString,
2946
- (x) => CreatePrompt2Prompts2$inboundSchema.parse(JSON.parse(x)),
2947
- `Failed to parse 'CreatePrompt2Prompts2' from JSON`,
2948
- );
2949
- }
2950
-
2951
- /** @internal */
2952
- export const CreatePrompt2PromptsResponseType$inboundSchema: z.ZodNativeEnum<
2953
- typeof CreatePrompt2PromptsResponseType
2954
- > = z.nativeEnum(CreatePrompt2PromptsResponseType);
2955
-
2956
- /** @internal */
2957
- export const CreatePrompt2PromptsResponseType$outboundSchema: z.ZodNativeEnum<
2958
- typeof CreatePrompt2PromptsResponseType
2959
- > = CreatePrompt2PromptsResponseType$inboundSchema;
2960
-
2961
- /**
2962
- * @internal
2963
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2964
- */
2965
- export namespace CreatePrompt2PromptsResponseType$ {
2966
- /** @deprecated use `CreatePrompt2PromptsResponseType$inboundSchema` instead. */
2967
- export const inboundSchema = CreatePrompt2PromptsResponseType$inboundSchema;
2968
- /** @deprecated use `CreatePrompt2PromptsResponseType$outboundSchema` instead. */
2969
- export const outboundSchema = CreatePrompt2PromptsResponseType$outboundSchema;
2970
- }
2971
-
2972
- /** @internal */
2973
- export const CreatePrompt2Prompts1$inboundSchema: z.ZodType<
2974
- CreatePrompt2Prompts1,
2975
- z.ZodTypeDef,
2976
- unknown
2977
- > = z.object({
2978
- type: CreatePrompt2PromptsResponseType$inboundSchema,
2979
- text: z.string(),
2980
- });
2981
-
2982
- /** @internal */
2983
- export type CreatePrompt2Prompts1$Outbound = {
2984
- type: string;
2985
- text: string;
2986
- };
2987
-
2988
- /** @internal */
2989
- export const CreatePrompt2Prompts1$outboundSchema: z.ZodType<
2990
- CreatePrompt2Prompts1$Outbound,
2991
- z.ZodTypeDef,
2992
- CreatePrompt2Prompts1
2993
- > = z.object({
2994
- type: CreatePrompt2PromptsResponseType$outboundSchema,
2995
- text: z.string(),
2996
- });
2997
-
2998
- /**
2999
- * @internal
3000
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3001
- */
3002
- export namespace CreatePrompt2Prompts1$ {
3003
- /** @deprecated use `CreatePrompt2Prompts1$inboundSchema` instead. */
3004
- export const inboundSchema = CreatePrompt2Prompts1$inboundSchema;
3005
- /** @deprecated use `CreatePrompt2Prompts1$outboundSchema` instead. */
3006
- export const outboundSchema = CreatePrompt2Prompts1$outboundSchema;
3007
- /** @deprecated use `CreatePrompt2Prompts1$Outbound` instead. */
3008
- export type Outbound = CreatePrompt2Prompts1$Outbound;
3009
- }
3010
-
3011
- export function createPrompt2Prompts1ToJSON(
3012
- createPrompt2Prompts1: CreatePrompt2Prompts1,
3013
- ): string {
3014
- return JSON.stringify(
3015
- CreatePrompt2Prompts1$outboundSchema.parse(createPrompt2Prompts1),
3016
- );
3017
- }
3018
-
3019
- export function createPrompt2Prompts1FromJSON(
3020
- jsonString: string,
3021
- ): SafeParseResult<CreatePrompt2Prompts1, SDKValidationError> {
3022
- return safeParse(
3023
- jsonString,
3024
- (x) => CreatePrompt2Prompts1$inboundSchema.parse(JSON.parse(x)),
3025
- `Failed to parse 'CreatePrompt2Prompts1' from JSON`,
3026
- );
3027
- }
3028
-
3029
- /** @internal */
3030
- export const CreatePromptContentPrompts2$inboundSchema: z.ZodType<
3031
- CreatePromptContentPrompts2,
3032
- z.ZodTypeDef,
3033
- unknown
3034
- > = z.union([
3035
- z.lazy(() => CreatePrompt2Prompts1$inboundSchema),
3036
- z.lazy(() => CreatePrompt2Prompts2$inboundSchema),
3037
- ]);
3038
-
3039
- /** @internal */
3040
- export type CreatePromptContentPrompts2$Outbound =
3041
- | CreatePrompt2Prompts1$Outbound
3042
- | CreatePrompt2Prompts2$Outbound;
3043
-
3044
- /** @internal */
3045
- export const CreatePromptContentPrompts2$outboundSchema: z.ZodType<
3046
- CreatePromptContentPrompts2$Outbound,
3047
- z.ZodTypeDef,
3048
- CreatePromptContentPrompts2
3049
- > = z.union([
3050
- z.lazy(() => CreatePrompt2Prompts1$outboundSchema),
3051
- z.lazy(() => CreatePrompt2Prompts2$outboundSchema),
3052
- ]);
3053
-
3054
- /**
3055
- * @internal
3056
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3057
- */
3058
- export namespace CreatePromptContentPrompts2$ {
3059
- /** @deprecated use `CreatePromptContentPrompts2$inboundSchema` instead. */
3060
- export const inboundSchema = CreatePromptContentPrompts2$inboundSchema;
3061
- /** @deprecated use `CreatePromptContentPrompts2$outboundSchema` instead. */
3062
- export const outboundSchema = CreatePromptContentPrompts2$outboundSchema;
3063
- /** @deprecated use `CreatePromptContentPrompts2$Outbound` instead. */
3064
- export type Outbound = CreatePromptContentPrompts2$Outbound;
3065
- }
3066
-
3067
- export function createPromptContentPrompts2ToJSON(
3068
- createPromptContentPrompts2: CreatePromptContentPrompts2,
3069
- ): string {
3070
- return JSON.stringify(
3071
- CreatePromptContentPrompts2$outboundSchema.parse(
3072
- createPromptContentPrompts2,
3073
- ),
3074
- );
3075
- }
3076
-
3077
- export function createPromptContentPrompts2FromJSON(
3078
- jsonString: string,
3079
- ): SafeParseResult<CreatePromptContentPrompts2, SDKValidationError> {
3080
- return safeParse(
3081
- jsonString,
3082
- (x) => CreatePromptContentPrompts2$inboundSchema.parse(JSON.parse(x)),
3083
- `Failed to parse 'CreatePromptContentPrompts2' from JSON`,
3084
- );
3085
- }
3086
-
3087
- /** @internal */
3088
- export const CreatePromptPromptsContent$inboundSchema: z.ZodType<
3089
- CreatePromptPromptsContent,
3090
- z.ZodTypeDef,
3091
- unknown
3092
- > = z.union([
3093
- z.string(),
3094
- z.array(z.union([
3095
- z.lazy(() => CreatePrompt2Prompts1$inboundSchema),
3096
- z.lazy(() => CreatePrompt2Prompts2$inboundSchema),
3097
- ])),
3098
- ]);
3099
-
3100
- /** @internal */
3101
- export type CreatePromptPromptsContent$Outbound =
3102
- | string
3103
- | Array<CreatePrompt2Prompts1$Outbound | CreatePrompt2Prompts2$Outbound>;
3104
-
3105
- /** @internal */
3106
- export const CreatePromptPromptsContent$outboundSchema: z.ZodType<
3107
- CreatePromptPromptsContent$Outbound,
3108
- z.ZodTypeDef,
3109
- CreatePromptPromptsContent
3110
- > = z.union([
3111
- z.string(),
3112
- z.array(z.union([
3113
- z.lazy(() => CreatePrompt2Prompts1$outboundSchema),
3114
- z.lazy(() => CreatePrompt2Prompts2$outboundSchema),
3115
- ])),
3116
- ]);
3117
-
3118
- /**
3119
- * @internal
3120
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3121
- */
3122
- export namespace CreatePromptPromptsContent$ {
3123
- /** @deprecated use `CreatePromptPromptsContent$inboundSchema` instead. */
3124
- export const inboundSchema = CreatePromptPromptsContent$inboundSchema;
3125
- /** @deprecated use `CreatePromptPromptsContent$outboundSchema` instead. */
3126
- export const outboundSchema = CreatePromptPromptsContent$outboundSchema;
3127
- /** @deprecated use `CreatePromptPromptsContent$Outbound` instead. */
3128
- export type Outbound = CreatePromptPromptsContent$Outbound;
3129
- }
3130
-
3131
- export function createPromptPromptsContentToJSON(
3132
- createPromptPromptsContent: CreatePromptPromptsContent,
3133
- ): string {
3134
- return JSON.stringify(
3135
- CreatePromptPromptsContent$outboundSchema.parse(createPromptPromptsContent),
3136
- );
3137
- }
3138
-
3139
- export function createPromptPromptsContentFromJSON(
3140
- jsonString: string,
3141
- ): SafeParseResult<CreatePromptPromptsContent, SDKValidationError> {
3142
- return safeParse(
3143
- jsonString,
3144
- (x) => CreatePromptPromptsContent$inboundSchema.parse(JSON.parse(x)),
3145
- `Failed to parse 'CreatePromptPromptsContent' from JSON`,
3146
- );
3147
- }
3148
-
3149
- /** @internal */
3150
- export const CreatePromptPromptsResponseType$inboundSchema: z.ZodNativeEnum<
3151
- typeof CreatePromptPromptsResponseType
3152
- > = z.nativeEnum(CreatePromptPromptsResponseType);
3153
-
3154
- /** @internal */
3155
- export const CreatePromptPromptsResponseType$outboundSchema: z.ZodNativeEnum<
3156
- typeof CreatePromptPromptsResponseType
3157
- > = CreatePromptPromptsResponseType$inboundSchema;
3158
-
3159
- /**
3160
- * @internal
3161
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3162
- */
3163
- export namespace CreatePromptPromptsResponseType$ {
3164
- /** @deprecated use `CreatePromptPromptsResponseType$inboundSchema` instead. */
3165
- export const inboundSchema = CreatePromptPromptsResponseType$inboundSchema;
3166
- /** @deprecated use `CreatePromptPromptsResponseType$outboundSchema` instead. */
3167
- export const outboundSchema = CreatePromptPromptsResponseType$outboundSchema;
3168
- }
3169
-
3170
- /** @internal */
3171
- export const CreatePromptPromptsFunction$inboundSchema: z.ZodType<
3172
- CreatePromptPromptsFunction,
3173
- z.ZodTypeDef,
3174
- unknown
3175
- > = z.object({
3176
- name: z.string(),
3177
- arguments: z.string(),
3178
- });
3179
-
3180
- /** @internal */
3181
- export type CreatePromptPromptsFunction$Outbound = {
3182
- name: string;
3183
- arguments: string;
3184
- };
3185
-
3186
- /** @internal */
3187
- export const CreatePromptPromptsFunction$outboundSchema: z.ZodType<
3188
- CreatePromptPromptsFunction$Outbound,
3189
- z.ZodTypeDef,
3190
- CreatePromptPromptsFunction
3191
- > = z.object({
3192
- name: z.string(),
3193
- arguments: z.string(),
3194
- });
3195
-
3196
- /**
3197
- * @internal
3198
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3199
- */
3200
- export namespace CreatePromptPromptsFunction$ {
3201
- /** @deprecated use `CreatePromptPromptsFunction$inboundSchema` instead. */
3202
- export const inboundSchema = CreatePromptPromptsFunction$inboundSchema;
3203
- /** @deprecated use `CreatePromptPromptsFunction$outboundSchema` instead. */
3204
- export const outboundSchema = CreatePromptPromptsFunction$outboundSchema;
3205
- /** @deprecated use `CreatePromptPromptsFunction$Outbound` instead. */
3206
- export type Outbound = CreatePromptPromptsFunction$Outbound;
3207
- }
3208
-
3209
- export function createPromptPromptsFunctionToJSON(
3210
- createPromptPromptsFunction: CreatePromptPromptsFunction,
3211
- ): string {
3212
- return JSON.stringify(
3213
- CreatePromptPromptsFunction$outboundSchema.parse(
3214
- createPromptPromptsFunction,
3215
- ),
3216
- );
3217
- }
3218
-
3219
- export function createPromptPromptsFunctionFromJSON(
3220
- jsonString: string,
3221
- ): SafeParseResult<CreatePromptPromptsFunction, SDKValidationError> {
3222
- return safeParse(
3223
- jsonString,
3224
- (x) => CreatePromptPromptsFunction$inboundSchema.parse(JSON.parse(x)),
3225
- `Failed to parse 'CreatePromptPromptsFunction' from JSON`,
3226
- );
3227
- }
3228
-
3229
- /** @internal */
3230
- export const CreatePromptPromptsToolCalls$inboundSchema: z.ZodType<
3231
- CreatePromptPromptsToolCalls,
3232
- z.ZodTypeDef,
3233
- unknown
3234
- > = z.object({
3235
- id: z.string().optional(),
3236
- index: z.number().optional(),
3237
- type: CreatePromptPromptsResponseType$inboundSchema,
3238
- function: z.lazy(() => CreatePromptPromptsFunction$inboundSchema),
3239
- });
3240
-
3241
- /** @internal */
3242
- export type CreatePromptPromptsToolCalls$Outbound = {
3243
- id?: string | undefined;
3244
- index?: number | undefined;
3245
- type: string;
3246
- function: CreatePromptPromptsFunction$Outbound;
3247
- };
3248
-
3249
- /** @internal */
3250
- export const CreatePromptPromptsToolCalls$outboundSchema: z.ZodType<
3251
- CreatePromptPromptsToolCalls$Outbound,
3252
- z.ZodTypeDef,
3253
- CreatePromptPromptsToolCalls
3254
- > = z.object({
3255
- id: z.string().optional(),
3256
- index: z.number().optional(),
3257
- type: CreatePromptPromptsResponseType$outboundSchema,
3258
- function: z.lazy(() => CreatePromptPromptsFunction$outboundSchema),
3259
- });
3260
-
3261
- /**
3262
- * @internal
3263
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3264
- */
3265
- export namespace CreatePromptPromptsToolCalls$ {
3266
- /** @deprecated use `CreatePromptPromptsToolCalls$inboundSchema` instead. */
3267
- export const inboundSchema = CreatePromptPromptsToolCalls$inboundSchema;
3268
- /** @deprecated use `CreatePromptPromptsToolCalls$outboundSchema` instead. */
3269
- export const outboundSchema = CreatePromptPromptsToolCalls$outboundSchema;
3270
- /** @deprecated use `CreatePromptPromptsToolCalls$Outbound` instead. */
3271
- export type Outbound = CreatePromptPromptsToolCalls$Outbound;
3272
- }
3273
-
3274
- export function createPromptPromptsToolCallsToJSON(
3275
- createPromptPromptsToolCalls: CreatePromptPromptsToolCalls,
3276
- ): string {
3277
- return JSON.stringify(
3278
- CreatePromptPromptsToolCalls$outboundSchema.parse(
3279
- createPromptPromptsToolCalls,
3280
- ),
3281
- );
3282
- }
3283
-
3284
- export function createPromptPromptsToolCallsFromJSON(
3285
- jsonString: string,
3286
- ): SafeParseResult<CreatePromptPromptsToolCalls, SDKValidationError> {
3287
- return safeParse(
3288
- jsonString,
3289
- (x) => CreatePromptPromptsToolCalls$inboundSchema.parse(JSON.parse(x)),
3290
- `Failed to parse 'CreatePromptPromptsToolCalls' from JSON`,
3291
- );
3292
- }
3293
-
3294
- /** @internal */
3295
- export const CreatePromptPromptsMessages$inboundSchema: z.ZodType<
3296
- CreatePromptPromptsMessages,
3297
- z.ZodTypeDef,
3298
- unknown
3299
- > = z.object({
3300
- role: CreatePromptPromptsRole$inboundSchema,
3301
- content: z.union([
3302
- z.string(),
3303
- z.array(z.union([
3304
- z.lazy(() => CreatePrompt2Prompts1$inboundSchema),
3305
- z.lazy(() => CreatePrompt2Prompts2$inboundSchema),
3306
- ])),
3307
- ]),
3308
- tool_calls: z.array(z.lazy(() => CreatePromptPromptsToolCalls$inboundSchema))
3309
- .optional(),
3310
- tool_call_id: z.string().optional(),
3311
- }).transform((v) => {
3312
- return remap$(v, {
3313
- "tool_calls": "toolCalls",
3314
- "tool_call_id": "toolCallId",
3315
- });
3316
- });
3317
-
3318
- /** @internal */
3319
- export type CreatePromptPromptsMessages$Outbound = {
3320
- role: string;
3321
- content:
3322
- | string
3323
- | Array<CreatePrompt2Prompts1$Outbound | CreatePrompt2Prompts2$Outbound>;
3324
- tool_calls?: Array<CreatePromptPromptsToolCalls$Outbound> | undefined;
3325
- tool_call_id?: string | undefined;
3326
- };
3327
-
3328
- /** @internal */
3329
- export const CreatePromptPromptsMessages$outboundSchema: z.ZodType<
3330
- CreatePromptPromptsMessages$Outbound,
3331
- z.ZodTypeDef,
3332
- CreatePromptPromptsMessages
3333
- > = z.object({
3334
- role: CreatePromptPromptsRole$outboundSchema,
3335
- content: z.union([
3336
- z.string(),
3337
- z.array(z.union([
3338
- z.lazy(() => CreatePrompt2Prompts1$outboundSchema),
3339
- z.lazy(() => CreatePrompt2Prompts2$outboundSchema),
3340
- ])),
3341
- ]),
3342
- toolCalls: z.array(z.lazy(() => CreatePromptPromptsToolCalls$outboundSchema))
3343
- .optional(),
3344
- toolCallId: z.string().optional(),
3345
- }).transform((v) => {
3346
- return remap$(v, {
3347
- toolCalls: "tool_calls",
3348
- toolCallId: "tool_call_id",
3349
- });
3350
- });
3351
-
3352
- /**
3353
- * @internal
3354
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3355
- */
3356
- export namespace CreatePromptPromptsMessages$ {
3357
- /** @deprecated use `CreatePromptPromptsMessages$inboundSchema` instead. */
3358
- export const inboundSchema = CreatePromptPromptsMessages$inboundSchema;
3359
- /** @deprecated use `CreatePromptPromptsMessages$outboundSchema` instead. */
3360
- export const outboundSchema = CreatePromptPromptsMessages$outboundSchema;
3361
- /** @deprecated use `CreatePromptPromptsMessages$Outbound` instead. */
3362
- export type Outbound = CreatePromptPromptsMessages$Outbound;
3363
- }
3364
-
3365
- export function createPromptPromptsMessagesToJSON(
3366
- createPromptPromptsMessages: CreatePromptPromptsMessages,
3367
- ): string {
3368
- return JSON.stringify(
3369
- CreatePromptPromptsMessages$outboundSchema.parse(
3370
- createPromptPromptsMessages,
3371
- ),
3372
- );
3373
- }
3374
-
3375
- export function createPromptPromptsMessagesFromJSON(
3376
- jsonString: string,
3377
- ): SafeParseResult<CreatePromptPromptsMessages, SDKValidationError> {
3378
- return safeParse(
3379
- jsonString,
3380
- (x) => CreatePromptPromptsMessages$inboundSchema.parse(JSON.parse(x)),
3381
- `Failed to parse 'CreatePromptPromptsMessages' from JSON`,
3382
- );
3383
- }
3384
-
3385
- /** @internal */
3386
- export const CreatePromptPromptConfig$inboundSchema: z.ZodType<
3387
- CreatePromptPromptConfig,
3388
- z.ZodTypeDef,
3389
- unknown
3390
- > = z.object({
3391
- stream: z.boolean().optional(),
3392
- model: z.string().optional(),
3393
- model_db_id: z.string().optional(),
3394
- model_type: CreatePromptModelType$inboundSchema.optional(),
3395
- model_parameters: z.lazy(() => CreatePromptModelParameters$inboundSchema)
3396
- .optional(),
3397
- provider: CreatePromptProvider$inboundSchema.optional(),
3398
- integration_id: z.nullable(z.string()).optional(),
3399
- version: z.string().optional(),
3400
- messages: z.array(z.lazy(() => CreatePromptPromptsMessages$inboundSchema)),
3401
- }).transform((v) => {
3402
- return remap$(v, {
3403
- "model_db_id": "modelDbId",
3404
- "model_type": "modelType",
3405
- "model_parameters": "modelParameters",
3406
- "integration_id": "integrationId",
3407
- });
3408
- });
3409
-
3410
- /** @internal */
3411
- export type CreatePromptPromptConfig$Outbound = {
3412
- stream?: boolean | undefined;
3413
- model?: string | undefined;
3414
- model_db_id?: string | undefined;
3415
- model_type?: string | undefined;
3416
- model_parameters?: CreatePromptModelParameters$Outbound | undefined;
3417
- provider?: string | undefined;
3418
- integration_id?: string | null | undefined;
3419
- version?: string | undefined;
3420
- messages: Array<CreatePromptPromptsMessages$Outbound>;
3421
- };
3422
-
3423
- /** @internal */
3424
- export const CreatePromptPromptConfig$outboundSchema: z.ZodType<
3425
- CreatePromptPromptConfig$Outbound,
3426
- z.ZodTypeDef,
3427
- CreatePromptPromptConfig
3428
- > = z.object({
3429
- stream: z.boolean().optional(),
3430
- model: z.string().optional(),
3431
- modelDbId: z.string().optional(),
3432
- modelType: CreatePromptModelType$outboundSchema.optional(),
3433
- modelParameters: z.lazy(() => CreatePromptModelParameters$outboundSchema)
3434
- .optional(),
3435
- provider: CreatePromptProvider$outboundSchema.optional(),
3436
- integrationId: z.nullable(z.string()).optional(),
3437
- version: z.string().optional(),
3438
- messages: z.array(z.lazy(() => CreatePromptPromptsMessages$outboundSchema)),
3439
- }).transform((v) => {
3440
- return remap$(v, {
3441
- modelDbId: "model_db_id",
3442
- modelType: "model_type",
3443
- modelParameters: "model_parameters",
3444
- integrationId: "integration_id",
3445
- });
3446
- });
3447
-
3448
- /**
3449
- * @internal
3450
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3451
- */
3452
- export namespace CreatePromptPromptConfig$ {
3453
- /** @deprecated use `CreatePromptPromptConfig$inboundSchema` instead. */
3454
- export const inboundSchema = CreatePromptPromptConfig$inboundSchema;
3455
- /** @deprecated use `CreatePromptPromptConfig$outboundSchema` instead. */
3456
- export const outboundSchema = CreatePromptPromptConfig$outboundSchema;
3457
- /** @deprecated use `CreatePromptPromptConfig$Outbound` instead. */
3458
- export type Outbound = CreatePromptPromptConfig$Outbound;
3459
- }
3460
-
3461
- export function createPromptPromptConfigToJSON(
3462
- createPromptPromptConfig: CreatePromptPromptConfig,
3463
- ): string {
3464
- return JSON.stringify(
3465
- CreatePromptPromptConfig$outboundSchema.parse(createPromptPromptConfig),
3466
- );
3467
- }
3468
-
3469
- export function createPromptPromptConfigFromJSON(
3470
- jsonString: string,
3471
- ): SafeParseResult<CreatePromptPromptConfig, SDKValidationError> {
3472
- return safeParse(
3473
- jsonString,
3474
- (x) => CreatePromptPromptConfig$inboundSchema.parse(JSON.parse(x)),
3475
- `Failed to parse 'CreatePromptPromptConfig' from JSON`,
3476
- );
3477
- }
3478
-
3479
- /** @internal */
3480
- export const CreatePromptUseCases$inboundSchema: z.ZodNativeEnum<
3481
- typeof CreatePromptUseCases
3482
- > = z.nativeEnum(CreatePromptUseCases);
3483
-
3484
- /** @internal */
3485
- export const CreatePromptUseCases$outboundSchema: z.ZodNativeEnum<
3486
- typeof CreatePromptUseCases
3487
- > = CreatePromptUseCases$inboundSchema;
3488
-
3489
- /**
3490
- * @internal
3491
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3492
- */
3493
- export namespace CreatePromptUseCases$ {
3494
- /** @deprecated use `CreatePromptUseCases$inboundSchema` instead. */
3495
- export const inboundSchema = CreatePromptUseCases$inboundSchema;
3496
- /** @deprecated use `CreatePromptUseCases$outboundSchema` instead. */
3497
- export const outboundSchema = CreatePromptUseCases$outboundSchema;
3498
- }
3499
-
3500
- /** @internal */
3501
- export const CreatePromptLanguage$inboundSchema: z.ZodNativeEnum<
3502
- typeof CreatePromptLanguage
3503
- > = z.nativeEnum(CreatePromptLanguage);
3504
-
3505
- /** @internal */
3506
- export const CreatePromptLanguage$outboundSchema: z.ZodNativeEnum<
3507
- typeof CreatePromptLanguage
3508
- > = CreatePromptLanguage$inboundSchema;
3509
-
3510
- /**
3511
- * @internal
3512
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3513
- */
3514
- export namespace CreatePromptLanguage$ {
3515
- /** @deprecated use `CreatePromptLanguage$inboundSchema` instead. */
3516
- export const inboundSchema = CreatePromptLanguage$inboundSchema;
3517
- /** @deprecated use `CreatePromptLanguage$outboundSchema` instead. */
3518
- export const outboundSchema = CreatePromptLanguage$outboundSchema;
3519
- }
3520
-
3521
- /** @internal */
3522
- export const CreatePromptPromptsMetadata$inboundSchema: z.ZodType<
3523
- CreatePromptPromptsMetadata,
3524
- z.ZodTypeDef,
3525
- unknown
3526
- > = z.object({
3527
- use_cases: z.array(CreatePromptUseCases$inboundSchema).optional(),
3528
- language: z.nullable(CreatePromptLanguage$inboundSchema).optional(),
3529
- }).transform((v) => {
3530
- return remap$(v, {
3531
- "use_cases": "useCases",
3532
- });
3533
- });
3534
-
3535
- /** @internal */
3536
- export type CreatePromptPromptsMetadata$Outbound = {
3537
- use_cases?: Array<string> | undefined;
3538
- language?: string | null | undefined;
3539
- };
3540
-
3541
- /** @internal */
3542
- export const CreatePromptPromptsMetadata$outboundSchema: z.ZodType<
3543
- CreatePromptPromptsMetadata$Outbound,
3544
- z.ZodTypeDef,
3545
- CreatePromptPromptsMetadata
3546
- > = z.object({
3547
- useCases: z.array(CreatePromptUseCases$outboundSchema).optional(),
3548
- language: z.nullable(CreatePromptLanguage$outboundSchema).optional(),
3549
- }).transform((v) => {
3550
- return remap$(v, {
3551
- useCases: "use_cases",
3552
- });
3553
- });
3554
-
3555
- /**
3556
- * @internal
3557
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3558
- */
3559
- export namespace CreatePromptPromptsMetadata$ {
3560
- /** @deprecated use `CreatePromptPromptsMetadata$inboundSchema` instead. */
3561
- export const inboundSchema = CreatePromptPromptsMetadata$inboundSchema;
3562
- /** @deprecated use `CreatePromptPromptsMetadata$outboundSchema` instead. */
3563
- export const outboundSchema = CreatePromptPromptsMetadata$outboundSchema;
3564
- /** @deprecated use `CreatePromptPromptsMetadata$Outbound` instead. */
3565
- export type Outbound = CreatePromptPromptsMetadata$Outbound;
3566
- }
3567
-
3568
- export function createPromptPromptsMetadataToJSON(
3569
- createPromptPromptsMetadata: CreatePromptPromptsMetadata,
3570
- ): string {
3571
- return JSON.stringify(
3572
- CreatePromptPromptsMetadata$outboundSchema.parse(
3573
- createPromptPromptsMetadata,
3574
- ),
3575
- );
3576
- }
3577
-
3578
- export function createPromptPromptsMetadataFromJSON(
3579
- jsonString: string,
3580
- ): SafeParseResult<CreatePromptPromptsMetadata, SDKValidationError> {
3581
- return safeParse(
3582
- jsonString,
3583
- (x) => CreatePromptPromptsMetadata$inboundSchema.parse(JSON.parse(x)),
3584
- `Failed to parse 'CreatePromptPromptsMetadata' from JSON`,
3585
- );
3586
- }
3587
-
3588
- /** @internal */
3589
- export const CreatePromptResponseBody$inboundSchema: z.ZodType<
3590
- CreatePromptResponseBody,
3591
- z.ZodTypeDef,
3592
- unknown
3593
- > = z.object({
3594
- _id: z.string(),
3595
- type: CreatePromptPromptsType$inboundSchema,
3596
- owner: z.string(),
3597
- domain_id: z.string(),
3598
- created: z.string(),
3599
- updated: z.string(),
3600
- created_by_id: z.nullable(z.string()).optional(),
3601
- updated_by_id: z.nullable(z.string()).optional(),
3602
- display_name: z.string(),
3603
- description: z.nullable(z.string()).optional(),
3604
- prompt_config: z.lazy(() => CreatePromptPromptConfig$inboundSchema),
3605
- metadata: z.lazy(() => CreatePromptPromptsMetadata$inboundSchema).optional(),
3606
- }).transform((v) => {
3607
- return remap$(v, {
3608
- "_id": "id",
3609
- "domain_id": "domainId",
3610
- "created_by_id": "createdById",
3611
- "updated_by_id": "updatedById",
3612
- "display_name": "displayName",
3613
- "prompt_config": "promptConfig",
3614
- });
3615
- });
3616
-
3617
- /** @internal */
3618
- export type CreatePromptResponseBody$Outbound = {
3619
- _id: string;
3620
- type: string;
3621
- owner: string;
3622
- domain_id: string;
3623
- created: string;
3624
- updated: string;
3625
- created_by_id?: string | null | undefined;
3626
- updated_by_id?: string | null | undefined;
3627
- display_name: string;
3628
- description?: string | null | undefined;
3629
- prompt_config: CreatePromptPromptConfig$Outbound;
3630
- metadata?: CreatePromptPromptsMetadata$Outbound | undefined;
3631
- };
3632
-
3633
- /** @internal */
3634
- export const CreatePromptResponseBody$outboundSchema: z.ZodType<
3635
- CreatePromptResponseBody$Outbound,
3636
- z.ZodTypeDef,
3637
- CreatePromptResponseBody
3638
- > = z.object({
3639
- id: z.string(),
3640
- type: CreatePromptPromptsType$outboundSchema,
3641
- owner: z.string(),
3642
- domainId: z.string(),
3643
- created: z.string(),
3644
- updated: z.string(),
3645
- createdById: z.nullable(z.string()).optional(),
3646
- updatedById: z.nullable(z.string()).optional(),
3647
- displayName: z.string(),
3648
- description: z.nullable(z.string()).optional(),
3649
- promptConfig: z.lazy(() => CreatePromptPromptConfig$outboundSchema),
3650
- metadata: z.lazy(() => CreatePromptPromptsMetadata$outboundSchema).optional(),
3651
- }).transform((v) => {
3652
- return remap$(v, {
3653
- id: "_id",
3654
- domainId: "domain_id",
3655
- createdById: "created_by_id",
3656
- updatedById: "updated_by_id",
3657
- displayName: "display_name",
3658
- promptConfig: "prompt_config",
3659
- });
3660
- });
3661
-
3662
- /**
3663
- * @internal
3664
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3665
- */
3666
- export namespace CreatePromptResponseBody$ {
3667
- /** @deprecated use `CreatePromptResponseBody$inboundSchema` instead. */
3668
- export const inboundSchema = CreatePromptResponseBody$inboundSchema;
3669
- /** @deprecated use `CreatePromptResponseBody$outboundSchema` instead. */
3670
- export const outboundSchema = CreatePromptResponseBody$outboundSchema;
3671
- /** @deprecated use `CreatePromptResponseBody$Outbound` instead. */
3672
- export type Outbound = CreatePromptResponseBody$Outbound;
3673
- }
3674
-
3675
- export function createPromptResponseBodyToJSON(
3676
- createPromptResponseBody: CreatePromptResponseBody,
3677
- ): string {
3678
- return JSON.stringify(
3679
- CreatePromptResponseBody$outboundSchema.parse(createPromptResponseBody),
3680
- );
3681
- }
3682
-
3683
- export function createPromptResponseBodyFromJSON(
3684
- jsonString: string,
3685
- ): SafeParseResult<CreatePromptResponseBody, SDKValidationError> {
3686
- return safeParse(
3687
- jsonString,
3688
- (x) => CreatePromptResponseBody$inboundSchema.parse(JSON.parse(x)),
3689
- `Failed to parse 'CreatePromptResponseBody' from JSON`,
3690
- );
3691
- }