@llamaindex/llama-cloud 0.14.1 → 0.15.2

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 (140) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/client.d.mts +9 -13
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +9 -13
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/core/pagination.d.mts +8 -50
  9. package/core/pagination.d.mts.map +1 -1
  10. package/core/pagination.d.ts +8 -50
  11. package/core/pagination.d.ts.map +1 -1
  12. package/core/pagination.js +5 -53
  13. package/core/pagination.js.map +1 -1
  14. package/core/pagination.mjs +2 -48
  15. package/core/pagination.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/resources/beta/agent-data.d.mts +18 -73
  18. package/resources/beta/agent-data.d.mts.map +1 -1
  19. package/resources/beta/agent-data.d.ts +18 -73
  20. package/resources/beta/agent-data.d.ts.map +1 -1
  21. package/resources/beta/agent-data.js +4 -6
  22. package/resources/beta/agent-data.js.map +1 -1
  23. package/resources/beta/agent-data.mjs +4 -6
  24. package/resources/beta/agent-data.mjs.map +1 -1
  25. package/resources/beta/beta.d.mts +10 -10
  26. package/resources/beta/beta.d.mts.map +1 -1
  27. package/resources/beta/beta.d.ts +10 -10
  28. package/resources/beta/beta.d.ts.map +1 -1
  29. package/resources/beta/beta.js.map +1 -1
  30. package/resources/beta/beta.mjs.map +1 -1
  31. package/resources/beta/directories/directories.d.mts +7 -7
  32. package/resources/beta/directories/directories.d.mts.map +1 -1
  33. package/resources/beta/directories/directories.d.ts +7 -7
  34. package/resources/beta/directories/directories.d.ts.map +1 -1
  35. package/resources/beta/directories/directories.js +1 -1
  36. package/resources/beta/directories/directories.js.map +1 -1
  37. package/resources/beta/directories/directories.mjs +2 -2
  38. package/resources/beta/directories/directories.mjs.map +1 -1
  39. package/resources/beta/directories/files.d.mts +5 -5
  40. package/resources/beta/directories/files.d.mts.map +1 -1
  41. package/resources/beta/directories/files.d.ts +5 -5
  42. package/resources/beta/directories/files.d.ts.map +1 -1
  43. package/resources/beta/directories/files.js +1 -1
  44. package/resources/beta/directories/files.js.map +1 -1
  45. package/resources/beta/directories/files.mjs +2 -2
  46. package/resources/beta/directories/files.mjs.map +1 -1
  47. package/resources/beta/directories/index.d.mts +2 -2
  48. package/resources/beta/directories/index.d.mts.map +1 -1
  49. package/resources/beta/directories/index.d.ts +2 -2
  50. package/resources/beta/directories/index.d.ts.map +1 -1
  51. package/resources/beta/index.d.mts +5 -5
  52. package/resources/beta/index.d.mts.map +1 -1
  53. package/resources/beta/index.d.ts +5 -5
  54. package/resources/beta/index.d.ts.map +1 -1
  55. package/resources/beta/index.js.map +1 -1
  56. package/resources/beta/index.mjs.map +1 -1
  57. package/resources/beta/parse-configurations.d.mts +54 -54
  58. package/resources/beta/parse-configurations.d.mts.map +1 -1
  59. package/resources/beta/parse-configurations.d.ts +54 -54
  60. package/resources/beta/parse-configurations.d.ts.map +1 -1
  61. package/resources/beta/parse-configurations.js +33 -29
  62. package/resources/beta/parse-configurations.js.map +1 -1
  63. package/resources/beta/parse-configurations.mjs +33 -29
  64. package/resources/beta/parse-configurations.mjs.map +1 -1
  65. package/resources/beta/sheets.d.mts +5 -5
  66. package/resources/beta/sheets.d.mts.map +1 -1
  67. package/resources/beta/sheets.d.ts +5 -5
  68. package/resources/beta/sheets.d.ts.map +1 -1
  69. package/resources/beta/sheets.js +1 -1
  70. package/resources/beta/sheets.js.map +1 -1
  71. package/resources/beta/sheets.mjs +2 -2
  72. package/resources/beta/sheets.mjs.map +1 -1
  73. package/resources/beta/split.d.mts +5 -5
  74. package/resources/beta/split.d.mts.map +1 -1
  75. package/resources/beta/split.d.ts +5 -5
  76. package/resources/beta/split.d.ts.map +1 -1
  77. package/resources/beta/split.js +1 -1
  78. package/resources/beta/split.js.map +1 -1
  79. package/resources/beta/split.mjs +2 -2
  80. package/resources/beta/split.mjs.map +1 -1
  81. package/resources/classifier/classifier.d.mts +2 -2
  82. package/resources/classifier/classifier.d.mts.map +1 -1
  83. package/resources/classifier/classifier.d.ts +2 -2
  84. package/resources/classifier/classifier.d.ts.map +1 -1
  85. package/resources/classifier/index.d.mts +1 -1
  86. package/resources/classifier/index.d.mts.map +1 -1
  87. package/resources/classifier/index.d.ts +1 -1
  88. package/resources/classifier/index.d.ts.map +1 -1
  89. package/resources/classifier/jobs.d.mts +5 -5
  90. package/resources/classifier/jobs.d.mts.map +1 -1
  91. package/resources/classifier/jobs.d.ts +5 -5
  92. package/resources/classifier/jobs.d.ts.map +1 -1
  93. package/resources/classifier/jobs.js +1 -1
  94. package/resources/classifier/jobs.js.map +1 -1
  95. package/resources/classifier/jobs.mjs +2 -2
  96. package/resources/classifier/jobs.mjs.map +1 -1
  97. package/resources/files.d.mts +67 -2
  98. package/resources/files.d.mts.map +1 -1
  99. package/resources/files.d.ts +67 -2
  100. package/resources/files.d.ts.map +1 -1
  101. package/resources/files.js +14 -1
  102. package/resources/files.js.map +1 -1
  103. package/resources/files.mjs +14 -1
  104. package/resources/files.mjs.map +1 -1
  105. package/resources/index.d.mts +2 -2
  106. package/resources/index.d.mts.map +1 -1
  107. package/resources/index.d.ts +2 -2
  108. package/resources/index.d.ts.map +1 -1
  109. package/resources/index.js.map +1 -1
  110. package/resources/index.mjs.map +1 -1
  111. package/resources/parsing.d.mts +5 -5
  112. package/resources/parsing.d.mts.map +1 -1
  113. package/resources/parsing.d.ts +5 -5
  114. package/resources/parsing.d.ts.map +1 -1
  115. package/resources/parsing.js +1 -1
  116. package/resources/parsing.js.map +1 -1
  117. package/resources/parsing.mjs +2 -2
  118. package/resources/parsing.mjs.map +1 -1
  119. package/src/client.ts +18 -28
  120. package/src/core/pagination.ts +9 -128
  121. package/src/resources/beta/agent-data.ts +27 -85
  122. package/src/resources/beta/beta.ts +16 -12
  123. package/src/resources/beta/directories/directories.ts +8 -12
  124. package/src/resources/beta/directories/files.ts +6 -10
  125. package/src/resources/beta/directories/index.ts +2 -2
  126. package/src/resources/beta/index.ts +8 -6
  127. package/src/resources/beta/parse-configurations.ts +86 -86
  128. package/src/resources/beta/sheets.ts +6 -6
  129. package/src/resources/beta/split.ts +6 -6
  130. package/src/resources/classifier/classifier.ts +2 -2
  131. package/src/resources/classifier/index.ts +1 -1
  132. package/src/resources/classifier/jobs.ts +6 -6
  133. package/src/resources/files.ts +93 -1
  134. package/src/resources/index.ts +4 -1
  135. package/src/resources/parsing.ts +6 -6
  136. package/src/version.ts +1 -1
  137. package/version.d.mts +1 -1
  138. package/version.d.ts +1 -1
  139. package/version.js +1 -1
  140. package/version.mjs +1 -1
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import { APIPromise } from '../core/api-promise';
5
+ import { PagePromise, PaginatedCursor, type PaginatedCursorParams } from '../core/pagination';
5
6
  import { type Uploadable } from '../core/uploads';
6
7
  import { buildHeaders } from '../internal/headers';
7
8
  import { RequestOptions } from '../internal/request-options';
@@ -20,6 +21,22 @@ export class Files extends APIResource {
20
21
  );
21
22
  }
22
23
 
24
+ /**
25
+ * List files with optional filtering and pagination.
26
+ *
27
+ * This endpoint retrieves files for the specified project with support for
28
+ * filtering by various criteria and cursor-based pagination.
29
+ */
30
+ list(
31
+ query: FileListParams | null | undefined = {},
32
+ options?: RequestOptions,
33
+ ): PagePromise<FileListResponsesPaginatedCursor, FileListResponse> {
34
+ return this._client.getAPIList('/api/v1/beta/files', PaginatedCursor<FileListResponse>, {
35
+ query,
36
+ ...options,
37
+ });
38
+ }
39
+
23
40
  /**
24
41
  * Delete a single file from the project.
25
42
  *
@@ -62,7 +79,7 @@ export class Files extends APIResource {
62
79
  *
63
80
  * Returns: Paginated response with files
64
81
  *
65
- * @deprecated
82
+ * @deprecated Use the GET /files endpoint instead
66
83
  */
67
84
  query(params: FileQueryParams, options?: RequestOptions): APIPromise<FileQueryResponse> {
68
85
  const { organization_id, project_id, ...body } = params;
@@ -74,6 +91,8 @@ export class Files extends APIResource {
74
91
  }
75
92
  }
76
93
 
94
+ export type FileListResponsesPaginatedCursor = PaginatedCursor<FileListResponse>;
95
+
77
96
  /**
78
97
  * Schema for a file.
79
98
  */
@@ -265,6 +284,49 @@ export interface FileCreateResponse {
265
284
  purpose?: string | null;
266
285
  }
267
286
 
287
+ /**
288
+ * Schema for a file in the v2 API.
289
+ */
290
+ export interface FileListResponse {
291
+ /**
292
+ * Unique identifier
293
+ */
294
+ id: string;
295
+
296
+ name: string;
297
+
298
+ /**
299
+ * The ID of the project that the file belongs to
300
+ */
301
+ project_id: string;
302
+
303
+ /**
304
+ * The expiration date for the file. Files past this date can be deleted.
305
+ */
306
+ expires_at?: string | null;
307
+
308
+ /**
309
+ * The ID of the file in the external system
310
+ */
311
+ external_file_id?: string | null;
312
+
313
+ /**
314
+ * File type (e.g. pdf, docx, etc.)
315
+ */
316
+ file_type?: string | null;
317
+
318
+ /**
319
+ * The last modified time of the file
320
+ */
321
+ last_modified_at?: string | null;
322
+
323
+ /**
324
+ * The intended purpose of the file (e.g., 'user_data', 'parse', 'extract',
325
+ * 'split', 'classify', 'sheet')
326
+ */
327
+ purpose?: string | null;
328
+ }
329
+
268
330
  /**
269
331
  * Response schema for paginated file queries in V2 API.
270
332
  */
@@ -361,6 +423,33 @@ export interface FileCreateParams {
361
423
  external_file_id?: string | null;
362
424
  }
363
425
 
426
+ export interface FileListParams extends PaginatedCursorParams {
427
+ /**
428
+ * Filter by external file ID.
429
+ */
430
+ external_file_id?: string | null;
431
+
432
+ /**
433
+ * Filter by specific file IDs.
434
+ */
435
+ file_ids?: Array<string> | null;
436
+
437
+ /**
438
+ * Filter by file name (exact match).
439
+ */
440
+ file_name?: string | null;
441
+
442
+ /**
443
+ * A comma-separated list of fields to order by, sorted in ascending order. Use
444
+ * 'field_name desc' to specify descending order.
445
+ */
446
+ order_by?: string | null;
447
+
448
+ organization_id?: string | null;
449
+
450
+ project_id?: string | null;
451
+ }
452
+
364
453
  export interface FileDeleteParams {
365
454
  organization_id?: string | null;
366
455
 
@@ -454,8 +543,11 @@ export declare namespace Files {
454
543
  type FileCreate as FileCreate,
455
544
  type PresignedURL as PresignedURL,
456
545
  type FileCreateResponse as FileCreateResponse,
546
+ type FileListResponse as FileListResponse,
457
547
  type FileQueryResponse as FileQueryResponse,
548
+ type FileListResponsesPaginatedCursor as FileListResponsesPaginatedCursor,
458
549
  type FileCreateParams as FileCreateParams,
550
+ type FileListParams as FileListParams,
459
551
  type FileDeleteParams as FileDeleteParams,
460
552
  type FileGetParams as FileGetParams,
461
553
  type FileQueryParams as FileQueryParams,
@@ -27,11 +27,14 @@ export {
27
27
  type FileCreate,
28
28
  type PresignedURL,
29
29
  type FileCreateResponse,
30
+ type FileListResponse,
30
31
  type FileQueryResponse,
31
32
  type FileCreateParams,
33
+ type FileListParams,
32
34
  type FileDeleteParams,
33
35
  type FileGetParams,
34
36
  type FileQueryParams,
37
+ type FileListResponsesPaginatedCursor,
35
38
  } from './files';
36
39
  export {
37
40
  Parsing,
@@ -49,7 +52,7 @@ export {
49
52
  type ParsingCreateParams,
50
53
  type ParsingListParams,
51
54
  type ParsingGetParams,
52
- type ParsingListResponsesPaginatedClassifyJobs,
55
+ type ParsingListResponsesPaginatedCursor,
53
56
  } from './parsing';
54
57
  export {
55
58
  Pipelines,
@@ -3,7 +3,7 @@
3
3
  import { APIResource } from '../core/resource';
4
4
  import * as ParsingAPI from './parsing';
5
5
  import { APIPromise } from '../core/api-promise';
6
- import { PagePromise, PaginatedClassifyJobs, type PaginatedClassifyJobsParams } from '../core/pagination';
6
+ import { PagePromise, PaginatedCursor, type PaginatedCursorParams } from '../core/pagination';
7
7
  import { RequestOptions } from '../internal/request-options';
8
8
  import { path } from '../internal/utils/path';
9
9
  import { type Uploadable } from '../core/uploads';
@@ -49,8 +49,8 @@ export class Parsing extends APIResource {
49
49
  list(
50
50
  query: ParsingListParams | null | undefined = {},
51
51
  options?: RequestOptions,
52
- ): PagePromise<ParsingListResponsesPaginatedClassifyJobs, ParsingListResponse> {
53
- return this._client.getAPIList('/api/v2/parse', PaginatedClassifyJobs<ParsingListResponse>, {
52
+ ): PagePromise<ParsingListResponsesPaginatedCursor, ParsingListResponse> {
53
+ return this._client.getAPIList('/api/v2/parse', PaginatedCursor<ParsingListResponse>, {
54
54
  query,
55
55
  ...options,
56
56
  });
@@ -214,7 +214,7 @@ export class Parsing extends APIResource {
214
214
  }
215
215
  }
216
216
 
217
- export type ParsingListResponsesPaginatedClassifyJobs = PaginatedClassifyJobs<ParsingListResponse>;
217
+ export type ParsingListResponsesPaginatedCursor = PaginatedCursor<ParsingListResponse>;
218
218
 
219
219
  /**
220
220
  * Bounding box with coordinates and optional metadata.
@@ -1940,7 +1940,7 @@ export namespace ParsingCreateParams {
1940
1940
  }
1941
1941
  }
1942
1942
 
1943
- export interface ParsingListParams extends PaginatedClassifyJobsParams {
1943
+ export interface ParsingListParams extends PaginatedCursorParams {
1944
1944
  organization_id?: string | null;
1945
1945
 
1946
1946
  project_id?: string | null;
@@ -1983,7 +1983,7 @@ export declare namespace Parsing {
1983
1983
  type ParsingCreateResponse as ParsingCreateResponse,
1984
1984
  type ParsingListResponse as ParsingListResponse,
1985
1985
  type ParsingGetResponse as ParsingGetResponse,
1986
- type ParsingListResponsesPaginatedClassifyJobs as ParsingListResponsesPaginatedClassifyJobs,
1986
+ type ParsingListResponsesPaginatedCursor as ParsingListResponsesPaginatedCursor,
1987
1987
  type ParsingCreateParams as ParsingCreateParams,
1988
1988
  type ParsingListParams as ParsingListParams,
1989
1989
  type ParsingGetParams as ParsingGetParams,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.14.1'; // x-release-please-version
1
+ export const VERSION = '0.15.2'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.14.1";
1
+ export declare const VERSION = "0.15.2";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.14.1";
1
+ export declare const VERSION = "0.15.2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.14.1'; // x-release-please-version
4
+ exports.VERSION = '0.15.2'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.14.1'; // x-release-please-version
1
+ export const VERSION = '0.15.2'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map