@mixedbread/sdk 0.6.0 → 0.8.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.
- package/CHANGELOG.md +63 -0
- package/README.md +12 -24
- package/bin/migration-config.json +2 -2
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js +2 -2
- package/client.js.map +1 -1
- package/client.mjs +2 -2
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/resource.d.mts +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/internal/detect-platform.js +3 -3
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +3 -3
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +4 -4
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +4 -4
- package/internal/headers.mjs.map +1 -1
- package/internal/shim-types.d.mts +11 -22
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +11 -22
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +2 -2
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +2 -2
- package/internal/shims.d.ts.map +1 -1
- package/internal/uploads.js +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/log.js +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/values.d.mts +2 -0
- package/internal/utils/values.d.mts.map +1 -1
- package/internal/utils/values.d.ts +2 -0
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js +4 -1
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +2 -0
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +1 -4
- package/resources/data-sources/connectors.d.mts +14 -4
- package/resources/data-sources/connectors.d.mts.map +1 -1
- package/resources/data-sources/connectors.d.ts +14 -4
- package/resources/data-sources/connectors.d.ts.map +1 -1
- package/resources/data-sources/data-sources.d.mts +172 -35
- package/resources/data-sources/data-sources.d.mts.map +1 -1
- package/resources/data-sources/data-sources.d.ts +172 -35
- package/resources/data-sources/data-sources.d.ts.map +1 -1
- package/resources/data-sources/data-sources.js.map +1 -1
- package/resources/data-sources/data-sources.mjs.map +1 -1
- package/resources/data-sources/index.d.mts +1 -1
- package/resources/data-sources/index.d.mts.map +1 -1
- package/resources/data-sources/index.d.ts +1 -1
- package/resources/data-sources/index.d.ts.map +1 -1
- package/resources/data-sources/index.js.map +1 -1
- package/resources/data-sources/index.mjs.map +1 -1
- package/resources/extractions/content.d.mts +4 -0
- package/resources/extractions/content.d.mts.map +1 -1
- package/resources/extractions/content.d.ts +4 -0
- package/resources/extractions/content.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/vector-stores/files.d.mts +59 -26
- package/resources/vector-stores/files.d.mts.map +1 -1
- package/resources/vector-stores/files.d.ts +59 -26
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js +32 -31
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/files.mjs +32 -31
- package/resources/vector-stores/files.mjs.map +1 -1
- package/resources/vector-stores/index.d.mts +1 -1
- package/resources/vector-stores/index.d.mts.map +1 -1
- package/resources/vector-stores/index.d.ts +1 -1
- package/resources/vector-stores/index.d.ts.map +1 -1
- package/resources/vector-stores/index.js.map +1 -1
- package/resources/vector-stores/index.mjs.map +1 -1
- package/resources/vector-stores/vector-stores.d.mts +53 -18
- package/resources/vector-stores/vector-stores.d.mts.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +53 -18
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js +18 -15
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs +18 -15
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/src/client.ts +10 -4
- package/src/core/pagination.ts +1 -1
- package/src/core/resource.ts +1 -1
- package/src/internal/detect-platform.ts +3 -3
- package/src/internal/headers.ts +5 -5
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +2 -2
- package/src/internal/uploads.ts +2 -2
- package/src/internal/utils/log.ts +1 -1
- package/src/internal/utils/path.ts +1 -1
- package/src/internal/utils/values.ts +3 -0
- package/src/resources/data-sources/connectors.ts +14 -4
- package/src/resources/data-sources/data-sources.ts +207 -37
- package/src/resources/data-sources/index.ts +3 -0
- package/src/resources/extractions/content.ts +5 -0
- package/src/resources/index.ts +3 -0
- package/src/resources/vector-stores/files.ts +81 -39
- package/src/resources/vector-stores/index.ts +2 -0
- package/src/resources/vector-stores/vector-stores.ts +67 -20
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/src/internal/shim-types.d.ts +0 -28
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vector-stores.d.ts","sourceRoot":"","sources":["../../src/resources/vector-stores/vector-stores.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,QAAQ;OACb,EACL,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,qBAAqB,EACrB,eAAe,EACf,2BAA2B,EAC5B;OACM,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,WAAW,EAAE;OACpD,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAIxF;;;;;;OAMG;IACH,QAAQ,CAAC,
|
1
|
+
{"version":3,"file":"vector-stores.d.ts","sourceRoot":"","sources":["../../src/resources/vector-stores/vector-stores.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,QAAQ;OACb,EACL,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,2BAA2B,EAC5B;OACM,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,WAAW,EAAE;OACpD,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAA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,YAAY,IAAI,YAAY,EACjC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
@@ -25,31 +25,32 @@ class VectorStores extends resource_1.APIResource {
|
|
25
25
|
return this._client.post('/v1/vector_stores', { body, ...options });
|
26
26
|
}
|
27
27
|
/**
|
28
|
-
* Get a vector store by ID.
|
28
|
+
* Get a vector store by ID or name.
|
29
29
|
*
|
30
|
-
* Args:
|
30
|
+
* Args: vector_store_identifier: The ID or name of the vector store to retrieve.
|
31
31
|
*
|
32
32
|
* Returns: VectorStore: The response containing the vector store details.
|
33
33
|
*/
|
34
|
-
retrieve(
|
35
|
-
return this._client.get((0, path_1.path) `/v1/vector_stores/${
|
34
|
+
retrieve(vectorStoreIdentifier, options) {
|
35
|
+
return this._client.get((0, path_1.path) `/v1/vector_stores/${vectorStoreIdentifier}`, options);
|
36
36
|
}
|
37
37
|
/**
|
38
|
-
* Update a vector store by ID.
|
38
|
+
* Update a vector store by ID or name.
|
39
39
|
*
|
40
|
-
* Args:
|
40
|
+
* Args: vector_store_identifier: The ID or name of the vector store to update.
|
41
41
|
* vector_store_update: VectorStoreCreate object containing the name, description,
|
42
42
|
* and metadata.
|
43
43
|
*
|
44
44
|
* Returns: VectorStore: The response containing the updated vector store details.
|
45
45
|
*/
|
46
|
-
update(
|
47
|
-
return this._client.put((0, path_1.path) `/v1/vector_stores/${
|
46
|
+
update(vectorStoreIdentifier, body, options) {
|
47
|
+
return this._client.put((0, path_1.path) `/v1/vector_stores/${vectorStoreIdentifier}`, { body, ...options });
|
48
48
|
}
|
49
49
|
/**
|
50
|
-
* List all vector stores.
|
50
|
+
* List all vector stores with optional search.
|
51
51
|
*
|
52
|
-
* Args: pagination: The pagination options.
|
52
|
+
* Args: pagination: The pagination options. q: Optional search query to filter
|
53
|
+
* vector stores.
|
53
54
|
*
|
54
55
|
* Returns: VectorStoreListResponse: The list of vector stores.
|
55
56
|
*/
|
@@ -57,14 +58,14 @@ class VectorStores extends resource_1.APIResource {
|
|
57
58
|
return this._client.getAPIList('/v1/vector_stores', (pagination_1.LimitOffset), { query, ...options });
|
58
59
|
}
|
59
60
|
/**
|
60
|
-
* Delete a vector store by ID.
|
61
|
+
* Delete a vector store by ID or name.
|
61
62
|
*
|
62
|
-
* Args:
|
63
|
+
* Args: vector_store_identifier: The ID or name of the vector store to delete.
|
63
64
|
*
|
64
65
|
* Returns: VectorStore: The response containing the deleted vector store details.
|
65
66
|
*/
|
66
|
-
delete(
|
67
|
-
return this._client.delete((0, path_1.path) `/v1/vector_stores/${
|
67
|
+
delete(vectorStoreIdentifier, options) {
|
68
|
+
return this._client.delete((0, path_1.path) `/v1/vector_stores/${vectorStoreIdentifier}`, options);
|
68
69
|
}
|
69
70
|
/**
|
70
71
|
* Question answering
|
@@ -80,7 +81,9 @@ class VectorStores extends resource_1.APIResource {
|
|
80
81
|
* relevance-scored results.
|
81
82
|
*
|
82
83
|
* Args: search_params: Search configuration including: - query text or
|
83
|
-
* embeddings -
|
84
|
+
* embeddings - vector_store_ids: List of vector stores to search - file_ids:
|
85
|
+
* Optional list of file IDs to filter chunks by (or tuple of list and condition
|
86
|
+
* operator) - metadata filters - pagination parameters - sorting preferences
|
84
87
|
* \_state: API state dependency \_ctx: Service context dependency
|
85
88
|
*
|
86
89
|
* Returns: VectorStoreSearchChunkResponse containing: - List of matched chunks
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vector-stores.js","sourceRoot":"","sources":["../../src/resources/vector-stores/vector-stores.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,6DAAoC;AACpC,
|
1
|
+
{"version":3,"file":"vector-stores.js","sourceRoot":"","sources":["../../src/resources/vector-stores/vector-stores.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,6DAAoC;AACpC,sCAciB;AAEjB,yDAAyF;AAEzF,uDAAiD;AAEjD,MAAa,YAAa,SAAQ,sBAAW;IAA7C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoG3D,CAAC;IAlGC;;;;;;;OAOG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,qBAA6B,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,qBAAqB,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CACJ,qBAA6B,EAC7B,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,qBAAqB,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAA,wBAAwB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,qBAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,qBAAqB,qBAAqB,EAAE,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;IAED;;OAEG;IACH,iBAAiB,CACf,IAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sCAAsC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AArGD,oCAqGC;AAuoBD,YAAY,CAAC,KAAK,GAAG,aAAK,CAAC"}
|
@@ -21,31 +21,32 @@ export class VectorStores extends APIResource {
|
|
21
21
|
return this._client.post('/v1/vector_stores', { body, ...options });
|
22
22
|
}
|
23
23
|
/**
|
24
|
-
* Get a vector store by ID.
|
24
|
+
* Get a vector store by ID or name.
|
25
25
|
*
|
26
|
-
* Args:
|
26
|
+
* Args: vector_store_identifier: The ID or name of the vector store to retrieve.
|
27
27
|
*
|
28
28
|
* Returns: VectorStore: The response containing the vector store details.
|
29
29
|
*/
|
30
|
-
retrieve(
|
31
|
-
return this._client.get(path `/v1/vector_stores/${
|
30
|
+
retrieve(vectorStoreIdentifier, options) {
|
31
|
+
return this._client.get(path `/v1/vector_stores/${vectorStoreIdentifier}`, options);
|
32
32
|
}
|
33
33
|
/**
|
34
|
-
* Update a vector store by ID.
|
34
|
+
* Update a vector store by ID or name.
|
35
35
|
*
|
36
|
-
* Args:
|
36
|
+
* Args: vector_store_identifier: The ID or name of the vector store to update.
|
37
37
|
* vector_store_update: VectorStoreCreate object containing the name, description,
|
38
38
|
* and metadata.
|
39
39
|
*
|
40
40
|
* Returns: VectorStore: The response containing the updated vector store details.
|
41
41
|
*/
|
42
|
-
update(
|
43
|
-
return this._client.put(path `/v1/vector_stores/${
|
42
|
+
update(vectorStoreIdentifier, body, options) {
|
43
|
+
return this._client.put(path `/v1/vector_stores/${vectorStoreIdentifier}`, { body, ...options });
|
44
44
|
}
|
45
45
|
/**
|
46
|
-
* List all vector stores.
|
46
|
+
* List all vector stores with optional search.
|
47
47
|
*
|
48
|
-
* Args: pagination: The pagination options.
|
48
|
+
* Args: pagination: The pagination options. q: Optional search query to filter
|
49
|
+
* vector stores.
|
49
50
|
*
|
50
51
|
* Returns: VectorStoreListResponse: The list of vector stores.
|
51
52
|
*/
|
@@ -53,14 +54,14 @@ export class VectorStores extends APIResource {
|
|
53
54
|
return this._client.getAPIList('/v1/vector_stores', (LimitOffset), { query, ...options });
|
54
55
|
}
|
55
56
|
/**
|
56
|
-
* Delete a vector store by ID.
|
57
|
+
* Delete a vector store by ID or name.
|
57
58
|
*
|
58
|
-
* Args:
|
59
|
+
* Args: vector_store_identifier: The ID or name of the vector store to delete.
|
59
60
|
*
|
60
61
|
* Returns: VectorStore: The response containing the deleted vector store details.
|
61
62
|
*/
|
62
|
-
delete(
|
63
|
-
return this._client.delete(path `/v1/vector_stores/${
|
63
|
+
delete(vectorStoreIdentifier, options) {
|
64
|
+
return this._client.delete(path `/v1/vector_stores/${vectorStoreIdentifier}`, options);
|
64
65
|
}
|
65
66
|
/**
|
66
67
|
* Question answering
|
@@ -76,7 +77,9 @@ export class VectorStores extends APIResource {
|
|
76
77
|
* relevance-scored results.
|
77
78
|
*
|
78
79
|
* Args: search_params: Search configuration including: - query text or
|
79
|
-
* embeddings -
|
80
|
+
* embeddings - vector_store_ids: List of vector stores to search - file_ids:
|
81
|
+
* Optional list of file IDs to filter chunks by (or tuple of list and condition
|
82
|
+
* operator) - metadata filters - pagination parameters - sorting preferences
|
80
83
|
* \_state: API state dependency \_ctx: Service context dependency
|
81
84
|
*
|
82
85
|
* Returns: VectorStoreSearchChunkResponse containing: - List of matched chunks
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vector-stores.mjs","sourceRoot":"","sources":["../../src/resources/vector-stores/vector-stores.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,QAAQ;OACb,EAQL,KAAK,
|
1
|
+
{"version":3,"file":"vector-stores.mjs","sourceRoot":"","sources":["../../src/resources/vector-stores/vector-stores.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,QAAQ;OACb,EAQL,KAAK,GAMN;OAEM,EAAE,WAAW,EAAuC;OAEpD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,YAAa,SAAQ,WAAW;IAA7C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoG3D,CAAC;IAlGC;;;;;;;OAOG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,qBAA6B,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,qBAAqB,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CACJ,qBAA6B,EAC7B,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,qBAAqB,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAA,WAAwB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,qBAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,qBAAqB,qBAAqB,EAAE,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;IAED;;OAEG;IACH,iBAAiB,CACf,IAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sCAAsC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AAuoBD,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
package/src/client.ts
CHANGED
@@ -66,6 +66,9 @@ import {
|
|
66
66
|
DataSourceUpdateParams,
|
67
67
|
DataSources,
|
68
68
|
DataSourcesLimitOffset,
|
69
|
+
LinearDataSource,
|
70
|
+
NotionDataSource,
|
71
|
+
Oauth2Params,
|
69
72
|
} from './resources/data-sources/data-sources';
|
70
73
|
import { Extractions } from './resources/extractions/extractions';
|
71
74
|
import { Parsing } from './resources/parsing/parsing';
|
@@ -838,18 +841,18 @@ export class Mixedbread {
|
|
838
841
|
files: API.Files = new API.Files(this);
|
839
842
|
extractions: API.Extractions = new API.Extractions(this);
|
840
843
|
embeddings: API.Embeddings = new API.Embeddings(this);
|
841
|
-
chat: API.Chat = new API.Chat(this);
|
842
844
|
dataSources: API.DataSources = new API.DataSources(this);
|
843
845
|
apiKeys: API.APIKeys = new API.APIKeys(this);
|
846
|
+
chat: API.Chat = new API.Chat(this);
|
844
847
|
}
|
845
848
|
Mixedbread.VectorStores = VectorStores;
|
846
849
|
Mixedbread.Parsing = Parsing;
|
847
850
|
Mixedbread.Files = Files;
|
848
851
|
Mixedbread.Extractions = Extractions;
|
849
852
|
Mixedbread.Embeddings = Embeddings;
|
850
|
-
Mixedbread.Chat = Chat;
|
851
853
|
Mixedbread.DataSources = DataSources;
|
852
854
|
Mixedbread.APIKeys = APIKeys;
|
855
|
+
Mixedbread.Chat = Chat;
|
853
856
|
export declare namespace Mixedbread {
|
854
857
|
export type RequestOptions = Opts.RequestOptions;
|
855
858
|
|
@@ -908,13 +911,14 @@ export declare namespace Mixedbread {
|
|
908
911
|
type EmbeddingCreateParams as EmbeddingCreateParams,
|
909
912
|
};
|
910
913
|
|
911
|
-
export { Chat as Chat, type ChatCreateCompletionResponse as ChatCreateCompletionResponse };
|
912
|
-
|
913
914
|
export {
|
914
915
|
DataSources as DataSources,
|
915
916
|
type DataSource as DataSource,
|
916
917
|
type DataSourceOauth2Params as DataSourceOauth2Params,
|
917
918
|
type DataSourceType as DataSourceType,
|
919
|
+
type LinearDataSource as LinearDataSource,
|
920
|
+
type NotionDataSource as NotionDataSource,
|
921
|
+
type Oauth2Params as Oauth2Params,
|
918
922
|
type DataSourceDeleteResponse as DataSourceDeleteResponse,
|
919
923
|
type DataSourcesLimitOffset as DataSourcesLimitOffset,
|
920
924
|
type DataSourceCreateParams as DataSourceCreateParams,
|
@@ -932,6 +936,8 @@ export declare namespace Mixedbread {
|
|
932
936
|
type APIKeyListParams as APIKeyListParams,
|
933
937
|
};
|
934
938
|
|
939
|
+
export { Chat as Chat, type ChatCreateCompletionResponse as ChatCreateCompletionResponse };
|
940
|
+
|
935
941
|
export type SearchFilter = API.SearchFilter;
|
936
942
|
export type SearchFilterCondition = API.SearchFilterCondition;
|
937
943
|
export type Usage = API.Usage;
|
package/src/core/pagination.ts
CHANGED
package/src/core/resource.ts
CHANGED
@@ -85,10 +85,10 @@ const getPlatformProperties = (): PlatformProperties => {
|
|
85
85
|
return {
|
86
86
|
'X-Stainless-Lang': 'js',
|
87
87
|
'X-Stainless-Package-Version': VERSION,
|
88
|
-
'X-Stainless-OS': normalizePlatform((globalThis as any).process.platform),
|
89
|
-
'X-Stainless-Arch': normalizeArch((globalThis as any).process.arch),
|
88
|
+
'X-Stainless-OS': normalizePlatform((globalThis as any).process.platform ?? 'unknown'),
|
89
|
+
'X-Stainless-Arch': normalizeArch((globalThis as any).process.arch ?? 'unknown'),
|
90
90
|
'X-Stainless-Runtime': 'node',
|
91
|
-
'X-Stainless-Runtime-Version': (globalThis as any).process.version,
|
91
|
+
'X-Stainless-Runtime-Version': (globalThis as any).process.version ?? 'unknown',
|
92
92
|
};
|
93
93
|
}
|
94
94
|
|
package/src/internal/headers.ts
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
+
import { isReadonlyArray } from './utils/values';
|
4
|
+
|
3
5
|
type HeaderValue = string | undefined | null;
|
4
6
|
export type HeadersLike =
|
5
7
|
| Headers
|
@@ -9,7 +11,7 @@ export type HeadersLike =
|
|
9
11
|
| null
|
10
12
|
| NullableHeaders;
|
11
13
|
|
12
|
-
const brand_privateNullableHeaders = Symbol('brand.privateNullableHeaders');
|
14
|
+
const brand_privateNullableHeaders = /* @__PURE__ */ Symbol('brand.privateNullableHeaders');
|
13
15
|
|
14
16
|
/**
|
15
17
|
* @internal
|
@@ -25,8 +27,6 @@ export type NullableHeaders = {
|
|
25
27
|
nulls: Set<string>;
|
26
28
|
};
|
27
29
|
|
28
|
-
const isArray = Array.isArray as (val: unknown) => val is readonly unknown[];
|
29
|
-
|
30
30
|
function* iterateHeaders(headers: HeadersLike): IterableIterator<readonly [string, string | null]> {
|
31
31
|
if (!headers) return;
|
32
32
|
|
@@ -43,7 +43,7 @@ function* iterateHeaders(headers: HeadersLike): IterableIterator<readonly [strin
|
|
43
43
|
let iter: Iterable<readonly (HeaderValue | readonly HeaderValue[])[]>;
|
44
44
|
if (headers instanceof Headers) {
|
45
45
|
iter = headers.entries();
|
46
|
-
} else if (
|
46
|
+
} else if (isReadonlyArray(headers)) {
|
47
47
|
iter = headers;
|
48
48
|
} else {
|
49
49
|
shouldClear = true;
|
@@ -52,7 +52,7 @@ function* iterateHeaders(headers: HeadersLike): IterableIterator<readonly [strin
|
|
52
52
|
for (let row of iter) {
|
53
53
|
const name = row[0];
|
54
54
|
if (typeof name !== 'string') throw new TypeError('expected header name to be a string');
|
55
|
-
const values =
|
55
|
+
const values = isReadonlyArray(row[1]) ? row[1] : [row[1]];
|
56
56
|
let didClear = false;
|
57
57
|
for (const value of values) {
|
58
58
|
if (value === undefined) continue;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Shims for types that we can't always rely on being available globally.
|
5
|
+
*
|
6
|
+
* Note: these only exist at the type-level, there is no corresponding runtime
|
7
|
+
* version for any of these symbols.
|
8
|
+
*/
|
9
|
+
|
10
|
+
type NeverToAny<T> = T extends never ? any : T;
|
11
|
+
|
12
|
+
/** @ts-ignore */
|
13
|
+
type _DOMReadableStream<R = any> = globalThis.ReadableStream<R>;
|
14
|
+
|
15
|
+
/** @ts-ignore */
|
16
|
+
type _NodeReadableStream<R = any> = import('stream/web').ReadableStream<R>;
|
17
|
+
|
18
|
+
type _ConditionalNodeReadableStream<R = any> =
|
19
|
+
typeof globalThis extends { ReadableStream: any } ? never : _NodeReadableStream<R>;
|
20
|
+
|
21
|
+
type _ReadableStream<R = any> = NeverToAny<
|
22
|
+
| ([0] extends [1 & _DOMReadableStream<R>] ? never : _DOMReadableStream<R>)
|
23
|
+
| ([0] extends [1 & _ConditionalNodeReadableStream<R>] ? never : _ConditionalNodeReadableStream<R>)
|
24
|
+
>;
|
25
|
+
|
26
|
+
export type { _ReadableStream as ReadableStream };
|
package/src/internal/shims.ts
CHANGED
@@ -7,8 +7,8 @@
|
|
7
7
|
* messages in cases where an environment isn't fully supported.
|
8
8
|
*/
|
9
9
|
|
10
|
-
import {
|
11
|
-
import {
|
10
|
+
import type { Fetch } from './builtin-types';
|
11
|
+
import type { ReadableStream } from './shim-types';
|
12
12
|
|
13
13
|
export function getDefaultFetch(): Fetch {
|
14
14
|
if (typeof fetch !== 'undefined') {
|
package/src/internal/uploads.ts
CHANGED
@@ -90,7 +90,7 @@ export const multipartFormRequestOptions = async (
|
|
90
90
|
return { ...opts, body: await createForm(opts.body, fetch) };
|
91
91
|
};
|
92
92
|
|
93
|
-
const supportsFormDataMap = new WeakMap<Fetch, Promise<boolean>>();
|
93
|
+
const supportsFormDataMap = /** @__PURE__ */ new WeakMap<Fetch, Promise<boolean>>();
|
94
94
|
|
95
95
|
/**
|
96
96
|
* node-fetch doesn't support the global FormData object in recent node versions. Instead of sending
|
@@ -138,7 +138,7 @@ export const createForm = async <T = Record<string, unknown>>(
|
|
138
138
|
|
139
139
|
// We check for Blob not File because Bun.File doesn't inherit from File,
|
140
140
|
// but they both inherit from Blob and have a `name` property at runtime.
|
141
|
-
const isNamedBlob = (value:
|
141
|
+
const isNamedBlob = (value: unknown) => value instanceof Blob && 'name' in value;
|
142
142
|
|
143
143
|
const isUploadable = (value: unknown) =>
|
144
144
|
typeof value === 'object' &&
|
@@ -58,7 +58,7 @@ const noopLogger = {
|
|
58
58
|
debug: noop,
|
59
59
|
};
|
60
60
|
|
61
|
-
let cachedLoggers = new WeakMap<Logger, [LogLevel, Logger]>();
|
61
|
+
let cachedLoggers = /** @__PURE__ */ new WeakMap<Logger, [LogLevel, Logger]>();
|
62
62
|
|
63
63
|
export function loggerFor(client: Mixedbread): Logger {
|
64
64
|
const logger = client.logger;
|
@@ -62,4 +62,4 @@ export const createPathTagFunction = (pathEncoder = encodeURIPath) =>
|
|
62
62
|
/**
|
63
63
|
* URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced.
|
64
64
|
*/
|
65
|
-
export const path = createPathTagFunction(encodeURIPath);
|
65
|
+
export const path = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
@@ -9,6 +9,9 @@ export const isAbsoluteURL = (url: string): boolean => {
|
|
9
9
|
return startsWithSchemeRegexp.test(url);
|
10
10
|
};
|
11
11
|
|
12
|
+
export let isArray = (val: unknown): val is unknown[] => ((isArray = Array.isArray), isArray(val));
|
13
|
+
export let isReadonlyArray = isArray as (val: unknown) => val is readonly unknown[];
|
14
|
+
|
12
15
|
/** Returns an object if the given value isn't an object, otherwise returns as-is */
|
13
16
|
export function maybeObj(x: unknown): object {
|
14
17
|
if (typeof x !== 'object') {
|
@@ -218,9 +218,14 @@ export interface ConnectorCreateParams {
|
|
218
218
|
metadata?: unknown;
|
219
219
|
|
220
220
|
/**
|
221
|
-
*
|
221
|
+
* Polling interval for the connector. Defaults to 30 minutes if not specified. Can
|
222
|
+
* be provided as:
|
223
|
+
*
|
224
|
+
* - int: Number of seconds (e.g., 1800 for 30 minutes)
|
225
|
+
* - str: Duration string (e.g., '30m', '1h', '2d') or ISO 8601 format (e.g.,
|
226
|
+
* 'PT30M', 'P1D') Valid range: 15 seconds to 30 days
|
222
227
|
*/
|
223
|
-
polling_interval?: string | null;
|
228
|
+
polling_interval?: number | string | null;
|
224
229
|
}
|
225
230
|
|
226
231
|
export interface ConnectorRetrieveParams {
|
@@ -252,9 +257,14 @@ export interface ConnectorUpdateParams {
|
|
252
257
|
trigger_sync?: boolean | null;
|
253
258
|
|
254
259
|
/**
|
255
|
-
* Body param:
|
260
|
+
* Body param: Polling interval for the connector. Defaults to 30 minutes if not
|
261
|
+
* specified. Can be provided as:
|
262
|
+
*
|
263
|
+
* - int: Number of seconds (e.g., 1800 for 30 minutes)
|
264
|
+
* - str: Duration string (e.g., '30m', '1h', '2d') or ISO 8601 format (e.g.,
|
265
|
+
* 'PT30M', 'P1D') Valid range: 15 seconds to 30 days
|
256
266
|
*/
|
257
|
-
polling_interval?: string | null;
|
267
|
+
polling_interval?: number | string | null;
|
258
268
|
}
|
259
269
|
|
260
270
|
export interface ConnectorListParams extends LimitOffsetParams {}
|