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