@anthropic-ai/sdk 0.41.0 → 0.50.1

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 (614) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +118 -47
  3. package/_vendor/partial-json-parser/parser.d.mts +3 -0
  4. package/_vendor/partial-json-parser/parser.d.mts.map +1 -0
  5. package/_vendor/partial-json-parser/parser.d.ts.map +1 -1
  6. package/_vendor/partial-json-parser/parser.js.map +1 -1
  7. package/_vendor/partial-json-parser/parser.mjs.map +1 -1
  8. package/api-promise.d.mts +2 -0
  9. package/api-promise.d.mts.map +1 -0
  10. package/api-promise.d.ts +2 -0
  11. package/api-promise.d.ts.map +1 -0
  12. package/api-promise.js +6 -0
  13. package/api-promise.js.map +1 -0
  14. package/api-promise.mjs +2 -0
  15. package/api-promise.mjs.map +1 -0
  16. package/bin/cli +53 -0
  17. package/bin/migration-config.json +7 -0
  18. package/client.d.mts +224 -0
  19. package/client.d.mts.map +1 -0
  20. package/client.d.ts +224 -0
  21. package/client.d.ts.map +1 -0
  22. package/client.js +527 -0
  23. package/client.js.map +1 -0
  24. package/client.mjs +522 -0
  25. package/client.mjs.map +1 -0
  26. package/core/api-promise.d.mts +49 -0
  27. package/core/api-promise.d.mts.map +1 -0
  28. package/core/api-promise.d.ts +49 -0
  29. package/core/api-promise.d.ts.map +1 -0
  30. package/core/api-promise.js +76 -0
  31. package/core/api-promise.js.map +1 -0
  32. package/core/api-promise.mjs +72 -0
  33. package/core/api-promise.mjs.map +1 -0
  34. package/core/error.d.mts +47 -0
  35. package/core/error.d.mts.map +1 -0
  36. package/core/error.d.ts +47 -0
  37. package/core/error.d.ts.map +1 -0
  38. package/core/error.js +114 -0
  39. package/core/error.js.map +1 -0
  40. package/core/error.mjs +98 -0
  41. package/core/error.mjs.map +1 -0
  42. package/core/pagination.d.mts +63 -0
  43. package/core/pagination.d.mts.map +1 -0
  44. package/core/pagination.d.ts +63 -0
  45. package/core/pagination.d.ts.map +1 -0
  46. package/core/pagination.js +123 -0
  47. package/core/pagination.js.map +1 -0
  48. package/core/pagination.mjs +117 -0
  49. package/core/pagination.mjs.map +1 -0
  50. package/core/resource.d.mts +6 -0
  51. package/core/resource.d.mts.map +1 -0
  52. package/core/resource.d.ts +6 -0
  53. package/core/resource.d.ts.map +1 -0
  54. package/core/resource.js +11 -0
  55. package/core/resource.js.map +1 -0
  56. package/core/resource.mjs +7 -0
  57. package/core/resource.mjs.map +1 -0
  58. package/core/streaming.d.mts +31 -0
  59. package/core/streaming.d.mts.map +1 -0
  60. package/core/streaming.d.ts +31 -0
  61. package/core/streaming.d.ts.map +1 -0
  62. package/core/streaming.js +282 -0
  63. package/core/streaming.js.map +1 -0
  64. package/core/streaming.mjs +277 -0
  65. package/core/streaming.mjs.map +1 -0
  66. package/core/uploads.d.mts +3 -0
  67. package/core/uploads.d.mts.map +1 -0
  68. package/core/uploads.d.ts +3 -0
  69. package/core/uploads.d.ts.map +1 -0
  70. package/core/uploads.js +6 -0
  71. package/core/uploads.js.map +1 -0
  72. package/core/uploads.mjs +2 -0
  73. package/core/uploads.mjs.map +1 -0
  74. package/error.d.mts +2 -0
  75. package/error.d.mts.map +1 -0
  76. package/error.d.ts +1 -47
  77. package/error.d.ts.map +1 -1
  78. package/error.js +3 -111
  79. package/error.js.map +1 -1
  80. package/error.mjs +1 -97
  81. package/error.mjs.map +1 -1
  82. package/index.d.mts +7 -152
  83. package/index.d.mts.map +1 -0
  84. package/index.d.ts +6 -151
  85. package/index.d.ts.map +1 -1
  86. package/index.js +17 -156
  87. package/index.js.map +1 -1
  88. package/index.mjs +6 -129
  89. package/index.mjs.map +1 -1
  90. package/internal/builtin-types.d.mts +73 -0
  91. package/internal/builtin-types.d.mts.map +1 -0
  92. package/internal/builtin-types.d.ts +73 -0
  93. package/internal/builtin-types.d.ts.map +1 -0
  94. package/internal/builtin-types.js +4 -0
  95. package/internal/builtin-types.js.map +1 -0
  96. package/internal/builtin-types.mjs +3 -0
  97. package/internal/builtin-types.mjs.map +1 -0
  98. package/internal/decoders/jsonl.d.mts +10 -0
  99. package/internal/decoders/jsonl.d.mts.map +1 -0
  100. package/internal/decoders/jsonl.d.ts +0 -2
  101. package/internal/decoders/jsonl.d.ts.map +1 -1
  102. package/internal/decoders/jsonl.js +7 -3
  103. package/internal/decoders/jsonl.js.map +1 -1
  104. package/internal/decoders/jsonl.mjs +6 -2
  105. package/internal/decoders/jsonl.mjs.map +1 -1
  106. package/internal/decoders/line.d.mts +17 -0
  107. package/internal/decoders/line.d.mts.map +1 -0
  108. package/internal/decoders/line.d.ts +1 -5
  109. package/internal/decoders/line.d.ts.map +1 -1
  110. package/internal/decoders/line.js +24 -61
  111. package/internal/decoders/line.js.map +1 -1
  112. package/internal/decoders/line.mjs +14 -51
  113. package/internal/decoders/line.mjs.map +1 -1
  114. package/internal/detect-platform.d.mts +15 -0
  115. package/internal/detect-platform.d.mts.map +1 -0
  116. package/internal/detect-platform.d.ts +15 -0
  117. package/internal/detect-platform.d.ts.map +1 -0
  118. package/internal/detect-platform.js +162 -0
  119. package/internal/detect-platform.js.map +1 -0
  120. package/internal/detect-platform.mjs +157 -0
  121. package/internal/detect-platform.mjs.map +1 -0
  122. package/internal/errors.d.mts +3 -0
  123. package/internal/errors.d.mts.map +1 -0
  124. package/internal/errors.d.ts +3 -0
  125. package/internal/errors.d.ts.map +1 -0
  126. package/internal/errors.js +41 -0
  127. package/internal/errors.js.map +1 -0
  128. package/internal/errors.mjs +36 -0
  129. package/internal/errors.mjs.map +1 -0
  130. package/internal/headers.d.mts +22 -0
  131. package/internal/headers.d.mts.map +1 -0
  132. package/internal/headers.d.ts +22 -0
  133. package/internal/headers.d.ts.map +1 -0
  134. package/internal/headers.js +79 -0
  135. package/internal/headers.js.map +1 -0
  136. package/internal/headers.mjs +74 -0
  137. package/internal/headers.mjs.map +1 -0
  138. package/internal/parse.d.mts +17 -0
  139. package/internal/parse.d.mts.map +1 -0
  140. package/internal/parse.d.ts +17 -0
  141. package/internal/parse.d.ts.map +1 -0
  142. package/internal/parse.js +55 -0
  143. package/internal/parse.js.map +1 -0
  144. package/internal/parse.mjs +51 -0
  145. package/internal/parse.mjs.map +1 -0
  146. package/internal/request-options.d.mts +34 -0
  147. package/internal/request-options.d.mts.map +1 -0
  148. package/internal/request-options.d.ts +34 -0
  149. package/internal/request-options.d.ts.map +1 -0
  150. package/internal/request-options.js +14 -0
  151. package/internal/request-options.js.map +1 -0
  152. package/internal/request-options.mjs +10 -0
  153. package/internal/request-options.mjs.map +1 -0
  154. package/internal/shim-types.d.mts +28 -0
  155. package/internal/shim-types.d.ts +28 -0
  156. package/internal/shims.d.mts +20 -0
  157. package/internal/shims.d.mts.map +1 -0
  158. package/internal/shims.d.ts +20 -0
  159. package/internal/shims.d.ts.map +1 -0
  160. package/internal/shims.js +92 -0
  161. package/internal/shims.js.map +1 -0
  162. package/internal/shims.mjs +85 -0
  163. package/internal/shims.mjs.map +1 -0
  164. package/internal/stream-utils.d.mts +8 -0
  165. package/internal/stream-utils.d.mts.map +1 -0
  166. package/internal/stream-utils.js +1 -2
  167. package/internal/stream-utils.js.map +1 -1
  168. package/internal/stream-utils.mjs.map +1 -1
  169. package/internal/to-file.d.mts +45 -0
  170. package/internal/to-file.d.mts.map +1 -0
  171. package/internal/to-file.d.ts +45 -0
  172. package/internal/to-file.d.ts.map +1 -0
  173. package/internal/to-file.js +91 -0
  174. package/internal/to-file.js.map +1 -0
  175. package/internal/to-file.mjs +88 -0
  176. package/internal/to-file.mjs.map +1 -0
  177. package/internal/tslib.js +81 -0
  178. package/internal/tslib.mjs +17 -0
  179. package/internal/types.d.mts +67 -0
  180. package/internal/types.d.mts.map +1 -0
  181. package/internal/types.d.ts +67 -0
  182. package/internal/types.d.ts.map +1 -0
  183. package/internal/types.js +4 -0
  184. package/internal/types.js.map +1 -0
  185. package/internal/types.mjs +3 -0
  186. package/internal/types.mjs.map +1 -0
  187. package/internal/uploads.d.mts +42 -0
  188. package/internal/uploads.d.mts.map +1 -0
  189. package/internal/uploads.d.ts +42 -0
  190. package/internal/uploads.d.ts.map +1 -0
  191. package/internal/uploads.js +141 -0
  192. package/internal/uploads.js.map +1 -0
  193. package/internal/uploads.mjs +131 -0
  194. package/internal/uploads.mjs.map +1 -0
  195. package/internal/utils/base64.d.mts +3 -0
  196. package/internal/utils/base64.d.mts.map +1 -0
  197. package/internal/utils/base64.d.ts +3 -0
  198. package/internal/utils/base64.d.ts.map +1 -0
  199. package/internal/utils/base64.js +38 -0
  200. package/internal/utils/base64.js.map +1 -0
  201. package/internal/utils/base64.mjs +33 -0
  202. package/internal/utils/base64.mjs.map +1 -0
  203. package/internal/utils/bytes.d.mts +4 -0
  204. package/internal/utils/bytes.d.mts.map +1 -0
  205. package/internal/utils/bytes.d.ts +4 -0
  206. package/internal/utils/bytes.d.ts.map +1 -0
  207. package/internal/utils/bytes.js +31 -0
  208. package/internal/utils/bytes.js.map +1 -0
  209. package/internal/utils/bytes.mjs +26 -0
  210. package/internal/utils/bytes.mjs.map +1 -0
  211. package/internal/utils/env.d.mts +9 -0
  212. package/internal/utils/env.d.mts.map +1 -0
  213. package/internal/utils/env.d.ts +9 -0
  214. package/internal/utils/env.d.ts.map +1 -0
  215. package/internal/utils/env.js +22 -0
  216. package/internal/utils/env.js.map +1 -0
  217. package/internal/utils/env.mjs +18 -0
  218. package/internal/utils/env.mjs.map +1 -0
  219. package/internal/utils/log.d.mts +37 -0
  220. package/internal/utils/log.d.mts.map +1 -0
  221. package/internal/utils/log.d.ts +37 -0
  222. package/internal/utils/log.d.ts.map +1 -0
  223. package/internal/utils/log.js +86 -0
  224. package/internal/utils/log.js.map +1 -0
  225. package/internal/utils/log.mjs +80 -0
  226. package/internal/utils/log.mjs.map +1 -0
  227. package/internal/utils/path.d.mts +15 -0
  228. package/internal/utils/path.d.mts.map +1 -0
  229. package/internal/utils/path.d.ts +15 -0
  230. package/internal/utils/path.d.ts.map +1 -0
  231. package/internal/utils/path.js +58 -0
  232. package/internal/utils/path.js.map +1 -0
  233. package/internal/utils/path.mjs +53 -0
  234. package/internal/utils/path.mjs.map +1 -0
  235. package/internal/utils/sleep.d.mts +2 -0
  236. package/internal/utils/sleep.d.mts.map +1 -0
  237. package/internal/utils/sleep.d.ts +2 -0
  238. package/internal/utils/sleep.d.ts.map +1 -0
  239. package/internal/utils/sleep.js +7 -0
  240. package/internal/utils/sleep.js.map +1 -0
  241. package/internal/utils/sleep.mjs +3 -0
  242. package/internal/utils/sleep.mjs.map +1 -0
  243. package/internal/utils/uuid.d.mts +5 -0
  244. package/internal/utils/uuid.d.mts.map +1 -0
  245. package/internal/utils/uuid.d.ts +5 -0
  246. package/internal/utils/uuid.d.ts.map +1 -0
  247. package/internal/utils/uuid.js +19 -0
  248. package/internal/utils/uuid.js.map +1 -0
  249. package/internal/utils/uuid.mjs +15 -0
  250. package/internal/utils/uuid.mjs.map +1 -0
  251. package/internal/utils/values.d.mts +16 -0
  252. package/internal/utils/values.d.mts.map +1 -0
  253. package/internal/utils/values.d.ts +16 -0
  254. package/internal/utils/values.d.ts.map +1 -0
  255. package/internal/utils/values.js +109 -0
  256. package/internal/utils/values.js.map +1 -0
  257. package/internal/utils/values.mjs +92 -0
  258. package/internal/utils/values.mjs.map +1 -0
  259. package/internal/utils.d.mts +7 -0
  260. package/internal/utils.d.mts.map +1 -0
  261. package/internal/utils.d.ts +7 -0
  262. package/internal/utils.d.ts.map +1 -0
  263. package/internal/utils.js +11 -0
  264. package/internal/utils.js.map +1 -0
  265. package/internal/utils.mjs +8 -0
  266. package/internal/utils.mjs.map +1 -0
  267. package/lib/BetaMessageStream.d.mts +114 -0
  268. package/lib/BetaMessageStream.d.mts.map +1 -0
  269. package/lib/BetaMessageStream.d.ts +7 -8
  270. package/lib/BetaMessageStream.d.ts.map +1 -1
  271. package/lib/BetaMessageStream.js +58 -67
  272. package/lib/BetaMessageStream.js.map +1 -1
  273. package/lib/BetaMessageStream.mjs +5 -14
  274. package/lib/BetaMessageStream.mjs.map +1 -1
  275. package/lib/MessageStream.d.mts +114 -0
  276. package/lib/MessageStream.d.mts.map +1 -0
  277. package/lib/MessageStream.d.ts +7 -8
  278. package/lib/MessageStream.d.ts.map +1 -1
  279. package/lib/MessageStream.js +58 -67
  280. package/lib/MessageStream.js.map +1 -1
  281. package/lib/MessageStream.mjs +5 -14
  282. package/lib/MessageStream.mjs.map +1 -1
  283. package/package.json +149 -64
  284. package/pagination.d.mts +2 -0
  285. package/pagination.d.mts.map +1 -0
  286. package/pagination.d.ts +1 -26
  287. package/pagination.d.ts.map +1 -1
  288. package/pagination.js +3 -57
  289. package/pagination.js.map +1 -1
  290. package/pagination.mjs +1 -55
  291. package/pagination.mjs.map +1 -1
  292. package/resource.d.mts +2 -0
  293. package/resource.d.mts.map +1 -0
  294. package/resource.d.ts +1 -5
  295. package/resource.d.ts.map +1 -1
  296. package/resource.js +3 -8
  297. package/resource.js.map +1 -1
  298. package/resource.mjs +1 -6
  299. package/resource.mjs.map +1 -1
  300. package/resources/beta/beta.d.mts +57 -0
  301. package/resources/beta/beta.d.mts.map +1 -0
  302. package/resources/beta/beta.d.ts +2 -2
  303. package/resources/beta/beta.d.ts.map +1 -1
  304. package/resources/beta/beta.js +4 -27
  305. package/resources/beta/beta.js.map +1 -1
  306. package/resources/beta/beta.mjs +2 -3
  307. package/resources/beta/beta.mjs.map +1 -1
  308. package/resources/beta/index.d.mts +4 -0
  309. package/resources/beta/index.d.mts.map +1 -0
  310. package/resources/beta/index.d.ts +1 -1
  311. package/resources/beta/index.d.ts.map +1 -1
  312. package/resources/beta/index.js +3 -4
  313. package/resources/beta/index.js.map +1 -1
  314. package/resources/beta/index.mjs +1 -1
  315. package/resources/beta/index.mjs.map +1 -1
  316. package/resources/beta/messages/batches.d.mts +343 -0
  317. package/resources/beta/messages/batches.d.mts.map +1 -0
  318. package/resources/beta/messages/batches.d.ts +12 -17
  319. package/resources/beta/messages/batches.d.ts.map +1 -1
  320. package/resources/beta/messages/batches.js +134 -62
  321. package/resources/beta/messages/batches.js.map +1 -1
  322. package/resources/beta/messages/batches.mjs +133 -60
  323. package/resources/beta/messages/batches.mjs.map +1 -1
  324. package/resources/beta/messages/index.d.mts +3 -0
  325. package/resources/beta/messages/index.d.mts.map +1 -0
  326. package/resources/beta/messages/index.d.ts +1 -1
  327. package/resources/beta/messages/index.d.ts.map +1 -1
  328. package/resources/beta/messages/index.js +1 -2
  329. package/resources/beta/messages/index.js.map +1 -1
  330. package/resources/beta/messages/index.mjs +1 -1
  331. package/resources/beta/messages/index.mjs.map +1 -1
  332. package/resources/beta/messages/messages.d.mts +1324 -0
  333. package/resources/beta/messages/messages.d.mts.map +1 -0
  334. package/resources/beta/messages/messages.d.ts +10 -10
  335. package/resources/beta/messages/messages.d.ts.map +1 -1
  336. package/resources/beta/messages/messages.js +12 -34
  337. package/resources/beta/messages/messages.js.map +1 -1
  338. package/resources/beta/messages/messages.mjs +11 -11
  339. package/resources/beta/messages/messages.mjs.map +1 -1
  340. package/resources/beta/messages.d.mts +2 -0
  341. package/resources/beta/messages.d.mts.map +1 -0
  342. package/resources/beta/messages.d.ts.map +1 -1
  343. package/resources/beta/messages.js +2 -15
  344. package/resources/beta/messages.js.map +1 -1
  345. package/resources/beta/models.d.mts +74 -0
  346. package/resources/beta/models.d.mts.map +1 -0
  347. package/resources/beta/models.d.ts +8 -10
  348. package/resources/beta/models.d.ts.map +1 -1
  349. package/resources/beta/models.js +45 -27
  350. package/resources/beta/models.js.map +1 -1
  351. package/resources/beta/models.mjs +44 -25
  352. package/resources/beta/models.mjs.map +1 -1
  353. package/resources/beta.d.mts +2 -0
  354. package/resources/beta.d.mts.map +1 -0
  355. package/resources/beta.d.ts.map +1 -1
  356. package/resources/beta.js +2 -15
  357. package/resources/beta.js.map +1 -1
  358. package/resources/completions.d.mts +183 -0
  359. package/resources/completions.d.mts.map +1 -0
  360. package/resources/completions.d.ts +7 -7
  361. package/resources/completions.d.ts.map +1 -1
  362. package/resources/completions.js +6 -5
  363. package/resources/completions.js.map +1 -1
  364. package/resources/completions.mjs +6 -5
  365. package/resources/completions.mjs.map +1 -1
  366. package/resources/index.d.mts +6 -0
  367. package/resources/index.d.mts.map +1 -0
  368. package/resources/index.d.ts +2 -2
  369. package/resources/index.d.ts.map +1 -1
  370. package/resources/index.js +3 -17
  371. package/resources/index.js.map +1 -1
  372. package/resources/index.mjs +1 -1
  373. package/resources/index.mjs.map +1 -1
  374. package/resources/messages/batches.d.mts +304 -0
  375. package/resources/messages/batches.d.mts.map +1 -0
  376. package/resources/messages/batches.d.ts +12 -13
  377. package/resources/messages/batches.d.ts.map +1 -1
  378. package/resources/messages/batches.js +31 -24
  379. package/resources/messages/batches.js.map +1 -1
  380. package/resources/messages/batches.mjs +30 -22
  381. package/resources/messages/batches.mjs.map +1 -1
  382. package/resources/messages/index.d.mts +3 -0
  383. package/resources/messages/index.d.mts.map +1 -0
  384. package/resources/messages/index.d.ts +2 -2
  385. package/resources/messages/index.d.ts.map +1 -1
  386. package/resources/messages/index.js +1 -2
  387. package/resources/messages/index.js.map +1 -1
  388. package/resources/messages/index.mjs +1 -1
  389. package/resources/messages/index.mjs.map +1 -1
  390. package/resources/messages/messages.d.mts +1250 -0
  391. package/resources/messages/messages.d.mts.map +1 -0
  392. package/resources/messages/messages.d.ts +11 -28
  393. package/resources/messages/messages.d.ts.map +1 -1
  394. package/resources/messages/messages.js +3 -26
  395. package/resources/messages/messages.js.map +1 -1
  396. package/resources/messages/messages.mjs +2 -3
  397. package/resources/messages/messages.mjs.map +1 -1
  398. package/resources/messages.d.mts +2 -0
  399. package/resources/messages.d.mts.map +1 -0
  400. package/resources/messages.d.ts.map +1 -1
  401. package/resources/messages.js +2 -15
  402. package/resources/messages.js.map +1 -1
  403. package/resources/models.d.mts +59 -0
  404. package/resources/models.d.mts.map +1 -0
  405. package/resources/models.d.ts +8 -10
  406. package/resources/models.d.ts.map +1 -1
  407. package/resources/models.js +30 -27
  408. package/resources/models.js.map +1 -1
  409. package/resources/models.mjs +29 -25
  410. package/resources/models.mjs.map +1 -1
  411. package/resources/shared.d.mts +42 -0
  412. package/resources/shared.d.mts.map +1 -0
  413. package/resources/top-level.d.mts +2 -0
  414. package/resources/top-level.d.mts.map +1 -0
  415. package/resources.d.mts +2 -0
  416. package/resources.d.mts.map +1 -0
  417. package/resources.d.ts.map +1 -1
  418. package/resources.js +2 -15
  419. package/resources.js.map +1 -1
  420. package/src/api-promise.ts +2 -0
  421. package/src/client.ts +1056 -0
  422. package/src/core/README.md +3 -0
  423. package/src/core/api-promise.ts +101 -0
  424. package/src/core/error.ts +133 -0
  425. package/src/core/pagination.ts +201 -0
  426. package/src/core/resource.ts +11 -0
  427. package/src/core/streaming.ts +331 -0
  428. package/src/core/uploads.ts +2 -0
  429. package/src/error.ts +2 -133
  430. package/src/index.ts +6 -492
  431. package/src/internal/README.md +3 -0
  432. package/src/internal/builtin-types.ts +93 -0
  433. package/src/internal/decoders/jsonl.ts +11 -4
  434. package/src/internal/decoders/line.ts +12 -53
  435. package/src/internal/detect-platform.ts +196 -0
  436. package/src/internal/errors.ts +33 -0
  437. package/src/internal/headers.ts +99 -0
  438. package/src/internal/parse.ts +84 -0
  439. package/src/internal/request-options.ts +39 -0
  440. package/src/internal/shim-types.d.ts +28 -0
  441. package/src/internal/shims.ts +107 -0
  442. package/src/internal/to-file.ts +154 -0
  443. package/src/internal/types.ts +92 -0
  444. package/src/internal/uploads.ts +187 -0
  445. package/src/internal/utils/base64.ts +40 -0
  446. package/src/internal/utils/bytes.ts +32 -0
  447. package/src/internal/utils/env.ts +18 -0
  448. package/src/internal/utils/log.ts +127 -0
  449. package/src/internal/utils/path.ts +65 -0
  450. package/src/internal/utils/sleep.ts +3 -0
  451. package/src/internal/utils/uuid.ts +17 -0
  452. package/src/internal/utils/values.ts +102 -0
  453. package/src/internal/utils.ts +8 -0
  454. package/src/lib/BetaMessageStream.ts +11 -10
  455. package/src/lib/MessageStream.ts +11 -10
  456. package/src/pagination.ts +2 -92
  457. package/src/resource.ts +2 -11
  458. package/src/resources/beta/beta.ts +6 -7
  459. package/src/resources/beta/index.ts +9 -9
  460. package/src/resources/beta/messages/batches.ts +68 -115
  461. package/src/resources/beta/messages/index.ts +3 -3
  462. package/src/resources/beta/messages/messages.ts +28 -28
  463. package/src/resources/beta/messages.ts +1 -1
  464. package/src/resources/beta/models.ts +28 -45
  465. package/src/resources/beta.ts +1 -1
  466. package/src/resources/completions.ts +16 -18
  467. package/src/resources/index.ts +9 -14
  468. package/src/resources/messages/batches.ts +28 -39
  469. package/src/resources/messages/index.ts +6 -6
  470. package/src/resources/messages/messages.ts +19 -46
  471. package/src/resources/messages.ts +1 -1
  472. package/src/resources/models.ts +28 -42
  473. package/src/resources.ts +1 -1
  474. package/src/streaming.ts +2 -326
  475. package/src/tsconfig.json +2 -2
  476. package/src/uploads.ts +2 -255
  477. package/src/version.ts +1 -1
  478. package/streaming.d.mts +2 -0
  479. package/streaming.d.mts.map +1 -0
  480. package/streaming.d.ts +1 -31
  481. package/streaming.d.ts.map +1 -1
  482. package/streaming.js +3 -274
  483. package/streaming.js.map +1 -1
  484. package/streaming.mjs +1 -271
  485. package/streaming.mjs.map +1 -1
  486. package/uploads.d.mts +2 -0
  487. package/uploads.d.mts.map +1 -0
  488. package/uploads.d.ts +1 -74
  489. package/uploads.d.ts.map +1 -1
  490. package/uploads.js +3 -168
  491. package/uploads.js.map +1 -1
  492. package/uploads.mjs +1 -157
  493. package/uploads.mjs.map +1 -1
  494. package/version.d.mts +2 -0
  495. package/version.d.mts.map +1 -0
  496. package/version.d.ts +1 -1
  497. package/version.js +1 -1
  498. package/version.mjs +1 -1
  499. package/_shims/MultipartBody.d.ts +0 -9
  500. package/_shims/MultipartBody.d.ts.map +0 -1
  501. package/_shims/MultipartBody.js +0 -16
  502. package/_shims/MultipartBody.js.map +0 -1
  503. package/_shims/MultipartBody.mjs +0 -12
  504. package/_shims/MultipartBody.mjs.map +0 -1
  505. package/_shims/README.md +0 -46
  506. package/_shims/auto/runtime-bun.d.ts +0 -5
  507. package/_shims/auto/runtime-bun.d.ts.map +0 -1
  508. package/_shims/auto/runtime-bun.js +0 -21
  509. package/_shims/auto/runtime-bun.js.map +0 -1
  510. package/_shims/auto/runtime-bun.mjs +0 -2
  511. package/_shims/auto/runtime-bun.mjs.map +0 -1
  512. package/_shims/auto/runtime-node.d.ts +0 -5
  513. package/_shims/auto/runtime-node.d.ts.map +0 -1
  514. package/_shims/auto/runtime-node.js +0 -21
  515. package/_shims/auto/runtime-node.js.map +0 -1
  516. package/_shims/auto/runtime-node.mjs +0 -2
  517. package/_shims/auto/runtime-node.mjs.map +0 -1
  518. package/_shims/auto/runtime.d.ts +0 -5
  519. package/_shims/auto/runtime.d.ts.map +0 -1
  520. package/_shims/auto/runtime.js +0 -21
  521. package/_shims/auto/runtime.js.map +0 -1
  522. package/_shims/auto/runtime.mjs +0 -2
  523. package/_shims/auto/runtime.mjs.map +0 -1
  524. package/_shims/auto/types-node.d.ts +0 -5
  525. package/_shims/auto/types-node.d.ts.map +0 -1
  526. package/_shims/auto/types-node.js +0 -21
  527. package/_shims/auto/types-node.js.map +0 -1
  528. package/_shims/auto/types-node.mjs +0 -2
  529. package/_shims/auto/types-node.mjs.map +0 -1
  530. package/_shims/auto/types.d.ts +0 -101
  531. package/_shims/auto/types.js +0 -3
  532. package/_shims/auto/types.mjs +0 -3
  533. package/_shims/bun-runtime.d.ts +0 -6
  534. package/_shims/bun-runtime.d.ts.map +0 -1
  535. package/_shims/bun-runtime.js +0 -14
  536. package/_shims/bun-runtime.js.map +0 -1
  537. package/_shims/bun-runtime.mjs +0 -10
  538. package/_shims/bun-runtime.mjs.map +0 -1
  539. package/_shims/index.d.ts +0 -83
  540. package/_shims/index.js +0 -17
  541. package/_shims/index.mjs +0 -11
  542. package/_shims/manual-types.d.ts +0 -12
  543. package/_shims/manual-types.js +0 -3
  544. package/_shims/manual-types.mjs +0 -3
  545. package/_shims/node-runtime.d.ts +0 -3
  546. package/_shims/node-runtime.d.ts.map +0 -1
  547. package/_shims/node-runtime.js +0 -89
  548. package/_shims/node-runtime.js.map +0 -1
  549. package/_shims/node-runtime.mjs +0 -56
  550. package/_shims/node-runtime.mjs.map +0 -1
  551. package/_shims/node-types.d.ts +0 -42
  552. package/_shims/node-types.js +0 -3
  553. package/_shims/node-types.mjs +0 -3
  554. package/_shims/registry.d.ts +0 -37
  555. package/_shims/registry.d.ts.map +0 -1
  556. package/_shims/registry.js +0 -41
  557. package/_shims/registry.js.map +0 -1
  558. package/_shims/registry.mjs +0 -37
  559. package/_shims/registry.mjs.map +0 -1
  560. package/_shims/web-runtime.d.ts +0 -5
  561. package/_shims/web-runtime.d.ts.map +0 -1
  562. package/_shims/web-runtime.js +0 -78
  563. package/_shims/web-runtime.js.map +0 -1
  564. package/_shims/web-runtime.mjs +0 -71
  565. package/_shims/web-runtime.mjs.map +0 -1
  566. package/_shims/web-types.d.ts +0 -83
  567. package/_shims/web-types.js +0 -3
  568. package/_shims/web-types.mjs +0 -3
  569. package/core.d.ts +0 -260
  570. package/core.d.ts.map +0 -1
  571. package/core.js +0 -959
  572. package/core.js.map +0 -1
  573. package/core.mjs +0 -927
  574. package/core.mjs.map +0 -1
  575. package/shims/node.d.ts +0 -30
  576. package/shims/node.d.ts.map +0 -1
  577. package/shims/node.js +0 -31
  578. package/shims/node.js.map +0 -1
  579. package/shims/node.mjs +0 -5
  580. package/shims/node.mjs.map +0 -1
  581. package/shims/web.d.ts +0 -26
  582. package/shims/web.d.ts.map +0 -1
  583. package/shims/web.js +0 -31
  584. package/shims/web.js.map +0 -1
  585. package/shims/web.mjs +0 -5
  586. package/shims/web.mjs.map +0 -1
  587. package/src/_shims/MultipartBody.ts +0 -9
  588. package/src/_shims/README.md +0 -46
  589. package/src/_shims/auto/runtime-bun.ts +0 -4
  590. package/src/_shims/auto/runtime-node.ts +0 -4
  591. package/src/_shims/auto/runtime.ts +0 -4
  592. package/src/_shims/auto/types-node.ts +0 -4
  593. package/src/_shims/auto/types.d.ts +0 -101
  594. package/src/_shims/auto/types.js +0 -3
  595. package/src/_shims/auto/types.mjs +0 -3
  596. package/src/_shims/bun-runtime.ts +0 -14
  597. package/src/_shims/index.d.ts +0 -83
  598. package/src/_shims/index.js +0 -17
  599. package/src/_shims/index.mjs +0 -11
  600. package/src/_shims/manual-types.d.ts +0 -12
  601. package/src/_shims/manual-types.js +0 -3
  602. package/src/_shims/manual-types.mjs +0 -3
  603. package/src/_shims/node-runtime.ts +0 -81
  604. package/src/_shims/node-types.d.ts +0 -42
  605. package/src/_shims/node-types.js +0 -3
  606. package/src/_shims/node-types.mjs +0 -3
  607. package/src/_shims/registry.ts +0 -67
  608. package/src/_shims/web-runtime.ts +0 -103
  609. package/src/_shims/web-types.d.ts +0 -83
  610. package/src/_shims/web-types.js +0 -3
  611. package/src/_shims/web-types.mjs +0 -3
  612. package/src/core.ts +0 -1294
  613. package/src/shims/node.ts +0 -50
  614. package/src/shims/web.ts +0 -50
@@ -1,37 +1,56 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../../resource.mjs";
3
- import { isRequestOptions } from "../../core.mjs";
4
- import { Page } from "../../pagination.mjs";
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import { Page } from "../../core/pagination.mjs";
4
+ import { buildHeaders } from "../../internal/headers.mjs";
5
+ import { path } from "../../internal/utils/path.mjs";
5
6
  export class Models extends APIResource {
6
- retrieve(modelId, params = {}, options) {
7
- if (isRequestOptions(params)) {
8
- return this.retrieve(modelId, {}, params);
9
- }
10
- const { betas } = params;
11
- return this._client.get(`/v1/models/${modelId}?beta=true`, {
7
+ /**
8
+ * Get a specific model.
9
+ *
10
+ * The Models API response can be used to determine information about a specific
11
+ * model or resolve a model alias to a model ID.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const betaModelInfo = await client.beta.models.retrieve(
16
+ * 'model_id',
17
+ * );
18
+ * ```
19
+ */
20
+ retrieve(modelID, params = {}, options) {
21
+ const { betas } = params ?? {};
22
+ return this._client.get(path `/v1/models/${modelID}?beta=true`, {
12
23
  ...options,
13
- headers: {
14
- ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
15
- ...options?.headers,
16
- },
24
+ headers: buildHeaders([
25
+ { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
26
+ options?.headers,
27
+ ]),
17
28
  });
18
29
  }
30
+ /**
31
+ * List available models.
32
+ *
33
+ * The Models API response can be used to determine which models are available for
34
+ * use in the API. More recently released models are listed first.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * // Automatically fetches more pages as needed.
39
+ * for await (const betaModelInfo of client.beta.models.list()) {
40
+ * // ...
41
+ * }
42
+ * ```
43
+ */
19
44
  list(params = {}, options) {
20
- if (isRequestOptions(params)) {
21
- return this.list({}, params);
22
- }
23
- const { betas, ...query } = params;
24
- return this._client.getAPIList('/v1/models?beta=true', BetaModelInfosPage, {
45
+ const { betas, ...query } = params ?? {};
46
+ return this._client.getAPIList('/v1/models?beta=true', (Page), {
25
47
  query,
26
48
  ...options,
27
- headers: {
28
- ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
29
- ...options?.headers,
30
- },
49
+ headers: buildHeaders([
50
+ { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
51
+ options?.headers,
52
+ ]),
31
53
  });
32
54
  }
33
55
  }
34
- export class BetaModelInfosPage extends Page {
35
- }
36
- Models.BetaModelInfosPage = BetaModelInfosPage;
37
56
  //# sourceMappingURL=models.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"models.mjs","sourceRoot":"","sources":["../../src/resources/beta/models.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAGpB,EAAE,IAAI,EAAmB;AAEhC,MAAM,OAAO,MAAO,SAAQ,WAAW;IAoBrC,QAAQ,CACN,OAAe,EACf,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C;CACF"}
@@ -0,0 +1,2 @@
1
+ export * from "./beta/index.mjs";
2
+ //# sourceMappingURL=beta.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"beta.d.mts","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"beta.d.ts","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"beta.d.ts","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":""}
package/resources/beta.js CHANGED
@@ -1,19 +1,6 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
- };
17
3
  Object.defineProperty(exports, "__esModule", { value: true });
18
- __exportStar(require("./beta/index.js"), exports);
4
+ const tslib_1 = require("../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./beta/index.js"), exports);
19
6
  //# sourceMappingURL=beta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"beta.js","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;AAEtF,kDAA6B"}
1
+ {"version":3,"file":"beta.js","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAA6B"}
@@ -0,0 +1,183 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import * as CompletionsAPI from "./completions.mjs";
3
+ import * as BetaAPI from "./beta/beta.mjs";
4
+ import * as MessagesAPI from "./messages/messages.mjs";
5
+ import { APIPromise } from "../core/api-promise.mjs";
6
+ import { Stream } from "../core/streaming.mjs";
7
+ import { RequestOptions } from "../internal/request-options.mjs";
8
+ export declare class Completions extends APIResource {
9
+ /**
10
+ * [Legacy] Create a Text Completion.
11
+ *
12
+ * The Text Completions API is a legacy API. We recommend using the
13
+ * [Messages API](https://docs.anthropic.com/en/api/messages) going forward.
14
+ *
15
+ * Future models and features will not be compatible with Text Completions. See our
16
+ * [migration guide](https://docs.anthropic.com/en/api/migrating-from-text-completions-to-messages)
17
+ * for guidance in migrating from Text Completions to Messages.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * const completion = await client.completions.create({
22
+ * max_tokens_to_sample: 256,
23
+ * model: 'claude-3-7-sonnet-latest',
24
+ * prompt: '\n\nHuman: Hello, world!\n\nAssistant:',
25
+ * });
26
+ * ```
27
+ */
28
+ create(params: CompletionCreateParamsNonStreaming, options?: RequestOptions): APIPromise<Completion>;
29
+ create(params: CompletionCreateParamsStreaming, options?: RequestOptions): APIPromise<Stream<Completion>>;
30
+ create(params: CompletionCreateParamsBase, options?: RequestOptions): APIPromise<Stream<Completion> | Completion>;
31
+ }
32
+ export interface Completion {
33
+ /**
34
+ * Unique object identifier.
35
+ *
36
+ * The format and length of IDs may change over time.
37
+ */
38
+ id: string;
39
+ /**
40
+ * The resulting completion up to and excluding the stop sequences.
41
+ */
42
+ completion: string;
43
+ /**
44
+ * The model that will complete your prompt.\n\nSee
45
+ * [models](https://docs.anthropic.com/en/docs/models-overview) for additional
46
+ * details and options.
47
+ */
48
+ model: MessagesAPI.Model;
49
+ /**
50
+ * The reason that we stopped.
51
+ *
52
+ * This may be one the following values:
53
+ *
54
+ * - `"stop_sequence"`: we reached a stop sequence — either provided by you via the
55
+ * `stop_sequences` parameter, or a stop sequence built into the model
56
+ * - `"max_tokens"`: we exceeded `max_tokens_to_sample` or the model's maximum
57
+ */
58
+ stop_reason: string | null;
59
+ /**
60
+ * Object type.
61
+ *
62
+ * For Text Completions, this is always `"completion"`.
63
+ */
64
+ type: 'completion';
65
+ }
66
+ export type CompletionCreateParams = CompletionCreateParamsNonStreaming | CompletionCreateParamsStreaming;
67
+ export interface CompletionCreateParamsBase {
68
+ /**
69
+ * Body param: The maximum number of tokens to generate before stopping.
70
+ *
71
+ * Note that our models may stop _before_ reaching this maximum. This parameter
72
+ * only specifies the absolute maximum number of tokens to generate.
73
+ */
74
+ max_tokens_to_sample: number;
75
+ /**
76
+ * Body param: The model that will complete your prompt.\n\nSee
77
+ * [models](https://docs.anthropic.com/en/docs/models-overview) for additional
78
+ * details and options.
79
+ */
80
+ model: MessagesAPI.Model;
81
+ /**
82
+ * Body param: The prompt that you want Claude to complete.
83
+ *
84
+ * For proper response generation you will need to format your prompt using
85
+ * alternating `\n\nHuman:` and `\n\nAssistant:` conversational turns. For example:
86
+ *
87
+ * ```
88
+ * "\n\nHuman: {userQuestion}\n\nAssistant:"
89
+ * ```
90
+ *
91
+ * See [prompt validation](https://docs.anthropic.com/en/api/prompt-validation) and
92
+ * our guide to
93
+ * [prompt design](https://docs.anthropic.com/en/docs/intro-to-prompting) for more
94
+ * details.
95
+ */
96
+ prompt: string;
97
+ /**
98
+ * Body param: An object describing metadata about the request.
99
+ */
100
+ metadata?: MessagesAPI.Metadata;
101
+ /**
102
+ * Body param: Sequences that will cause the model to stop generating.
103
+ *
104
+ * Our models stop on `"\n\nHuman:"`, and may include additional built-in stop
105
+ * sequences in the future. By providing the stop_sequences parameter, you may
106
+ * include additional strings that will cause the model to stop generating.
107
+ */
108
+ stop_sequences?: Array<string>;
109
+ /**
110
+ * Body param: Whether to incrementally stream the response using server-sent
111
+ * events.
112
+ *
113
+ * See [streaming](https://docs.anthropic.com/en/api/streaming) for details.
114
+ */
115
+ stream?: boolean;
116
+ /**
117
+ * Body param: Amount of randomness injected into the response.
118
+ *
119
+ * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0`
120
+ * for analytical / multiple choice, and closer to `1.0` for creative and
121
+ * generative tasks.
122
+ *
123
+ * Note that even with `temperature` of `0.0`, the results will not be fully
124
+ * deterministic.
125
+ */
126
+ temperature?: number;
127
+ /**
128
+ * Body param: Only sample from the top K options for each subsequent token.
129
+ *
130
+ * Used to remove "long tail" low probability responses.
131
+ * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
132
+ *
133
+ * Recommended for advanced use cases only. You usually only need to use
134
+ * `temperature`.
135
+ */
136
+ top_k?: number;
137
+ /**
138
+ * Body param: Use nucleus sampling.
139
+ *
140
+ * In nucleus sampling, we compute the cumulative distribution over all the options
141
+ * for each subsequent token in decreasing probability order and cut it off once it
142
+ * reaches a particular probability specified by `top_p`. You should either alter
143
+ * `temperature` or `top_p`, but not both.
144
+ *
145
+ * Recommended for advanced use cases only. You usually only need to use
146
+ * `temperature`.
147
+ */
148
+ top_p?: number;
149
+ /**
150
+ * Header param: Optional header to specify the beta version(s) you want to use.
151
+ */
152
+ betas?: Array<BetaAPI.AnthropicBeta>;
153
+ }
154
+ export declare namespace CompletionCreateParams {
155
+ /**
156
+ * @deprecated use `Anthropic.Messages.Metadata` instead
157
+ */
158
+ type Metadata = MessagesAPI.Metadata;
159
+ type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming;
160
+ type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming;
161
+ }
162
+ export interface CompletionCreateParamsNonStreaming extends CompletionCreateParamsBase {
163
+ /**
164
+ * Body param: Whether to incrementally stream the response using server-sent
165
+ * events.
166
+ *
167
+ * See [streaming](https://docs.anthropic.com/en/api/streaming) for details.
168
+ */
169
+ stream?: false;
170
+ }
171
+ export interface CompletionCreateParamsStreaming extends CompletionCreateParamsBase {
172
+ /**
173
+ * Body param: Whether to incrementally stream the response using server-sent
174
+ * events.
175
+ *
176
+ * See [streaming](https://docs.anthropic.com/en/api/streaming) for details.
177
+ */
178
+ stream: true;
179
+ }
180
+ export declare namespace Completions {
181
+ export { type Completion as Completion, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, };
182
+ }
183
+ //# sourceMappingURL=completions.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completions.d.mts","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;AAEzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,MAAM,EAAE,kCAAkC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IACpG,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACzG,MAAM,CACJ,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;CAiB/C;AAED,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC;IAEzB;;;;;;;;OAQG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;;;OAIG;IACH,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sB,EACrD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
@@ -1,10 +1,10 @@
1
- import { APIResource } from "../resource.js";
2
- import { APIPromise } from "../core.js";
3
- import * as Core from "../core.js";
1
+ import { APIResource } from "../core/resource.js";
4
2
  import * as CompletionsAPI from "./completions.js";
5
3
  import * as BetaAPI from "./beta/beta.js";
6
4
  import * as MessagesAPI from "./messages/messages.js";
7
- import { Stream } from "../streaming.js";
5
+ import { APIPromise } from "../core/api-promise.js";
6
+ import { Stream } from "../core/streaming.js";
7
+ import { RequestOptions } from "../internal/request-options.js";
8
8
  export declare class Completions extends APIResource {
9
9
  /**
10
10
  * [Legacy] Create a Text Completion.
@@ -25,9 +25,9 @@ export declare class Completions extends APIResource {
25
25
  * });
26
26
  * ```
27
27
  */
28
- create(params: CompletionCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<Completion>;
29
- create(params: CompletionCreateParamsStreaming, options?: Core.RequestOptions): APIPromise<Stream<Completion>>;
30
- create(params: CompletionCreateParamsBase, options?: Core.RequestOptions): APIPromise<Stream<Completion> | Completion>;
28
+ create(params: CompletionCreateParamsNonStreaming, options?: RequestOptions): APIPromise<Completion>;
29
+ create(params: CompletionCreateParamsStreaming, options?: RequestOptions): APIPromise<Stream<Completion>>;
30
+ create(params: CompletionCreateParamsBase, options?: RequestOptions): APIPromise<Stream<Completion> | Completion>;
31
31
  }
32
32
  export interface Completion {
33
33
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,cAAc,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,a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C,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,yBAAiB,sBAAsB,CAAC;IACtC;;OAEG;IACH,KAAY,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;IAE5C,KAAY,kCAAkC,GAAG,cAAc,CAAC,kCAAkC,CAAC;IACnG,KAAY,+BAA+B,GAAG,cAAc,CAAC,+BAA+B,CAAC;CAC9F;AAED,MAAM,WAAW,kCAAmC,SAAQ,0BAA0B;IACpF;;;;;OAKG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,WAAW,+BAAgC,SAAQ,0BAA0B;IACjF;;;;;OAKG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
@@ -2,7 +2,8 @@
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Completions = void 0;
5
- const resource_1 = require("../resource.js");
5
+ const resource_1 = require("../core/resource.js");
6
+ const headers_1 = require("../internal/headers.js");
6
7
  class Completions extends resource_1.APIResource {
7
8
  create(params, options) {
8
9
  const { betas, ...body } = params;
@@ -10,10 +11,10 @@ class Completions extends resource_1.APIResource {
10
11
  body,
11
12
  timeout: this._client._options.timeout ?? 600000,
12
13
  ...options,
13
- headers: {
14
- ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
15
- ...options?.headers,
16
- },
14
+ headers: (0, headers_1.buildHeaders)([
15
+ { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
16
+ options?.headers,
17
+ ]),
17
18
  stream: params.stream ?? false,
18
19
  });
19
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"completions.js","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAQ1C,MAAa,WAAY,SAAQ,sBAAW;IA6B1C,MAAM,CACJ,MAA8B,EAC9B,OAA6B;QAE7B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,OAAO,EAAG,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;YACzD,GAAG,OAAO;YACV,OAAO,EAAE;gBACP,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;gBACpF,GAAG,OAAO,EAAE,OAAO;aACpB;YACD,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,KAAK;SAC/B,CAA4D,CAAC;IAChE,CAAC;CACF;AA7CD,kCA6CC"}
1
+ {"version":3,"file":"completions.js","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAM/C,oDAAmD;AAGnD,MAAa,WAAY,SAAQ,sBAAW;IA0B1C,MAAM,CACJ,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,OAAO,EAAG,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,KAAK;SAC/B,CAA4D,CAAC;IAChE,CAAC;CACF;AA1CD,kCA0CC"}
@@ -1,5 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../resource.mjs";
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { buildHeaders } from "../internal/headers.mjs";
3
4
  export class Completions extends APIResource {
4
5
  create(params, options) {
5
6
  const { betas, ...body } = params;
@@ -7,10 +8,10 @@ export class Completions extends APIResource {
7
8
  body,
8
9
  timeout: this._client._options.timeout ?? 600000,
9
10
  ...options,
10
- headers: {
11
- ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
12
- ...options?.headers,
13
- },
11
+ headers: buildHeaders([
12
+ { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
13
+ options?.headers,
14
+ ]),
14
15
  stream: params.stream ?? false,
15
16
  });
16
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAQtB,MAAM,OAAO,WAAY,SAAQ,WAAW;IA6B1C,MAAM,CACJ,MAA8B,EAC9B,OAA6B;QAE7B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,OAAO,EAAG,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;YACzD,GAAG,OAAO;YACV,OAAO,EAAE;gBACP,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;gBACpF,GAAG,OAAO,EAAE,OAAO;aACpB;YACD,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,KAAK;SAC/B,CAA4D,CAAC;IAChE,CAAC;CACF"}
1
+ {"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAMf,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,WAAY,SAAQ,WAAW;IA0B1C,MAAM,CACJ,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,OAAO,EAAG,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,KAAK;SAC/B,CAA4D,CAAC;IAChE,CAAC;CACF"}
@@ -0,0 +1,6 @@
1
+ export * from "./shared.mjs";
2
+ export { Beta, type AnthropicBeta, type BetaAPIError, type BetaAuthenticationError, type BetaBillingError, type BetaError, type BetaErrorResponse, type BetaGatewayTimeoutError, type BetaInvalidRequestError, type BetaNotFoundError, type BetaOverloadedError, type BetaPermissionError, type BetaRateLimitError, } from "./beta/beta.mjs";
3
+ export { Completions, type Completion, type CompletionCreateParams, type CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming, } from "./completions.mjs";
4
+ export { Messages, type Base64ImageSource, type Base64PDFSource, type CacheControlEphemeral, type CitationCharLocation, type CitationCharLocationParam, type CitationContentBlockLocation, type CitationContentBlockLocationParam, type CitationPageLocation, type CitationPageLocationParam, type CitationWebSearchResultLocationParam, type CitationsConfigParam, type CitationsDelta, type CitationsWebSearchResultLocation, type ContentBlock, type ContentBlockParam, type ContentBlockStartEvent, type ContentBlockStopEvent, type ContentBlockSource, type ContentBlockSourceContent, type DocumentBlockParam, type ImageBlockParam, type InputJSONDelta, type Message, type MessageCountTokensTool, type MessageDeltaEvent, type MessageDeltaUsage, type MessageParam, type MessageStreamParams, type MessageTokensCount, type Metadata, type Model, type PlainTextSource, type RawContentBlockDelta, type RawContentBlockDeltaEvent, type RawContentBlockStartEvent, type RawContentBlockStopEvent, type RawMessageDeltaEvent, type RawMessageStartEvent, type RawMessageStopEvent, type RawMessageStreamEvent, type RedactedThinkingBlock, type RedactedThinkingBlockParam, type ServerToolUsage, type ServerToolUseBlock, type ServerToolUseBlockParam, type SignatureDelta, type StopReason, type TextBlock, type TextBlockParam, type TextCitation, type TextCitationParam, type TextDelta, type ThinkingBlock, type ThinkingBlockParam, type ThinkingConfigDisabled, type ThinkingConfigEnabled, type ThinkingConfigParam, type ThinkingDelta, type Tool, type ToolBash20250124, type ToolChoice, type ToolChoiceAny, type ToolChoiceAuto, type ToolChoiceNone, type ToolChoiceTool, type ToolResultBlockParam, type ToolTextEditor20250124, type ToolUnion, type ToolUseBlock, type ToolUseBlockParam, type URLImageSource, type URLPDFSource, type Usage, type WebSearchResultBlock, type WebSearchResultBlockParam, type WebSearchTool20250305, type WebSearchToolRequestError, type WebSearchToolResultBlock, type WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent, type WebSearchToolResultError, type MessageCreateParams, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages/messages.mjs";
5
+ export { Models, type ModelInfo, type ModelRetrieveParams, type ModelListParams, type ModelInfosPage, } from "./models.mjs";
6
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB;OACM,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,kCAAkC,EACvC,KAAK,+BAA+B,GACrC;OACM,EACL,QAAQ,EACR,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EACzC,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,gCAAgC,EACrC,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,k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 -1,6 +1,6 @@
1
1
  export * from "./shared.js";
2
2
  export { Beta, type AnthropicBeta, type BetaAPIError, type BetaAuthenticationError, type BetaBillingError, type BetaError, type BetaErrorResponse, type BetaGatewayTimeoutError, type BetaInvalidRequestError, type BetaNotFoundError, type BetaOverloadedError, type BetaPermissionError, type BetaRateLimitError, } from "./beta/beta.js";
3
3
  export { Completions, type Completion, type CompletionCreateParams, type CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming, } from "./completions.js";
4
- export { Messages, type Base64ImageSource, type Base64PDFSource, type CacheControlEphemeral, type CitationCharLocation, type CitationCharLocationParam, type CitationContentBlockLocation, type CitationContentBlockLocationParam, type CitationPageLocation, type CitationPageLocationParam, type CitationWebSearchResultLocationParam, type CitationsConfigParam, type CitationsDelta, type CitationsWebSearchResultLocation, type ContentBlock, type ContentBlockParam, type ContentBlockSource, type ContentBlockSourceContent, type DocumentBlockParam, type ImageBlockParam, type InputJsonDelta, type InputJSONDelta, type Message, type MessageCountTokensTool, type MessageDeltaUsage, type MessageParam, type MessageStreamParams, type MessageTokensCount, type Metadata, type Model, type PlainTextSource, type RawContentBlockDelta, type RawContentBlockDeltaEvent, type RawContentBlockStartEvent, type RawContentBlockStopEvent, type RawMessageDeltaEvent, type RawMessageStartEvent, type RawMessageStopEvent, type RawMessageStreamEvent, type RedactedThinkingBlock, type RedactedThinkingBlockParam, type ServerToolUsage, type ServerToolUseBlock, type ServerToolUseBlockParam, type SignatureDelta, type StopReason, type TextBlock, type TextBlockParam, type TextCitation, type TextCitationParam, type TextDelta, type ThinkingBlock, type ThinkingBlockParam, type ThinkingConfigDisabled, type ThinkingConfigEnabled, type ThinkingConfigParam, type ThinkingDelta, type Tool, type ToolBash20250124, type ToolChoice, type ToolChoiceAny, type ToolChoiceAuto, type ToolChoiceNone, type ToolChoiceTool, type ToolResultBlockParam, type ToolTextEditor20250124, type ToolUnion, type ToolUseBlock, type ToolUseBlockParam, type URLImageSource, type URLPDFSource, type Usage, type WebSearchResultBlock, type WebSearchResultBlockParam, type WebSearchTool20250305, type WebSearchToolRequestError, type WebSearchToolResultBlock, type WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent, type WebSearchToolResultError, type MessageStreamEvent, type MessageStartEvent, type MessageDeltaEvent, type MessageStopEvent, type ContentBlockStartEvent, type ContentBlockDeltaEvent, type ContentBlockStopEvent, type MessageCreateParams, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages/messages.js";
5
- export { ModelInfosPage, Models, type ModelInfo, type ModelRetrieveParams, type ModelListParams, } from "./models.js";
4
+ export { Messages, type Base64ImageSource, type Base64PDFSource, type CacheControlEphemeral, type CitationCharLocation, type CitationCharLocationParam, type CitationContentBlockLocation, type CitationContentBlockLocationParam, type CitationPageLocation, type CitationPageLocationParam, type CitationWebSearchResultLocationParam, type CitationsConfigParam, type CitationsDelta, type CitationsWebSearchResultLocation, type ContentBlock, type ContentBlockParam, type ContentBlockStartEvent, type ContentBlockStopEvent, type ContentBlockSource, type ContentBlockSourceContent, type DocumentBlockParam, type ImageBlockParam, type InputJSONDelta, type Message, type MessageCountTokensTool, type MessageDeltaEvent, type MessageDeltaUsage, type MessageParam, type MessageStreamParams, type MessageTokensCount, type Metadata, type Model, type PlainTextSource, type RawContentBlockDelta, type RawContentBlockDeltaEvent, type RawContentBlockStartEvent, type RawContentBlockStopEvent, type RawMessageDeltaEvent, type RawMessageStartEvent, type RawMessageStopEvent, type RawMessageStreamEvent, type RedactedThinkingBlock, type RedactedThinkingBlockParam, type ServerToolUsage, type ServerToolUseBlock, type ServerToolUseBlockParam, type SignatureDelta, type StopReason, type TextBlock, type TextBlockParam, type TextCitation, type TextCitationParam, type TextDelta, type ThinkingBlock, type ThinkingBlockParam, type ThinkingConfigDisabled, type ThinkingConfigEnabled, type ThinkingConfigParam, type ThinkingDelta, type Tool, type ToolBash20250124, type ToolChoice, type ToolChoiceAny, type ToolChoiceAuto, type ToolChoiceNone, type ToolChoiceTool, type ToolResultBlockParam, type ToolTextEditor20250124, type ToolUnion, type ToolUseBlock, type ToolUseBlockParam, type URLImageSource, type URLPDFSource, type Usage, type WebSearchResultBlock, type WebSearchResultBlockParam, type WebSearchTool20250305, type WebSearchToolRequestError, type WebSearchToolResultBlock, type WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent, type WebSearchToolResultError, type MessageCreateParams, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages/messages.js";
5
+ export { Models, type ModelInfo, type ModelRetrieveParams, type ModelListParams, type ModelInfosPage, } from "./models.js";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,kCAAkC,EACvC,KAAK,+BAA+B,GACrC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,QAAQ,EACR,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EACzC,KAAK,oBAAoB,EACzB,KAAK,cAAc,EAC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AAK,wBAAwB,EAC7B,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EACzC,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,cAAc,EACd,MAAM,EACN,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,GACrB,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB;OACM,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,kCAAkC,EACvC,KAAK,+BAA+B,GACrC;OACM,EACL,QAAQ,EACR,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EACzC,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,gCAAgC,EACrC,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,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AK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EACzC,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B;OACM,EACL,MAAM,EACN,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB"}
@@ -1,22 +1,9 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
- };
17
3
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.Models = exports.ModelInfosPage = exports.Messages = exports.Completions = exports.Beta = void 0;
19
- __exportStar(require("./shared.js"), exports);
4
+ exports.Models = exports.Messages = exports.Completions = exports.Beta = void 0;
5
+ const tslib_1 = require("../internal/tslib.js");
6
+ tslib_1.__exportStar(require("./shared.js"), exports);
20
7
  var beta_1 = require("./beta/beta.js");
21
8
  Object.defineProperty(exports, "Beta", { enumerable: true, get: function () { return beta_1.Beta; } });
22
9
  var completions_1 = require("./completions.js");
@@ -24,6 +11,5 @@ Object.defineProperty(exports, "Completions", { enumerable: true, get: function
24
11
  var messages_1 = require("./messages/messages.js");
25
12
  Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return messages_1.Messages; } });
26
13
  var models_1 = require("./models.js");
27
- Object.defineProperty(exports, "ModelInfosPage", { enumerable: true, get: function () { return models_1.ModelInfosPage; } });
28
14
  Object.defineProperty(exports, "Models", { enumerable: true, get: function () { return models_1.Models; } });
29
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;AAEtF,8CAAyB;AACzB,uCAcqB;AAbnB,4FAAA,IAAI,OAAA;AAcN,gDAMuB;AALrB,0GAAA,WAAW,OAAA;AAMb,mDA6F6B;AA5F3B,oGAAA,QAAQ,OAAA;AA6FV,sCAMkB;AALhB,wGAAA,cAAc,OAAA;AACd,gGAAA,MAAM,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,uCAcqB;AAbnB,4FAAA,IAAI,OAAA;AAcN,gDAMuB;AALrB,0GAAA,WAAW,OAAA;AAMb,mDAwF6B;AAvF3B,oGAAA,QAAQ,OAAA;AAwFV,sCAMkB;AALhB,gGAAA,MAAM,OAAA"}
@@ -3,5 +3,5 @@ export * from "./shared.mjs";
3
3
  export { Beta, } from "./beta/beta.mjs";
4
4
  export { Completions, } from "./completions.mjs";
5
5
  export { Messages, } from "./messages/messages.mjs";
6
- export { ModelInfosPage, Models, } from "./models.mjs";
6
+ export { Models, } from "./models.mjs";
7
7
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,IAAI,GAaL;OACM,EACL,WAAW,GAKZ;OACM,EACL,QAAQ,GA4FT;OACM,EACL,cAAc,EACd,MAAM,GAIP"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,IAAI,GAaL;OACM,EACL,WAAW,GAKZ;OACM,EACL,QAAQ,GAuFT;OACM,EACL,MAAM,GAKP"}