@orq-ai/node 3.8.0-rc.8 → 3.8.0

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