@mixedbread/sdk 0.11.1 → 0.12.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 (97) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +0 -31
  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/package.json +1 -1
  9. package/resources/data-sources/connectors.d.mts +106 -5
  10. package/resources/data-sources/connectors.d.mts.map +1 -1
  11. package/resources/data-sources/connectors.d.ts +106 -5
  12. package/resources/data-sources/connectors.d.ts.map +1 -1
  13. package/resources/data-sources/connectors.js +1 -2
  14. package/resources/data-sources/connectors.js.map +1 -1
  15. package/resources/data-sources/connectors.mjs +1 -2
  16. package/resources/data-sources/connectors.mjs.map +1 -1
  17. package/resources/data-sources/data-sources.d.mts +108 -7
  18. package/resources/data-sources/data-sources.d.mts.map +1 -1
  19. package/resources/data-sources/data-sources.d.ts +108 -7
  20. package/resources/data-sources/data-sources.d.ts.map +1 -1
  21. package/resources/data-sources/data-sources.js +1 -2
  22. package/resources/data-sources/data-sources.js.map +1 -1
  23. package/resources/data-sources/data-sources.mjs +1 -2
  24. package/resources/data-sources/data-sources.mjs.map +1 -1
  25. package/resources/data-sources/index.d.mts +2 -2
  26. package/resources/data-sources/index.d.mts.map +1 -1
  27. package/resources/data-sources/index.d.ts +2 -2
  28. package/resources/data-sources/index.d.ts.map +1 -1
  29. package/resources/files.d.mts +107 -5
  30. package/resources/files.d.mts.map +1 -1
  31. package/resources/files.d.ts +107 -5
  32. package/resources/files.d.ts.map +1 -1
  33. package/resources/files.js +1 -2
  34. package/resources/files.js.map +1 -1
  35. package/resources/files.mjs +1 -2
  36. package/resources/files.mjs.map +1 -1
  37. package/resources/index.d.mts +3 -3
  38. package/resources/index.d.mts.map +1 -1
  39. package/resources/index.d.ts +3 -3
  40. package/resources/index.d.ts.map +1 -1
  41. package/resources/parsing/index.d.mts +1 -1
  42. package/resources/parsing/index.d.mts.map +1 -1
  43. package/resources/parsing/index.d.ts +1 -1
  44. package/resources/parsing/index.d.ts.map +1 -1
  45. package/resources/parsing/index.js.map +1 -1
  46. package/resources/parsing/index.mjs.map +1 -1
  47. package/resources/parsing/jobs.d.mts +134 -29
  48. package/resources/parsing/jobs.d.mts.map +1 -1
  49. package/resources/parsing/jobs.d.ts +134 -29
  50. package/resources/parsing/jobs.d.ts.map +1 -1
  51. package/resources/parsing/jobs.js +1 -2
  52. package/resources/parsing/jobs.js.map +1 -1
  53. package/resources/parsing/jobs.mjs +1 -2
  54. package/resources/parsing/jobs.mjs.map +1 -1
  55. package/resources/parsing/parsing.d.mts +2 -2
  56. package/resources/parsing/parsing.d.mts.map +1 -1
  57. package/resources/parsing/parsing.d.ts +2 -2
  58. package/resources/parsing/parsing.d.ts.map +1 -1
  59. package/resources/parsing/parsing.js.map +1 -1
  60. package/resources/parsing/parsing.mjs.map +1 -1
  61. package/resources/vector-stores/files.d.mts +103 -5
  62. package/resources/vector-stores/files.d.mts.map +1 -1
  63. package/resources/vector-stores/files.d.ts +103 -5
  64. package/resources/vector-stores/files.d.ts.map +1 -1
  65. package/resources/vector-stores/files.js +1 -2
  66. package/resources/vector-stores/files.js.map +1 -1
  67. package/resources/vector-stores/files.mjs +1 -2
  68. package/resources/vector-stores/files.mjs.map +1 -1
  69. package/resources/vector-stores/index.d.mts +2 -2
  70. package/resources/vector-stores/index.d.mts.map +1 -1
  71. package/resources/vector-stores/index.d.ts +2 -2
  72. package/resources/vector-stores/index.d.ts.map +1 -1
  73. package/resources/vector-stores/vector-stores.d.mts +105 -7
  74. package/resources/vector-stores/vector-stores.d.mts.map +1 -1
  75. package/resources/vector-stores/vector-stores.d.ts +105 -7
  76. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  77. package/resources/vector-stores/vector-stores.js +1 -2
  78. package/resources/vector-stores/vector-stores.js.map +1 -1
  79. package/resources/vector-stores/vector-stores.mjs +1 -2
  80. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  81. package/src/client.ts +6 -6
  82. package/src/resources/data-sources/connectors.ts +118 -11
  83. package/src/resources/data-sources/data-sources.ts +120 -9
  84. package/src/resources/data-sources/index.ts +2 -2
  85. package/src/resources/files.ts +120 -7
  86. package/src/resources/index.ts +3 -3
  87. package/src/resources/parsing/index.ts +0 -1
  88. package/src/resources/parsing/jobs.ts +146 -34
  89. package/src/resources/parsing/parsing.ts +0 -2
  90. package/src/resources/vector-stores/files.ts +115 -11
  91. package/src/resources/vector-stores/index.ts +2 -2
  92. package/src/resources/vector-stores/vector-stores.ts +117 -9
  93. package/src/version.ts +1 -1
  94. package/version.d.mts +1 -1
  95. package/version.d.ts +1 -1
  96. package/version.js +1 -1
  97. package/version.mjs +1 -1
@@ -5,7 +5,6 @@ import * as FilesAPI from './files';
5
5
  import * as Shared from '../shared';
6
6
  import * as VectorStoresAPI from './vector-stores';
7
7
  import { APIPromise } from '../../core/api-promise';
8
- import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
9
8
  import { RequestOptions } from '../../internal/request-options';
10
9
  import * as polling from '../../lib/polling';
11
10
  import { Uploadable } from '../../uploads';
@@ -57,12 +56,8 @@ export class Files extends APIResource {
57
56
  vectorStoreIdentifier: string,
58
57
  query: FileListParams | null | undefined = {},
59
58
  options?: RequestOptions,
60
- ): PagePromise<VectorStoreFilesCursor, VectorStoreFile> {
61
- return this._client.getAPIList(
62
- path`/v1/vector_stores/${vectorStoreIdentifier}/files`,
63
- Cursor<VectorStoreFile>,
64
- { query, ...options },
65
- );
59
+ ): APIPromise<FileListResponse> {
60
+ return this._client.get(path`/v1/vector_stores/${vectorStoreIdentifier}/files`, { query, ...options });
66
61
  }
67
62
 
68
63
  /**
@@ -202,8 +197,6 @@ export class Files extends APIResource {
202
197
  }
203
198
  }
204
199
 
205
- export type VectorStoreFilesCursor = Cursor<VectorStoreFile>;
206
-
207
200
  /**
208
201
  * Represents a reranking configuration.
209
202
  */
@@ -352,6 +345,95 @@ export interface VectorStoreFile {
352
345
  object?: 'vector_store.file';
353
346
  }
354
347
 
348
+ export interface FileListResponse {
349
+ /**
350
+ * Response model for cursor-based pagination.
351
+ *
352
+ * Examples: Forward pagination response: { "has_more": true, "first_cursor":
353
+ * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMSIsImlkIjoiYWJjMTIzIn0=", "last_cursor":
354
+ * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMCIsImlkIjoieHl6Nzg5In0=", "total": null }
355
+ *
356
+ * Final page response:
357
+ * {
358
+ * "has_more": false,
359
+ * "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOSIsImlkIjoibGFzdDEyMyJ9",
360
+ * "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOCIsImlkIjoiZmluYWw0NTYifQ==",
361
+ * "total": 42
362
+ * }
363
+ *
364
+ * Empty results:
365
+ * {
366
+ * "has_more": false,
367
+ * "first_cursor": null,
368
+ * "last_cursor": null,
369
+ * "total": 0
370
+ * }
371
+ */
372
+ pagination: FileListResponse.Pagination;
373
+
374
+ /**
375
+ * The object type of the response
376
+ */
377
+ object?: 'list';
378
+
379
+ /**
380
+ * The list of vector store files
381
+ */
382
+ data: Array<VectorStoreFile>;
383
+ }
384
+
385
+ export namespace FileListResponse {
386
+ /**
387
+ * Response model for cursor-based pagination.
388
+ *
389
+ * Examples: Forward pagination response: { "has_more": true, "first_cursor":
390
+ * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMSIsImlkIjoiYWJjMTIzIn0=", "last_cursor":
391
+ * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMCIsImlkIjoieHl6Nzg5In0=", "total": null }
392
+ *
393
+ * Final page response:
394
+ * {
395
+ * "has_more": false,
396
+ * "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOSIsImlkIjoibGFzdDEyMyJ9",
397
+ * "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOCIsImlkIjoiZmluYWw0NTYifQ==",
398
+ * "total": 42
399
+ * }
400
+ *
401
+ * Empty results:
402
+ * {
403
+ * "has_more": false,
404
+ * "first_cursor": null,
405
+ * "last_cursor": null,
406
+ * "total": 0
407
+ * }
408
+ */
409
+ export interface Pagination {
410
+ /**
411
+ * Contextual direction-aware flag: True if more items exist in the requested
412
+ * pagination direction. For 'after': more items after this page. For 'before':
413
+ * more items before this page.
414
+ */
415
+ has_more: boolean;
416
+
417
+ /**
418
+ * Cursor of the first item in this page. Use for backward pagination. None if page
419
+ * is empty.
420
+ */
421
+ first_cursor: string | null;
422
+
423
+ /**
424
+ * Cursor of the last item in this page. Use for forward pagination. None if page
425
+ * is empty.
426
+ */
427
+ last_cursor: string | null;
428
+
429
+ /**
430
+ * Total number of items available across all pages. Only included when
431
+ * include_total=true was requested. Expensive operation - use sparingly.
432
+ */
433
+ total?: number | null;
434
+ }
435
+ }
436
+
355
437
  /**
356
438
  * Response model for file deletion.
357
439
  */
@@ -425,7 +507,29 @@ export interface FileRetrieveParams {
425
507
  vector_store_identifier: string;
426
508
  }
427
509
 
428
- export interface FileListParams extends CursorParams {
510
+ export interface FileListParams {
511
+ /**
512
+ * Maximum number of items to return per page (1-100)
513
+ */
514
+ limit?: number;
515
+
516
+ /**
517
+ * Cursor for forward pagination - get items after this position. Use last_cursor
518
+ * from previous response.
519
+ */
520
+ after?: string | null;
521
+
522
+ /**
523
+ * Cursor for backward pagination - get items before this position. Use
524
+ * first_cursor from previous response.
525
+ */
526
+ before?: string | null;
527
+
528
+ /**
529
+ * Whether to include total count in response (expensive operation)
530
+ */
531
+ include_total?: boolean;
532
+
429
533
  /**
430
534
  * Status to filter by
431
535
  */
@@ -523,9 +627,9 @@ export declare namespace Files {
523
627
  type ScoredVectorStoreFile as ScoredVectorStoreFile,
524
628
  type VectorStoreFileStatus as VectorStoreFileStatus,
525
629
  type VectorStoreFile as VectorStoreFile,
630
+ type FileListResponse as FileListResponse,
526
631
  type FileDeleteResponse as FileDeleteResponse,
527
632
  type FileSearchResponse as FileSearchResponse,
528
- type VectorStoreFilesCursor as VectorStoreFilesCursor,
529
633
  type FileCreateParams as FileCreateParams,
530
634
  type FileRetrieveParams as FileRetrieveParams,
531
635
  type FileListParams as FileListParams,
@@ -6,6 +6,7 @@ export {
6
6
  type ScoredVectorStoreFile,
7
7
  type VectorStoreFileStatus,
8
8
  type VectorStoreFile,
9
+ type FileListResponse,
9
10
  type FileDeleteResponse,
10
11
  type FileSearchResponse,
11
12
  type FileCreateParams,
@@ -13,7 +14,6 @@ export {
13
14
  type FileListParams,
14
15
  type FileDeleteParams,
15
16
  type FileSearchParams,
16
- type VectorStoreFilesCursor,
17
17
  } from './files';
18
18
  export {
19
19
  VectorStores,
@@ -24,6 +24,7 @@ export {
24
24
  type ScoredVideoURLInputChunk,
25
25
  type VectorStore,
26
26
  type VectorStoreChunkSearchOptions,
27
+ type VectorStoreListResponse,
27
28
  type VectorStoreDeleteResponse,
28
29
  type VectorStoreQuestionAnsweringResponse,
29
30
  type VectorStoreSearchResponse,
@@ -32,5 +33,4 @@ export {
32
33
  type VectorStoreListParams,
33
34
  type VectorStoreQuestionAnsweringParams,
34
35
  type VectorStoreSearchParams,
35
- type VectorStoresCursor,
36
36
  } from './vector-stores';
@@ -8,6 +8,7 @@ import {
8
8
  FileDeleteParams,
9
9
  FileDeleteResponse,
10
10
  FileListParams,
11
+ FileListResponse,
11
12
  FileRetrieveParams,
12
13
  FileSearchParams,
13
14
  FileSearchResponse,
@@ -16,10 +17,8 @@ import {
16
17
  ScoredVectorStoreFile,
17
18
  VectorStoreFile,
18
19
  VectorStoreFileStatus,
19
- VectorStoreFilesCursor,
20
20
  } from './files';
21
21
  import { APIPromise } from '../../core/api-promise';
22
- import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
23
22
  import { RequestOptions } from '../../internal/request-options';
24
23
  import { path } from '../../internal/utils/path';
25
24
 
@@ -77,8 +76,8 @@ export class VectorStores extends APIResource {
77
76
  list(
78
77
  query: VectorStoreListParams | null | undefined = {},
79
78
  options?: RequestOptions,
80
- ): PagePromise<VectorStoresCursor, VectorStore> {
81
- return this._client.getAPIList('/v1/vector_stores', Cursor<VectorStore>, { query, ...options });
79
+ ): APIPromise<VectorStoreListResponse> {
80
+ return this._client.get('/v1/vector_stores', { query, ...options });
82
81
  }
83
82
 
84
83
  /**
@@ -126,8 +125,6 @@ export class VectorStores extends APIResource {
126
125
  }
127
126
  }
128
127
 
129
- export type VectorStoresCursor = Cursor<VectorStore>;
130
-
131
128
  /**
132
129
  * Represents an expiration policy for a vector store.
133
130
  */
@@ -579,6 +576,95 @@ export interface VectorStoreChunkSearchOptions {
579
576
  return_metadata?: boolean;
580
577
  }
581
578
 
579
+ export interface VectorStoreListResponse {
580
+ /**
581
+ * Response model for cursor-based pagination.
582
+ *
583
+ * Examples: Forward pagination response: { "has_more": true, "first_cursor":
584
+ * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMSIsImlkIjoiYWJjMTIzIn0=", "last_cursor":
585
+ * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMCIsImlkIjoieHl6Nzg5In0=", "total": null }
586
+ *
587
+ * Final page response:
588
+ * {
589
+ * "has_more": false,
590
+ * "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOSIsImlkIjoibGFzdDEyMyJ9",
591
+ * "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOCIsImlkIjoiZmluYWw0NTYifQ==",
592
+ * "total": 42
593
+ * }
594
+ *
595
+ * Empty results:
596
+ * {
597
+ * "has_more": false,
598
+ * "first_cursor": null,
599
+ * "last_cursor": null,
600
+ * "total": 0
601
+ * }
602
+ */
603
+ pagination: VectorStoreListResponse.Pagination;
604
+
605
+ /**
606
+ * The object type of the response
607
+ */
608
+ object?: 'list';
609
+
610
+ /**
611
+ * The list of vector stores
612
+ */
613
+ data: Array<VectorStore>;
614
+ }
615
+
616
+ export namespace VectorStoreListResponse {
617
+ /**
618
+ * Response model for cursor-based pagination.
619
+ *
620
+ * Examples: Forward pagination response: { "has_more": true, "first_cursor":
621
+ * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMSIsImlkIjoiYWJjMTIzIn0=", "last_cursor":
622
+ * "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMCIsImlkIjoieHl6Nzg5In0=", "total": null }
623
+ *
624
+ * Final page response:
625
+ * {
626
+ * "has_more": false,
627
+ * "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOSIsImlkIjoibGFzdDEyMyJ9",
628
+ * "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOCIsImlkIjoiZmluYWw0NTYifQ==",
629
+ * "total": 42
630
+ * }
631
+ *
632
+ * Empty results:
633
+ * {
634
+ * "has_more": false,
635
+ * "first_cursor": null,
636
+ * "last_cursor": null,
637
+ * "total": 0
638
+ * }
639
+ */
640
+ export interface Pagination {
641
+ /**
642
+ * Contextual direction-aware flag: True if more items exist in the requested
643
+ * pagination direction. For 'after': more items after this page. For 'before':
644
+ * more items before this page.
645
+ */
646
+ has_more: boolean;
647
+
648
+ /**
649
+ * Cursor of the first item in this page. Use for backward pagination. None if page
650
+ * is empty.
651
+ */
652
+ first_cursor: string | null;
653
+
654
+ /**
655
+ * Cursor of the last item in this page. Use for forward pagination. None if page
656
+ * is empty.
657
+ */
658
+ last_cursor: string | null;
659
+
660
+ /**
661
+ * Total number of items available across all pages. Only included when
662
+ * include_total=true was requested. Expensive operation - use sparingly.
663
+ */
664
+ total?: number | null;
665
+ }
666
+ }
667
+
582
668
  /**
583
669
  * Response model for vector store deletion.
584
670
  */
@@ -689,7 +775,29 @@ export interface VectorStoreUpdateParams {
689
775
  metadata?: unknown;
690
776
  }
691
777
 
692
- export interface VectorStoreListParams extends CursorParams {
778
+ export interface VectorStoreListParams {
779
+ /**
780
+ * Maximum number of items to return per page (1-100)
781
+ */
782
+ limit?: number;
783
+
784
+ /**
785
+ * Cursor for forward pagination - get items after this position. Use last_cursor
786
+ * from previous response.
787
+ */
788
+ after?: string | null;
789
+
790
+ /**
791
+ * Cursor for backward pagination - get items before this position. Use
792
+ * first_cursor from previous response.
793
+ */
794
+ before?: string | null;
795
+
796
+ /**
797
+ * Whether to include total count in response (expensive operation)
798
+ */
799
+ include_total?: boolean;
800
+
693
801
  /**
694
802
  * Search query for fuzzy matching over name and description fields
695
803
  */
@@ -817,10 +925,10 @@ export declare namespace VectorStores {
817
925
  type ScoredVideoURLInputChunk as ScoredVideoURLInputChunk,
818
926
  type VectorStore as VectorStore,
819
927
  type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions,
928
+ type VectorStoreListResponse as VectorStoreListResponse,
820
929
  type VectorStoreDeleteResponse as VectorStoreDeleteResponse,
821
930
  type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse,
822
931
  type VectorStoreSearchResponse as VectorStoreSearchResponse,
823
- type VectorStoresCursor as VectorStoresCursor,
824
932
  type VectorStoreCreateParams as VectorStoreCreateParams,
825
933
  type VectorStoreUpdateParams as VectorStoreUpdateParams,
826
934
  type VectorStoreListParams as VectorStoreListParams,
@@ -834,9 +942,9 @@ export declare namespace VectorStores {
834
942
  type ScoredVectorStoreFile as ScoredVectorStoreFile,
835
943
  type VectorStoreFileStatus as VectorStoreFileStatus,
836
944
  type VectorStoreFile as VectorStoreFile,
945
+ type FileListResponse as FileListResponse,
837
946
  type FileDeleteResponse as FileDeleteResponse,
838
947
  type FileSearchResponse as FileSearchResponse,
839
- type VectorStoreFilesCursor as VectorStoreFilesCursor,
840
948
  type FileCreateParams as FileCreateParams,
841
949
  type FileRetrieveParams as FileRetrieveParams,
842
950
  type FileListParams as FileListParams,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.11.1'; // x-release-please-version
1
+ export const VERSION = '0.12.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.11.1";
1
+ export declare const VERSION = "0.12.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.11.1";
1
+ export declare const VERSION = "0.12.0";
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.11.1'; // x-release-please-version
4
+ exports.VERSION = '0.12.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.11.1'; // x-release-please-version
1
+ export const VERSION = '0.12.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map