@llamaindex/llama-cloud 2.4.1 → 2.9.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 (362) hide show
  1. package/CHANGELOG.md +115 -0
  2. package/api-promise.d.mts +1 -0
  3. package/api-promise.d.mts.map +1 -1
  4. package/api-promise.d.ts +1 -0
  5. package/api-promise.d.ts.map +1 -1
  6. package/api-promise.mjs +1 -0
  7. package/api-promise.mjs.map +1 -1
  8. package/client.d.mts +5 -2
  9. package/client.d.mts.map +1 -1
  10. package/client.d.ts +5 -2
  11. package/client.d.ts.map +1 -1
  12. package/client.js +14 -0
  13. package/client.js.map +1 -1
  14. package/client.mjs +14 -0
  15. package/client.mjs.map +1 -1
  16. package/core/api-promise.d.mts.map +1 -1
  17. package/core/api-promise.d.ts.map +1 -1
  18. package/core/api-promise.mjs.map +1 -1
  19. package/core/error.mjs.map +1 -1
  20. package/core/pagination.d.mts.map +1 -1
  21. package/core/pagination.d.ts.map +1 -1
  22. package/core/pagination.mjs.map +1 -1
  23. package/core/resource.d.mts.map +1 -1
  24. package/core/resource.d.ts.map +1 -1
  25. package/core/uploads.d.mts.map +1 -1
  26. package/core/uploads.d.ts.map +1 -1
  27. package/core/uploads.mjs.map +1 -1
  28. package/error.d.mts +1 -0
  29. package/error.d.mts.map +1 -1
  30. package/error.d.ts +1 -0
  31. package/error.d.ts.map +1 -1
  32. package/error.mjs +1 -0
  33. package/error.mjs.map +1 -1
  34. package/index.d.mts.map +1 -1
  35. package/index.d.ts.map +1 -1
  36. package/index.mjs.map +1 -1
  37. package/internal/detect-platform.mjs.map +1 -1
  38. package/internal/headers.mjs.map +1 -1
  39. package/internal/parse.d.mts.map +1 -1
  40. package/internal/parse.d.ts.map +1 -1
  41. package/internal/parse.mjs.map +1 -1
  42. package/internal/qs/formats.d.mts.map +1 -1
  43. package/internal/qs/formats.d.ts.map +1 -1
  44. package/internal/qs/index.d.mts +2 -2
  45. package/internal/qs/index.d.mts.map +1 -1
  46. package/internal/qs/index.d.ts +2 -2
  47. package/internal/qs/index.d.ts.map +1 -1
  48. package/internal/qs/index.mjs.map +1 -1
  49. package/internal/qs/stringify.d.mts.map +1 -1
  50. package/internal/qs/stringify.d.ts.map +1 -1
  51. package/internal/qs/stringify.mjs.map +1 -1
  52. package/internal/qs/utils.d.mts.map +1 -1
  53. package/internal/qs/utils.d.ts.map +1 -1
  54. package/internal/qs/utils.mjs.map +1 -1
  55. package/internal/request-options.d.mts.map +1 -1
  56. package/internal/request-options.d.ts.map +1 -1
  57. package/internal/shims.d.mts +6 -0
  58. package/internal/shims.d.mts.map +1 -1
  59. package/internal/shims.d.ts +6 -0
  60. package/internal/shims.d.ts.map +1 -1
  61. package/internal/to-file.d.mts.map +1 -1
  62. package/internal/to-file.d.ts.map +1 -1
  63. package/internal/to-file.mjs.map +1 -1
  64. package/internal/types.d.mts +10 -10
  65. package/internal/types.d.mts.map +1 -1
  66. package/internal/types.d.ts +10 -10
  67. package/internal/types.d.ts.map +1 -1
  68. package/internal/uploads.d.mts.map +1 -1
  69. package/internal/uploads.d.ts.map +1 -1
  70. package/internal/uploads.mjs.map +1 -1
  71. package/internal/utils/base64.mjs.map +1 -1
  72. package/internal/utils/log.d.mts.map +1 -1
  73. package/internal/utils/log.d.ts.map +1 -1
  74. package/internal/utils/log.js +2 -0
  75. package/internal/utils/log.js.map +1 -1
  76. package/internal/utils/log.mjs +2 -0
  77. package/internal/utils/log.mjs.map +1 -1
  78. package/internal/utils/path.mjs.map +1 -1
  79. package/internal/utils/query.mjs.map +1 -1
  80. package/internal/utils/values.mjs.map +1 -1
  81. package/internal/utils.d.mts.map +1 -1
  82. package/internal/utils.d.ts.map +1 -1
  83. package/internal/utils.mjs.map +1 -1
  84. package/package.json +2 -2
  85. package/pagination.d.mts +1 -0
  86. package/pagination.d.mts.map +1 -1
  87. package/pagination.d.ts +1 -0
  88. package/pagination.d.ts.map +1 -1
  89. package/pagination.mjs +1 -0
  90. package/pagination.mjs.map +1 -1
  91. package/resource.d.mts +1 -0
  92. package/resource.d.mts.map +1 -1
  93. package/resource.d.ts +1 -0
  94. package/resource.d.ts.map +1 -1
  95. package/resource.mjs +1 -0
  96. package/resource.mjs.map +1 -1
  97. package/resources/batches.d.mts +491 -0
  98. package/resources/batches.d.mts.map +1 -0
  99. package/resources/batches.d.ts +491 -0
  100. package/resources/batches.d.ts.map +1 -0
  101. package/resources/batches.js +60 -0
  102. package/resources/batches.js.map +1 -0
  103. package/resources/batches.mjs +56 -0
  104. package/resources/batches.mjs.map +1 -0
  105. package/resources/beta/agent-data.d.mts.map +1 -1
  106. package/resources/beta/agent-data.d.ts.map +1 -1
  107. package/resources/beta/agent-data.mjs.map +1 -1
  108. package/resources/beta/batch/batch.d.mts +1 -1
  109. package/resources/beta/batch/batch.d.mts.map +1 -1
  110. package/resources/beta/batch/batch.d.ts +1 -1
  111. package/resources/beta/batch/batch.d.ts.map +1 -1
  112. package/resources/beta/batch/batch.js.map +1 -1
  113. package/resources/beta/batch/batch.mjs.map +1 -1
  114. package/resources/beta/batch/index.d.mts.map +1 -1
  115. package/resources/beta/batch/index.d.ts.map +1 -1
  116. package/resources/beta/batch/index.mjs.map +1 -1
  117. package/resources/beta/batch/job-items.d.mts +1 -1
  118. package/resources/beta/batch/job-items.d.mts.map +1 -1
  119. package/resources/beta/batch/job-items.d.ts +1 -1
  120. package/resources/beta/batch/job-items.d.ts.map +1 -1
  121. package/resources/beta/batch/job-items.mjs.map +1 -1
  122. package/resources/beta/batch.d.mts.map +1 -1
  123. package/resources/beta/batch.d.ts.map +1 -1
  124. package/resources/beta/batch.mjs.map +1 -1
  125. package/resources/beta/beta.d.mts +12 -0
  126. package/resources/beta/beta.d.mts.map +1 -1
  127. package/resources/beta/beta.d.ts +12 -0
  128. package/resources/beta/beta.d.ts.map +1 -1
  129. package/resources/beta/beta.js +12 -0
  130. package/resources/beta/beta.js.map +1 -1
  131. package/resources/beta/beta.mjs +12 -0
  132. package/resources/beta/beta.mjs.map +1 -1
  133. package/resources/beta/chat.d.mts +357 -0
  134. package/resources/beta/chat.d.mts.map +1 -0
  135. package/resources/beta/chat.d.ts +357 -0
  136. package/resources/beta/chat.d.ts.map +1 -0
  137. package/resources/beta/chat.js +101 -0
  138. package/resources/beta/chat.js.map +1 -0
  139. package/resources/beta/chat.mjs +97 -0
  140. package/resources/beta/chat.mjs.map +1 -0
  141. package/resources/beta/directories/directories.d.mts +72 -24
  142. package/resources/beta/directories/directories.d.mts.map +1 -1
  143. package/resources/beta/directories/directories.d.ts +72 -24
  144. package/resources/beta/directories/directories.d.ts.map +1 -1
  145. package/resources/beta/directories/directories.js +0 -3
  146. package/resources/beta/directories/directories.js.map +1 -1
  147. package/resources/beta/directories/directories.mjs +0 -3
  148. package/resources/beta/directories/directories.mjs.map +1 -1
  149. package/resources/beta/directories/files.d.mts +65 -57
  150. package/resources/beta/directories/files.d.mts.map +1 -1
  151. package/resources/beta/directories/files.d.ts +65 -57
  152. package/resources/beta/directories/files.d.ts.map +1 -1
  153. package/resources/beta/directories/files.js +14 -27
  154. package/resources/beta/directories/files.js.map +1 -1
  155. package/resources/beta/directories/files.mjs +14 -27
  156. package/resources/beta/directories/files.mjs.map +1 -1
  157. package/resources/beta/directories/index.d.mts.map +1 -1
  158. package/resources/beta/directories/index.d.ts.map +1 -1
  159. package/resources/beta/directories/index.mjs.map +1 -1
  160. package/resources/beta/directories.d.mts.map +1 -1
  161. package/resources/beta/directories.d.ts.map +1 -1
  162. package/resources/beta/directories.mjs.map +1 -1
  163. package/resources/beta/index.d.mts +3 -0
  164. package/resources/beta/index.d.mts.map +1 -1
  165. package/resources/beta/index.d.ts +3 -0
  166. package/resources/beta/index.d.ts.map +1 -1
  167. package/resources/beta/index.js +7 -1
  168. package/resources/beta/index.js.map +1 -1
  169. package/resources/beta/index.mjs +3 -0
  170. package/resources/beta/index.mjs.map +1 -1
  171. package/resources/beta/indexes.d.mts +311 -0
  172. package/resources/beta/indexes.d.mts.map +1 -0
  173. package/resources/beta/indexes.d.ts +311 -0
  174. package/resources/beta/indexes.d.ts.map +1 -0
  175. package/resources/beta/indexes.js +86 -0
  176. package/resources/beta/indexes.js.map +1 -0
  177. package/resources/beta/indexes.mjs +82 -0
  178. package/resources/beta/indexes.mjs.map +1 -0
  179. package/resources/beta/retrieval.d.mts +368 -0
  180. package/resources/beta/retrieval.d.mts.map +1 -0
  181. package/resources/beta/retrieval.d.ts +368 -0
  182. package/resources/beta/retrieval.d.ts.map +1 -0
  183. package/resources/beta/retrieval.js +87 -0
  184. package/resources/beta/retrieval.js.map +1 -0
  185. package/resources/beta/retrieval.mjs +83 -0
  186. package/resources/beta/retrieval.mjs.map +1 -0
  187. package/resources/beta/sheets.d.mts +125 -25
  188. package/resources/beta/sheets.d.mts.map +1 -1
  189. package/resources/beta/sheets.d.ts +125 -25
  190. package/resources/beta/sheets.d.ts.map +1 -1
  191. package/resources/beta/sheets.js +16 -17
  192. package/resources/beta/sheets.js.map +1 -1
  193. package/resources/beta/sheets.mjs +16 -17
  194. package/resources/beta/sheets.mjs.map +1 -1
  195. package/resources/beta/split.d.mts.map +1 -1
  196. package/resources/beta/split.d.ts.map +1 -1
  197. package/resources/beta/split.mjs.map +1 -1
  198. package/resources/beta.d.mts.map +1 -1
  199. package/resources/beta.d.ts.map +1 -1
  200. package/resources/beta.mjs.map +1 -1
  201. package/resources/classifier/classifier.d.mts.map +1 -1
  202. package/resources/classifier/classifier.d.ts.map +1 -1
  203. package/resources/classifier/classifier.mjs.map +1 -1
  204. package/resources/classifier/index.d.mts.map +1 -1
  205. package/resources/classifier/index.d.ts.map +1 -1
  206. package/resources/classifier/index.mjs.map +1 -1
  207. package/resources/classifier/jobs.d.mts +13 -10
  208. package/resources/classifier/jobs.d.mts.map +1 -1
  209. package/resources/classifier/jobs.d.ts +13 -10
  210. package/resources/classifier/jobs.d.ts.map +1 -1
  211. package/resources/classifier/jobs.js +5 -8
  212. package/resources/classifier/jobs.js.map +1 -1
  213. package/resources/classifier/jobs.mjs +5 -8
  214. package/resources/classifier/jobs.mjs.map +1 -1
  215. package/resources/classifier.d.mts.map +1 -1
  216. package/resources/classifier.d.ts.map +1 -1
  217. package/resources/classifier.mjs.map +1 -1
  218. package/resources/classify.d.mts +60 -0
  219. package/resources/classify.d.mts.map +1 -1
  220. package/resources/classify.d.ts +60 -0
  221. package/resources/classify.d.ts.map +1 -1
  222. package/resources/classify.mjs.map +1 -1
  223. package/resources/configurations.d.mts +69 -16
  224. package/resources/configurations.d.mts.map +1 -1
  225. package/resources/configurations.d.ts +69 -16
  226. package/resources/configurations.d.ts.map +1 -1
  227. package/resources/configurations.js +2 -4
  228. package/resources/configurations.js.map +1 -1
  229. package/resources/configurations.mjs +2 -4
  230. package/resources/configurations.mjs.map +1 -1
  231. package/resources/data-sinks.d.mts.map +1 -1
  232. package/resources/data-sinks.d.ts.map +1 -1
  233. package/resources/data-sinks.mjs.map +1 -1
  234. package/resources/data-sources.d.mts.map +1 -1
  235. package/resources/data-sources.d.ts.map +1 -1
  236. package/resources/data-sources.mjs.map +1 -1
  237. package/resources/extract.d.mts +7 -14
  238. package/resources/extract.d.mts.map +1 -1
  239. package/resources/extract.d.ts +7 -14
  240. package/resources/extract.d.ts.map +1 -1
  241. package/resources/extract.mjs.map +1 -1
  242. package/resources/files.d.mts +19 -56
  243. package/resources/files.d.mts.map +1 -1
  244. package/resources/files.d.ts +19 -56
  245. package/resources/files.d.ts.map +1 -1
  246. package/resources/files.js +1 -8
  247. package/resources/files.js.map +1 -1
  248. package/resources/files.mjs +1 -8
  249. package/resources/files.mjs.map +1 -1
  250. package/resources/index.d.mts +2 -1
  251. package/resources/index.d.mts.map +1 -1
  252. package/resources/index.d.ts +2 -1
  253. package/resources/index.d.ts.map +1 -1
  254. package/resources/index.js +3 -1
  255. package/resources/index.js.map +1 -1
  256. package/resources/index.mjs +1 -0
  257. package/resources/index.mjs.map +1 -1
  258. package/resources/parsing.d.mts +70 -11
  259. package/resources/parsing.d.mts.map +1 -1
  260. package/resources/parsing.d.ts +70 -11
  261. package/resources/parsing.d.ts.map +1 -1
  262. package/resources/parsing.mjs.map +1 -1
  263. package/resources/pipelines/data-sources.d.mts +2 -2
  264. package/resources/pipelines/data-sources.d.mts.map +1 -1
  265. package/resources/pipelines/data-sources.d.ts +2 -2
  266. package/resources/pipelines/data-sources.d.ts.map +1 -1
  267. package/resources/pipelines/data-sources.js +2 -2
  268. package/resources/pipelines/data-sources.mjs +2 -2
  269. package/resources/pipelines/data-sources.mjs.map +1 -1
  270. package/resources/pipelines/documents.d.mts +2 -4
  271. package/resources/pipelines/documents.d.mts.map +1 -1
  272. package/resources/pipelines/documents.d.ts +2 -4
  273. package/resources/pipelines/documents.d.ts.map +1 -1
  274. package/resources/pipelines/documents.js +2 -4
  275. package/resources/pipelines/documents.js.map +1 -1
  276. package/resources/pipelines/documents.mjs +2 -4
  277. package/resources/pipelines/documents.mjs.map +1 -1
  278. package/resources/pipelines/files.d.mts.map +1 -1
  279. package/resources/pipelines/files.d.ts.map +1 -1
  280. package/resources/pipelines/files.mjs.map +1 -1
  281. package/resources/pipelines/images.d.mts.map +1 -1
  282. package/resources/pipelines/images.d.ts.map +1 -1
  283. package/resources/pipelines/images.mjs.map +1 -1
  284. package/resources/pipelines/index.d.mts.map +1 -1
  285. package/resources/pipelines/index.d.ts.map +1 -1
  286. package/resources/pipelines/index.mjs.map +1 -1
  287. package/resources/pipelines/metadata.d.mts.map +1 -1
  288. package/resources/pipelines/metadata.d.ts.map +1 -1
  289. package/resources/pipelines/metadata.mjs.map +1 -1
  290. package/resources/pipelines/pipelines.d.mts +1 -1
  291. package/resources/pipelines/pipelines.d.mts.map +1 -1
  292. package/resources/pipelines/pipelines.d.ts +1 -1
  293. package/resources/pipelines/pipelines.d.ts.map +1 -1
  294. package/resources/pipelines/pipelines.js.map +1 -1
  295. package/resources/pipelines/pipelines.mjs.map +1 -1
  296. package/resources/pipelines/sync.d.mts.map +1 -1
  297. package/resources/pipelines/sync.d.ts.map +1 -1
  298. package/resources/pipelines/sync.mjs.map +1 -1
  299. package/resources/pipelines.d.mts.map +1 -1
  300. package/resources/pipelines.d.ts.map +1 -1
  301. package/resources/pipelines.mjs.map +1 -1
  302. package/resources/projects.d.mts +0 -1
  303. package/resources/projects.d.mts.map +1 -1
  304. package/resources/projects.d.ts +0 -1
  305. package/resources/projects.d.ts.map +1 -1
  306. package/resources/projects.mjs.map +1 -1
  307. package/resources/retrievers/index.d.mts.map +1 -1
  308. package/resources/retrievers/index.d.ts.map +1 -1
  309. package/resources/retrievers/index.mjs.map +1 -1
  310. package/resources/retrievers/retriever.d.mts.map +1 -1
  311. package/resources/retrievers/retriever.d.ts.map +1 -1
  312. package/resources/retrievers/retriever.mjs.map +1 -1
  313. package/resources/retrievers/retrievers.d.mts.map +1 -1
  314. package/resources/retrievers/retrievers.d.ts.map +1 -1
  315. package/resources/retrievers/retrievers.mjs.map +1 -1
  316. package/resources/retrievers.d.mts.map +1 -1
  317. package/resources/retrievers.d.ts.map +1 -1
  318. package/resources/retrievers.mjs.map +1 -1
  319. package/resources/shared.d.mts +1 -1
  320. package/resources/shared.d.mts.map +1 -1
  321. package/resources/shared.d.ts +1 -1
  322. package/resources/shared.d.ts.map +1 -1
  323. package/resources.d.mts.map +1 -1
  324. package/resources.d.ts.map +1 -1
  325. package/resources.mjs.map +1 -1
  326. package/src/client.ts +35 -2
  327. package/src/internal/types.ts +6 -8
  328. package/src/internal/utils/log.ts +2 -0
  329. package/src/resources/batches.ts +587 -0
  330. package/src/resources/beta/batch/batch.ts +6 -0
  331. package/src/resources/beta/batch/job-items.ts +6 -0
  332. package/src/resources/beta/beta.ts +94 -0
  333. package/src/resources/beta/chat.ts +523 -0
  334. package/src/resources/beta/directories/directories.ts +77 -29
  335. package/src/resources/beta/directories/files.ts +73 -60
  336. package/src/resources/beta/index.ts +41 -0
  337. package/src/resources/beta/indexes.ts +421 -0
  338. package/src/resources/beta/retrieval.ts +483 -0
  339. package/src/resources/beta/sheets.ts +185 -25
  340. package/src/resources/classifier/jobs.ts +14 -10
  341. package/src/resources/classify.ts +114 -0
  342. package/src/resources/configurations.ts +74 -99
  343. package/src/resources/extract.ts +18 -15
  344. package/src/resources/files.ts +22 -60
  345. package/src/resources/index.ts +10 -1
  346. package/src/resources/parsing.ts +78 -93
  347. package/src/resources/pipelines/data-sources.ts +2 -2
  348. package/src/resources/pipelines/documents.ts +2 -4
  349. package/src/resources/pipelines/pipelines.ts +6 -0
  350. package/src/resources/projects.ts +0 -2
  351. package/src/resources/shared.ts +1 -1
  352. package/src/version.ts +1 -1
  353. package/uploads.d.mts +1 -0
  354. package/uploads.d.mts.map +1 -1
  355. package/uploads.d.ts +1 -0
  356. package/uploads.d.ts.map +1 -1
  357. package/uploads.mjs +1 -0
  358. package/uploads.mjs.map +1 -1
  359. package/version.d.mts +1 -1
  360. package/version.d.ts +1 -1
  361. package/version.js +1 -1
  362. package/version.mjs +1 -1
@@ -0,0 +1,587 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { PagePromise, PaginatedCursor, type PaginatedCursorParams } from '../core/pagination';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class Batches extends APIResource {
10
+ /**
11
+ * Create a batch over a source directory and start processing asynchronously.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const batch = await client.batches.create({
16
+ * config: {
17
+ * job: {
18
+ * configuration_id: 'cfg-PARSE_AGENTIC',
19
+ * type: 'parse_v2',
20
+ * },
21
+ * },
22
+ * source_directory_id:
23
+ * 'dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
24
+ * });
25
+ * ```
26
+ */
27
+ create(params: BatchCreateParams, options?: RequestOptions): APIPromise<BatchCreateResponse> {
28
+ const { organization_id, project_id, ...body } = params;
29
+ return this._client.post('/api/v2/batches', { query: { organization_id, project_id }, body, ...options });
30
+ }
31
+
32
+ /**
33
+ * List batches for the current project.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * // Automatically fetches more pages as needed.
38
+ * for await (const batchListResponse of client.batches.list()) {
39
+ * // ...
40
+ * }
41
+ * ```
42
+ */
43
+ list(
44
+ query: BatchListParams | null | undefined = {},
45
+ options?: RequestOptions,
46
+ ): PagePromise<BatchListResponsesPaginatedCursor, BatchListResponse> {
47
+ return this._client.getAPIList('/api/v2/batches', PaginatedCursor<BatchListResponse>, {
48
+ query,
49
+ ...options,
50
+ });
51
+ }
52
+
53
+ /**
54
+ * Get a batch by ID.
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * const batch = await client.batches.get('batch_id');
59
+ * ```
60
+ */
61
+ get(
62
+ batchID: string,
63
+ query: BatchGetParams | null | undefined = {},
64
+ options?: RequestOptions,
65
+ ): APIPromise<BatchGetResponse> {
66
+ return this._client.get(path`/api/v2/batches/${batchID}`, { query, ...options });
67
+ }
68
+ }
69
+
70
+ export type BatchListResponsesPaginatedCursor = PaginatedCursor<BatchListResponse>;
71
+
72
+ /**
73
+ * A top-level batch.
74
+ *
75
+ * Example: { "id": "bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "project_id":
76
+ * "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "source_directory_id":
77
+ * "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "config": { "job": { "type":
78
+ * "parse_v2", "configuration_id": "cfg-PARSE_AGENTIC" } }, "status": "COMPLETED",
79
+ * "results": [ { "source_directory_file_id":
80
+ * "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type":
81
+ * "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message":
82
+ * null } ] }
83
+ *
84
+ * Batch-level `FAILED` means the orchestration failed and cannot provide a
85
+ * reliable per-file result set. `results` is only populated when explicitly
86
+ * requested with `expand=results` and may be `null` while a batch is still
87
+ * running.
88
+ */
89
+ export interface BatchCreateResponse {
90
+ /**
91
+ * Unique identifier
92
+ */
93
+ id: string;
94
+
95
+ /**
96
+ * Batch configuration snapshot.
97
+ */
98
+ config: BatchCreateResponse.Config;
99
+
100
+ /**
101
+ * Project this batch belongs to.
102
+ */
103
+ project_id: string;
104
+
105
+ /**
106
+ * Directory being processed.
107
+ */
108
+ source_directory_id: string;
109
+
110
+ /**
111
+ * Current batch status.
112
+ */
113
+ status: 'PENDING' | 'THROTTLED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
114
+
115
+ /**
116
+ * Creation datetime
117
+ */
118
+ created_at?: string | null;
119
+
120
+ /**
121
+ * Expanded per-file result mappings. Null unless requested with expand=results, or
122
+ * while the batch is still running.
123
+ */
124
+ results?: Array<BatchCreateResponse.Result> | null;
125
+
126
+ /**
127
+ * Update datetime
128
+ */
129
+ updated_at?: string | null;
130
+ }
131
+
132
+ export namespace BatchCreateResponse {
133
+ /**
134
+ * Batch configuration snapshot.
135
+ */
136
+ export interface Config {
137
+ /**
138
+ * Job to create for each file in the source directory.
139
+ */
140
+ job: Config.Job;
141
+ }
142
+
143
+ export namespace Config {
144
+ /**
145
+ * Job to create for each file in the source directory.
146
+ */
147
+ export interface Job {
148
+ /**
149
+ * Product configuration ID or built-in preset ID matching the job type.
150
+ */
151
+ configuration_id: string;
152
+
153
+ /**
154
+ * Product job type to run for each source directory file.
155
+ */
156
+ type: 'parse_v2' | 'extract_v2';
157
+ }
158
+ }
159
+
160
+ /**
161
+ * Result projection for one source directory file in a batch.
162
+ *
163
+ * Example: { "source_directory_file_id":
164
+ * "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type":
165
+ * "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message":
166
+ * null }
167
+ *
168
+ * This is a projection of directory-sync state, not a separate child resource that
169
+ * callers need to create. The source directory file ID is the stable correlation
170
+ * key. Underlying job progress and failures should be resolved through the
171
+ * referenced product job endpoint.
172
+ */
173
+ export interface Result {
174
+ /**
175
+ * Source directory file processed by this batch.
176
+ */
177
+ source_directory_file_id: string;
178
+
179
+ /**
180
+ * Batch-level mapping error if the system could not create or associate a job for
181
+ * this source file.
182
+ */
183
+ error_message?: string | null;
184
+
185
+ /**
186
+ * Reference to a job produced by a batch.
187
+ *
188
+ * Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
189
+ * }
190
+ */
191
+ job_reference?: Result.JobReference | null;
192
+ }
193
+
194
+ export namespace Result {
195
+ /**
196
+ * Reference to a job produced by a batch.
197
+ *
198
+ * Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
199
+ * }
200
+ */
201
+ export interface JobReference {
202
+ /**
203
+ * Job ID, such as a parse job ID.
204
+ */
205
+ id: string;
206
+
207
+ /**
208
+ * Type of job produced for the file.
209
+ */
210
+ type: 'parse_v2' | 'extract_v2';
211
+ }
212
+ }
213
+ }
214
+
215
+ /**
216
+ * A top-level batch.
217
+ *
218
+ * Example: { "id": "bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "project_id":
219
+ * "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "source_directory_id":
220
+ * "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "config": { "job": { "type":
221
+ * "parse_v2", "configuration_id": "cfg-PARSE_AGENTIC" } }, "status": "COMPLETED",
222
+ * "results": [ { "source_directory_file_id":
223
+ * "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type":
224
+ * "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message":
225
+ * null } ] }
226
+ *
227
+ * Batch-level `FAILED` means the orchestration failed and cannot provide a
228
+ * reliable per-file result set. `results` is only populated when explicitly
229
+ * requested with `expand=results` and may be `null` while a batch is still
230
+ * running.
231
+ */
232
+ export interface BatchListResponse {
233
+ /**
234
+ * Unique identifier
235
+ */
236
+ id: string;
237
+
238
+ /**
239
+ * Batch configuration snapshot.
240
+ */
241
+ config: BatchListResponse.Config;
242
+
243
+ /**
244
+ * Project this batch belongs to.
245
+ */
246
+ project_id: string;
247
+
248
+ /**
249
+ * Directory being processed.
250
+ */
251
+ source_directory_id: string;
252
+
253
+ /**
254
+ * Current batch status.
255
+ */
256
+ status: 'PENDING' | 'THROTTLED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
257
+
258
+ /**
259
+ * Creation datetime
260
+ */
261
+ created_at?: string | null;
262
+
263
+ /**
264
+ * Expanded per-file result mappings. Null unless requested with expand=results, or
265
+ * while the batch is still running.
266
+ */
267
+ results?: Array<BatchListResponse.Result> | null;
268
+
269
+ /**
270
+ * Update datetime
271
+ */
272
+ updated_at?: string | null;
273
+ }
274
+
275
+ export namespace BatchListResponse {
276
+ /**
277
+ * Batch configuration snapshot.
278
+ */
279
+ export interface Config {
280
+ /**
281
+ * Job to create for each file in the source directory.
282
+ */
283
+ job: Config.Job;
284
+ }
285
+
286
+ export namespace Config {
287
+ /**
288
+ * Job to create for each file in the source directory.
289
+ */
290
+ export interface Job {
291
+ /**
292
+ * Product configuration ID or built-in preset ID matching the job type.
293
+ */
294
+ configuration_id: string;
295
+
296
+ /**
297
+ * Product job type to run for each source directory file.
298
+ */
299
+ type: 'parse_v2' | 'extract_v2';
300
+ }
301
+ }
302
+
303
+ /**
304
+ * Result projection for one source directory file in a batch.
305
+ *
306
+ * Example: { "source_directory_file_id":
307
+ * "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type":
308
+ * "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message":
309
+ * null }
310
+ *
311
+ * This is a projection of directory-sync state, not a separate child resource that
312
+ * callers need to create. The source directory file ID is the stable correlation
313
+ * key. Underlying job progress and failures should be resolved through the
314
+ * referenced product job endpoint.
315
+ */
316
+ export interface Result {
317
+ /**
318
+ * Source directory file processed by this batch.
319
+ */
320
+ source_directory_file_id: string;
321
+
322
+ /**
323
+ * Batch-level mapping error if the system could not create or associate a job for
324
+ * this source file.
325
+ */
326
+ error_message?: string | null;
327
+
328
+ /**
329
+ * Reference to a job produced by a batch.
330
+ *
331
+ * Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
332
+ * }
333
+ */
334
+ job_reference?: Result.JobReference | null;
335
+ }
336
+
337
+ export namespace Result {
338
+ /**
339
+ * Reference to a job produced by a batch.
340
+ *
341
+ * Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
342
+ * }
343
+ */
344
+ export interface JobReference {
345
+ /**
346
+ * Job ID, such as a parse job ID.
347
+ */
348
+ id: string;
349
+
350
+ /**
351
+ * Type of job produced for the file.
352
+ */
353
+ type: 'parse_v2' | 'extract_v2';
354
+ }
355
+ }
356
+ }
357
+
358
+ /**
359
+ * A top-level batch.
360
+ *
361
+ * Example: { "id": "bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "project_id":
362
+ * "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "source_directory_id":
363
+ * "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "config": { "job": { "type":
364
+ * "parse_v2", "configuration_id": "cfg-PARSE_AGENTIC" } }, "status": "COMPLETED",
365
+ * "results": [ { "source_directory_file_id":
366
+ * "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type":
367
+ * "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message":
368
+ * null } ] }
369
+ *
370
+ * Batch-level `FAILED` means the orchestration failed and cannot provide a
371
+ * reliable per-file result set. `results` is only populated when explicitly
372
+ * requested with `expand=results` and may be `null` while a batch is still
373
+ * running.
374
+ */
375
+ export interface BatchGetResponse {
376
+ /**
377
+ * Unique identifier
378
+ */
379
+ id: string;
380
+
381
+ /**
382
+ * Batch configuration snapshot.
383
+ */
384
+ config: BatchGetResponse.Config;
385
+
386
+ /**
387
+ * Project this batch belongs to.
388
+ */
389
+ project_id: string;
390
+
391
+ /**
392
+ * Directory being processed.
393
+ */
394
+ source_directory_id: string;
395
+
396
+ /**
397
+ * Current batch status.
398
+ */
399
+ status: 'PENDING' | 'THROTTLED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
400
+
401
+ /**
402
+ * Creation datetime
403
+ */
404
+ created_at?: string | null;
405
+
406
+ /**
407
+ * Expanded per-file result mappings. Null unless requested with expand=results, or
408
+ * while the batch is still running.
409
+ */
410
+ results?: Array<BatchGetResponse.Result> | null;
411
+
412
+ /**
413
+ * Update datetime
414
+ */
415
+ updated_at?: string | null;
416
+ }
417
+
418
+ export namespace BatchGetResponse {
419
+ /**
420
+ * Batch configuration snapshot.
421
+ */
422
+ export interface Config {
423
+ /**
424
+ * Job to create for each file in the source directory.
425
+ */
426
+ job: Config.Job;
427
+ }
428
+
429
+ export namespace Config {
430
+ /**
431
+ * Job to create for each file in the source directory.
432
+ */
433
+ export interface Job {
434
+ /**
435
+ * Product configuration ID or built-in preset ID matching the job type.
436
+ */
437
+ configuration_id: string;
438
+
439
+ /**
440
+ * Product job type to run for each source directory file.
441
+ */
442
+ type: 'parse_v2' | 'extract_v2';
443
+ }
444
+ }
445
+
446
+ /**
447
+ * Result projection for one source directory file in a batch.
448
+ *
449
+ * Example: { "source_directory_file_id":
450
+ * "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type":
451
+ * "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message":
452
+ * null }
453
+ *
454
+ * This is a projection of directory-sync state, not a separate child resource that
455
+ * callers need to create. The source directory file ID is the stable correlation
456
+ * key. Underlying job progress and failures should be resolved through the
457
+ * referenced product job endpoint.
458
+ */
459
+ export interface Result {
460
+ /**
461
+ * Source directory file processed by this batch.
462
+ */
463
+ source_directory_file_id: string;
464
+
465
+ /**
466
+ * Batch-level mapping error if the system could not create or associate a job for
467
+ * this source file.
468
+ */
469
+ error_message?: string | null;
470
+
471
+ /**
472
+ * Reference to a job produced by a batch.
473
+ *
474
+ * Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
475
+ * }
476
+ */
477
+ job_reference?: Result.JobReference | null;
478
+ }
479
+
480
+ export namespace Result {
481
+ /**
482
+ * Reference to a job produced by a batch.
483
+ *
484
+ * Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
485
+ * }
486
+ */
487
+ export interface JobReference {
488
+ /**
489
+ * Job ID, such as a parse job ID.
490
+ */
491
+ id: string;
492
+
493
+ /**
494
+ * Type of job produced for the file.
495
+ */
496
+ type: 'parse_v2' | 'extract_v2';
497
+ }
498
+ }
499
+ }
500
+
501
+ export interface BatchCreateParams {
502
+ /**
503
+ * Body param: Batch configuration snapshot to apply to this source directory.
504
+ */
505
+ config: BatchCreateParams.Config;
506
+
507
+ /**
508
+ * Body param: Directory whose files should be processed.
509
+ */
510
+ source_directory_id: string;
511
+
512
+ /**
513
+ * Query param
514
+ */
515
+ organization_id?: string | null;
516
+
517
+ /**
518
+ * Query param
519
+ */
520
+ project_id?: string | null;
521
+ }
522
+
523
+ export namespace BatchCreateParams {
524
+ /**
525
+ * Batch configuration snapshot to apply to this source directory.
526
+ */
527
+ export interface Config {
528
+ /**
529
+ * Job to create for each file in the source directory.
530
+ */
531
+ job: Config.Job;
532
+ }
533
+
534
+ export namespace Config {
535
+ /**
536
+ * Job to create for each file in the source directory.
537
+ */
538
+ export interface Job {
539
+ /**
540
+ * Product configuration ID or built-in preset ID matching the job type.
541
+ */
542
+ configuration_id: string;
543
+
544
+ /**
545
+ * Product job type to run for each source directory file.
546
+ */
547
+ type: 'parse_v2' | 'extract_v2';
548
+ }
549
+ }
550
+ }
551
+
552
+ export interface BatchListParams extends PaginatedCursorParams {
553
+ created_at_on_or_after?: string | null;
554
+
555
+ created_at_on_or_before?: string | null;
556
+
557
+ organization_id?: string | null;
558
+
559
+ project_id?: string | null;
560
+
561
+ source_directory_id?: string | null;
562
+
563
+ status?: 'PENDING' | 'THROTTLED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | null;
564
+ }
565
+
566
+ export interface BatchGetParams {
567
+ /**
568
+ * Fields to expand. Supported value: results.
569
+ */
570
+ expand?: Array<string> | null;
571
+
572
+ organization_id?: string | null;
573
+
574
+ project_id?: string | null;
575
+ }
576
+
577
+ export declare namespace Batches {
578
+ export {
579
+ type BatchCreateResponse as BatchCreateResponse,
580
+ type BatchListResponse as BatchListResponse,
581
+ type BatchGetResponse as BatchGetResponse,
582
+ type BatchListResponsesPaginatedCursor as BatchListResponsesPaginatedCursor,
583
+ type BatchCreateParams as BatchCreateParams,
584
+ type BatchListParams as BatchListParams,
585
+ type BatchGetParams as BatchGetParams,
586
+ };
587
+ }
@@ -868,10 +868,16 @@ export namespace BatchCreateParams {
868
868
  | 'parse.partial_success'
869
869
  | 'parse.cancelled'
870
870
  | 'classify.pending'
871
+ | 'classify.running'
871
872
  | 'classify.success'
872
873
  | 'classify.error'
873
874
  | 'classify.partial_success'
874
875
  | 'classify.cancelled'
876
+ | 'sheets.pending'
877
+ | 'sheets.success'
878
+ | 'sheets.error'
879
+ | 'sheets.partial_success'
880
+ | 'sheets.cancelled'
875
881
  | 'unmapped_event'
876
882
  > | null;
877
883
 
@@ -581,10 +581,16 @@ export namespace JobItemGetProcessingResultsResponse {
581
581
  | 'parse.partial_success'
582
582
  | 'parse.cancelled'
583
583
  | 'classify.pending'
584
+ | 'classify.running'
584
585
  | 'classify.success'
585
586
  | 'classify.error'
586
587
  | 'classify.partial_success'
587
588
  | 'classify.cancelled'
589
+ | 'sheets.pending'
590
+ | 'sheets.success'
591
+ | 'sheets.error'
592
+ | 'sheets.partial_success'
593
+ | 'sheets.cancelled'
588
594
  | 'unmapped_event'
589
595
  > | null;
590
596