@orq-ai/node 3.11.2 → 3.12.0-rc.0

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