@orq-ai/node 4.15.0-rc.21 → 4.15.0-rc.23

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 (427) hide show
  1. package/README.md +54 -28
  2. package/funcs/hubGet.d.ts +18 -0
  3. package/funcs/hubGet.d.ts.map +1 -0
  4. package/funcs/hubGet.js +121 -0
  5. package/funcs/hubGet.js.map +1 -0
  6. package/funcs/hubSearch.d.ts +18 -0
  7. package/funcs/hubSearch.d.ts.map +1 -0
  8. package/funcs/hubSearch.js +120 -0
  9. package/funcs/hubSearch.js.map +1 -0
  10. package/funcs/piiCapabilities.d.ts +17 -0
  11. package/funcs/piiCapabilities.d.ts.map +1 -0
  12. package/funcs/piiCapabilities.js +105 -0
  13. package/funcs/piiCapabilities.js.map +1 -0
  14. package/funcs/sessionsCreate.d.ts +17 -0
  15. package/funcs/sessionsCreate.d.ts.map +1 -0
  16. package/funcs/sessionsCreate.js +115 -0
  17. package/funcs/sessionsCreate.js.map +1 -0
  18. package/funcs/sessionsDelete.d.ts +17 -0
  19. package/funcs/sessionsDelete.d.ts.map +1 -0
  20. package/funcs/sessionsDelete.js +121 -0
  21. package/funcs/sessionsDelete.js.map +1 -0
  22. package/funcs/sessionsGet.d.ts +18 -0
  23. package/funcs/sessionsGet.d.ts.map +1 -0
  24. package/funcs/sessionsGet.js +121 -0
  25. package/funcs/sessionsGet.js.map +1 -0
  26. package/funcs/sessionsGetCount.d.ts +17 -0
  27. package/funcs/sessionsGetCount.d.ts.map +1 -0
  28. package/funcs/sessionsGetCount.js +115 -0
  29. package/funcs/sessionsGetCount.js.map +1 -0
  30. package/funcs/sessionsList.d.ts +17 -0
  31. package/funcs/sessionsList.d.ts.map +1 -0
  32. package/funcs/sessionsList.js +115 -0
  33. package/funcs/sessionsList.js.map +1 -0
  34. package/funcs/sessionsListTags.d.ts +16 -0
  35. package/funcs/sessionsListTags.d.ts.map +1 -0
  36. package/funcs/sessionsListTags.js +105 -0
  37. package/funcs/sessionsListTags.js.map +1 -0
  38. package/funcs/sessionsUpdate.d.ts +18 -0
  39. package/funcs/sessionsUpdate.d.ts.map +1 -0
  40. package/funcs/sessionsUpdate.js +124 -0
  41. package/funcs/sessionsUpdate.js.map +1 -0
  42. package/jsr.json +1 -1
  43. package/lib/config.d.ts +2 -2
  44. package/lib/config.js +2 -2
  45. package/models/components/agentresponserequest.d.ts +6 -6
  46. package/models/components/agentresponserequest.d.ts.map +1 -1
  47. package/models/components/agentresponserequest.js +6 -6
  48. package/models/components/agentresponserequest.js.map +1 -1
  49. package/models/components/agentstartedstreamingevent.d.ts +13 -1
  50. package/models/components/agentstartedstreamingevent.d.ts.map +1 -1
  51. package/models/components/agentstartedstreamingevent.js +2 -0
  52. package/models/components/agentstartedstreamingevent.js.map +1 -1
  53. package/models/components/capabilitiesresponse.d.ts +62 -0
  54. package/models/components/capabilitiesresponse.d.ts.map +1 -0
  55. package/models/components/capabilitiesresponse.js +68 -0
  56. package/models/components/capabilitiesresponse.js.map +1 -0
  57. package/models/components/createthreadrequest.d.ts +41 -0
  58. package/models/components/createthreadrequest.d.ts.map +1 -0
  59. package/models/components/createthreadrequest.js +75 -0
  60. package/models/components/createthreadrequest.js.map +1 -0
  61. package/models/components/detectrequest.d.ts +48 -0
  62. package/models/components/detectrequest.d.ts.map +1 -1
  63. package/models/components/detectrequest.js +4 -0
  64. package/models/components/detectrequest.js.map +1 -1
  65. package/models/components/entitylist.d.ts +16 -0
  66. package/models/components/entitylist.d.ts.map +1 -0
  67. package/models/components/entitylist.js +50 -0
  68. package/models/components/entitylist.js.map +1 -0
  69. package/models/components/gethubitemresponse.d.ts +11 -0
  70. package/models/components/gethubitemresponse.d.ts.map +1 -0
  71. package/models/components/gethubitemresponse.js +56 -0
  72. package/models/components/gethubitemresponse.js.map +1 -0
  73. package/models/components/getthreadcountrequest.d.ts +17 -0
  74. package/models/components/getthreadcountrequest.d.ts.map +1 -0
  75. package/models/components/getthreadcountrequest.js +52 -0
  76. package/models/components/getthreadcountrequest.js.map +1 -0
  77. package/models/components/getthreadcountresponse.d.ts +10 -0
  78. package/models/components/getthreadcountresponse.d.ts.map +1 -0
  79. package/models/components/getthreadcountresponse.js +50 -0
  80. package/models/components/getthreadcountresponse.js.map +1 -0
  81. package/models/components/guardrailruleplugin.d.ts +25 -0
  82. package/models/components/guardrailruleplugin.d.ts.map +1 -1
  83. package/models/components/guardrailruleplugin.js +6 -0
  84. package/models/components/guardrailruleplugin.js.map +1 -1
  85. package/models/components/hubitem.d.ts +71 -0
  86. package/models/components/hubitem.d.ts.map +1 -0
  87. package/models/components/hubitem.js +83 -0
  88. package/models/components/hubitem.js.map +1 -0
  89. package/models/components/hubitemsummary.d.ts +29 -0
  90. package/models/components/hubitemsummary.d.ts.map +1 -0
  91. package/models/components/hubitemsummary.js +60 -0
  92. package/models/components/hubitemsummary.js.map +1 -0
  93. package/models/components/hubsearchhit.d.ts +11 -0
  94. package/models/components/hubsearchhit.d.ts.map +1 -0
  95. package/models/components/hubsearchhit.js +51 -0
  96. package/models/components/hubsearchhit.js.map +1 -0
  97. package/models/components/index.d.ts +21 -3
  98. package/models/components/index.d.ts.map +1 -1
  99. package/models/components/index.js +21 -3
  100. package/models/components/index.js.map +1 -1
  101. package/models/components/listthreadsrequest.d.ts +17 -0
  102. package/models/components/listthreadsrequest.d.ts.map +1 -0
  103. package/models/components/listthreadsrequest.js +52 -0
  104. package/models/components/listthreadsrequest.js.map +1 -0
  105. package/models/components/listthreadsresponse.d.ts +13 -0
  106. package/models/components/listthreadsresponse.d.ts.map +1 -0
  107. package/models/components/listthreadsresponse.js +58 -0
  108. package/models/components/listthreadsresponse.js.map +1 -0
  109. package/models/components/openaipromptcacheoptions.d.ts +37 -0
  110. package/models/components/openaipromptcacheoptions.d.ts.map +1 -0
  111. package/models/components/openaipromptcacheoptions.js +75 -0
  112. package/models/components/openaipromptcacheoptions.js.map +1 -0
  113. package/models/components/piiredactionplugin.d.ts +84 -0
  114. package/models/components/piiredactionplugin.d.ts.map +1 -0
  115. package/models/components/piiredactionplugin.js +103 -0
  116. package/models/components/piiredactionplugin.js.map +1 -0
  117. package/models/components/publicplugin.d.ts +17 -16
  118. package/models/components/publicplugin.d.ts.map +1 -1
  119. package/models/components/publicplugin.js +5 -11
  120. package/models/components/publicplugin.js.map +1 -1
  121. package/models/components/publicresponseresource.d.ts +2 -0
  122. package/models/components/publicresponseresource.d.ts.map +1 -1
  123. package/models/components/publicresponseresource.js +3 -0
  124. package/models/components/publicresponseresource.js.map +1 -1
  125. package/models/components/reasoningpart.js +1 -1
  126. package/models/components/redactrequest.d.ts +48 -0
  127. package/models/components/redactrequest.d.ts.map +1 -1
  128. package/models/components/redactrequest.js +8 -0
  129. package/models/components/redactrequest.js.map +1 -1
  130. package/models/components/responsehealingplugin.d.ts +2 -17
  131. package/models/components/responsehealingplugin.d.ts.map +1 -1
  132. package/models/components/responsehealingplugin.js +3 -13
  133. package/models/components/responsehealingplugin.js.map +1 -1
  134. package/models/components/routingruleplugin.d.ts +25 -0
  135. package/models/components/routingruleplugin.d.ts.map +1 -1
  136. package/models/components/routingruleplugin.js +6 -0
  137. package/models/components/routingruleplugin.js.map +1 -1
  138. package/models/components/searchhubitemsresponse.d.ts +11 -0
  139. package/models/components/searchhubitemsresponse.d.ts.map +1 -0
  140. package/models/components/searchhubitemsresponse.js +51 -0
  141. package/models/components/searchhubitemsresponse.js.map +1 -0
  142. package/models/components/sessioninterval.d.ts +19 -0
  143. package/models/components/sessioninterval.d.ts.map +1 -0
  144. package/models/components/sessioninterval.js +56 -0
  145. package/models/components/sessioninterval.js.map +1 -0
  146. package/models/components/textcontentpartschema.d.ts +5 -5
  147. package/models/components/textcontentpartschema.d.ts.map +1 -1
  148. package/models/components/textcontentpartschema.js +6 -6
  149. package/models/components/textcontentpartschema.js.map +1 -1
  150. package/models/components/thread.d.ts +54 -0
  151. package/models/components/thread.d.ts.map +1 -0
  152. package/models/components/thread.js +79 -0
  153. package/models/components/thread.js.map +1 -0
  154. package/models/components/threadbilling.d.ts +21 -0
  155. package/models/components/threadbilling.d.ts.map +1 -0
  156. package/models/components/threadbilling.js +75 -0
  157. package/models/components/threadbilling.js.map +1 -0
  158. package/models/components/threadfilters.d.ts +34 -0
  159. package/models/components/threadfilters.d.ts.map +1 -0
  160. package/models/components/threadfilters.js +65 -0
  161. package/models/components/threadfilters.js.map +1 -0
  162. package/models/components/threadkind.d.ts +13 -0
  163. package/models/components/threadkind.d.ts.map +1 -0
  164. package/models/components/threadkind.js +51 -0
  165. package/models/components/threadkind.js.map +1 -0
  166. package/models/components/threadusage.d.ts +21 -0
  167. package/models/components/threadusage.d.ts.map +1 -0
  168. package/models/components/threadusage.js +75 -0
  169. package/models/components/threadusage.js.map +1 -0
  170. package/models/components/tracescrubbingplugin.d.ts +2 -16
  171. package/models/components/tracescrubbingplugin.d.ts.map +1 -1
  172. package/models/components/tracescrubbingplugin.js +3 -13
  173. package/models/components/tracescrubbingplugin.js.map +1 -1
  174. package/models/components/updatethreadrequest.d.ts +51 -0
  175. package/models/components/updatethreadrequest.d.ts.map +1 -0
  176. package/models/components/updatethreadrequest.js +79 -0
  177. package/models/components/updatethreadrequest.js.map +1 -0
  178. package/models/operations/createagentrequest.d.ts +67 -13
  179. package/models/operations/createagentrequest.d.ts.map +1 -1
  180. package/models/operations/createagentrequest.js +20 -32
  181. package/models/operations/createagentrequest.js.map +1 -1
  182. package/models/operations/createchatcompletion.d.ts +12 -4
  183. package/models/operations/createchatcompletion.d.ts.map +1 -1
  184. package/models/operations/createchatcompletion.js +4 -8
  185. package/models/operations/createchatcompletion.js.map +1 -1
  186. package/models/operations/createcompletion.d.ts +2 -8
  187. package/models/operations/createcompletion.d.ts.map +1 -1
  188. package/models/operations/createcompletion.js +3 -17
  189. package/models/operations/createcompletion.js.map +1 -1
  190. package/models/operations/createdataset.js +1 -1
  191. package/models/operations/createdatasetitem.js +5 -5
  192. package/models/operations/createimage.d.ts +2 -8
  193. package/models/operations/createimage.d.ts.map +1 -1
  194. package/models/operations/createimage.js +2 -16
  195. package/models/operations/createimage.js.map +1 -1
  196. package/models/operations/createprompt.d.ts +18 -6
  197. package/models/operations/createprompt.d.ts.map +1 -1
  198. package/models/operations/createprompt.js +8 -16
  199. package/models/operations/createprompt.js.map +1 -1
  200. package/models/operations/creatererank.d.ts +2 -8
  201. package/models/operations/creatererank.d.ts.map +1 -1
  202. package/models/operations/creatererank.js +2 -16
  203. package/models/operations/creatererank.js.map +1 -1
  204. package/models/operations/createrouterresponse.d.ts +80 -8
  205. package/models/operations/createrouterresponse.d.ts.map +1 -1
  206. package/models/operations/createrouterresponse.js +48 -5
  207. package/models/operations/createrouterresponse.js.map +1 -1
  208. package/models/operations/createtool.js +4 -4
  209. package/models/operations/deletesession.d.ts +12 -0
  210. package/models/operations/deletesession.d.ts.map +1 -0
  211. package/models/operations/deletesession.js +54 -0
  212. package/models/operations/deletesession.js.map +1 -0
  213. package/models/operations/getallprompts.d.ts +6 -2
  214. package/models/operations/getallprompts.d.ts.map +1 -1
  215. package/models/operations/getallprompts.js +4 -8
  216. package/models/operations/getallprompts.js.map +1 -1
  217. package/models/operations/getalltools.js +4 -4
  218. package/models/operations/getoneprompt.d.ts +6 -2
  219. package/models/operations/getoneprompt.d.ts.map +1 -1
  220. package/models/operations/getoneprompt.js +4 -8
  221. package/models/operations/getoneprompt.js.map +1 -1
  222. package/models/operations/getpromptversion.d.ts +6 -2
  223. package/models/operations/getpromptversion.d.ts.map +1 -1
  224. package/models/operations/getpromptversion.js +4 -8
  225. package/models/operations/getpromptversion.js.map +1 -1
  226. package/models/operations/getsession.d.ts +12 -0
  227. package/models/operations/getsession.d.ts.map +1 -0
  228. package/models/operations/getsession.js +54 -0
  229. package/models/operations/getsession.js.map +1 -0
  230. package/models/operations/getv2humanevalsets.js +2 -2
  231. package/models/operations/getv2humanevalsetsid.js +2 -2
  232. package/models/operations/hubget.d.ts +12 -0
  233. package/models/operations/hubget.d.ts.map +1 -0
  234. package/models/operations/hubget.js +49 -0
  235. package/models/operations/hubget.js.map +1 -0
  236. package/models/operations/hubsearch.d.ts +14 -0
  237. package/models/operations/hubsearch.d.ts.map +1 -0
  238. package/models/operations/hubsearch.js +50 -0
  239. package/models/operations/hubsearch.js.map +1 -0
  240. package/models/operations/index.d.ts +5 -0
  241. package/models/operations/index.d.ts.map +1 -1
  242. package/models/operations/index.js +5 -0
  243. package/models/operations/index.js.map +1 -1
  244. package/models/operations/listagents.d.ts +25 -5
  245. package/models/operations/listagents.d.ts.map +1 -1
  246. package/models/operations/listagents.js +10 -16
  247. package/models/operations/listagents.js.map +1 -1
  248. package/models/operations/listdatasetdatapoints.js +5 -5
  249. package/models/operations/listdatasets.js +1 -1
  250. package/models/operations/listpromptversions.d.ts +6 -2
  251. package/models/operations/listpromptversions.d.ts.map +1 -1
  252. package/models/operations/listpromptversions.js +4 -8
  253. package/models/operations/listpromptversions.js.map +1 -1
  254. package/models/operations/modelcreateopenailike.d.ts +4 -0
  255. package/models/operations/modelcreateopenailike.d.ts.map +1 -1
  256. package/models/operations/modelcreateopenailike.js +4 -0
  257. package/models/operations/modelcreateopenailike.js.map +1 -1
  258. package/models/operations/modelupdateopenailike.d.ts +4 -0
  259. package/models/operations/modelupdateopenailike.d.ts.map +1 -1
  260. package/models/operations/modelupdateopenailike.js +4 -0
  261. package/models/operations/modelupdateopenailike.js.map +1 -1
  262. package/models/operations/patchv2humanevalsetsid.js +2 -2
  263. package/models/operations/postv2feedbackevaluation.js +4 -4
  264. package/models/operations/postv2humanevalsets.js +2 -2
  265. package/models/operations/postv2routerocr.d.ts +24 -0
  266. package/models/operations/postv2routerocr.d.ts.map +1 -1
  267. package/models/operations/postv2routerocr.js +12 -0
  268. package/models/operations/postv2routerocr.js.map +1 -1
  269. package/models/operations/retrieveagentrequest.d.ts +25 -5
  270. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  271. package/models/operations/retrieveagentrequest.js +10 -16
  272. package/models/operations/retrieveagentrequest.js.map +1 -1
  273. package/models/operations/retrievedatapoint.js +5 -5
  274. package/models/operations/retrievedataset.js +1 -1
  275. package/models/operations/retrieveresponse.d.ts +1 -0
  276. package/models/operations/retrieveresponse.d.ts.map +1 -1
  277. package/models/operations/retrieveresponse.js +2 -0
  278. package/models/operations/retrieveresponse.js.map +1 -1
  279. package/models/operations/retrievetool.js +4 -4
  280. package/models/operations/runagent.d.ts +42 -8
  281. package/models/operations/runagent.d.ts.map +1 -1
  282. package/models/operations/runagent.js +11 -17
  283. package/models/operations/runagent.js.map +1 -1
  284. package/models/operations/streamrunagent.d.ts +42 -8
  285. package/models/operations/streamrunagent.d.ts.map +1 -1
  286. package/models/operations/streamrunagent.js +11 -17
  287. package/models/operations/streamrunagent.js.map +1 -1
  288. package/models/operations/updateagent.d.ts +67 -13
  289. package/models/operations/updateagent.d.ts.map +1 -1
  290. package/models/operations/updateagent.js +20 -32
  291. package/models/operations/updateagent.js.map +1 -1
  292. package/models/operations/updatedatapoint.js +5 -5
  293. package/models/operations/updatedataset.js +1 -1
  294. package/models/operations/updateprompt.d.ts +18 -6
  295. package/models/operations/updateprompt.d.ts.map +1 -1
  296. package/models/operations/updateprompt.js +8 -16
  297. package/models/operations/updateprompt.js.map +1 -1
  298. package/models/operations/updatesession.d.ts +15 -0
  299. package/models/operations/updatesession.d.ts.map +1 -0
  300. package/models/operations/updatesession.js +57 -0
  301. package/models/operations/updatesession.js.map +1 -0
  302. package/models/operations/updatetool.js +4 -4
  303. package/package.json +1 -1
  304. package/sdk/hub.d.ts +20 -0
  305. package/sdk/hub.d.ts.map +1 -0
  306. package/sdk/hub.js +32 -0
  307. package/sdk/hub.js.map +1 -0
  308. package/sdk/pii.d.ts +7 -0
  309. package/sdk/pii.d.ts.map +1 -1
  310. package/sdk/pii.js +10 -0
  311. package/sdk/pii.js.map +1 -1
  312. package/sdk/sdk.d.ts +6 -0
  313. package/sdk/sdk.d.ts.map +1 -1
  314. package/sdk/sdk.js +8 -0
  315. package/sdk/sdk.js.map +1 -1
  316. package/sdk/sessions.d.ts +55 -0
  317. package/sdk/sessions.d.ts.map +1 -0
  318. package/sdk/sessions.js +82 -0
  319. package/sdk/sessions.js.map +1 -0
  320. package/src/funcs/hubGet.ts +168 -0
  321. package/src/funcs/hubSearch.ts +169 -0
  322. package/src/funcs/piiCapabilities.ts +144 -0
  323. package/src/funcs/sessionsCreate.ts +162 -0
  324. package/src/funcs/sessionsDelete.ts +168 -0
  325. package/src/funcs/sessionsGet.ts +168 -0
  326. package/src/funcs/sessionsGetCount.ts +162 -0
  327. package/src/funcs/sessionsList.ts +162 -0
  328. package/src/funcs/sessionsListTags.ts +144 -0
  329. package/src/funcs/sessionsUpdate.ts +171 -0
  330. package/src/lib/config.ts +2 -2
  331. package/src/models/components/agentresponserequest.ts +14 -10
  332. package/src/models/components/agentstartedstreamingevent.ts +11 -1
  333. package/src/models/components/capabilitiesresponse.ts +96 -0
  334. package/src/models/components/createthreadrequest.ts +91 -0
  335. package/src/models/components/detectrequest.ts +48 -0
  336. package/src/models/components/entitylist.ts +37 -0
  337. package/src/models/components/gethubitemresponse.ts +37 -0
  338. package/src/models/components/getthreadcountrequest.ts +42 -0
  339. package/src/models/components/getthreadcountresponse.ts +31 -0
  340. package/src/models/components/guardrailruleplugin.ts +27 -0
  341. package/src/models/components/hubitem.ts +136 -0
  342. package/src/models/components/hubitemsummary.ts +60 -0
  343. package/src/models/components/hubsearchhit.ts +35 -0
  344. package/src/models/components/index.ts +21 -3
  345. package/src/models/components/listthreadsrequest.ts +42 -0
  346. package/src/models/components/listthreadsresponse.ts +41 -0
  347. package/src/models/components/openaipromptcacheoptions.ts +84 -0
  348. package/src/models/components/piiredactionplugin.ts +143 -0
  349. package/src/models/components/publicplugin.ts +17 -21
  350. package/src/models/components/publicresponseresource.ts +7 -0
  351. package/src/models/components/reasoningpart.ts +1 -1
  352. package/src/models/components/redactrequest.ts +52 -0
  353. package/src/models/components/responsehealingplugin.ts +4 -27
  354. package/src/models/components/routingruleplugin.ts +27 -0
  355. package/src/models/components/searchhubitemsresponse.ts +32 -0
  356. package/src/models/components/sessioninterval.ts +26 -0
  357. package/src/models/components/textcontentpartschema.ts +13 -8
  358. package/src/models/components/thread.ts +101 -0
  359. package/src/models/components/threadbilling.ts +68 -0
  360. package/src/models/components/threadfilters.ts +66 -0
  361. package/src/models/components/threadkind.ts +20 -0
  362. package/src/models/components/threadusage.ts +68 -0
  363. package/src/models/components/tracescrubbingplugin.ts +4 -24
  364. package/src/models/components/updatethreadrequest.ts +105 -0
  365. package/src/models/operations/createagentrequest.ts +85 -87
  366. package/src/models/operations/createchatcompletion.ts +18 -26
  367. package/src/models/operations/createcompletion.ts +3 -51
  368. package/src/models/operations/createdataset.ts +1 -1
  369. package/src/models/operations/createdatasetitem.ts +5 -5
  370. package/src/models/operations/createimage.ts +3 -51
  371. package/src/models/operations/createprompt.ts +31 -43
  372. package/src/models/operations/creatererank.ts +3 -51
  373. package/src/models/operations/createrouterresponse.ts +128 -9
  374. package/src/models/operations/createtool.ts +4 -4
  375. package/src/models/operations/deletesession.ts +36 -0
  376. package/src/models/operations/getallprompts.ts +13 -17
  377. package/src/models/operations/getalltools.ts +4 -4
  378. package/src/models/operations/getoneprompt.ts +13 -17
  379. package/src/models/operations/getpromptversion.ts +13 -17
  380. package/src/models/operations/getsession.ts +36 -0
  381. package/src/models/operations/getv2humanevalsets.ts +2 -2
  382. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  383. package/src/models/operations/hubget.ts +27 -0
  384. package/src/models/operations/hubsearch.ts +34 -0
  385. package/src/models/operations/index.ts +5 -0
  386. package/src/models/operations/listagents.ts +37 -35
  387. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  388. package/src/models/operations/listdatasets.ts +1 -1
  389. package/src/models/operations/listpromptversions.ts +13 -17
  390. package/src/models/operations/modelcreateopenailike.ts +8 -0
  391. package/src/models/operations/modelupdateopenailike.ts +8 -0
  392. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  393. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  394. package/src/models/operations/postv2humanevalsets.ts +2 -2
  395. package/src/models/operations/postv2routerocr.ts +36 -0
  396. package/src/models/operations/retrieveagentrequest.ts +37 -35
  397. package/src/models/operations/retrievedatapoint.ts +5 -5
  398. package/src/models/operations/retrievedataset.ts +1 -1
  399. package/src/models/operations/retrieveresponse.ts +5 -0
  400. package/src/models/operations/retrievetool.ts +4 -4
  401. package/src/models/operations/runagent.ts +49 -53
  402. package/src/models/operations/streamrunagent.ts +49 -53
  403. package/src/models/operations/updateagent.ts +85 -87
  404. package/src/models/operations/updatedatapoint.ts +5 -5
  405. package/src/models/operations/updatedataset.ts +1 -1
  406. package/src/models/operations/updateprompt.ts +31 -43
  407. package/src/models/operations/updatesession.ts +41 -0
  408. package/src/models/operations/updatetool.ts +4 -4
  409. package/src/sdk/hub.ts +46 -0
  410. package/src/sdk/pii.ts +16 -0
  411. package/src/sdk/sdk.ts +12 -0
  412. package/src/sdk/sessions.ts +134 -0
  413. package/models/components/piiredactionpluginauto.d.ts +0 -126
  414. package/models/components/piiredactionpluginauto.d.ts.map +0 -1
  415. package/models/components/piiredactionpluginauto.js +0 -156
  416. package/models/components/piiredactionpluginauto.js.map +0 -1
  417. package/models/components/piiredactionpluginen.d.ts +0 -145
  418. package/models/components/piiredactionpluginen.d.ts.map +0 -1
  419. package/models/components/piiredactionpluginen.js +0 -167
  420. package/models/components/piiredactionpluginen.js.map +0 -1
  421. package/models/components/piiredactionpluginnl.d.ts +0 -137
  422. package/models/components/piiredactionpluginnl.d.ts.map +0 -1
  423. package/models/components/piiredactionpluginnl.js +0 -158
  424. package/models/components/piiredactionpluginnl.js.map +0 -1
  425. package/src/models/components/piiredactionpluginauto.ts +0 -185
  426. package/src/models/components/piiredactionpluginen.ts +0 -222
  427. package/src/models/components/piiredactionpluginnl.ts +0 -218
@@ -19,18 +19,6 @@ export const PublicPluginId = {
19
19
  */
20
20
  export type PublicPluginId = ClosedEnum<typeof PublicPluginId>;
21
21
 
22
- /**
23
- * pii_redaction only. Detector language. Defaults to en.
24
- */
25
- export const PublicPluginLanguage = {
26
- En: "en",
27
- Nl: "nl",
28
- } as const;
29
- /**
30
- * pii_redaction only. Detector language. Defaults to en.
31
- */
32
- export type PublicPluginLanguage = ClosedEnum<typeof PublicPluginLanguage>;
33
-
34
22
  export const PublicPluginMask = {
35
23
  All: "all",
36
24
  System: "system",
@@ -55,17 +43,21 @@ export type PublicPluginOnFailure = ClosedEnum<typeof PublicPluginOnFailure>;
55
43
 
56
44
  export type PublicPlugin = {
57
45
  /**
58
- * pii_redaction only. Entity types to redact (e.g. EMAIL_ADDRESS, BSN). Omit to redact every type detected for the language.
46
+ * pii_redaction only. Entity types to redact (e.g. EMAIL_ADDRESS, BSN). Omit to redact every type detected for the language and regions. Cannot be combined with regions.
59
47
  */
60
48
  entities?: Array<string> | null | undefined;
49
+ /**
50
+ * pii_redaction only. Per-entity confidence cutoff overrides in [0,1], keyed by entity type. An override replaces threshold for that type and may sit above or below it. Every key must also appear in entities.
51
+ */
52
+ entityThresholds?: { [k: string]: number } | undefined;
61
53
  /**
62
54
  * Plugin discriminator. pii_redaction redacts PII, response_healing repairs malformed JSON, and trace_scrubbing removes selected sensitive fields from exported traces.
63
55
  */
64
56
  id: PublicPluginId;
65
57
  /**
66
- * pii_redaction only. Detector language. Defaults to en.
58
+ * pii_redaction only. Detector language, or "auto" to detect it per request. Defaults to en. The accepted values are whatever GET /v2/pii/capabilities lists, so they are not enumerated here: a fixed enum would reject a language the detector has since added.
67
59
  */
68
- language?: PublicPluginLanguage | undefined;
60
+ language?: string | undefined;
69
61
  /**
70
62
  * trace_scrubbing only. Trace surfaces to scrub. At least one value required.
71
63
  */
@@ -74,6 +66,10 @@ export type PublicPlugin = {
74
66
  * pii_redaction only. Behavior when redaction is unavailable. block (default) fails the request; passthrough sends the original text.
75
67
  */
76
68
  onFailure?: PublicPluginOnFailure | undefined;
69
+ /**
70
+ * pii_redaction only. Region codes gating regional recognizers (e.g. nl, gb). ["all"] is exclusive. Omit for base entities only. Cannot be combined with entities.
71
+ */
72
+ regions?: Array<string> | null | undefined;
77
73
  /**
78
74
  * pii_redaction only. Detector confidence cutoff in [0,1].
79
75
  */
@@ -85,11 +81,6 @@ export const PublicPluginId$outboundSchema: z.ZodNativeEnum<
85
81
  typeof PublicPluginId
86
82
  > = z.nativeEnum(PublicPluginId);
87
83
 
88
- /** @internal */
89
- export const PublicPluginLanguage$outboundSchema: z.ZodNativeEnum<
90
- typeof PublicPluginLanguage
91
- > = z.nativeEnum(PublicPluginLanguage);
92
-
93
84
  /** @internal */
94
85
  export const PublicPluginMask$outboundSchema: z.ZodNativeEnum<
95
86
  typeof PublicPluginMask
@@ -103,10 +94,12 @@ export const PublicPluginOnFailure$outboundSchema: z.ZodNativeEnum<
103
94
  /** @internal */
104
95
  export type PublicPlugin$Outbound = {
105
96
  entities?: Array<string> | null | undefined;
97
+ entity_thresholds?: { [k: string]: number } | undefined;
106
98
  id: string;
107
99
  language?: string | undefined;
108
100
  mask?: Array<string> | null | undefined;
109
101
  on_failure?: string | undefined;
102
+ regions?: Array<string> | null | undefined;
110
103
  threshold?: number | undefined;
111
104
  };
112
105
 
@@ -117,13 +110,16 @@ export const PublicPlugin$outboundSchema: z.ZodType<
117
110
  PublicPlugin
118
111
  > = z.object({
119
112
  entities: z.nullable(z.array(z.string())).optional(),
113
+ entityThresholds: z.record(z.number()).optional(),
120
114
  id: PublicPluginId$outboundSchema,
121
- language: PublicPluginLanguage$outboundSchema.optional(),
115
+ language: z.string().optional(),
122
116
  mask: z.nullable(z.array(PublicPluginMask$outboundSchema)).optional(),
123
117
  onFailure: PublicPluginOnFailure$outboundSchema.optional(),
118
+ regions: z.nullable(z.array(z.string())).optional(),
124
119
  threshold: z.number().optional(),
125
120
  }).transform((v) => {
126
121
  return remap$(v, {
122
+ entityThresholds: "entity_thresholds",
127
123
  onFailure: "on_failure",
128
124
  });
129
125
  });
@@ -17,6 +17,10 @@ import {
17
17
  IncompleteDetails$inboundSchema,
18
18
  } from "./incompletedetails.js";
19
19
  import { MemoryParam, MemoryParam$inboundSchema } from "./memoryparam.js";
20
+ import {
21
+ OpenAIPromptCacheOptions,
22
+ OpenAIPromptCacheOptions$inboundSchema,
23
+ } from "./openaipromptcacheoptions.js";
20
24
  import { PublicUsage, PublicUsage$inboundSchema } from "./publicusage.js";
21
25
  import { Reasoning, Reasoning$inboundSchema } from "./reasoning.js";
22
26
  import { ResponseError, ResponseError$inboundSchema } from "./responseerror.js";
@@ -86,6 +90,7 @@ export type PublicResponseResource = {
86
90
  presencePenalty: number;
87
91
  previousResponseId: string | null;
88
92
  promptCacheKey: string | null;
93
+ promptCacheOptions: OpenAIPromptCacheOptions | null;
89
94
  promptCacheRetention: string | null;
90
95
  reasoning: Reasoning | null;
91
96
  safetyIdentifier: string | null;
@@ -158,6 +163,7 @@ export const PublicResponseResource$inboundSchema: z.ZodType<
158
163
  presence_penalty: z.number(),
159
164
  previous_response_id: z.nullable(z.string()),
160
165
  prompt_cache_key: z.nullable(z.string()),
166
+ prompt_cache_options: z.nullable(OpenAIPromptCacheOptions$inboundSchema),
161
167
  prompt_cache_retention: z.nullable(z.string()),
162
168
  reasoning: z.nullable(Reasoning$inboundSchema),
163
169
  safety_identifier: z.nullable(z.string()),
@@ -188,6 +194,7 @@ export const PublicResponseResource$inboundSchema: z.ZodType<
188
194
  "presence_penalty": "presencePenalty",
189
195
  "previous_response_id": "previousResponseId",
190
196
  "prompt_cache_key": "promptCacheKey",
197
+ "prompt_cache_options": "promptCacheOptions",
191
198
  "prompt_cache_retention": "promptCacheRetention",
192
199
  "safety_identifier": "safetyIdentifier",
193
200
  "service_tier": "serviceTier",
@@ -40,7 +40,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
40
40
  z.ZodTypeDef,
41
41
  unknown
42
42
  > = z.object({
43
- _id: z.string().default("reasoning_01m1nq4pk1kaabayp8270qmekq"),
43
+ _id: z.string().default("reasoning_01m1wjdnxt6cmpgxnfnvwyabjg"),
44
44
  metadata: z.record(z.any()).optional(),
45
45
  kind: z.literal("reasoning"),
46
46
  reasoning: z.string(),
@@ -3,11 +3,53 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
 
7
8
  export type RedactRequest = {
8
9
  text?: string | undefined;
9
10
  language?: string | undefined;
10
11
  threshold?: number | undefined;
12
+ /**
13
+ * Region codes selecting whole regions of coverage, e.g. "nl", "gb". Every
14
+ *
15
+ * @remarks
16
+ * entity type those regions cover is included, alongside the base catalog.
17
+ * ["all"] is exclusive. Leaving this and `entities` both empty also runs every
18
+ * region, so selecting nothing is the widest request rather than the narrowest.
19
+ * Empty alongside a non-empty `entities` stays strict. See the capabilities
20
+ * endpoint for the region list.
21
+ *
22
+ * Combines with `entities`: the detector unions the two selections, so a
23
+ * request carrying both covers the regions plus the named types. Note that
24
+ * `entities` only narrows coverage when it travels alone.
25
+ */
26
+ regions?: Array<string> | undefined;
27
+ /**
28
+ * The entity types to cover. A named type fires even when it belongs to a
29
+ *
30
+ * @remarks
31
+ * region, so a region's types can be selected individually without naming
32
+ * the region. Alone this is a strict allowlist; alongside `regions` it adds
33
+ * to the region coverage instead of narrowing it.
34
+ */
35
+ entities?: Array<string> | undefined;
36
+ /**
37
+ * Per-entity confidence cutoff overrides. An override REPLACES the global
38
+ *
39
+ * @remarks
40
+ * `threshold` for that type and may sit above or below it: the gateway
41
+ * lowers the first-pass floor it sends the detector to the smallest value
42
+ * in the map, and every selected type carries its own cutoff, so a
43
+ * sub-global override detects MORE of that type without widening the rest.
44
+ *
45
+ * This only tunes confidence; it never changes which types are covered.
46
+ * Coverage is decided by `entities` alone, so every key here must also
47
+ * appear in `entities` — a key that does not is rejected, as is any key at
48
+ * all when `entities` is empty.
49
+ *
50
+ * Declarative [0,1] bound mirrors existing constraint on `threshold`.
51
+ */
52
+ entityThresholds?: { [k: string]: number } | undefined;
11
53
  };
12
54
 
13
55
  /** @internal */
@@ -15,6 +57,9 @@ export type RedactRequest$Outbound = {
15
57
  text?: string | undefined;
16
58
  language?: string | undefined;
17
59
  threshold?: number | undefined;
60
+ regions?: Array<string> | undefined;
61
+ entities?: Array<string> | undefined;
62
+ entity_thresholds?: { [k: string]: number } | undefined;
18
63
  };
19
64
 
20
65
  /** @internal */
@@ -26,6 +71,13 @@ export const RedactRequest$outboundSchema: z.ZodType<
26
71
  text: z.string().optional(),
27
72
  language: z.string().optional(),
28
73
  threshold: z.number().optional(),
74
+ regions: z.array(z.string()).optional(),
75
+ entities: z.array(z.string()).optional(),
76
+ entityThresholds: z.record(z.number()).optional(),
77
+ }).transform((v) => {
78
+ return remap$(v, {
79
+ entityThresholds: "entity_thresholds",
80
+ });
29
81
  });
30
82
 
31
83
  export function redactRequestToJSON(redactRequest: RedactRequest): string {
@@ -4,50 +4,27 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
- import { ClosedEnum } from "../../types/enums.js";
8
7
  import { Result as SafeParseResult } from "../../types/fp.js";
9
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
9
 
11
- /**
12
- * Plugin discriminator. Must be `response_healing`.
13
- */
14
- export const ResponseHealingPluginId = {
15
- ResponseHealing: "response_healing",
16
- } as const;
17
- /**
18
- * Plugin discriminator. Must be `response_healing`.
19
- */
20
- export type ResponseHealingPluginId = ClosedEnum<
21
- typeof ResponseHealingPluginId
22
- >;
23
-
24
10
  export type ResponseHealingPlugin = {
25
11
  /**
26
12
  * Plugin discriminator. Must be `response_healing`.
27
13
  */
28
- id: ResponseHealingPluginId;
14
+ id: "response_healing";
29
15
  };
30
16
 
31
- /** @internal */
32
- export const ResponseHealingPluginId$inboundSchema: z.ZodNativeEnum<
33
- typeof ResponseHealingPluginId
34
- > = z.nativeEnum(ResponseHealingPluginId);
35
- /** @internal */
36
- export const ResponseHealingPluginId$outboundSchema: z.ZodNativeEnum<
37
- typeof ResponseHealingPluginId
38
- > = ResponseHealingPluginId$inboundSchema;
39
-
40
17
  /** @internal */
41
18
  export const ResponseHealingPlugin$inboundSchema: z.ZodType<
42
19
  ResponseHealingPlugin,
43
20
  z.ZodTypeDef,
44
21
  unknown
45
22
  > = z.object({
46
- id: ResponseHealingPluginId$inboundSchema,
23
+ id: z.literal("response_healing"),
47
24
  });
48
25
  /** @internal */
49
26
  export type ResponseHealingPlugin$Outbound = {
50
- id: string;
27
+ id: "response_healing";
51
28
  };
52
29
 
53
30
  /** @internal */
@@ -56,7 +33,7 @@ export const ResponseHealingPlugin$outboundSchema: z.ZodType<
56
33
  z.ZodTypeDef,
57
34
  ResponseHealingPlugin
58
35
  > = z.object({
59
- id: ResponseHealingPluginId$outboundSchema,
36
+ id: z.literal("response_healing"),
60
37
  });
61
38
 
62
39
  export function responseHealingPluginToJSON(
@@ -13,11 +13,30 @@ export type RoutingRulePlugin = {
13
13
  * Plugin discriminator.
14
14
  */
15
15
  id?: string | undefined;
16
+ /**
17
+ * Languages, regions and entity types are checked against the live
18
+ *
19
+ * @remarks
20
+ * pii-detection capabilities catalog when the rule is saved, not pinned
21
+ * here, so a language or region the detector gains becomes writable without
22
+ * a proto change.
23
+ */
16
24
  language?: string | undefined;
25
+ /**
26
+ * Entity types to redact. Mutually exclusive with regions.
27
+ */
17
28
  entities?: Array<string> | undefined;
18
29
  onFailure?: string | undefined;
19
30
  threshold?: number | undefined;
20
31
  mask?: Array<string> | undefined;
32
+ /**
33
+ * Regions of coverage by ISO 3166-1 alpha-2 code, or ["all"]. Mutually exclusive with entities.
34
+ */
35
+ regions?: Array<string> | undefined;
36
+ /**
37
+ * Per-entity-type confidence cutoff. Every key must also appear in entities.
38
+ */
39
+ entityThresholds?: { [k: string]: number } | undefined;
21
40
  };
22
41
 
23
42
  /** @internal */
@@ -32,9 +51,12 @@ export const RoutingRulePlugin$inboundSchema: z.ZodType<
32
51
  on_failure: z.string().optional(),
33
52
  threshold: z.number().optional(),
34
53
  mask: z.array(z.string()).optional(),
54
+ regions: z.array(z.string()).optional(),
55
+ entity_thresholds: z.record(z.number()).optional(),
35
56
  }).transform((v) => {
36
57
  return remap$(v, {
37
58
  "on_failure": "onFailure",
59
+ "entity_thresholds": "entityThresholds",
38
60
  });
39
61
  });
40
62
  /** @internal */
@@ -45,6 +67,8 @@ export type RoutingRulePlugin$Outbound = {
45
67
  on_failure?: string | undefined;
46
68
  threshold?: number | undefined;
47
69
  mask?: Array<string> | undefined;
70
+ regions?: Array<string> | undefined;
71
+ entity_thresholds?: { [k: string]: number } | undefined;
48
72
  };
49
73
 
50
74
  /** @internal */
@@ -59,9 +83,12 @@ export const RoutingRulePlugin$outboundSchema: z.ZodType<
59
83
  onFailure: z.string().optional(),
60
84
  threshold: z.number().optional(),
61
85
  mask: z.array(z.string()).optional(),
86
+ regions: z.array(z.string()).optional(),
87
+ entityThresholds: z.record(z.number()).optional(),
62
88
  }).transform((v) => {
63
89
  return remap$(v, {
64
90
  onFailure: "on_failure",
91
+ entityThresholds: "entity_thresholds",
65
92
  });
66
93
  });
67
94
 
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import { HubSearchHit, HubSearchHit$inboundSchema } from "./hubsearchhit.js";
10
+
11
+ export type SearchHubItemsResponse = {
12
+ hits: Array<HubSearchHit>;
13
+ };
14
+
15
+ /** @internal */
16
+ export const SearchHubItemsResponse$inboundSchema: z.ZodType<
17
+ SearchHubItemsResponse,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ hits: z.array(HubSearchHit$inboundSchema),
22
+ });
23
+
24
+ export function searchHubItemsResponseFromJSON(
25
+ jsonString: string,
26
+ ): SafeParseResult<SearchHubItemsResponse, SDKValidationError> {
27
+ return safeParse(
28
+ jsonString,
29
+ (x) => SearchHubItemsResponse$inboundSchema.parse(JSON.parse(x)),
30
+ `Failed to parse 'SearchHubItemsResponse' from JSON`,
31
+ );
32
+ }
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const SessionInterval = {
9
+ SessionIntervalUnspecified: "SESSION_INTERVAL_UNSPECIFIED",
10
+ SessionIntervalAllTime: "SESSION_INTERVAL_ALL_TIME",
11
+ SessionIntervalLast30Minutes: "SESSION_INTERVAL_LAST_30_MINUTES",
12
+ SessionIntervalLast1Hour: "SESSION_INTERVAL_LAST_1_HOUR",
13
+ SessionIntervalLast6Hours: "SESSION_INTERVAL_LAST_6_HOURS",
14
+ SessionIntervalLast24Hours: "SESSION_INTERVAL_LAST_24_HOURS",
15
+ SessionIntervalLast3Days: "SESSION_INTERVAL_LAST_3_DAYS",
16
+ SessionIntervalLast7Days: "SESSION_INTERVAL_LAST_7_DAYS",
17
+ SessionIntervalLast14Days: "SESSION_INTERVAL_LAST_14_DAYS",
18
+ SessionIntervalLast1Month: "SESSION_INTERVAL_LAST_1_MONTH",
19
+ SessionIntervalLast3Months: "SESSION_INTERVAL_LAST_3_MONTHS",
20
+ } as const;
21
+ export type SessionInterval = ClosedEnum<typeof SessionInterval>;
22
+
23
+ /** @internal */
24
+ export const SessionInterval$outboundSchema: z.ZodNativeEnum<
25
+ typeof SessionInterval
26
+ > = z.nativeEnum(SessionInterval);
@@ -43,7 +43,7 @@ export type TextContentPartSchemaType = ClosedEnum<
43
43
  *
44
44
  * Defaults to `5m`. Only supported by `Anthropic` Claude models.
45
45
  */
46
- export const Ttl = {
46
+ export const TextContentPartSchemaTtl = {
47
47
  Fivem: "5m",
48
48
  Oneh: "1h",
49
49
  } as const;
@@ -57,7 +57,9 @@ export const Ttl = {
57
57
  *
58
58
  * Defaults to `5m`. Only supported by `Anthropic` Claude models.
59
59
  */
60
- export type Ttl = ClosedEnum<typeof Ttl>;
60
+ export type TextContentPartSchemaTtl = ClosedEnum<
61
+ typeof TextContentPartSchemaTtl
62
+ >;
61
63
 
62
64
  export type CacheControl = {
63
65
  /**
@@ -74,7 +76,7 @@ export type CacheControl = {
74
76
  *
75
77
  * Defaults to `5m`. Only supported by `Anthropic` Claude models.
76
78
  */
77
- ttl?: Ttl | undefined;
79
+ ttl?: TextContentPartSchemaTtl | undefined;
78
80
  };
79
81
 
80
82
  /**
@@ -110,10 +112,13 @@ export const TextContentPartSchemaType$outboundSchema: z.ZodNativeEnum<
110
112
  > = TextContentPartSchemaType$inboundSchema;
111
113
 
112
114
  /** @internal */
113
- export const Ttl$inboundSchema: z.ZodNativeEnum<typeof Ttl> = z.nativeEnum(Ttl);
115
+ export const TextContentPartSchemaTtl$inboundSchema: z.ZodNativeEnum<
116
+ typeof TextContentPartSchemaTtl
117
+ > = z.nativeEnum(TextContentPartSchemaTtl);
114
118
  /** @internal */
115
- export const Ttl$outboundSchema: z.ZodNativeEnum<typeof Ttl> =
116
- Ttl$inboundSchema;
119
+ export const TextContentPartSchemaTtl$outboundSchema: z.ZodNativeEnum<
120
+ typeof TextContentPartSchemaTtl
121
+ > = TextContentPartSchemaTtl$inboundSchema;
117
122
 
118
123
  /** @internal */
119
124
  export const CacheControl$inboundSchema: z.ZodType<
@@ -122,7 +127,7 @@ export const CacheControl$inboundSchema: z.ZodType<
122
127
  unknown
123
128
  > = z.object({
124
129
  type: TextContentPartSchemaType$inboundSchema,
125
- ttl: Ttl$inboundSchema.default("5m"),
130
+ ttl: TextContentPartSchemaTtl$inboundSchema.default("5m"),
126
131
  });
127
132
  /** @internal */
128
133
  export type CacheControl$Outbound = {
@@ -137,7 +142,7 @@ export const CacheControl$outboundSchema: z.ZodType<
137
142
  CacheControl
138
143
  > = z.object({
139
144
  type: TextContentPartSchemaType$outboundSchema,
140
- ttl: Ttl$outboundSchema.default("5m"),
145
+ ttl: TextContentPartSchemaTtl$outboundSchema.default("5m"),
141
146
  });
142
147
 
143
148
  export function cacheControlToJSON(cacheControl: CacheControl): string {
@@ -0,0 +1,101 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import { ThreadBilling, ThreadBilling$inboundSchema } from "./threadbilling.js";
11
+ import { ThreadKind, ThreadKind$inboundSchema } from "./threadkind.js";
12
+ import { ThreadUsage, ThreadUsage$inboundSchema } from "./threadusage.js";
13
+
14
+ export type Thread = {
15
+ /**
16
+ * Internal thread record ID.
17
+ */
18
+ id: string;
19
+ /**
20
+ * Client-provided thread identifier used to group related traces.
21
+ */
22
+ externalId: string;
23
+ /**
24
+ * Total thread duration in milliseconds.
25
+ */
26
+ duration: number;
27
+ /**
28
+ * Contact IDs associated with the thread.
29
+ */
30
+ contactIds: Array<string>;
31
+ billing: ThreadBilling;
32
+ usage: ThreadUsage;
33
+ /**
34
+ * Number of traces associated with the thread.
35
+ */
36
+ tracesCount: number;
37
+ /**
38
+ * Tags used to categorize the thread.
39
+ */
40
+ tags: Array<string>;
41
+ projectId?: string | undefined;
42
+ startedAt?: Date | undefined;
43
+ updatedAt?: Date | undefined;
44
+ /**
45
+ * Display title. Does not replace external_id and is not used to group traces.
46
+ */
47
+ title?: string | undefined;
48
+ /**
49
+ * Originating coding assistant or client, such as claude-code, cursor, or codex.
50
+ */
51
+ client?: string | undefined;
52
+ /**
53
+ * Canonical git repository for a coding-agent thread, such as github.com/org/repo.
54
+ */
55
+ repo?: string | undefined;
56
+ kind?: ThreadKind | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const Thread$inboundSchema: z.ZodType<Thread, z.ZodTypeDef, unknown> = z
61
+ .object({
62
+ _id: z.string(),
63
+ external_id: z.string(),
64
+ duration: z.number(),
65
+ contact_ids: z.array(z.string()),
66
+ billing: ThreadBilling$inboundSchema,
67
+ usage: ThreadUsage$inboundSchema,
68
+ traces_count: z.number().int(),
69
+ tags: z.array(z.string()),
70
+ project_id: z.string().optional(),
71
+ started_at: z.string().datetime({ offset: true }).transform(v =>
72
+ new Date(v)
73
+ ).optional(),
74
+ updated_at: z.string().datetime({ offset: true }).transform(v =>
75
+ new Date(v)
76
+ ).optional(),
77
+ title: z.string().optional(),
78
+ client: z.string().optional(),
79
+ repo: z.string().optional(),
80
+ kind: ThreadKind$inboundSchema.optional(),
81
+ }).transform((v) => {
82
+ return remap$(v, {
83
+ "_id": "id",
84
+ "external_id": "externalId",
85
+ "contact_ids": "contactIds",
86
+ "traces_count": "tracesCount",
87
+ "project_id": "projectId",
88
+ "started_at": "startedAt",
89
+ "updated_at": "updatedAt",
90
+ });
91
+ });
92
+
93
+ export function threadFromJSON(
94
+ jsonString: string,
95
+ ): SafeParseResult<Thread, SDKValidationError> {
96
+ return safeParse(
97
+ jsonString,
98
+ (x) => Thread$inboundSchema.parse(JSON.parse(x)),
99
+ `Failed to parse 'Thread' from JSON`,
100
+ );
101
+ }
@@ -0,0 +1,68 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type ThreadBilling = {
12
+ inputCost: number;
13
+ outputCost: number;
14
+ totalCost: number;
15
+ };
16
+
17
+ /** @internal */
18
+ export const ThreadBilling$inboundSchema: z.ZodType<
19
+ ThreadBilling,
20
+ z.ZodTypeDef,
21
+ unknown
22
+ > = z.object({
23
+ input_cost: z.number(),
24
+ output_cost: z.number(),
25
+ total_cost: z.number(),
26
+ }).transform((v) => {
27
+ return remap$(v, {
28
+ "input_cost": "inputCost",
29
+ "output_cost": "outputCost",
30
+ "total_cost": "totalCost",
31
+ });
32
+ });
33
+ /** @internal */
34
+ export type ThreadBilling$Outbound = {
35
+ input_cost: number;
36
+ output_cost: number;
37
+ total_cost: number;
38
+ };
39
+
40
+ /** @internal */
41
+ export const ThreadBilling$outboundSchema: z.ZodType<
42
+ ThreadBilling$Outbound,
43
+ z.ZodTypeDef,
44
+ ThreadBilling
45
+ > = z.object({
46
+ inputCost: z.number(),
47
+ outputCost: z.number(),
48
+ totalCost: z.number(),
49
+ }).transform((v) => {
50
+ return remap$(v, {
51
+ inputCost: "input_cost",
52
+ outputCost: "output_cost",
53
+ totalCost: "total_cost",
54
+ });
55
+ });
56
+
57
+ export function threadBillingToJSON(threadBilling: ThreadBilling): string {
58
+ return JSON.stringify(ThreadBilling$outboundSchema.parse(threadBilling));
59
+ }
60
+ export function threadBillingFromJSON(
61
+ jsonString: string,
62
+ ): SafeParseResult<ThreadBilling, SDKValidationError> {
63
+ return safeParse(
64
+ jsonString,
65
+ (x) => ThreadBilling$inboundSchema.parse(JSON.parse(x)),
66
+ `Failed to parse 'ThreadBilling' from JSON`,
67
+ );
68
+ }