@mixedbread/sdk 0.5.0 → 0.7.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 (228) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +12 -24
  3. package/bin/migration-config.json +105 -2
  4. package/client.d.mts +12 -28
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +12 -28
  7. package/client.d.ts.map +1 -1
  8. package/client.js +6 -22
  9. package/client.js.map +1 -1
  10. package/client.mjs +6 -22
  11. package/client.mjs.map +1 -1
  12. package/core/pagination.d.mts +1 -1
  13. package/core/pagination.d.mts.map +1 -1
  14. package/core/pagination.d.ts +1 -1
  15. package/core/pagination.d.ts.map +1 -1
  16. package/core/resource.d.mts +1 -1
  17. package/core/resource.d.mts.map +1 -1
  18. package/core/resource.d.ts +1 -1
  19. package/core/resource.d.ts.map +1 -1
  20. package/core/resource.js.map +1 -1
  21. package/core/resource.mjs.map +1 -1
  22. package/internal/detect-platform.js +3 -3
  23. package/internal/detect-platform.js.map +1 -1
  24. package/internal/detect-platform.mjs +3 -3
  25. package/internal/detect-platform.mjs.map +1 -1
  26. package/internal/headers.d.mts.map +1 -1
  27. package/internal/headers.d.ts.map +1 -1
  28. package/internal/headers.js +5 -5
  29. package/internal/headers.js.map +1 -1
  30. package/internal/headers.mjs +5 -5
  31. package/internal/headers.mjs.map +1 -1
  32. package/internal/shim-types.d.mts +11 -22
  33. package/internal/shim-types.d.mts.map +1 -0
  34. package/internal/shim-types.d.ts +11 -22
  35. package/internal/shim-types.d.ts.map +1 -0
  36. package/internal/shim-types.js +4 -0
  37. package/internal/shim-types.js.map +1 -0
  38. package/internal/shim-types.mjs +3 -0
  39. package/internal/shim-types.mjs.map +1 -0
  40. package/internal/shims.d.mts +2 -2
  41. package/internal/shims.d.mts.map +1 -1
  42. package/internal/shims.d.ts +2 -2
  43. package/internal/shims.d.ts.map +1 -1
  44. package/internal/uploads.js +1 -1
  45. package/internal/uploads.js.map +1 -1
  46. package/internal/uploads.mjs +1 -1
  47. package/internal/uploads.mjs.map +1 -1
  48. package/internal/utils/log.js +1 -1
  49. package/internal/utils/log.js.map +1 -1
  50. package/internal/utils/log.mjs +1 -1
  51. package/internal/utils/log.mjs.map +1 -1
  52. package/internal/utils/path.d.mts.map +1 -1
  53. package/internal/utils/path.d.ts.map +1 -1
  54. package/internal/utils/path.js.map +1 -1
  55. package/internal/utils/path.mjs +1 -1
  56. package/internal/utils/path.mjs.map +1 -1
  57. package/internal/utils/values.d.mts +2 -0
  58. package/internal/utils/values.d.mts.map +1 -1
  59. package/internal/utils/values.d.ts +2 -0
  60. package/internal/utils/values.d.ts.map +1 -1
  61. package/internal/utils/values.js +4 -1
  62. package/internal/utils/values.js.map +1 -1
  63. package/internal/utils/values.mjs +2 -0
  64. package/internal/utils/values.mjs.map +1 -1
  65. package/package.json +1 -7
  66. package/resources/api-keys.d.mts +171 -0
  67. package/resources/api-keys.d.mts.map +1 -0
  68. package/resources/api-keys.d.ts +171 -0
  69. package/resources/api-keys.d.ts.map +1 -0
  70. package/resources/api-keys.js +76 -0
  71. package/resources/api-keys.js.map +1 -0
  72. package/resources/api-keys.mjs +72 -0
  73. package/resources/api-keys.mjs.map +1 -0
  74. package/resources/data-sources/connectors.d.mts +203 -0
  75. package/resources/data-sources/connectors.d.mts.map +1 -0
  76. package/resources/data-sources/connectors.d.ts +203 -0
  77. package/resources/data-sources/connectors.d.ts.map +1 -0
  78. package/resources/data-sources/connectors.js +73 -0
  79. package/resources/data-sources/connectors.js.map +1 -0
  80. package/resources/data-sources/connectors.mjs +69 -0
  81. package/resources/data-sources/connectors.mjs.map +1 -0
  82. package/resources/data-sources/data-sources.d.mts +287 -0
  83. package/resources/data-sources/data-sources.d.mts.map +1 -0
  84. package/resources/data-sources/data-sources.d.ts +287 -0
  85. package/resources/data-sources/data-sources.d.ts.map +1 -0
  86. package/resources/data-sources/data-sources.js +66 -0
  87. package/resources/data-sources/data-sources.js.map +1 -0
  88. package/resources/data-sources/data-sources.mjs +61 -0
  89. package/resources/data-sources/data-sources.mjs.map +1 -0
  90. package/resources/data-sources/index.d.mts +3 -0
  91. package/resources/data-sources/index.d.mts.map +1 -0
  92. package/resources/data-sources/index.d.ts +3 -0
  93. package/resources/data-sources/index.d.ts.map +1 -0
  94. package/resources/data-sources/index.js +9 -0
  95. package/resources/data-sources/index.js.map +1 -0
  96. package/resources/data-sources/index.mjs +4 -0
  97. package/resources/data-sources/index.mjs.map +1 -0
  98. package/resources/data-sources.d.mts +2 -0
  99. package/resources/data-sources.d.mts.map +1 -0
  100. package/resources/data-sources.d.ts +2 -0
  101. package/resources/data-sources.d.ts.map +1 -0
  102. package/resources/data-sources.js +6 -0
  103. package/resources/data-sources.js.map +1 -0
  104. package/resources/data-sources.mjs +3 -0
  105. package/resources/data-sources.mjs.map +1 -0
  106. package/resources/embeddings.d.mts +7 -11
  107. package/resources/embeddings.d.mts.map +1 -1
  108. package/resources/embeddings.d.ts +7 -11
  109. package/resources/embeddings.d.ts.map +1 -1
  110. package/resources/embeddings.js +0 -9
  111. package/resources/embeddings.js.map +1 -1
  112. package/resources/embeddings.mjs +0 -9
  113. package/resources/embeddings.mjs.map +1 -1
  114. package/resources/extractions/content.d.mts +44 -42
  115. package/resources/extractions/content.d.mts.map +1 -1
  116. package/resources/extractions/content.d.ts +44 -42
  117. package/resources/extractions/content.d.ts.map +1 -1
  118. package/resources/extractions/extractions.d.mts +2 -2
  119. package/resources/extractions/extractions.d.mts.map +1 -1
  120. package/resources/extractions/extractions.d.ts +2 -2
  121. package/resources/extractions/extractions.d.ts.map +1 -1
  122. package/resources/extractions/extractions.js.map +1 -1
  123. package/resources/extractions/extractions.mjs.map +1 -1
  124. package/resources/extractions/index.d.mts +1 -1
  125. package/resources/extractions/index.d.mts.map +1 -1
  126. package/resources/extractions/index.d.ts +1 -1
  127. package/resources/extractions/index.d.ts.map +1 -1
  128. package/resources/extractions/index.js.map +1 -1
  129. package/resources/extractions/index.mjs +1 -1
  130. package/resources/extractions/index.mjs.map +1 -1
  131. package/resources/extractions/jobs.d.mts +2 -1
  132. package/resources/extractions/jobs.d.mts.map +1 -1
  133. package/resources/extractions/jobs.d.ts +2 -1
  134. package/resources/extractions/jobs.d.ts.map +1 -1
  135. package/resources/extractions/jobs.js.map +1 -1
  136. package/resources/extractions/jobs.mjs.map +1 -1
  137. package/resources/files.d.mts +18 -1
  138. package/resources/files.d.mts.map +1 -1
  139. package/resources/files.d.ts +18 -1
  140. package/resources/files.d.ts.map +1 -1
  141. package/resources/index.d.mts +5 -3
  142. package/resources/index.d.mts.map +1 -1
  143. package/resources/index.d.ts +5 -3
  144. package/resources/index.d.ts.map +1 -1
  145. package/resources/index.js +5 -1
  146. package/resources/index.js.map +1 -1
  147. package/resources/index.mjs +2 -0
  148. package/resources/index.mjs.map +1 -1
  149. package/resources/parsing/index.d.mts +1 -1
  150. package/resources/parsing/index.d.mts.map +1 -1
  151. package/resources/parsing/index.d.ts +1 -1
  152. package/resources/parsing/index.d.ts.map +1 -1
  153. package/resources/parsing/index.js.map +1 -1
  154. package/resources/parsing/index.mjs.map +1 -1
  155. package/resources/parsing/jobs.d.mts +24 -10
  156. package/resources/parsing/jobs.d.mts.map +1 -1
  157. package/resources/parsing/jobs.d.ts +24 -10
  158. package/resources/parsing/jobs.d.ts.map +1 -1
  159. package/resources/parsing/jobs.js.map +1 -1
  160. package/resources/parsing/jobs.mjs.map +1 -1
  161. package/resources/parsing/parsing.d.mts +2 -2
  162. package/resources/parsing/parsing.d.mts.map +1 -1
  163. package/resources/parsing/parsing.d.ts +2 -2
  164. package/resources/parsing/parsing.d.ts.map +1 -1
  165. package/resources/parsing/parsing.js.map +1 -1
  166. package/resources/parsing/parsing.mjs.map +1 -1
  167. package/resources/top-level.d.mts +5 -4
  168. package/resources/top-level.d.mts.map +1 -1
  169. package/resources/top-level.d.ts +5 -4
  170. package/resources/top-level.d.ts.map +1 -1
  171. package/resources/vector-stores/files.d.mts +79 -19
  172. package/resources/vector-stores/files.d.mts.map +1 -1
  173. package/resources/vector-stores/files.d.ts +79 -19
  174. package/resources/vector-stores/files.d.ts.map +1 -1
  175. package/resources/vector-stores/files.js +19 -18
  176. package/resources/vector-stores/files.js.map +1 -1
  177. package/resources/vector-stores/files.mjs +19 -18
  178. package/resources/vector-stores/files.mjs.map +1 -1
  179. package/resources/vector-stores/index.d.mts +1 -1
  180. package/resources/vector-stores/index.d.mts.map +1 -1
  181. package/resources/vector-stores/index.d.ts +1 -1
  182. package/resources/vector-stores/index.d.ts.map +1 -1
  183. package/resources/vector-stores/index.js.map +1 -1
  184. package/resources/vector-stores/index.mjs.map +1 -1
  185. package/resources/vector-stores/vector-stores.d.mts +275 -90
  186. package/resources/vector-stores/vector-stores.d.mts.map +1 -1
  187. package/resources/vector-stores/vector-stores.d.ts +275 -90
  188. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  189. package/resources/vector-stores/vector-stores.js +18 -15
  190. package/resources/vector-stores/vector-stores.js.map +1 -1
  191. package/resources/vector-stores/vector-stores.mjs +18 -15
  192. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  193. package/src/client.ts +63 -30
  194. package/src/core/pagination.ts +1 -1
  195. package/src/core/resource.ts +1 -1
  196. package/src/internal/detect-platform.ts +3 -3
  197. package/src/internal/headers.ts +6 -6
  198. package/src/internal/shim-types.ts +26 -0
  199. package/src/internal/shims.ts +2 -2
  200. package/src/internal/uploads.ts +2 -2
  201. package/src/internal/utils/log.ts +1 -1
  202. package/src/internal/utils/path.ts +1 -1
  203. package/src/internal/utils/values.ts +3 -0
  204. package/src/resources/api-keys.ts +225 -0
  205. package/src/resources/data-sources/connectors.ts +290 -0
  206. package/src/resources/data-sources/data-sources.ts +404 -0
  207. package/src/resources/data-sources/index.ts +24 -0
  208. package/src/resources/data-sources.ts +3 -0
  209. package/src/resources/embeddings.ts +25 -19
  210. package/src/resources/extractions/content.ts +51 -43
  211. package/src/resources/extractions/extractions.ts +3 -1
  212. package/src/resources/extractions/index.ts +7 -1
  213. package/src/resources/extractions/jobs.ts +2 -1
  214. package/src/resources/files.ts +21 -0
  215. package/src/resources/index.ts +26 -4
  216. package/src/resources/parsing/index.ts +4 -0
  217. package/src/resources/parsing/jobs.ts +42 -44
  218. package/src/resources/parsing/parsing.ts +8 -0
  219. package/src/resources/top-level.ts +5 -44
  220. package/src/resources/vector-stores/files.ts +104 -28
  221. package/src/resources/vector-stores/index.ts +4 -3
  222. package/src/resources/vector-stores/vector-stores.ts +330 -102
  223. package/src/version.ts +1 -1
  224. package/version.d.mts +1 -1
  225. package/version.d.ts +1 -1
  226. package/version.js +1 -1
  227. package/version.mjs +1 -1
  228. package/src/internal/shim-types.d.ts +0 -28
package/CHANGELOG.md CHANGED
@@ -1,5 +1,88 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.2 (2025-06-16)
4
+
5
+ Full Changelog: [v0.7.1...v0.7.2](https://github.com/mixedbread-ai/mixedbread-ts/compare/v0.7.1...v0.7.2)
6
+
7
+ ### Chores
8
+
9
+ * update the vs_id ([a488377](https://github.com/mixedbread-ai/mixedbread-ts/commit/a48837750d4e703839c4006bbbc34ab9d9044418))
10
+
11
+ ## 0.7.1 (2025-06-16)
12
+
13
+ Full Changelog: [v0.7.0...v0.7.1](https://github.com/mixedbread-ai/mixedbread-ts/compare/v0.7.0...v0.7.1)
14
+
15
+ ## 0.7.0 (2025-06-14)
16
+
17
+ Full Changelog: [v0.6.0...v0.7.0](https://github.com/mixedbread-ai/mixedbread-ts/compare/v0.6.0...v0.7.0)
18
+
19
+ ### Features
20
+
21
+ * **api:** api update ([d9376d3](https://github.com/mixedbread-ai/mixedbread-ts/commit/d9376d30769cdb5019ba6c3553a5ff95890a6dee))
22
+ * **api:** api update ([1561d2f](https://github.com/mixedbread-ai/mixedbread-ts/commit/1561d2f597cdd152d851e797daaace847267f625))
23
+ * **api:** api update ([0f9b94b](https://github.com/mixedbread-ai/mixedbread-ts/commit/0f9b94be529790be8e7176599c7cea6980672eee))
24
+ * **api:** api update ([6fc614c](https://github.com/mixedbread-ai/mixedbread-ts/commit/6fc614ce58406b9bd49a1dd138b09d7f5f6ef3da))
25
+ * **api:** update via SDK Studio ([87c97c3](https://github.com/mixedbread-ai/mixedbread-ts/commit/87c97c3162e6d653ef2a0652cf753c4edd585d9f))
26
+ * **api:** update via SDK Studio ([3e527e4](https://github.com/mixedbread-ai/mixedbread-ts/commit/3e527e47c2efe3cc160b83e895f1bc0d92291138))
27
+ * **mcp:** implement support for binary responses ([64a9c65](https://github.com/mixedbread-ai/mixedbread-ts/commit/64a9c65a618e52f49a9f7c92342c35463ce66937))
28
+ * **mcp:** include http information in tools ([3138d3c](https://github.com/mixedbread-ai/mixedbread-ts/commit/3138d3c3399f24fd32f97c2023a1e47dc959969d))
29
+ * **mcp:** set X-Stainless-MCP header ([6b5bdbc](https://github.com/mixedbread-ai/mixedbread-ts/commit/6b5bdbc2cdf382b94a01738084c242c4c969d381))
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * compat with more runtimes ([101e76f](https://github.com/mixedbread-ai/mixedbread-ts/commit/101e76f065b1a6e9d3b220dac3b0dfc8ee91aa73))
35
+ * **mcp:** include description in dynamic tool search ([69a15a4](https://github.com/mixedbread-ai/mixedbread-ts/commit/69a15a4c84f3393695dc3c45df7af0111927b3a5))
36
+ * publish script — handle NPM errors correctly ([b27592b](https://github.com/mixedbread-ai/mixedbread-ts/commit/b27592ba009a84288b90ddb32c2847122e617cf1))
37
+
38
+
39
+ ### Chores
40
+
41
+ * adjust eslint.config.mjs ignore pattern ([fba075c](https://github.com/mixedbread-ai/mixedbread-ts/commit/fba075cbd0b395c7f7cbd9506bdf879de76a7358))
42
+ * avoid type error in certain environments ([a445536](https://github.com/mixedbread-ai/mixedbread-ts/commit/a445536ecf9344b665940c6c19b9547c7a533cda))
43
+ * **deps:** bump eslint-plugin-prettier ([be8bfd9](https://github.com/mixedbread-ai/mixedbread-ts/commit/be8bfd978d71bf2f25dd594ac4872abd93e50f05))
44
+ * **docs:** use top-level-await in example snippets ([aa74b0e](https://github.com/mixedbread-ai/mixedbread-ts/commit/aa74b0ea186751d325daf95b13a4af53a6db1986))
45
+ * improve publish-npm script --latest tag logic ([e6276e1](https://github.com/mixedbread-ai/mixedbread-ts/commit/e6276e1065586031d8c02582ee20131f36083116))
46
+ * **internal:** add pure annotations, make base APIResource abstract ([aff3299](https://github.com/mixedbread-ai/mixedbread-ts/commit/aff3299dcd6d00c739ac8c93435f43ad2fdf7368))
47
+ * **internal:** codegen related update ([a57e92b](https://github.com/mixedbread-ai/mixedbread-ts/commit/a57e92b751a5a7371e1bceca085582477832ecef))
48
+ * **internal:** fix readablestream types in node 20 ([33ce546](https://github.com/mixedbread-ai/mixedbread-ts/commit/33ce546ee0e96b8377f644577bdc1c3a161cc2c4))
49
+ * **internal:** update jest config ([212166e](https://github.com/mixedbread-ai/mixedbread-ts/commit/212166e14882f5ac23155c1a08fbac0feecdecc0))
50
+ * **mcp:** provides high-level initMcpServer function and exports known clients ([e12f795](https://github.com/mixedbread-ai/mixedbread-ts/commit/e12f7952a7afc20c85cb881485b62b6e4b55d76f))
51
+ * **mcp:** remove duplicate assignment ([12ad006](https://github.com/mixedbread-ai/mixedbread-ts/commit/12ad0064f641916d697cc9cde9905c7409b8bdec))
52
+
53
+ ## 0.6.0 (2025-05-26)
54
+
55
+ Full Changelog: [v0.5.0...v0.6.0](https://github.com/mixedbread-ai/mixedbread-ts/compare/v0.5.0...v0.6.0)
56
+
57
+ ### Features
58
+
59
+ * **api:** update via SDK Studio ([843e5c1](https://github.com/mixedbread-ai/mixedbread-ts/commit/843e5c11171870194586b31d2234f401a9e1a686))
60
+ * **api:** update via SDK Studio ([e2cb315](https://github.com/mixedbread-ai/mixedbread-ts/commit/e2cb315adc2eb59a650c870fcae961f5d8da8e1f))
61
+ * **api:** update via SDK Studio ([8a37885](https://github.com/mixedbread-ai/mixedbread-ts/commit/8a3788591792af3c897a6c819f1d8ae327640163))
62
+ * **api:** update via SDK Studio ([43f31db](https://github.com/mixedbread-ai/mixedbread-ts/commit/43f31dbe78cd8f1623b373baad2f5ebed03b7fef))
63
+ * **api:** update via SDK Studio ([1ebc730](https://github.com/mixedbread-ai/mixedbread-ts/commit/1ebc7304ce954ffd5bd46ff485228e62d5e723fc))
64
+ * **api:** update via SDK Studio ([904cb87](https://github.com/mixedbread-ai/mixedbread-ts/commit/904cb87bdef9d00d04bb5b78fcbfc9d2a2ea0322))
65
+ * **api:** update via SDK Studio ([40324a6](https://github.com/mixedbread-ai/mixedbread-ts/commit/40324a658c833c268d6a3372de525816780d3c21))
66
+ * **mcp:** support dynamically discovering and invoking tools for APIs with many endpoints ([285308d](https://github.com/mixedbread-ai/mixedbread-ts/commit/285308da19b88ba5e39d42d52c3e364a0d6d0a00))
67
+ * **mcp:** support initializing the server with an "environment" ([925075d](https://github.com/mixedbread-ai/mixedbread-ts/commit/925075d05ac63cf2e75fef791f8d6c7a11ba8cd1))
68
+
69
+
70
+ ### Bug Fixes
71
+
72
+ * **client:** always overwrite when merging headers ([9c69eb5](https://github.com/mixedbread-ai/mixedbread-ts/commit/9c69eb509fe085968f5dcbceb3dc0aad361e6c8e))
73
+ * **mcp:** explicitly include zod and zod-to-json-schema in package.json ([44952cb](https://github.com/mixedbread-ai/mixedbread-ts/commit/44952cb96fe51e8f43dc43aa07dc29d53ec2573b))
74
+ * **mcp:** fix cursor schema transformation issue with recursive references ([1a50cfe](https://github.com/mixedbread-ai/mixedbread-ts/commit/1a50cfe6b8d5fdbad923865b56e4c170b7f546da))
75
+
76
+
77
+ ### Chores
78
+
79
+ * **build:** automatically build subpackages if present ([99dcafa](https://github.com/mixedbread-ai/mixedbread-ts/commit/99dcafaaec25a90571c311b2c918ee399b4b3982))
80
+ * **docs:** grammar improvements ([b10ade0](https://github.com/mixedbread-ai/mixedbread-ts/commit/b10ade0841b0d0b884677963c18bb7300a8d149c))
81
+ * **internal:** codegen related update ([69ba23e](https://github.com/mixedbread-ai/mixedbread-ts/commit/69ba23e8fcdfec9fdc711afc72834eb4430af673))
82
+ * **internal:** codegen related update ([048457f](https://github.com/mixedbread-ai/mixedbread-ts/commit/048457f38564e35fe8ca08f5677397b12526ec62))
83
+ * **package:** remove engines ([ef7cf2c](https://github.com/mixedbread-ai/mixedbread-ts/commit/ef7cf2c85bb78773daead80ea6a51401870908b0))
84
+ * **tests:** use node 22 for CI tests ([60d63ff](https://github.com/mixedbread-ai/mixedbread-ts/commit/60d63ff560eab0bd34e2282f292fda4dba4dd17b))
85
+
3
86
  ## 0.5.0 (2025-05-07)
4
87
 
5
88
  Full Changelog: [v0.4.0...v0.5.0](https://github.com/mixedbread-ai/mixedbread-ts/compare/v0.4.0...v0.5.0)
package/README.md CHANGED
@@ -27,13 +27,9 @@ const client = new Mixedbread({
27
27
  environment: 'local', // defaults to 'production'
28
28
  });
29
29
 
30
- async function main() {
31
- const vectorStore = await client.vectorStores.create();
30
+ const vectorStore = await client.vectorStores.create();
32
31
 
33
- console.log(vectorStore.id);
34
- }
35
-
36
- main();
32
+ console.log(vectorStore.id);
37
33
  ```
38
34
 
39
35
  ### Request & Response types
@@ -49,11 +45,7 @@ const client = new Mixedbread({
49
45
  environment: 'local', // defaults to 'production'
50
46
  });
51
47
 
52
- async function main() {
53
- const vectorStore: Mixedbread.VectorStore = await client.vectorStores.create();
54
- }
55
-
56
- main();
48
+ const vectorStore: Mixedbread.VectorStore = await client.vectorStores.create();
57
49
  ```
58
50
 
59
51
  Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
@@ -95,19 +87,15 @@ a subclass of `APIError` will be thrown:
95
87
 
96
88
  <!-- prettier-ignore -->
97
89
  ```ts
98
- async function main() {
99
- const vectorStore = await client.vectorStores.create().catch(async (err) => {
100
- if (err instanceof Mixedbread.APIError) {
101
- console.log(err.status); // 400
102
- console.log(err.name); // BadRequestError
103
- console.log(err.headers); // {server: 'nginx', ...}
104
- } else {
105
- throw err;
106
- }
107
- });
108
- }
109
-
110
- main();
90
+ const vectorStore = await client.vectorStores.create().catch(async (err) => {
91
+ if (err instanceof Mixedbread.APIError) {
92
+ console.log(err.status); // 400
93
+ console.log(err.name); // BadRequestError
94
+ console.log(err.headers); // {server: 'nginx', ...}
95
+ } else {
96
+ throw err;
97
+ }
98
+ });
111
99
  ```
112
100
 
113
101
  Error codes are as follows:
@@ -23,7 +23,7 @@
23
23
  "oldParams": [
24
24
  {
25
25
  "type": "param",
26
- "key": "vector_store_id",
26
+ "key": "vector_store_identifier",
27
27
  "location": "path"
28
28
  },
29
29
  {
@@ -56,7 +56,7 @@
56
56
  "oldParams": [
57
57
  {
58
58
  "type": "param",
59
- "key": "vector_store_id",
59
+ "key": "vector_store_identifier",
60
60
  "location": "path"
61
61
  },
62
62
  {
@@ -68,6 +68,109 @@
68
68
  "type": "options"
69
69
  }
70
70
  ]
71
+ },
72
+ {
73
+ "base": "dataSources.connectors",
74
+ "name": "retrieve",
75
+ "params": [
76
+ {
77
+ "type": "param",
78
+ "key": "connector_id",
79
+ "location": "path"
80
+ },
81
+ {
82
+ "type": "params",
83
+ "maybeOverload": false
84
+ },
85
+ {
86
+ "type": "options"
87
+ }
88
+ ],
89
+ "oldParams": [
90
+ {
91
+ "type": "param",
92
+ "key": "data_source_id",
93
+ "location": "path"
94
+ },
95
+ {
96
+ "type": "param",
97
+ "key": "connector_id",
98
+ "location": "path"
99
+ },
100
+ {
101
+ "type": "options"
102
+ }
103
+ ]
104
+ },
105
+ {
106
+ "base": "dataSources.connectors",
107
+ "name": "update",
108
+ "params": [
109
+ {
110
+ "type": "param",
111
+ "key": "connector_id",
112
+ "location": "path"
113
+ },
114
+ {
115
+ "type": "params",
116
+ "maybeOverload": false
117
+ },
118
+ {
119
+ "type": "options"
120
+ }
121
+ ],
122
+ "oldParams": [
123
+ {
124
+ "type": "param",
125
+ "key": "data_source_id",
126
+ "location": "path"
127
+ },
128
+ {
129
+ "type": "param",
130
+ "key": "connector_id",
131
+ "location": "path"
132
+ },
133
+ {
134
+ "type": "params",
135
+ "maybeOverload": false
136
+ },
137
+ {
138
+ "type": "options"
139
+ }
140
+ ]
141
+ },
142
+ {
143
+ "base": "dataSources.connectors",
144
+ "name": "delete",
145
+ "params": [
146
+ {
147
+ "type": "param",
148
+ "key": "connector_id",
149
+ "location": "path"
150
+ },
151
+ {
152
+ "type": "params",
153
+ "maybeOverload": false
154
+ },
155
+ {
156
+ "type": "options"
157
+ }
158
+ ],
159
+ "oldParams": [
160
+ {
161
+ "type": "param",
162
+ "key": "data_source_id",
163
+ "location": "path"
164
+ },
165
+ {
166
+ "type": "param",
167
+ "key": "connector_id",
168
+ "location": "path"
169
+ },
170
+ {
171
+ "type": "options"
172
+ }
173
+ ]
71
174
  }
72
175
  ]
73
176
  }
package/client.d.mts CHANGED
@@ -14,11 +14,13 @@ import { APIPromise } from "./core/api-promise.mjs";
14
14
  import { type Fetch } from "./internal/builtin-types.mjs";
15
15
  import { HeadersLike, NullableHeaders } from "./internal/headers.mjs";
16
16
  import { FinalRequestOptions, RequestOptions } from "./internal/request-options.mjs";
17
- import { EmbeddingCreateParams, Embeddings } from "./resources/embeddings.mjs";
18
- import { FileCreateParams, FileDeleteResponse, FileListParams, FileObject, FileObjectsLimitOffset, FileUpdateParams, Files } from "./resources/files.mjs";
17
+ import { APIKey, APIKeyCreateParams, APIKeyCreated, APIKeyDeleteResponse, APIKeyListParams, APIKeys, APIKeysLimitOffset } from "./resources/api-keys.mjs";
18
+ import { EmbeddingCreateParams, Embeddings, EncodingFormat, ObjectType } from "./resources/embeddings.mjs";
19
+ import { FileCreateParams, FileDeleteResponse, FileListParams, FileObject, FileObjectsLimitOffset, FileUpdateParams, Files, PaginationWithTotal } from "./resources/files.mjs";
20
+ import { DataSource, DataSourceCreateParams, DataSourceDeleteResponse, DataSourceListParams, DataSourceOauth2Params, DataSourceType, DataSourceUpdateParams, DataSources, DataSourcesLimitOffset } from "./resources/data-sources/data-sources.mjs";
19
21
  import { Extractions } from "./resources/extractions/extractions.mjs";
20
22
  import { Parsing } from "./resources/parsing/parsing.mjs";
21
- import { ExpiresAfter, FileCounts, ScoredVectorStoreChunk, VectorStore, VectorStoreChunkSearchOptions, VectorStoreCreateParams, VectorStoreDeleteResponse, VectorStoreFileSearchOptions, VectorStoreListParams, VectorStoreQuestionAnsweringParams, VectorStoreQuestionAnsweringResponse, VectorStoreSearchParams, VectorStoreSearchResponse, VectorStoreUpdateParams, VectorStores, VectorStoresLimitOffset } from "./resources/vector-stores/vector-stores.mjs";
23
+ import { ExpiresAfter, ScoredAudioURLInputChunk, ScoredImageURLInputChunk, ScoredTextInputChunk, ScoredVideoURLInputChunk, VectorStore, VectorStoreChunkSearchOptions, VectorStoreCreateParams, VectorStoreDeleteResponse, VectorStoreListParams, VectorStoreQuestionAnsweringParams, VectorStoreQuestionAnsweringResponse, VectorStoreSearchParams, VectorStoreSearchResponse, VectorStoreUpdateParams, VectorStores, VectorStoresLimitOffset } from "./resources/vector-stores/vector-stores.mjs";
22
24
  declare const environments: {
23
25
  production: string;
24
26
  local: string;
@@ -136,25 +138,12 @@ export declare class Mixedbread {
136
138
  * Args: params: The parameters for creating embeddings.
137
139
  *
138
140
  * Returns: EmbeddingCreateResponse: The response containing the embeddings.
139
- *
140
- * @example
141
- * ```ts
142
- * const embeddingCreateResponse = await client.embed({
143
- * model: 'mixedbread-ai/mxbai-embed-large-v1',
144
- * input: 'x',
145
- * });
146
- * ```
147
141
  */
148
142
  embed(body: TopLevelAPI.EmbedParams, options?: RequestOptions): APIPromise<TopLevelAPI.EmbeddingCreateResponse>;
149
143
  /**
150
144
  * Returns service information, including name and version.
151
145
  *
152
146
  * Returns: InfoResponse: A response containing the service name and version.
153
- *
154
- * @example
155
- * ```ts
156
- * const response = await client.info();
157
- * ```
158
147
  */
159
148
  info(options?: RequestOptions): APIPromise<TopLevelAPI.InfoResponse>;
160
149
  /**
@@ -163,15 +152,6 @@ export declare class Mixedbread {
163
152
  * Args: params: RerankParams: The parameters for reranking.
164
153
  *
165
154
  * Returns: RerankResponse: The reranked documents for the input query.
166
- *
167
- * @example
168
- * ```ts
169
- * const response = await client.rerank({
170
- * query:
171
- * 'What are the key features of the Mixedbread embedding model?',
172
- * input: ['Document 1', 'Document 2'],
173
- * });
174
- * ```
175
155
  */
176
156
  rerank(body: TopLevelAPI.RerankParams, options?: RequestOptions): APIPromise<TopLevelAPI.RerankResponse>;
177
157
  protected defaultQuery(): Record<string, string | undefined> | undefined;
@@ -243,17 +223,21 @@ export declare class Mixedbread {
243
223
  files: API.Files;
244
224
  extractions: API.Extractions;
245
225
  embeddings: API.Embeddings;
226
+ dataSources: API.DataSources;
227
+ apiKeys: API.APIKeys;
246
228
  }
247
229
  export declare namespace Mixedbread {
248
230
  export type RequestOptions = Opts.RequestOptions;
249
231
  export import LimitOffset = Pagination.LimitOffset;
250
232
  export { type LimitOffsetParams as LimitOffsetParams, type LimitOffsetResponse as LimitOffsetResponse };
251
233
  export { type Embedding as Embedding, type EmbeddingCreateResponse as EmbeddingCreateResponse, type MultiEncodingEmbedding as MultiEncodingEmbedding, type InfoResponse as InfoResponse, type RerankResponse as RerankResponse, type EmbedParams as EmbedParams, type RerankParams as RerankParams, };
252
- export { VectorStores as VectorStores, type ExpiresAfter as ExpiresAfter, type FileCounts as FileCounts, type ScoredVectorStoreChunk as ScoredVectorStoreChunk, type VectorStore as VectorStore, type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions, type VectorStoreFileSearchOptions as VectorStoreFileSearchOptions, type VectorStoreDeleteResponse as VectorStoreDeleteResponse, type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse, type VectorStoreSearchResponse as VectorStoreSearchResponse, type VectorStoresLimitOffset as VectorStoresLimitOffset, type VectorStoreCreateParams as VectorStoreCreateParams, type VectorStoreUpdateParams as VectorStoreUpdateParams, type VectorStoreListParams as VectorStoreListParams, type VectorStoreQuestionAnsweringParams as VectorStoreQuestionAnsweringParams, type VectorStoreSearchParams as VectorStoreSearchParams, };
234
+ export { VectorStores as VectorStores, type ExpiresAfter as ExpiresAfter, type ScoredAudioURLInputChunk as ScoredAudioURLInputChunk, type ScoredImageURLInputChunk as ScoredImageURLInputChunk, type ScoredTextInputChunk as ScoredTextInputChunk, type ScoredVideoURLInputChunk as ScoredVideoURLInputChunk, type VectorStore as VectorStore, type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions, type VectorStoreDeleteResponse as VectorStoreDeleteResponse, type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse, type VectorStoreSearchResponse as VectorStoreSearchResponse, type VectorStoresLimitOffset as VectorStoresLimitOffset, type VectorStoreCreateParams as VectorStoreCreateParams, type VectorStoreUpdateParams as VectorStoreUpdateParams, type VectorStoreListParams as VectorStoreListParams, type VectorStoreQuestionAnsweringParams as VectorStoreQuestionAnsweringParams, type VectorStoreSearchParams as VectorStoreSearchParams, };
253
235
  export { Parsing as Parsing };
254
- export { Files as Files, type FileObject as FileObject, type FileDeleteResponse as FileDeleteResponse, type FileObjectsLimitOffset as FileObjectsLimitOffset, type FileCreateParams as FileCreateParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, };
236
+ export { Files as Files, type FileObject as FileObject, type PaginationWithTotal as PaginationWithTotal, type FileDeleteResponse as FileDeleteResponse, type FileObjectsLimitOffset as FileObjectsLimitOffset, type FileCreateParams as FileCreateParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, };
255
237
  export { Extractions as Extractions };
256
- export { Embeddings as Embeddings, type EmbeddingCreateParams as EmbeddingCreateParams };
238
+ export { Embeddings as Embeddings, type EncodingFormat as EncodingFormat, type ObjectType as ObjectType, type EmbeddingCreateParams as EmbeddingCreateParams, };
239
+ export { DataSources as DataSources, type DataSource as DataSource, type DataSourceOauth2Params as DataSourceOauth2Params, type DataSourceType as DataSourceType, type DataSourceDeleteResponse as DataSourceDeleteResponse, type DataSourcesLimitOffset as DataSourcesLimitOffset, type DataSourceCreateParams as DataSourceCreateParams, type DataSourceUpdateParams as DataSourceUpdateParams, type DataSourceListParams as DataSourceListParams, };
240
+ export { APIKeys as APIKeys, type APIKey as APIKey, type APIKeyCreated as APIKeyCreated, type APIKeyDeleteResponse as APIKeyDeleteResponse, type APIKeysLimitOffset as APIKeysLimitOffset, type APIKeyCreateParams as APIKeyCreateParams, type APIKeyListParams as APIKeyListParams, };
257
241
  export type SearchFilter = API.SearchFilter;
258
242
  export type SearchFilterCondition = API.SearchFilterCondition;
259
243
  export type Usage = API.Usage;
package/client.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;OAI5E,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAiB;YACxC,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAET,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAAgB,KAAK,iBAAiB,EAAE,mBAAmB,EAAE;OAC7D,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,KAAK,WAAW;OAChB,EACL,WAAW,EACX,SAAS,EACT,uBAAuB,EACvB,YAAY,EACZ,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACf;OACM,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,WAAW,EAAE,eAAe,EAAgB;OAC9C,EAAE,mBAAmB,EAAE,cAAc,EAAE;OACvC,EAAE,qBAAqB,EAAE,UAAU,EAAE;OACrC,EACL,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,EACN;OAIM,EAAE,WAAW,EAAE;OACf,EAAE,OAAO,EAAE;OACX,EACL,YAAY,EACZ,UAAU,EACV,sBAAsB,EACtB,WAAW,EACX,6BAA6B,EAC7B,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IAAI,cAAc,EACrC,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IAC5C,MAAM,MAAM,qBAAqB,GAAG,GAAG,CAAC,qBAAqB,CAAC;IAC9D,MAAM,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;CAC/B"}
package/client.d.ts CHANGED
@@ -14,11 +14,13 @@ import { APIPromise } from "./core/api-promise.js";
14
14
  import { type Fetch } from "./internal/builtin-types.js";
15
15
  import { HeadersLike, NullableHeaders } from "./internal/headers.js";
16
16
  import { FinalRequestOptions, RequestOptions } from "./internal/request-options.js";
17
- import { EmbeddingCreateParams, Embeddings } from "./resources/embeddings.js";
18
- import { FileCreateParams, FileDeleteResponse, FileListParams, FileObject, FileObjectsLimitOffset, FileUpdateParams, Files } from "./resources/files.js";
17
+ import { APIKey, APIKeyCreateParams, APIKeyCreated, APIKeyDeleteResponse, APIKeyListParams, APIKeys, APIKeysLimitOffset } from "./resources/api-keys.js";
18
+ import { EmbeddingCreateParams, Embeddings, EncodingFormat, ObjectType } from "./resources/embeddings.js";
19
+ import { FileCreateParams, FileDeleteResponse, FileListParams, FileObject, FileObjectsLimitOffset, FileUpdateParams, Files, PaginationWithTotal } from "./resources/files.js";
20
+ import { DataSource, DataSourceCreateParams, DataSourceDeleteResponse, DataSourceListParams, DataSourceOauth2Params, DataSourceType, DataSourceUpdateParams, DataSources, DataSourcesLimitOffset } from "./resources/data-sources/data-sources.js";
19
21
  import { Extractions } from "./resources/extractions/extractions.js";
20
22
  import { Parsing } from "./resources/parsing/parsing.js";
21
- import { ExpiresAfter, FileCounts, ScoredVectorStoreChunk, VectorStore, VectorStoreChunkSearchOptions, VectorStoreCreateParams, VectorStoreDeleteResponse, VectorStoreFileSearchOptions, VectorStoreListParams, VectorStoreQuestionAnsweringParams, VectorStoreQuestionAnsweringResponse, VectorStoreSearchParams, VectorStoreSearchResponse, VectorStoreUpdateParams, VectorStores, VectorStoresLimitOffset } from "./resources/vector-stores/vector-stores.js";
23
+ import { ExpiresAfter, ScoredAudioURLInputChunk, ScoredImageURLInputChunk, ScoredTextInputChunk, ScoredVideoURLInputChunk, VectorStore, VectorStoreChunkSearchOptions, VectorStoreCreateParams, VectorStoreDeleteResponse, VectorStoreListParams, VectorStoreQuestionAnsweringParams, VectorStoreQuestionAnsweringResponse, VectorStoreSearchParams, VectorStoreSearchResponse, VectorStoreUpdateParams, VectorStores, VectorStoresLimitOffset } from "./resources/vector-stores/vector-stores.js";
22
24
  declare const environments: {
23
25
  production: string;
24
26
  local: string;
@@ -136,25 +138,12 @@ export declare class Mixedbread {
136
138
  * Args: params: The parameters for creating embeddings.
137
139
  *
138
140
  * Returns: EmbeddingCreateResponse: The response containing the embeddings.
139
- *
140
- * @example
141
- * ```ts
142
- * const embeddingCreateResponse = await client.embed({
143
- * model: 'mixedbread-ai/mxbai-embed-large-v1',
144
- * input: 'x',
145
- * });
146
- * ```
147
141
  */
148
142
  embed(body: TopLevelAPI.EmbedParams, options?: RequestOptions): APIPromise<TopLevelAPI.EmbeddingCreateResponse>;
149
143
  /**
150
144
  * Returns service information, including name and version.
151
145
  *
152
146
  * Returns: InfoResponse: A response containing the service name and version.
153
- *
154
- * @example
155
- * ```ts
156
- * const response = await client.info();
157
- * ```
158
147
  */
159
148
  info(options?: RequestOptions): APIPromise<TopLevelAPI.InfoResponse>;
160
149
  /**
@@ -163,15 +152,6 @@ export declare class Mixedbread {
163
152
  * Args: params: RerankParams: The parameters for reranking.
164
153
  *
165
154
  * Returns: RerankResponse: The reranked documents for the input query.
166
- *
167
- * @example
168
- * ```ts
169
- * const response = await client.rerank({
170
- * query:
171
- * 'What are the key features of the Mixedbread embedding model?',
172
- * input: ['Document 1', 'Document 2'],
173
- * });
174
- * ```
175
155
  */
176
156
  rerank(body: TopLevelAPI.RerankParams, options?: RequestOptions): APIPromise<TopLevelAPI.RerankResponse>;
177
157
  protected defaultQuery(): Record<string, string | undefined> | undefined;
@@ -243,17 +223,21 @@ export declare class Mixedbread {
243
223
  files: API.Files;
244
224
  extractions: API.Extractions;
245
225
  embeddings: API.Embeddings;
226
+ dataSources: API.DataSources;
227
+ apiKeys: API.APIKeys;
246
228
  }
247
229
  export declare namespace Mixedbread {
248
230
  export type RequestOptions = Opts.RequestOptions;
249
231
  export import LimitOffset = Pagination.LimitOffset;
250
232
  export { type LimitOffsetParams as LimitOffsetParams, type LimitOffsetResponse as LimitOffsetResponse };
251
233
  export { type Embedding as Embedding, type EmbeddingCreateResponse as EmbeddingCreateResponse, type MultiEncodingEmbedding as MultiEncodingEmbedding, type InfoResponse as InfoResponse, type RerankResponse as RerankResponse, type EmbedParams as EmbedParams, type RerankParams as RerankParams, };
252
- export { VectorStores as VectorStores, type ExpiresAfter as ExpiresAfter, type FileCounts as FileCounts, type ScoredVectorStoreChunk as ScoredVectorStoreChunk, type VectorStore as VectorStore, type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions, type VectorStoreFileSearchOptions as VectorStoreFileSearchOptions, type VectorStoreDeleteResponse as VectorStoreDeleteResponse, type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse, type VectorStoreSearchResponse as VectorStoreSearchResponse, type VectorStoresLimitOffset as VectorStoresLimitOffset, type VectorStoreCreateParams as VectorStoreCreateParams, type VectorStoreUpdateParams as VectorStoreUpdateParams, type VectorStoreListParams as VectorStoreListParams, type VectorStoreQuestionAnsweringParams as VectorStoreQuestionAnsweringParams, type VectorStoreSearchParams as VectorStoreSearchParams, };
234
+ export { VectorStores as VectorStores, type ExpiresAfter as ExpiresAfter, type ScoredAudioURLInputChunk as ScoredAudioURLInputChunk, type ScoredImageURLInputChunk as ScoredImageURLInputChunk, type ScoredTextInputChunk as ScoredTextInputChunk, type ScoredVideoURLInputChunk as ScoredVideoURLInputChunk, type VectorStore as VectorStore, type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions, type VectorStoreDeleteResponse as VectorStoreDeleteResponse, type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse, type VectorStoreSearchResponse as VectorStoreSearchResponse, type VectorStoresLimitOffset as VectorStoresLimitOffset, type VectorStoreCreateParams as VectorStoreCreateParams, type VectorStoreUpdateParams as VectorStoreUpdateParams, type VectorStoreListParams as VectorStoreListParams, type VectorStoreQuestionAnsweringParams as VectorStoreQuestionAnsweringParams, type VectorStoreSearchParams as VectorStoreSearchParams, };
253
235
  export { Parsing as Parsing };
254
- export { Files as Files, type FileObject as FileObject, type FileDeleteResponse as FileDeleteResponse, type FileObjectsLimitOffset as FileObjectsLimitOffset, type FileCreateParams as FileCreateParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, };
236
+ export { Files as Files, type FileObject as FileObject, type PaginationWithTotal as PaginationWithTotal, type FileDeleteResponse as FileDeleteResponse, type FileObjectsLimitOffset as FileObjectsLimitOffset, type FileCreateParams as FileCreateParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, };
255
237
  export { Extractions as Extractions };
256
- export { Embeddings as Embeddings, type EmbeddingCreateParams as EmbeddingCreateParams };
238
+ export { Embeddings as Embeddings, type EncodingFormat as EncodingFormat, type ObjectType as ObjectType, type EmbeddingCreateParams as EmbeddingCreateParams, };
239
+ export { DataSources as DataSources, type DataSource as DataSource, type DataSourceOauth2Params as DataSourceOauth2Params, type DataSourceType as DataSourceType, type DataSourceDeleteResponse as DataSourceDeleteResponse, type DataSourcesLimitOffset as DataSourcesLimitOffset, type DataSourceCreateParams as DataSourceCreateParams, type DataSourceUpdateParams as DataSourceUpdateParams, type DataSourceListParams as DataSourceListParams, };
240
+ export { APIKeys as APIKeys, type APIKey as APIKey, type APIKeyCreated as APIKeyCreated, type APIKeyDeleteResponse as APIKeyDeleteResponse, type APIKeysLimitOffset as APIKeysLimitOffset, type APIKeyCreateParams as APIKeyCreateParams, type APIKeyListParams as APIKeyListParams, };
257
241
  export type SearchFilter = API.SearchFilter;
258
242
  export type SearchFilterCondition = API.SearchFilterCondition;
259
243
  export type Usage = API.Usage;
package/client.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;OAI5E,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAiB;YACxC,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAET,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAAgB,KAAK,iBAAiB,EAAE,mBAAmB,EAAE;OAC7D,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,KAAK,WAAW;OAChB,EACL,WAAW,EACX,SAAS,EACT,uBAAuB,EACvB,YAAY,EACZ,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACf;OACM,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,WAAW,EAAE,eAAe,EAAgB;OAC9C,EAAE,mBAAmB,EAAE,cAAc,EAAE;OACvC,EAAE,qBAAqB,EAAE,UAAU,EAAE;OACrC,EACL,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,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AAC;IAEF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IAC5C,MAAM,MAAM,qBAAqB,GAAG,GAAG,CAAC,qBAAqB,CAAC;IAC9D,MAAM,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;CAC/B"}
package/client.js CHANGED
@@ -19,11 +19,13 @@ const Uploads = tslib_1.__importStar(require("./core/uploads.js"));
19
19
  const API = tslib_1.__importStar(require("./resources/index.js"));
20
20
  const api_promise_1 = require("./core/api-promise.js");
21
21
  const headers_1 = require("./internal/headers.js");
22
+ const api_keys_1 = require("./resources/api-keys.js");
22
23
  const embeddings_1 = require("./resources/embeddings.js");
23
24
  const files_1 = require("./resources/files.js");
24
25
  const env_1 = require("./internal/utils/env.js");
25
26
  const log_2 = require("./internal/utils/log.js");
26
27
  const values_2 = require("./internal/utils/values.js");
28
+ const data_sources_1 = require("./resources/data-sources/data-sources.js");
27
29
  const extractions_1 = require("./resources/extractions/extractions.js");
28
30
  const parsing_1 = require("./resources/parsing/parsing.js");
29
31
  const vector_stores_1 = require("./resources/vector-stores/vector-stores.js");
@@ -55,6 +57,8 @@ class Mixedbread {
55
57
  this.files = new API.Files(this);
56
58
  this.extractions = new API.Extractions(this);
57
59
  this.embeddings = new API.Embeddings(this);
60
+ this.dataSources = new API.DataSources(this);
61
+ this.apiKeys = new API.APIKeys(this);
58
62
  if (apiKey === undefined) {
59
63
  throw new Errors.MixedbreadError("The MXBAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the Mixedbread client with an apiKey option, like new Mixedbread({ apiKey: 'My API Key' }).");
60
64
  }
@@ -108,14 +112,6 @@ class Mixedbread {
108
112
  * Args: params: The parameters for creating embeddings.
109
113
  *
110
114
  * Returns: EmbeddingCreateResponse: The response containing the embeddings.
111
- *
112
- * @example
113
- * ```ts
114
- * const embeddingCreateResponse = await client.embed({
115
- * model: 'mixedbread-ai/mxbai-embed-large-v1',
116
- * input: 'x',
117
- * });
118
- * ```
119
115
  */
120
116
  embed(body, options) {
121
117
  return this.post('/v1/embeddings', { body, ...options });
@@ -124,11 +120,6 @@ class Mixedbread {
124
120
  * Returns service information, including name and version.
125
121
  *
126
122
  * Returns: InfoResponse: A response containing the service name and version.
127
- *
128
- * @example
129
- * ```ts
130
- * const response = await client.info();
131
- * ```
132
123
  */
133
124
  info(options) {
134
125
  return this.get('/', options);
@@ -139,15 +130,6 @@ class Mixedbread {
139
130
  * Args: params: RerankParams: The parameters for reranking.
140
131
  *
141
132
  * Returns: RerankResponse: The reranked documents for the input query.
142
- *
143
- * @example
144
- * ```ts
145
- * const response = await client.rerank({
146
- * query:
147
- * 'What are the key features of the Mixedbread embedding model?',
148
- * input: ['Document 1', 'Document 2'],
149
- * });
150
- * ```
151
133
  */
152
134
  rerank(body, options) {
153
135
  return this.post('/v1/reranking', { body, ...options });
@@ -532,4 +514,6 @@ Mixedbread.Parsing = parsing_1.Parsing;
532
514
  Mixedbread.Files = files_1.Files;
533
515
  Mixedbread.Extractions = extractions_1.Extractions;
534
516
  Mixedbread.Embeddings = embeddings_1.Embeddings;
517
+ Mixedbread.DataSources = data_sources_1.DataSources;
518
+ Mixedbread.APIKeys = api_keys_1.APIKeys;
535
519
  //# sourceMappingURL=client.js.map