@mixedbread/sdk 0.14.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 (121) hide show
  1. package/CHANGELOG.md +25 -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 +0 -1
  9. package/core/pagination.d.mts.map +1 -1
  10. package/core/pagination.d.ts +0 -1
  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/internal/uploads.js +1 -1
  15. package/internal/uploads.js.map +1 -1
  16. package/internal/uploads.mjs +1 -1
  17. package/internal/uploads.mjs.map +1 -1
  18. package/internal/utils/log.js +1 -1
  19. package/internal/utils/log.js.map +1 -1
  20. package/internal/utils/log.mjs +1 -1
  21. package/internal/utils/log.mjs.map +1 -1
  22. package/internal/utils/path.d.mts.map +1 -1
  23. package/internal/utils/path.d.ts.map +1 -1
  24. package/internal/utils/path.js +26 -5
  25. package/internal/utils/path.js.map +1 -1
  26. package/internal/utils/path.mjs +26 -5
  27. package/internal/utils/path.mjs.map +1 -1
  28. package/package.json +1 -1
  29. package/resources/data-sources/connectors.d.mts +5 -106
  30. package/resources/data-sources/connectors.d.mts.map +1 -1
  31. package/resources/data-sources/connectors.d.ts +5 -106
  32. package/resources/data-sources/connectors.d.ts.map +1 -1
  33. package/resources/data-sources/connectors.js +2 -1
  34. package/resources/data-sources/connectors.js.map +1 -1
  35. package/resources/data-sources/connectors.mjs +2 -1
  36. package/resources/data-sources/connectors.mjs.map +1 -1
  37. package/resources/data-sources/data-sources.d.mts +7 -108
  38. package/resources/data-sources/data-sources.d.mts.map +1 -1
  39. package/resources/data-sources/data-sources.d.ts +7 -108
  40. package/resources/data-sources/data-sources.d.ts.map +1 -1
  41. package/resources/data-sources/data-sources.js +2 -1
  42. package/resources/data-sources/data-sources.js.map +1 -1
  43. package/resources/data-sources/data-sources.mjs +2 -1
  44. package/resources/data-sources/data-sources.mjs.map +1 -1
  45. package/resources/data-sources/index.d.mts +2 -2
  46. package/resources/data-sources/index.d.mts.map +1 -1
  47. package/resources/data-sources/index.d.ts +2 -2
  48. package/resources/data-sources/index.d.ts.map +1 -1
  49. package/resources/files.d.mts +5 -103
  50. package/resources/files.d.mts.map +1 -1
  51. package/resources/files.d.ts +5 -103
  52. package/resources/files.d.ts.map +1 -1
  53. package/resources/files.js +2 -1
  54. package/resources/files.js.map +1 -1
  55. package/resources/files.mjs +2 -1
  56. package/resources/files.mjs.map +1 -1
  57. package/resources/index.d.mts +3 -3
  58. package/resources/index.d.mts.map +1 -1
  59. package/resources/index.d.ts +3 -3
  60. package/resources/index.d.ts.map +1 -1
  61. package/resources/parsing/index.d.mts +1 -1
  62. package/resources/parsing/index.d.mts.map +1 -1
  63. package/resources/parsing/index.d.ts +1 -1
  64. package/resources/parsing/index.d.ts.map +1 -1
  65. package/resources/parsing/index.js.map +1 -1
  66. package/resources/parsing/index.mjs.map +1 -1
  67. package/resources/parsing/jobs.d.mts +41 -130
  68. package/resources/parsing/jobs.d.mts.map +1 -1
  69. package/resources/parsing/jobs.d.ts +41 -130
  70. package/resources/parsing/jobs.d.ts.map +1 -1
  71. package/resources/parsing/jobs.js +2 -1
  72. package/resources/parsing/jobs.js.map +1 -1
  73. package/resources/parsing/jobs.mjs +2 -1
  74. package/resources/parsing/jobs.mjs.map +1 -1
  75. package/resources/parsing/parsing.d.mts +2 -2
  76. package/resources/parsing/parsing.d.mts.map +1 -1
  77. package/resources/parsing/parsing.d.ts +2 -2
  78. package/resources/parsing/parsing.d.ts.map +1 -1
  79. package/resources/parsing/parsing.js.map +1 -1
  80. package/resources/parsing/parsing.mjs.map +1 -1
  81. package/resources/vector-stores/files.d.mts +5 -103
  82. package/resources/vector-stores/files.d.mts.map +1 -1
  83. package/resources/vector-stores/files.d.ts +5 -103
  84. package/resources/vector-stores/files.d.ts.map +1 -1
  85. package/resources/vector-stores/files.js +2 -1
  86. package/resources/vector-stores/files.js.map +1 -1
  87. package/resources/vector-stores/files.mjs +2 -1
  88. package/resources/vector-stores/files.mjs.map +1 -1
  89. package/resources/vector-stores/index.d.mts +2 -2
  90. package/resources/vector-stores/index.d.mts.map +1 -1
  91. package/resources/vector-stores/index.d.ts +2 -2
  92. package/resources/vector-stores/index.d.ts.map +1 -1
  93. package/resources/vector-stores/vector-stores.d.mts +7 -105
  94. package/resources/vector-stores/vector-stores.d.mts.map +1 -1
  95. package/resources/vector-stores/vector-stores.d.ts +7 -105
  96. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  97. package/resources/vector-stores/vector-stores.js +2 -1
  98. package/resources/vector-stores/vector-stores.js.map +1 -1
  99. package/resources/vector-stores/vector-stores.mjs +2 -1
  100. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  101. package/src/client.ts +6 -6
  102. package/src/core/pagination.ts +0 -2
  103. package/src/internal/uploads.ts +1 -1
  104. package/src/internal/utils/log.ts +1 -1
  105. package/src/internal/utils/path.ts +30 -7
  106. package/src/resources/data-sources/connectors.ts +11 -118
  107. package/src/resources/data-sources/data-sources.ts +9 -120
  108. package/src/resources/data-sources/index.ts +2 -2
  109. package/src/resources/files.ts +7 -115
  110. package/src/resources/index.ts +3 -3
  111. package/src/resources/parsing/index.ts +1 -0
  112. package/src/resources/parsing/jobs.ts +47 -139
  113. package/src/resources/parsing/parsing.ts +2 -0
  114. package/src/resources/vector-stores/files.ts +11 -115
  115. package/src/resources/vector-stores/index.ts +2 -2
  116. package/src/resources/vector-stores/vector-stores.ts +9 -117
  117. package/src/version.ts +1 -1
  118. package/version.d.mts +1 -1
  119. package/version.d.ts +1 -1
  120. package/version.js +1 -1
  121. package/version.mjs +1 -1
@@ -8,7 +8,6 @@ import {
8
8
  FileDeleteParams,
9
9
  FileDeleteResponse,
10
10
  FileListParams,
11
- FileListResponse,
12
11
  FileRetrieveParams,
13
12
  FileSearchParams,
14
13
  FileSearchResponse,
@@ -17,8 +16,10 @@ import {
17
16
  ScoredVectorStoreFile,
18
17
  VectorStoreFile,
19
18
  VectorStoreFileStatus,
19
+ VectorStoreFilesCursor,
20
20
  } from './files';
21
21
  import { APIPromise } from '../../core/api-promise';
22
+ import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
22
23
  import { RequestOptions } from '../../internal/request-options';
23
24
  import { path } from '../../internal/utils/path';
24
25
 
@@ -76,8 +77,8 @@ export class VectorStores extends APIResource {
76
77
  list(
77
78
  query: VectorStoreListParams | null | undefined = {},
78
79
  options?: RequestOptions,
79
- ): APIPromise<VectorStoreListResponse> {
80
- return this._client.get('/v1/vector_stores', { query, ...options });
80
+ ): PagePromise<VectorStoresCursor, VectorStore> {
81
+ return this._client.getAPIList('/v1/vector_stores', Cursor<VectorStore>, { query, ...options });
81
82
  }
82
83
 
83
84
  /**
@@ -125,6 +126,8 @@ export class VectorStores extends APIResource {
125
126
  }
126
127
  }
127
128
 
129
+ export type VectorStoresCursor = Cursor<VectorStore>;
130
+
128
131
  /**
129
132
  * Represents an expiration policy for a vector store.
130
133
  */
@@ -576,95 +579,6 @@ export interface VectorStoreChunkSearchOptions {
576
579
  return_metadata?: boolean;
577
580
  }
578
581
 
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
-
668
582
  /**
669
583
  * Response model for vector store deletion.
670
584
  */
@@ -775,29 +689,7 @@ export interface VectorStoreUpdateParams {
775
689
  metadata?: unknown;
776
690
  }
777
691
 
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
-
692
+ export interface VectorStoreListParams extends CursorParams {
801
693
  /**
802
694
  * Search query for fuzzy matching over name and description fields
803
695
  */
@@ -925,10 +817,10 @@ export declare namespace VectorStores {
925
817
  type ScoredVideoURLInputChunk as ScoredVideoURLInputChunk,
926
818
  type VectorStore as VectorStore,
927
819
  type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions,
928
- type VectorStoreListResponse as VectorStoreListResponse,
929
820
  type VectorStoreDeleteResponse as VectorStoreDeleteResponse,
930
821
  type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse,
931
822
  type VectorStoreSearchResponse as VectorStoreSearchResponse,
823
+ type VectorStoresCursor as VectorStoresCursor,
932
824
  type VectorStoreCreateParams as VectorStoreCreateParams,
933
825
  type VectorStoreUpdateParams as VectorStoreUpdateParams,
934
826
  type VectorStoreListParams as VectorStoreListParams,
@@ -942,9 +834,9 @@ export declare namespace VectorStores {
942
834
  type ScoredVectorStoreFile as ScoredVectorStoreFile,
943
835
  type VectorStoreFileStatus as VectorStoreFileStatus,
944
836
  type VectorStoreFile as VectorStoreFile,
945
- type FileListResponse as FileListResponse,
946
837
  type FileDeleteResponse as FileDeleteResponse,
947
838
  type FileSearchResponse as FileSearchResponse,
839
+ type VectorStoreFilesCursor as VectorStoreFilesCursor,
948
840
  type FileCreateParams as FileCreateParams,
949
841
  type FileRetrieveParams as FileRetrieveParams,
950
842
  type FileListParams as FileListParams,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.14.0'; // x-release-please-version
1
+ export const VERSION = '0.16.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.14.0";
1
+ export declare const VERSION = "0.16.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.14.0";
1
+ export declare const VERSION = "0.16.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.14.0'; // x-release-please-version
4
+ exports.VERSION = '0.16.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.14.0'; // x-release-please-version
1
+ export const VERSION = '0.16.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map