@orq-ai/node 4.3.1-rc.0 → 4.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (482) hide show
  1. package/_speakeasy/.github/action-inputs-config.json +53 -0
  2. package/_speakeasy/.github/action-security-config.json +88 -0
  3. package/examples/package-lock.json +7 -4
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +2 -2
  6. package/lib/config.js +2 -2
  7. package/lib/config.js.map +1 -1
  8. package/models/components/conversationresponse.js +1 -1
  9. package/models/components/conversationwithmessagesresponse.js +1 -1
  10. package/models/components/partdoneevent.js +1 -1
  11. package/models/components/reasoningpart.js +1 -1
  12. package/models/operations/createcontact.js +1 -1
  13. package/models/operations/createconversation.js +1 -1
  14. package/models/operations/createconversationresponse.js +2 -2
  15. package/models/operations/createdataset.js +1 -1
  16. package/models/operations/createdatasetitem.js +4 -4
  17. package/models/operations/createdatasource.js +1 -1
  18. package/models/operations/createeval.js +14 -14
  19. package/models/operations/createidentity.js +1 -1
  20. package/models/operations/createtool.js +6 -6
  21. package/models/operations/fileget.js +1 -1
  22. package/models/operations/filelist.js +1 -1
  23. package/models/operations/fileupload.js +1 -1
  24. package/models/operations/generateconversationname.js +1 -1
  25. package/models/operations/getalltools.js +6 -6
  26. package/models/operations/getevals.js +14 -14
  27. package/models/operations/listdatasetdatapoints.js +4 -4
  28. package/models/operations/listdatasets.js +1 -1
  29. package/models/operations/listdatasources.js +1 -1
  30. package/models/operations/listidentities.js +1 -1
  31. package/models/operations/retrievedatapoint.js +4 -4
  32. package/models/operations/retrievedataset.js +1 -1
  33. package/models/operations/retrievedatasource.js +1 -1
  34. package/models/operations/retrieveidentity.js +1 -1
  35. package/models/operations/retrievetool.js +6 -6
  36. package/models/operations/runagent.js +1 -1
  37. package/models/operations/streamrunagent.js +1 -1
  38. package/models/operations/updateconversation.js +1 -1
  39. package/models/operations/updatedatapoint.js +4 -4
  40. package/models/operations/updatedataset.js +1 -1
  41. package/models/operations/updatedatasource.js +1 -1
  42. package/models/operations/updateeval.js +14 -14
  43. package/models/operations/updateidentity.js +1 -1
  44. package/models/operations/updatetool.js +7 -7
  45. package/package.json +3 -4
  46. package/packages/orq-rc/examples/contactsCreate.example.ts +42 -0
  47. package/packages/orq-rc/examples/package-lock.json +610 -0
  48. package/packages/orq-rc/examples/package.json +18 -0
  49. package/packages/orq-rc/jsr.json +28 -0
  50. package/packages/orq-rc/package-lock.json +1740 -0
  51. package/packages/orq-rc/package.json +30 -0
  52. package/packages/orq-rc/src/core.ts +13 -0
  53. package/packages/orq-rc/src/funcs/agentsCreate.ts +161 -0
  54. package/packages/orq-rc/src/funcs/agentsDelete.ts +180 -0
  55. package/packages/orq-rc/src/funcs/agentsInvoke.ts +177 -0
  56. package/packages/orq-rc/src/funcs/agentsList.ts +179 -0
  57. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +183 -0
  58. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +180 -0
  59. package/packages/orq-rc/src/funcs/agentsRun.ts +162 -0
  60. package/packages/orq-rc/src/funcs/agentsStream.ts +201 -0
  61. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +186 -0
  62. package/packages/orq-rc/src/funcs/agentsUpdate.ts +184 -0
  63. package/packages/orq-rc/src/funcs/chunkingParse.ts +160 -0
  64. package/packages/orq-rc/src/funcs/contactsCreate.ts +160 -0
  65. package/packages/orq-rc/src/funcs/conversationsCreate.ts +161 -0
  66. package/packages/orq-rc/src/funcs/conversationsCreateConversationResponse.ts +186 -0
  67. package/packages/orq-rc/src/funcs/conversationsDelete.ts +180 -0
  68. package/packages/orq-rc/src/funcs/conversationsGenerateName.ts +194 -0
  69. package/packages/orq-rc/src/funcs/conversationsList.ts +186 -0
  70. package/packages/orq-rc/src/funcs/conversationsRetrieve.ts +181 -0
  71. package/packages/orq-rc/src/funcs/conversationsUpdate.ts +184 -0
  72. package/packages/orq-rc/src/funcs/datasetsClear.ts +167 -0
  73. package/packages/orq-rc/src/funcs/datasetsCreate.ts +165 -0
  74. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +171 -0
  75. package/packages/orq-rc/src/funcs/datasetsDelete.ts +167 -0
  76. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +182 -0
  77. package/packages/orq-rc/src/funcs/datasetsList.ts +167 -0
  78. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +174 -0
  79. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +175 -0
  80. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +181 -0
  81. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +176 -0
  82. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +179 -0
  83. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +168 -0
  84. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +176 -0
  85. package/packages/orq-rc/src/funcs/deploymentsList.ts +176 -0
  86. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +168 -0
  87. package/packages/orq-rc/src/funcs/deploymentsStream.ts +183 -0
  88. package/packages/orq-rc/src/funcs/evalsAll.ts +173 -0
  89. package/packages/orq-rc/src/funcs/evalsCreate.ts +169 -0
  90. package/packages/orq-rc/src/funcs/evalsDelete.ts +173 -0
  91. package/packages/orq-rc/src/funcs/evalsInvoke.ts +181 -0
  92. package/packages/orq-rc/src/funcs/evalsUpdate.ts +173 -0
  93. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +183 -0
  94. package/packages/orq-rc/src/funcs/feedbackCreate.ts +160 -0
  95. package/packages/orq-rc/src/funcs/filesCreate.ts +187 -0
  96. package/packages/orq-rc/src/funcs/filesDelete.ts +164 -0
  97. package/packages/orq-rc/src/funcs/filesGet.ts +166 -0
  98. package/packages/orq-rc/src/funcs/filesList.ts +167 -0
  99. package/packages/orq-rc/src/funcs/identitiesCreate.ts +165 -0
  100. package/packages/orq-rc/src/funcs/identitiesDelete.ts +176 -0
  101. package/packages/orq-rc/src/funcs/identitiesList.ts +170 -0
  102. package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +175 -0
  103. package/packages/orq-rc/src/funcs/identitiesUpdate.ts +176 -0
  104. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +158 -0
  105. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +171 -0
  106. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +166 -0
  107. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +167 -0
  108. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +174 -0
  109. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +170 -0
  110. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +173 -0
  111. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +170 -0
  112. package/packages/orq-rc/src/funcs/knowledgeList.ts +169 -0
  113. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +178 -0
  114. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +171 -0
  115. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +174 -0
  116. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +166 -0
  117. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +173 -0
  118. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +169 -0
  119. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +167 -0
  120. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +164 -0
  121. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +174 -0
  122. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +170 -0
  123. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +162 -0
  124. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +176 -0
  125. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +170 -0
  126. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +168 -0
  127. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +185 -0
  128. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +180 -0
  129. package/packages/orq-rc/src/funcs/memoryStoresList.ts +178 -0
  130. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +184 -0
  131. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +177 -0
  132. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +177 -0
  133. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +179 -0
  134. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +174 -0
  135. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +168 -0
  136. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +180 -0
  137. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +175 -0
  138. package/packages/orq-rc/src/funcs/modelsList.ts +142 -0
  139. package/packages/orq-rc/src/funcs/promptsCreate.ts +160 -0
  140. package/packages/orq-rc/src/funcs/promptsDelete.ts +173 -0
  141. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +181 -0
  142. package/packages/orq-rc/src/funcs/promptsList.ts +167 -0
  143. package/packages/orq-rc/src/funcs/promptsListVersions.ts +173 -0
  144. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +166 -0
  145. package/packages/orq-rc/src/funcs/promptsUpdate.ts +173 -0
  146. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +161 -0
  147. package/packages/orq-rc/src/funcs/routerAudioSpeechCreate.ts +161 -0
  148. package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +262 -0
  149. package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +252 -0
  150. package/packages/orq-rc/src/funcs/routerChatCompletionsCreate.ts +168 -0
  151. package/packages/orq-rc/src/funcs/routerCompletionsCreate.ts +168 -0
  152. package/packages/orq-rc/src/funcs/routerEmbeddingsCreate.ts +161 -0
  153. package/packages/orq-rc/src/funcs/routerImagesEditsCreate.ts +222 -0
  154. package/packages/orq-rc/src/funcs/routerImagesGenerationsCreate.ts +160 -0
  155. package/packages/orq-rc/src/funcs/routerImagesVariationsCreate.ts +218 -0
  156. package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +167 -0
  157. package/packages/orq-rc/src/funcs/routerOcr.ts +158 -0
  158. package/packages/orq-rc/src/funcs/routerRerankCreate.ts +160 -0
  159. package/packages/orq-rc/src/funcs/routerResponsesCreate.ts +167 -0
  160. package/packages/orq-rc/src/funcs/toolsCreate.ts +163 -0
  161. package/packages/orq-rc/src/funcs/toolsDelete.ts +167 -0
  162. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +183 -0
  163. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +190 -0
  164. package/packages/orq-rc/src/funcs/toolsList.ts +176 -0
  165. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +166 -0
  166. package/packages/orq-rc/src/funcs/toolsUpdate.ts +176 -0
  167. package/packages/orq-rc/src/hooks/global.ts +44 -0
  168. package/packages/orq-rc/src/hooks/hooks.ts +132 -0
  169. package/packages/orq-rc/src/hooks/index.ts +6 -0
  170. package/packages/orq-rc/src/hooks/registration.ts +15 -0
  171. package/packages/orq-rc/src/hooks/types.ts +112 -0
  172. package/packages/orq-rc/src/index.ts +9 -0
  173. package/packages/orq-rc/src/lib/base64.ts +37 -0
  174. package/packages/orq-rc/src/lib/config.ts +74 -0
  175. package/packages/orq-rc/src/lib/dlv.ts +53 -0
  176. package/packages/orq-rc/src/lib/encodings.ts +497 -0
  177. package/packages/orq-rc/src/lib/env.ts +89 -0
  178. package/packages/orq-rc/src/lib/event-streams.ts +152 -0
  179. package/packages/orq-rc/src/lib/files.ts +82 -0
  180. package/packages/orq-rc/src/lib/http.ts +323 -0
  181. package/packages/orq-rc/src/lib/is-plain-object.ts +43 -0
  182. package/packages/orq-rc/src/lib/logger.ts +9 -0
  183. package/packages/orq-rc/src/lib/matchers.ts +345 -0
  184. package/packages/orq-rc/src/lib/primitives.ts +150 -0
  185. package/packages/orq-rc/src/lib/retries.ts +218 -0
  186. package/packages/orq-rc/src/lib/schemas.ts +91 -0
  187. package/packages/orq-rc/src/lib/sdks.ts +407 -0
  188. package/packages/orq-rc/src/lib/security.ts +264 -0
  189. package/packages/orq-rc/src/lib/url.ts +33 -0
  190. package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +99 -0
  191. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +185 -0
  192. package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +73 -0
  193. package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +91 -0
  194. package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +71 -0
  195. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +507 -0
  196. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +165 -0
  197. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +103 -0
  198. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +503 -0
  199. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +807 -0
  200. package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +136 -0
  201. package/packages/orq-rc/src/models/components/conversationresponse.ts +132 -0
  202. package/packages/orq-rc/src/models/components/conversationwithmessagesresponse.ts +149 -0
  203. package/packages/orq-rc/src/models/components/createagentresponse.ts +299 -0
  204. package/packages/orq-rc/src/models/components/datapart.ts +38 -0
  205. package/packages/orq-rc/src/models/components/errorpart.ts +58 -0
  206. package/packages/orq-rc/src/models/components/errorstreamingevent.ts +66 -0
  207. package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +71 -0
  208. package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +61 -0
  209. package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +67 -0
  210. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +87 -0
  211. package/packages/orq-rc/src/models/components/filepart.ts +218 -0
  212. package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +268 -0
  213. package/packages/orq-rc/src/models/components/index.ts +60 -0
  214. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +3457 -0
  215. package/packages/orq-rc/src/models/components/messageresponse.ts +127 -0
  216. package/packages/orq-rc/src/models/components/partdelta.ts +39 -0
  217. package/packages/orq-rc/src/models/components/partdeltaevent.ts +73 -0
  218. package/packages/orq-rc/src/models/components/partdoneevent.ts +139 -0
  219. package/packages/orq-rc/src/models/components/publiccontact.ts +71 -0
  220. package/packages/orq-rc/src/models/components/publicidentity.ts +69 -0
  221. package/packages/orq-rc/src/models/components/reasoningpart.ts +62 -0
  222. package/packages/orq-rc/src/models/components/reasoningpartschema.ts +71 -0
  223. package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +66 -0
  224. package/packages/orq-rc/src/models/components/refusalpartschema.ts +64 -0
  225. package/packages/orq-rc/src/models/components/responsedoneevent.ts +318 -0
  226. package/packages/orq-rc/src/models/components/responsefailedevent.ts +72 -0
  227. package/packages/orq-rc/src/models/components/responsestartedevent.ts +91 -0
  228. package/packages/orq-rc/src/models/components/responsestreamingevent.ts +85 -0
  229. package/packages/orq-rc/src/models/components/reviewoutcome.ts +23 -0
  230. package/packages/orq-rc/src/models/components/security.ts +32 -0
  231. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +207 -0
  232. package/packages/orq-rc/src/models/components/textpart.ts +54 -0
  233. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +59 -0
  234. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +106 -0
  235. package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +64 -0
  236. package/packages/orq-rc/src/models/components/toolcallpart.ts +51 -0
  237. package/packages/orq-rc/src/models/components/tooldoneevent.ts +77 -0
  238. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +230 -0
  239. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +214 -0
  240. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +200 -0
  241. package/packages/orq-rc/src/models/components/toolfailedevent.ts +77 -0
  242. package/packages/orq-rc/src/models/components/toolresultpart.ts +71 -0
  243. package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +78 -0
  244. package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +87 -0
  245. package/packages/orq-rc/src/models/components/toolstartedevent.ts +82 -0
  246. package/packages/orq-rc/src/models/components/usermessagerequest.ts +136 -0
  247. package/packages/orq-rc/src/models/errors/apierror.ts +40 -0
  248. package/packages/orq-rc/src/models/errors/createeval.ts +51 -0
  249. package/packages/orq-rc/src/models/errors/createmoderation.ts +84 -0
  250. package/packages/orq-rc/src/models/errors/createtranscription.ts +87 -0
  251. package/packages/orq-rc/src/models/errors/createtranslation.ts +87 -0
  252. package/packages/orq-rc/src/models/errors/deleteagent.ts +51 -0
  253. package/packages/orq-rc/src/models/errors/deleteconversation.ts +51 -0
  254. package/packages/orq-rc/src/models/errors/deleteeval.ts +51 -0
  255. package/packages/orq-rc/src/models/errors/deleteidentity.ts +62 -0
  256. package/packages/orq-rc/src/models/errors/deleteprompt.ts +51 -0
  257. package/packages/orq-rc/src/models/errors/generateconversationname.ts +99 -0
  258. package/packages/orq-rc/src/models/errors/getevals.ts +51 -0
  259. package/packages/orq-rc/src/models/errors/getpromptversion.ts +51 -0
  260. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +51 -0
  261. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +51 -0
  262. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +52 -0
  263. package/packages/orq-rc/src/models/errors/honoapierror.ts +59 -0
  264. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +62 -0
  265. package/packages/orq-rc/src/models/errors/index.ts +37 -0
  266. package/packages/orq-rc/src/models/errors/invokeeval.ts +141 -0
  267. package/packages/orq-rc/src/models/errors/orqerror.ts +35 -0
  268. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +50 -0
  269. package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +51 -0
  270. package/packages/orq-rc/src/models/errors/retrieveconversation.ts +51 -0
  271. package/packages/orq-rc/src/models/errors/retrieveidentity.ts +62 -0
  272. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +109 -0
  273. package/packages/orq-rc/src/models/errors/streamagent.ts +51 -0
  274. package/packages/orq-rc/src/models/errors/streamrunagent.ts +51 -0
  275. package/packages/orq-rc/src/models/errors/updateagent.ts +51 -0
  276. package/packages/orq-rc/src/models/errors/updateconversation.ts +51 -0
  277. package/packages/orq-rc/src/models/errors/updateeval.ts +51 -0
  278. package/packages/orq-rc/src/models/errors/updateidentity.ts +54 -0
  279. package/packages/orq-rc/src/models/errors/updateprompt.ts +51 -0
  280. package/packages/orq-rc/src/models/errors/updatetool.ts +62 -0
  281. package/packages/orq-rc/src/models/operations/cleardataset.ts +39 -0
  282. package/packages/orq-rc/src/models/operations/createagentrequest.ts +7093 -0
  283. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +609 -0
  284. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +6381 -0
  285. package/packages/orq-rc/src/models/operations/createchunk.ts +222 -0
  286. package/packages/orq-rc/src/models/operations/createcompletion.ts +3413 -0
  287. package/packages/orq-rc/src/models/operations/createcontact.ts +156 -0
  288. package/packages/orq-rc/src/models/operations/createconversation.ts +227 -0
  289. package/packages/orq-rc/src/models/operations/createconversationresponse.ts +498 -0
  290. package/packages/orq-rc/src/models/operations/createdataset.ts +162 -0
  291. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2551 -0
  292. package/packages/orq-rc/src/models/operations/createdatasource.ts +437 -0
  293. package/packages/orq-rc/src/models/operations/createembedding.ts +947 -0
  294. package/packages/orq-rc/src/models/operations/createeval.ts +3128 -0
  295. package/packages/orq-rc/src/models/operations/createfeedback.ts +144 -0
  296. package/packages/orq-rc/src/models/operations/createidentity.ts +162 -0
  297. package/packages/orq-rc/src/models/operations/createimage.ts +1028 -0
  298. package/packages/orq-rc/src/models/operations/createimageedit.ts +1045 -0
  299. package/packages/orq-rc/src/models/operations/createimagevariation.ts +1067 -0
  300. package/packages/orq-rc/src/models/operations/createknowledge.ts +944 -0
  301. package/packages/orq-rc/src/models/operations/creatememory.ts +142 -0
  302. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +152 -0
  303. package/packages/orq-rc/src/models/operations/creatememorystore.ts +199 -0
  304. package/packages/orq-rc/src/models/operations/createmoderation.ts +664 -0
  305. package/packages/orq-rc/src/models/operations/createprompt.ts +5400 -0
  306. package/packages/orq-rc/src/models/operations/creatererank.ts +890 -0
  307. package/packages/orq-rc/src/models/operations/createresponse.ts +3294 -0
  308. package/packages/orq-rc/src/models/operations/createspeech.ts +700 -0
  309. package/packages/orq-rc/src/models/operations/createtool.ts +2499 -0
  310. package/packages/orq-rc/src/models/operations/createtranscription.ts +955 -0
  311. package/packages/orq-rc/src/models/operations/createtranslation.ts +930 -0
  312. package/packages/orq-rc/src/models/operations/deleteagent.ts +39 -0
  313. package/packages/orq-rc/src/models/operations/deletechunk.ts +53 -0
  314. package/packages/orq-rc/src/models/operations/deletechunks.ts +125 -0
  315. package/packages/orq-rc/src/models/operations/deleteconversation.ts +39 -0
  316. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +46 -0
  317. package/packages/orq-rc/src/models/operations/deletedataset.ts +39 -0
  318. package/packages/orq-rc/src/models/operations/deletedatasource.ts +46 -0
  319. package/packages/orq-rc/src/models/operations/deleteeval.ts +31 -0
  320. package/packages/orq-rc/src/models/operations/deleteidentity.ts +34 -0
  321. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +39 -0
  322. package/packages/orq-rc/src/models/operations/deletememory.ts +46 -0
  323. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +55 -0
  324. package/packages/orq-rc/src/models/operations/deletememorystore.ts +39 -0
  325. package/packages/orq-rc/src/models/operations/deleteprompt.ts +34 -0
  326. package/packages/orq-rc/src/models/operations/deletetool.ts +36 -0
  327. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +2370 -0
  328. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +4525 -0
  329. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +689 -0
  330. package/packages/orq-rc/src/models/operations/deployments.ts +1267 -0
  331. package/packages/orq-rc/src/models/operations/deploymentstream.ts +4613 -0
  332. package/packages/orq-rc/src/models/operations/filedelete.ts +39 -0
  333. package/packages/orq-rc/src/models/operations/fileget.ts +116 -0
  334. package/packages/orq-rc/src/models/operations/filelist.ts +172 -0
  335. package/packages/orq-rc/src/models/operations/fileupload.ts +170 -0
  336. package/packages/orq-rc/src/models/operations/generateconversationname.ts +207 -0
  337. package/packages/orq-rc/src/models/operations/getallmemories.ts +173 -0
  338. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +188 -0
  339. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +200 -0
  340. package/packages/orq-rc/src/models/operations/getallprompts.ts +3163 -0
  341. package/packages/orq-rc/src/models/operations/getalltools.ts +1398 -0
  342. package/packages/orq-rc/src/models/operations/getchunkscount.ts +121 -0
  343. package/packages/orq-rc/src/models/operations/getevals.ts +2330 -0
  344. package/packages/orq-rc/src/models/operations/getonechunk.ts +171 -0
  345. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +652 -0
  346. package/packages/orq-rc/src/models/operations/getoneprompt.ts +3088 -0
  347. package/packages/orq-rc/src/models/operations/getpromptversion.ts +3133 -0
  348. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +162 -0
  349. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +163 -0
  350. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +110 -0
  351. package/packages/orq-rc/src/models/operations/index.ts +118 -0
  352. package/packages/orq-rc/src/models/operations/invokeagent.ts +733 -0
  353. package/packages/orq-rc/src/models/operations/invokeeval.ts +1129 -0
  354. package/packages/orq-rc/src/models/operations/listagents.ts +3018 -0
  355. package/packages/orq-rc/src/models/operations/listchunks.ts +260 -0
  356. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +263 -0
  357. package/packages/orq-rc/src/models/operations/listconversations.ts +104 -0
  358. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +1498 -0
  359. package/packages/orq-rc/src/models/operations/listdatasets.ts +205 -0
  360. package/packages/orq-rc/src/models/operations/listdatasources.ts +235 -0
  361. package/packages/orq-rc/src/models/operations/listidentities.ts +275 -0
  362. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +642 -0
  363. package/packages/orq-rc/src/models/operations/listmodels.ts +143 -0
  364. package/packages/orq-rc/src/models/operations/listpromptversions.ts +3208 -0
  365. package/packages/orq-rc/src/models/operations/parse.ts +777 -0
  366. package/packages/orq-rc/src/models/operations/postv2routerocr.ts +478 -0
  367. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +108 -0
  368. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +3104 -0
  369. package/packages/orq-rc/src/models/operations/retrieveconversation.ts +41 -0
  370. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +1402 -0
  371. package/packages/orq-rc/src/models/operations/retrievedataset.ts +150 -0
  372. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +152 -0
  373. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +117 -0
  374. package/packages/orq-rc/src/models/operations/retrievememory.ts +112 -0
  375. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +118 -0
  376. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +144 -0
  377. package/packages/orq-rc/src/models/operations/retrievetool.ts +1379 -0
  378. package/packages/orq-rc/src/models/operations/runagent.ts +5351 -0
  379. package/packages/orq-rc/src/models/operations/searchknowledge.ts +1762 -0
  380. package/packages/orq-rc/src/models/operations/streamagent.ts +629 -0
  381. package/packages/orq-rc/src/models/operations/streamrunagent.ts +5546 -0
  382. package/packages/orq-rc/src/models/operations/updateagent.ts +7447 -0
  383. package/packages/orq-rc/src/models/operations/updatechunk.ts +236 -0
  384. package/packages/orq-rc/src/models/operations/updateconversation.ts +252 -0
  385. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2555 -0
  386. package/packages/orq-rc/src/models/operations/updatedataset.ts +206 -0
  387. package/packages/orq-rc/src/models/operations/updatedatasource.ts +186 -0
  388. package/packages/orq-rc/src/models/operations/updateeval.ts +3303 -0
  389. package/packages/orq-rc/src/models/operations/updateidentity.ts +189 -0
  390. package/packages/orq-rc/src/models/operations/updateknowledge.ts +1231 -0
  391. package/packages/orq-rc/src/models/operations/updatememory.ts +142 -0
  392. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +159 -0
  393. package/packages/orq-rc/src/models/operations/updatememorystore.ts +245 -0
  394. package/packages/orq-rc/src/models/operations/updateprompt.ts +5471 -0
  395. package/packages/orq-rc/src/models/operations/updatetool.ts +2696 -0
  396. package/packages/orq-rc/src/sdk/agents.ts +196 -0
  397. package/packages/orq-rc/src/sdk/audio.ts +25 -0
  398. package/packages/orq-rc/src/sdk/chat.ts +13 -0
  399. package/packages/orq-rc/src/sdk/chunking.ts +27 -0
  400. package/packages/orq-rc/src/sdk/completions.ts +32 -0
  401. package/packages/orq-rc/src/sdk/contacts.ts +27 -0
  402. package/packages/orq-rc/src/sdk/conversations.ts +147 -0
  403. package/packages/orq-rc/src/sdk/datasets.ts +204 -0
  404. package/packages/orq-rc/src/sdk/deployments.ts +89 -0
  405. package/packages/orq-rc/src/sdk/edits.ts +27 -0
  406. package/packages/orq-rc/src/sdk/embeddings.ts +27 -0
  407. package/packages/orq-rc/src/sdk/evals.ts +84 -0
  408. package/packages/orq-rc/src/sdk/evaluators.ts +27 -0
  409. package/packages/orq-rc/src/sdk/feedback.ts +27 -0
  410. package/packages/orq-rc/src/sdk/files.ts +78 -0
  411. package/packages/orq-rc/src/sdk/generations.ts +27 -0
  412. package/packages/orq-rc/src/sdk/identities.ts +99 -0
  413. package/packages/orq-rc/src/sdk/images.ts +25 -0
  414. package/packages/orq-rc/src/sdk/index.ts +5 -0
  415. package/packages/orq-rc/src/sdk/internal.ts +28 -0
  416. package/packages/orq-rc/src/sdk/knowledge.ts +309 -0
  417. package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
  418. package/packages/orq-rc/src/sdk/metrics.ts +27 -0
  419. package/packages/orq-rc/src/sdk/models.ts +25 -0
  420. package/packages/orq-rc/src/sdk/moderations.ts +24 -0
  421. package/packages/orq-rc/src/sdk/orqcompletions.ts +32 -0
  422. package/packages/orq-rc/src/sdk/orqresponses.ts +32 -0
  423. package/packages/orq-rc/src/sdk/prompts.ts +126 -0
  424. package/packages/orq-rc/src/sdk/remoteconfigs.ts +24 -0
  425. package/packages/orq-rc/src/sdk/rerank.ts +27 -0
  426. package/packages/orq-rc/src/sdk/responses.ts +34 -0
  427. package/packages/orq-rc/src/sdk/router.ts +72 -0
  428. package/packages/orq-rc/src/sdk/sdk.ts +121 -0
  429. package/packages/orq-rc/src/sdk/speech.ts +27 -0
  430. package/packages/orq-rc/src/sdk/tools.ts +135 -0
  431. package/packages/orq-rc/src/sdk/transcriptions.ts +24 -0
  432. package/packages/orq-rc/src/sdk/translations.ts +24 -0
  433. package/packages/orq-rc/src/sdk/variations.ts +27 -0
  434. package/packages/orq-rc/src/types/async.ts +68 -0
  435. package/packages/orq-rc/src/types/blobs.ts +32 -0
  436. package/packages/orq-rc/src/types/constdatetime.ts +15 -0
  437. package/packages/orq-rc/src/types/enums.ts +45 -0
  438. package/packages/orq-rc/src/types/fp.ts +50 -0
  439. package/packages/orq-rc/src/types/index.ts +11 -0
  440. package/packages/orq-rc/src/types/operations.ts +105 -0
  441. package/packages/orq-rc/src/types/rfcdate.ts +54 -0
  442. package/packages/orq-rc/src/types/streams.ts +21 -0
  443. package/packages/orq-rc/src/types/unrecognized.ts +35 -0
  444. package/packages/orq-rc/tsconfig.json +40 -0
  445. package/src/lib/config.ts +2 -2
  446. package/src/models/components/conversationresponse.ts +1 -1
  447. package/src/models/components/conversationwithmessagesresponse.ts +1 -1
  448. package/src/models/components/partdoneevent.ts +1 -1
  449. package/src/models/components/reasoningpart.ts +1 -1
  450. package/src/models/operations/createcontact.ts +1 -1
  451. package/src/models/operations/createconversation.ts +1 -1
  452. package/src/models/operations/createconversationresponse.ts +2 -2
  453. package/src/models/operations/createdataset.ts +1 -1
  454. package/src/models/operations/createdatasetitem.ts +4 -4
  455. package/src/models/operations/createdatasource.ts +1 -1
  456. package/src/models/operations/createeval.ts +14 -14
  457. package/src/models/operations/createidentity.ts +1 -1
  458. package/src/models/operations/createtool.ts +6 -6
  459. package/src/models/operations/fileget.ts +1 -1
  460. package/src/models/operations/filelist.ts +1 -1
  461. package/src/models/operations/fileupload.ts +1 -1
  462. package/src/models/operations/generateconversationname.ts +1 -1
  463. package/src/models/operations/getalltools.ts +6 -6
  464. package/src/models/operations/getevals.ts +14 -14
  465. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  466. package/src/models/operations/listdatasets.ts +1 -1
  467. package/src/models/operations/listdatasources.ts +1 -1
  468. package/src/models/operations/listidentities.ts +1 -1
  469. package/src/models/operations/retrievedatapoint.ts +4 -4
  470. package/src/models/operations/retrievedataset.ts +1 -1
  471. package/src/models/operations/retrievedatasource.ts +1 -1
  472. package/src/models/operations/retrieveidentity.ts +1 -1
  473. package/src/models/operations/retrievetool.ts +6 -6
  474. package/src/models/operations/runagent.ts +1 -1
  475. package/src/models/operations/streamrunagent.ts +1 -1
  476. package/src/models/operations/updateconversation.ts +1 -1
  477. package/src/models/operations/updatedatapoint.ts +4 -4
  478. package/src/models/operations/updatedataset.ts +1 -1
  479. package/src/models/operations/updatedatasource.ts +1 -1
  480. package/src/models/operations/updateeval.ts +14 -14
  481. package/src/models/operations/updateidentity.ts +1 -1
  482. package/src/models/operations/updatetool.ts +7 -7
@@ -0,0 +1,503 @@
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import { DataPart, DataPart$inboundSchema } from "./datapart.js";
12
+ import { ErrorPart, ErrorPart$inboundSchema } from "./errorpart.js";
13
+ import { FilePart, FilePart$inboundSchema } from "./filepart.js";
14
+ import { TextPart, TextPart$inboundSchema } from "./textpart.js";
15
+ import { ToolCallPart, ToolCallPart$inboundSchema } from "./toolcallpart.js";
16
+ import {
17
+ ToolResultPart,
18
+ ToolResultPart$inboundSchema,
19
+ } from "./toolresultpart.js";
20
+
21
+ /**
22
+ * Extended A2A message role
23
+ */
24
+ export const AgentStartedStreamingEventRole = {
25
+ User: "user",
26
+ Agent: "agent",
27
+ Tool: "tool",
28
+ System: "system",
29
+ } as const;
30
+ /**
31
+ * Extended A2A message role
32
+ */
33
+ export type AgentStartedStreamingEventRole = ClosedEnum<
34
+ typeof AgentStartedStreamingEventRole
35
+ >;
36
+
37
+ export type AgentStartedStreamingEventParts =
38
+ | TextPart
39
+ | ErrorPart
40
+ | DataPart
41
+ | FilePart
42
+ | ToolCallPart
43
+ | ToolResultPart;
44
+
45
+ export type InputMessage = {
46
+ messageId?: string | undefined;
47
+ /**
48
+ * Extended A2A message role
49
+ */
50
+ role: AgentStartedStreamingEventRole;
51
+ parts: Array<
52
+ TextPart | ErrorPart | DataPart | FilePart | ToolCallPart | ToolResultPart
53
+ >;
54
+ metadata?: { [k: string]: any } | undefined;
55
+ };
56
+
57
+ /**
58
+ * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
59
+ */
60
+ export const ToolApprovalRequired = {
61
+ All: "all",
62
+ RespectTool: "respect_tool",
63
+ None: "none",
64
+ } as const;
65
+ /**
66
+ * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
67
+ */
68
+ export type ToolApprovalRequired = ClosedEnum<typeof ToolApprovalRequired>;
69
+
70
+ export type AgentStartedStreamingEventConditions = {
71
+ /**
72
+ * The argument of the tool call to evaluate
73
+ */
74
+ condition: string;
75
+ /**
76
+ * The operator to use
77
+ */
78
+ operator: string;
79
+ /**
80
+ * The value to compare against
81
+ */
82
+ value: string;
83
+ };
84
+
85
+ export type Tools = {
86
+ /**
87
+ * The id of the resource
88
+ */
89
+ id: string;
90
+ /**
91
+ * Optional tool key for custom tools
92
+ */
93
+ key?: string | undefined;
94
+ actionType: string;
95
+ displayName?: string | undefined;
96
+ /**
97
+ * Optional tool description
98
+ */
99
+ description?: string | undefined;
100
+ requiresApproval: boolean;
101
+ /**
102
+ * Nested tool ID for MCP tools (identifies specific tool within MCP server)
103
+ */
104
+ toolId?: string | undefined;
105
+ conditions?: Array<AgentStartedStreamingEventConditions> | undefined;
106
+ /**
107
+ * Tool execution timeout in seconds (default: 2 minutes, max: 10 minutes)
108
+ */
109
+ timeout: number;
110
+ };
111
+
112
+ /**
113
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
114
+ */
115
+ export const ExecuteOn = {
116
+ Input: "input",
117
+ Output: "output",
118
+ } as const;
119
+ /**
120
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
121
+ */
122
+ export type ExecuteOn = ClosedEnum<typeof ExecuteOn>;
123
+
124
+ export type Evaluators = {
125
+ /**
126
+ * Unique key or identifier of the evaluator
127
+ */
128
+ id: string;
129
+ /**
130
+ * The percentage of executions to evaluate with this evaluator (1-100). For example, a value of 50 means the evaluator will run on approximately half of the executions.
131
+ */
132
+ sampleRate: number;
133
+ /**
134
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
135
+ */
136
+ executeOn: ExecuteOn;
137
+ };
138
+
139
+ /**
140
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
141
+ */
142
+ export const AgentStartedStreamingEventExecuteOn = {
143
+ Input: "input",
144
+ Output: "output",
145
+ } as const;
146
+ /**
147
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
148
+ */
149
+ export type AgentStartedStreamingEventExecuteOn = ClosedEnum<
150
+ typeof AgentStartedStreamingEventExecuteOn
151
+ >;
152
+
153
+ export type Guardrails = {
154
+ /**
155
+ * Unique key or identifier of the evaluator
156
+ */
157
+ id: string;
158
+ /**
159
+ * The percentage of executions to evaluate with this evaluator (1-100). For example, a value of 50 means the evaluator will run on approximately half of the executions.
160
+ */
161
+ sampleRate: number;
162
+ /**
163
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
164
+ */
165
+ executeOn: AgentStartedStreamingEventExecuteOn;
166
+ };
167
+
168
+ export type Settings = {
169
+ /**
170
+ * Maximum iterations(llm calls) before the agent will stop executing.
171
+ */
172
+ maxIterations: number;
173
+ /**
174
+ * Maximum time (in seconds) for the agent thinking process. This does not include the time for tool calls and sub agent calls. It will be loosely enforced, the in progress LLM calls will not be terminated and the last assistant message will be returned.
175
+ */
176
+ maxExecutionTime: number;
177
+ /**
178
+ * Maximum cost in USD for the agent execution. When the accumulated cost exceeds this limit, the agent will stop executing. Set to 0 for unlimited. Only supported in v3 responses
179
+ */
180
+ maxCost: number;
181
+ /**
182
+ * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
183
+ */
184
+ toolApprovalRequired: ToolApprovalRequired;
185
+ tools?: Array<Tools> | undefined;
186
+ /**
187
+ * Configuration for an evaluator applied to the agent
188
+ */
189
+ evaluators?: Array<Evaluators> | undefined;
190
+ /**
191
+ * Configuration for a guardrail applied to the agent
192
+ */
193
+ guardrails?: Array<Guardrails> | undefined;
194
+ };
195
+
196
+ export type AgentStartedStreamingEventData = {
197
+ workflowRunId: string;
198
+ integrationId?: string | undefined;
199
+ inputMessage: InputMessage;
200
+ modelId: string;
201
+ instructions: string;
202
+ systemPrompt: string;
203
+ settings?: Settings | undefined;
204
+ agentManifestId: string;
205
+ agentKey: string;
206
+ agentDescription?: string | null | undefined;
207
+ variables?: { [k: string]: any } | undefined;
208
+ toolExecutionId?: string | undefined;
209
+ isContinuation?: boolean | undefined;
210
+ stream?: boolean | undefined;
211
+ responseId?: string | undefined;
212
+ };
213
+
214
+ /**
215
+ * Emitted when the agent begins processing. Contains configuration details including the model, instructions, system prompt, and input message.
216
+ */
217
+ export type AgentStartedStreamingEvent = {
218
+ type: "event.agents.started";
219
+ /**
220
+ * ISO timestamp of the event
221
+ */
222
+ timestamp: string;
223
+ data: AgentStartedStreamingEventData;
224
+ };
225
+
226
+ /** @internal */
227
+ export const AgentStartedStreamingEventRole$inboundSchema: z.ZodNativeEnum<
228
+ typeof AgentStartedStreamingEventRole
229
+ > = z.nativeEnum(AgentStartedStreamingEventRole);
230
+
231
+ /** @internal */
232
+ export const AgentStartedStreamingEventParts$inboundSchema: z.ZodType<
233
+ AgentStartedStreamingEventParts,
234
+ z.ZodTypeDef,
235
+ unknown
236
+ > = z.union([
237
+ TextPart$inboundSchema,
238
+ ErrorPart$inboundSchema,
239
+ DataPart$inboundSchema,
240
+ FilePart$inboundSchema,
241
+ ToolCallPart$inboundSchema,
242
+ ToolResultPart$inboundSchema,
243
+ ]);
244
+
245
+ export function agentStartedStreamingEventPartsFromJSON(
246
+ jsonString: string,
247
+ ): SafeParseResult<AgentStartedStreamingEventParts, SDKValidationError> {
248
+ return safeParse(
249
+ jsonString,
250
+ (x) => AgentStartedStreamingEventParts$inboundSchema.parse(JSON.parse(x)),
251
+ `Failed to parse 'AgentStartedStreamingEventParts' from JSON`,
252
+ );
253
+ }
254
+
255
+ /** @internal */
256
+ export const InputMessage$inboundSchema: z.ZodType<
257
+ InputMessage,
258
+ z.ZodTypeDef,
259
+ unknown
260
+ > = z.object({
261
+ messageId: z.string().optional(),
262
+ role: AgentStartedStreamingEventRole$inboundSchema,
263
+ parts: z.array(
264
+ z.union([
265
+ TextPart$inboundSchema,
266
+ ErrorPart$inboundSchema,
267
+ DataPart$inboundSchema,
268
+ FilePart$inboundSchema,
269
+ ToolCallPart$inboundSchema,
270
+ ToolResultPart$inboundSchema,
271
+ ]),
272
+ ),
273
+ metadata: z.record(z.any()).optional(),
274
+ });
275
+
276
+ export function inputMessageFromJSON(
277
+ jsonString: string,
278
+ ): SafeParseResult<InputMessage, SDKValidationError> {
279
+ return safeParse(
280
+ jsonString,
281
+ (x) => InputMessage$inboundSchema.parse(JSON.parse(x)),
282
+ `Failed to parse 'InputMessage' from JSON`,
283
+ );
284
+ }
285
+
286
+ /** @internal */
287
+ export const ToolApprovalRequired$inboundSchema: z.ZodNativeEnum<
288
+ typeof ToolApprovalRequired
289
+ > = z.nativeEnum(ToolApprovalRequired);
290
+
291
+ /** @internal */
292
+ export const AgentStartedStreamingEventConditions$inboundSchema: z.ZodType<
293
+ AgentStartedStreamingEventConditions,
294
+ z.ZodTypeDef,
295
+ unknown
296
+ > = z.object({
297
+ condition: z.string(),
298
+ operator: z.string(),
299
+ value: z.string(),
300
+ });
301
+
302
+ export function agentStartedStreamingEventConditionsFromJSON(
303
+ jsonString: string,
304
+ ): SafeParseResult<AgentStartedStreamingEventConditions, SDKValidationError> {
305
+ return safeParse(
306
+ jsonString,
307
+ (x) =>
308
+ AgentStartedStreamingEventConditions$inboundSchema.parse(JSON.parse(x)),
309
+ `Failed to parse 'AgentStartedStreamingEventConditions' from JSON`,
310
+ );
311
+ }
312
+
313
+ /** @internal */
314
+ export const Tools$inboundSchema: z.ZodType<Tools, z.ZodTypeDef, unknown> = z
315
+ .object({
316
+ id: z.string(),
317
+ key: z.string().optional(),
318
+ action_type: z.string(),
319
+ display_name: z.string().optional(),
320
+ description: z.string().optional(),
321
+ requires_approval: z.boolean().default(false),
322
+ tool_id: z.string().optional(),
323
+ conditions: z.array(
324
+ z.lazy(() => AgentStartedStreamingEventConditions$inboundSchema),
325
+ ).optional(),
326
+ timeout: z.number().default(120),
327
+ }).transform((v) => {
328
+ return remap$(v, {
329
+ "action_type": "actionType",
330
+ "display_name": "displayName",
331
+ "requires_approval": "requiresApproval",
332
+ "tool_id": "toolId",
333
+ });
334
+ });
335
+
336
+ export function toolsFromJSON(
337
+ jsonString: string,
338
+ ): SafeParseResult<Tools, SDKValidationError> {
339
+ return safeParse(
340
+ jsonString,
341
+ (x) => Tools$inboundSchema.parse(JSON.parse(x)),
342
+ `Failed to parse 'Tools' from JSON`,
343
+ );
344
+ }
345
+
346
+ /** @internal */
347
+ export const ExecuteOn$inboundSchema: z.ZodNativeEnum<typeof ExecuteOn> = z
348
+ .nativeEnum(ExecuteOn);
349
+
350
+ /** @internal */
351
+ export const Evaluators$inboundSchema: z.ZodType<
352
+ Evaluators,
353
+ z.ZodTypeDef,
354
+ unknown
355
+ > = z.object({
356
+ id: z.string(),
357
+ sample_rate: z.number().default(50),
358
+ execute_on: ExecuteOn$inboundSchema,
359
+ }).transform((v) => {
360
+ return remap$(v, {
361
+ "sample_rate": "sampleRate",
362
+ "execute_on": "executeOn",
363
+ });
364
+ });
365
+
366
+ export function evaluatorsFromJSON(
367
+ jsonString: string,
368
+ ): SafeParseResult<Evaluators, SDKValidationError> {
369
+ return safeParse(
370
+ jsonString,
371
+ (x) => Evaluators$inboundSchema.parse(JSON.parse(x)),
372
+ `Failed to parse 'Evaluators' from JSON`,
373
+ );
374
+ }
375
+
376
+ /** @internal */
377
+ export const AgentStartedStreamingEventExecuteOn$inboundSchema: z.ZodNativeEnum<
378
+ typeof AgentStartedStreamingEventExecuteOn
379
+ > = z.nativeEnum(AgentStartedStreamingEventExecuteOn);
380
+
381
+ /** @internal */
382
+ export const Guardrails$inboundSchema: z.ZodType<
383
+ Guardrails,
384
+ z.ZodTypeDef,
385
+ unknown
386
+ > = z.object({
387
+ id: z.string(),
388
+ sample_rate: z.number().default(50),
389
+ execute_on: AgentStartedStreamingEventExecuteOn$inboundSchema,
390
+ }).transform((v) => {
391
+ return remap$(v, {
392
+ "sample_rate": "sampleRate",
393
+ "execute_on": "executeOn",
394
+ });
395
+ });
396
+
397
+ export function guardrailsFromJSON(
398
+ jsonString: string,
399
+ ): SafeParseResult<Guardrails, SDKValidationError> {
400
+ return safeParse(
401
+ jsonString,
402
+ (x) => Guardrails$inboundSchema.parse(JSON.parse(x)),
403
+ `Failed to parse 'Guardrails' from JSON`,
404
+ );
405
+ }
406
+
407
+ /** @internal */
408
+ export const Settings$inboundSchema: z.ZodType<
409
+ Settings,
410
+ z.ZodTypeDef,
411
+ unknown
412
+ > = z.object({
413
+ max_iterations: z.number().int().default(100),
414
+ max_execution_time: z.number().int().default(600),
415
+ max_cost: z.number().default(0),
416
+ tool_approval_required: ToolApprovalRequired$inboundSchema.default(
417
+ "respect_tool",
418
+ ),
419
+ tools: z.array(z.lazy(() => Tools$inboundSchema)).optional(),
420
+ evaluators: z.array(z.lazy(() => Evaluators$inboundSchema)).optional(),
421
+ guardrails: z.array(z.lazy(() => Guardrails$inboundSchema)).optional(),
422
+ }).transform((v) => {
423
+ return remap$(v, {
424
+ "max_iterations": "maxIterations",
425
+ "max_execution_time": "maxExecutionTime",
426
+ "max_cost": "maxCost",
427
+ "tool_approval_required": "toolApprovalRequired",
428
+ });
429
+ });
430
+
431
+ export function settingsFromJSON(
432
+ jsonString: string,
433
+ ): SafeParseResult<Settings, SDKValidationError> {
434
+ return safeParse(
435
+ jsonString,
436
+ (x) => Settings$inboundSchema.parse(JSON.parse(x)),
437
+ `Failed to parse 'Settings' from JSON`,
438
+ );
439
+ }
440
+
441
+ /** @internal */
442
+ export const AgentStartedStreamingEventData$inboundSchema: z.ZodType<
443
+ AgentStartedStreamingEventData,
444
+ z.ZodTypeDef,
445
+ unknown
446
+ > = z.object({
447
+ workflowRunId: z.string(),
448
+ integration_id: z.string().optional(),
449
+ inputMessage: z.lazy(() => InputMessage$inboundSchema),
450
+ modelId: z.string(),
451
+ instructions: z.string(),
452
+ system_prompt: z.string(),
453
+ settings: z.lazy(() => Settings$inboundSchema).optional(),
454
+ agent_manifest_id: z.string(),
455
+ agent_key: z.string(),
456
+ agent_description: z.nullable(z.string()).optional(),
457
+ variables: z.record(z.any()).optional(),
458
+ tool_execution_id: z.string().optional(),
459
+ is_continuation: z.boolean().optional(),
460
+ stream: z.boolean().optional(),
461
+ responseId: z.string().optional(),
462
+ }).transform((v) => {
463
+ return remap$(v, {
464
+ "integration_id": "integrationId",
465
+ "system_prompt": "systemPrompt",
466
+ "agent_manifest_id": "agentManifestId",
467
+ "agent_key": "agentKey",
468
+ "agent_description": "agentDescription",
469
+ "tool_execution_id": "toolExecutionId",
470
+ "is_continuation": "isContinuation",
471
+ });
472
+ });
473
+
474
+ export function agentStartedStreamingEventDataFromJSON(
475
+ jsonString: string,
476
+ ): SafeParseResult<AgentStartedStreamingEventData, SDKValidationError> {
477
+ return safeParse(
478
+ jsonString,
479
+ (x) => AgentStartedStreamingEventData$inboundSchema.parse(JSON.parse(x)),
480
+ `Failed to parse 'AgentStartedStreamingEventData' from JSON`,
481
+ );
482
+ }
483
+
484
+ /** @internal */
485
+ export const AgentStartedStreamingEvent$inboundSchema: z.ZodType<
486
+ AgentStartedStreamingEvent,
487
+ z.ZodTypeDef,
488
+ unknown
489
+ > = z.object({
490
+ type: z.literal("event.agents.started"),
491
+ timestamp: z.string(),
492
+ data: z.lazy(() => AgentStartedStreamingEventData$inboundSchema),
493
+ });
494
+
495
+ export function agentStartedStreamingEventFromJSON(
496
+ jsonString: string,
497
+ ): SafeParseResult<AgentStartedStreamingEvent, SDKValidationError> {
498
+ return safeParse(
499
+ jsonString,
500
+ (x) => AgentStartedStreamingEvent$inboundSchema.parse(JSON.parse(x)),
501
+ `Failed to parse 'AgentStartedStreamingEvent' from JSON`,
502
+ );
503
+ }