@mixedbread/sdk 0.68.1 → 0.69.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 +8 -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/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 +114 -1
- package/resources/stores/stores.d.mts.map +1 -1
- package/resources/stores/stores.d.ts +114 -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/index.ts +2 -0
- package/src/resources/stores/stores.ts +140 -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
|
@@ -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
|
*
|
|
@@ -998,6 +1032,20 @@ export interface StoreDeleteResponse {
|
|
|
998
1032
|
object?: 'store';
|
|
999
1033
|
}
|
|
1000
1034
|
|
|
1035
|
+
export interface StoreGrepResponse {
|
|
1036
|
+
/**
|
|
1037
|
+
* The object type of the response
|
|
1038
|
+
*/
|
|
1039
|
+
object?: 'list';
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* The list of chunks matching the pattern
|
|
1043
|
+
*/
|
|
1044
|
+
data: Array<
|
|
1045
|
+
ScoredTextInputChunk | ScoredImageURLInputChunk | ScoredAudioURLInputChunk | ScoredVideoURLInputChunk
|
|
1046
|
+
>;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1001
1049
|
/**
|
|
1002
1050
|
* Represents metadata facets for a store.
|
|
1003
1051
|
*/
|
|
@@ -1124,6 +1172,96 @@ export interface StoreListParams extends CursorParams {
|
|
|
1124
1172
|
q?: string | null;
|
|
1125
1173
|
}
|
|
1126
1174
|
|
|
1175
|
+
export interface StoreGrepParams {
|
|
1176
|
+
/**
|
|
1177
|
+
* IDs or names of stores
|
|
1178
|
+
*/
|
|
1179
|
+
store_identifiers: Array<string>;
|
|
1180
|
+
|
|
1181
|
+
/**
|
|
1182
|
+
* Number of results to return
|
|
1183
|
+
*/
|
|
1184
|
+
top_k?: number;
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* Optional filter conditions
|
|
1188
|
+
*/
|
|
1189
|
+
filters?:
|
|
1190
|
+
| StoreGrepParams.SearchFilterInput
|
|
1191
|
+
| Shared.SearchFilterCondition
|
|
1192
|
+
| Array<StoreGrepParams.SearchFilterInput | Shared.SearchFilterCondition>
|
|
1193
|
+
| null;
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* Optional list of file IDs to filter chunks by (inclusion filter)
|
|
1197
|
+
*/
|
|
1198
|
+
file_ids?: Array<unknown> | Array<string> | null;
|
|
1199
|
+
|
|
1200
|
+
/**
|
|
1201
|
+
* Regular expression (RE2 syntax) matched against chunk text
|
|
1202
|
+
*/
|
|
1203
|
+
pattern: string;
|
|
1204
|
+
|
|
1205
|
+
/**
|
|
1206
|
+
* Chunk content groups to match against. `text` matches the original text of text
|
|
1207
|
+
* chunks; `generated` matches ingestion-derived fields (transcription, OCR text,
|
|
1208
|
+
* summaries).
|
|
1209
|
+
*/
|
|
1210
|
+
targets?: Array<'text' | 'generated'>;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Whether the regular expression is case-sensitive
|
|
1214
|
+
*/
|
|
1215
|
+
case_sensitive?: boolean;
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* Whether to return file metadata
|
|
1219
|
+
*/
|
|
1220
|
+
return_metadata?: boolean;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
export namespace StoreGrepParams {
|
|
1224
|
+
/**
|
|
1225
|
+
* Represents a filter with AND, OR, and NOT conditions.
|
|
1226
|
+
*/
|
|
1227
|
+
export interface SearchFilterInput {
|
|
1228
|
+
/**
|
|
1229
|
+
* List of conditions or filters to be ANDed together
|
|
1230
|
+
*/
|
|
1231
|
+
all?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1232
|
+
|
|
1233
|
+
/**
|
|
1234
|
+
* List of conditions or filters to be ORed together
|
|
1235
|
+
*/
|
|
1236
|
+
any?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1237
|
+
|
|
1238
|
+
/**
|
|
1239
|
+
* List of conditions or filters to be NOTed
|
|
1240
|
+
*/
|
|
1241
|
+
none?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* Represents a filter with AND, OR, and NOT conditions.
|
|
1246
|
+
*/
|
|
1247
|
+
export interface SearchFilterInput {
|
|
1248
|
+
/**
|
|
1249
|
+
* List of conditions or filters to be ANDed together
|
|
1250
|
+
*/
|
|
1251
|
+
all?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1252
|
+
|
|
1253
|
+
/**
|
|
1254
|
+
* List of conditions or filters to be ORed together
|
|
1255
|
+
*/
|
|
1256
|
+
any?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1257
|
+
|
|
1258
|
+
/**
|
|
1259
|
+
* List of conditions or filters to be NOTed
|
|
1260
|
+
*/
|
|
1261
|
+
none?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1127
1265
|
export interface StoreMetadataFacetsParams {
|
|
1128
1266
|
/**
|
|
1129
1267
|
* IDs or names of stores
|
|
@@ -1438,6 +1576,7 @@ export declare namespace Stores {
|
|
|
1438
1576
|
type VideoChunkGeneratedMetadata as VideoChunkGeneratedMetadata,
|
|
1439
1577
|
type VideoURL as VideoURL,
|
|
1440
1578
|
type StoreDeleteResponse as StoreDeleteResponse,
|
|
1579
|
+
type StoreGrepResponse as StoreGrepResponse,
|
|
1441
1580
|
type StoreMetadataFacetsResponse as StoreMetadataFacetsResponse,
|
|
1442
1581
|
type StoreQuestionAnsweringResponse as StoreQuestionAnsweringResponse,
|
|
1443
1582
|
type StoreSearchResponse as StoreSearchResponse,
|
|
@@ -1445,6 +1584,7 @@ export declare namespace Stores {
|
|
|
1445
1584
|
type StoreCreateParams as StoreCreateParams,
|
|
1446
1585
|
type StoreUpdateParams as StoreUpdateParams,
|
|
1447
1586
|
type StoreListParams as StoreListParams,
|
|
1587
|
+
type StoreGrepParams as StoreGrepParams,
|
|
1448
1588
|
type StoreMetadataFacetsParams as StoreMetadataFacetsParams,
|
|
1449
1589
|
type StoreQuestionAnsweringParams as StoreQuestionAnsweringParams,
|
|
1450
1590
|
type StoreSearchParams as StoreSearchParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.69.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.69.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.69.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.69.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|