@mixedbread/sdk 0.1.0-alpha.8

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 (277) hide show
  1. package/CHANGELOG.md +210 -0
  2. package/LICENSE +201 -0
  3. package/README.md +360 -0
  4. package/_shims/MultipartBody.d.ts +9 -0
  5. package/_shims/MultipartBody.d.ts.map +1 -0
  6. package/_shims/MultipartBody.js +16 -0
  7. package/_shims/MultipartBody.js.map +1 -0
  8. package/_shims/MultipartBody.mjs +12 -0
  9. package/_shims/MultipartBody.mjs.map +1 -0
  10. package/_shims/README.md +46 -0
  11. package/_shims/auto/runtime-bun.d.ts +5 -0
  12. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  13. package/_shims/auto/runtime-bun.js +21 -0
  14. package/_shims/auto/runtime-bun.js.map +1 -0
  15. package/_shims/auto/runtime-bun.mjs +2 -0
  16. package/_shims/auto/runtime-bun.mjs.map +1 -0
  17. package/_shims/auto/runtime-node.d.ts +5 -0
  18. package/_shims/auto/runtime-node.d.ts.map +1 -0
  19. package/_shims/auto/runtime-node.js +21 -0
  20. package/_shims/auto/runtime-node.js.map +1 -0
  21. package/_shims/auto/runtime-node.mjs +2 -0
  22. package/_shims/auto/runtime-node.mjs.map +1 -0
  23. package/_shims/auto/runtime.d.ts +5 -0
  24. package/_shims/auto/runtime.d.ts.map +1 -0
  25. package/_shims/auto/runtime.js +21 -0
  26. package/_shims/auto/runtime.js.map +1 -0
  27. package/_shims/auto/runtime.mjs +2 -0
  28. package/_shims/auto/runtime.mjs.map +1 -0
  29. package/_shims/auto/types-node.d.ts +5 -0
  30. package/_shims/auto/types-node.d.ts.map +1 -0
  31. package/_shims/auto/types-node.js +21 -0
  32. package/_shims/auto/types-node.js.map +1 -0
  33. package/_shims/auto/types-node.mjs +2 -0
  34. package/_shims/auto/types-node.mjs.map +1 -0
  35. package/_shims/auto/types.d.ts +101 -0
  36. package/_shims/auto/types.js +3 -0
  37. package/_shims/auto/types.mjs +3 -0
  38. package/_shims/bun-runtime.d.ts +6 -0
  39. package/_shims/bun-runtime.d.ts.map +1 -0
  40. package/_shims/bun-runtime.js +14 -0
  41. package/_shims/bun-runtime.js.map +1 -0
  42. package/_shims/bun-runtime.mjs +10 -0
  43. package/_shims/bun-runtime.mjs.map +1 -0
  44. package/_shims/index.d.ts +81 -0
  45. package/_shims/index.js +13 -0
  46. package/_shims/index.mjs +7 -0
  47. package/_shims/manual-types.d.ts +12 -0
  48. package/_shims/manual-types.js +3 -0
  49. package/_shims/manual-types.mjs +3 -0
  50. package/_shims/node-runtime.d.ts +3 -0
  51. package/_shims/node-runtime.d.ts.map +1 -0
  52. package/_shims/node-runtime.js +89 -0
  53. package/_shims/node-runtime.js.map +1 -0
  54. package/_shims/node-runtime.mjs +56 -0
  55. package/_shims/node-runtime.mjs.map +1 -0
  56. package/_shims/node-types.d.ts +42 -0
  57. package/_shims/node-types.js +3 -0
  58. package/_shims/node-types.mjs +3 -0
  59. package/_shims/registry.d.ts +37 -0
  60. package/_shims/registry.d.ts.map +1 -0
  61. package/_shims/registry.js +41 -0
  62. package/_shims/registry.js.map +1 -0
  63. package/_shims/registry.mjs +37 -0
  64. package/_shims/registry.mjs.map +1 -0
  65. package/_shims/web-runtime.d.ts +5 -0
  66. package/_shims/web-runtime.d.ts.map +1 -0
  67. package/_shims/web-runtime.js +78 -0
  68. package/_shims/web-runtime.js.map +1 -0
  69. package/_shims/web-runtime.mjs +71 -0
  70. package/_shims/web-runtime.mjs.map +1 -0
  71. package/_shims/web-types.d.ts +83 -0
  72. package/_shims/web-types.js +3 -0
  73. package/_shims/web-types.mjs +3 -0
  74. package/core.d.ts +241 -0
  75. package/core.d.ts.map +1 -0
  76. package/core.js +914 -0
  77. package/core.js.map +1 -0
  78. package/core.mjs +882 -0
  79. package/core.mjs.map +1 -0
  80. package/error.d.ts +47 -0
  81. package/error.d.ts.map +1 -0
  82. package/error.js +113 -0
  83. package/error.js.map +1 -0
  84. package/error.mjs +97 -0
  85. package/error.mjs.map +1 -0
  86. package/index.d.mts +148 -0
  87. package/index.d.ts +148 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +151 -0
  90. package/index.js.map +1 -0
  91. package/index.mjs +108 -0
  92. package/index.mjs.map +1 -0
  93. package/lib/polling.d.ts +48 -0
  94. package/lib/polling.d.ts.map +1 -0
  95. package/lib/polling.js +75 -0
  96. package/lib/polling.js.map +1 -0
  97. package/lib/polling.mjs +71 -0
  98. package/lib/polling.mjs.map +1 -0
  99. package/package.json +124 -0
  100. package/pagination.d.ts +30 -0
  101. package/pagination.d.ts.map +1 -0
  102. package/pagination.js +45 -0
  103. package/pagination.js.map +1 -0
  104. package/pagination.mjs +41 -0
  105. package/pagination.mjs.map +1 -0
  106. package/resource.d.ts +6 -0
  107. package/resource.d.ts.map +1 -0
  108. package/resource.js +11 -0
  109. package/resource.js.map +1 -0
  110. package/resource.mjs +7 -0
  111. package/resource.mjs.map +1 -0
  112. package/resources/extractions/content.d.ts +35 -0
  113. package/resources/extractions/content.d.ts.map +1 -0
  114. package/resources/extractions/content.js +19 -0
  115. package/resources/extractions/content.js.map +1 -0
  116. package/resources/extractions/content.mjs +15 -0
  117. package/resources/extractions/content.mjs.map +1 -0
  118. package/resources/extractions/extractions.d.ts +18 -0
  119. package/resources/extractions/extractions.d.ts.map +1 -0
  120. package/resources/extractions/extractions.js +47 -0
  121. package/resources/extractions/extractions.js.map +1 -0
  122. package/resources/extractions/extractions.mjs +20 -0
  123. package/resources/extractions/extractions.mjs.map +1 -0
  124. package/resources/extractions/index.d.ts +5 -0
  125. package/resources/extractions/index.d.ts.map +1 -0
  126. package/resources/extractions/index.js +13 -0
  127. package/resources/extractions/index.js.map +1 -0
  128. package/resources/extractions/index.mjs +6 -0
  129. package/resources/extractions/index.mjs.map +1 -0
  130. package/resources/extractions/jobs.d.ts +44 -0
  131. package/resources/extractions/jobs.d.ts.map +1 -0
  132. package/resources/extractions/jobs.js +29 -0
  133. package/resources/extractions/jobs.js.map +1 -0
  134. package/resources/extractions/jobs.mjs +25 -0
  135. package/resources/extractions/jobs.mjs.map +1 -0
  136. package/resources/extractions/schema.d.ts +85 -0
  137. package/resources/extractions/schema.d.ts.map +1 -0
  138. package/resources/extractions/schema.js +39 -0
  139. package/resources/extractions/schema.js.map +1 -0
  140. package/resources/extractions/schema.mjs +35 -0
  141. package/resources/extractions/schema.mjs.map +1 -0
  142. package/resources/files.d.ts +125 -0
  143. package/resources/files.d.ts.map +1 -0
  144. package/resources/files.js +99 -0
  145. package/resources/files.js.map +1 -0
  146. package/resources/files.mjs +71 -0
  147. package/resources/files.mjs.map +1 -0
  148. package/resources/index.d.ts +7 -0
  149. package/resources/index.d.ts.map +1 -0
  150. package/resources/index.js +30 -0
  151. package/resources/index.js.map +1 -0
  152. package/resources/index.mjs +7 -0
  153. package/resources/index.mjs.map +1 -0
  154. package/resources/parsing/index.d.ts +3 -0
  155. package/resources/parsing/index.d.ts.map +1 -0
  156. package/resources/parsing/index.js +10 -0
  157. package/resources/parsing/index.js.map +1 -0
  158. package/resources/parsing/index.mjs +4 -0
  159. package/resources/parsing/index.mjs.map +1 -0
  160. package/resources/parsing/jobs.d.ts +278 -0
  161. package/resources/parsing/jobs.d.ts.map +1 -0
  162. package/resources/parsing/jobs.js +147 -0
  163. package/resources/parsing/jobs.js.map +1 -0
  164. package/resources/parsing/jobs.mjs +119 -0
  165. package/resources/parsing/jobs.mjs.map +1 -0
  166. package/resources/parsing/parsing.d.ts +10 -0
  167. package/resources/parsing/parsing.d.ts.map +1 -0
  168. package/resources/parsing/parsing.js +40 -0
  169. package/resources/parsing/parsing.js.map +1 -0
  170. package/resources/parsing/parsing.mjs +13 -0
  171. package/resources/parsing/parsing.mjs.map +1 -0
  172. package/resources/shared.d.ts +35 -0
  173. package/resources/shared.d.ts.map +1 -0
  174. package/resources/shared.js +4 -0
  175. package/resources/shared.js.map +1 -0
  176. package/resources/shared.mjs +3 -0
  177. package/resources/shared.mjs.map +1 -0
  178. package/resources/top-level.d.ts +11 -0
  179. package/resources/top-level.d.ts.map +1 -0
  180. package/resources/top-level.js +4 -0
  181. package/resources/top-level.js.map +1 -0
  182. package/resources/top-level.mjs +3 -0
  183. package/resources/top-level.mjs.map +1 -0
  184. package/resources/vector-stores/files.d.ts +280 -0
  185. package/resources/vector-stores/files.d.ts.map +1 -0
  186. package/resources/vector-stores/files.js +167 -0
  187. package/resources/vector-stores/files.js.map +1 -0
  188. package/resources/vector-stores/files.mjs +139 -0
  189. package/resources/vector-stores/files.mjs.map +1 -0
  190. package/resources/vector-stores/index.d.ts +3 -0
  191. package/resources/vector-stores/index.d.ts.map +1 -0
  192. package/resources/vector-stores/index.js +11 -0
  193. package/resources/vector-stores/index.js.map +1 -0
  194. package/resources/vector-stores/index.mjs +4 -0
  195. package/resources/vector-stores/index.mjs.map +1 -0
  196. package/resources/vector-stores/vector-stores.d.ts +400 -0
  197. package/resources/vector-stores/vector-stores.d.ts.map +1 -0
  198. package/resources/vector-stores/vector-stores.js +121 -0
  199. package/resources/vector-stores/vector-stores.js.map +1 -0
  200. package/resources/vector-stores/vector-stores.mjs +93 -0
  201. package/resources/vector-stores/vector-stores.mjs.map +1 -0
  202. package/shims/node.d.ts +30 -0
  203. package/shims/node.d.ts.map +1 -0
  204. package/shims/node.js +31 -0
  205. package/shims/node.js.map +1 -0
  206. package/shims/node.mjs +5 -0
  207. package/shims/node.mjs.map +1 -0
  208. package/shims/web.d.ts +26 -0
  209. package/shims/web.d.ts.map +1 -0
  210. package/shims/web.js +31 -0
  211. package/shims/web.js.map +1 -0
  212. package/shims/web.mjs +5 -0
  213. package/shims/web.mjs.map +1 -0
  214. package/src/_shims/MultipartBody.ts +9 -0
  215. package/src/_shims/README.md +46 -0
  216. package/src/_shims/auto/runtime-bun.ts +4 -0
  217. package/src/_shims/auto/runtime-node.ts +4 -0
  218. package/src/_shims/auto/runtime.ts +4 -0
  219. package/src/_shims/auto/types-node.ts +4 -0
  220. package/src/_shims/auto/types.d.ts +101 -0
  221. package/src/_shims/auto/types.js +3 -0
  222. package/src/_shims/auto/types.mjs +3 -0
  223. package/src/_shims/bun-runtime.ts +14 -0
  224. package/src/_shims/index.d.ts +81 -0
  225. package/src/_shims/index.js +13 -0
  226. package/src/_shims/index.mjs +7 -0
  227. package/src/_shims/manual-types.d.ts +12 -0
  228. package/src/_shims/manual-types.js +3 -0
  229. package/src/_shims/manual-types.mjs +3 -0
  230. package/src/_shims/node-runtime.ts +81 -0
  231. package/src/_shims/node-types.d.ts +42 -0
  232. package/src/_shims/node-types.js +3 -0
  233. package/src/_shims/node-types.mjs +3 -0
  234. package/src/_shims/registry.ts +67 -0
  235. package/src/_shims/web-runtime.ts +103 -0
  236. package/src/_shims/web-types.d.ts +83 -0
  237. package/src/_shims/web-types.js +3 -0
  238. package/src/_shims/web-types.mjs +3 -0
  239. package/src/core.ts +1208 -0
  240. package/src/error.ts +130 -0
  241. package/src/index.ts +294 -0
  242. package/src/lib/.keep +4 -0
  243. package/src/lib/polling.ts +115 -0
  244. package/src/pagination.ts +82 -0
  245. package/src/resource.ts +11 -0
  246. package/src/resources/extractions/content.ts +43 -0
  247. package/src/resources/extractions/extractions.ts +47 -0
  248. package/src/resources/extractions/index.ts +14 -0
  249. package/src/resources/extractions/jobs.ts +55 -0
  250. package/src/resources/extractions/schema.ts +111 -0
  251. package/src/resources/files.ts +181 -0
  252. package/src/resources/index.ts +32 -0
  253. package/src/resources/parsing/index.ts +12 -0
  254. package/src/resources/parsing/jobs.ts +438 -0
  255. package/src/resources/parsing/parsing.ts +32 -0
  256. package/src/resources/shared.ts +41 -0
  257. package/src/resources/top-level.ts +14 -0
  258. package/src/resources/vector-stores/files.ts +434 -0
  259. package/src/resources/vector-stores/index.ts +30 -0
  260. package/src/resources/vector-stores/vector-stores.ts +561 -0
  261. package/src/shims/node.ts +50 -0
  262. package/src/shims/web.ts +50 -0
  263. package/src/tsconfig.json +11 -0
  264. package/src/uploads.ts +255 -0
  265. package/src/version.ts +1 -0
  266. package/uploads.d.ts +75 -0
  267. package/uploads.d.ts.map +1 -0
  268. package/uploads.js +171 -0
  269. package/uploads.js.map +1 -0
  270. package/uploads.mjs +158 -0
  271. package/uploads.mjs.map +1 -0
  272. package/version.d.ts +2 -0
  273. package/version.d.ts.map +1 -0
  274. package/version.js +5 -0
  275. package/version.js.map +1 -0
  276. package/version.mjs +2 -0
  277. package/version.mjs.map +1 -0
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Represents a filter with AND, OR, and NOT conditions.
3
+ */
4
+ export interface SearchFilter {
5
+ /**
6
+ * List of conditions or filters to be ANDed together
7
+ */
8
+ all?: Array<SearchFilter | SearchFilterCondition> | null;
9
+ /**
10
+ * List of conditions or filters to be ORed together
11
+ */
12
+ any?: Array<SearchFilter | SearchFilterCondition> | null;
13
+ /**
14
+ * List of conditions or filters to be NOTed
15
+ */
16
+ none?: Array<SearchFilter | SearchFilterCondition> | null;
17
+ }
18
+ /**
19
+ * Represents a condition with a field, operator, and value.
20
+ */
21
+ export interface SearchFilterCondition {
22
+ /**
23
+ * The field to apply the condition on
24
+ */
25
+ key: string;
26
+ /**
27
+ * The value to compare against
28
+ */
29
+ value: unknown;
30
+ /**
31
+ * The operator for the condition
32
+ */
33
+ operator: 'eq' | 'not_eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'not_in' | 'like' | 'not_like';
34
+ }
35
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,qBAAqB,CAAC,GAAG,IAAI,CAAC;IAEzD;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,qBAAqB,CAAC,GAAG,IAAI,CAAC;IAEzD;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,qBAAqB,CAAC,GAAG,IAAI,CAAC;CAC3D;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE,IAAI,GAAG,QAAQ,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;CACjG"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":";AAAA,sFAAsF"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export {};
3
+ //# sourceMappingURL=shared.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.mjs","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Info Pydantic Response Service Message
3
+ */
4
+ export interface InfoResponse {
5
+ name: string;
6
+ version: string;
7
+ }
8
+ export declare namespace TopLevel {
9
+ export { type InfoResponse as InfoResponse };
10
+ }
11
+ //# sourceMappingURL=top-level.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top-level.d.ts","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,YAAY,IAAI,YAAY,EAAE,CAAC;CAC9C"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=top-level.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top-level.js","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":";AAAA,sFAAsF"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export {};
3
+ //# sourceMappingURL=top-level.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top-level.mjs","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -0,0 +1,280 @@
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
+ import * as Shared from "../shared.js";
4
+ import * as VectorStoresAPI from "./vector-stores.js";
5
+ import { LimitOffset, type LimitOffsetParams } from "../../pagination.js";
6
+ import { Uploadable } from "../../uploads.js";
7
+ export declare class Files extends APIResource {
8
+ /**
9
+ * Upload a new file to a vector store for indexing.
10
+ *
11
+ * Args: vector_store_id: The ID of the vector store to upload to file: The file to
12
+ * upload and index
13
+ *
14
+ * Returns: VectorStoreFile: Details of the uploaded and indexed file
15
+ */
16
+ create(vectorStoreId: string, body: FileCreateParams, options?: Core.RequestOptions): Core.APIPromise<VectorStoreFile>;
17
+ /**
18
+ * Get details of a specific file in a vector store.
19
+ *
20
+ * Args: vector_store_id: The ID of the vector store file_id: The ID of the file
21
+ *
22
+ * Returns: VectorStoreFile: Details of the vector store file
23
+ */
24
+ retrieve(vectorStoreId: string, fileId: string, options?: Core.RequestOptions): Core.APIPromise<VectorStoreFile>;
25
+ /**
26
+ * List files indexed in a vector store with pagination.
27
+ *
28
+ * Args: vector_store_id: The ID of the vector store pagination: Pagination
29
+ * parameters
30
+ *
31
+ * Returns: VectorStoreFileListResponse: Paginated list of vector store files
32
+ */
33
+ list(vectorStoreId: string, query?: FileListParams, options?: Core.RequestOptions): Core.PagePromise<VectorStoreFilesLimitOffset, VectorStoreFile>;
34
+ list(vectorStoreId: string, options?: Core.RequestOptions): Core.PagePromise<VectorStoreFilesLimitOffset, VectorStoreFile>;
35
+ /**
36
+ * Delete a file from a vector store.
37
+ *
38
+ * Args: vector_store_id: The ID of the vector store file_id: The ID of the file to
39
+ * delete
40
+ *
41
+ * Returns: VectorStoreFileDeleted: The deleted file
42
+ */
43
+ delete(vectorStoreId: string, fileId: string, options?: Core.RequestOptions): Core.APIPromise<FileDeleteResponse>;
44
+ /**
45
+ * Perform semantic search across complete vector store files.
46
+ *
47
+ * This endpoint searches through vector store files using semantic similarity
48
+ * matching. Unlike chunk search, it returns complete matching files rather than
49
+ * individual chunks. Supports complex search queries with filters and returns
50
+ * relevance-scored results.
51
+ *
52
+ * Args: search_params: Search configuration including: - query text or
53
+ * embeddings - metadata filters - pagination parameters - sorting preferences
54
+ * \_state: API state dependency \_ctx: Service context dependency
55
+ *
56
+ * Returns: VectorStoreSearchFileResponse containing: - List of matched files with
57
+ * relevance scores - Pagination details including total result count
58
+ *
59
+ * Raises: HTTPException (400): If search parameters are invalid HTTPException
60
+ * (404): If no vector stores are found to search
61
+ */
62
+ search(body: FileSearchParams, options?: Core.RequestOptions): Core.APIPromise<FileSearchResponse>;
63
+ /**
64
+ * Poll for a file's processing status until it reaches a terminal state.
65
+ *
66
+ * @param vectorStoreId - The ID of the vector store
67
+ * @param fileId - The ID of the file to poll
68
+ * @param pollIntervalMs - The interval between polls in milliseconds (default: 500)
69
+ * @param pollTimeoutMs - The maximum time to poll for in milliseconds (default: no timeout)
70
+ * @param options - Additional request options
71
+ * @returns The file object once it reaches a terminal state
72
+ */
73
+ poll(vectorStoreId: string, fileId: string, pollIntervalMs?: number, pollTimeoutMs?: number, options?: Core.RequestOptions): Promise<VectorStoreFile>;
74
+ /**
75
+ * Create a file in a vector store and wait for it to be processed.
76
+ *
77
+ * @param vectorStoreId - The ID of the vector store to upload to
78
+ * @param body - The file creation parameters
79
+ * @param pollIntervalMs - The interval between polls in milliseconds (default: 500)
80
+ * @param pollTimeoutMs - The maximum time to poll for in milliseconds (default: no timeout)
81
+ * @param options - Additional request options
82
+ * @returns The file object once it reaches a terminal state
83
+ */
84
+ createAndPoll(vectorStoreId: string, body: FileCreateParams, pollIntervalMs?: number, pollTimeoutMs?: number, options?: Core.RequestOptions): Promise<VectorStoreFile>;
85
+ /**
86
+ * Upload a file to the files API and then create a file in a vector store.
87
+ * Note the file will be asynchronously processed.
88
+ *
89
+ * @param vectorStoreId - The ID of the vector store to add the file to
90
+ * @param file - The file to upload
91
+ * @param body - Additional parameters for the vector store file
92
+ * @param options - Additional request options
93
+ * @returns The created vector store file
94
+ */
95
+ upload(vectorStoreId: string, file: Uploadable, body?: Omit<FileCreateParams, 'file_id'>, options?: Core.RequestOptions): Promise<VectorStoreFile>;
96
+ /**
97
+ * Upload a file to files API, create a file in a vector store, and poll until processing is complete.
98
+ *
99
+ * @param vectorStoreId - The ID of the vector store to add the file to
100
+ * @param file - The file to upload
101
+ * @param body - Additional parameters for the vector store file
102
+ * @param pollIntervalMs - The interval between polls in milliseconds (default: 500)
103
+ * @param pollTimeoutMs - The maximum time to poll for in milliseconds (default: no timeout)
104
+ * @param options - Additional request options
105
+ * @returns The vector store file object once it reaches a terminal state
106
+ */
107
+ uploadAndPoll(vectorStoreId: string, file: Uploadable, body?: Omit<FileCreateParams, 'file_id'>, pollIntervalMs?: number, pollTimeoutMs?: number, options?: Core.RequestOptions): Promise<VectorStoreFile>;
108
+ }
109
+ export declare class VectorStoreFilesLimitOffset extends LimitOffset<VectorStoreFile> {
110
+ }
111
+ /**
112
+ * Represents a scored file stored in a vector store.
113
+ */
114
+ export interface ScoredVectorStoreFile {
115
+ /**
116
+ * Unique identifier for the file
117
+ */
118
+ id: string;
119
+ /**
120
+ * Optional file metadata
121
+ */
122
+ metadata?: unknown;
123
+ /**
124
+ * Processing status of the file
125
+ */
126
+ status?: string;
127
+ /**
128
+ * Last error message if processing failed
129
+ */
130
+ last_error?: unknown;
131
+ /**
132
+ * ID of the containing vector store
133
+ */
134
+ vector_store_id: string;
135
+ /**
136
+ * Timestamp of vector store file creation
137
+ */
138
+ created_at: string;
139
+ /**
140
+ * Version number of the file
141
+ */
142
+ version?: number | null;
143
+ /**
144
+ * Storage usage in bytes
145
+ */
146
+ usage_bytes?: number | null;
147
+ /**
148
+ * Type of the object
149
+ */
150
+ object?: 'vector_store.file';
151
+ /**
152
+ * score of the file
153
+ */
154
+ score: number;
155
+ /**
156
+ * chunks
157
+ */
158
+ chunks: Array<VectorStoresAPI.ScoredVectorStoreChunk>;
159
+ }
160
+ /**
161
+ * Represents a file stored in a vector store.
162
+ */
163
+ export interface VectorStoreFile {
164
+ /**
165
+ * Unique identifier for the file
166
+ */
167
+ id: string;
168
+ /**
169
+ * Optional file metadata
170
+ */
171
+ metadata?: unknown;
172
+ /**
173
+ * Processing status of the file
174
+ */
175
+ status?: string;
176
+ /**
177
+ * Last error message if processing failed
178
+ */
179
+ last_error?: unknown;
180
+ /**
181
+ * ID of the containing vector store
182
+ */
183
+ vector_store_id: string;
184
+ /**
185
+ * Timestamp of vector store file creation
186
+ */
187
+ created_at: string;
188
+ /**
189
+ * Version number of the file
190
+ */
191
+ version?: number | null;
192
+ /**
193
+ * Storage usage in bytes
194
+ */
195
+ usage_bytes?: number | null;
196
+ /**
197
+ * Type of the object
198
+ */
199
+ object?: 'vector_store.file';
200
+ }
201
+ /**
202
+ * Response model for file deletion.
203
+ */
204
+ export interface FileDeleteResponse {
205
+ /**
206
+ * ID of the deleted file
207
+ */
208
+ id: string;
209
+ /**
210
+ * Whether the deletion was successful
211
+ */
212
+ deleted?: boolean;
213
+ /**
214
+ * Type of the deleted object
215
+ */
216
+ object?: 'vector_store.file';
217
+ }
218
+ export interface FileSearchResponse {
219
+ /**
220
+ * The object type of the response
221
+ */
222
+ object?: 'list';
223
+ /**
224
+ * The list of scored vector store files
225
+ */
226
+ data: Array<ScoredVectorStoreFile>;
227
+ }
228
+ export interface FileCreateParams {
229
+ /**
230
+ * ID of the file to add
231
+ */
232
+ file_id: string;
233
+ /**
234
+ * Optional metadata for the file
235
+ */
236
+ metadata?: unknown;
237
+ /**
238
+ * Strategy for adding the file
239
+ */
240
+ experimental?: FileCreateParams.Experimental;
241
+ }
242
+ export declare namespace FileCreateParams {
243
+ /**
244
+ * Strategy for adding the file
245
+ */
246
+ interface Experimental {
247
+ /**
248
+ * Strategy for adding the file
249
+ */
250
+ parsing_strategy?: 'fast' | 'high_quality';
251
+ }
252
+ }
253
+ export interface FileListParams extends LimitOffsetParams {
254
+ }
255
+ export interface FileSearchParams {
256
+ /**
257
+ * Search query text
258
+ */
259
+ query: string;
260
+ /**
261
+ * IDs of vector stores to search
262
+ */
263
+ vector_store_ids: Array<string>;
264
+ /**
265
+ * Number of results to return
266
+ */
267
+ top_k?: number;
268
+ /**
269
+ * Optional filter conditions
270
+ */
271
+ filters?: Shared.SearchFilter | Shared.SearchFilterCondition | Array<Shared.SearchFilter | Shared.SearchFilterCondition> | null;
272
+ /**
273
+ * Search configuration options
274
+ */
275
+ search_options?: VectorStoresAPI.VectorStoreSearchOptions;
276
+ }
277
+ export declare namespace Files {
278
+ export { type ScoredVectorStoreFile as ScoredVectorStoreFile, type VectorStoreFile as VectorStoreFile, type FileDeleteResponse as FileDeleteResponse, type FileSearchResponse as FileSearchResponse, VectorStoreFilesLimitOffset as VectorStoreFilesLimitOffset, type FileCreateParams as FileCreateParams, type FileListParams as FileListParams, type FileSearchParams as FileSearchParams, };
279
+ }
280
+ //# sourceMappingURL=files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/resources/vector-stores/files.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB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AgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC,YAAY,CAAC;CAC9C;AAED,yBAAiB,gBAAgB,CAAC;IAChC;;OAEG;IACH,UAAiB,YAAY;QAC3B;;WAEG;QACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;KAC5C;CACF;AAED,MAAM,WAAW,cAAe,SAAQ,iBAAiB;CAAG;AAE5D,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEhC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EACJ,MAAM,CAAC,YAAY,GACnB,MAAM,CAAC,qBAAqB,GAC5B,KAAK,CAAC,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC,qBAAqB,CAAC,GACzD,IAAI,CAAC;IAET;;OAEG;IACH,cAAc,CAAC,EAAE,eAAe,CAAC,wBAAwB,CAAC;CAC3D;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,2BAA2B,IAAI,2BAA2B,EAC1D,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
@@ -0,0 +1,167 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || function (mod) {
20
+ if (mod && mod.__esModule) return mod;
21
+ var result = {};
22
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
+ __setModuleDefault(result, mod);
24
+ return result;
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.VectorStoreFilesLimitOffset = exports.Files = void 0;
28
+ const resource_1 = require("../../resource.js");
29
+ const core_1 = require("../../core.js");
30
+ const pagination_1 = require("../../pagination.js");
31
+ const polling = __importStar(require("../../lib/polling.js"));
32
+ class Files extends resource_1.APIResource {
33
+ /**
34
+ * Upload a new file to a vector store for indexing.
35
+ *
36
+ * Args: vector_store_id: The ID of the vector store to upload to file: The file to
37
+ * upload and index
38
+ *
39
+ * Returns: VectorStoreFile: Details of the uploaded and indexed file
40
+ */
41
+ create(vectorStoreId, body, options) {
42
+ return this._client.post(`/v1/vector_stores/${vectorStoreId}/files`, { body, ...options });
43
+ }
44
+ /**
45
+ * Get details of a specific file in a vector store.
46
+ *
47
+ * Args: vector_store_id: The ID of the vector store file_id: The ID of the file
48
+ *
49
+ * Returns: VectorStoreFile: Details of the vector store file
50
+ */
51
+ retrieve(vectorStoreId, fileId, options) {
52
+ return this._client.get(`/v1/vector_stores/${vectorStoreId}/files/${fileId}`, options);
53
+ }
54
+ list(vectorStoreId, query = {}, options) {
55
+ if ((0, core_1.isRequestOptions)(query)) {
56
+ return this.list(vectorStoreId, {}, query);
57
+ }
58
+ return this._client.getAPIList(`/v1/vector_stores/${vectorStoreId}/files`, VectorStoreFilesLimitOffset, {
59
+ query,
60
+ ...options,
61
+ });
62
+ }
63
+ /**
64
+ * Delete a file from a vector store.
65
+ *
66
+ * Args: vector_store_id: The ID of the vector store file_id: The ID of the file to
67
+ * delete
68
+ *
69
+ * Returns: VectorStoreFileDeleted: The deleted file
70
+ */
71
+ delete(vectorStoreId, fileId, options) {
72
+ return this._client.delete(`/v1/vector_stores/${vectorStoreId}/files/${fileId}`, options);
73
+ }
74
+ /**
75
+ * Perform semantic search across complete vector store files.
76
+ *
77
+ * This endpoint searches through vector store files using semantic similarity
78
+ * matching. Unlike chunk search, it returns complete matching files rather than
79
+ * individual chunks. Supports complex search queries with filters and returns
80
+ * relevance-scored results.
81
+ *
82
+ * Args: search_params: Search configuration including: - query text or
83
+ * embeddings - metadata filters - pagination parameters - sorting preferences
84
+ * \_state: API state dependency \_ctx: Service context dependency
85
+ *
86
+ * Returns: VectorStoreSearchFileResponse containing: - List of matched files with
87
+ * relevance scores - Pagination details including total result count
88
+ *
89
+ * Raises: HTTPException (400): If search parameters are invalid HTTPException
90
+ * (404): If no vector stores are found to search
91
+ */
92
+ search(body, options) {
93
+ return this._client.post('/v1/vector_stores/files/search', { body, ...options });
94
+ }
95
+ /**
96
+ * Poll for a file's processing status until it reaches a terminal state.
97
+ *
98
+ * @param vectorStoreId - The ID of the vector store
99
+ * @param fileId - The ID of the file to poll
100
+ * @param pollIntervalMs - The interval between polls in milliseconds (default: 500)
101
+ * @param pollTimeoutMs - The maximum time to poll for in milliseconds (default: no timeout)
102
+ * @param options - Additional request options
103
+ * @returns The file object once it reaches a terminal state
104
+ */
105
+ async poll(vectorStoreId, fileId, pollIntervalMs, pollTimeoutMs, options) {
106
+ const pollingIntervalMs = pollIntervalMs || 500;
107
+ const pollingTimeoutMs = pollTimeoutMs;
108
+ return polling.poll({
109
+ fn: () => this.retrieve(vectorStoreId, fileId, options),
110
+ condition: (result) => result.status === 'completed' || result.status === 'failed' || result.status === 'error',
111
+ intervalSeconds: pollingIntervalMs / 1000,
112
+ ...(pollingTimeoutMs && { timeoutSeconds: pollingTimeoutMs / 1000 }),
113
+ });
114
+ }
115
+ /**
116
+ * Create a file in a vector store and wait for it to be processed.
117
+ *
118
+ * @param vectorStoreId - The ID of the vector store to upload to
119
+ * @param body - The file creation parameters
120
+ * @param pollIntervalMs - The interval between polls in milliseconds (default: 500)
121
+ * @param pollTimeoutMs - The maximum time to poll for in milliseconds (default: no timeout)
122
+ * @param options - Additional request options
123
+ * @returns The file object once it reaches a terminal state
124
+ */
125
+ async createAndPoll(vectorStoreId, body, pollIntervalMs, pollTimeoutMs, options) {
126
+ const file = await this.create(vectorStoreId, body, options);
127
+ return this.poll(vectorStoreId, file.id, pollIntervalMs, pollTimeoutMs, options);
128
+ }
129
+ /**
130
+ * Upload a file to the files API and then create a file in a vector store.
131
+ * Note the file will be asynchronously processed.
132
+ *
133
+ * @param vectorStoreId - The ID of the vector store to add the file to
134
+ * @param file - The file to upload
135
+ * @param body - Additional parameters for the vector store file
136
+ * @param options - Additional request options
137
+ * @returns The created vector store file
138
+ */
139
+ async upload(vectorStoreId, file, body, options) {
140
+ const fileUploadResponse = await this._client.files.create({ file }, options);
141
+ return this.create(vectorStoreId, {
142
+ file_id: fileUploadResponse.id,
143
+ ...body,
144
+ }, options);
145
+ }
146
+ /**
147
+ * Upload a file to files API, create a file in a vector store, and poll until processing is complete.
148
+ *
149
+ * @param vectorStoreId - The ID of the vector store to add the file to
150
+ * @param file - The file to upload
151
+ * @param body - Additional parameters for the vector store file
152
+ * @param pollIntervalMs - The interval between polls in milliseconds (default: 500)
153
+ * @param pollTimeoutMs - The maximum time to poll for in milliseconds (default: no timeout)
154
+ * @param options - Additional request options
155
+ * @returns The vector store file object once it reaches a terminal state
156
+ */
157
+ async uploadAndPoll(vectorStoreId, file, body, pollIntervalMs, pollTimeoutMs, options) {
158
+ const vectorStoreFile = await this.upload(vectorStoreId, file, body, options);
159
+ return this.poll(vectorStoreId, vectorStoreFile.id, pollIntervalMs, pollTimeoutMs, options);
160
+ }
161
+ }
162
+ exports.Files = Files;
163
+ class VectorStoreFilesLimitOffset extends pagination_1.LimitOffset {
164
+ }
165
+ exports.VectorStoreFilesLimitOffset = VectorStoreFilesLimitOffset;
166
+ Files.VectorStoreFilesLimitOffset = VectorStoreFilesLimitOffset;
167
+ //# sourceMappingURL=files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/resources/vector-stores/files.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAI9C,oDAAuE;AACvE,8DAA6C;AAG7C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;OAOG;IACH,MAAM,CACJ,aAAqB,EACrB,IAAsB,EACtB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,aAAa,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CACN,aAAqB,EACrB,MAAc,EACd,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,aAAa,UAAU,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;IAmBD,IAAI,CACF,aAAqB,EACrB,QAA8C,EAAE,EAChD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SAC5C;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UA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