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