openai 7.19.0 → 7.20.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 (565) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/package.json +1 -1
  3. package/resources/admin/organization/admin-api-keys.d.mts +8 -1
  4. package/resources/admin/organization/admin-api-keys.d.mts.map +1 -1
  5. package/resources/admin/organization/admin-api-keys.d.ts +8 -1
  6. package/resources/admin/organization/admin-api-keys.d.ts.map +1 -1
  7. package/resources/admin/organization/admin-api-keys.js +58 -11
  8. package/resources/admin/organization/admin-api-keys.js.map +1 -1
  9. package/resources/admin/organization/admin-api-keys.mjs +58 -11
  10. package/resources/admin/organization/admin-api-keys.mjs.map +1 -1
  11. package/resources/admin/organization/audit-logs.d.mts +56 -3
  12. package/resources/admin/organization/audit-logs.d.mts.map +1 -1
  13. package/resources/admin/organization/audit-logs.d.ts +56 -3
  14. package/resources/admin/organization/audit-logs.d.ts.map +1 -1
  15. package/resources/admin/organization/audit-logs.js +69 -11
  16. package/resources/admin/organization/audit-logs.js.map +1 -1
  17. package/resources/admin/organization/audit-logs.mjs +69 -11
  18. package/resources/admin/organization/audit-logs.mjs.map +1 -1
  19. package/resources/admin/organization/certificates.d.mts +16 -2
  20. package/resources/admin/organization/certificates.d.mts.map +1 -1
  21. package/resources/admin/organization/certificates.d.ts +16 -2
  22. package/resources/admin/organization/certificates.d.ts.map +1 -1
  23. package/resources/admin/organization/certificates.js +64 -24
  24. package/resources/admin/organization/certificates.js.map +1 -1
  25. package/resources/admin/organization/certificates.mjs +64 -24
  26. package/resources/admin/organization/certificates.mjs.map +1 -1
  27. package/resources/admin/organization/external-storage.d.mts +141 -0
  28. package/resources/admin/organization/external-storage.d.mts.map +1 -0
  29. package/resources/admin/organization/external-storage.d.ts +141 -0
  30. package/resources/admin/organization/external-storage.d.ts.map +1 -0
  31. package/resources/admin/organization/external-storage.js +146 -0
  32. package/resources/admin/organization/external-storage.js.map +1 -0
  33. package/resources/admin/organization/external-storage.mjs +142 -0
  34. package/resources/admin/organization/external-storage.mjs.map +1 -0
  35. package/resources/admin/organization/groups/groups.d.mts +8 -1
  36. package/resources/admin/organization/groups/groups.d.mts.map +1 -1
  37. package/resources/admin/organization/groups/groups.d.ts +8 -1
  38. package/resources/admin/organization/groups/groups.d.ts.map +1 -1
  39. package/resources/admin/organization/groups/groups.js +58 -11
  40. package/resources/admin/organization/groups/groups.js.map +1 -1
  41. package/resources/admin/organization/groups/groups.mjs +58 -11
  42. package/resources/admin/organization/groups/groups.mjs.map +1 -1
  43. package/resources/admin/organization/groups/roles.d.mts +8 -1
  44. package/resources/admin/organization/groups/roles.d.mts.map +1 -1
  45. package/resources/admin/organization/groups/roles.d.ts +8 -1
  46. package/resources/admin/organization/groups/roles.d.ts.map +1 -1
  47. package/resources/admin/organization/groups/roles.js +58 -13
  48. package/resources/admin/organization/groups/roles.js.map +1 -1
  49. package/resources/admin/organization/groups/roles.mjs +58 -13
  50. package/resources/admin/organization/groups/roles.mjs.map +1 -1
  51. package/resources/admin/organization/groups/users.d.mts +8 -1
  52. package/resources/admin/organization/groups/users.d.mts.map +1 -1
  53. package/resources/admin/organization/groups/users.d.ts +8 -1
  54. package/resources/admin/organization/groups/users.d.ts.map +1 -1
  55. package/resources/admin/organization/groups/users.js +58 -13
  56. package/resources/admin/organization/groups/users.js.map +1 -1
  57. package/resources/admin/organization/groups/users.mjs +58 -13
  58. package/resources/admin/organization/groups/users.mjs.map +1 -1
  59. package/resources/admin/organization/index.d.mts +1 -0
  60. package/resources/admin/organization/index.d.mts.map +1 -1
  61. package/resources/admin/organization/index.d.ts +1 -0
  62. package/resources/admin/organization/index.d.ts.map +1 -1
  63. package/resources/admin/organization/index.js +3 -1
  64. package/resources/admin/organization/index.js.map +1 -1
  65. package/resources/admin/organization/index.mjs +1 -0
  66. package/resources/admin/organization/index.mjs.map +1 -1
  67. package/resources/admin/organization/invites.d.mts +8 -1
  68. package/resources/admin/organization/invites.d.mts.map +1 -1
  69. package/resources/admin/organization/invites.d.ts +8 -1
  70. package/resources/admin/organization/invites.d.ts.map +1 -1
  71. package/resources/admin/organization/invites.js +58 -11
  72. package/resources/admin/organization/invites.js.map +1 -1
  73. package/resources/admin/organization/invites.mjs +58 -11
  74. package/resources/admin/organization/invites.mjs.map +1 -1
  75. package/resources/admin/organization/organization.d.mts +4 -0
  76. package/resources/admin/organization/organization.d.mts.map +1 -1
  77. package/resources/admin/organization/organization.d.ts +4 -0
  78. package/resources/admin/organization/organization.d.ts.map +1 -1
  79. package/resources/admin/organization/organization.js +4 -0
  80. package/resources/admin/organization/organization.js.map +1 -1
  81. package/resources/admin/organization/organization.mjs +4 -0
  82. package/resources/admin/organization/organization.mjs.map +1 -1
  83. package/resources/admin/organization/projects/api-keys.d.mts +8 -1
  84. package/resources/admin/organization/projects/api-keys.d.mts.map +1 -1
  85. package/resources/admin/organization/projects/api-keys.d.ts +8 -1
  86. package/resources/admin/organization/projects/api-keys.d.ts.map +1 -1
  87. package/resources/admin/organization/projects/api-keys.js +58 -13
  88. package/resources/admin/organization/projects/api-keys.js.map +1 -1
  89. package/resources/admin/organization/projects/api-keys.mjs +58 -13
  90. package/resources/admin/organization/projects/api-keys.mjs.map +1 -1
  91. package/resources/admin/organization/projects/certificates.d.mts +8 -1
  92. package/resources/admin/organization/projects/certificates.d.mts.map +1 -1
  93. package/resources/admin/organization/projects/certificates.d.ts +8 -1
  94. package/resources/admin/organization/projects/certificates.d.ts.map +1 -1
  95. package/resources/admin/organization/projects/certificates.js +58 -13
  96. package/resources/admin/organization/projects/certificates.js.map +1 -1
  97. package/resources/admin/organization/projects/certificates.mjs +58 -13
  98. package/resources/admin/organization/projects/certificates.mjs.map +1 -1
  99. package/resources/admin/organization/projects/groups/groups.d.mts +8 -1
  100. package/resources/admin/organization/projects/groups/groups.d.mts.map +1 -1
  101. package/resources/admin/organization/projects/groups/groups.d.ts +8 -1
  102. package/resources/admin/organization/projects/groups/groups.d.ts.map +1 -1
  103. package/resources/admin/organization/projects/groups/groups.js +58 -13
  104. package/resources/admin/organization/projects/groups/groups.js.map +1 -1
  105. package/resources/admin/organization/projects/groups/groups.mjs +58 -13
  106. package/resources/admin/organization/projects/groups/groups.mjs.map +1 -1
  107. package/resources/admin/organization/projects/projects.d.mts +8 -1
  108. package/resources/admin/organization/projects/projects.d.mts.map +1 -1
  109. package/resources/admin/organization/projects/projects.d.ts +8 -1
  110. package/resources/admin/organization/projects/projects.d.ts.map +1 -1
  111. package/resources/admin/organization/projects/projects.js +58 -11
  112. package/resources/admin/organization/projects/projects.js.map +1 -1
  113. package/resources/admin/organization/projects/projects.mjs +58 -11
  114. package/resources/admin/organization/projects/projects.mjs.map +1 -1
  115. package/resources/admin/organization/projects/rate-limits.d.mts +8 -1
  116. package/resources/admin/organization/projects/rate-limits.d.mts.map +1 -1
  117. package/resources/admin/organization/projects/rate-limits.d.ts +8 -1
  118. package/resources/admin/organization/projects/rate-limits.d.ts.map +1 -1
  119. package/resources/admin/organization/projects/rate-limits.js +58 -13
  120. package/resources/admin/organization/projects/rate-limits.js.map +1 -1
  121. package/resources/admin/organization/projects/rate-limits.mjs +58 -13
  122. package/resources/admin/organization/projects/rate-limits.mjs.map +1 -1
  123. package/resources/admin/organization/projects/roles.d.mts +8 -1
  124. package/resources/admin/organization/projects/roles.d.mts.map +1 -1
  125. package/resources/admin/organization/projects/roles.d.ts +8 -1
  126. package/resources/admin/organization/projects/roles.d.ts.map +1 -1
  127. package/resources/admin/organization/projects/roles.js +58 -13
  128. package/resources/admin/organization/projects/roles.js.map +1 -1
  129. package/resources/admin/organization/projects/roles.mjs +58 -13
  130. package/resources/admin/organization/projects/roles.mjs.map +1 -1
  131. package/resources/admin/organization/projects/service-accounts/service-accounts.d.mts +8 -1
  132. package/resources/admin/organization/projects/service-accounts/service-accounts.d.mts.map +1 -1
  133. package/resources/admin/organization/projects/service-accounts/service-accounts.d.ts +8 -1
  134. package/resources/admin/organization/projects/service-accounts/service-accounts.d.ts.map +1 -1
  135. package/resources/admin/organization/projects/service-accounts/service-accounts.js +58 -13
  136. package/resources/admin/organization/projects/service-accounts/service-accounts.js.map +1 -1
  137. package/resources/admin/organization/projects/service-accounts/service-accounts.mjs +58 -13
  138. package/resources/admin/organization/projects/service-accounts/service-accounts.mjs.map +1 -1
  139. package/resources/admin/organization/projects/spend-alerts.d.mts +8 -1
  140. package/resources/admin/organization/projects/spend-alerts.d.mts.map +1 -1
  141. package/resources/admin/organization/projects/spend-alerts.d.ts +8 -1
  142. package/resources/admin/organization/projects/spend-alerts.d.ts.map +1 -1
  143. package/resources/admin/organization/projects/spend-alerts.js +58 -13
  144. package/resources/admin/organization/projects/spend-alerts.js.map +1 -1
  145. package/resources/admin/organization/projects/spend-alerts.mjs +58 -13
  146. package/resources/admin/organization/projects/spend-alerts.mjs.map +1 -1
  147. package/resources/admin/organization/projects/users/users.d.mts +8 -1
  148. package/resources/admin/organization/projects/users/users.d.mts.map +1 -1
  149. package/resources/admin/organization/projects/users/users.d.ts +8 -1
  150. package/resources/admin/organization/projects/users/users.d.ts.map +1 -1
  151. package/resources/admin/organization/projects/users/users.js +58 -13
  152. package/resources/admin/organization/projects/users/users.js.map +1 -1
  153. package/resources/admin/organization/projects/users/users.mjs +58 -13
  154. package/resources/admin/organization/projects/users/users.mjs.map +1 -1
  155. package/resources/admin/organization/roles.d.mts +8 -1
  156. package/resources/admin/organization/roles.d.mts.map +1 -1
  157. package/resources/admin/organization/roles.d.ts +8 -1
  158. package/resources/admin/organization/roles.d.ts.map +1 -1
  159. package/resources/admin/organization/roles.js +58 -11
  160. package/resources/admin/organization/roles.js.map +1 -1
  161. package/resources/admin/organization/roles.mjs +58 -11
  162. package/resources/admin/organization/roles.mjs.map +1 -1
  163. package/resources/admin/organization/spend-alerts.d.mts +8 -1
  164. package/resources/admin/organization/spend-alerts.d.mts.map +1 -1
  165. package/resources/admin/organization/spend-alerts.d.ts +8 -1
  166. package/resources/admin/organization/spend-alerts.d.ts.map +1 -1
  167. package/resources/admin/organization/spend-alerts.js +58 -11
  168. package/resources/admin/organization/spend-alerts.js.map +1 -1
  169. package/resources/admin/organization/spend-alerts.mjs +58 -11
  170. package/resources/admin/organization/spend-alerts.mjs.map +1 -1
  171. package/resources/admin/organization/users/roles.d.mts +8 -1
  172. package/resources/admin/organization/users/roles.d.mts.map +1 -1
  173. package/resources/admin/organization/users/roles.d.ts +8 -1
  174. package/resources/admin/organization/users/roles.d.ts.map +1 -1
  175. package/resources/admin/organization/users/roles.js +58 -13
  176. package/resources/admin/organization/users/roles.js.map +1 -1
  177. package/resources/admin/organization/users/roles.mjs +58 -13
  178. package/resources/admin/organization/users/roles.mjs.map +1 -1
  179. package/resources/admin/organization/users/users.d.mts +8 -1
  180. package/resources/admin/organization/users/users.d.mts.map +1 -1
  181. package/resources/admin/organization/users/users.d.ts +8 -1
  182. package/resources/admin/organization/users/users.d.ts.map +1 -1
  183. package/resources/admin/organization/users/users.js +58 -11
  184. package/resources/admin/organization/users/users.js.map +1 -1
  185. package/resources/admin/organization/users/users.mjs +58 -11
  186. package/resources/admin/organization/users/users.mjs.map +1 -1
  187. package/resources/batches.d.mts +8 -1
  188. package/resources/batches.d.mts.map +1 -1
  189. package/resources/batches.d.ts +8 -1
  190. package/resources/batches.d.ts.map +1 -1
  191. package/resources/batches.js +58 -3
  192. package/resources/batches.js.map +1 -1
  193. package/resources/batches.mjs +58 -3
  194. package/resources/batches.mjs.map +1 -1
  195. package/resources/beta/agents/agents.d.mts +61 -43
  196. package/resources/beta/agents/agents.d.mts.map +1 -1
  197. package/resources/beta/agents/agents.d.ts +61 -43
  198. package/resources/beta/agents/agents.d.ts.map +1 -1
  199. package/resources/beta/agents/agents.js +58 -12
  200. package/resources/beta/agents/agents.js.map +1 -1
  201. package/resources/beta/agents/agents.mjs +58 -12
  202. package/resources/beta/agents/agents.mjs.map +1 -1
  203. package/resources/beta/agents/environments/templates.d.mts +22 -9
  204. package/resources/beta/agents/environments/templates.d.mts.map +1 -1
  205. package/resources/beta/agents/environments/templates.d.ts +22 -9
  206. package/resources/beta/agents/environments/templates.d.ts.map +1 -1
  207. package/resources/beta/agents/environments/templates.js +58 -12
  208. package/resources/beta/agents/environments/templates.js.map +1 -1
  209. package/resources/beta/agents/environments/templates.mjs +58 -12
  210. package/resources/beta/agents/environments/templates.mjs.map +1 -1
  211. package/resources/beta/agents/sessions/artifacts.d.mts +8 -1
  212. package/resources/beta/agents/sessions/artifacts.d.mts.map +1 -1
  213. package/resources/beta/agents/sessions/artifacts.d.ts +8 -1
  214. package/resources/beta/agents/sessions/artifacts.d.ts.map +1 -1
  215. package/resources/beta/agents/sessions/artifacts.js +58 -14
  216. package/resources/beta/agents/sessions/artifacts.js.map +1 -1
  217. package/resources/beta/agents/sessions/artifacts.mjs +58 -14
  218. package/resources/beta/agents/sessions/artifacts.mjs.map +1 -1
  219. package/resources/beta/agents/sessions/items.d.mts +8 -1
  220. package/resources/beta/agents/sessions/items.d.mts.map +1 -1
  221. package/resources/beta/agents/sessions/items.d.ts +8 -1
  222. package/resources/beta/agents/sessions/items.d.ts.map +1 -1
  223. package/resources/beta/agents/sessions/items.js +58 -15
  224. package/resources/beta/agents/sessions/items.js.map +1 -1
  225. package/resources/beta/agents/sessions/items.mjs +58 -15
  226. package/resources/beta/agents/sessions/items.mjs.map +1 -1
  227. package/resources/beta/agents/sessions/sessions.d.mts +17 -6
  228. package/resources/beta/agents/sessions/sessions.d.mts.map +1 -1
  229. package/resources/beta/agents/sessions/sessions.d.ts +17 -6
  230. package/resources/beta/agents/sessions/sessions.d.ts.map +1 -1
  231. package/resources/beta/agents/sessions/sessions.js +58 -13
  232. package/resources/beta/agents/sessions/sessions.js.map +1 -1
  233. package/resources/beta/agents/sessions/sessions.mjs +58 -13
  234. package/resources/beta/agents/sessions/sessions.mjs.map +1 -1
  235. package/resources/beta/agents/sessions/subagents/subagents.d.mts +8 -1
  236. package/resources/beta/agents/sessions/subagents/subagents.d.mts.map +1 -1
  237. package/resources/beta/agents/sessions/subagents/subagents.d.ts +8 -1
  238. package/resources/beta/agents/sessions/subagents/subagents.d.ts.map +1 -1
  239. package/resources/beta/agents/sessions/subagents/subagents.js +58 -14
  240. package/resources/beta/agents/sessions/subagents/subagents.js.map +1 -1
  241. package/resources/beta/agents/sessions/subagents/subagents.mjs +58 -14
  242. package/resources/beta/agents/sessions/subagents/subagents.mjs.map +1 -1
  243. package/resources/beta/agents/sessions/turns.d.mts +11 -3
  244. package/resources/beta/agents/sessions/turns.d.mts.map +1 -1
  245. package/resources/beta/agents/sessions/turns.d.ts +11 -3
  246. package/resources/beta/agents/sessions/turns.d.ts.map +1 -1
  247. package/resources/beta/agents/sessions/turns.js +58 -15
  248. package/resources/beta/agents/sessions/turns.js.map +1 -1
  249. package/resources/beta/agents/sessions/turns.mjs +58 -15
  250. package/resources/beta/agents/sessions/turns.mjs.map +1 -1
  251. package/resources/beta/agents/vaults/credentials.d.mts +163 -23
  252. package/resources/beta/agents/vaults/credentials.d.mts.map +1 -1
  253. package/resources/beta/agents/vaults/credentials.d.ts +163 -23
  254. package/resources/beta/agents/vaults/credentials.d.ts.map +1 -1
  255. package/resources/beta/agents/vaults/credentials.js +58 -15
  256. package/resources/beta/agents/vaults/credentials.js.map +1 -1
  257. package/resources/beta/agents/vaults/credentials.mjs +58 -15
  258. package/resources/beta/agents/vaults/credentials.mjs.map +1 -1
  259. package/resources/beta/agents/vaults/index.d.mts +1 -1
  260. package/resources/beta/agents/vaults/index.d.mts.map +1 -1
  261. package/resources/beta/agents/vaults/index.d.ts +1 -1
  262. package/resources/beta/agents/vaults/index.d.ts.map +1 -1
  263. package/resources/beta/agents/vaults/index.js.map +1 -1
  264. package/resources/beta/agents/vaults/index.mjs.map +1 -1
  265. package/resources/beta/agents/vaults/vaults.d.mts +11 -5
  266. package/resources/beta/agents/vaults/vaults.d.mts.map +1 -1
  267. package/resources/beta/agents/vaults/vaults.d.ts +11 -5
  268. package/resources/beta/agents/vaults/vaults.d.ts.map +1 -1
  269. package/resources/beta/agents/vaults/vaults.js +58 -12
  270. package/resources/beta/agents/vaults/vaults.js.map +1 -1
  271. package/resources/beta/agents/vaults/vaults.mjs +58 -12
  272. package/resources/beta/agents/vaults/vaults.mjs.map +1 -1
  273. package/resources/beta/assistants.d.mts +8 -1
  274. package/resources/beta/assistants.d.mts.map +1 -1
  275. package/resources/beta/assistants.d.ts +8 -1
  276. package/resources/beta/assistants.d.ts.map +1 -1
  277. package/resources/beta/assistants.js +58 -5
  278. package/resources/beta/assistants.js.map +1 -1
  279. package/resources/beta/assistants.mjs +58 -5
  280. package/resources/beta/assistants.mjs.map +1 -1
  281. package/resources/beta/chatkit/threads.d.mts +16 -2
  282. package/resources/beta/chatkit/threads.d.mts.map +1 -1
  283. package/resources/beta/chatkit/threads.d.ts +16 -2
  284. package/resources/beta/chatkit/threads.d.ts.map +1 -1
  285. package/resources/beta/chatkit/threads.js +64 -24
  286. package/resources/beta/chatkit/threads.js.map +1 -1
  287. package/resources/beta/chatkit/threads.mjs +64 -24
  288. package/resources/beta/chatkit/threads.mjs.map +1 -1
  289. package/resources/beta/responses/responses.d.mts +4 -5
  290. package/resources/beta/responses/responses.d.mts.map +1 -1
  291. package/resources/beta/responses/responses.d.ts +4 -5
  292. package/resources/beta/responses/responses.d.ts.map +1 -1
  293. package/resources/beta/responses/responses.js.map +1 -1
  294. package/resources/beta/responses/responses.mjs.map +1 -1
  295. package/resources/beta/threads/messages.d.mts +8 -1
  296. package/resources/beta/threads/messages.d.mts.map +1 -1
  297. package/resources/beta/threads/messages.d.ts +8 -1
  298. package/resources/beta/threads/messages.d.ts.map +1 -1
  299. package/resources/beta/threads/messages.js +58 -5
  300. package/resources/beta/threads/messages.js.map +1 -1
  301. package/resources/beta/threads/messages.mjs +58 -5
  302. package/resources/beta/threads/messages.mjs.map +1 -1
  303. package/resources/beta/threads/runs/runs.d.mts +8 -1
  304. package/resources/beta/threads/runs/runs.d.mts.map +1 -1
  305. package/resources/beta/threads/runs/runs.d.ts +8 -1
  306. package/resources/beta/threads/runs/runs.d.ts.map +1 -1
  307. package/resources/beta/threads/runs/runs.js +58 -5
  308. package/resources/beta/threads/runs/runs.js.map +1 -1
  309. package/resources/beta/threads/runs/runs.mjs +58 -5
  310. package/resources/beta/threads/runs/runs.mjs.map +1 -1
  311. package/resources/chat/completions/completions.d.mts +13 -3
  312. package/resources/chat/completions/completions.d.mts.map +1 -1
  313. package/resources/chat/completions/completions.d.ts +13 -3
  314. package/resources/chat/completions/completions.d.ts.map +1 -1
  315. package/resources/chat/completions/completions.js +58 -12
  316. package/resources/chat/completions/completions.js.map +1 -1
  317. package/resources/chat/completions/completions.mjs +58 -12
  318. package/resources/chat/completions/completions.mjs.map +1 -1
  319. package/resources/chat/completions/messages.d.mts +8 -1
  320. package/resources/chat/completions/messages.d.mts.map +1 -1
  321. package/resources/chat/completions/messages.d.ts +8 -1
  322. package/resources/chat/completions/messages.d.ts.map +1 -1
  323. package/resources/chat/completions/messages.js +58 -14
  324. package/resources/chat/completions/messages.js.map +1 -1
  325. package/resources/chat/completions/messages.mjs +58 -14
  326. package/resources/chat/completions/messages.mjs.map +1 -1
  327. package/resources/containers/containers.d.mts +8 -1
  328. package/resources/containers/containers.d.mts.map +1 -1
  329. package/resources/containers/containers.d.ts +8 -1
  330. package/resources/containers/containers.d.ts.map +1 -1
  331. package/resources/containers/containers.js +58 -3
  332. package/resources/containers/containers.js.map +1 -1
  333. package/resources/containers/containers.mjs +58 -3
  334. package/resources/containers/containers.mjs.map +1 -1
  335. package/resources/containers/files/files.d.mts +8 -1
  336. package/resources/containers/files/files.d.mts.map +1 -1
  337. package/resources/containers/files/files.d.ts +8 -1
  338. package/resources/containers/files/files.d.ts.map +1 -1
  339. package/resources/containers/files/files.js +58 -3
  340. package/resources/containers/files/files.js.map +1 -1
  341. package/resources/containers/files/files.mjs +58 -3
  342. package/resources/containers/files/files.mjs.map +1 -1
  343. package/resources/conversations/conversations.d.mts +3 -4
  344. package/resources/conversations/conversations.d.mts.map +1 -1
  345. package/resources/conversations/conversations.d.ts +3 -4
  346. package/resources/conversations/conversations.d.ts.map +1 -1
  347. package/resources/conversations/conversations.js.map +1 -1
  348. package/resources/conversations/conversations.mjs.map +1 -1
  349. package/resources/conversations/items.d.mts +8 -1
  350. package/resources/conversations/items.d.mts.map +1 -1
  351. package/resources/conversations/items.d.ts +8 -1
  352. package/resources/conversations/items.d.ts.map +1 -1
  353. package/resources/conversations/items.js +58 -3
  354. package/resources/conversations/items.js.map +1 -1
  355. package/resources/conversations/items.mjs +58 -3
  356. package/resources/conversations/items.mjs.map +1 -1
  357. package/resources/evals/evals.d.mts +8 -1
  358. package/resources/evals/evals.d.mts.map +1 -1
  359. package/resources/evals/evals.d.ts +8 -1
  360. package/resources/evals/evals.d.ts.map +1 -1
  361. package/resources/evals/evals.js +58 -3
  362. package/resources/evals/evals.js.map +1 -1
  363. package/resources/evals/evals.mjs +58 -3
  364. package/resources/evals/evals.mjs.map +1 -1
  365. package/resources/evals/runs/runs.d.mts +8 -1
  366. package/resources/evals/runs/runs.d.mts.map +1 -1
  367. package/resources/evals/runs/runs.d.ts +8 -1
  368. package/resources/evals/runs/runs.d.ts.map +1 -1
  369. package/resources/evals/runs/runs.js +58 -3
  370. package/resources/evals/runs/runs.js.map +1 -1
  371. package/resources/evals/runs/runs.mjs +58 -3
  372. package/resources/evals/runs/runs.mjs.map +1 -1
  373. package/resources/files.d.mts +8 -1
  374. package/resources/files.d.mts.map +1 -1
  375. package/resources/files.d.ts +8 -1
  376. package/resources/files.d.ts.map +1 -1
  377. package/resources/files.js +58 -3
  378. package/resources/files.js.map +1 -1
  379. package/resources/files.mjs +58 -3
  380. package/resources/files.mjs.map +1 -1
  381. package/resources/fine-tuning/checkpoints/permissions.d.mts +16 -2
  382. package/resources/fine-tuning/checkpoints/permissions.d.mts.map +1 -1
  383. package/resources/fine-tuning/checkpoints/permissions.d.ts +16 -2
  384. package/resources/fine-tuning/checkpoints/permissions.d.ts.map +1 -1
  385. package/resources/fine-tuning/checkpoints/permissions.js +64 -26
  386. package/resources/fine-tuning/checkpoints/permissions.js.map +1 -1
  387. package/resources/fine-tuning/checkpoints/permissions.mjs +64 -26
  388. package/resources/fine-tuning/checkpoints/permissions.mjs.map +1 -1
  389. package/resources/fine-tuning/jobs/checkpoints.d.mts +8 -1
  390. package/resources/fine-tuning/jobs/checkpoints.d.mts.map +1 -1
  391. package/resources/fine-tuning/jobs/checkpoints.d.ts +8 -1
  392. package/resources/fine-tuning/jobs/checkpoints.d.ts.map +1 -1
  393. package/resources/fine-tuning/jobs/checkpoints.js +58 -13
  394. package/resources/fine-tuning/jobs/checkpoints.js.map +1 -1
  395. package/resources/fine-tuning/jobs/checkpoints.mjs +58 -13
  396. package/resources/fine-tuning/jobs/checkpoints.mjs.map +1 -1
  397. package/resources/fine-tuning/jobs/jobs.d.mts +16 -2
  398. package/resources/fine-tuning/jobs/jobs.d.mts.map +1 -1
  399. package/resources/fine-tuning/jobs/jobs.d.ts +16 -2
  400. package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
  401. package/resources/fine-tuning/jobs/jobs.js +64 -24
  402. package/resources/fine-tuning/jobs/jobs.js.map +1 -1
  403. package/resources/fine-tuning/jobs/jobs.mjs +64 -24
  404. package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
  405. package/resources/images.d.mts +3 -4
  406. package/resources/images.d.mts.map +1 -1
  407. package/resources/images.d.ts +3 -4
  408. package/resources/images.d.ts.map +1 -1
  409. package/resources/responses/input-items.d.mts +8 -1
  410. package/resources/responses/input-items.d.mts.map +1 -1
  411. package/resources/responses/input-items.d.ts +8 -1
  412. package/resources/responses/input-items.d.ts.map +1 -1
  413. package/resources/responses/input-items.js +58 -13
  414. package/resources/responses/input-items.js.map +1 -1
  415. package/resources/responses/input-items.mjs +58 -13
  416. package/resources/responses/input-items.mjs.map +1 -1
  417. package/resources/responses/responses.d.mts +18 -8
  418. package/resources/responses/responses.d.mts.map +1 -1
  419. package/resources/responses/responses.d.ts +18 -8
  420. package/resources/responses/responses.d.ts.map +1 -1
  421. package/resources/responses/responses.js +58 -0
  422. package/resources/responses/responses.js.map +1 -1
  423. package/resources/responses/responses.mjs +58 -0
  424. package/resources/responses/responses.mjs.map +1 -1
  425. package/resources/safety/cases.d.mts +26 -0
  426. package/resources/safety/cases.d.mts.map +1 -0
  427. package/resources/safety/cases.d.ts +26 -0
  428. package/resources/safety/cases.d.ts.map +1 -0
  429. package/resources/safety/cases.js +16 -0
  430. package/resources/safety/cases.js.map +1 -0
  431. package/resources/safety/cases.mjs +12 -0
  432. package/resources/safety/cases.mjs.map +1 -0
  433. package/resources/safety/index.d.mts +1 -0
  434. package/resources/safety/index.d.mts.map +1 -1
  435. package/resources/safety/index.d.ts +1 -0
  436. package/resources/safety/index.d.ts.map +1 -1
  437. package/resources/safety/index.js +3 -1
  438. package/resources/safety/index.js.map +1 -1
  439. package/resources/safety/index.mjs +1 -0
  440. package/resources/safety/index.mjs.map +1 -1
  441. package/resources/safety/safety.d.mts +4 -0
  442. package/resources/safety/safety.d.mts.map +1 -1
  443. package/resources/safety/safety.d.ts +4 -0
  444. package/resources/safety/safety.d.ts.map +1 -1
  445. package/resources/safety/safety.js +4 -0
  446. package/resources/safety/safety.js.map +1 -1
  447. package/resources/safety/safety.mjs +4 -0
  448. package/resources/safety/safety.mjs.map +1 -1
  449. package/resources/skills/skills.d.mts +8 -1
  450. package/resources/skills/skills.d.mts.map +1 -1
  451. package/resources/skills/skills.d.ts +8 -1
  452. package/resources/skills/skills.d.ts.map +1 -1
  453. package/resources/skills/skills.js +58 -3
  454. package/resources/skills/skills.js.map +1 -1
  455. package/resources/skills/skills.mjs +58 -3
  456. package/resources/skills/skills.mjs.map +1 -1
  457. package/resources/skills/versions/versions.d.mts +8 -1
  458. package/resources/skills/versions/versions.d.mts.map +1 -1
  459. package/resources/skills/versions/versions.d.ts +8 -1
  460. package/resources/skills/versions/versions.d.ts.map +1 -1
  461. package/resources/skills/versions/versions.js +58 -3
  462. package/resources/skills/versions/versions.js.map +1 -1
  463. package/resources/skills/versions/versions.mjs +58 -3
  464. package/resources/skills/versions/versions.mjs.map +1 -1
  465. package/resources/vector-stores/files.d.mts +8 -1
  466. package/resources/vector-stores/files.d.mts.map +1 -1
  467. package/resources/vector-stores/files.d.ts +8 -1
  468. package/resources/vector-stores/files.d.ts.map +1 -1
  469. package/resources/vector-stores/files.js +58 -3
  470. package/resources/vector-stores/files.js.map +1 -1
  471. package/resources/vector-stores/files.mjs +58 -3
  472. package/resources/vector-stores/files.mjs.map +1 -1
  473. package/resources/vector-stores/vector-stores.d.mts +8 -1
  474. package/resources/vector-stores/vector-stores.d.mts.map +1 -1
  475. package/resources/vector-stores/vector-stores.d.ts +8 -1
  476. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  477. package/resources/vector-stores/vector-stores.js +58 -3
  478. package/resources/vector-stores/vector-stores.js.map +1 -1
  479. package/resources/vector-stores/vector-stores.mjs +58 -3
  480. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  481. package/resources/videos.d.mts +16 -2
  482. package/resources/videos.d.mts.map +1 -1
  483. package/resources/videos.d.ts +16 -2
  484. package/resources/videos.d.ts.map +1 -1
  485. package/resources/videos.js +64 -12
  486. package/resources/videos.js.map +1 -1
  487. package/resources/videos.mjs +64 -12
  488. package/resources/videos.mjs.map +1 -1
  489. package/resources/webhooks/webhooks.d.mts +91 -3
  490. package/resources/webhooks/webhooks.d.mts.map +1 -1
  491. package/resources/webhooks/webhooks.d.ts +91 -3
  492. package/resources/webhooks/webhooks.d.ts.map +1 -1
  493. package/resources/webhooks/webhooks.js +58 -11
  494. package/resources/webhooks/webhooks.js.map +1 -1
  495. package/resources/webhooks/webhooks.mjs +58 -11
  496. package/resources/webhooks/webhooks.mjs.map +1 -1
  497. package/src/resources/admin/organization/admin-api-keys.ts +200 -1
  498. package/src/resources/admin/organization/audit-logs.ts +270 -1
  499. package/src/resources/admin/organization/certificates.ts +295 -2
  500. package/src/resources/admin/organization/external-storage.ts +420 -0
  501. package/src/resources/admin/organization/groups/groups.ts +200 -1
  502. package/src/resources/admin/organization/groups/roles.ts +202 -1
  503. package/src/resources/admin/organization/groups/users.ts +202 -1
  504. package/src/resources/admin/organization/index.ts +10 -0
  505. package/src/resources/admin/organization/invites.ts +200 -1
  506. package/src/resources/admin/organization/organization.ts +24 -0
  507. package/src/resources/admin/organization/projects/api-keys.ts +202 -1
  508. package/src/resources/admin/organization/projects/certificates.ts +202 -1
  509. package/src/resources/admin/organization/projects/groups/groups.ts +202 -1
  510. package/src/resources/admin/organization/projects/projects.ts +200 -1
  511. package/src/resources/admin/organization/projects/rate-limits.ts +202 -1
  512. package/src/resources/admin/organization/projects/roles.ts +202 -1
  513. package/src/resources/admin/organization/projects/service-accounts/service-accounts.ts +202 -1
  514. package/src/resources/admin/organization/projects/spend-alerts.ts +202 -1
  515. package/src/resources/admin/organization/projects/users/users.ts +202 -1
  516. package/src/resources/admin/organization/roles.ts +200 -1
  517. package/src/resources/admin/organization/spend-alerts.ts +200 -1
  518. package/src/resources/admin/organization/users/roles.ts +202 -1
  519. package/src/resources/admin/organization/users/users.ts +200 -1
  520. package/src/resources/batches.ts +200 -1
  521. package/src/resources/beta/agents/agents.ts +253 -43
  522. package/src/resources/beta/agents/environments/templates.ts +214 -9
  523. package/src/resources/beta/agents/sessions/artifacts.ts +202 -1
  524. package/src/resources/beta/agents/sessions/items.ts +202 -1
  525. package/src/resources/beta/agents/sessions/sessions.ts +209 -6
  526. package/src/resources/beta/agents/sessions/subagents/subagents.ts +202 -1
  527. package/src/resources/beta/agents/sessions/turns.ts +205 -3
  528. package/src/resources/beta/agents/vaults/credentials.ts +382 -22
  529. package/src/resources/beta/agents/vaults/index.ts +2 -0
  530. package/src/resources/beta/agents/vaults/vaults.ts +205 -3
  531. package/src/resources/beta/assistants.ts +200 -1
  532. package/src/resources/beta/chatkit/threads.ts +311 -2
  533. package/src/resources/beta/responses/responses.ts +4 -5
  534. package/src/resources/beta/threads/messages.ts +202 -1
  535. package/src/resources/beta/threads/runs/runs.ts +202 -1
  536. package/src/resources/chat/completions/completions.ts +205 -3
  537. package/src/resources/chat/completions/messages.ts +202 -1
  538. package/src/resources/containers/containers.ts +200 -1
  539. package/src/resources/containers/files/files.ts +202 -1
  540. package/src/resources/conversations/conversations.ts +3 -4
  541. package/src/resources/conversations/items.ts +202 -1
  542. package/src/resources/evals/evals.ts +200 -1
  543. package/src/resources/evals/runs/runs.ts +202 -1
  544. package/src/resources/files.ts +200 -1
  545. package/src/resources/fine-tuning/checkpoints/permissions.ts +297 -2
  546. package/src/resources/fine-tuning/jobs/checkpoints.ts +202 -1
  547. package/src/resources/fine-tuning/jobs/jobs.ts +295 -2
  548. package/src/resources/images.ts +3 -4
  549. package/src/resources/responses/input-items.ts +202 -1
  550. package/src/resources/responses/responses.ts +255 -9
  551. package/src/resources/safety/cases.ts +39 -0
  552. package/src/resources/safety/index.ts +1 -0
  553. package/src/resources/safety/safety.ts +6 -0
  554. package/src/resources/skills/skills.ts +200 -1
  555. package/src/resources/skills/versions/versions.ts +202 -1
  556. package/src/resources/vector-stores/files.ts +202 -1
  557. package/src/resources/vector-stores/vector-stores.ts +200 -1
  558. package/src/resources/videos.ts +295 -2
  559. package/src/resources/webhooks/api.md +2 -0
  560. package/src/resources/webhooks/webhooks.ts +301 -2
  561. package/src/version.ts +1 -1
  562. package/version.d.mts +1 -1
  563. package/version.d.ts +1 -1
  564. package/version.js +1 -1
  565. package/version.mjs +1 -1
@@ -73,6 +73,113 @@ export interface ParsedResponse<ParsedT> extends Response {
73
73
 
74
74
  export type ResponseParseParams = ResponseCreateParamsNonStreaming;
75
75
 
76
+ // Recognizable options across SDK runtime versions. Keep this independent of
77
+ // private RequestOptions fields so older handwritten runtimes still compile.
78
+ const normalizeRequestOptionsForQueryKeys = new Set([
79
+ 'method',
80
+ 'path',
81
+ 'query',
82
+ 'body',
83
+ 'headers',
84
+ 'maxRetries',
85
+ 'stream',
86
+ 'timeout',
87
+ 'httpAgent',
88
+ 'fetchOptions',
89
+ 'signal',
90
+ 'idempotencyKey',
91
+ 'defaultBaseURL',
92
+ '__metadata',
93
+ '__binaryRequest',
94
+ '__binaryResponse',
95
+ '__streamClass',
96
+ '__security',
97
+ '__synthesizeEventData',
98
+ ]);
99
+
100
+ function normalizeRequestOptionsForQuery(
101
+ value: unknown,
102
+ queryKeys: ReadonlyArray<string>,
103
+ options: RequestOptions | undefined,
104
+ ):
105
+ | ({
106
+ [K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
107
+ } & {
108
+ [
109
+ K in
110
+ | 'method'
111
+ | 'path'
112
+ | 'body'
113
+ | 'stream'
114
+ | 'httpAgent'
115
+ | 'fetchOptions'
116
+ | 'defaultBaseURL'
117
+ | '__metadata'
118
+ | '__binaryRequest'
119
+ | '__binaryResponse'
120
+ | '__streamClass'
121
+ | '__security'
122
+ | '__synthesizeEventData'
123
+ ]?: never;
124
+ })
125
+ | undefined {
126
+ if (typeof value !== 'object' || value === null) return undefined;
127
+ // Optional never fields can still be explicitly undefined unless consumers
128
+ // enable exactOptionalPropertyTypes. Snapshot data without invoking getters.
129
+ const entries = Object.entries(Object.getOwnPropertyDescriptors(value)).filter(
130
+ ([, descriptor]) => descriptor.enumerable && (!('value' in descriptor) || descriptor.value !== undefined),
131
+ );
132
+ const keys = entries.map(([key]) => key);
133
+ const requestOnly = keys.some(
134
+ (key) => normalizeRequestOptionsForQueryKeys.has(key) && !queryKeys.includes(key),
135
+ );
136
+ if (!requestOnly) return undefined;
137
+ // Declared query fields, including stream, must use the query argument.
138
+ // Mixing them with request-only options is ambiguous and could change the return type.
139
+ if (
140
+ options !== undefined ||
141
+ keys.some((key) => !normalizeRequestOptionsForQueryKeys.has(key) || queryKeys.includes(key))
142
+ ) {
143
+ throw new TypeError('Query parameters and request options must be passed as separate arguments.');
144
+ }
145
+ // The query position must not gain authority to change the request destination
146
+ // or transport. Those overrides require the explicit request options argument.
147
+ if (
148
+ keys.some(
149
+ (key) => !['headers', 'maxRetries', 'timeout', 'signal', 'idempotencyKey', 'query'].includes(key),
150
+ )
151
+ ) {
152
+ throw new TypeError('Pass transport overrides in the explicit request options argument.');
153
+ }
154
+ // Copy only the validated fields. Spreading value would reintroduce undefined
155
+ // transport overrides, and deleting them would mutate the caller's object.
156
+ return Object.fromEntries(
157
+ entries.map(([key, descriptor]) => {
158
+ if ('value' in descriptor) return [key, descriptor.value];
159
+ return [key, descriptor.get ? Reflect.apply(descriptor.get, value, []) : undefined];
160
+ }),
161
+ ) as {
162
+ [K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
163
+ } & {
164
+ [
165
+ K in
166
+ | 'method'
167
+ | 'path'
168
+ | 'body'
169
+ | 'stream'
170
+ | 'httpAgent'
171
+ | 'fetchOptions'
172
+ | 'defaultBaseURL'
173
+ | '__metadata'
174
+ | '__binaryRequest'
175
+ | '__binaryResponse'
176
+ | '__streamClass'
177
+ | '__security'
178
+ | '__synthesizeEventData'
179
+ ]?: never;
180
+ };
181
+ }
182
+
76
183
  export class Responses extends APIResource {
77
184
  inputItems: InputItemsAPI.InputItems = new InputItemsAPI.InputItems(this._client);
78
185
  inputTokens: InputTokensAPI.InputTokens = new InputTokensAPI.InputTokens(this._client);
@@ -136,24 +243,164 @@ export class Responses extends APIResource {
136
243
  */
137
244
  retrieve(
138
245
  responseID: string,
139
- query?: ResponseRetrieveParamsNonStreaming,
246
+ query?: ResponseRetrieveParamsNonStreaming &
247
+ (
248
+ | {
249
+ [
250
+ K in
251
+ | 'method'
252
+ | 'path'
253
+ | 'query'
254
+ | 'body'
255
+ | 'headers'
256
+ | 'maxRetries'
257
+ | 'timeout'
258
+ | 'httpAgent'
259
+ | 'fetchOptions'
260
+ | 'signal'
261
+ | 'idempotencyKey'
262
+ | 'defaultBaseURL'
263
+ | '__metadata'
264
+ | '__binaryRequest'
265
+ | '__binaryResponse'
266
+ | '__streamClass'
267
+ | '__security'
268
+ | '__synthesizeEventData'
269
+ ]?: never;
270
+ }
271
+ | null
272
+ | undefined
273
+ ),
140
274
  options?: RequestOptions,
141
275
  ): APIPromise<Response>;
142
276
  retrieve(
143
277
  responseID: string,
144
- query: ResponseRetrieveParamsStreaming,
278
+ query: ResponseRetrieveParamsStreaming &
279
+ (
280
+ | {
281
+ [
282
+ K in
283
+ | 'method'
284
+ | 'path'
285
+ | 'query'
286
+ | 'body'
287
+ | 'headers'
288
+ | 'maxRetries'
289
+ | 'timeout'
290
+ | 'httpAgent'
291
+ | 'fetchOptions'
292
+ | 'signal'
293
+ | 'idempotencyKey'
294
+ | 'defaultBaseURL'
295
+ | '__metadata'
296
+ | '__binaryRequest'
297
+ | '__binaryResponse'
298
+ | '__streamClass'
299
+ | '__security'
300
+ | '__synthesizeEventData'
301
+ ]?: never;
302
+ }
303
+ | null
304
+ | undefined
305
+ ),
145
306
  options?: RequestOptions,
146
307
  ): APIPromise<Stream<ResponseStreamEvent>>;
147
308
  retrieve(
148
309
  responseID: string,
149
- query?: ResponseRetrieveParamsBase | undefined,
310
+ query?:
311
+ | (ResponseRetrieveParamsBase &
312
+ (
313
+ | {
314
+ [
315
+ K in
316
+ | 'method'
317
+ | 'path'
318
+ | 'query'
319
+ | 'body'
320
+ | 'headers'
321
+ | 'maxRetries'
322
+ | 'timeout'
323
+ | 'httpAgent'
324
+ | 'fetchOptions'
325
+ | 'signal'
326
+ | 'idempotencyKey'
327
+ | 'defaultBaseURL'
328
+ | '__metadata'
329
+ | '__binaryRequest'
330
+ | '__binaryResponse'
331
+ | '__streamClass'
332
+ | '__security'
333
+ | '__synthesizeEventData'
334
+ ]?: never;
335
+ }
336
+ | null
337
+ | undefined
338
+ ))
339
+ | undefined,
150
340
  options?: RequestOptions,
151
341
  ): APIPromise<Stream<ResponseStreamEvent> | Response>;
152
342
  retrieve(
153
343
  responseID: string,
154
- query: ResponseRetrieveParams | undefined = {},
344
+ options?: {
345
+ [K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
346
+ } & {
347
+ [
348
+ K in
349
+ | 'method'
350
+ | 'path'
351
+ | 'body'
352
+ | 'stream'
353
+ | 'httpAgent'
354
+ | 'fetchOptions'
355
+ | 'defaultBaseURL'
356
+ | '__metadata'
357
+ | '__binaryRequest'
358
+ | '__binaryResponse'
359
+ | '__streamClass'
360
+ | '__security'
361
+ | '__synthesizeEventData'
362
+ ]?: never;
363
+ },
364
+ ): APIPromise<Response>;
365
+ retrieve(
366
+ responseID: string,
367
+ query:
368
+ | ResponseRetrieveParamsBase
369
+ | ({
370
+ [
371
+ K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query'
372
+ ]?: RequestOptions[K];
373
+ } & {
374
+ [
375
+ K in
376
+ | 'method'
377
+ | 'path'
378
+ | 'body'
379
+ | 'stream'
380
+ | 'httpAgent'
381
+ | 'fetchOptions'
382
+ | 'defaultBaseURL'
383
+ | '__metadata'
384
+ | '__binaryRequest'
385
+ | '__binaryResponse'
386
+ | '__streamClass'
387
+ | '__security'
388
+ | '__synthesizeEventData'
389
+ ]?: never;
390
+ })
391
+ | undefined = {},
155
392
  options?: RequestOptions,
156
393
  ): APIPromise<Response> | APIPromise<Stream<ResponseStreamEvent>> {
394
+ const normalizeRequestOptionsForQueryOptions = normalizeRequestOptionsForQuery(
395
+ query,
396
+ ['include', 'include_obfuscation', 'starting_after', 'stream'],
397
+ options,
398
+ );
399
+ if (normalizeRequestOptionsForQueryOptions !== undefined) {
400
+ options = normalizeRequestOptionsForQueryOptions;
401
+ query = {};
402
+ }
403
+ query = query as ResponseRetrieveParams | undefined;
157
404
  return (
158
405
  this._client.get(path`/responses/${responseID}`, {
159
406
  query,
@@ -6785,7 +7032,7 @@ export namespace ResponseOutputText {
6785
7032
  */
6786
7033
  export interface ResponseOutputTextAnnotationAddedEvent {
6787
7034
  /**
6788
- * An annotation that applies to a span of output text.
7035
+ * The annotation object being added. (See annotation schema for details.)
6789
7036
  */
6790
7037
  annotation:
6791
7038
  | ResponseOutputTextAnnotationAddedEvent.FileCitation
@@ -10305,10 +10552,9 @@ export namespace Tool {
10305
10552
  background?: 'transparent' | 'opaque' | 'auto';
10306
10553
 
10307
10554
  /**
10308
- * Control how much effort the model will exert to match the style and features,
10309
- * especially facial features, of input images. This parameter is only supported
10310
- * for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for
10311
- * `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
10555
+ * Controls fidelity to the original input image(s). This parameter is supported
10556
+ * for GPT image models that support input fidelity. `gpt-image-2` and
10557
+ * `gpt-image-2-2026-04-21` ignore this parameter.
10312
10558
  */
10313
10559
  input_fidelity?: 'high' | 'low' | null;
10314
10560
 
@@ -0,0 +1,39 @@
1
+ // File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ export class Cases extends APIResource {
9
+ /**
10
+ * Get a safety case by ID.
11
+ */
12
+ retrieve(id: string, options?: RequestOptions): APIPromise<SafetyCase> {
13
+ return this._client.get(path`/safety/cases/${id}`, { ...options, __security: { bearerAuth: true } });
14
+ }
15
+ }
16
+
17
+ export interface SafetyCase {
18
+ id: string;
19
+
20
+ created_at: number;
21
+
22
+ entity_identifier: string;
23
+
24
+ notice: SafetyCase.Notice;
25
+
26
+ object: 'safety.case';
27
+
28
+ reason: string | null;
29
+ }
30
+
31
+ export namespace SafetyCase {
32
+ export interface Notice {
33
+ type: 'warning' | 'deactivation';
34
+ }
35
+ }
36
+
37
+ export declare namespace Cases {
38
+ export { type SafetyCase as SafetyCase };
39
+ }
@@ -1,4 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details.
2
2
 
3
3
  export { Alerts, type SafetyAlert } from './alerts';
4
+ export { Cases, type SafetyCase } from './cases';
4
5
  export { Safety } from './safety';
@@ -3,13 +3,19 @@
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as AlertsAPI from './alerts';
5
5
  import { Alerts, SafetyAlert } from './alerts';
6
+ import * as CasesAPI from './cases';
7
+ import { Cases, SafetyCase } from './cases';
6
8
 
7
9
  export class Safety extends APIResource {
8
10
  alerts: AlertsAPI.Alerts = new AlertsAPI.Alerts(this._client);
11
+ cases: CasesAPI.Cases = new CasesAPI.Cases(this._client);
9
12
  }
10
13
 
11
14
  Safety.Alerts = Alerts;
15
+ Safety.Cases = Cases;
12
16
 
13
17
  export declare namespace Safety {
14
18
  export { Alerts as Alerts, type SafetyAlert as SafetyAlert };
19
+
20
+ export { Cases as Cases, type SafetyCase as SafetyCase };
15
21
  }
@@ -22,6 +22,113 @@ import { RequestOptions } from '../../internal/request-options';
22
22
  import { maybeMultipartFormRequestOptions } from '../../internal/uploads';
23
23
  import { path } from '../../internal/utils/path';
24
24
 
25
+ // Recognizable options across SDK runtime versions. Keep this independent of
26
+ // private RequestOptions fields so older handwritten runtimes still compile.
27
+ const normalizeRequestOptionsForQueryKeys = new Set([
28
+ 'method',
29
+ 'path',
30
+ 'query',
31
+ 'body',
32
+ 'headers',
33
+ 'maxRetries',
34
+ 'stream',
35
+ 'timeout',
36
+ 'httpAgent',
37
+ 'fetchOptions',
38
+ 'signal',
39
+ 'idempotencyKey',
40
+ 'defaultBaseURL',
41
+ '__metadata',
42
+ '__binaryRequest',
43
+ '__binaryResponse',
44
+ '__streamClass',
45
+ '__security',
46
+ '__synthesizeEventData',
47
+ ]);
48
+
49
+ function normalizeRequestOptionsForQuery(
50
+ value: unknown,
51
+ queryKeys: ReadonlyArray<string>,
52
+ options: RequestOptions | undefined,
53
+ ):
54
+ | ({
55
+ [K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
56
+ } & {
57
+ [
58
+ K in
59
+ | 'method'
60
+ | 'path'
61
+ | 'body'
62
+ | 'stream'
63
+ | 'httpAgent'
64
+ | 'fetchOptions'
65
+ | 'defaultBaseURL'
66
+ | '__metadata'
67
+ | '__binaryRequest'
68
+ | '__binaryResponse'
69
+ | '__streamClass'
70
+ | '__security'
71
+ | '__synthesizeEventData'
72
+ ]?: never;
73
+ })
74
+ | undefined {
75
+ if (typeof value !== 'object' || value === null) return undefined;
76
+ // Optional never fields can still be explicitly undefined unless consumers
77
+ // enable exactOptionalPropertyTypes. Snapshot data without invoking getters.
78
+ const entries = Object.entries(Object.getOwnPropertyDescriptors(value)).filter(
79
+ ([, descriptor]) => descriptor.enumerable && (!('value' in descriptor) || descriptor.value !== undefined),
80
+ );
81
+ const keys = entries.map(([key]) => key);
82
+ const requestOnly = keys.some(
83
+ (key) => normalizeRequestOptionsForQueryKeys.has(key) && !queryKeys.includes(key),
84
+ );
85
+ if (!requestOnly) return undefined;
86
+ // Declared query fields, including stream, must use the query argument.
87
+ // Mixing them with request-only options is ambiguous and could change the return type.
88
+ if (
89
+ options !== undefined ||
90
+ keys.some((key) => !normalizeRequestOptionsForQueryKeys.has(key) || queryKeys.includes(key))
91
+ ) {
92
+ throw new TypeError('Query parameters and request options must be passed as separate arguments.');
93
+ }
94
+ // The query position must not gain authority to change the request destination
95
+ // or transport. Those overrides require the explicit request options argument.
96
+ if (
97
+ keys.some(
98
+ (key) => !['headers', 'maxRetries', 'timeout', 'signal', 'idempotencyKey', 'query'].includes(key),
99
+ )
100
+ ) {
101
+ throw new TypeError('Pass transport overrides in the explicit request options argument.');
102
+ }
103
+ // Copy only the validated fields. Spreading value would reintroduce undefined
104
+ // transport overrides, and deleting them would mutate the caller's object.
105
+ return Object.fromEntries(
106
+ entries.map(([key, descriptor]) => {
107
+ if ('value' in descriptor) return [key, descriptor.value];
108
+ return [key, descriptor.get ? Reflect.apply(descriptor.get, value, []) : undefined];
109
+ }),
110
+ ) as {
111
+ [K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
112
+ } & {
113
+ [
114
+ K in
115
+ | 'method'
116
+ | 'path'
117
+ | 'body'
118
+ | 'stream'
119
+ | 'httpAgent'
120
+ | 'fetchOptions'
121
+ | 'defaultBaseURL'
122
+ | '__metadata'
123
+ | '__binaryRequest'
124
+ | '__binaryResponse'
125
+ | '__streamClass'
126
+ | '__security'
127
+ | '__synthesizeEventData'
128
+ ]?: never;
129
+ };
130
+ }
131
+
25
132
  export class Skills extends APIResource {
26
133
  content: ContentAPI.Content = new ContentAPI.Content(this._client);
27
134
  versions: VersionsAPI.Versions = new VersionsAPI.Versions(this._client);
@@ -60,9 +167,101 @@ export class Skills extends APIResource {
60
167
  * List all skills for the current project.
61
168
  */
62
169
  list(
63
- query: SkillListParams | null | undefined = {},
170
+ query?:
171
+ | (SkillListParams &
172
+ (
173
+ | {
174
+ [
175
+ K in
176
+ | 'method'
177
+ | 'path'
178
+ | 'query'
179
+ | 'body'
180
+ | 'headers'
181
+ | 'maxRetries'
182
+ | 'stream'
183
+ | 'timeout'
184
+ | 'httpAgent'
185
+ | 'fetchOptions'
186
+ | 'signal'
187
+ | 'idempotencyKey'
188
+ | 'defaultBaseURL'
189
+ | '__metadata'
190
+ | '__binaryRequest'
191
+ | '__binaryResponse'
192
+ | '__streamClass'
193
+ | '__security'
194
+ | '__synthesizeEventData'
195
+ ]?: never;
196
+ }
197
+ | null
198
+ | undefined
199
+ ))
200
+ | null
201
+ | undefined,
202
+ options?: RequestOptions,
203
+ ): PagePromise<SkillsPage, Skill>;
204
+ list(
205
+ options?: {
206
+ [K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
207
+ } & {
208
+ [
209
+ K in
210
+ | 'method'
211
+ | 'path'
212
+ | 'body'
213
+ | 'stream'
214
+ | 'httpAgent'
215
+ | 'fetchOptions'
216
+ | 'defaultBaseURL'
217
+ | '__metadata'
218
+ | '__binaryRequest'
219
+ | '__binaryResponse'
220
+ | '__streamClass'
221
+ | '__security'
222
+ | '__synthesizeEventData'
223
+ ]?: never;
224
+ },
225
+ ): PagePromise<SkillsPage, Skill>;
226
+ list(
227
+ query:
228
+ | SkillListParams
229
+ | ({
230
+ [
231
+ K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query'
232
+ ]?: RequestOptions[K];
233
+ } & {
234
+ [
235
+ K in
236
+ | 'method'
237
+ | 'path'
238
+ | 'body'
239
+ | 'stream'
240
+ | 'httpAgent'
241
+ | 'fetchOptions'
242
+ | 'defaultBaseURL'
243
+ | '__metadata'
244
+ | '__binaryRequest'
245
+ | '__binaryResponse'
246
+ | '__streamClass'
247
+ | '__security'
248
+ | '__synthesizeEventData'
249
+ ]?: never;
250
+ })
251
+ | null
252
+ | undefined = {},
64
253
  options?: RequestOptions,
65
254
  ): PagePromise<SkillsPage, Skill> {
255
+ const normalizeRequestOptionsForQueryOptions = normalizeRequestOptionsForQuery(
256
+ query,
257
+ ['after', 'limit', 'order'],
258
+ options,
259
+ );
260
+ if (normalizeRequestOptionsForQueryOptions !== undefined) {
261
+ options = normalizeRequestOptionsForQueryOptions;
262
+ query = {};
263
+ }
264
+ query = query as SkillListParams | null | undefined;
66
265
  return this._client.getAPIList('/skills', CursorPage<Skill>, {
67
266
  query,
68
267
  ...options,