@mistralai/mistralai 1.10.0 → 1.12.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 (373) hide show
  1. package/README.md +21 -7
  2. package/_speakeasy/.github/action-inputs-config.json +53 -0
  3. package/_speakeasy/.github/action-security-config.json +88 -0
  4. package/funcs/audioTranscriptionsStream.d.ts +1 -1
  5. package/funcs/audioTranscriptionsStream.js +1 -1
  6. package/funcs/batchJobsGet.d.ts +3 -0
  7. package/funcs/batchJobsGet.d.ts.map +1 -1
  8. package/funcs/batchJobsGet.js +7 -0
  9. package/funcs/batchJobsGet.js.map +1 -1
  10. package/funcs/betaAgentsDelete.d.ts +15 -0
  11. package/funcs/betaAgentsDelete.d.ts.map +1 -0
  12. package/funcs/betaAgentsDelete.js +121 -0
  13. package/funcs/betaAgentsDelete.js.map +1 -0
  14. package/funcs/betaAgentsGet.js +4 -0
  15. package/funcs/betaAgentsGet.js.map +1 -1
  16. package/funcs/betaAgentsList.d.ts.map +1 -1
  17. package/funcs/betaAgentsList.js +8 -2
  18. package/funcs/betaAgentsList.js.map +1 -1
  19. package/funcs/betaConversationsDelete.d.ts +18 -0
  20. package/funcs/betaConversationsDelete.d.ts.map +1 -0
  21. package/funcs/betaConversationsDelete.js +124 -0
  22. package/funcs/betaConversationsDelete.js.map +1 -0
  23. package/funcs/betaConversationsList.d.ts.map +1 -1
  24. package/funcs/betaConversationsList.js +4 -2
  25. package/funcs/betaConversationsList.js.map +1 -1
  26. package/funcs/betaLibrariesDocumentsList.d.ts +1 -1
  27. package/funcs/betaLibrariesDocumentsList.js +2 -1
  28. package/funcs/betaLibrariesDocumentsList.js.map +1 -1
  29. package/funcs/filesList.js +1 -0
  30. package/funcs/filesList.js.map +1 -1
  31. package/funcs/modelsList.d.ts +1 -2
  32. package/funcs/modelsList.d.ts.map +1 -1
  33. package/funcs/modelsList.js +2 -6
  34. package/funcs/modelsList.js.map +1 -1
  35. package/jsr.json +1 -1
  36. package/lib/config.d.ts +2 -2
  37. package/lib/config.js +2 -2
  38. package/models/components/agent.d.ts +12 -0
  39. package/models/components/agent.d.ts.map +1 -1
  40. package/models/components/agent.js +10 -0
  41. package/models/components/agent.js.map +1 -1
  42. package/models/components/agentconversation.d.ts +11 -0
  43. package/models/components/agentconversation.d.ts.map +1 -1
  44. package/models/components/agentconversation.js +6 -0
  45. package/models/components/agentconversation.js.map +1 -1
  46. package/models/components/agentcreationrequest.d.ts +6 -0
  47. package/models/components/agentcreationrequest.d.ts.map +1 -1
  48. package/models/components/agentcreationrequest.js +2 -0
  49. package/models/components/agentcreationrequest.js.map +1 -1
  50. package/models/components/agentscompletionrequest.d.ts +14 -2
  51. package/models/components/agentscompletionrequest.d.ts.map +1 -1
  52. package/models/components/agentscompletionrequest.js +2 -0
  53. package/models/components/agentscompletionrequest.js.map +1 -1
  54. package/models/components/agentscompletionstreamrequest.d.ts +14 -2
  55. package/models/components/agentscompletionstreamrequest.d.ts.map +1 -1
  56. package/models/components/agentscompletionstreamrequest.js +2 -0
  57. package/models/components/agentscompletionstreamrequest.js.map +1 -1
  58. package/models/components/agentupdaterequest.d.ts +8 -0
  59. package/models/components/agentupdaterequest.d.ts.map +1 -1
  60. package/models/components/agentupdaterequest.js +6 -0
  61. package/models/components/agentupdaterequest.js.map +1 -1
  62. package/models/components/audioencoding.d.ts +26 -0
  63. package/models/components/audioencoding.d.ts.map +1 -0
  64. package/models/components/audioencoding.js +72 -0
  65. package/models/components/audioencoding.js.map +1 -0
  66. package/models/components/audioformat.d.ts +32 -0
  67. package/models/components/audioformat.d.ts.map +1 -0
  68. package/models/components/audioformat.js +81 -0
  69. package/models/components/audioformat.js.map +1 -0
  70. package/models/components/audiotranscriptionrequest.d.ts +3 -0
  71. package/models/components/audiotranscriptionrequest.d.ts.map +1 -1
  72. package/models/components/audiotranscriptionrequest.js.map +1 -1
  73. package/models/components/batchjobin.d.ts +20 -2
  74. package/models/components/batchjobin.d.ts.map +1 -1
  75. package/models/components/batchjobin.js +5 -2
  76. package/models/components/batchjobin.js.map +1 -1
  77. package/models/components/batchjobout.d.ts +6 -0
  78. package/models/components/batchjobout.d.ts.map +1 -1
  79. package/models/components/batchjobout.js +2 -0
  80. package/models/components/batchjobout.js.map +1 -1
  81. package/models/components/batchrequest.d.ts +35 -0
  82. package/models/components/batchrequest.d.ts.map +1 -0
  83. package/models/components/batchrequest.js +80 -0
  84. package/models/components/batchrequest.js.map +1 -0
  85. package/models/components/chatcompletionrequest.d.ts +26 -2
  86. package/models/components/chatcompletionrequest.d.ts.map +1 -1
  87. package/models/components/chatcompletionrequest.js +2 -0
  88. package/models/components/chatcompletionrequest.js.map +1 -1
  89. package/models/components/chatcompletionstreamrequest.d.ts +26 -2
  90. package/models/components/chatcompletionstreamrequest.d.ts.map +1 -1
  91. package/models/components/chatcompletionstreamrequest.js +2 -0
  92. package/models/components/chatcompletionstreamrequest.js.map +1 -1
  93. package/models/components/classificationrequest.d.ts +6 -0
  94. package/models/components/classificationrequest.d.ts.map +1 -1
  95. package/models/components/classificationrequest.js +2 -0
  96. package/models/components/classificationrequest.js.map +1 -1
  97. package/models/components/conversationrequest.d.ts +13 -2
  98. package/models/components/conversationrequest.d.ts.map +1 -1
  99. package/models/components/conversationrequest.js +16 -6
  100. package/models/components/conversationrequest.js.map +1 -1
  101. package/models/components/conversationrestartrequest.d.ts +14 -0
  102. package/models/components/conversationrestartrequest.d.ts.map +1 -1
  103. package/models/components/conversationrestartrequest.js +6 -0
  104. package/models/components/conversationrestartrequest.js.map +1 -1
  105. package/models/components/conversationrestartstreamrequest.d.ts +14 -0
  106. package/models/components/conversationrestartstreamrequest.d.ts.map +1 -1
  107. package/models/components/conversationrestartstreamrequest.js +6 -0
  108. package/models/components/conversationrestartstreamrequest.js.map +1 -1
  109. package/models/components/conversationstreamrequest.d.ts +13 -2
  110. package/models/components/conversationstreamrequest.d.ts.map +1 -1
  111. package/models/components/conversationstreamrequest.js +16 -6
  112. package/models/components/conversationstreamrequest.js.map +1 -1
  113. package/models/components/documentout.d.ts +18 -10
  114. package/models/components/documentout.d.ts.map +1 -1
  115. package/models/components/documentout.js +14 -10
  116. package/models/components/documentout.js.map +1 -1
  117. package/models/components/documentupdatein.d.ts +27 -0
  118. package/models/components/documentupdatein.d.ts.map +1 -1
  119. package/models/components/documentupdatein.js +66 -1
  120. package/models/components/documentupdatein.js.map +1 -1
  121. package/models/components/embeddingrequest.d.ts +10 -4
  122. package/models/components/embeddingrequest.d.ts.map +1 -1
  123. package/models/components/embeddingrequest.js +2 -0
  124. package/models/components/embeddingrequest.js.map +1 -1
  125. package/models/components/fimcompletionrequest.d.ts +7 -5
  126. package/models/components/fimcompletionrequest.d.ts.map +1 -1
  127. package/models/components/fimcompletionrequest.js +2 -0
  128. package/models/components/fimcompletionrequest.js.map +1 -1
  129. package/models/components/fimcompletionstreamrequest.d.ts +7 -5
  130. package/models/components/fimcompletionstreamrequest.d.ts.map +1 -1
  131. package/models/components/fimcompletionstreamrequest.js +2 -0
  132. package/models/components/fimcompletionstreamrequest.js.map +1 -1
  133. package/models/components/index.d.ts +5 -0
  134. package/models/components/index.d.ts.map +1 -1
  135. package/models/components/index.js +5 -0
  136. package/models/components/index.js.map +1 -1
  137. package/models/components/libraryout.d.ts +7 -4
  138. package/models/components/libraryout.d.ts.map +1 -1
  139. package/models/components/libraryout.js +6 -6
  140. package/models/components/libraryout.js.map +1 -1
  141. package/models/components/listfilesout.d.ts +2 -2
  142. package/models/components/listfilesout.d.ts.map +1 -1
  143. package/models/components/listfilesout.js +2 -2
  144. package/models/components/listfilesout.js.map +1 -1
  145. package/models/components/modelcapabilities.d.ts +8 -2
  146. package/models/components/modelcapabilities.d.ts.map +1 -1
  147. package/models/components/modelcapabilities.js +12 -6
  148. package/models/components/modelcapabilities.js.map +1 -1
  149. package/models/components/modelconversation.d.ts +9 -0
  150. package/models/components/modelconversation.d.ts.map +1 -1
  151. package/models/components/modelconversation.js +2 -0
  152. package/models/components/modelconversation.js.map +1 -1
  153. package/models/components/ocrpageobject.d.ts +21 -0
  154. package/models/components/ocrpageobject.d.ts.map +1 -1
  155. package/models/components/ocrpageobject.js +9 -0
  156. package/models/components/ocrpageobject.js.map +1 -1
  157. package/models/components/ocrrequest.d.ts +32 -0
  158. package/models/components/ocrrequest.d.ts.map +1 -1
  159. package/models/components/ocrrequest.js +33 -1
  160. package/models/components/ocrrequest.js.map +1 -1
  161. package/models/components/ocrtableobject.d.ts +74 -0
  162. package/models/components/ocrtableobject.d.ts.map +1 -0
  163. package/models/components/ocrtableobject.js +96 -0
  164. package/models/components/ocrtableobject.js.map +1 -0
  165. package/models/components/prediction.d.ts +3 -0
  166. package/models/components/prediction.d.ts.map +1 -1
  167. package/models/components/prediction.js.map +1 -1
  168. package/models/components/requestsource.d.ts +31 -0
  169. package/models/components/requestsource.d.ts.map +1 -0
  170. package/models/components/requestsource.js +61 -0
  171. package/models/components/requestsource.js.map +1 -0
  172. package/models/components/responseformat.d.ts +3 -3
  173. package/models/components/responseformat.d.ts.map +1 -1
  174. package/models/components/responseformats.d.ts +0 -6
  175. package/models/components/responseformats.d.ts.map +1 -1
  176. package/models/components/responseformats.js +0 -3
  177. package/models/components/responseformats.js.map +1 -1
  178. package/models/components/sharingdelete.d.ts +2 -2
  179. package/models/components/sharingdelete.d.ts.map +1 -1
  180. package/models/components/sharingdelete.js +2 -2
  181. package/models/components/sharingdelete.js.map +1 -1
  182. package/models/components/sharingin.d.ts +2 -2
  183. package/models/components/sharingin.d.ts.map +1 -1
  184. package/models/components/sharingin.js +2 -2
  185. package/models/components/sharingin.js.map +1 -1
  186. package/models/components/sharingout.d.ts +2 -2
  187. package/models/components/sharingout.d.ts.map +1 -1
  188. package/models/components/sharingout.js +2 -2
  189. package/models/components/sharingout.js.map +1 -1
  190. package/models/components/toolexecutiondeltaevent.d.ts +23 -2
  191. package/models/components/toolexecutiondeltaevent.d.ts.map +1 -1
  192. package/models/components/toolexecutiondeltaevent.js +26 -3
  193. package/models/components/toolexecutiondeltaevent.js.map +1 -1
  194. package/models/components/toolexecutiondoneevent.d.ts +23 -2
  195. package/models/components/toolexecutiondoneevent.d.ts.map +1 -1
  196. package/models/components/toolexecutiondoneevent.js +26 -3
  197. package/models/components/toolexecutiondoneevent.js.map +1 -1
  198. package/models/components/toolexecutionentry.d.ts +23 -2
  199. package/models/components/toolexecutionentry.d.ts.map +1 -1
  200. package/models/components/toolexecutionentry.js +27 -3
  201. package/models/components/toolexecutionentry.js.map +1 -1
  202. package/models/components/toolexecutionstartedevent.d.ts +23 -2
  203. package/models/components/toolexecutionstartedevent.d.ts.map +1 -1
  204. package/models/components/toolexecutionstartedevent.js +26 -3
  205. package/models/components/toolexecutionstartedevent.js.map +1 -1
  206. package/models/components/toolfilechunk.d.ts +23 -2
  207. package/models/components/toolfilechunk.d.ts.map +1 -1
  208. package/models/components/toolfilechunk.js +26 -3
  209. package/models/components/toolfilechunk.js.map +1 -1
  210. package/models/components/toolreferencechunk.d.ts +23 -2
  211. package/models/components/toolreferencechunk.d.ts.map +1 -1
  212. package/models/components/toolreferencechunk.js +26 -3
  213. package/models/components/toolreferencechunk.js.map +1 -1
  214. package/models/operations/agentsapiv1agentsdelete.d.ts +29 -0
  215. package/models/operations/agentsapiv1agentsdelete.d.ts.map +1 -0
  216. package/models/operations/agentsapiv1agentsdelete.js +78 -0
  217. package/models/operations/agentsapiv1agentsdelete.js.map +1 -0
  218. package/models/operations/agentsapiv1agentsget.d.ts +2 -0
  219. package/models/operations/agentsapiv1agentsget.d.ts.map +1 -1
  220. package/models/operations/agentsapiv1agentsget.js +4 -0
  221. package/models/operations/agentsapiv1agentsget.js.map +1 -1
  222. package/models/operations/agentsapiv1agentslist.d.ts +15 -0
  223. package/models/operations/agentsapiv1agentslist.d.ts.map +1 -1
  224. package/models/operations/agentsapiv1agentslist.js +15 -0
  225. package/models/operations/agentsapiv1agentslist.js.map +1 -1
  226. package/models/operations/agentsapiv1conversationsdelete.d.ts +32 -0
  227. package/models/operations/agentsapiv1conversationsdelete.d.ts.map +1 -0
  228. package/models/operations/agentsapiv1conversationsdelete.js +78 -0
  229. package/models/operations/agentsapiv1conversationsdelete.js.map +1 -0
  230. package/models/operations/agentsapiv1conversationslist.d.ts +6 -0
  231. package/models/operations/agentsapiv1conversationslist.d.ts.map +1 -1
  232. package/models/operations/agentsapiv1conversationslist.js +2 -0
  233. package/models/operations/agentsapiv1conversationslist.js.map +1 -1
  234. package/models/operations/filesapirouteslistfiles.d.ts +2 -0
  235. package/models/operations/filesapirouteslistfiles.d.ts.map +1 -1
  236. package/models/operations/filesapirouteslistfiles.js +4 -0
  237. package/models/operations/filesapirouteslistfiles.js.map +1 -1
  238. package/models/operations/index.d.ts +2 -0
  239. package/models/operations/index.d.ts.map +1 -1
  240. package/models/operations/index.js +2 -0
  241. package/models/operations/index.js.map +1 -1
  242. package/models/operations/jobsapiroutesbatchgetbatchjob.d.ts +2 -0
  243. package/models/operations/jobsapiroutesbatchgetbatchjob.d.ts.map +1 -1
  244. package/models/operations/jobsapiroutesbatchgetbatchjob.js +2 -0
  245. package/models/operations/jobsapiroutesbatchgetbatchjob.js.map +1 -1
  246. package/models/operations/librariesdocumentslistv1.d.ts +2 -0
  247. package/models/operations/librariesdocumentslistv1.d.ts.map +1 -1
  248. package/models/operations/librariesdocumentslistv1.js +4 -0
  249. package/models/operations/librariesdocumentslistv1.js.map +1 -1
  250. package/package.json +1 -1
  251. package/sdk/conversations.d.ts +7 -0
  252. package/sdk/conversations.d.ts.map +1 -1
  253. package/sdk/conversations.js +10 -0
  254. package/sdk/conversations.js.map +1 -1
  255. package/sdk/documents.d.ts +1 -1
  256. package/sdk/documents.js +1 -1
  257. package/sdk/mistralagents.d.ts +4 -0
  258. package/sdk/mistralagents.d.ts.map +1 -1
  259. package/sdk/mistralagents.js +7 -0
  260. package/sdk/mistralagents.js.map +1 -1
  261. package/sdk/mistraljobs.d.ts +3 -0
  262. package/sdk/mistraljobs.d.ts.map +1 -1
  263. package/sdk/mistraljobs.js +3 -0
  264. package/sdk/mistraljobs.js.map +1 -1
  265. package/sdk/transcriptions.d.ts +1 -1
  266. package/sdk/transcriptions.js +1 -1
  267. package/src/funcs/audioTranscriptionsStream.ts +1 -1
  268. package/src/funcs/batchJobsGet.ts +9 -1
  269. package/src/funcs/betaAgentsDelete.ts +174 -0
  270. package/src/funcs/betaAgentsGet.ts +6 -1
  271. package/src/funcs/betaAgentsList.ts +18 -5
  272. package/src/funcs/betaConversationsDelete.ts +179 -0
  273. package/src/funcs/betaConversationsList.ts +14 -5
  274. package/src/funcs/betaLibrariesDocumentsList.ts +2 -1
  275. package/src/funcs/filesList.ts +1 -0
  276. package/src/funcs/modelsList.ts +2 -11
  277. package/src/lib/config.ts +2 -2
  278. package/src/models/components/agent.ts +18 -0
  279. package/src/models/components/agentconversation.ts +13 -0
  280. package/src/models/components/agentcreationrequest.ts +4 -0
  281. package/src/models/components/agentscompletionrequest.ts +12 -2
  282. package/src/models/components/agentscompletionstreamrequest.ts +12 -2
  283. package/src/models/components/agentupdaterequest.ts +10 -0
  284. package/src/models/components/audioencoding.ts +52 -0
  285. package/src/models/components/audioformat.ts +80 -0
  286. package/src/models/components/audiotranscriptionrequest.ts +3 -0
  287. package/src/models/components/batchjobin.ts +29 -4
  288. package/src/models/components/batchjobout.ts +4 -0
  289. package/src/models/components/batchrequest.ts +75 -0
  290. package/src/models/components/chatcompletionrequest.ts +24 -2
  291. package/src/models/components/chatcompletionstreamrequest.ts +24 -2
  292. package/src/models/components/classificationrequest.ts +4 -0
  293. package/src/models/components/conversationrequest.ts +79 -72
  294. package/src/models/components/conversationrestartrequest.ts +16 -0
  295. package/src/models/components/conversationrestartstreamrequest.ts +16 -0
  296. package/src/models/components/conversationstreamrequest.ts +79 -72
  297. package/src/models/components/documentout.ts +28 -20
  298. package/src/models/components/documentupdatein.ts +144 -0
  299. package/src/models/components/embeddingrequest.ts +8 -4
  300. package/src/models/components/fimcompletionrequest.ts +5 -5
  301. package/src/models/components/fimcompletionstreamrequest.ts +5 -5
  302. package/src/models/components/index.ts +5 -0
  303. package/src/models/components/libraryout.ts +13 -10
  304. package/src/models/components/listfilesout.ts +4 -4
  305. package/src/models/components/modelcapabilities.ts +20 -8
  306. package/src/models/components/modelconversation.ts +7 -0
  307. package/src/models/components/ocrpageobject.ts +34 -0
  308. package/src/models/components/ocrrequest.ts +44 -0
  309. package/src/models/components/ocrtableobject.ts +111 -0
  310. package/src/models/components/prediction.ts +3 -0
  311. package/src/models/components/requestsource.ts +34 -0
  312. package/src/models/components/responseformat.ts +3 -3
  313. package/src/models/components/responseformats.ts +0 -6
  314. package/src/models/components/sharingdelete.ts +4 -4
  315. package/src/models/components/sharingin.ts +4 -4
  316. package/src/models/components/sharingout.ts +4 -4
  317. package/src/models/components/toolexecutiondeltaevent.ts +56 -4
  318. package/src/models/components/toolexecutiondoneevent.ts +54 -4
  319. package/src/models/components/toolexecutionentry.ts +44 -4
  320. package/src/models/components/toolexecutionstartedevent.ts +56 -4
  321. package/src/models/components/toolfilechunk.ts +54 -4
  322. package/src/models/components/toolreferencechunk.ts +54 -4
  323. package/src/models/operations/agentsapiv1agentsdelete.ts +77 -0
  324. package/src/models/operations/agentsapiv1agentsget.ts +6 -0
  325. package/src/models/operations/agentsapiv1agentslist.ts +25 -0
  326. package/src/models/operations/agentsapiv1conversationsdelete.ts +83 -0
  327. package/src/models/operations/agentsapiv1conversationslist.ts +4 -0
  328. package/src/models/operations/filesapirouteslistfiles.ts +6 -0
  329. package/src/models/operations/index.ts +2 -0
  330. package/src/models/operations/jobsapiroutesbatchgetbatchjob.ts +4 -0
  331. package/src/models/operations/librariesdocumentslistv1.ts +6 -0
  332. package/src/sdk/conversations.ts +18 -0
  333. package/src/sdk/documents.ts +1 -1
  334. package/src/sdk/mistralagents.ts +15 -0
  335. package/src/sdk/mistraljobs.ts +3 -0
  336. package/src/sdk/transcriptions.ts +1 -1
  337. package/.devcontainer/README.md +0 -35
  338. package/docs/sdks/accesses/README.md +0 -256
  339. package/docs/sdks/agents/README.md +0 -189
  340. package/docs/sdks/audio/README.md +0 -6
  341. package/docs/sdks/batch/README.md +0 -6
  342. package/docs/sdks/beta/README.md +0 -6
  343. package/docs/sdks/chat/README.md +0 -189
  344. package/docs/sdks/classifiers/README.md +0 -355
  345. package/docs/sdks/conversations/README.md +0 -835
  346. package/docs/sdks/documents/README.md +0 -785
  347. package/docs/sdks/embeddings/README.md +0 -92
  348. package/docs/sdks/files/README.md +0 -455
  349. package/docs/sdks/fim/README.md +0 -173
  350. package/docs/sdks/finetuning/README.md +0 -6
  351. package/docs/sdks/jobs/README.md +0 -379
  352. package/docs/sdks/libraries/README.md +0 -380
  353. package/docs/sdks/mistral/README.md +0 -7
  354. package/docs/sdks/mistralagents/README.md +0 -386
  355. package/docs/sdks/mistraljobs/README.md +0 -305
  356. package/docs/sdks/models/README.md +0 -453
  357. package/docs/sdks/ocr/README.md +0 -92
  358. package/docs/sdks/transcriptions/README.md +0 -163
  359. package/examples/README.md +0 -44
  360. package/packages/mistralai-azure/FUNCTIONS.md +0 -111
  361. package/packages/mistralai-azure/LICENSE +0 -201
  362. package/packages/mistralai-azure/README.md +0 -447
  363. package/packages/mistralai-azure/RUNTIMES.md +0 -48
  364. package/packages/mistralai-azure/docs/sdks/chat/README.md +0 -114
  365. package/packages/mistralai-azure/docs/sdks/mistralazure/README.md +0 -9
  366. package/packages/mistralai-gcp/FUNCTIONS.md +0 -112
  367. package/packages/mistralai-gcp/LICENSE +0 -201
  368. package/packages/mistralai-gcp/README.md +0 -455
  369. package/packages/mistralai-gcp/RUNTIMES.md +0 -48
  370. package/packages/mistralai-gcp/docs/sdks/chat/README.md +0 -115
  371. package/packages/mistralai-gcp/docs/sdks/fim/README.md +0 -58
  372. package/packages/mistralai-gcp/docs/sdks/mistralgcp/README.md +0 -9
  373. package/src/extra/README.md +0 -52
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
11
  import {
@@ -37,6 +38,12 @@ import {
37
38
  */
38
39
  export type Document = FileChunk | DocumentURLChunk | ImageURLChunk;
39
40
 
41
+ export const TableFormat = {
42
+ Markdown: "markdown",
43
+ Html: "html",
44
+ } as const;
45
+ export type TableFormat = ClosedEnum<typeof TableFormat>;
46
+
40
47
  export type OCRRequest = {
41
48
  model: string | null;
42
49
  id?: string | undefined;
@@ -68,6 +75,9 @@ export type OCRRequest = {
68
75
  * Structured output class for extracting useful information from the entire document. Only json_schema is valid for this field
69
76
  */
70
77
  documentAnnotationFormat?: ResponseFormat | null | undefined;
78
+ tableFormat?: TableFormat | null | undefined;
79
+ extractHeader?: boolean | undefined;
80
+ extractFooter?: boolean | undefined;
71
81
  };
72
82
 
73
83
  /** @internal */
@@ -125,6 +135,25 @@ export function documentFromJSON(
125
135
  );
126
136
  }
127
137
 
138
+ /** @internal */
139
+ export const TableFormat$inboundSchema: z.ZodNativeEnum<typeof TableFormat> = z
140
+ .nativeEnum(TableFormat);
141
+
142
+ /** @internal */
143
+ export const TableFormat$outboundSchema: z.ZodNativeEnum<typeof TableFormat> =
144
+ TableFormat$inboundSchema;
145
+
146
+ /**
147
+ * @internal
148
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
149
+ */
150
+ export namespace TableFormat$ {
151
+ /** @deprecated use `TableFormat$inboundSchema` instead. */
152
+ export const inboundSchema = TableFormat$inboundSchema;
153
+ /** @deprecated use `TableFormat$outboundSchema` instead. */
154
+ export const outboundSchema = TableFormat$outboundSchema;
155
+ }
156
+
128
157
  /** @internal */
129
158
  export const OCRRequest$inboundSchema: z.ZodType<
130
159
  OCRRequest,
@@ -145,6 +174,9 @@ export const OCRRequest$inboundSchema: z.ZodType<
145
174
  bbox_annotation_format: z.nullable(ResponseFormat$inboundSchema).optional(),
146
175
  document_annotation_format: z.nullable(ResponseFormat$inboundSchema)
147
176
  .optional(),
177
+ table_format: z.nullable(TableFormat$inboundSchema).optional(),
178
+ extract_header: z.boolean().optional(),
179
+ extract_footer: z.boolean().optional(),
148
180
  }).transform((v) => {
149
181
  return remap$(v, {
150
182
  "include_image_base64": "includeImageBase64",
@@ -152,6 +184,9 @@ export const OCRRequest$inboundSchema: z.ZodType<
152
184
  "image_min_size": "imageMinSize",
153
185
  "bbox_annotation_format": "bboxAnnotationFormat",
154
186
  "document_annotation_format": "documentAnnotationFormat",
187
+ "table_format": "tableFormat",
188
+ "extract_header": "extractHeader",
189
+ "extract_footer": "extractFooter",
155
190
  });
156
191
  });
157
192
 
@@ -169,6 +204,9 @@ export type OCRRequest$Outbound = {
169
204
  image_min_size?: number | null | undefined;
170
205
  bbox_annotation_format?: ResponseFormat$Outbound | null | undefined;
171
206
  document_annotation_format?: ResponseFormat$Outbound | null | undefined;
207
+ table_format?: string | null | undefined;
208
+ extract_header?: boolean | undefined;
209
+ extract_footer?: boolean | undefined;
172
210
  };
173
211
 
174
212
  /** @internal */
@@ -191,6 +229,9 @@ export const OCRRequest$outboundSchema: z.ZodType<
191
229
  bboxAnnotationFormat: z.nullable(ResponseFormat$outboundSchema).optional(),
192
230
  documentAnnotationFormat: z.nullable(ResponseFormat$outboundSchema)
193
231
  .optional(),
232
+ tableFormat: z.nullable(TableFormat$outboundSchema).optional(),
233
+ extractHeader: z.boolean().optional(),
234
+ extractFooter: z.boolean().optional(),
194
235
  }).transform((v) => {
195
236
  return remap$(v, {
196
237
  includeImageBase64: "include_image_base64",
@@ -198,6 +239,9 @@ export const OCRRequest$outboundSchema: z.ZodType<
198
239
  imageMinSize: "image_min_size",
199
240
  bboxAnnotationFormat: "bbox_annotation_format",
200
241
  documentAnnotationFormat: "document_annotation_format",
242
+ tableFormat: "table_format",
243
+ extractHeader: "extract_header",
244
+ extractFooter: "extract_footer",
201
245
  });
202
246
  });
203
247
 
@@ -0,0 +1,111 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * Format of the table
13
+ */
14
+ export const Format = {
15
+ Markdown: "markdown",
16
+ Html: "html",
17
+ } as const;
18
+ /**
19
+ * Format of the table
20
+ */
21
+ export type Format = ClosedEnum<typeof Format>;
22
+
23
+ export type OCRTableObject = {
24
+ /**
25
+ * Table ID for extracted table in a page
26
+ */
27
+ id: string;
28
+ /**
29
+ * Content of the table in the given format
30
+ */
31
+ content: string;
32
+ /**
33
+ * Format of the table
34
+ */
35
+ format: Format;
36
+ };
37
+
38
+ /** @internal */
39
+ export const Format$inboundSchema: z.ZodNativeEnum<typeof Format> = z
40
+ .nativeEnum(Format);
41
+
42
+ /** @internal */
43
+ export const Format$outboundSchema: z.ZodNativeEnum<typeof Format> =
44
+ Format$inboundSchema;
45
+
46
+ /**
47
+ * @internal
48
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
49
+ */
50
+ export namespace Format$ {
51
+ /** @deprecated use `Format$inboundSchema` instead. */
52
+ export const inboundSchema = Format$inboundSchema;
53
+ /** @deprecated use `Format$outboundSchema` instead. */
54
+ export const outboundSchema = Format$outboundSchema;
55
+ }
56
+
57
+ /** @internal */
58
+ export const OCRTableObject$inboundSchema: z.ZodType<
59
+ OCRTableObject,
60
+ z.ZodTypeDef,
61
+ unknown
62
+ > = z.object({
63
+ id: z.string(),
64
+ content: z.string(),
65
+ format: Format$inboundSchema,
66
+ });
67
+
68
+ /** @internal */
69
+ export type OCRTableObject$Outbound = {
70
+ id: string;
71
+ content: string;
72
+ format: string;
73
+ };
74
+
75
+ /** @internal */
76
+ export const OCRTableObject$outboundSchema: z.ZodType<
77
+ OCRTableObject$Outbound,
78
+ z.ZodTypeDef,
79
+ OCRTableObject
80
+ > = z.object({
81
+ id: z.string(),
82
+ content: z.string(),
83
+ format: Format$outboundSchema,
84
+ });
85
+
86
+ /**
87
+ * @internal
88
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
89
+ */
90
+ export namespace OCRTableObject$ {
91
+ /** @deprecated use `OCRTableObject$inboundSchema` instead. */
92
+ export const inboundSchema = OCRTableObject$inboundSchema;
93
+ /** @deprecated use `OCRTableObject$outboundSchema` instead. */
94
+ export const outboundSchema = OCRTableObject$outboundSchema;
95
+ /** @deprecated use `OCRTableObject$Outbound` instead. */
96
+ export type Outbound = OCRTableObject$Outbound;
97
+ }
98
+
99
+ export function ocrTableObjectToJSON(ocrTableObject: OCRTableObject): string {
100
+ return JSON.stringify(OCRTableObject$outboundSchema.parse(ocrTableObject));
101
+ }
102
+
103
+ export function ocrTableObjectFromJSON(
104
+ jsonString: string,
105
+ ): SafeParseResult<OCRTableObject, SDKValidationError> {
106
+ return safeParse(
107
+ jsonString,
108
+ (x) => OCRTableObject$inboundSchema.parse(JSON.parse(x)),
109
+ `Failed to parse 'OCRTableObject' from JSON`,
110
+ );
111
+ }
@@ -7,6 +7,9 @@ import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
 
10
+ /**
11
+ * Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.
12
+ */
10
13
  export type Prediction = {
11
14
  type?: "content" | undefined;
12
15
  content?: string | undefined;
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const RequestSource = {
9
+ Api: "api",
10
+ Playground: "playground",
11
+ AgentBuilderV1: "agent_builder_v1",
12
+ } as const;
13
+ export type RequestSource = ClosedEnum<typeof RequestSource>;
14
+
15
+ /** @internal */
16
+ export const RequestSource$inboundSchema: z.ZodNativeEnum<
17
+ typeof RequestSource
18
+ > = z.nativeEnum(RequestSource);
19
+
20
+ /** @internal */
21
+ export const RequestSource$outboundSchema: z.ZodNativeEnum<
22
+ typeof RequestSource
23
+ > = RequestSource$inboundSchema;
24
+
25
+ /**
26
+ * @internal
27
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
28
+ */
29
+ export namespace RequestSource$ {
30
+ /** @deprecated use `RequestSource$inboundSchema` instead. */
31
+ export const inboundSchema = RequestSource$inboundSchema;
32
+ /** @deprecated use `RequestSource$outboundSchema` instead. */
33
+ export const outboundSchema = RequestSource$outboundSchema;
34
+ }
@@ -19,10 +19,10 @@ import {
19
19
  ResponseFormats$outboundSchema,
20
20
  } from "./responseformats.js";
21
21
 
22
+ /**
23
+ * Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.
24
+ */
22
25
  export type ResponseFormat = {
23
- /**
24
- * An object specifying the format that the model must output. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message.
25
- */
26
26
  type?: ResponseFormats | undefined;
27
27
  jsonSchema?: JsonSchema | null | undefined;
28
28
  };
@@ -5,17 +5,11 @@
5
5
  import * as z from "zod";
6
6
  import { ClosedEnum } from "../../types/enums.js";
7
7
 
8
- /**
9
- * An object specifying the format that the model must output. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message.
10
- */
11
8
  export const ResponseFormats = {
12
9
  Text: "text",
13
10
  JsonObject: "json_object",
14
11
  JsonSchema: "json_schema",
15
12
  } as const;
16
- /**
17
- * An object specifying the format that the model must output. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message.
18
- */
19
13
  export type ResponseFormats = ClosedEnum<typeof ResponseFormats>;
20
14
 
21
15
  /** @internal */
@@ -14,7 +14,7 @@ import {
14
14
  } from "./entitytype.js";
15
15
 
16
16
  export type SharingDelete = {
17
- orgId: string;
17
+ orgId?: string | null | undefined;
18
18
  /**
19
19
  * The id of the entity (user, workspace or organization) to share with
20
20
  */
@@ -31,7 +31,7 @@ export const SharingDelete$inboundSchema: z.ZodType<
31
31
  z.ZodTypeDef,
32
32
  unknown
33
33
  > = z.object({
34
- org_id: z.string(),
34
+ org_id: z.nullable(z.string()).optional(),
35
35
  share_with_uuid: z.string(),
36
36
  share_with_type: EntityType$inboundSchema,
37
37
  }).transform((v) => {
@@ -44,7 +44,7 @@ export const SharingDelete$inboundSchema: z.ZodType<
44
44
 
45
45
  /** @internal */
46
46
  export type SharingDelete$Outbound = {
47
- org_id: string;
47
+ org_id?: string | null | undefined;
48
48
  share_with_uuid: string;
49
49
  share_with_type: string;
50
50
  };
@@ -55,7 +55,7 @@ export const SharingDelete$outboundSchema: z.ZodType<
55
55
  z.ZodTypeDef,
56
56
  SharingDelete
57
57
  > = z.object({
58
- orgId: z.string(),
58
+ orgId: z.nullable(z.string()).optional(),
59
59
  shareWithUuid: z.string(),
60
60
  shareWithType: EntityType$outboundSchema,
61
61
  }).transform((v) => {
@@ -19,7 +19,7 @@ import {
19
19
  } from "./shareenum.js";
20
20
 
21
21
  export type SharingIn = {
22
- orgId: string;
22
+ orgId?: string | null | undefined;
23
23
  level: ShareEnum;
24
24
  /**
25
25
  * The id of the entity (user, workspace or organization) to share with
@@ -37,7 +37,7 @@ export const SharingIn$inboundSchema: z.ZodType<
37
37
  z.ZodTypeDef,
38
38
  unknown
39
39
  > = z.object({
40
- org_id: z.string(),
40
+ org_id: z.nullable(z.string()).optional(),
41
41
  level: ShareEnum$inboundSchema,
42
42
  share_with_uuid: z.string(),
43
43
  share_with_type: EntityType$inboundSchema,
@@ -51,7 +51,7 @@ export const SharingIn$inboundSchema: z.ZodType<
51
51
 
52
52
  /** @internal */
53
53
  export type SharingIn$Outbound = {
54
- org_id: string;
54
+ org_id?: string | null | undefined;
55
55
  level: string;
56
56
  share_with_uuid: string;
57
57
  share_with_type: string;
@@ -63,7 +63,7 @@ export const SharingIn$outboundSchema: z.ZodType<
63
63
  z.ZodTypeDef,
64
64
  SharingIn
65
65
  > = z.object({
66
- orgId: z.string(),
66
+ orgId: z.nullable(z.string()).optional(),
67
67
  level: ShareEnum$outboundSchema,
68
68
  shareWithUuid: z.string(),
69
69
  shareWithType: EntityType$outboundSchema,
@@ -14,7 +14,7 @@ export type SharingOut = {
14
14
  orgId: string;
15
15
  role: string;
16
16
  shareWithType: string;
17
- shareWithUuid: string;
17
+ shareWithUuid: string | null;
18
18
  };
19
19
 
20
20
  /** @internal */
@@ -28,7 +28,7 @@ export const SharingOut$inboundSchema: z.ZodType<
28
28
  org_id: z.string(),
29
29
  role: z.string(),
30
30
  share_with_type: z.string(),
31
- share_with_uuid: z.string(),
31
+ share_with_uuid: z.nullable(z.string()),
32
32
  }).transform((v) => {
33
33
  return remap$(v, {
34
34
  "library_id": "libraryId",
@@ -46,7 +46,7 @@ export type SharingOut$Outbound = {
46
46
  org_id: string;
47
47
  role: string;
48
48
  share_with_type: string;
49
- share_with_uuid: string;
49
+ share_with_uuid: string | null;
50
50
  };
51
51
 
52
52
  /** @internal */
@@ -60,7 +60,7 @@ export const SharingOut$outboundSchema: z.ZodType<
60
60
  orgId: z.string(),
61
61
  role: z.string(),
62
62
  shareWithType: z.string(),
63
- shareWithUuid: z.string(),
63
+ shareWithUuid: z.nullable(z.string()),
64
64
  }).transform((v) => {
65
65
  return remap$(v, {
66
66
  libraryId: "library_id",
@@ -21,12 +21,14 @@ export type ToolExecutionDeltaEventType = ClosedEnum<
21
21
  typeof ToolExecutionDeltaEventType
22
22
  >;
23
23
 
24
+ export type ToolExecutionDeltaEventName = BuiltInConnectors | string;
25
+
24
26
  export type ToolExecutionDeltaEvent = {
25
27
  type?: ToolExecutionDeltaEventType | undefined;
26
28
  createdAt?: Date | undefined;
27
29
  outputIndex?: number | undefined;
28
30
  id: string;
29
- name: BuiltInConnectors;
31
+ name: BuiltInConnectors | string;
30
32
  arguments: string;
31
33
  };
32
34
 
@@ -51,6 +53,56 @@ export namespace ToolExecutionDeltaEventType$ {
51
53
  export const outboundSchema = ToolExecutionDeltaEventType$outboundSchema;
52
54
  }
53
55
 
56
+ /** @internal */
57
+ export const ToolExecutionDeltaEventName$inboundSchema: z.ZodType<
58
+ ToolExecutionDeltaEventName,
59
+ z.ZodTypeDef,
60
+ unknown
61
+ > = z.union([BuiltInConnectors$inboundSchema, z.string()]);
62
+
63
+ /** @internal */
64
+ export type ToolExecutionDeltaEventName$Outbound = string | string;
65
+
66
+ /** @internal */
67
+ export const ToolExecutionDeltaEventName$outboundSchema: z.ZodType<
68
+ ToolExecutionDeltaEventName$Outbound,
69
+ z.ZodTypeDef,
70
+ ToolExecutionDeltaEventName
71
+ > = z.union([BuiltInConnectors$outboundSchema, z.string()]);
72
+
73
+ /**
74
+ * @internal
75
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
76
+ */
77
+ export namespace ToolExecutionDeltaEventName$ {
78
+ /** @deprecated use `ToolExecutionDeltaEventName$inboundSchema` instead. */
79
+ export const inboundSchema = ToolExecutionDeltaEventName$inboundSchema;
80
+ /** @deprecated use `ToolExecutionDeltaEventName$outboundSchema` instead. */
81
+ export const outboundSchema = ToolExecutionDeltaEventName$outboundSchema;
82
+ /** @deprecated use `ToolExecutionDeltaEventName$Outbound` instead. */
83
+ export type Outbound = ToolExecutionDeltaEventName$Outbound;
84
+ }
85
+
86
+ export function toolExecutionDeltaEventNameToJSON(
87
+ toolExecutionDeltaEventName: ToolExecutionDeltaEventName,
88
+ ): string {
89
+ return JSON.stringify(
90
+ ToolExecutionDeltaEventName$outboundSchema.parse(
91
+ toolExecutionDeltaEventName,
92
+ ),
93
+ );
94
+ }
95
+
96
+ export function toolExecutionDeltaEventNameFromJSON(
97
+ jsonString: string,
98
+ ): SafeParseResult<ToolExecutionDeltaEventName, SDKValidationError> {
99
+ return safeParse(
100
+ jsonString,
101
+ (x) => ToolExecutionDeltaEventName$inboundSchema.parse(JSON.parse(x)),
102
+ `Failed to parse 'ToolExecutionDeltaEventName' from JSON`,
103
+ );
104
+ }
105
+
54
106
  /** @internal */
55
107
  export const ToolExecutionDeltaEvent$inboundSchema: z.ZodType<
56
108
  ToolExecutionDeltaEvent,
@@ -64,7 +116,7 @@ export const ToolExecutionDeltaEvent$inboundSchema: z.ZodType<
64
116
  .optional(),
65
117
  output_index: z.number().int().default(0),
66
118
  id: z.string(),
67
- name: BuiltInConnectors$inboundSchema,
119
+ name: z.union([BuiltInConnectors$inboundSchema, z.string()]),
68
120
  arguments: z.string(),
69
121
  }).transform((v) => {
70
122
  return remap$(v, {
@@ -79,7 +131,7 @@ export type ToolExecutionDeltaEvent$Outbound = {
79
131
  created_at?: string | undefined;
80
132
  output_index: number;
81
133
  id: string;
82
- name: string;
134
+ name: string | string;
83
135
  arguments: string;
84
136
  };
85
137
 
@@ -95,7 +147,7 @@ export const ToolExecutionDeltaEvent$outboundSchema: z.ZodType<
95
147
  createdAt: z.date().transform(v => v.toISOString()).optional(),
96
148
  outputIndex: z.number().int().default(0),
97
149
  id: z.string(),
98
- name: BuiltInConnectors$outboundSchema,
150
+ name: z.union([BuiltInConnectors$outboundSchema, z.string()]),
99
151
  arguments: z.string(),
100
152
  }).transform((v) => {
101
153
  return remap$(v, {
@@ -21,12 +21,14 @@ export type ToolExecutionDoneEventType = ClosedEnum<
21
21
  typeof ToolExecutionDoneEventType
22
22
  >;
23
23
 
24
+ export type ToolExecutionDoneEventName = BuiltInConnectors | string;
25
+
24
26
  export type ToolExecutionDoneEvent = {
25
27
  type?: ToolExecutionDoneEventType | undefined;
26
28
  createdAt?: Date | undefined;
27
29
  outputIndex?: number | undefined;
28
30
  id: string;
29
- name: BuiltInConnectors;
31
+ name: BuiltInConnectors | string;
30
32
  info?: { [k: string]: any } | undefined;
31
33
  };
32
34
 
@@ -51,6 +53,54 @@ export namespace ToolExecutionDoneEventType$ {
51
53
  export const outboundSchema = ToolExecutionDoneEventType$outboundSchema;
52
54
  }
53
55
 
56
+ /** @internal */
57
+ export const ToolExecutionDoneEventName$inboundSchema: z.ZodType<
58
+ ToolExecutionDoneEventName,
59
+ z.ZodTypeDef,
60
+ unknown
61
+ > = z.union([BuiltInConnectors$inboundSchema, z.string()]);
62
+
63
+ /** @internal */
64
+ export type ToolExecutionDoneEventName$Outbound = string | string;
65
+
66
+ /** @internal */
67
+ export const ToolExecutionDoneEventName$outboundSchema: z.ZodType<
68
+ ToolExecutionDoneEventName$Outbound,
69
+ z.ZodTypeDef,
70
+ ToolExecutionDoneEventName
71
+ > = z.union([BuiltInConnectors$outboundSchema, z.string()]);
72
+
73
+ /**
74
+ * @internal
75
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
76
+ */
77
+ export namespace ToolExecutionDoneEventName$ {
78
+ /** @deprecated use `ToolExecutionDoneEventName$inboundSchema` instead. */
79
+ export const inboundSchema = ToolExecutionDoneEventName$inboundSchema;
80
+ /** @deprecated use `ToolExecutionDoneEventName$outboundSchema` instead. */
81
+ export const outboundSchema = ToolExecutionDoneEventName$outboundSchema;
82
+ /** @deprecated use `ToolExecutionDoneEventName$Outbound` instead. */
83
+ export type Outbound = ToolExecutionDoneEventName$Outbound;
84
+ }
85
+
86
+ export function toolExecutionDoneEventNameToJSON(
87
+ toolExecutionDoneEventName: ToolExecutionDoneEventName,
88
+ ): string {
89
+ return JSON.stringify(
90
+ ToolExecutionDoneEventName$outboundSchema.parse(toolExecutionDoneEventName),
91
+ );
92
+ }
93
+
94
+ export function toolExecutionDoneEventNameFromJSON(
95
+ jsonString: string,
96
+ ): SafeParseResult<ToolExecutionDoneEventName, SDKValidationError> {
97
+ return safeParse(
98
+ jsonString,
99
+ (x) => ToolExecutionDoneEventName$inboundSchema.parse(JSON.parse(x)),
100
+ `Failed to parse 'ToolExecutionDoneEventName' from JSON`,
101
+ );
102
+ }
103
+
54
104
  /** @internal */
55
105
  export const ToolExecutionDoneEvent$inboundSchema: z.ZodType<
56
106
  ToolExecutionDoneEvent,
@@ -62,7 +112,7 @@ export const ToolExecutionDoneEvent$inboundSchema: z.ZodType<
62
112
  .optional(),
63
113
  output_index: z.number().int().default(0),
64
114
  id: z.string(),
65
- name: BuiltInConnectors$inboundSchema,
115
+ name: z.union([BuiltInConnectors$inboundSchema, z.string()]),
66
116
  info: z.record(z.any()).optional(),
67
117
  }).transform((v) => {
68
118
  return remap$(v, {
@@ -77,7 +127,7 @@ export type ToolExecutionDoneEvent$Outbound = {
77
127
  created_at?: string | undefined;
78
128
  output_index: number;
79
129
  id: string;
80
- name: string;
130
+ name: string | string;
81
131
  info?: { [k: string]: any } | undefined;
82
132
  };
83
133
 
@@ -93,7 +143,7 @@ export const ToolExecutionDoneEvent$outboundSchema: z.ZodType<
93
143
  createdAt: z.date().transform(v => v.toISOString()).optional(),
94
144
  outputIndex: z.number().int().default(0),
95
145
  id: z.string(),
96
- name: BuiltInConnectors$outboundSchema,
146
+ name: z.union([BuiltInConnectors$outboundSchema, z.string()]),
97
147
  info: z.record(z.any()).optional(),
98
148
  }).transform((v) => {
99
149
  return remap$(v, {
@@ -26,13 +26,15 @@ export const ToolExecutionEntryType = {
26
26
  } as const;
27
27
  export type ToolExecutionEntryType = ClosedEnum<typeof ToolExecutionEntryType>;
28
28
 
29
+ export type Name = BuiltInConnectors | string;
30
+
29
31
  export type ToolExecutionEntry = {
30
32
  object?: ToolExecutionEntryObject | undefined;
31
33
  type?: ToolExecutionEntryType | undefined;
32
34
  createdAt?: Date | undefined;
33
35
  completedAt?: Date | null | undefined;
34
36
  id?: string | undefined;
35
- name: BuiltInConnectors;
37
+ name: BuiltInConnectors | string;
36
38
  arguments: string;
37
39
  info?: { [k: string]: any } | undefined;
38
40
  };
@@ -79,6 +81,44 @@ export namespace ToolExecutionEntryType$ {
79
81
  export const outboundSchema = ToolExecutionEntryType$outboundSchema;
80
82
  }
81
83
 
84
+ /** @internal */
85
+ export const Name$inboundSchema: z.ZodType<Name, z.ZodTypeDef, unknown> = z
86
+ .union([BuiltInConnectors$inboundSchema, z.string()]);
87
+
88
+ /** @internal */
89
+ export type Name$Outbound = string | string;
90
+
91
+ /** @internal */
92
+ export const Name$outboundSchema: z.ZodType<Name$Outbound, z.ZodTypeDef, Name> =
93
+ z.union([BuiltInConnectors$outboundSchema, z.string()]);
94
+
95
+ /**
96
+ * @internal
97
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
98
+ */
99
+ export namespace Name$ {
100
+ /** @deprecated use `Name$inboundSchema` instead. */
101
+ export const inboundSchema = Name$inboundSchema;
102
+ /** @deprecated use `Name$outboundSchema` instead. */
103
+ export const outboundSchema = Name$outboundSchema;
104
+ /** @deprecated use `Name$Outbound` instead. */
105
+ export type Outbound = Name$Outbound;
106
+ }
107
+
108
+ export function nameToJSON(name: Name): string {
109
+ return JSON.stringify(Name$outboundSchema.parse(name));
110
+ }
111
+
112
+ export function nameFromJSON(
113
+ jsonString: string,
114
+ ): SafeParseResult<Name, SDKValidationError> {
115
+ return safeParse(
116
+ jsonString,
117
+ (x) => Name$inboundSchema.parse(JSON.parse(x)),
118
+ `Failed to parse 'Name' from JSON`,
119
+ );
120
+ }
121
+
82
122
  /** @internal */
83
123
  export const ToolExecutionEntry$inboundSchema: z.ZodType<
84
124
  ToolExecutionEntry,
@@ -93,7 +133,7 @@ export const ToolExecutionEntry$inboundSchema: z.ZodType<
93
133
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
94
134
  ).optional(),
95
135
  id: z.string().optional(),
96
- name: BuiltInConnectors$inboundSchema,
136
+ name: z.union([BuiltInConnectors$inboundSchema, z.string()]),
97
137
  arguments: z.string(),
98
138
  info: z.record(z.any()).optional(),
99
139
  }).transform((v) => {
@@ -110,7 +150,7 @@ export type ToolExecutionEntry$Outbound = {
110
150
  created_at?: string | undefined;
111
151
  completed_at?: string | null | undefined;
112
152
  id?: string | undefined;
113
- name: string;
153
+ name: string | string;
114
154
  arguments: string;
115
155
  info?: { [k: string]: any } | undefined;
116
156
  };
@@ -126,7 +166,7 @@ export const ToolExecutionEntry$outboundSchema: z.ZodType<
126
166
  createdAt: z.date().transform(v => v.toISOString()).optional(),
127
167
  completedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
128
168
  id: z.string().optional(),
129
- name: BuiltInConnectors$outboundSchema,
169
+ name: z.union([BuiltInConnectors$outboundSchema, z.string()]),
130
170
  arguments: z.string(),
131
171
  info: z.record(z.any()).optional(),
132
172
  }).transform((v) => {