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