@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
@@ -9,8 +9,33 @@ import { RequestOptions } from '../../internal/request-options';
9
9
  import { path } from '../../internal/utils/path';
10
10
 
11
11
  export class DataSources extends APIResource {
12
+ /**
13
+ * Get data sources for a pipeline.
14
+ *
15
+ * @deprecated
16
+ */
17
+ getDataSources(pipelineID: string, options?: RequestOptions): APIPromise<DataSourceGetDataSourcesResponse> {
18
+ return this._client.get(path`/api/v1/pipelines/${pipelineID}/data-sources`, options);
19
+ }
20
+
21
+ /**
22
+ * Add data sources to a pipeline.
23
+ *
24
+ * @deprecated
25
+ */
26
+ updateDataSources(
27
+ pipelineID: string,
28
+ params: DataSourceUpdateDataSourcesParams,
29
+ options?: RequestOptions,
30
+ ): APIPromise<DataSourceUpdateDataSourcesResponse> {
31
+ const { body } = params;
32
+ return this._client.put(path`/api/v1/pipelines/${pipelineID}/data-sources`, { body: body, ...options });
33
+ }
34
+
12
35
  /**
13
36
  * Update the configuration of a data source in a pipeline.
37
+ *
38
+ * @deprecated
14
39
  */
15
40
  update(
16
41
  dataSourceID: string,
@@ -24,15 +49,10 @@ export class DataSources extends APIResource {
24
49
  });
25
50
  }
26
51
 
27
- /**
28
- * Get data sources for a pipeline.
29
- */
30
- getDataSources(pipelineID: string, options?: RequestOptions): APIPromise<DataSourceGetDataSourcesResponse> {
31
- return this._client.get(path`/api/v1/pipelines/${pipelineID}/data-sources`, options);
32
- }
33
-
34
52
  /**
35
53
  * Get the status of a data source for a pipeline.
54
+ *
55
+ * @deprecated
36
56
  */
37
57
  getStatus(
38
58
  dataSourceID: string,
@@ -49,6 +69,8 @@ export class DataSources extends APIResource {
49
69
  /**
50
70
  * Run incremental ingestion: pull upstream changes from the data source into the
51
71
  * data sink.
72
+ *
73
+ * @deprecated
52
74
  */
53
75
  sync(
54
76
  dataSourceID: string,
@@ -61,18 +83,6 @@ export class DataSources extends APIResource {
61
83
  ...options,
62
84
  });
63
85
  }
64
-
65
- /**
66
- * Add data sources to a pipeline.
67
- */
68
- updateDataSources(
69
- pipelineID: string,
70
- params: DataSourceUpdateDataSourcesParams,
71
- options?: RequestOptions,
72
- ): APIPromise<DataSourceUpdateDataSourcesResponse> {
73
- const { body } = params;
74
- return this._client.put(path`/api/v1/pipelines/${pipelineID}/data-sources`, { body: body, ...options });
75
- }
76
86
  }
77
87
 
78
88
  /**
@@ -124,17 +134,17 @@ export interface PipelineDataSource {
124
134
  project_id: string;
125
135
 
126
136
  source_type:
127
- | 'S3'
128
137
  | 'AZURE_STORAGE_BLOB'
138
+ | 'BOX'
139
+ | 'CONFLUENCE'
129
140
  | 'GOOGLE_DRIVE'
141
+ | 'JIRA'
142
+ | 'JIRA_V2'
130
143
  | 'MICROSOFT_ONEDRIVE'
131
144
  | 'MICROSOFT_SHAREPOINT'
132
- | 'SLACK'
133
145
  | 'NOTION_PAGE'
134
- | 'CONFLUENCE'
135
- | 'JIRA'
136
- | 'JIRA_V2'
137
- | 'BOX';
146
+ | 'S3'
147
+ | 'SLACK';
138
148
 
139
149
  /**
140
150
  * Creation datetime
@@ -151,7 +161,7 @@ export interface PipelineDataSource {
151
161
  /**
152
162
  * The status of the data source in the pipeline.
153
163
  */
154
- status?: 'NOT_STARTED' | 'IN_PROGRESS' | 'SUCCESS' | 'ERROR' | 'CANCELLED' | null;
164
+ status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS' | null;
155
165
 
156
166
  /**
157
167
  * The last time the status was updated.
@@ -183,6 +193,28 @@ export type DataSourceGetDataSourcesResponse = Array<PipelineDataSource>;
183
193
 
184
194
  export type DataSourceUpdateDataSourcesResponse = Array<PipelineDataSource>;
185
195
 
196
+ export interface DataSourceUpdateDataSourcesParams {
197
+ body: Array<DataSourceUpdateDataSourcesParams.Body>;
198
+ }
199
+
200
+ export namespace DataSourceUpdateDataSourcesParams {
201
+ /**
202
+ * Schema for creating an association between a data source and a pipeline.
203
+ */
204
+ export interface Body {
205
+ /**
206
+ * The ID of the data source.
207
+ */
208
+ data_source_id: string;
209
+
210
+ /**
211
+ * The interval at which the data source should be synced. Valid values are: 21600,
212
+ * 43200, 86400
213
+ */
214
+ sync_interval?: number | null;
215
+ }
216
+ }
217
+
186
218
  export interface DataSourceUpdateParams {
187
219
  /**
188
220
  * Path param
@@ -211,36 +243,14 @@ export interface DataSourceSyncParams {
211
243
  pipeline_file_ids?: Array<string> | null;
212
244
  }
213
245
 
214
- export interface DataSourceUpdateDataSourcesParams {
215
- body: Array<DataSourceUpdateDataSourcesParams.Body>;
216
- }
217
-
218
- export namespace DataSourceUpdateDataSourcesParams {
219
- /**
220
- * Schema for creating an association between a data source and a pipeline.
221
- */
222
- export interface Body {
223
- /**
224
- * The ID of the data source.
225
- */
226
- data_source_id: string;
227
-
228
- /**
229
- * The interval at which the data source should be synced. Valid values are: 21600,
230
- * 43200, 86400
231
- */
232
- sync_interval?: number | null;
233
- }
234
- }
235
-
236
246
  export declare namespace DataSources {
237
247
  export {
238
248
  type PipelineDataSource as PipelineDataSource,
239
249
  type DataSourceGetDataSourcesResponse as DataSourceGetDataSourcesResponse,
240
250
  type DataSourceUpdateDataSourcesResponse as DataSourceUpdateDataSourcesResponse,
251
+ type DataSourceUpdateDataSourcesParams as DataSourceUpdateDataSourcesParams,
241
252
  type DataSourceUpdateParams as DataSourceUpdateParams,
242
253
  type DataSourceGetStatusParams as DataSourceGetStatusParams,
243
254
  type DataSourceSyncParams as DataSourceSyncParams,
244
- type DataSourceUpdateDataSourcesParams as DataSourceUpdateDataSourcesParams,
245
255
  };
246
256
  }
@@ -15,6 +15,8 @@ import { path } from '../../internal/utils/path';
15
15
  export class Documents extends APIResource {
16
16
  /**
17
17
  * Batch create documents for a pipeline.
18
+ *
19
+ * @deprecated
18
20
  */
19
21
  create(
20
22
  pipelineID: string,
@@ -27,6 +29,8 @@ export class Documents extends APIResource {
27
29
 
28
30
  /**
29
31
  * Return a list of documents for a pipeline.
32
+ *
33
+ * @deprecated
30
34
  */
31
35
  list(
32
36
  pipelineID: string,
@@ -40,20 +44,10 @@ export class Documents extends APIResource {
40
44
  );
41
45
  }
42
46
 
43
- /**
44
- * Delete a document from a pipeline; runs async (vectors first, then MongoDB
45
- * record).
46
- */
47
- delete(documentID: string, params: DocumentDeleteParams, options?: RequestOptions): APIPromise<void> {
48
- const { pipeline_id } = params;
49
- return this._client.delete(path`/api/v1/pipelines/${pipeline_id}/documents/${documentID}`, {
50
- ...options,
51
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
52
- });
53
- }
54
-
55
47
  /**
56
48
  * Return a single document for a pipeline.
49
+ *
50
+ * @deprecated
57
51
  */
58
52
  get(documentID: string, params: DocumentGetParams, options?: RequestOptions): APIPromise<CloudDocument> {
59
53
  const { pipeline_id } = params;
@@ -61,19 +55,23 @@ export class Documents extends APIResource {
61
55
  }
62
56
 
63
57
  /**
64
- * Return a list of chunks for a pipeline document.
58
+ * Delete a document from a pipeline; runs async (vectors first, then MongoDB
59
+ * record).
60
+ *
61
+ * @deprecated
65
62
  */
66
- getChunks(
67
- documentID: string,
68
- params: DocumentGetChunksParams,
69
- options?: RequestOptions,
70
- ): APIPromise<DocumentGetChunksResponse> {
63
+ delete(documentID: string, params: DocumentDeleteParams, options?: RequestOptions): APIPromise<void> {
71
64
  const { pipeline_id } = params;
72
- return this._client.get(path`/api/v1/pipelines/${pipeline_id}/documents/${documentID}/chunks`, options);
65
+ return this._client.delete(path`/api/v1/pipelines/${pipeline_id}/documents/${documentID}`, {
66
+ ...options,
67
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
68
+ });
73
69
  }
74
70
 
75
71
  /**
76
72
  * Return a single document for a pipeline.
73
+ *
74
+ * @deprecated
77
75
  */
78
76
  getStatus(
79
77
  documentID: string,
@@ -86,14 +84,32 @@ export class Documents extends APIResource {
86
84
 
87
85
  /**
88
86
  * Sync a specific document for a pipeline.
87
+ *
88
+ * @deprecated
89
89
  */
90
90
  sync(documentID: string, params: DocumentSyncParams, options?: RequestOptions): APIPromise<unknown> {
91
91
  const { pipeline_id } = params;
92
92
  return this._client.post(path`/api/v1/pipelines/${pipeline_id}/documents/${documentID}/sync`, options);
93
93
  }
94
94
 
95
+ /**
96
+ * Return a list of chunks for a pipeline document.
97
+ *
98
+ * @deprecated
99
+ */
100
+ getChunks(
101
+ documentID: string,
102
+ params: DocumentGetChunksParams,
103
+ options?: RequestOptions,
104
+ ): APIPromise<DocumentGetChunksResponse> {
105
+ const { pipeline_id } = params;
106
+ return this._client.get(path`/api/v1/pipelines/${pipeline_id}/documents/${documentID}/chunks`, options);
107
+ }
108
+
95
109
  /**
96
110
  * Batch create or update a document for a pipeline.
111
+ *
112
+ * @deprecated
97
113
  */
98
114
  upsert(
99
115
  pipelineID: string,
@@ -272,15 +288,11 @@ export interface DocumentListParams extends PaginatedCloudDocumentsParams {
272
288
  status_refresh_policy?: 'cached' | 'ttl';
273
289
  }
274
290
 
275
- export interface DocumentDeleteParams {
276
- pipeline_id: string;
277
- }
278
-
279
291
  export interface DocumentGetParams {
280
292
  pipeline_id: string;
281
293
  }
282
294
 
283
- export interface DocumentGetChunksParams {
295
+ export interface DocumentDeleteParams {
284
296
  pipeline_id: string;
285
297
  }
286
298
 
@@ -292,6 +304,10 @@ export interface DocumentSyncParams {
292
304
  pipeline_id: string;
293
305
  }
294
306
 
307
+ export interface DocumentGetChunksParams {
308
+ pipeline_id: string;
309
+ }
310
+
295
311
  export interface DocumentUpsertParams {
296
312
  body: Array<CloudDocumentCreate>;
297
313
  }
@@ -308,11 +324,11 @@ export declare namespace Documents {
308
324
  type CloudDocumentsPaginatedCloudDocuments as CloudDocumentsPaginatedCloudDocuments,
309
325
  type DocumentCreateParams as DocumentCreateParams,
310
326
  type DocumentListParams as DocumentListParams,
311
- type DocumentDeleteParams as DocumentDeleteParams,
312
327
  type DocumentGetParams as DocumentGetParams,
313
- type DocumentGetChunksParams as DocumentGetChunksParams,
328
+ type DocumentDeleteParams as DocumentDeleteParams,
314
329
  type DocumentGetStatusParams as DocumentGetStatusParams,
315
330
  type DocumentSyncParams as DocumentSyncParams,
331
+ type DocumentGetChunksParams as DocumentGetChunksParams,
316
332
  type DocumentUpsertParams as DocumentUpsertParams,
317
333
  };
318
334
  }
@@ -13,8 +13,37 @@ import { RequestOptions } from '../../internal/request-options';
13
13
  import { path } from '../../internal/utils/path';
14
14
 
15
15
  export class Files extends APIResource {
16
+ /**
17
+ * Get files for a pipeline.
18
+ *
19
+ * @deprecated
20
+ */
21
+ getStatusCounts(
22
+ pipelineID: string,
23
+ query: FileGetStatusCountsParams | null | undefined = {},
24
+ options?: RequestOptions,
25
+ ): APIPromise<FileGetStatusCountsResponse> {
26
+ return this._client.get(path`/api/v1/pipelines/${pipelineID}/files/status-counts`, { query, ...options });
27
+ }
28
+
29
+ /**
30
+ * Get status of a file for a pipeline.
31
+ *
32
+ * @deprecated
33
+ */
34
+ getStatus(
35
+ fileID: string,
36
+ params: FileGetStatusParams,
37
+ options?: RequestOptions,
38
+ ): APIPromise<PipelinesAPI.ManagedIngestionStatusResponse> {
39
+ const { pipeline_id } = params;
40
+ return this._client.get(path`/api/v1/pipelines/${pipeline_id}/files/${fileID}/status`, options);
41
+ }
42
+
16
43
  /**
17
44
  * Add files to a pipeline.
45
+ *
46
+ * @deprecated
18
47
  */
19
48
  create(
20
49
  pipelineID: string,
@@ -27,6 +56,8 @@ export class Files extends APIResource {
27
56
 
28
57
  /**
29
58
  * Update a file for a pipeline.
59
+ *
60
+ * @deprecated
30
61
  */
31
62
  update(fileID: string, params: FileUpdateParams, options?: RequestOptions): APIPromise<PipelineFile> {
32
63
  const { pipeline_id, ...body } = params;
@@ -34,25 +65,10 @@ export class Files extends APIResource {
34
65
  }
35
66
 
36
67
  /**
37
- * List files for a pipeline with optional filtering, sorting, and pagination.
68
+ * Delete a file from a pipeline.
38
69
  *
39
70
  * @deprecated
40
71
  */
41
- list(
42
- pipelineID: string,
43
- query: FileListParams | null | undefined = {},
44
- options?: RequestOptions,
45
- ): PagePromise<PipelineFilesPaginatedPipelineFiles, PipelineFile> {
46
- return this._client.getAPIList(
47
- path`/api/v1/pipelines/${pipelineID}/files2`,
48
- PaginatedPipelineFiles<PipelineFile>,
49
- { query, ...options },
50
- );
51
- }
52
-
53
- /**
54
- * Delete a file from a pipeline.
55
- */
56
72
  delete(fileID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<void> {
57
73
  const { pipeline_id } = params;
58
74
  return this._client.delete(path`/api/v1/pipelines/${pipeline_id}/files/${fileID}`, {
@@ -62,26 +78,20 @@ export class Files extends APIResource {
62
78
  }
63
79
 
64
80
  /**
65
- * Get status of a file for a pipeline.
66
- */
67
- getStatus(
68
- fileID: string,
69
- params: FileGetStatusParams,
70
- options?: RequestOptions,
71
- ): APIPromise<PipelinesAPI.ManagedIngestionStatusResponse> {
72
- const { pipeline_id } = params;
73
- return this._client.get(path`/api/v1/pipelines/${pipeline_id}/files/${fileID}/status`, options);
74
- }
75
-
76
- /**
77
- * Get files for a pipeline.
81
+ * List files for a pipeline with optional filtering, sorting, and pagination.
82
+ *
83
+ * @deprecated
78
84
  */
79
- getStatusCounts(
85
+ list(
80
86
  pipelineID: string,
81
- query: FileGetStatusCountsParams | null | undefined = {},
87
+ query: FileListParams | null | undefined = {},
82
88
  options?: RequestOptions,
83
- ): APIPromise<FileGetStatusCountsResponse> {
84
- return this._client.get(path`/api/v1/pipelines/${pipelineID}/files/status-counts`, { query, ...options });
89
+ ): PagePromise<PipelineFilesPaginatedPipelineFiles, PipelineFile> {
90
+ return this._client.getAPIList(
91
+ path`/api/v1/pipelines/${pipelineID}/files2`,
92
+ PaginatedPipelineFiles<PipelineFile>,
93
+ { query, ...options },
94
+ );
85
95
  }
86
96
  }
87
97
 
@@ -182,7 +192,7 @@ export interface PipelineFile {
182
192
  /**
183
193
  * Status of the pipeline file.
184
194
  */
185
- status?: 'NOT_STARTED' | 'IN_PROGRESS' | 'SUCCESS' | 'ERROR' | 'CANCELLED' | null;
195
+ status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS' | null;
186
196
 
187
197
  /**
188
198
  * The last time the status was updated.
@@ -224,6 +234,16 @@ export interface FileGetStatusCountsResponse {
224
234
  pipeline_id?: string | null;
225
235
  }
226
236
 
237
+ export interface FileGetStatusCountsParams {
238
+ data_source_id?: string | null;
239
+
240
+ only_manually_uploaded?: boolean;
241
+ }
242
+
243
+ export interface FileGetStatusParams {
244
+ pipeline_id: string;
245
+ }
246
+
227
247
  export interface FileCreateParams {
228
248
  body: Array<FileCreateParams.Body>;
229
249
  }
@@ -261,6 +281,10 @@ export interface FileUpdateParams {
261
281
  } | null;
262
282
  }
263
283
 
284
+ export interface FileDeleteParams {
285
+ pipeline_id: string;
286
+ }
287
+
264
288
  export interface FileListParams extends PaginatedPipelineFilesParams {
265
289
  data_source_id?: string | null;
266
290
 
@@ -273,21 +297,7 @@ export interface FileListParams extends PaginatedPipelineFilesParams {
273
297
  /**
274
298
  * Filter by file statuses
275
299
  */
276
- statuses?: Array<'NOT_STARTED' | 'IN_PROGRESS' | 'SUCCESS' | 'ERROR' | 'CANCELLED'> | null;
277
- }
278
-
279
- export interface FileDeleteParams {
280
- pipeline_id: string;
281
- }
282
-
283
- export interface FileGetStatusParams {
284
- pipeline_id: string;
285
- }
286
-
287
- export interface FileGetStatusCountsParams {
288
- data_source_id?: string | null;
289
-
290
- only_manually_uploaded?: boolean;
300
+ statuses?: Array<'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'> | null;
291
301
  }
292
302
 
293
303
  export declare namespace Files {
@@ -296,11 +306,11 @@ export declare namespace Files {
296
306
  type FileCreateResponse as FileCreateResponse,
297
307
  type FileGetStatusCountsResponse as FileGetStatusCountsResponse,
298
308
  type PipelineFilesPaginatedPipelineFiles as PipelineFilesPaginatedPipelineFiles,
309
+ type FileGetStatusCountsParams as FileGetStatusCountsParams,
310
+ type FileGetStatusParams as FileGetStatusParams,
299
311
  type FileCreateParams as FileCreateParams,
300
312
  type FileUpdateParams as FileUpdateParams,
301
- type FileListParams as FileListParams,
302
313
  type FileDeleteParams as FileDeleteParams,
303
- type FileGetStatusParams as FileGetStatusParams,
304
- type FileGetStatusCountsParams as FileGetStatusCountsParams,
314
+ type FileListParams as FileListParams,
305
315
  };
306
316
  }
@@ -7,18 +7,14 @@ import { path } from '../../internal/utils/path';
7
7
 
8
8
  export class Images extends APIResource {
9
9
  /**
10
- * Get a specific figure from a page of a file.
10
+ * List metadata for all screenshots of pages from a file.
11
11
  */
12
- getPageFigure(
13
- figureName: string,
14
- params: ImageGetPageFigureParams,
12
+ listPageScreenshots(
13
+ id: string,
14
+ query: ImageListPageScreenshotsParams | null | undefined = {},
15
15
  options?: RequestOptions,
16
- ): APIPromise<unknown> {
17
- const { id, page_index, ...query } = params;
18
- return this._client.get(path`/api/v1/files/${id}/page-figures/${page_index}/${figureName}`, {
19
- query,
20
- ...options,
21
- });
16
+ ): APIPromise<ImageListPageScreenshotsResponse> {
17
+ return this._client.get(path`/api/v1/files/${id}/page_screenshots`, { query, ...options });
22
18
  }
23
19
 
24
20
  /**
@@ -34,25 +30,29 @@ export class Images extends APIResource {
34
30
  }
35
31
 
36
32
  /**
37
- * List metadata for all figures from all pages of a file.
33
+ * Get a specific figure from a page of a file.
38
34
  */
39
- listPageFigures(
40
- id: string,
41
- query: ImageListPageFiguresParams | null | undefined = {},
35
+ getPageFigure(
36
+ figureName: string,
37
+ params: ImageGetPageFigureParams,
42
38
  options?: RequestOptions,
43
- ): APIPromise<ImageListPageFiguresResponse> {
44
- return this._client.get(path`/api/v1/files/${id}/page-figures`, { query, ...options });
39
+ ): APIPromise<unknown> {
40
+ const { id, page_index, ...query } = params;
41
+ return this._client.get(path`/api/v1/files/${id}/page-figures/${page_index}/${figureName}`, {
42
+ query,
43
+ ...options,
44
+ });
45
45
  }
46
46
 
47
47
  /**
48
- * List metadata for all screenshots of pages from a file.
48
+ * List metadata for all figures from all pages of a file.
49
49
  */
50
- listPageScreenshots(
50
+ listPageFigures(
51
51
  id: string,
52
- query: ImageListPageScreenshotsParams | null | undefined = {},
52
+ query: ImageListPageFiguresParams | null | undefined = {},
53
53
  options?: RequestOptions,
54
- ): APIPromise<ImageListPageScreenshotsResponse> {
55
- return this._client.get(path`/api/v1/files/${id}/page_screenshots`, { query, ...options });
54
+ ): APIPromise<ImageListPageFiguresResponse> {
55
+ return this._client.get(path`/api/v1/files/${id}/page-figures`, { query, ...options });
56
56
  }
57
57
  }
58
58
 
@@ -129,16 +129,17 @@ export namespace ImageListPageScreenshotsResponse {
129
129
  }
130
130
  }
131
131
 
132
- export interface ImageGetPageFigureParams {
133
- /**
134
- * Path param
135
- */
136
- id: string;
132
+ export interface ImageListPageScreenshotsParams {
133
+ organization_id?: string | null;
137
134
 
135
+ project_id?: string | null;
136
+ }
137
+
138
+ export interface ImageGetPageScreenshotParams {
138
139
  /**
139
140
  * Path param
140
141
  */
141
- page_index: number;
142
+ id: string;
142
143
 
143
144
  /**
144
145
  * Query param
@@ -151,12 +152,17 @@ export interface ImageGetPageFigureParams {
151
152
  project_id?: string | null;
152
153
  }
153
154
 
154
- export interface ImageGetPageScreenshotParams {
155
+ export interface ImageGetPageFigureParams {
155
156
  /**
156
157
  * Path param
157
158
  */
158
159
  id: string;
159
160
 
161
+ /**
162
+ * Path param
163
+ */
164
+ page_index: number;
165
+
160
166
  /**
161
167
  * Query param
162
168
  */
@@ -174,21 +180,15 @@ export interface ImageListPageFiguresParams {
174
180
  project_id?: string | null;
175
181
  }
176
182
 
177
- export interface ImageListPageScreenshotsParams {
178
- organization_id?: string | null;
179
-
180
- project_id?: string | null;
181
- }
182
-
183
183
  export declare namespace Images {
184
184
  export {
185
185
  type ImageGetPageFigureResponse as ImageGetPageFigureResponse,
186
186
  type ImageGetPageScreenshotResponse as ImageGetPageScreenshotResponse,
187
187
  type ImageListPageFiguresResponse as ImageListPageFiguresResponse,
188
188
  type ImageListPageScreenshotsResponse as ImageListPageScreenshotsResponse,
189
- type ImageGetPageFigureParams as ImageGetPageFigureParams,
189
+ type ImageListPageScreenshotsParams as ImageListPageScreenshotsParams,
190
190
  type ImageGetPageScreenshotParams as ImageGetPageScreenshotParams,
191
+ type ImageGetPageFigureParams as ImageGetPageFigureParams,
191
192
  type ImageListPageFiguresParams as ImageListPageFiguresParams,
192
- type ImageListPageScreenshotsParams as ImageListPageScreenshotsParams,
193
193
  };
194
194
  }