@orq-ai/node 4.7.0-rc.56 → 4.7.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 (502) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/lib/config.js.map +1 -1
  5. package/models/components/reasoningpart.js +1 -1
  6. package/models/operations/createcontact.js +1 -1
  7. package/models/operations/createdataset.js +1 -1
  8. package/models/operations/createdatasetitem.js +4 -4
  9. package/models/operations/createdatasource.js +1 -1
  10. package/models/operations/createeval.js +16 -16
  11. package/models/operations/createidentity.js +1 -1
  12. package/models/operations/createtool.js +6 -6
  13. package/models/operations/getalltools.js +6 -6
  14. package/models/operations/getevals.js +16 -16
  15. package/models/operations/getv2humanevals.js +6 -6
  16. package/models/operations/getv2humanevalsets.js +2 -2
  17. package/models/operations/getv2humanevalsetsid.js +2 -2
  18. package/models/operations/getv2humanevalsid.js +6 -6
  19. package/models/operations/listdatasetdatapoints.js +4 -4
  20. package/models/operations/listdatasets.js +1 -1
  21. package/models/operations/listdatasources.js +1 -1
  22. package/models/operations/listidentities.js +1 -1
  23. package/models/operations/patchv2humanevalsetsid.js +2 -2
  24. package/models/operations/patchv2humanevalsid.js +12 -12
  25. package/models/operations/postv2feedbackevaluation.js +3 -3
  26. package/models/operations/postv2humanevals.js +12 -12
  27. package/models/operations/postv2humanevalsets.js +2 -2
  28. package/models/operations/retrievedatapoint.js +4 -4
  29. package/models/operations/retrievedataset.js +1 -1
  30. package/models/operations/retrievedatasource.js +1 -1
  31. package/models/operations/retrieveidentity.js +1 -1
  32. package/models/operations/retrievetool.js +6 -6
  33. package/models/operations/runagent.js +1 -1
  34. package/models/operations/streamrunagent.js +1 -1
  35. package/models/operations/updatedatapoint.js +4 -4
  36. package/models/operations/updatedataset.js +1 -1
  37. package/models/operations/updatedatasource.js +1 -1
  38. package/models/operations/updateeval.js +16 -16
  39. package/models/operations/updateidentity.js +1 -1
  40. package/models/operations/updatetool.js +7 -7
  41. package/package.json +3 -4
  42. package/packages/orq-rc/examples/postV2Feedback.example.ts +26 -0
  43. package/packages/orq-rc/src/core.ts +13 -0
  44. package/packages/orq-rc/src/funcs/agentsCreate.ts +161 -0
  45. package/packages/orq-rc/src/funcs/agentsDelete.ts +179 -0
  46. package/packages/orq-rc/src/funcs/agentsInvoke.ts +176 -0
  47. package/packages/orq-rc/src/funcs/agentsList.ts +184 -0
  48. package/packages/orq-rc/src/funcs/agentsPostV2AgentsA2a.ts +178 -0
  49. package/packages/orq-rc/src/funcs/agentsPostV2AgentsKeyCardRefresh.ts +186 -0
  50. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +182 -0
  51. package/packages/orq-rc/src/funcs/agentsResponsesGet.ts +181 -0
  52. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +179 -0
  53. package/packages/orq-rc/src/funcs/agentsRun.ts +162 -0
  54. package/packages/orq-rc/src/funcs/agentsStream.ts +203 -0
  55. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +189 -0
  56. package/packages/orq-rc/src/funcs/agentsUpdate.ts +183 -0
  57. package/packages/orq-rc/src/funcs/annotationsCreate.ts +170 -0
  58. package/packages/orq-rc/src/funcs/annotationsDelete.ts +170 -0
  59. package/packages/orq-rc/src/funcs/chunkingParse.ts +160 -0
  60. package/packages/orq-rc/src/funcs/contactsCreate.ts +160 -0
  61. package/packages/orq-rc/src/funcs/datasetsClear.ts +166 -0
  62. package/packages/orq-rc/src/funcs/datasetsCreate.ts +165 -0
  63. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +170 -0
  64. package/packages/orq-rc/src/funcs/datasetsDelete.ts +166 -0
  65. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +181 -0
  66. package/packages/orq-rc/src/funcs/datasetsList.ts +167 -0
  67. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +173 -0
  68. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +174 -0
  69. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +180 -0
  70. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +175 -0
  71. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +178 -0
  72. package/packages/orq-rc/src/funcs/deleteV2HumanEvalsId.ts +169 -0
  73. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +168 -0
  74. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +176 -0
  75. package/packages/orq-rc/src/funcs/deploymentsList.ts +176 -0
  76. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +169 -0
  77. package/packages/orq-rc/src/funcs/deploymentsStream.ts +186 -0
  78. package/packages/orq-rc/src/funcs/evalsAll.ts +173 -0
  79. package/packages/orq-rc/src/funcs/evalsCreate.ts +169 -0
  80. package/packages/orq-rc/src/funcs/evalsDelete.ts +172 -0
  81. package/packages/orq-rc/src/funcs/evalsInvoke.ts +180 -0
  82. package/packages/orq-rc/src/funcs/evalsUpdate.ts +172 -0
  83. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +182 -0
  84. package/packages/orq-rc/src/funcs/filesCreate.ts +194 -0
  85. package/packages/orq-rc/src/funcs/filesDelete.ts +163 -0
  86. package/packages/orq-rc/src/funcs/filesGet.ts +165 -0
  87. package/packages/orq-rc/src/funcs/filesGetContent.ts +166 -0
  88. package/packages/orq-rc/src/funcs/filesList.ts +167 -0
  89. package/packages/orq-rc/src/funcs/filesUpdate.ts +166 -0
  90. package/packages/orq-rc/src/funcs/getV2HumanEvals.ts +169 -0
  91. package/packages/orq-rc/src/funcs/getV2HumanEvalsId.ts +168 -0
  92. package/packages/orq-rc/src/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.ts +164 -0
  93. package/packages/orq-rc/src/funcs/humanReviewSetsGetV2HumanEvalSets.ts +168 -0
  94. package/packages/orq-rc/src/funcs/humanReviewSetsGetV2HumanEvalSetsId.ts +163 -0
  95. package/packages/orq-rc/src/funcs/humanReviewSetsPatchV2HumanEvalSetsId.ts +164 -0
  96. package/packages/orq-rc/src/funcs/humanReviewSetsPostV2HumanEvalSets.ts +162 -0
  97. package/packages/orq-rc/src/funcs/identitiesCreate.ts +165 -0
  98. package/packages/orq-rc/src/funcs/identitiesDelete.ts +175 -0
  99. package/packages/orq-rc/src/funcs/identitiesList.ts +170 -0
  100. package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +183 -0
  101. package/packages/orq-rc/src/funcs/identitiesUpdate.ts +175 -0
  102. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +158 -0
  103. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +170 -0
  104. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +165 -0
  105. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +166 -0
  106. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +173 -0
  107. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +169 -0
  108. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +172 -0
  109. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +169 -0
  110. package/packages/orq-rc/src/funcs/knowledgeList.ts +169 -0
  111. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +177 -0
  112. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +170 -0
  113. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +173 -0
  114. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +165 -0
  115. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +172 -0
  116. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +168 -0
  117. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +166 -0
  118. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +163 -0
  119. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +173 -0
  120. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +169 -0
  121. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +162 -0
  122. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +175 -0
  123. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +169 -0
  124. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +167 -0
  125. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +184 -0
  126. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +179 -0
  127. package/packages/orq-rc/src/funcs/memoryStoresList.ts +178 -0
  128. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +183 -0
  129. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +176 -0
  130. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +176 -0
  131. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +178 -0
  132. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +173 -0
  133. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +167 -0
  134. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +179 -0
  135. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +174 -0
  136. package/packages/orq-rc/src/funcs/modelsList.ts +165 -0
  137. package/packages/orq-rc/src/funcs/patchV2HumanEvalsId.ts +170 -0
  138. package/packages/orq-rc/src/funcs/postV2Feedback.ts +172 -0
  139. package/packages/orq-rc/src/funcs/postV2FeedbackEvaluation.ts +159 -0
  140. package/packages/orq-rc/src/funcs/postV2FeedbackEvaluationRemove.ts +159 -0
  141. package/packages/orq-rc/src/funcs/postV2FeedbackRemove.ts +167 -0
  142. package/packages/orq-rc/src/funcs/postV2HumanEvals.ts +168 -0
  143. package/packages/orq-rc/src/funcs/promptsCreate.ts +160 -0
  144. package/packages/orq-rc/src/funcs/promptsDelete.ts +172 -0
  145. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +180 -0
  146. package/packages/orq-rc/src/funcs/promptsList.ts +167 -0
  147. package/packages/orq-rc/src/funcs/promptsListVersions.ts +172 -0
  148. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +165 -0
  149. package/packages/orq-rc/src/funcs/promptsUpdate.ts +172 -0
  150. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +161 -0
  151. package/packages/orq-rc/src/funcs/routerAudioSpeechCreate.ts +161 -0
  152. package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +269 -0
  153. package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +259 -0
  154. package/packages/orq-rc/src/funcs/routerChatCompletionsCreate.ts +168 -0
  155. package/packages/orq-rc/src/funcs/routerCompletionsCreate.ts +168 -0
  156. package/packages/orq-rc/src/funcs/routerEmbeddingsCreate.ts +161 -0
  157. package/packages/orq-rc/src/funcs/routerImagesEditsCreate.ts +222 -0
  158. package/packages/orq-rc/src/funcs/routerImagesGenerationsCreate.ts +160 -0
  159. package/packages/orq-rc/src/funcs/routerImagesVariationsCreate.ts +218 -0
  160. package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +167 -0
  161. package/packages/orq-rc/src/funcs/routerOcr.ts +158 -0
  162. package/packages/orq-rc/src/funcs/routerRerankCreate.ts +160 -0
  163. package/packages/orq-rc/src/funcs/routerResponsesCreate.ts +167 -0
  164. package/packages/orq-rc/src/funcs/toolsCreate.ts +163 -0
  165. package/packages/orq-rc/src/funcs/toolsDelete.ts +166 -0
  166. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +182 -0
  167. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +189 -0
  168. package/packages/orq-rc/src/funcs/toolsList.ts +176 -0
  169. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +165 -0
  170. package/packages/orq-rc/src/funcs/toolsUpdate.ts +175 -0
  171. package/packages/orq-rc/src/hooks/global.ts +44 -0
  172. package/packages/orq-rc/src/hooks/hooks.ts +132 -0
  173. package/packages/orq-rc/src/hooks/index.ts +6 -0
  174. package/packages/orq-rc/src/hooks/registration.ts +15 -0
  175. package/packages/orq-rc/src/hooks/types.ts +112 -0
  176. package/packages/orq-rc/src/index.ts +9 -0
  177. package/packages/orq-rc/src/lib/base64.ts +37 -0
  178. package/packages/orq-rc/src/lib/config.ts +74 -0
  179. package/packages/orq-rc/src/lib/dlv.ts +53 -0
  180. package/packages/orq-rc/src/lib/encodings.ts +516 -0
  181. package/packages/orq-rc/src/lib/env.ts +89 -0
  182. package/packages/orq-rc/src/lib/event-streams.ts +165 -0
  183. package/packages/orq-rc/src/lib/files.ts +104 -0
  184. package/packages/orq-rc/src/lib/http.ts +323 -0
  185. package/packages/orq-rc/src/lib/is-plain-object.ts +43 -0
  186. package/packages/orq-rc/src/lib/logger.ts +9 -0
  187. package/packages/orq-rc/src/lib/matchers.ts +346 -0
  188. package/packages/orq-rc/src/lib/primitives.ts +150 -0
  189. package/packages/orq-rc/src/lib/retries.ts +218 -0
  190. package/packages/orq-rc/src/lib/schemas.ts +91 -0
  191. package/packages/orq-rc/src/lib/sdks.ts +409 -0
  192. package/packages/orq-rc/src/lib/security.ts +275 -0
  193. package/packages/orq-rc/src/lib/url.ts +35 -0
  194. package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +99 -0
  195. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +185 -0
  196. package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +73 -0
  197. package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +91 -0
  198. package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +71 -0
  199. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +507 -0
  200. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +165 -0
  201. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +103 -0
  202. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +517 -0
  203. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +807 -0
  204. package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +136 -0
  205. package/packages/orq-rc/src/models/components/createagentresponse.ts +305 -0
  206. package/packages/orq-rc/src/models/components/datapart.ts +38 -0
  207. package/packages/orq-rc/src/models/components/errorpart.ts +58 -0
  208. package/packages/orq-rc/src/models/components/errorstreamingevent.ts +66 -0
  209. package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +71 -0
  210. package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +61 -0
  211. package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +67 -0
  212. package/packages/orq-rc/src/models/components/extendedmessage.ts +146 -0
  213. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +87 -0
  214. package/packages/orq-rc/src/models/components/filedocument.ts +48 -0
  215. package/packages/orq-rc/src/models/components/filepart.ts +218 -0
  216. package/packages/orq-rc/src/models/components/getagentresponse.ts +348 -0
  217. package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +268 -0
  218. package/packages/orq-rc/src/models/components/index.ts +61 -0
  219. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +3450 -0
  220. package/packages/orq-rc/src/models/components/partdelta.ts +39 -0
  221. package/packages/orq-rc/src/models/components/partdeltaevent.ts +73 -0
  222. package/packages/orq-rc/src/models/components/partdoneevent.ts +70 -0
  223. package/packages/orq-rc/src/models/components/publiccontact.ts +71 -0
  224. package/packages/orq-rc/src/models/components/publicidentity.ts +69 -0
  225. package/packages/orq-rc/src/models/components/reasoningpart.ts +62 -0
  226. package/packages/orq-rc/src/models/components/reasoningpartschema.ts +71 -0
  227. package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +66 -0
  228. package/packages/orq-rc/src/models/components/refusalpartschema.ts +64 -0
  229. package/packages/orq-rc/src/models/components/responsedoneevent.ts +324 -0
  230. package/packages/orq-rc/src/models/components/responsefailedevent.ts +72 -0
  231. package/packages/orq-rc/src/models/components/responsestartedevent.ts +97 -0
  232. package/packages/orq-rc/src/models/components/responsestreamingevent.ts +85 -0
  233. package/packages/orq-rc/src/models/components/reviewoutcome.ts +23 -0
  234. package/packages/orq-rc/src/models/components/security.ts +32 -0
  235. package/packages/orq-rc/src/models/components/telemetry.ts +48 -0
  236. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +207 -0
  237. package/packages/orq-rc/src/models/components/textpart.ts +54 -0
  238. package/packages/orq-rc/src/models/components/thinkingconfigadaptiveschema.ts +59 -0
  239. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +59 -0
  240. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +106 -0
  241. package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +64 -0
  242. package/packages/orq-rc/src/models/components/toolcallpart.ts +51 -0
  243. package/packages/orq-rc/src/models/components/tooldoneevent.ts +77 -0
  244. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +235 -0
  245. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +219 -0
  246. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +205 -0
  247. package/packages/orq-rc/src/models/components/toolfailedevent.ts +77 -0
  248. package/packages/orq-rc/src/models/components/toolresultpart.ts +71 -0
  249. package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +78 -0
  250. package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +87 -0
  251. package/packages/orq-rc/src/models/components/toolstartedevent.ts +82 -0
  252. package/packages/orq-rc/src/models/errors/apierror.ts +40 -0
  253. package/packages/orq-rc/src/models/errors/createeval.ts +51 -0
  254. package/packages/orq-rc/src/models/errors/createmoderation.ts +84 -0
  255. package/packages/orq-rc/src/models/errors/createtranscription.ts +87 -0
  256. package/packages/orq-rc/src/models/errors/createtranslation.ts +87 -0
  257. package/packages/orq-rc/src/models/errors/deleteagent.ts +51 -0
  258. package/packages/orq-rc/src/models/errors/deleteeval.ts +51 -0
  259. package/packages/orq-rc/src/models/errors/deleteidentity.ts +62 -0
  260. package/packages/orq-rc/src/models/errors/deleteprompt.ts +51 -0
  261. package/packages/orq-rc/src/models/errors/deletev2humanevalsid.ts +51 -0
  262. package/packages/orq-rc/src/models/errors/getevals.ts +51 -0
  263. package/packages/orq-rc/src/models/errors/getpromptversion.ts +51 -0
  264. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +51 -0
  265. package/packages/orq-rc/src/models/errors/getv2humanevals.ts +51 -0
  266. package/packages/orq-rc/src/models/errors/getv2humanevalsid.ts +51 -0
  267. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +51 -0
  268. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +52 -0
  269. package/packages/orq-rc/src/models/errors/honoapierror.ts +59 -0
  270. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +62 -0
  271. package/packages/orq-rc/src/models/errors/index.ts +42 -0
  272. package/packages/orq-rc/src/models/errors/invokeeval.ts +141 -0
  273. package/packages/orq-rc/src/models/errors/orqerror.ts +35 -0
  274. package/packages/orq-rc/src/models/errors/patchv2humanevalsid.ts +51 -0
  275. package/packages/orq-rc/src/models/errors/postv2agentsa2a.ts +96 -0
  276. package/packages/orq-rc/src/models/errors/postv2agentskeycardrefresh.ts +97 -0
  277. package/packages/orq-rc/src/models/errors/postv2feedback.ts +96 -0
  278. package/packages/orq-rc/src/models/errors/postv2feedbackremove.ts +51 -0
  279. package/packages/orq-rc/src/models/errors/postv2humanevals.ts +51 -0
  280. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +50 -0
  281. package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +51 -0
  282. package/packages/orq-rc/src/models/errors/retrieveidentity.ts +118 -0
  283. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +109 -0
  284. package/packages/orq-rc/src/models/errors/streamagent.ts +51 -0
  285. package/packages/orq-rc/src/models/errors/streamrunagent.ts +51 -0
  286. package/packages/orq-rc/src/models/errors/updateagent.ts +51 -0
  287. package/packages/orq-rc/src/models/errors/updateeval.ts +51 -0
  288. package/packages/orq-rc/src/models/errors/updateidentity.ts +54 -0
  289. package/packages/orq-rc/src/models/errors/updateprompt.ts +51 -0
  290. package/packages/orq-rc/src/models/errors/updatetool.ts +62 -0
  291. package/packages/orq-rc/src/models/operations/cleardataset.ts +39 -0
  292. package/packages/orq-rc/src/models/operations/createagentrequest.ts +6459 -0
  293. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +670 -0
  294. package/packages/orq-rc/src/models/operations/createannotation.ts +166 -0
  295. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +6398 -0
  296. package/packages/orq-rc/src/models/operations/createchunk.ts +222 -0
  297. package/packages/orq-rc/src/models/operations/createcompletion.ts +3473 -0
  298. package/packages/orq-rc/src/models/operations/createcontact.ts +156 -0
  299. package/packages/orq-rc/src/models/operations/createdataset.ts +162 -0
  300. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2554 -0
  301. package/packages/orq-rc/src/models/operations/createdatasource.ts +437 -0
  302. package/packages/orq-rc/src/models/operations/createembedding.ts +947 -0
  303. package/packages/orq-rc/src/models/operations/createeval.ts +4229 -0
  304. package/packages/orq-rc/src/models/operations/createidentity.ts +162 -0
  305. package/packages/orq-rc/src/models/operations/createimage.ts +1034 -0
  306. package/packages/orq-rc/src/models/operations/createimageedit.ts +1045 -0
  307. package/packages/orq-rc/src/models/operations/createimagevariation.ts +1067 -0
  308. package/packages/orq-rc/src/models/operations/createknowledge.ts +960 -0
  309. package/packages/orq-rc/src/models/operations/creatememory.ts +142 -0
  310. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +152 -0
  311. package/packages/orq-rc/src/models/operations/creatememorystore.ts +199 -0
  312. package/packages/orq-rc/src/models/operations/createmoderation.ts +664 -0
  313. package/packages/orq-rc/src/models/operations/createprompt.ts +5405 -0
  314. package/packages/orq-rc/src/models/operations/creatererank.ts +890 -0
  315. package/packages/orq-rc/src/models/operations/createresponse.ts +3864 -0
  316. package/packages/orq-rc/src/models/operations/createspeech.ts +700 -0
  317. package/packages/orq-rc/src/models/operations/createtool.ts +2509 -0
  318. package/packages/orq-rc/src/models/operations/createtranscription.ts +955 -0
  319. package/packages/orq-rc/src/models/operations/createtranslation.ts +930 -0
  320. package/packages/orq-rc/src/models/operations/deleteagent.ts +39 -0
  321. package/packages/orq-rc/src/models/operations/deleteannotation.ts +82 -0
  322. package/packages/orq-rc/src/models/operations/deletechunk.ts +53 -0
  323. package/packages/orq-rc/src/models/operations/deletechunks.ts +125 -0
  324. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +46 -0
  325. package/packages/orq-rc/src/models/operations/deletedataset.ts +39 -0
  326. package/packages/orq-rc/src/models/operations/deletedatasource.ts +46 -0
  327. package/packages/orq-rc/src/models/operations/deleteeval.ts +31 -0
  328. package/packages/orq-rc/src/models/operations/deleteidentity.ts +34 -0
  329. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +39 -0
  330. package/packages/orq-rc/src/models/operations/deletememory.ts +46 -0
  331. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +55 -0
  332. package/packages/orq-rc/src/models/operations/deletememorystore.ts +39 -0
  333. package/packages/orq-rc/src/models/operations/deleteprompt.ts +34 -0
  334. package/packages/orq-rc/src/models/operations/deletetool.ts +36 -0
  335. package/packages/orq-rc/src/models/operations/deletev2humanevalsetsid.ts +36 -0
  336. package/packages/orq-rc/src/models/operations/deletev2humanevalsid.ts +67 -0
  337. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +2370 -0
  338. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +4526 -0
  339. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +735 -0
  340. package/packages/orq-rc/src/models/operations/deployments.ts +1273 -0
  341. package/packages/orq-rc/src/models/operations/deploymentstream.ts +4659 -0
  342. package/packages/orq-rc/src/models/operations/filecontent.ts +39 -0
  343. package/packages/orq-rc/src/models/operations/filedelete.ts +39 -0
  344. package/packages/orq-rc/src/models/operations/fileget.ts +80 -0
  345. package/packages/orq-rc/src/models/operations/filelist.ts +85 -0
  346. package/packages/orq-rc/src/models/operations/fileupdate.ts +118 -0
  347. package/packages/orq-rc/src/models/operations/fileupload.ts +135 -0
  348. package/packages/orq-rc/src/models/operations/getagentresponse.ts +46 -0
  349. package/packages/orq-rc/src/models/operations/getallmemories.ts +173 -0
  350. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +188 -0
  351. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +200 -0
  352. package/packages/orq-rc/src/models/operations/getallprompts.ts +3173 -0
  353. package/packages/orq-rc/src/models/operations/getalltools.ts +1404 -0
  354. package/packages/orq-rc/src/models/operations/getchunkscount.ts +121 -0
  355. package/packages/orq-rc/src/models/operations/getevals.ts +2868 -0
  356. package/packages/orq-rc/src/models/operations/getonechunk.ts +171 -0
  357. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +652 -0
  358. package/packages/orq-rc/src/models/operations/getoneprompt.ts +3098 -0
  359. package/packages/orq-rc/src/models/operations/getpromptversion.ts +3143 -0
  360. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +162 -0
  361. package/packages/orq-rc/src/models/operations/getv2humanevals.ts +696 -0
  362. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +234 -0
  363. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +235 -0
  364. package/packages/orq-rc/src/models/operations/getv2humanevalsid.ts +707 -0
  365. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +163 -0
  366. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +110 -0
  367. package/packages/orq-rc/src/models/operations/index.ts +131 -0
  368. package/packages/orq-rc/src/models/operations/invokeagent.ts +801 -0
  369. package/packages/orq-rc/src/models/operations/invokeeval.ts +1254 -0
  370. package/packages/orq-rc/src/models/operations/listagents.ts +2781 -0
  371. package/packages/orq-rc/src/models/operations/listchunks.ts +260 -0
  372. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +263 -0
  373. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +1498 -0
  374. package/packages/orq-rc/src/models/operations/listdatasets.ts +205 -0
  375. package/packages/orq-rc/src/models/operations/listdatasources.ts +235 -0
  376. package/packages/orq-rc/src/models/operations/listidentities.ts +275 -0
  377. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +642 -0
  378. package/packages/orq-rc/src/models/operations/listmodels.ts +169 -0
  379. package/packages/orq-rc/src/models/operations/listpromptversions.ts +3218 -0
  380. package/packages/orq-rc/src/models/operations/parse.ts +784 -0
  381. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +415 -0
  382. package/packages/orq-rc/src/models/operations/patchv2humanevalsid.ts +1362 -0
  383. package/packages/orq-rc/src/models/operations/postv2agentsa2a.ts +255 -0
  384. package/packages/orq-rc/src/models/operations/postv2agentskeycardrefresh.ts +100 -0
  385. package/packages/orq-rc/src/models/operations/postv2feedback.ts +207 -0
  386. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +321 -0
  387. package/packages/orq-rc/src/models/operations/postv2feedbackevaluationremove.ts +43 -0
  388. package/packages/orq-rc/src/models/operations/postv2feedbackremove.ts +138 -0
  389. package/packages/orq-rc/src/models/operations/postv2humanevals.ts +1193 -0
  390. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +365 -0
  391. package/packages/orq-rc/src/models/operations/postv2routerocr.ts +478 -0
  392. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +108 -0
  393. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +2843 -0
  394. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +1402 -0
  395. package/packages/orq-rc/src/models/operations/retrievedataset.ts +150 -0
  396. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +152 -0
  397. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +174 -0
  398. package/packages/orq-rc/src/models/operations/retrievememory.ts +112 -0
  399. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +118 -0
  400. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +144 -0
  401. package/packages/orq-rc/src/models/operations/retrievetool.ts +1385 -0
  402. package/packages/orq-rc/src/models/operations/runagent.ts +4963 -0
  403. package/packages/orq-rc/src/models/operations/searchknowledge.ts +1762 -0
  404. package/packages/orq-rc/src/models/operations/streamagent.ts +692 -0
  405. package/packages/orq-rc/src/models/operations/streamrunagent.ts +5125 -0
  406. package/packages/orq-rc/src/models/operations/updateagent.ts +6889 -0
  407. package/packages/orq-rc/src/models/operations/updatechunk.ts +236 -0
  408. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2555 -0
  409. package/packages/orq-rc/src/models/operations/updatedataset.ts +206 -0
  410. package/packages/orq-rc/src/models/operations/updatedatasource.ts +186 -0
  411. package/packages/orq-rc/src/models/operations/updateeval.ts +3160 -0
  412. package/packages/orq-rc/src/models/operations/updateidentity.ts +189 -0
  413. package/packages/orq-rc/src/models/operations/updateknowledge.ts +1231 -0
  414. package/packages/orq-rc/src/models/operations/updatememory.ts +142 -0
  415. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +159 -0
  416. package/packages/orq-rc/src/models/operations/updatememorystore.ts +188 -0
  417. package/packages/orq-rc/src/models/operations/updateprompt.ts +5487 -0
  418. package/packages/orq-rc/src/models/operations/updatetool.ts +2816 -0
  419. package/packages/orq-rc/src/sdk/agents.ts +234 -0
  420. package/packages/orq-rc/src/sdk/annotations.ts +39 -0
  421. package/packages/orq-rc/src/sdk/audio.ts +25 -0
  422. package/packages/orq-rc/src/sdk/chat.ts +13 -0
  423. package/packages/orq-rc/src/sdk/chunking.ts +27 -0
  424. package/packages/orq-rc/src/sdk/completions.ts +32 -0
  425. package/packages/orq-rc/src/sdk/contacts.ts +27 -0
  426. package/packages/orq-rc/src/sdk/datasets.ts +204 -0
  427. package/packages/orq-rc/src/sdk/deployments.ts +89 -0
  428. package/packages/orq-rc/src/sdk/edits.ts +27 -0
  429. package/packages/orq-rc/src/sdk/embeddings.ts +27 -0
  430. package/packages/orq-rc/src/sdk/evals.ts +84 -0
  431. package/packages/orq-rc/src/sdk/evaluators.ts +27 -0
  432. package/packages/orq-rc/src/sdk/files.ts +114 -0
  433. package/packages/orq-rc/src/sdk/generations.ts +27 -0
  434. package/packages/orq-rc/src/sdk/humanreviewsets.ts +84 -0
  435. package/packages/orq-rc/src/sdk/identities.ts +99 -0
  436. package/packages/orq-rc/src/sdk/images.ts +25 -0
  437. package/packages/orq-rc/src/sdk/index.ts +5 -0
  438. package/packages/orq-rc/src/sdk/knowledge.ts +309 -0
  439. package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
  440. package/packages/orq-rc/src/sdk/metrics.ts +29 -0
  441. package/packages/orq-rc/src/sdk/models.ts +27 -0
  442. package/packages/orq-rc/src/sdk/moderations.ts +24 -0
  443. package/packages/orq-rc/src/sdk/orqcompletions.ts +32 -0
  444. package/packages/orq-rc/src/sdk/orqresponses.ts +32 -0
  445. package/packages/orq-rc/src/sdk/prompts.ts +126 -0
  446. package/packages/orq-rc/src/sdk/remoteconfigs.ts +24 -0
  447. package/packages/orq-rc/src/sdk/rerank.ts +27 -0
  448. package/packages/orq-rc/src/sdk/responses.ts +53 -0
  449. package/packages/orq-rc/src/sdk/router.ts +72 -0
  450. package/packages/orq-rc/src/sdk/sdk.ts +225 -0
  451. package/packages/orq-rc/src/sdk/speech.ts +27 -0
  452. package/packages/orq-rc/src/sdk/tools.ts +135 -0
  453. package/packages/orq-rc/src/sdk/transcriptions.ts +24 -0
  454. package/packages/orq-rc/src/sdk/translations.ts +24 -0
  455. package/packages/orq-rc/src/sdk/variations.ts +27 -0
  456. package/packages/orq-rc/src/types/async.ts +68 -0
  457. package/packages/orq-rc/src/types/blobs.ts +32 -0
  458. package/packages/orq-rc/src/types/constdatetime.ts +15 -0
  459. package/packages/orq-rc/src/types/enums.ts +45 -0
  460. package/packages/orq-rc/src/types/fp.ts +50 -0
  461. package/packages/orq-rc/src/types/index.ts +11 -0
  462. package/packages/orq-rc/src/types/operations.ts +105 -0
  463. package/packages/orq-rc/src/types/rfcdate.ts +54 -0
  464. package/packages/orq-rc/src/types/streams.ts +21 -0
  465. package/packages/orq-rc/src/types/unrecognized.ts +35 -0
  466. package/src/lib/config.ts +2 -2
  467. package/src/models/components/reasoningpart.ts +1 -1
  468. package/src/models/operations/createcontact.ts +1 -1
  469. package/src/models/operations/createdataset.ts +1 -1
  470. package/src/models/operations/createdatasetitem.ts +4 -4
  471. package/src/models/operations/createdatasource.ts +1 -1
  472. package/src/models/operations/createeval.ts +16 -16
  473. package/src/models/operations/createidentity.ts +1 -1
  474. package/src/models/operations/createtool.ts +6 -6
  475. package/src/models/operations/getalltools.ts +6 -6
  476. package/src/models/operations/getevals.ts +16 -16
  477. package/src/models/operations/getv2humanevals.ts +6 -6
  478. package/src/models/operations/getv2humanevalsets.ts +2 -2
  479. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  480. package/src/models/operations/getv2humanevalsid.ts +6 -6
  481. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  482. package/src/models/operations/listdatasets.ts +1 -1
  483. package/src/models/operations/listdatasources.ts +1 -1
  484. package/src/models/operations/listidentities.ts +1 -1
  485. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  486. package/src/models/operations/patchv2humanevalsid.ts +12 -12
  487. package/src/models/operations/postv2feedbackevaluation.ts +3 -3
  488. package/src/models/operations/postv2humanevals.ts +12 -12
  489. package/src/models/operations/postv2humanevalsets.ts +2 -2
  490. package/src/models/operations/retrievedatapoint.ts +4 -4
  491. package/src/models/operations/retrievedataset.ts +1 -1
  492. package/src/models/operations/retrievedatasource.ts +1 -1
  493. package/src/models/operations/retrieveidentity.ts +1 -1
  494. package/src/models/operations/retrievetool.ts +6 -6
  495. package/src/models/operations/runagent.ts +1 -1
  496. package/src/models/operations/streamrunagent.ts +1 -1
  497. package/src/models/operations/updatedatapoint.ts +4 -4
  498. package/src/models/operations/updatedataset.ts +1 -1
  499. package/src/models/operations/updatedatasource.ts +1 -1
  500. package/src/models/operations/updateeval.ts +16 -16
  501. package/src/models/operations/updateidentity.ts +1 -1
  502. package/src/models/operations/updatetool.ts +7 -7
@@ -0,0 +1,3218 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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 * as components from "../components/index.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+
13
+ export type ListPromptVersionsRequest = {
14
+ promptId: string;
15
+ /**
16
+ * A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
17
+ */
18
+ limit?: number | undefined;
19
+ /**
20
+ * 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.
21
+ */
22
+ startingAfter?: string | undefined;
23
+ /**
24
+ * 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.
25
+ */
26
+ endingBefore?: string | undefined;
27
+ };
28
+
29
+ export const ListPromptVersionsObject = {
30
+ List: "list",
31
+ } as const;
32
+ export type ListPromptVersionsObject = ClosedEnum<
33
+ typeof ListPromptVersionsObject
34
+ >;
35
+
36
+ /**
37
+ * The modality of the model
38
+ */
39
+ export const ListPromptVersionsModelType = {
40
+ Chat: "chat",
41
+ Completion: "completion",
42
+ Embedding: "embedding",
43
+ Image: "image",
44
+ Tts: "tts",
45
+ Stt: "stt",
46
+ Rerank: "rerank",
47
+ Ocr: "ocr",
48
+ Moderation: "moderation",
49
+ Vision: "vision",
50
+ } as const;
51
+ /**
52
+ * The modality of the model
53
+ */
54
+ export type ListPromptVersionsModelType = ClosedEnum<
55
+ typeof ListPromptVersionsModelType
56
+ >;
57
+
58
+ /**
59
+ * Only supported on `image` models.
60
+ */
61
+ export const ListPromptVersionsFormat = {
62
+ Url: "url",
63
+ B64Json: "b64_json",
64
+ Text: "text",
65
+ JsonObject: "json_object",
66
+ } as const;
67
+ /**
68
+ * Only supported on `image` models.
69
+ */
70
+ export type ListPromptVersionsFormat = ClosedEnum<
71
+ typeof ListPromptVersionsFormat
72
+ >;
73
+
74
+ export const ListPromptVersionsResponseFormat6 = {
75
+ Json: "json",
76
+ Text: "text",
77
+ Srt: "srt",
78
+ VerboseJson: "verbose_json",
79
+ Vtt: "vtt",
80
+ } as const;
81
+ export type ListPromptVersionsResponseFormat6 = ClosedEnum<
82
+ typeof ListPromptVersionsResponseFormat6
83
+ >;
84
+
85
+ export const ListPromptVersionsResponseFormat5 = {
86
+ Url: "url",
87
+ Base64Json: "base64_json",
88
+ } as const;
89
+ export type ListPromptVersionsResponseFormat5 = ClosedEnum<
90
+ typeof ListPromptVersionsResponseFormat5
91
+ >;
92
+
93
+ export const ListPromptVersionsResponseFormat4 = {
94
+ Mp3: "mp3",
95
+ Opus: "opus",
96
+ Aac: "aac",
97
+ Flac: "flac",
98
+ Wav: "wav",
99
+ Pcm: "pcm",
100
+ } as const;
101
+ export type ListPromptVersionsResponseFormat4 = ClosedEnum<
102
+ typeof ListPromptVersionsResponseFormat4
103
+ >;
104
+
105
+ export const ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType =
106
+ {
107
+ Text: "text",
108
+ } as const;
109
+ export type ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType =
110
+ ClosedEnum<
111
+ typeof ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType
112
+ >;
113
+
114
+ export type ListPromptVersionsResponseFormat3 = {
115
+ type:
116
+ ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType;
117
+ };
118
+
119
+ export const ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType =
120
+ {
121
+ JsonObject: "json_object",
122
+ } as const;
123
+ export type ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType =
124
+ ClosedEnum<
125
+ typeof ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType
126
+ >;
127
+
128
+ export type ListPromptVersionsResponseFormat2 = {
129
+ type: ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType;
130
+ };
131
+
132
+ export const ListPromptVersionsResponseFormatPromptsResponse200Type = {
133
+ JsonSchema: "json_schema",
134
+ } as const;
135
+ export type ListPromptVersionsResponseFormatPromptsResponse200Type = ClosedEnum<
136
+ typeof ListPromptVersionsResponseFormatPromptsResponse200Type
137
+ >;
138
+
139
+ export type ListPromptVersionsResponseFormatPromptsResponseJsonSchema = {
140
+ name: string;
141
+ description?: string | undefined;
142
+ strict?: boolean | undefined;
143
+ schema: { [k: string]: any };
144
+ };
145
+
146
+ export type ListPromptVersionsResponseFormat1 = {
147
+ type: ListPromptVersionsResponseFormatPromptsResponse200Type;
148
+ displayName?: string | undefined;
149
+ jsonSchema: ListPromptVersionsResponseFormatPromptsResponseJsonSchema;
150
+ };
151
+
152
+ /**
153
+ * An object specifying the format that the model must output.
154
+ *
155
+ * @remarks
156
+ *
157
+ * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
158
+ *
159
+ * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
160
+ *
161
+ * 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.
162
+ */
163
+ export type ListPromptVersionsPromptsResponseFormat =
164
+ | ListPromptVersionsResponseFormat1
165
+ | ListPromptVersionsResponseFormat2
166
+ | ListPromptVersionsResponseFormat3
167
+ | ListPromptVersionsResponseFormat4
168
+ | ListPromptVersionsResponseFormat5
169
+ | ListPromptVersionsResponseFormat6;
170
+
171
+ /**
172
+ * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
173
+ */
174
+ export const ListPromptVersionsPhotoRealVersion = {
175
+ V1: "v1",
176
+ V2: "v2",
177
+ } as const;
178
+ /**
179
+ * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
180
+ */
181
+ export type ListPromptVersionsPhotoRealVersion = ClosedEnum<
182
+ typeof ListPromptVersionsPhotoRealVersion
183
+ >;
184
+
185
+ /**
186
+ * The format to return the embeddings
187
+ */
188
+ export const ListPromptVersionsEncodingFormat = {
189
+ Float: "float",
190
+ Base64: "base64",
191
+ } as const;
192
+ /**
193
+ * The format to return the embeddings
194
+ */
195
+ export type ListPromptVersionsEncodingFormat = ClosedEnum<
196
+ typeof ListPromptVersionsEncodingFormat
197
+ >;
198
+
199
+ /**
200
+ * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
201
+ */
202
+ export const ListPromptVersionsPromptsReasoningEffort = {
203
+ None: "none",
204
+ Disable: "disable",
205
+ Minimal: "minimal",
206
+ Low: "low",
207
+ Medium: "medium",
208
+ High: "high",
209
+ } as const;
210
+ /**
211
+ * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
212
+ */
213
+ export type ListPromptVersionsPromptsReasoningEffort = ClosedEnum<
214
+ typeof ListPromptVersionsPromptsReasoningEffort
215
+ >;
216
+
217
+ /**
218
+ * Controls the verbosity of the model output.
219
+ */
220
+ export const ListPromptVersionsVerbosity = {
221
+ Low: "low",
222
+ Medium: "medium",
223
+ High: "high",
224
+ } as const;
225
+ /**
226
+ * Controls the verbosity of the model output.
227
+ */
228
+ export type ListPromptVersionsVerbosity = ClosedEnum<
229
+ typeof ListPromptVersionsVerbosity
230
+ >;
231
+
232
+ /**
233
+ * The level of thinking to use for the model. Only supported by `Google AI`
234
+ */
235
+ export const ListPromptVersionsThinkingLevel = {
236
+ Low: "low",
237
+ High: "high",
238
+ } as const;
239
+ /**
240
+ * The level of thinking to use for the model. Only supported by `Google AI`
241
+ */
242
+ export type ListPromptVersionsThinkingLevel = ClosedEnum<
243
+ typeof ListPromptVersionsThinkingLevel
244
+ >;
245
+
246
+ /**
247
+ * Model Parameters: Not all parameters apply to every model
248
+ */
249
+ export type ListPromptVersionsModelParameters = {
250
+ /**
251
+ * Only supported on `chat` and `completion` models.
252
+ */
253
+ temperature?: number | undefined;
254
+ /**
255
+ * Only supported on `chat` and `completion` models.
256
+ */
257
+ maxTokens?: number | undefined;
258
+ /**
259
+ * Only supported on `chat` and `completion` models.
260
+ */
261
+ topK?: number | undefined;
262
+ /**
263
+ * Only supported on `chat` and `completion` models.
264
+ */
265
+ topP?: number | undefined;
266
+ /**
267
+ * Only supported on `chat` and `completion` models.
268
+ */
269
+ frequencyPenalty?: number | undefined;
270
+ /**
271
+ * Only supported on `chat` and `completion` models.
272
+ */
273
+ presencePenalty?: number | undefined;
274
+ /**
275
+ * Only supported on `image` models.
276
+ */
277
+ numImages?: number | undefined;
278
+ /**
279
+ * Best effort deterministic seed for the model. Currently only OpenAI models support these
280
+ */
281
+ seed?: number | undefined;
282
+ /**
283
+ * Only supported on `image` models.
284
+ */
285
+ format?: ListPromptVersionsFormat | undefined;
286
+ /**
287
+ * Only supported on `image` models.
288
+ */
289
+ dimensions?: string | undefined;
290
+ /**
291
+ * Only supported on `image` models.
292
+ */
293
+ quality?: string | undefined;
294
+ /**
295
+ * Only supported on `image` models.
296
+ */
297
+ style?: string | undefined;
298
+ /**
299
+ * An object specifying the format that the model must output.
300
+ *
301
+ * @remarks
302
+ *
303
+ * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
304
+ *
305
+ * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
306
+ *
307
+ * 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.
308
+ */
309
+ responseFormat?:
310
+ | ListPromptVersionsResponseFormat1
311
+ | ListPromptVersionsResponseFormat2
312
+ | ListPromptVersionsResponseFormat3
313
+ | ListPromptVersionsResponseFormat4
314
+ | ListPromptVersionsResponseFormat5
315
+ | ListPromptVersionsResponseFormat6
316
+ | null
317
+ | undefined;
318
+ /**
319
+ * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
320
+ */
321
+ photoRealVersion?: ListPromptVersionsPhotoRealVersion | undefined;
322
+ /**
323
+ * The format to return the embeddings
324
+ */
325
+ encodingFormat?: ListPromptVersionsEncodingFormat | undefined;
326
+ /**
327
+ * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
328
+ */
329
+ reasoningEffort?: ListPromptVersionsPromptsReasoningEffort | undefined;
330
+ /**
331
+ * 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`
332
+ */
333
+ budgetTokens?: number | undefined;
334
+ /**
335
+ * Controls the verbosity of the model output.
336
+ */
337
+ verbosity?: ListPromptVersionsVerbosity | undefined;
338
+ /**
339
+ * The level of thinking to use for the model. Only supported by `Google AI`
340
+ */
341
+ thinkingLevel?: ListPromptVersionsThinkingLevel | undefined;
342
+ };
343
+
344
+ export const ListPromptVersionsProvider = {
345
+ Openai: "openai",
346
+ Groq: "groq",
347
+ Cohere: "cohere",
348
+ Azure: "azure",
349
+ Aws: "aws",
350
+ Google: "google",
351
+ GoogleAi: "google-ai",
352
+ Huggingface: "huggingface",
353
+ Togetherai: "togetherai",
354
+ Perplexity: "perplexity",
355
+ Anthropic: "anthropic",
356
+ Leonardoai: "leonardoai",
357
+ Fal: "fal",
358
+ Nvidia: "nvidia",
359
+ Jina: "jina",
360
+ Elevenlabs: "elevenlabs",
361
+ Litellm: "litellm",
362
+ Cerebras: "cerebras",
363
+ Openailike: "openailike",
364
+ Bytedance: "bytedance",
365
+ Mistral: "mistral",
366
+ Deepseek: "deepseek",
367
+ Contextualai: "contextualai",
368
+ Moonshotai: "moonshotai",
369
+ Zai: "zai",
370
+ Minimax: "minimax",
371
+ Xai: "xai",
372
+ Alibaba: "alibaba",
373
+ Tensorix: "tensorix",
374
+ Hcompany: "hcompany",
375
+ Slack: "slack",
376
+ Orq: "orq",
377
+ } as const;
378
+ export type ListPromptVersionsProvider = ClosedEnum<
379
+ typeof ListPromptVersionsProvider
380
+ >;
381
+
382
+ /**
383
+ * The role of the prompt message
384
+ */
385
+ export const ListPromptVersionsRole = {
386
+ System: "system",
387
+ Developer: "developer",
388
+ Assistant: "assistant",
389
+ User: "user",
390
+ Exception: "exception",
391
+ Tool: "tool",
392
+ Prompt: "prompt",
393
+ Correction: "correction",
394
+ ExpectedOutput: "expected_output",
395
+ } as const;
396
+ /**
397
+ * The role of the prompt message
398
+ */
399
+ export type ListPromptVersionsRole = ClosedEnum<typeof ListPromptVersionsRole>;
400
+
401
+ export type ListPromptVersions2File = {
402
+ /**
403
+ * The file data as a data URI string in the format 'data:<mime-type>;base64,<base64-encoded-data>'. Example: 'data:image/png;base64,iVBORw0KGgoAAAANS...'
404
+ */
405
+ fileData?: string | undefined;
406
+ /**
407
+ * URL to the file. Only supported by Anthropic Claude models for PDF files.
408
+ */
409
+ uri?: string | undefined;
410
+ /**
411
+ * MIME type of the file (e.g., application/pdf, image/png)
412
+ */
413
+ mimeType?: string | undefined;
414
+ /**
415
+ * The name of the file, used when passing the file to the model as a string.
416
+ */
417
+ filename?: string | undefined;
418
+ };
419
+
420
+ export type ListPromptVersions23 = {
421
+ /**
422
+ * The type of the content part. Always `file`.
423
+ */
424
+ type: "file";
425
+ file: ListPromptVersions2File;
426
+ };
427
+
428
+ export type ListPromptVersions2ImageUrl = {
429
+ /**
430
+ * The orq.ai id of the image
431
+ */
432
+ id?: string | undefined;
433
+ /**
434
+ * Either a URL of the image or the base64 encoded data URI.
435
+ */
436
+ url: string;
437
+ /**
438
+ * Specifies the detail level of the image. Currently only supported with OpenAI models
439
+ */
440
+ detail?: string | undefined;
441
+ };
442
+
443
+ /**
444
+ * The image part of the prompt message. Only supported with vision models.
445
+ */
446
+ export type ListPromptVersions22 = {
447
+ type: "image_url";
448
+ imageUrl: ListPromptVersions2ImageUrl;
449
+ };
450
+
451
+ /**
452
+ * Text content part of a prompt message
453
+ */
454
+ export type ListPromptVersions21 = {
455
+ type: "text";
456
+ text: string;
457
+ };
458
+
459
+ export type ListPromptVersionsContent2 =
460
+ | ListPromptVersions21
461
+ | ListPromptVersions22
462
+ | ListPromptVersions23;
463
+
464
+ /**
465
+ * 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. Can be null for tool messages in certain scenarios.
466
+ */
467
+ export type ListPromptVersionsContent =
468
+ | string
469
+ | Array<ListPromptVersions21 | ListPromptVersions22 | ListPromptVersions23>;
470
+
471
+ export const ListPromptVersionsPromptsType = {
472
+ Function: "function",
473
+ } as const;
474
+ export type ListPromptVersionsPromptsType = ClosedEnum<
475
+ typeof ListPromptVersionsPromptsType
476
+ >;
477
+
478
+ export type ListPromptVersionsFunction = {
479
+ name: string;
480
+ /**
481
+ * JSON string arguments for the functions
482
+ */
483
+ arguments: string;
484
+ };
485
+
486
+ export type ListPromptVersionsToolCalls = {
487
+ id?: string | undefined;
488
+ index?: number | undefined;
489
+ type: ListPromptVersionsPromptsType;
490
+ function: ListPromptVersionsFunction;
491
+ };
492
+
493
+ export type ListPromptVersionsMessages = {
494
+ /**
495
+ * The role of the prompt message
496
+ */
497
+ role: ListPromptVersionsRole;
498
+ /**
499
+ * 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. Can be null for tool messages in certain scenarios.
500
+ */
501
+ content:
502
+ | string
503
+ | Array<ListPromptVersions21 | ListPromptVersions22 | ListPromptVersions23>
504
+ | null;
505
+ toolCalls?: Array<ListPromptVersionsToolCalls> | undefined;
506
+ toolCallId?: string | null | undefined;
507
+ };
508
+
509
+ /**
510
+ * [DEPRECATED] Use the `prompt` property instead. A list of messages compatible with the openAI schema.
511
+ *
512
+ * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
513
+ */
514
+ export type ListPromptVersionsPromptConfig = {
515
+ stream?: boolean | undefined;
516
+ model?: string | null | undefined;
517
+ /**
518
+ * The id of the resource
519
+ */
520
+ modelDbId?: string | null | undefined;
521
+ /**
522
+ * The modality of the model
523
+ */
524
+ modelType?: ListPromptVersionsModelType | null | undefined;
525
+ /**
526
+ * Model Parameters: Not all parameters apply to every model
527
+ */
528
+ modelParameters?: ListPromptVersionsModelParameters | undefined;
529
+ provider?: ListPromptVersionsProvider | null | undefined;
530
+ /**
531
+ * The ID of the integration to use
532
+ */
533
+ integrationId?: string | null | undefined;
534
+ version?: string | undefined;
535
+ messages: Array<ListPromptVersionsMessages>;
536
+ };
537
+
538
+ /**
539
+ * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
540
+ */
541
+ export const ListPromptVersionsVoice = {
542
+ Alloy: "alloy",
543
+ Echo: "echo",
544
+ Fable: "fable",
545
+ Onyx: "onyx",
546
+ Nova: "nova",
547
+ Shimmer: "shimmer",
548
+ } as const;
549
+ /**
550
+ * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
551
+ */
552
+ export type ListPromptVersionsVoice = ClosedEnum<
553
+ typeof ListPromptVersionsVoice
554
+ >;
555
+
556
+ /**
557
+ * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
558
+ */
559
+ export const ListPromptVersionsPromptsFormat = {
560
+ Wav: "wav",
561
+ Mp3: "mp3",
562
+ Flac: "flac",
563
+ Opus: "opus",
564
+ Pcm16: "pcm16",
565
+ } as const;
566
+ /**
567
+ * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
568
+ */
569
+ export type ListPromptVersionsPromptsFormat = ClosedEnum<
570
+ typeof ListPromptVersionsPromptsFormat
571
+ >;
572
+
573
+ /**
574
+ * Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
575
+ */
576
+ export type ListPromptVersionsAudio = {
577
+ /**
578
+ * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
579
+ */
580
+ voice: ListPromptVersionsVoice;
581
+ /**
582
+ * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
583
+ */
584
+ format: ListPromptVersionsPromptsFormat;
585
+ };
586
+
587
+ export type ListPromptVersionsResponseFormatJsonSchema = {
588
+ /**
589
+ * A description of what the response format is for, used by the model to determine how to respond in the format.
590
+ */
591
+ description?: string | undefined;
592
+ /**
593
+ * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
594
+ */
595
+ name: string;
596
+ /**
597
+ * The schema for the response format, described as a JSON Schema object.
598
+ */
599
+ schema?: any | undefined;
600
+ /**
601
+ * Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true.
602
+ */
603
+ strict: boolean;
604
+ };
605
+
606
+ /**
607
+ * @remarks
608
+ *
609
+ * JSON Schema response format. Used to generate structured JSON responses
610
+ */
611
+ export type ListPromptVersionsResponseFormatPromptsJSONSchema = {
612
+ type: "json_schema";
613
+ jsonSchema: ListPromptVersionsResponseFormatJsonSchema;
614
+ };
615
+
616
+ /**
617
+ * @remarks
618
+ *
619
+ * JSON object response format. An older method of generating JSON responses. Using `json_schema` is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
620
+ */
621
+ export type ListPromptVersionsResponseFormatJSONObject = {
622
+ type: "json_object";
623
+ };
624
+
625
+ /**
626
+ * @remarks
627
+ *
628
+ * Default response format. Used to generate text responses
629
+ */
630
+ export type ListPromptVersionsResponseFormatText = {
631
+ type: "text";
632
+ };
633
+
634
+ /**
635
+ * An object specifying the format that the model must output
636
+ */
637
+ export type ListPromptVersionsResponseFormat =
638
+ | ListPromptVersionsResponseFormatText
639
+ | ListPromptVersionsResponseFormatJSONObject
640
+ | ListPromptVersionsResponseFormatPromptsJSONSchema;
641
+
642
+ /**
643
+ * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
644
+ *
645
+ * @remarks
646
+ *
647
+ * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
648
+ * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
649
+ * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
650
+ * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
651
+ *
652
+ * Any of "none", "minimal", "low", "medium", "high", "xhigh".
653
+ */
654
+ export const ListPromptVersionsReasoningEffort = {
655
+ None: "none",
656
+ Minimal: "minimal",
657
+ Low: "low",
658
+ Medium: "medium",
659
+ High: "high",
660
+ Xhigh: "xhigh",
661
+ } as const;
662
+ /**
663
+ * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
664
+ *
665
+ * @remarks
666
+ *
667
+ * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
668
+ * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
669
+ * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
670
+ * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
671
+ *
672
+ * Any of "none", "minimal", "low", "medium", "high", "xhigh".
673
+ */
674
+ export type ListPromptVersionsReasoningEffort = ClosedEnum<
675
+ typeof ListPromptVersionsReasoningEffort
676
+ >;
677
+
678
+ /**
679
+ * Up to 4 sequences where the API will stop generating further tokens.
680
+ */
681
+ export type ListPromptVersionsStop = string | Array<string>;
682
+
683
+ /**
684
+ * Options for streaming response. Only set this when you set stream: true.
685
+ */
686
+ export type ListPromptVersionsStreamOptions = {
687
+ /**
688
+ * If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a usage field, but with a null value.
689
+ */
690
+ includeUsage?: boolean | undefined;
691
+ };
692
+
693
+ export type ListPromptVersionsThinking =
694
+ | components.ThinkingConfigDisabledSchema
695
+ | components.ThinkingConfigEnabledSchema
696
+ | components.ThinkingConfigAdaptiveSchema;
697
+
698
+ /**
699
+ * The type of the tool. Currently, only function is supported.
700
+ */
701
+ export const ListPromptVersionsToolChoiceType = {
702
+ Function: "function",
703
+ } as const;
704
+ /**
705
+ * The type of the tool. Currently, only function is supported.
706
+ */
707
+ export type ListPromptVersionsToolChoiceType = ClosedEnum<
708
+ typeof ListPromptVersionsToolChoiceType
709
+ >;
710
+
711
+ export type ListPromptVersionsToolChoiceFunction = {
712
+ /**
713
+ * The name of the function to call.
714
+ */
715
+ name: string;
716
+ };
717
+
718
+ export type ListPromptVersionsToolChoice2 = {
719
+ /**
720
+ * The type of the tool. Currently, only function is supported.
721
+ */
722
+ type?: ListPromptVersionsToolChoiceType | undefined;
723
+ function: ListPromptVersionsToolChoiceFunction;
724
+ };
725
+
726
+ export const ListPromptVersionsToolChoice1 = {
727
+ None: "none",
728
+ Auto: "auto",
729
+ Required: "required",
730
+ } as const;
731
+ export type ListPromptVersionsToolChoice1 = ClosedEnum<
732
+ typeof ListPromptVersionsToolChoice1
733
+ >;
734
+
735
+ /**
736
+ * Controls which (if any) tool is called by the model.
737
+ */
738
+ export type ListPromptVersionsToolChoice =
739
+ | ListPromptVersionsToolChoice2
740
+ | ListPromptVersionsToolChoice1;
741
+
742
+ export const ListPromptVersionsModalities = {
743
+ Text: "text",
744
+ Audio: "audio",
745
+ } as const;
746
+ export type ListPromptVersionsModalities = ClosedEnum<
747
+ typeof ListPromptVersionsModalities
748
+ >;
749
+
750
+ /**
751
+ * The key of the guardrail.
752
+ */
753
+ export const ListPromptVersionsId1 = {
754
+ OrqPiiDetection: "orq_pii_detection",
755
+ OrqSexualModeration: "orq_sexual_moderation",
756
+ OrqHarmfulModeration: "orq_harmful_moderation",
757
+ } as const;
758
+ /**
759
+ * The key of the guardrail.
760
+ */
761
+ export type ListPromptVersionsId1 = ClosedEnum<typeof ListPromptVersionsId1>;
762
+
763
+ export type ListPromptVersionsId = ListPromptVersionsId1 | string;
764
+
765
+ /**
766
+ * Determines whether the guardrail runs on the input (user message) or output (model response).
767
+ */
768
+ export const ListPromptVersionsExecuteOn = {
769
+ Input: "input",
770
+ Output: "output",
771
+ } as const;
772
+ /**
773
+ * Determines whether the guardrail runs on the input (user message) or output (model response).
774
+ */
775
+ export type ListPromptVersionsExecuteOn = ClosedEnum<
776
+ typeof ListPromptVersionsExecuteOn
777
+ >;
778
+
779
+ export type ListPromptVersionsGuardrails = {
780
+ id: ListPromptVersionsId1 | string;
781
+ /**
782
+ * Determines whether the guardrail runs on the input (user message) or output (model response).
783
+ */
784
+ executeOn: ListPromptVersionsExecuteOn;
785
+ };
786
+
787
+ export type ListPromptVersionsFallbacks = {
788
+ /**
789
+ * Fallback model identifier
790
+ */
791
+ model: string;
792
+ };
793
+
794
+ /**
795
+ * Retry configuration for the request
796
+ */
797
+ export type ListPromptVersionsRetry = {
798
+ /**
799
+ * Number of retry attempts (1-5)
800
+ */
801
+ count: number;
802
+ /**
803
+ * HTTP status codes that trigger retry logic
804
+ */
805
+ onCodes?: Array<number> | undefined;
806
+ };
807
+
808
+ export const ListPromptVersionsType = {
809
+ ExactMatch: "exact_match",
810
+ } as const;
811
+ export type ListPromptVersionsType = ClosedEnum<typeof ListPromptVersionsType>;
812
+
813
+ /**
814
+ * Cache configuration for the request.
815
+ */
816
+ export type ListPromptVersionsCache = {
817
+ /**
818
+ * Time to live for cached responses in seconds. Maximum 259200 seconds (3 days).
819
+ */
820
+ ttl: number;
821
+ type: ListPromptVersionsType;
822
+ };
823
+
824
+ export const ListPromptVersionsLoadBalancerType = {
825
+ WeightBased: "weight_based",
826
+ } as const;
827
+ export type ListPromptVersionsLoadBalancerType = ClosedEnum<
828
+ typeof ListPromptVersionsLoadBalancerType
829
+ >;
830
+
831
+ export type ListPromptVersionsLoadBalancerModels = {
832
+ /**
833
+ * Model identifier for load balancing
834
+ */
835
+ model: string;
836
+ /**
837
+ * Weight assigned to this model for load balancing
838
+ */
839
+ weight: number;
840
+ };
841
+
842
+ export type ListPromptVersionsLoadBalancer1 = {
843
+ type: ListPromptVersionsLoadBalancerType;
844
+ models: Array<ListPromptVersionsLoadBalancerModels>;
845
+ };
846
+
847
+ /**
848
+ * Load balancer configuration for the request.
849
+ */
850
+ export type ListPromptVersionsLoadBalancer = ListPromptVersionsLoadBalancer1;
851
+
852
+ /**
853
+ * Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
854
+ */
855
+ export type ListPromptVersionsTimeout = {
856
+ /**
857
+ * Timeout value in milliseconds
858
+ */
859
+ callTimeout: number;
860
+ };
861
+
862
+ export type ListPromptVersionsContentPromptsResponse2002 =
863
+ components.TextContentPartSchema;
864
+
865
+ /**
866
+ * The contents of the tool message.
867
+ */
868
+ export type ListPromptVersionsMessagesPromptsResponse200Content =
869
+ | string
870
+ | Array<components.TextContentPartSchema>;
871
+
872
+ /**
873
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
874
+ */
875
+ export const ListPromptVersionsMessagesPromptsType = {
876
+ Ephemeral: "ephemeral",
877
+ } as const;
878
+ /**
879
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
880
+ */
881
+ export type ListPromptVersionsMessagesPromptsType = ClosedEnum<
882
+ typeof ListPromptVersionsMessagesPromptsType
883
+ >;
884
+
885
+ /**
886
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
887
+ *
888
+ * @remarks
889
+ *
890
+ * - `5m`: 5 minutes
891
+ * - `1h`: 1 hour
892
+ *
893
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
894
+ */
895
+ export const ListPromptVersionsMessagesTtl = {
896
+ Fivem: "5m",
897
+ Oneh: "1h",
898
+ } as const;
899
+ /**
900
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
901
+ *
902
+ * @remarks
903
+ *
904
+ * - `5m`: 5 minutes
905
+ * - `1h`: 1 hour
906
+ *
907
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
908
+ */
909
+ export type ListPromptVersionsMessagesTtl = ClosedEnum<
910
+ typeof ListPromptVersionsMessagesTtl
911
+ >;
912
+
913
+ export type ListPromptVersionsMessagesCacheControl = {
914
+ /**
915
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
916
+ */
917
+ type: ListPromptVersionsMessagesPromptsType;
918
+ /**
919
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
920
+ *
921
+ * @remarks
922
+ *
923
+ * - `5m`: 5 minutes
924
+ * - `1h`: 1 hour
925
+ *
926
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
927
+ */
928
+ ttl: ListPromptVersionsMessagesTtl;
929
+ };
930
+
931
+ export type ListPromptVersionsMessagesToolMessage = {
932
+ /**
933
+ * The role of the messages author, in this case tool.
934
+ */
935
+ role: "tool";
936
+ /**
937
+ * The contents of the tool message.
938
+ */
939
+ content: string | Array<components.TextContentPartSchema>;
940
+ /**
941
+ * Tool call that this message is responding to.
942
+ */
943
+ toolCallId: string | null;
944
+ cacheControl?: ListPromptVersionsMessagesCacheControl | undefined;
945
+ };
946
+
947
+ export type ListPromptVersionsContentPromptsResponse2 =
948
+ | (components.TextContentPartSchema & { type: "text" })
949
+ | components.RefusalPartSchema
950
+ | components.ReasoningPartSchema
951
+ | components.RedactedReasoningPartSchema;
952
+
953
+ /**
954
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
955
+ */
956
+ export type ListPromptVersionsMessagesPromptsResponseContent =
957
+ | string
958
+ | Array<
959
+ | (components.TextContentPartSchema & { type: "text" })
960
+ | components.RefusalPartSchema
961
+ | components.ReasoningPartSchema
962
+ | components.RedactedReasoningPartSchema
963
+ >;
964
+
965
+ /**
966
+ * Data about a previous audio response from the model.
967
+ */
968
+ export type ListPromptVersionsMessagesAudio = {
969
+ /**
970
+ * Unique identifier for a previous audio response from the model.
971
+ */
972
+ id: string;
973
+ };
974
+
975
+ /**
976
+ * The type of the tool. Currently, only `function` is supported.
977
+ */
978
+ export const ListPromptVersionsMessagesType = {
979
+ Function: "function",
980
+ } as const;
981
+ /**
982
+ * The type of the tool. Currently, only `function` is supported.
983
+ */
984
+ export type ListPromptVersionsMessagesType = ClosedEnum<
985
+ typeof ListPromptVersionsMessagesType
986
+ >;
987
+
988
+ export type ListPromptVersionsMessagesFunction = {
989
+ /**
990
+ * The name of the function to call.
991
+ */
992
+ name?: string | undefined;
993
+ /**
994
+ * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
995
+ */
996
+ arguments?: string | undefined;
997
+ };
998
+
999
+ export type ListPromptVersionsMessagesToolCalls = {
1000
+ /**
1001
+ * The ID of the tool call.
1002
+ */
1003
+ id: string;
1004
+ /**
1005
+ * The type of the tool. Currently, only `function` is supported.
1006
+ */
1007
+ type: ListPromptVersionsMessagesType;
1008
+ function: ListPromptVersionsMessagesFunction;
1009
+ /**
1010
+ * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
1011
+ */
1012
+ thoughtSignature?: string | undefined;
1013
+ };
1014
+
1015
+ export type ListPromptVersionsMessagesAssistantMessage = {
1016
+ /**
1017
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
1018
+ */
1019
+ content?:
1020
+ | string
1021
+ | Array<
1022
+ | (components.TextContentPartSchema & { type: "text" })
1023
+ | components.RefusalPartSchema
1024
+ | components.ReasoningPartSchema
1025
+ | components.RedactedReasoningPartSchema
1026
+ >
1027
+ | null
1028
+ | undefined;
1029
+ /**
1030
+ * The refusal message by the assistant.
1031
+ */
1032
+ refusal?: string | null | undefined;
1033
+ /**
1034
+ * The role of the messages author, in this case `assistant`.
1035
+ */
1036
+ role: "assistant";
1037
+ /**
1038
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
1039
+ */
1040
+ name?: string | undefined;
1041
+ /**
1042
+ * Data about a previous audio response from the model.
1043
+ */
1044
+ audio?: ListPromptVersionsMessagesAudio | null | undefined;
1045
+ /**
1046
+ * The tool calls generated by the model, such as function calls.
1047
+ */
1048
+ toolCalls?: Array<ListPromptVersionsMessagesToolCalls> | undefined;
1049
+ };
1050
+
1051
+ /**
1052
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1053
+ */
1054
+ export const ListPromptVersions2PromptsResponse200ApplicationJSONType = {
1055
+ Ephemeral: "ephemeral",
1056
+ } as const;
1057
+ /**
1058
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1059
+ */
1060
+ export type ListPromptVersions2PromptsResponse200ApplicationJSONType =
1061
+ ClosedEnum<typeof ListPromptVersions2PromptsResponse200ApplicationJSONType>;
1062
+
1063
+ /**
1064
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
1065
+ *
1066
+ * @remarks
1067
+ *
1068
+ * - `5m`: 5 minutes
1069
+ * - `1h`: 1 hour
1070
+ *
1071
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1072
+ */
1073
+ export const ListPromptVersions2Ttl = {
1074
+ Fivem: "5m",
1075
+ Oneh: "1h",
1076
+ } as const;
1077
+ /**
1078
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
1079
+ *
1080
+ * @remarks
1081
+ *
1082
+ * - `5m`: 5 minutes
1083
+ * - `1h`: 1 hour
1084
+ *
1085
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1086
+ */
1087
+ export type ListPromptVersions2Ttl = ClosedEnum<typeof ListPromptVersions2Ttl>;
1088
+
1089
+ export type ListPromptVersions2CacheControl = {
1090
+ /**
1091
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1092
+ */
1093
+ type: ListPromptVersions2PromptsResponse200ApplicationJSONType;
1094
+ /**
1095
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
1096
+ *
1097
+ * @remarks
1098
+ *
1099
+ * - `5m`: 5 minutes
1100
+ * - `1h`: 1 hour
1101
+ *
1102
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1103
+ */
1104
+ ttl: ListPromptVersions2Ttl;
1105
+ };
1106
+
1107
+ export type ListPromptVersions24 = {
1108
+ /**
1109
+ * The type of the content part. Always `file`.
1110
+ */
1111
+ type: "file";
1112
+ cacheControl?: ListPromptVersions2CacheControl | undefined;
1113
+ /**
1114
+ * File data for the content part. Must contain either file_data or uri, but not both.
1115
+ */
1116
+ file: components.FileContentPartSchema;
1117
+ };
1118
+
1119
+ export type ListPromptVersionsContentPrompts2 =
1120
+ | (components.TextContentPartSchema & { type: "text" })
1121
+ | components.ImageContentPartSchema
1122
+ | components.AudioContentPartSchema
1123
+ | ListPromptVersions24;
1124
+
1125
+ /**
1126
+ * The contents of the user message.
1127
+ */
1128
+ export type ListPromptVersionsMessagesPromptsContent =
1129
+ | string
1130
+ | Array<
1131
+ | (components.TextContentPartSchema & { type: "text" })
1132
+ | components.ImageContentPartSchema
1133
+ | components.AudioContentPartSchema
1134
+ | ListPromptVersions24
1135
+ >;
1136
+
1137
+ export type ListPromptVersionsMessagesUserMessage = {
1138
+ /**
1139
+ * The role of the messages author, in this case `user`.
1140
+ */
1141
+ role: "user";
1142
+ /**
1143
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
1144
+ */
1145
+ name?: string | undefined;
1146
+ /**
1147
+ * The contents of the user message.
1148
+ */
1149
+ content:
1150
+ | string
1151
+ | Array<
1152
+ | (components.TextContentPartSchema & { type: "text" })
1153
+ | components.ImageContentPartSchema
1154
+ | components.AudioContentPartSchema
1155
+ | ListPromptVersions24
1156
+ >;
1157
+ };
1158
+
1159
+ /**
1160
+ * The contents of the system message.
1161
+ */
1162
+ export type ListPromptVersionsMessagesContent =
1163
+ | string
1164
+ | Array<components.TextContentPartSchema>;
1165
+
1166
+ /**
1167
+ * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
1168
+ */
1169
+ export type ListPromptVersionsMessagesSystemMessage = {
1170
+ /**
1171
+ * The role of the messages author, in this case `system`.
1172
+ */
1173
+ role: "system";
1174
+ /**
1175
+ * The contents of the system message.
1176
+ */
1177
+ content: string | Array<components.TextContentPartSchema>;
1178
+ /**
1179
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
1180
+ */
1181
+ name?: string | undefined;
1182
+ };
1183
+
1184
+ export type ListPromptVersionsPromptsMessages =
1185
+ | ListPromptVersionsMessagesSystemMessage
1186
+ | ListPromptVersionsMessagesUserMessage
1187
+ | ListPromptVersionsMessagesAssistantMessage
1188
+ | ListPromptVersionsMessagesToolMessage;
1189
+
1190
+ /**
1191
+ * Prompt configuration with model and messages. Use this instead of prompt_config.
1192
+ */
1193
+ export type ListPromptVersionsPromptField = {
1194
+ /**
1195
+ * The name to display on the trace. If not specified, the default system name will be used.
1196
+ */
1197
+ name?: string | undefined;
1198
+ /**
1199
+ * Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
1200
+ */
1201
+ audio?: ListPromptVersionsAudio | null | undefined;
1202
+ /**
1203
+ * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
1204
+ */
1205
+ frequencyPenalty?: number | null | undefined;
1206
+ /**
1207
+ * `[Deprecated]`. The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API.
1208
+ *
1209
+ * @remarks
1210
+ *
1211
+ * This value is now `deprecated` in favor of `max_completion_tokens`, and is not compatible with o1 series models.
1212
+ */
1213
+ maxTokens?: number | null | undefined;
1214
+ /**
1215
+ * An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens
1216
+ */
1217
+ maxCompletionTokens?: number | null | undefined;
1218
+ /**
1219
+ * Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.
1220
+ */
1221
+ logprobs?: boolean | null | undefined;
1222
+ /**
1223
+ * An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.
1224
+ */
1225
+ topLogprobs?: number | null | undefined;
1226
+ /**
1227
+ * How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
1228
+ */
1229
+ n?: number | null | undefined;
1230
+ /**
1231
+ * Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
1232
+ */
1233
+ presencePenalty?: number | null | undefined;
1234
+ /**
1235
+ * An object specifying the format that the model must output
1236
+ */
1237
+ responseFormat?:
1238
+ | ListPromptVersionsResponseFormatText
1239
+ | ListPromptVersionsResponseFormatJSONObject
1240
+ | ListPromptVersionsResponseFormatPromptsJSONSchema
1241
+ | undefined;
1242
+ /**
1243
+ * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
1244
+ *
1245
+ * @remarks
1246
+ *
1247
+ * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
1248
+ * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
1249
+ * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1250
+ * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1251
+ *
1252
+ * Any of "none", "minimal", "low", "medium", "high", "xhigh".
1253
+ */
1254
+ reasoningEffort?: ListPromptVersionsReasoningEffort | undefined;
1255
+ /**
1256
+ * Adjusts response verbosity. Lower levels yield shorter answers.
1257
+ */
1258
+ verbosity?: string | undefined;
1259
+ /**
1260
+ * If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.
1261
+ */
1262
+ seed?: number | null | undefined;
1263
+ /**
1264
+ * Up to 4 sequences where the API will stop generating further tokens.
1265
+ */
1266
+ stop?: string | Array<string> | null | undefined;
1267
+ /**
1268
+ * Options for streaming response. Only set this when you set stream: true.
1269
+ */
1270
+ streamOptions?: ListPromptVersionsStreamOptions | null | undefined;
1271
+ thinking?:
1272
+ | components.ThinkingConfigDisabledSchema
1273
+ | components.ThinkingConfigEnabledSchema
1274
+ | components.ThinkingConfigAdaptiveSchema
1275
+ | undefined;
1276
+ /**
1277
+ * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
1278
+ */
1279
+ temperature?: number | null | undefined;
1280
+ /**
1281
+ * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
1282
+ */
1283
+ topP?: number | null | undefined;
1284
+ /**
1285
+ * Limits the model to consider only the top k most likely tokens at each step.
1286
+ */
1287
+ topK?: number | null | undefined;
1288
+ /**
1289
+ * Controls which (if any) tool is called by the model.
1290
+ */
1291
+ toolChoice?:
1292
+ | ListPromptVersionsToolChoice2
1293
+ | ListPromptVersionsToolChoice1
1294
+ | undefined;
1295
+ /**
1296
+ * Whether to enable parallel function calling during tool use.
1297
+ */
1298
+ parallelToolCalls?: boolean | undefined;
1299
+ /**
1300
+ * Output types that you would like the model to generate. Most models are capable of generating text, which is the default: ["text"]. The gpt-4o-audio-preview model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["text", "audio"].
1301
+ */
1302
+ modalities?: Array<ListPromptVersionsModalities> | null | undefined;
1303
+ /**
1304
+ * A list of guardrails to apply to the request.
1305
+ */
1306
+ guardrails?: Array<ListPromptVersionsGuardrails> | undefined;
1307
+ /**
1308
+ * Array of fallback models to use if primary model fails
1309
+ */
1310
+ fallbacks?: Array<ListPromptVersionsFallbacks> | undefined;
1311
+ /**
1312
+ * Retry configuration for the request
1313
+ */
1314
+ retry?: ListPromptVersionsRetry | undefined;
1315
+ /**
1316
+ * Cache configuration for the request.
1317
+ */
1318
+ cache?: ListPromptVersionsCache | undefined;
1319
+ /**
1320
+ * Load balancer configuration for the request.
1321
+ */
1322
+ loadBalancer?: ListPromptVersionsLoadBalancer1 | undefined;
1323
+ /**
1324
+ * Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
1325
+ */
1326
+ timeout?: ListPromptVersionsTimeout | undefined;
1327
+ /**
1328
+ * Array of messages that make up the conversation. Each message has a role (system, user, assistant, or tool) and content.
1329
+ */
1330
+ messages?:
1331
+ | Array<
1332
+ | ListPromptVersionsMessagesSystemMessage
1333
+ | ListPromptVersionsMessagesUserMessage
1334
+ | ListPromptVersionsMessagesAssistantMessage
1335
+ | ListPromptVersionsMessagesToolMessage
1336
+ >
1337
+ | undefined;
1338
+ /**
1339
+ * Model ID used to generate the response, like `openai/gpt-4o` or `anthropic/claude-3-5-sonnet-20241022`. For private models, use format: `{workspaceKey}@{provider}/{model}`.
1340
+ */
1341
+ model?: string | null | undefined;
1342
+ version?: string | undefined;
1343
+ };
1344
+
1345
+ export const ListPromptVersionsUseCases = {
1346
+ AgentsSimulations: "Agents simulations",
1347
+ Agents: "Agents",
1348
+ APIInteraction: "API interaction",
1349
+ AutonomousAgents: "Autonomous Agents",
1350
+ Chatbots: "Chatbots",
1351
+ Classification: "Classification",
1352
+ CodeUnderstanding: "Code understanding",
1353
+ CodeWriting: "Code writing",
1354
+ Conversation: "Conversation",
1355
+ DocumentsQA: "Documents QA",
1356
+ Evaluation: "Evaluation",
1357
+ Extraction: "Extraction",
1358
+ MultiModal: "Multi-modal",
1359
+ SelfChecking: "Self-checking",
1360
+ SentimentAnalysis: "Sentiment analysis",
1361
+ Sql: "SQL",
1362
+ Summarization: "Summarization",
1363
+ Tagging: "Tagging",
1364
+ TranslationDocument: "Translation (document)",
1365
+ TranslationSentences: "Translation (sentences)",
1366
+ } as const;
1367
+ export type ListPromptVersionsUseCases = ClosedEnum<
1368
+ typeof ListPromptVersionsUseCases
1369
+ >;
1370
+
1371
+ /**
1372
+ * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
1373
+ */
1374
+ export const ListPromptVersionsLanguage = {
1375
+ Chinese: "Chinese",
1376
+ Dutch: "Dutch",
1377
+ English: "English",
1378
+ French: "French",
1379
+ German: "German",
1380
+ Russian: "Russian",
1381
+ Spanish: "Spanish",
1382
+ } as const;
1383
+ /**
1384
+ * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
1385
+ */
1386
+ export type ListPromptVersionsLanguage = ClosedEnum<
1387
+ typeof ListPromptVersionsLanguage
1388
+ >;
1389
+
1390
+ export type ListPromptVersionsMetadata = {
1391
+ /**
1392
+ * 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
1393
+ */
1394
+ useCases?: Array<ListPromptVersionsUseCases> | undefined;
1395
+ /**
1396
+ * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
1397
+ */
1398
+ language?: ListPromptVersionsLanguage | null | undefined;
1399
+ };
1400
+
1401
+ export type ListPromptVersionsData = {
1402
+ id: string;
1403
+ createdById?: string | null | undefined;
1404
+ updatedById?: string | null | undefined;
1405
+ /**
1406
+ * 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
1407
+ */
1408
+ description?: string | null | undefined;
1409
+ /**
1410
+ * [DEPRECATED] Use the `prompt` property instead. A list of messages compatible with the openAI schema.
1411
+ *
1412
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
1413
+ */
1414
+ promptConfig?: ListPromptVersionsPromptConfig | undefined;
1415
+ /**
1416
+ * Prompt configuration with model and messages. Use this instead of prompt_config.
1417
+ */
1418
+ prompt: ListPromptVersionsPromptField;
1419
+ metadata?: ListPromptVersionsMetadata | undefined;
1420
+ timestamp: string;
1421
+ };
1422
+
1423
+ /**
1424
+ * Prompt versions retrieved.
1425
+ */
1426
+ export type ListPromptVersionsResponseBody = {
1427
+ object: ListPromptVersionsObject;
1428
+ data: Array<ListPromptVersionsData>;
1429
+ hasMore: boolean;
1430
+ };
1431
+
1432
+ /** @internal */
1433
+ export type ListPromptVersionsRequest$Outbound = {
1434
+ prompt_id: string;
1435
+ limit: number;
1436
+ starting_after?: string | undefined;
1437
+ ending_before?: string | undefined;
1438
+ };
1439
+
1440
+ /** @internal */
1441
+ export const ListPromptVersionsRequest$outboundSchema: z.ZodType<
1442
+ ListPromptVersionsRequest$Outbound,
1443
+ z.ZodTypeDef,
1444
+ ListPromptVersionsRequest
1445
+ > = z.object({
1446
+ promptId: z.string(),
1447
+ limit: z.number().int().default(10),
1448
+ startingAfter: z.string().optional(),
1449
+ endingBefore: z.string().optional(),
1450
+ }).transform((v) => {
1451
+ return remap$(v, {
1452
+ promptId: "prompt_id",
1453
+ startingAfter: "starting_after",
1454
+ endingBefore: "ending_before",
1455
+ });
1456
+ });
1457
+
1458
+ export function listPromptVersionsRequestToJSON(
1459
+ listPromptVersionsRequest: ListPromptVersionsRequest,
1460
+ ): string {
1461
+ return JSON.stringify(
1462
+ ListPromptVersionsRequest$outboundSchema.parse(listPromptVersionsRequest),
1463
+ );
1464
+ }
1465
+
1466
+ /** @internal */
1467
+ export const ListPromptVersionsObject$inboundSchema: z.ZodNativeEnum<
1468
+ typeof ListPromptVersionsObject
1469
+ > = z.nativeEnum(ListPromptVersionsObject);
1470
+
1471
+ /** @internal */
1472
+ export const ListPromptVersionsModelType$inboundSchema: z.ZodNativeEnum<
1473
+ typeof ListPromptVersionsModelType
1474
+ > = z.nativeEnum(ListPromptVersionsModelType);
1475
+
1476
+ /** @internal */
1477
+ export const ListPromptVersionsFormat$inboundSchema: z.ZodNativeEnum<
1478
+ typeof ListPromptVersionsFormat
1479
+ > = z.nativeEnum(ListPromptVersionsFormat);
1480
+
1481
+ /** @internal */
1482
+ export const ListPromptVersionsResponseFormat6$inboundSchema: z.ZodNativeEnum<
1483
+ typeof ListPromptVersionsResponseFormat6
1484
+ > = z.nativeEnum(ListPromptVersionsResponseFormat6);
1485
+
1486
+ /** @internal */
1487
+ export const ListPromptVersionsResponseFormat5$inboundSchema: z.ZodNativeEnum<
1488
+ typeof ListPromptVersionsResponseFormat5
1489
+ > = z.nativeEnum(ListPromptVersionsResponseFormat5);
1490
+
1491
+ /** @internal */
1492
+ export const ListPromptVersionsResponseFormat4$inboundSchema: z.ZodNativeEnum<
1493
+ typeof ListPromptVersionsResponseFormat4
1494
+ > = z.nativeEnum(ListPromptVersionsResponseFormat4);
1495
+
1496
+ /** @internal */
1497
+ export const ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType$inboundSchema:
1498
+ z.ZodNativeEnum<
1499
+ typeof ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType
1500
+ > = z.nativeEnum(
1501
+ ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType,
1502
+ );
1503
+
1504
+ /** @internal */
1505
+ export const ListPromptVersionsResponseFormat3$inboundSchema: z.ZodType<
1506
+ ListPromptVersionsResponseFormat3,
1507
+ z.ZodTypeDef,
1508
+ unknown
1509
+ > = z.object({
1510
+ type:
1511
+ ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType$inboundSchema,
1512
+ });
1513
+
1514
+ export function listPromptVersionsResponseFormat3FromJSON(
1515
+ jsonString: string,
1516
+ ): SafeParseResult<ListPromptVersionsResponseFormat3, SDKValidationError> {
1517
+ return safeParse(
1518
+ jsonString,
1519
+ (x) => ListPromptVersionsResponseFormat3$inboundSchema.parse(JSON.parse(x)),
1520
+ `Failed to parse 'ListPromptVersionsResponseFormat3' from JSON`,
1521
+ );
1522
+ }
1523
+
1524
+ /** @internal */
1525
+ export const ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType$inboundSchema:
1526
+ z.ZodNativeEnum<
1527
+ typeof ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType
1528
+ > = z.nativeEnum(
1529
+ ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType,
1530
+ );
1531
+
1532
+ /** @internal */
1533
+ export const ListPromptVersionsResponseFormat2$inboundSchema: z.ZodType<
1534
+ ListPromptVersionsResponseFormat2,
1535
+ z.ZodTypeDef,
1536
+ unknown
1537
+ > = z.object({
1538
+ type:
1539
+ ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType$inboundSchema,
1540
+ });
1541
+
1542
+ export function listPromptVersionsResponseFormat2FromJSON(
1543
+ jsonString: string,
1544
+ ): SafeParseResult<ListPromptVersionsResponseFormat2, SDKValidationError> {
1545
+ return safeParse(
1546
+ jsonString,
1547
+ (x) => ListPromptVersionsResponseFormat2$inboundSchema.parse(JSON.parse(x)),
1548
+ `Failed to parse 'ListPromptVersionsResponseFormat2' from JSON`,
1549
+ );
1550
+ }
1551
+
1552
+ /** @internal */
1553
+ export const ListPromptVersionsResponseFormatPromptsResponse200Type$inboundSchema:
1554
+ z.ZodNativeEnum<
1555
+ typeof ListPromptVersionsResponseFormatPromptsResponse200Type
1556
+ > = z.nativeEnum(ListPromptVersionsResponseFormatPromptsResponse200Type);
1557
+
1558
+ /** @internal */
1559
+ export const ListPromptVersionsResponseFormatPromptsResponseJsonSchema$inboundSchema:
1560
+ z.ZodType<
1561
+ ListPromptVersionsResponseFormatPromptsResponseJsonSchema,
1562
+ z.ZodTypeDef,
1563
+ unknown
1564
+ > = z.object({
1565
+ name: z.string(),
1566
+ description: z.string().optional(),
1567
+ strict: z.boolean().optional(),
1568
+ schema: z.record(z.any()),
1569
+ });
1570
+
1571
+ export function listPromptVersionsResponseFormatPromptsResponseJsonSchemaFromJSON(
1572
+ jsonString: string,
1573
+ ): SafeParseResult<
1574
+ ListPromptVersionsResponseFormatPromptsResponseJsonSchema,
1575
+ SDKValidationError
1576
+ > {
1577
+ return safeParse(
1578
+ jsonString,
1579
+ (x) =>
1580
+ ListPromptVersionsResponseFormatPromptsResponseJsonSchema$inboundSchema
1581
+ .parse(JSON.parse(x)),
1582
+ `Failed to parse 'ListPromptVersionsResponseFormatPromptsResponseJsonSchema' from JSON`,
1583
+ );
1584
+ }
1585
+
1586
+ /** @internal */
1587
+ export const ListPromptVersionsResponseFormat1$inboundSchema: z.ZodType<
1588
+ ListPromptVersionsResponseFormat1,
1589
+ z.ZodTypeDef,
1590
+ unknown
1591
+ > = z.object({
1592
+ type: ListPromptVersionsResponseFormatPromptsResponse200Type$inboundSchema,
1593
+ display_name: z.string().optional(),
1594
+ json_schema: z.lazy(() =>
1595
+ ListPromptVersionsResponseFormatPromptsResponseJsonSchema$inboundSchema
1596
+ ),
1597
+ }).transform((v) => {
1598
+ return remap$(v, {
1599
+ "display_name": "displayName",
1600
+ "json_schema": "jsonSchema",
1601
+ });
1602
+ });
1603
+
1604
+ export function listPromptVersionsResponseFormat1FromJSON(
1605
+ jsonString: string,
1606
+ ): SafeParseResult<ListPromptVersionsResponseFormat1, SDKValidationError> {
1607
+ return safeParse(
1608
+ jsonString,
1609
+ (x) => ListPromptVersionsResponseFormat1$inboundSchema.parse(JSON.parse(x)),
1610
+ `Failed to parse 'ListPromptVersionsResponseFormat1' from JSON`,
1611
+ );
1612
+ }
1613
+
1614
+ /** @internal */
1615
+ export const ListPromptVersionsPromptsResponseFormat$inboundSchema: z.ZodType<
1616
+ ListPromptVersionsPromptsResponseFormat,
1617
+ z.ZodTypeDef,
1618
+ unknown
1619
+ > = z.union([
1620
+ z.lazy(() => ListPromptVersionsResponseFormat1$inboundSchema),
1621
+ z.lazy(() => ListPromptVersionsResponseFormat2$inboundSchema),
1622
+ z.lazy(() => ListPromptVersionsResponseFormat3$inboundSchema),
1623
+ ListPromptVersionsResponseFormat4$inboundSchema,
1624
+ ListPromptVersionsResponseFormat5$inboundSchema,
1625
+ ListPromptVersionsResponseFormat6$inboundSchema,
1626
+ ]);
1627
+
1628
+ export function listPromptVersionsPromptsResponseFormatFromJSON(
1629
+ jsonString: string,
1630
+ ): SafeParseResult<
1631
+ ListPromptVersionsPromptsResponseFormat,
1632
+ SDKValidationError
1633
+ > {
1634
+ return safeParse(
1635
+ jsonString,
1636
+ (x) =>
1637
+ ListPromptVersionsPromptsResponseFormat$inboundSchema.parse(
1638
+ JSON.parse(x),
1639
+ ),
1640
+ `Failed to parse 'ListPromptVersionsPromptsResponseFormat' from JSON`,
1641
+ );
1642
+ }
1643
+
1644
+ /** @internal */
1645
+ export const ListPromptVersionsPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
1646
+ typeof ListPromptVersionsPhotoRealVersion
1647
+ > = z.nativeEnum(ListPromptVersionsPhotoRealVersion);
1648
+
1649
+ /** @internal */
1650
+ export const ListPromptVersionsEncodingFormat$inboundSchema: z.ZodNativeEnum<
1651
+ typeof ListPromptVersionsEncodingFormat
1652
+ > = z.nativeEnum(ListPromptVersionsEncodingFormat);
1653
+
1654
+ /** @internal */
1655
+ export const ListPromptVersionsPromptsReasoningEffort$inboundSchema:
1656
+ z.ZodNativeEnum<typeof ListPromptVersionsPromptsReasoningEffort> = z
1657
+ .nativeEnum(ListPromptVersionsPromptsReasoningEffort);
1658
+
1659
+ /** @internal */
1660
+ export const ListPromptVersionsVerbosity$inboundSchema: z.ZodNativeEnum<
1661
+ typeof ListPromptVersionsVerbosity
1662
+ > = z.nativeEnum(ListPromptVersionsVerbosity);
1663
+
1664
+ /** @internal */
1665
+ export const ListPromptVersionsThinkingLevel$inboundSchema: z.ZodNativeEnum<
1666
+ typeof ListPromptVersionsThinkingLevel
1667
+ > = z.nativeEnum(ListPromptVersionsThinkingLevel);
1668
+
1669
+ /** @internal */
1670
+ export const ListPromptVersionsModelParameters$inboundSchema: z.ZodType<
1671
+ ListPromptVersionsModelParameters,
1672
+ z.ZodTypeDef,
1673
+ unknown
1674
+ > = z.object({
1675
+ temperature: z.number().optional(),
1676
+ maxTokens: z.number().optional(),
1677
+ topK: z.number().optional(),
1678
+ topP: z.number().optional(),
1679
+ frequencyPenalty: z.number().optional(),
1680
+ presencePenalty: z.number().optional(),
1681
+ numImages: z.number().optional(),
1682
+ seed: z.number().optional(),
1683
+ format: ListPromptVersionsFormat$inboundSchema.optional(),
1684
+ dimensions: z.string().optional(),
1685
+ quality: z.string().optional(),
1686
+ style: z.string().optional(),
1687
+ responseFormat: z.nullable(
1688
+ z.union([
1689
+ z.lazy(() => ListPromptVersionsResponseFormat1$inboundSchema),
1690
+ z.lazy(() => ListPromptVersionsResponseFormat2$inboundSchema),
1691
+ z.lazy(() => ListPromptVersionsResponseFormat3$inboundSchema),
1692
+ ListPromptVersionsResponseFormat4$inboundSchema,
1693
+ ListPromptVersionsResponseFormat5$inboundSchema,
1694
+ ListPromptVersionsResponseFormat6$inboundSchema,
1695
+ ]),
1696
+ ).optional(),
1697
+ photoRealVersion: ListPromptVersionsPhotoRealVersion$inboundSchema.optional(),
1698
+ encoding_format: ListPromptVersionsEncodingFormat$inboundSchema.optional(),
1699
+ reasoningEffort: ListPromptVersionsPromptsReasoningEffort$inboundSchema
1700
+ .optional(),
1701
+ budgetTokens: z.number().optional(),
1702
+ verbosity: ListPromptVersionsVerbosity$inboundSchema.optional(),
1703
+ thinkingLevel: ListPromptVersionsThinkingLevel$inboundSchema.optional(),
1704
+ }).transform((v) => {
1705
+ return remap$(v, {
1706
+ "encoding_format": "encodingFormat",
1707
+ });
1708
+ });
1709
+
1710
+ export function listPromptVersionsModelParametersFromJSON(
1711
+ jsonString: string,
1712
+ ): SafeParseResult<ListPromptVersionsModelParameters, SDKValidationError> {
1713
+ return safeParse(
1714
+ jsonString,
1715
+ (x) => ListPromptVersionsModelParameters$inboundSchema.parse(JSON.parse(x)),
1716
+ `Failed to parse 'ListPromptVersionsModelParameters' from JSON`,
1717
+ );
1718
+ }
1719
+
1720
+ /** @internal */
1721
+ export const ListPromptVersionsProvider$inboundSchema: z.ZodNativeEnum<
1722
+ typeof ListPromptVersionsProvider
1723
+ > = z.nativeEnum(ListPromptVersionsProvider);
1724
+
1725
+ /** @internal */
1726
+ export const ListPromptVersionsRole$inboundSchema: z.ZodNativeEnum<
1727
+ typeof ListPromptVersionsRole
1728
+ > = z.nativeEnum(ListPromptVersionsRole);
1729
+
1730
+ /** @internal */
1731
+ export const ListPromptVersions2File$inboundSchema: z.ZodType<
1732
+ ListPromptVersions2File,
1733
+ z.ZodTypeDef,
1734
+ unknown
1735
+ > = z.object({
1736
+ file_data: z.string().optional(),
1737
+ uri: z.string().optional(),
1738
+ mimeType: z.string().optional(),
1739
+ filename: z.string().optional(),
1740
+ }).transform((v) => {
1741
+ return remap$(v, {
1742
+ "file_data": "fileData",
1743
+ });
1744
+ });
1745
+
1746
+ export function listPromptVersions2FileFromJSON(
1747
+ jsonString: string,
1748
+ ): SafeParseResult<ListPromptVersions2File, SDKValidationError> {
1749
+ return safeParse(
1750
+ jsonString,
1751
+ (x) => ListPromptVersions2File$inboundSchema.parse(JSON.parse(x)),
1752
+ `Failed to parse 'ListPromptVersions2File' from JSON`,
1753
+ );
1754
+ }
1755
+
1756
+ /** @internal */
1757
+ export const ListPromptVersions23$inboundSchema: z.ZodType<
1758
+ ListPromptVersions23,
1759
+ z.ZodTypeDef,
1760
+ unknown
1761
+ > = z.object({
1762
+ type: z.literal("file"),
1763
+ file: z.lazy(() => ListPromptVersions2File$inboundSchema),
1764
+ });
1765
+
1766
+ export function listPromptVersions23FromJSON(
1767
+ jsonString: string,
1768
+ ): SafeParseResult<ListPromptVersions23, SDKValidationError> {
1769
+ return safeParse(
1770
+ jsonString,
1771
+ (x) => ListPromptVersions23$inboundSchema.parse(JSON.parse(x)),
1772
+ `Failed to parse 'ListPromptVersions23' from JSON`,
1773
+ );
1774
+ }
1775
+
1776
+ /** @internal */
1777
+ export const ListPromptVersions2ImageUrl$inboundSchema: z.ZodType<
1778
+ ListPromptVersions2ImageUrl,
1779
+ z.ZodTypeDef,
1780
+ unknown
1781
+ > = z.object({
1782
+ id: z.string().optional(),
1783
+ url: z.string(),
1784
+ detail: z.string().optional(),
1785
+ });
1786
+
1787
+ export function listPromptVersions2ImageUrlFromJSON(
1788
+ jsonString: string,
1789
+ ): SafeParseResult<ListPromptVersions2ImageUrl, SDKValidationError> {
1790
+ return safeParse(
1791
+ jsonString,
1792
+ (x) => ListPromptVersions2ImageUrl$inboundSchema.parse(JSON.parse(x)),
1793
+ `Failed to parse 'ListPromptVersions2ImageUrl' from JSON`,
1794
+ );
1795
+ }
1796
+
1797
+ /** @internal */
1798
+ export const ListPromptVersions22$inboundSchema: z.ZodType<
1799
+ ListPromptVersions22,
1800
+ z.ZodTypeDef,
1801
+ unknown
1802
+ > = z.object({
1803
+ type: z.literal("image_url"),
1804
+ image_url: z.lazy(() => ListPromptVersions2ImageUrl$inboundSchema),
1805
+ }).transform((v) => {
1806
+ return remap$(v, {
1807
+ "image_url": "imageUrl",
1808
+ });
1809
+ });
1810
+
1811
+ export function listPromptVersions22FromJSON(
1812
+ jsonString: string,
1813
+ ): SafeParseResult<ListPromptVersions22, SDKValidationError> {
1814
+ return safeParse(
1815
+ jsonString,
1816
+ (x) => ListPromptVersions22$inboundSchema.parse(JSON.parse(x)),
1817
+ `Failed to parse 'ListPromptVersions22' from JSON`,
1818
+ );
1819
+ }
1820
+
1821
+ /** @internal */
1822
+ export const ListPromptVersions21$inboundSchema: z.ZodType<
1823
+ ListPromptVersions21,
1824
+ z.ZodTypeDef,
1825
+ unknown
1826
+ > = z.object({
1827
+ type: z.literal("text"),
1828
+ text: z.string(),
1829
+ });
1830
+
1831
+ export function listPromptVersions21FromJSON(
1832
+ jsonString: string,
1833
+ ): SafeParseResult<ListPromptVersions21, SDKValidationError> {
1834
+ return safeParse(
1835
+ jsonString,
1836
+ (x) => ListPromptVersions21$inboundSchema.parse(JSON.parse(x)),
1837
+ `Failed to parse 'ListPromptVersions21' from JSON`,
1838
+ );
1839
+ }
1840
+
1841
+ /** @internal */
1842
+ export const ListPromptVersionsContent2$inboundSchema: z.ZodType<
1843
+ ListPromptVersionsContent2,
1844
+ z.ZodTypeDef,
1845
+ unknown
1846
+ > = z.union([
1847
+ z.lazy(() => ListPromptVersions21$inboundSchema),
1848
+ z.lazy(() => ListPromptVersions22$inboundSchema),
1849
+ z.lazy(() => ListPromptVersions23$inboundSchema),
1850
+ ]);
1851
+
1852
+ export function listPromptVersionsContent2FromJSON(
1853
+ jsonString: string,
1854
+ ): SafeParseResult<ListPromptVersionsContent2, SDKValidationError> {
1855
+ return safeParse(
1856
+ jsonString,
1857
+ (x) => ListPromptVersionsContent2$inboundSchema.parse(JSON.parse(x)),
1858
+ `Failed to parse 'ListPromptVersionsContent2' from JSON`,
1859
+ );
1860
+ }
1861
+
1862
+ /** @internal */
1863
+ export const ListPromptVersionsContent$inboundSchema: z.ZodType<
1864
+ ListPromptVersionsContent,
1865
+ z.ZodTypeDef,
1866
+ unknown
1867
+ > = z.union([
1868
+ z.string(),
1869
+ z.array(z.union([
1870
+ z.lazy(() => ListPromptVersions21$inboundSchema),
1871
+ z.lazy(() => ListPromptVersions22$inboundSchema),
1872
+ z.lazy(() => ListPromptVersions23$inboundSchema),
1873
+ ])),
1874
+ ]);
1875
+
1876
+ export function listPromptVersionsContentFromJSON(
1877
+ jsonString: string,
1878
+ ): SafeParseResult<ListPromptVersionsContent, SDKValidationError> {
1879
+ return safeParse(
1880
+ jsonString,
1881
+ (x) => ListPromptVersionsContent$inboundSchema.parse(JSON.parse(x)),
1882
+ `Failed to parse 'ListPromptVersionsContent' from JSON`,
1883
+ );
1884
+ }
1885
+
1886
+ /** @internal */
1887
+ export const ListPromptVersionsPromptsType$inboundSchema: z.ZodNativeEnum<
1888
+ typeof ListPromptVersionsPromptsType
1889
+ > = z.nativeEnum(ListPromptVersionsPromptsType);
1890
+
1891
+ /** @internal */
1892
+ export const ListPromptVersionsFunction$inboundSchema: z.ZodType<
1893
+ ListPromptVersionsFunction,
1894
+ z.ZodTypeDef,
1895
+ unknown
1896
+ > = z.object({
1897
+ name: z.string(),
1898
+ arguments: z.string(),
1899
+ });
1900
+
1901
+ export function listPromptVersionsFunctionFromJSON(
1902
+ jsonString: string,
1903
+ ): SafeParseResult<ListPromptVersionsFunction, SDKValidationError> {
1904
+ return safeParse(
1905
+ jsonString,
1906
+ (x) => ListPromptVersionsFunction$inboundSchema.parse(JSON.parse(x)),
1907
+ `Failed to parse 'ListPromptVersionsFunction' from JSON`,
1908
+ );
1909
+ }
1910
+
1911
+ /** @internal */
1912
+ export const ListPromptVersionsToolCalls$inboundSchema: z.ZodType<
1913
+ ListPromptVersionsToolCalls,
1914
+ z.ZodTypeDef,
1915
+ unknown
1916
+ > = z.object({
1917
+ id: z.string().optional(),
1918
+ index: z.number().optional(),
1919
+ type: ListPromptVersionsPromptsType$inboundSchema,
1920
+ function: z.lazy(() => ListPromptVersionsFunction$inboundSchema),
1921
+ });
1922
+
1923
+ export function listPromptVersionsToolCallsFromJSON(
1924
+ jsonString: string,
1925
+ ): SafeParseResult<ListPromptVersionsToolCalls, SDKValidationError> {
1926
+ return safeParse(
1927
+ jsonString,
1928
+ (x) => ListPromptVersionsToolCalls$inboundSchema.parse(JSON.parse(x)),
1929
+ `Failed to parse 'ListPromptVersionsToolCalls' from JSON`,
1930
+ );
1931
+ }
1932
+
1933
+ /** @internal */
1934
+ export const ListPromptVersionsMessages$inboundSchema: z.ZodType<
1935
+ ListPromptVersionsMessages,
1936
+ z.ZodTypeDef,
1937
+ unknown
1938
+ > = z.object({
1939
+ role: ListPromptVersionsRole$inboundSchema,
1940
+ content: z.nullable(
1941
+ z.union([
1942
+ z.string(),
1943
+ z.array(
1944
+ z.union([
1945
+ z.lazy(() => ListPromptVersions21$inboundSchema),
1946
+ z.lazy(() => ListPromptVersions22$inboundSchema),
1947
+ z.lazy(() => ListPromptVersions23$inboundSchema),
1948
+ ]),
1949
+ ),
1950
+ ]),
1951
+ ),
1952
+ tool_calls: z.array(z.lazy(() => ListPromptVersionsToolCalls$inboundSchema))
1953
+ .optional(),
1954
+ tool_call_id: z.nullable(z.string()).optional(),
1955
+ }).transform((v) => {
1956
+ return remap$(v, {
1957
+ "tool_calls": "toolCalls",
1958
+ "tool_call_id": "toolCallId",
1959
+ });
1960
+ });
1961
+
1962
+ export function listPromptVersionsMessagesFromJSON(
1963
+ jsonString: string,
1964
+ ): SafeParseResult<ListPromptVersionsMessages, SDKValidationError> {
1965
+ return safeParse(
1966
+ jsonString,
1967
+ (x) => ListPromptVersionsMessages$inboundSchema.parse(JSON.parse(x)),
1968
+ `Failed to parse 'ListPromptVersionsMessages' from JSON`,
1969
+ );
1970
+ }
1971
+
1972
+ /** @internal */
1973
+ export const ListPromptVersionsPromptConfig$inboundSchema: z.ZodType<
1974
+ ListPromptVersionsPromptConfig,
1975
+ z.ZodTypeDef,
1976
+ unknown
1977
+ > = z.object({
1978
+ stream: z.boolean().optional(),
1979
+ model: z.nullable(z.string()).optional(),
1980
+ model_db_id: z.nullable(z.string()).optional(),
1981
+ model_type: z.nullable(ListPromptVersionsModelType$inboundSchema).optional(),
1982
+ model_parameters: z.lazy(() =>
1983
+ ListPromptVersionsModelParameters$inboundSchema
1984
+ ).optional(),
1985
+ provider: z.nullable(ListPromptVersionsProvider$inboundSchema).optional(),
1986
+ integration_id: z.nullable(z.string()).optional(),
1987
+ version: z.string().optional(),
1988
+ messages: z.array(z.lazy(() => ListPromptVersionsMessages$inboundSchema)),
1989
+ }).transform((v) => {
1990
+ return remap$(v, {
1991
+ "model_db_id": "modelDbId",
1992
+ "model_type": "modelType",
1993
+ "model_parameters": "modelParameters",
1994
+ "integration_id": "integrationId",
1995
+ });
1996
+ });
1997
+
1998
+ export function listPromptVersionsPromptConfigFromJSON(
1999
+ jsonString: string,
2000
+ ): SafeParseResult<ListPromptVersionsPromptConfig, SDKValidationError> {
2001
+ return safeParse(
2002
+ jsonString,
2003
+ (x) => ListPromptVersionsPromptConfig$inboundSchema.parse(JSON.parse(x)),
2004
+ `Failed to parse 'ListPromptVersionsPromptConfig' from JSON`,
2005
+ );
2006
+ }
2007
+
2008
+ /** @internal */
2009
+ export const ListPromptVersionsVoice$inboundSchema: z.ZodNativeEnum<
2010
+ typeof ListPromptVersionsVoice
2011
+ > = z.nativeEnum(ListPromptVersionsVoice);
2012
+
2013
+ /** @internal */
2014
+ export const ListPromptVersionsPromptsFormat$inboundSchema: z.ZodNativeEnum<
2015
+ typeof ListPromptVersionsPromptsFormat
2016
+ > = z.nativeEnum(ListPromptVersionsPromptsFormat);
2017
+
2018
+ /** @internal */
2019
+ export const ListPromptVersionsAudio$inboundSchema: z.ZodType<
2020
+ ListPromptVersionsAudio,
2021
+ z.ZodTypeDef,
2022
+ unknown
2023
+ > = z.object({
2024
+ voice: ListPromptVersionsVoice$inboundSchema,
2025
+ format: ListPromptVersionsPromptsFormat$inboundSchema,
2026
+ });
2027
+
2028
+ export function listPromptVersionsAudioFromJSON(
2029
+ jsonString: string,
2030
+ ): SafeParseResult<ListPromptVersionsAudio, SDKValidationError> {
2031
+ return safeParse(
2032
+ jsonString,
2033
+ (x) => ListPromptVersionsAudio$inboundSchema.parse(JSON.parse(x)),
2034
+ `Failed to parse 'ListPromptVersionsAudio' from JSON`,
2035
+ );
2036
+ }
2037
+
2038
+ /** @internal */
2039
+ export const ListPromptVersionsResponseFormatJsonSchema$inboundSchema:
2040
+ z.ZodType<ListPromptVersionsResponseFormatJsonSchema, z.ZodTypeDef, unknown> =
2041
+ z.object({
2042
+ description: z.string().optional(),
2043
+ name: z.string(),
2044
+ schema: z.any().optional(),
2045
+ strict: z.boolean().default(false),
2046
+ });
2047
+
2048
+ export function listPromptVersionsResponseFormatJsonSchemaFromJSON(
2049
+ jsonString: string,
2050
+ ): SafeParseResult<
2051
+ ListPromptVersionsResponseFormatJsonSchema,
2052
+ SDKValidationError
2053
+ > {
2054
+ return safeParse(
2055
+ jsonString,
2056
+ (x) =>
2057
+ ListPromptVersionsResponseFormatJsonSchema$inboundSchema.parse(
2058
+ JSON.parse(x),
2059
+ ),
2060
+ `Failed to parse 'ListPromptVersionsResponseFormatJsonSchema' from JSON`,
2061
+ );
2062
+ }
2063
+
2064
+ /** @internal */
2065
+ export const ListPromptVersionsResponseFormatPromptsJSONSchema$inboundSchema:
2066
+ z.ZodType<
2067
+ ListPromptVersionsResponseFormatPromptsJSONSchema,
2068
+ z.ZodTypeDef,
2069
+ unknown
2070
+ > = z.object({
2071
+ type: z.literal("json_schema"),
2072
+ json_schema: z.lazy(() =>
2073
+ ListPromptVersionsResponseFormatJsonSchema$inboundSchema
2074
+ ),
2075
+ }).transform((v) => {
2076
+ return remap$(v, {
2077
+ "json_schema": "jsonSchema",
2078
+ });
2079
+ });
2080
+
2081
+ export function listPromptVersionsResponseFormatPromptsJSONSchemaFromJSON(
2082
+ jsonString: string,
2083
+ ): SafeParseResult<
2084
+ ListPromptVersionsResponseFormatPromptsJSONSchema,
2085
+ SDKValidationError
2086
+ > {
2087
+ return safeParse(
2088
+ jsonString,
2089
+ (x) =>
2090
+ ListPromptVersionsResponseFormatPromptsJSONSchema$inboundSchema.parse(
2091
+ JSON.parse(x),
2092
+ ),
2093
+ `Failed to parse 'ListPromptVersionsResponseFormatPromptsJSONSchema' from JSON`,
2094
+ );
2095
+ }
2096
+
2097
+ /** @internal */
2098
+ export const ListPromptVersionsResponseFormatJSONObject$inboundSchema:
2099
+ z.ZodType<ListPromptVersionsResponseFormatJSONObject, z.ZodTypeDef, unknown> =
2100
+ z.object({
2101
+ type: z.literal("json_object"),
2102
+ });
2103
+
2104
+ export function listPromptVersionsResponseFormatJSONObjectFromJSON(
2105
+ jsonString: string,
2106
+ ): SafeParseResult<
2107
+ ListPromptVersionsResponseFormatJSONObject,
2108
+ SDKValidationError
2109
+ > {
2110
+ return safeParse(
2111
+ jsonString,
2112
+ (x) =>
2113
+ ListPromptVersionsResponseFormatJSONObject$inboundSchema.parse(
2114
+ JSON.parse(x),
2115
+ ),
2116
+ `Failed to parse 'ListPromptVersionsResponseFormatJSONObject' from JSON`,
2117
+ );
2118
+ }
2119
+
2120
+ /** @internal */
2121
+ export const ListPromptVersionsResponseFormatText$inboundSchema: z.ZodType<
2122
+ ListPromptVersionsResponseFormatText,
2123
+ z.ZodTypeDef,
2124
+ unknown
2125
+ > = z.object({
2126
+ type: z.literal("text"),
2127
+ });
2128
+
2129
+ export function listPromptVersionsResponseFormatTextFromJSON(
2130
+ jsonString: string,
2131
+ ): SafeParseResult<ListPromptVersionsResponseFormatText, SDKValidationError> {
2132
+ return safeParse(
2133
+ jsonString,
2134
+ (x) =>
2135
+ ListPromptVersionsResponseFormatText$inboundSchema.parse(JSON.parse(x)),
2136
+ `Failed to parse 'ListPromptVersionsResponseFormatText' from JSON`,
2137
+ );
2138
+ }
2139
+
2140
+ /** @internal */
2141
+ export const ListPromptVersionsResponseFormat$inboundSchema: z.ZodType<
2142
+ ListPromptVersionsResponseFormat,
2143
+ z.ZodTypeDef,
2144
+ unknown
2145
+ > = z.union([
2146
+ z.lazy(() => ListPromptVersionsResponseFormatText$inboundSchema),
2147
+ z.lazy(() => ListPromptVersionsResponseFormatJSONObject$inboundSchema),
2148
+ z.lazy(() => ListPromptVersionsResponseFormatPromptsJSONSchema$inboundSchema),
2149
+ ]);
2150
+
2151
+ export function listPromptVersionsResponseFormatFromJSON(
2152
+ jsonString: string,
2153
+ ): SafeParseResult<ListPromptVersionsResponseFormat, SDKValidationError> {
2154
+ return safeParse(
2155
+ jsonString,
2156
+ (x) => ListPromptVersionsResponseFormat$inboundSchema.parse(JSON.parse(x)),
2157
+ `Failed to parse 'ListPromptVersionsResponseFormat' from JSON`,
2158
+ );
2159
+ }
2160
+
2161
+ /** @internal */
2162
+ export const ListPromptVersionsReasoningEffort$inboundSchema: z.ZodNativeEnum<
2163
+ typeof ListPromptVersionsReasoningEffort
2164
+ > = z.nativeEnum(ListPromptVersionsReasoningEffort);
2165
+
2166
+ /** @internal */
2167
+ export const ListPromptVersionsStop$inboundSchema: z.ZodType<
2168
+ ListPromptVersionsStop,
2169
+ z.ZodTypeDef,
2170
+ unknown
2171
+ > = z.union([z.string(), z.array(z.string())]);
2172
+
2173
+ export function listPromptVersionsStopFromJSON(
2174
+ jsonString: string,
2175
+ ): SafeParseResult<ListPromptVersionsStop, SDKValidationError> {
2176
+ return safeParse(
2177
+ jsonString,
2178
+ (x) => ListPromptVersionsStop$inboundSchema.parse(JSON.parse(x)),
2179
+ `Failed to parse 'ListPromptVersionsStop' from JSON`,
2180
+ );
2181
+ }
2182
+
2183
+ /** @internal */
2184
+ export const ListPromptVersionsStreamOptions$inboundSchema: z.ZodType<
2185
+ ListPromptVersionsStreamOptions,
2186
+ z.ZodTypeDef,
2187
+ unknown
2188
+ > = z.object({
2189
+ include_usage: z.boolean().optional(),
2190
+ }).transform((v) => {
2191
+ return remap$(v, {
2192
+ "include_usage": "includeUsage",
2193
+ });
2194
+ });
2195
+
2196
+ export function listPromptVersionsStreamOptionsFromJSON(
2197
+ jsonString: string,
2198
+ ): SafeParseResult<ListPromptVersionsStreamOptions, SDKValidationError> {
2199
+ return safeParse(
2200
+ jsonString,
2201
+ (x) => ListPromptVersionsStreamOptions$inboundSchema.parse(JSON.parse(x)),
2202
+ `Failed to parse 'ListPromptVersionsStreamOptions' from JSON`,
2203
+ );
2204
+ }
2205
+
2206
+ /** @internal */
2207
+ export const ListPromptVersionsThinking$inboundSchema: z.ZodType<
2208
+ ListPromptVersionsThinking,
2209
+ z.ZodTypeDef,
2210
+ unknown
2211
+ > = z.union([
2212
+ components.ThinkingConfigDisabledSchema$inboundSchema,
2213
+ components.ThinkingConfigEnabledSchema$inboundSchema,
2214
+ components.ThinkingConfigAdaptiveSchema$inboundSchema,
2215
+ ]);
2216
+
2217
+ export function listPromptVersionsThinkingFromJSON(
2218
+ jsonString: string,
2219
+ ): SafeParseResult<ListPromptVersionsThinking, SDKValidationError> {
2220
+ return safeParse(
2221
+ jsonString,
2222
+ (x) => ListPromptVersionsThinking$inboundSchema.parse(JSON.parse(x)),
2223
+ `Failed to parse 'ListPromptVersionsThinking' from JSON`,
2224
+ );
2225
+ }
2226
+
2227
+ /** @internal */
2228
+ export const ListPromptVersionsToolChoiceType$inboundSchema: z.ZodNativeEnum<
2229
+ typeof ListPromptVersionsToolChoiceType
2230
+ > = z.nativeEnum(ListPromptVersionsToolChoiceType);
2231
+
2232
+ /** @internal */
2233
+ export const ListPromptVersionsToolChoiceFunction$inboundSchema: z.ZodType<
2234
+ ListPromptVersionsToolChoiceFunction,
2235
+ z.ZodTypeDef,
2236
+ unknown
2237
+ > = z.object({
2238
+ name: z.string(),
2239
+ });
2240
+
2241
+ export function listPromptVersionsToolChoiceFunctionFromJSON(
2242
+ jsonString: string,
2243
+ ): SafeParseResult<ListPromptVersionsToolChoiceFunction, SDKValidationError> {
2244
+ return safeParse(
2245
+ jsonString,
2246
+ (x) =>
2247
+ ListPromptVersionsToolChoiceFunction$inboundSchema.parse(JSON.parse(x)),
2248
+ `Failed to parse 'ListPromptVersionsToolChoiceFunction' from JSON`,
2249
+ );
2250
+ }
2251
+
2252
+ /** @internal */
2253
+ export const ListPromptVersionsToolChoice2$inboundSchema: z.ZodType<
2254
+ ListPromptVersionsToolChoice2,
2255
+ z.ZodTypeDef,
2256
+ unknown
2257
+ > = z.object({
2258
+ type: ListPromptVersionsToolChoiceType$inboundSchema.optional(),
2259
+ function: z.lazy(() => ListPromptVersionsToolChoiceFunction$inboundSchema),
2260
+ });
2261
+
2262
+ export function listPromptVersionsToolChoice2FromJSON(
2263
+ jsonString: string,
2264
+ ): SafeParseResult<ListPromptVersionsToolChoice2, SDKValidationError> {
2265
+ return safeParse(
2266
+ jsonString,
2267
+ (x) => ListPromptVersionsToolChoice2$inboundSchema.parse(JSON.parse(x)),
2268
+ `Failed to parse 'ListPromptVersionsToolChoice2' from JSON`,
2269
+ );
2270
+ }
2271
+
2272
+ /** @internal */
2273
+ export const ListPromptVersionsToolChoice1$inboundSchema: z.ZodNativeEnum<
2274
+ typeof ListPromptVersionsToolChoice1
2275
+ > = z.nativeEnum(ListPromptVersionsToolChoice1);
2276
+
2277
+ /** @internal */
2278
+ export const ListPromptVersionsToolChoice$inboundSchema: z.ZodType<
2279
+ ListPromptVersionsToolChoice,
2280
+ z.ZodTypeDef,
2281
+ unknown
2282
+ > = z.union([
2283
+ z.lazy(() => ListPromptVersionsToolChoice2$inboundSchema),
2284
+ ListPromptVersionsToolChoice1$inboundSchema,
2285
+ ]);
2286
+
2287
+ export function listPromptVersionsToolChoiceFromJSON(
2288
+ jsonString: string,
2289
+ ): SafeParseResult<ListPromptVersionsToolChoice, SDKValidationError> {
2290
+ return safeParse(
2291
+ jsonString,
2292
+ (x) => ListPromptVersionsToolChoice$inboundSchema.parse(JSON.parse(x)),
2293
+ `Failed to parse 'ListPromptVersionsToolChoice' from JSON`,
2294
+ );
2295
+ }
2296
+
2297
+ /** @internal */
2298
+ export const ListPromptVersionsModalities$inboundSchema: z.ZodNativeEnum<
2299
+ typeof ListPromptVersionsModalities
2300
+ > = z.nativeEnum(ListPromptVersionsModalities);
2301
+
2302
+ /** @internal */
2303
+ export const ListPromptVersionsId1$inboundSchema: z.ZodNativeEnum<
2304
+ typeof ListPromptVersionsId1
2305
+ > = z.nativeEnum(ListPromptVersionsId1);
2306
+
2307
+ /** @internal */
2308
+ export const ListPromptVersionsId$inboundSchema: z.ZodType<
2309
+ ListPromptVersionsId,
2310
+ z.ZodTypeDef,
2311
+ unknown
2312
+ > = z.union([ListPromptVersionsId1$inboundSchema, z.string()]);
2313
+
2314
+ export function listPromptVersionsIdFromJSON(
2315
+ jsonString: string,
2316
+ ): SafeParseResult<ListPromptVersionsId, SDKValidationError> {
2317
+ return safeParse(
2318
+ jsonString,
2319
+ (x) => ListPromptVersionsId$inboundSchema.parse(JSON.parse(x)),
2320
+ `Failed to parse 'ListPromptVersionsId' from JSON`,
2321
+ );
2322
+ }
2323
+
2324
+ /** @internal */
2325
+ export const ListPromptVersionsExecuteOn$inboundSchema: z.ZodNativeEnum<
2326
+ typeof ListPromptVersionsExecuteOn
2327
+ > = z.nativeEnum(ListPromptVersionsExecuteOn);
2328
+
2329
+ /** @internal */
2330
+ export const ListPromptVersionsGuardrails$inboundSchema: z.ZodType<
2331
+ ListPromptVersionsGuardrails,
2332
+ z.ZodTypeDef,
2333
+ unknown
2334
+ > = z.object({
2335
+ id: z.union([ListPromptVersionsId1$inboundSchema, z.string()]),
2336
+ execute_on: ListPromptVersionsExecuteOn$inboundSchema,
2337
+ }).transform((v) => {
2338
+ return remap$(v, {
2339
+ "execute_on": "executeOn",
2340
+ });
2341
+ });
2342
+
2343
+ export function listPromptVersionsGuardrailsFromJSON(
2344
+ jsonString: string,
2345
+ ): SafeParseResult<ListPromptVersionsGuardrails, SDKValidationError> {
2346
+ return safeParse(
2347
+ jsonString,
2348
+ (x) => ListPromptVersionsGuardrails$inboundSchema.parse(JSON.parse(x)),
2349
+ `Failed to parse 'ListPromptVersionsGuardrails' from JSON`,
2350
+ );
2351
+ }
2352
+
2353
+ /** @internal */
2354
+ export const ListPromptVersionsFallbacks$inboundSchema: z.ZodType<
2355
+ ListPromptVersionsFallbacks,
2356
+ z.ZodTypeDef,
2357
+ unknown
2358
+ > = z.object({
2359
+ model: z.string(),
2360
+ });
2361
+
2362
+ export function listPromptVersionsFallbacksFromJSON(
2363
+ jsonString: string,
2364
+ ): SafeParseResult<ListPromptVersionsFallbacks, SDKValidationError> {
2365
+ return safeParse(
2366
+ jsonString,
2367
+ (x) => ListPromptVersionsFallbacks$inboundSchema.parse(JSON.parse(x)),
2368
+ `Failed to parse 'ListPromptVersionsFallbacks' from JSON`,
2369
+ );
2370
+ }
2371
+
2372
+ /** @internal */
2373
+ export const ListPromptVersionsRetry$inboundSchema: z.ZodType<
2374
+ ListPromptVersionsRetry,
2375
+ z.ZodTypeDef,
2376
+ unknown
2377
+ > = z.object({
2378
+ count: z.number().default(3),
2379
+ on_codes: z.array(z.number()).optional(),
2380
+ }).transform((v) => {
2381
+ return remap$(v, {
2382
+ "on_codes": "onCodes",
2383
+ });
2384
+ });
2385
+
2386
+ export function listPromptVersionsRetryFromJSON(
2387
+ jsonString: string,
2388
+ ): SafeParseResult<ListPromptVersionsRetry, SDKValidationError> {
2389
+ return safeParse(
2390
+ jsonString,
2391
+ (x) => ListPromptVersionsRetry$inboundSchema.parse(JSON.parse(x)),
2392
+ `Failed to parse 'ListPromptVersionsRetry' from JSON`,
2393
+ );
2394
+ }
2395
+
2396
+ /** @internal */
2397
+ export const ListPromptVersionsType$inboundSchema: z.ZodNativeEnum<
2398
+ typeof ListPromptVersionsType
2399
+ > = z.nativeEnum(ListPromptVersionsType);
2400
+
2401
+ /** @internal */
2402
+ export const ListPromptVersionsCache$inboundSchema: z.ZodType<
2403
+ ListPromptVersionsCache,
2404
+ z.ZodTypeDef,
2405
+ unknown
2406
+ > = z.object({
2407
+ ttl: z.number().default(1800),
2408
+ type: ListPromptVersionsType$inboundSchema,
2409
+ });
2410
+
2411
+ export function listPromptVersionsCacheFromJSON(
2412
+ jsonString: string,
2413
+ ): SafeParseResult<ListPromptVersionsCache, SDKValidationError> {
2414
+ return safeParse(
2415
+ jsonString,
2416
+ (x) => ListPromptVersionsCache$inboundSchema.parse(JSON.parse(x)),
2417
+ `Failed to parse 'ListPromptVersionsCache' from JSON`,
2418
+ );
2419
+ }
2420
+
2421
+ /** @internal */
2422
+ export const ListPromptVersionsLoadBalancerType$inboundSchema: z.ZodNativeEnum<
2423
+ typeof ListPromptVersionsLoadBalancerType
2424
+ > = z.nativeEnum(ListPromptVersionsLoadBalancerType);
2425
+
2426
+ /** @internal */
2427
+ export const ListPromptVersionsLoadBalancerModels$inboundSchema: z.ZodType<
2428
+ ListPromptVersionsLoadBalancerModels,
2429
+ z.ZodTypeDef,
2430
+ unknown
2431
+ > = z.object({
2432
+ model: z.string(),
2433
+ weight: z.number().default(0.5),
2434
+ });
2435
+
2436
+ export function listPromptVersionsLoadBalancerModelsFromJSON(
2437
+ jsonString: string,
2438
+ ): SafeParseResult<ListPromptVersionsLoadBalancerModels, SDKValidationError> {
2439
+ return safeParse(
2440
+ jsonString,
2441
+ (x) =>
2442
+ ListPromptVersionsLoadBalancerModels$inboundSchema.parse(JSON.parse(x)),
2443
+ `Failed to parse 'ListPromptVersionsLoadBalancerModels' from JSON`,
2444
+ );
2445
+ }
2446
+
2447
+ /** @internal */
2448
+ export const ListPromptVersionsLoadBalancer1$inboundSchema: z.ZodType<
2449
+ ListPromptVersionsLoadBalancer1,
2450
+ z.ZodTypeDef,
2451
+ unknown
2452
+ > = z.object({
2453
+ type: ListPromptVersionsLoadBalancerType$inboundSchema,
2454
+ models: z.array(
2455
+ z.lazy(() => ListPromptVersionsLoadBalancerModels$inboundSchema),
2456
+ ),
2457
+ });
2458
+
2459
+ export function listPromptVersionsLoadBalancer1FromJSON(
2460
+ jsonString: string,
2461
+ ): SafeParseResult<ListPromptVersionsLoadBalancer1, SDKValidationError> {
2462
+ return safeParse(
2463
+ jsonString,
2464
+ (x) => ListPromptVersionsLoadBalancer1$inboundSchema.parse(JSON.parse(x)),
2465
+ `Failed to parse 'ListPromptVersionsLoadBalancer1' from JSON`,
2466
+ );
2467
+ }
2468
+
2469
+ /** @internal */
2470
+ export const ListPromptVersionsLoadBalancer$inboundSchema: z.ZodType<
2471
+ ListPromptVersionsLoadBalancer,
2472
+ z.ZodTypeDef,
2473
+ unknown
2474
+ > = z.lazy(() => ListPromptVersionsLoadBalancer1$inboundSchema);
2475
+
2476
+ export function listPromptVersionsLoadBalancerFromJSON(
2477
+ jsonString: string,
2478
+ ): SafeParseResult<ListPromptVersionsLoadBalancer, SDKValidationError> {
2479
+ return safeParse(
2480
+ jsonString,
2481
+ (x) => ListPromptVersionsLoadBalancer$inboundSchema.parse(JSON.parse(x)),
2482
+ `Failed to parse 'ListPromptVersionsLoadBalancer' from JSON`,
2483
+ );
2484
+ }
2485
+
2486
+ /** @internal */
2487
+ export const ListPromptVersionsTimeout$inboundSchema: z.ZodType<
2488
+ ListPromptVersionsTimeout,
2489
+ z.ZodTypeDef,
2490
+ unknown
2491
+ > = z.object({
2492
+ call_timeout: z.number(),
2493
+ }).transform((v) => {
2494
+ return remap$(v, {
2495
+ "call_timeout": "callTimeout",
2496
+ });
2497
+ });
2498
+
2499
+ export function listPromptVersionsTimeoutFromJSON(
2500
+ jsonString: string,
2501
+ ): SafeParseResult<ListPromptVersionsTimeout, SDKValidationError> {
2502
+ return safeParse(
2503
+ jsonString,
2504
+ (x) => ListPromptVersionsTimeout$inboundSchema.parse(JSON.parse(x)),
2505
+ `Failed to parse 'ListPromptVersionsTimeout' from JSON`,
2506
+ );
2507
+ }
2508
+
2509
+ /** @internal */
2510
+ export const ListPromptVersionsContentPromptsResponse2002$inboundSchema:
2511
+ z.ZodType<
2512
+ ListPromptVersionsContentPromptsResponse2002,
2513
+ z.ZodTypeDef,
2514
+ unknown
2515
+ > = components.TextContentPartSchema$inboundSchema;
2516
+
2517
+ export function listPromptVersionsContentPromptsResponse2002FromJSON(
2518
+ jsonString: string,
2519
+ ): SafeParseResult<
2520
+ ListPromptVersionsContentPromptsResponse2002,
2521
+ SDKValidationError
2522
+ > {
2523
+ return safeParse(
2524
+ jsonString,
2525
+ (x) =>
2526
+ ListPromptVersionsContentPromptsResponse2002$inboundSchema.parse(
2527
+ JSON.parse(x),
2528
+ ),
2529
+ `Failed to parse 'ListPromptVersionsContentPromptsResponse2002' from JSON`,
2530
+ );
2531
+ }
2532
+
2533
+ /** @internal */
2534
+ export const ListPromptVersionsMessagesPromptsResponse200Content$inboundSchema:
2535
+ z.ZodType<
2536
+ ListPromptVersionsMessagesPromptsResponse200Content,
2537
+ z.ZodTypeDef,
2538
+ unknown
2539
+ > = z.union([
2540
+ z.string(),
2541
+ z.array(components.TextContentPartSchema$inboundSchema),
2542
+ ]);
2543
+
2544
+ export function listPromptVersionsMessagesPromptsResponse200ContentFromJSON(
2545
+ jsonString: string,
2546
+ ): SafeParseResult<
2547
+ ListPromptVersionsMessagesPromptsResponse200Content,
2548
+ SDKValidationError
2549
+ > {
2550
+ return safeParse(
2551
+ jsonString,
2552
+ (x) =>
2553
+ ListPromptVersionsMessagesPromptsResponse200Content$inboundSchema.parse(
2554
+ JSON.parse(x),
2555
+ ),
2556
+ `Failed to parse 'ListPromptVersionsMessagesPromptsResponse200Content' from JSON`,
2557
+ );
2558
+ }
2559
+
2560
+ /** @internal */
2561
+ export const ListPromptVersionsMessagesPromptsType$inboundSchema:
2562
+ z.ZodNativeEnum<typeof ListPromptVersionsMessagesPromptsType> = z.nativeEnum(
2563
+ ListPromptVersionsMessagesPromptsType,
2564
+ );
2565
+
2566
+ /** @internal */
2567
+ export const ListPromptVersionsMessagesTtl$inboundSchema: z.ZodNativeEnum<
2568
+ typeof ListPromptVersionsMessagesTtl
2569
+ > = z.nativeEnum(ListPromptVersionsMessagesTtl);
2570
+
2571
+ /** @internal */
2572
+ export const ListPromptVersionsMessagesCacheControl$inboundSchema: z.ZodType<
2573
+ ListPromptVersionsMessagesCacheControl,
2574
+ z.ZodTypeDef,
2575
+ unknown
2576
+ > = z.object({
2577
+ type: ListPromptVersionsMessagesPromptsType$inboundSchema,
2578
+ ttl: ListPromptVersionsMessagesTtl$inboundSchema.default("5m"),
2579
+ });
2580
+
2581
+ export function listPromptVersionsMessagesCacheControlFromJSON(
2582
+ jsonString: string,
2583
+ ): SafeParseResult<ListPromptVersionsMessagesCacheControl, SDKValidationError> {
2584
+ return safeParse(
2585
+ jsonString,
2586
+ (x) =>
2587
+ ListPromptVersionsMessagesCacheControl$inboundSchema.parse(JSON.parse(x)),
2588
+ `Failed to parse 'ListPromptVersionsMessagesCacheControl' from JSON`,
2589
+ );
2590
+ }
2591
+
2592
+ /** @internal */
2593
+ export const ListPromptVersionsMessagesToolMessage$inboundSchema: z.ZodType<
2594
+ ListPromptVersionsMessagesToolMessage,
2595
+ z.ZodTypeDef,
2596
+ unknown
2597
+ > = z.object({
2598
+ role: z.literal("tool"),
2599
+ content: z.union([
2600
+ z.string(),
2601
+ z.array(components.TextContentPartSchema$inboundSchema),
2602
+ ]),
2603
+ tool_call_id: z.nullable(z.string()),
2604
+ cache_control: z.lazy(() =>
2605
+ ListPromptVersionsMessagesCacheControl$inboundSchema
2606
+ ).optional(),
2607
+ }).transform((v) => {
2608
+ return remap$(v, {
2609
+ "tool_call_id": "toolCallId",
2610
+ "cache_control": "cacheControl",
2611
+ });
2612
+ });
2613
+
2614
+ export function listPromptVersionsMessagesToolMessageFromJSON(
2615
+ jsonString: string,
2616
+ ): SafeParseResult<ListPromptVersionsMessagesToolMessage, SDKValidationError> {
2617
+ return safeParse(
2618
+ jsonString,
2619
+ (x) =>
2620
+ ListPromptVersionsMessagesToolMessage$inboundSchema.parse(JSON.parse(x)),
2621
+ `Failed to parse 'ListPromptVersionsMessagesToolMessage' from JSON`,
2622
+ );
2623
+ }
2624
+
2625
+ /** @internal */
2626
+ export const ListPromptVersionsContentPromptsResponse2$inboundSchema: z.ZodType<
2627
+ ListPromptVersionsContentPromptsResponse2,
2628
+ z.ZodTypeDef,
2629
+ unknown
2630
+ > = z.union([
2631
+ components.TextContentPartSchema$inboundSchema.and(
2632
+ z.object({ type: z.literal("text") }),
2633
+ ),
2634
+ components.RefusalPartSchema$inboundSchema,
2635
+ components.ReasoningPartSchema$inboundSchema,
2636
+ components.RedactedReasoningPartSchema$inboundSchema,
2637
+ ]);
2638
+
2639
+ export function listPromptVersionsContentPromptsResponse2FromJSON(
2640
+ jsonString: string,
2641
+ ): SafeParseResult<
2642
+ ListPromptVersionsContentPromptsResponse2,
2643
+ SDKValidationError
2644
+ > {
2645
+ return safeParse(
2646
+ jsonString,
2647
+ (x) =>
2648
+ ListPromptVersionsContentPromptsResponse2$inboundSchema.parse(
2649
+ JSON.parse(x),
2650
+ ),
2651
+ `Failed to parse 'ListPromptVersionsContentPromptsResponse2' from JSON`,
2652
+ );
2653
+ }
2654
+
2655
+ /** @internal */
2656
+ export const ListPromptVersionsMessagesPromptsResponseContent$inboundSchema:
2657
+ z.ZodType<
2658
+ ListPromptVersionsMessagesPromptsResponseContent,
2659
+ z.ZodTypeDef,
2660
+ unknown
2661
+ > = z.union([
2662
+ z.string(),
2663
+ z.array(
2664
+ z.union([
2665
+ components.TextContentPartSchema$inboundSchema.and(
2666
+ z.object({ type: z.literal("text") }),
2667
+ ),
2668
+ components.RefusalPartSchema$inboundSchema,
2669
+ components.ReasoningPartSchema$inboundSchema,
2670
+ components.RedactedReasoningPartSchema$inboundSchema,
2671
+ ]),
2672
+ ),
2673
+ ]);
2674
+
2675
+ export function listPromptVersionsMessagesPromptsResponseContentFromJSON(
2676
+ jsonString: string,
2677
+ ): SafeParseResult<
2678
+ ListPromptVersionsMessagesPromptsResponseContent,
2679
+ SDKValidationError
2680
+ > {
2681
+ return safeParse(
2682
+ jsonString,
2683
+ (x) =>
2684
+ ListPromptVersionsMessagesPromptsResponseContent$inboundSchema.parse(
2685
+ JSON.parse(x),
2686
+ ),
2687
+ `Failed to parse 'ListPromptVersionsMessagesPromptsResponseContent' from JSON`,
2688
+ );
2689
+ }
2690
+
2691
+ /** @internal */
2692
+ export const ListPromptVersionsMessagesAudio$inboundSchema: z.ZodType<
2693
+ ListPromptVersionsMessagesAudio,
2694
+ z.ZodTypeDef,
2695
+ unknown
2696
+ > = z.object({
2697
+ id: z.string(),
2698
+ });
2699
+
2700
+ export function listPromptVersionsMessagesAudioFromJSON(
2701
+ jsonString: string,
2702
+ ): SafeParseResult<ListPromptVersionsMessagesAudio, SDKValidationError> {
2703
+ return safeParse(
2704
+ jsonString,
2705
+ (x) => ListPromptVersionsMessagesAudio$inboundSchema.parse(JSON.parse(x)),
2706
+ `Failed to parse 'ListPromptVersionsMessagesAudio' from JSON`,
2707
+ );
2708
+ }
2709
+
2710
+ /** @internal */
2711
+ export const ListPromptVersionsMessagesType$inboundSchema: z.ZodNativeEnum<
2712
+ typeof ListPromptVersionsMessagesType
2713
+ > = z.nativeEnum(ListPromptVersionsMessagesType);
2714
+
2715
+ /** @internal */
2716
+ export const ListPromptVersionsMessagesFunction$inboundSchema: z.ZodType<
2717
+ ListPromptVersionsMessagesFunction,
2718
+ z.ZodTypeDef,
2719
+ unknown
2720
+ > = z.object({
2721
+ name: z.string().optional(),
2722
+ arguments: z.string().optional(),
2723
+ });
2724
+
2725
+ export function listPromptVersionsMessagesFunctionFromJSON(
2726
+ jsonString: string,
2727
+ ): SafeParseResult<ListPromptVersionsMessagesFunction, SDKValidationError> {
2728
+ return safeParse(
2729
+ jsonString,
2730
+ (x) =>
2731
+ ListPromptVersionsMessagesFunction$inboundSchema.parse(JSON.parse(x)),
2732
+ `Failed to parse 'ListPromptVersionsMessagesFunction' from JSON`,
2733
+ );
2734
+ }
2735
+
2736
+ /** @internal */
2737
+ export const ListPromptVersionsMessagesToolCalls$inboundSchema: z.ZodType<
2738
+ ListPromptVersionsMessagesToolCalls,
2739
+ z.ZodTypeDef,
2740
+ unknown
2741
+ > = z.object({
2742
+ id: z.string(),
2743
+ type: ListPromptVersionsMessagesType$inboundSchema,
2744
+ function: z.lazy(() => ListPromptVersionsMessagesFunction$inboundSchema),
2745
+ thought_signature: z.string().optional(),
2746
+ }).transform((v) => {
2747
+ return remap$(v, {
2748
+ "thought_signature": "thoughtSignature",
2749
+ });
2750
+ });
2751
+
2752
+ export function listPromptVersionsMessagesToolCallsFromJSON(
2753
+ jsonString: string,
2754
+ ): SafeParseResult<ListPromptVersionsMessagesToolCalls, SDKValidationError> {
2755
+ return safeParse(
2756
+ jsonString,
2757
+ (x) =>
2758
+ ListPromptVersionsMessagesToolCalls$inboundSchema.parse(JSON.parse(x)),
2759
+ `Failed to parse 'ListPromptVersionsMessagesToolCalls' from JSON`,
2760
+ );
2761
+ }
2762
+
2763
+ /** @internal */
2764
+ export const ListPromptVersionsMessagesAssistantMessage$inboundSchema:
2765
+ z.ZodType<ListPromptVersionsMessagesAssistantMessage, z.ZodTypeDef, unknown> =
2766
+ z.object({
2767
+ content: z.nullable(
2768
+ z.union([
2769
+ z.string(),
2770
+ z.array(
2771
+ z.union([
2772
+ components.TextContentPartSchema$inboundSchema.and(
2773
+ z.object({ type: z.literal("text") }),
2774
+ ),
2775
+ components.RefusalPartSchema$inboundSchema,
2776
+ components.ReasoningPartSchema$inboundSchema,
2777
+ components.RedactedReasoningPartSchema$inboundSchema,
2778
+ ]),
2779
+ ),
2780
+ ]),
2781
+ ).optional(),
2782
+ refusal: z.nullable(z.string()).optional(),
2783
+ role: z.literal("assistant"),
2784
+ name: z.string().optional(),
2785
+ audio: z.nullable(
2786
+ z.lazy(() => ListPromptVersionsMessagesAudio$inboundSchema),
2787
+ ).optional(),
2788
+ tool_calls: z.array(
2789
+ z.lazy(() => ListPromptVersionsMessagesToolCalls$inboundSchema),
2790
+ ).optional(),
2791
+ }).transform((v) => {
2792
+ return remap$(v, {
2793
+ "tool_calls": "toolCalls",
2794
+ });
2795
+ });
2796
+
2797
+ export function listPromptVersionsMessagesAssistantMessageFromJSON(
2798
+ jsonString: string,
2799
+ ): SafeParseResult<
2800
+ ListPromptVersionsMessagesAssistantMessage,
2801
+ SDKValidationError
2802
+ > {
2803
+ return safeParse(
2804
+ jsonString,
2805
+ (x) =>
2806
+ ListPromptVersionsMessagesAssistantMessage$inboundSchema.parse(
2807
+ JSON.parse(x),
2808
+ ),
2809
+ `Failed to parse 'ListPromptVersionsMessagesAssistantMessage' from JSON`,
2810
+ );
2811
+ }
2812
+
2813
+ /** @internal */
2814
+ export const ListPromptVersions2PromptsResponse200ApplicationJSONType$inboundSchema:
2815
+ z.ZodNativeEnum<
2816
+ typeof ListPromptVersions2PromptsResponse200ApplicationJSONType
2817
+ > = z.nativeEnum(ListPromptVersions2PromptsResponse200ApplicationJSONType);
2818
+
2819
+ /** @internal */
2820
+ export const ListPromptVersions2Ttl$inboundSchema: z.ZodNativeEnum<
2821
+ typeof ListPromptVersions2Ttl
2822
+ > = z.nativeEnum(ListPromptVersions2Ttl);
2823
+
2824
+ /** @internal */
2825
+ export const ListPromptVersions2CacheControl$inboundSchema: z.ZodType<
2826
+ ListPromptVersions2CacheControl,
2827
+ z.ZodTypeDef,
2828
+ unknown
2829
+ > = z.object({
2830
+ type: ListPromptVersions2PromptsResponse200ApplicationJSONType$inboundSchema,
2831
+ ttl: ListPromptVersions2Ttl$inboundSchema.default("5m"),
2832
+ });
2833
+
2834
+ export function listPromptVersions2CacheControlFromJSON(
2835
+ jsonString: string,
2836
+ ): SafeParseResult<ListPromptVersions2CacheControl, SDKValidationError> {
2837
+ return safeParse(
2838
+ jsonString,
2839
+ (x) => ListPromptVersions2CacheControl$inboundSchema.parse(JSON.parse(x)),
2840
+ `Failed to parse 'ListPromptVersions2CacheControl' from JSON`,
2841
+ );
2842
+ }
2843
+
2844
+ /** @internal */
2845
+ export const ListPromptVersions24$inboundSchema: z.ZodType<
2846
+ ListPromptVersions24,
2847
+ z.ZodTypeDef,
2848
+ unknown
2849
+ > = z.object({
2850
+ type: z.literal("file"),
2851
+ cache_control: z.lazy(() => ListPromptVersions2CacheControl$inboundSchema)
2852
+ .optional(),
2853
+ file: components.FileContentPartSchema$inboundSchema,
2854
+ }).transform((v) => {
2855
+ return remap$(v, {
2856
+ "cache_control": "cacheControl",
2857
+ });
2858
+ });
2859
+
2860
+ export function listPromptVersions24FromJSON(
2861
+ jsonString: string,
2862
+ ): SafeParseResult<ListPromptVersions24, SDKValidationError> {
2863
+ return safeParse(
2864
+ jsonString,
2865
+ (x) => ListPromptVersions24$inboundSchema.parse(JSON.parse(x)),
2866
+ `Failed to parse 'ListPromptVersions24' from JSON`,
2867
+ );
2868
+ }
2869
+
2870
+ /** @internal */
2871
+ export const ListPromptVersionsContentPrompts2$inboundSchema: z.ZodType<
2872
+ ListPromptVersionsContentPrompts2,
2873
+ z.ZodTypeDef,
2874
+ unknown
2875
+ > = z.union([
2876
+ components.TextContentPartSchema$inboundSchema.and(
2877
+ z.object({ type: z.literal("text") }),
2878
+ ),
2879
+ components.ImageContentPartSchema$inboundSchema,
2880
+ components.AudioContentPartSchema$inboundSchema,
2881
+ z.lazy(() => ListPromptVersions24$inboundSchema),
2882
+ ]);
2883
+
2884
+ export function listPromptVersionsContentPrompts2FromJSON(
2885
+ jsonString: string,
2886
+ ): SafeParseResult<ListPromptVersionsContentPrompts2, SDKValidationError> {
2887
+ return safeParse(
2888
+ jsonString,
2889
+ (x) => ListPromptVersionsContentPrompts2$inboundSchema.parse(JSON.parse(x)),
2890
+ `Failed to parse 'ListPromptVersionsContentPrompts2' from JSON`,
2891
+ );
2892
+ }
2893
+
2894
+ /** @internal */
2895
+ export const ListPromptVersionsMessagesPromptsContent$inboundSchema: z.ZodType<
2896
+ ListPromptVersionsMessagesPromptsContent,
2897
+ z.ZodTypeDef,
2898
+ unknown
2899
+ > = z.union([
2900
+ z.string(),
2901
+ z.array(
2902
+ z.union([
2903
+ components.TextContentPartSchema$inboundSchema.and(
2904
+ z.object({ type: z.literal("text") }),
2905
+ ),
2906
+ components.ImageContentPartSchema$inboundSchema,
2907
+ components.AudioContentPartSchema$inboundSchema,
2908
+ z.lazy(() => ListPromptVersions24$inboundSchema),
2909
+ ]),
2910
+ ),
2911
+ ]);
2912
+
2913
+ export function listPromptVersionsMessagesPromptsContentFromJSON(
2914
+ jsonString: string,
2915
+ ): SafeParseResult<
2916
+ ListPromptVersionsMessagesPromptsContent,
2917
+ SDKValidationError
2918
+ > {
2919
+ return safeParse(
2920
+ jsonString,
2921
+ (x) =>
2922
+ ListPromptVersionsMessagesPromptsContent$inboundSchema.parse(
2923
+ JSON.parse(x),
2924
+ ),
2925
+ `Failed to parse 'ListPromptVersionsMessagesPromptsContent' from JSON`,
2926
+ );
2927
+ }
2928
+
2929
+ /** @internal */
2930
+ export const ListPromptVersionsMessagesUserMessage$inboundSchema: z.ZodType<
2931
+ ListPromptVersionsMessagesUserMessage,
2932
+ z.ZodTypeDef,
2933
+ unknown
2934
+ > = z.object({
2935
+ role: z.literal("user"),
2936
+ name: z.string().optional(),
2937
+ content: z.union([
2938
+ z.string(),
2939
+ z.array(
2940
+ z.union([
2941
+ components.TextContentPartSchema$inboundSchema.and(
2942
+ z.object({ type: z.literal("text") }),
2943
+ ),
2944
+ components.ImageContentPartSchema$inboundSchema,
2945
+ components.AudioContentPartSchema$inboundSchema,
2946
+ z.lazy(() => ListPromptVersions24$inboundSchema),
2947
+ ]),
2948
+ ),
2949
+ ]),
2950
+ });
2951
+
2952
+ export function listPromptVersionsMessagesUserMessageFromJSON(
2953
+ jsonString: string,
2954
+ ): SafeParseResult<ListPromptVersionsMessagesUserMessage, SDKValidationError> {
2955
+ return safeParse(
2956
+ jsonString,
2957
+ (x) =>
2958
+ ListPromptVersionsMessagesUserMessage$inboundSchema.parse(JSON.parse(x)),
2959
+ `Failed to parse 'ListPromptVersionsMessagesUserMessage' from JSON`,
2960
+ );
2961
+ }
2962
+
2963
+ /** @internal */
2964
+ export const ListPromptVersionsMessagesContent$inboundSchema: z.ZodType<
2965
+ ListPromptVersionsMessagesContent,
2966
+ z.ZodTypeDef,
2967
+ unknown
2968
+ > = z.union([
2969
+ z.string(),
2970
+ z.array(components.TextContentPartSchema$inboundSchema),
2971
+ ]);
2972
+
2973
+ export function listPromptVersionsMessagesContentFromJSON(
2974
+ jsonString: string,
2975
+ ): SafeParseResult<ListPromptVersionsMessagesContent, SDKValidationError> {
2976
+ return safeParse(
2977
+ jsonString,
2978
+ (x) => ListPromptVersionsMessagesContent$inboundSchema.parse(JSON.parse(x)),
2979
+ `Failed to parse 'ListPromptVersionsMessagesContent' from JSON`,
2980
+ );
2981
+ }
2982
+
2983
+ /** @internal */
2984
+ export const ListPromptVersionsMessagesSystemMessage$inboundSchema: z.ZodType<
2985
+ ListPromptVersionsMessagesSystemMessage,
2986
+ z.ZodTypeDef,
2987
+ unknown
2988
+ > = z.object({
2989
+ role: z.literal("system"),
2990
+ content: z.union([
2991
+ z.string(),
2992
+ z.array(components.TextContentPartSchema$inboundSchema),
2993
+ ]),
2994
+ name: z.string().optional(),
2995
+ });
2996
+
2997
+ export function listPromptVersionsMessagesSystemMessageFromJSON(
2998
+ jsonString: string,
2999
+ ): SafeParseResult<
3000
+ ListPromptVersionsMessagesSystemMessage,
3001
+ SDKValidationError
3002
+ > {
3003
+ return safeParse(
3004
+ jsonString,
3005
+ (x) =>
3006
+ ListPromptVersionsMessagesSystemMessage$inboundSchema.parse(
3007
+ JSON.parse(x),
3008
+ ),
3009
+ `Failed to parse 'ListPromptVersionsMessagesSystemMessage' from JSON`,
3010
+ );
3011
+ }
3012
+
3013
+ /** @internal */
3014
+ export const ListPromptVersionsPromptsMessages$inboundSchema: z.ZodType<
3015
+ ListPromptVersionsPromptsMessages,
3016
+ z.ZodTypeDef,
3017
+ unknown
3018
+ > = z.union([
3019
+ z.lazy(() => ListPromptVersionsMessagesSystemMessage$inboundSchema),
3020
+ z.lazy(() => ListPromptVersionsMessagesUserMessage$inboundSchema),
3021
+ z.lazy(() => ListPromptVersionsMessagesAssistantMessage$inboundSchema),
3022
+ z.lazy(() => ListPromptVersionsMessagesToolMessage$inboundSchema),
3023
+ ]);
3024
+
3025
+ export function listPromptVersionsPromptsMessagesFromJSON(
3026
+ jsonString: string,
3027
+ ): SafeParseResult<ListPromptVersionsPromptsMessages, SDKValidationError> {
3028
+ return safeParse(
3029
+ jsonString,
3030
+ (x) => ListPromptVersionsPromptsMessages$inboundSchema.parse(JSON.parse(x)),
3031
+ `Failed to parse 'ListPromptVersionsPromptsMessages' from JSON`,
3032
+ );
3033
+ }
3034
+
3035
+ /** @internal */
3036
+ export const ListPromptVersionsPromptField$inboundSchema: z.ZodType<
3037
+ ListPromptVersionsPromptField,
3038
+ z.ZodTypeDef,
3039
+ unknown
3040
+ > = z.object({
3041
+ name: z.string().optional(),
3042
+ audio: z.nullable(z.lazy(() => ListPromptVersionsAudio$inboundSchema))
3043
+ .optional(),
3044
+ frequency_penalty: z.nullable(z.number()).optional(),
3045
+ max_tokens: z.nullable(z.number().int()).optional(),
3046
+ max_completion_tokens: z.nullable(z.number().int()).optional(),
3047
+ logprobs: z.nullable(z.boolean()).optional(),
3048
+ top_logprobs: z.nullable(z.number().int()).optional(),
3049
+ n: z.nullable(z.number().int()).optional(),
3050
+ presence_penalty: z.nullable(z.number()).optional(),
3051
+ response_format: z.union([
3052
+ z.lazy(() => ListPromptVersionsResponseFormatText$inboundSchema),
3053
+ z.lazy(() => ListPromptVersionsResponseFormatJSONObject$inboundSchema),
3054
+ z.lazy(() =>
3055
+ ListPromptVersionsResponseFormatPromptsJSONSchema$inboundSchema
3056
+ ),
3057
+ ]).optional(),
3058
+ reasoning_effort: ListPromptVersionsReasoningEffort$inboundSchema.optional(),
3059
+ verbosity: z.string().optional(),
3060
+ seed: z.nullable(z.number()).optional(),
3061
+ stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
3062
+ stream_options: z.nullable(
3063
+ z.lazy(() => ListPromptVersionsStreamOptions$inboundSchema),
3064
+ ).optional(),
3065
+ thinking: z.union([
3066
+ components.ThinkingConfigDisabledSchema$inboundSchema,
3067
+ components.ThinkingConfigEnabledSchema$inboundSchema,
3068
+ components.ThinkingConfigAdaptiveSchema$inboundSchema,
3069
+ ]).optional(),
3070
+ temperature: z.nullable(z.number()).optional(),
3071
+ top_p: z.nullable(z.number()).optional(),
3072
+ top_k: z.nullable(z.number()).optional(),
3073
+ tool_choice: z.union([
3074
+ z.lazy(() => ListPromptVersionsToolChoice2$inboundSchema),
3075
+ ListPromptVersionsToolChoice1$inboundSchema,
3076
+ ]).optional(),
3077
+ parallel_tool_calls: z.boolean().optional(),
3078
+ modalities: z.nullable(z.array(ListPromptVersionsModalities$inboundSchema))
3079
+ .optional(),
3080
+ guardrails: z.array(z.lazy(() => ListPromptVersionsGuardrails$inboundSchema))
3081
+ .optional(),
3082
+ fallbacks: z.array(z.lazy(() => ListPromptVersionsFallbacks$inboundSchema))
3083
+ .optional(),
3084
+ retry: z.lazy(() => ListPromptVersionsRetry$inboundSchema).optional(),
3085
+ cache: z.lazy(() => ListPromptVersionsCache$inboundSchema).optional(),
3086
+ load_balancer: z.lazy(() => ListPromptVersionsLoadBalancer1$inboundSchema)
3087
+ .optional(),
3088
+ timeout: z.lazy(() => ListPromptVersionsTimeout$inboundSchema).optional(),
3089
+ messages: z.array(
3090
+ z.union([
3091
+ z.lazy(() => ListPromptVersionsMessagesSystemMessage$inboundSchema),
3092
+ z.lazy(() => ListPromptVersionsMessagesUserMessage$inboundSchema),
3093
+ z.lazy(() => ListPromptVersionsMessagesAssistantMessage$inboundSchema),
3094
+ z.lazy(() => ListPromptVersionsMessagesToolMessage$inboundSchema),
3095
+ ]),
3096
+ ).optional(),
3097
+ model: z.nullable(z.string()).optional(),
3098
+ version: z.string().optional(),
3099
+ }).transform((v) => {
3100
+ return remap$(v, {
3101
+ "frequency_penalty": "frequencyPenalty",
3102
+ "max_tokens": "maxTokens",
3103
+ "max_completion_tokens": "maxCompletionTokens",
3104
+ "top_logprobs": "topLogprobs",
3105
+ "presence_penalty": "presencePenalty",
3106
+ "response_format": "responseFormat",
3107
+ "reasoning_effort": "reasoningEffort",
3108
+ "stream_options": "streamOptions",
3109
+ "top_p": "topP",
3110
+ "top_k": "topK",
3111
+ "tool_choice": "toolChoice",
3112
+ "parallel_tool_calls": "parallelToolCalls",
3113
+ "load_balancer": "loadBalancer",
3114
+ });
3115
+ });
3116
+
3117
+ export function listPromptVersionsPromptFieldFromJSON(
3118
+ jsonString: string,
3119
+ ): SafeParseResult<ListPromptVersionsPromptField, SDKValidationError> {
3120
+ return safeParse(
3121
+ jsonString,
3122
+ (x) => ListPromptVersionsPromptField$inboundSchema.parse(JSON.parse(x)),
3123
+ `Failed to parse 'ListPromptVersionsPromptField' from JSON`,
3124
+ );
3125
+ }
3126
+
3127
+ /** @internal */
3128
+ export const ListPromptVersionsUseCases$inboundSchema: z.ZodNativeEnum<
3129
+ typeof ListPromptVersionsUseCases
3130
+ > = z.nativeEnum(ListPromptVersionsUseCases);
3131
+
3132
+ /** @internal */
3133
+ export const ListPromptVersionsLanguage$inboundSchema: z.ZodNativeEnum<
3134
+ typeof ListPromptVersionsLanguage
3135
+ > = z.nativeEnum(ListPromptVersionsLanguage);
3136
+
3137
+ /** @internal */
3138
+ export const ListPromptVersionsMetadata$inboundSchema: z.ZodType<
3139
+ ListPromptVersionsMetadata,
3140
+ z.ZodTypeDef,
3141
+ unknown
3142
+ > = z.object({
3143
+ use_cases: z.array(ListPromptVersionsUseCases$inboundSchema).optional(),
3144
+ language: z.nullable(ListPromptVersionsLanguage$inboundSchema).optional(),
3145
+ }).transform((v) => {
3146
+ return remap$(v, {
3147
+ "use_cases": "useCases",
3148
+ });
3149
+ });
3150
+
3151
+ export function listPromptVersionsMetadataFromJSON(
3152
+ jsonString: string,
3153
+ ): SafeParseResult<ListPromptVersionsMetadata, SDKValidationError> {
3154
+ return safeParse(
3155
+ jsonString,
3156
+ (x) => ListPromptVersionsMetadata$inboundSchema.parse(JSON.parse(x)),
3157
+ `Failed to parse 'ListPromptVersionsMetadata' from JSON`,
3158
+ );
3159
+ }
3160
+
3161
+ /** @internal */
3162
+ export const ListPromptVersionsData$inboundSchema: z.ZodType<
3163
+ ListPromptVersionsData,
3164
+ z.ZodTypeDef,
3165
+ unknown
3166
+ > = z.object({
3167
+ _id: z.string(),
3168
+ created_by_id: z.nullable(z.string()).optional(),
3169
+ updated_by_id: z.nullable(z.string()).optional(),
3170
+ description: z.nullable(z.string()).optional(),
3171
+ prompt_config: z.lazy(() => ListPromptVersionsPromptConfig$inboundSchema)
3172
+ .optional(),
3173
+ prompt: z.lazy(() => ListPromptVersionsPromptField$inboundSchema),
3174
+ metadata: z.lazy(() => ListPromptVersionsMetadata$inboundSchema).optional(),
3175
+ timestamp: z.string(),
3176
+ }).transform((v) => {
3177
+ return remap$(v, {
3178
+ "_id": "id",
3179
+ "created_by_id": "createdById",
3180
+ "updated_by_id": "updatedById",
3181
+ "prompt_config": "promptConfig",
3182
+ });
3183
+ });
3184
+
3185
+ export function listPromptVersionsDataFromJSON(
3186
+ jsonString: string,
3187
+ ): SafeParseResult<ListPromptVersionsData, SDKValidationError> {
3188
+ return safeParse(
3189
+ jsonString,
3190
+ (x) => ListPromptVersionsData$inboundSchema.parse(JSON.parse(x)),
3191
+ `Failed to parse 'ListPromptVersionsData' from JSON`,
3192
+ );
3193
+ }
3194
+
3195
+ /** @internal */
3196
+ export const ListPromptVersionsResponseBody$inboundSchema: z.ZodType<
3197
+ ListPromptVersionsResponseBody,
3198
+ z.ZodTypeDef,
3199
+ unknown
3200
+ > = z.object({
3201
+ object: ListPromptVersionsObject$inboundSchema,
3202
+ data: z.array(z.lazy(() => ListPromptVersionsData$inboundSchema)),
3203
+ has_more: z.boolean(),
3204
+ }).transform((v) => {
3205
+ return remap$(v, {
3206
+ "has_more": "hasMore",
3207
+ });
3208
+ });
3209
+
3210
+ export function listPromptVersionsResponseBodyFromJSON(
3211
+ jsonString: string,
3212
+ ): SafeParseResult<ListPromptVersionsResponseBody, SDKValidationError> {
3213
+ return safeParse(
3214
+ jsonString,
3215
+ (x) => ListPromptVersionsResponseBody$inboundSchema.parse(JSON.parse(x)),
3216
+ `Failed to parse 'ListPromptVersionsResponseBody' from JSON`,
3217
+ );
3218
+ }