@anthropic-ai/sdk 0.123.0 → 0.124.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 (358) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +6 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +2 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +2 -1
  9. package/client.mjs.map +1 -1
  10. package/core/streaming.js +4 -2
  11. package/core/streaming.js.map +1 -1
  12. package/core/streaming.mjs +4 -2
  13. package/core/streaming.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/beta/agents/agents.d.mts +45 -0
  16. package/resources/beta/agents/agents.d.mts.map +1 -1
  17. package/resources/beta/agents/agents.d.ts +45 -0
  18. package/resources/beta/agents/agents.d.ts.map +1 -1
  19. package/resources/beta/agents/agents.js +25 -10
  20. package/resources/beta/agents/agents.js.map +1 -1
  21. package/resources/beta/agents/agents.mjs +25 -10
  22. package/resources/beta/agents/agents.mjs.map +1 -1
  23. package/resources/beta/agents/versions.d.mts +9 -0
  24. package/resources/beta/agents/versions.d.mts.map +1 -1
  25. package/resources/beta/agents/versions.d.ts +9 -0
  26. package/resources/beta/agents/versions.d.ts.map +1 -1
  27. package/resources/beta/agents/versions.js +5 -2
  28. package/resources/beta/agents/versions.js.map +1 -1
  29. package/resources/beta/agents/versions.mjs +5 -2
  30. package/resources/beta/agents/versions.mjs.map +1 -1
  31. package/resources/beta/deployment-runs.d.mts +18 -0
  32. package/resources/beta/deployment-runs.d.mts.map +1 -1
  33. package/resources/beta/deployment-runs.d.ts +18 -0
  34. package/resources/beta/deployment-runs.d.ts.map +1 -1
  35. package/resources/beta/deployment-runs.js +10 -4
  36. package/resources/beta/deployment-runs.js.map +1 -1
  37. package/resources/beta/deployment-runs.mjs +10 -4
  38. package/resources/beta/deployment-runs.mjs.map +1 -1
  39. package/resources/beta/deployments.d.mts +72 -0
  40. package/resources/beta/deployments.d.mts.map +1 -1
  41. package/resources/beta/deployments.d.ts +72 -0
  42. package/resources/beta/deployments.d.ts.map +1 -1
  43. package/resources/beta/deployments.js +40 -16
  44. package/resources/beta/deployments.js.map +1 -1
  45. package/resources/beta/deployments.mjs +40 -16
  46. package/resources/beta/deployments.mjs.map +1 -1
  47. package/resources/beta/dreams.d.mts +45 -0
  48. package/resources/beta/dreams.d.mts.map +1 -1
  49. package/resources/beta/dreams.d.ts +45 -0
  50. package/resources/beta/dreams.d.ts.map +1 -1
  51. package/resources/beta/dreams.js +25 -10
  52. package/resources/beta/dreams.js.map +1 -1
  53. package/resources/beta/dreams.mjs +25 -10
  54. package/resources/beta/dreams.mjs.map +1 -1
  55. package/resources/beta/environments/environments.d.mts +54 -0
  56. package/resources/beta/environments/environments.d.mts.map +1 -1
  57. package/resources/beta/environments/environments.d.ts +54 -0
  58. package/resources/beta/environments/environments.d.ts.map +1 -1
  59. package/resources/beta/environments/environments.js +30 -12
  60. package/resources/beta/environments/environments.js.map +1 -1
  61. package/resources/beta/environments/environments.mjs +30 -12
  62. package/resources/beta/environments/environments.mjs.map +1 -1
  63. package/resources/beta/environments/work.d.mts +36 -0
  64. package/resources/beta/environments/work.d.mts.map +1 -1
  65. package/resources/beta/environments/work.d.ts +36 -0
  66. package/resources/beta/environments/work.d.ts.map +1 -1
  67. package/resources/beta/environments/work.js +20 -8
  68. package/resources/beta/environments/work.js.map +1 -1
  69. package/resources/beta/environments/work.mjs +20 -8
  70. package/resources/beta/environments/work.mjs.map +1 -1
  71. package/resources/beta/files.d.mts +48 -1
  72. package/resources/beta/files.d.mts.map +1 -1
  73. package/resources/beta/files.d.ts +48 -1
  74. package/resources/beta/files.d.ts.map +1 -1
  75. package/resources/beta/files.js +22 -9
  76. package/resources/beta/files.js.map +1 -1
  77. package/resources/beta/files.mjs +22 -9
  78. package/resources/beta/files.mjs.map +1 -1
  79. package/resources/beta/memory-stores/memories.d.mts +45 -0
  80. package/resources/beta/memory-stores/memories.d.mts.map +1 -1
  81. package/resources/beta/memory-stores/memories.d.ts +45 -0
  82. package/resources/beta/memory-stores/memories.d.ts.map +1 -1
  83. package/resources/beta/memory-stores/memories.js +25 -10
  84. package/resources/beta/memory-stores/memories.js.map +1 -1
  85. package/resources/beta/memory-stores/memories.mjs +25 -10
  86. package/resources/beta/memory-stores/memories.mjs.map +1 -1
  87. package/resources/beta/memory-stores/memory-stores.d.mts +54 -0
  88. package/resources/beta/memory-stores/memory-stores.d.mts.map +1 -1
  89. package/resources/beta/memory-stores/memory-stores.d.ts +54 -0
  90. package/resources/beta/memory-stores/memory-stores.d.ts.map +1 -1
  91. package/resources/beta/memory-stores/memory-stores.js +30 -12
  92. package/resources/beta/memory-stores/memory-stores.js.map +1 -1
  93. package/resources/beta/memory-stores/memory-stores.mjs +30 -12
  94. package/resources/beta/memory-stores/memory-stores.mjs.map +1 -1
  95. package/resources/beta/memory-stores/memory-versions.d.mts +31 -4
  96. package/resources/beta/memory-stores/memory-versions.d.mts.map +1 -1
  97. package/resources/beta/memory-stores/memory-versions.d.ts +31 -4
  98. package/resources/beta/memory-stores/memory-versions.d.ts.map +1 -1
  99. package/resources/beta/memory-stores/memory-versions.js +15 -6
  100. package/resources/beta/memory-stores/memory-versions.js.map +1 -1
  101. package/resources/beta/memory-stores/memory-versions.mjs +15 -6
  102. package/resources/beta/memory-stores/memory-versions.mjs.map +1 -1
  103. package/resources/beta/messages/batches.d.mts +54 -0
  104. package/resources/beta/messages/batches.d.mts.map +1 -1
  105. package/resources/beta/messages/batches.d.ts +54 -0
  106. package/resources/beta/messages/batches.d.ts.map +1 -1
  107. package/resources/beta/messages/batches.js +25 -11
  108. package/resources/beta/messages/batches.js.map +1 -1
  109. package/resources/beta/messages/batches.mjs +25 -11
  110. package/resources/beta/messages/batches.mjs.map +1 -1
  111. package/resources/beta/messages/messages.d.mts +18 -0
  112. package/resources/beta/messages/messages.d.mts.map +1 -1
  113. package/resources/beta/messages/messages.d.ts +18 -0
  114. package/resources/beta/messages/messages.d.ts.map +1 -1
  115. package/resources/beta/messages/messages.js +4 -2
  116. package/resources/beta/messages/messages.js.map +1 -1
  117. package/resources/beta/messages/messages.mjs +4 -2
  118. package/resources/beta/messages/messages.mjs.map +1 -1
  119. package/resources/beta/models.d.mts +18 -0
  120. package/resources/beta/models.d.mts.map +1 -1
  121. package/resources/beta/models.d.ts +18 -0
  122. package/resources/beta/models.d.ts.map +1 -1
  123. package/resources/beta/models.js +10 -4
  124. package/resources/beta/models.js.map +1 -1
  125. package/resources/beta/models.mjs +10 -4
  126. package/resources/beta/models.mjs.map +1 -1
  127. package/resources/beta/organization/compliance-settings.d.mts +5 -3
  128. package/resources/beta/organization/compliance-settings.d.mts.map +1 -1
  129. package/resources/beta/organization/compliance-settings.d.ts +5 -3
  130. package/resources/beta/organization/compliance-settings.d.ts.map +1 -1
  131. package/resources/beta/organization/index.d.mts +1 -1
  132. package/resources/beta/organization/index.d.mts.map +1 -1
  133. package/resources/beta/organization/index.d.ts +1 -1
  134. package/resources/beta/organization/index.d.ts.map +1 -1
  135. package/resources/beta/organization/index.js.map +1 -1
  136. package/resources/beta/organization/index.mjs.map +1 -1
  137. package/resources/beta/organization/organization.d.mts +2 -2
  138. package/resources/beta/organization/organization.d.mts.map +1 -1
  139. package/resources/beta/organization/organization.d.ts +2 -2
  140. package/resources/beta/organization/organization.d.ts.map +1 -1
  141. package/resources/beta/organization/organization.js.map +1 -1
  142. package/resources/beta/organization/organization.mjs.map +1 -1
  143. package/resources/beta/sessions/events.d.mts +27 -0
  144. package/resources/beta/sessions/events.d.mts.map +1 -1
  145. package/resources/beta/sessions/events.d.ts +27 -0
  146. package/resources/beta/sessions/events.d.ts.map +1 -1
  147. package/resources/beta/sessions/events.js +15 -6
  148. package/resources/beta/sessions/events.js.map +1 -1
  149. package/resources/beta/sessions/events.mjs +15 -6
  150. package/resources/beta/sessions/events.mjs.map +1 -1
  151. package/resources/beta/sessions/resources.d.mts +45 -0
  152. package/resources/beta/sessions/resources.d.mts.map +1 -1
  153. package/resources/beta/sessions/resources.d.ts +45 -0
  154. package/resources/beta/sessions/resources.d.ts.map +1 -1
  155. package/resources/beta/sessions/resources.js +25 -10
  156. package/resources/beta/sessions/resources.js.map +1 -1
  157. package/resources/beta/sessions/resources.mjs +25 -10
  158. package/resources/beta/sessions/resources.mjs.map +1 -1
  159. package/resources/beta/sessions/sessions.d.mts +54 -0
  160. package/resources/beta/sessions/sessions.d.mts.map +1 -1
  161. package/resources/beta/sessions/sessions.d.ts +54 -0
  162. package/resources/beta/sessions/sessions.d.ts.map +1 -1
  163. package/resources/beta/sessions/sessions.js +30 -12
  164. package/resources/beta/sessions/sessions.js.map +1 -1
  165. package/resources/beta/sessions/sessions.mjs +30 -12
  166. package/resources/beta/sessions/sessions.mjs.map +1 -1
  167. package/resources/beta/sessions/threads/events.d.mts +18 -0
  168. package/resources/beta/sessions/threads/events.d.mts.map +1 -1
  169. package/resources/beta/sessions/threads/events.d.ts +18 -0
  170. package/resources/beta/sessions/threads/events.d.ts.map +1 -1
  171. package/resources/beta/sessions/threads/events.js +10 -4
  172. package/resources/beta/sessions/threads/events.js.map +1 -1
  173. package/resources/beta/sessions/threads/events.mjs +10 -4
  174. package/resources/beta/sessions/threads/events.mjs.map +1 -1
  175. package/resources/beta/sessions/threads/threads.d.mts +27 -0
  176. package/resources/beta/sessions/threads/threads.d.mts.map +1 -1
  177. package/resources/beta/sessions/threads/threads.d.ts +27 -0
  178. package/resources/beta/sessions/threads/threads.d.ts.map +1 -1
  179. package/resources/beta/sessions/threads/threads.js +15 -6
  180. package/resources/beta/sessions/threads/threads.js.map +1 -1
  181. package/resources/beta/sessions/threads/threads.mjs +15 -6
  182. package/resources/beta/sessions/threads/threads.mjs.map +1 -1
  183. package/resources/beta/skills/skills.d.mts +36 -0
  184. package/resources/beta/skills/skills.d.mts.map +1 -1
  185. package/resources/beta/skills/skills.d.ts +36 -0
  186. package/resources/beta/skills/skills.d.ts.map +1 -1
  187. package/resources/beta/skills/skills.js +20 -8
  188. package/resources/beta/skills/skills.js.map +1 -1
  189. package/resources/beta/skills/skills.mjs +20 -8
  190. package/resources/beta/skills/skills.mjs.map +1 -1
  191. package/resources/beta/skills/versions.d.mts +45 -0
  192. package/resources/beta/skills/versions.d.mts.map +1 -1
  193. package/resources/beta/skills/versions.d.ts +45 -0
  194. package/resources/beta/skills/versions.d.ts.map +1 -1
  195. package/resources/beta/skills/versions.js +22 -9
  196. package/resources/beta/skills/versions.js.map +1 -1
  197. package/resources/beta/skills/versions.mjs +22 -9
  198. package/resources/beta/skills/versions.mjs.map +1 -1
  199. package/resources/beta/tunnels/certificates.d.mts +36 -0
  200. package/resources/beta/tunnels/certificates.d.mts.map +1 -1
  201. package/resources/beta/tunnels/certificates.d.ts +36 -0
  202. package/resources/beta/tunnels/certificates.d.ts.map +1 -1
  203. package/resources/beta/tunnels/certificates.js +20 -8
  204. package/resources/beta/tunnels/certificates.js.map +1 -1
  205. package/resources/beta/tunnels/certificates.mjs +20 -8
  206. package/resources/beta/tunnels/certificates.mjs.map +1 -1
  207. package/resources/beta/tunnels/tunnels.d.mts +54 -0
  208. package/resources/beta/tunnels/tunnels.d.mts.map +1 -1
  209. package/resources/beta/tunnels/tunnels.d.ts +54 -0
  210. package/resources/beta/tunnels/tunnels.d.ts.map +1 -1
  211. package/resources/beta/tunnels/tunnels.js +30 -12
  212. package/resources/beta/tunnels/tunnels.js.map +1 -1
  213. package/resources/beta/tunnels/tunnels.mjs +30 -12
  214. package/resources/beta/tunnels/tunnels.mjs.map +1 -1
  215. package/resources/beta/vaults/credentials.d.mts +63 -0
  216. package/resources/beta/vaults/credentials.d.mts.map +1 -1
  217. package/resources/beta/vaults/credentials.d.ts +63 -0
  218. package/resources/beta/vaults/credentials.d.ts.map +1 -1
  219. package/resources/beta/vaults/credentials.js +35 -14
  220. package/resources/beta/vaults/credentials.js.map +1 -1
  221. package/resources/beta/vaults/credentials.mjs +35 -14
  222. package/resources/beta/vaults/credentials.mjs.map +1 -1
  223. package/resources/beta/vaults/vaults.d.mts +54 -0
  224. package/resources/beta/vaults/vaults.d.mts.map +1 -1
  225. package/resources/beta/vaults/vaults.d.ts +54 -0
  226. package/resources/beta/vaults/vaults.d.ts.map +1 -1
  227. package/resources/beta/vaults/vaults.js +30 -12
  228. package/resources/beta/vaults/vaults.js.map +1 -1
  229. package/resources/beta/vaults/vaults.mjs +30 -12
  230. package/resources/beta/vaults/vaults.mjs.map +1 -1
  231. package/resources/completions.d.mts +9 -0
  232. package/resources/completions.d.mts.map +1 -1
  233. package/resources/completions.d.ts +9 -0
  234. package/resources/completions.d.ts.map +1 -1
  235. package/resources/completions.js +5 -2
  236. package/resources/completions.js.map +1 -1
  237. package/resources/completions.mjs +5 -2
  238. package/resources/completions.mjs.map +1 -1
  239. package/resources/files.d.mts +104 -15
  240. package/resources/files.d.mts.map +1 -1
  241. package/resources/files.d.ts +104 -15
  242. package/resources/files.d.ts.map +1 -1
  243. package/resources/files.js +79 -10
  244. package/resources/files.js.map +1 -1
  245. package/resources/files.mjs +79 -10
  246. package/resources/files.mjs.map +1 -1
  247. package/resources/index.d.mts +2 -2
  248. package/resources/index.d.mts.map +1 -1
  249. package/resources/index.d.ts +2 -2
  250. package/resources/index.d.ts.map +1 -1
  251. package/resources/index.js.map +1 -1
  252. package/resources/index.mjs.map +1 -1
  253. package/resources/messages/batches.d.mts +68 -6
  254. package/resources/messages/batches.d.mts.map +1 -1
  255. package/resources/messages/batches.d.ts +68 -6
  256. package/resources/messages/batches.d.ts.map +1 -1
  257. package/resources/messages/batches.js +52 -13
  258. package/resources/messages/batches.js.map +1 -1
  259. package/resources/messages/batches.mjs +52 -13
  260. package/resources/messages/batches.mjs.map +1 -1
  261. package/resources/messages/index.d.mts +1 -1
  262. package/resources/messages/index.d.mts.map +1 -1
  263. package/resources/messages/index.d.ts +1 -1
  264. package/resources/messages/index.d.ts.map +1 -1
  265. package/resources/messages/index.js.map +1 -1
  266. package/resources/messages/index.mjs.map +1 -1
  267. package/resources/messages/messages.d.mts +20 -2
  268. package/resources/messages/messages.d.mts.map +1 -1
  269. package/resources/messages/messages.d.ts +20 -2
  270. package/resources/messages/messages.d.ts.map +1 -1
  271. package/resources/messages/messages.js +10 -4
  272. package/resources/messages/messages.js.map +1 -1
  273. package/resources/messages/messages.mjs +10 -4
  274. package/resources/messages/messages.mjs.map +1 -1
  275. package/resources/models.d.mts +31 -0
  276. package/resources/models.d.mts.map +1 -1
  277. package/resources/models.d.ts +31 -0
  278. package/resources/models.d.ts.map +1 -1
  279. package/resources/models.js +23 -4
  280. package/resources/models.js.map +1 -1
  281. package/resources/models.mjs +23 -4
  282. package/resources/models.mjs.map +1 -1
  283. package/resources/skills/index.d.mts +1 -1
  284. package/resources/skills/index.d.mts.map +1 -1
  285. package/resources/skills/index.d.ts +1 -1
  286. package/resources/skills/index.d.ts.map +1 -1
  287. package/resources/skills/index.js.map +1 -1
  288. package/resources/skills/index.mjs.map +1 -1
  289. package/resources/skills/skills.d.mts +75 -10
  290. package/resources/skills/skills.d.mts.map +1 -1
  291. package/resources/skills/skills.d.ts +75 -10
  292. package/resources/skills/skills.d.ts.map +1 -1
  293. package/resources/skills/skills.js +64 -8
  294. package/resources/skills/skills.js.map +1 -1
  295. package/resources/skills/skills.mjs +64 -8
  296. package/resources/skills/skills.mjs.map +1 -1
  297. package/resources/skills/versions.d.mts +75 -5
  298. package/resources/skills/versions.d.mts.map +1 -1
  299. package/resources/skills/versions.d.ts +75 -5
  300. package/resources/skills/versions.d.ts.map +1 -1
  301. package/resources/skills/versions.js +67 -7
  302. package/resources/skills/versions.js.map +1 -1
  303. package/resources/skills/versions.mjs +67 -7
  304. package/resources/skills/versions.mjs.map +1 -1
  305. package/src/client.ts +12 -1
  306. package/src/core/streaming.ts +4 -2
  307. package/src/resources/beta/agents/agents.ts +75 -10
  308. package/src/resources/beta/agents/versions.ts +15 -2
  309. package/src/resources/beta/deployment-runs.ts +30 -4
  310. package/src/resources/beta/deployments.ts +120 -16
  311. package/src/resources/beta/dreams.ts +75 -10
  312. package/src/resources/beta/environments/environments.ts +90 -12
  313. package/src/resources/beta/environments/work.ts +60 -8
  314. package/src/resources/beta/files.ts +75 -11
  315. package/src/resources/beta/memory-stores/memories.ts +75 -10
  316. package/src/resources/beta/memory-stores/memory-stores.ts +90 -12
  317. package/src/resources/beta/memory-stores/memory-versions.ts +49 -10
  318. package/src/resources/beta/messages/batches.ts +85 -11
  319. package/src/resources/beta/messages/messages.ts +24 -2
  320. package/src/resources/beta/models.ts +30 -4
  321. package/src/resources/beta/organization/compliance-settings.ts +12 -2
  322. package/src/resources/beta/organization/index.ts +2 -0
  323. package/src/resources/beta/organization/organization.ts +4 -0
  324. package/src/resources/beta/sessions/events.ts +45 -6
  325. package/src/resources/beta/sessions/resources.ts +75 -10
  326. package/src/resources/beta/sessions/sessions.ts +90 -12
  327. package/src/resources/beta/sessions/threads/events.ts +30 -4
  328. package/src/resources/beta/sessions/threads/threads.ts +45 -6
  329. package/src/resources/beta/skills/skills.ts +60 -8
  330. package/src/resources/beta/skills/versions.ts +72 -9
  331. package/src/resources/beta/tunnels/certificates.ts +60 -8
  332. package/src/resources/beta/tunnels/tunnels.ts +90 -12
  333. package/src/resources/beta/vaults/credentials.ts +105 -14
  334. package/src/resources/beta/vaults/vaults.ts +90 -12
  335. package/src/resources/completions.ts +15 -2
  336. package/src/resources/files.ts +161 -18
  337. package/src/resources/index.ts +5 -0
  338. package/src/resources/messages/batches.ts +137 -13
  339. package/src/resources/messages/index.ts +4 -0
  340. package/src/resources/messages/messages.ts +38 -4
  341. package/src/resources/models.ts +43 -4
  342. package/src/resources/skills/index.ts +2 -0
  343. package/src/resources/skills/skills.ts +127 -13
  344. package/src/resources/skills/versions.ts +115 -11
  345. package/src/tools/agent-toolset/fs-util.ts +16 -4
  346. package/src/version.ts +1 -1
  347. package/tools/agent-toolset/fs-util.d.mts +11 -4
  348. package/tools/agent-toolset/fs-util.d.mts.map +1 -1
  349. package/tools/agent-toolset/fs-util.d.ts +11 -4
  350. package/tools/agent-toolset/fs-util.d.ts.map +1 -1
  351. package/tools/agent-toolset/fs-util.js +14 -4
  352. package/tools/agent-toolset/fs-util.js.map +1 -1
  353. package/tools/agent-toolset/fs-util.mjs +14 -4
  354. package/tools/agent-toolset/fs-util.mjs.map +1 -1
  355. package/version.d.mts +1 -1
  356. package/version.d.ts +1 -1
  357. package/version.js +1 -1
  358. package/version.mjs +1 -1
@@ -6,24 +6,59 @@ import { RequestOptions } from "../internal/request-options.mjs";
6
6
  export declare class Files extends APIResource {
7
7
  /**
8
8
  * List Files
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * // Automatically fetches more pages as needed.
13
+ * for await (const fileMetadata of client.files.list()) {
14
+ * // ...
15
+ * }
16
+ * ```
9
17
  */
10
- list(query?: FileListParams | null | undefined, options?: RequestOptions): PagePromise<FileMetadataPageCursor, FileMetadata>;
18
+ list(params?: FileListParams | null | undefined, options?: RequestOptions): PagePromise<FileMetadataPageCursor, FileMetadata>;
11
19
  /**
12
20
  * Delete File
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const deletedFile = await client.files.delete('file_id');
25
+ * ```
13
26
  */
14
- delete(fileID: string, options?: RequestOptions): APIPromise<DeletedFile>;
27
+ delete(fileID: string, params?: FileDeleteParams | null | undefined, options?: RequestOptions): APIPromise<DeletedFile>;
15
28
  /**
16
29
  * Download File
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const response = await client.files.download('file_id');
34
+ *
35
+ * const content = await response.blob();
36
+ * console.log(content);
37
+ * ```
17
38
  */
18
- download(fileID: string, options?: RequestOptions): APIPromise<Response>;
39
+ download(fileID: string, params?: FileDownloadParams | null | undefined, options?: RequestOptions): APIPromise<Response>;
19
40
  /**
20
41
  * Get File Metadata
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const fileMetadata = await client.files.retrieveMetadata(
46
+ * 'file_id',
47
+ * );
48
+ * ```
21
49
  */
22
- retrieveMetadata(fileID: string, options?: RequestOptions): APIPromise<FileMetadata>;
50
+ retrieveMetadata(fileID: string, params?: FileRetrieveMetadataParams | null | undefined, options?: RequestOptions): APIPromise<FileMetadata>;
23
51
  /**
24
52
  * Upload File
25
- */
26
- upload(body: FileUploadParams, options?: RequestOptions): APIPromise<FileMetadata>;
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * const fileMetadata = await client.files.upload({
57
+ * file: fs.createReadStream('path/to/file'),
58
+ * });
59
+ * ```
60
+ */
61
+ upload(params: FileUploadParams, options?: RequestOptions): APIPromise<FileMetadata>;
27
62
  }
28
63
  export type FileMetadataPageCursor = PageCursor<FileMetadata>;
29
64
  export interface DeletedFile {
@@ -80,26 +115,80 @@ export interface FileMetadata {
80
115
  }
81
116
  export interface FileListParams extends PageCursorParams {
82
117
  /**
83
- * Restrict the result set to Files whose `id` is in this list. At most 100 entries
84
- * (after de-duplication). Mutually exclusive with `page` and `limit`. When
85
- * supplied, the response is always a single page (`next_page` is null). IDs that
86
- * do not resolve to a visible File — including deleted Files — are silently
87
- * omitted.
118
+ * Query param: Restrict the result set to Files whose `id` is in this list. At
119
+ * most 100 entries (after de-duplication). Mutually exclusive with `page` and
120
+ * `limit`. When supplied, the response is always a single page (`next_page` is
121
+ * null). IDs that do not resolve to a visible File — including deleted Files — are
122
+ * silently omitted.
88
123
  */
89
124
  ids?: Array<string> | null;
125
+ /**
126
+ * Header param: Optional header to select the Workspace for this request. The
127
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
128
+ *
129
+ * Only needed for credentials that can act on more than one Workspace. A
130
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
131
+ * match that Workspace.
132
+ */
133
+ workspace_id?: string;
134
+ }
135
+ export interface FileDeleteParams {
136
+ /**
137
+ * Optional header to select the Workspace for this request. The value is a
138
+ * Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
139
+ *
140
+ * Only needed for credentials that can act on more than one Workspace. A
141
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
142
+ * match that Workspace.
143
+ */
144
+ workspace_id?: string;
145
+ }
146
+ export interface FileDownloadParams {
147
+ /**
148
+ * Optional header to select the Workspace for this request. The value is a
149
+ * Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
150
+ *
151
+ * Only needed for credentials that can act on more than one Workspace. A
152
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
153
+ * match that Workspace.
154
+ */
155
+ workspace_id?: string;
156
+ }
157
+ export interface FileRetrieveMetadataParams {
158
+ /**
159
+ * Optional header to select the Workspace for this request. The value is a
160
+ * Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
161
+ *
162
+ * Only needed for credentials that can act on more than one Workspace. A
163
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
164
+ * match that Workspace.
165
+ */
166
+ workspace_id?: string;
90
167
  }
91
168
  export interface FileUploadParams {
92
169
  /**
93
- * The file to upload
170
+ * Body param: The file to upload. Only the final path component of the part's
171
+ * `filename` is kept; an absent or empty `filename` is replaced with `unnamed`
172
+ * plus the extension for the file's stored `mime_type`, when known.
94
173
  */
95
174
  file: Uploadable;
96
175
  /**
97
- * Seconds from upload until the file expires and its bytes become permanently
98
- * unavailable. Must be between 3600 (one hour) and 7776000 (ninety days).
176
+ * Body param: Seconds from upload until the file expires and its bytes become
177
+ * permanently unavailable. Must be between 3600 (one hour) and 7776000 (ninety
178
+ * days).
99
179
  */
100
180
  expires_in_seconds?: number;
181
+ /**
182
+ * Header param: Optional header to select the Workspace for this request. The
183
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
184
+ *
185
+ * Only needed for credentials that can act on more than one Workspace. A
186
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
187
+ * match that Workspace.
188
+ */
189
+ workspace_id?: string;
101
190
  }
102
191
  export declare namespace Files {
103
- export { type DeletedFile as DeletedFile, type FileMetadata as FileMetadata, type FileMetadataPageCursor as FileMetadataPageCursor, type FileListParams as FileListParams, type FileUploadParams as FileUploadParams, };
192
+ export { type DeletedFile as DeletedFile, type FileMetadata as FileMetadata, type FileMetadataPageCursor as FileMetadataPageCursor, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileDownloadParams as FileDownloadParams, type FileRetrieveMetadataParams as FileRetrieveMetadataParams, type FileUploadParams as FileUploadParams, };
104
193
  }
105
194
  //# sourceMappingURL=files.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"files.d.mts","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,+BAA2B;AACpF,OAAO,EAAE,KAAK,UAAU,EAAE,4BAAwB;AAElD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAK7D,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,sBAAsB,EAAE,YAAY,CAAC;IAIpD;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAIzE;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;IAQxE;;OAEG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAIpF;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CA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BAA0B,IAAI,0BAA0B,EAC7D,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
@@ -6,24 +6,59 @@ import { RequestOptions } from "../internal/request-options.js";
6
6
  export declare class Files extends APIResource {
7
7
  /**
8
8
  * List Files
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * // Automatically fetches more pages as needed.
13
+ * for await (const fileMetadata of client.files.list()) {
14
+ * // ...
15
+ * }
16
+ * ```
9
17
  */
10
- list(query?: FileListParams | null | undefined, options?: RequestOptions): PagePromise<FileMetadataPageCursor, FileMetadata>;
18
+ list(params?: FileListParams | null | undefined, options?: RequestOptions): PagePromise<FileMetadataPageCursor, FileMetadata>;
11
19
  /**
12
20
  * Delete File
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const deletedFile = await client.files.delete('file_id');
25
+ * ```
13
26
  */
14
- delete(fileID: string, options?: RequestOptions): APIPromise<DeletedFile>;
27
+ delete(fileID: string, params?: FileDeleteParams | null | undefined, options?: RequestOptions): APIPromise<DeletedFile>;
15
28
  /**
16
29
  * Download File
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const response = await client.files.download('file_id');
34
+ *
35
+ * const content = await response.blob();
36
+ * console.log(content);
37
+ * ```
17
38
  */
18
- download(fileID: string, options?: RequestOptions): APIPromise<Response>;
39
+ download(fileID: string, params?: FileDownloadParams | null | undefined, options?: RequestOptions): APIPromise<Response>;
19
40
  /**
20
41
  * Get File Metadata
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const fileMetadata = await client.files.retrieveMetadata(
46
+ * 'file_id',
47
+ * );
48
+ * ```
21
49
  */
22
- retrieveMetadata(fileID: string, options?: RequestOptions): APIPromise<FileMetadata>;
50
+ retrieveMetadata(fileID: string, params?: FileRetrieveMetadataParams | null | undefined, options?: RequestOptions): APIPromise<FileMetadata>;
23
51
  /**
24
52
  * Upload File
25
- */
26
- upload(body: FileUploadParams, options?: RequestOptions): APIPromise<FileMetadata>;
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * const fileMetadata = await client.files.upload({
57
+ * file: fs.createReadStream('path/to/file'),
58
+ * });
59
+ * ```
60
+ */
61
+ upload(params: FileUploadParams, options?: RequestOptions): APIPromise<FileMetadata>;
27
62
  }
28
63
  export type FileMetadataPageCursor = PageCursor<FileMetadata>;
29
64
  export interface DeletedFile {
@@ -80,26 +115,80 @@ export interface FileMetadata {
80
115
  }
81
116
  export interface FileListParams extends PageCursorParams {
82
117
  /**
83
- * Restrict the result set to Files whose `id` is in this list. At most 100 entries
84
- * (after de-duplication). Mutually exclusive with `page` and `limit`. When
85
- * supplied, the response is always a single page (`next_page` is null). IDs that
86
- * do not resolve to a visible File — including deleted Files — are silently
87
- * omitted.
118
+ * Query param: Restrict the result set to Files whose `id` is in this list. At
119
+ * most 100 entries (after de-duplication). Mutually exclusive with `page` and
120
+ * `limit`. When supplied, the response is always a single page (`next_page` is
121
+ * null). IDs that do not resolve to a visible File — including deleted Files — are
122
+ * silently omitted.
88
123
  */
89
124
  ids?: Array<string> | null;
125
+ /**
126
+ * Header param: Optional header to select the Workspace for this request. The
127
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
128
+ *
129
+ * Only needed for credentials that can act on more than one Workspace. A
130
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
131
+ * match that Workspace.
132
+ */
133
+ workspace_id?: string;
134
+ }
135
+ export interface FileDeleteParams {
136
+ /**
137
+ * Optional header to select the Workspace for this request. The value is a
138
+ * Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
139
+ *
140
+ * Only needed for credentials that can act on more than one Workspace. A
141
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
142
+ * match that Workspace.
143
+ */
144
+ workspace_id?: string;
145
+ }
146
+ export interface FileDownloadParams {
147
+ /**
148
+ * Optional header to select the Workspace for this request. The value is a
149
+ * Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
150
+ *
151
+ * Only needed for credentials that can act on more than one Workspace. A
152
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
153
+ * match that Workspace.
154
+ */
155
+ workspace_id?: string;
156
+ }
157
+ export interface FileRetrieveMetadataParams {
158
+ /**
159
+ * Optional header to select the Workspace for this request. The value is a
160
+ * Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
161
+ *
162
+ * Only needed for credentials that can act on more than one Workspace. A
163
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
164
+ * match that Workspace.
165
+ */
166
+ workspace_id?: string;
90
167
  }
91
168
  export interface FileUploadParams {
92
169
  /**
93
- * The file to upload
170
+ * Body param: The file to upload. Only the final path component of the part's
171
+ * `filename` is kept; an absent or empty `filename` is replaced with `unnamed`
172
+ * plus the extension for the file's stored `mime_type`, when known.
94
173
  */
95
174
  file: Uploadable;
96
175
  /**
97
- * Seconds from upload until the file expires and its bytes become permanently
98
- * unavailable. Must be between 3600 (one hour) and 7776000 (ninety days).
176
+ * Body param: Seconds from upload until the file expires and its bytes become
177
+ * permanently unavailable. Must be between 3600 (one hour) and 7776000 (ninety
178
+ * days).
99
179
  */
100
180
  expires_in_seconds?: number;
181
+ /**
182
+ * Header param: Optional header to select the Workspace for this request. The
183
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
184
+ *
185
+ * Only needed for credentials that can act on more than one Workspace. A
186
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
187
+ * match that Workspace.
188
+ */
189
+ workspace_id?: string;
101
190
  }
102
191
  export declare namespace Files {
103
- export { type DeletedFile as DeletedFile, type FileMetadata as FileMetadata, type FileMetadataPageCursor as FileMetadataPageCursor, type FileListParams as FileListParams, type FileUploadParams as FileUploadParams, };
192
+ export { type DeletedFile as DeletedFile, type FileMetadata as FileMetadata, type FileMetadataPageCursor as FileMetadataPageCursor, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileDownloadParams as FileDownloadParams, type FileRetrieveMetadataParams as FileRetrieveMetadataParams, type FileUploadParams as FileUploadParams, };
104
193
  }
105
194
  //# sourceMappingURL=files.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,8BAA2B;AACpF,OAAO,EAAE,KAAK,UAAU,EAAE,2BAAwB;AAElD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAK7D,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,sBAAsB,EAAE,YAAY,CAAC;IAIpD;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAIzE;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;IAQxE;;OAEG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAIpF;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;CAanF;AAED,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;I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C;IAEb;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAE3B;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,0BAA0B;IACzC;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
@@ -11,40 +11,109 @@ const path_1 = require("../internal/utils/path.js");
11
11
  class Files extends resource_1.APIResource {
12
12
  /**
13
13
  * List Files
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * // Automatically fetches more pages as needed.
18
+ * for await (const fileMetadata of client.files.list()) {
19
+ * // ...
20
+ * }
21
+ * ```
14
22
  */
15
- list(query = {}, options) {
16
- return this._client.getAPIList('/v1/files', (pagination_1.PageCursor), { query, ...options });
23
+ list(params = {}, options) {
24
+ const { workspace_id, ...query } = params ?? {};
25
+ return this._client.getAPIList('/v1/files', (pagination_1.PageCursor), {
26
+ query,
27
+ ...options,
28
+ headers: (0, headers_1.buildHeaders)([
29
+ { ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
30
+ options?.headers,
31
+ ]),
32
+ });
17
33
  }
18
34
  /**
19
35
  * Delete File
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const deletedFile = await client.files.delete('file_id');
40
+ * ```
20
41
  */
21
- delete(fileID, options) {
22
- return this._client.delete((0, path_1.path) `/v1/files/${fileID}`, options);
42
+ delete(fileID, params = {}, options) {
43
+ const { workspace_id } = params ?? {};
44
+ return this._client.delete((0, path_1.path) `/v1/files/${fileID}`, {
45
+ ...options,
46
+ headers: (0, headers_1.buildHeaders)([
47
+ { ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
48
+ options?.headers,
49
+ ]),
50
+ });
23
51
  }
24
52
  /**
25
53
  * Download File
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const response = await client.files.download('file_id');
58
+ *
59
+ * const content = await response.blob();
60
+ * console.log(content);
61
+ * ```
26
62
  */
27
- download(fileID, options) {
63
+ download(fileID, params = {}, options) {
64
+ const { workspace_id } = params ?? {};
28
65
  return this._client.get((0, path_1.path) `/v1/files/${fileID}/content`, {
29
66
  ...options,
30
- headers: (0, headers_1.buildHeaders)([{ Accept: 'application/binary' }, options?.headers]),
67
+ headers: (0, headers_1.buildHeaders)([
68
+ {
69
+ Accept: 'application/binary',
70
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
71
+ },
72
+ options?.headers,
73
+ ]),
31
74
  __binaryResponse: true,
32
75
  });
33
76
  }
34
77
  /**
35
78
  * Get File Metadata
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * const fileMetadata = await client.files.retrieveMetadata(
83
+ * 'file_id',
84
+ * );
85
+ * ```
36
86
  */
37
- retrieveMetadata(fileID, options) {
38
- return this._client.get((0, path_1.path) `/v1/files/${fileID}`, options);
87
+ retrieveMetadata(fileID, params = {}, options) {
88
+ const { workspace_id } = params ?? {};
89
+ return this._client.get((0, path_1.path) `/v1/files/${fileID}`, {
90
+ ...options,
91
+ headers: (0, headers_1.buildHeaders)([
92
+ { ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
93
+ options?.headers,
94
+ ]),
95
+ });
39
96
  }
40
97
  /**
41
98
  * Upload File
99
+ *
100
+ * @example
101
+ * ```ts
102
+ * const fileMetadata = await client.files.upload({
103
+ * file: fs.createReadStream('path/to/file'),
104
+ * });
105
+ * ```
42
106
  */
43
- upload(body, options) {
107
+ upload(params, options) {
108
+ const { workspace_id, ...body } = params;
44
109
  return this._client.post('/v1/files', (0, uploads_1.multipartFormRequestOptions)({
45
110
  body,
46
111
  ...options,
47
- headers: (0, headers_1.buildHeaders)([(0, stainless_helper_header_1.stainlessHelperHeaderFromFile)(body.file), options?.headers]),
112
+ headers: (0, headers_1.buildHeaders)([
113
+ { ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
114
+ (0, stainless_helper_header_1.stainlessHelperHeaderFromFile)(body.file),
115
+ options?.headers,
116
+ ]),
48
117
  }, this._client));
49
118
  }
50
119
  }
@@ -1 +1 @@
1
- {"version":3,"file":"files.js","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AAEpF,oDAAmD;AAEnD,oFAAoF;AACpF,oDAAkE;AAClE,oDAA8C;AAE9C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IA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CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACtF,IAAA,uDAA6B,EAAC,IAAI,CAAC,IAAI,CAAC;gBACxC,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,EACD,IAAI,CAAC,OAAO,CACb,CACF,CAAC;IACJ,CAAC;CACF;AArID,sBAqIC"}
@@ -8,40 +8,109 @@ import { path } from "../internal/utils/path.mjs";
8
8
  export class Files extends APIResource {
9
9
  /**
10
10
  * List Files
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * // Automatically fetches more pages as needed.
15
+ * for await (const fileMetadata of client.files.list()) {
16
+ * // ...
17
+ * }
18
+ * ```
11
19
  */
12
- list(query = {}, options) {
13
- return this._client.getAPIList('/v1/files', (PageCursor), { query, ...options });
20
+ list(params = {}, options) {
21
+ const { workspace_id, ...query } = params ?? {};
22
+ return this._client.getAPIList('/v1/files', (PageCursor), {
23
+ query,
24
+ ...options,
25
+ headers: buildHeaders([
26
+ { ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
27
+ options?.headers,
28
+ ]),
29
+ });
14
30
  }
15
31
  /**
16
32
  * Delete File
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const deletedFile = await client.files.delete('file_id');
37
+ * ```
17
38
  */
18
- delete(fileID, options) {
19
- return this._client.delete(path `/v1/files/${fileID}`, options);
39
+ delete(fileID, params = {}, options) {
40
+ const { workspace_id } = params ?? {};
41
+ return this._client.delete(path `/v1/files/${fileID}`, {
42
+ ...options,
43
+ headers: buildHeaders([
44
+ { ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
45
+ options?.headers,
46
+ ]),
47
+ });
20
48
  }
21
49
  /**
22
50
  * Download File
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const response = await client.files.download('file_id');
55
+ *
56
+ * const content = await response.blob();
57
+ * console.log(content);
58
+ * ```
23
59
  */
24
- download(fileID, options) {
60
+ download(fileID, params = {}, options) {
61
+ const { workspace_id } = params ?? {};
25
62
  return this._client.get(path `/v1/files/${fileID}/content`, {
26
63
  ...options,
27
- headers: buildHeaders([{ Accept: 'application/binary' }, options?.headers]),
64
+ headers: buildHeaders([
65
+ {
66
+ Accept: 'application/binary',
67
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
68
+ },
69
+ options?.headers,
70
+ ]),
28
71
  __binaryResponse: true,
29
72
  });
30
73
  }
31
74
  /**
32
75
  * Get File Metadata
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * const fileMetadata = await client.files.retrieveMetadata(
80
+ * 'file_id',
81
+ * );
82
+ * ```
33
83
  */
34
- retrieveMetadata(fileID, options) {
35
- return this._client.get(path `/v1/files/${fileID}`, options);
84
+ retrieveMetadata(fileID, params = {}, options) {
85
+ const { workspace_id } = params ?? {};
86
+ return this._client.get(path `/v1/files/${fileID}`, {
87
+ ...options,
88
+ headers: buildHeaders([
89
+ { ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
90
+ options?.headers,
91
+ ]),
92
+ });
36
93
  }
37
94
  /**
38
95
  * Upload File
96
+ *
97
+ * @example
98
+ * ```ts
99
+ * const fileMetadata = await client.files.upload({
100
+ * file: fs.createReadStream('path/to/file'),
101
+ * });
102
+ * ```
39
103
  */
40
- upload(body, options) {
104
+ upload(params, options) {
105
+ const { workspace_id, ...body } = params;
41
106
  return this._client.post('/v1/files', multipartFormRequestOptions({
42
107
  body,
43
108
  ...options,
44
- headers: buildHeaders([stainlessHelperHeaderFromFile(body.file), options?.headers]),
109
+ headers: buildHeaders([
110
+ { ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
111
+ stainlessHelperHeaderFromFile(body.file),
112
+ options?.headers,
113
+ ]),
45
114
  }, this._client));
46
115
  }
47
116
  }
@@ -1 +1 @@
1
- {"version":3,"file":"files.mjs","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB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AED;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAwB,EAAE,OAAwB;QACvD,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,WAAW,EACX,2BAA2B,CACzB;YACE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,wBAAwB,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACtF,6BAA6B,CAAC,IAAI,CAAC,IAAI,CAAC;gBACxC,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,EACD,IAAI,CAAC,OAAO,CACb,CACF,CAAC;IACJ,CAAC;CACF"}
@@ -1,8 +1,8 @@
1
1
  export * from "./shared.mjs";
2
2
  export { Beta, type AnthropicBeta, type BetaAPIError, type BetaAuthenticationError, type BetaBillingError, type BetaCurrency, type BetaError, type BetaErrorResponse, type BetaGatewayTimeoutError, type BetaInvalidRequestError, type BetaMonetaryAmount, type BetaNotFoundError, type BetaOverloadedError, type BetaPermissionError, type BetaRateLimitError, } from "./beta/beta.mjs";
3
3
  export { Completions, type Completion, type CompletionCreateParams, type CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming, } from "./completions.mjs";
4
- export { Files, type DeletedFile, type FileMetadata, type FileListParams, type FileUploadParams, type FileMetadataPageCursor, } from "./files.mjs";
4
+ export { Files, type DeletedFile, type FileMetadata, type FileListParams, type FileDeleteParams, type FileDownloadParams, type FileRetrieveMetadataParams, type FileUploadParams, type FileMetadataPageCursor, } from "./files.mjs";
5
5
  export { Messages, type Base64ImageSource, type Base64PDFSource, type BashCodeExecutionOutputBlock, type BashCodeExecutionOutputBlockParam, type BashCodeExecutionResultBlock, type BashCodeExecutionResultBlockParam, type BashCodeExecutionToolResultBlock, type BashCodeExecutionToolResultBlockParam, type BashCodeExecutionToolResultError, type BashCodeExecutionToolResultErrorCode, type BashCodeExecutionToolResultErrorParam, type BrowserCloseTabConfig, type BrowserDoubleClickConfig, type BrowserFileUploadConfig, type BrowserFindConfig, type BrowserFormInputConfig, type BrowserGetPageTextConfig, type BrowserHoldKeyConfig, type BrowserHoverConfig, type BrowserJavascriptExecConfig, type BrowserKeyConfig, type BrowserLeftClickConfig, type BrowserLeftClickDragConfig, type BrowserLeftMouseDownConfig, type BrowserLeftMouseUpConfig, type BrowserListTabsConfig, type BrowserMiddleClickConfig, type BrowserMouseMoveConfig, type BrowserNavigateConfig, type BrowserNewTabConfig, type BrowserReadConsoleConfig, type BrowserReadNetworkConfig, type BrowserReadPageConfig, type BrowserRightClickConfig, type BrowserScreenshotConfig, type BrowserScrollConfig, type BrowserScrollToConfig, type BrowserStateBlockParam, type BrowserStateChange, type BrowserStateChangeDownloadCompleted, type BrowserStateChangeDownloadFailed, type BrowserStateChangeDownloadStarted, type BrowserStateChangeTabOpened, type BrowserStateTabEntry, type BrowserSwitchTabConfig, type BrowserToolset20260801, type BrowserToolsetConfigs, type BrowserTripleClickConfig, type BrowserTypeConfig, type BrowserWaitConfig, type BrowserZoomConfig, type CacheControlEphemeral, type CacheCreation, type CitationCharLocation, type CitationCharLocationParam, type CitationContentBlockLocation, type CitationContentBlockLocationParam, type CitationPageLocation, type CitationPageLocationParam, type CitationSearchResultLocationParam, type CitationWebSearchResultLocationParam, type CitationsConfig, type CitationsConfigParam, type CitationsDelta, type CitationsSearchResultLocation, type CitationsWebSearchResultLocation, type CodeExecutionOutputBlock, type CodeExecutionOutputBlockParam, type CodeExecutionResultBlock, type CodeExecutionResultBlockParam, type CodeExecutionTool20250522, type CodeExecutionTool20250825, type CodeExecutionTool20260120, type CodeExecutionTool20260521, type CodeExecutionToolResultBlock, type CodeExecutionToolResultBlockContent, type CodeExecutionToolResultBlockParam, type CodeExecutionToolResultBlockParamContent, type CodeExecutionToolResultError, type CodeExecutionToolResultErrorCode, type CodeExecutionToolResultErrorParam, type ComputerCursorPositionConfig, type ComputerDoubleClickConfig, type ComputerHoldKeyConfig, type ComputerKeyConfig, type ComputerLeftClickConfig, type ComputerLeftClickDragConfig, type ComputerLeftMouseDownConfig, type ComputerLeftMouseUpConfig, type ComputerMiddleClickConfig, type ComputerMouseMoveConfig, type ComputerRightClickConfig, type ComputerScreenshotConfig, type ComputerScrollConfig, type ComputerToolset20260801, type ComputerToolsetConfigs, type ComputerTripleClickConfig, type ComputerTypeConfig, type ComputerWaitConfig, type ComputerZoomConfig, type Container, type ContainerParams, type ContainerSkill, type ContainerUploadBlock, type ContainerUploadBlockParam, type ContentBlock, type ContentBlockParam, type ContentBlockStartEvent, type ContentBlockStopEvent, type ContentBlockSource, type ContentBlockSourceContent, type DirectCaller, type DocumentBlock, type DocumentBlockParam, type EncryptedCodeExecutionResultBlock, type EncryptedCodeExecutionResultBlockParam, type FileDocumentSource, type FileImageSource, type ImageBlockParam, type ImageTransformationsParam, type InputJSONDelta, type JSONOutputFormat, type MemoryTool20250818, type Message, type MessageCountTokensTool, type MessageCreateParamsContainer, type MessageDeltaEvent, type MessageDeltaUsage, type MessageParam, type MessageStreamParams, type MessageTokensCount, type Metadata, type Model, type OutputConfig, type OutputTokensDetails, type PlainTextSource, type RawContentBlockDelta, type RawContentBlockDeltaEvent, type RawContentBlockStartEvent, type RawContentBlockStopEvent, type RawMessageDeltaEvent, type RawMessageStartEvent, type RawMessageStopEvent, type RawMessageStreamEvent, type RedactedThinkingBlock, type RedactedThinkingBlockParam, type RefusalStopDetails, type SearchResultBlockParam, type ServerToolCaller, type ServerToolCaller20260120, type ServerToolUsage, type ServerToolUseBlock, type ServerToolUseBlockParam, type SignatureDelta, type SkillParams, type StopReason, type TextBlock, type TextBlockParam, type TextCitation, type TextCitationParam, type TextDelta, type TextEditorCodeExecutionCreateResultBlock, type TextEditorCodeExecutionCreateResultBlockParam, type TextEditorCodeExecutionStrReplaceResultBlock, type TextEditorCodeExecutionStrReplaceResultBlockParam, type TextEditorCodeExecutionToolResultBlock, type TextEditorCodeExecutionToolResultBlockParam, type TextEditorCodeExecutionToolResultError, type TextEditorCodeExecutionToolResultErrorCode, type TextEditorCodeExecutionToolResultErrorParam, type TextEditorCodeExecutionViewResultBlock, type TextEditorCodeExecutionViewResultBlockParam, type ThinkingBlock, type ThinkingBlockParam, type ThinkingConfigAdaptive, type ThinkingConfigDisabled, type ThinkingConfigEnabled, type ThinkingConfigParam, type ThinkingDelta, type Tool, type ToolBash20250124, type ToolChoice, type ToolChoiceAny, type ToolChoiceAuto, type ToolChoiceNone, type ToolChoiceTool, type ToolReferenceBlock, type ToolReferenceBlockParam, type ToolResultBlockParam, type ToolSearchToolBm25_20251119, type ToolSearchToolRegex20251119, type ToolSearchToolResultBlock, type ToolSearchToolResultBlockParam, type ToolSearchToolResultError, type ToolSearchToolResultErrorCode, type ToolSearchToolResultErrorParam, type ToolSearchToolSearchResultBlock, type ToolSearchToolSearchResultBlockParam, type ToolTextEditor20250124, type ToolTextEditor20250429, type ToolTextEditor20250728, type ToolUnion, type ToolUseBlock, type ToolUseBlockParam, type URLImageSource, type URLPDFSource, type Usage, type UserLocation, type WebFetchBlock, type WebFetchBlockParam, type WebFetchTool20250910, type WebFetchTool20260209, type WebFetchTool20260309, type WebFetchTool20260318, type WebFetchToolResultBlock, type WebFetchToolResultBlockParam, type WebFetchToolResultErrorBlock, type WebFetchToolResultErrorBlockParam, type WebFetchToolResultErrorCode, type WebSearchResultBlock, type WebSearchResultBlockParam, type WebSearchTool20250305, type WebSearchTool20260209, type WebSearchTool20260318, type WebSearchToolRequestError, type WebSearchToolResultBlock, type WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent, type WebSearchToolResultError, type WebSearchToolResultErrorCode, type MessageCreateParams, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages/messages.mjs";
6
6
  export { Models, type CapabilitySupport, type ContextManagementCapability, type EffortCapability, type ModelCapabilities, type ModelInfo, type ThinkingCapability, type ThinkingTypes, type ModelRetrieveParams, type ModelListParams, type ModelInfosPage, } from "./models.mjs";
7
- export { Skills, type DeletedSkill, type Skill, type SkillSource, type SkillCreateParams, type SkillListParams, type SkillsPageCursor, } from "./skills/skills.mjs";
7
+ export { Skills, type DeletedSkill, type Skill, type SkillSource, type SkillCreateParams, type SkillRetrieveParams, type SkillListParams, type SkillDeleteParams, type SkillsPageCursor, } from "./skills/skills.mjs";
8
8
  //# sourceMappingURL=index.d.mts.map