@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,2293 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type ListPromptVersionsRequest = {
13
+ promptId: string;
14
+ /**
15
+ * A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
16
+ */
17
+ limit?: number | undefined;
18
+ /**
19
+ * A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the next page of the list.
20
+ */
21
+ startingAfter?: string | undefined;
22
+ /**
23
+ * A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, starting with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the previous page of the list.
24
+ */
25
+ endingBefore?: string | undefined;
26
+ };
27
+
28
+ export const ListPromptVersionsObject = {
29
+ List: "list",
30
+ } as const;
31
+ export type ListPromptVersionsObject = ClosedEnum<
32
+ typeof ListPromptVersionsObject
33
+ >;
34
+
35
+ /**
36
+ * The modality of the model
37
+ */
38
+ export const ListPromptVersionsModelType = {
39
+ Chat: "chat",
40
+ Completion: "completion",
41
+ Embedding: "embedding",
42
+ Vision: "vision",
43
+ Image: "image",
44
+ Tts: "tts",
45
+ Stt: "stt",
46
+ Rerank: "rerank",
47
+ Moderations: "moderations",
48
+ } as const;
49
+ /**
50
+ * The modality of the model
51
+ */
52
+ export type ListPromptVersionsModelType = ClosedEnum<
53
+ typeof ListPromptVersionsModelType
54
+ >;
55
+
56
+ /**
57
+ * Only supported on `image` models.
58
+ */
59
+ export const ListPromptVersionsFormat = {
60
+ Url: "url",
61
+ B64Json: "b64_json",
62
+ Text: "text",
63
+ JsonObject: "json_object",
64
+ } as const;
65
+ /**
66
+ * Only supported on `image` models.
67
+ */
68
+ export type ListPromptVersionsFormat = ClosedEnum<
69
+ typeof ListPromptVersionsFormat
70
+ >;
71
+
72
+ export const ListPromptVersionsResponseFormatPromptsType = {
73
+ JsonObject: "json_object",
74
+ } as const;
75
+ export type ListPromptVersionsResponseFormatPromptsType = ClosedEnum<
76
+ typeof ListPromptVersionsResponseFormatPromptsType
77
+ >;
78
+
79
+ export type ListPromptVersionsResponseFormat2 = {
80
+ type: ListPromptVersionsResponseFormatPromptsType;
81
+ };
82
+
83
+ export const ListPromptVersionsResponseFormatType = {
84
+ JsonSchema: "json_schema",
85
+ } as const;
86
+ export type ListPromptVersionsResponseFormatType = ClosedEnum<
87
+ typeof ListPromptVersionsResponseFormatType
88
+ >;
89
+
90
+ export type ListPromptVersionsResponseFormatJsonSchema = {
91
+ name: string;
92
+ strict?: boolean | undefined;
93
+ schema: { [k: string]: any };
94
+ };
95
+
96
+ export type ListPromptVersionsResponseFormat1 = {
97
+ type: ListPromptVersionsResponseFormatType;
98
+ jsonSchema: ListPromptVersionsResponseFormatJsonSchema;
99
+ };
100
+
101
+ /**
102
+ * An object specifying the format that the model must output.
103
+ *
104
+ * @remarks
105
+ *
106
+ * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
107
+ *
108
+ * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
109
+ *
110
+ * 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.
111
+ */
112
+ export type ListPromptVersionsResponseFormat =
113
+ | ListPromptVersionsResponseFormat1
114
+ | ListPromptVersionsResponseFormat2;
115
+
116
+ /**
117
+ * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
118
+ */
119
+ export const ListPromptVersionsPhotoRealVersion = {
120
+ V1: "v1",
121
+ V2: "v2",
122
+ } as const;
123
+ /**
124
+ * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
125
+ */
126
+ export type ListPromptVersionsPhotoRealVersion = ClosedEnum<
127
+ typeof ListPromptVersionsPhotoRealVersion
128
+ >;
129
+
130
+ /**
131
+ * The format to return the embeddings
132
+ */
133
+ export const ListPromptVersionsEncodingFormat = {
134
+ Float: "float",
135
+ Base64: "base64",
136
+ } as const;
137
+ /**
138
+ * The format to return the embeddings
139
+ */
140
+ export type ListPromptVersionsEncodingFormat = ClosedEnum<
141
+ typeof ListPromptVersionsEncodingFormat
142
+ >;
143
+
144
+ /**
145
+ * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
146
+ */
147
+ export const ListPromptVersionsReasoningEffort = {
148
+ Low: "low",
149
+ Medium: "medium",
150
+ High: "high",
151
+ } as const;
152
+ /**
153
+ * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
154
+ */
155
+ export type ListPromptVersionsReasoningEffort = ClosedEnum<
156
+ typeof ListPromptVersionsReasoningEffort
157
+ >;
158
+
159
+ /**
160
+ * Model Parameters: Not all parameters apply to every model
161
+ */
162
+ export type ListPromptVersionsModelParameters = {
163
+ /**
164
+ * Only supported on `chat` and `completion` models.
165
+ */
166
+ temperature?: number | undefined;
167
+ /**
168
+ * Only supported on `chat` and `completion` models.
169
+ */
170
+ maxTokens?: number | undefined;
171
+ /**
172
+ * Only supported on `chat` and `completion` models.
173
+ */
174
+ topK?: number | undefined;
175
+ /**
176
+ * Only supported on `chat` and `completion` models.
177
+ */
178
+ topP?: number | undefined;
179
+ /**
180
+ * Only supported on `chat` and `completion` models.
181
+ */
182
+ frequencyPenalty?: number | undefined;
183
+ /**
184
+ * Only supported on `chat` and `completion` models.
185
+ */
186
+ presencePenalty?: number | undefined;
187
+ /**
188
+ * Only supported on `image` models.
189
+ */
190
+ numImages?: number | undefined;
191
+ /**
192
+ * Best effort deterministic seed for the model. Currently only OpenAI models support these
193
+ */
194
+ seed?: number | undefined;
195
+ /**
196
+ * Only supported on `image` models.
197
+ */
198
+ format?: ListPromptVersionsFormat | undefined;
199
+ /**
200
+ * Only supported on `image` models.
201
+ */
202
+ dimensions?: string | undefined;
203
+ /**
204
+ * Only supported on `image` models.
205
+ */
206
+ quality?: string | undefined;
207
+ /**
208
+ * Only supported on `image` models.
209
+ */
210
+ style?: string | undefined;
211
+ /**
212
+ * An object specifying the format that the model must output.
213
+ *
214
+ * @remarks
215
+ *
216
+ * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
217
+ *
218
+ * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
219
+ *
220
+ * 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.
221
+ */
222
+ responseFormat?:
223
+ | ListPromptVersionsResponseFormat1
224
+ | ListPromptVersionsResponseFormat2
225
+ | null
226
+ | undefined;
227
+ /**
228
+ * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
229
+ */
230
+ photoRealVersion?: ListPromptVersionsPhotoRealVersion | undefined;
231
+ /**
232
+ * The format to return the embeddings
233
+ */
234
+ encodingFormat?: ListPromptVersionsEncodingFormat | undefined;
235
+ /**
236
+ * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
237
+ */
238
+ reasoningEffort?: ListPromptVersionsReasoningEffort | undefined;
239
+ /**
240
+ * 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`
241
+ */
242
+ budgetTokens?: number | undefined;
243
+ };
244
+
245
+ export const ListPromptVersionsProvider = {
246
+ Cohere: "cohere",
247
+ Openai: "openai",
248
+ Anthropic: "anthropic",
249
+ Huggingface: "huggingface",
250
+ Replicate: "replicate",
251
+ Google: "google",
252
+ GoogleAi: "google-ai",
253
+ Azure: "azure",
254
+ Aws: "aws",
255
+ Anyscale: "anyscale",
256
+ Perplexity: "perplexity",
257
+ Groq: "groq",
258
+ Fal: "fal",
259
+ Leonardoai: "leonardoai",
260
+ Nvidia: "nvidia",
261
+ Jina: "jina",
262
+ Togetherai: "togetherai",
263
+ Elevenlabs: "elevenlabs",
264
+ Litellm: "litellm",
265
+ } as const;
266
+ export type ListPromptVersionsProvider = ClosedEnum<
267
+ typeof ListPromptVersionsProvider
268
+ >;
269
+
270
+ /**
271
+ * The role of the prompt message
272
+ */
273
+ export const ListPromptVersionsRole = {
274
+ System: "system",
275
+ Assistant: "assistant",
276
+ User: "user",
277
+ Exception: "exception",
278
+ Tool: "tool",
279
+ Prompt: "prompt",
280
+ Correction: "correction",
281
+ ExpectedOutput: "expected_output",
282
+ } as const;
283
+ /**
284
+ * The role of the prompt message
285
+ */
286
+ export type ListPromptVersionsRole = ClosedEnum<typeof ListPromptVersionsRole>;
287
+
288
+ /**
289
+ * The type of the content part. Always `file`.
290
+ */
291
+ export const ListPromptVersions2PromptsResponseType = {
292
+ File: "file",
293
+ } as const;
294
+ /**
295
+ * The type of the content part. Always `file`.
296
+ */
297
+ export type ListPromptVersions2PromptsResponseType = ClosedEnum<
298
+ typeof ListPromptVersions2PromptsResponseType
299
+ >;
300
+
301
+ export type ListPromptVersions2File = {
302
+ /**
303
+ * The base64 encoded file data, used when passing the file to the model as a string.
304
+ */
305
+ fileData: string;
306
+ /**
307
+ * The name of the file, used when passing the file to the model as a string.
308
+ */
309
+ filename?: string | undefined;
310
+ };
311
+
312
+ export type ListPromptVersions23 = {
313
+ /**
314
+ * The type of the content part. Always `file`.
315
+ */
316
+ type: ListPromptVersions2PromptsResponseType;
317
+ file: ListPromptVersions2File;
318
+ };
319
+
320
+ export const ListPromptVersions2PromptsType = {
321
+ ImageUrl: "image_url",
322
+ } as const;
323
+ export type ListPromptVersions2PromptsType = ClosedEnum<
324
+ typeof ListPromptVersions2PromptsType
325
+ >;
326
+
327
+ export type ListPromptVersions2ImageUrl = {
328
+ /**
329
+ * The orq.ai id of the image
330
+ */
331
+ id?: string | undefined;
332
+ /**
333
+ * Either a URL of the image or the base64 encoded data URI.
334
+ */
335
+ url: string;
336
+ /**
337
+ * Specifies the detail level of the image. Currently only supported with OpenAI models
338
+ */
339
+ detail?: string | undefined;
340
+ };
341
+
342
+ /**
343
+ * The image part of the prompt message. Only supported with vision models.
344
+ */
345
+ export type ListPromptVersions22 = {
346
+ type: ListPromptVersions2PromptsType;
347
+ imageUrl: ListPromptVersions2ImageUrl;
348
+ };
349
+
350
+ export const ListPromptVersions2Type = {
351
+ Text: "text",
352
+ } as const;
353
+ export type ListPromptVersions2Type = ClosedEnum<
354
+ typeof ListPromptVersions2Type
355
+ >;
356
+
357
+ /**
358
+ * Text content part of a prompt message
359
+ */
360
+ export type ListPromptVersions21 = {
361
+ type: ListPromptVersions2Type;
362
+ text: string;
363
+ };
364
+
365
+ export type ListPromptVersionsContent2 =
366
+ | ListPromptVersions21
367
+ | ListPromptVersions22
368
+ | ListPromptVersions23;
369
+
370
+ /**
371
+ * 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.
372
+ */
373
+ export type ListPromptVersionsContent =
374
+ | string
375
+ | Array<ListPromptVersions21 | ListPromptVersions22 | ListPromptVersions23>;
376
+
377
+ export const ListPromptVersionsType = {
378
+ Function: "function",
379
+ } as const;
380
+ export type ListPromptVersionsType = ClosedEnum<typeof ListPromptVersionsType>;
381
+
382
+ export type ListPromptVersionsFunction = {
383
+ name: string;
384
+ /**
385
+ * JSON string arguments for the functions
386
+ */
387
+ arguments: string;
388
+ };
389
+
390
+ export type ListPromptVersionsToolCalls = {
391
+ id?: string | undefined;
392
+ index?: number | undefined;
393
+ type: ListPromptVersionsType;
394
+ function: ListPromptVersionsFunction;
395
+ };
396
+
397
+ export type ListPromptVersionsMessages = {
398
+ /**
399
+ * The role of the prompt message
400
+ */
401
+ role: ListPromptVersionsRole;
402
+ /**
403
+ * 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.
404
+ */
405
+ content:
406
+ | string
407
+ | Array<ListPromptVersions21 | ListPromptVersions22 | ListPromptVersions23>;
408
+ toolCalls?: Array<ListPromptVersionsToolCalls> | undefined;
409
+ toolCallId?: string | undefined;
410
+ };
411
+
412
+ /**
413
+ * A list of messages compatible with the openAI schema
414
+ */
415
+ export type ListPromptVersionsPromptConfig = {
416
+ stream?: boolean | undefined;
417
+ model?: string | undefined;
418
+ /**
419
+ * The id of the resource
420
+ */
421
+ modelDbId?: string | null | undefined;
422
+ /**
423
+ * The modality of the model
424
+ */
425
+ modelType?: ListPromptVersionsModelType | null | undefined;
426
+ /**
427
+ * Model Parameters: Not all parameters apply to every model
428
+ */
429
+ modelParameters?: ListPromptVersionsModelParameters | undefined;
430
+ provider?: ListPromptVersionsProvider | undefined;
431
+ /**
432
+ * The id of the resource
433
+ */
434
+ integrationId?: string | null | undefined;
435
+ version?: string | undefined;
436
+ messages: Array<ListPromptVersionsMessages>;
437
+ };
438
+
439
+ export const ListPromptVersionsUseCases = {
440
+ AgentsSimulations: "Agents simulations",
441
+ Agents: "Agents",
442
+ APIInteraction: "API interaction",
443
+ AutonomousAgents: "Autonomous Agents",
444
+ Chatbots: "Chatbots",
445
+ Classification: "Classification",
446
+ CodeUnderstanding: "Code understanding",
447
+ CodeWriting: "Code writing",
448
+ Conversation: "Conversation",
449
+ DocumentsQA: "Documents QA",
450
+ Evaluation: "Evaluation",
451
+ Extraction: "Extraction",
452
+ MultiModal: "Multi-modal",
453
+ SelfChecking: "Self-checking",
454
+ SentimentAnalysis: "Sentiment analysis",
455
+ Sql: "SQL",
456
+ Summarization: "Summarization",
457
+ Tagging: "Tagging",
458
+ TranslationDocument: "Translation (document)",
459
+ TranslationSentences: "Translation (sentences)",
460
+ } as const;
461
+ export type ListPromptVersionsUseCases = ClosedEnum<
462
+ typeof ListPromptVersionsUseCases
463
+ >;
464
+
465
+ /**
466
+ * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
467
+ */
468
+ export const ListPromptVersionsLanguage = {
469
+ Chinese: "Chinese",
470
+ Dutch: "Dutch",
471
+ English: "English",
472
+ French: "French",
473
+ German: "German",
474
+ Russian: "Russian",
475
+ Spanish: "Spanish",
476
+ } as const;
477
+ /**
478
+ * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
479
+ */
480
+ export type ListPromptVersionsLanguage = ClosedEnum<
481
+ typeof ListPromptVersionsLanguage
482
+ >;
483
+
484
+ export type ListPromptVersionsMetadata = {
485
+ /**
486
+ * 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
487
+ */
488
+ useCases?: Array<ListPromptVersionsUseCases> | undefined;
489
+ /**
490
+ * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
491
+ */
492
+ language?: ListPromptVersionsLanguage | null | undefined;
493
+ };
494
+
495
+ export type ListPromptVersionsData = {
496
+ id: string;
497
+ createdById?: string | null | undefined;
498
+ updatedById?: string | null | undefined;
499
+ /**
500
+ * 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
501
+ */
502
+ description?: string | null | undefined;
503
+ /**
504
+ * A list of messages compatible with the openAI schema
505
+ */
506
+ promptConfig: ListPromptVersionsPromptConfig;
507
+ metadata?: ListPromptVersionsMetadata | undefined;
508
+ timestamp: string;
509
+ };
510
+
511
+ /**
512
+ * Prompt versions retrieved.
513
+ */
514
+ export type ListPromptVersionsResponseBody = {
515
+ object: ListPromptVersionsObject;
516
+ data: Array<ListPromptVersionsData>;
517
+ hasMore: boolean;
518
+ };
519
+
520
+ /** @internal */
521
+ export const ListPromptVersionsRequest$inboundSchema: z.ZodType<
522
+ ListPromptVersionsRequest,
523
+ z.ZodTypeDef,
524
+ unknown
525
+ > = z.object({
526
+ prompt_id: z.string(),
527
+ limit: z.number().default(10),
528
+ starting_after: z.string().optional(),
529
+ ending_before: z.string().optional(),
530
+ }).transform((v) => {
531
+ return remap$(v, {
532
+ "prompt_id": "promptId",
533
+ "starting_after": "startingAfter",
534
+ "ending_before": "endingBefore",
535
+ });
536
+ });
537
+
538
+ /** @internal */
539
+ export type ListPromptVersionsRequest$Outbound = {
540
+ prompt_id: string;
541
+ limit: number;
542
+ starting_after?: string | undefined;
543
+ ending_before?: string | undefined;
544
+ };
545
+
546
+ /** @internal */
547
+ export const ListPromptVersionsRequest$outboundSchema: z.ZodType<
548
+ ListPromptVersionsRequest$Outbound,
549
+ z.ZodTypeDef,
550
+ ListPromptVersionsRequest
551
+ > = z.object({
552
+ promptId: z.string(),
553
+ limit: z.number().default(10),
554
+ startingAfter: z.string().optional(),
555
+ endingBefore: z.string().optional(),
556
+ }).transform((v) => {
557
+ return remap$(v, {
558
+ promptId: "prompt_id",
559
+ startingAfter: "starting_after",
560
+ endingBefore: "ending_before",
561
+ });
562
+ });
563
+
564
+ /**
565
+ * @internal
566
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
567
+ */
568
+ export namespace ListPromptVersionsRequest$ {
569
+ /** @deprecated use `ListPromptVersionsRequest$inboundSchema` instead. */
570
+ export const inboundSchema = ListPromptVersionsRequest$inboundSchema;
571
+ /** @deprecated use `ListPromptVersionsRequest$outboundSchema` instead. */
572
+ export const outboundSchema = ListPromptVersionsRequest$outboundSchema;
573
+ /** @deprecated use `ListPromptVersionsRequest$Outbound` instead. */
574
+ export type Outbound = ListPromptVersionsRequest$Outbound;
575
+ }
576
+
577
+ export function listPromptVersionsRequestToJSON(
578
+ listPromptVersionsRequest: ListPromptVersionsRequest,
579
+ ): string {
580
+ return JSON.stringify(
581
+ ListPromptVersionsRequest$outboundSchema.parse(listPromptVersionsRequest),
582
+ );
583
+ }
584
+
585
+ export function listPromptVersionsRequestFromJSON(
586
+ jsonString: string,
587
+ ): SafeParseResult<ListPromptVersionsRequest, SDKValidationError> {
588
+ return safeParse(
589
+ jsonString,
590
+ (x) => ListPromptVersionsRequest$inboundSchema.parse(JSON.parse(x)),
591
+ `Failed to parse 'ListPromptVersionsRequest' from JSON`,
592
+ );
593
+ }
594
+
595
+ /** @internal */
596
+ export const ListPromptVersionsObject$inboundSchema: z.ZodNativeEnum<
597
+ typeof ListPromptVersionsObject
598
+ > = z.nativeEnum(ListPromptVersionsObject);
599
+
600
+ /** @internal */
601
+ export const ListPromptVersionsObject$outboundSchema: z.ZodNativeEnum<
602
+ typeof ListPromptVersionsObject
603
+ > = ListPromptVersionsObject$inboundSchema;
604
+
605
+ /**
606
+ * @internal
607
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
608
+ */
609
+ export namespace ListPromptVersionsObject$ {
610
+ /** @deprecated use `ListPromptVersionsObject$inboundSchema` instead. */
611
+ export const inboundSchema = ListPromptVersionsObject$inboundSchema;
612
+ /** @deprecated use `ListPromptVersionsObject$outboundSchema` instead. */
613
+ export const outboundSchema = ListPromptVersionsObject$outboundSchema;
614
+ }
615
+
616
+ /** @internal */
617
+ export const ListPromptVersionsModelType$inboundSchema: z.ZodNativeEnum<
618
+ typeof ListPromptVersionsModelType
619
+ > = z.nativeEnum(ListPromptVersionsModelType);
620
+
621
+ /** @internal */
622
+ export const ListPromptVersionsModelType$outboundSchema: z.ZodNativeEnum<
623
+ typeof ListPromptVersionsModelType
624
+ > = ListPromptVersionsModelType$inboundSchema;
625
+
626
+ /**
627
+ * @internal
628
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
629
+ */
630
+ export namespace ListPromptVersionsModelType$ {
631
+ /** @deprecated use `ListPromptVersionsModelType$inboundSchema` instead. */
632
+ export const inboundSchema = ListPromptVersionsModelType$inboundSchema;
633
+ /** @deprecated use `ListPromptVersionsModelType$outboundSchema` instead. */
634
+ export const outboundSchema = ListPromptVersionsModelType$outboundSchema;
635
+ }
636
+
637
+ /** @internal */
638
+ export const ListPromptVersionsFormat$inboundSchema: z.ZodNativeEnum<
639
+ typeof ListPromptVersionsFormat
640
+ > = z.nativeEnum(ListPromptVersionsFormat);
641
+
642
+ /** @internal */
643
+ export const ListPromptVersionsFormat$outboundSchema: z.ZodNativeEnum<
644
+ typeof ListPromptVersionsFormat
645
+ > = ListPromptVersionsFormat$inboundSchema;
646
+
647
+ /**
648
+ * @internal
649
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
650
+ */
651
+ export namespace ListPromptVersionsFormat$ {
652
+ /** @deprecated use `ListPromptVersionsFormat$inboundSchema` instead. */
653
+ export const inboundSchema = ListPromptVersionsFormat$inboundSchema;
654
+ /** @deprecated use `ListPromptVersionsFormat$outboundSchema` instead. */
655
+ export const outboundSchema = ListPromptVersionsFormat$outboundSchema;
656
+ }
657
+
658
+ /** @internal */
659
+ export const ListPromptVersionsResponseFormatPromptsType$inboundSchema:
660
+ z.ZodNativeEnum<typeof ListPromptVersionsResponseFormatPromptsType> = z
661
+ .nativeEnum(ListPromptVersionsResponseFormatPromptsType);
662
+
663
+ /** @internal */
664
+ export const ListPromptVersionsResponseFormatPromptsType$outboundSchema:
665
+ z.ZodNativeEnum<typeof ListPromptVersionsResponseFormatPromptsType> =
666
+ ListPromptVersionsResponseFormatPromptsType$inboundSchema;
667
+
668
+ /**
669
+ * @internal
670
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
671
+ */
672
+ export namespace ListPromptVersionsResponseFormatPromptsType$ {
673
+ /** @deprecated use `ListPromptVersionsResponseFormatPromptsType$inboundSchema` instead. */
674
+ export const inboundSchema =
675
+ ListPromptVersionsResponseFormatPromptsType$inboundSchema;
676
+ /** @deprecated use `ListPromptVersionsResponseFormatPromptsType$outboundSchema` instead. */
677
+ export const outboundSchema =
678
+ ListPromptVersionsResponseFormatPromptsType$outboundSchema;
679
+ }
680
+
681
+ /** @internal */
682
+ export const ListPromptVersionsResponseFormat2$inboundSchema: z.ZodType<
683
+ ListPromptVersionsResponseFormat2,
684
+ z.ZodTypeDef,
685
+ unknown
686
+ > = z.object({
687
+ type: ListPromptVersionsResponseFormatPromptsType$inboundSchema,
688
+ });
689
+
690
+ /** @internal */
691
+ export type ListPromptVersionsResponseFormat2$Outbound = {
692
+ type: string;
693
+ };
694
+
695
+ /** @internal */
696
+ export const ListPromptVersionsResponseFormat2$outboundSchema: z.ZodType<
697
+ ListPromptVersionsResponseFormat2$Outbound,
698
+ z.ZodTypeDef,
699
+ ListPromptVersionsResponseFormat2
700
+ > = z.object({
701
+ type: ListPromptVersionsResponseFormatPromptsType$outboundSchema,
702
+ });
703
+
704
+ /**
705
+ * @internal
706
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
707
+ */
708
+ export namespace ListPromptVersionsResponseFormat2$ {
709
+ /** @deprecated use `ListPromptVersionsResponseFormat2$inboundSchema` instead. */
710
+ export const inboundSchema = ListPromptVersionsResponseFormat2$inboundSchema;
711
+ /** @deprecated use `ListPromptVersionsResponseFormat2$outboundSchema` instead. */
712
+ export const outboundSchema =
713
+ ListPromptVersionsResponseFormat2$outboundSchema;
714
+ /** @deprecated use `ListPromptVersionsResponseFormat2$Outbound` instead. */
715
+ export type Outbound = ListPromptVersionsResponseFormat2$Outbound;
716
+ }
717
+
718
+ export function listPromptVersionsResponseFormat2ToJSON(
719
+ listPromptVersionsResponseFormat2: ListPromptVersionsResponseFormat2,
720
+ ): string {
721
+ return JSON.stringify(
722
+ ListPromptVersionsResponseFormat2$outboundSchema.parse(
723
+ listPromptVersionsResponseFormat2,
724
+ ),
725
+ );
726
+ }
727
+
728
+ export function listPromptVersionsResponseFormat2FromJSON(
729
+ jsonString: string,
730
+ ): SafeParseResult<ListPromptVersionsResponseFormat2, SDKValidationError> {
731
+ return safeParse(
732
+ jsonString,
733
+ (x) => ListPromptVersionsResponseFormat2$inboundSchema.parse(JSON.parse(x)),
734
+ `Failed to parse 'ListPromptVersionsResponseFormat2' from JSON`,
735
+ );
736
+ }
737
+
738
+ /** @internal */
739
+ export const ListPromptVersionsResponseFormatType$inboundSchema:
740
+ z.ZodNativeEnum<typeof ListPromptVersionsResponseFormatType> = z.nativeEnum(
741
+ ListPromptVersionsResponseFormatType,
742
+ );
743
+
744
+ /** @internal */
745
+ export const ListPromptVersionsResponseFormatType$outboundSchema:
746
+ z.ZodNativeEnum<typeof ListPromptVersionsResponseFormatType> =
747
+ ListPromptVersionsResponseFormatType$inboundSchema;
748
+
749
+ /**
750
+ * @internal
751
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
752
+ */
753
+ export namespace ListPromptVersionsResponseFormatType$ {
754
+ /** @deprecated use `ListPromptVersionsResponseFormatType$inboundSchema` instead. */
755
+ export const inboundSchema =
756
+ ListPromptVersionsResponseFormatType$inboundSchema;
757
+ /** @deprecated use `ListPromptVersionsResponseFormatType$outboundSchema` instead. */
758
+ export const outboundSchema =
759
+ ListPromptVersionsResponseFormatType$outboundSchema;
760
+ }
761
+
762
+ /** @internal */
763
+ export const ListPromptVersionsResponseFormatJsonSchema$inboundSchema:
764
+ z.ZodType<ListPromptVersionsResponseFormatJsonSchema, z.ZodTypeDef, unknown> =
765
+ z.object({
766
+ name: z.string(),
767
+ strict: z.boolean().optional(),
768
+ schema: z.record(z.any()),
769
+ });
770
+
771
+ /** @internal */
772
+ export type ListPromptVersionsResponseFormatJsonSchema$Outbound = {
773
+ name: string;
774
+ strict?: boolean | undefined;
775
+ schema: { [k: string]: any };
776
+ };
777
+
778
+ /** @internal */
779
+ export const ListPromptVersionsResponseFormatJsonSchema$outboundSchema:
780
+ z.ZodType<
781
+ ListPromptVersionsResponseFormatJsonSchema$Outbound,
782
+ z.ZodTypeDef,
783
+ ListPromptVersionsResponseFormatJsonSchema
784
+ > = z.object({
785
+ name: z.string(),
786
+ strict: z.boolean().optional(),
787
+ schema: z.record(z.any()),
788
+ });
789
+
790
+ /**
791
+ * @internal
792
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
793
+ */
794
+ export namespace ListPromptVersionsResponseFormatJsonSchema$ {
795
+ /** @deprecated use `ListPromptVersionsResponseFormatJsonSchema$inboundSchema` instead. */
796
+ export const inboundSchema =
797
+ ListPromptVersionsResponseFormatJsonSchema$inboundSchema;
798
+ /** @deprecated use `ListPromptVersionsResponseFormatJsonSchema$outboundSchema` instead. */
799
+ export const outboundSchema =
800
+ ListPromptVersionsResponseFormatJsonSchema$outboundSchema;
801
+ /** @deprecated use `ListPromptVersionsResponseFormatJsonSchema$Outbound` instead. */
802
+ export type Outbound = ListPromptVersionsResponseFormatJsonSchema$Outbound;
803
+ }
804
+
805
+ export function listPromptVersionsResponseFormatJsonSchemaToJSON(
806
+ listPromptVersionsResponseFormatJsonSchema:
807
+ ListPromptVersionsResponseFormatJsonSchema,
808
+ ): string {
809
+ return JSON.stringify(
810
+ ListPromptVersionsResponseFormatJsonSchema$outboundSchema.parse(
811
+ listPromptVersionsResponseFormatJsonSchema,
812
+ ),
813
+ );
814
+ }
815
+
816
+ export function listPromptVersionsResponseFormatJsonSchemaFromJSON(
817
+ jsonString: string,
818
+ ): SafeParseResult<
819
+ ListPromptVersionsResponseFormatJsonSchema,
820
+ SDKValidationError
821
+ > {
822
+ return safeParse(
823
+ jsonString,
824
+ (x) =>
825
+ ListPromptVersionsResponseFormatJsonSchema$inboundSchema.parse(
826
+ JSON.parse(x),
827
+ ),
828
+ `Failed to parse 'ListPromptVersionsResponseFormatJsonSchema' from JSON`,
829
+ );
830
+ }
831
+
832
+ /** @internal */
833
+ export const ListPromptVersionsResponseFormat1$inboundSchema: z.ZodType<
834
+ ListPromptVersionsResponseFormat1,
835
+ z.ZodTypeDef,
836
+ unknown
837
+ > = z.object({
838
+ type: ListPromptVersionsResponseFormatType$inboundSchema,
839
+ json_schema: z.lazy(() =>
840
+ ListPromptVersionsResponseFormatJsonSchema$inboundSchema
841
+ ),
842
+ }).transform((v) => {
843
+ return remap$(v, {
844
+ "json_schema": "jsonSchema",
845
+ });
846
+ });
847
+
848
+ /** @internal */
849
+ export type ListPromptVersionsResponseFormat1$Outbound = {
850
+ type: string;
851
+ json_schema: ListPromptVersionsResponseFormatJsonSchema$Outbound;
852
+ };
853
+
854
+ /** @internal */
855
+ export const ListPromptVersionsResponseFormat1$outboundSchema: z.ZodType<
856
+ ListPromptVersionsResponseFormat1$Outbound,
857
+ z.ZodTypeDef,
858
+ ListPromptVersionsResponseFormat1
859
+ > = z.object({
860
+ type: ListPromptVersionsResponseFormatType$outboundSchema,
861
+ jsonSchema: z.lazy(() =>
862
+ ListPromptVersionsResponseFormatJsonSchema$outboundSchema
863
+ ),
864
+ }).transform((v) => {
865
+ return remap$(v, {
866
+ jsonSchema: "json_schema",
867
+ });
868
+ });
869
+
870
+ /**
871
+ * @internal
872
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
873
+ */
874
+ export namespace ListPromptVersionsResponseFormat1$ {
875
+ /** @deprecated use `ListPromptVersionsResponseFormat1$inboundSchema` instead. */
876
+ export const inboundSchema = ListPromptVersionsResponseFormat1$inboundSchema;
877
+ /** @deprecated use `ListPromptVersionsResponseFormat1$outboundSchema` instead. */
878
+ export const outboundSchema =
879
+ ListPromptVersionsResponseFormat1$outboundSchema;
880
+ /** @deprecated use `ListPromptVersionsResponseFormat1$Outbound` instead. */
881
+ export type Outbound = ListPromptVersionsResponseFormat1$Outbound;
882
+ }
883
+
884
+ export function listPromptVersionsResponseFormat1ToJSON(
885
+ listPromptVersionsResponseFormat1: ListPromptVersionsResponseFormat1,
886
+ ): string {
887
+ return JSON.stringify(
888
+ ListPromptVersionsResponseFormat1$outboundSchema.parse(
889
+ listPromptVersionsResponseFormat1,
890
+ ),
891
+ );
892
+ }
893
+
894
+ export function listPromptVersionsResponseFormat1FromJSON(
895
+ jsonString: string,
896
+ ): SafeParseResult<ListPromptVersionsResponseFormat1, SDKValidationError> {
897
+ return safeParse(
898
+ jsonString,
899
+ (x) => ListPromptVersionsResponseFormat1$inboundSchema.parse(JSON.parse(x)),
900
+ `Failed to parse 'ListPromptVersionsResponseFormat1' from JSON`,
901
+ );
902
+ }
903
+
904
+ /** @internal */
905
+ export const ListPromptVersionsResponseFormat$inboundSchema: z.ZodType<
906
+ ListPromptVersionsResponseFormat,
907
+ z.ZodTypeDef,
908
+ unknown
909
+ > = z.union([
910
+ z.lazy(() => ListPromptVersionsResponseFormat1$inboundSchema),
911
+ z.lazy(() => ListPromptVersionsResponseFormat2$inboundSchema),
912
+ ]);
913
+
914
+ /** @internal */
915
+ export type ListPromptVersionsResponseFormat$Outbound =
916
+ | ListPromptVersionsResponseFormat1$Outbound
917
+ | ListPromptVersionsResponseFormat2$Outbound;
918
+
919
+ /** @internal */
920
+ export const ListPromptVersionsResponseFormat$outboundSchema: z.ZodType<
921
+ ListPromptVersionsResponseFormat$Outbound,
922
+ z.ZodTypeDef,
923
+ ListPromptVersionsResponseFormat
924
+ > = z.union([
925
+ z.lazy(() => ListPromptVersionsResponseFormat1$outboundSchema),
926
+ z.lazy(() => ListPromptVersionsResponseFormat2$outboundSchema),
927
+ ]);
928
+
929
+ /**
930
+ * @internal
931
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
932
+ */
933
+ export namespace ListPromptVersionsResponseFormat$ {
934
+ /** @deprecated use `ListPromptVersionsResponseFormat$inboundSchema` instead. */
935
+ export const inboundSchema = ListPromptVersionsResponseFormat$inboundSchema;
936
+ /** @deprecated use `ListPromptVersionsResponseFormat$outboundSchema` instead. */
937
+ export const outboundSchema = ListPromptVersionsResponseFormat$outboundSchema;
938
+ /** @deprecated use `ListPromptVersionsResponseFormat$Outbound` instead. */
939
+ export type Outbound = ListPromptVersionsResponseFormat$Outbound;
940
+ }
941
+
942
+ export function listPromptVersionsResponseFormatToJSON(
943
+ listPromptVersionsResponseFormat: ListPromptVersionsResponseFormat,
944
+ ): string {
945
+ return JSON.stringify(
946
+ ListPromptVersionsResponseFormat$outboundSchema.parse(
947
+ listPromptVersionsResponseFormat,
948
+ ),
949
+ );
950
+ }
951
+
952
+ export function listPromptVersionsResponseFormatFromJSON(
953
+ jsonString: string,
954
+ ): SafeParseResult<ListPromptVersionsResponseFormat, SDKValidationError> {
955
+ return safeParse(
956
+ jsonString,
957
+ (x) => ListPromptVersionsResponseFormat$inboundSchema.parse(JSON.parse(x)),
958
+ `Failed to parse 'ListPromptVersionsResponseFormat' from JSON`,
959
+ );
960
+ }
961
+
962
+ /** @internal */
963
+ export const ListPromptVersionsPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
964
+ typeof ListPromptVersionsPhotoRealVersion
965
+ > = z.nativeEnum(ListPromptVersionsPhotoRealVersion);
966
+
967
+ /** @internal */
968
+ export const ListPromptVersionsPhotoRealVersion$outboundSchema: z.ZodNativeEnum<
969
+ typeof ListPromptVersionsPhotoRealVersion
970
+ > = ListPromptVersionsPhotoRealVersion$inboundSchema;
971
+
972
+ /**
973
+ * @internal
974
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
975
+ */
976
+ export namespace ListPromptVersionsPhotoRealVersion$ {
977
+ /** @deprecated use `ListPromptVersionsPhotoRealVersion$inboundSchema` instead. */
978
+ export const inboundSchema = ListPromptVersionsPhotoRealVersion$inboundSchema;
979
+ /** @deprecated use `ListPromptVersionsPhotoRealVersion$outboundSchema` instead. */
980
+ export const outboundSchema =
981
+ ListPromptVersionsPhotoRealVersion$outboundSchema;
982
+ }
983
+
984
+ /** @internal */
985
+ export const ListPromptVersionsEncodingFormat$inboundSchema: z.ZodNativeEnum<
986
+ typeof ListPromptVersionsEncodingFormat
987
+ > = z.nativeEnum(ListPromptVersionsEncodingFormat);
988
+
989
+ /** @internal */
990
+ export const ListPromptVersionsEncodingFormat$outboundSchema: z.ZodNativeEnum<
991
+ typeof ListPromptVersionsEncodingFormat
992
+ > = ListPromptVersionsEncodingFormat$inboundSchema;
993
+
994
+ /**
995
+ * @internal
996
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
997
+ */
998
+ export namespace ListPromptVersionsEncodingFormat$ {
999
+ /** @deprecated use `ListPromptVersionsEncodingFormat$inboundSchema` instead. */
1000
+ export const inboundSchema = ListPromptVersionsEncodingFormat$inboundSchema;
1001
+ /** @deprecated use `ListPromptVersionsEncodingFormat$outboundSchema` instead. */
1002
+ export const outboundSchema = ListPromptVersionsEncodingFormat$outboundSchema;
1003
+ }
1004
+
1005
+ /** @internal */
1006
+ export const ListPromptVersionsReasoningEffort$inboundSchema: z.ZodNativeEnum<
1007
+ typeof ListPromptVersionsReasoningEffort
1008
+ > = z.nativeEnum(ListPromptVersionsReasoningEffort);
1009
+
1010
+ /** @internal */
1011
+ export const ListPromptVersionsReasoningEffort$outboundSchema: z.ZodNativeEnum<
1012
+ typeof ListPromptVersionsReasoningEffort
1013
+ > = ListPromptVersionsReasoningEffort$inboundSchema;
1014
+
1015
+ /**
1016
+ * @internal
1017
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1018
+ */
1019
+ export namespace ListPromptVersionsReasoningEffort$ {
1020
+ /** @deprecated use `ListPromptVersionsReasoningEffort$inboundSchema` instead. */
1021
+ export const inboundSchema = ListPromptVersionsReasoningEffort$inboundSchema;
1022
+ /** @deprecated use `ListPromptVersionsReasoningEffort$outboundSchema` instead. */
1023
+ export const outboundSchema =
1024
+ ListPromptVersionsReasoningEffort$outboundSchema;
1025
+ }
1026
+
1027
+ /** @internal */
1028
+ export const ListPromptVersionsModelParameters$inboundSchema: z.ZodType<
1029
+ ListPromptVersionsModelParameters,
1030
+ z.ZodTypeDef,
1031
+ unknown
1032
+ > = z.object({
1033
+ temperature: z.number().optional(),
1034
+ maxTokens: z.number().optional(),
1035
+ topK: z.number().optional(),
1036
+ topP: z.number().optional(),
1037
+ frequencyPenalty: z.number().optional(),
1038
+ presencePenalty: z.number().optional(),
1039
+ numImages: z.number().optional(),
1040
+ seed: z.number().optional(),
1041
+ format: ListPromptVersionsFormat$inboundSchema.optional(),
1042
+ dimensions: z.string().optional(),
1043
+ quality: z.string().optional(),
1044
+ style: z.string().optional(),
1045
+ responseFormat: z.nullable(
1046
+ z.union([
1047
+ z.lazy(() => ListPromptVersionsResponseFormat1$inboundSchema),
1048
+ z.lazy(() => ListPromptVersionsResponseFormat2$inboundSchema),
1049
+ ]),
1050
+ ).optional(),
1051
+ photoRealVersion: ListPromptVersionsPhotoRealVersion$inboundSchema.optional(),
1052
+ encoding_format: ListPromptVersionsEncodingFormat$inboundSchema.optional(),
1053
+ reasoningEffort: ListPromptVersionsReasoningEffort$inboundSchema.optional(),
1054
+ budgetTokens: z.number().optional(),
1055
+ }).transform((v) => {
1056
+ return remap$(v, {
1057
+ "encoding_format": "encodingFormat",
1058
+ });
1059
+ });
1060
+
1061
+ /** @internal */
1062
+ export type ListPromptVersionsModelParameters$Outbound = {
1063
+ temperature?: number | undefined;
1064
+ maxTokens?: number | undefined;
1065
+ topK?: number | undefined;
1066
+ topP?: number | undefined;
1067
+ frequencyPenalty?: number | undefined;
1068
+ presencePenalty?: number | undefined;
1069
+ numImages?: number | undefined;
1070
+ seed?: number | undefined;
1071
+ format?: string | undefined;
1072
+ dimensions?: string | undefined;
1073
+ quality?: string | undefined;
1074
+ style?: string | undefined;
1075
+ responseFormat?:
1076
+ | ListPromptVersionsResponseFormat1$Outbound
1077
+ | ListPromptVersionsResponseFormat2$Outbound
1078
+ | null
1079
+ | undefined;
1080
+ photoRealVersion?: string | undefined;
1081
+ encoding_format?: string | undefined;
1082
+ reasoningEffort?: string | undefined;
1083
+ budgetTokens?: number | undefined;
1084
+ };
1085
+
1086
+ /** @internal */
1087
+ export const ListPromptVersionsModelParameters$outboundSchema: z.ZodType<
1088
+ ListPromptVersionsModelParameters$Outbound,
1089
+ z.ZodTypeDef,
1090
+ ListPromptVersionsModelParameters
1091
+ > = z.object({
1092
+ temperature: z.number().optional(),
1093
+ maxTokens: z.number().optional(),
1094
+ topK: z.number().optional(),
1095
+ topP: z.number().optional(),
1096
+ frequencyPenalty: z.number().optional(),
1097
+ presencePenalty: z.number().optional(),
1098
+ numImages: z.number().optional(),
1099
+ seed: z.number().optional(),
1100
+ format: ListPromptVersionsFormat$outboundSchema.optional(),
1101
+ dimensions: z.string().optional(),
1102
+ quality: z.string().optional(),
1103
+ style: z.string().optional(),
1104
+ responseFormat: z.nullable(
1105
+ z.union([
1106
+ z.lazy(() => ListPromptVersionsResponseFormat1$outboundSchema),
1107
+ z.lazy(() => ListPromptVersionsResponseFormat2$outboundSchema),
1108
+ ]),
1109
+ ).optional(),
1110
+ photoRealVersion: ListPromptVersionsPhotoRealVersion$outboundSchema
1111
+ .optional(),
1112
+ encodingFormat: ListPromptVersionsEncodingFormat$outboundSchema.optional(),
1113
+ reasoningEffort: ListPromptVersionsReasoningEffort$outboundSchema.optional(),
1114
+ budgetTokens: z.number().optional(),
1115
+ }).transform((v) => {
1116
+ return remap$(v, {
1117
+ encodingFormat: "encoding_format",
1118
+ });
1119
+ });
1120
+
1121
+ /**
1122
+ * @internal
1123
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1124
+ */
1125
+ export namespace ListPromptVersionsModelParameters$ {
1126
+ /** @deprecated use `ListPromptVersionsModelParameters$inboundSchema` instead. */
1127
+ export const inboundSchema = ListPromptVersionsModelParameters$inboundSchema;
1128
+ /** @deprecated use `ListPromptVersionsModelParameters$outboundSchema` instead. */
1129
+ export const outboundSchema =
1130
+ ListPromptVersionsModelParameters$outboundSchema;
1131
+ /** @deprecated use `ListPromptVersionsModelParameters$Outbound` instead. */
1132
+ export type Outbound = ListPromptVersionsModelParameters$Outbound;
1133
+ }
1134
+
1135
+ export function listPromptVersionsModelParametersToJSON(
1136
+ listPromptVersionsModelParameters: ListPromptVersionsModelParameters,
1137
+ ): string {
1138
+ return JSON.stringify(
1139
+ ListPromptVersionsModelParameters$outboundSchema.parse(
1140
+ listPromptVersionsModelParameters,
1141
+ ),
1142
+ );
1143
+ }
1144
+
1145
+ export function listPromptVersionsModelParametersFromJSON(
1146
+ jsonString: string,
1147
+ ): SafeParseResult<ListPromptVersionsModelParameters, SDKValidationError> {
1148
+ return safeParse(
1149
+ jsonString,
1150
+ (x) => ListPromptVersionsModelParameters$inboundSchema.parse(JSON.parse(x)),
1151
+ `Failed to parse 'ListPromptVersionsModelParameters' from JSON`,
1152
+ );
1153
+ }
1154
+
1155
+ /** @internal */
1156
+ export const ListPromptVersionsProvider$inboundSchema: z.ZodNativeEnum<
1157
+ typeof ListPromptVersionsProvider
1158
+ > = z.nativeEnum(ListPromptVersionsProvider);
1159
+
1160
+ /** @internal */
1161
+ export const ListPromptVersionsProvider$outboundSchema: z.ZodNativeEnum<
1162
+ typeof ListPromptVersionsProvider
1163
+ > = ListPromptVersionsProvider$inboundSchema;
1164
+
1165
+ /**
1166
+ * @internal
1167
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1168
+ */
1169
+ export namespace ListPromptVersionsProvider$ {
1170
+ /** @deprecated use `ListPromptVersionsProvider$inboundSchema` instead. */
1171
+ export const inboundSchema = ListPromptVersionsProvider$inboundSchema;
1172
+ /** @deprecated use `ListPromptVersionsProvider$outboundSchema` instead. */
1173
+ export const outboundSchema = ListPromptVersionsProvider$outboundSchema;
1174
+ }
1175
+
1176
+ /** @internal */
1177
+ export const ListPromptVersionsRole$inboundSchema: z.ZodNativeEnum<
1178
+ typeof ListPromptVersionsRole
1179
+ > = z.nativeEnum(ListPromptVersionsRole);
1180
+
1181
+ /** @internal */
1182
+ export const ListPromptVersionsRole$outboundSchema: z.ZodNativeEnum<
1183
+ typeof ListPromptVersionsRole
1184
+ > = ListPromptVersionsRole$inboundSchema;
1185
+
1186
+ /**
1187
+ * @internal
1188
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1189
+ */
1190
+ export namespace ListPromptVersionsRole$ {
1191
+ /** @deprecated use `ListPromptVersionsRole$inboundSchema` instead. */
1192
+ export const inboundSchema = ListPromptVersionsRole$inboundSchema;
1193
+ /** @deprecated use `ListPromptVersionsRole$outboundSchema` instead. */
1194
+ export const outboundSchema = ListPromptVersionsRole$outboundSchema;
1195
+ }
1196
+
1197
+ /** @internal */
1198
+ export const ListPromptVersions2PromptsResponseType$inboundSchema:
1199
+ z.ZodNativeEnum<typeof ListPromptVersions2PromptsResponseType> = z.nativeEnum(
1200
+ ListPromptVersions2PromptsResponseType,
1201
+ );
1202
+
1203
+ /** @internal */
1204
+ export const ListPromptVersions2PromptsResponseType$outboundSchema:
1205
+ z.ZodNativeEnum<typeof ListPromptVersions2PromptsResponseType> =
1206
+ ListPromptVersions2PromptsResponseType$inboundSchema;
1207
+
1208
+ /**
1209
+ * @internal
1210
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1211
+ */
1212
+ export namespace ListPromptVersions2PromptsResponseType$ {
1213
+ /** @deprecated use `ListPromptVersions2PromptsResponseType$inboundSchema` instead. */
1214
+ export const inboundSchema =
1215
+ ListPromptVersions2PromptsResponseType$inboundSchema;
1216
+ /** @deprecated use `ListPromptVersions2PromptsResponseType$outboundSchema` instead. */
1217
+ export const outboundSchema =
1218
+ ListPromptVersions2PromptsResponseType$outboundSchema;
1219
+ }
1220
+
1221
+ /** @internal */
1222
+ export const ListPromptVersions2File$inboundSchema: z.ZodType<
1223
+ ListPromptVersions2File,
1224
+ z.ZodTypeDef,
1225
+ unknown
1226
+ > = z.object({
1227
+ file_data: z.string(),
1228
+ filename: z.string().optional(),
1229
+ }).transform((v) => {
1230
+ return remap$(v, {
1231
+ "file_data": "fileData",
1232
+ });
1233
+ });
1234
+
1235
+ /** @internal */
1236
+ export type ListPromptVersions2File$Outbound = {
1237
+ file_data: string;
1238
+ filename?: string | undefined;
1239
+ };
1240
+
1241
+ /** @internal */
1242
+ export const ListPromptVersions2File$outboundSchema: z.ZodType<
1243
+ ListPromptVersions2File$Outbound,
1244
+ z.ZodTypeDef,
1245
+ ListPromptVersions2File
1246
+ > = z.object({
1247
+ fileData: z.string(),
1248
+ filename: z.string().optional(),
1249
+ }).transform((v) => {
1250
+ return remap$(v, {
1251
+ fileData: "file_data",
1252
+ });
1253
+ });
1254
+
1255
+ /**
1256
+ * @internal
1257
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1258
+ */
1259
+ export namespace ListPromptVersions2File$ {
1260
+ /** @deprecated use `ListPromptVersions2File$inboundSchema` instead. */
1261
+ export const inboundSchema = ListPromptVersions2File$inboundSchema;
1262
+ /** @deprecated use `ListPromptVersions2File$outboundSchema` instead. */
1263
+ export const outboundSchema = ListPromptVersions2File$outboundSchema;
1264
+ /** @deprecated use `ListPromptVersions2File$Outbound` instead. */
1265
+ export type Outbound = ListPromptVersions2File$Outbound;
1266
+ }
1267
+
1268
+ export function listPromptVersions2FileToJSON(
1269
+ listPromptVersions2File: ListPromptVersions2File,
1270
+ ): string {
1271
+ return JSON.stringify(
1272
+ ListPromptVersions2File$outboundSchema.parse(listPromptVersions2File),
1273
+ );
1274
+ }
1275
+
1276
+ export function listPromptVersions2FileFromJSON(
1277
+ jsonString: string,
1278
+ ): SafeParseResult<ListPromptVersions2File, SDKValidationError> {
1279
+ return safeParse(
1280
+ jsonString,
1281
+ (x) => ListPromptVersions2File$inboundSchema.parse(JSON.parse(x)),
1282
+ `Failed to parse 'ListPromptVersions2File' from JSON`,
1283
+ );
1284
+ }
1285
+
1286
+ /** @internal */
1287
+ export const ListPromptVersions23$inboundSchema: z.ZodType<
1288
+ ListPromptVersions23,
1289
+ z.ZodTypeDef,
1290
+ unknown
1291
+ > = z.object({
1292
+ type: ListPromptVersions2PromptsResponseType$inboundSchema,
1293
+ file: z.lazy(() => ListPromptVersions2File$inboundSchema),
1294
+ });
1295
+
1296
+ /** @internal */
1297
+ export type ListPromptVersions23$Outbound = {
1298
+ type: string;
1299
+ file: ListPromptVersions2File$Outbound;
1300
+ };
1301
+
1302
+ /** @internal */
1303
+ export const ListPromptVersions23$outboundSchema: z.ZodType<
1304
+ ListPromptVersions23$Outbound,
1305
+ z.ZodTypeDef,
1306
+ ListPromptVersions23
1307
+ > = z.object({
1308
+ type: ListPromptVersions2PromptsResponseType$outboundSchema,
1309
+ file: z.lazy(() => ListPromptVersions2File$outboundSchema),
1310
+ });
1311
+
1312
+ /**
1313
+ * @internal
1314
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1315
+ */
1316
+ export namespace ListPromptVersions23$ {
1317
+ /** @deprecated use `ListPromptVersions23$inboundSchema` instead. */
1318
+ export const inboundSchema = ListPromptVersions23$inboundSchema;
1319
+ /** @deprecated use `ListPromptVersions23$outboundSchema` instead. */
1320
+ export const outboundSchema = ListPromptVersions23$outboundSchema;
1321
+ /** @deprecated use `ListPromptVersions23$Outbound` instead. */
1322
+ export type Outbound = ListPromptVersions23$Outbound;
1323
+ }
1324
+
1325
+ export function listPromptVersions23ToJSON(
1326
+ listPromptVersions23: ListPromptVersions23,
1327
+ ): string {
1328
+ return JSON.stringify(
1329
+ ListPromptVersions23$outboundSchema.parse(listPromptVersions23),
1330
+ );
1331
+ }
1332
+
1333
+ export function listPromptVersions23FromJSON(
1334
+ jsonString: string,
1335
+ ): SafeParseResult<ListPromptVersions23, SDKValidationError> {
1336
+ return safeParse(
1337
+ jsonString,
1338
+ (x) => ListPromptVersions23$inboundSchema.parse(JSON.parse(x)),
1339
+ `Failed to parse 'ListPromptVersions23' from JSON`,
1340
+ );
1341
+ }
1342
+
1343
+ /** @internal */
1344
+ export const ListPromptVersions2PromptsType$inboundSchema: z.ZodNativeEnum<
1345
+ typeof ListPromptVersions2PromptsType
1346
+ > = z.nativeEnum(ListPromptVersions2PromptsType);
1347
+
1348
+ /** @internal */
1349
+ export const ListPromptVersions2PromptsType$outboundSchema: z.ZodNativeEnum<
1350
+ typeof ListPromptVersions2PromptsType
1351
+ > = ListPromptVersions2PromptsType$inboundSchema;
1352
+
1353
+ /**
1354
+ * @internal
1355
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1356
+ */
1357
+ export namespace ListPromptVersions2PromptsType$ {
1358
+ /** @deprecated use `ListPromptVersions2PromptsType$inboundSchema` instead. */
1359
+ export const inboundSchema = ListPromptVersions2PromptsType$inboundSchema;
1360
+ /** @deprecated use `ListPromptVersions2PromptsType$outboundSchema` instead. */
1361
+ export const outboundSchema = ListPromptVersions2PromptsType$outboundSchema;
1362
+ }
1363
+
1364
+ /** @internal */
1365
+ export const ListPromptVersions2ImageUrl$inboundSchema: z.ZodType<
1366
+ ListPromptVersions2ImageUrl,
1367
+ z.ZodTypeDef,
1368
+ unknown
1369
+ > = z.object({
1370
+ id: z.string().optional(),
1371
+ url: z.string(),
1372
+ detail: z.string().optional(),
1373
+ });
1374
+
1375
+ /** @internal */
1376
+ export type ListPromptVersions2ImageUrl$Outbound = {
1377
+ id?: string | undefined;
1378
+ url: string;
1379
+ detail?: string | undefined;
1380
+ };
1381
+
1382
+ /** @internal */
1383
+ export const ListPromptVersions2ImageUrl$outboundSchema: z.ZodType<
1384
+ ListPromptVersions2ImageUrl$Outbound,
1385
+ z.ZodTypeDef,
1386
+ ListPromptVersions2ImageUrl
1387
+ > = z.object({
1388
+ id: z.string().optional(),
1389
+ url: z.string(),
1390
+ detail: z.string().optional(),
1391
+ });
1392
+
1393
+ /**
1394
+ * @internal
1395
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1396
+ */
1397
+ export namespace ListPromptVersions2ImageUrl$ {
1398
+ /** @deprecated use `ListPromptVersions2ImageUrl$inboundSchema` instead. */
1399
+ export const inboundSchema = ListPromptVersions2ImageUrl$inboundSchema;
1400
+ /** @deprecated use `ListPromptVersions2ImageUrl$outboundSchema` instead. */
1401
+ export const outboundSchema = ListPromptVersions2ImageUrl$outboundSchema;
1402
+ /** @deprecated use `ListPromptVersions2ImageUrl$Outbound` instead. */
1403
+ export type Outbound = ListPromptVersions2ImageUrl$Outbound;
1404
+ }
1405
+
1406
+ export function listPromptVersions2ImageUrlToJSON(
1407
+ listPromptVersions2ImageUrl: ListPromptVersions2ImageUrl,
1408
+ ): string {
1409
+ return JSON.stringify(
1410
+ ListPromptVersions2ImageUrl$outboundSchema.parse(
1411
+ listPromptVersions2ImageUrl,
1412
+ ),
1413
+ );
1414
+ }
1415
+
1416
+ export function listPromptVersions2ImageUrlFromJSON(
1417
+ jsonString: string,
1418
+ ): SafeParseResult<ListPromptVersions2ImageUrl, SDKValidationError> {
1419
+ return safeParse(
1420
+ jsonString,
1421
+ (x) => ListPromptVersions2ImageUrl$inboundSchema.parse(JSON.parse(x)),
1422
+ `Failed to parse 'ListPromptVersions2ImageUrl' from JSON`,
1423
+ );
1424
+ }
1425
+
1426
+ /** @internal */
1427
+ export const ListPromptVersions22$inboundSchema: z.ZodType<
1428
+ ListPromptVersions22,
1429
+ z.ZodTypeDef,
1430
+ unknown
1431
+ > = z.object({
1432
+ type: ListPromptVersions2PromptsType$inboundSchema,
1433
+ image_url: z.lazy(() => ListPromptVersions2ImageUrl$inboundSchema),
1434
+ }).transform((v) => {
1435
+ return remap$(v, {
1436
+ "image_url": "imageUrl",
1437
+ });
1438
+ });
1439
+
1440
+ /** @internal */
1441
+ export type ListPromptVersions22$Outbound = {
1442
+ type: string;
1443
+ image_url: ListPromptVersions2ImageUrl$Outbound;
1444
+ };
1445
+
1446
+ /** @internal */
1447
+ export const ListPromptVersions22$outboundSchema: z.ZodType<
1448
+ ListPromptVersions22$Outbound,
1449
+ z.ZodTypeDef,
1450
+ ListPromptVersions22
1451
+ > = z.object({
1452
+ type: ListPromptVersions2PromptsType$outboundSchema,
1453
+ imageUrl: z.lazy(() => ListPromptVersions2ImageUrl$outboundSchema),
1454
+ }).transform((v) => {
1455
+ return remap$(v, {
1456
+ imageUrl: "image_url",
1457
+ });
1458
+ });
1459
+
1460
+ /**
1461
+ * @internal
1462
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1463
+ */
1464
+ export namespace ListPromptVersions22$ {
1465
+ /** @deprecated use `ListPromptVersions22$inboundSchema` instead. */
1466
+ export const inboundSchema = ListPromptVersions22$inboundSchema;
1467
+ /** @deprecated use `ListPromptVersions22$outboundSchema` instead. */
1468
+ export const outboundSchema = ListPromptVersions22$outboundSchema;
1469
+ /** @deprecated use `ListPromptVersions22$Outbound` instead. */
1470
+ export type Outbound = ListPromptVersions22$Outbound;
1471
+ }
1472
+
1473
+ export function listPromptVersions22ToJSON(
1474
+ listPromptVersions22: ListPromptVersions22,
1475
+ ): string {
1476
+ return JSON.stringify(
1477
+ ListPromptVersions22$outboundSchema.parse(listPromptVersions22),
1478
+ );
1479
+ }
1480
+
1481
+ export function listPromptVersions22FromJSON(
1482
+ jsonString: string,
1483
+ ): SafeParseResult<ListPromptVersions22, SDKValidationError> {
1484
+ return safeParse(
1485
+ jsonString,
1486
+ (x) => ListPromptVersions22$inboundSchema.parse(JSON.parse(x)),
1487
+ `Failed to parse 'ListPromptVersions22' from JSON`,
1488
+ );
1489
+ }
1490
+
1491
+ /** @internal */
1492
+ export const ListPromptVersions2Type$inboundSchema: z.ZodNativeEnum<
1493
+ typeof ListPromptVersions2Type
1494
+ > = z.nativeEnum(ListPromptVersions2Type);
1495
+
1496
+ /** @internal */
1497
+ export const ListPromptVersions2Type$outboundSchema: z.ZodNativeEnum<
1498
+ typeof ListPromptVersions2Type
1499
+ > = ListPromptVersions2Type$inboundSchema;
1500
+
1501
+ /**
1502
+ * @internal
1503
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1504
+ */
1505
+ export namespace ListPromptVersions2Type$ {
1506
+ /** @deprecated use `ListPromptVersions2Type$inboundSchema` instead. */
1507
+ export const inboundSchema = ListPromptVersions2Type$inboundSchema;
1508
+ /** @deprecated use `ListPromptVersions2Type$outboundSchema` instead. */
1509
+ export const outboundSchema = ListPromptVersions2Type$outboundSchema;
1510
+ }
1511
+
1512
+ /** @internal */
1513
+ export const ListPromptVersions21$inboundSchema: z.ZodType<
1514
+ ListPromptVersions21,
1515
+ z.ZodTypeDef,
1516
+ unknown
1517
+ > = z.object({
1518
+ type: ListPromptVersions2Type$inboundSchema,
1519
+ text: z.string(),
1520
+ });
1521
+
1522
+ /** @internal */
1523
+ export type ListPromptVersions21$Outbound = {
1524
+ type: string;
1525
+ text: string;
1526
+ };
1527
+
1528
+ /** @internal */
1529
+ export const ListPromptVersions21$outboundSchema: z.ZodType<
1530
+ ListPromptVersions21$Outbound,
1531
+ z.ZodTypeDef,
1532
+ ListPromptVersions21
1533
+ > = z.object({
1534
+ type: ListPromptVersions2Type$outboundSchema,
1535
+ text: z.string(),
1536
+ });
1537
+
1538
+ /**
1539
+ * @internal
1540
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1541
+ */
1542
+ export namespace ListPromptVersions21$ {
1543
+ /** @deprecated use `ListPromptVersions21$inboundSchema` instead. */
1544
+ export const inboundSchema = ListPromptVersions21$inboundSchema;
1545
+ /** @deprecated use `ListPromptVersions21$outboundSchema` instead. */
1546
+ export const outboundSchema = ListPromptVersions21$outboundSchema;
1547
+ /** @deprecated use `ListPromptVersions21$Outbound` instead. */
1548
+ export type Outbound = ListPromptVersions21$Outbound;
1549
+ }
1550
+
1551
+ export function listPromptVersions21ToJSON(
1552
+ listPromptVersions21: ListPromptVersions21,
1553
+ ): string {
1554
+ return JSON.stringify(
1555
+ ListPromptVersions21$outboundSchema.parse(listPromptVersions21),
1556
+ );
1557
+ }
1558
+
1559
+ export function listPromptVersions21FromJSON(
1560
+ jsonString: string,
1561
+ ): SafeParseResult<ListPromptVersions21, SDKValidationError> {
1562
+ return safeParse(
1563
+ jsonString,
1564
+ (x) => ListPromptVersions21$inboundSchema.parse(JSON.parse(x)),
1565
+ `Failed to parse 'ListPromptVersions21' from JSON`,
1566
+ );
1567
+ }
1568
+
1569
+ /** @internal */
1570
+ export const ListPromptVersionsContent2$inboundSchema: z.ZodType<
1571
+ ListPromptVersionsContent2,
1572
+ z.ZodTypeDef,
1573
+ unknown
1574
+ > = z.union([
1575
+ z.lazy(() => ListPromptVersions21$inboundSchema),
1576
+ z.lazy(() => ListPromptVersions22$inboundSchema),
1577
+ z.lazy(() => ListPromptVersions23$inboundSchema),
1578
+ ]);
1579
+
1580
+ /** @internal */
1581
+ export type ListPromptVersionsContent2$Outbound =
1582
+ | ListPromptVersions21$Outbound
1583
+ | ListPromptVersions22$Outbound
1584
+ | ListPromptVersions23$Outbound;
1585
+
1586
+ /** @internal */
1587
+ export const ListPromptVersionsContent2$outboundSchema: z.ZodType<
1588
+ ListPromptVersionsContent2$Outbound,
1589
+ z.ZodTypeDef,
1590
+ ListPromptVersionsContent2
1591
+ > = z.union([
1592
+ z.lazy(() => ListPromptVersions21$outboundSchema),
1593
+ z.lazy(() => ListPromptVersions22$outboundSchema),
1594
+ z.lazy(() => ListPromptVersions23$outboundSchema),
1595
+ ]);
1596
+
1597
+ /**
1598
+ * @internal
1599
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1600
+ */
1601
+ export namespace ListPromptVersionsContent2$ {
1602
+ /** @deprecated use `ListPromptVersionsContent2$inboundSchema` instead. */
1603
+ export const inboundSchema = ListPromptVersionsContent2$inboundSchema;
1604
+ /** @deprecated use `ListPromptVersionsContent2$outboundSchema` instead. */
1605
+ export const outboundSchema = ListPromptVersionsContent2$outboundSchema;
1606
+ /** @deprecated use `ListPromptVersionsContent2$Outbound` instead. */
1607
+ export type Outbound = ListPromptVersionsContent2$Outbound;
1608
+ }
1609
+
1610
+ export function listPromptVersionsContent2ToJSON(
1611
+ listPromptVersionsContent2: ListPromptVersionsContent2,
1612
+ ): string {
1613
+ return JSON.stringify(
1614
+ ListPromptVersionsContent2$outboundSchema.parse(listPromptVersionsContent2),
1615
+ );
1616
+ }
1617
+
1618
+ export function listPromptVersionsContent2FromJSON(
1619
+ jsonString: string,
1620
+ ): SafeParseResult<ListPromptVersionsContent2, SDKValidationError> {
1621
+ return safeParse(
1622
+ jsonString,
1623
+ (x) => ListPromptVersionsContent2$inboundSchema.parse(JSON.parse(x)),
1624
+ `Failed to parse 'ListPromptVersionsContent2' from JSON`,
1625
+ );
1626
+ }
1627
+
1628
+ /** @internal */
1629
+ export const ListPromptVersionsContent$inboundSchema: z.ZodType<
1630
+ ListPromptVersionsContent,
1631
+ z.ZodTypeDef,
1632
+ unknown
1633
+ > = z.union([
1634
+ z.string(),
1635
+ z.array(z.union([
1636
+ z.lazy(() => ListPromptVersions21$inboundSchema),
1637
+ z.lazy(() => ListPromptVersions22$inboundSchema),
1638
+ z.lazy(() => ListPromptVersions23$inboundSchema),
1639
+ ])),
1640
+ ]);
1641
+
1642
+ /** @internal */
1643
+ export type ListPromptVersionsContent$Outbound =
1644
+ | string
1645
+ | Array<
1646
+ | ListPromptVersions21$Outbound
1647
+ | ListPromptVersions22$Outbound
1648
+ | ListPromptVersions23$Outbound
1649
+ >;
1650
+
1651
+ /** @internal */
1652
+ export const ListPromptVersionsContent$outboundSchema: z.ZodType<
1653
+ ListPromptVersionsContent$Outbound,
1654
+ z.ZodTypeDef,
1655
+ ListPromptVersionsContent
1656
+ > = z.union([
1657
+ z.string(),
1658
+ z.array(z.union([
1659
+ z.lazy(() => ListPromptVersions21$outboundSchema),
1660
+ z.lazy(() => ListPromptVersions22$outboundSchema),
1661
+ z.lazy(() => ListPromptVersions23$outboundSchema),
1662
+ ])),
1663
+ ]);
1664
+
1665
+ /**
1666
+ * @internal
1667
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1668
+ */
1669
+ export namespace ListPromptVersionsContent$ {
1670
+ /** @deprecated use `ListPromptVersionsContent$inboundSchema` instead. */
1671
+ export const inboundSchema = ListPromptVersionsContent$inboundSchema;
1672
+ /** @deprecated use `ListPromptVersionsContent$outboundSchema` instead. */
1673
+ export const outboundSchema = ListPromptVersionsContent$outboundSchema;
1674
+ /** @deprecated use `ListPromptVersionsContent$Outbound` instead. */
1675
+ export type Outbound = ListPromptVersionsContent$Outbound;
1676
+ }
1677
+
1678
+ export function listPromptVersionsContentToJSON(
1679
+ listPromptVersionsContent: ListPromptVersionsContent,
1680
+ ): string {
1681
+ return JSON.stringify(
1682
+ ListPromptVersionsContent$outboundSchema.parse(listPromptVersionsContent),
1683
+ );
1684
+ }
1685
+
1686
+ export function listPromptVersionsContentFromJSON(
1687
+ jsonString: string,
1688
+ ): SafeParseResult<ListPromptVersionsContent, SDKValidationError> {
1689
+ return safeParse(
1690
+ jsonString,
1691
+ (x) => ListPromptVersionsContent$inboundSchema.parse(JSON.parse(x)),
1692
+ `Failed to parse 'ListPromptVersionsContent' from JSON`,
1693
+ );
1694
+ }
1695
+
1696
+ /** @internal */
1697
+ export const ListPromptVersionsType$inboundSchema: z.ZodNativeEnum<
1698
+ typeof ListPromptVersionsType
1699
+ > = z.nativeEnum(ListPromptVersionsType);
1700
+
1701
+ /** @internal */
1702
+ export const ListPromptVersionsType$outboundSchema: z.ZodNativeEnum<
1703
+ typeof ListPromptVersionsType
1704
+ > = ListPromptVersionsType$inboundSchema;
1705
+
1706
+ /**
1707
+ * @internal
1708
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1709
+ */
1710
+ export namespace ListPromptVersionsType$ {
1711
+ /** @deprecated use `ListPromptVersionsType$inboundSchema` instead. */
1712
+ export const inboundSchema = ListPromptVersionsType$inboundSchema;
1713
+ /** @deprecated use `ListPromptVersionsType$outboundSchema` instead. */
1714
+ export const outboundSchema = ListPromptVersionsType$outboundSchema;
1715
+ }
1716
+
1717
+ /** @internal */
1718
+ export const ListPromptVersionsFunction$inboundSchema: z.ZodType<
1719
+ ListPromptVersionsFunction,
1720
+ z.ZodTypeDef,
1721
+ unknown
1722
+ > = z.object({
1723
+ name: z.string(),
1724
+ arguments: z.string(),
1725
+ });
1726
+
1727
+ /** @internal */
1728
+ export type ListPromptVersionsFunction$Outbound = {
1729
+ name: string;
1730
+ arguments: string;
1731
+ };
1732
+
1733
+ /** @internal */
1734
+ export const ListPromptVersionsFunction$outboundSchema: z.ZodType<
1735
+ ListPromptVersionsFunction$Outbound,
1736
+ z.ZodTypeDef,
1737
+ ListPromptVersionsFunction
1738
+ > = z.object({
1739
+ name: z.string(),
1740
+ arguments: z.string(),
1741
+ });
1742
+
1743
+ /**
1744
+ * @internal
1745
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1746
+ */
1747
+ export namespace ListPromptVersionsFunction$ {
1748
+ /** @deprecated use `ListPromptVersionsFunction$inboundSchema` instead. */
1749
+ export const inboundSchema = ListPromptVersionsFunction$inboundSchema;
1750
+ /** @deprecated use `ListPromptVersionsFunction$outboundSchema` instead. */
1751
+ export const outboundSchema = ListPromptVersionsFunction$outboundSchema;
1752
+ /** @deprecated use `ListPromptVersionsFunction$Outbound` instead. */
1753
+ export type Outbound = ListPromptVersionsFunction$Outbound;
1754
+ }
1755
+
1756
+ export function listPromptVersionsFunctionToJSON(
1757
+ listPromptVersionsFunction: ListPromptVersionsFunction,
1758
+ ): string {
1759
+ return JSON.stringify(
1760
+ ListPromptVersionsFunction$outboundSchema.parse(listPromptVersionsFunction),
1761
+ );
1762
+ }
1763
+
1764
+ export function listPromptVersionsFunctionFromJSON(
1765
+ jsonString: string,
1766
+ ): SafeParseResult<ListPromptVersionsFunction, SDKValidationError> {
1767
+ return safeParse(
1768
+ jsonString,
1769
+ (x) => ListPromptVersionsFunction$inboundSchema.parse(JSON.parse(x)),
1770
+ `Failed to parse 'ListPromptVersionsFunction' from JSON`,
1771
+ );
1772
+ }
1773
+
1774
+ /** @internal */
1775
+ export const ListPromptVersionsToolCalls$inboundSchema: z.ZodType<
1776
+ ListPromptVersionsToolCalls,
1777
+ z.ZodTypeDef,
1778
+ unknown
1779
+ > = z.object({
1780
+ id: z.string().optional(),
1781
+ index: z.number().optional(),
1782
+ type: ListPromptVersionsType$inboundSchema,
1783
+ function: z.lazy(() => ListPromptVersionsFunction$inboundSchema),
1784
+ });
1785
+
1786
+ /** @internal */
1787
+ export type ListPromptVersionsToolCalls$Outbound = {
1788
+ id?: string | undefined;
1789
+ index?: number | undefined;
1790
+ type: string;
1791
+ function: ListPromptVersionsFunction$Outbound;
1792
+ };
1793
+
1794
+ /** @internal */
1795
+ export const ListPromptVersionsToolCalls$outboundSchema: z.ZodType<
1796
+ ListPromptVersionsToolCalls$Outbound,
1797
+ z.ZodTypeDef,
1798
+ ListPromptVersionsToolCalls
1799
+ > = z.object({
1800
+ id: z.string().optional(),
1801
+ index: z.number().optional(),
1802
+ type: ListPromptVersionsType$outboundSchema,
1803
+ function: z.lazy(() => ListPromptVersionsFunction$outboundSchema),
1804
+ });
1805
+
1806
+ /**
1807
+ * @internal
1808
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1809
+ */
1810
+ export namespace ListPromptVersionsToolCalls$ {
1811
+ /** @deprecated use `ListPromptVersionsToolCalls$inboundSchema` instead. */
1812
+ export const inboundSchema = ListPromptVersionsToolCalls$inboundSchema;
1813
+ /** @deprecated use `ListPromptVersionsToolCalls$outboundSchema` instead. */
1814
+ export const outboundSchema = ListPromptVersionsToolCalls$outboundSchema;
1815
+ /** @deprecated use `ListPromptVersionsToolCalls$Outbound` instead. */
1816
+ export type Outbound = ListPromptVersionsToolCalls$Outbound;
1817
+ }
1818
+
1819
+ export function listPromptVersionsToolCallsToJSON(
1820
+ listPromptVersionsToolCalls: ListPromptVersionsToolCalls,
1821
+ ): string {
1822
+ return JSON.stringify(
1823
+ ListPromptVersionsToolCalls$outboundSchema.parse(
1824
+ listPromptVersionsToolCalls,
1825
+ ),
1826
+ );
1827
+ }
1828
+
1829
+ export function listPromptVersionsToolCallsFromJSON(
1830
+ jsonString: string,
1831
+ ): SafeParseResult<ListPromptVersionsToolCalls, SDKValidationError> {
1832
+ return safeParse(
1833
+ jsonString,
1834
+ (x) => ListPromptVersionsToolCalls$inboundSchema.parse(JSON.parse(x)),
1835
+ `Failed to parse 'ListPromptVersionsToolCalls' from JSON`,
1836
+ );
1837
+ }
1838
+
1839
+ /** @internal */
1840
+ export const ListPromptVersionsMessages$inboundSchema: z.ZodType<
1841
+ ListPromptVersionsMessages,
1842
+ z.ZodTypeDef,
1843
+ unknown
1844
+ > = z.object({
1845
+ role: ListPromptVersionsRole$inboundSchema,
1846
+ content: z.union([
1847
+ z.string(),
1848
+ z.array(z.union([
1849
+ z.lazy(() => ListPromptVersions21$inboundSchema),
1850
+ z.lazy(() => ListPromptVersions22$inboundSchema),
1851
+ z.lazy(() => ListPromptVersions23$inboundSchema),
1852
+ ])),
1853
+ ]),
1854
+ tool_calls: z.array(z.lazy(() => ListPromptVersionsToolCalls$inboundSchema))
1855
+ .optional(),
1856
+ tool_call_id: z.string().optional(),
1857
+ }).transform((v) => {
1858
+ return remap$(v, {
1859
+ "tool_calls": "toolCalls",
1860
+ "tool_call_id": "toolCallId",
1861
+ });
1862
+ });
1863
+
1864
+ /** @internal */
1865
+ export type ListPromptVersionsMessages$Outbound = {
1866
+ role: string;
1867
+ content:
1868
+ | string
1869
+ | Array<
1870
+ | ListPromptVersions21$Outbound
1871
+ | ListPromptVersions22$Outbound
1872
+ | ListPromptVersions23$Outbound
1873
+ >;
1874
+ tool_calls?: Array<ListPromptVersionsToolCalls$Outbound> | undefined;
1875
+ tool_call_id?: string | undefined;
1876
+ };
1877
+
1878
+ /** @internal */
1879
+ export const ListPromptVersionsMessages$outboundSchema: z.ZodType<
1880
+ ListPromptVersionsMessages$Outbound,
1881
+ z.ZodTypeDef,
1882
+ ListPromptVersionsMessages
1883
+ > = z.object({
1884
+ role: ListPromptVersionsRole$outboundSchema,
1885
+ content: z.union([
1886
+ z.string(),
1887
+ z.array(z.union([
1888
+ z.lazy(() => ListPromptVersions21$outboundSchema),
1889
+ z.lazy(() => ListPromptVersions22$outboundSchema),
1890
+ z.lazy(() => ListPromptVersions23$outboundSchema),
1891
+ ])),
1892
+ ]),
1893
+ toolCalls: z.array(z.lazy(() => ListPromptVersionsToolCalls$outboundSchema))
1894
+ .optional(),
1895
+ toolCallId: z.string().optional(),
1896
+ }).transform((v) => {
1897
+ return remap$(v, {
1898
+ toolCalls: "tool_calls",
1899
+ toolCallId: "tool_call_id",
1900
+ });
1901
+ });
1902
+
1903
+ /**
1904
+ * @internal
1905
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1906
+ */
1907
+ export namespace ListPromptVersionsMessages$ {
1908
+ /** @deprecated use `ListPromptVersionsMessages$inboundSchema` instead. */
1909
+ export const inboundSchema = ListPromptVersionsMessages$inboundSchema;
1910
+ /** @deprecated use `ListPromptVersionsMessages$outboundSchema` instead. */
1911
+ export const outboundSchema = ListPromptVersionsMessages$outboundSchema;
1912
+ /** @deprecated use `ListPromptVersionsMessages$Outbound` instead. */
1913
+ export type Outbound = ListPromptVersionsMessages$Outbound;
1914
+ }
1915
+
1916
+ export function listPromptVersionsMessagesToJSON(
1917
+ listPromptVersionsMessages: ListPromptVersionsMessages,
1918
+ ): string {
1919
+ return JSON.stringify(
1920
+ ListPromptVersionsMessages$outboundSchema.parse(listPromptVersionsMessages),
1921
+ );
1922
+ }
1923
+
1924
+ export function listPromptVersionsMessagesFromJSON(
1925
+ jsonString: string,
1926
+ ): SafeParseResult<ListPromptVersionsMessages, SDKValidationError> {
1927
+ return safeParse(
1928
+ jsonString,
1929
+ (x) => ListPromptVersionsMessages$inboundSchema.parse(JSON.parse(x)),
1930
+ `Failed to parse 'ListPromptVersionsMessages' from JSON`,
1931
+ );
1932
+ }
1933
+
1934
+ /** @internal */
1935
+ export const ListPromptVersionsPromptConfig$inboundSchema: z.ZodType<
1936
+ ListPromptVersionsPromptConfig,
1937
+ z.ZodTypeDef,
1938
+ unknown
1939
+ > = z.object({
1940
+ stream: z.boolean().optional(),
1941
+ model: z.string().optional(),
1942
+ model_db_id: z.nullable(z.string()).optional(),
1943
+ model_type: z.nullable(ListPromptVersionsModelType$inboundSchema).optional(),
1944
+ model_parameters: z.lazy(() =>
1945
+ ListPromptVersionsModelParameters$inboundSchema
1946
+ ).optional(),
1947
+ provider: ListPromptVersionsProvider$inboundSchema.optional(),
1948
+ integration_id: z.nullable(z.string()).optional(),
1949
+ version: z.string().optional(),
1950
+ messages: z.array(z.lazy(() => ListPromptVersionsMessages$inboundSchema)),
1951
+ }).transform((v) => {
1952
+ return remap$(v, {
1953
+ "model_db_id": "modelDbId",
1954
+ "model_type": "modelType",
1955
+ "model_parameters": "modelParameters",
1956
+ "integration_id": "integrationId",
1957
+ });
1958
+ });
1959
+
1960
+ /** @internal */
1961
+ export type ListPromptVersionsPromptConfig$Outbound = {
1962
+ stream?: boolean | undefined;
1963
+ model?: string | undefined;
1964
+ model_db_id?: string | null | undefined;
1965
+ model_type?: string | null | undefined;
1966
+ model_parameters?: ListPromptVersionsModelParameters$Outbound | undefined;
1967
+ provider?: string | undefined;
1968
+ integration_id?: string | null | undefined;
1969
+ version?: string | undefined;
1970
+ messages: Array<ListPromptVersionsMessages$Outbound>;
1971
+ };
1972
+
1973
+ /** @internal */
1974
+ export const ListPromptVersionsPromptConfig$outboundSchema: z.ZodType<
1975
+ ListPromptVersionsPromptConfig$Outbound,
1976
+ z.ZodTypeDef,
1977
+ ListPromptVersionsPromptConfig
1978
+ > = z.object({
1979
+ stream: z.boolean().optional(),
1980
+ model: z.string().optional(),
1981
+ modelDbId: z.nullable(z.string()).optional(),
1982
+ modelType: z.nullable(ListPromptVersionsModelType$outboundSchema).optional(),
1983
+ modelParameters: z.lazy(() =>
1984
+ ListPromptVersionsModelParameters$outboundSchema
1985
+ ).optional(),
1986
+ provider: ListPromptVersionsProvider$outboundSchema.optional(),
1987
+ integrationId: z.nullable(z.string()).optional(),
1988
+ version: z.string().optional(),
1989
+ messages: z.array(z.lazy(() => ListPromptVersionsMessages$outboundSchema)),
1990
+ }).transform((v) => {
1991
+ return remap$(v, {
1992
+ modelDbId: "model_db_id",
1993
+ modelType: "model_type",
1994
+ modelParameters: "model_parameters",
1995
+ integrationId: "integration_id",
1996
+ });
1997
+ });
1998
+
1999
+ /**
2000
+ * @internal
2001
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2002
+ */
2003
+ export namespace ListPromptVersionsPromptConfig$ {
2004
+ /** @deprecated use `ListPromptVersionsPromptConfig$inboundSchema` instead. */
2005
+ export const inboundSchema = ListPromptVersionsPromptConfig$inboundSchema;
2006
+ /** @deprecated use `ListPromptVersionsPromptConfig$outboundSchema` instead. */
2007
+ export const outboundSchema = ListPromptVersionsPromptConfig$outboundSchema;
2008
+ /** @deprecated use `ListPromptVersionsPromptConfig$Outbound` instead. */
2009
+ export type Outbound = ListPromptVersionsPromptConfig$Outbound;
2010
+ }
2011
+
2012
+ export function listPromptVersionsPromptConfigToJSON(
2013
+ listPromptVersionsPromptConfig: ListPromptVersionsPromptConfig,
2014
+ ): string {
2015
+ return JSON.stringify(
2016
+ ListPromptVersionsPromptConfig$outboundSchema.parse(
2017
+ listPromptVersionsPromptConfig,
2018
+ ),
2019
+ );
2020
+ }
2021
+
2022
+ export function listPromptVersionsPromptConfigFromJSON(
2023
+ jsonString: string,
2024
+ ): SafeParseResult<ListPromptVersionsPromptConfig, SDKValidationError> {
2025
+ return safeParse(
2026
+ jsonString,
2027
+ (x) => ListPromptVersionsPromptConfig$inboundSchema.parse(JSON.parse(x)),
2028
+ `Failed to parse 'ListPromptVersionsPromptConfig' from JSON`,
2029
+ );
2030
+ }
2031
+
2032
+ /** @internal */
2033
+ export const ListPromptVersionsUseCases$inboundSchema: z.ZodNativeEnum<
2034
+ typeof ListPromptVersionsUseCases
2035
+ > = z.nativeEnum(ListPromptVersionsUseCases);
2036
+
2037
+ /** @internal */
2038
+ export const ListPromptVersionsUseCases$outboundSchema: z.ZodNativeEnum<
2039
+ typeof ListPromptVersionsUseCases
2040
+ > = ListPromptVersionsUseCases$inboundSchema;
2041
+
2042
+ /**
2043
+ * @internal
2044
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2045
+ */
2046
+ export namespace ListPromptVersionsUseCases$ {
2047
+ /** @deprecated use `ListPromptVersionsUseCases$inboundSchema` instead. */
2048
+ export const inboundSchema = ListPromptVersionsUseCases$inboundSchema;
2049
+ /** @deprecated use `ListPromptVersionsUseCases$outboundSchema` instead. */
2050
+ export const outboundSchema = ListPromptVersionsUseCases$outboundSchema;
2051
+ }
2052
+
2053
+ /** @internal */
2054
+ export const ListPromptVersionsLanguage$inboundSchema: z.ZodNativeEnum<
2055
+ typeof ListPromptVersionsLanguage
2056
+ > = z.nativeEnum(ListPromptVersionsLanguage);
2057
+
2058
+ /** @internal */
2059
+ export const ListPromptVersionsLanguage$outboundSchema: z.ZodNativeEnum<
2060
+ typeof ListPromptVersionsLanguage
2061
+ > = ListPromptVersionsLanguage$inboundSchema;
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 ListPromptVersionsLanguage$ {
2068
+ /** @deprecated use `ListPromptVersionsLanguage$inboundSchema` instead. */
2069
+ export const inboundSchema = ListPromptVersionsLanguage$inboundSchema;
2070
+ /** @deprecated use `ListPromptVersionsLanguage$outboundSchema` instead. */
2071
+ export const outboundSchema = ListPromptVersionsLanguage$outboundSchema;
2072
+ }
2073
+
2074
+ /** @internal */
2075
+ export const ListPromptVersionsMetadata$inboundSchema: z.ZodType<
2076
+ ListPromptVersionsMetadata,
2077
+ z.ZodTypeDef,
2078
+ unknown
2079
+ > = z.object({
2080
+ use_cases: z.array(ListPromptVersionsUseCases$inboundSchema).optional(),
2081
+ language: z.nullable(ListPromptVersionsLanguage$inboundSchema).optional(),
2082
+ }).transform((v) => {
2083
+ return remap$(v, {
2084
+ "use_cases": "useCases",
2085
+ });
2086
+ });
2087
+
2088
+ /** @internal */
2089
+ export type ListPromptVersionsMetadata$Outbound = {
2090
+ use_cases?: Array<string> | undefined;
2091
+ language?: string | null | undefined;
2092
+ };
2093
+
2094
+ /** @internal */
2095
+ export const ListPromptVersionsMetadata$outboundSchema: z.ZodType<
2096
+ ListPromptVersionsMetadata$Outbound,
2097
+ z.ZodTypeDef,
2098
+ ListPromptVersionsMetadata
2099
+ > = z.object({
2100
+ useCases: z.array(ListPromptVersionsUseCases$outboundSchema).optional(),
2101
+ language: z.nullable(ListPromptVersionsLanguage$outboundSchema).optional(),
2102
+ }).transform((v) => {
2103
+ return remap$(v, {
2104
+ useCases: "use_cases",
2105
+ });
2106
+ });
2107
+
2108
+ /**
2109
+ * @internal
2110
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2111
+ */
2112
+ export namespace ListPromptVersionsMetadata$ {
2113
+ /** @deprecated use `ListPromptVersionsMetadata$inboundSchema` instead. */
2114
+ export const inboundSchema = ListPromptVersionsMetadata$inboundSchema;
2115
+ /** @deprecated use `ListPromptVersionsMetadata$outboundSchema` instead. */
2116
+ export const outboundSchema = ListPromptVersionsMetadata$outboundSchema;
2117
+ /** @deprecated use `ListPromptVersionsMetadata$Outbound` instead. */
2118
+ export type Outbound = ListPromptVersionsMetadata$Outbound;
2119
+ }
2120
+
2121
+ export function listPromptVersionsMetadataToJSON(
2122
+ listPromptVersionsMetadata: ListPromptVersionsMetadata,
2123
+ ): string {
2124
+ return JSON.stringify(
2125
+ ListPromptVersionsMetadata$outboundSchema.parse(listPromptVersionsMetadata),
2126
+ );
2127
+ }
2128
+
2129
+ export function listPromptVersionsMetadataFromJSON(
2130
+ jsonString: string,
2131
+ ): SafeParseResult<ListPromptVersionsMetadata, SDKValidationError> {
2132
+ return safeParse(
2133
+ jsonString,
2134
+ (x) => ListPromptVersionsMetadata$inboundSchema.parse(JSON.parse(x)),
2135
+ `Failed to parse 'ListPromptVersionsMetadata' from JSON`,
2136
+ );
2137
+ }
2138
+
2139
+ /** @internal */
2140
+ export const ListPromptVersionsData$inboundSchema: z.ZodType<
2141
+ ListPromptVersionsData,
2142
+ z.ZodTypeDef,
2143
+ unknown
2144
+ > = z.object({
2145
+ _id: z.string(),
2146
+ created_by_id: z.nullable(z.string()).optional(),
2147
+ updated_by_id: z.nullable(z.string()).optional(),
2148
+ description: z.nullable(z.string()).optional(),
2149
+ prompt_config: z.lazy(() => ListPromptVersionsPromptConfig$inboundSchema),
2150
+ metadata: z.lazy(() => ListPromptVersionsMetadata$inboundSchema).optional(),
2151
+ timestamp: z.string(),
2152
+ }).transform((v) => {
2153
+ return remap$(v, {
2154
+ "_id": "id",
2155
+ "created_by_id": "createdById",
2156
+ "updated_by_id": "updatedById",
2157
+ "prompt_config": "promptConfig",
2158
+ });
2159
+ });
2160
+
2161
+ /** @internal */
2162
+ export type ListPromptVersionsData$Outbound = {
2163
+ _id: string;
2164
+ created_by_id?: string | null | undefined;
2165
+ updated_by_id?: string | null | undefined;
2166
+ description?: string | null | undefined;
2167
+ prompt_config: ListPromptVersionsPromptConfig$Outbound;
2168
+ metadata?: ListPromptVersionsMetadata$Outbound | undefined;
2169
+ timestamp: string;
2170
+ };
2171
+
2172
+ /** @internal */
2173
+ export const ListPromptVersionsData$outboundSchema: z.ZodType<
2174
+ ListPromptVersionsData$Outbound,
2175
+ z.ZodTypeDef,
2176
+ ListPromptVersionsData
2177
+ > = z.object({
2178
+ id: z.string(),
2179
+ createdById: z.nullable(z.string()).optional(),
2180
+ updatedById: z.nullable(z.string()).optional(),
2181
+ description: z.nullable(z.string()).optional(),
2182
+ promptConfig: z.lazy(() => ListPromptVersionsPromptConfig$outboundSchema),
2183
+ metadata: z.lazy(() => ListPromptVersionsMetadata$outboundSchema).optional(),
2184
+ timestamp: z.string(),
2185
+ }).transform((v) => {
2186
+ return remap$(v, {
2187
+ id: "_id",
2188
+ createdById: "created_by_id",
2189
+ updatedById: "updated_by_id",
2190
+ promptConfig: "prompt_config",
2191
+ });
2192
+ });
2193
+
2194
+ /**
2195
+ * @internal
2196
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2197
+ */
2198
+ export namespace ListPromptVersionsData$ {
2199
+ /** @deprecated use `ListPromptVersionsData$inboundSchema` instead. */
2200
+ export const inboundSchema = ListPromptVersionsData$inboundSchema;
2201
+ /** @deprecated use `ListPromptVersionsData$outboundSchema` instead. */
2202
+ export const outboundSchema = ListPromptVersionsData$outboundSchema;
2203
+ /** @deprecated use `ListPromptVersionsData$Outbound` instead. */
2204
+ export type Outbound = ListPromptVersionsData$Outbound;
2205
+ }
2206
+
2207
+ export function listPromptVersionsDataToJSON(
2208
+ listPromptVersionsData: ListPromptVersionsData,
2209
+ ): string {
2210
+ return JSON.stringify(
2211
+ ListPromptVersionsData$outboundSchema.parse(listPromptVersionsData),
2212
+ );
2213
+ }
2214
+
2215
+ export function listPromptVersionsDataFromJSON(
2216
+ jsonString: string,
2217
+ ): SafeParseResult<ListPromptVersionsData, SDKValidationError> {
2218
+ return safeParse(
2219
+ jsonString,
2220
+ (x) => ListPromptVersionsData$inboundSchema.parse(JSON.parse(x)),
2221
+ `Failed to parse 'ListPromptVersionsData' from JSON`,
2222
+ );
2223
+ }
2224
+
2225
+ /** @internal */
2226
+ export const ListPromptVersionsResponseBody$inboundSchema: z.ZodType<
2227
+ ListPromptVersionsResponseBody,
2228
+ z.ZodTypeDef,
2229
+ unknown
2230
+ > = z.object({
2231
+ object: ListPromptVersionsObject$inboundSchema,
2232
+ data: z.array(z.lazy(() => ListPromptVersionsData$inboundSchema)),
2233
+ has_more: z.boolean(),
2234
+ }).transform((v) => {
2235
+ return remap$(v, {
2236
+ "has_more": "hasMore",
2237
+ });
2238
+ });
2239
+
2240
+ /** @internal */
2241
+ export type ListPromptVersionsResponseBody$Outbound = {
2242
+ object: string;
2243
+ data: Array<ListPromptVersionsData$Outbound>;
2244
+ has_more: boolean;
2245
+ };
2246
+
2247
+ /** @internal */
2248
+ export const ListPromptVersionsResponseBody$outboundSchema: z.ZodType<
2249
+ ListPromptVersionsResponseBody$Outbound,
2250
+ z.ZodTypeDef,
2251
+ ListPromptVersionsResponseBody
2252
+ > = z.object({
2253
+ object: ListPromptVersionsObject$outboundSchema,
2254
+ data: z.array(z.lazy(() => ListPromptVersionsData$outboundSchema)),
2255
+ hasMore: z.boolean(),
2256
+ }).transform((v) => {
2257
+ return remap$(v, {
2258
+ hasMore: "has_more",
2259
+ });
2260
+ });
2261
+
2262
+ /**
2263
+ * @internal
2264
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2265
+ */
2266
+ export namespace ListPromptVersionsResponseBody$ {
2267
+ /** @deprecated use `ListPromptVersionsResponseBody$inboundSchema` instead. */
2268
+ export const inboundSchema = ListPromptVersionsResponseBody$inboundSchema;
2269
+ /** @deprecated use `ListPromptVersionsResponseBody$outboundSchema` instead. */
2270
+ export const outboundSchema = ListPromptVersionsResponseBody$outboundSchema;
2271
+ /** @deprecated use `ListPromptVersionsResponseBody$Outbound` instead. */
2272
+ export type Outbound = ListPromptVersionsResponseBody$Outbound;
2273
+ }
2274
+
2275
+ export function listPromptVersionsResponseBodyToJSON(
2276
+ listPromptVersionsResponseBody: ListPromptVersionsResponseBody,
2277
+ ): string {
2278
+ return JSON.stringify(
2279
+ ListPromptVersionsResponseBody$outboundSchema.parse(
2280
+ listPromptVersionsResponseBody,
2281
+ ),
2282
+ );
2283
+ }
2284
+
2285
+ export function listPromptVersionsResponseBodyFromJSON(
2286
+ jsonString: string,
2287
+ ): SafeParseResult<ListPromptVersionsResponseBody, SDKValidationError> {
2288
+ return safeParse(
2289
+ jsonString,
2290
+ (x) => ListPromptVersionsResponseBody$inboundSchema.parse(JSON.parse(x)),
2291
+ `Failed to parse 'ListPromptVersionsResponseBody' from JSON`,
2292
+ );
2293
+ }