@orq-ai/node 3.10.6 → 3.11.0-rc.2

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