@orq-ai/node 4.2.3 → 4.3.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (492) hide show
  1. package/examples/package-lock.json +4 -7
  2. package/jsr.json +1 -1
  3. package/lib/config.d.ts +2 -2
  4. package/lib/config.js +2 -2
  5. package/lib/config.js.map +1 -1
  6. package/models/components/conversationresponse.js +1 -1
  7. package/models/components/conversationwithmessagesresponse.js +1 -1
  8. package/models/components/partdoneevent.js +1 -1
  9. package/models/components/reasoningpart.js +1 -1
  10. package/models/operations/createcontact.js +1 -1
  11. package/models/operations/createconversation.js +1 -1
  12. package/models/operations/createconversationresponse.js +2 -2
  13. package/models/operations/createdataset.js +1 -1
  14. package/models/operations/createdatasetitem.js +4 -4
  15. package/models/operations/createdatasource.js +1 -1
  16. package/models/operations/createeval.js +14 -14
  17. package/models/operations/createidentity.js +1 -1
  18. package/models/operations/createtool.js +6 -6
  19. package/models/operations/fileget.js +1 -1
  20. package/models/operations/filelist.js +1 -1
  21. package/models/operations/fileupload.js +1 -1
  22. package/models/operations/generateconversationname.js +1 -1
  23. package/models/operations/getalltools.js +6 -6
  24. package/models/operations/getevals.js +14 -14
  25. package/models/operations/listdatasetdatapoints.js +4 -4
  26. package/models/operations/listdatasets.js +1 -1
  27. package/models/operations/listdatasources.js +1 -1
  28. package/models/operations/listidentities.js +1 -1
  29. package/models/operations/retrievedatapoint.js +4 -4
  30. package/models/operations/retrievedataset.js +1 -1
  31. package/models/operations/retrievedatasource.js +1 -1
  32. package/models/operations/retrieveidentity.js +1 -1
  33. package/models/operations/retrievetool.js +6 -6
  34. package/models/operations/runagent.js +1 -1
  35. package/models/operations/streamrunagent.js +1 -1
  36. package/models/operations/updateconversation.js +1 -1
  37. package/models/operations/updatedatapoint.js +4 -4
  38. package/models/operations/updatedataset.js +1 -1
  39. package/models/operations/updatedatasource.js +1 -1
  40. package/models/operations/updateeval.js +14 -14
  41. package/models/operations/updateidentity.js +1 -1
  42. package/models/operations/updatetool.js +7 -7
  43. package/package.json +4 -3
  44. package/src/lib/config.ts +2 -2
  45. package/src/models/components/conversationresponse.ts +1 -1
  46. package/src/models/components/conversationwithmessagesresponse.ts +1 -1
  47. package/src/models/components/partdoneevent.ts +1 -1
  48. package/src/models/components/reasoningpart.ts +1 -1
  49. package/src/models/operations/createcontact.ts +1 -1
  50. package/src/models/operations/createconversation.ts +1 -1
  51. package/src/models/operations/createconversationresponse.ts +2 -2
  52. package/src/models/operations/createdataset.ts +1 -1
  53. package/src/models/operations/createdatasetitem.ts +4 -4
  54. package/src/models/operations/createdatasource.ts +1 -1
  55. package/src/models/operations/createeval.ts +14 -14
  56. package/src/models/operations/createidentity.ts +1 -1
  57. package/src/models/operations/createtool.ts +6 -6
  58. package/src/models/operations/fileget.ts +1 -1
  59. package/src/models/operations/filelist.ts +1 -1
  60. package/src/models/operations/fileupload.ts +1 -1
  61. package/src/models/operations/generateconversationname.ts +1 -1
  62. package/src/models/operations/getalltools.ts +6 -6
  63. package/src/models/operations/getevals.ts +14 -14
  64. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  65. package/src/models/operations/listdatasets.ts +1 -1
  66. package/src/models/operations/listdatasources.ts +1 -1
  67. package/src/models/operations/listidentities.ts +1 -1
  68. package/src/models/operations/retrievedatapoint.ts +4 -4
  69. package/src/models/operations/retrievedataset.ts +1 -1
  70. package/src/models/operations/retrievedatasource.ts +1 -1
  71. package/src/models/operations/retrieveidentity.ts +1 -1
  72. package/src/models/operations/retrievetool.ts +6 -6
  73. package/src/models/operations/runagent.ts +1 -1
  74. package/src/models/operations/streamrunagent.ts +1 -1
  75. package/src/models/operations/updateconversation.ts +1 -1
  76. package/src/models/operations/updatedatapoint.ts +4 -4
  77. package/src/models/operations/updatedataset.ts +1 -1
  78. package/src/models/operations/updatedatasource.ts +1 -1
  79. package/src/models/operations/updateeval.ts +14 -14
  80. package/src/models/operations/updateidentity.ts +1 -1
  81. package/src/models/operations/updatetool.ts +7 -7
  82. package/_speakeasy/.github/action-inputs-config.json +0 -53
  83. package/_speakeasy/.github/action-security-config.json +0 -88
  84. package/packages/orq-rc/examples/feedbackCreate.example.ts +0 -32
  85. package/packages/orq-rc/examples/package-lock.json +0 -610
  86. package/packages/orq-rc/examples/package.json +0 -18
  87. package/packages/orq-rc/jsr.json +0 -28
  88. package/packages/orq-rc/package-lock.json +0 -1724
  89. package/packages/orq-rc/package.json +0 -30
  90. package/packages/orq-rc/src/core.ts +0 -13
  91. package/packages/orq-rc/src/funcs/agentsCreate.ts +0 -161
  92. package/packages/orq-rc/src/funcs/agentsDelete.ts +0 -180
  93. package/packages/orq-rc/src/funcs/agentsInvoke.ts +0 -177
  94. package/packages/orq-rc/src/funcs/agentsList.ts +0 -179
  95. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +0 -183
  96. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +0 -180
  97. package/packages/orq-rc/src/funcs/agentsRun.ts +0 -162
  98. package/packages/orq-rc/src/funcs/agentsStream.ts +0 -201
  99. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +0 -186
  100. package/packages/orq-rc/src/funcs/agentsUpdate.ts +0 -184
  101. package/packages/orq-rc/src/funcs/chunkingParse.ts +0 -160
  102. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -167
  103. package/packages/orq-rc/src/funcs/contactsDelete.ts +0 -178
  104. package/packages/orq-rc/src/funcs/contactsList.ts +0 -172
  105. package/packages/orq-rc/src/funcs/contactsRetrieve.ts +0 -177
  106. package/packages/orq-rc/src/funcs/contactsUpdate.ts +0 -178
  107. package/packages/orq-rc/src/funcs/conversationsCreate.ts +0 -161
  108. package/packages/orq-rc/src/funcs/conversationsCreateConversationResponse.ts +0 -186
  109. package/packages/orq-rc/src/funcs/conversationsDelete.ts +0 -180
  110. package/packages/orq-rc/src/funcs/conversationsGenerateName.ts +0 -194
  111. package/packages/orq-rc/src/funcs/conversationsList.ts +0 -186
  112. package/packages/orq-rc/src/funcs/conversationsRetrieve.ts +0 -181
  113. package/packages/orq-rc/src/funcs/conversationsUpdate.ts +0 -184
  114. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -167
  115. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -165
  116. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -171
  117. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -167
  118. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -182
  119. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -167
  120. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -174
  121. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -175
  122. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -181
  123. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -176
  124. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -179
  125. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -168
  126. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -176
  127. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -176
  128. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -168
  129. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -183
  130. package/packages/orq-rc/src/funcs/evalsAll.ts +0 -173
  131. package/packages/orq-rc/src/funcs/evalsCreate.ts +0 -169
  132. package/packages/orq-rc/src/funcs/evalsDelete.ts +0 -173
  133. package/packages/orq-rc/src/funcs/evalsInvoke.ts +0 -177
  134. package/packages/orq-rc/src/funcs/evalsUpdate.ts +0 -173
  135. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +0 -183
  136. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -160
  137. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -187
  138. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -164
  139. package/packages/orq-rc/src/funcs/filesGet.ts +0 -166
  140. package/packages/orq-rc/src/funcs/filesList.ts +0 -167
  141. package/packages/orq-rc/src/funcs/identitiesCreate.ts +0 -165
  142. package/packages/orq-rc/src/funcs/identitiesDelete.ts +0 -176
  143. package/packages/orq-rc/src/funcs/identitiesList.ts +0 -170
  144. package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +0 -175
  145. package/packages/orq-rc/src/funcs/identitiesUpdate.ts +0 -176
  146. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +0 -158
  147. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -171
  148. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -166
  149. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -167
  150. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -174
  151. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +0 -170
  152. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -173
  153. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +0 -170
  154. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -169
  155. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -178
  156. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +0 -171
  157. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -174
  158. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -166
  159. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -173
  160. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -169
  161. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -167
  162. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -164
  163. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -174
  164. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -170
  165. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +0 -162
  166. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +0 -176
  167. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +0 -170
  168. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +0 -168
  169. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +0 -185
  170. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +0 -180
  171. package/packages/orq-rc/src/funcs/memoryStoresList.ts +0 -178
  172. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +0 -184
  173. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +0 -177
  174. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +0 -177
  175. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +0 -179
  176. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +0 -174
  177. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +0 -168
  178. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +0 -180
  179. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +0 -175
  180. package/packages/orq-rc/src/funcs/modelsList.ts +0 -142
  181. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -160
  182. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -173
  183. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -181
  184. package/packages/orq-rc/src/funcs/promptsList.ts +0 -167
  185. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -173
  186. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -166
  187. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -173
  188. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -161
  189. package/packages/orq-rc/src/funcs/routerAudioSpeechCreate.ts +0 -161
  190. package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +0 -231
  191. package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +0 -221
  192. package/packages/orq-rc/src/funcs/routerChatCompletionsCreate.ts +0 -168
  193. package/packages/orq-rc/src/funcs/routerCompletionsCreate.ts +0 -168
  194. package/packages/orq-rc/src/funcs/routerEmbeddingsCreate.ts +0 -161
  195. package/packages/orq-rc/src/funcs/routerImagesEditsCreate.ts +0 -184
  196. package/packages/orq-rc/src/funcs/routerImagesGenerationsCreate.ts +0 -160
  197. package/packages/orq-rc/src/funcs/routerImagesVariationsCreate.ts +0 -180
  198. package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +0 -167
  199. package/packages/orq-rc/src/funcs/routerOcr.ts +0 -158
  200. package/packages/orq-rc/src/funcs/routerRerankCreate.ts +0 -160
  201. package/packages/orq-rc/src/funcs/routerResponsesCreate.ts +0 -167
  202. package/packages/orq-rc/src/funcs/toolsCreate.ts +0 -163
  203. package/packages/orq-rc/src/funcs/toolsDelete.ts +0 -167
  204. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +0 -183
  205. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +0 -190
  206. package/packages/orq-rc/src/funcs/toolsList.ts +0 -176
  207. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +0 -166
  208. package/packages/orq-rc/src/funcs/toolsUpdate.ts +0 -176
  209. package/packages/orq-rc/src/hooks/global.ts +0 -44
  210. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  211. package/packages/orq-rc/src/hooks/index.ts +0 -6
  212. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  213. package/packages/orq-rc/src/hooks/types.ts +0 -112
  214. package/packages/orq-rc/src/index.ts +0 -9
  215. package/packages/orq-rc/src/lib/base64.ts +0 -37
  216. package/packages/orq-rc/src/lib/config.ts +0 -74
  217. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  218. package/packages/orq-rc/src/lib/encodings.ts +0 -497
  219. package/packages/orq-rc/src/lib/env.ts +0 -89
  220. package/packages/orq-rc/src/lib/event-streams.ts +0 -135
  221. package/packages/orq-rc/src/lib/files.ts +0 -82
  222. package/packages/orq-rc/src/lib/http.ts +0 -323
  223. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  224. package/packages/orq-rc/src/lib/logger.ts +0 -9
  225. package/packages/orq-rc/src/lib/matchers.ts +0 -345
  226. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  227. package/packages/orq-rc/src/lib/retries.ts +0 -218
  228. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  229. package/packages/orq-rc/src/lib/sdks.ts +0 -407
  230. package/packages/orq-rc/src/lib/security.ts +0 -264
  231. package/packages/orq-rc/src/lib/url.ts +0 -33
  232. package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +0 -99
  233. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +0 -185
  234. package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +0 -73
  235. package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +0 -91
  236. package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +0 -71
  237. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +0 -507
  238. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +0 -165
  239. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +0 -103
  240. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +0 -494
  241. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +0 -807
  242. package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +0 -136
  243. package/packages/orq-rc/src/models/components/conversationresponse.ts +0 -132
  244. package/packages/orq-rc/src/models/components/conversationwithmessagesresponse.ts +0 -149
  245. package/packages/orq-rc/src/models/components/createagentresponse.ts +0 -299
  246. package/packages/orq-rc/src/models/components/datapart.ts +0 -38
  247. package/packages/orq-rc/src/models/components/errorpart.ts +0 -58
  248. package/packages/orq-rc/src/models/components/errorstreamingevent.ts +0 -66
  249. package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +0 -71
  250. package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +0 -61
  251. package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +0 -67
  252. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +0 -87
  253. package/packages/orq-rc/src/models/components/filepart.ts +0 -218
  254. package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +0 -268
  255. package/packages/orq-rc/src/models/components/index.ts +0 -59
  256. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +0 -3446
  257. package/packages/orq-rc/src/models/components/messageresponse.ts +0 -127
  258. package/packages/orq-rc/src/models/components/partdelta.ts +0 -39
  259. package/packages/orq-rc/src/models/components/partdeltaevent.ts +0 -73
  260. package/packages/orq-rc/src/models/components/partdoneevent.ts +0 -139
  261. package/packages/orq-rc/src/models/components/publiccontact.ts +0 -69
  262. package/packages/orq-rc/src/models/components/reasoningpart.ts +0 -62
  263. package/packages/orq-rc/src/models/components/reasoningpartschema.ts +0 -71
  264. package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +0 -66
  265. package/packages/orq-rc/src/models/components/refusalpartschema.ts +0 -64
  266. package/packages/orq-rc/src/models/components/responsedoneevent.ts +0 -318
  267. package/packages/orq-rc/src/models/components/responsefailedevent.ts +0 -72
  268. package/packages/orq-rc/src/models/components/responsestartedevent.ts +0 -91
  269. package/packages/orq-rc/src/models/components/responsestreamingevent.ts +0 -85
  270. package/packages/orq-rc/src/models/components/reviewoutcome.ts +0 -23
  271. package/packages/orq-rc/src/models/components/security.ts +0 -32
  272. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +0 -207
  273. package/packages/orq-rc/src/models/components/textpart.ts +0 -54
  274. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +0 -59
  275. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +0 -106
  276. package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +0 -64
  277. package/packages/orq-rc/src/models/components/toolcallpart.ts +0 -51
  278. package/packages/orq-rc/src/models/components/tooldoneevent.ts +0 -77
  279. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +0 -230
  280. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +0 -214
  281. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +0 -197
  282. package/packages/orq-rc/src/models/components/toolfailedevent.ts +0 -77
  283. package/packages/orq-rc/src/models/components/toolresultpart.ts +0 -71
  284. package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +0 -78
  285. package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +0 -87
  286. package/packages/orq-rc/src/models/components/toolstartedevent.ts +0 -82
  287. package/packages/orq-rc/src/models/components/usermessagerequest.ts +0 -136
  288. package/packages/orq-rc/src/models/errors/apierror.ts +0 -40
  289. package/packages/orq-rc/src/models/errors/createeval.ts +0 -51
  290. package/packages/orq-rc/src/models/errors/createmoderation.ts +0 -84
  291. package/packages/orq-rc/src/models/errors/createtranscription.ts +0 -87
  292. package/packages/orq-rc/src/models/errors/createtranslation.ts +0 -87
  293. package/packages/orq-rc/src/models/errors/deleteagent.ts +0 -51
  294. package/packages/orq-rc/src/models/errors/deletecontact.ts +0 -62
  295. package/packages/orq-rc/src/models/errors/deleteconversation.ts +0 -51
  296. package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -51
  297. package/packages/orq-rc/src/models/errors/deleteidentity.ts +0 -62
  298. package/packages/orq-rc/src/models/errors/deleteprompt.ts +0 -51
  299. package/packages/orq-rc/src/models/errors/generateconversationname.ts +0 -99
  300. package/packages/orq-rc/src/models/errors/getevals.ts +0 -51
  301. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -51
  302. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +0 -51
  303. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +0 -51
  304. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +0 -52
  305. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -59
  306. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  307. package/packages/orq-rc/src/models/errors/index.ts +0 -40
  308. package/packages/orq-rc/src/models/errors/invokeeval.ts +0 -96
  309. package/packages/orq-rc/src/models/errors/orqerror.ts +0 -35
  310. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +0 -50
  311. package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +0 -51
  312. package/packages/orq-rc/src/models/errors/retrievecontact.ts +0 -62
  313. package/packages/orq-rc/src/models/errors/retrieveconversation.ts +0 -51
  314. package/packages/orq-rc/src/models/errors/retrieveidentity.ts +0 -62
  315. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -109
  316. package/packages/orq-rc/src/models/errors/streamagent.ts +0 -51
  317. package/packages/orq-rc/src/models/errors/streamrunagent.ts +0 -51
  318. package/packages/orq-rc/src/models/errors/updateagent.ts +0 -51
  319. package/packages/orq-rc/src/models/errors/updatecontact.ts +0 -54
  320. package/packages/orq-rc/src/models/errors/updateconversation.ts +0 -51
  321. package/packages/orq-rc/src/models/errors/updateeval.ts +0 -51
  322. package/packages/orq-rc/src/models/errors/updateidentity.ts +0 -54
  323. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -51
  324. package/packages/orq-rc/src/models/errors/updatetool.ts +0 -62
  325. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -39
  326. package/packages/orq-rc/src/models/operations/createagentrequest.ts +0 -7010
  327. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +0 -609
  328. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +0 -6442
  329. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -222
  330. package/packages/orq-rc/src/models/operations/createcompletion.ts +0 -3142
  331. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -162
  332. package/packages/orq-rc/src/models/operations/createconversation.ts +0 -227
  333. package/packages/orq-rc/src/models/operations/createconversationresponse.ts +0 -498
  334. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -162
  335. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -2551
  336. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -437
  337. package/packages/orq-rc/src/models/operations/createembedding.ts +0 -681
  338. package/packages/orq-rc/src/models/operations/createeval.ts +0 -3128
  339. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -144
  340. package/packages/orq-rc/src/models/operations/createidentity.ts +0 -162
  341. package/packages/orq-rc/src/models/operations/createimage.ts +0 -755
  342. package/packages/orq-rc/src/models/operations/createimageedit.ts +0 -776
  343. package/packages/orq-rc/src/models/operations/createimagevariation.ts +0 -783
  344. package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -944
  345. package/packages/orq-rc/src/models/operations/creatememory.ts +0 -142
  346. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +0 -152
  347. package/packages/orq-rc/src/models/operations/creatememorystore.ts +0 -199
  348. package/packages/orq-rc/src/models/operations/createmoderation.ts +0 -664
  349. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -5388
  350. package/packages/orq-rc/src/models/operations/creatererank.ts +0 -639
  351. package/packages/orq-rc/src/models/operations/createresponse.ts +0 -3294
  352. package/packages/orq-rc/src/models/operations/createspeech.ts +0 -492
  353. package/packages/orq-rc/src/models/operations/createtool.ts +0 -2499
  354. package/packages/orq-rc/src/models/operations/createtranscription.ts +0 -722
  355. package/packages/orq-rc/src/models/operations/createtranslation.ts +0 -702
  356. package/packages/orq-rc/src/models/operations/deleteagent.ts +0 -39
  357. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -53
  358. package/packages/orq-rc/src/models/operations/deletechunks.ts +0 -125
  359. package/packages/orq-rc/src/models/operations/deletecontact.ts +0 -34
  360. package/packages/orq-rc/src/models/operations/deleteconversation.ts +0 -39
  361. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -46
  362. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -39
  363. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -46
  364. package/packages/orq-rc/src/models/operations/deleteeval.ts +0 -31
  365. package/packages/orq-rc/src/models/operations/deleteidentity.ts +0 -34
  366. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -39
  367. package/packages/orq-rc/src/models/operations/deletememory.ts +0 -46
  368. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +0 -55
  369. package/packages/orq-rc/src/models/operations/deletememorystore.ts +0 -39
  370. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -34
  371. package/packages/orq-rc/src/models/operations/deletetool.ts +0 -36
  372. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -2370
  373. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -4519
  374. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -688
  375. package/packages/orq-rc/src/models/operations/deployments.ts +0 -1266
  376. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -4606
  377. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -39
  378. package/packages/orq-rc/src/models/operations/fileget.ts +0 -116
  379. package/packages/orq-rc/src/models/operations/filelist.ts +0 -172
  380. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -170
  381. package/packages/orq-rc/src/models/operations/generateconversationname.ts +0 -207
  382. package/packages/orq-rc/src/models/operations/getallmemories.ts +0 -173
  383. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +0 -188
  384. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +0 -200
  385. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -3157
  386. package/packages/orq-rc/src/models/operations/getalltools.ts +0 -1398
  387. package/packages/orq-rc/src/models/operations/getchunkscount.ts +0 -121
  388. package/packages/orq-rc/src/models/operations/getevals.ts +0 -2334
  389. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -171
  390. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -652
  391. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -3082
  392. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -3127
  393. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +0 -162
  394. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +0 -163
  395. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +0 -110
  396. package/packages/orq-rc/src/models/operations/index.ts +0 -122
  397. package/packages/orq-rc/src/models/operations/invokeagent.ts +0 -733
  398. package/packages/orq-rc/src/models/operations/invokeeval.ts +0 -1096
  399. package/packages/orq-rc/src/models/operations/listagents.ts +0 -3002
  400. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -260
  401. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +0 -263
  402. package/packages/orq-rc/src/models/operations/listcontacts.ts +0 -274
  403. package/packages/orq-rc/src/models/operations/listconversations.ts +0 -104
  404. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -1498
  405. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -205
  406. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -235
  407. package/packages/orq-rc/src/models/operations/listidentities.ts +0 -275
  408. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -642
  409. package/packages/orq-rc/src/models/operations/listmodels.ts +0 -143
  410. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -3202
  411. package/packages/orq-rc/src/models/operations/parse.ts +0 -777
  412. package/packages/orq-rc/src/models/operations/postv2routerocr.ts +0 -478
  413. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -108
  414. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +0 -3088
  415. package/packages/orq-rc/src/models/operations/retrievecontact.ts +0 -117
  416. package/packages/orq-rc/src/models/operations/retrieveconversation.ts +0 -41
  417. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -1402
  418. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -150
  419. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -152
  420. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +0 -117
  421. package/packages/orq-rc/src/models/operations/retrievememory.ts +0 -112
  422. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +0 -118
  423. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +0 -144
  424. package/packages/orq-rc/src/models/operations/retrievetool.ts +0 -1379
  425. package/packages/orq-rc/src/models/operations/runagent.ts +0 -5332
  426. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -1762
  427. package/packages/orq-rc/src/models/operations/streamagent.ts +0 -629
  428. package/packages/orq-rc/src/models/operations/streamrunagent.ts +0 -5527
  429. package/packages/orq-rc/src/models/operations/updateagent.ts +0 -7362
  430. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -236
  431. package/packages/orq-rc/src/models/operations/updatecontact.ts +0 -188
  432. package/packages/orq-rc/src/models/operations/updateconversation.ts +0 -252
  433. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -2555
  434. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -206
  435. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -186
  436. package/packages/orq-rc/src/models/operations/updateeval.ts +0 -3303
  437. package/packages/orq-rc/src/models/operations/updateidentity.ts +0 -189
  438. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -1231
  439. package/packages/orq-rc/src/models/operations/updatememory.ts +0 -142
  440. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +0 -159
  441. package/packages/orq-rc/src/models/operations/updatememorystore.ts +0 -244
  442. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -5459
  443. package/packages/orq-rc/src/models/operations/updatetool.ts +0 -2696
  444. package/packages/orq-rc/src/sdk/agents.ts +0 -196
  445. package/packages/orq-rc/src/sdk/audio.ts +0 -25
  446. package/packages/orq-rc/src/sdk/chat.ts +0 -13
  447. package/packages/orq-rc/src/sdk/chunking.ts +0 -27
  448. package/packages/orq-rc/src/sdk/completions.ts +0 -32
  449. package/packages/orq-rc/src/sdk/contacts.ts +0 -109
  450. package/packages/orq-rc/src/sdk/conversations.ts +0 -147
  451. package/packages/orq-rc/src/sdk/datasets.ts +0 -204
  452. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  453. package/packages/orq-rc/src/sdk/edits.ts +0 -27
  454. package/packages/orq-rc/src/sdk/embeddings.ts +0 -27
  455. package/packages/orq-rc/src/sdk/evals.ts +0 -84
  456. package/packages/orq-rc/src/sdk/evaluators.ts +0 -27
  457. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  458. package/packages/orq-rc/src/sdk/files.ts +0 -78
  459. package/packages/orq-rc/src/sdk/generations.ts +0 -27
  460. package/packages/orq-rc/src/sdk/identities.ts +0 -99
  461. package/packages/orq-rc/src/sdk/images.ts +0 -25
  462. package/packages/orq-rc/src/sdk/index.ts +0 -5
  463. package/packages/orq-rc/src/sdk/internal.ts +0 -28
  464. package/packages/orq-rc/src/sdk/knowledge.ts +0 -309
  465. package/packages/orq-rc/src/sdk/memorystores.ts +0 -286
  466. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  467. package/packages/orq-rc/src/sdk/models.ts +0 -25
  468. package/packages/orq-rc/src/sdk/moderations.ts +0 -24
  469. package/packages/orq-rc/src/sdk/orqcompletions.ts +0 -32
  470. package/packages/orq-rc/src/sdk/orqresponses.ts +0 -32
  471. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  472. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  473. package/packages/orq-rc/src/sdk/rerank.ts +0 -27
  474. package/packages/orq-rc/src/sdk/responses.ts +0 -34
  475. package/packages/orq-rc/src/sdk/router.ts +0 -72
  476. package/packages/orq-rc/src/sdk/sdk.ts +0 -121
  477. package/packages/orq-rc/src/sdk/speech.ts +0 -27
  478. package/packages/orq-rc/src/sdk/tools.ts +0 -135
  479. package/packages/orq-rc/src/sdk/transcriptions.ts +0 -24
  480. package/packages/orq-rc/src/sdk/translations.ts +0 -24
  481. package/packages/orq-rc/src/sdk/variations.ts +0 -27
  482. package/packages/orq-rc/src/types/async.ts +0 -68
  483. package/packages/orq-rc/src/types/blobs.ts +0 -32
  484. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  485. package/packages/orq-rc/src/types/enums.ts +0 -45
  486. package/packages/orq-rc/src/types/fp.ts +0 -50
  487. package/packages/orq-rc/src/types/index.ts +0 -11
  488. package/packages/orq-rc/src/types/operations.ts +0 -105
  489. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  490. package/packages/orq-rc/src/types/streams.ts +0 -21
  491. package/packages/orq-rc/src/types/unrecognized.ts +0 -35
  492. package/packages/orq-rc/tsconfig.json +0 -40
@@ -1,4606 +0,0 @@
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 DeploymentStreamGlobals = {
14
- environment?: string | undefined;
15
- contactId?: string | undefined;
16
- };
17
-
18
- export type DeploymentStreamContentDeploymentsRequest2 =
19
- components.TextContentPartSchema;
20
-
21
- /**
22
- * The contents of the tool message.
23
- */
24
- export type DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content =
25
- | string
26
- | Array<components.TextContentPartSchema>;
27
-
28
- /**
29
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
30
- */
31
- export const DeploymentStreamPrefixMessagesDeploymentsType = {
32
- Ephemeral: "ephemeral",
33
- } as const;
34
- /**
35
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
36
- */
37
- export type DeploymentStreamPrefixMessagesDeploymentsType = ClosedEnum<
38
- typeof DeploymentStreamPrefixMessagesDeploymentsType
39
- >;
40
-
41
- /**
42
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
43
- *
44
- * @remarks
45
- *
46
- * - `5m`: 5 minutes
47
- * - `1h`: 1 hour
48
- *
49
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
50
- */
51
- export const DeploymentStreamPrefixMessagesTtl = {
52
- Fivem: "5m",
53
- Oneh: "1h",
54
- } as const;
55
- /**
56
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
57
- *
58
- * @remarks
59
- *
60
- * - `5m`: 5 minutes
61
- * - `1h`: 1 hour
62
- *
63
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
64
- */
65
- export type DeploymentStreamPrefixMessagesTtl = ClosedEnum<
66
- typeof DeploymentStreamPrefixMessagesTtl
67
- >;
68
-
69
- export type DeploymentStreamPrefixMessagesCacheControl = {
70
- /**
71
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
72
- */
73
- type: DeploymentStreamPrefixMessagesDeploymentsType;
74
- /**
75
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
76
- *
77
- * @remarks
78
- *
79
- * - `5m`: 5 minutes
80
- * - `1h`: 1 hour
81
- *
82
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
83
- */
84
- ttl?: DeploymentStreamPrefixMessagesTtl | undefined;
85
- };
86
-
87
- export type PrefixMessagesToolMessage = {
88
- /**
89
- * The role of the messages author, in this case tool.
90
- */
91
- role: "tool";
92
- /**
93
- * The contents of the tool message.
94
- */
95
- content: string | Array<components.TextContentPartSchema>;
96
- /**
97
- * Tool call that this message is responding to.
98
- */
99
- toolCallId: string | null;
100
- cacheControl?: DeploymentStreamPrefixMessagesCacheControl | undefined;
101
- };
102
-
103
- export type DeploymentStreamContentDeployments2 =
104
- | (components.TextContentPartSchema & { type: "text" })
105
- | components.RefusalPartSchema
106
- | components.ReasoningPartSchema
107
- | components.RedactedReasoningPartSchema;
108
-
109
- /**
110
- * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
111
- */
112
- export type DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent =
113
- | string
114
- | Array<
115
- | (components.TextContentPartSchema & { type: "text" })
116
- | components.RefusalPartSchema
117
- | components.ReasoningPartSchema
118
- | components.RedactedReasoningPartSchema
119
- >;
120
-
121
- /**
122
- * Data about a previous audio response from the model.
123
- */
124
- export type PrefixMessagesAudio = {
125
- /**
126
- * Unique identifier for a previous audio response from the model.
127
- */
128
- id: string;
129
- };
130
-
131
- /**
132
- * The type of the tool. Currently, only `function` is supported.
133
- */
134
- export const DeploymentStreamPrefixMessagesType = {
135
- Function: "function",
136
- } as const;
137
- /**
138
- * The type of the tool. Currently, only `function` is supported.
139
- */
140
- export type DeploymentStreamPrefixMessagesType = ClosedEnum<
141
- typeof DeploymentStreamPrefixMessagesType
142
- >;
143
-
144
- export type DeploymentStreamPrefixMessagesFunction = {
145
- /**
146
- * The name of the function to call.
147
- */
148
- name?: string | undefined;
149
- /**
150
- * 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.
151
- */
152
- arguments?: string | undefined;
153
- };
154
-
155
- export type DeploymentStreamPrefixMessagesToolCalls = {
156
- /**
157
- * The ID of the tool call.
158
- */
159
- id: string;
160
- /**
161
- * The type of the tool. Currently, only `function` is supported.
162
- */
163
- type: DeploymentStreamPrefixMessagesType;
164
- function: DeploymentStreamPrefixMessagesFunction;
165
- /**
166
- * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
167
- */
168
- thoughtSignature?: string | undefined;
169
- };
170
-
171
- export type PrefixMessagesAssistantMessage = {
172
- /**
173
- * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
174
- */
175
- content?:
176
- | string
177
- | Array<
178
- | (components.TextContentPartSchema & { type: "text" })
179
- | components.RefusalPartSchema
180
- | components.ReasoningPartSchema
181
- | components.RedactedReasoningPartSchema
182
- >
183
- | null
184
- | undefined;
185
- /**
186
- * The refusal message by the assistant.
187
- */
188
- refusal?: string | null | undefined;
189
- /**
190
- * The role of the messages author, in this case `assistant`.
191
- */
192
- role: "assistant";
193
- /**
194
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
195
- */
196
- name?: string | undefined;
197
- /**
198
- * Data about a previous audio response from the model.
199
- */
200
- audio?: PrefixMessagesAudio | null | undefined;
201
- /**
202
- * The tool calls generated by the model, such as function calls.
203
- */
204
- toolCalls?: Array<DeploymentStreamPrefixMessagesToolCalls> | undefined;
205
- };
206
-
207
- /**
208
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
209
- */
210
- export const DeploymentStream2DeploymentsType = {
211
- Ephemeral: "ephemeral",
212
- } as const;
213
- /**
214
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
215
- */
216
- export type DeploymentStream2DeploymentsType = ClosedEnum<
217
- typeof DeploymentStream2DeploymentsType
218
- >;
219
-
220
- /**
221
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
222
- *
223
- * @remarks
224
- *
225
- * - `5m`: 5 minutes
226
- * - `1h`: 1 hour
227
- *
228
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
229
- */
230
- export const DeploymentStream2Ttl = {
231
- Fivem: "5m",
232
- Oneh: "1h",
233
- } as const;
234
- /**
235
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
236
- *
237
- * @remarks
238
- *
239
- * - `5m`: 5 minutes
240
- * - `1h`: 1 hour
241
- *
242
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
243
- */
244
- export type DeploymentStream2Ttl = ClosedEnum<typeof DeploymentStream2Ttl>;
245
-
246
- export type DeploymentStream2CacheControl = {
247
- /**
248
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
249
- */
250
- type: DeploymentStream2DeploymentsType;
251
- /**
252
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
253
- *
254
- * @remarks
255
- *
256
- * - `5m`: 5 minutes
257
- * - `1h`: 1 hour
258
- *
259
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
260
- */
261
- ttl?: DeploymentStream2Ttl | undefined;
262
- };
263
-
264
- export type DeploymentStream24 = {
265
- /**
266
- * The type of the content part. Always `file`.
267
- */
268
- type: "file";
269
- cacheControl?: DeploymentStream2CacheControl | undefined;
270
- /**
271
- * File data for the content part. Must contain either file_data or uri, but not both.
272
- */
273
- file: components.FileContentPartSchema;
274
- };
275
-
276
- export type DeploymentStreamContent2 =
277
- | (components.TextContentPartSchema & { type: "text" })
278
- | components.ImageContentPartSchema
279
- | components.AudioContentPartSchema
280
- | DeploymentStream24;
281
-
282
- /**
283
- * The contents of the user message.
284
- */
285
- export type DeploymentStreamPrefixMessagesDeploymentsRequestContent =
286
- | string
287
- | Array<
288
- | (components.TextContentPartSchema & { type: "text" })
289
- | components.ImageContentPartSchema
290
- | components.AudioContentPartSchema
291
- | DeploymentStream24
292
- >;
293
-
294
- export type PrefixMessagesUserMessage = {
295
- /**
296
- * The role of the messages author, in this case `user`.
297
- */
298
- role: "user";
299
- /**
300
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
301
- */
302
- name?: string | undefined;
303
- /**
304
- * The contents of the user message.
305
- */
306
- content:
307
- | string
308
- | Array<
309
- | (components.TextContentPartSchema & { type: "text" })
310
- | components.ImageContentPartSchema
311
- | components.AudioContentPartSchema
312
- | DeploymentStream24
313
- >;
314
- };
315
-
316
- /**
317
- * The contents of the developer message.
318
- */
319
- export type DeploymentStreamPrefixMessagesDeploymentsContent =
320
- | string
321
- | Array<components.TextContentPartSchema>;
322
-
323
- export type PrefixMessagesDeveloperMessage = {
324
- /**
325
- * The role of the messages author, in this case `developer`.
326
- */
327
- role: "developer";
328
- /**
329
- * The contents of the developer message.
330
- */
331
- content: string | Array<components.TextContentPartSchema>;
332
- /**
333
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
334
- */
335
- name?: string | undefined;
336
- };
337
-
338
- /**
339
- * The contents of the system message.
340
- */
341
- export type DeploymentStreamPrefixMessagesContent =
342
- | string
343
- | Array<components.TextContentPartSchema>;
344
-
345
- /**
346
- * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
347
- */
348
- export type PrefixMessagesSystemMessage = {
349
- /**
350
- * The role of the messages author, in this case `system`.
351
- */
352
- role: "system";
353
- /**
354
- * The contents of the system message.
355
- */
356
- content: string | Array<components.TextContentPartSchema>;
357
- /**
358
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
359
- */
360
- name?: string | undefined;
361
- };
362
-
363
- export type DeploymentStreamPrefixMessages =
364
- | PrefixMessagesSystemMessage
365
- | PrefixMessagesDeveloperMessage
366
- | PrefixMessagesUserMessage
367
- | PrefixMessagesAssistantMessage
368
- | PrefixMessagesToolMessage;
369
-
370
- export type DeploymentStreamContentDeploymentsRequestRequestBodyMessages52 =
371
- components.TextContentPartSchema;
372
-
373
- /**
374
- * The contents of the tool message.
375
- */
376
- export type DeploymentStreamMessagesDeploymentsRequestRequestBody5Content =
377
- | string
378
- | Array<components.TextContentPartSchema>;
379
-
380
- /**
381
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
382
- */
383
- export const DeploymentStreamMessagesDeploymentsType = {
384
- Ephemeral: "ephemeral",
385
- } as const;
386
- /**
387
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
388
- */
389
- export type DeploymentStreamMessagesDeploymentsType = ClosedEnum<
390
- typeof DeploymentStreamMessagesDeploymentsType
391
- >;
392
-
393
- /**
394
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
395
- *
396
- * @remarks
397
- *
398
- * - `5m`: 5 minutes
399
- * - `1h`: 1 hour
400
- *
401
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
402
- */
403
- export const DeploymentStreamMessagesTtl = {
404
- Fivem: "5m",
405
- Oneh: "1h",
406
- } as const;
407
- /**
408
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
409
- *
410
- * @remarks
411
- *
412
- * - `5m`: 5 minutes
413
- * - `1h`: 1 hour
414
- *
415
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
416
- */
417
- export type DeploymentStreamMessagesTtl = ClosedEnum<
418
- typeof DeploymentStreamMessagesTtl
419
- >;
420
-
421
- export type DeploymentStreamMessagesCacheControl = {
422
- /**
423
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
424
- */
425
- type: DeploymentStreamMessagesDeploymentsType;
426
- /**
427
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
428
- *
429
- * @remarks
430
- *
431
- * - `5m`: 5 minutes
432
- * - `1h`: 1 hour
433
- *
434
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
435
- */
436
- ttl?: DeploymentStreamMessagesTtl | undefined;
437
- };
438
-
439
- export type DeploymentStreamMessagesToolMessage = {
440
- /**
441
- * The role of the messages author, in this case tool.
442
- */
443
- role: "tool";
444
- /**
445
- * The contents of the tool message.
446
- */
447
- content: string | Array<components.TextContentPartSchema>;
448
- /**
449
- * Tool call that this message is responding to.
450
- */
451
- toolCallId: string | null;
452
- cacheControl?: DeploymentStreamMessagesCacheControl | undefined;
453
- };
454
-
455
- export type DeploymentStreamContentDeploymentsRequestRequestBodyMessages2 =
456
- | (components.TextContentPartSchema & { type: "text" })
457
- | components.RefusalPartSchema
458
- | components.ReasoningPartSchema
459
- | components.RedactedReasoningPartSchema;
460
-
461
- /**
462
- * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
463
- */
464
- export type DeploymentStreamMessagesDeploymentsRequestRequestBodyContent =
465
- | string
466
- | Array<
467
- | (components.TextContentPartSchema & { type: "text" })
468
- | components.RefusalPartSchema
469
- | components.ReasoningPartSchema
470
- | components.RedactedReasoningPartSchema
471
- >;
472
-
473
- /**
474
- * Data about a previous audio response from the model.
475
- */
476
- export type DeploymentStreamMessagesAudio = {
477
- /**
478
- * Unique identifier for a previous audio response from the model.
479
- */
480
- id: string;
481
- };
482
-
483
- /**
484
- * The type of the tool. Currently, only `function` is supported.
485
- */
486
- export const DeploymentStreamMessagesType = {
487
- Function: "function",
488
- } as const;
489
- /**
490
- * The type of the tool. Currently, only `function` is supported.
491
- */
492
- export type DeploymentStreamMessagesType = ClosedEnum<
493
- typeof DeploymentStreamMessagesType
494
- >;
495
-
496
- export type DeploymentStreamMessagesFunction = {
497
- /**
498
- * The name of the function to call.
499
- */
500
- name?: string | undefined;
501
- /**
502
- * 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.
503
- */
504
- arguments?: string | undefined;
505
- };
506
-
507
- export type DeploymentStreamMessagesToolCalls = {
508
- /**
509
- * The ID of the tool call.
510
- */
511
- id: string;
512
- /**
513
- * The type of the tool. Currently, only `function` is supported.
514
- */
515
- type: DeploymentStreamMessagesType;
516
- function: DeploymentStreamMessagesFunction;
517
- /**
518
- * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
519
- */
520
- thoughtSignature?: string | undefined;
521
- };
522
-
523
- export type DeploymentStreamMessagesAssistantMessage = {
524
- /**
525
- * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
526
- */
527
- content?:
528
- | string
529
- | Array<
530
- | (components.TextContentPartSchema & { type: "text" })
531
- | components.RefusalPartSchema
532
- | components.ReasoningPartSchema
533
- | components.RedactedReasoningPartSchema
534
- >
535
- | null
536
- | undefined;
537
- /**
538
- * The refusal message by the assistant.
539
- */
540
- refusal?: string | null | undefined;
541
- /**
542
- * The role of the messages author, in this case `assistant`.
543
- */
544
- role: "assistant";
545
- /**
546
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
547
- */
548
- name?: string | undefined;
549
- /**
550
- * Data about a previous audio response from the model.
551
- */
552
- audio?: DeploymentStreamMessagesAudio | null | undefined;
553
- /**
554
- * The tool calls generated by the model, such as function calls.
555
- */
556
- toolCalls?: Array<DeploymentStreamMessagesToolCalls> | undefined;
557
- };
558
-
559
- /**
560
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
561
- */
562
- export const DeploymentStream2DeploymentsRequestRequestBodyType = {
563
- Ephemeral: "ephemeral",
564
- } as const;
565
- /**
566
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
567
- */
568
- export type DeploymentStream2DeploymentsRequestRequestBodyType = ClosedEnum<
569
- typeof DeploymentStream2DeploymentsRequestRequestBodyType
570
- >;
571
-
572
- /**
573
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
574
- *
575
- * @remarks
576
- *
577
- * - `5m`: 5 minutes
578
- * - `1h`: 1 hour
579
- *
580
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
581
- */
582
- export const DeploymentStream2DeploymentsTtl = {
583
- Fivem: "5m",
584
- Oneh: "1h",
585
- } as const;
586
- /**
587
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
588
- *
589
- * @remarks
590
- *
591
- * - `5m`: 5 minutes
592
- * - `1h`: 1 hour
593
- *
594
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
595
- */
596
- export type DeploymentStream2DeploymentsTtl = ClosedEnum<
597
- typeof DeploymentStream2DeploymentsTtl
598
- >;
599
-
600
- export type DeploymentStream2DeploymentsCacheControl = {
601
- /**
602
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
603
- */
604
- type: DeploymentStream2DeploymentsRequestRequestBodyType;
605
- /**
606
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
607
- *
608
- * @remarks
609
- *
610
- * - `5m`: 5 minutes
611
- * - `1h`: 1 hour
612
- *
613
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
614
- */
615
- ttl?: DeploymentStream2DeploymentsTtl | undefined;
616
- };
617
-
618
- export type DeploymentStream2Deployments4 = {
619
- /**
620
- * The type of the content part. Always `file`.
621
- */
622
- type: "file";
623
- cacheControl?: DeploymentStream2DeploymentsCacheControl | undefined;
624
- /**
625
- * File data for the content part. Must contain either file_data or uri, but not both.
626
- */
627
- file: components.FileContentPartSchema;
628
- };
629
-
630
- export type DeploymentStreamContentDeploymentsRequestRequestBody2 =
631
- | (components.TextContentPartSchema & { type: "text" })
632
- | components.ImageContentPartSchema
633
- | components.AudioContentPartSchema
634
- | DeploymentStream2Deployments4;
635
-
636
- /**
637
- * The contents of the user message.
638
- */
639
- export type DeploymentStreamMessagesDeploymentsRequestContent =
640
- | string
641
- | Array<
642
- | (components.TextContentPartSchema & { type: "text" })
643
- | components.ImageContentPartSchema
644
- | components.AudioContentPartSchema
645
- | DeploymentStream2Deployments4
646
- >;
647
-
648
- export type DeploymentStreamMessagesUserMessage = {
649
- /**
650
- * The role of the messages author, in this case `user`.
651
- */
652
- role: "user";
653
- /**
654
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
655
- */
656
- name?: string | undefined;
657
- /**
658
- * The contents of the user message.
659
- */
660
- content:
661
- | string
662
- | Array<
663
- | (components.TextContentPartSchema & { type: "text" })
664
- | components.ImageContentPartSchema
665
- | components.AudioContentPartSchema
666
- | DeploymentStream2Deployments4
667
- >;
668
- };
669
-
670
- /**
671
- * The contents of the developer message.
672
- */
673
- export type DeploymentStreamMessagesDeploymentsContent =
674
- | string
675
- | Array<components.TextContentPartSchema>;
676
-
677
- export type DeploymentStreamMessagesDeveloperMessage = {
678
- /**
679
- * The role of the messages author, in this case `developer`.
680
- */
681
- role: "developer";
682
- /**
683
- * The contents of the developer message.
684
- */
685
- content: string | Array<components.TextContentPartSchema>;
686
- /**
687
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
688
- */
689
- name?: string | undefined;
690
- };
691
-
692
- /**
693
- * The contents of the system message.
694
- */
695
- export type DeploymentStreamMessagesContent =
696
- | string
697
- | Array<components.TextContentPartSchema>;
698
-
699
- /**
700
- * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
701
- */
702
- export type DeploymentStreamMessagesSystemMessage = {
703
- /**
704
- * The role of the messages author, in this case `system`.
705
- */
706
- role: "system";
707
- /**
708
- * The contents of the system message.
709
- */
710
- content: string | Array<components.TextContentPartSchema>;
711
- /**
712
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
713
- */
714
- name?: string | undefined;
715
- };
716
-
717
- export type DeploymentStreamMessages =
718
- | DeploymentStreamMessagesSystemMessage
719
- | DeploymentStreamMessagesDeveloperMessage
720
- | DeploymentStreamMessagesUserMessage
721
- | DeploymentStreamMessagesAssistantMessage
722
- | DeploymentStreamMessagesToolMessage;
723
-
724
- /**
725
- * Metadata about the document
726
- */
727
- export type DeploymentStreamMetadata = {
728
- /**
729
- * Name of the file the text is from.
730
- */
731
- fileName?: string | undefined;
732
- /**
733
- * Content type of the file the text is from.
734
- */
735
- fileType?: string | undefined;
736
- /**
737
- * The page number the text is from.
738
- */
739
- pageNumber?: number | undefined;
740
- };
741
-
742
- export type DeploymentStreamDocuments = {
743
- /**
744
- * The text content of the document
745
- */
746
- text: string;
747
- /**
748
- * Metadata about the document
749
- */
750
- metadata?: DeploymentStreamMetadata | undefined;
751
- };
752
-
753
- export type DeploymentStreamInvokeOptions = {
754
- /**
755
- * Whether to include the retrieved knowledge chunks in the response.
756
- */
757
- includeRetrievals?: boolean | undefined;
758
- /**
759
- * Whether to include the usage metrics in the response.
760
- */
761
- includeUsage?: boolean | undefined;
762
- /**
763
- * A mock response to use instead of calling the LLM API. This is useful for testing purposes. When provided, the system will return a response object with this content as the completion, without making an actual API call to the LLM provider. This works for both streaming and non-streaming requests. Mock responses will not generate logs, traces or be counted for your plan usage.
764
- */
765
- mockResponse?: string | undefined;
766
- };
767
-
768
- export type DeploymentStreamThread = {
769
- /**
770
- * Unique thread identifier to group related invocations.
771
- */
772
- id: string;
773
- /**
774
- * Optional tags to differentiate or categorize threads
775
- */
776
- tags?: Array<string> | undefined;
777
- };
778
-
779
- /**
780
- * Exists
781
- */
782
- export type DeploymentStreamOrExists = {
783
- exists: boolean;
784
- };
785
-
786
- export type DeploymentStreamOrDeploymentsNin = string | number | boolean;
787
-
788
- /**
789
- * Not in
790
- */
791
- export type DeploymentStreamOrNin = {
792
- nin: Array<string | number | boolean>;
793
- };
794
-
795
- export type DeploymentStreamOrDeploymentsIn = string | number | boolean;
796
-
797
- /**
798
- * In
799
- */
800
- export type DeploymentStreamOrIn = {
801
- in: Array<string | number | boolean>;
802
- };
803
-
804
- /**
805
- * Less than or equal to
806
- */
807
- export type DeploymentStreamOrLte = {
808
- lte: number;
809
- };
810
-
811
- /**
812
- * Less than
813
- */
814
- export type DeploymentStreamOrLt = {
815
- lt: number;
816
- };
817
-
818
- /**
819
- * Greater than or equal to
820
- */
821
- export type DeploymentStreamOrGte = {
822
- gte: number;
823
- };
824
-
825
- /**
826
- * Greater than
827
- */
828
- export type DeploymentStreamOrGt = {
829
- gt: number;
830
- };
831
-
832
- export type DeploymentStreamOrDeploymentsNe = string | number | boolean;
833
-
834
- /**
835
- * Not equal to
836
- */
837
- export type DeploymentStreamOrNe = {
838
- ne: string | number | boolean;
839
- };
840
-
841
- export type DeploymentStreamOrDeploymentsEq = string | number | boolean;
842
-
843
- /**
844
- * Equal to
845
- */
846
- export type DeploymentStreamOrEq = {
847
- eq: string | number | boolean;
848
- };
849
-
850
- export type DeploymentStreamKnowledgeFilterDeploymentsOr =
851
- | DeploymentStreamOrEq
852
- | DeploymentStreamOrNe
853
- | DeploymentStreamOrGt
854
- | DeploymentStreamOrGte
855
- | DeploymentStreamOrLt
856
- | DeploymentStreamOrLte
857
- | DeploymentStreamOrIn
858
- | DeploymentStreamOrNin
859
- | DeploymentStreamOrExists;
860
-
861
- /**
862
- * Or
863
- */
864
- export type DeploymentStreamKnowledgeFilterOr = {
865
- or: Array<
866
- {
867
- [k: string]:
868
- | DeploymentStreamOrEq
869
- | DeploymentStreamOrNe
870
- | DeploymentStreamOrGt
871
- | DeploymentStreamOrGte
872
- | DeploymentStreamOrLt
873
- | DeploymentStreamOrLte
874
- | DeploymentStreamOrIn
875
- | DeploymentStreamOrNin
876
- | DeploymentStreamOrExists;
877
- }
878
- >;
879
- };
880
-
881
- /**
882
- * Exists
883
- */
884
- export type DeploymentStreamAndExists = {
885
- exists: boolean;
886
- };
887
-
888
- export type DeploymentStreamAndDeploymentsNin = string | number | boolean;
889
-
890
- /**
891
- * Not in
892
- */
893
- export type DeploymentStreamAndNin = {
894
- nin: Array<string | number | boolean>;
895
- };
896
-
897
- export type DeploymentStreamAndDeploymentsIn = string | number | boolean;
898
-
899
- /**
900
- * In
901
- */
902
- export type DeploymentStreamAndIn = {
903
- in: Array<string | number | boolean>;
904
- };
905
-
906
- /**
907
- * Less than or equal to
908
- */
909
- export type DeploymentStreamAndLte = {
910
- lte: number;
911
- };
912
-
913
- /**
914
- * Less than
915
- */
916
- export type DeploymentStreamAndLt = {
917
- lt: number;
918
- };
919
-
920
- /**
921
- * Greater than or equal to
922
- */
923
- export type DeploymentStreamAndGte = {
924
- gte: number;
925
- };
926
-
927
- /**
928
- * Greater than
929
- */
930
- export type DeploymentStreamAndGt = {
931
- gt: number;
932
- };
933
-
934
- export type DeploymentStreamAndDeploymentsNe = string | number | boolean;
935
-
936
- /**
937
- * Not equal to
938
- */
939
- export type DeploymentStreamAndNe = {
940
- ne: string | number | boolean;
941
- };
942
-
943
- export type DeploymentStreamAndDeploymentsEq = string | number | boolean;
944
-
945
- /**
946
- * Equal to
947
- */
948
- export type DeploymentStreamAndEq = {
949
- eq: string | number | boolean;
950
- };
951
-
952
- export type DeploymentStreamKnowledgeFilterDeploymentsAnd =
953
- | DeploymentStreamAndEq
954
- | DeploymentStreamAndNe
955
- | DeploymentStreamAndGt
956
- | DeploymentStreamAndGte
957
- | DeploymentStreamAndLt
958
- | DeploymentStreamAndLte
959
- | DeploymentStreamAndIn
960
- | DeploymentStreamAndNin
961
- | DeploymentStreamAndExists;
962
-
963
- /**
964
- * And
965
- */
966
- export type DeploymentStreamKnowledgeFilterAnd = {
967
- and: Array<
968
- {
969
- [k: string]:
970
- | DeploymentStreamAndEq
971
- | DeploymentStreamAndNe
972
- | DeploymentStreamAndGt
973
- | DeploymentStreamAndGte
974
- | DeploymentStreamAndLt
975
- | DeploymentStreamAndLte
976
- | DeploymentStreamAndIn
977
- | DeploymentStreamAndNin
978
- | DeploymentStreamAndExists;
979
- }
980
- >;
981
- };
982
-
983
- /**
984
- * Exists
985
- */
986
- export type OneExists = {
987
- exists: boolean;
988
- };
989
-
990
- export type DeploymentStream1DeploymentsNin = string | number | boolean;
991
-
992
- /**
993
- * Not in
994
- */
995
- export type DeploymentStream1Nin = {
996
- nin: Array<string | number | boolean>;
997
- };
998
-
999
- export type DeploymentStream1DeploymentsIn = string | number | boolean;
1000
-
1001
- /**
1002
- * In
1003
- */
1004
- export type DeploymentStream1In = {
1005
- in: Array<string | number | boolean>;
1006
- };
1007
-
1008
- /**
1009
- * Less than or equal to
1010
- */
1011
- export type OneLte = {
1012
- lte: number;
1013
- };
1014
-
1015
- /**
1016
- * Less than
1017
- */
1018
- export type OneLt = {
1019
- lt: number;
1020
- };
1021
-
1022
- /**
1023
- * Greater than or equal to
1024
- */
1025
- export type OneGte = {
1026
- gte: number;
1027
- };
1028
-
1029
- /**
1030
- * Greater than
1031
- */
1032
- export type OneGt = {
1033
- gt: number;
1034
- };
1035
-
1036
- export type DeploymentStream1DeploymentsNe = string | number | boolean;
1037
-
1038
- /**
1039
- * Not equal to
1040
- */
1041
- export type DeploymentStream1Ne = {
1042
- ne: string | number | boolean;
1043
- };
1044
-
1045
- export type DeploymentStream1DeploymentsEq = string | number | boolean;
1046
-
1047
- /**
1048
- * Equal to
1049
- */
1050
- export type DeploymentStream1Eq = {
1051
- eq: string | number | boolean;
1052
- };
1053
-
1054
- export type DeploymentStreamKnowledgeFilter1 =
1055
- | DeploymentStream1Eq
1056
- | DeploymentStream1Ne
1057
- | OneGt
1058
- | OneGte
1059
- | OneLt
1060
- | OneLte
1061
- | DeploymentStream1In
1062
- | DeploymentStream1Nin
1063
- | OneExists;
1064
-
1065
- /**
1066
- * A filter to apply to the knowledge base chunk metadata when using knowledge bases in the deployment.
1067
- */
1068
- export type DeploymentStreamKnowledgeFilter =
1069
- | DeploymentStreamKnowledgeFilterAnd
1070
- | DeploymentStreamKnowledgeFilterOr
1071
- | {
1072
- [k: string]:
1073
- | DeploymentStream1Eq
1074
- | DeploymentStream1Ne
1075
- | OneGt
1076
- | OneGte
1077
- | OneLt
1078
- | OneLte
1079
- | DeploymentStream1In
1080
- | DeploymentStream1Nin
1081
- | OneExists;
1082
- };
1083
-
1084
- export type DeploymentStreamRequestBody = {
1085
- /**
1086
- * The deployment key to invoke
1087
- */
1088
- key: string;
1089
- /**
1090
- * Key-value pairs variables to replace in your prompts. If a variable is not provided that is defined in the prompt, the default variables are used.
1091
- */
1092
- inputs?: { [k: string]: any } | undefined;
1093
- /**
1094
- * Key-value pairs that match your data model and fields declared in your deployment routing configuration
1095
- */
1096
- context?: { [k: string]: any } | undefined;
1097
- /**
1098
- * A list of messages to include after the `System` message, but before the `User` and `Assistant` pairs configured in your deployment.
1099
- */
1100
- prefixMessages?:
1101
- | Array<
1102
- | PrefixMessagesSystemMessage
1103
- | PrefixMessagesDeveloperMessage
1104
- | PrefixMessagesUserMessage
1105
- | PrefixMessagesAssistantMessage
1106
- | PrefixMessagesToolMessage
1107
- >
1108
- | undefined;
1109
- /**
1110
- * A list of messages to send to the deployment.
1111
- */
1112
- messages?:
1113
- | Array<
1114
- | DeploymentStreamMessagesSystemMessage
1115
- | DeploymentStreamMessagesDeveloperMessage
1116
- | DeploymentStreamMessagesUserMessage
1117
- | DeploymentStreamMessagesAssistantMessage
1118
- | DeploymentStreamMessagesToolMessage
1119
- >
1120
- | undefined;
1121
- /**
1122
- * A list of file IDs that are associated with the deployment request.
1123
- */
1124
- fileIds?: Array<string> | undefined;
1125
- /**
1126
- * Key-value pairs that you want to attach to the log generated by this request.
1127
- */
1128
- metadata?: { [k: string]: any } | undefined;
1129
- /**
1130
- * Utilized for passing additional parameters to the model provider. Exercise caution when using this feature, as the included parameters will overwrite any parameters specified in the deployment prompt configuration.
1131
- */
1132
- extraParams?: { [k: string]: any } | undefined;
1133
- /**
1134
- * A list of documents from your external knowledge base (e.g., chunks retrieved from your own vector database or RAG pipeline) that provide context for the model response. These documents can be used by evaluators and guardrails to assess the relevance and accuracy of the model output against the provided context.
1135
- */
1136
- documents?: Array<DeploymentStreamDocuments> | undefined;
1137
- invokeOptions?: DeploymentStreamInvokeOptions | undefined;
1138
- thread?: DeploymentStreamThread | undefined;
1139
- /**
1140
- * A filter to apply to the knowledge base chunk metadata when using knowledge bases in the deployment.
1141
- */
1142
- knowledgeFilter?:
1143
- | DeploymentStreamKnowledgeFilterAnd
1144
- | DeploymentStreamKnowledgeFilterOr
1145
- | {
1146
- [k: string]:
1147
- | DeploymentStream1Eq
1148
- | DeploymentStream1Ne
1149
- | OneGt
1150
- | OneGte
1151
- | OneLt
1152
- | OneLte
1153
- | DeploymentStream1In
1154
- | DeploymentStream1Nin
1155
- | OneExists;
1156
- }
1157
- | undefined;
1158
- };
1159
-
1160
- /**
1161
- * Indicates the type of model used to generate the response
1162
- */
1163
- export const DeploymentStreamObject = {
1164
- Chat: "chat",
1165
- Completion: "completion",
1166
- Image: "image",
1167
- } as const;
1168
- /**
1169
- * Indicates the type of model used to generate the response
1170
- */
1171
- export type DeploymentStreamObject = ClosedEnum<typeof DeploymentStreamObject>;
1172
-
1173
- /**
1174
- * The provider used to generate the response
1175
- */
1176
- export const DeploymentStreamProvider = {
1177
- Openai: "openai",
1178
- Groq: "groq",
1179
- Cohere: "cohere",
1180
- Azure: "azure",
1181
- Aws: "aws",
1182
- Google: "google",
1183
- GoogleAi: "google-ai",
1184
- Huggingface: "huggingface",
1185
- Togetherai: "togetherai",
1186
- Perplexity: "perplexity",
1187
- Anthropic: "anthropic",
1188
- Leonardoai: "leonardoai",
1189
- Fal: "fal",
1190
- Nvidia: "nvidia",
1191
- Jina: "jina",
1192
- Elevenlabs: "elevenlabs",
1193
- Litellm: "litellm",
1194
- Cerebras: "cerebras",
1195
- Openailike: "openailike",
1196
- Bytedance: "bytedance",
1197
- Mistral: "mistral",
1198
- Deepseek: "deepseek",
1199
- Contextualai: "contextualai",
1200
- Moonshotai: "moonshotai",
1201
- Zai: "zai",
1202
- Slack: "slack",
1203
- } as const;
1204
- /**
1205
- * The provider used to generate the response
1206
- */
1207
- export type DeploymentStreamProvider = ClosedEnum<
1208
- typeof DeploymentStreamProvider
1209
- >;
1210
-
1211
- /**
1212
- * Metadata of the retrieved chunk from the knowledge base
1213
- */
1214
- export type DeploymentStreamDeploymentsMetadata = {
1215
- /**
1216
- * Name of the file
1217
- */
1218
- fileName: string;
1219
- /**
1220
- * Page number of the chunk
1221
- */
1222
- pageNumber: number | null;
1223
- /**
1224
- * Type of the file
1225
- */
1226
- fileType: string;
1227
- /**
1228
- * Rerank scores are normalized to be in the range [0, 1]. Scores close to 1 indicate a high relevance to the query, and scores closer to 0 indicate low relevance. It is not accurate to assume a score of 0.9 means the document is 2x more relevant than a document with a score of 0.45
1229
- */
1230
- rerankScore?: number | undefined;
1231
- /**
1232
- * Search scores are normalized to be in the range [0, 1]. Search score is calculated based on `[Cosine Similarity](https://en.wikipedia.org/wiki/Cosine_similarity)` algorithm. Scores close to 1 indicate the document is closer to the query, and scores closer to 0 indicate the document is farther from the query.
1233
- */
1234
- searchScore: number;
1235
- };
1236
-
1237
- export type DeploymentStreamRetrievals = {
1238
- /**
1239
- * Content of the retrieved chunk from the knowledge base
1240
- */
1241
- document: string;
1242
- /**
1243
- * Metadata of the retrieved chunk from the knowledge base
1244
- */
1245
- metadata: DeploymentStreamDeploymentsMetadata;
1246
- };
1247
-
1248
- export type DeploymentStreamPromptTokensDetails = {
1249
- cachedTokens?: number | null | undefined;
1250
- };
1251
-
1252
- export type DeploymentStreamCompletionTokensDetails = {
1253
- reasoningTokens?: number | null | undefined;
1254
- };
1255
-
1256
- /**
1257
- * Usage metrics for the response
1258
- */
1259
- export type DeploymentStreamUsage = {
1260
- totalTokens?: number | undefined;
1261
- promptTokens?: number | undefined;
1262
- completionTokens?: number | undefined;
1263
- promptTokensDetails?: DeploymentStreamPromptTokensDetails | undefined;
1264
- completionTokensDetails?:
1265
- | DeploymentStreamCompletionTokensDetails
1266
- | null
1267
- | undefined;
1268
- };
1269
-
1270
- /**
1271
- * The role of the prompt message
1272
- */
1273
- export const DeploymentStreamMessageDeploymentsResponseRole = {
1274
- System: "system",
1275
- Assistant: "assistant",
1276
- User: "user",
1277
- Exception: "exception",
1278
- Tool: "tool",
1279
- Prompt: "prompt",
1280
- Correction: "correction",
1281
- ExpectedOutput: "expected_output",
1282
- } as const;
1283
- /**
1284
- * The role of the prompt message
1285
- */
1286
- export type DeploymentStreamMessageDeploymentsResponseRole = ClosedEnum<
1287
- typeof DeploymentStreamMessageDeploymentsResponseRole
1288
- >;
1289
-
1290
- export type DeploymentStreamMessage3 = {
1291
- type: "image";
1292
- /**
1293
- * The role of the prompt message
1294
- */
1295
- role: DeploymentStreamMessageDeploymentsResponseRole;
1296
- url: string;
1297
- };
1298
-
1299
- /**
1300
- * The role of the prompt message
1301
- */
1302
- export const DeploymentStreamMessageDeploymentsRole = {
1303
- System: "system",
1304
- Assistant: "assistant",
1305
- User: "user",
1306
- Exception: "exception",
1307
- Tool: "tool",
1308
- Prompt: "prompt",
1309
- Correction: "correction",
1310
- ExpectedOutput: "expected_output",
1311
- } as const;
1312
- /**
1313
- * The role of the prompt message
1314
- */
1315
- export type DeploymentStreamMessageDeploymentsRole = ClosedEnum<
1316
- typeof DeploymentStreamMessageDeploymentsRole
1317
- >;
1318
-
1319
- export type DeploymentStreamMessage2 = {
1320
- type: "content";
1321
- /**
1322
- * The role of the prompt message
1323
- */
1324
- role: DeploymentStreamMessageDeploymentsRole;
1325
- content: string | null;
1326
- /**
1327
- * Internal thought process of the model
1328
- */
1329
- reasoning?: string | undefined;
1330
- /**
1331
- * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
1332
- */
1333
- reasoningSignature?: string | undefined;
1334
- /**
1335
- * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
1336
- */
1337
- redactedReasoning?: string | undefined;
1338
- };
1339
-
1340
- /**
1341
- * The role of the prompt message
1342
- */
1343
- export const DeploymentStreamMessageRole = {
1344
- System: "system",
1345
- Assistant: "assistant",
1346
- User: "user",
1347
- Exception: "exception",
1348
- Tool: "tool",
1349
- Prompt: "prompt",
1350
- Correction: "correction",
1351
- ExpectedOutput: "expected_output",
1352
- } as const;
1353
- /**
1354
- * The role of the prompt message
1355
- */
1356
- export type DeploymentStreamMessageRole = ClosedEnum<
1357
- typeof DeploymentStreamMessageRole
1358
- >;
1359
-
1360
- export const DeploymentStreamMessageDeploymentsResponse200Type = {
1361
- Function: "function",
1362
- } as const;
1363
- export type DeploymentStreamMessageDeploymentsResponse200Type = ClosedEnum<
1364
- typeof DeploymentStreamMessageDeploymentsResponse200Type
1365
- >;
1366
-
1367
- export type DeploymentStreamMessageFunction = {
1368
- name: string;
1369
- /**
1370
- * JSON string arguments for the functions
1371
- */
1372
- arguments: string;
1373
- };
1374
-
1375
- export type DeploymentStreamMessageToolCalls = {
1376
- id?: string | undefined;
1377
- index?: number | undefined;
1378
- type: DeploymentStreamMessageDeploymentsResponse200Type;
1379
- function: DeploymentStreamMessageFunction;
1380
- };
1381
-
1382
- export type DeploymentStreamMessage1 = {
1383
- type: "tool_calls";
1384
- /**
1385
- * The role of the prompt message
1386
- */
1387
- role: DeploymentStreamMessageRole;
1388
- content?: string | null | undefined;
1389
- toolCalls: Array<DeploymentStreamMessageToolCalls>;
1390
- /**
1391
- * Internal thought process of the model
1392
- */
1393
- reasoning?: string | undefined;
1394
- /**
1395
- * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
1396
- */
1397
- reasoningSignature?: string | undefined;
1398
- /**
1399
- * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
1400
- */
1401
- redactedReasoning?: string | undefined;
1402
- };
1403
-
1404
- export type DeploymentStreamMessage =
1405
- | DeploymentStreamMessage1
1406
- | DeploymentStreamMessage2
1407
- | DeploymentStreamMessage3;
1408
-
1409
- export type DeploymentStreamChoices = {
1410
- index: number;
1411
- message:
1412
- | DeploymentStreamMessage1
1413
- | DeploymentStreamMessage2
1414
- | DeploymentStreamMessage3;
1415
- finishReason?: string | null | undefined;
1416
- };
1417
-
1418
- export type DeploymentStreamData = {
1419
- /**
1420
- * A unique identifier for the response. Can be used to add metrics to the transaction.
1421
- */
1422
- id: string;
1423
- /**
1424
- * A timestamp indicating when the object was created. Usually in a standardized format like ISO 8601
1425
- */
1426
- created: Date;
1427
- /**
1428
- * Indicates the type of model used to generate the response
1429
- */
1430
- object: DeploymentStreamObject;
1431
- /**
1432
- * The model used to generate the response
1433
- */
1434
- model: string;
1435
- /**
1436
- * The provider used to generate the response
1437
- */
1438
- provider: DeploymentStreamProvider;
1439
- /**
1440
- * Indicates if the response is the final response
1441
- */
1442
- isFinal: boolean;
1443
- /**
1444
- * Indicates integration id used to generate the response
1445
- */
1446
- integrationId?: string | undefined;
1447
- /**
1448
- * A timestamp indicating when the object was finalized. Usually in a standardized format like ISO 8601
1449
- */
1450
- finalized?: Date | undefined;
1451
- /**
1452
- * Provider backed system fingerprint.
1453
- */
1454
- systemFingerprint?: string | null | undefined;
1455
- /**
1456
- * List of documents retrieved from the knowledge base. This property is only available when the `include_retrievals` flag is set to `true` in the invoke settings. When stream is set to true, the `retrievals` property will be returned in the last streamed chunk where the property `is_final` is set to `true`.
1457
- */
1458
- retrievals?: Array<DeploymentStreamRetrievals> | undefined;
1459
- /**
1460
- * Response returned by the model provider. This functionality is only supported when streaming is not used. If streaming is used, the `provider_response` property will be set to `null`.
1461
- */
1462
- providerResponse?: any | undefined;
1463
- /**
1464
- * Usage metrics for the response
1465
- */
1466
- usage?: DeploymentStreamUsage | null | undefined;
1467
- /**
1468
- * A list of choices generated by the model
1469
- */
1470
- choices: Array<DeploymentStreamChoices>;
1471
- };
1472
-
1473
- /**
1474
- * Successful operation
1475
- */
1476
- export type DeploymentStreamResponseBody = {
1477
- data?: DeploymentStreamData | undefined;
1478
- };
1479
-
1480
- /** @internal */
1481
- export type DeploymentStreamContentDeploymentsRequest2$Outbound =
1482
- components.TextContentPartSchema$Outbound;
1483
-
1484
- /** @internal */
1485
- export const DeploymentStreamContentDeploymentsRequest2$outboundSchema:
1486
- z.ZodType<
1487
- DeploymentStreamContentDeploymentsRequest2$Outbound,
1488
- z.ZodTypeDef,
1489
- DeploymentStreamContentDeploymentsRequest2
1490
- > = components.TextContentPartSchema$outboundSchema;
1491
-
1492
- export function deploymentStreamContentDeploymentsRequest2ToJSON(
1493
- deploymentStreamContentDeploymentsRequest2:
1494
- DeploymentStreamContentDeploymentsRequest2,
1495
- ): string {
1496
- return JSON.stringify(
1497
- DeploymentStreamContentDeploymentsRequest2$outboundSchema.parse(
1498
- deploymentStreamContentDeploymentsRequest2,
1499
- ),
1500
- );
1501
- }
1502
-
1503
- /** @internal */
1504
- export type DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$Outbound =
1505
- | string
1506
- | Array<components.TextContentPartSchema$Outbound>;
1507
-
1508
- /** @internal */
1509
- export const DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$outboundSchema:
1510
- z.ZodType<
1511
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$Outbound,
1512
- z.ZodTypeDef,
1513
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content
1514
- > = z.union([
1515
- z.string(),
1516
- z.array(components.TextContentPartSchema$outboundSchema),
1517
- ]);
1518
-
1519
- export function deploymentStreamPrefixMessagesDeploymentsRequestRequestBody5ContentToJSON(
1520
- deploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content:
1521
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content,
1522
- ): string {
1523
- return JSON.stringify(
1524
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$outboundSchema
1525
- .parse(
1526
- deploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content,
1527
- ),
1528
- );
1529
- }
1530
-
1531
- /** @internal */
1532
- export const DeploymentStreamPrefixMessagesDeploymentsType$outboundSchema:
1533
- z.ZodNativeEnum<typeof DeploymentStreamPrefixMessagesDeploymentsType> = z
1534
- .nativeEnum(DeploymentStreamPrefixMessagesDeploymentsType);
1535
-
1536
- /** @internal */
1537
- export const DeploymentStreamPrefixMessagesTtl$outboundSchema: z.ZodNativeEnum<
1538
- typeof DeploymentStreamPrefixMessagesTtl
1539
- > = z.nativeEnum(DeploymentStreamPrefixMessagesTtl);
1540
-
1541
- /** @internal */
1542
- export type DeploymentStreamPrefixMessagesCacheControl$Outbound = {
1543
- type: string;
1544
- ttl: string;
1545
- };
1546
-
1547
- /** @internal */
1548
- export const DeploymentStreamPrefixMessagesCacheControl$outboundSchema:
1549
- z.ZodType<
1550
- DeploymentStreamPrefixMessagesCacheControl$Outbound,
1551
- z.ZodTypeDef,
1552
- DeploymentStreamPrefixMessagesCacheControl
1553
- > = z.object({
1554
- type: DeploymentStreamPrefixMessagesDeploymentsType$outboundSchema,
1555
- ttl: DeploymentStreamPrefixMessagesTtl$outboundSchema.default("5m"),
1556
- });
1557
-
1558
- export function deploymentStreamPrefixMessagesCacheControlToJSON(
1559
- deploymentStreamPrefixMessagesCacheControl:
1560
- DeploymentStreamPrefixMessagesCacheControl,
1561
- ): string {
1562
- return JSON.stringify(
1563
- DeploymentStreamPrefixMessagesCacheControl$outboundSchema.parse(
1564
- deploymentStreamPrefixMessagesCacheControl,
1565
- ),
1566
- );
1567
- }
1568
-
1569
- /** @internal */
1570
- export type PrefixMessagesToolMessage$Outbound = {
1571
- role: "tool";
1572
- content: string | Array<components.TextContentPartSchema$Outbound>;
1573
- tool_call_id: string | null;
1574
- cache_control?:
1575
- | DeploymentStreamPrefixMessagesCacheControl$Outbound
1576
- | undefined;
1577
- };
1578
-
1579
- /** @internal */
1580
- export const PrefixMessagesToolMessage$outboundSchema: z.ZodType<
1581
- PrefixMessagesToolMessage$Outbound,
1582
- z.ZodTypeDef,
1583
- PrefixMessagesToolMessage
1584
- > = z.object({
1585
- role: z.literal("tool"),
1586
- content: z.union([
1587
- z.string(),
1588
- z.array(components.TextContentPartSchema$outboundSchema),
1589
- ]),
1590
- toolCallId: z.nullable(z.string()),
1591
- cacheControl: z.lazy(() =>
1592
- DeploymentStreamPrefixMessagesCacheControl$outboundSchema
1593
- ).optional(),
1594
- }).transform((v) => {
1595
- return remap$(v, {
1596
- toolCallId: "tool_call_id",
1597
- cacheControl: "cache_control",
1598
- });
1599
- });
1600
-
1601
- export function prefixMessagesToolMessageToJSON(
1602
- prefixMessagesToolMessage: PrefixMessagesToolMessage,
1603
- ): string {
1604
- return JSON.stringify(
1605
- PrefixMessagesToolMessage$outboundSchema.parse(prefixMessagesToolMessage),
1606
- );
1607
- }
1608
-
1609
- /** @internal */
1610
- export type DeploymentStreamContentDeployments2$Outbound =
1611
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1612
- | components.RefusalPartSchema$Outbound
1613
- | components.ReasoningPartSchema$Outbound
1614
- | components.RedactedReasoningPartSchema$Outbound;
1615
-
1616
- /** @internal */
1617
- export const DeploymentStreamContentDeployments2$outboundSchema: z.ZodType<
1618
- DeploymentStreamContentDeployments2$Outbound,
1619
- z.ZodTypeDef,
1620
- DeploymentStreamContentDeployments2
1621
- > = z.union([
1622
- components.TextContentPartSchema$outboundSchema.and(
1623
- z.object({ type: z.literal("text") }),
1624
- ),
1625
- components.RefusalPartSchema$outboundSchema,
1626
- components.ReasoningPartSchema$outboundSchema,
1627
- components.RedactedReasoningPartSchema$outboundSchema,
1628
- ]);
1629
-
1630
- export function deploymentStreamContentDeployments2ToJSON(
1631
- deploymentStreamContentDeployments2: DeploymentStreamContentDeployments2,
1632
- ): string {
1633
- return JSON.stringify(
1634
- DeploymentStreamContentDeployments2$outboundSchema.parse(
1635
- deploymentStreamContentDeployments2,
1636
- ),
1637
- );
1638
- }
1639
-
1640
- /** @internal */
1641
- export type DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$Outbound =
1642
- | string
1643
- | Array<
1644
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1645
- | components.RefusalPartSchema$Outbound
1646
- | components.ReasoningPartSchema$Outbound
1647
- | components.RedactedReasoningPartSchema$Outbound
1648
- >;
1649
-
1650
- /** @internal */
1651
- export const DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema:
1652
- z.ZodType<
1653
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$Outbound,
1654
- z.ZodTypeDef,
1655
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent
1656
- > = z.union([
1657
- z.string(),
1658
- z.array(
1659
- z.union([
1660
- components.TextContentPartSchema$outboundSchema.and(
1661
- z.object({ type: z.literal("text") }),
1662
- ),
1663
- components.RefusalPartSchema$outboundSchema,
1664
- components.ReasoningPartSchema$outboundSchema,
1665
- components.RedactedReasoningPartSchema$outboundSchema,
1666
- ]),
1667
- ),
1668
- ]);
1669
-
1670
- export function deploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContentToJSON(
1671
- deploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent:
1672
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent,
1673
- ): string {
1674
- return JSON.stringify(
1675
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema
1676
- .parse(
1677
- deploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent,
1678
- ),
1679
- );
1680
- }
1681
-
1682
- /** @internal */
1683
- export type PrefixMessagesAudio$Outbound = {
1684
- id: string;
1685
- };
1686
-
1687
- /** @internal */
1688
- export const PrefixMessagesAudio$outboundSchema: z.ZodType<
1689
- PrefixMessagesAudio$Outbound,
1690
- z.ZodTypeDef,
1691
- PrefixMessagesAudio
1692
- > = z.object({
1693
- id: z.string(),
1694
- });
1695
-
1696
- export function prefixMessagesAudioToJSON(
1697
- prefixMessagesAudio: PrefixMessagesAudio,
1698
- ): string {
1699
- return JSON.stringify(
1700
- PrefixMessagesAudio$outboundSchema.parse(prefixMessagesAudio),
1701
- );
1702
- }
1703
-
1704
- /** @internal */
1705
- export const DeploymentStreamPrefixMessagesType$outboundSchema: z.ZodNativeEnum<
1706
- typeof DeploymentStreamPrefixMessagesType
1707
- > = z.nativeEnum(DeploymentStreamPrefixMessagesType);
1708
-
1709
- /** @internal */
1710
- export type DeploymentStreamPrefixMessagesFunction$Outbound = {
1711
- name?: string | undefined;
1712
- arguments?: string | undefined;
1713
- };
1714
-
1715
- /** @internal */
1716
- export const DeploymentStreamPrefixMessagesFunction$outboundSchema: z.ZodType<
1717
- DeploymentStreamPrefixMessagesFunction$Outbound,
1718
- z.ZodTypeDef,
1719
- DeploymentStreamPrefixMessagesFunction
1720
- > = z.object({
1721
- name: z.string().optional(),
1722
- arguments: z.string().optional(),
1723
- });
1724
-
1725
- export function deploymentStreamPrefixMessagesFunctionToJSON(
1726
- deploymentStreamPrefixMessagesFunction:
1727
- DeploymentStreamPrefixMessagesFunction,
1728
- ): string {
1729
- return JSON.stringify(
1730
- DeploymentStreamPrefixMessagesFunction$outboundSchema.parse(
1731
- deploymentStreamPrefixMessagesFunction,
1732
- ),
1733
- );
1734
- }
1735
-
1736
- /** @internal */
1737
- export type DeploymentStreamPrefixMessagesToolCalls$Outbound = {
1738
- id: string;
1739
- type: string;
1740
- function: DeploymentStreamPrefixMessagesFunction$Outbound;
1741
- thought_signature?: string | undefined;
1742
- };
1743
-
1744
- /** @internal */
1745
- export const DeploymentStreamPrefixMessagesToolCalls$outboundSchema: z.ZodType<
1746
- DeploymentStreamPrefixMessagesToolCalls$Outbound,
1747
- z.ZodTypeDef,
1748
- DeploymentStreamPrefixMessagesToolCalls
1749
- > = z.object({
1750
- id: z.string(),
1751
- type: DeploymentStreamPrefixMessagesType$outboundSchema,
1752
- function: z.lazy(() => DeploymentStreamPrefixMessagesFunction$outboundSchema),
1753
- thoughtSignature: z.string().optional(),
1754
- }).transform((v) => {
1755
- return remap$(v, {
1756
- thoughtSignature: "thought_signature",
1757
- });
1758
- });
1759
-
1760
- export function deploymentStreamPrefixMessagesToolCallsToJSON(
1761
- deploymentStreamPrefixMessagesToolCalls:
1762
- DeploymentStreamPrefixMessagesToolCalls,
1763
- ): string {
1764
- return JSON.stringify(
1765
- DeploymentStreamPrefixMessagesToolCalls$outboundSchema.parse(
1766
- deploymentStreamPrefixMessagesToolCalls,
1767
- ),
1768
- );
1769
- }
1770
-
1771
- /** @internal */
1772
- export type PrefixMessagesAssistantMessage$Outbound = {
1773
- content?:
1774
- | string
1775
- | Array<
1776
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1777
- | components.RefusalPartSchema$Outbound
1778
- | components.ReasoningPartSchema$Outbound
1779
- | components.RedactedReasoningPartSchema$Outbound
1780
- >
1781
- | null
1782
- | undefined;
1783
- refusal?: string | null | undefined;
1784
- role: "assistant";
1785
- name?: string | undefined;
1786
- audio?: PrefixMessagesAudio$Outbound | null | undefined;
1787
- tool_calls?:
1788
- | Array<DeploymentStreamPrefixMessagesToolCalls$Outbound>
1789
- | undefined;
1790
- };
1791
-
1792
- /** @internal */
1793
- export const PrefixMessagesAssistantMessage$outboundSchema: z.ZodType<
1794
- PrefixMessagesAssistantMessage$Outbound,
1795
- z.ZodTypeDef,
1796
- PrefixMessagesAssistantMessage
1797
- > = z.object({
1798
- content: z.nullable(
1799
- z.union([
1800
- z.string(),
1801
- z.array(
1802
- z.union([
1803
- components.TextContentPartSchema$outboundSchema.and(
1804
- z.object({ type: z.literal("text") }),
1805
- ),
1806
- components.RefusalPartSchema$outboundSchema,
1807
- components.ReasoningPartSchema$outboundSchema,
1808
- components.RedactedReasoningPartSchema$outboundSchema,
1809
- ]),
1810
- ),
1811
- ]),
1812
- ).optional(),
1813
- refusal: z.nullable(z.string()).optional(),
1814
- role: z.literal("assistant"),
1815
- name: z.string().optional(),
1816
- audio: z.nullable(z.lazy(() => PrefixMessagesAudio$outboundSchema))
1817
- .optional(),
1818
- toolCalls: z.array(
1819
- z.lazy(() => DeploymentStreamPrefixMessagesToolCalls$outboundSchema),
1820
- ).optional(),
1821
- }).transform((v) => {
1822
- return remap$(v, {
1823
- toolCalls: "tool_calls",
1824
- });
1825
- });
1826
-
1827
- export function prefixMessagesAssistantMessageToJSON(
1828
- prefixMessagesAssistantMessage: PrefixMessagesAssistantMessage,
1829
- ): string {
1830
- return JSON.stringify(
1831
- PrefixMessagesAssistantMessage$outboundSchema.parse(
1832
- prefixMessagesAssistantMessage,
1833
- ),
1834
- );
1835
- }
1836
-
1837
- /** @internal */
1838
- export const DeploymentStream2DeploymentsType$outboundSchema: z.ZodNativeEnum<
1839
- typeof DeploymentStream2DeploymentsType
1840
- > = z.nativeEnum(DeploymentStream2DeploymentsType);
1841
-
1842
- /** @internal */
1843
- export const DeploymentStream2Ttl$outboundSchema: z.ZodNativeEnum<
1844
- typeof DeploymentStream2Ttl
1845
- > = z.nativeEnum(DeploymentStream2Ttl);
1846
-
1847
- /** @internal */
1848
- export type DeploymentStream2CacheControl$Outbound = {
1849
- type: string;
1850
- ttl: string;
1851
- };
1852
-
1853
- /** @internal */
1854
- export const DeploymentStream2CacheControl$outboundSchema: z.ZodType<
1855
- DeploymentStream2CacheControl$Outbound,
1856
- z.ZodTypeDef,
1857
- DeploymentStream2CacheControl
1858
- > = z.object({
1859
- type: DeploymentStream2DeploymentsType$outboundSchema,
1860
- ttl: DeploymentStream2Ttl$outboundSchema.default("5m"),
1861
- });
1862
-
1863
- export function deploymentStream2CacheControlToJSON(
1864
- deploymentStream2CacheControl: DeploymentStream2CacheControl,
1865
- ): string {
1866
- return JSON.stringify(
1867
- DeploymentStream2CacheControl$outboundSchema.parse(
1868
- deploymentStream2CacheControl,
1869
- ),
1870
- );
1871
- }
1872
-
1873
- /** @internal */
1874
- export type DeploymentStream24$Outbound = {
1875
- type: "file";
1876
- cache_control?: DeploymentStream2CacheControl$Outbound | undefined;
1877
- file: components.FileContentPartSchema$Outbound;
1878
- };
1879
-
1880
- /** @internal */
1881
- export const DeploymentStream24$outboundSchema: z.ZodType<
1882
- DeploymentStream24$Outbound,
1883
- z.ZodTypeDef,
1884
- DeploymentStream24
1885
- > = z.object({
1886
- type: z.literal("file"),
1887
- cacheControl: z.lazy(() => DeploymentStream2CacheControl$outboundSchema)
1888
- .optional(),
1889
- file: components.FileContentPartSchema$outboundSchema,
1890
- }).transform((v) => {
1891
- return remap$(v, {
1892
- cacheControl: "cache_control",
1893
- });
1894
- });
1895
-
1896
- export function deploymentStream24ToJSON(
1897
- deploymentStream24: DeploymentStream24,
1898
- ): string {
1899
- return JSON.stringify(
1900
- DeploymentStream24$outboundSchema.parse(deploymentStream24),
1901
- );
1902
- }
1903
-
1904
- /** @internal */
1905
- export type DeploymentStreamContent2$Outbound =
1906
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1907
- | components.ImageContentPartSchema$Outbound
1908
- | components.AudioContentPartSchema$Outbound
1909
- | DeploymentStream24$Outbound;
1910
-
1911
- /** @internal */
1912
- export const DeploymentStreamContent2$outboundSchema: z.ZodType<
1913
- DeploymentStreamContent2$Outbound,
1914
- z.ZodTypeDef,
1915
- DeploymentStreamContent2
1916
- > = z.union([
1917
- components.TextContentPartSchema$outboundSchema.and(
1918
- z.object({ type: z.literal("text") }),
1919
- ),
1920
- components.ImageContentPartSchema$outboundSchema,
1921
- components.AudioContentPartSchema$outboundSchema,
1922
- z.lazy(() => DeploymentStream24$outboundSchema),
1923
- ]);
1924
-
1925
- export function deploymentStreamContent2ToJSON(
1926
- deploymentStreamContent2: DeploymentStreamContent2,
1927
- ): string {
1928
- return JSON.stringify(
1929
- DeploymentStreamContent2$outboundSchema.parse(deploymentStreamContent2),
1930
- );
1931
- }
1932
-
1933
- /** @internal */
1934
- export type DeploymentStreamPrefixMessagesDeploymentsRequestContent$Outbound =
1935
- | string
1936
- | Array<
1937
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1938
- | components.ImageContentPartSchema$Outbound
1939
- | components.AudioContentPartSchema$Outbound
1940
- | DeploymentStream24$Outbound
1941
- >;
1942
-
1943
- /** @internal */
1944
- export const DeploymentStreamPrefixMessagesDeploymentsRequestContent$outboundSchema:
1945
- z.ZodType<
1946
- DeploymentStreamPrefixMessagesDeploymentsRequestContent$Outbound,
1947
- z.ZodTypeDef,
1948
- DeploymentStreamPrefixMessagesDeploymentsRequestContent
1949
- > = z.union([
1950
- z.string(),
1951
- z.array(
1952
- z.union([
1953
- components.TextContentPartSchema$outboundSchema.and(
1954
- z.object({ type: z.literal("text") }),
1955
- ),
1956
- components.ImageContentPartSchema$outboundSchema,
1957
- components.AudioContentPartSchema$outboundSchema,
1958
- z.lazy(() => DeploymentStream24$outboundSchema),
1959
- ]),
1960
- ),
1961
- ]);
1962
-
1963
- export function deploymentStreamPrefixMessagesDeploymentsRequestContentToJSON(
1964
- deploymentStreamPrefixMessagesDeploymentsRequestContent:
1965
- DeploymentStreamPrefixMessagesDeploymentsRequestContent,
1966
- ): string {
1967
- return JSON.stringify(
1968
- DeploymentStreamPrefixMessagesDeploymentsRequestContent$outboundSchema
1969
- .parse(deploymentStreamPrefixMessagesDeploymentsRequestContent),
1970
- );
1971
- }
1972
-
1973
- /** @internal */
1974
- export type PrefixMessagesUserMessage$Outbound = {
1975
- role: "user";
1976
- name?: string | undefined;
1977
- content:
1978
- | string
1979
- | Array<
1980
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1981
- | components.ImageContentPartSchema$Outbound
1982
- | components.AudioContentPartSchema$Outbound
1983
- | DeploymentStream24$Outbound
1984
- >;
1985
- };
1986
-
1987
- /** @internal */
1988
- export const PrefixMessagesUserMessage$outboundSchema: z.ZodType<
1989
- PrefixMessagesUserMessage$Outbound,
1990
- z.ZodTypeDef,
1991
- PrefixMessagesUserMessage
1992
- > = z.object({
1993
- role: z.literal("user"),
1994
- name: z.string().optional(),
1995
- content: z.union([
1996
- z.string(),
1997
- z.array(
1998
- z.union([
1999
- components.TextContentPartSchema$outboundSchema.and(
2000
- z.object({ type: z.literal("text") }),
2001
- ),
2002
- components.ImageContentPartSchema$outboundSchema,
2003
- components.AudioContentPartSchema$outboundSchema,
2004
- z.lazy(() => DeploymentStream24$outboundSchema),
2005
- ]),
2006
- ),
2007
- ]),
2008
- });
2009
-
2010
- export function prefixMessagesUserMessageToJSON(
2011
- prefixMessagesUserMessage: PrefixMessagesUserMessage,
2012
- ): string {
2013
- return JSON.stringify(
2014
- PrefixMessagesUserMessage$outboundSchema.parse(prefixMessagesUserMessage),
2015
- );
2016
- }
2017
-
2018
- /** @internal */
2019
- export type DeploymentStreamPrefixMessagesDeploymentsContent$Outbound =
2020
- | string
2021
- | Array<components.TextContentPartSchema$Outbound>;
2022
-
2023
- /** @internal */
2024
- export const DeploymentStreamPrefixMessagesDeploymentsContent$outboundSchema:
2025
- z.ZodType<
2026
- DeploymentStreamPrefixMessagesDeploymentsContent$Outbound,
2027
- z.ZodTypeDef,
2028
- DeploymentStreamPrefixMessagesDeploymentsContent
2029
- > = z.union([
2030
- z.string(),
2031
- z.array(components.TextContentPartSchema$outboundSchema),
2032
- ]);
2033
-
2034
- export function deploymentStreamPrefixMessagesDeploymentsContentToJSON(
2035
- deploymentStreamPrefixMessagesDeploymentsContent:
2036
- DeploymentStreamPrefixMessagesDeploymentsContent,
2037
- ): string {
2038
- return JSON.stringify(
2039
- DeploymentStreamPrefixMessagesDeploymentsContent$outboundSchema.parse(
2040
- deploymentStreamPrefixMessagesDeploymentsContent,
2041
- ),
2042
- );
2043
- }
2044
-
2045
- /** @internal */
2046
- export type PrefixMessagesDeveloperMessage$Outbound = {
2047
- role: "developer";
2048
- content: string | Array<components.TextContentPartSchema$Outbound>;
2049
- name?: string | undefined;
2050
- };
2051
-
2052
- /** @internal */
2053
- export const PrefixMessagesDeveloperMessage$outboundSchema: z.ZodType<
2054
- PrefixMessagesDeveloperMessage$Outbound,
2055
- z.ZodTypeDef,
2056
- PrefixMessagesDeveloperMessage
2057
- > = z.object({
2058
- role: z.literal("developer"),
2059
- content: z.union([
2060
- z.string(),
2061
- z.array(components.TextContentPartSchema$outboundSchema),
2062
- ]),
2063
- name: z.string().optional(),
2064
- });
2065
-
2066
- export function prefixMessagesDeveloperMessageToJSON(
2067
- prefixMessagesDeveloperMessage: PrefixMessagesDeveloperMessage,
2068
- ): string {
2069
- return JSON.stringify(
2070
- PrefixMessagesDeveloperMessage$outboundSchema.parse(
2071
- prefixMessagesDeveloperMessage,
2072
- ),
2073
- );
2074
- }
2075
-
2076
- /** @internal */
2077
- export type DeploymentStreamPrefixMessagesContent$Outbound =
2078
- | string
2079
- | Array<components.TextContentPartSchema$Outbound>;
2080
-
2081
- /** @internal */
2082
- export const DeploymentStreamPrefixMessagesContent$outboundSchema: z.ZodType<
2083
- DeploymentStreamPrefixMessagesContent$Outbound,
2084
- z.ZodTypeDef,
2085
- DeploymentStreamPrefixMessagesContent
2086
- > = z.union([
2087
- z.string(),
2088
- z.array(components.TextContentPartSchema$outboundSchema),
2089
- ]);
2090
-
2091
- export function deploymentStreamPrefixMessagesContentToJSON(
2092
- deploymentStreamPrefixMessagesContent: DeploymentStreamPrefixMessagesContent,
2093
- ): string {
2094
- return JSON.stringify(
2095
- DeploymentStreamPrefixMessagesContent$outboundSchema.parse(
2096
- deploymentStreamPrefixMessagesContent,
2097
- ),
2098
- );
2099
- }
2100
-
2101
- /** @internal */
2102
- export type PrefixMessagesSystemMessage$Outbound = {
2103
- role: "system";
2104
- content: string | Array<components.TextContentPartSchema$Outbound>;
2105
- name?: string | undefined;
2106
- };
2107
-
2108
- /** @internal */
2109
- export const PrefixMessagesSystemMessage$outboundSchema: z.ZodType<
2110
- PrefixMessagesSystemMessage$Outbound,
2111
- z.ZodTypeDef,
2112
- PrefixMessagesSystemMessage
2113
- > = z.object({
2114
- role: z.literal("system"),
2115
- content: z.union([
2116
- z.string(),
2117
- z.array(components.TextContentPartSchema$outboundSchema),
2118
- ]),
2119
- name: z.string().optional(),
2120
- });
2121
-
2122
- export function prefixMessagesSystemMessageToJSON(
2123
- prefixMessagesSystemMessage: PrefixMessagesSystemMessage,
2124
- ): string {
2125
- return JSON.stringify(
2126
- PrefixMessagesSystemMessage$outboundSchema.parse(
2127
- prefixMessagesSystemMessage,
2128
- ),
2129
- );
2130
- }
2131
-
2132
- /** @internal */
2133
- export type DeploymentStreamPrefixMessages$Outbound =
2134
- | PrefixMessagesSystemMessage$Outbound
2135
- | PrefixMessagesDeveloperMessage$Outbound
2136
- | PrefixMessagesUserMessage$Outbound
2137
- | PrefixMessagesAssistantMessage$Outbound
2138
- | PrefixMessagesToolMessage$Outbound;
2139
-
2140
- /** @internal */
2141
- export const DeploymentStreamPrefixMessages$outboundSchema: z.ZodType<
2142
- DeploymentStreamPrefixMessages$Outbound,
2143
- z.ZodTypeDef,
2144
- DeploymentStreamPrefixMessages
2145
- > = z.union([
2146
- z.lazy(() => PrefixMessagesSystemMessage$outboundSchema),
2147
- z.lazy(() => PrefixMessagesDeveloperMessage$outboundSchema),
2148
- z.lazy(() => PrefixMessagesUserMessage$outboundSchema),
2149
- z.lazy(() => PrefixMessagesAssistantMessage$outboundSchema),
2150
- z.lazy(() => PrefixMessagesToolMessage$outboundSchema),
2151
- ]);
2152
-
2153
- export function deploymentStreamPrefixMessagesToJSON(
2154
- deploymentStreamPrefixMessages: DeploymentStreamPrefixMessages,
2155
- ): string {
2156
- return JSON.stringify(
2157
- DeploymentStreamPrefixMessages$outboundSchema.parse(
2158
- deploymentStreamPrefixMessages,
2159
- ),
2160
- );
2161
- }
2162
-
2163
- /** @internal */
2164
- export type DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$Outbound =
2165
- components.TextContentPartSchema$Outbound;
2166
-
2167
- /** @internal */
2168
- export const DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$outboundSchema:
2169
- z.ZodType<
2170
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$Outbound,
2171
- z.ZodTypeDef,
2172
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages52
2173
- > = components.TextContentPartSchema$outboundSchema;
2174
-
2175
- export function deploymentStreamContentDeploymentsRequestRequestBodyMessages52ToJSON(
2176
- deploymentStreamContentDeploymentsRequestRequestBodyMessages52:
2177
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages52,
2178
- ): string {
2179
- return JSON.stringify(
2180
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$outboundSchema
2181
- .parse(deploymentStreamContentDeploymentsRequestRequestBodyMessages52),
2182
- );
2183
- }
2184
-
2185
- /** @internal */
2186
- export type DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$Outbound =
2187
- | string
2188
- | Array<components.TextContentPartSchema$Outbound>;
2189
-
2190
- /** @internal */
2191
- export const DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$outboundSchema:
2192
- z.ZodType<
2193
- DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$Outbound,
2194
- z.ZodTypeDef,
2195
- DeploymentStreamMessagesDeploymentsRequestRequestBody5Content
2196
- > = z.union([
2197
- z.string(),
2198
- z.array(components.TextContentPartSchema$outboundSchema),
2199
- ]);
2200
-
2201
- export function deploymentStreamMessagesDeploymentsRequestRequestBody5ContentToJSON(
2202
- deploymentStreamMessagesDeploymentsRequestRequestBody5Content:
2203
- DeploymentStreamMessagesDeploymentsRequestRequestBody5Content,
2204
- ): string {
2205
- return JSON.stringify(
2206
- DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$outboundSchema
2207
- .parse(deploymentStreamMessagesDeploymentsRequestRequestBody5Content),
2208
- );
2209
- }
2210
-
2211
- /** @internal */
2212
- export const DeploymentStreamMessagesDeploymentsType$outboundSchema:
2213
- z.ZodNativeEnum<typeof DeploymentStreamMessagesDeploymentsType> = z
2214
- .nativeEnum(DeploymentStreamMessagesDeploymentsType);
2215
-
2216
- /** @internal */
2217
- export const DeploymentStreamMessagesTtl$outboundSchema: z.ZodNativeEnum<
2218
- typeof DeploymentStreamMessagesTtl
2219
- > = z.nativeEnum(DeploymentStreamMessagesTtl);
2220
-
2221
- /** @internal */
2222
- export type DeploymentStreamMessagesCacheControl$Outbound = {
2223
- type: string;
2224
- ttl: string;
2225
- };
2226
-
2227
- /** @internal */
2228
- export const DeploymentStreamMessagesCacheControl$outboundSchema: z.ZodType<
2229
- DeploymentStreamMessagesCacheControl$Outbound,
2230
- z.ZodTypeDef,
2231
- DeploymentStreamMessagesCacheControl
2232
- > = z.object({
2233
- type: DeploymentStreamMessagesDeploymentsType$outboundSchema,
2234
- ttl: DeploymentStreamMessagesTtl$outboundSchema.default("5m"),
2235
- });
2236
-
2237
- export function deploymentStreamMessagesCacheControlToJSON(
2238
- deploymentStreamMessagesCacheControl: DeploymentStreamMessagesCacheControl,
2239
- ): string {
2240
- return JSON.stringify(
2241
- DeploymentStreamMessagesCacheControl$outboundSchema.parse(
2242
- deploymentStreamMessagesCacheControl,
2243
- ),
2244
- );
2245
- }
2246
-
2247
- /** @internal */
2248
- export type DeploymentStreamMessagesToolMessage$Outbound = {
2249
- role: "tool";
2250
- content: string | Array<components.TextContentPartSchema$Outbound>;
2251
- tool_call_id: string | null;
2252
- cache_control?: DeploymentStreamMessagesCacheControl$Outbound | undefined;
2253
- };
2254
-
2255
- /** @internal */
2256
- export const DeploymentStreamMessagesToolMessage$outboundSchema: z.ZodType<
2257
- DeploymentStreamMessagesToolMessage$Outbound,
2258
- z.ZodTypeDef,
2259
- DeploymentStreamMessagesToolMessage
2260
- > = z.object({
2261
- role: z.literal("tool"),
2262
- content: z.union([
2263
- z.string(),
2264
- z.array(components.TextContentPartSchema$outboundSchema),
2265
- ]),
2266
- toolCallId: z.nullable(z.string()),
2267
- cacheControl: z.lazy(() =>
2268
- DeploymentStreamMessagesCacheControl$outboundSchema
2269
- ).optional(),
2270
- }).transform((v) => {
2271
- return remap$(v, {
2272
- toolCallId: "tool_call_id",
2273
- cacheControl: "cache_control",
2274
- });
2275
- });
2276
-
2277
- export function deploymentStreamMessagesToolMessageToJSON(
2278
- deploymentStreamMessagesToolMessage: DeploymentStreamMessagesToolMessage,
2279
- ): string {
2280
- return JSON.stringify(
2281
- DeploymentStreamMessagesToolMessage$outboundSchema.parse(
2282
- deploymentStreamMessagesToolMessage,
2283
- ),
2284
- );
2285
- }
2286
-
2287
- /** @internal */
2288
- export type DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$Outbound =
2289
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2290
- | components.RefusalPartSchema$Outbound
2291
- | components.ReasoningPartSchema$Outbound
2292
- | components.RedactedReasoningPartSchema$Outbound;
2293
-
2294
- /** @internal */
2295
- export const DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$outboundSchema:
2296
- z.ZodType<
2297
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$Outbound,
2298
- z.ZodTypeDef,
2299
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages2
2300
- > = z.union([
2301
- components.TextContentPartSchema$outboundSchema.and(
2302
- z.object({ type: z.literal("text") }),
2303
- ),
2304
- components.RefusalPartSchema$outboundSchema,
2305
- components.ReasoningPartSchema$outboundSchema,
2306
- components.RedactedReasoningPartSchema$outboundSchema,
2307
- ]);
2308
-
2309
- export function deploymentStreamContentDeploymentsRequestRequestBodyMessages2ToJSON(
2310
- deploymentStreamContentDeploymentsRequestRequestBodyMessages2:
2311
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages2,
2312
- ): string {
2313
- return JSON.stringify(
2314
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$outboundSchema
2315
- .parse(deploymentStreamContentDeploymentsRequestRequestBodyMessages2),
2316
- );
2317
- }
2318
-
2319
- /** @internal */
2320
- export type DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$Outbound =
2321
- | string
2322
- | Array<
2323
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2324
- | components.RefusalPartSchema$Outbound
2325
- | components.ReasoningPartSchema$Outbound
2326
- | components.RedactedReasoningPartSchema$Outbound
2327
- >;
2328
-
2329
- /** @internal */
2330
- export const DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$outboundSchema:
2331
- z.ZodType<
2332
- DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$Outbound,
2333
- z.ZodTypeDef,
2334
- DeploymentStreamMessagesDeploymentsRequestRequestBodyContent
2335
- > = z.union([
2336
- z.string(),
2337
- z.array(
2338
- z.union([
2339
- components.TextContentPartSchema$outboundSchema.and(
2340
- z.object({ type: z.literal("text") }),
2341
- ),
2342
- components.RefusalPartSchema$outboundSchema,
2343
- components.ReasoningPartSchema$outboundSchema,
2344
- components.RedactedReasoningPartSchema$outboundSchema,
2345
- ]),
2346
- ),
2347
- ]);
2348
-
2349
- export function deploymentStreamMessagesDeploymentsRequestRequestBodyContentToJSON(
2350
- deploymentStreamMessagesDeploymentsRequestRequestBodyContent:
2351
- DeploymentStreamMessagesDeploymentsRequestRequestBodyContent,
2352
- ): string {
2353
- return JSON.stringify(
2354
- DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$outboundSchema
2355
- .parse(deploymentStreamMessagesDeploymentsRequestRequestBodyContent),
2356
- );
2357
- }
2358
-
2359
- /** @internal */
2360
- export type DeploymentStreamMessagesAudio$Outbound = {
2361
- id: string;
2362
- };
2363
-
2364
- /** @internal */
2365
- export const DeploymentStreamMessagesAudio$outboundSchema: z.ZodType<
2366
- DeploymentStreamMessagesAudio$Outbound,
2367
- z.ZodTypeDef,
2368
- DeploymentStreamMessagesAudio
2369
- > = z.object({
2370
- id: z.string(),
2371
- });
2372
-
2373
- export function deploymentStreamMessagesAudioToJSON(
2374
- deploymentStreamMessagesAudio: DeploymentStreamMessagesAudio,
2375
- ): string {
2376
- return JSON.stringify(
2377
- DeploymentStreamMessagesAudio$outboundSchema.parse(
2378
- deploymentStreamMessagesAudio,
2379
- ),
2380
- );
2381
- }
2382
-
2383
- /** @internal */
2384
- export const DeploymentStreamMessagesType$outboundSchema: z.ZodNativeEnum<
2385
- typeof DeploymentStreamMessagesType
2386
- > = z.nativeEnum(DeploymentStreamMessagesType);
2387
-
2388
- /** @internal */
2389
- export type DeploymentStreamMessagesFunction$Outbound = {
2390
- name?: string | undefined;
2391
- arguments?: string | undefined;
2392
- };
2393
-
2394
- /** @internal */
2395
- export const DeploymentStreamMessagesFunction$outboundSchema: z.ZodType<
2396
- DeploymentStreamMessagesFunction$Outbound,
2397
- z.ZodTypeDef,
2398
- DeploymentStreamMessagesFunction
2399
- > = z.object({
2400
- name: z.string().optional(),
2401
- arguments: z.string().optional(),
2402
- });
2403
-
2404
- export function deploymentStreamMessagesFunctionToJSON(
2405
- deploymentStreamMessagesFunction: DeploymentStreamMessagesFunction,
2406
- ): string {
2407
- return JSON.stringify(
2408
- DeploymentStreamMessagesFunction$outboundSchema.parse(
2409
- deploymentStreamMessagesFunction,
2410
- ),
2411
- );
2412
- }
2413
-
2414
- /** @internal */
2415
- export type DeploymentStreamMessagesToolCalls$Outbound = {
2416
- id: string;
2417
- type: string;
2418
- function: DeploymentStreamMessagesFunction$Outbound;
2419
- thought_signature?: string | undefined;
2420
- };
2421
-
2422
- /** @internal */
2423
- export const DeploymentStreamMessagesToolCalls$outboundSchema: z.ZodType<
2424
- DeploymentStreamMessagesToolCalls$Outbound,
2425
- z.ZodTypeDef,
2426
- DeploymentStreamMessagesToolCalls
2427
- > = z.object({
2428
- id: z.string(),
2429
- type: DeploymentStreamMessagesType$outboundSchema,
2430
- function: z.lazy(() => DeploymentStreamMessagesFunction$outboundSchema),
2431
- thoughtSignature: z.string().optional(),
2432
- }).transform((v) => {
2433
- return remap$(v, {
2434
- thoughtSignature: "thought_signature",
2435
- });
2436
- });
2437
-
2438
- export function deploymentStreamMessagesToolCallsToJSON(
2439
- deploymentStreamMessagesToolCalls: DeploymentStreamMessagesToolCalls,
2440
- ): string {
2441
- return JSON.stringify(
2442
- DeploymentStreamMessagesToolCalls$outboundSchema.parse(
2443
- deploymentStreamMessagesToolCalls,
2444
- ),
2445
- );
2446
- }
2447
-
2448
- /** @internal */
2449
- export type DeploymentStreamMessagesAssistantMessage$Outbound = {
2450
- content?:
2451
- | string
2452
- | Array<
2453
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2454
- | components.RefusalPartSchema$Outbound
2455
- | components.ReasoningPartSchema$Outbound
2456
- | components.RedactedReasoningPartSchema$Outbound
2457
- >
2458
- | null
2459
- | undefined;
2460
- refusal?: string | null | undefined;
2461
- role: "assistant";
2462
- name?: string | undefined;
2463
- audio?: DeploymentStreamMessagesAudio$Outbound | null | undefined;
2464
- tool_calls?: Array<DeploymentStreamMessagesToolCalls$Outbound> | undefined;
2465
- };
2466
-
2467
- /** @internal */
2468
- export const DeploymentStreamMessagesAssistantMessage$outboundSchema: z.ZodType<
2469
- DeploymentStreamMessagesAssistantMessage$Outbound,
2470
- z.ZodTypeDef,
2471
- DeploymentStreamMessagesAssistantMessage
2472
- > = z.object({
2473
- content: z.nullable(
2474
- z.union([
2475
- z.string(),
2476
- z.array(
2477
- z.union([
2478
- components.TextContentPartSchema$outboundSchema.and(
2479
- z.object({ type: z.literal("text") }),
2480
- ),
2481
- components.RefusalPartSchema$outboundSchema,
2482
- components.ReasoningPartSchema$outboundSchema,
2483
- components.RedactedReasoningPartSchema$outboundSchema,
2484
- ]),
2485
- ),
2486
- ]),
2487
- ).optional(),
2488
- refusal: z.nullable(z.string()).optional(),
2489
- role: z.literal("assistant"),
2490
- name: z.string().optional(),
2491
- audio: z.nullable(z.lazy(() => DeploymentStreamMessagesAudio$outboundSchema))
2492
- .optional(),
2493
- toolCalls: z.array(
2494
- z.lazy(() => DeploymentStreamMessagesToolCalls$outboundSchema),
2495
- ).optional(),
2496
- }).transform((v) => {
2497
- return remap$(v, {
2498
- toolCalls: "tool_calls",
2499
- });
2500
- });
2501
-
2502
- export function deploymentStreamMessagesAssistantMessageToJSON(
2503
- deploymentStreamMessagesAssistantMessage:
2504
- DeploymentStreamMessagesAssistantMessage,
2505
- ): string {
2506
- return JSON.stringify(
2507
- DeploymentStreamMessagesAssistantMessage$outboundSchema.parse(
2508
- deploymentStreamMessagesAssistantMessage,
2509
- ),
2510
- );
2511
- }
2512
-
2513
- /** @internal */
2514
- export const DeploymentStream2DeploymentsRequestRequestBodyType$outboundSchema:
2515
- z.ZodNativeEnum<typeof DeploymentStream2DeploymentsRequestRequestBodyType> = z
2516
- .nativeEnum(DeploymentStream2DeploymentsRequestRequestBodyType);
2517
-
2518
- /** @internal */
2519
- export const DeploymentStream2DeploymentsTtl$outboundSchema: z.ZodNativeEnum<
2520
- typeof DeploymentStream2DeploymentsTtl
2521
- > = z.nativeEnum(DeploymentStream2DeploymentsTtl);
2522
-
2523
- /** @internal */
2524
- export type DeploymentStream2DeploymentsCacheControl$Outbound = {
2525
- type: string;
2526
- ttl: string;
2527
- };
2528
-
2529
- /** @internal */
2530
- export const DeploymentStream2DeploymentsCacheControl$outboundSchema: z.ZodType<
2531
- DeploymentStream2DeploymentsCacheControl$Outbound,
2532
- z.ZodTypeDef,
2533
- DeploymentStream2DeploymentsCacheControl
2534
- > = z.object({
2535
- type: DeploymentStream2DeploymentsRequestRequestBodyType$outboundSchema,
2536
- ttl: DeploymentStream2DeploymentsTtl$outboundSchema.default("5m"),
2537
- });
2538
-
2539
- export function deploymentStream2DeploymentsCacheControlToJSON(
2540
- deploymentStream2DeploymentsCacheControl:
2541
- DeploymentStream2DeploymentsCacheControl,
2542
- ): string {
2543
- return JSON.stringify(
2544
- DeploymentStream2DeploymentsCacheControl$outboundSchema.parse(
2545
- deploymentStream2DeploymentsCacheControl,
2546
- ),
2547
- );
2548
- }
2549
-
2550
- /** @internal */
2551
- export type DeploymentStream2Deployments4$Outbound = {
2552
- type: "file";
2553
- cache_control?: DeploymentStream2DeploymentsCacheControl$Outbound | undefined;
2554
- file: components.FileContentPartSchema$Outbound;
2555
- };
2556
-
2557
- /** @internal */
2558
- export const DeploymentStream2Deployments4$outboundSchema: z.ZodType<
2559
- DeploymentStream2Deployments4$Outbound,
2560
- z.ZodTypeDef,
2561
- DeploymentStream2Deployments4
2562
- > = z.object({
2563
- type: z.literal("file"),
2564
- cacheControl: z.lazy(() =>
2565
- DeploymentStream2DeploymentsCacheControl$outboundSchema
2566
- ).optional(),
2567
- file: components.FileContentPartSchema$outboundSchema,
2568
- }).transform((v) => {
2569
- return remap$(v, {
2570
- cacheControl: "cache_control",
2571
- });
2572
- });
2573
-
2574
- export function deploymentStream2Deployments4ToJSON(
2575
- deploymentStream2Deployments4: DeploymentStream2Deployments4,
2576
- ): string {
2577
- return JSON.stringify(
2578
- DeploymentStream2Deployments4$outboundSchema.parse(
2579
- deploymentStream2Deployments4,
2580
- ),
2581
- );
2582
- }
2583
-
2584
- /** @internal */
2585
- export type DeploymentStreamContentDeploymentsRequestRequestBody2$Outbound =
2586
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2587
- | components.ImageContentPartSchema$Outbound
2588
- | components.AudioContentPartSchema$Outbound
2589
- | DeploymentStream2Deployments4$Outbound;
2590
-
2591
- /** @internal */
2592
- export const DeploymentStreamContentDeploymentsRequestRequestBody2$outboundSchema:
2593
- z.ZodType<
2594
- DeploymentStreamContentDeploymentsRequestRequestBody2$Outbound,
2595
- z.ZodTypeDef,
2596
- DeploymentStreamContentDeploymentsRequestRequestBody2
2597
- > = z.union([
2598
- components.TextContentPartSchema$outboundSchema.and(
2599
- z.object({ type: z.literal("text") }),
2600
- ),
2601
- components.ImageContentPartSchema$outboundSchema,
2602
- components.AudioContentPartSchema$outboundSchema,
2603
- z.lazy(() => DeploymentStream2Deployments4$outboundSchema),
2604
- ]);
2605
-
2606
- export function deploymentStreamContentDeploymentsRequestRequestBody2ToJSON(
2607
- deploymentStreamContentDeploymentsRequestRequestBody2:
2608
- DeploymentStreamContentDeploymentsRequestRequestBody2,
2609
- ): string {
2610
- return JSON.stringify(
2611
- DeploymentStreamContentDeploymentsRequestRequestBody2$outboundSchema.parse(
2612
- deploymentStreamContentDeploymentsRequestRequestBody2,
2613
- ),
2614
- );
2615
- }
2616
-
2617
- /** @internal */
2618
- export type DeploymentStreamMessagesDeploymentsRequestContent$Outbound =
2619
- | string
2620
- | Array<
2621
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2622
- | components.ImageContentPartSchema$Outbound
2623
- | components.AudioContentPartSchema$Outbound
2624
- | DeploymentStream2Deployments4$Outbound
2625
- >;
2626
-
2627
- /** @internal */
2628
- export const DeploymentStreamMessagesDeploymentsRequestContent$outboundSchema:
2629
- z.ZodType<
2630
- DeploymentStreamMessagesDeploymentsRequestContent$Outbound,
2631
- z.ZodTypeDef,
2632
- DeploymentStreamMessagesDeploymentsRequestContent
2633
- > = z.union([
2634
- z.string(),
2635
- z.array(
2636
- z.union([
2637
- components.TextContentPartSchema$outboundSchema.and(
2638
- z.object({ type: z.literal("text") }),
2639
- ),
2640
- components.ImageContentPartSchema$outboundSchema,
2641
- components.AudioContentPartSchema$outboundSchema,
2642
- z.lazy(() => DeploymentStream2Deployments4$outboundSchema),
2643
- ]),
2644
- ),
2645
- ]);
2646
-
2647
- export function deploymentStreamMessagesDeploymentsRequestContentToJSON(
2648
- deploymentStreamMessagesDeploymentsRequestContent:
2649
- DeploymentStreamMessagesDeploymentsRequestContent,
2650
- ): string {
2651
- return JSON.stringify(
2652
- DeploymentStreamMessagesDeploymentsRequestContent$outboundSchema.parse(
2653
- deploymentStreamMessagesDeploymentsRequestContent,
2654
- ),
2655
- );
2656
- }
2657
-
2658
- /** @internal */
2659
- export type DeploymentStreamMessagesUserMessage$Outbound = {
2660
- role: "user";
2661
- name?: string | undefined;
2662
- content:
2663
- | string
2664
- | Array<
2665
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2666
- | components.ImageContentPartSchema$Outbound
2667
- | components.AudioContentPartSchema$Outbound
2668
- | DeploymentStream2Deployments4$Outbound
2669
- >;
2670
- };
2671
-
2672
- /** @internal */
2673
- export const DeploymentStreamMessagesUserMessage$outboundSchema: z.ZodType<
2674
- DeploymentStreamMessagesUserMessage$Outbound,
2675
- z.ZodTypeDef,
2676
- DeploymentStreamMessagesUserMessage
2677
- > = z.object({
2678
- role: z.literal("user"),
2679
- name: z.string().optional(),
2680
- content: z.union([
2681
- z.string(),
2682
- z.array(
2683
- z.union([
2684
- components.TextContentPartSchema$outboundSchema.and(
2685
- z.object({ type: z.literal("text") }),
2686
- ),
2687
- components.ImageContentPartSchema$outboundSchema,
2688
- components.AudioContentPartSchema$outboundSchema,
2689
- z.lazy(() => DeploymentStream2Deployments4$outboundSchema),
2690
- ]),
2691
- ),
2692
- ]),
2693
- });
2694
-
2695
- export function deploymentStreamMessagesUserMessageToJSON(
2696
- deploymentStreamMessagesUserMessage: DeploymentStreamMessagesUserMessage,
2697
- ): string {
2698
- return JSON.stringify(
2699
- DeploymentStreamMessagesUserMessage$outboundSchema.parse(
2700
- deploymentStreamMessagesUserMessage,
2701
- ),
2702
- );
2703
- }
2704
-
2705
- /** @internal */
2706
- export type DeploymentStreamMessagesDeploymentsContent$Outbound =
2707
- | string
2708
- | Array<components.TextContentPartSchema$Outbound>;
2709
-
2710
- /** @internal */
2711
- export const DeploymentStreamMessagesDeploymentsContent$outboundSchema:
2712
- z.ZodType<
2713
- DeploymentStreamMessagesDeploymentsContent$Outbound,
2714
- z.ZodTypeDef,
2715
- DeploymentStreamMessagesDeploymentsContent
2716
- > = z.union([
2717
- z.string(),
2718
- z.array(components.TextContentPartSchema$outboundSchema),
2719
- ]);
2720
-
2721
- export function deploymentStreamMessagesDeploymentsContentToJSON(
2722
- deploymentStreamMessagesDeploymentsContent:
2723
- DeploymentStreamMessagesDeploymentsContent,
2724
- ): string {
2725
- return JSON.stringify(
2726
- DeploymentStreamMessagesDeploymentsContent$outboundSchema.parse(
2727
- deploymentStreamMessagesDeploymentsContent,
2728
- ),
2729
- );
2730
- }
2731
-
2732
- /** @internal */
2733
- export type DeploymentStreamMessagesDeveloperMessage$Outbound = {
2734
- role: "developer";
2735
- content: string | Array<components.TextContentPartSchema$Outbound>;
2736
- name?: string | undefined;
2737
- };
2738
-
2739
- /** @internal */
2740
- export const DeploymentStreamMessagesDeveloperMessage$outboundSchema: z.ZodType<
2741
- DeploymentStreamMessagesDeveloperMessage$Outbound,
2742
- z.ZodTypeDef,
2743
- DeploymentStreamMessagesDeveloperMessage
2744
- > = z.object({
2745
- role: z.literal("developer"),
2746
- content: z.union([
2747
- z.string(),
2748
- z.array(components.TextContentPartSchema$outboundSchema),
2749
- ]),
2750
- name: z.string().optional(),
2751
- });
2752
-
2753
- export function deploymentStreamMessagesDeveloperMessageToJSON(
2754
- deploymentStreamMessagesDeveloperMessage:
2755
- DeploymentStreamMessagesDeveloperMessage,
2756
- ): string {
2757
- return JSON.stringify(
2758
- DeploymentStreamMessagesDeveloperMessage$outboundSchema.parse(
2759
- deploymentStreamMessagesDeveloperMessage,
2760
- ),
2761
- );
2762
- }
2763
-
2764
- /** @internal */
2765
- export type DeploymentStreamMessagesContent$Outbound =
2766
- | string
2767
- | Array<components.TextContentPartSchema$Outbound>;
2768
-
2769
- /** @internal */
2770
- export const DeploymentStreamMessagesContent$outboundSchema: z.ZodType<
2771
- DeploymentStreamMessagesContent$Outbound,
2772
- z.ZodTypeDef,
2773
- DeploymentStreamMessagesContent
2774
- > = z.union([
2775
- z.string(),
2776
- z.array(components.TextContentPartSchema$outboundSchema),
2777
- ]);
2778
-
2779
- export function deploymentStreamMessagesContentToJSON(
2780
- deploymentStreamMessagesContent: DeploymentStreamMessagesContent,
2781
- ): string {
2782
- return JSON.stringify(
2783
- DeploymentStreamMessagesContent$outboundSchema.parse(
2784
- deploymentStreamMessagesContent,
2785
- ),
2786
- );
2787
- }
2788
-
2789
- /** @internal */
2790
- export type DeploymentStreamMessagesSystemMessage$Outbound = {
2791
- role: "system";
2792
- content: string | Array<components.TextContentPartSchema$Outbound>;
2793
- name?: string | undefined;
2794
- };
2795
-
2796
- /** @internal */
2797
- export const DeploymentStreamMessagesSystemMessage$outboundSchema: z.ZodType<
2798
- DeploymentStreamMessagesSystemMessage$Outbound,
2799
- z.ZodTypeDef,
2800
- DeploymentStreamMessagesSystemMessage
2801
- > = z.object({
2802
- role: z.literal("system"),
2803
- content: z.union([
2804
- z.string(),
2805
- z.array(components.TextContentPartSchema$outboundSchema),
2806
- ]),
2807
- name: z.string().optional(),
2808
- });
2809
-
2810
- export function deploymentStreamMessagesSystemMessageToJSON(
2811
- deploymentStreamMessagesSystemMessage: DeploymentStreamMessagesSystemMessage,
2812
- ): string {
2813
- return JSON.stringify(
2814
- DeploymentStreamMessagesSystemMessage$outboundSchema.parse(
2815
- deploymentStreamMessagesSystemMessage,
2816
- ),
2817
- );
2818
- }
2819
-
2820
- /** @internal */
2821
- export type DeploymentStreamMessages$Outbound =
2822
- | DeploymentStreamMessagesSystemMessage$Outbound
2823
- | DeploymentStreamMessagesDeveloperMessage$Outbound
2824
- | DeploymentStreamMessagesUserMessage$Outbound
2825
- | DeploymentStreamMessagesAssistantMessage$Outbound
2826
- | DeploymentStreamMessagesToolMessage$Outbound;
2827
-
2828
- /** @internal */
2829
- export const DeploymentStreamMessages$outboundSchema: z.ZodType<
2830
- DeploymentStreamMessages$Outbound,
2831
- z.ZodTypeDef,
2832
- DeploymentStreamMessages
2833
- > = z.union([
2834
- z.lazy(() => DeploymentStreamMessagesSystemMessage$outboundSchema),
2835
- z.lazy(() => DeploymentStreamMessagesDeveloperMessage$outboundSchema),
2836
- z.lazy(() => DeploymentStreamMessagesUserMessage$outboundSchema),
2837
- z.lazy(() => DeploymentStreamMessagesAssistantMessage$outboundSchema),
2838
- z.lazy(() => DeploymentStreamMessagesToolMessage$outboundSchema),
2839
- ]);
2840
-
2841
- export function deploymentStreamMessagesToJSON(
2842
- deploymentStreamMessages: DeploymentStreamMessages,
2843
- ): string {
2844
- return JSON.stringify(
2845
- DeploymentStreamMessages$outboundSchema.parse(deploymentStreamMessages),
2846
- );
2847
- }
2848
-
2849
- /** @internal */
2850
- export type DeploymentStreamMetadata$Outbound = {
2851
- file_name?: string | undefined;
2852
- file_type?: string | undefined;
2853
- page_number?: number | undefined;
2854
- };
2855
-
2856
- /** @internal */
2857
- export const DeploymentStreamMetadata$outboundSchema: z.ZodType<
2858
- DeploymentStreamMetadata$Outbound,
2859
- z.ZodTypeDef,
2860
- DeploymentStreamMetadata
2861
- > = z.object({
2862
- fileName: z.string().optional(),
2863
- fileType: z.string().optional(),
2864
- pageNumber: z.number().optional(),
2865
- }).transform((v) => {
2866
- return remap$(v, {
2867
- fileName: "file_name",
2868
- fileType: "file_type",
2869
- pageNumber: "page_number",
2870
- });
2871
- });
2872
-
2873
- export function deploymentStreamMetadataToJSON(
2874
- deploymentStreamMetadata: DeploymentStreamMetadata,
2875
- ): string {
2876
- return JSON.stringify(
2877
- DeploymentStreamMetadata$outboundSchema.parse(deploymentStreamMetadata),
2878
- );
2879
- }
2880
-
2881
- /** @internal */
2882
- export type DeploymentStreamDocuments$Outbound = {
2883
- text: string;
2884
- metadata?: DeploymentStreamMetadata$Outbound | undefined;
2885
- };
2886
-
2887
- /** @internal */
2888
- export const DeploymentStreamDocuments$outboundSchema: z.ZodType<
2889
- DeploymentStreamDocuments$Outbound,
2890
- z.ZodTypeDef,
2891
- DeploymentStreamDocuments
2892
- > = z.object({
2893
- text: z.string(),
2894
- metadata: z.lazy(() => DeploymentStreamMetadata$outboundSchema).optional(),
2895
- });
2896
-
2897
- export function deploymentStreamDocumentsToJSON(
2898
- deploymentStreamDocuments: DeploymentStreamDocuments,
2899
- ): string {
2900
- return JSON.stringify(
2901
- DeploymentStreamDocuments$outboundSchema.parse(deploymentStreamDocuments),
2902
- );
2903
- }
2904
-
2905
- /** @internal */
2906
- export type DeploymentStreamInvokeOptions$Outbound = {
2907
- include_retrievals: boolean;
2908
- include_usage: boolean;
2909
- mock_response?: string | undefined;
2910
- };
2911
-
2912
- /** @internal */
2913
- export const DeploymentStreamInvokeOptions$outboundSchema: z.ZodType<
2914
- DeploymentStreamInvokeOptions$Outbound,
2915
- z.ZodTypeDef,
2916
- DeploymentStreamInvokeOptions
2917
- > = z.object({
2918
- includeRetrievals: z.boolean().default(false),
2919
- includeUsage: z.boolean().default(false),
2920
- mockResponse: z.string().optional(),
2921
- }).transform((v) => {
2922
- return remap$(v, {
2923
- includeRetrievals: "include_retrievals",
2924
- includeUsage: "include_usage",
2925
- mockResponse: "mock_response",
2926
- });
2927
- });
2928
-
2929
- export function deploymentStreamInvokeOptionsToJSON(
2930
- deploymentStreamInvokeOptions: DeploymentStreamInvokeOptions,
2931
- ): string {
2932
- return JSON.stringify(
2933
- DeploymentStreamInvokeOptions$outboundSchema.parse(
2934
- deploymentStreamInvokeOptions,
2935
- ),
2936
- );
2937
- }
2938
-
2939
- /** @internal */
2940
- export type DeploymentStreamThread$Outbound = {
2941
- id: string;
2942
- tags?: Array<string> | undefined;
2943
- };
2944
-
2945
- /** @internal */
2946
- export const DeploymentStreamThread$outboundSchema: z.ZodType<
2947
- DeploymentStreamThread$Outbound,
2948
- z.ZodTypeDef,
2949
- DeploymentStreamThread
2950
- > = z.object({
2951
- id: z.string(),
2952
- tags: z.array(z.string()).optional(),
2953
- });
2954
-
2955
- export function deploymentStreamThreadToJSON(
2956
- deploymentStreamThread: DeploymentStreamThread,
2957
- ): string {
2958
- return JSON.stringify(
2959
- DeploymentStreamThread$outboundSchema.parse(deploymentStreamThread),
2960
- );
2961
- }
2962
-
2963
- /** @internal */
2964
- export type DeploymentStreamOrExists$Outbound = {
2965
- exists: boolean;
2966
- };
2967
-
2968
- /** @internal */
2969
- export const DeploymentStreamOrExists$outboundSchema: z.ZodType<
2970
- DeploymentStreamOrExists$Outbound,
2971
- z.ZodTypeDef,
2972
- DeploymentStreamOrExists
2973
- > = z.object({
2974
- exists: z.boolean(),
2975
- });
2976
-
2977
- export function deploymentStreamOrExistsToJSON(
2978
- deploymentStreamOrExists: DeploymentStreamOrExists,
2979
- ): string {
2980
- return JSON.stringify(
2981
- DeploymentStreamOrExists$outboundSchema.parse(deploymentStreamOrExists),
2982
- );
2983
- }
2984
-
2985
- /** @internal */
2986
- export type DeploymentStreamOrDeploymentsNin$Outbound =
2987
- | string
2988
- | number
2989
- | boolean;
2990
-
2991
- /** @internal */
2992
- export const DeploymentStreamOrDeploymentsNin$outboundSchema: z.ZodType<
2993
- DeploymentStreamOrDeploymentsNin$Outbound,
2994
- z.ZodTypeDef,
2995
- DeploymentStreamOrDeploymentsNin
2996
- > = z.union([z.string(), z.number(), z.boolean()]);
2997
-
2998
- export function deploymentStreamOrDeploymentsNinToJSON(
2999
- deploymentStreamOrDeploymentsNin: DeploymentStreamOrDeploymentsNin,
3000
- ): string {
3001
- return JSON.stringify(
3002
- DeploymentStreamOrDeploymentsNin$outboundSchema.parse(
3003
- deploymentStreamOrDeploymentsNin,
3004
- ),
3005
- );
3006
- }
3007
-
3008
- /** @internal */
3009
- export type DeploymentStreamOrNin$Outbound = {
3010
- nin: Array<string | number | boolean>;
3011
- };
3012
-
3013
- /** @internal */
3014
- export const DeploymentStreamOrNin$outboundSchema: z.ZodType<
3015
- DeploymentStreamOrNin$Outbound,
3016
- z.ZodTypeDef,
3017
- DeploymentStreamOrNin
3018
- > = z.object({
3019
- nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3020
- });
3021
-
3022
- export function deploymentStreamOrNinToJSON(
3023
- deploymentStreamOrNin: DeploymentStreamOrNin,
3024
- ): string {
3025
- return JSON.stringify(
3026
- DeploymentStreamOrNin$outboundSchema.parse(deploymentStreamOrNin),
3027
- );
3028
- }
3029
-
3030
- /** @internal */
3031
- export type DeploymentStreamOrDeploymentsIn$Outbound =
3032
- | string
3033
- | number
3034
- | boolean;
3035
-
3036
- /** @internal */
3037
- export const DeploymentStreamOrDeploymentsIn$outboundSchema: z.ZodType<
3038
- DeploymentStreamOrDeploymentsIn$Outbound,
3039
- z.ZodTypeDef,
3040
- DeploymentStreamOrDeploymentsIn
3041
- > = z.union([z.string(), z.number(), z.boolean()]);
3042
-
3043
- export function deploymentStreamOrDeploymentsInToJSON(
3044
- deploymentStreamOrDeploymentsIn: DeploymentStreamOrDeploymentsIn,
3045
- ): string {
3046
- return JSON.stringify(
3047
- DeploymentStreamOrDeploymentsIn$outboundSchema.parse(
3048
- deploymentStreamOrDeploymentsIn,
3049
- ),
3050
- );
3051
- }
3052
-
3053
- /** @internal */
3054
- export type DeploymentStreamOrIn$Outbound = {
3055
- in: Array<string | number | boolean>;
3056
- };
3057
-
3058
- /** @internal */
3059
- export const DeploymentStreamOrIn$outboundSchema: z.ZodType<
3060
- DeploymentStreamOrIn$Outbound,
3061
- z.ZodTypeDef,
3062
- DeploymentStreamOrIn
3063
- > = z.object({
3064
- in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3065
- });
3066
-
3067
- export function deploymentStreamOrInToJSON(
3068
- deploymentStreamOrIn: DeploymentStreamOrIn,
3069
- ): string {
3070
- return JSON.stringify(
3071
- DeploymentStreamOrIn$outboundSchema.parse(deploymentStreamOrIn),
3072
- );
3073
- }
3074
-
3075
- /** @internal */
3076
- export type DeploymentStreamOrLte$Outbound = {
3077
- lte: number;
3078
- };
3079
-
3080
- /** @internal */
3081
- export const DeploymentStreamOrLte$outboundSchema: z.ZodType<
3082
- DeploymentStreamOrLte$Outbound,
3083
- z.ZodTypeDef,
3084
- DeploymentStreamOrLte
3085
- > = z.object({
3086
- lte: z.number(),
3087
- });
3088
-
3089
- export function deploymentStreamOrLteToJSON(
3090
- deploymentStreamOrLte: DeploymentStreamOrLte,
3091
- ): string {
3092
- return JSON.stringify(
3093
- DeploymentStreamOrLte$outboundSchema.parse(deploymentStreamOrLte),
3094
- );
3095
- }
3096
-
3097
- /** @internal */
3098
- export type DeploymentStreamOrLt$Outbound = {
3099
- lt: number;
3100
- };
3101
-
3102
- /** @internal */
3103
- export const DeploymentStreamOrLt$outboundSchema: z.ZodType<
3104
- DeploymentStreamOrLt$Outbound,
3105
- z.ZodTypeDef,
3106
- DeploymentStreamOrLt
3107
- > = z.object({
3108
- lt: z.number(),
3109
- });
3110
-
3111
- export function deploymentStreamOrLtToJSON(
3112
- deploymentStreamOrLt: DeploymentStreamOrLt,
3113
- ): string {
3114
- return JSON.stringify(
3115
- DeploymentStreamOrLt$outboundSchema.parse(deploymentStreamOrLt),
3116
- );
3117
- }
3118
-
3119
- /** @internal */
3120
- export type DeploymentStreamOrGte$Outbound = {
3121
- gte: number;
3122
- };
3123
-
3124
- /** @internal */
3125
- export const DeploymentStreamOrGte$outboundSchema: z.ZodType<
3126
- DeploymentStreamOrGte$Outbound,
3127
- z.ZodTypeDef,
3128
- DeploymentStreamOrGte
3129
- > = z.object({
3130
- gte: z.number(),
3131
- });
3132
-
3133
- export function deploymentStreamOrGteToJSON(
3134
- deploymentStreamOrGte: DeploymentStreamOrGte,
3135
- ): string {
3136
- return JSON.stringify(
3137
- DeploymentStreamOrGte$outboundSchema.parse(deploymentStreamOrGte),
3138
- );
3139
- }
3140
-
3141
- /** @internal */
3142
- export type DeploymentStreamOrGt$Outbound = {
3143
- gt: number;
3144
- };
3145
-
3146
- /** @internal */
3147
- export const DeploymentStreamOrGt$outboundSchema: z.ZodType<
3148
- DeploymentStreamOrGt$Outbound,
3149
- z.ZodTypeDef,
3150
- DeploymentStreamOrGt
3151
- > = z.object({
3152
- gt: z.number(),
3153
- });
3154
-
3155
- export function deploymentStreamOrGtToJSON(
3156
- deploymentStreamOrGt: DeploymentStreamOrGt,
3157
- ): string {
3158
- return JSON.stringify(
3159
- DeploymentStreamOrGt$outboundSchema.parse(deploymentStreamOrGt),
3160
- );
3161
- }
3162
-
3163
- /** @internal */
3164
- export type DeploymentStreamOrDeploymentsNe$Outbound =
3165
- | string
3166
- | number
3167
- | boolean;
3168
-
3169
- /** @internal */
3170
- export const DeploymentStreamOrDeploymentsNe$outboundSchema: z.ZodType<
3171
- DeploymentStreamOrDeploymentsNe$Outbound,
3172
- z.ZodTypeDef,
3173
- DeploymentStreamOrDeploymentsNe
3174
- > = z.union([z.string(), z.number(), z.boolean()]);
3175
-
3176
- export function deploymentStreamOrDeploymentsNeToJSON(
3177
- deploymentStreamOrDeploymentsNe: DeploymentStreamOrDeploymentsNe,
3178
- ): string {
3179
- return JSON.stringify(
3180
- DeploymentStreamOrDeploymentsNe$outboundSchema.parse(
3181
- deploymentStreamOrDeploymentsNe,
3182
- ),
3183
- );
3184
- }
3185
-
3186
- /** @internal */
3187
- export type DeploymentStreamOrNe$Outbound = {
3188
- ne: string | number | boolean;
3189
- };
3190
-
3191
- /** @internal */
3192
- export const DeploymentStreamOrNe$outboundSchema: z.ZodType<
3193
- DeploymentStreamOrNe$Outbound,
3194
- z.ZodTypeDef,
3195
- DeploymentStreamOrNe
3196
- > = z.object({
3197
- ne: z.union([z.string(), z.number(), z.boolean()]),
3198
- });
3199
-
3200
- export function deploymentStreamOrNeToJSON(
3201
- deploymentStreamOrNe: DeploymentStreamOrNe,
3202
- ): string {
3203
- return JSON.stringify(
3204
- DeploymentStreamOrNe$outboundSchema.parse(deploymentStreamOrNe),
3205
- );
3206
- }
3207
-
3208
- /** @internal */
3209
- export type DeploymentStreamOrDeploymentsEq$Outbound =
3210
- | string
3211
- | number
3212
- | boolean;
3213
-
3214
- /** @internal */
3215
- export const DeploymentStreamOrDeploymentsEq$outboundSchema: z.ZodType<
3216
- DeploymentStreamOrDeploymentsEq$Outbound,
3217
- z.ZodTypeDef,
3218
- DeploymentStreamOrDeploymentsEq
3219
- > = z.union([z.string(), z.number(), z.boolean()]);
3220
-
3221
- export function deploymentStreamOrDeploymentsEqToJSON(
3222
- deploymentStreamOrDeploymentsEq: DeploymentStreamOrDeploymentsEq,
3223
- ): string {
3224
- return JSON.stringify(
3225
- DeploymentStreamOrDeploymentsEq$outboundSchema.parse(
3226
- deploymentStreamOrDeploymentsEq,
3227
- ),
3228
- );
3229
- }
3230
-
3231
- /** @internal */
3232
- export type DeploymentStreamOrEq$Outbound = {
3233
- eq: string | number | boolean;
3234
- };
3235
-
3236
- /** @internal */
3237
- export const DeploymentStreamOrEq$outboundSchema: z.ZodType<
3238
- DeploymentStreamOrEq$Outbound,
3239
- z.ZodTypeDef,
3240
- DeploymentStreamOrEq
3241
- > = z.object({
3242
- eq: z.union([z.string(), z.number(), z.boolean()]),
3243
- });
3244
-
3245
- export function deploymentStreamOrEqToJSON(
3246
- deploymentStreamOrEq: DeploymentStreamOrEq,
3247
- ): string {
3248
- return JSON.stringify(
3249
- DeploymentStreamOrEq$outboundSchema.parse(deploymentStreamOrEq),
3250
- );
3251
- }
3252
-
3253
- /** @internal */
3254
- export type DeploymentStreamKnowledgeFilterDeploymentsOr$Outbound =
3255
- | DeploymentStreamOrEq$Outbound
3256
- | DeploymentStreamOrNe$Outbound
3257
- | DeploymentStreamOrGt$Outbound
3258
- | DeploymentStreamOrGte$Outbound
3259
- | DeploymentStreamOrLt$Outbound
3260
- | DeploymentStreamOrLte$Outbound
3261
- | DeploymentStreamOrIn$Outbound
3262
- | DeploymentStreamOrNin$Outbound
3263
- | DeploymentStreamOrExists$Outbound;
3264
-
3265
- /** @internal */
3266
- export const DeploymentStreamKnowledgeFilterDeploymentsOr$outboundSchema:
3267
- z.ZodType<
3268
- DeploymentStreamKnowledgeFilterDeploymentsOr$Outbound,
3269
- z.ZodTypeDef,
3270
- DeploymentStreamKnowledgeFilterDeploymentsOr
3271
- > = z.union([
3272
- z.lazy(() => DeploymentStreamOrEq$outboundSchema),
3273
- z.lazy(() => DeploymentStreamOrNe$outboundSchema),
3274
- z.lazy(() => DeploymentStreamOrGt$outboundSchema),
3275
- z.lazy(() => DeploymentStreamOrGte$outboundSchema),
3276
- z.lazy(() => DeploymentStreamOrLt$outboundSchema),
3277
- z.lazy(() => DeploymentStreamOrLte$outboundSchema),
3278
- z.lazy(() => DeploymentStreamOrIn$outboundSchema),
3279
- z.lazy(() => DeploymentStreamOrNin$outboundSchema),
3280
- z.lazy(() => DeploymentStreamOrExists$outboundSchema),
3281
- ]);
3282
-
3283
- export function deploymentStreamKnowledgeFilterDeploymentsOrToJSON(
3284
- deploymentStreamKnowledgeFilterDeploymentsOr:
3285
- DeploymentStreamKnowledgeFilterDeploymentsOr,
3286
- ): string {
3287
- return JSON.stringify(
3288
- DeploymentStreamKnowledgeFilterDeploymentsOr$outboundSchema.parse(
3289
- deploymentStreamKnowledgeFilterDeploymentsOr,
3290
- ),
3291
- );
3292
- }
3293
-
3294
- /** @internal */
3295
- export type DeploymentStreamKnowledgeFilterOr$Outbound = {
3296
- or: Array<
3297
- {
3298
- [k: string]:
3299
- | DeploymentStreamOrEq$Outbound
3300
- | DeploymentStreamOrNe$Outbound
3301
- | DeploymentStreamOrGt$Outbound
3302
- | DeploymentStreamOrGte$Outbound
3303
- | DeploymentStreamOrLt$Outbound
3304
- | DeploymentStreamOrLte$Outbound
3305
- | DeploymentStreamOrIn$Outbound
3306
- | DeploymentStreamOrNin$Outbound
3307
- | DeploymentStreamOrExists$Outbound;
3308
- }
3309
- >;
3310
- };
3311
-
3312
- /** @internal */
3313
- export const DeploymentStreamKnowledgeFilterOr$outboundSchema: z.ZodType<
3314
- DeploymentStreamKnowledgeFilterOr$Outbound,
3315
- z.ZodTypeDef,
3316
- DeploymentStreamKnowledgeFilterOr
3317
- > = z.object({
3318
- or: z.array(
3319
- z.record(z.union([
3320
- z.lazy(() => DeploymentStreamOrEq$outboundSchema),
3321
- z.lazy(() =>
3322
- DeploymentStreamOrNe$outboundSchema
3323
- ),
3324
- z.lazy(() => DeploymentStreamOrGt$outboundSchema),
3325
- z.lazy(() => DeploymentStreamOrGte$outboundSchema),
3326
- z.lazy(() => DeploymentStreamOrLt$outboundSchema),
3327
- z.lazy(() => DeploymentStreamOrLte$outboundSchema),
3328
- z.lazy(() => DeploymentStreamOrIn$outboundSchema),
3329
- z.lazy(() => DeploymentStreamOrNin$outboundSchema),
3330
- z.lazy(() => DeploymentStreamOrExists$outboundSchema),
3331
- ])),
3332
- ),
3333
- });
3334
-
3335
- export function deploymentStreamKnowledgeFilterOrToJSON(
3336
- deploymentStreamKnowledgeFilterOr: DeploymentStreamKnowledgeFilterOr,
3337
- ): string {
3338
- return JSON.stringify(
3339
- DeploymentStreamKnowledgeFilterOr$outboundSchema.parse(
3340
- deploymentStreamKnowledgeFilterOr,
3341
- ),
3342
- );
3343
- }
3344
-
3345
- /** @internal */
3346
- export type DeploymentStreamAndExists$Outbound = {
3347
- exists: boolean;
3348
- };
3349
-
3350
- /** @internal */
3351
- export const DeploymentStreamAndExists$outboundSchema: z.ZodType<
3352
- DeploymentStreamAndExists$Outbound,
3353
- z.ZodTypeDef,
3354
- DeploymentStreamAndExists
3355
- > = z.object({
3356
- exists: z.boolean(),
3357
- });
3358
-
3359
- export function deploymentStreamAndExistsToJSON(
3360
- deploymentStreamAndExists: DeploymentStreamAndExists,
3361
- ): string {
3362
- return JSON.stringify(
3363
- DeploymentStreamAndExists$outboundSchema.parse(deploymentStreamAndExists),
3364
- );
3365
- }
3366
-
3367
- /** @internal */
3368
- export type DeploymentStreamAndDeploymentsNin$Outbound =
3369
- | string
3370
- | number
3371
- | boolean;
3372
-
3373
- /** @internal */
3374
- export const DeploymentStreamAndDeploymentsNin$outboundSchema: z.ZodType<
3375
- DeploymentStreamAndDeploymentsNin$Outbound,
3376
- z.ZodTypeDef,
3377
- DeploymentStreamAndDeploymentsNin
3378
- > = z.union([z.string(), z.number(), z.boolean()]);
3379
-
3380
- export function deploymentStreamAndDeploymentsNinToJSON(
3381
- deploymentStreamAndDeploymentsNin: DeploymentStreamAndDeploymentsNin,
3382
- ): string {
3383
- return JSON.stringify(
3384
- DeploymentStreamAndDeploymentsNin$outboundSchema.parse(
3385
- deploymentStreamAndDeploymentsNin,
3386
- ),
3387
- );
3388
- }
3389
-
3390
- /** @internal */
3391
- export type DeploymentStreamAndNin$Outbound = {
3392
- nin: Array<string | number | boolean>;
3393
- };
3394
-
3395
- /** @internal */
3396
- export const DeploymentStreamAndNin$outboundSchema: z.ZodType<
3397
- DeploymentStreamAndNin$Outbound,
3398
- z.ZodTypeDef,
3399
- DeploymentStreamAndNin
3400
- > = z.object({
3401
- nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3402
- });
3403
-
3404
- export function deploymentStreamAndNinToJSON(
3405
- deploymentStreamAndNin: DeploymentStreamAndNin,
3406
- ): string {
3407
- return JSON.stringify(
3408
- DeploymentStreamAndNin$outboundSchema.parse(deploymentStreamAndNin),
3409
- );
3410
- }
3411
-
3412
- /** @internal */
3413
- export type DeploymentStreamAndDeploymentsIn$Outbound =
3414
- | string
3415
- | number
3416
- | boolean;
3417
-
3418
- /** @internal */
3419
- export const DeploymentStreamAndDeploymentsIn$outboundSchema: z.ZodType<
3420
- DeploymentStreamAndDeploymentsIn$Outbound,
3421
- z.ZodTypeDef,
3422
- DeploymentStreamAndDeploymentsIn
3423
- > = z.union([z.string(), z.number(), z.boolean()]);
3424
-
3425
- export function deploymentStreamAndDeploymentsInToJSON(
3426
- deploymentStreamAndDeploymentsIn: DeploymentStreamAndDeploymentsIn,
3427
- ): string {
3428
- return JSON.stringify(
3429
- DeploymentStreamAndDeploymentsIn$outboundSchema.parse(
3430
- deploymentStreamAndDeploymentsIn,
3431
- ),
3432
- );
3433
- }
3434
-
3435
- /** @internal */
3436
- export type DeploymentStreamAndIn$Outbound = {
3437
- in: Array<string | number | boolean>;
3438
- };
3439
-
3440
- /** @internal */
3441
- export const DeploymentStreamAndIn$outboundSchema: z.ZodType<
3442
- DeploymentStreamAndIn$Outbound,
3443
- z.ZodTypeDef,
3444
- DeploymentStreamAndIn
3445
- > = z.object({
3446
- in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3447
- });
3448
-
3449
- export function deploymentStreamAndInToJSON(
3450
- deploymentStreamAndIn: DeploymentStreamAndIn,
3451
- ): string {
3452
- return JSON.stringify(
3453
- DeploymentStreamAndIn$outboundSchema.parse(deploymentStreamAndIn),
3454
- );
3455
- }
3456
-
3457
- /** @internal */
3458
- export type DeploymentStreamAndLte$Outbound = {
3459
- lte: number;
3460
- };
3461
-
3462
- /** @internal */
3463
- export const DeploymentStreamAndLte$outboundSchema: z.ZodType<
3464
- DeploymentStreamAndLte$Outbound,
3465
- z.ZodTypeDef,
3466
- DeploymentStreamAndLte
3467
- > = z.object({
3468
- lte: z.number(),
3469
- });
3470
-
3471
- export function deploymentStreamAndLteToJSON(
3472
- deploymentStreamAndLte: DeploymentStreamAndLte,
3473
- ): string {
3474
- return JSON.stringify(
3475
- DeploymentStreamAndLte$outboundSchema.parse(deploymentStreamAndLte),
3476
- );
3477
- }
3478
-
3479
- /** @internal */
3480
- export type DeploymentStreamAndLt$Outbound = {
3481
- lt: number;
3482
- };
3483
-
3484
- /** @internal */
3485
- export const DeploymentStreamAndLt$outboundSchema: z.ZodType<
3486
- DeploymentStreamAndLt$Outbound,
3487
- z.ZodTypeDef,
3488
- DeploymentStreamAndLt
3489
- > = z.object({
3490
- lt: z.number(),
3491
- });
3492
-
3493
- export function deploymentStreamAndLtToJSON(
3494
- deploymentStreamAndLt: DeploymentStreamAndLt,
3495
- ): string {
3496
- return JSON.stringify(
3497
- DeploymentStreamAndLt$outboundSchema.parse(deploymentStreamAndLt),
3498
- );
3499
- }
3500
-
3501
- /** @internal */
3502
- export type DeploymentStreamAndGte$Outbound = {
3503
- gte: number;
3504
- };
3505
-
3506
- /** @internal */
3507
- export const DeploymentStreamAndGte$outboundSchema: z.ZodType<
3508
- DeploymentStreamAndGte$Outbound,
3509
- z.ZodTypeDef,
3510
- DeploymentStreamAndGte
3511
- > = z.object({
3512
- gte: z.number(),
3513
- });
3514
-
3515
- export function deploymentStreamAndGteToJSON(
3516
- deploymentStreamAndGte: DeploymentStreamAndGte,
3517
- ): string {
3518
- return JSON.stringify(
3519
- DeploymentStreamAndGte$outboundSchema.parse(deploymentStreamAndGte),
3520
- );
3521
- }
3522
-
3523
- /** @internal */
3524
- export type DeploymentStreamAndGt$Outbound = {
3525
- gt: number;
3526
- };
3527
-
3528
- /** @internal */
3529
- export const DeploymentStreamAndGt$outboundSchema: z.ZodType<
3530
- DeploymentStreamAndGt$Outbound,
3531
- z.ZodTypeDef,
3532
- DeploymentStreamAndGt
3533
- > = z.object({
3534
- gt: z.number(),
3535
- });
3536
-
3537
- export function deploymentStreamAndGtToJSON(
3538
- deploymentStreamAndGt: DeploymentStreamAndGt,
3539
- ): string {
3540
- return JSON.stringify(
3541
- DeploymentStreamAndGt$outboundSchema.parse(deploymentStreamAndGt),
3542
- );
3543
- }
3544
-
3545
- /** @internal */
3546
- export type DeploymentStreamAndDeploymentsNe$Outbound =
3547
- | string
3548
- | number
3549
- | boolean;
3550
-
3551
- /** @internal */
3552
- export const DeploymentStreamAndDeploymentsNe$outboundSchema: z.ZodType<
3553
- DeploymentStreamAndDeploymentsNe$Outbound,
3554
- z.ZodTypeDef,
3555
- DeploymentStreamAndDeploymentsNe
3556
- > = z.union([z.string(), z.number(), z.boolean()]);
3557
-
3558
- export function deploymentStreamAndDeploymentsNeToJSON(
3559
- deploymentStreamAndDeploymentsNe: DeploymentStreamAndDeploymentsNe,
3560
- ): string {
3561
- return JSON.stringify(
3562
- DeploymentStreamAndDeploymentsNe$outboundSchema.parse(
3563
- deploymentStreamAndDeploymentsNe,
3564
- ),
3565
- );
3566
- }
3567
-
3568
- /** @internal */
3569
- export type DeploymentStreamAndNe$Outbound = {
3570
- ne: string | number | boolean;
3571
- };
3572
-
3573
- /** @internal */
3574
- export const DeploymentStreamAndNe$outboundSchema: z.ZodType<
3575
- DeploymentStreamAndNe$Outbound,
3576
- z.ZodTypeDef,
3577
- DeploymentStreamAndNe
3578
- > = z.object({
3579
- ne: z.union([z.string(), z.number(), z.boolean()]),
3580
- });
3581
-
3582
- export function deploymentStreamAndNeToJSON(
3583
- deploymentStreamAndNe: DeploymentStreamAndNe,
3584
- ): string {
3585
- return JSON.stringify(
3586
- DeploymentStreamAndNe$outboundSchema.parse(deploymentStreamAndNe),
3587
- );
3588
- }
3589
-
3590
- /** @internal */
3591
- export type DeploymentStreamAndDeploymentsEq$Outbound =
3592
- | string
3593
- | number
3594
- | boolean;
3595
-
3596
- /** @internal */
3597
- export const DeploymentStreamAndDeploymentsEq$outboundSchema: z.ZodType<
3598
- DeploymentStreamAndDeploymentsEq$Outbound,
3599
- z.ZodTypeDef,
3600
- DeploymentStreamAndDeploymentsEq
3601
- > = z.union([z.string(), z.number(), z.boolean()]);
3602
-
3603
- export function deploymentStreamAndDeploymentsEqToJSON(
3604
- deploymentStreamAndDeploymentsEq: DeploymentStreamAndDeploymentsEq,
3605
- ): string {
3606
- return JSON.stringify(
3607
- DeploymentStreamAndDeploymentsEq$outboundSchema.parse(
3608
- deploymentStreamAndDeploymentsEq,
3609
- ),
3610
- );
3611
- }
3612
-
3613
- /** @internal */
3614
- export type DeploymentStreamAndEq$Outbound = {
3615
- eq: string | number | boolean;
3616
- };
3617
-
3618
- /** @internal */
3619
- export const DeploymentStreamAndEq$outboundSchema: z.ZodType<
3620
- DeploymentStreamAndEq$Outbound,
3621
- z.ZodTypeDef,
3622
- DeploymentStreamAndEq
3623
- > = z.object({
3624
- eq: z.union([z.string(), z.number(), z.boolean()]),
3625
- });
3626
-
3627
- export function deploymentStreamAndEqToJSON(
3628
- deploymentStreamAndEq: DeploymentStreamAndEq,
3629
- ): string {
3630
- return JSON.stringify(
3631
- DeploymentStreamAndEq$outboundSchema.parse(deploymentStreamAndEq),
3632
- );
3633
- }
3634
-
3635
- /** @internal */
3636
- export type DeploymentStreamKnowledgeFilterDeploymentsAnd$Outbound =
3637
- | DeploymentStreamAndEq$Outbound
3638
- | DeploymentStreamAndNe$Outbound
3639
- | DeploymentStreamAndGt$Outbound
3640
- | DeploymentStreamAndGte$Outbound
3641
- | DeploymentStreamAndLt$Outbound
3642
- | DeploymentStreamAndLte$Outbound
3643
- | DeploymentStreamAndIn$Outbound
3644
- | DeploymentStreamAndNin$Outbound
3645
- | DeploymentStreamAndExists$Outbound;
3646
-
3647
- /** @internal */
3648
- export const DeploymentStreamKnowledgeFilterDeploymentsAnd$outboundSchema:
3649
- z.ZodType<
3650
- DeploymentStreamKnowledgeFilterDeploymentsAnd$Outbound,
3651
- z.ZodTypeDef,
3652
- DeploymentStreamKnowledgeFilterDeploymentsAnd
3653
- > = z.union([
3654
- z.lazy(() => DeploymentStreamAndEq$outboundSchema),
3655
- z.lazy(() => DeploymentStreamAndNe$outboundSchema),
3656
- z.lazy(() => DeploymentStreamAndGt$outboundSchema),
3657
- z.lazy(() => DeploymentStreamAndGte$outboundSchema),
3658
- z.lazy(() => DeploymentStreamAndLt$outboundSchema),
3659
- z.lazy(() => DeploymentStreamAndLte$outboundSchema),
3660
- z.lazy(() => DeploymentStreamAndIn$outboundSchema),
3661
- z.lazy(() => DeploymentStreamAndNin$outboundSchema),
3662
- z.lazy(() => DeploymentStreamAndExists$outboundSchema),
3663
- ]);
3664
-
3665
- export function deploymentStreamKnowledgeFilterDeploymentsAndToJSON(
3666
- deploymentStreamKnowledgeFilterDeploymentsAnd:
3667
- DeploymentStreamKnowledgeFilterDeploymentsAnd,
3668
- ): string {
3669
- return JSON.stringify(
3670
- DeploymentStreamKnowledgeFilterDeploymentsAnd$outboundSchema.parse(
3671
- deploymentStreamKnowledgeFilterDeploymentsAnd,
3672
- ),
3673
- );
3674
- }
3675
-
3676
- /** @internal */
3677
- export type DeploymentStreamKnowledgeFilterAnd$Outbound = {
3678
- and: Array<
3679
- {
3680
- [k: string]:
3681
- | DeploymentStreamAndEq$Outbound
3682
- | DeploymentStreamAndNe$Outbound
3683
- | DeploymentStreamAndGt$Outbound
3684
- | DeploymentStreamAndGte$Outbound
3685
- | DeploymentStreamAndLt$Outbound
3686
- | DeploymentStreamAndLte$Outbound
3687
- | DeploymentStreamAndIn$Outbound
3688
- | DeploymentStreamAndNin$Outbound
3689
- | DeploymentStreamAndExists$Outbound;
3690
- }
3691
- >;
3692
- };
3693
-
3694
- /** @internal */
3695
- export const DeploymentStreamKnowledgeFilterAnd$outboundSchema: z.ZodType<
3696
- DeploymentStreamKnowledgeFilterAnd$Outbound,
3697
- z.ZodTypeDef,
3698
- DeploymentStreamKnowledgeFilterAnd
3699
- > = z.object({
3700
- and: z.array(
3701
- z.record(z.union([
3702
- z.lazy(() => DeploymentStreamAndEq$outboundSchema),
3703
- z.lazy(() =>
3704
- DeploymentStreamAndNe$outboundSchema
3705
- ),
3706
- z.lazy(() => DeploymentStreamAndGt$outboundSchema),
3707
- z.lazy(() => DeploymentStreamAndGte$outboundSchema),
3708
- z.lazy(() => DeploymentStreamAndLt$outboundSchema),
3709
- z.lazy(() => DeploymentStreamAndLte$outboundSchema),
3710
- z.lazy(() => DeploymentStreamAndIn$outboundSchema),
3711
- z.lazy(() => DeploymentStreamAndNin$outboundSchema),
3712
- z.lazy(() => DeploymentStreamAndExists$outboundSchema),
3713
- ])),
3714
- ),
3715
- });
3716
-
3717
- export function deploymentStreamKnowledgeFilterAndToJSON(
3718
- deploymentStreamKnowledgeFilterAnd: DeploymentStreamKnowledgeFilterAnd,
3719
- ): string {
3720
- return JSON.stringify(
3721
- DeploymentStreamKnowledgeFilterAnd$outboundSchema.parse(
3722
- deploymentStreamKnowledgeFilterAnd,
3723
- ),
3724
- );
3725
- }
3726
-
3727
- /** @internal */
3728
- export type OneExists$Outbound = {
3729
- exists: boolean;
3730
- };
3731
-
3732
- /** @internal */
3733
- export const OneExists$outboundSchema: z.ZodType<
3734
- OneExists$Outbound,
3735
- z.ZodTypeDef,
3736
- OneExists
3737
- > = z.object({
3738
- exists: z.boolean(),
3739
- });
3740
-
3741
- export function oneExistsToJSON(oneExists: OneExists): string {
3742
- return JSON.stringify(OneExists$outboundSchema.parse(oneExists));
3743
- }
3744
-
3745
- /** @internal */
3746
- export type DeploymentStream1DeploymentsNin$Outbound =
3747
- | string
3748
- | number
3749
- | boolean;
3750
-
3751
- /** @internal */
3752
- export const DeploymentStream1DeploymentsNin$outboundSchema: z.ZodType<
3753
- DeploymentStream1DeploymentsNin$Outbound,
3754
- z.ZodTypeDef,
3755
- DeploymentStream1DeploymentsNin
3756
- > = z.union([z.string(), z.number(), z.boolean()]);
3757
-
3758
- export function deploymentStream1DeploymentsNinToJSON(
3759
- deploymentStream1DeploymentsNin: DeploymentStream1DeploymentsNin,
3760
- ): string {
3761
- return JSON.stringify(
3762
- DeploymentStream1DeploymentsNin$outboundSchema.parse(
3763
- deploymentStream1DeploymentsNin,
3764
- ),
3765
- );
3766
- }
3767
-
3768
- /** @internal */
3769
- export type DeploymentStream1Nin$Outbound = {
3770
- nin: Array<string | number | boolean>;
3771
- };
3772
-
3773
- /** @internal */
3774
- export const DeploymentStream1Nin$outboundSchema: z.ZodType<
3775
- DeploymentStream1Nin$Outbound,
3776
- z.ZodTypeDef,
3777
- DeploymentStream1Nin
3778
- > = z.object({
3779
- nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3780
- });
3781
-
3782
- export function deploymentStream1NinToJSON(
3783
- deploymentStream1Nin: DeploymentStream1Nin,
3784
- ): string {
3785
- return JSON.stringify(
3786
- DeploymentStream1Nin$outboundSchema.parse(deploymentStream1Nin),
3787
- );
3788
- }
3789
-
3790
- /** @internal */
3791
- export type DeploymentStream1DeploymentsIn$Outbound = string | number | boolean;
3792
-
3793
- /** @internal */
3794
- export const DeploymentStream1DeploymentsIn$outboundSchema: z.ZodType<
3795
- DeploymentStream1DeploymentsIn$Outbound,
3796
- z.ZodTypeDef,
3797
- DeploymentStream1DeploymentsIn
3798
- > = z.union([z.string(), z.number(), z.boolean()]);
3799
-
3800
- export function deploymentStream1DeploymentsInToJSON(
3801
- deploymentStream1DeploymentsIn: DeploymentStream1DeploymentsIn,
3802
- ): string {
3803
- return JSON.stringify(
3804
- DeploymentStream1DeploymentsIn$outboundSchema.parse(
3805
- deploymentStream1DeploymentsIn,
3806
- ),
3807
- );
3808
- }
3809
-
3810
- /** @internal */
3811
- export type DeploymentStream1In$Outbound = {
3812
- in: Array<string | number | boolean>;
3813
- };
3814
-
3815
- /** @internal */
3816
- export const DeploymentStream1In$outboundSchema: z.ZodType<
3817
- DeploymentStream1In$Outbound,
3818
- z.ZodTypeDef,
3819
- DeploymentStream1In
3820
- > = z.object({
3821
- in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3822
- });
3823
-
3824
- export function deploymentStream1InToJSON(
3825
- deploymentStream1In: DeploymentStream1In,
3826
- ): string {
3827
- return JSON.stringify(
3828
- DeploymentStream1In$outboundSchema.parse(deploymentStream1In),
3829
- );
3830
- }
3831
-
3832
- /** @internal */
3833
- export type OneLte$Outbound = {
3834
- lte: number;
3835
- };
3836
-
3837
- /** @internal */
3838
- export const OneLte$outboundSchema: z.ZodType<
3839
- OneLte$Outbound,
3840
- z.ZodTypeDef,
3841
- OneLte
3842
- > = z.object({
3843
- lte: z.number(),
3844
- });
3845
-
3846
- export function oneLteToJSON(oneLte: OneLte): string {
3847
- return JSON.stringify(OneLte$outboundSchema.parse(oneLte));
3848
- }
3849
-
3850
- /** @internal */
3851
- export type OneLt$Outbound = {
3852
- lt: number;
3853
- };
3854
-
3855
- /** @internal */
3856
- export const OneLt$outboundSchema: z.ZodType<
3857
- OneLt$Outbound,
3858
- z.ZodTypeDef,
3859
- OneLt
3860
- > = z.object({
3861
- lt: z.number(),
3862
- });
3863
-
3864
- export function oneLtToJSON(oneLt: OneLt): string {
3865
- return JSON.stringify(OneLt$outboundSchema.parse(oneLt));
3866
- }
3867
-
3868
- /** @internal */
3869
- export type OneGte$Outbound = {
3870
- gte: number;
3871
- };
3872
-
3873
- /** @internal */
3874
- export const OneGte$outboundSchema: z.ZodType<
3875
- OneGte$Outbound,
3876
- z.ZodTypeDef,
3877
- OneGte
3878
- > = z.object({
3879
- gte: z.number(),
3880
- });
3881
-
3882
- export function oneGteToJSON(oneGte: OneGte): string {
3883
- return JSON.stringify(OneGte$outboundSchema.parse(oneGte));
3884
- }
3885
-
3886
- /** @internal */
3887
- export type OneGt$Outbound = {
3888
- gt: number;
3889
- };
3890
-
3891
- /** @internal */
3892
- export const OneGt$outboundSchema: z.ZodType<
3893
- OneGt$Outbound,
3894
- z.ZodTypeDef,
3895
- OneGt
3896
- > = z.object({
3897
- gt: z.number(),
3898
- });
3899
-
3900
- export function oneGtToJSON(oneGt: OneGt): string {
3901
- return JSON.stringify(OneGt$outboundSchema.parse(oneGt));
3902
- }
3903
-
3904
- /** @internal */
3905
- export type DeploymentStream1DeploymentsNe$Outbound = string | number | boolean;
3906
-
3907
- /** @internal */
3908
- export const DeploymentStream1DeploymentsNe$outboundSchema: z.ZodType<
3909
- DeploymentStream1DeploymentsNe$Outbound,
3910
- z.ZodTypeDef,
3911
- DeploymentStream1DeploymentsNe
3912
- > = z.union([z.string(), z.number(), z.boolean()]);
3913
-
3914
- export function deploymentStream1DeploymentsNeToJSON(
3915
- deploymentStream1DeploymentsNe: DeploymentStream1DeploymentsNe,
3916
- ): string {
3917
- return JSON.stringify(
3918
- DeploymentStream1DeploymentsNe$outboundSchema.parse(
3919
- deploymentStream1DeploymentsNe,
3920
- ),
3921
- );
3922
- }
3923
-
3924
- /** @internal */
3925
- export type DeploymentStream1Ne$Outbound = {
3926
- ne: string | number | boolean;
3927
- };
3928
-
3929
- /** @internal */
3930
- export const DeploymentStream1Ne$outboundSchema: z.ZodType<
3931
- DeploymentStream1Ne$Outbound,
3932
- z.ZodTypeDef,
3933
- DeploymentStream1Ne
3934
- > = z.object({
3935
- ne: z.union([z.string(), z.number(), z.boolean()]),
3936
- });
3937
-
3938
- export function deploymentStream1NeToJSON(
3939
- deploymentStream1Ne: DeploymentStream1Ne,
3940
- ): string {
3941
- return JSON.stringify(
3942
- DeploymentStream1Ne$outboundSchema.parse(deploymentStream1Ne),
3943
- );
3944
- }
3945
-
3946
- /** @internal */
3947
- export type DeploymentStream1DeploymentsEq$Outbound = string | number | boolean;
3948
-
3949
- /** @internal */
3950
- export const DeploymentStream1DeploymentsEq$outboundSchema: z.ZodType<
3951
- DeploymentStream1DeploymentsEq$Outbound,
3952
- z.ZodTypeDef,
3953
- DeploymentStream1DeploymentsEq
3954
- > = z.union([z.string(), z.number(), z.boolean()]);
3955
-
3956
- export function deploymentStream1DeploymentsEqToJSON(
3957
- deploymentStream1DeploymentsEq: DeploymentStream1DeploymentsEq,
3958
- ): string {
3959
- return JSON.stringify(
3960
- DeploymentStream1DeploymentsEq$outboundSchema.parse(
3961
- deploymentStream1DeploymentsEq,
3962
- ),
3963
- );
3964
- }
3965
-
3966
- /** @internal */
3967
- export type DeploymentStream1Eq$Outbound = {
3968
- eq: string | number | boolean;
3969
- };
3970
-
3971
- /** @internal */
3972
- export const DeploymentStream1Eq$outboundSchema: z.ZodType<
3973
- DeploymentStream1Eq$Outbound,
3974
- z.ZodTypeDef,
3975
- DeploymentStream1Eq
3976
- > = z.object({
3977
- eq: z.union([z.string(), z.number(), z.boolean()]),
3978
- });
3979
-
3980
- export function deploymentStream1EqToJSON(
3981
- deploymentStream1Eq: DeploymentStream1Eq,
3982
- ): string {
3983
- return JSON.stringify(
3984
- DeploymentStream1Eq$outboundSchema.parse(deploymentStream1Eq),
3985
- );
3986
- }
3987
-
3988
- /** @internal */
3989
- export type DeploymentStreamKnowledgeFilter1$Outbound =
3990
- | DeploymentStream1Eq$Outbound
3991
- | DeploymentStream1Ne$Outbound
3992
- | OneGt$Outbound
3993
- | OneGte$Outbound
3994
- | OneLt$Outbound
3995
- | OneLte$Outbound
3996
- | DeploymentStream1In$Outbound
3997
- | DeploymentStream1Nin$Outbound
3998
- | OneExists$Outbound;
3999
-
4000
- /** @internal */
4001
- export const DeploymentStreamKnowledgeFilter1$outboundSchema: z.ZodType<
4002
- DeploymentStreamKnowledgeFilter1$Outbound,
4003
- z.ZodTypeDef,
4004
- DeploymentStreamKnowledgeFilter1
4005
- > = z.union([
4006
- z.lazy(() => DeploymentStream1Eq$outboundSchema),
4007
- z.lazy(() => DeploymentStream1Ne$outboundSchema),
4008
- z.lazy(() => OneGt$outboundSchema),
4009
- z.lazy(() => OneGte$outboundSchema),
4010
- z.lazy(() => OneLt$outboundSchema),
4011
- z.lazy(() => OneLte$outboundSchema),
4012
- z.lazy(() => DeploymentStream1In$outboundSchema),
4013
- z.lazy(() => DeploymentStream1Nin$outboundSchema),
4014
- z.lazy(() => OneExists$outboundSchema),
4015
- ]);
4016
-
4017
- export function deploymentStreamKnowledgeFilter1ToJSON(
4018
- deploymentStreamKnowledgeFilter1: DeploymentStreamKnowledgeFilter1,
4019
- ): string {
4020
- return JSON.stringify(
4021
- DeploymentStreamKnowledgeFilter1$outboundSchema.parse(
4022
- deploymentStreamKnowledgeFilter1,
4023
- ),
4024
- );
4025
- }
4026
-
4027
- /** @internal */
4028
- export type DeploymentStreamKnowledgeFilter$Outbound =
4029
- | DeploymentStreamKnowledgeFilterAnd$Outbound
4030
- | DeploymentStreamKnowledgeFilterOr$Outbound
4031
- | {
4032
- [k: string]:
4033
- | DeploymentStream1Eq$Outbound
4034
- | DeploymentStream1Ne$Outbound
4035
- | OneGt$Outbound
4036
- | OneGte$Outbound
4037
- | OneLt$Outbound
4038
- | OneLte$Outbound
4039
- | DeploymentStream1In$Outbound
4040
- | DeploymentStream1Nin$Outbound
4041
- | OneExists$Outbound;
4042
- };
4043
-
4044
- /** @internal */
4045
- export const DeploymentStreamKnowledgeFilter$outboundSchema: z.ZodType<
4046
- DeploymentStreamKnowledgeFilter$Outbound,
4047
- z.ZodTypeDef,
4048
- DeploymentStreamKnowledgeFilter
4049
- > = z.union([
4050
- z.lazy(() => DeploymentStreamKnowledgeFilterAnd$outboundSchema),
4051
- z.lazy(() => DeploymentStreamKnowledgeFilterOr$outboundSchema),
4052
- z.record(z.union([
4053
- z.lazy(() => DeploymentStream1Eq$outboundSchema),
4054
- z.lazy(() => DeploymentStream1Ne$outboundSchema),
4055
- z.lazy(() => OneGt$outboundSchema),
4056
- z.lazy(() => OneGte$outboundSchema),
4057
- z.lazy(() => OneLt$outboundSchema),
4058
- z.lazy(() => OneLte$outboundSchema),
4059
- z.lazy(() => DeploymentStream1In$outboundSchema),
4060
- z.lazy(() => DeploymentStream1Nin$outboundSchema),
4061
- z.lazy(() => OneExists$outboundSchema),
4062
- ])),
4063
- ]);
4064
-
4065
- export function deploymentStreamKnowledgeFilterToJSON(
4066
- deploymentStreamKnowledgeFilter: DeploymentStreamKnowledgeFilter,
4067
- ): string {
4068
- return JSON.stringify(
4069
- DeploymentStreamKnowledgeFilter$outboundSchema.parse(
4070
- deploymentStreamKnowledgeFilter,
4071
- ),
4072
- );
4073
- }
4074
-
4075
- /** @internal */
4076
- export type DeploymentStreamRequestBody$Outbound = {
4077
- key: string;
4078
- inputs?: { [k: string]: any } | undefined;
4079
- context?: { [k: string]: any } | undefined;
4080
- prefix_messages?:
4081
- | Array<
4082
- | PrefixMessagesSystemMessage$Outbound
4083
- | PrefixMessagesDeveloperMessage$Outbound
4084
- | PrefixMessagesUserMessage$Outbound
4085
- | PrefixMessagesAssistantMessage$Outbound
4086
- | PrefixMessagesToolMessage$Outbound
4087
- >
4088
- | undefined;
4089
- messages?:
4090
- | Array<
4091
- | DeploymentStreamMessagesSystemMessage$Outbound
4092
- | DeploymentStreamMessagesDeveloperMessage$Outbound
4093
- | DeploymentStreamMessagesUserMessage$Outbound
4094
- | DeploymentStreamMessagesAssistantMessage$Outbound
4095
- | DeploymentStreamMessagesToolMessage$Outbound
4096
- >
4097
- | undefined;
4098
- file_ids?: Array<string> | undefined;
4099
- metadata?: { [k: string]: any } | undefined;
4100
- extra_params?: { [k: string]: any } | undefined;
4101
- documents?: Array<DeploymentStreamDocuments$Outbound> | undefined;
4102
- invoke_options?: DeploymentStreamInvokeOptions$Outbound | undefined;
4103
- thread?: DeploymentStreamThread$Outbound | undefined;
4104
- knowledge_filter?:
4105
- | DeploymentStreamKnowledgeFilterAnd$Outbound
4106
- | DeploymentStreamKnowledgeFilterOr$Outbound
4107
- | {
4108
- [k: string]:
4109
- | DeploymentStream1Eq$Outbound
4110
- | DeploymentStream1Ne$Outbound
4111
- | OneGt$Outbound
4112
- | OneGte$Outbound
4113
- | OneLt$Outbound
4114
- | OneLte$Outbound
4115
- | DeploymentStream1In$Outbound
4116
- | DeploymentStream1Nin$Outbound
4117
- | OneExists$Outbound;
4118
- }
4119
- | undefined;
4120
- };
4121
-
4122
- /** @internal */
4123
- export const DeploymentStreamRequestBody$outboundSchema: z.ZodType<
4124
- DeploymentStreamRequestBody$Outbound,
4125
- z.ZodTypeDef,
4126
- DeploymentStreamRequestBody
4127
- > = z.object({
4128
- key: z.string(),
4129
- inputs: z.record(z.any()).optional(),
4130
- context: z.record(z.any()).optional(),
4131
- prefixMessages: z.array(
4132
- z.union([
4133
- z.lazy(() => PrefixMessagesSystemMessage$outboundSchema),
4134
- z.lazy(() => PrefixMessagesDeveloperMessage$outboundSchema),
4135
- z.lazy(() => PrefixMessagesUserMessage$outboundSchema),
4136
- z.lazy(() => PrefixMessagesAssistantMessage$outboundSchema),
4137
- z.lazy(() => PrefixMessagesToolMessage$outboundSchema),
4138
- ]),
4139
- ).optional(),
4140
- messages: z.array(
4141
- z.union([
4142
- z.lazy(() => DeploymentStreamMessagesSystemMessage$outboundSchema),
4143
- z.lazy(() => DeploymentStreamMessagesDeveloperMessage$outboundSchema),
4144
- z.lazy(() => DeploymentStreamMessagesUserMessage$outboundSchema),
4145
- z.lazy(() => DeploymentStreamMessagesAssistantMessage$outboundSchema),
4146
- z.lazy(() => DeploymentStreamMessagesToolMessage$outboundSchema),
4147
- ]),
4148
- ).optional(),
4149
- fileIds: z.array(z.string()).optional(),
4150
- metadata: z.record(z.any()).optional(),
4151
- extraParams: z.record(z.any()).optional(),
4152
- documents: z.array(z.lazy(() => DeploymentStreamDocuments$outboundSchema))
4153
- .optional(),
4154
- invokeOptions: z.lazy(() => DeploymentStreamInvokeOptions$outboundSchema)
4155
- .optional(),
4156
- thread: z.lazy(() => DeploymentStreamThread$outboundSchema).optional(),
4157
- knowledgeFilter: z.union([
4158
- z.lazy(() => DeploymentStreamKnowledgeFilterAnd$outboundSchema),
4159
- z.lazy(() => DeploymentStreamKnowledgeFilterOr$outboundSchema),
4160
- z.record(
4161
- z.union([
4162
- z.lazy(() => DeploymentStream1Eq$outboundSchema),
4163
- z.lazy(() => DeploymentStream1Ne$outboundSchema),
4164
- z.lazy(() => OneGt$outboundSchema),
4165
- z.lazy(() => OneGte$outboundSchema),
4166
- z.lazy(() => OneLt$outboundSchema),
4167
- z.lazy(() => OneLte$outboundSchema),
4168
- z.lazy(() => DeploymentStream1In$outboundSchema),
4169
- z.lazy(() => DeploymentStream1Nin$outboundSchema),
4170
- z.lazy(() => OneExists$outboundSchema),
4171
- ]),
4172
- ),
4173
- ]).optional(),
4174
- }).transform((v) => {
4175
- return remap$(v, {
4176
- prefixMessages: "prefix_messages",
4177
- fileIds: "file_ids",
4178
- extraParams: "extra_params",
4179
- invokeOptions: "invoke_options",
4180
- knowledgeFilter: "knowledge_filter",
4181
- });
4182
- });
4183
-
4184
- export function deploymentStreamRequestBodyToJSON(
4185
- deploymentStreamRequestBody: DeploymentStreamRequestBody,
4186
- ): string {
4187
- return JSON.stringify(
4188
- DeploymentStreamRequestBody$outboundSchema.parse(
4189
- deploymentStreamRequestBody,
4190
- ),
4191
- );
4192
- }
4193
-
4194
- /** @internal */
4195
- export const DeploymentStreamObject$inboundSchema: z.ZodNativeEnum<
4196
- typeof DeploymentStreamObject
4197
- > = z.nativeEnum(DeploymentStreamObject);
4198
-
4199
- /** @internal */
4200
- export const DeploymentStreamProvider$inboundSchema: z.ZodNativeEnum<
4201
- typeof DeploymentStreamProvider
4202
- > = z.nativeEnum(DeploymentStreamProvider);
4203
-
4204
- /** @internal */
4205
- export const DeploymentStreamDeploymentsMetadata$inboundSchema: z.ZodType<
4206
- DeploymentStreamDeploymentsMetadata,
4207
- z.ZodTypeDef,
4208
- unknown
4209
- > = z.object({
4210
- file_name: z.string(),
4211
- page_number: z.nullable(z.number()),
4212
- file_type: z.string(),
4213
- rerank_score: z.number().optional(),
4214
- search_score: z.number(),
4215
- }).transform((v) => {
4216
- return remap$(v, {
4217
- "file_name": "fileName",
4218
- "page_number": "pageNumber",
4219
- "file_type": "fileType",
4220
- "rerank_score": "rerankScore",
4221
- "search_score": "searchScore",
4222
- });
4223
- });
4224
-
4225
- export function deploymentStreamDeploymentsMetadataFromJSON(
4226
- jsonString: string,
4227
- ): SafeParseResult<DeploymentStreamDeploymentsMetadata, SDKValidationError> {
4228
- return safeParse(
4229
- jsonString,
4230
- (x) =>
4231
- DeploymentStreamDeploymentsMetadata$inboundSchema.parse(JSON.parse(x)),
4232
- `Failed to parse 'DeploymentStreamDeploymentsMetadata' from JSON`,
4233
- );
4234
- }
4235
-
4236
- /** @internal */
4237
- export const DeploymentStreamRetrievals$inboundSchema: z.ZodType<
4238
- DeploymentStreamRetrievals,
4239
- z.ZodTypeDef,
4240
- unknown
4241
- > = z.object({
4242
- document: z.string(),
4243
- metadata: z.lazy(() => DeploymentStreamDeploymentsMetadata$inboundSchema),
4244
- });
4245
-
4246
- export function deploymentStreamRetrievalsFromJSON(
4247
- jsonString: string,
4248
- ): SafeParseResult<DeploymentStreamRetrievals, SDKValidationError> {
4249
- return safeParse(
4250
- jsonString,
4251
- (x) => DeploymentStreamRetrievals$inboundSchema.parse(JSON.parse(x)),
4252
- `Failed to parse 'DeploymentStreamRetrievals' from JSON`,
4253
- );
4254
- }
4255
-
4256
- /** @internal */
4257
- export const DeploymentStreamPromptTokensDetails$inboundSchema: z.ZodType<
4258
- DeploymentStreamPromptTokensDetails,
4259
- z.ZodTypeDef,
4260
- unknown
4261
- > = z.object({
4262
- cached_tokens: z.nullable(z.number()).optional(),
4263
- }).transform((v) => {
4264
- return remap$(v, {
4265
- "cached_tokens": "cachedTokens",
4266
- });
4267
- });
4268
-
4269
- export function deploymentStreamPromptTokensDetailsFromJSON(
4270
- jsonString: string,
4271
- ): SafeParseResult<DeploymentStreamPromptTokensDetails, SDKValidationError> {
4272
- return safeParse(
4273
- jsonString,
4274
- (x) =>
4275
- DeploymentStreamPromptTokensDetails$inboundSchema.parse(JSON.parse(x)),
4276
- `Failed to parse 'DeploymentStreamPromptTokensDetails' from JSON`,
4277
- );
4278
- }
4279
-
4280
- /** @internal */
4281
- export const DeploymentStreamCompletionTokensDetails$inboundSchema: z.ZodType<
4282
- DeploymentStreamCompletionTokensDetails,
4283
- z.ZodTypeDef,
4284
- unknown
4285
- > = z.object({
4286
- reasoning_tokens: z.nullable(z.number()).optional(),
4287
- }).transform((v) => {
4288
- return remap$(v, {
4289
- "reasoning_tokens": "reasoningTokens",
4290
- });
4291
- });
4292
-
4293
- export function deploymentStreamCompletionTokensDetailsFromJSON(
4294
- jsonString: string,
4295
- ): SafeParseResult<
4296
- DeploymentStreamCompletionTokensDetails,
4297
- SDKValidationError
4298
- > {
4299
- return safeParse(
4300
- jsonString,
4301
- (x) =>
4302
- DeploymentStreamCompletionTokensDetails$inboundSchema.parse(
4303
- JSON.parse(x),
4304
- ),
4305
- `Failed to parse 'DeploymentStreamCompletionTokensDetails' from JSON`,
4306
- );
4307
- }
4308
-
4309
- /** @internal */
4310
- export const DeploymentStreamUsage$inboundSchema: z.ZodType<
4311
- DeploymentStreamUsage,
4312
- z.ZodTypeDef,
4313
- unknown
4314
- > = z.object({
4315
- total_tokens: z.number().optional(),
4316
- prompt_tokens: z.number().optional(),
4317
- completion_tokens: z.number().optional(),
4318
- prompt_tokens_details: z.lazy(() =>
4319
- DeploymentStreamPromptTokensDetails$inboundSchema
4320
- ).optional(),
4321
- completion_tokens_details: z.nullable(
4322
- z.lazy(() => DeploymentStreamCompletionTokensDetails$inboundSchema),
4323
- ).optional(),
4324
- }).transform((v) => {
4325
- return remap$(v, {
4326
- "total_tokens": "totalTokens",
4327
- "prompt_tokens": "promptTokens",
4328
- "completion_tokens": "completionTokens",
4329
- "prompt_tokens_details": "promptTokensDetails",
4330
- "completion_tokens_details": "completionTokensDetails",
4331
- });
4332
- });
4333
-
4334
- export function deploymentStreamUsageFromJSON(
4335
- jsonString: string,
4336
- ): SafeParseResult<DeploymentStreamUsage, SDKValidationError> {
4337
- return safeParse(
4338
- jsonString,
4339
- (x) => DeploymentStreamUsage$inboundSchema.parse(JSON.parse(x)),
4340
- `Failed to parse 'DeploymentStreamUsage' from JSON`,
4341
- );
4342
- }
4343
-
4344
- /** @internal */
4345
- export const DeploymentStreamMessageDeploymentsResponseRole$inboundSchema:
4346
- z.ZodNativeEnum<typeof DeploymentStreamMessageDeploymentsResponseRole> = z
4347
- .nativeEnum(DeploymentStreamMessageDeploymentsResponseRole);
4348
-
4349
- /** @internal */
4350
- export const DeploymentStreamMessage3$inboundSchema: z.ZodType<
4351
- DeploymentStreamMessage3,
4352
- z.ZodTypeDef,
4353
- unknown
4354
- > = z.object({
4355
- type: z.literal("image"),
4356
- role: DeploymentStreamMessageDeploymentsResponseRole$inboundSchema,
4357
- url: z.string(),
4358
- });
4359
-
4360
- export function deploymentStreamMessage3FromJSON(
4361
- jsonString: string,
4362
- ): SafeParseResult<DeploymentStreamMessage3, SDKValidationError> {
4363
- return safeParse(
4364
- jsonString,
4365
- (x) => DeploymentStreamMessage3$inboundSchema.parse(JSON.parse(x)),
4366
- `Failed to parse 'DeploymentStreamMessage3' from JSON`,
4367
- );
4368
- }
4369
-
4370
- /** @internal */
4371
- export const DeploymentStreamMessageDeploymentsRole$inboundSchema:
4372
- z.ZodNativeEnum<typeof DeploymentStreamMessageDeploymentsRole> = z.nativeEnum(
4373
- DeploymentStreamMessageDeploymentsRole,
4374
- );
4375
-
4376
- /** @internal */
4377
- export const DeploymentStreamMessage2$inboundSchema: z.ZodType<
4378
- DeploymentStreamMessage2,
4379
- z.ZodTypeDef,
4380
- unknown
4381
- > = z.object({
4382
- type: z.literal("content"),
4383
- role: DeploymentStreamMessageDeploymentsRole$inboundSchema,
4384
- content: z.nullable(z.string()),
4385
- reasoning: z.string().optional(),
4386
- reasoning_signature: z.string().optional(),
4387
- redacted_reasoning: z.string().optional(),
4388
- }).transform((v) => {
4389
- return remap$(v, {
4390
- "reasoning_signature": "reasoningSignature",
4391
- "redacted_reasoning": "redactedReasoning",
4392
- });
4393
- });
4394
-
4395
- export function deploymentStreamMessage2FromJSON(
4396
- jsonString: string,
4397
- ): SafeParseResult<DeploymentStreamMessage2, SDKValidationError> {
4398
- return safeParse(
4399
- jsonString,
4400
- (x) => DeploymentStreamMessage2$inboundSchema.parse(JSON.parse(x)),
4401
- `Failed to parse 'DeploymentStreamMessage2' from JSON`,
4402
- );
4403
- }
4404
-
4405
- /** @internal */
4406
- export const DeploymentStreamMessageRole$inboundSchema: z.ZodNativeEnum<
4407
- typeof DeploymentStreamMessageRole
4408
- > = z.nativeEnum(DeploymentStreamMessageRole);
4409
-
4410
- /** @internal */
4411
- export const DeploymentStreamMessageDeploymentsResponse200Type$inboundSchema:
4412
- z.ZodNativeEnum<typeof DeploymentStreamMessageDeploymentsResponse200Type> = z
4413
- .nativeEnum(DeploymentStreamMessageDeploymentsResponse200Type);
4414
-
4415
- /** @internal */
4416
- export const DeploymentStreamMessageFunction$inboundSchema: z.ZodType<
4417
- DeploymentStreamMessageFunction,
4418
- z.ZodTypeDef,
4419
- unknown
4420
- > = z.object({
4421
- name: z.string(),
4422
- arguments: z.string(),
4423
- });
4424
-
4425
- export function deploymentStreamMessageFunctionFromJSON(
4426
- jsonString: string,
4427
- ): SafeParseResult<DeploymentStreamMessageFunction, SDKValidationError> {
4428
- return safeParse(
4429
- jsonString,
4430
- (x) => DeploymentStreamMessageFunction$inboundSchema.parse(JSON.parse(x)),
4431
- `Failed to parse 'DeploymentStreamMessageFunction' from JSON`,
4432
- );
4433
- }
4434
-
4435
- /** @internal */
4436
- export const DeploymentStreamMessageToolCalls$inboundSchema: z.ZodType<
4437
- DeploymentStreamMessageToolCalls,
4438
- z.ZodTypeDef,
4439
- unknown
4440
- > = z.object({
4441
- id: z.string().optional(),
4442
- index: z.number().optional(),
4443
- type: DeploymentStreamMessageDeploymentsResponse200Type$inboundSchema,
4444
- function: z.lazy(() => DeploymentStreamMessageFunction$inboundSchema),
4445
- });
4446
-
4447
- export function deploymentStreamMessageToolCallsFromJSON(
4448
- jsonString: string,
4449
- ): SafeParseResult<DeploymentStreamMessageToolCalls, SDKValidationError> {
4450
- return safeParse(
4451
- jsonString,
4452
- (x) => DeploymentStreamMessageToolCalls$inboundSchema.parse(JSON.parse(x)),
4453
- `Failed to parse 'DeploymentStreamMessageToolCalls' from JSON`,
4454
- );
4455
- }
4456
-
4457
- /** @internal */
4458
- export const DeploymentStreamMessage1$inboundSchema: z.ZodType<
4459
- DeploymentStreamMessage1,
4460
- z.ZodTypeDef,
4461
- unknown
4462
- > = z.object({
4463
- type: z.literal("tool_calls"),
4464
- role: DeploymentStreamMessageRole$inboundSchema,
4465
- content: z.nullable(z.string()).optional(),
4466
- tool_calls: z.array(
4467
- z.lazy(() => DeploymentStreamMessageToolCalls$inboundSchema),
4468
- ),
4469
- reasoning: z.string().optional(),
4470
- reasoning_signature: z.string().optional(),
4471
- redacted_reasoning: z.string().optional(),
4472
- }).transform((v) => {
4473
- return remap$(v, {
4474
- "tool_calls": "toolCalls",
4475
- "reasoning_signature": "reasoningSignature",
4476
- "redacted_reasoning": "redactedReasoning",
4477
- });
4478
- });
4479
-
4480
- export function deploymentStreamMessage1FromJSON(
4481
- jsonString: string,
4482
- ): SafeParseResult<DeploymentStreamMessage1, SDKValidationError> {
4483
- return safeParse(
4484
- jsonString,
4485
- (x) => DeploymentStreamMessage1$inboundSchema.parse(JSON.parse(x)),
4486
- `Failed to parse 'DeploymentStreamMessage1' from JSON`,
4487
- );
4488
- }
4489
-
4490
- /** @internal */
4491
- export const DeploymentStreamMessage$inboundSchema: z.ZodType<
4492
- DeploymentStreamMessage,
4493
- z.ZodTypeDef,
4494
- unknown
4495
- > = z.union([
4496
- z.lazy(() => DeploymentStreamMessage1$inboundSchema),
4497
- z.lazy(() => DeploymentStreamMessage2$inboundSchema),
4498
- z.lazy(() => DeploymentStreamMessage3$inboundSchema),
4499
- ]);
4500
-
4501
- export function deploymentStreamMessageFromJSON(
4502
- jsonString: string,
4503
- ): SafeParseResult<DeploymentStreamMessage, SDKValidationError> {
4504
- return safeParse(
4505
- jsonString,
4506
- (x) => DeploymentStreamMessage$inboundSchema.parse(JSON.parse(x)),
4507
- `Failed to parse 'DeploymentStreamMessage' from JSON`,
4508
- );
4509
- }
4510
-
4511
- /** @internal */
4512
- export const DeploymentStreamChoices$inboundSchema: z.ZodType<
4513
- DeploymentStreamChoices,
4514
- z.ZodTypeDef,
4515
- unknown
4516
- > = z.object({
4517
- index: z.number(),
4518
- message: z.union([
4519
- z.lazy(() => DeploymentStreamMessage1$inboundSchema),
4520
- z.lazy(() => DeploymentStreamMessage2$inboundSchema),
4521
- z.lazy(() => DeploymentStreamMessage3$inboundSchema),
4522
- ]),
4523
- finish_reason: z.nullable(z.string()).optional(),
4524
- }).transform((v) => {
4525
- return remap$(v, {
4526
- "finish_reason": "finishReason",
4527
- });
4528
- });
4529
-
4530
- export function deploymentStreamChoicesFromJSON(
4531
- jsonString: string,
4532
- ): SafeParseResult<DeploymentStreamChoices, SDKValidationError> {
4533
- return safeParse(
4534
- jsonString,
4535
- (x) => DeploymentStreamChoices$inboundSchema.parse(JSON.parse(x)),
4536
- `Failed to parse 'DeploymentStreamChoices' from JSON`,
4537
- );
4538
- }
4539
-
4540
- /** @internal */
4541
- export const DeploymentStreamData$inboundSchema: z.ZodType<
4542
- DeploymentStreamData,
4543
- z.ZodTypeDef,
4544
- unknown
4545
- > = z.object({
4546
- id: z.string(),
4547
- created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
4548
- object: DeploymentStreamObject$inboundSchema,
4549
- model: z.string(),
4550
- provider: DeploymentStreamProvider$inboundSchema,
4551
- is_final: z.boolean(),
4552
- integration_id: z.string().optional(),
4553
- finalized: z.string().datetime({ offset: true }).transform(v => new Date(v))
4554
- .optional(),
4555
- system_fingerprint: z.nullable(z.string()).optional(),
4556
- retrievals: z.array(z.lazy(() => DeploymentStreamRetrievals$inboundSchema))
4557
- .optional(),
4558
- provider_response: z.any().optional(),
4559
- usage: z.nullable(z.lazy(() => DeploymentStreamUsage$inboundSchema))
4560
- .optional(),
4561
- choices: z.array(z.lazy(() => DeploymentStreamChoices$inboundSchema)),
4562
- }).transform((v) => {
4563
- return remap$(v, {
4564
- "is_final": "isFinal",
4565
- "integration_id": "integrationId",
4566
- "system_fingerprint": "systemFingerprint",
4567
- "provider_response": "providerResponse",
4568
- });
4569
- });
4570
-
4571
- export function deploymentStreamDataFromJSON(
4572
- jsonString: string,
4573
- ): SafeParseResult<DeploymentStreamData, SDKValidationError> {
4574
- return safeParse(
4575
- jsonString,
4576
- (x) => DeploymentStreamData$inboundSchema.parse(JSON.parse(x)),
4577
- `Failed to parse 'DeploymentStreamData' from JSON`,
4578
- );
4579
- }
4580
-
4581
- /** @internal */
4582
- export const DeploymentStreamResponseBody$inboundSchema: z.ZodType<
4583
- DeploymentStreamResponseBody,
4584
- z.ZodTypeDef,
4585
- unknown
4586
- > = z.object({
4587
- data: z.string().optional().transform((v, ctx) => {
4588
- if (v === undefined) return undefined;
4589
- try {
4590
- return JSON.parse(v);
4591
- } catch (err) {
4592
- ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
4593
- return z.NEVER;
4594
- }
4595
- }).pipe(z.lazy(() => DeploymentStreamData$inboundSchema).optional()),
4596
- });
4597
-
4598
- export function deploymentStreamResponseBodyFromJSON(
4599
- jsonString: string,
4600
- ): SafeParseResult<DeploymentStreamResponseBody, SDKValidationError> {
4601
- return safeParse(
4602
- jsonString,
4603
- (x) => DeploymentStreamResponseBody$inboundSchema.parse(JSON.parse(x)),
4604
- `Failed to parse 'DeploymentStreamResponseBody' from JSON`,
4605
- );
4606
- }