@mixedbread/sdk 0.68.1 → 0.70.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 +16 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +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/stores/files.d.mts +4 -0
- package/resources/stores/files.d.mts.map +1 -1
- package/resources/stores/files.d.ts +4 -0
- package/resources/stores/files.d.ts.map +1 -1
- package/resources/stores/index.d.mts +1 -1
- package/resources/stores/index.d.mts.map +1 -1
- package/resources/stores/index.d.ts +1 -1
- package/resources/stores/index.d.ts.map +1 -1
- package/resources/stores/index.js.map +1 -1
- package/resources/stores/index.mjs.map +1 -1
- package/resources/stores/stores.d.mts +118 -1
- package/resources/stores/stores.d.mts.map +1 -1
- package/resources/stores/stores.d.ts +118 -1
- package/resources/stores/stores.d.ts.map +1 -1
- package/resources/stores/stores.js +33 -0
- package/resources/stores/stores.js.map +1 -1
- package/resources/stores/stores.mjs +33 -0
- package/resources/stores/stores.mjs.map +1 -1
- package/src/client.ts +4 -0
- package/src/resources/index.ts +2 -0
- package/src/resources/stores/files.ts +5 -0
- package/src/resources/stores/index.ts +2 -0
- package/src/resources/stores/stores.ts +145 -0
- 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/resources/index.ts
CHANGED
|
@@ -67,12 +67,14 @@ export {
|
|
|
67
67
|
type VideoChunkGeneratedMetadata,
|
|
68
68
|
type VideoURL,
|
|
69
69
|
type StoreDeleteResponse,
|
|
70
|
+
type StoreGrepResponse,
|
|
70
71
|
type StoreMetadataFacetsResponse,
|
|
71
72
|
type StoreQuestionAnsweringResponse,
|
|
72
73
|
type StoreSearchResponse,
|
|
73
74
|
type StoreCreateParams,
|
|
74
75
|
type StoreUpdateParams,
|
|
75
76
|
type StoreListParams,
|
|
77
|
+
type StoreGrepParams,
|
|
76
78
|
type StoreMetadataFacetsParams,
|
|
77
79
|
type StoreQuestionAnsweringParams,
|
|
78
80
|
type StoreSearchParams,
|
|
@@ -652,6 +652,11 @@ export interface TextInputChunk {
|
|
|
652
652
|
* LLM-generated context that situates this chunk within its source document
|
|
653
653
|
*/
|
|
654
654
|
context?: string | null;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* summary of the text chunk
|
|
658
|
+
*/
|
|
659
|
+
summary?: string | null;
|
|
655
660
|
}
|
|
656
661
|
|
|
657
662
|
export interface VideoURLInputChunk {
|
|
@@ -47,12 +47,14 @@ export {
|
|
|
47
47
|
type VideoChunkGeneratedMetadata,
|
|
48
48
|
type VideoURL,
|
|
49
49
|
type StoreDeleteResponse,
|
|
50
|
+
type StoreGrepResponse,
|
|
50
51
|
type StoreMetadataFacetsResponse,
|
|
51
52
|
type StoreQuestionAnsweringResponse,
|
|
52
53
|
type StoreSearchResponse,
|
|
53
54
|
type StoreCreateParams,
|
|
54
55
|
type StoreUpdateParams,
|
|
55
56
|
type StoreListParams,
|
|
57
|
+
type StoreGrepParams,
|
|
56
58
|
type StoreMetadataFacetsParams,
|
|
57
59
|
type StoreQuestionAnsweringParams,
|
|
58
60
|
type StoreSearchParams,
|
|
@@ -124,6 +124,40 @@ export class Stores extends APIResource {
|
|
|
124
124
|
return this._client.delete(path`/v1/stores/${storeIdentifier}`, options);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
/**
|
|
128
|
+
* Match store chunks against a regular expression.
|
|
129
|
+
*
|
|
130
|
+
* Unlike `/stores/search`, this performs exact text matching — no embeddings, no
|
|
131
|
+
* semantic similarity, no reranking. Use it to find chunks containing a specific
|
|
132
|
+
* token, identifier, error code, or literal phrase.
|
|
133
|
+
*
|
|
134
|
+
* grep targets a single store and does not support pagination; raise `top_k` to
|
|
135
|
+
* retrieve more matches.
|
|
136
|
+
*
|
|
137
|
+
* Args: grep_params: Grep configuration including: - pattern: RE2 regular
|
|
138
|
+
* expression matched against chunk text - targets: chunk content groups to match
|
|
139
|
+
* (`text`, `generated`) - case_sensitive: whether the pattern is case-sensitive -
|
|
140
|
+
* store_identifiers: the single store to grep - file_ids: optional list of file
|
|
141
|
+
* IDs to filter chunks by - filters: optional metadata filter conditions - top_k:
|
|
142
|
+
* number of matches to return
|
|
143
|
+
*
|
|
144
|
+
* Returns: StoreGrepResponse containing the list of matching chunks.
|
|
145
|
+
*
|
|
146
|
+
* Raises: HTTPException (400): If grep parameters are invalid HTTPException (404):
|
|
147
|
+
* If the store is not found
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ```ts
|
|
151
|
+
* const response = await client.stores.grep({
|
|
152
|
+
* store_identifiers: ['string'],
|
|
153
|
+
* pattern: 'ERR-\\d{4}',
|
|
154
|
+
* });
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
grep(body: StoreGrepParams, options?: RequestOptions): APIPromise<StoreGrepResponse> {
|
|
158
|
+
return this._client.post('/v1/stores/grep', { body, ...options });
|
|
159
|
+
}
|
|
160
|
+
|
|
127
161
|
/**
|
|
128
162
|
* Get metadata facets
|
|
129
163
|
*
|
|
@@ -695,6 +729,11 @@ export interface ScoredTextInputChunk {
|
|
|
695
729
|
* LLM-generated context that situates this chunk within its source document
|
|
696
730
|
*/
|
|
697
731
|
context?: string | null;
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* summary of the text chunk
|
|
735
|
+
*/
|
|
736
|
+
summary?: string | null;
|
|
698
737
|
}
|
|
699
738
|
|
|
700
739
|
export interface ScoredVideoURLInputChunk {
|
|
@@ -998,6 +1037,20 @@ export interface StoreDeleteResponse {
|
|
|
998
1037
|
object?: 'store';
|
|
999
1038
|
}
|
|
1000
1039
|
|
|
1040
|
+
export interface StoreGrepResponse {
|
|
1041
|
+
/**
|
|
1042
|
+
* The object type of the response
|
|
1043
|
+
*/
|
|
1044
|
+
object?: 'list';
|
|
1045
|
+
|
|
1046
|
+
/**
|
|
1047
|
+
* The list of chunks matching the pattern
|
|
1048
|
+
*/
|
|
1049
|
+
data: Array<
|
|
1050
|
+
ScoredTextInputChunk | ScoredImageURLInputChunk | ScoredAudioURLInputChunk | ScoredVideoURLInputChunk
|
|
1051
|
+
>;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1001
1054
|
/**
|
|
1002
1055
|
* Represents metadata facets for a store.
|
|
1003
1056
|
*/
|
|
@@ -1124,6 +1177,96 @@ export interface StoreListParams extends CursorParams {
|
|
|
1124
1177
|
q?: string | null;
|
|
1125
1178
|
}
|
|
1126
1179
|
|
|
1180
|
+
export interface StoreGrepParams {
|
|
1181
|
+
/**
|
|
1182
|
+
* IDs or names of stores
|
|
1183
|
+
*/
|
|
1184
|
+
store_identifiers: Array<string>;
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* Number of results to return
|
|
1188
|
+
*/
|
|
1189
|
+
top_k?: number;
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
* Optional filter conditions
|
|
1193
|
+
*/
|
|
1194
|
+
filters?:
|
|
1195
|
+
| StoreGrepParams.SearchFilterInput
|
|
1196
|
+
| Shared.SearchFilterCondition
|
|
1197
|
+
| Array<StoreGrepParams.SearchFilterInput | Shared.SearchFilterCondition>
|
|
1198
|
+
| null;
|
|
1199
|
+
|
|
1200
|
+
/**
|
|
1201
|
+
* Optional list of file IDs to filter chunks by (inclusion filter)
|
|
1202
|
+
*/
|
|
1203
|
+
file_ids?: Array<unknown> | Array<string> | null;
|
|
1204
|
+
|
|
1205
|
+
/**
|
|
1206
|
+
* Regular expression (RE2 syntax) matched against chunk text
|
|
1207
|
+
*/
|
|
1208
|
+
pattern: string;
|
|
1209
|
+
|
|
1210
|
+
/**
|
|
1211
|
+
* Chunk content groups to match against. `text` matches the original text of text
|
|
1212
|
+
* chunks; `generated` matches ingestion-derived fields (transcription, OCR text,
|
|
1213
|
+
* summaries).
|
|
1214
|
+
*/
|
|
1215
|
+
targets?: Array<'text' | 'generated'>;
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* Whether the regular expression is case-sensitive
|
|
1219
|
+
*/
|
|
1220
|
+
case_sensitive?: boolean;
|
|
1221
|
+
|
|
1222
|
+
/**
|
|
1223
|
+
* Whether to return file metadata
|
|
1224
|
+
*/
|
|
1225
|
+
return_metadata?: boolean;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
export namespace StoreGrepParams {
|
|
1229
|
+
/**
|
|
1230
|
+
* Represents a filter with AND, OR, and NOT conditions.
|
|
1231
|
+
*/
|
|
1232
|
+
export interface SearchFilterInput {
|
|
1233
|
+
/**
|
|
1234
|
+
* List of conditions or filters to be ANDed together
|
|
1235
|
+
*/
|
|
1236
|
+
all?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1237
|
+
|
|
1238
|
+
/**
|
|
1239
|
+
* List of conditions or filters to be ORed together
|
|
1240
|
+
*/
|
|
1241
|
+
any?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1242
|
+
|
|
1243
|
+
/**
|
|
1244
|
+
* List of conditions or filters to be NOTed
|
|
1245
|
+
*/
|
|
1246
|
+
none?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
/**
|
|
1250
|
+
* Represents a filter with AND, OR, and NOT conditions.
|
|
1251
|
+
*/
|
|
1252
|
+
export interface SearchFilterInput {
|
|
1253
|
+
/**
|
|
1254
|
+
* List of conditions or filters to be ANDed together
|
|
1255
|
+
*/
|
|
1256
|
+
all?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1257
|
+
|
|
1258
|
+
/**
|
|
1259
|
+
* List of conditions or filters to be ORed together
|
|
1260
|
+
*/
|
|
1261
|
+
any?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* List of conditions or filters to be NOTed
|
|
1265
|
+
*/
|
|
1266
|
+
none?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1127
1270
|
export interface StoreMetadataFacetsParams {
|
|
1128
1271
|
/**
|
|
1129
1272
|
* IDs or names of stores
|
|
@@ -1438,6 +1581,7 @@ export declare namespace Stores {
|
|
|
1438
1581
|
type VideoChunkGeneratedMetadata as VideoChunkGeneratedMetadata,
|
|
1439
1582
|
type VideoURL as VideoURL,
|
|
1440
1583
|
type StoreDeleteResponse as StoreDeleteResponse,
|
|
1584
|
+
type StoreGrepResponse as StoreGrepResponse,
|
|
1441
1585
|
type StoreMetadataFacetsResponse as StoreMetadataFacetsResponse,
|
|
1442
1586
|
type StoreQuestionAnsweringResponse as StoreQuestionAnsweringResponse,
|
|
1443
1587
|
type StoreSearchResponse as StoreSearchResponse,
|
|
@@ -1445,6 +1589,7 @@ export declare namespace Stores {
|
|
|
1445
1589
|
type StoreCreateParams as StoreCreateParams,
|
|
1446
1590
|
type StoreUpdateParams as StoreUpdateParams,
|
|
1447
1591
|
type StoreListParams as StoreListParams,
|
|
1592
|
+
type StoreGrepParams as StoreGrepParams,
|
|
1448
1593
|
type StoreMetadataFacetsParams as StoreMetadataFacetsParams,
|
|
1449
1594
|
type StoreQuestionAnsweringParams as StoreQuestionAnsweringParams,
|
|
1450
1595
|
type StoreSearchParams as StoreSearchParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.70.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.70.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.70.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.70.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|