@orq-ai/node 3.12.0-rc.50 → 3.12.1

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