@ainative/cody-sdk 0.1.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 (770) hide show
  1. package/.github/logo.svg +3 -0
  2. package/CHANGELOG.md +2345 -0
  3. package/LICENSE +8 -0
  4. package/README.md +45 -0
  5. package/_vendor/partial-json-parser/parser.d.mts +3 -0
  6. package/_vendor/partial-json-parser/parser.d.mts.map +1 -0
  7. package/_vendor/partial-json-parser/parser.d.ts +3 -0
  8. package/_vendor/partial-json-parser/parser.d.ts.map +1 -0
  9. package/_vendor/partial-json-parser/parser.js +226 -0
  10. package/_vendor/partial-json-parser/parser.js.map +1 -0
  11. package/_vendor/partial-json-parser/parser.mjs +223 -0
  12. package/_vendor/partial-json-parser/parser.mjs.map +1 -0
  13. package/ainative.d.mts +32 -0
  14. package/ainative.d.mts.map +1 -0
  15. package/ainative.d.ts +32 -0
  16. package/ainative.d.ts.map +1 -0
  17. package/ainative.js +78 -0
  18. package/ainative.js.map +1 -0
  19. package/ainative.mjs +71 -0
  20. package/ainative.mjs.map +1 -0
  21. package/api-promise.d.mts +2 -0
  22. package/api-promise.d.mts.map +1 -0
  23. package/api-promise.d.ts +2 -0
  24. package/api-promise.d.ts.map +1 -0
  25. package/api-promise.js +6 -0
  26. package/api-promise.js.map +1 -0
  27. package/api-promise.mjs +2 -0
  28. package/api-promise.mjs.map +1 -0
  29. package/bin/cli +53 -0
  30. package/bin/migration-config.json +82 -0
  31. package/client.d.mts +247 -0
  32. package/client.d.mts.map +1 -0
  33. package/client.d.ts +247 -0
  34. package/client.d.ts.map +1 -0
  35. package/client.js +567 -0
  36. package/client.js.map +1 -0
  37. package/client.mjs +562 -0
  38. package/client.mjs.map +1 -0
  39. package/core/api-promise.d.mts +49 -0
  40. package/core/api-promise.d.mts.map +1 -0
  41. package/core/api-promise.d.ts +49 -0
  42. package/core/api-promise.d.ts.map +1 -0
  43. package/core/api-promise.js +76 -0
  44. package/core/api-promise.js.map +1 -0
  45. package/core/api-promise.mjs +72 -0
  46. package/core/api-promise.mjs.map +1 -0
  47. package/core/error.d.mts +50 -0
  48. package/core/error.d.mts.map +1 -0
  49. package/core/error.d.ts +50 -0
  50. package/core/error.d.ts.map +1 -0
  51. package/core/error.js +116 -0
  52. package/core/error.js.map +1 -0
  53. package/core/error.mjs +100 -0
  54. package/core/error.mjs.map +1 -0
  55. package/core/pagination.d.mts +105 -0
  56. package/core/pagination.d.mts.map +1 -0
  57. package/core/pagination.d.ts +105 -0
  58. package/core/pagination.d.ts.map +1 -0
  59. package/core/pagination.js +185 -0
  60. package/core/pagination.js.map +1 -0
  61. package/core/pagination.mjs +177 -0
  62. package/core/pagination.mjs.map +1 -0
  63. package/core/resource.d.mts +6 -0
  64. package/core/resource.d.mts.map +1 -0
  65. package/core/resource.d.ts +6 -0
  66. package/core/resource.d.ts.map +1 -0
  67. package/core/resource.js +11 -0
  68. package/core/resource.js.map +1 -0
  69. package/core/resource.mjs +7 -0
  70. package/core/resource.mjs.map +1 -0
  71. package/core/streaming.d.mts +33 -0
  72. package/core/streaming.d.mts.map +1 -0
  73. package/core/streaming.d.ts +33 -0
  74. package/core/streaming.d.ts.map +1 -0
  75. package/core/streaming.js +290 -0
  76. package/core/streaming.js.map +1 -0
  77. package/core/streaming.mjs +285 -0
  78. package/core/streaming.mjs.map +1 -0
  79. package/core/uploads.d.mts +3 -0
  80. package/core/uploads.d.mts.map +1 -0
  81. package/core/uploads.d.ts +3 -0
  82. package/core/uploads.d.ts.map +1 -0
  83. package/core/uploads.js +6 -0
  84. package/core/uploads.js.map +1 -0
  85. package/core/uploads.mjs +2 -0
  86. package/core/uploads.mjs.map +1 -0
  87. package/error.d.mts +2 -0
  88. package/error.d.mts.map +1 -0
  89. package/error.d.ts +2 -0
  90. package/error.d.ts.map +1 -0
  91. package/error.js +6 -0
  92. package/error.js.map +1 -0
  93. package/error.mjs +2 -0
  94. package/error.mjs.map +1 -0
  95. package/helpers/beta/json-schema.d.mts +31 -0
  96. package/helpers/beta/json-schema.d.mts.map +1 -0
  97. package/helpers/beta/json-schema.d.ts +31 -0
  98. package/helpers/beta/json-schema.d.ts.map +1 -0
  99. package/helpers/beta/json-schema.js +56 -0
  100. package/helpers/beta/json-schema.js.map +1 -0
  101. package/helpers/beta/json-schema.mjs +52 -0
  102. package/helpers/beta/json-schema.mjs.map +1 -0
  103. package/helpers/beta/mcp.d.mts +303 -0
  104. package/helpers/beta/mcp.d.mts.map +1 -0
  105. package/helpers/beta/mcp.d.ts +303 -0
  106. package/helpers/beta/mcp.d.ts.map +1 -0
  107. package/helpers/beta/mcp.js +419 -0
  108. package/helpers/beta/mcp.js.map +1 -0
  109. package/helpers/beta/mcp.mjs +406 -0
  110. package/helpers/beta/mcp.mjs.map +1 -0
  111. package/helpers/beta/memory.d.mts +11 -0
  112. package/helpers/beta/memory.d.mts.map +1 -0
  113. package/helpers/beta/memory.d.ts +11 -0
  114. package/helpers/beta/memory.d.ts.map +1 -0
  115. package/helpers/beta/memory.js +18 -0
  116. package/helpers/beta/memory.js.map +1 -0
  117. package/helpers/beta/memory.mjs +15 -0
  118. package/helpers/beta/memory.mjs.map +1 -0
  119. package/helpers/beta/zod.d.mts +27 -0
  120. package/helpers/beta/zod.d.mts.map +1 -0
  121. package/helpers/beta/zod.d.ts +27 -0
  122. package/helpers/beta/zod.d.ts.map +1 -0
  123. package/helpers/beta/zod.js +57 -0
  124. package/helpers/beta/zod.js.map +1 -0
  125. package/helpers/beta/zod.mjs +52 -0
  126. package/helpers/beta/zod.mjs.map +1 -0
  127. package/helpers/index.d.mts +3 -0
  128. package/helpers/index.d.mts.map +1 -0
  129. package/helpers/index.d.ts +3 -0
  130. package/helpers/index.d.ts.map +1 -0
  131. package/helpers/index.js +8 -0
  132. package/helpers/index.js.map +1 -0
  133. package/helpers/index.mjs +3 -0
  134. package/helpers/index.mjs.map +1 -0
  135. package/helpers/json-schema.d.mts +18 -0
  136. package/helpers/json-schema.d.mts.map +1 -0
  137. package/helpers/json-schema.d.ts +18 -0
  138. package/helpers/json-schema.d.ts.map +1 -0
  139. package/helpers/json-schema.js +37 -0
  140. package/helpers/json-schema.js.map +1 -0
  141. package/helpers/json-schema.mjs +34 -0
  142. package/helpers/json-schema.mjs.map +1 -0
  143. package/helpers/zod.d.mts +13 -0
  144. package/helpers/zod.d.mts.map +1 -0
  145. package/helpers/zod.d.ts +13 -0
  146. package/helpers/zod.d.ts.map +1 -0
  147. package/helpers/zod.js +47 -0
  148. package/helpers/zod.js.map +1 -0
  149. package/helpers/zod.mjs +43 -0
  150. package/helpers/zod.mjs.map +1 -0
  151. package/index.d.mts +9 -0
  152. package/index.d.mts.map +1 -0
  153. package/index.d.ts +9 -0
  154. package/index.d.ts.map +1 -0
  155. package/index.js +42 -0
  156. package/index.js.map +1 -0
  157. package/index.mjs +9 -0
  158. package/index.mjs.map +1 -0
  159. package/internal/builtin-types.d.mts +73 -0
  160. package/internal/builtin-types.d.mts.map +1 -0
  161. package/internal/builtin-types.d.ts +73 -0
  162. package/internal/builtin-types.d.ts.map +1 -0
  163. package/internal/builtin-types.js +4 -0
  164. package/internal/builtin-types.js.map +1 -0
  165. package/internal/builtin-types.mjs +3 -0
  166. package/internal/builtin-types.mjs.map +1 -0
  167. package/internal/constants.d.mts +5 -0
  168. package/internal/constants.d.mts.map +1 -0
  169. package/internal/constants.d.ts +5 -0
  170. package/internal/constants.d.ts.map +1 -0
  171. package/internal/constants.js +18 -0
  172. package/internal/constants.js.map +1 -0
  173. package/internal/constants.mjs +15 -0
  174. package/internal/constants.mjs.map +1 -0
  175. package/internal/decoders/jsonl.d.mts +10 -0
  176. package/internal/decoders/jsonl.d.mts.map +1 -0
  177. package/internal/decoders/jsonl.d.ts +10 -0
  178. package/internal/decoders/jsonl.d.ts.map +1 -0
  179. package/internal/decoders/jsonl.js +39 -0
  180. package/internal/decoders/jsonl.js.map +1 -0
  181. package/internal/decoders/jsonl.mjs +35 -0
  182. package/internal/decoders/jsonl.mjs.map +1 -0
  183. package/internal/decoders/line.d.mts +17 -0
  184. package/internal/decoders/line.d.mts.map +1 -0
  185. package/internal/decoders/line.d.ts +17 -0
  186. package/internal/decoders/line.d.ts.map +1 -0
  187. package/internal/decoders/line.js +113 -0
  188. package/internal/decoders/line.js.map +1 -0
  189. package/internal/decoders/line.mjs +108 -0
  190. package/internal/decoders/line.mjs.map +1 -0
  191. package/internal/detect-platform.d.mts +15 -0
  192. package/internal/detect-platform.d.mts.map +1 -0
  193. package/internal/detect-platform.d.ts +15 -0
  194. package/internal/detect-platform.d.ts.map +1 -0
  195. package/internal/detect-platform.js +162 -0
  196. package/internal/detect-platform.js.map +1 -0
  197. package/internal/detect-platform.mjs +157 -0
  198. package/internal/detect-platform.mjs.map +1 -0
  199. package/internal/errors.d.mts +3 -0
  200. package/internal/errors.d.mts.map +1 -0
  201. package/internal/errors.d.ts +3 -0
  202. package/internal/errors.d.ts.map +1 -0
  203. package/internal/errors.js +41 -0
  204. package/internal/errors.js.map +1 -0
  205. package/internal/errors.mjs +36 -0
  206. package/internal/errors.mjs.map +1 -0
  207. package/internal/headers.d.mts +22 -0
  208. package/internal/headers.d.mts.map +1 -0
  209. package/internal/headers.d.ts +22 -0
  210. package/internal/headers.d.ts.map +1 -0
  211. package/internal/headers.js +79 -0
  212. package/internal/headers.js.map +1 -0
  213. package/internal/headers.mjs +74 -0
  214. package/internal/headers.mjs.map +1 -0
  215. package/internal/parse.d.mts +17 -0
  216. package/internal/parse.d.mts.map +1 -0
  217. package/internal/parse.d.ts +17 -0
  218. package/internal/parse.d.ts.map +1 -0
  219. package/internal/parse.js +60 -0
  220. package/internal/parse.js.map +1 -0
  221. package/internal/parse.mjs +56 -0
  222. package/internal/parse.mjs.map +1 -0
  223. package/internal/request-options.d.mts +77 -0
  224. package/internal/request-options.d.mts.map +1 -0
  225. package/internal/request-options.d.ts +77 -0
  226. package/internal/request-options.d.ts.map +1 -0
  227. package/internal/request-options.js +14 -0
  228. package/internal/request-options.js.map +1 -0
  229. package/internal/request-options.mjs +10 -0
  230. package/internal/request-options.mjs.map +1 -0
  231. package/internal/shim-types.d.mts +17 -0
  232. package/internal/shim-types.d.mts.map +1 -0
  233. package/internal/shim-types.d.ts +17 -0
  234. package/internal/shim-types.d.ts.map +1 -0
  235. package/internal/shim-types.js +4 -0
  236. package/internal/shim-types.js.map +1 -0
  237. package/internal/shim-types.mjs +3 -0
  238. package/internal/shim-types.mjs.map +1 -0
  239. package/internal/shims.d.mts +20 -0
  240. package/internal/shims.d.mts.map +1 -0
  241. package/internal/shims.d.ts +20 -0
  242. package/internal/shims.d.ts.map +1 -0
  243. package/internal/shims.js +92 -0
  244. package/internal/shims.js.map +1 -0
  245. package/internal/shims.mjs +85 -0
  246. package/internal/shims.mjs.map +1 -0
  247. package/internal/stream-utils.d.mts +8 -0
  248. package/internal/stream-utils.d.mts.map +1 -0
  249. package/internal/stream-utils.d.ts +8 -0
  250. package/internal/stream-utils.d.ts.map +1 -0
  251. package/internal/stream-utils.js +38 -0
  252. package/internal/stream-utils.js.map +1 -0
  253. package/internal/stream-utils.mjs +35 -0
  254. package/internal/stream-utils.mjs.map +1 -0
  255. package/internal/to-file.d.mts +45 -0
  256. package/internal/to-file.d.mts.map +1 -0
  257. package/internal/to-file.d.ts +45 -0
  258. package/internal/to-file.d.ts.map +1 -0
  259. package/internal/to-file.js +96 -0
  260. package/internal/to-file.js.map +1 -0
  261. package/internal/to-file.mjs +93 -0
  262. package/internal/to-file.mjs.map +1 -0
  263. package/internal/tslib.js +81 -0
  264. package/internal/tslib.mjs +17 -0
  265. package/internal/types.d.mts +69 -0
  266. package/internal/types.d.mts.map +1 -0
  267. package/internal/types.d.ts +69 -0
  268. package/internal/types.d.ts.map +1 -0
  269. package/internal/types.js +4 -0
  270. package/internal/types.js.map +1 -0
  271. package/internal/types.mjs +3 -0
  272. package/internal/types.mjs.map +1 -0
  273. package/internal/uploads.d.mts +42 -0
  274. package/internal/uploads.d.mts.map +1 -0
  275. package/internal/uploads.d.ts +42 -0
  276. package/internal/uploads.d.ts.map +1 -0
  277. package/internal/uploads.js +145 -0
  278. package/internal/uploads.js.map +1 -0
  279. package/internal/uploads.mjs +135 -0
  280. package/internal/uploads.mjs.map +1 -0
  281. package/internal/utils/base64.d.mts +3 -0
  282. package/internal/utils/base64.d.mts.map +1 -0
  283. package/internal/utils/base64.d.ts +3 -0
  284. package/internal/utils/base64.d.ts.map +1 -0
  285. package/internal/utils/base64.js +38 -0
  286. package/internal/utils/base64.js.map +1 -0
  287. package/internal/utils/base64.mjs +33 -0
  288. package/internal/utils/base64.mjs.map +1 -0
  289. package/internal/utils/bytes.d.mts +4 -0
  290. package/internal/utils/bytes.d.mts.map +1 -0
  291. package/internal/utils/bytes.d.ts +4 -0
  292. package/internal/utils/bytes.d.ts.map +1 -0
  293. package/internal/utils/bytes.js +31 -0
  294. package/internal/utils/bytes.js.map +1 -0
  295. package/internal/utils/bytes.mjs +26 -0
  296. package/internal/utils/bytes.mjs.map +1 -0
  297. package/internal/utils/env.d.mts +9 -0
  298. package/internal/utils/env.d.mts.map +1 -0
  299. package/internal/utils/env.d.ts +9 -0
  300. package/internal/utils/env.d.ts.map +1 -0
  301. package/internal/utils/env.js +22 -0
  302. package/internal/utils/env.js.map +1 -0
  303. package/internal/utils/env.mjs +18 -0
  304. package/internal/utils/env.mjs.map +1 -0
  305. package/internal/utils/log.d.mts +37 -0
  306. package/internal/utils/log.d.mts.map +1 -0
  307. package/internal/utils/log.d.ts +37 -0
  308. package/internal/utils/log.d.ts.map +1 -0
  309. package/internal/utils/log.js +86 -0
  310. package/internal/utils/log.js.map +1 -0
  311. package/internal/utils/log.mjs +80 -0
  312. package/internal/utils/log.mjs.map +1 -0
  313. package/internal/utils/path.d.mts +15 -0
  314. package/internal/utils/path.d.mts.map +1 -0
  315. package/internal/utils/path.d.ts +15 -0
  316. package/internal/utils/path.d.ts.map +1 -0
  317. package/internal/utils/path.js +79 -0
  318. package/internal/utils/path.js.map +1 -0
  319. package/internal/utils/path.mjs +74 -0
  320. package/internal/utils/path.mjs.map +1 -0
  321. package/internal/utils/query.d.mts +5 -0
  322. package/internal/utils/query.d.mts.map +1 -0
  323. package/internal/utils/query.d.ts +5 -0
  324. package/internal/utils/query.d.ts.map +1 -0
  325. package/internal/utils/query.js +23 -0
  326. package/internal/utils/query.js.map +1 -0
  327. package/internal/utils/query.mjs +20 -0
  328. package/internal/utils/query.mjs.map +1 -0
  329. package/internal/utils/sleep.d.mts +2 -0
  330. package/internal/utils/sleep.d.mts.map +1 -0
  331. package/internal/utils/sleep.d.ts +2 -0
  332. package/internal/utils/sleep.d.ts.map +1 -0
  333. package/internal/utils/sleep.js +7 -0
  334. package/internal/utils/sleep.js.map +1 -0
  335. package/internal/utils/sleep.mjs +3 -0
  336. package/internal/utils/sleep.mjs.map +1 -0
  337. package/internal/utils/uuid.d.mts +5 -0
  338. package/internal/utils/uuid.d.mts.map +1 -0
  339. package/internal/utils/uuid.d.ts +5 -0
  340. package/internal/utils/uuid.d.ts.map +1 -0
  341. package/internal/utils/uuid.js +19 -0
  342. package/internal/utils/uuid.js.map +1 -0
  343. package/internal/utils/uuid.mjs +15 -0
  344. package/internal/utils/uuid.mjs.map +1 -0
  345. package/internal/utils/values.d.mts +19 -0
  346. package/internal/utils/values.d.mts.map +1 -0
  347. package/internal/utils/values.d.ts +19 -0
  348. package/internal/utils/values.d.ts.map +1 -0
  349. package/internal/utils/values.js +119 -0
  350. package/internal/utils/values.js.map +1 -0
  351. package/internal/utils/values.mjs +100 -0
  352. package/internal/utils/values.mjs.map +1 -0
  353. package/internal/utils.d.mts +8 -0
  354. package/internal/utils.d.mts.map +1 -0
  355. package/internal/utils.d.ts +8 -0
  356. package/internal/utils.d.ts.map +1 -0
  357. package/internal/utils.js +12 -0
  358. package/internal/utils.js.map +1 -0
  359. package/internal/utils.mjs +9 -0
  360. package/internal/utils.mjs.map +1 -0
  361. package/lib/BetaMessageStream.d.mts +122 -0
  362. package/lib/BetaMessageStream.d.mts.map +1 -0
  363. package/lib/BetaMessageStream.d.ts +122 -0
  364. package/lib/BetaMessageStream.d.ts.map +1 -0
  365. package/lib/BetaMessageStream.js +620 -0
  366. package/lib/BetaMessageStream.js.map +1 -0
  367. package/lib/BetaMessageStream.mjs +616 -0
  368. package/lib/BetaMessageStream.mjs.map +1 -0
  369. package/lib/MessageStream.d.mts +121 -0
  370. package/lib/MessageStream.d.mts.map +1 -0
  371. package/lib/MessageStream.d.ts +121 -0
  372. package/lib/MessageStream.d.ts.map +1 -0
  373. package/lib/MessageStream.js +595 -0
  374. package/lib/MessageStream.js.map +1 -0
  375. package/lib/MessageStream.mjs +591 -0
  376. package/lib/MessageStream.mjs.map +1 -0
  377. package/lib/beta-parser.d.mts +37 -0
  378. package/lib/beta-parser.d.mts.map +1 -0
  379. package/lib/beta-parser.d.ts +37 -0
  380. package/lib/beta-parser.d.ts.map +1 -0
  381. package/lib/beta-parser.js +79 -0
  382. package/lib/beta-parser.js.map +1 -0
  383. package/lib/beta-parser.mjs +75 -0
  384. package/lib/beta-parser.mjs.map +1 -0
  385. package/lib/parser.d.mts +32 -0
  386. package/lib/parser.d.mts.map +1 -0
  387. package/lib/parser.d.ts +32 -0
  388. package/lib/parser.d.ts.map +1 -0
  389. package/lib/parser.js +66 -0
  390. package/lib/parser.js.map +1 -0
  391. package/lib/parser.mjs +62 -0
  392. package/lib/parser.mjs.map +1 -0
  393. package/lib/stainless-helper-header.d.mts +34 -0
  394. package/lib/stainless-helper-header.d.mts.map +1 -0
  395. package/lib/stainless-helper-header.d.ts +34 -0
  396. package/lib/stainless-helper-header.d.ts.map +1 -0
  397. package/lib/stainless-helper-header.js +70 -0
  398. package/lib/stainless-helper-header.js.map +1 -0
  399. package/lib/stainless-helper-header.mjs +63 -0
  400. package/lib/stainless-helper-header.mjs.map +1 -0
  401. package/lib/tools/BetaRunnableTool.d.mts +12 -0
  402. package/lib/tools/BetaRunnableTool.d.mts.map +1 -0
  403. package/lib/tools/BetaRunnableTool.d.ts +12 -0
  404. package/lib/tools/BetaRunnableTool.d.ts.map +1 -0
  405. package/lib/tools/BetaRunnableTool.js +3 -0
  406. package/lib/tools/BetaRunnableTool.js.map +1 -0
  407. package/lib/tools/BetaRunnableTool.mjs +2 -0
  408. package/lib/tools/BetaRunnableTool.mjs.map +1 -0
  409. package/lib/tools/BetaToolRunner.d.mts +141 -0
  410. package/lib/tools/BetaToolRunner.d.mts.map +1 -0
  411. package/lib/tools/BetaToolRunner.d.ts +141 -0
  412. package/lib/tools/BetaToolRunner.d.ts.map +1 -0
  413. package/lib/tools/BetaToolRunner.js +381 -0
  414. package/lib/tools/BetaToolRunner.js.map +1 -0
  415. package/lib/tools/BetaToolRunner.mjs +377 -0
  416. package/lib/tools/BetaToolRunner.mjs.map +1 -0
  417. package/lib/tools/CompactionControl.d.mts +30 -0
  418. package/lib/tools/CompactionControl.d.mts.map +1 -0
  419. package/lib/tools/CompactionControl.d.ts +30 -0
  420. package/lib/tools/CompactionControl.d.ts.map +1 -0
  421. package/lib/tools/CompactionControl.js +28 -0
  422. package/lib/tools/CompactionControl.js.map +1 -0
  423. package/lib/tools/CompactionControl.mjs +25 -0
  424. package/lib/tools/CompactionControl.mjs.map +1 -0
  425. package/lib/tools/ToolError.d.mts +33 -0
  426. package/lib/tools/ToolError.d.mts.map +1 -0
  427. package/lib/tools/ToolError.d.ts +33 -0
  428. package/lib/tools/ToolError.d.ts.map +1 -0
  429. package/lib/tools/ToolError.js +42 -0
  430. package/lib/tools/ToolError.js.map +1 -0
  431. package/lib/tools/ToolError.mjs +38 -0
  432. package/lib/tools/ToolError.mjs.map +1 -0
  433. package/lib/tools/ToolRunner.d.mts +132 -0
  434. package/lib/tools/ToolRunner.d.mts.map +1 -0
  435. package/lib/tools/ToolRunner.d.ts +132 -0
  436. package/lib/tools/ToolRunner.d.ts.map +1 -0
  437. package/lib/tools/ToolRunner.js +294 -0
  438. package/lib/tools/ToolRunner.js.map +1 -0
  439. package/lib/tools/ToolRunner.mjs +290 -0
  440. package/lib/tools/ToolRunner.mjs.map +1 -0
  441. package/lib/transform-json-schema.d.mts +3 -0
  442. package/lib/transform-json-schema.d.mts.map +1 -0
  443. package/lib/transform-json-schema.d.ts +3 -0
  444. package/lib/transform-json-schema.d.ts.map +1 -0
  445. package/lib/transform-json-schema.js +114 -0
  446. package/lib/transform-json-schema.js.map +1 -0
  447. package/lib/transform-json-schema.mjs +111 -0
  448. package/lib/transform-json-schema.mjs.map +1 -0
  449. package/package.json +246 -0
  450. package/pagination.d.mts +2 -0
  451. package/pagination.d.mts.map +1 -0
  452. package/pagination.d.ts +2 -0
  453. package/pagination.d.ts.map +1 -0
  454. package/pagination.js +6 -0
  455. package/pagination.js.map +1 -0
  456. package/pagination.mjs +2 -0
  457. package/pagination.mjs.map +1 -0
  458. package/resource.d.mts +2 -0
  459. package/resource.d.mts.map +1 -0
  460. package/resource.d.ts +2 -0
  461. package/resource.d.ts.map +1 -0
  462. package/resource.js +6 -0
  463. package/resource.js.map +1 -0
  464. package/resource.mjs +2 -0
  465. package/resource.mjs.map +1 -0
  466. package/resources/beta/beta.d.mts +66 -0
  467. package/resources/beta/beta.d.mts.map +1 -0
  468. package/resources/beta/beta.d.ts +66 -0
  469. package/resources/beta/beta.d.ts.map +1 -0
  470. package/resources/beta/beta.js +29 -0
  471. package/resources/beta/beta.js.map +1 -0
  472. package/resources/beta/beta.mjs +24 -0
  473. package/resources/beta/beta.mjs.map +1 -0
  474. package/resources/beta/files.d.mts +151 -0
  475. package/resources/beta/files.d.mts.map +1 -0
  476. package/resources/beta/files.d.ts +151 -0
  477. package/resources/beta/files.d.ts.map +1 -0
  478. package/resources/beta/files.js +124 -0
  479. package/resources/beta/files.js.map +1 -0
  480. package/resources/beta/files.mjs +120 -0
  481. package/resources/beta/files.mjs.map +1 -0
  482. package/resources/beta/index.d.mts +6 -0
  483. package/resources/beta/index.d.mts.map +1 -0
  484. package/resources/beta/index.d.ts +6 -0
  485. package/resources/beta/index.d.ts.map +1 -0
  486. package/resources/beta/index.js +15 -0
  487. package/resources/beta/index.js.map +1 -0
  488. package/resources/beta/index.mjs +7 -0
  489. package/resources/beta/index.mjs.map +1 -0
  490. package/resources/beta/messages/batches.d.mts +646 -0
  491. package/resources/beta/messages/batches.d.mts.map +1 -0
  492. package/resources/beta/messages/batches.d.ts +646 -0
  493. package/resources/beta/messages/batches.d.ts.map +1 -0
  494. package/resources/beta/messages/batches.js +204 -0
  495. package/resources/beta/messages/batches.js.map +1 -0
  496. package/resources/beta/messages/batches.mjs +200 -0
  497. package/resources/beta/messages/batches.mjs.map +1 -0
  498. package/resources/beta/messages/index.d.mts +4 -0
  499. package/resources/beta/messages/index.d.mts.map +1 -0
  500. package/resources/beta/messages/index.d.ts +4 -0
  501. package/resources/beta/messages/index.d.ts.map +1 -0
  502. package/resources/beta/messages/index.js +12 -0
  503. package/resources/beta/messages/index.js.map +1 -0
  504. package/resources/beta/messages/index.mjs +5 -0
  505. package/resources/beta/messages/index.mjs.map +1 -0
  506. package/resources/beta/messages/messages.d.mts +2993 -0
  507. package/resources/beta/messages/messages.d.mts.map +1 -0
  508. package/resources/beta/messages/messages.d.ts +2993 -0
  509. package/resources/beta/messages/messages.d.ts.map +1 -0
  510. package/resources/beta/messages/messages.js +163 -0
  511. package/resources/beta/messages/messages.js.map +1 -0
  512. package/resources/beta/messages/messages.mjs +156 -0
  513. package/resources/beta/messages/messages.mjs.map +1 -0
  514. package/resources/beta/messages.d.mts +2 -0
  515. package/resources/beta/messages.d.mts.map +1 -0
  516. package/resources/beta/messages.d.ts +2 -0
  517. package/resources/beta/messages.d.ts.map +1 -0
  518. package/resources/beta/messages.js +6 -0
  519. package/resources/beta/messages.js.map +1 -0
  520. package/resources/beta/messages.mjs +3 -0
  521. package/resources/beta/messages.mjs.map +1 -0
  522. package/resources/beta/models.d.mts +208 -0
  523. package/resources/beta/models.d.mts.map +1 -0
  524. package/resources/beta/models.d.ts +208 -0
  525. package/resources/beta/models.d.ts.map +1 -0
  526. package/resources/beta/models.js +60 -0
  527. package/resources/beta/models.js.map +1 -0
  528. package/resources/beta/models.mjs +56 -0
  529. package/resources/beta/models.mjs.map +1 -0
  530. package/resources/beta/skills/index.d.mts +3 -0
  531. package/resources/beta/skills/index.d.mts.map +1 -0
  532. package/resources/beta/skills/index.d.ts +3 -0
  533. package/resources/beta/skills/index.d.ts.map +1 -0
  534. package/resources/beta/skills/index.js +9 -0
  535. package/resources/beta/skills/index.js.map +1 -0
  536. package/resources/beta/skills/index.mjs +4 -0
  537. package/resources/beta/skills/index.mjs.map +1 -0
  538. package/resources/beta/skills/skills.d.mts +249 -0
  539. package/resources/beta/skills/skills.d.mts.map +1 -0
  540. package/resources/beta/skills/skills.d.ts +249 -0
  541. package/resources/beta/skills/skills.d.ts.map +1 -0
  542. package/resources/beta/skills/skills.js +98 -0
  543. package/resources/beta/skills/skills.js.map +1 -0
  544. package/resources/beta/skills/skills.mjs +93 -0
  545. package/resources/beta/skills/skills.mjs.map +1 -0
  546. package/resources/beta/skills/versions.d.mts +257 -0
  547. package/resources/beta/skills/versions.d.mts.map +1 -0
  548. package/resources/beta/skills/versions.d.ts +257 -0
  549. package/resources/beta/skills/versions.d.ts.map +1 -0
  550. package/resources/beta/skills/versions.js +100 -0
  551. package/resources/beta/skills/versions.js.map +1 -0
  552. package/resources/beta/skills/versions.mjs +96 -0
  553. package/resources/beta/skills/versions.mjs.map +1 -0
  554. package/resources/beta/skills.d.mts +2 -0
  555. package/resources/beta/skills.d.mts.map +1 -0
  556. package/resources/beta/skills.d.ts +2 -0
  557. package/resources/beta/skills.d.ts.map +1 -0
  558. package/resources/beta/skills.js +6 -0
  559. package/resources/beta/skills.js.map +1 -0
  560. package/resources/beta/skills.mjs +3 -0
  561. package/resources/beta/skills.mjs.map +1 -0
  562. package/resources/beta.d.mts +2 -0
  563. package/resources/beta.d.mts.map +1 -0
  564. package/resources/beta.d.ts +2 -0
  565. package/resources/beta.d.ts.map +1 -0
  566. package/resources/beta.js +6 -0
  567. package/resources/beta.js.map +1 -0
  568. package/resources/beta.mjs +3 -0
  569. package/resources/beta.mjs.map +1 -0
  570. package/resources/completions.d.mts +182 -0
  571. package/resources/completions.d.mts.map +1 -0
  572. package/resources/completions.d.ts +182 -0
  573. package/resources/completions.d.ts.map +1 -0
  574. package/resources/completions.js +23 -0
  575. package/resources/completions.js.map +1 -0
  576. package/resources/completions.mjs +19 -0
  577. package/resources/completions.mjs.map +1 -0
  578. package/resources/index.d.mts +6 -0
  579. package/resources/index.d.mts.map +1 -0
  580. package/resources/index.d.ts +6 -0
  581. package/resources/index.d.ts.map +1 -0
  582. package/resources/index.js +15 -0
  583. package/resources/index.js.map +1 -0
  584. package/resources/index.mjs +7 -0
  585. package/resources/index.mjs.map +1 -0
  586. package/resources/messages/batches.d.mts +304 -0
  587. package/resources/messages/batches.d.mts.map +1 -0
  588. package/resources/messages/batches.d.ts +304 -0
  589. package/resources/messages/batches.d.ts.map +1 -0
  590. package/resources/messages/batches.js +153 -0
  591. package/resources/messages/batches.js.map +1 -0
  592. package/resources/messages/batches.mjs +149 -0
  593. package/resources/messages/batches.mjs.map +1 -0
  594. package/resources/messages/index.d.mts +3 -0
  595. package/resources/messages/index.d.mts.map +1 -0
  596. package/resources/messages/index.d.ts +3 -0
  597. package/resources/messages/index.d.ts.map +1 -0
  598. package/resources/messages/index.js +9 -0
  599. package/resources/messages/index.js.map +1 -0
  600. package/resources/messages/index.mjs +4 -0
  601. package/resources/messages/index.mjs.map +1 -0
  602. package/resources/messages/messages.d.mts +2285 -0
  603. package/resources/messages/messages.d.mts.map +1 -0
  604. package/resources/messages/messages.d.ts +2285 -0
  605. package/resources/messages/messages.d.ts.map +1 -0
  606. package/resources/messages/messages.js +128 -0
  607. package/resources/messages/messages.js.map +1 -0
  608. package/resources/messages/messages.mjs +123 -0
  609. package/resources/messages/messages.mjs.map +1 -0
  610. package/resources/messages.d.mts +2 -0
  611. package/resources/messages.d.mts.map +1 -0
  612. package/resources/messages.d.ts +2 -0
  613. package/resources/messages.d.ts.map +1 -0
  614. package/resources/messages.js +6 -0
  615. package/resources/messages.js.map +1 -0
  616. package/resources/messages.mjs +3 -0
  617. package/resources/messages.mjs.map +1 -0
  618. package/resources/models.d.mts +193 -0
  619. package/resources/models.d.mts.map +1 -0
  620. package/resources/models.d.ts +193 -0
  621. package/resources/models.d.ts.map +1 -0
  622. package/resources/models.js +45 -0
  623. package/resources/models.js.map +1 -0
  624. package/resources/models.mjs +41 -0
  625. package/resources/models.mjs.map +1 -0
  626. package/resources/shared.d.mts +44 -0
  627. package/resources/shared.d.mts.map +1 -0
  628. package/resources/shared.d.ts +44 -0
  629. package/resources/shared.d.ts.map +1 -0
  630. package/resources/shared.js +4 -0
  631. package/resources/shared.js.map +1 -0
  632. package/resources/shared.mjs +3 -0
  633. package/resources/shared.mjs.map +1 -0
  634. package/resources/top-level.d.mts +2 -0
  635. package/resources/top-level.d.mts.map +1 -0
  636. package/resources/top-level.d.ts +2 -0
  637. package/resources/top-level.d.ts.map +1 -0
  638. package/resources/top-level.js +4 -0
  639. package/resources/top-level.js.map +1 -0
  640. package/resources/top-level.mjs +3 -0
  641. package/resources/top-level.mjs.map +1 -0
  642. package/resources.d.mts +2 -0
  643. package/resources.d.mts.map +1 -0
  644. package/resources.d.ts +2 -0
  645. package/resources.d.ts.map +1 -0
  646. package/resources.js +5 -0
  647. package/resources.js.map +1 -0
  648. package/resources.mjs +2 -0
  649. package/resources.mjs.map +1 -0
  650. package/src/_vendor/partial-json-parser/README.md +3 -0
  651. package/src/_vendor/partial-json-parser/parser.ts +264 -0
  652. package/src/ainative.ts +85 -0
  653. package/src/api-promise.ts +2 -0
  654. package/src/client.ts +1326 -0
  655. package/src/core/README.md +3 -0
  656. package/src/core/api-promise.ts +101 -0
  657. package/src/core/error.ts +145 -0
  658. package/src/core/pagination.ts +331 -0
  659. package/src/core/resource.ts +11 -0
  660. package/src/core/streaming.ts +348 -0
  661. package/src/core/uploads.ts +2 -0
  662. package/src/error.ts +2 -0
  663. package/src/helpers/beta/json-schema.ts +75 -0
  664. package/src/helpers/beta/mcp.ts +624 -0
  665. package/src/helpers/beta/memory.ts +28 -0
  666. package/src/helpers/beta/zod.ts +72 -0
  667. package/src/helpers/index.ts +2 -0
  668. package/src/helpers/json-schema.ts +48 -0
  669. package/src/helpers/zod.ts +58 -0
  670. package/src/index.ts +40 -0
  671. package/src/internal/README.md +3 -0
  672. package/src/internal/builtin-types.ts +93 -0
  673. package/src/internal/constants.ts +15 -0
  674. package/src/internal/decoders/jsonl.ts +48 -0
  675. package/src/internal/decoders/line.ts +135 -0
  676. package/src/internal/detect-platform.ts +196 -0
  677. package/src/internal/errors.ts +33 -0
  678. package/src/internal/headers.ts +99 -0
  679. package/src/internal/parse.ts +90 -0
  680. package/src/internal/request-options.ts +93 -0
  681. package/src/internal/shim-types.ts +26 -0
  682. package/src/internal/shims.ts +107 -0
  683. package/src/internal/stream-utils.ts +32 -0
  684. package/src/internal/to-file.ts +159 -0
  685. package/src/internal/types.ts +95 -0
  686. package/src/internal/uploads.ts +204 -0
  687. package/src/internal/utils/base64.ts +40 -0
  688. package/src/internal/utils/bytes.ts +32 -0
  689. package/src/internal/utils/env.ts +18 -0
  690. package/src/internal/utils/log.ts +127 -0
  691. package/src/internal/utils/path.ts +88 -0
  692. package/src/internal/utils/query.ts +23 -0
  693. package/src/internal/utils/sleep.ts +3 -0
  694. package/src/internal/utils/uuid.ts +17 -0
  695. package/src/internal/utils/values.ts +112 -0
  696. package/src/internal/utils.ts +9 -0
  697. package/src/lib/.keep +4 -0
  698. package/src/lib/BetaMessageStream.ts +764 -0
  699. package/src/lib/MessageStream.ts +743 -0
  700. package/src/lib/beta-parser.ts +148 -0
  701. package/src/lib/parser.ts +125 -0
  702. package/src/lib/stainless-helper-header.ts +80 -0
  703. package/src/lib/tools/BetaRunnableTool.ts +40 -0
  704. package/src/lib/tools/BetaToolRunner.ts +494 -0
  705. package/src/lib/tools/CompactionControl.ts +57 -0
  706. package/src/lib/tools/ToolError.ts +47 -0
  707. package/src/lib/tools/ToolRunner.ts +381 -0
  708. package/src/lib/transform-json-schema.ts +124 -0
  709. package/src/pagination.ts +2 -0
  710. package/src/resource.ts +2 -0
  711. package/src/resources/beta/beta.ts +603 -0
  712. package/src/resources/beta/files.ts +261 -0
  713. package/src/resources/beta/index.ts +259 -0
  714. package/src/resources/beta/messages/batches.ts +827 -0
  715. package/src/resources/beta/messages/index.ts +229 -0
  716. package/src/resources/beta/messages/messages.ts +4372 -0
  717. package/src/resources/beta/messages.ts +3 -0
  718. package/src/resources/beta/models.ts +284 -0
  719. package/src/resources/beta/skills/index.ts +26 -0
  720. package/src/resources/beta/skills/skills.ts +384 -0
  721. package/src/resources/beta/skills/versions.ts +374 -0
  722. package/src/resources/beta/skills.ts +3 -0
  723. package/src/resources/beta.ts +3 -0
  724. package/src/resources/completions.ts +230 -0
  725. package/src/resources/index.ts +206 -0
  726. package/src/resources/messages/batches.ts +396 -0
  727. package/src/resources/messages/index.ts +189 -0
  728. package/src/resources/messages/messages.ts +3361 -0
  729. package/src/resources/messages.ts +3 -0
  730. package/src/resources/models.ts +269 -0
  731. package/src/resources/shared.ts +85 -0
  732. package/src/resources/top-level.ts +3 -0
  733. package/src/resources.ts +1 -0
  734. package/src/streaming.ts +2 -0
  735. package/src/tools/memory/node.ts +392 -0
  736. package/src/tsconfig.json +11 -0
  737. package/src/uploads.ts +2 -0
  738. package/src/version.ts +1 -0
  739. package/streaming.d.mts +2 -0
  740. package/streaming.d.mts.map +1 -0
  741. package/streaming.d.ts +2 -0
  742. package/streaming.d.ts.map +1 -0
  743. package/streaming.js +6 -0
  744. package/streaming.js.map +1 -0
  745. package/streaming.mjs +2 -0
  746. package/streaming.mjs.map +1 -0
  747. package/tools/memory/node.d.mts +18 -0
  748. package/tools/memory/node.d.mts.map +1 -0
  749. package/tools/memory/node.d.ts +18 -0
  750. package/tools/memory/node.d.ts.map +1 -0
  751. package/tools/memory/node.js +324 -0
  752. package/tools/memory/node.js.map +1 -0
  753. package/tools/memory/node.mjs +318 -0
  754. package/tools/memory/node.mjs.map +1 -0
  755. package/uploads.d.mts +2 -0
  756. package/uploads.d.mts.map +1 -0
  757. package/uploads.d.ts +2 -0
  758. package/uploads.d.ts.map +1 -0
  759. package/uploads.js +6 -0
  760. package/uploads.js.map +1 -0
  761. package/uploads.mjs +2 -0
  762. package/uploads.mjs.map +1 -0
  763. package/version.d.mts +2 -0
  764. package/version.d.mts.map +1 -0
  765. package/version.d.ts +2 -0
  766. package/version.d.ts.map +1 -0
  767. package/version.js +5 -0
  768. package/version.js.map +1 -0
  769. package/version.mjs +2 -0
  770. package/version.mjs.map +1 -0
@@ -0,0 +1,52 @@
1
+ import { transformJSONSchema } from "../..//lib/transform-json-schema.mjs";
2
+ import * as z from 'zod/v4';
3
+ import { AnthropicError } from "../../core/error.mjs";
4
+ /**
5
+ * Creates a JSON schema output format object from the given Zod schema.
6
+ *
7
+ * If this is passed to the `.parse()` method then the response message will contain a
8
+ * `.parsed_output` property that is the result of parsing the content with the given Zod object.
9
+ *
10
+ * This can be passed directly to the `.create()` method but will not
11
+ * result in any automatic parsing, you'll have to parse the response yourself.
12
+ */
13
+ export function betaZodOutputFormat(zodObject) {
14
+ let jsonSchema = z.toJSONSchema(zodObject, { reused: 'ref' });
15
+ jsonSchema = transformJSONSchema(jsonSchema);
16
+ return {
17
+ type: 'json_schema',
18
+ schema: {
19
+ ...jsonSchema,
20
+ },
21
+ parse: (content) => {
22
+ const output = zodObject.safeParse(JSON.parse(content));
23
+ if (!output.success) {
24
+ throw new AnthropicError(`Failed to parse structured output: ${output.error.message} cause: ${output.error.issues}`);
25
+ }
26
+ return output.data;
27
+ },
28
+ };
29
+ }
30
+ /**
31
+ * Creates a tool using the provided Zod schema that can be passed
32
+ * into the `.toolRunner()` method. The Zod schema will automatically be
33
+ * converted into JSON Schema when passed to the API. The provided function's
34
+ * input arguments will also be validated against the provided schema.
35
+ */
36
+ export function betaZodTool(options) {
37
+ const jsonSchema = z.toJSONSchema(options.inputSchema, { reused: 'ref' });
38
+ if (jsonSchema.type !== 'object') {
39
+ throw new Error(`Zod schema for tool "${options.name}" must be an object, but got ${jsonSchema.type}`);
40
+ }
41
+ // TypeScript doesn't narrow the type after the runtime check, so we need to assert it
42
+ const objectSchema = jsonSchema;
43
+ return {
44
+ type: 'custom',
45
+ name: options.name,
46
+ input_schema: objectSchema,
47
+ description: options.description,
48
+ run: options.run,
49
+ parse: (args) => options.inputSchema.parse(args),
50
+ };
51
+ }
52
+ //# sourceMappingURL=zod.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod.mjs","sourceRoot":"","sources":["../../src/helpers/beta/zod.ts"],"names":[],"mappings":"OAAO,EAAE,mBAAmB,EAAE;OAEvB,KAAK,CAAC,MAAM,QAAQ;OACpB,EAAE,cAAc,EAAE;AAIzB;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CACjC,SAAmB;IAEnB,IAAI,UAAU,GAAG,CAAC,CAAC,YAAY,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAE9D,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAE7C,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE;YACN,GAAG,UAAU;SACd;QACD,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE;YACjB,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YAExD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,MAAM,IAAI,cAAc,CACtB,sCAAsC,MAAM,CAAC,KAAK,CAAC,OAAO,WAAW,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAC3F,CAAC;YACJ,CAAC;YAED,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAA8B,OAKxD;IACC,MAAM,UAAU,GAAG,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAE1E,IAAI,UAAU,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,wBAAwB,OAAO,CAAC,IAAI,gCAAgC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;IACzG,CAAC;IAED,sFAAsF;IACtF,MAAM,YAAY,GAAG,UAAoD,CAAC;IAE1E,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,YAAY,EAAE,YAAY;QAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,KAAK,EAAE,CAAC,IAAa,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAA0B;KACnF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { jsonSchemaOutputFormat } from "./json-schema.mjs";
2
+ export { zodOutputFormat } from "./zod.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/helpers/index.ts"],"names":[],"mappings":"OAAO,EAAE,sBAAsB,EAAE;OAC1B,EAAE,eAAe,EAAE"}
@@ -0,0 +1,3 @@
1
+ export { jsonSchemaOutputFormat } from "./json-schema.js";
2
+ export { zodOutputFormat } from "./zod.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/helpers/index.ts"],"names":[],"mappings":"OAAO,EAAE,sBAAsB,EAAE;OAC1B,EAAE,eAAe,EAAE"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.zodOutputFormat = exports.jsonSchemaOutputFormat = void 0;
4
+ var json_schema_1 = require("./json-schema.js");
5
+ Object.defineProperty(exports, "jsonSchemaOutputFormat", { enumerable: true, get: function () { return json_schema_1.jsonSchemaOutputFormat; } });
6
+ var zod_1 = require("./zod.js");
7
+ Object.defineProperty(exports, "zodOutputFormat", { enumerable: true, get: function () { return zod_1.zodOutputFormat; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/helpers/index.ts"],"names":[],"mappings":";;;AAAA,gDAAuD;AAA9C,qHAAA,sBAAsB,OAAA;AAC/B,gCAAwC;AAA/B,sGAAA,eAAe,OAAA"}
@@ -0,0 +1,3 @@
1
+ export { jsonSchemaOutputFormat } from "./json-schema.mjs";
2
+ export { zodOutputFormat } from "./zod.mjs";
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/helpers/index.ts"],"names":[],"mappings":"OAAO,EAAE,sBAAsB,EAAE;OAC1B,EAAE,eAAe,EAAE"}
@@ -0,0 +1,18 @@
1
+ import { FromSchema, JSONSchema } from 'json-schema-to-ts';
2
+ import { AutoParseableOutputFormat } from "../lib/parser.mjs";
3
+ type NoInfer<T> = T extends infer R ? R : never;
4
+ /**
5
+ * Creates a JSON schema output format object from the given JSON schema.
6
+ * If this is passed to the `.parse()` method then the response message will contain a
7
+ * `.parsed_output` property that is the result of parsing the content with the given JSON schema.
8
+ *
9
+ * Note: When `transform` is enabled (the default), the schema is deep-cloned before transformation,
10
+ * so the original schema object is not modified.
11
+ */
12
+ export declare function jsonSchemaOutputFormat<const Schema extends Exclude<JSONSchema, boolean> & {
13
+ type: 'object';
14
+ }>(jsonSchema: Schema, options?: {
15
+ transform?: boolean;
16
+ }): AutoParseableOutputFormat<NoInfer<FromSchema<Schema>>>;
17
+ export {};
18
+ //# sourceMappingURL=json-schema.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema.d.mts","sourceRoot":"","sources":["../src/helpers/json-schema.ts"],"names":[],"mappings":"OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB;OACnD,EAAE,yBAAyB,EAAE;AAIpC,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAEhD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,CAAC,MAAM,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,EAEtE,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;IACR,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GACA,yBAAyB,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAyBxD"}
@@ -0,0 +1,18 @@
1
+ import { FromSchema, JSONSchema } from 'json-schema-to-ts';
2
+ import { AutoParseableOutputFormat } from "../lib/parser.js";
3
+ type NoInfer<T> = T extends infer R ? R : never;
4
+ /**
5
+ * Creates a JSON schema output format object from the given JSON schema.
6
+ * If this is passed to the `.parse()` method then the response message will contain a
7
+ * `.parsed_output` property that is the result of parsing the content with the given JSON schema.
8
+ *
9
+ * Note: When `transform` is enabled (the default), the schema is deep-cloned before transformation,
10
+ * so the original schema object is not modified.
11
+ */
12
+ export declare function jsonSchemaOutputFormat<const Schema extends Exclude<JSONSchema, boolean> & {
13
+ type: 'object';
14
+ }>(jsonSchema: Schema, options?: {
15
+ transform?: boolean;
16
+ }): AutoParseableOutputFormat<NoInfer<FromSchema<Schema>>>;
17
+ export {};
18
+ //# sourceMappingURL=json-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../src/helpers/json-schema.ts"],"names":[],"mappings":"OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB;OACnD,EAAE,yBAAyB,EAAE;AAIpC,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAEhD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,CAAC,MAAM,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,EAEtE,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;IACR,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GACA,yBAAyB,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAyBxD"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.jsonSchemaOutputFormat = jsonSchemaOutputFormat;
4
+ const error_1 = require("../core/error.js");
5
+ const transform_json_schema_1 = require("../lib/transform-json-schema.js");
6
+ /**
7
+ * Creates a JSON schema output format object from the given JSON schema.
8
+ * If this is passed to the `.parse()` method then the response message will contain a
9
+ * `.parsed_output` property that is the result of parsing the content with the given JSON schema.
10
+ *
11
+ * Note: When `transform` is enabled (the default), the schema is deep-cloned before transformation,
12
+ * so the original schema object is not modified.
13
+ */
14
+ function jsonSchemaOutputFormat(jsonSchema, options) {
15
+ if (jsonSchema.type !== 'object') {
16
+ throw new Error(`JSON schema must be an object, but got ${jsonSchema.type}`);
17
+ }
18
+ const transform = options?.transform ?? true;
19
+ if (transform) {
20
+ jsonSchema = (0, transform_json_schema_1.transformJSONSchema)(jsonSchema);
21
+ }
22
+ return {
23
+ type: 'json_schema',
24
+ schema: {
25
+ ...jsonSchema,
26
+ },
27
+ parse: (content) => {
28
+ try {
29
+ return JSON.parse(content);
30
+ }
31
+ catch (error) {
32
+ throw new error_1.AnthropicError(`Failed to parse structured output: ${error instanceof Error ? error.message : String(error)}`);
33
+ }
34
+ },
35
+ };
36
+ }
37
+ //# sourceMappingURL=json-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema.js","sourceRoot":"","sources":["../src/helpers/json-schema.ts"],"names":[],"mappings":";;AAeA,wDAgCC;AA7CD,4CAA+C;AAC/C,2EAAmE;AAInE;;;;;;;GAOG;AACH,SAAgB,sBAAsB,CAGpC,UAAkB,EAClB,OAEC;IAED,IAAI,UAAU,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,0CAA0C,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED,MAAM,SAAS,GAAG,OAAO,EAAE,SAAS,IAAI,IAAI,CAAC;IAC7C,IAAI,SAAS,EAAE,CAAC;QACd,UAAU,GAAG,IAAA,2CAAmB,EAAC,UAAU,CAAW,CAAC;IACzD,CAAC;IAED,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE;YACN,GAAG,UAAU;SACd;QACD,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE;YACjB,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC7B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,sBAAc,CACtB,sCAAsC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC/F,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { AnthropicError } from "../core/error.mjs";
2
+ import { transformJSONSchema } from "../lib/transform-json-schema.mjs";
3
+ /**
4
+ * Creates a JSON schema output format object from the given JSON schema.
5
+ * If this is passed to the `.parse()` method then the response message will contain a
6
+ * `.parsed_output` property that is the result of parsing the content with the given JSON schema.
7
+ *
8
+ * Note: When `transform` is enabled (the default), the schema is deep-cloned before transformation,
9
+ * so the original schema object is not modified.
10
+ */
11
+ export function jsonSchemaOutputFormat(jsonSchema, options) {
12
+ if (jsonSchema.type !== 'object') {
13
+ throw new Error(`JSON schema must be an object, but got ${jsonSchema.type}`);
14
+ }
15
+ const transform = options?.transform ?? true;
16
+ if (transform) {
17
+ jsonSchema = transformJSONSchema(jsonSchema);
18
+ }
19
+ return {
20
+ type: 'json_schema',
21
+ schema: {
22
+ ...jsonSchema,
23
+ },
24
+ parse: (content) => {
25
+ try {
26
+ return JSON.parse(content);
27
+ }
28
+ catch (error) {
29
+ throw new AnthropicError(`Failed to parse structured output: ${error instanceof Error ? error.message : String(error)}`);
30
+ }
31
+ },
32
+ };
33
+ }
34
+ //# sourceMappingURL=json-schema.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema.mjs","sourceRoot":"","sources":["../src/helpers/json-schema.ts"],"names":[],"mappings":"OAEO,EAAE,cAAc,EAAE;OAClB,EAAE,mBAAmB,EAAE;AAI9B;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAGpC,UAAkB,EAClB,OAEC;IAED,IAAI,UAAU,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,0CAA0C,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED,MAAM,SAAS,GAAG,OAAO,EAAE,SAAS,IAAI,IAAI,CAAC;IAC7C,IAAI,SAAS,EAAE,CAAC;QACd,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAW,CAAC;IACzD,CAAC;IAED,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE;YACN,GAAG,UAAU;SACd;QACD,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE;YACjB,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC7B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,cAAc,CACtB,sCAAsC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC/F,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { infer as zodInfer, ZodType } from 'zod';
2
+ import { AutoParseableOutputFormat } from "../lib/parser.mjs";
3
+ /**
4
+ * Creates a JSON schema output format object from the given Zod schema.
5
+ *
6
+ * If this is passed to the `.parse()` method then the response message will contain a
7
+ * `.parsed_output` property that is the result of parsing the content with the given Zod object.
8
+ *
9
+ * This can be passed directly to the `.create()` method but will not
10
+ * result in any automatic parsing, you'll have to parse the response yourself.
11
+ */
12
+ export declare function zodOutputFormat<ZodInput extends ZodType>(zodObject: ZodInput): AutoParseableOutputFormat<zodInfer<ZodInput>>;
13
+ //# sourceMappingURL=zod.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod.d.mts","sourceRoot":"","sources":["../src/helpers/zod.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,KAAK,IAAI,QAAQ,EAAE,OAAO,EAAE,MAAM,KAAK;OAG9C,EAAE,yBAAyB,EAAE;AAEpC;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,QAAQ,SAAS,OAAO,EACtD,SAAS,EAAE,QAAQ,GAClB,yBAAyB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAwC/C"}
@@ -0,0 +1,13 @@
1
+ import type { infer as zodInfer, ZodType } from 'zod';
2
+ import { AutoParseableOutputFormat } from "../lib/parser.js";
3
+ /**
4
+ * Creates a JSON schema output format object from the given Zod schema.
5
+ *
6
+ * If this is passed to the `.parse()` method then the response message will contain a
7
+ * `.parsed_output` property that is the result of parsing the content with the given Zod object.
8
+ *
9
+ * This can be passed directly to the `.create()` method but will not
10
+ * result in any automatic parsing, you'll have to parse the response yourself.
11
+ */
12
+ export declare function zodOutputFormat<ZodInput extends ZodType>(zodObject: ZodInput): AutoParseableOutputFormat<zodInfer<ZodInput>>;
13
+ //# sourceMappingURL=zod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../src/helpers/zod.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,KAAK,IAAI,QAAQ,EAAE,OAAO,EAAE,MAAM,KAAK;OAG9C,EAAE,yBAAyB,EAAE;AAEpC;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,QAAQ,SAAS,OAAO,EACtD,SAAS,EAAE,QAAQ,GAClB,yBAAyB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAwC/C"}
package/helpers/zod.js ADDED
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.zodOutputFormat = zodOutputFormat;
4
+ const tslib_1 = require("../internal/tslib.js");
5
+ const transform_json_schema_1 = require("../lib/transform-json-schema.js");
6
+ const z = tslib_1.__importStar(require("zod/v4"));
7
+ const error_1 = require("../core/error.js");
8
+ /**
9
+ * Creates a JSON schema output format object from the given Zod schema.
10
+ *
11
+ * If this is passed to the `.parse()` method then the response message will contain a
12
+ * `.parsed_output` property that is the result of parsing the content with the given Zod object.
13
+ *
14
+ * This can be passed directly to the `.create()` method but will not
15
+ * result in any automatic parsing, you'll have to parse the response yourself.
16
+ */
17
+ function zodOutputFormat(zodObject) {
18
+ let jsonSchema = z.toJSONSchema(zodObject, { reused: 'ref' });
19
+ jsonSchema = (0, transform_json_schema_1.transformJSONSchema)(jsonSchema);
20
+ return {
21
+ type: 'json_schema',
22
+ schema: {
23
+ ...jsonSchema,
24
+ },
25
+ parse: (content) => {
26
+ let parsed;
27
+ try {
28
+ parsed = JSON.parse(content);
29
+ }
30
+ catch (error) {
31
+ throw new error_1.AnthropicError(`Failed to parse structured output as JSON: ${error instanceof Error ? error.message : String(error)}`);
32
+ }
33
+ const output = zodObject.safeParse(parsed);
34
+ if (!output.success) {
35
+ const formattedIssues = output.error.issues
36
+ .slice(0, 5)
37
+ .map((issue) => ` - ${issue.path.join('.')}: ${issue.message}`)
38
+ .join('\n');
39
+ const issueCount = output.error.issues.length;
40
+ const suffix = issueCount > 5 ? `\n ... and ${issueCount - 5} more issue(s)` : '';
41
+ throw new error_1.AnthropicError(`Failed to parse structured output: ${output.error.message}\nValidation issues:\n${formattedIssues}${suffix}`);
42
+ }
43
+ return output.data;
44
+ },
45
+ };
46
+ }
47
+ //# sourceMappingURL=zod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod.js","sourceRoot":"","sources":["../src/helpers/zod.ts"],"names":[],"mappings":";;AAeA,0CA0CC;;AAzDD,2EAAmE;AAEnE,kDAA4B;AAC5B,4CAA+C;AAG/C;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAC7B,SAAmB;IAEnB,IAAI,UAAU,GAAG,CAAC,CAAC,YAAY,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAE9D,UAAU,GAAG,IAAA,2CAAmB,EAAC,UAAU,CAAC,CAAC;IAE7C,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE;YACN,GAAG,UAAU;SACd;QACD,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE;YACjB,IAAI,MAAe,CAAC;YACpB,IAAI,CAAC;gBACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC/B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,sBAAc,CACtB,8CACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,CACH,CAAC;YACJ,CAAC;YAED,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAE3C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM;qBACxC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;qBACX,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;qBAC/D,IAAI,CAAC,IAAI,CAAC,CAAC;gBACd,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;gBAC9C,MAAM,MAAM,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,eAAe,UAAU,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;gBAEnF,MAAM,IAAI,sBAAc,CACtB,sCAAsC,MAAM,CAAC,KAAK,CAAC,OAAO,yBAAyB,eAAe,GAAG,MAAM,EAAE,CAC9G,CAAC;YACJ,CAAC;YAED,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { transformJSONSchema } from "../lib/transform-json-schema.mjs";
2
+ import * as z from 'zod/v4';
3
+ import { AnthropicError } from "../core/error.mjs";
4
+ /**
5
+ * Creates a JSON schema output format object from the given Zod schema.
6
+ *
7
+ * If this is passed to the `.parse()` method then the response message will contain a
8
+ * `.parsed_output` property that is the result of parsing the content with the given Zod object.
9
+ *
10
+ * This can be passed directly to the `.create()` method but will not
11
+ * result in any automatic parsing, you'll have to parse the response yourself.
12
+ */
13
+ export function zodOutputFormat(zodObject) {
14
+ let jsonSchema = z.toJSONSchema(zodObject, { reused: 'ref' });
15
+ jsonSchema = transformJSONSchema(jsonSchema);
16
+ return {
17
+ type: 'json_schema',
18
+ schema: {
19
+ ...jsonSchema,
20
+ },
21
+ parse: (content) => {
22
+ let parsed;
23
+ try {
24
+ parsed = JSON.parse(content);
25
+ }
26
+ catch (error) {
27
+ throw new AnthropicError(`Failed to parse structured output as JSON: ${error instanceof Error ? error.message : String(error)}`);
28
+ }
29
+ const output = zodObject.safeParse(parsed);
30
+ if (!output.success) {
31
+ const formattedIssues = output.error.issues
32
+ .slice(0, 5)
33
+ .map((issue) => ` - ${issue.path.join('.')}: ${issue.message}`)
34
+ .join('\n');
35
+ const issueCount = output.error.issues.length;
36
+ const suffix = issueCount > 5 ? `\n ... and ${issueCount - 5} more issue(s)` : '';
37
+ throw new AnthropicError(`Failed to parse structured output: ${output.error.message}\nValidation issues:\n${formattedIssues}${suffix}`);
38
+ }
39
+ return output.data;
40
+ },
41
+ };
42
+ }
43
+ //# sourceMappingURL=zod.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod.mjs","sourceRoot":"","sources":["../src/helpers/zod.ts"],"names":[],"mappings":"OAAO,EAAE,mBAAmB,EAAE;OAEvB,KAAK,CAAC,MAAM,QAAQ;OACpB,EAAE,cAAc,EAAE;AAGzB;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAC7B,SAAmB;IAEnB,IAAI,UAAU,GAAG,CAAC,CAAC,YAAY,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAE9D,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAE7C,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE;YACN,GAAG,UAAU;SACd;QACD,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE;YACjB,IAAI,MAAe,CAAC;YACpB,IAAI,CAAC;gBACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC/B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,cAAc,CACtB,8CACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,CACH,CAAC;YACJ,CAAC;YAED,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAE3C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM;qBACxC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;qBACX,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;qBAC/D,IAAI,CAAC,IAAI,CAAC,CAAC;gBACd,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;gBAC9C,MAAM,MAAM,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,eAAe,UAAU,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;gBAEnF,MAAM,IAAI,cAAc,CACtB,sCAAsC,MAAM,CAAC,KAAK,CAAC,OAAO,yBAAyB,eAAe,GAAG,MAAM,EAAE,CAC9G,CAAC;YACJ,CAAC;YAED,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;KACF,CAAC;AACJ,CAAC"}
package/index.d.mts ADDED
@@ -0,0 +1,9 @@
1
+ export { Anthropic as default } from "./client.mjs";
2
+ export { isAINativeModel, isClaudeModel, getBaseURLForModel, getApiKeyForModel, createTrackedFetch, } from "./ainative.mjs";
3
+ export { type Uploadable, toFile } from "./core/uploads.mjs";
4
+ export { APIPromise } from "./core/api-promise.mjs";
5
+ export { BaseAnthropic, Anthropic, type ClientOptions, HUMAN_PROMPT, AI_PROMPT } from "./client.mjs";
6
+ export { PagePromise } from "./core/pagination.mjs";
7
+ export { AnthropicError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./core/error.mjs";
8
+ export type { AutoParseableOutputFormat, ParsedMessage, ParsedContentBlock, ParseableMessageCreateParams, ExtractParsedContentFromParams, } from "./lib/parser.mjs";
9
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"OAEO,EAAE,SAAS,IAAI,OAAO,EAAE;OAGxB,EACL,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB;OAEM,EAAE,KAAK,UAAU,EAAE,MAAM,EAAE;OAC3B,EAAE,UAAU,EAAE;OACd,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE;OACzE,EAAE,WAAW,EAAE;OACf,EACL,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB;YAEW,EACV,yBAAyB,EACzB,aAAa,EACb,kBAAkB,EAClB,4BAA4B,EAC5B,8BAA8B,GAC/B"}
package/index.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ export { Anthropic as default } from "./client.js";
2
+ export { isAINativeModel, isClaudeModel, getBaseURLForModel, getApiKeyForModel, createTrackedFetch, } from "./ainative.js";
3
+ export { type Uploadable, toFile } from "./core/uploads.js";
4
+ export { APIPromise } from "./core/api-promise.js";
5
+ export { BaseAnthropic, Anthropic, type ClientOptions, HUMAN_PROMPT, AI_PROMPT } from "./client.js";
6
+ export { PagePromise } from "./core/pagination.js";
7
+ export { AnthropicError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./core/error.js";
8
+ export type { AutoParseableOutputFormat, ParsedMessage, ParsedContentBlock, ParseableMessageCreateParams, ExtractParsedContentFromParams, } from "./lib/parser.js";
9
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"OAEO,EAAE,SAAS,IAAI,OAAO,EAAE;OAGxB,EACL,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB;OAEM,EAAE,KAAK,UAAU,EAAE,MAAM,EAAE;OAC3B,EAAE,UAAU,EAAE;OACd,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE;OACzE,EAAE,WAAW,EAAE;OACf,EACL,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB;YAEW,EACV,yBAAyB,EACzB,aAAa,EACb,kBAAkB,EAClB,4BAA4B,EAC5B,8BAA8B,GAC/B"}
package/index.js ADDED
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ exports = module.exports = function (...args) {
4
+ return new exports.default(...args)
5
+ }
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.UnprocessableEntityError = exports.PermissionDeniedError = exports.InternalServerError = exports.AuthenticationError = exports.BadRequestError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.APIUserAbortError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIError = exports.AnthropicError = exports.PagePromise = exports.AI_PROMPT = exports.HUMAN_PROMPT = exports.Anthropic = exports.BaseAnthropic = exports.APIPromise = exports.toFile = exports.createTrackedFetch = exports.getApiKeyForModel = exports.getBaseURLForModel = exports.isClaudeModel = exports.isAINativeModel = exports.default = void 0;
8
+ var client_1 = require("./client.js");
9
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return client_1.Anthropic; } });
10
+ // AINative Cody SDK extensions
11
+ var ainative_1 = require("./ainative.js");
12
+ Object.defineProperty(exports, "isAINativeModel", { enumerable: true, get: function () { return ainative_1.isAINativeModel; } });
13
+ Object.defineProperty(exports, "isClaudeModel", { enumerable: true, get: function () { return ainative_1.isClaudeModel; } });
14
+ Object.defineProperty(exports, "getBaseURLForModel", { enumerable: true, get: function () { return ainative_1.getBaseURLForModel; } });
15
+ Object.defineProperty(exports, "getApiKeyForModel", { enumerable: true, get: function () { return ainative_1.getApiKeyForModel; } });
16
+ Object.defineProperty(exports, "createTrackedFetch", { enumerable: true, get: function () { return ainative_1.createTrackedFetch; } });
17
+ var uploads_1 = require("./core/uploads.js");
18
+ Object.defineProperty(exports, "toFile", { enumerable: true, get: function () { return uploads_1.toFile; } });
19
+ var api_promise_1 = require("./core/api-promise.js");
20
+ Object.defineProperty(exports, "APIPromise", { enumerable: true, get: function () { return api_promise_1.APIPromise; } });
21
+ var client_2 = require("./client.js");
22
+ Object.defineProperty(exports, "BaseAnthropic", { enumerable: true, get: function () { return client_2.BaseAnthropic; } });
23
+ Object.defineProperty(exports, "Anthropic", { enumerable: true, get: function () { return client_2.Anthropic; } });
24
+ Object.defineProperty(exports, "HUMAN_PROMPT", { enumerable: true, get: function () { return client_2.HUMAN_PROMPT; } });
25
+ Object.defineProperty(exports, "AI_PROMPT", { enumerable: true, get: function () { return client_2.AI_PROMPT; } });
26
+ var pagination_1 = require("./core/pagination.js");
27
+ Object.defineProperty(exports, "PagePromise", { enumerable: true, get: function () { return pagination_1.PagePromise; } });
28
+ var error_1 = require("./core/error.js");
29
+ Object.defineProperty(exports, "AnthropicError", { enumerable: true, get: function () { return error_1.AnthropicError; } });
30
+ Object.defineProperty(exports, "APIError", { enumerable: true, get: function () { return error_1.APIError; } });
31
+ Object.defineProperty(exports, "APIConnectionError", { enumerable: true, get: function () { return error_1.APIConnectionError; } });
32
+ Object.defineProperty(exports, "APIConnectionTimeoutError", { enumerable: true, get: function () { return error_1.APIConnectionTimeoutError; } });
33
+ Object.defineProperty(exports, "APIUserAbortError", { enumerable: true, get: function () { return error_1.APIUserAbortError; } });
34
+ Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return error_1.NotFoundError; } });
35
+ Object.defineProperty(exports, "ConflictError", { enumerable: true, get: function () { return error_1.ConflictError; } });
36
+ Object.defineProperty(exports, "RateLimitError", { enumerable: true, get: function () { return error_1.RateLimitError; } });
37
+ Object.defineProperty(exports, "BadRequestError", { enumerable: true, get: function () { return error_1.BadRequestError; } });
38
+ Object.defineProperty(exports, "AuthenticationError", { enumerable: true, get: function () { return error_1.AuthenticationError; } });
39
+ Object.defineProperty(exports, "InternalServerError", { enumerable: true, get: function () { return error_1.InternalServerError; } });
40
+ Object.defineProperty(exports, "PermissionDeniedError", { enumerable: true, get: function () { return error_1.PermissionDeniedError; } });
41
+ Object.defineProperty(exports, "UnprocessableEntityError", { enumerable: true, get: function () { return error_1.UnprocessableEntityError; } });
42
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAAgD;AAAvC,iGAAA,SAAS,OAAW;AAE7B,+BAA+B;AAC/B,0CAMoB;AALlB,2GAAA,eAAe,OAAA;AACf,yGAAA,aAAa,OAAA;AACb,8GAAA,kBAAkB,OAAA;AAClB,6GAAA,iBAAiB,OAAA;AACjB,8GAAA,kBAAkB,OAAA;AAGpB,6CAAyD;AAA/B,iGAAA,MAAM,OAAA;AAChC,qDAAgD;AAAvC,yGAAA,UAAU,OAAA;AACnB,sCAAiG;AAAxF,uGAAA,aAAa,OAAA;AAAE,mGAAA,SAAS,OAAA;AAAsB,sGAAA,YAAY,OAAA;AAAE,mGAAA,SAAS,OAAA;AAC9E,mDAAgD;AAAvC,yGAAA,WAAW,OAAA;AACpB,yCAcsB;AAbpB,uGAAA,cAAc,OAAA;AACd,iGAAA,QAAQ,OAAA;AACR,2GAAA,kBAAkB,OAAA;AAClB,kHAAA,yBAAyB,OAAA;AACzB,0GAAA,iBAAiB,OAAA;AACjB,sGAAA,aAAa,OAAA;AACb,sGAAA,aAAa,OAAA;AACb,uGAAA,cAAc,OAAA;AACd,wGAAA,eAAe,OAAA;AACf,4GAAA,mBAAmB,OAAA;AACnB,4GAAA,mBAAmB,OAAA;AACnB,8GAAA,qBAAqB,OAAA;AACrB,iHAAA,wBAAwB,OAAA"}
package/index.mjs ADDED
@@ -0,0 +1,9 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { Anthropic as default } from "./client.mjs";
3
+ export { isAINativeModel, isClaudeModel, getBaseURLForModel, getApiKeyForModel, createTrackedFetch, } from "./ainative.mjs";
4
+ export { toFile } from "./core/uploads.mjs";
5
+ export { APIPromise } from "./core/api-promise.mjs";
6
+ export { BaseAnthropic, Anthropic, HUMAN_PROMPT, AI_PROMPT } from "./client.mjs";
7
+ export { PagePromise } from "./core/pagination.mjs";
8
+ export { AnthropicError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./core/error.mjs";
9
+ //# sourceMappingURL=index.mjs.map
package/index.mjs.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,SAAS,IAAI,OAAO,EAAE;OAGxB,EACL,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB;OAEM,EAAmB,MAAM,EAAE;OAC3B,EAAE,UAAU,EAAE;OACd,EAAE,aAAa,EAAE,SAAS,EAAsB,YAAY,EAAE,SAAS,EAAE;OACzE,EAAE,WAAW,EAAE;OACf,EACL,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB"}
@@ -0,0 +1,73 @@
1
+ export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
2
+ /**
3
+ * An alias to the builtin `RequestInit` type so we can
4
+ * easily alias it in import statements if there are name clashes.
5
+ *
6
+ * https://developer.mozilla.org/docs/Web/API/RequestInit
7
+ */
8
+ type _RequestInit = RequestInit;
9
+ /**
10
+ * An alias to the builtin `Response` type so we can
11
+ * easily alias it in import statements if there are name clashes.
12
+ *
13
+ * https://developer.mozilla.org/docs/Web/API/Response
14
+ */
15
+ type _Response = Response;
16
+ /**
17
+ * The type for the first argument to `fetch`.
18
+ *
19
+ * https://developer.mozilla.org/docs/Web/API/Window/fetch#resource
20
+ */
21
+ type _RequestInfo = Request | URL | string;
22
+ /**
23
+ * The type for constructing `RequestInit` Headers.
24
+ *
25
+ * https://developer.mozilla.org/docs/Web/API/RequestInit#setting_headers
26
+ */
27
+ type _HeadersInit = RequestInit['headers'];
28
+ /**
29
+ * The type for constructing `RequestInit` body.
30
+ *
31
+ * https://developer.mozilla.org/docs/Web/API/RequestInit#body
32
+ */
33
+ type _BodyInit = RequestInit['body'];
34
+ /**
35
+ * An alias to the builtin `Array<T>` type so we can
36
+ * easily alias it in import statements if there are name clashes.
37
+ */
38
+ type _Array<T> = Array<T>;
39
+ /**
40
+ * An alias to the builtin `Record<K, T>` type so we can
41
+ * easily alias it in import statements if there are name clashes.
42
+ */
43
+ type _Record<K extends keyof any, T> = Record<K, T>;
44
+ export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response, };
45
+ /**
46
+ * A copy of the builtin `EndingType` type as it isn't fully supported in certain
47
+ * environments and attempting to reference the global version will error.
48
+ *
49
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L27941
50
+ */
51
+ type EndingType = 'native' | 'transparent';
52
+ /**
53
+ * A copy of the builtin `BlobPropertyBag` type as it isn't fully supported in certain
54
+ * environments and attempting to reference the global version will error.
55
+ *
56
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L154
57
+ * https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#options
58
+ */
59
+ export interface BlobPropertyBag {
60
+ endings?: EndingType;
61
+ type?: string;
62
+ }
63
+ /**
64
+ * A copy of the builtin `FilePropertyBag` type as it isn't fully supported in certain
65
+ * environments and attempting to reference the global version will error.
66
+ *
67
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L503
68
+ * https://developer.mozilla.org/en-US/docs/Web/API/File/File#options
69
+ */
70
+ export interface FilePropertyBag extends BlobPropertyBag {
71
+ lastModified?: number;
72
+ }
73
+ //# sourceMappingURL=builtin-types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin-types.d.mts","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE7F;;;;;GAKG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC;AAEhC;;;;;GAKG;AACH,KAAK,SAAS,GAAG,QAAQ,CAAC;AAE1B;;;;GAIG;AACH,KAAK,YAAY,GAAG,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC;AAE3C;;;;GAIG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAE3C;;;;GAIG;AACH,KAAK,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAErC;;;GAGG;AACH,KAAK,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAE1B;;;GAGG;AACH,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEpD,YAAY,EACV,MAAM,IAAI,KAAK,EACf,SAAS,IAAI,QAAQ,EACrB,YAAY,IAAI,WAAW,EAC3B,OAAO,IAAI,MAAM,EACjB,YAAY,IAAI,WAAW,EAC3B,YAAY,IAAI,WAAW,EAC3B,SAAS,IAAI,QAAQ,GACtB,CAAC;AAEF;;;;;GAKG;AACH,KAAK,UAAU,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,73 @@
1
+ export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
2
+ /**
3
+ * An alias to the builtin `RequestInit` type so we can
4
+ * easily alias it in import statements if there are name clashes.
5
+ *
6
+ * https://developer.mozilla.org/docs/Web/API/RequestInit
7
+ */
8
+ type _RequestInit = RequestInit;
9
+ /**
10
+ * An alias to the builtin `Response` type so we can
11
+ * easily alias it in import statements if there are name clashes.
12
+ *
13
+ * https://developer.mozilla.org/docs/Web/API/Response
14
+ */
15
+ type _Response = Response;
16
+ /**
17
+ * The type for the first argument to `fetch`.
18
+ *
19
+ * https://developer.mozilla.org/docs/Web/API/Window/fetch#resource
20
+ */
21
+ type _RequestInfo = Request | URL | string;
22
+ /**
23
+ * The type for constructing `RequestInit` Headers.
24
+ *
25
+ * https://developer.mozilla.org/docs/Web/API/RequestInit#setting_headers
26
+ */
27
+ type _HeadersInit = RequestInit['headers'];
28
+ /**
29
+ * The type for constructing `RequestInit` body.
30
+ *
31
+ * https://developer.mozilla.org/docs/Web/API/RequestInit#body
32
+ */
33
+ type _BodyInit = RequestInit['body'];
34
+ /**
35
+ * An alias to the builtin `Array<T>` type so we can
36
+ * easily alias it in import statements if there are name clashes.
37
+ */
38
+ type _Array<T> = Array<T>;
39
+ /**
40
+ * An alias to the builtin `Record<K, T>` type so we can
41
+ * easily alias it in import statements if there are name clashes.
42
+ */
43
+ type _Record<K extends keyof any, T> = Record<K, T>;
44
+ export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response, };
45
+ /**
46
+ * A copy of the builtin `EndingType` type as it isn't fully supported in certain
47
+ * environments and attempting to reference the global version will error.
48
+ *
49
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L27941
50
+ */
51
+ type EndingType = 'native' | 'transparent';
52
+ /**
53
+ * A copy of the builtin `BlobPropertyBag` type as it isn't fully supported in certain
54
+ * environments and attempting to reference the global version will error.
55
+ *
56
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L154
57
+ * https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#options
58
+ */
59
+ export interface BlobPropertyBag {
60
+ endings?: EndingType;
61
+ type?: string;
62
+ }
63
+ /**
64
+ * A copy of the builtin `FilePropertyBag` type as it isn't fully supported in certain
65
+ * environments and attempting to reference the global version will error.
66
+ *
67
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L503
68
+ * https://developer.mozilla.org/en-US/docs/Web/API/File/File#options
69
+ */
70
+ export interface FilePropertyBag extends BlobPropertyBag {
71
+ lastModified?: number;
72
+ }
73
+ //# sourceMappingURL=builtin-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin-types.d.ts","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE7F;;;;;GAKG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC;AAEhC;;;;;GAKG;AACH,KAAK,SAAS,GAAG,QAAQ,CAAC;AAE1B;;;;GAIG;AACH,KAAK,YAAY,GAAG,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC;AAE3C;;;;GAIG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAE3C;;;;GAIG;AACH,KAAK,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAErC;;;GAGG;AACH,KAAK,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAE1B;;;GAGG;AACH,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEpD,YAAY,EACV,MAAM,IAAI,KAAK,EACf,SAAS,IAAI,QAAQ,EACrB,YAAY,IAAI,WAAW,EAC3B,OAAO,IAAI,MAAM,EACjB,YAAY,IAAI,WAAW,EAC3B,YAAY,IAAI,WAAW,EAC3B,SAAS,IAAI,QAAQ,GACtB,CAAC;AAEF;;;;;GAKG;AACH,KAAK,UAAU,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=builtin-types.js.map