@llamaindex/llama-cloud 2.9.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 (288) hide show
  1. package/CHANGELOG.md +20 -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 +4 -4
  12. package/resources/batches.d.mts.map +1 -1
  13. package/resources/batches.d.ts +4 -4
  14. package/resources/batches.d.ts.map +1 -1
  15. package/resources/beta/agent-data.d.mts +94 -94
  16. package/resources/beta/agent-data.d.mts.map +1 -1
  17. package/resources/beta/agent-data.d.ts +94 -94
  18. package/resources/beta/agent-data.d.ts.map +1 -1
  19. package/resources/beta/agent-data.js +41 -41
  20. package/resources/beta/agent-data.js.map +1 -1
  21. package/resources/beta/agent-data.mjs +41 -41
  22. package/resources/beta/agent-data.mjs.map +1 -1
  23. package/resources/beta/batch/batch.d.mts +29 -29
  24. package/resources/beta/batch/batch.d.mts.map +1 -1
  25. package/resources/beta/batch/batch.d.ts +29 -29
  26. package/resources/beta/batch/batch.d.ts.map +1 -1
  27. package/resources/beta/batch/batch.js +16 -16
  28. package/resources/beta/batch/batch.js.map +1 -1
  29. package/resources/beta/batch/batch.mjs +16 -16
  30. package/resources/beta/batch/batch.mjs.map +1 -1
  31. package/resources/beta/batch/index.d.mts +1 -1
  32. package/resources/beta/batch/index.d.mts.map +1 -1
  33. package/resources/beta/batch/index.d.ts +1 -1
  34. package/resources/beta/batch/index.d.ts.map +1 -1
  35. package/resources/beta/batch/job-items.d.mts +7 -7
  36. package/resources/beta/batch/job-items.d.mts.map +1 -1
  37. package/resources/beta/batch/job-items.d.ts +7 -7
  38. package/resources/beta/batch/job-items.d.ts.map +1 -1
  39. package/resources/beta/beta.d.mts +6 -6
  40. package/resources/beta/beta.d.mts.map +1 -1
  41. package/resources/beta/beta.d.ts +6 -6
  42. package/resources/beta/beta.d.ts.map +1 -1
  43. package/resources/beta/chat.d.mts +39 -39
  44. package/resources/beta/chat.d.mts.map +1 -1
  45. package/resources/beta/chat.d.ts +39 -39
  46. package/resources/beta/chat.d.ts.map +1 -1
  47. package/resources/beta/chat.js +14 -14
  48. package/resources/beta/chat.js.map +1 -1
  49. package/resources/beta/chat.mjs +14 -14
  50. package/resources/beta/chat.mjs.map +1 -1
  51. package/resources/beta/directories/directories.d.mts +48 -35
  52. package/resources/beta/directories/directories.d.mts.map +1 -1
  53. package/resources/beta/directories/directories.d.ts +48 -35
  54. package/resources/beta/directories/directories.d.ts.map +1 -1
  55. package/resources/beta/directories/directories.js +30 -30
  56. package/resources/beta/directories/directories.js.map +1 -1
  57. package/resources/beta/directories/directories.mjs +30 -30
  58. package/resources/beta/directories/directories.mjs.map +1 -1
  59. package/resources/beta/directories/files.d.mts +47 -47
  60. package/resources/beta/directories/files.d.mts.map +1 -1
  61. package/resources/beta/directories/files.d.ts +47 -47
  62. package/resources/beta/directories/files.d.ts.map +1 -1
  63. package/resources/beta/directories/files.js +32 -32
  64. package/resources/beta/directories/files.js.map +1 -1
  65. package/resources/beta/directories/files.mjs +32 -32
  66. package/resources/beta/directories/files.mjs.map +1 -1
  67. package/resources/beta/directories/index.d.mts +2 -2
  68. package/resources/beta/directories/index.d.mts.map +1 -1
  69. package/resources/beta/directories/index.d.ts +2 -2
  70. package/resources/beta/directories/index.d.ts.map +1 -1
  71. package/resources/beta/index.d.mts +6 -6
  72. package/resources/beta/index.d.mts.map +1 -1
  73. package/resources/beta/index.d.ts +6 -6
  74. package/resources/beta/index.d.ts.map +1 -1
  75. package/resources/beta/indexes.d.mts +32 -32
  76. package/resources/beta/indexes.d.mts.map +1 -1
  77. package/resources/beta/indexes.d.ts +32 -32
  78. package/resources/beta/indexes.d.ts.map +1 -1
  79. package/resources/beta/indexes.js +28 -28
  80. package/resources/beta/indexes.js.map +1 -1
  81. package/resources/beta/indexes.mjs +28 -28
  82. package/resources/beta/indexes.mjs.map +1 -1
  83. package/resources/beta/retrieval.d.mts +3 -3
  84. package/resources/beta/retrieval.d.mts.map +1 -1
  85. package/resources/beta/retrieval.d.ts +3 -3
  86. package/resources/beta/retrieval.d.ts.map +1 -1
  87. package/resources/beta/sheets.d.mts +23 -56
  88. package/resources/beta/sheets.d.mts.map +1 -1
  89. package/resources/beta/sheets.d.ts +23 -56
  90. package/resources/beta/sheets.d.ts.map +1 -1
  91. package/resources/beta/sheets.js +19 -52
  92. package/resources/beta/sheets.js.map +1 -1
  93. package/resources/beta/sheets.mjs +19 -52
  94. package/resources/beta/sheets.mjs.map +1 -1
  95. package/resources/beta/split.d.mts +2 -2
  96. package/resources/beta/split.d.mts.map +1 -1
  97. package/resources/beta/split.d.ts +2 -2
  98. package/resources/beta/split.d.ts.map +1 -1
  99. package/resources/classifier/jobs.d.mts +1 -1
  100. package/resources/classifier/jobs.d.mts.map +1 -1
  101. package/resources/classifier/jobs.d.ts +1 -1
  102. package/resources/classifier/jobs.d.ts.map +1 -1
  103. package/resources/classify.d.mts +13 -11
  104. package/resources/classify.d.mts.map +1 -1
  105. package/resources/classify.d.ts +13 -11
  106. package/resources/classify.d.ts.map +1 -1
  107. package/resources/configurations.d.mts +62 -43
  108. package/resources/configurations.d.mts.map +1 -1
  109. package/resources/configurations.d.ts +62 -43
  110. package/resources/configurations.d.ts.map +1 -1
  111. package/resources/configurations.js +9 -9
  112. package/resources/configurations.js.map +1 -1
  113. package/resources/configurations.mjs +9 -9
  114. package/resources/configurations.mjs.map +1 -1
  115. package/resources/data-sinks.d.mts +16 -16
  116. package/resources/data-sinks.d.mts.map +1 -1
  117. package/resources/data-sinks.d.ts +16 -16
  118. package/resources/data-sinks.d.ts.map +1 -1
  119. package/resources/data-sinks.js +12 -12
  120. package/resources/data-sinks.js.map +1 -1
  121. package/resources/data-sinks.mjs +12 -12
  122. package/resources/data-sinks.mjs.map +1 -1
  123. package/resources/data-sources.d.mts +17 -17
  124. package/resources/data-sources.d.mts.map +1 -1
  125. package/resources/data-sources.d.ts +17 -17
  126. package/resources/data-sources.d.ts.map +1 -1
  127. package/resources/data-sources.js +13 -13
  128. package/resources/data-sources.js.map +1 -1
  129. package/resources/data-sources.mjs +13 -13
  130. package/resources/data-sources.mjs.map +1 -1
  131. package/resources/extract.d.mts +48 -46
  132. package/resources/extract.d.mts.map +1 -1
  133. package/resources/extract.d.ts +48 -46
  134. package/resources/extract.d.ts.map +1 -1
  135. package/resources/extract.js +33 -33
  136. package/resources/extract.js.map +1 -1
  137. package/resources/extract.mjs +33 -33
  138. package/resources/extract.mjs.map +1 -1
  139. package/resources/files.d.mts +41 -41
  140. package/resources/files.d.mts.map +1 -1
  141. package/resources/files.d.ts +41 -41
  142. package/resources/files.d.ts.map +1 -1
  143. package/resources/files.js +13 -13
  144. package/resources/files.js.map +1 -1
  145. package/resources/files.mjs +13 -13
  146. package/resources/files.mjs.map +1 -1
  147. package/resources/index.d.mts +9 -8
  148. package/resources/index.d.mts.map +1 -1
  149. package/resources/index.d.ts +9 -8
  150. package/resources/index.d.ts.map +1 -1
  151. package/resources/index.js +3 -1
  152. package/resources/index.js.map +1 -1
  153. package/resources/index.mjs +1 -0
  154. package/resources/index.mjs.map +1 -1
  155. package/resources/parsing.d.mts +73 -51
  156. package/resources/parsing.d.mts.map +1 -1
  157. package/resources/parsing.d.ts +73 -51
  158. package/resources/parsing.d.ts.map +1 -1
  159. package/resources/parsing.js +12 -12
  160. package/resources/parsing.js.map +1 -1
  161. package/resources/parsing.mjs +12 -12
  162. package/resources/parsing.mjs.map +1 -1
  163. package/resources/pipelines/data-sources.d.mts +40 -30
  164. package/resources/pipelines/data-sources.d.mts.map +1 -1
  165. package/resources/pipelines/data-sources.d.ts +40 -30
  166. package/resources/pipelines/data-sources.d.ts.map +1 -1
  167. package/resources/pipelines/data-sources.js +23 -13
  168. package/resources/pipelines/data-sources.js.map +1 -1
  169. package/resources/pipelines/data-sources.mjs +23 -13
  170. package/resources/pipelines/data-sources.mjs.map +1 -1
  171. package/resources/pipelines/documents.d.mts +28 -12
  172. package/resources/pipelines/documents.d.mts.map +1 -1
  173. package/resources/pipelines/documents.d.ts +28 -12
  174. package/resources/pipelines/documents.d.ts.map +1 -1
  175. package/resources/pipelines/documents.js +30 -14
  176. package/resources/pipelines/documents.js.map +1 -1
  177. package/resources/pipelines/documents.mjs +30 -14
  178. package/resources/pipelines/documents.mjs.map +1 -1
  179. package/resources/pipelines/files.d.mts +34 -24
  180. package/resources/pipelines/files.d.mts.map +1 -1
  181. package/resources/pipelines/files.d.ts +34 -24
  182. package/resources/pipelines/files.d.ts.map +1 -1
  183. package/resources/pipelines/files.js +27 -17
  184. package/resources/pipelines/files.js.map +1 -1
  185. package/resources/pipelines/files.mjs +27 -17
  186. package/resources/pipelines/files.mjs.map +1 -1
  187. package/resources/pipelines/images.d.mts +17 -17
  188. package/resources/pipelines/images.d.mts.map +1 -1
  189. package/resources/pipelines/images.d.ts +17 -17
  190. package/resources/pipelines/images.d.ts.map +1 -1
  191. package/resources/pipelines/images.js +13 -13
  192. package/resources/pipelines/images.js.map +1 -1
  193. package/resources/pipelines/images.mjs +13 -13
  194. package/resources/pipelines/images.mjs.map +1 -1
  195. package/resources/pipelines/index.d.mts +5 -5
  196. package/resources/pipelines/index.d.mts.map +1 -1
  197. package/resources/pipelines/index.d.ts +5 -5
  198. package/resources/pipelines/index.d.ts.map +1 -1
  199. package/resources/pipelines/metadata.d.mts +4 -0
  200. package/resources/pipelines/metadata.d.mts.map +1 -1
  201. package/resources/pipelines/metadata.d.ts +4 -0
  202. package/resources/pipelines/metadata.d.ts.map +1 -1
  203. package/resources/pipelines/metadata.js +4 -0
  204. package/resources/pipelines/metadata.js.map +1 -1
  205. package/resources/pipelines/metadata.mjs +4 -0
  206. package/resources/pipelines/metadata.mjs.map +1 -1
  207. package/resources/pipelines/pipelines.d.mts +142 -126
  208. package/resources/pipelines/pipelines.d.mts.map +1 -1
  209. package/resources/pipelines/pipelines.d.ts +142 -126
  210. package/resources/pipelines/pipelines.d.ts.map +1 -1
  211. package/resources/pipelines/pipelines.js +39 -23
  212. package/resources/pipelines/pipelines.js.map +1 -1
  213. package/resources/pipelines/pipelines.mjs +39 -23
  214. package/resources/pipelines/pipelines.mjs.map +1 -1
  215. package/resources/pipelines/sync.d.mts +4 -0
  216. package/resources/pipelines/sync.d.mts.map +1 -1
  217. package/resources/pipelines/sync.d.ts +4 -0
  218. package/resources/pipelines/sync.d.ts.map +1 -1
  219. package/resources/pipelines/sync.js +4 -0
  220. package/resources/pipelines/sync.js.map +1 -1
  221. package/resources/pipelines/sync.mjs +4 -0
  222. package/resources/pipelines/sync.mjs.map +1 -1
  223. package/resources/retrievers/index.d.mts +1 -1
  224. package/resources/retrievers/index.d.mts.map +1 -1
  225. package/resources/retrievers/index.d.ts +1 -1
  226. package/resources/retrievers/index.d.ts.map +1 -1
  227. package/resources/retrievers/retrievers.d.mts +39 -39
  228. package/resources/retrievers/retrievers.d.mts.map +1 -1
  229. package/resources/retrievers/retrievers.d.ts +39 -39
  230. package/resources/retrievers/retrievers.d.ts.map +1 -1
  231. package/resources/retrievers/retrievers.js +20 -20
  232. package/resources/retrievers/retrievers.js.map +1 -1
  233. package/resources/retrievers/retrievers.mjs +20 -20
  234. package/resources/retrievers/retrievers.mjs.map +1 -1
  235. package/resources/shared.d.mts +11 -3
  236. package/resources/shared.d.mts.map +1 -1
  237. package/resources/shared.d.ts +11 -3
  238. package/resources/shared.d.ts.map +1 -1
  239. package/resources/sheets.d.mts +199 -0
  240. package/resources/sheets.d.mts.map +1 -0
  241. package/resources/sheets.d.ts +199 -0
  242. package/resources/sheets.d.ts.map +1 -0
  243. package/resources/sheets.js +101 -0
  244. package/resources/sheets.js.map +1 -0
  245. package/resources/sheets.mjs +97 -0
  246. package/resources/sheets.mjs.map +1 -0
  247. package/src/client.ts +33 -12
  248. package/src/resources/batches.ts +4 -4
  249. package/src/resources/beta/agent-data.ts +131 -131
  250. package/src/resources/beta/batch/batch.ts +59 -54
  251. package/src/resources/beta/batch/index.ts +1 -1
  252. package/src/resources/beta/batch/job-items.ts +26 -21
  253. package/src/resources/beta/beta.ts +12 -12
  254. package/src/resources/beta/chat.ts +57 -57
  255. package/src/resources/beta/directories/directories.ts +80 -66
  256. package/src/resources/beta/directories/files.ts +66 -66
  257. package/src/resources/beta/directories/index.ts +5 -5
  258. package/src/resources/beta/index.ts +12 -12
  259. package/src/resources/beta/indexes.ts +53 -53
  260. package/src/resources/beta/retrieval.ts +3 -3
  261. package/src/resources/beta/sheets.ts +74 -97
  262. package/src/resources/beta/split.ts +2 -2
  263. package/src/resources/classifier/jobs.ts +1 -1
  264. package/src/resources/classify.ts +51 -39
  265. package/src/resources/configurations.ts +84 -63
  266. package/src/resources/data-sinks.ts +26 -26
  267. package/src/resources/data-sources.ts +43 -43
  268. package/src/resources/extract.ts +109 -97
  269. package/src/resources/files.ts +61 -61
  270. package/src/resources/index.ts +21 -12
  271. package/src/resources/parsing.ts +229 -204
  272. package/src/resources/pipelines/data-sources.ts +59 -49
  273. package/src/resources/pipelines/documents.ts +42 -26
  274. package/src/resources/pipelines/files.ts +62 -52
  275. package/src/resources/pipelines/images.ts +36 -36
  276. package/src/resources/pipelines/index.ts +10 -10
  277. package/src/resources/pipelines/metadata.ts +4 -0
  278. package/src/resources/pipelines/pipelines.ts +228 -207
  279. package/src/resources/pipelines/sync.ts +4 -0
  280. package/src/resources/retrievers/index.ts +3 -3
  281. package/src/resources/retrievers/retrievers.ts +64 -64
  282. package/src/resources/shared.ts +12 -3
  283. package/src/resources/sheets.ts +314 -0
  284. package/src/version.ts +1 -1
  285. package/version.d.mts +1 -1
  286. package/version.d.ts +1 -1
  287. package/version.js +1 -1
  288. package/version.mjs +1 -1
@@ -9,39 +9,19 @@ import { path } from '../../internal/utils/path';
9
9
 
10
10
  export class Indexes extends APIResource {
11
11
  /**
12
- * Create a searchable index over a source directory.
13
- *
14
- * @example
15
- * ```ts
16
- * const index = await client.beta.indexes.create({
17
- * source_directory_id: 'dir-abc123',
18
- * });
19
- * ```
20
- */
21
- create(params: IndexCreateParams, options?: RequestOptions): APIPromise<IndexCreateResponse> {
22
- const { organization_id, project_id, ...body } = params;
23
- return this._client.post('/api/v1/indexes', { query: { organization_id, project_id }, body, ...options });
24
- }
25
-
26
- /**
27
- * List indexes for the current project.
12
+ * Get an index by ID.
28
13
  *
29
14
  * @example
30
15
  * ```ts
31
- * // Automatically fetches more pages as needed.
32
- * for await (const indexListResponse of client.beta.indexes.list()) {
33
- * // ...
34
- * }
16
+ * const index = await client.beta.indexes.get('index_id');
35
17
  * ```
36
18
  */
37
- list(
38
- query: IndexListParams | null | undefined = {},
19
+ get(
20
+ indexID: string,
21
+ query: IndexGetParams | null | undefined = {},
39
22
  options?: RequestOptions,
40
- ): PagePromise<IndexListResponsesPaginatedCursor, IndexListResponse> {
41
- return this._client.getAPIList('/api/v1/indexes', PaginatedCursor<IndexListResponse>, {
42
- query,
43
- ...options,
44
- });
23
+ ): APIPromise<IndexGetResponse> {
24
+ return this._client.get(path`/api/v1/indexes/${indexID}`, { query, ...options });
45
25
  }
46
26
 
47
27
  /**
@@ -66,19 +46,18 @@ export class Indexes extends APIResource {
66
46
  }
67
47
 
68
48
  /**
69
- * Get an index by ID.
49
+ * Create a searchable index over a source directory.
70
50
  *
71
51
  * @example
72
52
  * ```ts
73
- * const index = await client.beta.indexes.get('index_id');
53
+ * const index = await client.beta.indexes.create({
54
+ * source_directory_id: 'dir-abc123',
55
+ * });
74
56
  * ```
75
57
  */
76
- get(
77
- indexID: string,
78
- query: IndexGetParams | null | undefined = {},
79
- options?: RequestOptions,
80
- ): APIPromise<IndexGetResponse> {
81
- return this._client.get(path`/api/v1/indexes/${indexID}`, { query, ...options });
58
+ create(params: IndexCreateParams, options?: RequestOptions): APIPromise<IndexCreateResponse> {
59
+ const { organization_id, project_id, ...body } = params;
60
+ return this._client.post('/api/v1/indexes', { query: { organization_id, project_id }, body, ...options });
82
61
  }
83
62
 
84
63
  /**
@@ -101,6 +80,27 @@ export class Indexes extends APIResource {
101
80
  ...options,
102
81
  });
103
82
  }
83
+
84
+ /**
85
+ * List indexes for the current project.
86
+ *
87
+ * @example
88
+ * ```ts
89
+ * // Automatically fetches more pages as needed.
90
+ * for await (const indexListResponse of client.beta.indexes.list()) {
91
+ * // ...
92
+ * }
93
+ * ```
94
+ */
95
+ list(
96
+ query: IndexListParams | null | undefined = {},
97
+ options?: RequestOptions,
98
+ ): PagePromise<IndexListResponsesPaginatedCursor, IndexListResponse> {
99
+ return this._client.getAPIList('/api/v1/indexes', PaginatedCursor<IndexListResponse>, {
100
+ query,
101
+ ...options,
102
+ });
103
+ }
104
104
  }
105
105
 
106
106
  export type IndexListResponsesPaginatedCursor = PaginatedCursor<IndexListResponse>;
@@ -302,6 +302,18 @@ export interface IndexGetResponse {
302
302
 
303
303
  export type IndexSyncResponse = unknown;
304
304
 
305
+ export interface IndexGetParams {
306
+ organization_id?: string | null;
307
+
308
+ project_id?: string | null;
309
+ }
310
+
311
+ export interface IndexDeleteParams {
312
+ organization_id?: string | null;
313
+
314
+ project_id?: string | null;
315
+ }
316
+
305
317
  export interface IndexCreateParams {
306
318
  /**
307
319
  * Body param: ID of the source directory containing your documents.
@@ -379,30 +391,18 @@ export namespace IndexCreateParams {
379
391
  }
380
392
  }
381
393
 
382
- export interface IndexListParams extends PaginatedCursorParams {
383
- organization_id?: string | null;
384
-
385
- project_id?: string | null;
386
-
387
- source_directory_id?: string | null;
388
- }
389
-
390
- export interface IndexDeleteParams {
394
+ export interface IndexSyncParams {
391
395
  organization_id?: string | null;
392
396
 
393
397
  project_id?: string | null;
394
398
  }
395
399
 
396
- export interface IndexGetParams {
400
+ export interface IndexListParams extends PaginatedCursorParams {
397
401
  organization_id?: string | null;
398
402
 
399
403
  project_id?: string | null;
400
- }
401
404
 
402
- export interface IndexSyncParams {
403
- organization_id?: string | null;
404
-
405
- project_id?: string | null;
405
+ source_directory_id?: string | null;
406
406
  }
407
407
 
408
408
  export declare namespace Indexes {
@@ -412,10 +412,10 @@ export declare namespace Indexes {
412
412
  type IndexGetResponse as IndexGetResponse,
413
413
  type IndexSyncResponse as IndexSyncResponse,
414
414
  type IndexListResponsesPaginatedCursor as IndexListResponsesPaginatedCursor,
415
- type IndexCreateParams as IndexCreateParams,
416
- type IndexListParams as IndexListParams,
417
- type IndexDeleteParams as IndexDeleteParams,
418
415
  type IndexGetParams as IndexGetParams,
416
+ type IndexDeleteParams as IndexDeleteParams,
417
+ type IndexCreateParams as IndexCreateParams,
419
418
  type IndexSyncParams as IndexSyncParams,
419
+ type IndexListParams as IndexListParams,
420
420
  };
421
421
  }
@@ -333,13 +333,13 @@ export interface RetrievalRetrieveParams {
333
333
 
334
334
  export namespace RetrievalRetrieveParams {
335
335
  export interface FilterTypeUnionStrIntBoolFloat {
336
- operator: 'eq' | 'ne' | 'gt' | 'lt' | 'gte' | 'lte' | 'in' | 'nin';
336
+ operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin';
337
337
 
338
338
  value: string | boolean | number | Array<string | boolean | number>;
339
339
  }
340
340
 
341
341
  export interface UnionMember1 {
342
- operator: 'eq' | 'ne' | 'gt' | 'lt' | 'gte' | 'lte' | 'in' | 'nin';
342
+ operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin';
343
343
 
344
344
  value: number | Array<number>;
345
345
  }
@@ -368,7 +368,7 @@ export namespace RetrievalRetrieveParams {
368
368
 
369
369
  export namespace StaticFilters {
370
370
  export interface ParsedDirectoryFileID {
371
- operator: 'eq' | 'ne' | 'gt' | 'lt' | 'gte' | 'lte' | 'in' | 'nin';
371
+ operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin';
372
372
 
373
373
  value: string | Array<string>;
374
374
  }
@@ -17,14 +17,7 @@ export class Sheets extends APIResource {
17
17
  * default configuration is used. Optionally include `webhook_configurations` to
18
18
  * receive `sheets.*` status notifications.
19
19
  *
20
- * Experimental: not production-ready and subject to change.
21
- *
22
- * @example
23
- * ```ts
24
- * const sheetsJob = await client.beta.sheets.create({
25
- * file_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
26
- * });
27
- * ```
20
+ * @deprecated
28
21
  */
29
22
  create(params: SheetCreateParams, options?: RequestOptions): APIPromise<SheetsJob> {
30
23
  const { organization_id, project_id, ...body } = params;
@@ -36,16 +29,9 @@ export class Sheets extends APIResource {
36
29
  }
37
30
 
38
31
  /**
39
- * List spreadsheet parsing jobs. Experimental: not production-ready and subject to
40
- * change.
32
+ * List spreadsheet parsing jobs.
41
33
  *
42
- * @example
43
- * ```ts
44
- * // Automatically fetches more pages as needed.
45
- * for await (const sheetsJob of client.beta.sheets.list()) {
46
- * // ...
47
- * }
48
- * ```
34
+ * @deprecated
49
35
  */
50
36
  list(
51
37
  query: SheetListParams | null | undefined = {},
@@ -57,40 +43,12 @@ export class Sheets extends APIResource {
57
43
  });
58
44
  }
59
45
 
60
- /**
61
- * Delete a spreadsheet parsing job and its associated data. Experimental: not
62
- * production-ready and subject to change.
63
- *
64
- * @example
65
- * ```ts
66
- * const response = await client.beta.sheets.deleteJob(
67
- * 'spreadsheet_job_id',
68
- * );
69
- * ```
70
- */
71
- deleteJob(
72
- spreadsheetJobID: string,
73
- params: SheetDeleteJobParams | null | undefined = {},
74
- options?: RequestOptions,
75
- ): APIPromise<unknown> {
76
- const { organization_id, project_id } = params ?? {};
77
- return this._client.delete(path`/api/v1/beta/sheets/jobs/${spreadsheetJobID}`, {
78
- query: { organization_id, project_id },
79
- ...options,
80
- });
81
- }
82
-
83
46
  /**
84
47
  * Get a spreadsheet parsing job. When `include_results=True` (default), embeds
85
48
  * extracted regions and results if complete, skipping the separate `/results`
86
- * call. Experimental: not production-ready and subject to change.
49
+ * call.
87
50
  *
88
- * @example
89
- * ```ts
90
- * const sheetsJob = await client.beta.sheets.get(
91
- * 'spreadsheet_job_id',
92
- * );
93
- * ```
51
+ * @deprecated
94
52
  */
95
53
  get(
96
54
  spreadsheetJobID: string,
@@ -101,20 +59,12 @@ export class Sheets extends APIResource {
101
59
  }
102
60
 
103
61
  /**
104
- * Generate a presigned URL to download a specific extracted region. Experimental:
105
- * not production-ready and subject to change.
62
+ * Generate a presigned URL to download a specific extracted region.
106
63
  *
107
- * @example
108
- * ```ts
109
- * const presignedURL =
110
- * await client.beta.sheets.getResultTable('table', {
111
- * spreadsheet_job_id: 'spreadsheet_job_id',
112
- * region_id: 'region_id',
113
- * });
114
- * ```
64
+ * @deprecated
115
65
  */
116
66
  getResultTable(
117
- regionType: 'table' | 'extra' | 'cell_metadata',
67
+ regionType: 'cell_metadata' | 'extra' | 'table',
118
68
  params: SheetGetResultTableParams,
119
69
  options?: RequestOptions,
120
70
  ): APIPromise<FilesAPI.PresignedURL> {
@@ -125,6 +75,23 @@ export class Sheets extends APIResource {
125
75
  );
126
76
  }
127
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
+
128
95
  /**
129
96
  * Create a spreadsheet parsing job and wait for it to complete, returning the job with results.
130
97
  *
@@ -281,7 +248,7 @@ export interface SheetsJob {
281
248
  /**
282
249
  * The status of the parsing job
283
250
  */
284
- status: 'PENDING' | 'SUCCESS' | 'ERROR' | 'PARTIAL_SUCCESS' | 'CANCELLED';
251
+ status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS';
285
252
 
286
253
  /**
287
254
  * When the job was last updated
@@ -361,28 +328,33 @@ export namespace SheetsJob {
361
328
  * events are delivered.
362
329
  */
363
330
  webhook_events?: Array<
364
- | 'extract.pending'
365
- | 'extract.success'
331
+ | 'classify.cancelled'
332
+ | 'classify.error'
333
+ | 'classify.partial_success'
334
+ | 'classify.pending'
335
+ | 'classify.running'
336
+ | 'classify.success'
337
+ | 'extract.cancelled'
366
338
  | 'extract.error'
367
339
  | 'extract.partial_success'
368
- | 'extract.cancelled'
340
+ | 'extract.pending'
341
+ | 'extract.success'
342
+ | 'parse.cancelled'
343
+ | 'parse.error'
344
+ | 'parse.partial_success'
369
345
  | 'parse.pending'
370
346
  | 'parse.running'
371
347
  | 'parse.success'
372
- | 'parse.error'
373
- | 'parse.partial_success'
374
- | 'parse.cancelled'
375
- | 'classify.pending'
376
- | 'classify.running'
377
- | 'classify.success'
378
- | 'classify.error'
379
- | 'classify.partial_success'
380
- | 'classify.cancelled'
381
- | 'sheets.pending'
382
- | 'sheets.success'
348
+ | 'sheets.cancelled'
383
349
  | 'sheets.error'
384
350
  | 'sheets.partial_success'
385
- | 'sheets.cancelled'
351
+ | 'sheets.pending'
352
+ | 'sheets.success'
353
+ | 'split.cancelled'
354
+ | 'split.error'
355
+ | 'split.pending'
356
+ | 'split.processing'
357
+ | 'split.success'
386
358
  | 'unmapped_event'
387
359
  > | null;
388
360
 
@@ -561,28 +533,33 @@ export namespace SheetCreateParams {
561
533
  * events are delivered.
562
534
  */
563
535
  webhook_events?: Array<
564
- | 'extract.pending'
565
- | 'extract.success'
536
+ | 'classify.cancelled'
537
+ | 'classify.error'
538
+ | 'classify.partial_success'
539
+ | 'classify.pending'
540
+ | 'classify.running'
541
+ | 'classify.success'
542
+ | 'extract.cancelled'
566
543
  | 'extract.error'
567
544
  | 'extract.partial_success'
568
- | 'extract.cancelled'
545
+ | 'extract.pending'
546
+ | 'extract.success'
547
+ | 'parse.cancelled'
548
+ | 'parse.error'
549
+ | 'parse.partial_success'
569
550
  | 'parse.pending'
570
551
  | 'parse.running'
571
552
  | 'parse.success'
572
- | 'parse.error'
573
- | 'parse.partial_success'
574
- | 'parse.cancelled'
575
- | 'classify.pending'
576
- | 'classify.running'
577
- | 'classify.success'
578
- | 'classify.error'
579
- | 'classify.partial_success'
580
- | 'classify.cancelled'
581
- | 'sheets.pending'
582
- | 'sheets.success'
553
+ | 'sheets.cancelled'
583
554
  | 'sheets.error'
584
555
  | 'sheets.partial_success'
585
- | 'sheets.cancelled'
556
+ | 'sheets.pending'
557
+ | 'sheets.success'
558
+ | 'split.cancelled'
559
+ | 'split.error'
560
+ | 'split.pending'
561
+ | 'split.processing'
562
+ | 'split.success'
586
563
  | 'unmapped_event'
587
564
  > | null;
588
565
 
@@ -633,13 +610,7 @@ export interface SheetListParams extends PaginatedCursorParams {
633
610
  /**
634
611
  * Filter by job status
635
612
  */
636
- status?: 'PENDING' | 'SUCCESS' | 'ERROR' | 'PARTIAL_SUCCESS' | 'CANCELLED' | null;
637
- }
638
-
639
- export interface SheetDeleteJobParams {
640
- organization_id?: string | null;
641
-
642
- project_id?: string | null;
613
+ status?: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS' | null;
643
614
  }
644
615
 
645
616
  export interface SheetGetParams {
@@ -693,6 +664,12 @@ export interface SheetWaitForCompletionParams extends PollingOptions {
693
664
  project_id?: string | null;
694
665
  }
695
666
 
667
+ export interface SheetDeleteJobParams {
668
+ organization_id?: string | null;
669
+
670
+ project_id?: string | null;
671
+ }
672
+
696
673
  export declare namespace Sheets {
697
674
  export {
698
675
  type SheetsJob as SheetsJob,
@@ -701,9 +678,9 @@ export declare namespace Sheets {
701
678
  type SheetsJobsPaginatedCursor as SheetsJobsPaginatedCursor,
702
679
  type SheetCreateParams as SheetCreateParams,
703
680
  type SheetListParams as SheetListParams,
704
- type SheetDeleteJobParams as SheetDeleteJobParams,
705
681
  type SheetGetParams as SheetGetParams,
706
682
  type SheetGetResultTableParams as SheetGetResultTableParams,
683
+ type SheetDeleteJobParams as SheetDeleteJobParams,
707
684
  type SheetParseParams as SheetParseParams,
708
685
  type SheetWaitForCompletionParams as SheetWaitForCompletionParams,
709
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 {
@@ -389,7 +389,7 @@ export namespace JobCreateParams {
389
389
  * Format of the webhook payload body. 'string' (default) sends the payload as a
390
390
  * JSON-encoded string; 'json' sends it as a JSON object.
391
391
  */
392
- webhook_output_format?: 'string' | 'json' | null;
392
+ webhook_output_format?: 'json' | 'string' | null;
393
393
 
394
394
  /**
395
395
  * HTTPS URL to receive webhook POST requests. Must be publicly accessible
@@ -281,7 +281,8 @@ 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;
287
288
 
@@ -301,28 +302,33 @@ export namespace ClassifyCreateRequest {
301
302
  * events are delivered.
302
303
  */
303
304
  webhook_events?: Array<
304
- | 'extract.pending'
305
- | 'extract.success'
305
+ | 'classify.cancelled'
306
+ | 'classify.error'
307
+ | 'classify.partial_success'
308
+ | 'classify.pending'
309
+ | 'classify.running'
310
+ | 'classify.success'
311
+ | 'extract.cancelled'
306
312
  | 'extract.error'
307
313
  | 'extract.partial_success'
308
- | 'extract.cancelled'
314
+ | 'extract.pending'
315
+ | 'extract.success'
316
+ | 'parse.cancelled'
317
+ | 'parse.error'
318
+ | 'parse.partial_success'
309
319
  | 'parse.pending'
310
320
  | 'parse.running'
311
321
  | 'parse.success'
312
- | 'parse.error'
313
- | 'parse.partial_success'
314
- | 'parse.cancelled'
315
- | 'classify.pending'
316
- | 'classify.running'
317
- | 'classify.success'
318
- | 'classify.error'
319
- | 'classify.partial_success'
320
- | 'classify.cancelled'
321
- | 'sheets.pending'
322
- | 'sheets.success'
322
+ | 'sheets.cancelled'
323
323
  | 'sheets.error'
324
324
  | 'sheets.partial_success'
325
- | 'sheets.cancelled'
325
+ | 'sheets.pending'
326
+ | 'sheets.success'
327
+ | 'split.cancelled'
328
+ | 'split.error'
329
+ | 'split.pending'
330
+ | 'split.processing'
331
+ | 'split.success'
326
332
  | 'unmapped_event'
327
333
  > | null;
328
334
 
@@ -380,7 +386,7 @@ export interface ClassifyCreateResponse {
380
386
  /**
381
387
  * Whether the input was a file or parse job (FILE or PARSE_JOB)
382
388
  */
383
- document_input_type: 'url' | 'file_id' | 'parse_job_id';
389
+ document_input_type: 'file_id' | 'parse_job_id' | 'url';
384
390
 
385
391
  /**
386
392
  * ID of the input file or parse job
@@ -395,7 +401,7 @@ export interface ClassifyCreateResponse {
395
401
  /**
396
402
  * Current job status: PENDING, RUNNING, COMPLETED, or FAILED
397
403
  */
398
- status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
404
+ status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING';
399
405
 
400
406
  /**
401
407
  * User who created this job
@@ -455,7 +461,7 @@ export interface ClassifyListResponse {
455
461
  /**
456
462
  * Whether the input was a file or parse job (FILE or PARSE_JOB)
457
463
  */
458
- document_input_type: 'url' | 'file_id' | 'parse_job_id';
464
+ document_input_type: 'file_id' | 'parse_job_id' | 'url';
459
465
 
460
466
  /**
461
467
  * ID of the input file or parse job
@@ -470,7 +476,7 @@ export interface ClassifyListResponse {
470
476
  /**
471
477
  * Current job status: PENDING, RUNNING, COMPLETED, or FAILED
472
478
  */
473
- status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
479
+ status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING';
474
480
 
475
481
  /**
476
482
  * User who created this job
@@ -530,7 +536,7 @@ export interface ClassifyGetResponse {
530
536
  /**
531
537
  * Whether the input was a file or parse job (FILE or PARSE_JOB)
532
538
  */
533
- document_input_type: 'url' | 'file_id' | 'parse_job_id';
539
+ document_input_type: 'file_id' | 'parse_job_id' | 'url';
534
540
 
535
541
  /**
536
542
  * ID of the input file or parse job
@@ -545,7 +551,7 @@ export interface ClassifyGetResponse {
545
551
  /**
546
552
  * Current job status: PENDING, RUNNING, COMPLETED, or FAILED
547
553
  */
548
- status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
554
+ status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING';
549
555
 
550
556
  /**
551
557
  * User who created this job
@@ -625,7 +631,8 @@ export interface ClassifyCreateParams {
625
631
  parse_job_id?: string | null;
626
632
 
627
633
  /**
628
- * 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.
629
636
  */
630
637
  transaction_id?: string | null;
631
638
 
@@ -645,28 +652,33 @@ export namespace ClassifyCreateParams {
645
652
  * events are delivered.
646
653
  */
647
654
  webhook_events?: Array<
648
- | 'extract.pending'
649
- | 'extract.success'
655
+ | 'classify.cancelled'
656
+ | 'classify.error'
657
+ | 'classify.partial_success'
658
+ | 'classify.pending'
659
+ | 'classify.running'
660
+ | 'classify.success'
661
+ | 'extract.cancelled'
650
662
  | 'extract.error'
651
663
  | 'extract.partial_success'
652
- | 'extract.cancelled'
664
+ | 'extract.pending'
665
+ | 'extract.success'
666
+ | 'parse.cancelled'
667
+ | 'parse.error'
668
+ | 'parse.partial_success'
653
669
  | 'parse.pending'
654
670
  | 'parse.running'
655
671
  | 'parse.success'
656
- | 'parse.error'
657
- | 'parse.partial_success'
658
- | 'parse.cancelled'
659
- | 'classify.pending'
660
- | 'classify.running'
661
- | 'classify.success'
662
- | 'classify.error'
663
- | 'classify.partial_success'
664
- | 'classify.cancelled'
665
- | 'sheets.pending'
666
- | 'sheets.success'
672
+ | 'sheets.cancelled'
667
673
  | 'sheets.error'
668
674
  | 'sheets.partial_success'
669
- | 'sheets.cancelled'
675
+ | 'sheets.pending'
676
+ | 'sheets.success'
677
+ | 'split.cancelled'
678
+ | 'split.error'
679
+ | 'split.pending'
680
+ | 'split.processing'
681
+ | 'split.success'
670
682
  | 'unmapped_event'
671
683
  > | null;
672
684
 
@@ -715,7 +727,7 @@ export interface ClassifyListParams extends PaginatedCursorParams {
715
727
  /**
716
728
  * Filter by job status
717
729
  */
718
- status?: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | null;
730
+ status?: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | null;
719
731
  }
720
732
 
721
733
  export interface ClassifyGetParams {