@llamaindex/llama-cloud 2.4.0 → 2.8.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 (349) hide show
  1. package/CHANGELOG.md +93 -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 +492 -0
  98. package/resources/batches.d.mts.map +1 -0
  99. package/resources/batches.d.ts +492 -0
  100. package/resources/batches.d.ts.map +1 -0
  101. package/resources/batches.js +61 -0
  102. package/resources/batches.js.map +1 -0
  103. package/resources/batches.mjs +57 -0
  104. package/resources/batches.mjs.map +1 -0
  105. package/resources/beta/agent-data.d.mts +33 -27
  106. package/resources/beta/agent-data.d.mts.map +1 -1
  107. package/resources/beta/agent-data.d.ts +33 -27
  108. package/resources/beta/agent-data.d.ts.map +1 -1
  109. package/resources/beta/agent-data.js +27 -19
  110. package/resources/beta/agent-data.js.map +1 -1
  111. package/resources/beta/agent-data.mjs +27 -19
  112. package/resources/beta/agent-data.mjs.map +1 -1
  113. package/resources/beta/batch/batch.d.mts.map +1 -1
  114. package/resources/beta/batch/batch.d.ts.map +1 -1
  115. package/resources/beta/batch/batch.mjs.map +1 -1
  116. package/resources/beta/batch/index.d.mts.map +1 -1
  117. package/resources/beta/batch/index.d.ts.map +1 -1
  118. package/resources/beta/batch/index.mjs.map +1 -1
  119. package/resources/beta/batch/job-items.d.mts.map +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 +14 -2
  126. package/resources/beta/beta.d.mts.map +1 -1
  127. package/resources/beta/beta.d.ts +14 -2
  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 +4 -1
  164. package/resources/beta/index.d.mts.map +1 -1
  165. package/resources/beta/index.d.ts +4 -1
  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 +10 -17
  188. package/resources/beta/sheets.d.mts.map +1 -1
  189. package/resources/beta/sheets.d.ts +10 -17
  190. package/resources/beta/sheets.d.ts.map +1 -1
  191. package/resources/beta/sheets.js +10 -17
  192. package/resources/beta/sheets.js.map +1 -1
  193. package/resources/beta/sheets.mjs +10 -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 +5 -8
  208. package/resources/classifier/jobs.d.mts.map +1 -1
  209. package/resources/classifier/jobs.d.ts +5 -8
  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.map +1 -1
  219. package/resources/classify.d.ts.map +1 -1
  220. package/resources/classify.mjs.map +1 -1
  221. package/resources/configurations.d.mts +27 -10
  222. package/resources/configurations.d.mts.map +1 -1
  223. package/resources/configurations.d.ts +27 -10
  224. package/resources/configurations.d.ts.map +1 -1
  225. package/resources/configurations.js +2 -4
  226. package/resources/configurations.js.map +1 -1
  227. package/resources/configurations.mjs +2 -4
  228. package/resources/configurations.mjs.map +1 -1
  229. package/resources/data-sinks.d.mts.map +1 -1
  230. package/resources/data-sinks.d.ts.map +1 -1
  231. package/resources/data-sinks.mjs.map +1 -1
  232. package/resources/data-sources.d.mts.map +1 -1
  233. package/resources/data-sources.d.ts.map +1 -1
  234. package/resources/data-sources.mjs.map +1 -1
  235. package/resources/extract.d.mts +2 -9
  236. package/resources/extract.d.mts.map +1 -1
  237. package/resources/extract.d.ts +2 -9
  238. package/resources/extract.d.ts.map +1 -1
  239. package/resources/extract.mjs.map +1 -1
  240. package/resources/files.d.mts +19 -56
  241. package/resources/files.d.mts.map +1 -1
  242. package/resources/files.d.ts +19 -56
  243. package/resources/files.d.ts.map +1 -1
  244. package/resources/files.js +1 -8
  245. package/resources/files.js.map +1 -1
  246. package/resources/files.mjs +1 -8
  247. package/resources/files.mjs.map +1 -1
  248. package/resources/index.d.mts +2 -1
  249. package/resources/index.d.mts.map +1 -1
  250. package/resources/index.d.ts +2 -1
  251. package/resources/index.d.ts.map +1 -1
  252. package/resources/index.js +3 -1
  253. package/resources/index.js.map +1 -1
  254. package/resources/index.mjs +1 -0
  255. package/resources/index.mjs.map +1 -1
  256. package/resources/parsing.d.mts +31 -8
  257. package/resources/parsing.d.mts.map +1 -1
  258. package/resources/parsing.d.ts +31 -8
  259. package/resources/parsing.d.ts.map +1 -1
  260. package/resources/parsing.mjs.map +1 -1
  261. package/resources/pipelines/data-sources.d.mts +2 -2
  262. package/resources/pipelines/data-sources.d.mts.map +1 -1
  263. package/resources/pipelines/data-sources.d.ts +2 -2
  264. package/resources/pipelines/data-sources.d.ts.map +1 -1
  265. package/resources/pipelines/data-sources.js +2 -2
  266. package/resources/pipelines/data-sources.mjs +2 -2
  267. package/resources/pipelines/data-sources.mjs.map +1 -1
  268. package/resources/pipelines/documents.d.mts +2 -4
  269. package/resources/pipelines/documents.d.mts.map +1 -1
  270. package/resources/pipelines/documents.d.ts +2 -4
  271. package/resources/pipelines/documents.d.ts.map +1 -1
  272. package/resources/pipelines/documents.js +2 -4
  273. package/resources/pipelines/documents.js.map +1 -1
  274. package/resources/pipelines/documents.mjs +2 -4
  275. package/resources/pipelines/documents.mjs.map +1 -1
  276. package/resources/pipelines/files.d.mts.map +1 -1
  277. package/resources/pipelines/files.d.ts.map +1 -1
  278. package/resources/pipelines/files.mjs.map +1 -1
  279. package/resources/pipelines/images.d.mts.map +1 -1
  280. package/resources/pipelines/images.d.ts.map +1 -1
  281. package/resources/pipelines/images.mjs.map +1 -1
  282. package/resources/pipelines/index.d.mts.map +1 -1
  283. package/resources/pipelines/index.d.ts.map +1 -1
  284. package/resources/pipelines/index.mjs.map +1 -1
  285. package/resources/pipelines/metadata.d.mts.map +1 -1
  286. package/resources/pipelines/metadata.d.ts.map +1 -1
  287. package/resources/pipelines/metadata.mjs.map +1 -1
  288. package/resources/pipelines/pipelines.d.mts.map +1 -1
  289. package/resources/pipelines/pipelines.d.ts.map +1 -1
  290. package/resources/pipelines/pipelines.mjs.map +1 -1
  291. package/resources/pipelines/sync.d.mts.map +1 -1
  292. package/resources/pipelines/sync.d.ts.map +1 -1
  293. package/resources/pipelines/sync.mjs.map +1 -1
  294. package/resources/pipelines.d.mts.map +1 -1
  295. package/resources/pipelines.d.ts.map +1 -1
  296. package/resources/pipelines.mjs.map +1 -1
  297. package/resources/projects.d.mts +0 -1
  298. package/resources/projects.d.mts.map +1 -1
  299. package/resources/projects.d.ts +0 -1
  300. package/resources/projects.d.ts.map +1 -1
  301. package/resources/projects.mjs.map +1 -1
  302. package/resources/retrievers/index.d.mts.map +1 -1
  303. package/resources/retrievers/index.d.ts.map +1 -1
  304. package/resources/retrievers/index.mjs.map +1 -1
  305. package/resources/retrievers/retriever.d.mts.map +1 -1
  306. package/resources/retrievers/retriever.d.ts.map +1 -1
  307. package/resources/retrievers/retriever.mjs.map +1 -1
  308. package/resources/retrievers/retrievers.d.mts.map +1 -1
  309. package/resources/retrievers/retrievers.d.ts.map +1 -1
  310. package/resources/retrievers/retrievers.mjs.map +1 -1
  311. package/resources/retrievers.d.mts.map +1 -1
  312. package/resources/retrievers.d.ts.map +1 -1
  313. package/resources/retrievers.mjs.map +1 -1
  314. package/resources.d.mts.map +1 -1
  315. package/resources.d.ts.map +1 -1
  316. package/resources.mjs.map +1 -1
  317. package/src/client.ts +35 -2
  318. package/src/internal/types.ts +6 -8
  319. package/src/internal/utils/log.ts +2 -0
  320. package/src/resources/batches.ts +588 -0
  321. package/src/resources/beta/agent-data.ts +45 -36
  322. package/src/resources/beta/beta.ts +96 -2
  323. package/src/resources/beta/chat.ts +523 -0
  324. package/src/resources/beta/directories/directories.ts +77 -29
  325. package/src/resources/beta/directories/files.ts +73 -60
  326. package/src/resources/beta/index.ts +42 -1
  327. package/src/resources/beta/indexes.ts +421 -0
  328. package/src/resources/beta/retrieval.ts +483 -0
  329. package/src/resources/beta/sheets.ts +10 -17
  330. package/src/resources/classifier/jobs.ts +5 -8
  331. package/src/resources/configurations.ts +29 -92
  332. package/src/resources/extract.ts +2 -11
  333. package/src/resources/files.ts +22 -60
  334. package/src/resources/index.ts +10 -1
  335. package/src/resources/parsing.ts +37 -90
  336. package/src/resources/pipelines/data-sources.ts +2 -2
  337. package/src/resources/pipelines/documents.ts +2 -4
  338. package/src/resources/projects.ts +0 -2
  339. package/src/version.ts +1 -1
  340. package/uploads.d.mts +1 -0
  341. package/uploads.d.mts.map +1 -1
  342. package/uploads.d.ts +1 -0
  343. package/uploads.d.ts.map +1 -1
  344. package/uploads.mjs +1 -0
  345. package/uploads.mjs.map +1 -1
  346. package/version.d.mts +1 -1
  347. package/version.d.ts +1 -1
  348. package/version.js +1 -1
  349. package/version.mjs +1 -1
@@ -0,0 +1,492 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { PagePromise, PaginatedCursor, type PaginatedCursorParams } from "../core/pagination.js";
4
+ import { RequestOptions } from "../internal/request-options.js";
5
+ export declare class Batches extends APIResource {
6
+ /**
7
+ * Create a batch over a source directory and start processing asynchronously.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const batch = await client.batches.create({
12
+ * config: {
13
+ * job: {
14
+ * configuration_id:
15
+ * 'cfg-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
16
+ * type: 'parse_v2',
17
+ * },
18
+ * },
19
+ * source_directory_id:
20
+ * 'dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
21
+ * });
22
+ * ```
23
+ */
24
+ create(params: BatchCreateParams, options?: RequestOptions): APIPromise<BatchCreateResponse>;
25
+ /**
26
+ * List batches for the current project.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * // Automatically fetches more pages as needed.
31
+ * for await (const batchListResponse of client.batches.list()) {
32
+ * // ...
33
+ * }
34
+ * ```
35
+ */
36
+ list(query?: BatchListParams | null | undefined, options?: RequestOptions): PagePromise<BatchListResponsesPaginatedCursor, BatchListResponse>;
37
+ /**
38
+ * Get a batch by ID.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const batch = await client.batches.get('batch_id');
43
+ * ```
44
+ */
45
+ get(batchID: string, query?: BatchGetParams | null | undefined, options?: RequestOptions): APIPromise<BatchGetResponse>;
46
+ }
47
+ export type BatchListResponsesPaginatedCursor = PaginatedCursor<BatchListResponse>;
48
+ /**
49
+ * A top-level batch.
50
+ *
51
+ * Example: { "id": "bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "project_id":
52
+ * "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "source_directory_id":
53
+ * "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "config": { "job": { "type":
54
+ * "parse_v2", "configuration_id": "cfg-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" } },
55
+ * "status": "COMPLETED", "results": [ { "source_directory_file_id":
56
+ * "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type":
57
+ * "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message":
58
+ * null } ] }
59
+ *
60
+ * Batch-level `FAILED` means the orchestration failed and cannot provide a
61
+ * reliable per-file result set. `results` is only populated when explicitly
62
+ * requested with `expand=results` and may be `null` while a batch is still running
63
+ * or before result mappings are available.
64
+ */
65
+ export interface BatchCreateResponse {
66
+ /**
67
+ * Unique identifier
68
+ */
69
+ id: string;
70
+ /**
71
+ * Batch configuration snapshot.
72
+ */
73
+ config: BatchCreateResponse.Config;
74
+ /**
75
+ * Project this batch belongs to.
76
+ */
77
+ project_id: string;
78
+ /**
79
+ * Directory being processed.
80
+ */
81
+ source_directory_id: string;
82
+ /**
83
+ * Current batch status.
84
+ */
85
+ status: 'PENDING' | 'THROTTLED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
86
+ /**
87
+ * Creation datetime
88
+ */
89
+ created_at?: string | null;
90
+ /**
91
+ * Expanded per-file result mappings. Null unless requested with expand=results, or
92
+ * until result mappings are available.
93
+ */
94
+ results?: Array<BatchCreateResponse.Result> | null;
95
+ /**
96
+ * Update datetime
97
+ */
98
+ updated_at?: string | null;
99
+ }
100
+ export declare namespace BatchCreateResponse {
101
+ /**
102
+ * Batch configuration snapshot.
103
+ */
104
+ interface Config {
105
+ /**
106
+ * Job to create for each file in the source directory.
107
+ */
108
+ job: Config.Job;
109
+ }
110
+ namespace Config {
111
+ /**
112
+ * Job to create for each file in the source directory.
113
+ */
114
+ interface Job {
115
+ /**
116
+ * Saved product configuration ID matching the job type.
117
+ */
118
+ configuration_id: string;
119
+ /**
120
+ * Product job type to run for each source directory file.
121
+ */
122
+ type: 'parse_v2' | 'extract_v2';
123
+ }
124
+ }
125
+ /**
126
+ * Result projection for one source directory file in a batch.
127
+ *
128
+ * Example: { "source_directory_file_id":
129
+ * "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type":
130
+ * "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message":
131
+ * null }
132
+ *
133
+ * This is a projection of directory-sync state, not a separate child resource that
134
+ * callers need to create. The source directory file ID is the stable correlation
135
+ * key. Underlying job progress and failures should be resolved through the
136
+ * referenced product job endpoint.
137
+ */
138
+ interface Result {
139
+ /**
140
+ * Source directory file processed by this batch.
141
+ */
142
+ source_directory_file_id: string;
143
+ /**
144
+ * Batch-level mapping error if the system could not create or associate a job for
145
+ * this source file.
146
+ */
147
+ error_message?: string | null;
148
+ /**
149
+ * Reference to a job produced by a batch.
150
+ *
151
+ * Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
152
+ * }
153
+ */
154
+ job_reference?: Result.JobReference | null;
155
+ }
156
+ namespace Result {
157
+ /**
158
+ * Reference to a job produced by a batch.
159
+ *
160
+ * Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
161
+ * }
162
+ */
163
+ interface JobReference {
164
+ /**
165
+ * Job ID, such as a parse job ID.
166
+ */
167
+ id: string;
168
+ /**
169
+ * Type of job produced for the file.
170
+ */
171
+ type: 'parse_v2' | 'extract_v2';
172
+ }
173
+ }
174
+ }
175
+ /**
176
+ * A top-level batch.
177
+ *
178
+ * Example: { "id": "bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "project_id":
179
+ * "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "source_directory_id":
180
+ * "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "config": { "job": { "type":
181
+ * "parse_v2", "configuration_id": "cfg-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" } },
182
+ * "status": "COMPLETED", "results": [ { "source_directory_file_id":
183
+ * "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type":
184
+ * "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message":
185
+ * null } ] }
186
+ *
187
+ * Batch-level `FAILED` means the orchestration failed and cannot provide a
188
+ * reliable per-file result set. `results` is only populated when explicitly
189
+ * requested with `expand=results` and may be `null` while a batch is still running
190
+ * or before result mappings are available.
191
+ */
192
+ export interface BatchListResponse {
193
+ /**
194
+ * Unique identifier
195
+ */
196
+ id: string;
197
+ /**
198
+ * Batch configuration snapshot.
199
+ */
200
+ config: BatchListResponse.Config;
201
+ /**
202
+ * Project this batch belongs to.
203
+ */
204
+ project_id: string;
205
+ /**
206
+ * Directory being processed.
207
+ */
208
+ source_directory_id: string;
209
+ /**
210
+ * Current batch status.
211
+ */
212
+ status: 'PENDING' | 'THROTTLED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
213
+ /**
214
+ * Creation datetime
215
+ */
216
+ created_at?: string | null;
217
+ /**
218
+ * Expanded per-file result mappings. Null unless requested with expand=results, or
219
+ * until result mappings are available.
220
+ */
221
+ results?: Array<BatchListResponse.Result> | null;
222
+ /**
223
+ * Update datetime
224
+ */
225
+ updated_at?: string | null;
226
+ }
227
+ export declare namespace BatchListResponse {
228
+ /**
229
+ * Batch configuration snapshot.
230
+ */
231
+ interface Config {
232
+ /**
233
+ * Job to create for each file in the source directory.
234
+ */
235
+ job: Config.Job;
236
+ }
237
+ namespace Config {
238
+ /**
239
+ * Job to create for each file in the source directory.
240
+ */
241
+ interface Job {
242
+ /**
243
+ * Saved product configuration ID matching the job type.
244
+ */
245
+ configuration_id: string;
246
+ /**
247
+ * Product job type to run for each source directory file.
248
+ */
249
+ type: 'parse_v2' | 'extract_v2';
250
+ }
251
+ }
252
+ /**
253
+ * Result projection for one source directory file in a batch.
254
+ *
255
+ * Example: { "source_directory_file_id":
256
+ * "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type":
257
+ * "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message":
258
+ * null }
259
+ *
260
+ * This is a projection of directory-sync state, not a separate child resource that
261
+ * callers need to create. The source directory file ID is the stable correlation
262
+ * key. Underlying job progress and failures should be resolved through the
263
+ * referenced product job endpoint.
264
+ */
265
+ interface Result {
266
+ /**
267
+ * Source directory file processed by this batch.
268
+ */
269
+ source_directory_file_id: string;
270
+ /**
271
+ * Batch-level mapping error if the system could not create or associate a job for
272
+ * this source file.
273
+ */
274
+ error_message?: string | null;
275
+ /**
276
+ * Reference to a job produced by a batch.
277
+ *
278
+ * Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
279
+ * }
280
+ */
281
+ job_reference?: Result.JobReference | null;
282
+ }
283
+ namespace Result {
284
+ /**
285
+ * Reference to a job produced by a batch.
286
+ *
287
+ * Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
288
+ * }
289
+ */
290
+ interface JobReference {
291
+ /**
292
+ * Job ID, such as a parse job ID.
293
+ */
294
+ id: string;
295
+ /**
296
+ * Type of job produced for the file.
297
+ */
298
+ type: 'parse_v2' | 'extract_v2';
299
+ }
300
+ }
301
+ }
302
+ /**
303
+ * A top-level batch.
304
+ *
305
+ * Example: { "id": "bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "project_id":
306
+ * "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "source_directory_id":
307
+ * "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "config": { "job": { "type":
308
+ * "parse_v2", "configuration_id": "cfg-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" } },
309
+ * "status": "COMPLETED", "results": [ { "source_directory_file_id":
310
+ * "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type":
311
+ * "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message":
312
+ * null } ] }
313
+ *
314
+ * Batch-level `FAILED` means the orchestration failed and cannot provide a
315
+ * reliable per-file result set. `results` is only populated when explicitly
316
+ * requested with `expand=results` and may be `null` while a batch is still running
317
+ * or before result mappings are available.
318
+ */
319
+ export interface BatchGetResponse {
320
+ /**
321
+ * Unique identifier
322
+ */
323
+ id: string;
324
+ /**
325
+ * Batch configuration snapshot.
326
+ */
327
+ config: BatchGetResponse.Config;
328
+ /**
329
+ * Project this batch belongs to.
330
+ */
331
+ project_id: string;
332
+ /**
333
+ * Directory being processed.
334
+ */
335
+ source_directory_id: string;
336
+ /**
337
+ * Current batch status.
338
+ */
339
+ status: 'PENDING' | 'THROTTLED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
340
+ /**
341
+ * Creation datetime
342
+ */
343
+ created_at?: string | null;
344
+ /**
345
+ * Expanded per-file result mappings. Null unless requested with expand=results, or
346
+ * until result mappings are available.
347
+ */
348
+ results?: Array<BatchGetResponse.Result> | null;
349
+ /**
350
+ * Update datetime
351
+ */
352
+ updated_at?: string | null;
353
+ }
354
+ export declare namespace BatchGetResponse {
355
+ /**
356
+ * Batch configuration snapshot.
357
+ */
358
+ interface Config {
359
+ /**
360
+ * Job to create for each file in the source directory.
361
+ */
362
+ job: Config.Job;
363
+ }
364
+ namespace Config {
365
+ /**
366
+ * Job to create for each file in the source directory.
367
+ */
368
+ interface Job {
369
+ /**
370
+ * Saved product configuration ID matching the job type.
371
+ */
372
+ configuration_id: string;
373
+ /**
374
+ * Product job type to run for each source directory file.
375
+ */
376
+ type: 'parse_v2' | 'extract_v2';
377
+ }
378
+ }
379
+ /**
380
+ * Result projection for one source directory file in a batch.
381
+ *
382
+ * Example: { "source_directory_file_id":
383
+ * "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type":
384
+ * "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message":
385
+ * null }
386
+ *
387
+ * This is a projection of directory-sync state, not a separate child resource that
388
+ * callers need to create. The source directory file ID is the stable correlation
389
+ * key. Underlying job progress and failures should be resolved through the
390
+ * referenced product job endpoint.
391
+ */
392
+ interface Result {
393
+ /**
394
+ * Source directory file processed by this batch.
395
+ */
396
+ source_directory_file_id: string;
397
+ /**
398
+ * Batch-level mapping error if the system could not create or associate a job for
399
+ * this source file.
400
+ */
401
+ error_message?: string | null;
402
+ /**
403
+ * Reference to a job produced by a batch.
404
+ *
405
+ * Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
406
+ * }
407
+ */
408
+ job_reference?: Result.JobReference | null;
409
+ }
410
+ namespace Result {
411
+ /**
412
+ * Reference to a job produced by a batch.
413
+ *
414
+ * Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
415
+ * }
416
+ */
417
+ interface JobReference {
418
+ /**
419
+ * Job ID, such as a parse job ID.
420
+ */
421
+ id: string;
422
+ /**
423
+ * Type of job produced for the file.
424
+ */
425
+ type: 'parse_v2' | 'extract_v2';
426
+ }
427
+ }
428
+ }
429
+ export interface BatchCreateParams {
430
+ /**
431
+ * Body param: Batch configuration snapshot to apply to this source directory.
432
+ */
433
+ config: BatchCreateParams.Config;
434
+ /**
435
+ * Body param: Directory whose files should be processed.
436
+ */
437
+ source_directory_id: string;
438
+ /**
439
+ * Query param
440
+ */
441
+ organization_id?: string | null;
442
+ /**
443
+ * Query param
444
+ */
445
+ project_id?: string | null;
446
+ }
447
+ export declare namespace BatchCreateParams {
448
+ /**
449
+ * Batch configuration snapshot to apply to this source directory.
450
+ */
451
+ interface Config {
452
+ /**
453
+ * Job to create for each file in the source directory.
454
+ */
455
+ job: Config.Job;
456
+ }
457
+ namespace Config {
458
+ /**
459
+ * Job to create for each file in the source directory.
460
+ */
461
+ interface Job {
462
+ /**
463
+ * Saved product configuration ID matching the job type.
464
+ */
465
+ configuration_id: string;
466
+ /**
467
+ * Product job type to run for each source directory file.
468
+ */
469
+ type: 'parse_v2' | 'extract_v2';
470
+ }
471
+ }
472
+ }
473
+ export interface BatchListParams extends PaginatedCursorParams {
474
+ created_at_on_or_after?: string | null;
475
+ created_at_on_or_before?: string | null;
476
+ organization_id?: string | null;
477
+ project_id?: string | null;
478
+ source_directory_id?: string | null;
479
+ status?: 'PENDING' | 'THROTTLED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | null;
480
+ }
481
+ export interface BatchGetParams {
482
+ /**
483
+ * Fields to expand. Supported value: results.
484
+ */
485
+ expand?: Array<string> | null;
486
+ organization_id?: string | null;
487
+ project_id?: string | null;
488
+ }
489
+ export declare namespace Batches {
490
+ export { type BatchCreateResponse as BatchCreateResponse, type BatchListResponse as BatchListResponse, type BatchGetResponse as BatchGetResponse, type BatchListResponsesPaginatedCursor as BatchListResponsesPaginatedCursor, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, type BatchGetParams as BatchGetParams, };
491
+ }
492
+ //# sourceMappingURL=batches.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batches.d.ts","sourceRoot":"","sources":["../src/resources/batches.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,WAA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;;eAEG;YACH,IAAI,EAAE,UAAU,GAAG,YAAY,CAAC;SACjC;KACF;CACF;AAED,MAAM,WAAW,eAAgB,SAAQ,qBAAqB;IAC5D,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvC,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,IAAI,CAAC;CAC5F;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAE9B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
@@ -0,0 +1,61 @@
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
+ exports.Batches = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const pagination_1 = require("../core/pagination.js");
7
+ const path_1 = require("../internal/utils/path.js");
8
+ class Batches extends resource_1.APIResource {
9
+ /**
10
+ * Create a batch over a source directory and start processing asynchronously.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const batch = await client.batches.create({
15
+ * config: {
16
+ * job: {
17
+ * configuration_id:
18
+ * 'cfg-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
19
+ * type: 'parse_v2',
20
+ * },
21
+ * },
22
+ * source_directory_id:
23
+ * 'dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
24
+ * });
25
+ * ```
26
+ */
27
+ create(params, options) {
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
+ * List batches for the current project.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * // Automatically fetches more pages as needed.
37
+ * for await (const batchListResponse of client.batches.list()) {
38
+ * // ...
39
+ * }
40
+ * ```
41
+ */
42
+ list(query = {}, options) {
43
+ return this._client.getAPIList('/api/v2/batches', (pagination_1.PaginatedCursor), {
44
+ query,
45
+ ...options,
46
+ });
47
+ }
48
+ /**
49
+ * Get a batch by ID.
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * const batch = await client.batches.get('batch_id');
54
+ * ```
55
+ */
56
+ get(batchID, query = {}, options) {
57
+ return this._client.get((0, path_1.path) `/api/v2/batches/${batchID}`, { query, ...options });
58
+ }
59
+ }
60
+ exports.Batches = Batches;
61
+ //# sourceMappingURL=batches.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batches.js","sourceRoot":"","sources":["../src/resources/batches.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAA8F;AAE9F,oDAA8C;AAE9C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,MAAyB,EAAE,OAAwB;QACxD,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,4BAAkC,CAAA,EAAE;YACpF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CACD,OAAe,EACf,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,mBAAmB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;CACF;AA5DD,0BA4DC"}
@@ -0,0 +1,57 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { PaginatedCursor } from "../core/pagination.mjs";
4
+ import { path } from "../internal/utils/path.mjs";
5
+ export class Batches extends APIResource {
6
+ /**
7
+ * Create a batch over a source directory and start processing asynchronously.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const batch = await client.batches.create({
12
+ * config: {
13
+ * job: {
14
+ * configuration_id:
15
+ * 'cfg-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
16
+ * type: 'parse_v2',
17
+ * },
18
+ * },
19
+ * source_directory_id:
20
+ * 'dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
21
+ * });
22
+ * ```
23
+ */
24
+ create(params, options) {
25
+ const { organization_id, project_id, ...body } = params;
26
+ return this._client.post('/api/v2/batches', { query: { organization_id, project_id }, body, ...options });
27
+ }
28
+ /**
29
+ * List batches for the current project.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * // Automatically fetches more pages as needed.
34
+ * for await (const batchListResponse of client.batches.list()) {
35
+ * // ...
36
+ * }
37
+ * ```
38
+ */
39
+ list(query = {}, options) {
40
+ return this._client.getAPIList('/api/v2/batches', (PaginatedCursor), {
41
+ query,
42
+ ...options,
43
+ });
44
+ }
45
+ /**
46
+ * Get a batch by ID.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * const batch = await client.batches.get('batch_id');
51
+ * ```
52
+ */
53
+ get(batchID, query = {}, options) {
54
+ return this._client.get(path `/api/v2/batches/${batchID}`, { query, ...options });
55
+ }
56
+ }
57
+ //# sourceMappingURL=batches.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batches.mjs","sourceRoot":"","sources":["../src/resources/batches.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAe,eAAe,EAA8B,+BAA2B;AAE9F,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,MAAyB,EAAE,OAAwB;QACxD,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,eAAkC,CAAA,EAAE;YACpF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CACD,OAAe,EACf,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,mBAAmB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;CACF"}