@orq-ai/node 3.9.2 → 3.10.0-rc.0

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