@orq-ai/node 3.6.2 → 3.7.0-rc.2

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