@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
@@ -12,25 +12,20 @@ import { path } from '../../../internal/utils/path';
12
12
 
13
13
  export class Files extends APIResource {
14
14
  /**
15
- * Update directory-file metadata by `directory_file_id`; set `directory_id` to
16
- * move the file to a different directory. To resolve from `unique_id`, list with a
17
- * filter first.
15
+ * Create a new file within the specified directory; the directory must exist in
16
+ * the project and `file_id` must reference an existing file.
18
17
  *
19
18
  * @example
20
19
  * ```ts
21
- * const file = await client.beta.directories.files.update(
22
- * 'directory_file_id',
23
- * { directory_id: 'directory_id' },
20
+ * const response = await client.beta.directories.files.add(
21
+ * 'directory_id',
22
+ * { file_id: 'file_id' },
24
23
  * );
25
24
  * ```
26
25
  */
27
- update(
28
- directoryFileID: string,
29
- params: FileUpdateParams,
30
- options?: RequestOptions,
31
- ): APIPromise<FileUpdateResponse> {
32
- const { directory_id, organization_id, project_id, ...body } = params;
33
- return this._client.patch(path`/api/v1/beta/directories/${directory_id}/files/${directoryFileID}`, {
26
+ add(directoryID: string, params: FileAddParams, options?: RequestOptions): APIPromise<FileAddResponse> {
27
+ const { organization_id, project_id, ...body } = params;
28
+ return this._client.post(path`/api/v1/beta/directories/${directoryID}/files`, {
34
29
  query: { organization_id, project_id },
35
30
  body,
36
31
  ...options,
@@ -64,41 +59,45 @@ export class Files extends APIResource {
64
59
  }
65
60
 
66
61
  /**
67
- * Delete a directory file by `directory_file_id`; to resolve from `unique_id`,
68
- * list with a filter first.
62
+ * Get a directory file by `directory_file_id`; to look up by `unique_id`, use the
63
+ * list endpoint with a filter.
69
64
  *
70
65
  * @example
71
66
  * ```ts
72
- * await client.beta.directories.files.delete(
67
+ * const file = await client.beta.directories.files.get(
73
68
  * 'directory_file_id',
74
69
  * { directory_id: 'directory_id' },
75
70
  * );
76
71
  * ```
77
72
  */
78
- delete(directoryFileID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<void> {
79
- const { directory_id, organization_id, project_id } = params;
80
- return this._client.delete(path`/api/v1/beta/directories/${directory_id}/files/${directoryFileID}`, {
81
- query: { organization_id, project_id },
73
+ get(directoryFileID: string, params: FileGetParams, options?: RequestOptions): APIPromise<FileGetResponse> {
74
+ const { directory_id, ...query } = params;
75
+ return this._client.get(path`/api/v1/beta/directories/${directory_id}/files/${directoryFileID}`, {
76
+ query,
82
77
  ...options,
83
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
84
78
  });
85
79
  }
86
80
 
87
81
  /**
88
- * Create a new file within the specified directory; the directory must exist in
89
- * the project and `file_id` must reference an existing file.
82
+ * Update directory-file metadata by `directory_file_id`; set `directory_id` to
83
+ * move the file to a different directory. To resolve from `unique_id`, list with a
84
+ * filter first.
90
85
  *
91
86
  * @example
92
87
  * ```ts
93
- * const response = await client.beta.directories.files.add(
94
- * 'directory_id',
95
- * { file_id: 'file_id' },
88
+ * const file = await client.beta.directories.files.update(
89
+ * 'directory_file_id',
90
+ * { directory_id: 'directory_id' },
96
91
  * );
97
92
  * ```
98
93
  */
99
- add(directoryID: string, params: FileAddParams, options?: RequestOptions): APIPromise<FileAddResponse> {
100
- const { organization_id, project_id, ...body } = params;
101
- return this._client.post(path`/api/v1/beta/directories/${directoryID}/files`, {
94
+ update(
95
+ directoryFileID: string,
96
+ params: FileUpdateParams,
97
+ options?: RequestOptions,
98
+ ): APIPromise<FileUpdateResponse> {
99
+ const { directory_id, organization_id, project_id, ...body } = params;
100
+ return this._client.patch(path`/api/v1/beta/directories/${directory_id}/files/${directoryFileID}`, {
102
101
  query: { organization_id, project_id },
103
102
  body,
104
103
  ...options,
@@ -106,22 +105,23 @@ export class Files extends APIResource {
106
105
  }
107
106
 
108
107
  /**
109
- * Get a directory file by `directory_file_id`; to look up by `unique_id`, use the
110
- * list endpoint with a filter.
108
+ * Delete a directory file by `directory_file_id`; to resolve from `unique_id`,
109
+ * list with a filter first.
111
110
  *
112
111
  * @example
113
112
  * ```ts
114
- * const file = await client.beta.directories.files.get(
113
+ * await client.beta.directories.files.delete(
115
114
  * 'directory_file_id',
116
115
  * { directory_id: 'directory_id' },
117
116
  * );
118
117
  * ```
119
118
  */
120
- get(directoryFileID: string, params: FileGetParams, options?: RequestOptions): APIPromise<FileGetResponse> {
121
- const { directory_id, ...query } = params;
122
- return this._client.get(path`/api/v1/beta/directories/${directory_id}/files/${directoryFileID}`, {
123
- query,
119
+ delete(directoryFileID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<void> {
120
+ const { directory_id, organization_id, project_id } = params;
121
+ return this._client.delete(path`/api/v1/beta/directories/${directory_id}/files/${directoryFileID}`, {
122
+ query: { organization_id, project_id },
124
123
  ...options,
124
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
125
125
  });
126
126
  }
127
127
 
@@ -204,7 +204,7 @@ export interface FileUpdateResponse {
204
204
  /**
205
205
  * Merged metadata from all sources. Higher-priority sources override lower.
206
206
  */
207
- metadata?: { [key: string]: string | number | boolean | Array<string> | null };
207
+ metadata?: { [key: string]: string | number | number | boolean | null | Array<string> };
208
208
 
209
209
  /**
210
210
  * Update datetime
@@ -264,7 +264,7 @@ export interface FileListResponse {
264
264
  /**
265
265
  * Merged metadata from all sources. Higher-priority sources override lower.
266
266
  */
267
- metadata?: { [key: string]: string | number | boolean | Array<string> | null };
267
+ metadata?: { [key: string]: string | number | number | boolean | null | Array<string> };
268
268
 
269
269
  /**
270
270
  * Update datetime
@@ -324,7 +324,7 @@ export interface FileAddResponse {
324
324
  /**
325
325
  * Merged metadata from all sources. Higher-priority sources override lower.
326
326
  */
327
- metadata?: { [key: string]: string | number | boolean | Array<string> | null };
327
+ metadata?: { [key: string]: string | number | number | boolean | null | Array<string> };
328
328
 
329
329
  /**
330
330
  * Update datetime
@@ -384,7 +384,7 @@ export interface FileGetResponse {
384
384
  /**
385
385
  * Merged metadata from all sources. Higher-priority sources override lower.
386
386
  */
387
- metadata?: { [key: string]: string | number | boolean | Array<string> | null };
387
+ metadata?: { [key: string]: string | number | number | boolean | null | Array<string> };
388
388
 
389
389
  /**
390
390
  * Update datetime
@@ -444,7 +444,7 @@ export interface FileUploadResponse {
444
444
  /**
445
445
  * Merged metadata from all sources. Higher-priority sources override lower.
446
446
  */
447
- metadata?: { [key: string]: string | number | boolean | Array<string> | null };
447
+ metadata?: { [key: string]: string | number | number | boolean | null | Array<string> };
448
448
 
449
449
  /**
450
450
  * Update datetime
@@ -452,11 +452,11 @@ export interface FileUploadResponse {
452
452
  updated_at?: string | null;
453
453
  }
454
454
 
455
- export interface FileUpdateParams {
455
+ export interface FileAddParams {
456
456
  /**
457
- * Path param
457
+ * Body param: File ID for the storage location (required).
458
458
  */
459
- directory_id: string;
459
+ file_id: string;
460
460
 
461
461
  /**
462
462
  * Query param
@@ -469,23 +469,19 @@ export interface FileUpdateParams {
469
469
  project_id?: string | null;
470
470
 
471
471
  /**
472
- * Body param: Updated display name.
472
+ * Body param: Display name for the file. If not provided, will use the file's
473
+ * name.
473
474
  */
474
475
  display_name?: string | null;
475
476
 
476
477
  /**
477
- * Body param: User-defined metadata key-value pairs. Replaces the user metadata
478
- * layer.
479
- */
480
- metadata?: { [key: string]: string | number | boolean | Array<string> | null } | null;
481
-
482
- /**
483
- * Body param: Move file to a different directory.
478
+ * Body param: User-defined metadata key-value pairs to associate with the file.
484
479
  */
485
- target_directory_id?: string | null;
480
+ metadata?: { [key: string]: string | number | number | boolean | null | Array<string> } | null;
486
481
 
487
482
  /**
488
- * Body param: Updated unique identifier.
483
+ * Body param: Unique identifier for the file in the directory. If not provided,
484
+ * will use the file's external_file_id or name.
489
485
  */
490
486
  unique_id?: string | null;
491
487
  }
@@ -521,12 +517,17 @@ export interface FileListParams extends PaginatedCursorParams {
521
517
  updated_at_on_or_before?: string | null;
522
518
  }
523
519
 
524
- export interface FileDeleteParams {
520
+ export interface FileGetParams {
525
521
  /**
526
522
  * Path param
527
523
  */
528
524
  directory_id: string;
529
525
 
526
+ /**
527
+ * Query param: Fields to expand.
528
+ */
529
+ expand?: Array<string> | null;
530
+
530
531
  /**
531
532
  * Query param
532
533
  */
@@ -538,11 +539,11 @@ export interface FileDeleteParams {
538
539
  project_id?: string | null;
539
540
  }
540
541
 
541
- export interface FileAddParams {
542
+ export interface FileUpdateParams {
542
543
  /**
543
- * Body param: File ID for the storage location (required).
544
+ * Path param
544
545
  */
545
- file_id: string;
546
+ directory_id: string;
546
547
 
547
548
  /**
548
549
  * Query param
@@ -555,34 +556,33 @@ export interface FileAddParams {
555
556
  project_id?: string | null;
556
557
 
557
558
  /**
558
- * Body param: Display name for the file. If not provided, will use the file's
559
- * name.
559
+ * Body param: Updated display name.
560
560
  */
561
561
  display_name?: string | null;
562
562
 
563
563
  /**
564
- * Body param: User-defined metadata key-value pairs to associate with the file.
564
+ * Body param: User-defined metadata key-value pairs. Replaces the user metadata
565
+ * layer.
565
566
  */
566
- metadata?: { [key: string]: string | number | boolean | Array<string> | null } | null;
567
+ metadata?: { [key: string]: string | number | number | boolean | null | Array<string> } | null;
567
568
 
568
569
  /**
569
- * Body param: Unique identifier for the file in the directory. If not provided,
570
- * will use the file's external_file_id or name.
570
+ * Body param: Move file to a different directory.
571
+ */
572
+ target_directory_id?: string | null;
573
+
574
+ /**
575
+ * Body param: Updated unique identifier.
571
576
  */
572
577
  unique_id?: string | null;
573
578
  }
574
579
 
575
- export interface FileGetParams {
580
+ export interface FileDeleteParams {
576
581
  /**
577
582
  * Path param
578
583
  */
579
584
  directory_id: string;
580
585
 
581
- /**
582
- * Query param: Fields to expand.
583
- */
584
- expand?: Array<string> | null;
585
-
586
586
  /**
587
587
  * Query param
588
588
  */
@@ -639,11 +639,11 @@ export declare namespace Files {
639
639
  type FileGetResponse as FileGetResponse,
640
640
  type FileUploadResponse as FileUploadResponse,
641
641
  type FileListResponsesPaginatedCursor as FileListResponsesPaginatedCursor,
642
- type FileUpdateParams as FileUpdateParams,
643
- type FileListParams as FileListParams,
644
- type FileDeleteParams as FileDeleteParams,
645
642
  type FileAddParams as FileAddParams,
643
+ type FileListParams as FileListParams,
646
644
  type FileGetParams as FileGetParams,
645
+ type FileUpdateParams as FileUpdateParams,
646
+ type FileDeleteParams as FileDeleteParams,
647
647
  type FileUploadParams as FileUploadParams,
648
648
  };
649
649
  }
@@ -7,10 +7,10 @@ export {
7
7
  type DirectoryListResponse,
8
8
  type DirectoryGetResponse,
9
9
  type DirectoryCreateParams,
10
- type DirectoryUpdateParams,
11
10
  type DirectoryListParams,
12
- type DirectoryDeleteParams,
13
11
  type DirectoryGetParams,
12
+ type DirectoryUpdateParams,
13
+ type DirectoryDeleteParams,
14
14
  type DirectoryListResponsesPaginatedCursor,
15
15
  } from './directories';
16
16
  export {
@@ -20,11 +20,11 @@ export {
20
20
  type FileAddResponse,
21
21
  type FileGetResponse,
22
22
  type FileUploadResponse,
23
- type FileUpdateParams,
24
- type FileListParams,
25
- type FileDeleteParams,
26
23
  type FileAddParams,
24
+ type FileListParams,
27
25
  type FileGetParams,
26
+ type FileUpdateParams,
27
+ type FileDeleteParams,
28
28
  type FileUploadParams,
29
29
  type FileListResponsesPaginatedCursor,
30
30
  } from './files';
@@ -5,15 +5,15 @@ export {
5
5
  type AgentDataDeleteResponse,
6
6
  type AgentDataAggregateResponse,
7
7
  type AgentDataDeleteByQueryResponse,
8
- type AgentDataCreateParams,
8
+ type AgentDataGetParams,
9
9
  type AgentDataUpdateParams,
10
10
  type AgentDataDeleteParams,
11
+ type AgentDataCreateParams,
12
+ type AgentDataSearchParams,
11
13
  type AgentDataAggregateParams,
12
14
  type AgentDataDeleteByQueryParams,
13
- type AgentDataGetParams,
14
- type AgentDataSearchParams,
15
- type AgentDataAggregateResponsesPaginatedCursorPost,
16
15
  type AgentDataPaginatedCursorPost,
16
+ type AgentDataAggregateResponsesPaginatedCursorPost,
17
17
  } from './agent-data';
18
18
  export {
19
19
  Batch,
@@ -23,8 +23,8 @@ export {
23
23
  type BatchGetStatusResponse,
24
24
  type BatchCreateParams,
25
25
  type BatchListParams,
26
- type BatchCancelParams,
27
26
  type BatchGetStatusParams,
27
+ type BatchCancelParams,
28
28
  type BatchListResponsesPaginatedBatchItems,
29
29
  } from './batch/index';
30
30
  export { Beta } from './beta';
@@ -35,9 +35,9 @@ export {
35
35
  type ChatListResponse,
36
36
  type ChatGetSummaryResponse,
37
37
  type ChatStreamResponse,
38
+ type ChatListParams,
38
39
  type ChatCreateParams,
39
40
  type ChatRetrieveParams,
40
- type ChatListParams,
41
41
  type ChatDeleteParams,
42
42
  type ChatGetSummaryParams,
43
43
  type ChatStreamParams,
@@ -50,10 +50,10 @@ export {
50
50
  type DirectoryListResponse,
51
51
  type DirectoryGetResponse,
52
52
  type DirectoryCreateParams,
53
- type DirectoryUpdateParams,
54
53
  type DirectoryListParams,
55
- type DirectoryDeleteParams,
56
54
  type DirectoryGetParams,
55
+ type DirectoryUpdateParams,
56
+ type DirectoryDeleteParams,
57
57
  type DirectoryListResponsesPaginatedCursor,
58
58
  } from './directories/index';
59
59
  export {
@@ -62,11 +62,11 @@ export {
62
62
  type IndexListResponse,
63
63
  type IndexGetResponse,
64
64
  type IndexSyncResponse,
65
- type IndexCreateParams,
66
- type IndexListParams,
67
- type IndexDeleteParams,
68
65
  type IndexGetParams,
66
+ type IndexDeleteParams,
67
+ type IndexCreateParams,
69
68
  type IndexSyncParams,
69
+ type IndexListParams,
70
70
  type IndexListResponsesPaginatedCursor,
71
71
  } from './indexes';
72
72
  export {
@@ -89,9 +89,9 @@ export {
89
89
  type SheetDeleteJobResponse,
90
90
  type SheetCreateParams,
91
91
  type SheetListParams,
92
- type SheetDeleteJobParams,
93
92
  type SheetGetParams,
94
93
  type SheetGetResultTableParams,
94
+ type SheetDeleteJobParams,
95
95
  type SheetsJobsPaginatedCursor,
96
96
  } from './sheets';
97
97
  export {
@@ -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
  }
@@ -129,7 +129,7 @@ export namespace RetrievalRetrieveResponse {
129
129
  /**
130
130
  * User-defined metadata associated with the chunk.
131
131
  */
132
- metadata?: { [key: string]: string | number | boolean | Array<string> | null } | null;
132
+ metadata?: { [key: string]: string | number | number | boolean | null | Array<string> } | null;
133
133
 
134
134
  /**
135
135
  * Relevance score from the reranker, if reranking was applied.
@@ -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
  }