@llamaindex/llama-cloud 2.8.0 → 2.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/client.d.mts +11 -8
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +11 -8
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/batches.d.mts +24 -25
  12. package/resources/batches.d.mts.map +1 -1
  13. package/resources/batches.d.ts +24 -25
  14. package/resources/batches.d.ts.map +1 -1
  15. package/resources/batches.js +1 -2
  16. package/resources/batches.js.map +1 -1
  17. package/resources/batches.mjs +1 -2
  18. package/resources/batches.mjs.map +1 -1
  19. package/resources/beta/agent-data.d.mts +94 -94
  20. package/resources/beta/agent-data.d.mts.map +1 -1
  21. package/resources/beta/agent-data.d.ts +94 -94
  22. package/resources/beta/agent-data.d.ts.map +1 -1
  23. package/resources/beta/agent-data.js +41 -41
  24. package/resources/beta/agent-data.js.map +1 -1
  25. package/resources/beta/agent-data.mjs +41 -41
  26. package/resources/beta/agent-data.mjs.map +1 -1
  27. package/resources/beta/batch/batch.d.mts +29 -29
  28. package/resources/beta/batch/batch.d.mts.map +1 -1
  29. package/resources/beta/batch/batch.d.ts +29 -29
  30. package/resources/beta/batch/batch.d.ts.map +1 -1
  31. package/resources/beta/batch/batch.js +16 -16
  32. package/resources/beta/batch/batch.js.map +1 -1
  33. package/resources/beta/batch/batch.mjs +16 -16
  34. package/resources/beta/batch/batch.mjs.map +1 -1
  35. package/resources/beta/batch/index.d.mts +1 -1
  36. package/resources/beta/batch/index.d.mts.map +1 -1
  37. package/resources/beta/batch/index.d.ts +1 -1
  38. package/resources/beta/batch/index.d.ts.map +1 -1
  39. package/resources/beta/batch/job-items.d.mts +7 -7
  40. package/resources/beta/batch/job-items.d.mts.map +1 -1
  41. package/resources/beta/batch/job-items.d.ts +7 -7
  42. package/resources/beta/batch/job-items.d.ts.map +1 -1
  43. package/resources/beta/beta.d.mts +6 -6
  44. package/resources/beta/beta.d.mts.map +1 -1
  45. package/resources/beta/beta.d.ts +6 -6
  46. package/resources/beta/beta.d.ts.map +1 -1
  47. package/resources/beta/chat.d.mts +39 -39
  48. package/resources/beta/chat.d.mts.map +1 -1
  49. package/resources/beta/chat.d.ts +39 -39
  50. package/resources/beta/chat.d.ts.map +1 -1
  51. package/resources/beta/chat.js +14 -14
  52. package/resources/beta/chat.js.map +1 -1
  53. package/resources/beta/chat.mjs +14 -14
  54. package/resources/beta/chat.mjs.map +1 -1
  55. package/resources/beta/directories/directories.d.mts +48 -35
  56. package/resources/beta/directories/directories.d.mts.map +1 -1
  57. package/resources/beta/directories/directories.d.ts +48 -35
  58. package/resources/beta/directories/directories.d.ts.map +1 -1
  59. package/resources/beta/directories/directories.js +30 -30
  60. package/resources/beta/directories/directories.js.map +1 -1
  61. package/resources/beta/directories/directories.mjs +30 -30
  62. package/resources/beta/directories/directories.mjs.map +1 -1
  63. package/resources/beta/directories/files.d.mts +54 -54
  64. package/resources/beta/directories/files.d.mts.map +1 -1
  65. package/resources/beta/directories/files.d.ts +54 -54
  66. package/resources/beta/directories/files.d.ts.map +1 -1
  67. package/resources/beta/directories/files.js +32 -32
  68. package/resources/beta/directories/files.js.map +1 -1
  69. package/resources/beta/directories/files.mjs +32 -32
  70. package/resources/beta/directories/files.mjs.map +1 -1
  71. package/resources/beta/directories/index.d.mts +2 -2
  72. package/resources/beta/directories/index.d.mts.map +1 -1
  73. package/resources/beta/directories/index.d.ts +2 -2
  74. package/resources/beta/directories/index.d.ts.map +1 -1
  75. package/resources/beta/index.d.mts +6 -6
  76. package/resources/beta/index.d.mts.map +1 -1
  77. package/resources/beta/index.d.ts +6 -6
  78. package/resources/beta/index.d.ts.map +1 -1
  79. package/resources/beta/indexes.d.mts +32 -32
  80. package/resources/beta/indexes.d.mts.map +1 -1
  81. package/resources/beta/indexes.d.ts +32 -32
  82. package/resources/beta/indexes.d.ts.map +1 -1
  83. package/resources/beta/indexes.js +28 -28
  84. package/resources/beta/indexes.js.map +1 -1
  85. package/resources/beta/indexes.mjs +28 -28
  86. package/resources/beta/indexes.mjs.map +1 -1
  87. package/resources/beta/retrieval.d.mts +4 -4
  88. package/resources/beta/retrieval.d.mts.map +1 -1
  89. package/resources/beta/retrieval.d.ts +4 -4
  90. package/resources/beta/retrieval.d.ts.map +1 -1
  91. package/resources/beta/sheets.d.mts +134 -60
  92. package/resources/beta/sheets.d.mts.map +1 -1
  93. package/resources/beta/sheets.d.ts +134 -60
  94. package/resources/beta/sheets.d.ts.map +1 -1
  95. package/resources/beta/sheets.js +25 -52
  96. package/resources/beta/sheets.js.map +1 -1
  97. package/resources/beta/sheets.mjs +25 -52
  98. package/resources/beta/sheets.mjs.map +1 -1
  99. package/resources/beta/split.d.mts +2 -2
  100. package/resources/beta/split.d.mts.map +1 -1
  101. package/resources/beta/split.d.ts +2 -2
  102. package/resources/beta/split.d.ts.map +1 -1
  103. package/resources/classifier/jobs.d.mts +8 -2
  104. package/resources/classifier/jobs.d.mts.map +1 -1
  105. package/resources/classifier/jobs.d.ts +8 -2
  106. package/resources/classifier/jobs.d.ts.map +1 -1
  107. package/resources/classify.d.mts +71 -9
  108. package/resources/classify.d.mts.map +1 -1
  109. package/resources/classify.d.ts +71 -9
  110. package/resources/classify.d.ts.map +1 -1
  111. package/resources/configurations.d.mts +101 -46
  112. package/resources/configurations.d.mts.map +1 -1
  113. package/resources/configurations.d.ts +101 -46
  114. package/resources/configurations.d.ts.map +1 -1
  115. package/resources/configurations.js +9 -9
  116. package/resources/configurations.js.map +1 -1
  117. package/resources/configurations.mjs +9 -9
  118. package/resources/configurations.mjs.map +1 -1
  119. package/resources/data-sinks.d.mts +16 -16
  120. package/resources/data-sinks.d.mts.map +1 -1
  121. package/resources/data-sinks.d.ts +16 -16
  122. package/resources/data-sinks.d.ts.map +1 -1
  123. package/resources/data-sinks.js +12 -12
  124. package/resources/data-sinks.js.map +1 -1
  125. package/resources/data-sinks.mjs +12 -12
  126. package/resources/data-sinks.mjs.map +1 -1
  127. package/resources/data-sources.d.mts +17 -17
  128. package/resources/data-sources.d.mts.map +1 -1
  129. package/resources/data-sources.d.ts +17 -17
  130. package/resources/data-sources.d.ts.map +1 -1
  131. package/resources/data-sources.js +13 -13
  132. package/resources/data-sources.js.map +1 -1
  133. package/resources/data-sources.mjs +13 -13
  134. package/resources/data-sources.mjs.map +1 -1
  135. package/resources/extract.d.mts +52 -50
  136. package/resources/extract.d.mts.map +1 -1
  137. package/resources/extract.d.ts +52 -50
  138. package/resources/extract.d.ts.map +1 -1
  139. package/resources/extract.js +33 -33
  140. package/resources/extract.js.map +1 -1
  141. package/resources/extract.mjs +33 -33
  142. package/resources/extract.mjs.map +1 -1
  143. package/resources/files.d.mts +41 -41
  144. package/resources/files.d.mts.map +1 -1
  145. package/resources/files.d.ts +41 -41
  146. package/resources/files.d.ts.map +1 -1
  147. package/resources/files.js +13 -13
  148. package/resources/files.js.map +1 -1
  149. package/resources/files.mjs +13 -13
  150. package/resources/files.mjs.map +1 -1
  151. package/resources/index.d.mts +9 -8
  152. package/resources/index.d.mts.map +1 -1
  153. package/resources/index.d.ts +9 -8
  154. package/resources/index.d.ts.map +1 -1
  155. package/resources/index.js +3 -1
  156. package/resources/index.js.map +1 -1
  157. package/resources/index.mjs +1 -0
  158. package/resources/index.mjs.map +1 -1
  159. package/resources/parsing.d.mts +108 -50
  160. package/resources/parsing.d.mts.map +1 -1
  161. package/resources/parsing.d.ts +108 -50
  162. package/resources/parsing.d.ts.map +1 -1
  163. package/resources/parsing.js +12 -12
  164. package/resources/parsing.js.map +1 -1
  165. package/resources/parsing.mjs +12 -12
  166. package/resources/parsing.mjs.map +1 -1
  167. package/resources/pipelines/data-sources.d.mts +40 -30
  168. package/resources/pipelines/data-sources.d.mts.map +1 -1
  169. package/resources/pipelines/data-sources.d.ts +40 -30
  170. package/resources/pipelines/data-sources.d.ts.map +1 -1
  171. package/resources/pipelines/data-sources.js +23 -13
  172. package/resources/pipelines/data-sources.js.map +1 -1
  173. package/resources/pipelines/data-sources.mjs +23 -13
  174. package/resources/pipelines/data-sources.mjs.map +1 -1
  175. package/resources/pipelines/documents.d.mts +28 -12
  176. package/resources/pipelines/documents.d.mts.map +1 -1
  177. package/resources/pipelines/documents.d.ts +28 -12
  178. package/resources/pipelines/documents.d.ts.map +1 -1
  179. package/resources/pipelines/documents.js +30 -14
  180. package/resources/pipelines/documents.js.map +1 -1
  181. package/resources/pipelines/documents.mjs +30 -14
  182. package/resources/pipelines/documents.mjs.map +1 -1
  183. package/resources/pipelines/files.d.mts +34 -24
  184. package/resources/pipelines/files.d.mts.map +1 -1
  185. package/resources/pipelines/files.d.ts +34 -24
  186. package/resources/pipelines/files.d.ts.map +1 -1
  187. package/resources/pipelines/files.js +27 -17
  188. package/resources/pipelines/files.js.map +1 -1
  189. package/resources/pipelines/files.mjs +27 -17
  190. package/resources/pipelines/files.mjs.map +1 -1
  191. package/resources/pipelines/images.d.mts +17 -17
  192. package/resources/pipelines/images.d.mts.map +1 -1
  193. package/resources/pipelines/images.d.ts +17 -17
  194. package/resources/pipelines/images.d.ts.map +1 -1
  195. package/resources/pipelines/images.js +13 -13
  196. package/resources/pipelines/images.js.map +1 -1
  197. package/resources/pipelines/images.mjs +13 -13
  198. package/resources/pipelines/images.mjs.map +1 -1
  199. package/resources/pipelines/index.d.mts +5 -5
  200. package/resources/pipelines/index.d.mts.map +1 -1
  201. package/resources/pipelines/index.d.ts +5 -5
  202. package/resources/pipelines/index.d.ts.map +1 -1
  203. package/resources/pipelines/metadata.d.mts +4 -0
  204. package/resources/pipelines/metadata.d.mts.map +1 -1
  205. package/resources/pipelines/metadata.d.ts +4 -0
  206. package/resources/pipelines/metadata.d.ts.map +1 -1
  207. package/resources/pipelines/metadata.js +4 -0
  208. package/resources/pipelines/metadata.js.map +1 -1
  209. package/resources/pipelines/metadata.mjs +4 -0
  210. package/resources/pipelines/metadata.mjs.map +1 -1
  211. package/resources/pipelines/pipelines.d.mts +142 -126
  212. package/resources/pipelines/pipelines.d.mts.map +1 -1
  213. package/resources/pipelines/pipelines.d.ts +142 -126
  214. package/resources/pipelines/pipelines.d.ts.map +1 -1
  215. package/resources/pipelines/pipelines.js +39 -23
  216. package/resources/pipelines/pipelines.js.map +1 -1
  217. package/resources/pipelines/pipelines.mjs +39 -23
  218. package/resources/pipelines/pipelines.mjs.map +1 -1
  219. package/resources/pipelines/sync.d.mts +4 -0
  220. package/resources/pipelines/sync.d.mts.map +1 -1
  221. package/resources/pipelines/sync.d.ts +4 -0
  222. package/resources/pipelines/sync.d.ts.map +1 -1
  223. package/resources/pipelines/sync.js +4 -0
  224. package/resources/pipelines/sync.js.map +1 -1
  225. package/resources/pipelines/sync.mjs +4 -0
  226. package/resources/pipelines/sync.mjs.map +1 -1
  227. package/resources/retrievers/index.d.mts +1 -1
  228. package/resources/retrievers/index.d.mts.map +1 -1
  229. package/resources/retrievers/index.d.ts +1 -1
  230. package/resources/retrievers/index.d.ts.map +1 -1
  231. package/resources/retrievers/retrievers.d.mts +39 -39
  232. package/resources/retrievers/retrievers.d.mts.map +1 -1
  233. package/resources/retrievers/retrievers.d.ts +39 -39
  234. package/resources/retrievers/retrievers.d.ts.map +1 -1
  235. package/resources/retrievers/retrievers.js +20 -20
  236. package/resources/retrievers/retrievers.js.map +1 -1
  237. package/resources/retrievers/retrievers.mjs +20 -20
  238. package/resources/retrievers/retrievers.mjs.map +1 -1
  239. package/resources/shared.d.mts +12 -4
  240. package/resources/shared.d.mts.map +1 -1
  241. package/resources/shared.d.ts +12 -4
  242. package/resources/shared.d.ts.map +1 -1
  243. package/resources/sheets.d.mts +199 -0
  244. package/resources/sheets.d.mts.map +1 -0
  245. package/resources/sheets.d.ts +199 -0
  246. package/resources/sheets.d.ts.map +1 -0
  247. package/resources/sheets.js +101 -0
  248. package/resources/sheets.js.map +1 -0
  249. package/resources/sheets.mjs +97 -0
  250. package/resources/sheets.mjs.map +1 -0
  251. package/src/client.ts +33 -12
  252. package/src/resources/batches.ts +24 -25
  253. package/src/resources/beta/agent-data.ts +131 -131
  254. package/src/resources/beta/batch/batch.ts +61 -50
  255. package/src/resources/beta/batch/index.ts +1 -1
  256. package/src/resources/beta/batch/job-items.ts +28 -17
  257. package/src/resources/beta/beta.ts +12 -12
  258. package/src/resources/beta/chat.ts +57 -57
  259. package/src/resources/beta/directories/directories.ts +80 -66
  260. package/src/resources/beta/directories/files.ts +73 -73
  261. package/src/resources/beta/directories/index.ts +5 -5
  262. package/src/resources/beta/index.ts +12 -12
  263. package/src/resources/beta/indexes.ts +53 -53
  264. package/src/resources/beta/retrieval.ts +4 -4
  265. package/src/resources/beta/sheets.ts +217 -73
  266. package/src/resources/beta/split.ts +2 -2
  267. package/src/resources/classifier/jobs.ts +9 -2
  268. package/src/resources/classify.ts +135 -9
  269. package/src/resources/configurations.ts +126 -67
  270. package/src/resources/data-sinks.ts +26 -26
  271. package/src/resources/data-sources.ts +43 -43
  272. package/src/resources/extract.ts +118 -94
  273. package/src/resources/files.ts +61 -61
  274. package/src/resources/index.ts +21 -12
  275. package/src/resources/parsing.ts +266 -203
  276. package/src/resources/pipelines/data-sources.ts +59 -49
  277. package/src/resources/pipelines/documents.ts +42 -26
  278. package/src/resources/pipelines/files.ts +62 -52
  279. package/src/resources/pipelines/images.ts +36 -36
  280. package/src/resources/pipelines/index.ts +10 -10
  281. package/src/resources/pipelines/metadata.ts +4 -0
  282. package/src/resources/pipelines/pipelines.ts +230 -203
  283. package/src/resources/pipelines/sync.ts +4 -0
  284. package/src/resources/retrievers/index.ts +3 -3
  285. package/src/resources/retrievers/retrievers.ts +64 -64
  286. package/src/resources/shared.ts +13 -4
  287. package/src/resources/sheets.ts +314 -0
  288. package/src/version.ts +1 -1
  289. package/version.d.mts +1 -1
  290. package/version.d.ts +1 -1
  291. package/version.js +1 -1
  292. package/version.mjs +1 -1
@@ -2,7 +2,6 @@
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as FilesAPI from '../files';
5
- import * as ParsingAPI from '../parsing';
6
5
  import { APIPromise } from '../../core/api-promise';
7
6
  import { PagePromise, PaginatedCursor, type PaginatedCursorParams } from '../../core/pagination';
8
7
  import { RequestOptions } from '../../internal/request-options';
@@ -11,15 +10,14 @@ import { pollUntilComplete, PollingOptions, DEFAULT_TIMEOUT } from '../../core/p
11
10
 
12
11
  export class Sheets extends APIResource {
13
12
  /**
14
- * Create a spreadsheet parsing job. Experimental: not production-ready and subject
15
- * to change.
13
+ * Create a spreadsheet parsing job.
16
14
  *
17
- * @example
18
- * ```ts
19
- * const sheetsJob = await client.beta.sheets.create({
20
- * file_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
21
- * });
22
- * ```
15
+ * Provide at most one of `configuration` (an inline parsing configuration) or
16
+ * `configuration_id` (a saved configuration preset). If neither is provided, a
17
+ * default configuration is used. Optionally include `webhook_configurations` to
18
+ * receive `sheets.*` status notifications.
19
+ *
20
+ * @deprecated
23
21
  */
24
22
  create(params: SheetCreateParams, options?: RequestOptions): APIPromise<SheetsJob> {
25
23
  const { organization_id, project_id, ...body } = params;
@@ -31,16 +29,9 @@ export class Sheets extends APIResource {
31
29
  }
32
30
 
33
31
  /**
34
- * List spreadsheet parsing jobs. Experimental: not production-ready and subject to
35
- * change.
32
+ * List spreadsheet parsing jobs.
36
33
  *
37
- * @example
38
- * ```ts
39
- * // Automatically fetches more pages as needed.
40
- * for await (const sheetsJob of client.beta.sheets.list()) {
41
- * // ...
42
- * }
43
- * ```
34
+ * @deprecated
44
35
  */
45
36
  list(
46
37
  query: SheetListParams | null | undefined = {},
@@ -52,40 +43,12 @@ export class Sheets extends APIResource {
52
43
  });
53
44
  }
54
45
 
55
- /**
56
- * Delete a spreadsheet parsing job and its associated data. Experimental: not
57
- * production-ready and subject to change.
58
- *
59
- * @example
60
- * ```ts
61
- * const response = await client.beta.sheets.deleteJob(
62
- * 'spreadsheet_job_id',
63
- * );
64
- * ```
65
- */
66
- deleteJob(
67
- spreadsheetJobID: string,
68
- params: SheetDeleteJobParams | null | undefined = {},
69
- options?: RequestOptions,
70
- ): APIPromise<unknown> {
71
- const { organization_id, project_id } = params ?? {};
72
- return this._client.delete(path`/api/v1/beta/sheets/jobs/${spreadsheetJobID}`, {
73
- query: { organization_id, project_id },
74
- ...options,
75
- });
76
- }
77
-
78
46
  /**
79
47
  * Get a spreadsheet parsing job. When `include_results=True` (default), embeds
80
48
  * extracted regions and results if complete, skipping the separate `/results`
81
- * call. Experimental: not production-ready and subject to change.
49
+ * call.
82
50
  *
83
- * @example
84
- * ```ts
85
- * const sheetsJob = await client.beta.sheets.get(
86
- * 'spreadsheet_job_id',
87
- * );
88
- * ```
51
+ * @deprecated
89
52
  */
90
53
  get(
91
54
  spreadsheetJobID: string,
@@ -96,20 +59,12 @@ export class Sheets extends APIResource {
96
59
  }
97
60
 
98
61
  /**
99
- * Generate a presigned URL to download a specific extracted region. Experimental:
100
- * not production-ready and subject to change.
62
+ * Generate a presigned URL to download a specific extracted region.
101
63
  *
102
- * @example
103
- * ```ts
104
- * const presignedURL =
105
- * await client.beta.sheets.getResultTable('table', {
106
- * spreadsheet_job_id: 'spreadsheet_job_id',
107
- * region_id: 'region_id',
108
- * });
109
- * ```
64
+ * @deprecated
110
65
  */
111
66
  getResultTable(
112
- regionType: 'table' | 'extra' | 'cell_metadata',
67
+ regionType: 'cell_metadata' | 'extra' | 'table',
113
68
  params: SheetGetResultTableParams,
114
69
  options?: RequestOptions,
115
70
  ): APIPromise<FilesAPI.PresignedURL> {
@@ -120,6 +75,23 @@ export class Sheets extends APIResource {
120
75
  );
121
76
  }
122
77
 
78
+ /**
79
+ * Delete a spreadsheet parsing job and its associated data.
80
+ *
81
+ * @deprecated
82
+ */
83
+ deleteJob(
84
+ spreadsheetJobID: string,
85
+ params: SheetDeleteJobParams | null | undefined = {},
86
+ options?: RequestOptions,
87
+ ): APIPromise<unknown> {
88
+ const { organization_id, project_id } = params ?? {};
89
+ return this._client.delete(path`/api/v1/beta/sheets/jobs/${spreadsheetJobID}`, {
90
+ query: { organization_id, project_id },
91
+ ...options,
92
+ });
93
+ }
94
+
123
95
  /**
124
96
  * Create a spreadsheet parsing job and wait for it to complete, returning the job with results.
125
97
  *
@@ -244,7 +216,7 @@ export class Sheets extends APIResource {
244
216
  export type SheetsJobsPaginatedCursor = PaginatedCursor<SheetsJob>;
245
217
 
246
218
  /**
247
- * A spreadsheet parsing job
219
+ * A spreadsheet parsing job.
248
220
  */
249
221
  export interface SheetsJob {
250
222
  /**
@@ -253,9 +225,10 @@ export interface SheetsJob {
253
225
  id: string;
254
226
 
255
227
  /**
256
- * Configuration for the parsing job
228
+ * Configuration applied to the parsing job (inline or resolved from a saved
229
+ * preset).
257
230
  */
258
- config: SheetsParsingConfig;
231
+ configuration: SheetsParsingConfig;
259
232
 
260
233
  /**
261
234
  * When the job was created
@@ -275,7 +248,7 @@ export interface SheetsJob {
275
248
  /**
276
249
  * The status of the parsing job
277
250
  */
278
- status: ParsingAPI.StatusEnum;
251
+ status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS';
279
252
 
280
253
  /**
281
254
  * When the job was last updated
@@ -287,6 +260,16 @@ export interface SheetsJob {
287
260
  */
288
261
  user_id: string;
289
262
 
263
+ /**
264
+ * @deprecated Configuration for spreadsheet parsing and region extraction
265
+ */
266
+ config?: SheetsParsingConfig | null;
267
+
268
+ /**
269
+ * The saved product configuration ID used at create time, if any.
270
+ */
271
+ configuration_id?: string | null;
272
+
290
273
  /**
291
274
  * Any errors encountered
292
275
  */
@@ -297,6 +280,17 @@ export interface SheetsJob {
297
280
  */
298
281
  file?: FilesAPI.File | null;
299
282
 
283
+ /**
284
+ * Per-status entry timestamps. Returned only when requested via
285
+ * `?expand=metadata_state_transitions`.
286
+ */
287
+ metadata_state_transitions?: { [key: string]: unknown } | null;
288
+
289
+ /**
290
+ * Job-time parameters such as webhook configurations.
291
+ */
292
+ parameters?: SheetsJob.Parameters;
293
+
300
294
  /**
301
295
  * All extracted regions (populated when job is complete)
302
296
  */
@@ -314,6 +308,73 @@ export interface SheetsJob {
314
308
  }
315
309
 
316
310
  export namespace SheetsJob {
311
+ /**
312
+ * Job-time parameters such as webhook configurations.
313
+ */
314
+ export interface Parameters {
315
+ /**
316
+ * Webhook configurations for job status notifications.
317
+ */
318
+ webhook_configurations?: Array<Parameters.WebhookConfiguration> | null;
319
+ }
320
+
321
+ export namespace Parameters {
322
+ /**
323
+ * Configuration for a single outbound webhook endpoint.
324
+ */
325
+ export interface WebhookConfiguration {
326
+ /**
327
+ * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
328
+ * events are delivered.
329
+ */
330
+ webhook_events?: Array<
331
+ | 'classify.cancelled'
332
+ | 'classify.error'
333
+ | 'classify.partial_success'
334
+ | 'classify.pending'
335
+ | 'classify.running'
336
+ | 'classify.success'
337
+ | 'extract.cancelled'
338
+ | 'extract.error'
339
+ | 'extract.partial_success'
340
+ | 'extract.pending'
341
+ | 'extract.success'
342
+ | 'parse.cancelled'
343
+ | 'parse.error'
344
+ | 'parse.partial_success'
345
+ | 'parse.pending'
346
+ | 'parse.running'
347
+ | 'parse.success'
348
+ | 'sheets.cancelled'
349
+ | 'sheets.error'
350
+ | 'sheets.partial_success'
351
+ | 'sheets.pending'
352
+ | 'sheets.success'
353
+ | 'split.cancelled'
354
+ | 'split.error'
355
+ | 'split.pending'
356
+ | 'split.processing'
357
+ | 'split.success'
358
+ | 'unmapped_event'
359
+ > | null;
360
+
361
+ /**
362
+ * Custom HTTP headers sent with each webhook request (e.g. auth tokens)
363
+ */
364
+ webhook_headers?: { [key: string]: string } | null;
365
+
366
+ /**
367
+ * Response format sent to the webhook: 'string' (default) or 'json'
368
+ */
369
+ webhook_output_format?: string | null;
370
+
371
+ /**
372
+ * URL to receive webhook POST notifications
373
+ */
374
+ webhook_url?: string | null;
375
+ }
376
+ }
377
+
317
378
  /**
318
379
  * A summary of a single extracted region from a spreadsheet
319
380
  */
@@ -442,12 +503,89 @@ export interface SheetCreateParams {
442
503
  project_id?: string | null;
443
504
 
444
505
  /**
445
- * Body param: Configuration for the parsing job
506
+ * Body param: Configuration for spreadsheet parsing and region extraction
507
+ */
508
+ config?: SheetsParsingConfig | null;
509
+
510
+ /**
511
+ * Body param: Configuration for spreadsheet parsing and region extraction
512
+ */
513
+ configuration?: SheetsParsingConfig | null;
514
+
515
+ /**
516
+ * Body param: Saved configuration ID
446
517
  */
447
- config?: SheetsParsingConfig;
518
+ configuration_id?: string | null;
519
+
520
+ /**
521
+ * Body param: Outbound webhook endpoints to notify on job status changes
522
+ */
523
+ webhook_configurations?: Array<SheetCreateParams.WebhookConfiguration> | null;
524
+ }
525
+
526
+ export namespace SheetCreateParams {
527
+ /**
528
+ * Configuration for a single outbound webhook endpoint.
529
+ */
530
+ export interface WebhookConfiguration {
531
+ /**
532
+ * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
533
+ * events are delivered.
534
+ */
535
+ webhook_events?: Array<
536
+ | 'classify.cancelled'
537
+ | 'classify.error'
538
+ | 'classify.partial_success'
539
+ | 'classify.pending'
540
+ | 'classify.running'
541
+ | 'classify.success'
542
+ | 'extract.cancelled'
543
+ | 'extract.error'
544
+ | 'extract.partial_success'
545
+ | 'extract.pending'
546
+ | 'extract.success'
547
+ | 'parse.cancelled'
548
+ | 'parse.error'
549
+ | 'parse.partial_success'
550
+ | 'parse.pending'
551
+ | 'parse.running'
552
+ | 'parse.success'
553
+ | 'sheets.cancelled'
554
+ | 'sheets.error'
555
+ | 'sheets.partial_success'
556
+ | 'sheets.pending'
557
+ | 'sheets.success'
558
+ | 'split.cancelled'
559
+ | 'split.error'
560
+ | 'split.pending'
561
+ | 'split.processing'
562
+ | 'split.success'
563
+ | 'unmapped_event'
564
+ > | null;
565
+
566
+ /**
567
+ * Custom HTTP headers sent with each webhook request (e.g. auth tokens)
568
+ */
569
+ webhook_headers?: { [key: string]: string } | null;
570
+
571
+ /**
572
+ * Response format sent to the webhook: 'string' (default) or 'json'
573
+ */
574
+ webhook_output_format?: string | null;
575
+
576
+ /**
577
+ * URL to receive webhook POST notifications
578
+ */
579
+ webhook_url?: string | null;
580
+ }
448
581
  }
449
582
 
450
583
  export interface SheetListParams extends PaginatedCursorParams {
584
+ /**
585
+ * Filter by saved configuration ID
586
+ */
587
+ configuration_id?: string | null;
588
+
451
589
  /**
452
590
  * Include items created at or after this timestamp (inclusive)
453
591
  */
@@ -472,16 +610,16 @@ export interface SheetListParams extends PaginatedCursorParams {
472
610
  /**
473
611
  * Filter by job status
474
612
  */
475
- status?: ParsingAPI.StatusEnum | null;
476
- }
477
-
478
- export interface SheetDeleteJobParams {
479
- organization_id?: string | null;
480
-
481
- project_id?: string | null;
613
+ status?: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS' | null;
482
614
  }
483
615
 
484
616
  export interface SheetGetParams {
617
+ /**
618
+ * Optional fields to populate on the response. Valid values:
619
+ * metadata_state_transitions.
620
+ */
621
+ expand?: Array<string>;
622
+
485
623
  include_results?: boolean;
486
624
 
487
625
  organization_id?: string | null;
@@ -526,6 +664,12 @@ export interface SheetWaitForCompletionParams extends PollingOptions {
526
664
  project_id?: string | null;
527
665
  }
528
666
 
667
+ export interface SheetDeleteJobParams {
668
+ organization_id?: string | null;
669
+
670
+ project_id?: string | null;
671
+ }
672
+
529
673
  export declare namespace Sheets {
530
674
  export {
531
675
  type SheetsJob as SheetsJob,
@@ -534,9 +678,9 @@ export declare namespace Sheets {
534
678
  type SheetsJobsPaginatedCursor as SheetsJobsPaginatedCursor,
535
679
  type SheetCreateParams as SheetCreateParams,
536
680
  type SheetListParams as SheetListParams,
537
- type SheetDeleteJobParams as SheetDeleteJobParams,
538
681
  type SheetGetParams as SheetGetParams,
539
682
  type SheetGetResultTableParams as SheetGetResultTableParams,
683
+ type SheetDeleteJobParams as SheetDeleteJobParams,
540
684
  type SheetParseParams as SheetParseParams,
541
685
  type SheetWaitForCompletionParams as SheetWaitForCompletionParams,
542
686
  };
@@ -506,7 +506,7 @@ export namespace SplitCreateParams {
506
506
  * be assigned to a defined category. 'omit': pages can be classified as
507
507
  * 'uncategorized' but are excluded from results.
508
508
  */
509
- allow_uncategorized?: 'include' | 'forbid' | 'omit';
509
+ allow_uncategorized?: 'forbid' | 'include' | 'omit';
510
510
  }
511
511
  }
512
512
  }
@@ -534,7 +534,7 @@ export interface SplitListParams extends PaginatedCursorParams {
534
534
  /**
535
535
  * Filter by job status (pending, processing, completed, failed, cancelled)
536
536
  */
537
- status?: 'pending' | 'processing' | 'completed' | 'failed' | 'cancelled' | null;
537
+ status?: 'cancelled' | 'completed' | 'failed' | 'pending' | 'processing' | null;
538
538
  }
539
539
 
540
540
  export interface SplitGetParams {
@@ -373,8 +373,9 @@ export namespace JobCreateParams {
373
373
  export interface WebhookConfiguration {
374
374
  /**
375
375
  * Events that trigger this webhook. Options: 'parse.success' (job completed),
376
- * 'parse.failure' (job failed), 'parse.partial' (some pages failed). If not
377
- * specified, webhook fires for all events
376
+ * 'parse.error' (job failed), 'parse.partial_success' (some pages failed),
377
+ * 'parse.pending', 'parse.running', 'parse.cancelled'. If not specified, webhook
378
+ * fires for all events
378
379
  */
379
380
  webhook_events?: Array<string> | null;
380
381
 
@@ -384,6 +385,12 @@ export namespace JobCreateParams {
384
385
  */
385
386
  webhook_headers?: { [key: string]: unknown } | null;
386
387
 
388
+ /**
389
+ * Format of the webhook payload body. 'string' (default) sends the payload as a
390
+ * JSON-encoded string; 'json' sends it as a JSON object.
391
+ */
392
+ webhook_output_format?: 'json' | 'string' | null;
393
+
387
394
  /**
388
395
  * HTTPS URL to receive webhook POST requests. Must be publicly accessible
389
396
  */
@@ -281,9 +281,72 @@ export interface ClassifyCreateRequest {
281
281
  parse_job_id?: string | null;
282
282
 
283
283
  /**
284
- * Idempotency key scoped to the project
284
+ * Idempotency key scoped to the project. Reusing a key returns the original job;
285
+ * the new request body is ignored.
285
286
  */
286
287
  transaction_id?: string | null;
288
+
289
+ /**
290
+ * Outbound webhook endpoints to notify on job status changes
291
+ */
292
+ webhook_configurations?: Array<ClassifyCreateRequest.WebhookConfiguration> | null;
293
+ }
294
+
295
+ export namespace ClassifyCreateRequest {
296
+ /**
297
+ * Configuration for a single outbound webhook endpoint.
298
+ */
299
+ export interface WebhookConfiguration {
300
+ /**
301
+ * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
302
+ * events are delivered.
303
+ */
304
+ webhook_events?: Array<
305
+ | 'classify.cancelled'
306
+ | 'classify.error'
307
+ | 'classify.partial_success'
308
+ | 'classify.pending'
309
+ | 'classify.running'
310
+ | 'classify.success'
311
+ | 'extract.cancelled'
312
+ | 'extract.error'
313
+ | 'extract.partial_success'
314
+ | 'extract.pending'
315
+ | 'extract.success'
316
+ | 'parse.cancelled'
317
+ | 'parse.error'
318
+ | 'parse.partial_success'
319
+ | 'parse.pending'
320
+ | 'parse.running'
321
+ | 'parse.success'
322
+ | 'sheets.cancelled'
323
+ | 'sheets.error'
324
+ | 'sheets.partial_success'
325
+ | 'sheets.pending'
326
+ | 'sheets.success'
327
+ | 'split.cancelled'
328
+ | 'split.error'
329
+ | 'split.pending'
330
+ | 'split.processing'
331
+ | 'split.success'
332
+ | 'unmapped_event'
333
+ > | null;
334
+
335
+ /**
336
+ * Custom HTTP headers sent with each webhook request (e.g. auth tokens)
337
+ */
338
+ webhook_headers?: { [key: string]: string } | null;
339
+
340
+ /**
341
+ * Response format sent to the webhook: 'string' (default) or 'json'
342
+ */
343
+ webhook_output_format?: string | null;
344
+
345
+ /**
346
+ * URL to receive webhook POST notifications
347
+ */
348
+ webhook_url?: string | null;
349
+ }
287
350
  }
288
351
 
289
352
  /**
@@ -323,7 +386,7 @@ export interface ClassifyCreateResponse {
323
386
  /**
324
387
  * Whether the input was a file or parse job (FILE or PARSE_JOB)
325
388
  */
326
- document_input_type: 'url' | 'file_id' | 'parse_job_id';
389
+ document_input_type: 'file_id' | 'parse_job_id' | 'url';
327
390
 
328
391
  /**
329
392
  * ID of the input file or parse job
@@ -338,7 +401,7 @@ export interface ClassifyCreateResponse {
338
401
  /**
339
402
  * Current job status: PENDING, RUNNING, COMPLETED, or FAILED
340
403
  */
341
- status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
404
+ status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING';
342
405
 
343
406
  /**
344
407
  * User who created this job
@@ -398,7 +461,7 @@ export interface ClassifyListResponse {
398
461
  /**
399
462
  * Whether the input was a file or parse job (FILE or PARSE_JOB)
400
463
  */
401
- document_input_type: 'url' | 'file_id' | 'parse_job_id';
464
+ document_input_type: 'file_id' | 'parse_job_id' | 'url';
402
465
 
403
466
  /**
404
467
  * ID of the input file or parse job
@@ -413,7 +476,7 @@ export interface ClassifyListResponse {
413
476
  /**
414
477
  * Current job status: PENDING, RUNNING, COMPLETED, or FAILED
415
478
  */
416
- status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
479
+ status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING';
417
480
 
418
481
  /**
419
482
  * User who created this job
@@ -473,7 +536,7 @@ export interface ClassifyGetResponse {
473
536
  /**
474
537
  * Whether the input was a file or parse job (FILE or PARSE_JOB)
475
538
  */
476
- document_input_type: 'url' | 'file_id' | 'parse_job_id';
539
+ document_input_type: 'file_id' | 'parse_job_id' | 'url';
477
540
 
478
541
  /**
479
542
  * ID of the input file or parse job
@@ -488,7 +551,7 @@ export interface ClassifyGetResponse {
488
551
  /**
489
552
  * Current job status: PENDING, RUNNING, COMPLETED, or FAILED
490
553
  */
491
- status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
554
+ status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING';
492
555
 
493
556
  /**
494
557
  * User who created this job
@@ -568,9 +631,72 @@ export interface ClassifyCreateParams {
568
631
  parse_job_id?: string | null;
569
632
 
570
633
  /**
571
- * Body param: Idempotency key scoped to the project
634
+ * Body param: Idempotency key scoped to the project. Reusing a key returns the
635
+ * original job; the new request body is ignored.
572
636
  */
573
637
  transaction_id?: string | null;
638
+
639
+ /**
640
+ * Body param: Outbound webhook endpoints to notify on job status changes
641
+ */
642
+ webhook_configurations?: Array<ClassifyCreateParams.WebhookConfiguration> | null;
643
+ }
644
+
645
+ export namespace ClassifyCreateParams {
646
+ /**
647
+ * Configuration for a single outbound webhook endpoint.
648
+ */
649
+ export interface WebhookConfiguration {
650
+ /**
651
+ * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
652
+ * events are delivered.
653
+ */
654
+ webhook_events?: Array<
655
+ | 'classify.cancelled'
656
+ | 'classify.error'
657
+ | 'classify.partial_success'
658
+ | 'classify.pending'
659
+ | 'classify.running'
660
+ | 'classify.success'
661
+ | 'extract.cancelled'
662
+ | 'extract.error'
663
+ | 'extract.partial_success'
664
+ | 'extract.pending'
665
+ | 'extract.success'
666
+ | 'parse.cancelled'
667
+ | 'parse.error'
668
+ | 'parse.partial_success'
669
+ | 'parse.pending'
670
+ | 'parse.running'
671
+ | 'parse.success'
672
+ | 'sheets.cancelled'
673
+ | 'sheets.error'
674
+ | 'sheets.partial_success'
675
+ | 'sheets.pending'
676
+ | 'sheets.success'
677
+ | 'split.cancelled'
678
+ | 'split.error'
679
+ | 'split.pending'
680
+ | 'split.processing'
681
+ | 'split.success'
682
+ | 'unmapped_event'
683
+ > | null;
684
+
685
+ /**
686
+ * Custom HTTP headers sent with each webhook request (e.g. auth tokens)
687
+ */
688
+ webhook_headers?: { [key: string]: string } | null;
689
+
690
+ /**
691
+ * Response format sent to the webhook: 'string' (default) or 'json'
692
+ */
693
+ webhook_output_format?: string | null;
694
+
695
+ /**
696
+ * URL to receive webhook POST notifications
697
+ */
698
+ webhook_url?: string | null;
699
+ }
574
700
  }
575
701
 
576
702
  export interface ClassifyListParams extends PaginatedCursorParams {
@@ -601,7 +727,7 @@ export interface ClassifyListParams extends PaginatedCursorParams {
601
727
  /**
602
728
  * Filter by job status
603
729
  */
604
- status?: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | null;
730
+ status?: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | null;
605
731
  }
606
732
 
607
733
  export interface ClassifyGetParams {