@mixedbread/sdk 0.15.0 → 0.16.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 (104) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +31 -0
  3. package/client.d.mts +6 -6
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +6 -6
  6. package/client.d.ts.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/core/pagination.d.mts +10 -16
  9. package/core/pagination.d.mts.map +1 -1
  10. package/core/pagination.d.ts +10 -16
  11. package/core/pagination.d.ts.map +1 -1
  12. package/core/pagination.js.map +1 -1
  13. package/core/pagination.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/data-sources/connectors.d.mts +5 -106
  16. package/resources/data-sources/connectors.d.mts.map +1 -1
  17. package/resources/data-sources/connectors.d.ts +5 -106
  18. package/resources/data-sources/connectors.d.ts.map +1 -1
  19. package/resources/data-sources/connectors.js +2 -1
  20. package/resources/data-sources/connectors.js.map +1 -1
  21. package/resources/data-sources/connectors.mjs +2 -1
  22. package/resources/data-sources/connectors.mjs.map +1 -1
  23. package/resources/data-sources/data-sources.d.mts +7 -108
  24. package/resources/data-sources/data-sources.d.mts.map +1 -1
  25. package/resources/data-sources/data-sources.d.ts +7 -108
  26. package/resources/data-sources/data-sources.d.ts.map +1 -1
  27. package/resources/data-sources/data-sources.js +2 -1
  28. package/resources/data-sources/data-sources.js.map +1 -1
  29. package/resources/data-sources/data-sources.mjs +2 -1
  30. package/resources/data-sources/data-sources.mjs.map +1 -1
  31. package/resources/data-sources/index.d.mts +2 -2
  32. package/resources/data-sources/index.d.mts.map +1 -1
  33. package/resources/data-sources/index.d.ts +2 -2
  34. package/resources/data-sources/index.d.ts.map +1 -1
  35. package/resources/files.d.mts +5 -103
  36. package/resources/files.d.mts.map +1 -1
  37. package/resources/files.d.ts +5 -103
  38. package/resources/files.d.ts.map +1 -1
  39. package/resources/files.js +2 -1
  40. package/resources/files.js.map +1 -1
  41. package/resources/files.mjs +2 -1
  42. package/resources/files.mjs.map +1 -1
  43. package/resources/index.d.mts +3 -3
  44. package/resources/index.d.mts.map +1 -1
  45. package/resources/index.d.ts +3 -3
  46. package/resources/index.d.ts.map +1 -1
  47. package/resources/parsing/index.d.mts +1 -1
  48. package/resources/parsing/index.d.mts.map +1 -1
  49. package/resources/parsing/index.d.ts +1 -1
  50. package/resources/parsing/index.d.ts.map +1 -1
  51. package/resources/parsing/index.js.map +1 -1
  52. package/resources/parsing/index.mjs.map +1 -1
  53. package/resources/parsing/jobs.d.mts +33 -134
  54. package/resources/parsing/jobs.d.mts.map +1 -1
  55. package/resources/parsing/jobs.d.ts +33 -134
  56. package/resources/parsing/jobs.d.ts.map +1 -1
  57. package/resources/parsing/jobs.js +2 -1
  58. package/resources/parsing/jobs.js.map +1 -1
  59. package/resources/parsing/jobs.mjs +2 -1
  60. package/resources/parsing/jobs.mjs.map +1 -1
  61. package/resources/parsing/parsing.d.mts +2 -2
  62. package/resources/parsing/parsing.d.mts.map +1 -1
  63. package/resources/parsing/parsing.d.ts +2 -2
  64. package/resources/parsing/parsing.d.ts.map +1 -1
  65. package/resources/parsing/parsing.js.map +1 -1
  66. package/resources/parsing/parsing.mjs.map +1 -1
  67. package/resources/vector-stores/files.d.mts +5 -103
  68. package/resources/vector-stores/files.d.mts.map +1 -1
  69. package/resources/vector-stores/files.d.ts +5 -103
  70. package/resources/vector-stores/files.d.ts.map +1 -1
  71. package/resources/vector-stores/files.js +2 -1
  72. package/resources/vector-stores/files.js.map +1 -1
  73. package/resources/vector-stores/files.mjs +2 -1
  74. package/resources/vector-stores/files.mjs.map +1 -1
  75. package/resources/vector-stores/index.d.mts +2 -2
  76. package/resources/vector-stores/index.d.mts.map +1 -1
  77. package/resources/vector-stores/index.d.ts +2 -2
  78. package/resources/vector-stores/index.d.ts.map +1 -1
  79. package/resources/vector-stores/vector-stores.d.mts +7 -105
  80. package/resources/vector-stores/vector-stores.d.mts.map +1 -1
  81. package/resources/vector-stores/vector-stores.d.ts +7 -105
  82. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  83. package/resources/vector-stores/vector-stores.js +2 -1
  84. package/resources/vector-stores/vector-stores.js.map +1 -1
  85. package/resources/vector-stores/vector-stores.mjs +2 -1
  86. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  87. package/src/client.ts +6 -6
  88. package/src/core/pagination.ts +10 -18
  89. package/src/resources/data-sources/connectors.ts +11 -118
  90. package/src/resources/data-sources/data-sources.ts +9 -120
  91. package/src/resources/data-sources/index.ts +2 -2
  92. package/src/resources/files.ts +7 -115
  93. package/src/resources/index.ts +3 -3
  94. package/src/resources/parsing/index.ts +1 -0
  95. package/src/resources/parsing/jobs.ts +38 -145
  96. package/src/resources/parsing/parsing.ts +2 -0
  97. package/src/resources/vector-stores/files.ts +11 -115
  98. package/src/resources/vector-stores/index.ts +2 -2
  99. package/src/resources/vector-stores/vector-stores.ts +9 -117
  100. package/src/version.ts +1 -1
  101. package/version.d.mts +1 -1
  102. package/version.d.ts +1 -1
  103. package/version.js +1 -1
  104. package/version.mjs +1 -1
@@ -7,13 +7,14 @@ import {
7
7
  ConnectorDeleteParams,
8
8
  ConnectorDeleteResponse,
9
9
  ConnectorListParams,
10
- ConnectorListResponse,
11
10
  ConnectorRetrieveParams,
12
11
  ConnectorUpdateParams,
13
12
  Connectors,
14
13
  DataSourceConnector,
14
+ DataSourceConnectorsCursor,
15
15
  } from './connectors';
16
16
  import { APIPromise } from '../../core/api-promise';
17
+ import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
17
18
  import { RequestOptions } from '../../internal/request-options';
18
19
  import { path } from '../../internal/utils/path';
19
20
 
@@ -66,8 +67,8 @@ export class DataSources extends APIResource {
66
67
  list(
67
68
  query: DataSourceListParams | null | undefined = {},
68
69
  options?: RequestOptions,
69
- ): APIPromise<DataSourceListResponse> {
70
- return this._client.get('/v1/data_sources/', { query, ...options });
70
+ ): PagePromise<DataSourcesCursor, DataSource> {
71
+ return this._client.getAPIList('/v1/data_sources/', Cursor<DataSource>, { query, ...options });
71
72
  }
72
73
 
73
74
  /**
@@ -80,6 +81,8 @@ export class DataSources extends APIResource {
80
81
  }
81
82
  }
82
83
 
84
+ export type DataSourcesCursor = Cursor<DataSource>;
85
+
83
86
  /**
84
87
  * Service-level representation of a data source.
85
88
  */
@@ -255,98 +258,6 @@ export interface Oauth2Params {
255
258
  type?: 'oauth2';
256
259
  }
257
260
 
258
- /**
259
- * A list of data sources with pagination.
260
- */
261
- export interface DataSourceListResponse {
262
- /**
263
- * Response model for cursor-based pagination.
264
- *
265
- * Examples: Forward pagination response: { "has_more": true, "first_cursor":
266
- * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMSIsImlkIjoiYWJjMTIzIn0=", "last_cursor":
267
- * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMCIsImlkIjoieHl6Nzg5In0=", "total": null }
268
- *
269
- * Final page response:
270
- * {
271
- * "has_more": false,
272
- * "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOSIsImlkIjoibGFzdDEyMyJ9",
273
- * "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOCIsImlkIjoiZmluYWw0NTYifQ==",
274
- * "total": 42
275
- * }
276
- *
277
- * Empty results:
278
- * {
279
- * "has_more": false,
280
- * "first_cursor": null,
281
- * "last_cursor": null,
282
- * "total": 0
283
- * }
284
- */
285
- pagination: DataSourceListResponse.Pagination;
286
-
287
- /**
288
- * The list of data sources
289
- */
290
- data: Array<DataSource>;
291
-
292
- /**
293
- * The object type of the response
294
- */
295
- object?: 'list';
296
- }
297
-
298
- export namespace DataSourceListResponse {
299
- /**
300
- * Response model for cursor-based pagination.
301
- *
302
- * Examples: Forward pagination response: { "has_more": true, "first_cursor":
303
- * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMSIsImlkIjoiYWJjMTIzIn0=", "last_cursor":
304
- * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMCIsImlkIjoieHl6Nzg5In0=", "total": null }
305
- *
306
- * Final page response:
307
- * {
308
- * "has_more": false,
309
- * "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOSIsImlkIjoibGFzdDEyMyJ9",
310
- * "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOCIsImlkIjoiZmluYWw0NTYifQ==",
311
- * "total": 42
312
- * }
313
- *
314
- * Empty results:
315
- * {
316
- * "has_more": false,
317
- * "first_cursor": null,
318
- * "last_cursor": null,
319
- * "total": 0
320
- * }
321
- */
322
- export interface Pagination {
323
- /**
324
- * Contextual direction-aware flag: True if more items exist in the requested
325
- * pagination direction. For 'after': more items after this page. For 'before':
326
- * more items before this page.
327
- */
328
- has_more: boolean;
329
-
330
- /**
331
- * Cursor of the first item in this page. Use for backward pagination. None if page
332
- * is empty.
333
- */
334
- first_cursor: string | null;
335
-
336
- /**
337
- * Cursor of the last item in this page. Use for forward pagination. None if page
338
- * is empty.
339
- */
340
- last_cursor: string | null;
341
-
342
- /**
343
- * Total number of items available across all pages. Only included when
344
- * include_total=true was requested. Expensive operation - use sparingly.
345
- */
346
- total?: number | null;
347
- }
348
- }
349
-
350
261
  /**
351
262
  * Deleted data source.
352
263
  */
@@ -497,29 +408,7 @@ export declare namespace DataSourceUpdateParams {
497
408
  }
498
409
  }
499
410
 
500
- export interface DataSourceListParams {
501
- /**
502
- * Maximum number of items to return per page (1-100)
503
- */
504
- limit?: number;
505
-
506
- /**
507
- * Cursor for forward pagination - get items after this position. Use last_cursor
508
- * from previous response.
509
- */
510
- after?: string | null;
511
-
512
- /**
513
- * Cursor for backward pagination - get items before this position. Use
514
- * first_cursor from previous response.
515
- */
516
- before?: string | null;
517
-
518
- /**
519
- * Whether to include total count in response (expensive operation)
520
- */
521
- include_total?: boolean;
522
- }
411
+ export interface DataSourceListParams extends CursorParams {}
523
412
 
524
413
  DataSources.Connectors = Connectors;
525
414
 
@@ -531,8 +420,8 @@ export declare namespace DataSources {
531
420
  type LinearDataSource as LinearDataSource,
532
421
  type NotionDataSource as NotionDataSource,
533
422
  type Oauth2Params as Oauth2Params,
534
- type DataSourceListResponse as DataSourceListResponse,
535
423
  type DataSourceDeleteResponse as DataSourceDeleteResponse,
424
+ type DataSourcesCursor as DataSourcesCursor,
536
425
  type DataSourceCreateParams as DataSourceCreateParams,
537
426
  type DataSourceUpdateParams as DataSourceUpdateParams,
538
427
  type DataSourceListParams as DataSourceListParams,
@@ -541,8 +430,8 @@ export declare namespace DataSources {
541
430
  export {
542
431
  Connectors as Connectors,
543
432
  type DataSourceConnector as DataSourceConnector,
544
- type ConnectorListResponse as ConnectorListResponse,
545
433
  type ConnectorDeleteResponse as ConnectorDeleteResponse,
434
+ type DataSourceConnectorsCursor as DataSourceConnectorsCursor,
546
435
  type ConnectorCreateParams as ConnectorCreateParams,
547
436
  type ConnectorRetrieveParams as ConnectorRetrieveParams,
548
437
  type ConnectorUpdateParams as ConnectorUpdateParams,
@@ -3,13 +3,13 @@
3
3
  export {
4
4
  Connectors,
5
5
  type DataSourceConnector,
6
- type ConnectorListResponse,
7
6
  type ConnectorDeleteResponse,
8
7
  type ConnectorCreateParams,
9
8
  type ConnectorRetrieveParams,
10
9
  type ConnectorUpdateParams,
11
10
  type ConnectorListParams,
12
11
  type ConnectorDeleteParams,
12
+ type DataSourceConnectorsCursor,
13
13
  } from './connectors';
14
14
  export {
15
15
  DataSources,
@@ -19,9 +19,9 @@ export {
19
19
  type LinearDataSource,
20
20
  type NotionDataSource,
21
21
  type Oauth2Params,
22
- type DataSourceListResponse,
23
22
  type DataSourceDeleteResponse,
24
23
  type DataSourceCreateParams,
25
24
  type DataSourceUpdateParams,
26
25
  type DataSourceListParams,
26
+ type DataSourcesCursor,
27
27
  } from './data-sources';
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import { APIPromise } from '../core/api-promise';
5
+ import { Cursor, type CursorParams, PagePromise } 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';
@@ -55,8 +56,8 @@ export class Files extends APIResource {
55
56
  list(
56
57
  query: FileListParams | null | undefined = {},
57
58
  options?: RequestOptions,
58
- ): APIPromise<FileListResponse> {
59
- return this._client.get('/v1/files', { query, ...options });
59
+ ): PagePromise<FileObjectsCursor, FileObject> {
60
+ return this._client.getAPIList('/v1/files', Cursor<FileObject>, { query, ...options });
60
61
  }
61
62
 
62
63
  /**
@@ -86,6 +87,8 @@ export class Files extends APIResource {
86
87
  }
87
88
  }
88
89
 
90
+ export type FileObjectsCursor = Cursor<FileObject>;
91
+
89
92
  /**
90
93
  * A model representing a file object in the system.
91
94
  *
@@ -149,95 +152,6 @@ export interface PaginationWithTotal {
149
152
  total?: number;
150
153
  }
151
154
 
152
- export interface FileListResponse {
153
- /**
154
- * Response model for cursor-based pagination.
155
- *
156
- * Examples: Forward pagination response: { "has_more": true, "first_cursor":
157
- * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMSIsImlkIjoiYWJjMTIzIn0=", "last_cursor":
158
- * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMCIsImlkIjoieHl6Nzg5In0=", "total": null }
159
- *
160
- * Final page response:
161
- * {
162
- * "has_more": false,
163
- * "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOSIsImlkIjoibGFzdDEyMyJ9",
164
- * "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOCIsImlkIjoiZmluYWw0NTYifQ==",
165
- * "total": 42
166
- * }
167
- *
168
- * Empty results:
169
- * {
170
- * "has_more": false,
171
- * "first_cursor": null,
172
- * "last_cursor": null,
173
- * "total": 0
174
- * }
175
- */
176
- pagination: FileListResponse.Pagination;
177
-
178
- /**
179
- * The object type of the response
180
- */
181
- object?: 'list';
182
-
183
- /**
184
- * The list of files
185
- */
186
- data: Array<FileObject>;
187
- }
188
-
189
- export namespace FileListResponse {
190
- /**
191
- * Response model for cursor-based pagination.
192
- *
193
- * Examples: Forward pagination response: { "has_more": true, "first_cursor":
194
- * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMSIsImlkIjoiYWJjMTIzIn0=", "last_cursor":
195
- * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMCIsImlkIjoieHl6Nzg5In0=", "total": null }
196
- *
197
- * Final page response:
198
- * {
199
- * "has_more": false,
200
- * "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOSIsImlkIjoibGFzdDEyMyJ9",
201
- * "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOCIsImlkIjoiZmluYWw0NTYifQ==",
202
- * "total": 42
203
- * }
204
- *
205
- * Empty results:
206
- * {
207
- * "has_more": false,
208
- * "first_cursor": null,
209
- * "last_cursor": null,
210
- * "total": 0
211
- * }
212
- */
213
- export interface Pagination {
214
- /**
215
- * Contextual direction-aware flag: True if more items exist in the requested
216
- * pagination direction. For 'after': more items after this page. For 'before':
217
- * more items before this page.
218
- */
219
- has_more: boolean;
220
-
221
- /**
222
- * Cursor of the first item in this page. Use for backward pagination. None if page
223
- * is empty.
224
- */
225
- first_cursor: string | null;
226
-
227
- /**
228
- * Cursor of the last item in this page. Use for forward pagination. None if page
229
- * is empty.
230
- */
231
- last_cursor: string | null;
232
-
233
- /**
234
- * Total number of items available across all pages. Only included when
235
- * include_total=true was requested. Expensive operation - use sparingly.
236
- */
237
- total?: number | null;
238
- }
239
- }
240
-
241
155
  export interface FileDeleteResponse {
242
156
  /**
243
157
  * The ID of the deleted file
@@ -269,29 +183,7 @@ export interface FileUpdateParams {
269
183
  file: Uploadable;
270
184
  }
271
185
 
272
- export interface FileListParams {
273
- /**
274
- * Maximum number of items to return per page (1-100)
275
- */
276
- limit?: number;
277
-
278
- /**
279
- * Cursor for forward pagination - get items after this position. Use last_cursor
280
- * from previous response.
281
- */
282
- after?: string | null;
283
-
284
- /**
285
- * Cursor for backward pagination - get items before this position. Use
286
- * first_cursor from previous response.
287
- */
288
- before?: string | null;
289
-
290
- /**
291
- * Whether to include total count in response (expensive operation)
292
- */
293
- include_total?: boolean;
294
-
186
+ export interface FileListParams extends CursorParams {
295
187
  /**
296
188
  * Search query for fuzzy matching over name and description fields
297
189
  */
@@ -302,8 +194,8 @@ export declare namespace Files {
302
194
  export {
303
195
  type FileObject as FileObject,
304
196
  type PaginationWithTotal as PaginationWithTotal,
305
- type FileListResponse as FileListResponse,
306
197
  type FileDeleteResponse as FileDeleteResponse,
198
+ type FileObjectsCursor as FileObjectsCursor,
307
199
  type FileCreateParams as FileCreateParams,
308
200
  type FileUpdateParams as FileUpdateParams,
309
201
  type FileListParams as FileListParams,
@@ -19,11 +19,11 @@ export {
19
19
  type LinearDataSource,
20
20
  type NotionDataSource,
21
21
  type Oauth2Params,
22
- type DataSourceListResponse,
23
22
  type DataSourceDeleteResponse,
24
23
  type DataSourceCreateParams,
25
24
  type DataSourceUpdateParams,
26
25
  type DataSourceListParams,
26
+ type DataSourcesCursor,
27
27
  } from './data-sources/data-sources';
28
28
  export { Embeddings, type EncodingFormat, type ObjectType, type EmbeddingCreateParams } from './embeddings';
29
29
  export { Extractions } from './extractions/extractions';
@@ -31,11 +31,11 @@ export {
31
31
  Files,
32
32
  type FileObject,
33
33
  type PaginationWithTotal,
34
- type FileListResponse,
35
34
  type FileDeleteResponse,
36
35
  type FileCreateParams,
37
36
  type FileUpdateParams,
38
37
  type FileListParams,
38
+ type FileObjectsCursor,
39
39
  } from './files';
40
40
  export { Parsing } from './parsing/parsing';
41
41
  export {
@@ -47,7 +47,6 @@ export {
47
47
  type ScoredVideoURLInputChunk,
48
48
  type VectorStore,
49
49
  type VectorStoreChunkSearchOptions,
50
- type VectorStoreListResponse,
51
50
  type VectorStoreDeleteResponse,
52
51
  type VectorStoreQuestionAnsweringResponse,
53
52
  type VectorStoreSearchResponse,
@@ -56,6 +55,7 @@ export {
56
55
  type VectorStoreListParams,
57
56
  type VectorStoreQuestionAnsweringParams,
58
57
  type VectorStoreSearchParams,
58
+ type VectorStoresCursor,
59
59
  } from './vector-stores/vector-stores';
60
60
  export {
61
61
  type Embedding,
@@ -11,5 +11,6 @@ export {
11
11
  type JobDeleteResponse,
12
12
  type JobCreateParams,
13
13
  type JobListParams,
14
+ type JobListResponsesCursor,
14
15
  } from './jobs';
15
16
  export { Parsing } from './parsing';
@@ -3,6 +3,7 @@
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as JobsAPI from './jobs';
5
5
  import { APIPromise } from '../../core/api-promise';
6
+ import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
6
7
  import { RequestOptions } from '../../internal/request-options';
7
8
  import { path } from '../../internal/utils/path';
8
9
  import * as polling from '../../lib/polling';
@@ -38,8 +39,11 @@ export class Jobs extends APIResource {
38
39
  *
39
40
  * Returns: List of parsing jobs with pagination.
40
41
  */
41
- list(query: JobListParams | null | undefined = {}, options?: RequestOptions): APIPromise<JobListResponse> {
42
- return this._client.get('/v1/parsing/jobs', { query, ...options });
42
+ list(
43
+ query: JobListParams | null | undefined = {},
44
+ options?: RequestOptions,
45
+ ): PagePromise<JobListResponsesCursor, JobListResponse> {
46
+ return this._client.getAPIList('/v1/parsing/jobs', Cursor<JobListResponse>, { query, ...options });
43
47
  }
44
48
 
45
49
  /**
@@ -157,6 +161,8 @@ export class Jobs extends APIResource {
157
161
  }
158
162
  }
159
163
 
164
+ export type JobListResponsesCursor = Cursor<JobListResponse>;
165
+
160
166
  /**
161
167
  * Strategy used for chunking document content.
162
168
  */
@@ -337,145 +343,53 @@ export namespace ParsingJob {
337
343
  export type ReturnFormat = 'html' | 'markdown' | 'plain';
338
344
 
339
345
  /**
340
- * A list of parsing jobs with pagination.
346
+ * A parsing job item for list responses, omitting result and error fields.
341
347
  */
342
348
  export interface JobListResponse {
343
349
  /**
344
- * Response model for cursor-based pagination.
345
- *
346
- * Examples: Forward pagination response: { "has_more": true, "first_cursor":
347
- * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMSIsImlkIjoiYWJjMTIzIn0=", "last_cursor":
348
- * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMCIsImlkIjoieHl6Nzg5In0=", "total": null }
349
- *
350
- * Final page response:
351
- * {
352
- * "has_more": false,
353
- * "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOSIsImlkIjoibGFzdDEyMyJ9",
354
- * "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOCIsImlkIjoiZmluYWw0NTYifQ==",
355
- * "total": 42
356
- * }
357
- *
358
- * Empty results:
359
- * {
360
- * "has_more": false,
361
- * "first_cursor": null,
362
- * "last_cursor": null,
363
- * "total": 0
364
- * }
350
+ * The ID of the job
365
351
  */
366
- pagination: JobListResponse.Pagination;
352
+ id: string;
367
353
 
368
354
  /**
369
- * The list of parsing jobs
355
+ * The ID of the file to parse
370
356
  */
371
- data: Array<JobListResponse.Data>;
357
+ file_id: string;
372
358
 
373
359
  /**
374
- * The object type of the response
360
+ * The name of the file
375
361
  */
376
- object?: 'list';
377
- }
362
+ filename?: string | null;
378
363
 
379
- export namespace JobListResponse {
380
364
  /**
381
- * Response model for cursor-based pagination.
382
- *
383
- * Examples: Forward pagination response: { "has_more": true, "first_cursor":
384
- * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMSIsImlkIjoiYWJjMTIzIn0=", "last_cursor":
385
- * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMCIsImlkIjoieHl6Nzg5In0=", "total": null }
386
- *
387
- * Final page response:
388
- * {
389
- * "has_more": false,
390
- * "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOSIsImlkIjoibGFzdDEyMyJ9",
391
- * "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOCIsImlkIjoiZmluYWw0NTYifQ==",
392
- * "total": 42
393
- * }
394
- *
395
- * Empty results:
396
- * {
397
- * "has_more": false,
398
- * "first_cursor": null,
399
- * "last_cursor": null,
400
- * "total": 0
401
- * }
402
- */
403
- export interface Pagination {
404
- /**
405
- * Contextual direction-aware flag: True if more items exist in the requested
406
- * pagination direction. For 'after': more items after this page. For 'before':
407
- * more items before this page.
408
- */
409
- has_more: boolean;
410
-
411
- /**
412
- * Cursor of the first item in this page. Use for backward pagination. None if page
413
- * is empty.
414
- */
415
- first_cursor: string | null;
416
-
417
- /**
418
- * Cursor of the last item in this page. Use for forward pagination. None if page
419
- * is empty.
420
- */
421
- last_cursor: string | null;
422
-
423
- /**
424
- * Total number of items available across all pages. Only included when
425
- * include_total=true was requested. Expensive operation - use sparingly.
426
- */
427
- total?: number | null;
428
- }
365
+ * The status of the job
366
+ */
367
+ status: ParsingJobStatus;
429
368
 
430
369
  /**
431
- * A parsing job item for list responses, omitting result and error fields.
370
+ * The started time of the job
432
371
  */
433
- export interface Data {
434
- /**
435
- * The ID of the job
436
- */
437
- id: string;
438
-
439
- /**
440
- * The ID of the file to parse
441
- */
442
- file_id: string;
443
-
444
- /**
445
- * The name of the file
446
- */
447
- filename?: string | null;
448
-
449
- /**
450
- * The status of the job
451
- */
452
- status: JobsAPI.ParsingJobStatus;
453
-
454
- /**
455
- * The started time of the job
456
- */
457
- started_at?: string | null;
372
+ started_at?: string | null;
458
373
 
459
- /**
460
- * The finished time of the job
461
- */
462
- finished_at?: string | null;
374
+ /**
375
+ * The finished time of the job
376
+ */
377
+ finished_at?: string | null;
463
378
 
464
- /**
465
- * The creation time of the job
466
- */
467
- created_at?: string;
379
+ /**
380
+ * The creation time of the job
381
+ */
382
+ created_at?: string;
468
383
 
469
- /**
470
- * The updated time of the job
471
- */
472
- updated_at?: string | null;
384
+ /**
385
+ * The updated time of the job
386
+ */
387
+ updated_at?: string | null;
473
388
 
474
- /**
475
- * The type of the object
476
- */
477
- object?: 'parsing_job';
478
- }
389
+ /**
390
+ * The type of the object
391
+ */
392
+ object?: 'parsing_job';
479
393
  }
480
394
 
481
395
  /**
@@ -525,29 +439,7 @@ export interface JobCreateParams {
525
439
  mode?: 'fast' | 'high_quality';
526
440
  }
527
441
 
528
- export interface JobListParams {
529
- /**
530
- * Maximum number of items to return per page (1-100)
531
- */
532
- limit?: number;
533
-
534
- /**
535
- * Cursor for forward pagination - get items after this position. Use last_cursor
536
- * from previous response.
537
- */
538
- after?: string | null;
539
-
540
- /**
541
- * Cursor for backward pagination - get items before this position. Use
542
- * first_cursor from previous response.
543
- */
544
- before?: string | null;
545
-
546
- /**
547
- * Whether to include total count in response (expensive operation)
548
- */
549
- include_total?: boolean;
550
-
442
+ export interface JobListParams extends CursorParams {
551
443
  /**
552
444
  * Status to filter by
553
445
  */
@@ -568,6 +460,7 @@ export declare namespace Jobs {
568
460
  type ReturnFormat as ReturnFormat,
569
461
  type JobListResponse as JobListResponse,
570
462
  type JobDeleteResponse as JobDeleteResponse,
463
+ type JobListResponsesCursor as JobListResponsesCursor,
571
464
  type JobCreateParams as JobCreateParams,
572
465
  type JobListParams as JobListParams,
573
466
  };
@@ -9,6 +9,7 @@ import {
9
9
  JobDeleteResponse,
10
10
  JobListParams,
11
11
  JobListResponse,
12
+ JobListResponsesCursor,
12
13
  Jobs,
13
14
  ParsingJob,
14
15
  ParsingJobStatus,
@@ -31,6 +32,7 @@ export declare namespace Parsing {
31
32
  type ReturnFormat as ReturnFormat,
32
33
  type JobListResponse as JobListResponse,
33
34
  type JobDeleteResponse as JobDeleteResponse,
35
+ type JobListResponsesCursor as JobListResponsesCursor,
34
36
  type JobCreateParams as JobCreateParams,
35
37
  type JobListParams as JobListParams,
36
38
  };