@llamaindex/llama-cloud 2.9.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/CHANGELOG.md +14 -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 +36 -29
  24. package/resources/beta/batch/batch.d.mts.map +1 -1
  25. package/resources/beta/batch/batch.d.ts +36 -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 +14 -7
  36. package/resources/beta/batch/job-items.d.mts.map +1 -1
  37. package/resources/beta/batch/job-items.d.ts +14 -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 -39
  52. package/resources/beta/directories/directories.d.mts.map +1 -1
  53. package/resources/beta/directories/directories.d.ts +48 -39
  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 +44 -32
  76. package/resources/beta/indexes.d.mts.map +1 -1
  77. package/resources/beta/indexes.d.ts +44 -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 +37 -56
  88. package/resources/beta/sheets.d.mts.map +1 -1
  89. package/resources/beta/sheets.d.ts +37 -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 +8 -1
  100. package/resources/classifier/jobs.d.mts.map +1 -1
  101. package/resources/classifier/jobs.d.ts +8 -1
  102. package/resources/classifier/jobs.d.ts.map +1 -1
  103. package/resources/classify.d.mts +27 -11
  104. package/resources/classify.d.mts.map +1 -1
  105. package/resources/classify.d.ts +27 -11
  106. package/resources/classify.d.ts.map +1 -1
  107. package/resources/configurations.d.mts +73 -43
  108. package/resources/configurations.d.mts.map +1 -1
  109. package/resources/configurations.d.ts +73 -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 +62 -46
  132. package/resources/extract.d.mts.map +1 -1
  133. package/resources/extract.d.ts +62 -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 +131 -51
  156. package/resources/parsing.d.mts.map +1 -1
  157. package/resources/parsing.d.ts +131 -51
  158. package/resources/parsing.d.ts.map +1 -1
  159. package/resources/parsing.js +33 -12
  160. package/resources/parsing.js.map +1 -1
  161. package/resources/parsing.mjs +33 -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 +149 -126
  208. package/resources/pipelines/pipelines.d.mts.map +1 -1
  209. package/resources/pipelines/pipelines.d.ts +149 -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 +206 -0
  240. package/resources/sheets.d.mts.map +1 -0
  241. package/resources/sheets.d.ts +206 -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 +67 -54
  251. package/src/resources/beta/batch/index.ts +1 -1
  252. package/src/resources/beta/batch/job-items.ts +34 -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 -71
  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 +68 -53
  260. package/src/resources/beta/retrieval.ts +3 -3
  261. package/src/resources/beta/sheets.ts +90 -97
  262. package/src/resources/beta/split.ts +2 -2
  263. package/src/resources/classifier/jobs.ts +9 -1
  264. package/src/resources/classify.ts +67 -39
  265. package/src/resources/configurations.ts +97 -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 +125 -97
  269. package/src/resources/files.ts +61 -61
  270. package/src/resources/index.ts +21 -12
  271. package/src/resources/parsing.ts +285 -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 +236 -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 +322 -0
  284. package/src/version.ts +1 -1
  285. package/version.d.mts +1 -1
  286. package/version.d.mts.map +1 -1
  287. package/version.d.ts +1 -1
  288. package/version.d.ts.map +1 -1
  289. package/version.js +1 -1
  290. package/version.js.map +1 -1
  291. package/version.mjs +1 -1
  292. package/version.mjs.map +1 -1
@@ -45,29 +45,6 @@ export class Directories extends APIResource {
45
45
  });
46
46
  }
47
47
 
48
- /**
49
- * Update directory metadata.
50
- *
51
- * @example
52
- * ```ts
53
- * const directory = await client.beta.directories.update(
54
- * 'directory_id',
55
- * );
56
- * ```
57
- */
58
- update(
59
- directoryID: string,
60
- params: DirectoryUpdateParams,
61
- options?: RequestOptions,
62
- ): APIPromise<DirectoryUpdateResponse> {
63
- const { organization_id, project_id, ...body } = params;
64
- return this._client.patch(path`/api/v1/beta/directories/${directoryID}`, {
65
- query: { organization_id, project_id },
66
- body,
67
- ...options,
68
- });
69
- }
70
-
71
48
  /**
72
49
  * List Directories
73
50
  *
@@ -90,42 +67,65 @@ export class Directories extends APIResource {
90
67
  }
91
68
 
92
69
  /**
93
- * Permanently delete a directory.
70
+ * Retrieve a directory by its identifier.
94
71
  *
95
72
  * @example
96
73
  * ```ts
97
- * await client.beta.directories.delete('directory_id');
74
+ * const directory = await client.beta.directories.get(
75
+ * 'directory_id',
76
+ * );
98
77
  * ```
99
78
  */
100
- delete(
79
+ get(
101
80
  directoryID: string,
102
- params: DirectoryDeleteParams | null | undefined = {},
81
+ query: DirectoryGetParams | null | undefined = {},
103
82
  options?: RequestOptions,
104
- ): APIPromise<void> {
105
- const { organization_id, project_id } = params ?? {};
106
- return this._client.delete(path`/api/v1/beta/directories/${directoryID}`, {
83
+ ): APIPromise<DirectoryGetResponse> {
84
+ return this._client.get(path`/api/v1/beta/directories/${directoryID}`, { query, ...options });
85
+ }
86
+
87
+ /**
88
+ * Update directory metadata.
89
+ *
90
+ * @example
91
+ * ```ts
92
+ * const directory = await client.beta.directories.update(
93
+ * 'directory_id',
94
+ * );
95
+ * ```
96
+ */
97
+ update(
98
+ directoryID: string,
99
+ params: DirectoryUpdateParams,
100
+ options?: RequestOptions,
101
+ ): APIPromise<DirectoryUpdateResponse> {
102
+ const { organization_id, project_id, ...body } = params;
103
+ return this._client.patch(path`/api/v1/beta/directories/${directoryID}`, {
107
104
  query: { organization_id, project_id },
105
+ body,
108
106
  ...options,
109
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
110
107
  });
111
108
  }
112
109
 
113
110
  /**
114
- * Retrieve a directory by its identifier.
111
+ * Permanently delete a directory.
115
112
  *
116
113
  * @example
117
114
  * ```ts
118
- * const directory = await client.beta.directories.get(
119
- * 'directory_id',
120
- * );
115
+ * await client.beta.directories.delete('directory_id');
121
116
  * ```
122
117
  */
123
- get(
118
+ delete(
124
119
  directoryID: string,
125
- query: DirectoryGetParams | null | undefined = {},
120
+ params: DirectoryDeleteParams | null | undefined = {},
126
121
  options?: RequestOptions,
127
- ): APIPromise<DirectoryGetResponse> {
128
- return this._client.get(path`/api/v1/beta/directories/${directoryID}`, { query, ...options });
122
+ ): APIPromise<void> {
123
+ const { organization_id, project_id } = params ?? {};
124
+ return this._client.delete(path`/api/v1/beta/directories/${directoryID}`, {
125
+ query: { organization_id, project_id },
126
+ ...options,
127
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
128
+ });
129
129
  }
130
130
  }
131
131
 
@@ -178,7 +178,7 @@ export interface DirectoryCreateResponse {
178
178
  /**
179
179
  * Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
180
180
  */
181
- type?: 'user' | 'index' | 'ephemeral' | 'system_ephemeral' | null;
181
+ type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user' | null;
182
182
 
183
183
  /**
184
184
  * Update datetime
@@ -233,7 +233,7 @@ export interface DirectoryUpdateResponse {
233
233
  /**
234
234
  * Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
235
235
  */
236
- type?: 'user' | 'index' | 'ephemeral' | 'system_ephemeral' | null;
236
+ type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user' | null;
237
237
 
238
238
  /**
239
239
  * Update datetime
@@ -288,7 +288,7 @@ export interface DirectoryListResponse {
288
288
  /**
289
289
  * Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
290
290
  */
291
- type?: 'user' | 'index' | 'ephemeral' | 'system_ephemeral' | null;
291
+ type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user' | null;
292
292
 
293
293
  /**
294
294
  * Update datetime
@@ -343,7 +343,7 @@ export interface DirectoryGetResponse {
343
343
  /**
344
344
  * Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
345
345
  */
346
- type?: 'user' | 'index' | 'ephemeral' | 'system_ephemeral' | null;
346
+ type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user' | null;
347
347
 
348
348
  /**
349
349
  * Update datetime
@@ -372,11 +372,6 @@ export interface DirectoryCreateParams {
372
372
  */
373
373
  description?: string | null;
374
374
 
375
- /**
376
- * Body param: When this directory expires. Required for ephemeral directories.
377
- */
378
- expires_at?: string | null;
379
-
380
375
  /**
381
376
  * Body param: Reserved system-managed metadata.
382
377
  */
@@ -386,50 +381,64 @@ export interface DirectoryCreateParams {
386
381
  * Body param: Directory type. Use 'ephemeral' for batch processing with automatic
387
382
  * cleanup.
388
383
  */
389
- type?: 'user' | 'ephemeral';
384
+ type?: 'ephemeral' | 'user';
390
385
  }
391
386
 
392
- export interface DirectoryUpdateParams {
387
+ export interface DirectoryListParams extends PaginatedCursorParams {
393
388
  /**
394
- * Query param
389
+ * Include deleted directories.
395
390
  */
396
- organization_id?: string | null;
391
+ include_deleted?: boolean;
397
392
 
398
393
  /**
399
- * Query param
394
+ * Directory name to match.
400
395
  */
396
+ name?: string | null;
397
+
398
+ organization_id?: string | null;
399
+
401
400
  project_id?: string | null;
402
401
 
403
402
  /**
404
- * Body param: Updated description for the directory.
403
+ * Directory type to include.
405
404
  */
406
- description?: string | null;
405
+ type?: 'ephemeral' | 'index' | 'user' | null;
407
406
 
408
407
  /**
409
- * Body param: Updated name for the directory.
408
+ * Filter by one or more directory types. Repeat the parameter for multiple values.
410
409
  */
411
- name?: string | null;
410
+ types?: Array<'ephemeral' | 'index' | 'user'> | null;
412
411
  }
413
412
 
414
- export interface DirectoryListParams extends PaginatedCursorParams {
415
- include_deleted?: boolean;
416
-
417
- name?: string | null;
418
-
413
+ export interface DirectoryGetParams {
419
414
  organization_id?: string | null;
420
415
 
421
416
  project_id?: string | null;
422
-
423
- type?: 'user' | 'index' | 'ephemeral' | null;
424
417
  }
425
418
 
426
- export interface DirectoryDeleteParams {
419
+ export interface DirectoryUpdateParams {
420
+ /**
421
+ * Query param
422
+ */
427
423
  organization_id?: string | null;
428
424
 
425
+ /**
426
+ * Query param
427
+ */
429
428
  project_id?: string | null;
429
+
430
+ /**
431
+ * Body param: Updated description for the directory.
432
+ */
433
+ description?: string | null;
434
+
435
+ /**
436
+ * Body param: Updated name for the directory.
437
+ */
438
+ name?: string | null;
430
439
  }
431
440
 
432
- export interface DirectoryGetParams {
441
+ export interface DirectoryDeleteParams {
433
442
  organization_id?: string | null;
434
443
 
435
444
  project_id?: string | null;
@@ -445,10 +454,10 @@ export declare namespace Directories {
445
454
  type DirectoryGetResponse as DirectoryGetResponse,
446
455
  type DirectoryListResponsesPaginatedCursor as DirectoryListResponsesPaginatedCursor,
447
456
  type DirectoryCreateParams as DirectoryCreateParams,
448
- type DirectoryUpdateParams as DirectoryUpdateParams,
449
457
  type DirectoryListParams as DirectoryListParams,
450
- type DirectoryDeleteParams as DirectoryDeleteParams,
451
458
  type DirectoryGetParams as DirectoryGetParams,
459
+ type DirectoryUpdateParams as DirectoryUpdateParams,
460
+ type DirectoryDeleteParams as DirectoryDeleteParams,
452
461
  };
453
462
 
454
463
  export {
@@ -459,11 +468,11 @@ export declare namespace Directories {
459
468
  type FileGetResponse as FileGetResponse,
460
469
  type FileUploadResponse as FileUploadResponse,
461
470
  type FileListResponsesPaginatedCursor as FileListResponsesPaginatedCursor,
462
- type FileUpdateParams as FileUpdateParams,
463
- type FileListParams as FileListParams,
464
- type FileDeleteParams as FileDeleteParams,
465
471
  type FileAddParams as FileAddParams,
472
+ type FileListParams as FileListParams,
466
473
  type FileGetParams as FileGetParams,
474
+ type FileUpdateParams as FileUpdateParams,
475
+ type FileDeleteParams as FileDeleteParams,
467
476
  type FileUploadParams as FileUploadParams,
468
477
  };
469
478
  }
@@ -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
 
@@ -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.
478
+ * Body param: User-defined metadata key-value pairs to associate with the file.
479
479
  */
480
480
  metadata?: { [key: string]: string | number | number | boolean | null | Array<string> } | null;
481
481
 
482
482
  /**
483
- * Body param: Move file to a different directory.
484
- */
485
- target_directory_id?: string | null;
486
-
487
- /**
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
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 {